From 0a0daedcfdc24c643a80e7a8122c5d1a919b32ab Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Wed, 9 Dec 2015 22:49:02 -0500 Subject: [PATCH 1/8] Still not working DSTU2.1 --- .../model/api/annotation/ResourceDef.java | 5 +- .../client/ClientWithProfileDstu2Test.java | 93 + .../uhn/fhir/rest/server/ReadDstu2Test.java | 5 +- hapi-fhir-structures-hl7org-dstu2.1/pom.xml | 209 + .../org/hl7/fhir/dstu21/model/Account.java | 797 + .../org/hl7/fhir/dstu21/model/Address.java | 955 ++ .../java/org/hl7/fhir/dstu21/model/Age.java | 91 + .../fhir/dstu21/model/AllergyIntolerance.java | 2149 +++ .../org/hl7/fhir/dstu21/model/Annotation.java | 311 + .../hl7/fhir/dstu21/model/Appointment.java | 1556 ++ .../dstu21/model/AppointmentResponse.java | 786 + .../org/hl7/fhir/dstu21/model/Attachment.java | 625 + .../org/hl7/fhir/dstu21/model/AuditEvent.java | 3125 ++++ .../fhir/dstu21/model/BackboneElement.java | 166 + .../java/org/hl7/fhir/dstu21/model/Base.java | 524 + .../fhir/dstu21/model/Base64BinaryType.java | 76 + .../org/hl7/fhir/dstu21/model/BaseBinary.java | 24 + .../fhir/dstu21/model/BaseDateTimeType.java | 621 + .../hl7/fhir/dstu21/model/BaseExtension.java | 17 + .../hl7/fhir/dstu21/model/BaseNarrative.java | 39 + .../hl7/fhir/dstu21/model/BaseReference.java | 65 + .../hl7/fhir/dstu21/model/BaseResource.java | 28 + .../java/org/hl7/fhir/dstu21/model/Basic.java | 421 + .../org/hl7/fhir/dstu21/model/Binary.java | 252 + .../org/hl7/fhir/dstu21/model/BodySite.java | 479 + .../hl7/fhir/dstu21/model/BooleanType.java | 90 + .../org/hl7/fhir/dstu21/model/Bundle.java | 2384 +++ .../org/hl7/fhir/dstu21/model/CarePlan.java | 3159 ++++ .../java/org/hl7/fhir/dstu21/model/Claim.java | 5631 ++++++++ .../hl7/fhir/dstu21/model/ClaimResponse.java | 5087 +++++++ .../fhir/dstu21/model/ClinicalImpression.java | 1883 +++ .../org/hl7/fhir/dstu21/model/CodeType.java | 76 + .../fhir/dstu21/model/CodeableConcept.java | 237 + .../org/hl7/fhir/dstu21/model/Coding.java | 430 + .../hl7/fhir/dstu21/model/Communication.java | 1223 ++ .../dstu21/model/CommunicationRequest.java | 1339 ++ .../org/hl7/fhir/dstu21/model/Comparison.java | 110 + .../hl7/fhir/dstu21/model/Composition.java | 2174 +++ .../org/hl7/fhir/dstu21/model/ConceptMap.java | 2277 +++ .../org/hl7/fhir/dstu21/model/Condition.java | 1685 +++ .../hl7/fhir/dstu21/model/Configuration.java | 106 + .../hl7/fhir/dstu21/model/Conformance.java | 7777 ++++++++++ .../org/hl7/fhir/dstu21/model/Constants.java | 40 + .../hl7/fhir/dstu21/model/ContactPoint.java | 670 + .../org/hl7/fhir/dstu21/model/Contract.java | 3962 +++++ .../java/org/hl7/fhir/dstu21/model/Count.java | 91 + .../org/hl7/fhir/dstu21/model/Coverage.java | 919 ++ .../hl7/fhir/dstu21/model/DataElement.java | 1670 +++ .../hl7/fhir/dstu21/model/DateTimeType.java | 196 + .../org/hl7/fhir/dstu21/model/DateType.java | 141 + .../hl7/fhir/dstu21/model/DecimalType.java | 177 + .../dstu21/model/DecisionSupportRule.java | 2308 +++ .../model/DecisionSupportServiceModule.java | 1391 ++ .../hl7/fhir/dstu21/model/DetectedIssue.java | 1064 ++ .../org/hl7/fhir/dstu21/model/Device.java | 1232 ++ .../fhir/dstu21/model/DeviceComponent.java | 1105 ++ .../hl7/fhir/dstu21/model/DeviceMetric.java | 1560 ++ .../fhir/dstu21/model/DeviceUseRequest.java | 1309 ++ .../fhir/dstu21/model/DeviceUseStatement.java | 705 + .../fhir/dstu21/model/DiagnosticOrder.java | 1956 +++ .../fhir/dstu21/model/DiagnosticReport.java | 1590 ++ .../org/hl7/fhir/dstu21/model/Distance.java | 91 + .../fhir/dstu21/model/DocumentManifest.java | 1167 ++ .../fhir/dstu21/model/DocumentReference.java | 2199 +++ .../hl7/fhir/dstu21/model/DomainResource.java | 302 + .../org/hl7/fhir/dstu21/model/Duration.java | 91 + .../org/hl7/fhir/dstu21/model/Element.java | 263 + .../fhir/dstu21/model/ElementDefinition.java | 4719 ++++++ .../fhir/dstu21/model/EligibilityRequest.java | 519 + .../dstu21/model/EligibilityResponse.java | 714 + .../org/hl7/fhir/dstu21/model/Encounter.java | 3105 ++++ .../fhir/dstu21/model/EnrollmentRequest.java | 702 + .../fhir/dstu21/model/EnrollmentResponse.java | 714 + .../hl7/fhir/dstu21/model/EnumFactory.java | 56 + .../hl7/fhir/dstu21/model/Enumeration.java | 97 + .../hl7/fhir/dstu21/model/Enumerations.java | 6776 +++++++++ .../hl7/fhir/dstu21/model/EpisodeOfCare.java | 1391 ++ .../fhir/dstu21/model/ExpansionProfile.java | 2940 ++++ .../dstu21/model/ExplanationOfBenefit.java | 714 + .../hl7/fhir/dstu21/model/ExpressionNode.java | 455 + .../org/hl7/fhir/dstu21/model/Extension.java | 360 + .../fhir/dstu21/model/ExtensionHelper.java | 148 + .../org/hl7/fhir/dstu21/model/Factory.java | 247 + .../dstu21/model/FamilyMemberHistory.java | 1341 ++ .../java/org/hl7/fhir/dstu21/model/Flag.java | 662 + .../java/org/hl7/fhir/dstu21/model/Goal.java | 1285 ++ .../java/org/hl7/fhir/dstu21/model/Group.java | 1297 ++ .../fhir/dstu21/model/GuidanceRequest.java | 912 ++ .../fhir/dstu21/model/GuidanceResponse.java | 1562 ++ .../fhir/dstu21/model/HealthcareService.java | 2300 +++ .../org/hl7/fhir/dstu21/model/HumanName.java | 738 + .../org/hl7/fhir/dstu21/model/IdType.java | 740 + .../org/hl7/fhir/dstu21/model/Identifier.java | 568 + .../dstu21/model/ImagingObjectSelection.java | 1638 +++ .../hl7/fhir/dstu21/model/ImagingStudy.java | 2411 ++++ .../hl7/fhir/dstu21/model/Immunization.java | 2318 +++ .../model/ImmunizationRecommendation.java | 1347 ++ .../dstu21/model/ImplementationGuide.java | 3400 +++++ .../hl7/fhir/dstu21/model/InstantType.java | 223 + .../hl7/fhir/dstu21/model/IntegerType.java | 110 + .../org/hl7/fhir/dstu21/model/Library.java | 422 + .../java/org/hl7/fhir/dstu21/model/List_.java | 1377 ++ .../org/hl7/fhir/dstu21/model/Location.java | 1307 ++ .../hl7/fhir/dstu21/model/MarkdownType.java | 76 + .../org/hl7/fhir/dstu21/model/Measure.java | 1115 ++ .../java/org/hl7/fhir/dstu21/model/Media.java | 912 ++ .../org/hl7/fhir/dstu21/model/Medication.java | 1299 ++ .../model/MedicationAdministration.java | 1532 ++ .../fhir/dstu21/model/MedicationDispense.java | 2067 +++ .../fhir/dstu21/model/MedicationOrder.java | 2219 +++ .../dstu21/model/MedicationStatement.java | 1631 +++ .../hl7/fhir/dstu21/model/MessageHeader.java | 1738 +++ .../java/org/hl7/fhir/dstu21/model/Meta.java | 435 + .../fhir/dstu21/model/ModuleDefinition.java | 2981 ++++ .../hl7/fhir/dstu21/model/ModuleMetadata.java | 2703 ++++ .../java/org/hl7/fhir/dstu21/model/Money.java | 91 + .../hl7/fhir/dstu21/model/NamingSystem.java | 1631 +++ .../org/hl7/fhir/dstu21/model/Narrative.java | 333 + .../hl7/fhir/dstu21/model/NutritionOrder.java | 2808 ++++ .../hl7/fhir/dstu21/model/Observation.java | 2634 ++++ .../org/hl7/fhir/dstu21/model/OidType.java | 75 + .../dstu21/model/OperationDefinition.java | 2501 ++++ .../fhir/dstu21/model/OperationOutcome.java | 1180 ++ .../java/org/hl7/fhir/dstu21/model/Order.java | 759 + .../hl7/fhir/dstu21/model/OrderResponse.java | 782 + .../org/hl7/fhir/dstu21/model/OrderSet.java | 2564 ++++ .../hl7/fhir/dstu21/model/Organization.java | 848 ++ .../org/hl7/fhir/dstu21/model/Parameters.java | 565 + .../org/hl7/fhir/dstu21/model/Patient.java | 2265 +++ .../hl7/fhir/dstu21/model/PaymentNotice.java | 686 + .../dstu21/model/PaymentReconciliation.java | 1589 ++ .../org/hl7/fhir/dstu21/model/Period.java | 241 + .../org/hl7/fhir/dstu21/model/Person.java | 1056 ++ .../fhir/dstu21/model/PositiveIntType.java | 97 + .../hl7/fhir/dstu21/model/Practitioner.java | 1511 ++ .../hl7/fhir/dstu21/model/PrimitiveType.java | 144 + .../org/hl7/fhir/dstu21/model/Procedure.java | 1846 +++ .../fhir/dstu21/model/ProcedureRequest.java | 1332 ++ .../hl7/fhir/dstu21/model/ProcessRequest.java | 1329 ++ .../fhir/dstu21/model/ProcessResponse.java | 1016 ++ .../org/hl7/fhir/dstu21/model/Property.java | 140 + .../org/hl7/fhir/dstu21/model/Provenance.java | 1627 +++ .../org/hl7/fhir/dstu21/model/Quantity.java | 569 + .../hl7/fhir/dstu21/model/Questionnaire.java | 1827 +++ .../dstu21/model/QuestionnaireResponse.java | 1517 ++ .../java/org/hl7/fhir/dstu21/model/Range.java | 193 + .../java/org/hl7/fhir/dstu21/model/Ratio.java | 194 + .../org/hl7/fhir/dstu21/model/Reference.java | 260 + .../fhir/dstu21/model/ReferralRequest.java | 1212 ++ .../hl7/fhir/dstu21/model/RelatedPerson.java | 705 + .../org/hl7/fhir/dstu21/model/Resource.java | 342 + .../fhir/dstu21/model/ResourceFactory.java | 309 + .../hl7/fhir/dstu21/model/ResourceType.java | 542 + .../hl7/fhir/dstu21/model/RiskAssessment.java | 1129 ++ .../hl7/fhir/dstu21/model/SampledData.java | 610 + .../org/hl7/fhir/dstu21/model/Schedule.java | 418 + .../fhir/dstu21/model/SearchParameter.java | 1403 ++ .../org/hl7/fhir/dstu21/model/SidType.java | 38 + .../org/hl7/fhir/dstu21/model/Signature.java | 430 + .../hl7/fhir/dstu21/model/SimpleQuantity.java | 91 + .../java/org/hl7/fhir/dstu21/model/Slot.java | 724 + .../org/hl7/fhir/dstu21/model/Specimen.java | 1841 +++ .../org/hl7/fhir/dstu21/model/StringType.java | 95 + .../dstu21/model/StructureDefinition.java | 2657 ++++ .../hl7/fhir/dstu21/model/Subscription.java | 1178 ++ .../org/hl7/fhir/dstu21/model/Substance.java | 864 ++ .../hl7/fhir/dstu21/model/SupplyDelivery.java | 855 ++ .../hl7/fhir/dstu21/model/SupplyRequest.java | 973 ++ .../dstu21/model/TemporalPrecisionEnum.java | 62 + .../org/hl7/fhir/dstu21/model/TestScript.java | 7686 ++++++++++ .../org/hl7/fhir/dstu21/model/TimeType.java | 76 + .../org/hl7/fhir/dstu21/model/Timing.java | 1555 ++ .../java/org/hl7/fhir/dstu21/model/Type.java | 47 + .../fhir/dstu21/model/UnsignedIntType.java | 98 + .../org/hl7/fhir/dstu21/model/UriType.java | 163 + .../org/hl7/fhir/dstu21/model/UuidType.java | 70 + .../org/hl7/fhir/dstu21/model/ValueSet.java | 4777 ++++++ .../fhir/dstu21/model/VisionPrescription.java | 1877 +++ .../model/valuesets/Additionalmaterials.java | 123 + .../AdditionalmaterialsEnumFactory.java | 75 + .../dstu21/model/valuesets/Adjudication.java | 132 + .../valuesets/AdjudicationEnumFactory.java | 79 + .../model/valuesets/AdjudicationError.java | 87 + .../AdjudicationErrorEnumFactory.java | 59 + .../model/valuesets/AdjustmentReason.java | 87 + .../AdjustmentReasonEnumFactory.java | 59 + .../dstu21/model/valuesets/AnimalBreeds.java | 105 + .../valuesets/AnimalBreedsEnumFactory.java | 67 + .../model/valuesets/AnimalGenderstatus.java | 96 + .../AnimalGenderstatusEnumFactory.java | 63 + .../dstu21/model/valuesets/AnimalSpecies.java | 96 + .../valuesets/AnimalSpeciesEnumFactory.java | 63 + .../model/valuesets/AnzscoOccupations.java | 12003 ++++++++++++++++ .../AnzscoOccupationsEnumFactory.java | 5355 +++++++ .../model/valuesets/AuditSourceType.java | 150 + .../valuesets/AuditSourceTypeEnumFactory.java | 87 + .../model/valuesets/BasicResourceType.java | 213 + .../BasicResourceTypeEnumFactory.java | 115 + .../valuesets/CarePlanActivityCategory.java | 132 + .../CarePlanActivityCategoryEnumFactory.java | 79 + .../valuesets/ChoiceListOrientation.java | 87 + .../ChoiceListOrientationEnumFactory.java | 59 + .../model/valuesets/ClaimException.java | 87 + .../valuesets/ClaimExceptionEnumFactory.java | 59 + .../model/valuesets/ClaimModifiers.java | 114 + .../valuesets/ClaimModifiersEnumFactory.java | 71 + .../valuesets/ClassificationOrContext.java | 87 + .../ClassificationOrContextEnumFactory.java | 59 + .../model/valuesets/ConditionCategory.java | 105 + .../ConditionCategoryEnumFactory.java | 67 + .../model/valuesets/ConditionClinical.java | 105 + .../ConditionClinicalEnumFactory.java | 67 + .../model/valuesets/ConditionState.java | 96 + .../valuesets/ConditionStateEnumFactory.java | 63 + .../valuesets/ConformanceExpectation.java | 105 + .../ConformanceExpectationEnumFactory.java | 67 + .../model/valuesets/ContactentityType.java | 123 + .../ContactentityTypeEnumFactory.java | 75 + .../model/valuesets/ContractAction.java | 87 + .../valuesets/ContractActionEnumFactory.java | 59 + .../model/valuesets/ContractActorrole.java | 87 + .../ContractActorroleEnumFactory.java | 59 + .../model/valuesets/ContractSignerType.java | 222 + .../ContractSignerTypeEnumFactory.java | 119 + .../model/valuesets/ContractSubtype.java | 87 + .../valuesets/ContractSubtypeEnumFactory.java | 59 + .../model/valuesets/ContractTermSubtype.java | 96 + .../ContractTermSubtypeEnumFactory.java | 63 + .../model/valuesets/ContractTermType.java | 87 + .../ContractTermTypeEnumFactory.java | 59 + .../dstu21/model/valuesets/ContractType.java | 87 + .../valuesets/ContractTypeEnumFactory.java | 59 + .../dstu21/model/valuesets/DeviceAction.java | 96 + .../valuesets/DeviceActionEnumFactory.java | 63 + .../model/valuesets/EncounterAdmitSource.java | 159 + .../EncounterAdmitSourceEnumFactory.java | 91 + .../dstu21/model/valuesets/EncounterDiet.java | 132 + .../valuesets/EncounterDietEnumFactory.java | 79 + .../EncounterDischargeDisposition.java | 150 + ...ounterDischargeDispositionEnumFactory.java | 87 + .../model/valuesets/EncounterPriority.java | 114 + .../EncounterPriorityEnumFactory.java | 71 + .../EncounterSpecialArrangements.java | 114 + ...counterSpecialArrangementsEnumFactory.java | 71 + .../dstu21/model/valuesets/EncounterType.java | 105 + .../valuesets/EncounterTypeEnumFactory.java | 67 + .../model/valuesets/EntformulaAdditive.java | 114 + .../EntformulaAdditiveEnumFactory.java | 71 + .../dstu21/model/valuesets/FlagCategory.java | 114 + .../valuesets/FlagCategoryEnumFactory.java | 71 + .../dstu21/model/valuesets/FlagPriority.java | 105 + .../valuesets/FlagPriorityEnumFactory.java | 67 + .../dstu21/model/valuesets/FmConditions.java | 78 + .../valuesets/FmConditionsEnumFactory.java | 55 + .../fhir/dstu21/model/valuesets/Forms.java | 87 + .../model/valuesets/FormsEnumFactory.java | 59 + .../dstu21/model/valuesets/Fundsreserve.java | 96 + .../valuesets/FundsreserveEnumFactory.java | 63 + .../model/valuesets/GoalAcceptanceStatus.java | 96 + .../GoalAcceptanceStatusEnumFactory.java | 63 + .../dstu21/model/valuesets/GoalCategory.java | 114 + .../valuesets/GoalCategoryEnumFactory.java | 71 + .../dstu21/model/valuesets/GoalPriority.java | 96 + .../valuesets/GoalPriorityEnumFactory.java | 63 + .../model/valuesets/GoalRelationshipType.java | 114 + .../GoalRelationshipTypeEnumFactory.java | 71 + .../model/valuesets/GoalStatusReason.java | 105 + .../GoalStatusReasonEnumFactory.java | 67 + ...munizationRecommendationDateCriterion.java | 114 + ...ecommendationDateCriterionEnumFactory.java | 71 + .../ImmunizationRecommendationStatus.java | 87 + ...zationRecommendationStatusEnumFactory.java | 59 + .../dstu21/model/valuesets/Intervention.java | 87 + .../valuesets/InterventionEnumFactory.java | 59 + .../model/valuesets/ListEmptyReason.java | 123 + .../valuesets/ListEmptyReasonEnumFactory.java | 75 + .../model/valuesets/ListExampleCodes.java | 150 + .../ListExampleCodesEnumFactory.java | 87 + .../dstu21/model/valuesets/ListItemFlag.java | 123 + .../valuesets/ListItemFlagEnumFactory.java | 75 + .../dstu21/model/valuesets/ListOrder.java | 141 + .../model/valuesets/ListOrderEnumFactory.java | 83 + .../model/valuesets/LocationPhysicalType.java | 177 + .../LocationPhysicalTypeEnumFactory.java | 99 + .../valuesets/MessageReasonEncounter.java | 123 + .../MessageReasonEncounterEnumFactory.java | 75 + .../model/valuesets/MessageTransport.java | 96 + .../MessageTransportEnumFactory.java | 63 + .../model/valuesets/MissingToothReason.java | 105 + .../MissingToothReasonEnumFactory.java | 67 + .../model/valuesets/ObjectLifecycle.java | 204 + .../valuesets/ObjectLifecycleEnumFactory.java | 111 + .../dstu21/model/valuesets/ObjectRole.java | 285 + .../valuesets/ObjectRoleEnumFactory.java | 147 + .../dstu21/model/valuesets/ObjectType.java | 105 + .../valuesets/ObjectTypeEnumFactory.java | 67 + .../model/valuesets/ObservationCategory.java | 141 + .../ObservationCategoryEnumFactory.java | 83 + .../model/valuesets/OperationOutcome.java | 510 + .../OperationOutcomeEnumFactory.java | 247 + .../valuesets/OralProsthodonticMaterial.java | 105 + .../OralProsthodonticMaterialEnumFactory.java | 67 + .../model/valuesets/OrganizationType.java | 168 + .../OrganizationTypeEnumFactory.java | 95 + .../valuesets/PatientContactRelationship.java | 168 + ...PatientContactRelationshipEnumFactory.java | 95 + .../model/valuesets/PatientMpiMatch.java | 105 + .../valuesets/PatientMpiMatchEnumFactory.java | 67 + .../dstu21/model/valuesets/Payeetype.java | 96 + .../model/valuesets/PayeetypeEnumFactory.java | 63 + .../dstu21/model/valuesets/PaymentStatus.java | 87 + .../valuesets/PaymentStatusEnumFactory.java | 59 + .../dstu21/model/valuesets/PaymentType.java | 96 + .../valuesets/PaymentTypeEnumFactory.java | 63 + .../model/valuesets/PractitionerRole.java | 123 + .../PractitionerRoleEnumFactory.java | 75 + .../valuesets/PractitionerSpecialty.java | 114 + .../PractitionerSpecialtyEnumFactory.java | 71 + .../ProcedureProgressStatusCodes.java | 123 + ...ocedureProgressStatusCodesEnumFactory.java | 75 + .../valuesets/ProcedureRelationshipType.java | 87 + .../ProcedureRelationshipTypeEnumFactory.java | 59 + .../model/valuesets/ProcessOutcome.java | 96 + .../valuesets/ProcessOutcomeEnumFactory.java | 63 + .../model/valuesets/ProcessPriority.java | 96 + .../valuesets/ProcessPriorityEnumFactory.java | 63 + .../model/valuesets/ProvenanceAgentRole.java | 159 + .../ProvenanceAgentRoleEnumFactory.java | 91 + .../model/valuesets/ProvenanceAgentType.java | 132 + .../ProvenanceAgentTypeEnumFactory.java | 79 + .../model/valuesets/QuestionMaxOccurs.java | 78 + .../QuestionMaxOccursEnumFactory.java | 55 + .../QuestionnaireDisplayCategory.java | 141 + ...estionnaireDisplayCategoryEnumFactory.java | 83 + .../valuesets/QuestionnaireItemControl.java | 267 + .../QuestionnaireItemControlEnumFactory.java | 139 + .../valuesets/ReasonMedicationGivenCodes.java | 96 + ...ReasonMedicationGivenCodesEnumFactory.java | 63 + .../ReasonMedicationNotGivenCodes.java | 105 + ...sonMedicationNotGivenCodesEnumFactory.java | 67 + .../dstu21/model/valuesets/Relationship.java | 114 + .../valuesets/RelationshipEnumFactory.java | 71 + .../valuesets/ResourceValidationMode.java | 96 + .../ResourceValidationModeEnumFactory.java | 63 + .../valuesets/RestfulSecurityService.java | 123 + .../RestfulSecurityServiceEnumFactory.java | 75 + .../model/valuesets/RiskProbability.java | 114 + .../valuesets/RiskProbabilityEnumFactory.java | 71 + .../fhir/dstu21/model/valuesets/Ruleset.java | 123 + .../model/valuesets/RulesetEnumFactory.java | 75 + .../model/valuesets/ServicePharmacy.java | 87 + .../valuesets/ServicePharmacyEnumFactory.java | 59 + .../model/valuesets/ServiceProduct.java | 87 + .../valuesets/ServiceProductEnumFactory.java | 59 + .../valuesets/ServiceProvisionConditions.java | 96 + ...ServiceProvisionConditionsEnumFactory.java | 63 + .../valuesets/ServiceReferralMethod.java | 114 + .../ServiceReferralMethodEnumFactory.java | 71 + .../dstu21/model/valuesets/ServiceUscls.java | 240 + .../valuesets/ServiceUsclsEnumFactory.java | 127 + .../dstu21/model/valuesets/SignatureType.java | 231 + .../valuesets/SignatureTypeEnumFactory.java | 123 + .../model/valuesets/SubscriptionTag.java | 87 + .../valuesets/SubscriptionTagEnumFactory.java | 59 + .../model/valuesets/SubstanceCategory.java | 132 + .../SubstanceCategoryEnumFactory.java | 79 + .../model/valuesets/SupplydeliveryType.java | 87 + .../SupplydeliveryTypeEnumFactory.java | 59 + .../model/valuesets/SupplyrequestKind.java | 87 + .../SupplyrequestKindEnumFactory.java | 59 + .../model/valuesets/SupplyrequestReason.java | 87 + .../SupplyrequestReasonEnumFactory.java | 59 + .../fhir/dstu21/model/valuesets/Surface.java | 168 + .../model/valuesets/SurfaceEnumFactory.java | 95 + .../fhir/dstu21/model/valuesets/Teeth.java | 357 + .../model/valuesets/TeethEnumFactory.java | 179 + .../valuesets/TestscriptOperationCodes.java | 285 + .../TestscriptOperationCodesEnumFactory.java | 147 + .../fhir/dstu21/model/valuesets/Tooth.java | 438 + .../model/valuesets/ToothEnumFactory.java | 215 + .../hl7/fhir/dstu21/model/valuesets/Udi.java | 78 + .../model/valuesets/UdiEnumFactory.java | 55 + .../valuesets/V3AcknowledgementCondition.java | 105 + ...V3AcknowledgementConditionEnumFactory.java | 67 + .../V3AcknowledgementDetailCode.java | 321 + ...3AcknowledgementDetailCodeEnumFactory.java | 163 + .../V3AcknowledgementDetailType.java | 135 + ...3AcknowledgementDetailTypeEnumFactory.java | 75 + .../valuesets/V3AcknowledgementType.java | 123 + .../V3AcknowledgementTypeEnumFactory.java | 75 + .../dstu21/model/valuesets/V3ActClass.java | 1760 +++ .../valuesets/V3ActClassEnumFactory.java | 547 + .../dstu21/model/valuesets/V3ActCode.java | 10298 +++++++++++++ .../model/valuesets/V3ActCodeEnumFactory.java | 4335 ++++++ .../valuesets/V3ActExposureLevelCode.java | 105 + .../V3ActExposureLevelCodeEnumFactory.java | 67 + .../V3ActInvoiceElementModifier.java | 105 + ...3ActInvoiceElementModifierEnumFactory.java | 67 + .../dstu21/model/valuesets/V3ActMood.java | 372 + .../model/valuesets/V3ActMoodEnumFactory.java | 163 + .../dstu21/model/valuesets/V3ActPriority.java | 204 + .../valuesets/V3ActPriorityEnumFactory.java | 111 + .../dstu21/model/valuesets/V3ActReason.java | 2527 ++++ .../valuesets/V3ActReasonEnumFactory.java | 1099 ++ .../V3ActRelationshipCheckpoint.java | 114 + ...3ActRelationshipCheckpointEnumFactory.java | 71 + .../valuesets/V3ActRelationshipJoin.java | 105 + .../V3ActRelationshipJoinEnumFactory.java | 67 + .../valuesets/V3ActRelationshipSplit.java | 105 + .../V3ActRelationshipSplitEnumFactory.java | 67 + .../valuesets/V3ActRelationshipSubset.java | 197 + .../V3ActRelationshipSubsetEnumFactory.java | 107 + .../valuesets/V3ActRelationshipType.java | 1538 ++ .../V3ActRelationshipTypeEnumFactory.java | 599 + .../dstu21/model/valuesets/V3ActSite.java | 555 + .../model/valuesets/V3ActSiteEnumFactory.java | 267 + .../dstu21/model/valuesets/V3ActStatus.java | 159 + .../valuesets/V3ActStatusEnumFactory.java | 91 + .../model/valuesets/V3ActUSPrivacyLaw.java | 174 + .../V3ActUSPrivacyLawEnumFactory.java | 79 + .../model/valuesets/V3ActUncertainty.java | 87 + .../V3ActUncertaintyEnumFactory.java | 59 + .../model/valuesets/V3AddressPartType.java | 339 + .../V3AddressPartTypeEnumFactory.java | 171 + .../dstu21/model/valuesets/V3AddressUse.java | 243 + .../valuesets/V3AddressUseEnumFactory.java | 127 + .../valuesets/V3AdministrativeGender.java | 96 + .../V3AdministrativeGenderEnumFactory.java | 63 + ...V3AmericanIndianAlaskaNativeLanguages.java | 2364 +++ ...ndianAlaskaNativeLanguagesEnumFactory.java | 1071 ++ .../dstu21/model/valuesets/V3Calendar.java | 78 + .../model/valuesets/V3CalendarCycle.java | 231 + .../valuesets/V3CalendarCycleEnumFactory.java | 123 + .../valuesets/V3CalendarEnumFactory.java | 55 + .../model/valuesets/V3CalendarType.java | 78 + .../valuesets/V3CalendarTypeEnumFactory.java | 55 + .../dstu21/model/valuesets/V3Charset.java | 159 + .../model/valuesets/V3CharsetEnumFactory.java | 91 + .../model/valuesets/V3CodingRationale.java | 141 + .../V3CodingRationaleEnumFactory.java | 83 + .../V3CommunicationFunctionType.java | 96 + ...3CommunicationFunctionTypeEnumFactory.java | 63 + .../valuesets/V3CompressionAlgorithm.java | 123 + .../V3CompressionAlgorithmEnumFactory.java | 75 + .../model/valuesets/V3Confidentiality.java | 339 + .../V3ConfidentialityEnumFactory.java | 131 + .../model/valuesets/V3ContainerCap.java | 132 + .../valuesets/V3ContainerCapEnumFactory.java | 79 + .../model/valuesets/V3ContainerSeparator.java | 87 + .../V3ContainerSeparatorEnumFactory.java | 59 + .../valuesets/V3ContentProcessingMode.java | 87 + .../V3ContentProcessingModeEnumFactory.java | 59 + .../model/valuesets/V3ContextControl.java | 141 + .../V3ContextControlEnumFactory.java | 83 + .../model/valuesets/V3DataOperation.java | 249 + .../valuesets/V3DataOperationEnumFactory.java | 131 + .../model/valuesets/V3DeviceAlertLevel.java | 105 + .../V3DeviceAlertLevelEnumFactory.java | 67 + .../model/valuesets/V3DocumentCompletion.java | 150 + .../V3DocumentCompletionEnumFactory.java | 87 + .../model/valuesets/V3DocumentStorage.java | 105 + .../V3DocumentStorageEnumFactory.java | 67 + .../model/valuesets/V3EducationLevel.java | 150 + .../V3EducationLevelEnumFactory.java | 87 + .../model/valuesets/V3EmployeeJobClass.java | 87 + .../V3EmployeeJobClassEnumFactory.java | 59 + .../valuesets/V3EncounterAdmissionSource.java | 96 + ...V3EncounterAdmissionSourceEnumFactory.java | 63 + .../valuesets/V3EncounterSpecialCourtesy.java | 114 + ...V3EncounterSpecialCourtesyEnumFactory.java | 71 + .../dstu21/model/valuesets/V3EntityClass.java | 315 + .../valuesets/V3EntityClassEnumFactory.java | 159 + .../dstu21/model/valuesets/V3EntityCode.java | 1382 ++ .../valuesets/V3EntityCodeEnumFactory.java | 631 + .../model/valuesets/V3EntityDeterminer.java | 117 + .../V3EntityDeterminerEnumFactory.java | 71 + .../model/valuesets/V3EntityHandling.java | 231 + .../V3EntityHandlingEnumFactory.java | 123 + .../valuesets/V3EntityNamePartQualifier.java | 444 + .../V3EntityNamePartQualifierEnumFactory.java | 167 + .../V3EntityNamePartQualifierR2.java | 435 + ...3EntityNamePartQualifierR2EnumFactory.java | 159 + .../model/valuesets/V3EntityNamePartType.java | 114 + .../V3EntityNamePartTypeEnumFactory.java | 71 + .../valuesets/V3EntityNamePartTypeR2.java | 108 + .../V3EntityNamePartTypeR2EnumFactory.java | 67 + .../model/valuesets/V3EntityNameUse.java | 206 + .../valuesets/V3EntityNameUseEnumFactory.java | 111 + .../model/valuesets/V3EntityNameUseR2.java | 231 + .../V3EntityNameUseR2EnumFactory.java | 123 + .../dstu21/model/valuesets/V3EntityRisk.java | 168 + .../valuesets/V3EntityRiskEnumFactory.java | 95 + .../model/valuesets/V3EntityStatus.java | 114 + .../valuesets/V3EntityStatusEnumFactory.java | 71 + .../valuesets/V3EquipmentAlertLevel.java | 105 + .../V3EquipmentAlertLevelEnumFactory.java | 67 + .../dstu21/model/valuesets/V3Ethnicity.java | 456 + .../valuesets/V3EthnicityEnumFactory.java | 223 + .../model/valuesets/V3ExposureMode.java | 114 + .../valuesets/V3ExposureModeEnumFactory.java | 71 + .../model/valuesets/V3GTSAbbreviation.java | 366 + .../V3GTSAbbreviationEnumFactory.java | 183 + .../model/valuesets/V3GenderStatus.java | 87 + .../valuesets/V3GenderStatusEnumFactory.java | 59 + .../model/valuesets/V3HL7UpdateMode.java | 213 + .../valuesets/V3HL7UpdateModeEnumFactory.java | 115 + .../dstu21/model/valuesets/V3Hl7Realm.java | 474 + .../valuesets/V3Hl7RealmEnumFactory.java | 231 + .../model/valuesets/V3Hl7V3Conformance.java | 123 + .../V3Hl7V3ConformanceEnumFactory.java | 75 + .../model/valuesets/V3HtmlLinkType.java | 204 + .../valuesets/V3HtmlLinkTypeEnumFactory.java | 111 + .../valuesets/V3IdentifierReliability.java | 96 + .../V3IdentifierReliabilityEnumFactory.java | 63 + .../model/valuesets/V3IdentifierScope.java | 114 + .../V3IdentifierScopeEnumFactory.java | 67 + .../valuesets/V3IntegrityCheckAlgorithm.java | 87 + .../V3IntegrityCheckAlgorithmEnumFactory.java | 59 + .../valuesets/V3LanguageAbilityMode.java | 123 + .../V3LanguageAbilityModeEnumFactory.java | 75 + .../V3LanguageAbilityProficiency.java | 105 + ...LanguageAbilityProficiencyEnumFactory.java | 67 + .../model/valuesets/V3LivingArrangement.java | 177 + .../V3LivingArrangementEnumFactory.java | 99 + .../model/valuesets/V3LocalMarkupIgnore.java | 87 + .../V3LocalMarkupIgnoreEnumFactory.java | 59 + .../valuesets/V3LocalRemoteControlState.java | 87 + .../V3LocalRemoteControlStateEnumFactory.java | 59 + .../V3ManagedParticipationStatus.java | 123 + ...ManagedParticipationStatusEnumFactory.java | 75 + .../model/valuesets/V3MapRelationship.java | 96 + .../V3MapRelationshipEnumFactory.java | 63 + .../model/valuesets/V3MaritalStatus.java | 159 + .../valuesets/V3MaritalStatusEnumFactory.java | 91 + .../valuesets/V3MessageWaitingPriority.java | 96 + .../V3MessageWaitingPriorityEnumFactory.java | 63 + .../model/valuesets/V3ModifyIndicator.java | 87 + .../V3ModifyIndicatorEnumFactory.java | 59 + .../dstu21/model/valuesets/V3NullFlavor.java | 244 + .../valuesets/V3NullFlavorEnumFactory.java | 119 + .../V3ObservationInterpretation.java | 663 + ...3ObservationInterpretationEnumFactory.java | 267 + .../model/valuesets/V3ObservationMethod.java | 2821 ++++ .../V3ObservationMethodEnumFactory.java | 1267 ++ .../model/valuesets/V3ObservationValue.java | 2243 +++ .../V3ObservationValueEnumFactory.java | 963 ++ .../model/valuesets/V3OrderableDrugForm.java | 1518 ++ .../V3OrderableDrugFormEnumFactory.java | 695 + .../valuesets/V3ParticipationFunction.java | 520 + .../V3ParticipationFunctionEnumFactory.java | 247 + .../model/valuesets/V3ParticipationMode.java | 204 + .../V3ParticipationModeEnumFactory.java | 111 + .../valuesets/V3ParticipationSignature.java | 96 + .../V3ParticipationSignatureEnumFactory.java | 63 + .../model/valuesets/V3ParticipationType.java | 668 + .../V3ParticipationTypeEnumFactory.java | 295 + .../model/valuesets/V3PatientImportance.java | 150 + .../V3PatientImportanceEnumFactory.java | 87 + .../model/valuesets/V3PaymentTerms.java | 105 + .../valuesets/V3PaymentTermsEnumFactory.java | 67 + .../valuesets/V3PersonDisabilityType.java | 159 + .../V3PersonDisabilityTypeEnumFactory.java | 91 + .../V3ProbabilityDistributionType.java | 150 + ...robabilityDistributionTypeEnumFactory.java | 87 + .../model/valuesets/V3ProcessingID.java | 96 + .../valuesets/V3ProcessingIDEnumFactory.java | 63 + .../model/valuesets/V3ProcessingMode.java | 105 + .../V3ProcessingModeEnumFactory.java | 67 + .../valuesets/V3QueryParameterValue.java | 213 + .../V3QueryParameterValueEnumFactory.java | 115 + .../model/valuesets/V3QueryPriority.java | 87 + .../valuesets/V3QueryPriorityEnumFactory.java | 59 + .../model/valuesets/V3QueryRequestLimit.java | 87 + .../V3QueryRequestLimitEnumFactory.java | 59 + .../model/valuesets/V3QueryResponse.java | 105 + .../valuesets/V3QueryResponseEnumFactory.java | 67 + .../model/valuesets/V3QueryStatusCode.java | 114 + .../V3QueryStatusCodeEnumFactory.java | 71 + .../fhir/dstu21/model/valuesets/V3Race.java | 8358 +++++++++++ .../model/valuesets/V3RaceEnumFactory.java | 3735 +++++ .../model/valuesets/V3RelationalOperator.java | 141 + .../V3RelationalOperatorEnumFactory.java | 83 + .../valuesets/V3RelationshipConjunction.java | 96 + .../V3RelationshipConjunctionEnumFactory.java | 63 + .../valuesets/V3ReligiousAffiliation.java | 807 ++ .../V3ReligiousAffiliationEnumFactory.java | 379 + .../model/valuesets/V3ResponseLevel.java | 132 + .../valuesets/V3ResponseLevelEnumFactory.java | 79 + .../model/valuesets/V3ResponseModality.java | 96 + .../V3ResponseModalityEnumFactory.java | 63 + .../model/valuesets/V3ResponseMode.java | 96 + .../valuesets/V3ResponseModeEnumFactory.java | 63 + .../dstu21/model/valuesets/V3RoleClass.java | 1278 ++ .../valuesets/V3RoleClassEnumFactory.java | 499 + .../dstu21/model/valuesets/V3RoleCode.java | 3596 +++++ .../valuesets/V3RoleCodeEnumFactory.java | 1575 ++ .../model/valuesets/V3RoleLinkStatus.java | 123 + .../V3RoleLinkStatusEnumFactory.java | 75 + .../model/valuesets/V3RoleLinkType.java | 143 + .../valuesets/V3RoleLinkTypeEnumFactory.java | 83 + .../dstu21/model/valuesets/V3RoleStatus.java | 132 + .../valuesets/V3RoleStatusEnumFactory.java | 79 + .../valuesets/V3RouteOfAdministration.java | 3543 +++++ .../V3RouteOfAdministrationEnumFactory.java | 1595 ++ .../dstu21/model/valuesets/V3Sequencing.java | 96 + .../valuesets/V3SequencingEnumFactory.java | 63 + .../dstu21/model/valuesets/V3SetOperator.java | 123 + .../valuesets/V3SetOperatorEnumFactory.java | 75 + .../model/valuesets/V3SpecimenType.java | 1185 ++ .../valuesets/V3SpecimenTypeEnumFactory.java | 547 + .../V3SubstanceAdminSubstitution.java | 213 + ...SubstanceAdminSubstitutionEnumFactory.java | 91 + .../valuesets/V3SubstitutionCondition.java | 114 + .../V3SubstitutionConditionEnumFactory.java | 71 + .../valuesets/V3TableCellHorizontalAlign.java | 114 + ...V3TableCellHorizontalAlignEnumFactory.java | 71 + .../model/valuesets/V3TableCellScope.java | 105 + .../V3TableCellScopeEnumFactory.java | 67 + .../valuesets/V3TableCellVerticalAlign.java | 105 + .../V3TableCellVerticalAlignEnumFactory.java | 67 + .../dstu21/model/valuesets/V3TableFrame.java | 150 + .../valuesets/V3TableFrameEnumFactory.java | 87 + .../dstu21/model/valuesets/V3TableRules.java | 114 + .../valuesets/V3TableRulesEnumFactory.java | 71 + .../model/valuesets/V3TargetAwareness.java | 123 + .../V3TargetAwarenessEnumFactory.java | 75 + .../V3TelecommunicationCapabilities.java | 114 + ...ecommunicationCapabilitiesEnumFactory.java | 71 + .../dstu21/model/valuesets/V3TimingEvent.java | 240 + .../valuesets/V3TimingEventEnumFactory.java | 123 + .../V3TransmissionRelationshipTypeCode.java | 78 + ...issionRelationshipTypeCodeEnumFactory.java | 55 + .../model/valuesets/V3TribalEntityUS.java | 5181 +++++++ .../V3TribalEntityUSEnumFactory.java | 2323 +++ .../valuesets/V3VaccineManufacturer.java | 429 + .../V3VaccineManufacturerEnumFactory.java | 211 + .../VaccinationProtocolDoseStatus.java | 87 + ...cinationProtocolDoseStatusEnumFactory.java | 59 + .../VaccinationProtocolDoseStatusReason.java | 114 + ...onProtocolDoseStatusReasonEnumFactory.java | 71 + .../dstu21/model/valuesets/VisionProduct.java | 87 + .../valuesets/VisionProductEnumFactory.java | 59 + .../model/valuesets/XdsRelationshipType.java | 114 + .../XdsRelationshipTypeEnumFactory.java | 71 + .../fhir/dstu21/model/valuesets/holder.txt | 0 .../hl7/fhir/exceptions/FHIRException.java | 25 + .../hl7/fhir/exceptions/FHIRFormatError.java | 25 + .../java/org/hl7/fhir/utilities/CSFile.java | 71 + .../org/hl7/fhir/utilities/FileNotifier.java | 7 + .../org/hl7/fhir/utilities/Inflector.java | 619 + .../org/hl7/fhir/utilities/MyURIResolver.java | 71 + .../org/hl7/fhir/utilities/Utilities.java | 916 ++ .../hl7/fhir/utilities/ZipURIResolver.java | 62 + .../hl7/fhir/utilities/xhtml/NodeType.java | 31 + .../fhir/utilities/xhtml/XhtmlComposer.java | 303 + .../fhir/utilities/xhtml/XhtmlDocument.java | 37 + .../hl7/fhir/utilities/xhtml/XhtmlNode.java | 351 + .../hl7/fhir/utilities/xhtml/XhtmlParser.java | 943 ++ .../hl7/fhir/utilities/xml/IXMLWriter.java | 93 + .../ca/uhn/fhir/parser/CustomTypeTest.java | 228 + .../uhn/fhir/parser/JsonParserDstu21Test.java | 1021 ++ .../ca/uhn/fhir/parser/ReportObservation.java | 112 + .../uhn/fhir/parser/RoundTripDstu21Test.java | 112 + .../uhn/fhir/parser/XmlParserDstu21Test.java | 1873 +++ .../model/dstu21/profile/account.profile.xml | 6 +- .../model/dstu21/profile/address.profile.xml | 4 +- .../model/dstu21/profile/age.profile.xml | 4 +- .../profile/allergyintolerance.profile.xml | 6 +- .../dstu21/profile/annotation.profile.xml | 4 +- .../dstu21/profile/appointment.profile.xml | 6 +- .../profile/appointmentresponse.profile.xml | 6 +- .../dstu21/profile/attachment.profile.xml | 4 +- .../dstu21/profile/auditevent.profile.xml | 6 +- .../profile/backboneelement.profile.xml | 4 +- .../model/dstu21/profile/basic.profile.xml | 6 +- .../model/dstu21/profile/binary.profile.xml | 6 +- .../model/dstu21/profile/bodysite.profile.xml | 6 +- .../model/dstu21/profile/boolean.profile.xml | 4 +- .../model/dstu21/profile/bundle.profile.xml | 14 +- .../model/dstu21/profile/careplan.profile.xml | 6 +- .../dstu21/profile/cholesterol.profile.xml | 2 +- .../model/dstu21/profile/claim.profile.xml | 6 +- .../dstu21/profile/claimresponse.profile.xml | 6 +- .../profile/clinicaldocument.profile.xml | 2 +- .../profile/clinicalimpression.profile.xml | 6 +- .../model/dstu21/profile/code.profile.xml | 4 +- .../profile/codeableconcept.profile.xml | 4 +- .../model/dstu21/profile/coding.profile.xml | 4 +- .../dstu21/profile/communication.profile.xml | 6 +- .../profile/communicationrequest.profile.xml | 6 +- .../dstu21/profile/composition.profile.xml | 6 +- .../dstu21/profile/conceptmap.profile.xml | 6 +- .../dstu21/profile/condition.profile.xml | 6 +- .../dstu21/profile/conformance.profile.xml | 6 +- .../profile/consentdirective.profile.xml | 217 +- .../dstu21/profile/contactpoint.profile.xml | 4 +- .../model/dstu21/profile/contract.profile.xml | 6 +- .../model/dstu21/profile/count.profile.xml | 4 +- .../model/dstu21/profile/coverage.profile.xml | 6 +- .../dstu21/profile/dataelement.profile.xml | 6 +- .../model/dstu21/profile/date.profile.xml | 4 +- .../model/dstu21/profile/datetime.profile.xml | 4 +- .../model/dstu21/profile/decimal.profile.xml | 4 +- .../profile/decisionsupportrule.profile.xml | 6 +- .../decisionsupportservicemodule.profile.xml | 775 +- .../dstu21/profile/detectedissue.profile.xml | 6 +- .../model/dstu21/profile/device.profile.xml | 6 +- .../profile/devicecomponent.profile.xml | 6 +- .../dstu21/profile/devicemetric.profile.xml | 6 +- .../devicemetricobservation.profile.xml | 2 +- .../profile/deviceuserequest.profile.xml | 6 +- .../profile/deviceusestatement.profile.xml | 6 +- .../profile/diagnosticorder.profile.xml | 6 +- .../profile/diagnosticreport.profile.xml | 6 +- .../model/dstu21/profile/distance.profile.xml | 4 +- .../profile/documentmanifest.profile.xml | 6 +- .../profile/documentreference.profile.xml | 6 +- .../dstu21/profile/domainresource.profile.xml | 7 +- .../model/dstu21/profile/duration.profile.xml | 4 +- .../model/dstu21/profile/element.profile.xml | 4 +- .../profile/elementdefinition.profile.xml | 8 +- .../profile/eligibilityrequest.profile.xml | 6 +- .../profile/eligibilityresponse.profile.xml | 6 +- .../dstu21/profile/encounter.profile.xml | 6 +- .../profile/enrollmentrequest.profile.xml | 6 +- .../profile/enrollmentresponse.profile.xml | 6 +- .../dstu21/profile/episodeofcare.profile.xml | 6 +- .../profile/expansionprofile.profile.xml | 34 +- .../profile/explanationofbenefit.profile.xml | 6 +- .../dstu21/profile/extension.profile.xml | 4 +- .../profile/familymemberhistory.profile.xml | 6 +- .../model/dstu21/profile/flag.profile.xml | 6 +- .../model/dstu21/profile/genetics.profile.xml | 2 +- .../model/dstu21/profile/goal.profile.xml | 6 +- .../model/dstu21/profile/group.profile.xml | 6 +- .../profile/guidancerequest.profile.xml | 6 +- .../profile/guidanceresponse.profile.xml | 6 +- .../dstu21/profile/hdlcholesterol.profile.xml | 2 +- .../profile/healthcareservice.profile.xml | 6 +- .../dstu21/profile/humanname.profile.xml | 4 +- .../model/dstu21/profile/id.profile.xml | 4 +- .../dstu21/profile/identifier.profile.xml | 4 +- .../imagingobjectselection.profile.xml | 6 +- .../dstu21/profile/imagingstudy.profile.xml | 6 +- .../dstu21/profile/immunization.profile.xml | 10 +- .../immunizationrecommendation.profile.xml | 6 +- .../profile/implementationguide.profile.xml | 12 +- .../model/dstu21/profile/instant.profile.xml | 4 +- .../model/dstu21/profile/integer.profile.xml | 4 +- .../dstu21/profile/ldlcholesterol.profile.xml | 2 +- .../model/dstu21/profile/library.profile.xml | 6 +- .../dstu21/profile/lipidprofile.profile.xml | 2 +- .../model/dstu21/profile/list.profile.xml | 6 +- .../model/dstu21/profile/location.profile.xml | 6 +- .../model/dstu21/profile/markdown.profile.xml | 4 +- .../model/dstu21/profile/measure.profile.xml | 6 +- .../dstu21/profile/measurereport.profile.xml | 2 +- .../model/dstu21/profile/media.profile.xml | 6 +- .../dstu21/profile/medication.profile.xml | 6 +- .../medicationadministration.profile.xml | 6 +- .../profile/medicationdispense.profile.xml | 10 +- .../profile/medicationorder.profile.xml | 6 +- .../profile/medicationstatement.profile.xml | 6 +- .../dstu21/profile/messageheader.profile.xml | 6 +- .../model/dstu21/profile/meta.profile.xml | 4 +- .../profile/moduledefinition.profile.xml | 6 +- .../dstu21/profile/modulemetadata.profile.xml | 6 +- .../model/dstu21/profile/money.profile.xml | 4 +- .../dstu21/profile/namingsystem.profile.xml | 6 +- .../dstu21/profile/narrative.profile.xml | 4 +- .../dstu21/profile/nutritionorder.profile.xml | 6 +- .../dstu21/profile/observation.profile.xml | 6 +- .../model/dstu21/profile/oid.profile.xml | 4 +- .../profile/operationdefinition.profile.xml | 6 +- .../profile/operationoutcome.profile.xml | 6 +- .../model/dstu21/profile/order.profile.xml | 10 +- .../dstu21/profile/orderresponse.profile.xml | 6 +- .../model/dstu21/profile/orderset.profile.xml | 6 +- .../dstu21/profile/organization.profile.xml | 6 +- .../dstu21/profile/parameters.profile.xml | 7 +- .../model/dstu21/profile/patient.profile.xml | 6 +- .../dstu21/profile/paymentnotice.profile.xml | 6 +- .../profile/paymentreconciliation.profile.xml | 6 +- .../model/dstu21/profile/period.profile.xml | 4 +- .../model/dstu21/profile/person.profile.xml | 6 +- .../dstu21/profile/positiveint.profile.xml | 4 +- .../dstu21/profile/practitioner.profile.xml | 6 +- .../dstu21/profile/procedure.profile.xml | 6 +- .../profile/procedurerequest.profile.xml | 6 +- .../dstu21/profile/processrequest.profile.xml | 6 +- .../profile/processresponse.profile.xml | 6 +- .../dstu21/profile/provenance.profile.xml | 6 +- .../model/dstu21/profile/quantity.profile.xml | 4 +- .../dstu21/profile/questionnaire.profile.xml | 10 +- .../profile/questionnaireresponse.profile.xml | 6 +- .../model/dstu21/profile/range.profile.xml | 8 +- .../model/dstu21/profile/ratio.profile.xml | 4 +- .../dstu21/profile/reference.profile.xml | 8 +- .../profile/referralrequest.profile.xml | 6 +- .../dstu21/profile/relatedperson.profile.xml | 6 +- .../model/dstu21/profile/resource.profile.xml | 7 +- .../dstu21/profile/riskassessment.profile.xml | 6 +- .../dstu21/profile/sampleddata.profile.xml | 4 +- .../model/dstu21/profile/schedule.profile.xml | 6 +- .../profile/searchparameter.profile.xml | 6 +- .../profile/shareablevalueset.profile.xml | 4 +- .../dstu21/profile/signature.profile.xml | 4 +- .../dstu21/profile/simplequantity.profile.xml | 4 +- .../model/dstu21/profile/slot.profile.xml | 6 +- .../model/dstu21/profile/specimen.profile.xml | 6 +- .../model/dstu21/profile/string.profile.xml | 4 +- .../profile/structuredefinition.profile.xml | 46 +- .../dstu21/profile/subscription.profile.xml | 6 +- .../dstu21/profile/substance.profile.xml | 6 +- .../dstu21/profile/supplydelivery.profile.xml | 6 +- .../dstu21/profile/supplyrequest.profile.xml | 6 +- .../dstu21/profile/testscript.profile.xml | 499 +- .../model/dstu21/profile/time.profile.xml | 4 +- .../model/dstu21/profile/timing.profile.xml | 8 +- .../dstu21/profile/triglyceride.profile.xml | 2 +- .../dstu21/profile/unsignedint.profile.xml | 4 +- .../model/dstu21/profile/uri.profile.xml | 4 +- .../model/dstu21/profile/uuid.profile.xml | 4 +- .../model/dstu21/profile/valueset.profile.xml | 6 +- .../profile/visionprescription.profile.xml | 6 +- .../profile/xdsdocumentmanifest.profile.xml | 2 +- .../profile/xdsdocumentreference.profile.xml | 2 +- .../model/dstu21/schema/consentdirective.sch | 59 +- .../schema/decisionsupportservicemodule.sch | 8 +- .../model/dstu21/schema/expansionprofile.sch | 1 - .../model/dstu21/schema/fhir-single.xsd | 238 +- .../dstu21/schema/structuredefinition.sch | 1 - .../model/dstu21/valueset/v2-tables.xml | 2 +- .../model/dstu21/valueset/v3-codesystems.xml | 2303 +-- .../model/dstu21/valueset/valuesets.xml | 3356 +++-- .../resources/dt/dstu21/elementdefinition.xml | 9 +- .../src/main/resources/dt/dstu21/range.xml | 2 +- .../main/resources/dt/dstu21/reference.xml | 8 +- .../src/main/resources/dt/dstu21/timing.xml | 2 +- .../res/dstu21/bundle-spreadsheet.xml | 4 +- .../res/dstu21/contract-spreadsheet.xml | 7 +- ...cisionsupportservicemodule-spreadsheet.xml | 495 +- .../dstu21/expansionprofile-spreadsheet.xml | 616 +- .../res/dstu21/immunization-spreadsheet.xml | 2 +- .../dstu21/medicationdispense-spreadsheet.xml | 2 +- .../res/dstu21/order-spreadsheet.xml | 2 +- .../res/dstu21/questionnaire-spreadsheet.xml | 21 +- .../structuredefinition-spreadsheet.xml | 30 +- .../res/dstu21/testscript-spreadsheet.xml | 1306 +- sync_ri21.sh | 62 + 850 files changed, 367541 insertions(+), 4067 deletions(-) create mode 100644 hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientWithProfileDstu2Test.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/pom.xml create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Account.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Address.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Age.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AllergyIntolerance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Annotation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Appointment.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AppointmentResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Attachment.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AuditEvent.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BackboneElement.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base64BinaryType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseBinary.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseDateTimeType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseExtension.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseNarrative.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseReference.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseResource.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Basic.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Binary.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BodySite.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BooleanType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Bundle.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CarePlan.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Claim.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClaimResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClinicalImpression.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeableConcept.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coding.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Communication.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CommunicationRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Comparison.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Composition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ConceptMap.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Condition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Configuration.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Conformance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Constants.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ContactPoint.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Contract.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Count.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coverage.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DataElement.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateTimeType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecimalType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportRule.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportServiceModule.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DetectedIssue.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Device.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceComponent.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceMetric.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseStatement.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticOrder.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticReport.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Distance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentManifest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentReference.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DomainResource.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Duration.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Element.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ElementDefinition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Encounter.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumeration.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumerations.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EpisodeOfCare.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpansionProfile.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExplanationOfBenefit.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpressionNode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Extension.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExtensionHelper.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Factory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/FamilyMemberHistory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Flag.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Goal.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Group.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HealthcareService.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HumanName.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IdType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Identifier.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingObjectSelection.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingStudy.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Immunization.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImmunizationRecommendation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImplementationGuide.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/InstantType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IntegerType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Library.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/List_.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Location.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MarkdownType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Measure.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Media.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Medication.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationAdministration.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationDispense.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationOrder.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationStatement.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MessageHeader.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Meta.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleDefinition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleMetadata.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Money.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NamingSystem.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Narrative.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NutritionOrder.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Observation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OidType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationDefinition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationOutcome.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Order.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderSet.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Organization.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Parameters.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Patient.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentNotice.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentReconciliation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Period.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Person.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PositiveIntType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Practitioner.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PrimitiveType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Procedure.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcedureRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Property.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Provenance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Quantity.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Questionnaire.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/QuestionnaireResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Range.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Ratio.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Reference.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ReferralRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RelatedPerson.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Resource.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RiskAssessment.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SampledData.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Schedule.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SearchParameter.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SidType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Signature.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SimpleQuantity.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Slot.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Specimen.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StringType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StructureDefinition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Subscription.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Substance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyDelivery.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyRequest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TemporalPrecisionEnum.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TestScript.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TimeType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Timing.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Type.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UnsignedIntType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UriType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UuidType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ValueSet.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/VisionPrescription.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Additionalmaterials.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdditionalmaterialsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Adjudication.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationError.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationErrorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreeds.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreedsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpecies.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpeciesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupations.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupationsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimException.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimExceptionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiers.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiersEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContext.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContextEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinical.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinicalEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionState.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionStateEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractAction.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorrole.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorroleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtype.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtype.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceAction.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceActionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSource.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSourceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDiet.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDietEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDisposition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDispositionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangements.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangementsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditive.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditiveEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditions.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditionsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Forms.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FormsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Fundsreserve.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FundsreserveEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterion.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Intervention.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/InterventionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodes.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlag.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlagEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrder.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrderEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounter.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounterEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransport.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransportEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycle.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRole.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRoleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcome.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcomeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterial.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterialEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationship.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationshipEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatch.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatchEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Payeetype.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PayeetypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRole.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRoleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialty.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialtyEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodes.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcome.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcomeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRole.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRoleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccurs.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccursEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControl.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControlEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodes.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodes.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Relationship.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RelationshipEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityService.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityServiceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbability.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbabilityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Ruleset.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RulesetEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacy.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacyEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProduct.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProductEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditions.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditionsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethod.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethodEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUscls.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUsclsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTag.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTagEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategoryEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKind.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKindEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Surface.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SurfaceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Teeth.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TeethEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodes.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Tooth.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ToothEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Udi.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/UdiEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementCondition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementConditionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClass.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClassEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifier.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifierEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMood.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMoodEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpoint.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpointEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoin.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoinEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplit.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplitEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubset.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubsetEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSite.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSiteEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLaw.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLawEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertainty.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertaintyEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUseEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGender.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGenderEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguages.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Calendar.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycle.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Charset.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CharsetEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationale.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationaleEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithm.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithmEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Confidentiality.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ConfidentialityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCap.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCapEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparator.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparatorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControl.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControlEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevel.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevelEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletion.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorage.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorageEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevel.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevelEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClass.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClassEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSource.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSourceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesy.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesyEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClass.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClassEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminer.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminerEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandling.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandlingEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifier.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2EnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2EnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2EnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRisk.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRiskEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevel.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevelEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Ethnicity.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EthnicityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7Realm.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7RealmEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3Conformance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3ConformanceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliability.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliabilityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScope.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScopeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithm.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithmEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiency.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiencyEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangement.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangementEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnore.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnoreEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlState.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlStateEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationship.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationshipEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicator.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicatorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavor.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethod.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethodEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValue.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValueEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugForm.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugFormEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationFunction.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationFunctionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignature.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignatureEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportance.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportanceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTerms.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTermsEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingID.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingIDEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValue.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValueEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriority.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriorityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimit.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimitEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponse.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponseEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Race.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RaceEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperator.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperatorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunction.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunctionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevel.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevelEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModality.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModalityEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseMode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClass.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClassEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministration.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministrationEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Sequencing.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SequencingEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperator.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperatorEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitution.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitutionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionCondition.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionConditionEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlign.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlignEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScope.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScopeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlign.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlignEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrame.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrameEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRules.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRulesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwareness.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwarenessEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilities.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilitiesEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEvent.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEventEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCodeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUS.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUSEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturer.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturerEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatus.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReason.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReasonEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProduct.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProductEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipTypeEnumFactory.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/holder.txt create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRException.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRFormatError.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/CSFile.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/FileNotifier.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Inflector.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/MyURIResolver.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Utilities.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/ZipURIResolver.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/NodeType.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlDocument.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xml/IXMLWriter.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/CustomTypeTest.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu21Test.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/ReportObservation.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/RoundTripDstu21Test.java create mode 100644 hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu21Test.java create mode 100755 sync_ri21.sh diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java index 7a57245647a..38fd2c7f454 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/ResourceDef.java @@ -51,9 +51,8 @@ public @interface ResourceDef { String id() default ""; /** - * The URL indicating the profile for this resource definition, if known. If this value is set - * on a custom profile definition class in a server, the profile is assumed to be external to - * the server, so the server will not export a profile for it. + * The URL indicating the profile for this resource definition. If specified, this URL will be + * automatically added to the meta tag when the resource is serialized. */ String profile() default ""; diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientWithProfileDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientWithProfileDstu2Test.java new file mode 100644 index 00000000000..e94e122f71a --- /dev/null +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/ClientWithProfileDstu2Test.java @@ -0,0 +1,93 @@ +package ca.uhn.fhir.rest.client; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.InputStream; +import java.io.StringReader; +import java.nio.charset.Charset; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.io.input.ReaderInputStream; +import org.apache.http.HttpResponse; +import org.apache.http.ProtocolVersion; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.message.BasicHeader; +import org.apache.http.message.BasicStatusLine; +import org.junit.Before; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; +import ca.uhn.fhir.model.dstu2.resource.Parameters; +import ca.uhn.fhir.model.dstu2.resource.Patient; +import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.server.Constants; + +public class ClientWithProfileDstu2Test { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ClientWithProfileDstu2Test.class); + private FhirContext ourCtx; + private HttpClient ourHttpClient; + + private HttpResponse ourHttpResponse; + + @Before + public void before() { + ourCtx = FhirContext.forDstu2(); + + ourHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); + ourCtx.getRestfulClientFactory().setHttpClient(ourHttpClient); + ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); + + ourHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); + } + + @Test + public void testClientWithProfile() throws Exception { + OperationOutcome oo = new OperationOutcome(); + oo.addIssue().setCode(IssueTypeEnum.BUSINESS_RULE_VIOLATION); + final String retVal = ourCtx.newXmlParser().encodeResourceToString(oo); + + ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class); + when(ourHttpClient.execute(capt.capture())).thenReturn(ourHttpResponse); + when(ourHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK")); + when(ourHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML + "; charset=UTF-8")); + when(ourHttpResponse.getEntity().getContent()).thenAnswer(new Answer() { + @Override + public InputStream answer(InvocationOnMock theInvocation) throws Throwable { + return new ReaderInputStream(new StringReader(retVal), Charset.forName("UTF-8")); + } + }); + + IGenericClient client = ourCtx.newRestfulGenericClient("http://foo"); + + int idx = 0; + + MethodOutcome response = client.create().resource(new MyPatient()).execute(); + + HttpPost value = (HttpPost) capt.getAllValues().get(idx); + String requestBody = IOUtils.toString(((HttpPost) value).getEntity().getContent()); + IOUtils.closeQuietly(((HttpPost) value).getEntity().getContent()); + ourLog.info(requestBody); + + } + + @ResourceDef(name = "Patient", profile = "http://foo_profile") + public static class MyPatient extends Patient { + + private static final long serialVersionUID = 1L; + + } + +} diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ReadDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ReadDstu2Test.java index 5a1abf4cb4c..415e742e22f 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ReadDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/ReadDstu2Test.java @@ -28,9 +28,6 @@ import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Read; import ca.uhn.fhir.util.PortUtil; -/** - * Created by dsotnikov on 2/25/2014. - */ public class ReadDstu2Test { private static CloseableHttpClient ourClient; @@ -70,6 +67,8 @@ public class ReadDstu2Test { assertEquals(200, status.getStatusLine().getStatusCode()); assertThat(responseContent, containsString("p1ReadValue")); assertThat(responseContent, containsString("p1ReadId")); + + ourLog.info(responseContent); } @AfterClass diff --git a/hapi-fhir-structures-hl7org-dstu2.1/pom.xml b/hapi-fhir-structures-hl7org-dstu2.1/pom.xml new file mode 100644 index 00000000000..4b4a9f52e9a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/pom.xml @@ -0,0 +1,209 @@ + + 4.0.0 + + + ca.uhn.hapi.fhir + hapi-deployable-pom + 1.4-SNAPSHOT + ../hapi-deployable-pom/pom.xml + + + hapi-fhir-structures-hl7org-dstu2.1 + jar + + HAPI FHIR Structures - HL7.org DSTU2.1 + + + + ca.uhn.hapi.fhir + hapi-fhir-base + 1.4-SNAPSHOT + + + ca.uhn.hapi.fhir + hapi-fhir-validation-resources-dstu2 + 1.4-SNAPSHOT + test + + + javax.servlet + javax.servlet-api + provided + + + + + + + xpp3 + xpp3_min + 1.1.4c + + + net.sf.saxon + Saxon-HE + 9.6.0-4 + + + + com.google.code.gson + gson + 2.3.1 + + + + + xmlunit + xmlunit + 1.5 + test + + + org.eclipse.jetty + jetty-servlets + test + + + org.eclipse.jetty + jetty-servlet + test + + + org.eclipse.jetty + jetty-server + test + + + org.eclipse.jetty + jetty-util + test + + + org.eclipse.jetty + jetty-webapp + test + + + org.eclipse.jetty + jetty-http + test + + + ch.qos.logback + logback-classic + true + test + + + org.ebaysf.web + cors-filter + ${ebay_cors_filter_version} + test + + + org.thymeleaf + thymeleaf + ${thymeleaf-version} + test + + + com.phloc + phloc-schematron + ${phloc_schematron_version} + test + + + com.phloc + phloc-commons + ${phloc_commons_version} + test + + + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + test + + + commons-logging + commons-logging + + + + + net.sf.json-lib + json-lib + 2.4 + jdk15-sources + test + + + directory-naming + naming-java + 0.8 + test + + + commons-logging + commons-logging + + + + + com.google.guava + guava + test + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + public + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19 + + false + random + -Dfile.encoding=UTF-8 + false + + + + org.codehaus.mojo + license-maven-plugin + + + true + + + + org.apache.maven.plugins + maven-compiler-plugin + + true + + + + + + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Account.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Account.java new file mode 100644 index 00000000000..5de3f634614 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Account.java @@ -0,0 +1,797 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc. + */ +@ResourceDef(name="Account", profile="http://hl7.org/fhir/Profile/Account") +public class Account extends DomainResource { + + public enum AccountStatus { + /** + * This account is active and may be used. + */ + ACTIVE, + /** + * This account is inactive and should not be used to track financial information. + */ + INACTIVE, + /** + * added to help the parsers + */ + NULL; + public static AccountStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/account-status"; + case INACTIVE: return "http://hl7.org/fhir/account-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "This account is active and may be used."; + case INACTIVE: return "This account is inactive and should not be used to track financial information."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + default: return "?"; + } + } + } + + public static class AccountStatusEnumFactory implements EnumFactory { + public AccountStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return AccountStatus.ACTIVE; + if ("inactive".equals(codeString)) + return AccountStatus.INACTIVE; + throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, AccountStatus.ACTIVE); + if ("inactive".equals(codeString)) + return new Enumeration(this, AccountStatus.INACTIVE); + throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); + } + public String toCode(AccountStatus code) { + if (code == AccountStatus.ACTIVE) + return "active"; + if (code == AccountStatus.INACTIVE) + return "inactive"; + return "?"; + } + } + + /** + * Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Account number", formalDefinition="Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number)." ) + protected List identifier; + + /** + * Name used for the account when displaying it to humans in reports, etc. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human-readable label", formalDefinition="Name used for the account when displaying it to humans in reports, etc." ) + protected StringType name; + + /** + * Categorizes the account for reporting and searching purposes. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. patient, expense, depreciation", formalDefinition="Categorizes the account for reporting and searching purposes." ) + protected CodeableConcept type; + + /** + * Indicates whether the account is presently used/useable or not. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | inactive", formalDefinition="Indicates whether the account is presently used/useable or not." ) + protected Enumeration status; + + /** + * Indicates the period of time over which the account is allowed. + */ + @Child(name = "activePeriod", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Valid from..to", formalDefinition="Indicates the period of time over which the account is allowed." ) + protected Period activePeriod; + + /** + * Identifies the currency to which transactions must be converted when crediting or debiting the account. + */ + @Child(name = "currency", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Base currency in which balance is tracked", formalDefinition="Identifies the currency to which transactions must be converted when crediting or debiting the account." ) + protected Coding currency; + + /** + * Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative. + */ + @Child(name = "balance", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How much is in account?", formalDefinition="Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative." ) + protected Money balance; + + /** + * Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc. + */ + @Child(name = "coveragePeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Transaction window", formalDefinition="Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc." ) + protected Period coveragePeriod; + + /** + * Identifies the patient, device, practitioner, location or other object the account is associated with. + */ + @Child(name = "subject", type = {Patient.class, Device.class, Practitioner.class, Location.class, HealthcareService.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="What is account tied to?", formalDefinition="Identifies the patient, device, practitioner, location or other object the account is associated with." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Identifies the patient, device, practitioner, location or other object the account is associated with.) + */ + protected Resource subjectTarget; + + /** + * Indicates the organization, department, etc. with responsibility for the account. + */ + @Child(name = "owner", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who is responsible?", formalDefinition="Indicates the organization, department, etc. with responsibility for the account." ) + protected Reference owner; + + /** + * The actual object that is the target of the reference (Indicates the organization, department, etc. with responsibility for the account.) + */ + protected Organization ownerTarget; + + /** + * Provides additional information about what the account tracks and how it is used. + */ + @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Explanation of purpose/use", formalDefinition="Provides additional information about what the account tracks and how it is used." ) + protected StringType description; + + private static final long serialVersionUID = -1926153194L; + + /* + * Constructor + */ + public Account() { + super(); + } + + /** + * @return {@link #identifier} (Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Account addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #name} (Name used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Account setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name used for the account when displaying it to humans in reports, etc. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name used for the account when displaying it to humans in reports, etc. + */ + public Account setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Categorizes the account for reporting and searching purposes.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Categorizes the account for reporting and searching purposes.) + */ + public Account setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #status} (Indicates whether the account is presently used/useable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new AccountStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates whether the account is presently used/useable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Account setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates whether the account is presently used/useable or not. + */ + public AccountStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates whether the account is presently used/useable or not. + */ + public Account setStatus(AccountStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new AccountStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #activePeriod} (Indicates the period of time over which the account is allowed.) + */ + public Period getActivePeriod() { + if (this.activePeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.activePeriod"); + else if (Configuration.doAutoCreate()) + this.activePeriod = new Period(); // cc + return this.activePeriod; + } + + public boolean hasActivePeriod() { + return this.activePeriod != null && !this.activePeriod.isEmpty(); + } + + /** + * @param value {@link #activePeriod} (Indicates the period of time over which the account is allowed.) + */ + public Account setActivePeriod(Period value) { + this.activePeriod = value; + return this; + } + + /** + * @return {@link #currency} (Identifies the currency to which transactions must be converted when crediting or debiting the account.) + */ + public Coding getCurrency() { + if (this.currency == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.currency"); + else if (Configuration.doAutoCreate()) + this.currency = new Coding(); // cc + return this.currency; + } + + public boolean hasCurrency() { + return this.currency != null && !this.currency.isEmpty(); + } + + /** + * @param value {@link #currency} (Identifies the currency to which transactions must be converted when crediting or debiting the account.) + */ + public Account setCurrency(Coding value) { + this.currency = value; + return this; + } + + /** + * @return {@link #balance} (Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.) + */ + public Money getBalance() { + if (this.balance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.balance"); + else if (Configuration.doAutoCreate()) + this.balance = new Money(); // cc + return this.balance; + } + + public boolean hasBalance() { + return this.balance != null && !this.balance.isEmpty(); + } + + /** + * @param value {@link #balance} (Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.) + */ + public Account setBalance(Money value) { + this.balance = value; + return this; + } + + /** + * @return {@link #coveragePeriod} (Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.) + */ + public Period getCoveragePeriod() { + if (this.coveragePeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.coveragePeriod"); + else if (Configuration.doAutoCreate()) + this.coveragePeriod = new Period(); // cc + return this.coveragePeriod; + } + + public boolean hasCoveragePeriod() { + return this.coveragePeriod != null && !this.coveragePeriod.isEmpty(); + } + + /** + * @param value {@link #coveragePeriod} (Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.) + */ + public Account setCoveragePeriod(Period value) { + this.coveragePeriod = value; + return this; + } + + /** + * @return {@link #subject} (Identifies the patient, device, practitioner, location or other object the account is associated with.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Identifies the patient, device, practitioner, location or other object the account is associated with.) + */ + public Account setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, device, practitioner, location or other object the account is associated with.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, device, practitioner, location or other object the account is associated with.) + */ + public Account setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #owner} (Indicates the organization, department, etc. with responsibility for the account.) + */ + public Reference getOwner() { + if (this.owner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.owner"); + else if (Configuration.doAutoCreate()) + this.owner = new Reference(); // cc + return this.owner; + } + + public boolean hasOwner() { + return this.owner != null && !this.owner.isEmpty(); + } + + /** + * @param value {@link #owner} (Indicates the organization, department, etc. with responsibility for the account.) + */ + public Account setOwner(Reference value) { + this.owner = value; + return this; + } + + /** + * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the organization, department, etc. with responsibility for the account.) + */ + public Organization getOwnerTarget() { + if (this.ownerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.owner"); + else if (Configuration.doAutoCreate()) + this.ownerTarget = new Organization(); // aa + return this.ownerTarget; + } + + /** + * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the organization, department, etc. with responsibility for the account.) + */ + public Account setOwnerTarget(Organization value) { + this.ownerTarget = value; + return this; + } + + /** + * @return {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Account setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Provides additional information about what the account tracks and how it is used. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Provides additional information about what the account tracks and how it is used. + */ + public Account setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("status", "code", "Indicates whether the account is presently used/useable or not.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("activePeriod", "Period", "Indicates the period of time over which the account is allowed.", 0, java.lang.Integer.MAX_VALUE, activePeriod)); + childrenList.add(new Property("currency", "Coding", "Identifies the currency to which transactions must be converted when crediting or debiting the account.", 0, java.lang.Integer.MAX_VALUE, currency)); + childrenList.add(new Property("balance", "Money", "Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.", 0, java.lang.Integer.MAX_VALUE, balance)); + childrenList.add(new Property("coveragePeriod", "Period", "Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.", 0, java.lang.Integer.MAX_VALUE, coveragePeriod)); + childrenList.add(new Property("subject", "Reference(Patient|Device|Practitioner|Location|HealthcareService|Organization)", "Identifies the patient, device, practitioner, location or other object the account is associated with.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("owner", "Reference(Organization)", "Indicates the organization, department, etc. with responsibility for the account.", 0, java.lang.Integer.MAX_VALUE, owner)); + childrenList.add(new Property("description", "string", "Provides additional information about what the account tracks and how it is used.", 0, java.lang.Integer.MAX_VALUE, description)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("status")) + this.status = new AccountStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("activePeriod")) + this.activePeriod = castToPeriod(value); // Period + else if (name.equals("currency")) + this.currency = castToCoding(value); // Coding + else if (name.equals("balance")) + this.balance = castToMoney(value); // Money + else if (name.equals("coveragePeriod")) + this.coveragePeriod = castToPeriod(value); // Period + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("owner")) + this.owner = castToReference(value); // Reference + else if (name.equals("description")) + this.description = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Account.name"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Account.status"); + } + else if (name.equals("activePeriod")) { + this.activePeriod = new Period(); + return this.activePeriod; + } + else if (name.equals("currency")) { + this.currency = new Coding(); + return this.currency; + } + else if (name.equals("balance")) { + this.balance = new Money(); + return this.balance; + } + else if (name.equals("coveragePeriod")) { + this.coveragePeriod = new Period(); + return this.coveragePeriod; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("owner")) { + this.owner = new Reference(); + return this.owner; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Account.description"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Account"; + + } + + public Account copy() { + Account dst = new Account(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.name = name == null ? null : name.copy(); + dst.type = type == null ? null : type.copy(); + dst.status = status == null ? null : status.copy(); + dst.activePeriod = activePeriod == null ? null : activePeriod.copy(); + dst.currency = currency == null ? null : currency.copy(); + dst.balance = balance == null ? null : balance.copy(); + dst.coveragePeriod = coveragePeriod == null ? null : coveragePeriod.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.owner = owner == null ? null : owner.copy(); + dst.description = description == null ? null : description.copy(); + return dst; + } + + protected Account typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Account)) + return false; + Account o = (Account) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(type, o.type, true) + && compareDeep(status, o.status, true) && compareDeep(activePeriod, o.activePeriod, true) && compareDeep(currency, o.currency, true) + && compareDeep(balance, o.balance, true) && compareDeep(coveragePeriod, o.coveragePeriod, true) + && compareDeep(subject, o.subject, true) && compareDeep(owner, o.owner, true) && compareDeep(description, o.description, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Account)) + return false; + Account o = (Account) other; + return compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) + && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) && (activePeriod == null || activePeriod.isEmpty()) + && (currency == null || currency.isEmpty()) && (balance == null || balance.isEmpty()) && (coveragePeriod == null || coveragePeriod.isEmpty()) + && (subject == null || subject.isEmpty()) && (owner == null || owner.isEmpty()) && (description == null || description.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Account; + } + + @SearchParamDefinition(name="owner", path="Account.owner", description="Who is responsible?", type="reference" ) + public static final String SP_OWNER = "owner"; + @SearchParamDefinition(name="identifier", path="Account.identifier", description="Account number", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="period", path="Account.coveragePeriod", description="Transaction window", type="date" ) + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name="balance", path="Account.balance", description="How much is in account?", type="quantity" ) + public static final String SP_BALANCE = "balance"; + @SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Account.subject", description="What is account tied to?", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="type", path="Account.type", description="E.g. patient, expense, depreciation", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="status", path="Account.status", description="active | inactive", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Address.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Address.java new file mode 100644 index 00000000000..9c903ba4327 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Address.java @@ -0,0 +1,955 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + */ +@DatatypeDef(name="Address") +public class Address extends Type implements ICompositeType { + + public enum AddressUse { + /** + * A communication address at a home. + */ + HOME, + /** + * An office address. First choice for business related contacts during business hours. + */ + WORK, + /** + * A temporary address. The period can provide more detailed information. + */ + TEMP, + /** + * This address is no longer in use (or was never correct, but retained for records). + */ + OLD, + /** + * added to help the parsers + */ + NULL; + public static AddressUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("work".equals(codeString)) + return WORK; + if ("temp".equals(codeString)) + return TEMP; + if ("old".equals(codeString)) + return OLD; + throw new FHIRException("Unknown AddressUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case WORK: return "work"; + case TEMP: return "temp"; + case OLD: return "old"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case HOME: return "http://hl7.org/fhir/address-use"; + case WORK: return "http://hl7.org/fhir/address-use"; + case TEMP: return "http://hl7.org/fhir/address-use"; + case OLD: return "http://hl7.org/fhir/address-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case HOME: return "A communication address at a home."; + case WORK: return "An office address. First choice for business related contacts during business hours."; + case TEMP: return "A temporary address. The period can provide more detailed information."; + case OLD: return "This address is no longer in use (or was never correct, but retained for records)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case WORK: return "Work"; + case TEMP: return "Temporary"; + case OLD: return "Old / Incorrect"; + default: return "?"; + } + } + } + + public static class AddressUseEnumFactory implements EnumFactory { + public AddressUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return AddressUse.HOME; + if ("work".equals(codeString)) + return AddressUse.WORK; + if ("temp".equals(codeString)) + return AddressUse.TEMP; + if ("old".equals(codeString)) + return AddressUse.OLD; + throw new IllegalArgumentException("Unknown AddressUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return new Enumeration(this, AddressUse.HOME); + if ("work".equals(codeString)) + return new Enumeration(this, AddressUse.WORK); + if ("temp".equals(codeString)) + return new Enumeration(this, AddressUse.TEMP); + if ("old".equals(codeString)) + return new Enumeration(this, AddressUse.OLD); + throw new FHIRException("Unknown AddressUse code '"+codeString+"'"); + } + public String toCode(AddressUse code) { + if (code == AddressUse.HOME) + return "home"; + if (code == AddressUse.WORK) + return "work"; + if (code == AddressUse.TEMP) + return "temp"; + if (code == AddressUse.OLD) + return "old"; + return "?"; + } + } + + public enum AddressType { + /** + * Mailing addresses - PO Boxes and care-of addresses. + */ + POSTAL, + /** + * A physical address that can be visited. + */ + PHYSICAL, + /** + * An address that is both physical and postal. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static AddressType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("postal".equals(codeString)) + return POSTAL; + if ("physical".equals(codeString)) + return PHYSICAL; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown AddressType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case POSTAL: return "postal"; + case PHYSICAL: return "physical"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case POSTAL: return "http://hl7.org/fhir/address-type"; + case PHYSICAL: return "http://hl7.org/fhir/address-type"; + case BOTH: return "http://hl7.org/fhir/address-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case POSTAL: return "Mailing addresses - PO Boxes and care-of addresses."; + case PHYSICAL: return "A physical address that can be visited."; + case BOTH: return "An address that is both physical and postal."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case POSTAL: return "Postal"; + case PHYSICAL: return "Physical"; + case BOTH: return "Postal & Physical"; + default: return "?"; + } + } + } + + public static class AddressTypeEnumFactory implements EnumFactory { + public AddressType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("postal".equals(codeString)) + return AddressType.POSTAL; + if ("physical".equals(codeString)) + return AddressType.PHYSICAL; + if ("both".equals(codeString)) + return AddressType.BOTH; + throw new IllegalArgumentException("Unknown AddressType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("postal".equals(codeString)) + return new Enumeration(this, AddressType.POSTAL); + if ("physical".equals(codeString)) + return new Enumeration(this, AddressType.PHYSICAL); + if ("both".equals(codeString)) + return new Enumeration(this, AddressType.BOTH); + throw new FHIRException("Unknown AddressType code '"+codeString+"'"); + } + public String toCode(AddressType code) { + if (code == AddressType.POSTAL) + return "postal"; + if (code == AddressType.PHYSICAL) + return "physical"; + if (code == AddressType.BOTH) + return "both"; + return "?"; + } + } + + /** + * The purpose of this address. + */ + @Child(name = "use", type = {CodeType.class}, order=0, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="home | work | temp | old - purpose of this address", formalDefinition="The purpose of this address." ) + protected Enumeration use; + + /** + * Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="postal | physical | both", formalDefinition="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both." ) + protected Enumeration type; + + /** + * A full text representation of the address. + */ + @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text representation of the address", formalDefinition="A full text representation of the address." ) + protected StringType text; + + /** + * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information. + */ + @Child(name = "line", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Street name, number, direction & P.O. Box etc.", formalDefinition="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information." ) + protected List line; + + /** + * The name of the city, town, village or other community or delivery center. + */ + @Child(name = "city", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of city, town etc.", formalDefinition="The name of the city, town, village or other community or delivery center." ) + protected StringType city; + + /** + * The name of the administrative area (county). + */ + @Child(name = "district", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="District name (aka county)", formalDefinition="The name of the administrative area (county)." ) + protected StringType district; + + /** + * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + */ + @Child(name = "state", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Sub-unit of country (abbreviations ok)", formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." ) + protected StringType state; + + /** + * A postal code designating a region defined by the postal service. + */ + @Child(name = "postalCode", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Postal code for area", formalDefinition="A postal code designating a region defined by the postal service." ) + protected StringType postalCode; + + /** + * Country - a nation as commonly understood or generally accepted. + */ + @Child(name = "country", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Country (can be ISO 3166 3 letter code)", formalDefinition="Country - a nation as commonly understood or generally accepted." ) + protected StringType country; + + /** + * Time period when address was/is in use. + */ + @Child(name = "period", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period when address was/is in use", formalDefinition="Time period when address was/is in use." ) + protected Period period; + + private static final long serialVersionUID = 561490318L; + + /* + * Constructor + */ + public Address() { + super(); + } + + /** + * @return {@link #use} (The purpose of this address.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new AddressUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (The purpose of this address.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Address setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return The purpose of this address. + */ + public AddressUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value The purpose of this address. + */ + public Address setUse(AddressUse value) { + if (value == null) + this.use = null; + else { + if (this.use == null) + this.use = new Enumeration(new AddressUseEnumFactory()); + this.use.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new AddressTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Address setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both. + */ + public AddressType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both. + */ + public Address setType(AddressType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new AddressTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #text} (A full text representation of the address.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (A full text representation of the address.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public Address setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return A full text representation of the address. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value A full text representation of the address. + */ + public Address setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.) + */ + public List getLine() { + if (this.line == null) + this.line = new ArrayList(); + return this.line; + } + + public boolean hasLine() { + if (this.line == null) + return false; + for (StringType item : this.line) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.) + */ + // syntactic sugar + public StringType addLineElement() {//2 + StringType t = new StringType(); + if (this.line == null) + this.line = new ArrayList(); + this.line.add(t); + return t; + } + + /** + * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.) + */ + public Address addLine(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.line == null) + this.line = new ArrayList(); + this.line.add(t); + return this; + } + + /** + * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.) + */ + public boolean hasLine(String value) { + if (this.line == null) + return false; + for (StringType v : this.line) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #city} (The name of the city, town, village or other community or delivery center.). This is the underlying object with id, value and extensions. The accessor "getCity" gives direct access to the value + */ + public StringType getCityElement() { + if (this.city == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.city"); + else if (Configuration.doAutoCreate()) + this.city = new StringType(); // bb + return this.city; + } + + public boolean hasCityElement() { + return this.city != null && !this.city.isEmpty(); + } + + public boolean hasCity() { + return this.city != null && !this.city.isEmpty(); + } + + /** + * @param value {@link #city} (The name of the city, town, village or other community or delivery center.). This is the underlying object with id, value and extensions. The accessor "getCity" gives direct access to the value + */ + public Address setCityElement(StringType value) { + this.city = value; + return this; + } + + /** + * @return The name of the city, town, village or other community or delivery center. + */ + public String getCity() { + return this.city == null ? null : this.city.getValue(); + } + + /** + * @param value The name of the city, town, village or other community or delivery center. + */ + public Address setCity(String value) { + if (Utilities.noString(value)) + this.city = null; + else { + if (this.city == null) + this.city = new StringType(); + this.city.setValue(value); + } + return this; + } + + /** + * @return {@link #district} (The name of the administrative area (county).). This is the underlying object with id, value and extensions. The accessor "getDistrict" gives direct access to the value + */ + public StringType getDistrictElement() { + if (this.district == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.district"); + else if (Configuration.doAutoCreate()) + this.district = new StringType(); // bb + return this.district; + } + + public boolean hasDistrictElement() { + return this.district != null && !this.district.isEmpty(); + } + + public boolean hasDistrict() { + return this.district != null && !this.district.isEmpty(); + } + + /** + * @param value {@link #district} (The name of the administrative area (county).). This is the underlying object with id, value and extensions. The accessor "getDistrict" gives direct access to the value + */ + public Address setDistrictElement(StringType value) { + this.district = value; + return this; + } + + /** + * @return The name of the administrative area (county). + */ + public String getDistrict() { + return this.district == null ? null : this.district.getValue(); + } + + /** + * @param value The name of the administrative area (county). + */ + public Address setDistrict(String value) { + if (Utilities.noString(value)) + this.district = null; + else { + if (this.district == null) + this.district = new StringType(); + this.district.setValue(value); + } + return this; + } + + /** + * @return {@link #state} (Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value + */ + public StringType getStateElement() { + if (this.state == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.state"); + else if (Configuration.doAutoCreate()) + this.state = new StringType(); // bb + return this.state; + } + + public boolean hasStateElement() { + return this.state != null && !this.state.isEmpty(); + } + + public boolean hasState() { + return this.state != null && !this.state.isEmpty(); + } + + /** + * @param value {@link #state} (Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value + */ + public Address setStateElement(StringType value) { + this.state = value; + return this; + } + + /** + * @return Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + */ + public String getState() { + return this.state == null ? null : this.state.getValue(); + } + + /** + * @param value Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + */ + public Address setState(String value) { + if (Utilities.noString(value)) + this.state = null; + else { + if (this.state == null) + this.state = new StringType(); + this.state.setValue(value); + } + return this; + } + + /** + * @return {@link #postalCode} (A postal code designating a region defined by the postal service.). This is the underlying object with id, value and extensions. The accessor "getPostalCode" gives direct access to the value + */ + public StringType getPostalCodeElement() { + if (this.postalCode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.postalCode"); + else if (Configuration.doAutoCreate()) + this.postalCode = new StringType(); // bb + return this.postalCode; + } + + public boolean hasPostalCodeElement() { + return this.postalCode != null && !this.postalCode.isEmpty(); + } + + public boolean hasPostalCode() { + return this.postalCode != null && !this.postalCode.isEmpty(); + } + + /** + * @param value {@link #postalCode} (A postal code designating a region defined by the postal service.). This is the underlying object with id, value and extensions. The accessor "getPostalCode" gives direct access to the value + */ + public Address setPostalCodeElement(StringType value) { + this.postalCode = value; + return this; + } + + /** + * @return A postal code designating a region defined by the postal service. + */ + public String getPostalCode() { + return this.postalCode == null ? null : this.postalCode.getValue(); + } + + /** + * @param value A postal code designating a region defined by the postal service. + */ + public Address setPostalCode(String value) { + if (Utilities.noString(value)) + this.postalCode = null; + else { + if (this.postalCode == null) + this.postalCode = new StringType(); + this.postalCode.setValue(value); + } + return this; + } + + /** + * @return {@link #country} (Country - a nation as commonly understood or generally accepted.). This is the underlying object with id, value and extensions. The accessor "getCountry" gives direct access to the value + */ + public StringType getCountryElement() { + if (this.country == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.country"); + else if (Configuration.doAutoCreate()) + this.country = new StringType(); // bb + return this.country; + } + + public boolean hasCountryElement() { + return this.country != null && !this.country.isEmpty(); + } + + public boolean hasCountry() { + return this.country != null && !this.country.isEmpty(); + } + + /** + * @param value {@link #country} (Country - a nation as commonly understood or generally accepted.). This is the underlying object with id, value and extensions. The accessor "getCountry" gives direct access to the value + */ + public Address setCountryElement(StringType value) { + this.country = value; + return this; + } + + /** + * @return Country - a nation as commonly understood or generally accepted. + */ + public String getCountry() { + return this.country == null ? null : this.country.getValue(); + } + + /** + * @param value Country - a nation as commonly understood or generally accepted. + */ + public Address setCountry(String value) { + if (Utilities.noString(value)) + this.country = null; + else { + if (this.country == null) + this.country = new StringType(); + this.country.setValue(value); + } + return this; + } + + /** + * @return {@link #period} (Time period when address was/is in use.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Address.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Time period when address was/is in use.) + */ + public Address setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("use", "code", "The purpose of this address.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("type", "code", "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("text", "string", "A full text representation of the address.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("line", "string", "This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.", 0, java.lang.Integer.MAX_VALUE, line)); + childrenList.add(new Property("city", "string", "The name of the city, town, village or other community or delivery center.", 0, java.lang.Integer.MAX_VALUE, city)); + childrenList.add(new Property("district", "string", "The name of the administrative area (county).", 0, java.lang.Integer.MAX_VALUE, district)); + childrenList.add(new Property("state", "string", "Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).", 0, java.lang.Integer.MAX_VALUE, state)); + childrenList.add(new Property("postalCode", "string", "A postal code designating a region defined by the postal service.", 0, java.lang.Integer.MAX_VALUE, postalCode)); + childrenList.add(new Property("country", "string", "Country - a nation as commonly understood or generally accepted.", 0, java.lang.Integer.MAX_VALUE, country)); + childrenList.add(new Property("period", "Period", "Time period when address was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("use")) + this.use = new AddressUseEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = new AddressTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("line")) + this.getLine().add(castToString(value)); + else if (name.equals("city")) + this.city = castToString(value); // StringType + else if (name.equals("district")) + this.district = castToString(value); // StringType + else if (name.equals("state")) + this.state = castToString(value); // StringType + else if (name.equals("postalCode")) + this.postalCode = castToString(value); // StringType + else if (name.equals("country")) + this.country = castToString(value); // StringType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.use"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.type"); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.text"); + } + else if (name.equals("line")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.line"); + } + else if (name.equals("city")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.city"); + } + else if (name.equals("district")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.district"); + } + else if (name.equals("state")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.state"); + } + else if (name.equals("postalCode")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.postalCode"); + } + else if (name.equals("country")) { + throw new FHIRException("Cannot call addChild on a primitive type Address.country"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Address"; + + } + + public Address copy() { + Address dst = new Address(); + copyValues(dst); + dst.use = use == null ? null : use.copy(); + dst.type = type == null ? null : type.copy(); + dst.text = text == null ? null : text.copy(); + if (line != null) { + dst.line = new ArrayList(); + for (StringType i : line) + dst.line.add(i.copy()); + }; + dst.city = city == null ? null : city.copy(); + dst.district = district == null ? null : district.copy(); + dst.state = state == null ? null : state.copy(); + dst.postalCode = postalCode == null ? null : postalCode.copy(); + dst.country = country == null ? null : country.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected Address typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Address)) + return false; + Address o = (Address) other; + return compareDeep(use, o.use, true) && compareDeep(type, o.type, true) && compareDeep(text, o.text, true) + && compareDeep(line, o.line, true) && compareDeep(city, o.city, true) && compareDeep(district, o.district, true) + && compareDeep(state, o.state, true) && compareDeep(postalCode, o.postalCode, true) && compareDeep(country, o.country, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Address)) + return false; + Address o = (Address) other; + return compareValues(use, o.use, true) && compareValues(type, o.type, true) && compareValues(text, o.text, true) + && compareValues(line, o.line, true) && compareValues(city, o.city, true) && compareValues(district, o.district, true) + && compareValues(state, o.state, true) && compareValues(postalCode, o.postalCode, true) && compareValues(country, o.country, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty()) + && (text == null || text.isEmpty()) && (line == null || line.isEmpty()) && (city == null || city.isEmpty()) + && (district == null || district.isEmpty()) && (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty()) + && (country == null || country.isEmpty()) && (period == null || period.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Age.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Age.java new file mode 100644 index 00000000000..ecb9ff5e62e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Age.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Age", profileOf=Quantity.class) +public class Age extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public Age copy() { + Age dst = new Age(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Age typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Age)) + return false; + Age o = (Age) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Age)) + return false; + Age o = (Age) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AllergyIntolerance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AllergyIntolerance.java new file mode 100644 index 00000000000..6989275fa71 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AllergyIntolerance.java @@ -0,0 +1,2149 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ +@ResourceDef(name="AllergyIntolerance", profile="http://hl7.org/fhir/Profile/AllergyIntolerance") +public class AllergyIntolerance extends DomainResource { + + public enum AllergyIntoleranceStatus { + /** + * An active record of a reaction to the identified Substance. + */ + ACTIVE, + /** + * A low level of certainty about the propensity for a reaction to the identified Substance. + */ + UNCONFIRMED, + /** + * A high level of certainty about the propensity for a reaction to the identified Substance, which may include clinical evidence by testing or rechallenge. + */ + CONFIRMED, + /** + * An inactive record of a reaction to the identified Substance. + */ + INACTIVE, + /** + * A reaction to the identified Substance has been clinically reassessed by testing or rechallenge and considered to be resolved. + */ + RESOLVED, + /** + * A propensity for a reaction to the identified Substance has been disproven with a high level of clinical certainty, which may include testing or rechallenge, and is refuted. + */ + REFUTED, + /** + * The statement was entered in error and is not valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("unconfirmed".equals(codeString)) + return UNCONFIRMED; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("resolved".equals(codeString)) + return RESOLVED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown AllergyIntoleranceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case INACTIVE: return "inactive"; + case RESOLVED: return "resolved"; + case REFUTED: return "refuted"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/allergy-intolerance-status"; + case UNCONFIRMED: return "http://hl7.org/fhir/allergy-intolerance-status"; + case CONFIRMED: return "http://hl7.org/fhir/allergy-intolerance-status"; + case INACTIVE: return "http://hl7.org/fhir/allergy-intolerance-status"; + case RESOLVED: return "http://hl7.org/fhir/allergy-intolerance-status"; + case REFUTED: return "http://hl7.org/fhir/allergy-intolerance-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/allergy-intolerance-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "An active record of a reaction to the identified Substance."; + case UNCONFIRMED: return "A low level of certainty about the propensity for a reaction to the identified Substance."; + case CONFIRMED: return "A high level of certainty about the propensity for a reaction to the identified Substance, which may include clinical evidence by testing or rechallenge."; + case INACTIVE: return "An inactive record of a reaction to the identified Substance."; + case RESOLVED: return "A reaction to the identified Substance has been clinically reassessed by testing or rechallenge and considered to be resolved."; + case REFUTED: return "A propensity for a reaction to the identified Substance has been disproven with a high level of clinical certainty, which may include testing or rechallenge, and is refuted."; + case ENTEREDINERROR: return "The statement was entered in error and is not valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case UNCONFIRMED: return "Unconfirmed"; + case CONFIRMED: return "Confirmed"; + case INACTIVE: return "Inactive"; + case RESOLVED: return "Resolved"; + case REFUTED: return "Refuted"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceStatusEnumFactory implements EnumFactory { + public AllergyIntoleranceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return AllergyIntoleranceStatus.ACTIVE; + if ("unconfirmed".equals(codeString)) + return AllergyIntoleranceStatus.UNCONFIRMED; + if ("confirmed".equals(codeString)) + return AllergyIntoleranceStatus.CONFIRMED; + if ("inactive".equals(codeString)) + return AllergyIntoleranceStatus.INACTIVE; + if ("resolved".equals(codeString)) + return AllergyIntoleranceStatus.RESOLVED; + if ("refuted".equals(codeString)) + return AllergyIntoleranceStatus.REFUTED; + if ("entered-in-error".equals(codeString)) + return AllergyIntoleranceStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown AllergyIntoleranceStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.ACTIVE); + if ("unconfirmed".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.UNCONFIRMED); + if ("confirmed".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.CONFIRMED); + if ("inactive".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.INACTIVE); + if ("resolved".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.RESOLVED); + if ("refuted".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.REFUTED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceStatus.ENTEREDINERROR); + throw new FHIRException("Unknown AllergyIntoleranceStatus code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceStatus code) { + if (code == AllergyIntoleranceStatus.ACTIVE) + return "active"; + if (code == AllergyIntoleranceStatus.UNCONFIRMED) + return "unconfirmed"; + if (code == AllergyIntoleranceStatus.CONFIRMED) + return "confirmed"; + if (code == AllergyIntoleranceStatus.INACTIVE) + return "inactive"; + if (code == AllergyIntoleranceStatus.RESOLVED) + return "resolved"; + if (code == AllergyIntoleranceStatus.REFUTED) + return "refuted"; + if (code == AllergyIntoleranceStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + public enum AllergyIntoleranceCriticality { + /** + * The potential clinical impact of a future reaction is estimated as low risk: exposure to substance is unlikely to result in a life threatening or organ system threatening outcome. Future exposure to the Substance is considered a relative contra-indication. + */ + CRITL, + /** + * The potential clinical impact of a future reaction is estimated as high risk: exposure to substance may result in a life threatening or organ system threatening outcome. Future exposure to the Substance may be considered an absolute contra-indication. + */ + CRITH, + /** + * Unable to assess the potential clinical impact with the information available. + */ + CRITU, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCriticality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("CRITL".equals(codeString)) + return CRITL; + if ("CRITH".equals(codeString)) + return CRITH; + if ("CRITU".equals(codeString)) + return CRITU; + throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CRITL: return "CRITL"; + case CRITH: return "CRITH"; + case CRITU: return "CRITU"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CRITL: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + case CRITH: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + case CRITU: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CRITL: return "The potential clinical impact of a future reaction is estimated as low risk: exposure to substance is unlikely to result in a life threatening or organ system threatening outcome. Future exposure to the Substance is considered a relative contra-indication."; + case CRITH: return "The potential clinical impact of a future reaction is estimated as high risk: exposure to substance may result in a life threatening or organ system threatening outcome. Future exposure to the Substance may be considered an absolute contra-indication."; + case CRITU: return "Unable to assess the potential clinical impact with the information available."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CRITL: return "Low Risk"; + case CRITH: return "High Risk"; + case CRITU: return "Unable to determine"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceCriticalityEnumFactory implements EnumFactory { + public AllergyIntoleranceCriticality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("CRITL".equals(codeString)) + return AllergyIntoleranceCriticality.CRITL; + if ("CRITH".equals(codeString)) + return AllergyIntoleranceCriticality.CRITH; + if ("CRITU".equals(codeString)) + return AllergyIntoleranceCriticality.CRITU; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("CRITL".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.CRITL); + if ("CRITH".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.CRITH); + if ("CRITU".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.CRITU); + throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceCriticality code) { + if (code == AllergyIntoleranceCriticality.CRITL) + return "CRITL"; + if (code == AllergyIntoleranceCriticality.CRITH) + return "CRITH"; + if (code == AllergyIntoleranceCriticality.CRITU) + return "CRITU"; + return "?"; + } + } + + public enum AllergyIntoleranceType { + /** + * A propensity for hypersensitivity reaction(s) to a substance. These reactions are most typically type I hypersensitivity, plus other "allergy-like" reactions, including pseudoallergy. + */ + ALLERGY, + /** + * A propensity for adverse reactions to a substance that is not judged to be allergic or "allergy-like". These reactions are typically (but not necessarily) non-immune. They are to some degree idiosyncratic and/or individually specific (i.e. are not a reaction that is expected to occur with most or all patients given similar circumstances). + */ + INTOLERANCE, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergy".equals(codeString)) + return ALLERGY; + if ("intolerance".equals(codeString)) + return INTOLERANCE; + throw new FHIRException("Unknown AllergyIntoleranceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALLERGY: return "allergy"; + case INTOLERANCE: return "intolerance"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ALLERGY: return "http://hl7.org/fhir/allergy-intolerance-type"; + case INTOLERANCE: return "http://hl7.org/fhir/allergy-intolerance-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ALLERGY: return "A propensity for hypersensitivity reaction(s) to a substance. These reactions are most typically type I hypersensitivity, plus other \"allergy-like\" reactions, including pseudoallergy."; + case INTOLERANCE: return "A propensity for adverse reactions to a substance that is not judged to be allergic or \"allergy-like\". These reactions are typically (but not necessarily) non-immune. They are to some degree idiosyncratic and/or individually specific (i.e. are not a reaction that is expected to occur with most or all patients given similar circumstances)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALLERGY: return "Allergy"; + case INTOLERANCE: return "Intolerance"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceTypeEnumFactory implements EnumFactory { + public AllergyIntoleranceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("allergy".equals(codeString)) + return AllergyIntoleranceType.ALLERGY; + if ("intolerance".equals(codeString)) + return AllergyIntoleranceType.INTOLERANCE; + throw new IllegalArgumentException("Unknown AllergyIntoleranceType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("allergy".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceType.ALLERGY); + if ("intolerance".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceType.INTOLERANCE); + throw new FHIRException("Unknown AllergyIntoleranceType code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceType code) { + if (code == AllergyIntoleranceType.ALLERGY) + return "allergy"; + if (code == AllergyIntoleranceType.INTOLERANCE) + return "intolerance"; + return "?"; + } + } + + public enum AllergyIntoleranceCategory { + /** + * Any substance consumed to provide nutritional support for the body. + */ + FOOD, + /** + * Substances administered to achieve a physiological effect. + */ + MEDICATION, + /** + * Substances that are encountered in the environment. + */ + ENVIRONMENT, + /** + * Other substances that are not covered by any other category. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("food".equals(codeString)) + return FOOD; + if ("medication".equals(codeString)) + return MEDICATION; + if ("environment".equals(codeString)) + return ENVIRONMENT; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FOOD: return "food"; + case MEDICATION: return "medication"; + case ENVIRONMENT: return "environment"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case FOOD: return "http://hl7.org/fhir/allergy-intolerance-category"; + case MEDICATION: return "http://hl7.org/fhir/allergy-intolerance-category"; + case ENVIRONMENT: return "http://hl7.org/fhir/allergy-intolerance-category"; + case OTHER: return "http://hl7.org/fhir/allergy-intolerance-category"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case FOOD: return "Any substance consumed to provide nutritional support for the body."; + case MEDICATION: return "Substances administered to achieve a physiological effect."; + case ENVIRONMENT: return "Substances that are encountered in the environment."; + case OTHER: return "Other substances that are not covered by any other category."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FOOD: return "Food"; + case MEDICATION: return "Medication"; + case ENVIRONMENT: return "Environment"; + case OTHER: return "Other"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceCategoryEnumFactory implements EnumFactory { + public AllergyIntoleranceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("food".equals(codeString)) + return AllergyIntoleranceCategory.FOOD; + if ("medication".equals(codeString)) + return AllergyIntoleranceCategory.MEDICATION; + if ("environment".equals(codeString)) + return AllergyIntoleranceCategory.ENVIRONMENT; + if ("other".equals(codeString)) + return AllergyIntoleranceCategory.OTHER; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("food".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCategory.FOOD); + if ("medication".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCategory.MEDICATION); + if ("environment".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCategory.ENVIRONMENT); + if ("other".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCategory.OTHER); + throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceCategory code) { + if (code == AllergyIntoleranceCategory.FOOD) + return "food"; + if (code == AllergyIntoleranceCategory.MEDICATION) + return "medication"; + if (code == AllergyIntoleranceCategory.ENVIRONMENT) + return "environment"; + if (code == AllergyIntoleranceCategory.OTHER) + return "other"; + return "?"; + } + } + + public enum AllergyIntoleranceCertainty { + /** + * There is a low level of clinical certainty that the reaction was caused by the identified Substance. + */ + UNLIKELY, + /** + * There is a high level of clinical certainty that the reaction was caused by the identified Substance. + */ + LIKELY, + /** + * There is a very high level of clinical certainty that the reaction was due to the identified Substance, which may include clinical evidence by testing or rechallenge. + */ + CONFIRMED, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCertainty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unlikely".equals(codeString)) + return UNLIKELY; + if ("likely".equals(codeString)) + return LIKELY; + if ("confirmed".equals(codeString)) + return CONFIRMED; + throw new FHIRException("Unknown AllergyIntoleranceCertainty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNLIKELY: return "unlikely"; + case LIKELY: return "likely"; + case CONFIRMED: return "confirmed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case UNLIKELY: return "http://hl7.org/fhir/reaction-event-certainty"; + case LIKELY: return "http://hl7.org/fhir/reaction-event-certainty"; + case CONFIRMED: return "http://hl7.org/fhir/reaction-event-certainty"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case UNLIKELY: return "There is a low level of clinical certainty that the reaction was caused by the identified Substance."; + case LIKELY: return "There is a high level of clinical certainty that the reaction was caused by the identified Substance."; + case CONFIRMED: return "There is a very high level of clinical certainty that the reaction was due to the identified Substance, which may include clinical evidence by testing or rechallenge."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNLIKELY: return "Unlikely"; + case LIKELY: return "Likely"; + case CONFIRMED: return "Confirmed"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceCertaintyEnumFactory implements EnumFactory { + public AllergyIntoleranceCertainty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("unlikely".equals(codeString)) + return AllergyIntoleranceCertainty.UNLIKELY; + if ("likely".equals(codeString)) + return AllergyIntoleranceCertainty.LIKELY; + if ("confirmed".equals(codeString)) + return AllergyIntoleranceCertainty.CONFIRMED; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCertainty code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("unlikely".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCertainty.UNLIKELY); + if ("likely".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCertainty.LIKELY); + if ("confirmed".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCertainty.CONFIRMED); + throw new FHIRException("Unknown AllergyIntoleranceCertainty code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceCertainty code) { + if (code == AllergyIntoleranceCertainty.UNLIKELY) + return "unlikely"; + if (code == AllergyIntoleranceCertainty.LIKELY) + return "likely"; + if (code == AllergyIntoleranceCertainty.CONFIRMED) + return "confirmed"; + return "?"; + } + } + + public enum AllergyIntoleranceSeverity { + /** + * Causes mild physiological effects. + */ + MILD, + /** + * Causes moderate physiological effects. + */ + MODERATE, + /** + * Causes severe physiological effects. + */ + SEVERE, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mild".equals(codeString)) + return MILD; + if ("moderate".equals(codeString)) + return MODERATE; + if ("severe".equals(codeString)) + return SEVERE; + throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MILD: return "mild"; + case MODERATE: return "moderate"; + case SEVERE: return "severe"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MILD: return "http://hl7.org/fhir/reaction-event-severity"; + case MODERATE: return "http://hl7.org/fhir/reaction-event-severity"; + case SEVERE: return "http://hl7.org/fhir/reaction-event-severity"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MILD: return "Causes mild physiological effects."; + case MODERATE: return "Causes moderate physiological effects."; + case SEVERE: return "Causes severe physiological effects."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MILD: return "Mild"; + case MODERATE: return "Moderate"; + case SEVERE: return "Severe"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceSeverityEnumFactory implements EnumFactory { + public AllergyIntoleranceSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("mild".equals(codeString)) + return AllergyIntoleranceSeverity.MILD; + if ("moderate".equals(codeString)) + return AllergyIntoleranceSeverity.MODERATE; + if ("severe".equals(codeString)) + return AllergyIntoleranceSeverity.SEVERE; + throw new IllegalArgumentException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("mild".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceSeverity.MILD); + if ("moderate".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceSeverity.MODERATE); + if ("severe".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceSeverity.SEVERE); + throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceSeverity code) { + if (code == AllergyIntoleranceSeverity.MILD) + return "mild"; + if (code == AllergyIntoleranceSeverity.MODERATE) + return "moderate"; + if (code == AllergyIntoleranceSeverity.SEVERE) + return "severe"; + return "?"; + } + } + + @Block() + public static class AllergyIntoleranceReactionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance. + */ + @Child(name = "substance", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific substance considered to be responsible for event", formalDefinition="Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance." ) + protected CodeableConcept substance; + + /** + * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event. + */ + @Child(name = "certainty", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="unlikely | likely | confirmed - clinical certainty about the specific substance", formalDefinition="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event." ) + protected Enumeration certainty; + + /** + * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event. + */ + @Child(name = "manifestation", type = {CodeableConcept.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Clinical symptoms/signs associated with the Event", formalDefinition="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event." ) + protected List manifestation; + + /** + * Text description about the reaction as a whole, including details of the manifestation if required. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of the event as a whole", formalDefinition="Text description about the reaction as a whole, including details of the manifestation if required." ) + protected StringType description; + + /** + * Record of the date and/or time of the onset of the Reaction. + */ + @Child(name = "onset", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date(/time) when manifestations showed", formalDefinition="Record of the date and/or time of the onset of the Reaction." ) + protected DateTimeType onset; + + /** + * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations. + */ + @Child(name = "severity", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="mild | moderate | severe (of event as a whole)", formalDefinition="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations." ) + protected Enumeration severity; + + /** + * Identification of the route by which the subject was exposed to the substance. + */ + @Child(name = "exposureRoute", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How the subject was exposed to the substance", formalDefinition="Identification of the route by which the subject was exposed to the substance." ) + protected CodeableConcept exposureRoute; + + /** + * Additional text about the adverse reaction event not captured in other fields. + */ + @Child(name = "note", type = {Annotation.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Text about event not captured in other fields", formalDefinition="Additional text about the adverse reaction event not captured in other fields." ) + protected Annotation note; + + private static final long serialVersionUID = -765664367L; + + /* + * Constructor + */ + public AllergyIntoleranceReactionComponent() { + super(); + } + + /** + * @return {@link #substance} (Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.) + */ + public CodeableConcept getSubstance() { + if (this.substance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.substance"); + else if (Configuration.doAutoCreate()) + this.substance = new CodeableConcept(); // cc + return this.substance; + } + + public boolean hasSubstance() { + return this.substance != null && !this.substance.isEmpty(); + } + + /** + * @param value {@link #substance} (Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.) + */ + public AllergyIntoleranceReactionComponent setSubstance(CodeableConcept value) { + this.substance = value; + return this; + } + + /** + * @return {@link #certainty} (Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.). This is the underlying object with id, value and extensions. The accessor "getCertainty" gives direct access to the value + */ + public Enumeration getCertaintyElement() { + if (this.certainty == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.certainty"); + else if (Configuration.doAutoCreate()) + this.certainty = new Enumeration(new AllergyIntoleranceCertaintyEnumFactory()); // bb + return this.certainty; + } + + public boolean hasCertaintyElement() { + return this.certainty != null && !this.certainty.isEmpty(); + } + + public boolean hasCertainty() { + return this.certainty != null && !this.certainty.isEmpty(); + } + + /** + * @param value {@link #certainty} (Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.). This is the underlying object with id, value and extensions. The accessor "getCertainty" gives direct access to the value + */ + public AllergyIntoleranceReactionComponent setCertaintyElement(Enumeration value) { + this.certainty = value; + return this; + } + + /** + * @return Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event. + */ + public AllergyIntoleranceCertainty getCertainty() { + return this.certainty == null ? null : this.certainty.getValue(); + } + + /** + * @param value Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event. + */ + public AllergyIntoleranceReactionComponent setCertainty(AllergyIntoleranceCertainty value) { + if (value == null) + this.certainty = null; + else { + if (this.certainty == null) + this.certainty = new Enumeration(new AllergyIntoleranceCertaintyEnumFactory()); + this.certainty.setValue(value); + } + return this; + } + + /** + * @return {@link #manifestation} (Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.) + */ + public List getManifestation() { + if (this.manifestation == null) + this.manifestation = new ArrayList(); + return this.manifestation; + } + + public boolean hasManifestation() { + if (this.manifestation == null) + return false; + for (CodeableConcept item : this.manifestation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #manifestation} (Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.) + */ + // syntactic sugar + public CodeableConcept addManifestation() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.manifestation == null) + this.manifestation = new ArrayList(); + this.manifestation.add(t); + return t; + } + + // syntactic sugar + public AllergyIntoleranceReactionComponent addManifestation(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.manifestation == null) + this.manifestation = new ArrayList(); + this.manifestation.add(t); + return this; + } + + /** + * @return {@link #description} (Text description about the reaction as a whole, including details of the manifestation if required.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Text description about the reaction as a whole, including details of the manifestation if required.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public AllergyIntoleranceReactionComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Text description about the reaction as a whole, including details of the manifestation if required. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Text description about the reaction as a whole, including details of the manifestation if required. + */ + public AllergyIntoleranceReactionComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #onset} (Record of the date and/or time of the onset of the Reaction.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public DateTimeType getOnsetElement() { + if (this.onset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.onset"); + else if (Configuration.doAutoCreate()) + this.onset = new DateTimeType(); // bb + return this.onset; + } + + public boolean hasOnsetElement() { + return this.onset != null && !this.onset.isEmpty(); + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Record of the date and/or time of the onset of the Reaction.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public AllergyIntoleranceReactionComponent setOnsetElement(DateTimeType value) { + this.onset = value; + return this; + } + + /** + * @return Record of the date and/or time of the onset of the Reaction. + */ + public Date getOnset() { + return this.onset == null ? null : this.onset.getValue(); + } + + /** + * @param value Record of the date and/or time of the onset of the Reaction. + */ + public AllergyIntoleranceReactionComponent setOnset(Date value) { + if (value == null) + this.onset = null; + else { + if (this.onset == null) + this.onset = new DateTimeType(); + this.onset.setValue(value); + } + return this; + } + + /** + * @return {@link #severity} (Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public Enumeration getSeverityElement() { + if (this.severity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.severity"); + else if (Configuration.doAutoCreate()) + this.severity = new Enumeration(new AllergyIntoleranceSeverityEnumFactory()); // bb + return this.severity; + } + + public boolean hasSeverityElement() { + return this.severity != null && !this.severity.isEmpty(); + } + + public boolean hasSeverity() { + return this.severity != null && !this.severity.isEmpty(); + } + + /** + * @param value {@link #severity} (Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public AllergyIntoleranceReactionComponent setSeverityElement(Enumeration value) { + this.severity = value; + return this; + } + + /** + * @return Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations. + */ + public AllergyIntoleranceSeverity getSeverity() { + return this.severity == null ? null : this.severity.getValue(); + } + + /** + * @param value Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations. + */ + public AllergyIntoleranceReactionComponent setSeverity(AllergyIntoleranceSeverity value) { + if (value == null) + this.severity = null; + else { + if (this.severity == null) + this.severity = new Enumeration(new AllergyIntoleranceSeverityEnumFactory()); + this.severity.setValue(value); + } + return this; + } + + /** + * @return {@link #exposureRoute} (Identification of the route by which the subject was exposed to the substance.) + */ + public CodeableConcept getExposureRoute() { + if (this.exposureRoute == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.exposureRoute"); + else if (Configuration.doAutoCreate()) + this.exposureRoute = new CodeableConcept(); // cc + return this.exposureRoute; + } + + public boolean hasExposureRoute() { + return this.exposureRoute != null && !this.exposureRoute.isEmpty(); + } + + /** + * @param value {@link #exposureRoute} (Identification of the route by which the subject was exposed to the substance.) + */ + public AllergyIntoleranceReactionComponent setExposureRoute(CodeableConcept value) { + this.exposureRoute = value; + return this; + } + + /** + * @return {@link #note} (Additional text about the adverse reaction event not captured in other fields.) + */ + public Annotation getNote() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.note"); + else if (Configuration.doAutoCreate()) + this.note = new Annotation(); // cc + return this.note; + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Additional text about the adverse reaction event not captured in other fields.) + */ + public AllergyIntoleranceReactionComponent setNote(Annotation value) { + this.note = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("substance", "CodeableConcept", "Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.", 0, java.lang.Integer.MAX_VALUE, substance)); + childrenList.add(new Property("certainty", "code", "Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.", 0, java.lang.Integer.MAX_VALUE, certainty)); + childrenList.add(new Property("manifestation", "CodeableConcept", "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.", 0, java.lang.Integer.MAX_VALUE, manifestation)); + childrenList.add(new Property("description", "string", "Text description about the reaction as a whole, including details of the manifestation if required.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Reaction.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("severity", "code", "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.", 0, java.lang.Integer.MAX_VALUE, severity)); + childrenList.add(new Property("exposureRoute", "CodeableConcept", "Identification of the route by which the subject was exposed to the substance.", 0, java.lang.Integer.MAX_VALUE, exposureRoute)); + childrenList.add(new Property("note", "Annotation", "Additional text about the adverse reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("substance")) + this.substance = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("certainty")) + this.certainty = new AllergyIntoleranceCertaintyEnumFactory().fromType(value); // Enumeration + else if (name.equals("manifestation")) + this.getManifestation().add(castToCodeableConcept(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("onset")) + this.onset = castToDateTime(value); // DateTimeType + else if (name.equals("severity")) + this.severity = new AllergyIntoleranceSeverityEnumFactory().fromType(value); // Enumeration + else if (name.equals("exposureRoute")) + this.exposureRoute = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("note")) + this.note = castToAnnotation(value); // Annotation + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("substance")) { + this.substance = new CodeableConcept(); + return this.substance; + } + else if (name.equals("certainty")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.certainty"); + } + else if (name.equals("manifestation")) { + return addManifestation(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.description"); + } + else if (name.equals("onset")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset"); + } + else if (name.equals("severity")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.severity"); + } + else if (name.equals("exposureRoute")) { + this.exposureRoute = new CodeableConcept(); + return this.exposureRoute; + } + else if (name.equals("note")) { + this.note = new Annotation(); + return this.note; + } + else + return super.addChild(name); + } + + public AllergyIntoleranceReactionComponent copy() { + AllergyIntoleranceReactionComponent dst = new AllergyIntoleranceReactionComponent(); + copyValues(dst); + dst.substance = substance == null ? null : substance.copy(); + dst.certainty = certainty == null ? null : certainty.copy(); + if (manifestation != null) { + dst.manifestation = new ArrayList(); + for (CodeableConcept i : manifestation) + dst.manifestation.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + dst.onset = onset == null ? null : onset.copy(); + dst.severity = severity == null ? null : severity.copy(); + dst.exposureRoute = exposureRoute == null ? null : exposureRoute.copy(); + dst.note = note == null ? null : note.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AllergyIntoleranceReactionComponent)) + return false; + AllergyIntoleranceReactionComponent o = (AllergyIntoleranceReactionComponent) other; + return compareDeep(substance, o.substance, true) && compareDeep(certainty, o.certainty, true) && compareDeep(manifestation, o.manifestation, true) + && compareDeep(description, o.description, true) && compareDeep(onset, o.onset, true) && compareDeep(severity, o.severity, true) + && compareDeep(exposureRoute, o.exposureRoute, true) && compareDeep(note, o.note, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AllergyIntoleranceReactionComponent)) + return false; + AllergyIntoleranceReactionComponent o = (AllergyIntoleranceReactionComponent) other; + return compareValues(certainty, o.certainty, true) && compareValues(description, o.description, true) + && compareValues(onset, o.onset, true) && compareValues(severity, o.severity, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (substance == null || substance.isEmpty()) && (certainty == null || certainty.isEmpty()) + && (manifestation == null || manifestation.isEmpty()) && (description == null || description.isEmpty()) + && (onset == null || onset.isEmpty()) && (severity == null || severity.isEmpty()) && (exposureRoute == null || exposureRoute.isEmpty()) + && (note == null || note.isEmpty()); + } + + public String fhirType() { + return "AllergyIntolerance.reaction"; + + } + + } + + /** + * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External ids for this item", formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * Record of the date and/or time of the onset of the Allergy or Intolerance. + */ + @Child(name = "onset", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date(/time) when manifestations showed", formalDefinition="Record of the date and/or time of the onset of the Allergy or Intolerance." ) + protected DateTimeType onset; + + /** + * Date when the sensitivity was recorded. + */ + @Child(name = "recordedDate", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." ) + protected DateTimeType recordedDate; + + /** + * Individual who recorded the record and takes responsibility for its conten. + */ + @Child(name = "recorder", type = {Practitioner.class, Patient.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Individual who recorded the record and takes responsibility for its conten." ) + protected Reference recorder; + + /** + * The actual object that is the target of the reference (Individual who recorded the record and takes responsibility for its conten.) + */ + protected Resource recorderTarget; + + /** + * The patient who has the allergy or intolerance. + */ + @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who the sensitivity is for", formalDefinition="The patient who has the allergy or intolerance." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient who has the allergy or intolerance.) + */ + protected Patient patientTarget; + + /** + * The source of the information about the allergy that is recorded. + */ + @Child(name = "reporter", type = {Patient.class, RelatedPerson.class, Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Source of the information about the allergy", formalDefinition="The source of the information about the allergy that is recorded." ) + protected Reference reporter; + + /** + * The actual object that is the target of the reference (The source of the information about the allergy that is recorded.) + */ + protected Resource reporterTarget; + + /** + * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk. + */ + @Child(name = "substance", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk." ) + protected CodeableConcept substance; + + /** + * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. + */ + @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." ) + protected Enumeration status; + + /** + * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. + */ + @Child(name = "criticality", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="CRITL | CRITH | CRITU", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." ) + protected Enumeration criticality; + + /** + * Identification of the underlying physiological mechanism for the reaction risk. + */ + @Child(name = "type", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="allergy | intolerance - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the reaction risk." ) + protected Enumeration type; + + /** + * Category of the identified Substance. + */ + @Child(name = "category", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="food | medication | environment | other - Category of Substance", formalDefinition="Category of the identified Substance." ) + protected Enumeration category; + + /** + * Represents the date and/or time of the last known occurrence of a reaction event. + */ + @Child(name = "lastOccurence", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date(/time) of last known occurrence of a reaction", formalDefinition="Represents the date and/or time of the last known occurrence of a reaction event." ) + protected DateTimeType lastOccurence; + + /** + * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields. + */ + @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ) + protected Annotation note; + + /** + * Details about each adverse reaction event linked to exposure to the identified Substance. + */ + @Child(name = "reaction", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each adverse reaction event linked to exposure to the identified Substance." ) + protected List reaction; + + private static final long serialVersionUID = -1657522921L; + + /* + * Constructor + */ + public AllergyIntolerance() { + super(); + } + + /* + * Constructor + */ + public AllergyIntolerance(Reference patient, CodeableConcept substance) { + super(); + this.patient = patient; + this.substance = substance; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public AllergyIntolerance addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public DateTimeType getOnsetElement() { + if (this.onset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.onset"); + else if (Configuration.doAutoCreate()) + this.onset = new DateTimeType(); // bb + return this.onset; + } + + public boolean hasOnsetElement() { + return this.onset != null && !this.onset.isEmpty(); + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public AllergyIntolerance setOnsetElement(DateTimeType value) { + this.onset = value; + return this; + } + + /** + * @return Record of the date and/or time of the onset of the Allergy or Intolerance. + */ + public Date getOnset() { + return this.onset == null ? null : this.onset.getValue(); + } + + /** + * @param value Record of the date and/or time of the onset of the Allergy or Intolerance. + */ + public AllergyIntolerance setOnset(Date value) { + if (value == null) + this.onset = null; + else { + if (this.onset == null) + this.onset = new DateTimeType(); + this.onset.setValue(value); + } + return this; + } + + /** + * @return {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value + */ + public DateTimeType getRecordedDateElement() { + if (this.recordedDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.recordedDate"); + else if (Configuration.doAutoCreate()) + this.recordedDate = new DateTimeType(); // bb + return this.recordedDate; + } + + public boolean hasRecordedDateElement() { + return this.recordedDate != null && !this.recordedDate.isEmpty(); + } + + public boolean hasRecordedDate() { + return this.recordedDate != null && !this.recordedDate.isEmpty(); + } + + /** + * @param value {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value + */ + public AllergyIntolerance setRecordedDateElement(DateTimeType value) { + this.recordedDate = value; + return this; + } + + /** + * @return Date when the sensitivity was recorded. + */ + public Date getRecordedDate() { + return this.recordedDate == null ? null : this.recordedDate.getValue(); + } + + /** + * @param value Date when the sensitivity was recorded. + */ + public AllergyIntolerance setRecordedDate(Date value) { + if (value == null) + this.recordedDate = null; + else { + if (this.recordedDate == null) + this.recordedDate = new DateTimeType(); + this.recordedDate.setValue(value); + } + return this; + } + + /** + * @return {@link #recorder} (Individual who recorded the record and takes responsibility for its conten.) + */ + public Reference getRecorder() { + if (this.recorder == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.recorder"); + else if (Configuration.doAutoCreate()) + this.recorder = new Reference(); // cc + return this.recorder; + } + + public boolean hasRecorder() { + return this.recorder != null && !this.recorder.isEmpty(); + } + + /** + * @param value {@link #recorder} (Individual who recorded the record and takes responsibility for its conten.) + */ + public AllergyIntolerance setRecorder(Reference value) { + this.recorder = value; + return this; + } + + /** + * @return {@link #recorder} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its conten.) + */ + public Resource getRecorderTarget() { + return this.recorderTarget; + } + + /** + * @param value {@link #recorder} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its conten.) + */ + public AllergyIntolerance setRecorderTarget(Resource value) { + this.recorderTarget = value; + return this; + } + + /** + * @return {@link #patient} (The patient who has the allergy or intolerance.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient who has the allergy or intolerance.) + */ + public AllergyIntolerance setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) + */ + public AllergyIntolerance setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #reporter} (The source of the information about the allergy that is recorded.) + */ + public Reference getReporter() { + if (this.reporter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.reporter"); + else if (Configuration.doAutoCreate()) + this.reporter = new Reference(); // cc + return this.reporter; + } + + public boolean hasReporter() { + return this.reporter != null && !this.reporter.isEmpty(); + } + + /** + * @param value {@link #reporter} (The source of the information about the allergy that is recorded.) + */ + public AllergyIntolerance setReporter(Reference value) { + this.reporter = value; + return this; + } + + /** + * @return {@link #reporter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) + */ + public Resource getReporterTarget() { + return this.reporterTarget; + } + + /** + * @param value {@link #reporter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) + */ + public AllergyIntolerance setReporterTarget(Resource value) { + this.reporterTarget = value; + return this; + } + + /** + * @return {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) + */ + public CodeableConcept getSubstance() { + if (this.substance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.substance"); + else if (Configuration.doAutoCreate()) + this.substance = new CodeableConcept(); // cc + return this.substance; + } + + public boolean hasSubstance() { + return this.substance != null && !this.substance.isEmpty(); + } + + /** + * @param value {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) + */ + public AllergyIntolerance setSubstance(CodeableConcept value) { + this.substance = value; + return this; + } + + /** + * @return {@link #status} (Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new AllergyIntoleranceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public AllergyIntolerance setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. + */ + public AllergyIntoleranceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. + */ + public AllergyIntolerance setStatus(AllergyIntoleranceStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new AllergyIntoleranceStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value + */ + public Enumeration getCriticalityElement() { + if (this.criticality == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.criticality"); + else if (Configuration.doAutoCreate()) + this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); // bb + return this.criticality; + } + + public boolean hasCriticalityElement() { + return this.criticality != null && !this.criticality.isEmpty(); + } + + public boolean hasCriticality() { + return this.criticality != null && !this.criticality.isEmpty(); + } + + /** + * @param value {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value + */ + public AllergyIntolerance setCriticalityElement(Enumeration value) { + this.criticality = value; + return this; + } + + /** + * @return Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. + */ + public AllergyIntoleranceCriticality getCriticality() { + return this.criticality == null ? null : this.criticality.getValue(); + } + + /** + * @param value Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. + */ + public AllergyIntolerance setCriticality(AllergyIntoleranceCriticality value) { + if (value == null) + this.criticality = null; + else { + if (this.criticality == null) + this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); + this.criticality.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new AllergyIntoleranceTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public AllergyIntolerance setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Identification of the underlying physiological mechanism for the reaction risk. + */ + public AllergyIntoleranceType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Identification of the underlying physiological mechanism for the reaction risk. + */ + public AllergyIntolerance setType(AllergyIntoleranceType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new AllergyIntoleranceTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #category} (Category of the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public Enumeration getCategoryElement() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.category"); + else if (Configuration.doAutoCreate()) + this.category = new Enumeration(new AllergyIntoleranceCategoryEnumFactory()); // bb + return this.category; + } + + public boolean hasCategoryElement() { + return this.category != null && !this.category.isEmpty(); + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (Category of the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public AllergyIntolerance setCategoryElement(Enumeration value) { + this.category = value; + return this; + } + + /** + * @return Category of the identified Substance. + */ + public AllergyIntoleranceCategory getCategory() { + return this.category == null ? null : this.category.getValue(); + } + + /** + * @param value Category of the identified Substance. + */ + public AllergyIntolerance setCategory(AllergyIntoleranceCategory value) { + if (value == null) + this.category = null; + else { + if (this.category == null) + this.category = new Enumeration(new AllergyIntoleranceCategoryEnumFactory()); + this.category.setValue(value); + } + return this; + } + + /** + * @return {@link #lastOccurence} (Represents the date and/or time of the last known occurrence of a reaction event.). This is the underlying object with id, value and extensions. The accessor "getLastOccurence" gives direct access to the value + */ + public DateTimeType getLastOccurenceElement() { + if (this.lastOccurence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.lastOccurence"); + else if (Configuration.doAutoCreate()) + this.lastOccurence = new DateTimeType(); // bb + return this.lastOccurence; + } + + public boolean hasLastOccurenceElement() { + return this.lastOccurence != null && !this.lastOccurence.isEmpty(); + } + + public boolean hasLastOccurence() { + return this.lastOccurence != null && !this.lastOccurence.isEmpty(); + } + + /** + * @param value {@link #lastOccurence} (Represents the date and/or time of the last known occurrence of a reaction event.). This is the underlying object with id, value and extensions. The accessor "getLastOccurence" gives direct access to the value + */ + public AllergyIntolerance setLastOccurenceElement(DateTimeType value) { + this.lastOccurence = value; + return this; + } + + /** + * @return Represents the date and/or time of the last known occurrence of a reaction event. + */ + public Date getLastOccurence() { + return this.lastOccurence == null ? null : this.lastOccurence.getValue(); + } + + /** + * @param value Represents the date and/or time of the last known occurrence of a reaction event. + */ + public AllergyIntolerance setLastOccurence(Date value) { + if (value == null) + this.lastOccurence = null; + else { + if (this.lastOccurence == null) + this.lastOccurence = new DateTimeType(); + this.lastOccurence.setValue(value); + } + return this; + } + + /** + * @return {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.) + */ + public Annotation getNote() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.note"); + else if (Configuration.doAutoCreate()) + this.note = new Annotation(); // cc + return this.note; + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.) + */ + public AllergyIntolerance setNote(Annotation value) { + this.note = value; + return this; + } + + /** + * @return {@link #reaction} (Details about each adverse reaction event linked to exposure to the identified Substance.) + */ + public List getReaction() { + if (this.reaction == null) + this.reaction = new ArrayList(); + return this.reaction; + } + + public boolean hasReaction() { + if (this.reaction == null) + return false; + for (AllergyIntoleranceReactionComponent item : this.reaction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reaction} (Details about each adverse reaction event linked to exposure to the identified Substance.) + */ + // syntactic sugar + public AllergyIntoleranceReactionComponent addReaction() { //3 + AllergyIntoleranceReactionComponent t = new AllergyIntoleranceReactionComponent(); + if (this.reaction == null) + this.reaction = new ArrayList(); + this.reaction.add(t); + return t; + } + + // syntactic sugar + public AllergyIntolerance addReaction(AllergyIntoleranceReactionComponent t) { //3 + if (t == null) + return this; + if (this.reaction == null) + this.reaction = new ArrayList(); + this.reaction.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Allergy or Intolerance.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("recordedDate", "dateTime", "Date when the sensitivity was recorded.", 0, java.lang.Integer.MAX_VALUE, recordedDate)); + childrenList.add(new Property("recorder", "Reference(Practitioner|Patient)", "Individual who recorded the record and takes responsibility for its conten.", 0, java.lang.Integer.MAX_VALUE, recorder)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient who has the allergy or intolerance.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("reporter", "Reference(Patient|RelatedPerson|Practitioner)", "The source of the information about the allergy that is recorded.", 0, java.lang.Integer.MAX_VALUE, reporter)); + childrenList.add(new Property("substance", "CodeableConcept", "Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.", 0, java.lang.Integer.MAX_VALUE, substance)); + childrenList.add(new Property("status", "code", "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, criticality)); + childrenList.add(new Property("type", "code", "Identification of the underlying physiological mechanism for the reaction risk.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("category", "code", "Category of the identified Substance.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("lastOccurence", "dateTime", "Represents the date and/or time of the last known occurrence of a reaction event.", 0, java.lang.Integer.MAX_VALUE, lastOccurence)); + childrenList.add(new Property("note", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, reaction)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("onset")) + this.onset = castToDateTime(value); // DateTimeType + else if (name.equals("recordedDate")) + this.recordedDate = castToDateTime(value); // DateTimeType + else if (name.equals("recorder")) + this.recorder = castToReference(value); // Reference + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("reporter")) + this.reporter = castToReference(value); // Reference + else if (name.equals("substance")) + this.substance = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("status")) + this.status = new AllergyIntoleranceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("criticality")) + this.criticality = new AllergyIntoleranceCriticalityEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = new AllergyIntoleranceTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = new AllergyIntoleranceCategoryEnumFactory().fromType(value); // Enumeration + else if (name.equals("lastOccurence")) + this.lastOccurence = castToDateTime(value); // DateTimeType + else if (name.equals("note")) + this.note = castToAnnotation(value); // Annotation + else if (name.equals("reaction")) + this.getReaction().add((AllergyIntoleranceReactionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("onset")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset"); + } + else if (name.equals("recordedDate")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.recordedDate"); + } + else if (name.equals("recorder")) { + this.recorder = new Reference(); + return this.recorder; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("reporter")) { + this.reporter = new Reference(); + return this.reporter; + } + else if (name.equals("substance")) { + this.substance = new CodeableConcept(); + return this.substance; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status"); + } + else if (name.equals("criticality")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type"); + } + else if (name.equals("category")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category"); + } + else if (name.equals("lastOccurence")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.lastOccurence"); + } + else if (name.equals("note")) { + this.note = new Annotation(); + return this.note; + } + else if (name.equals("reaction")) { + return addReaction(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "AllergyIntolerance"; + + } + + public AllergyIntolerance copy() { + AllergyIntolerance dst = new AllergyIntolerance(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.onset = onset == null ? null : onset.copy(); + dst.recordedDate = recordedDate == null ? null : recordedDate.copy(); + dst.recorder = recorder == null ? null : recorder.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.reporter = reporter == null ? null : reporter.copy(); + dst.substance = substance == null ? null : substance.copy(); + dst.status = status == null ? null : status.copy(); + dst.criticality = criticality == null ? null : criticality.copy(); + dst.type = type == null ? null : type.copy(); + dst.category = category == null ? null : category.copy(); + dst.lastOccurence = lastOccurence == null ? null : lastOccurence.copy(); + dst.note = note == null ? null : note.copy(); + if (reaction != null) { + dst.reaction = new ArrayList(); + for (AllergyIntoleranceReactionComponent i : reaction) + dst.reaction.add(i.copy()); + }; + return dst; + } + + protected AllergyIntolerance typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AllergyIntolerance)) + return false; + AllergyIntolerance o = (AllergyIntolerance) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(onset, o.onset, true) && compareDeep(recordedDate, o.recordedDate, true) + && compareDeep(recorder, o.recorder, true) && compareDeep(patient, o.patient, true) && compareDeep(reporter, o.reporter, true) + && compareDeep(substance, o.substance, true) && compareDeep(status, o.status, true) && compareDeep(criticality, o.criticality, true) + && compareDeep(type, o.type, true) && compareDeep(category, o.category, true) && compareDeep(lastOccurence, o.lastOccurence, true) + && compareDeep(note, o.note, true) && compareDeep(reaction, o.reaction, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AllergyIntolerance)) + return false; + AllergyIntolerance o = (AllergyIntolerance) other; + return compareValues(onset, o.onset, true) && compareValues(recordedDate, o.recordedDate, true) && compareValues(status, o.status, true) + && compareValues(criticality, o.criticality, true) && compareValues(type, o.type, true) && compareValues(category, o.category, true) + && compareValues(lastOccurence, o.lastOccurence, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (onset == null || onset.isEmpty()) + && (recordedDate == null || recordedDate.isEmpty()) && (recorder == null || recorder.isEmpty()) + && (patient == null || patient.isEmpty()) && (reporter == null || reporter.isEmpty()) && (substance == null || substance.isEmpty()) + && (status == null || status.isEmpty()) && (criticality == null || criticality.isEmpty()) + && (type == null || type.isEmpty()) && (category == null || category.isEmpty()) && (lastOccurence == null || lastOccurence.isEmpty()) + && (note == null || note.isEmpty()) && (reaction == null || reaction.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.AllergyIntolerance; + } + + @SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="mild | moderate | severe (of event as a whole)", type="token" ) + public static final String SP_SEVERITY = "severity"; + @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External ids for this item", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.reaction.manifestation", description="Clinical symptoms/signs associated with the Event", type="token" ) + public static final String SP_MANIFESTATION = "manifestation"; + @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" ) + public static final String SP_RECORDER = "recorder"; + @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance|AllergyIntolerance.reaction.substance", description="Substance, (or class) considered to be responsible for risk", type="token" ) + public static final String SP_SUBSTANCE = "substance"; + @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="CRITL | CRITH | CRITU", type="token" ) + public static final String SP_CRITICALITY = "criticality"; + @SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference" ) + public static final String SP_REPORTER = "reporter"; + @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="allergy | intolerance - Underlying mechanism (if known)", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="Date(/time) when manifestations showed", type="date" ) + public static final String SP_ONSET = "onset"; + @SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="How the subject was exposed to the substance", type="token" ) + public static final String SP_ROUTE = "route"; + @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="Who the sensitivity is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment | other - Category of Substance", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurrence of a reaction", type="date" ) + public static final String SP_LASTDATE = "last-date"; + @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Annotation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Annotation.java new file mode 100644 index 00000000000..9c29902434b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Annotation.java @@ -0,0 +1,311 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A text note which also contains information about who made the statement and when. + */ +@DatatypeDef(name="Annotation") +public class Annotation extends Type implements ICompositeType { + + /** + * The individual responsible for making the annotation. + */ + @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class, StringType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Individual responsible for the annotation", formalDefinition="The individual responsible for making the annotation." ) + protected Type author; + + /** + * Indicates when this particular annotation was made. + */ + @Child(name = "time", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the annotation was made", formalDefinition="Indicates when this particular annotation was made." ) + protected DateTimeType time; + + /** + * The text of the annotation. + */ + @Child(name = "text", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The annotation - text content", formalDefinition="The text of the annotation." ) + protected StringType text; + + private static final long serialVersionUID = -575590381L; + + /* + * Constructor + */ + public Annotation() { + super(); + } + + /* + * Constructor + */ + public Annotation(StringType text) { + super(); + this.text = text; + } + + /** + * @return {@link #author} (The individual responsible for making the annotation.) + */ + public Type getAuthor() { + return this.author; + } + + /** + * @return {@link #author} (The individual responsible for making the annotation.) + */ + public Reference getAuthorReference() throws FHIRException { + if (!(this.author instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.author.getClass().getName()+" was encountered"); + return (Reference) this.author; + } + + public boolean hasAuthorReference() { + return this.author instanceof Reference; + } + + /** + * @return {@link #author} (The individual responsible for making the annotation.) + */ + public StringType getAuthorStringType() throws FHIRException { + if (!(this.author instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.author.getClass().getName()+" was encountered"); + return (StringType) this.author; + } + + public boolean hasAuthorStringType() { + return this.author instanceof StringType; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (The individual responsible for making the annotation.) + */ + public Annotation setAuthor(Type value) { + this.author = value; + return this; + } + + /** + * @return {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public DateTimeType getTimeElement() { + if (this.time == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Annotation.time"); + else if (Configuration.doAutoCreate()) + this.time = new DateTimeType(); // bb + return this.time; + } + + public boolean hasTimeElement() { + return this.time != null && !this.time.isEmpty(); + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public Annotation setTimeElement(DateTimeType value) { + this.time = value; + return this; + } + + /** + * @return Indicates when this particular annotation was made. + */ + public Date getTime() { + return this.time == null ? null : this.time.getValue(); + } + + /** + * @param value Indicates when this particular annotation was made. + */ + public Annotation setTime(Date value) { + if (value == null) + this.time = null; + else { + if (this.time == null) + this.time = new DateTimeType(); + this.time.setValue(value); + } + return this; + } + + /** + * @return {@link #text} (The text of the annotation.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Annotation.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (The text of the annotation.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public Annotation setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return The text of the annotation. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value The text of the annotation. + */ + public Annotation setText(String value) { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson)|string", "The individual responsible for making the annotation.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("time", "dateTime", "Indicates when this particular annotation was made.", 0, java.lang.Integer.MAX_VALUE, time)); + childrenList.add(new Property("text", "string", "The text of the annotation.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("author[x]")) + this.author = (Type) value; // Type + else if (name.equals("time")) + this.time = castToDateTime(value); // DateTimeType + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("authorReference")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("authorString")) { + this.author = new StringType(); + return this.author; + } + else if (name.equals("time")) { + throw new FHIRException("Cannot call addChild on a primitive type Annotation.time"); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type Annotation.text"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Annotation"; + + } + + public Annotation copy() { + Annotation dst = new Annotation(); + copyValues(dst); + dst.author = author == null ? null : author.copy(); + dst.time = time == null ? null : time.copy(); + dst.text = text == null ? null : text.copy(); + return dst; + } + + protected Annotation typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Annotation)) + return false; + Annotation o = (Annotation) other; + return compareDeep(author, o.author, true) && compareDeep(time, o.time, true) && compareDeep(text, o.text, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Annotation)) + return false; + Annotation o = (Annotation) other; + return compareValues(time, o.time, true) && compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (author == null || author.isEmpty()) && (time == null || time.isEmpty()) + && (text == null || text.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Appointment.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Appointment.java new file mode 100644 index 00000000000..921fb402c19 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Appointment.java @@ -0,0 +1,1556 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ +@ResourceDef(name="Appointment", profile="http://hl7.org/fhir/Profile/Appointment") +public class Appointment extends DomainResource { + + public enum AppointmentStatus { + /** + * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time may not be set yet. + */ + PROPOSED, + /** + * Some or all of the participant(s) have not finalized their acceptance of the appointment request. + */ + PENDING, + /** + * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. + */ + BOOKED, + /** + * Some of the patients have arrived. + */ + ARRIVED, + /** + * This appointment has completed and may have resulted in an encounter. + */ + FULFILLED, + /** + * The appointment has been cancelled. + */ + CANCELLED, + /** + * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). + */ + NOSHOW, + /** + * added to help the parsers + */ + NULL; + public static AppointmentStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("pending".equals(codeString)) + return PENDING; + if ("booked".equals(codeString)) + return BOOKED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("fulfilled".equals(codeString)) + return FULFILLED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("noshow".equals(codeString)) + return NOSHOW; + throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PENDING: return "pending"; + case BOOKED: return "booked"; + case ARRIVED: return "arrived"; + case FULFILLED: return "fulfilled"; + case CANCELLED: return "cancelled"; + case NOSHOW: return "noshow"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/appointmentstatus"; + case PENDING: return "http://hl7.org/fhir/appointmentstatus"; + case BOOKED: return "http://hl7.org/fhir/appointmentstatus"; + case ARRIVED: return "http://hl7.org/fhir/appointmentstatus"; + case FULFILLED: return "http://hl7.org/fhir/appointmentstatus"; + case CANCELLED: return "http://hl7.org/fhir/appointmentstatus"; + case NOSHOW: return "http://hl7.org/fhir/appointmentstatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time may not be set yet."; + case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; + case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; + case ARRIVED: return "Some of the patients have arrived."; + case FULFILLED: return "This appointment has completed and may have resulted in an encounter."; + case CANCELLED: return "The appointment has been cancelled."; + case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PENDING: return "Pending"; + case BOOKED: return "Booked"; + case ARRIVED: return "Arrived"; + case FULFILLED: return "Fulfilled"; + case CANCELLED: return "Cancelled"; + case NOSHOW: return "No Show"; + default: return "?"; + } + } + } + + public static class AppointmentStatusEnumFactory implements EnumFactory { + public AppointmentStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return AppointmentStatus.PROPOSED; + if ("pending".equals(codeString)) + return AppointmentStatus.PENDING; + if ("booked".equals(codeString)) + return AppointmentStatus.BOOKED; + if ("arrived".equals(codeString)) + return AppointmentStatus.ARRIVED; + if ("fulfilled".equals(codeString)) + return AppointmentStatus.FULFILLED; + if ("cancelled".equals(codeString)) + return AppointmentStatus.CANCELLED; + if ("noshow".equals(codeString)) + return AppointmentStatus.NOSHOW; + throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, AppointmentStatus.PROPOSED); + if ("pending".equals(codeString)) + return new Enumeration(this, AppointmentStatus.PENDING); + if ("booked".equals(codeString)) + return new Enumeration(this, AppointmentStatus.BOOKED); + if ("arrived".equals(codeString)) + return new Enumeration(this, AppointmentStatus.ARRIVED); + if ("fulfilled".equals(codeString)) + return new Enumeration(this, AppointmentStatus.FULFILLED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, AppointmentStatus.CANCELLED); + if ("noshow".equals(codeString)) + return new Enumeration(this, AppointmentStatus.NOSHOW); + throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public String toCode(AppointmentStatus code) { + if (code == AppointmentStatus.PROPOSED) + return "proposed"; + if (code == AppointmentStatus.PENDING) + return "pending"; + if (code == AppointmentStatus.BOOKED) + return "booked"; + if (code == AppointmentStatus.ARRIVED) + return "arrived"; + if (code == AppointmentStatus.FULFILLED) + return "fulfilled"; + if (code == AppointmentStatus.CANCELLED) + return "cancelled"; + if (code == AppointmentStatus.NOSHOW) + return "noshow"; + return "?"; + } + } + + public enum ParticipantRequired { + /** + * The participant is required to attend the appointment. + */ + REQUIRED, + /** + * The participant may optionally attend the appointment. + */ + OPTIONAL, + /** + * The participant is excluded from the appointment, and may not be informed of the appointment taking place. (Appointment is about them, not for them - such as 2 doctors discussing results about a patient's test). + */ + INFORMATIONONLY, + /** + * added to help the parsers + */ + NULL; + public static ParticipantRequired fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return REQUIRED; + if ("optional".equals(codeString)) + return OPTIONAL; + if ("information-only".equals(codeString)) + return INFORMATIONONLY; + throw new FHIRException("Unknown ParticipantRequired code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUIRED: return "required"; + case OPTIONAL: return "optional"; + case INFORMATIONONLY: return "information-only"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REQUIRED: return "http://hl7.org/fhir/participantrequired"; + case OPTIONAL: return "http://hl7.org/fhir/participantrequired"; + case INFORMATIONONLY: return "http://hl7.org/fhir/participantrequired"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REQUIRED: return "The participant is required to attend the appointment."; + case OPTIONAL: return "The participant may optionally attend the appointment."; + case INFORMATIONONLY: return "The participant is excluded from the appointment, and may not be informed of the appointment taking place. (Appointment is about them, not for them - such as 2 doctors discussing results about a patient's test)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUIRED: return "Required"; + case OPTIONAL: return "Optional"; + case INFORMATIONONLY: return "Information Only"; + default: return "?"; + } + } + } + + public static class ParticipantRequiredEnumFactory implements EnumFactory { + public ParticipantRequired fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return ParticipantRequired.REQUIRED; + if ("optional".equals(codeString)) + return ParticipantRequired.OPTIONAL; + if ("information-only".equals(codeString)) + return ParticipantRequired.INFORMATIONONLY; + throw new IllegalArgumentException("Unknown ParticipantRequired code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return new Enumeration(this, ParticipantRequired.REQUIRED); + if ("optional".equals(codeString)) + return new Enumeration(this, ParticipantRequired.OPTIONAL); + if ("information-only".equals(codeString)) + return new Enumeration(this, ParticipantRequired.INFORMATIONONLY); + throw new FHIRException("Unknown ParticipantRequired code '"+codeString+"'"); + } + public String toCode(ParticipantRequired code) { + if (code == ParticipantRequired.REQUIRED) + return "required"; + if (code == ParticipantRequired.OPTIONAL) + return "optional"; + if (code == ParticipantRequired.INFORMATIONONLY) + return "information-only"; + return "?"; + } + } + + public enum ParticipationStatus { + /** + * The participant has accepted the appointment. + */ + ACCEPTED, + /** + * The participant has declined the appointment and will not participate in the appointment. + */ + DECLINED, + /** + * The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur. + */ + TENTATIVE, + /** + * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses. + */ + NEEDSACTION, + /** + * added to help the parsers + */ + NULL; + public static ParticipationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("declined".equals(codeString)) + return DECLINED; + if ("tentative".equals(codeString)) + return TENTATIVE; + if ("needs-action".equals(codeString)) + return NEEDSACTION; + throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCEPTED: return "accepted"; + case DECLINED: return "declined"; + case TENTATIVE: return "tentative"; + case NEEDSACTION: return "needs-action"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACCEPTED: return "http://hl7.org/fhir/participationstatus"; + case DECLINED: return "http://hl7.org/fhir/participationstatus"; + case TENTATIVE: return "http://hl7.org/fhir/participationstatus"; + case NEEDSACTION: return "http://hl7.org/fhir/participationstatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACCEPTED: return "The participant has accepted the appointment."; + case DECLINED: return "The participant has declined the appointment and will not participate in the appointment."; + case TENTATIVE: return "The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur."; + case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCEPTED: return "Accepted"; + case DECLINED: return "Declined"; + case TENTATIVE: return "Tentative"; + case NEEDSACTION: return "Needs Action"; + default: return "?"; + } + } + } + + public static class ParticipationStatusEnumFactory implements EnumFactory { + public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ParticipationStatus.ACCEPTED; + if ("declined".equals(codeString)) + return ParticipationStatus.DECLINED; + if ("tentative".equals(codeString)) + return ParticipationStatus.TENTATIVE; + if ("needs-action".equals(codeString)) + return ParticipationStatus.NEEDSACTION; + throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return new Enumeration(this, ParticipationStatus.ACCEPTED); + if ("declined".equals(codeString)) + return new Enumeration(this, ParticipationStatus.DECLINED); + if ("tentative".equals(codeString)) + return new Enumeration(this, ParticipationStatus.TENTATIVE); + if ("needs-action".equals(codeString)) + return new Enumeration(this, ParticipationStatus.NEEDSACTION); + throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public String toCode(ParticipationStatus code) { + if (code == ParticipationStatus.ACCEPTED) + return "accepted"; + if (code == ParticipationStatus.DECLINED) + return "declined"; + if (code == ParticipationStatus.TENTATIVE) + return "tentative"; + if (code == ParticipationStatus.NEEDSACTION) + return "needs-action"; + return "?"; + } + } + + @Block() + public static class AppointmentParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of participant in the appointment. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) + protected List type; + + /** + * A Person, Location/HealthcareService or Device that is participating in the appointment. + */ + @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Person, Location/HealthcareService or Device", formalDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + protected Resource actorTarget; + + /** + * Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present. + */ + @Child(name = "required", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="required | optional | information-only", formalDefinition="Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present." ) + protected Enumeration required; + + /** + * Participation status of the Patient. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="accepted | declined | tentative | needs-action", formalDefinition="Participation status of the Patient." ) + protected Enumeration status; + + private static final long serialVersionUID = -1620552507L; + + /* + * Constructor + */ + public AppointmentParticipantComponent() { + super(); + } + + /* + * Constructor + */ + public AppointmentParticipantComponent(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #type} (Role of participant in the appointment.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Role of participant in the appointment.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public AppointmentParticipantComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentParticipantComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public AppointmentParticipantComponent setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public AppointmentParticipantComponent setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + /** + * @return {@link #required} (Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public Enumeration getRequiredElement() { + if (this.required == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentParticipantComponent.required"); + else if (Configuration.doAutoCreate()) + this.required = new Enumeration(new ParticipantRequiredEnumFactory()); // bb + return this.required; + } + + public boolean hasRequiredElement() { + return this.required != null && !this.required.isEmpty(); + } + + public boolean hasRequired() { + return this.required != null && !this.required.isEmpty(); + } + + /** + * @param value {@link #required} (Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public AppointmentParticipantComponent setRequiredElement(Enumeration value) { + this.required = value; + return this; + } + + /** + * @return Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present. + */ + public ParticipantRequired getRequired() { + return this.required == null ? null : this.required.getValue(); + } + + /** + * @param value Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present. + */ + public AppointmentParticipantComponent setRequired(ParticipantRequired value) { + if (value == null) + this.required = null; + else { + if (this.required == null) + this.required = new Enumeration(new ParticipantRequiredEnumFactory()); + this.required.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (Participation status of the Patient.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentParticipantComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ParticipationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Participation status of the Patient.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public AppointmentParticipantComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Participation status of the Patient. + */ + public ParticipationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Participation status of the Patient. + */ + public AppointmentParticipantComponent setStatus(ParticipationStatus value) { + if (this.status == null) + this.status = new Enumeration(new ParticipationStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "A Person, Location/HealthcareService or Device that is participating in the appointment.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("required", "code", "Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("status", "code", "Participation status of the Patient.", 0, java.lang.Integer.MAX_VALUE, status)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else if (name.equals("required")) + this.required = new ParticipantRequiredEnumFactory().fromType(value); // Enumeration + else if (name.equals("status")) + this.status = new ParticipationStatusEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("required")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.required"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); + } + else + return super.addChild(name); + } + + public AppointmentParticipantComponent copy() { + AppointmentParticipantComponent dst = new AppointmentParticipantComponent(); + copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.actor = actor == null ? null : actor.copy(); + dst.required = required == null ? null : required.copy(); + dst.status = status == null ? null : status.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AppointmentParticipantComponent)) + return false; + AppointmentParticipantComponent o = (AppointmentParticipantComponent) other; + return compareDeep(type, o.type, true) && compareDeep(actor, o.actor, true) && compareDeep(required, o.required, true) + && compareDeep(status, o.status, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AppointmentParticipantComponent)) + return false; + AppointmentParticipantComponent o = (AppointmentParticipantComponent) other; + return compareValues(required, o.required, true) && compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (actor == null || actor.isEmpty()) + && (required == null || required.isEmpty()) && (status == null || status.isEmpty()); + } + + public String fhirType() { + return "Appointment.participant"; + + } + + } + + /** + * This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | pending | booked | arrived | fulfilled | cancelled | noshow", formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." ) + protected Enumeration status; + + /** + * The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService). + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of appointment that is being booked", formalDefinition="The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService)." ) + protected CodeableConcept type; + + /** + * The reason that this appointment is being scheduled. This is more clinical than administrative. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason this appointment is scheduled", formalDefinition="The reason that this appointment is being scheduled. This is more clinical than administrative." ) + protected CodeableConcept reason; + + /** + * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority). + */ + @Child(name = "priority", type = {UnsignedIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Used to make informed decisions if needing to re-prioritize", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)." ) + protected UnsignedIntType priority; + + /** + * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Shown on a subject line in a meeting request, or appointment list", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." ) + protected StringType description; + + /** + * Date/Time that the appointment is to take place. + */ + @Child(name = "start", type = {InstantType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) + protected InstantType start; + + /** + * Date/Time that the appointment is to conclude. + */ + @Child(name = "end", type = {InstantType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) + protected InstantType end; + + /** + * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request). + */ + @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Can be less than start/end (e.g. estimate)", formalDefinition="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)." ) + protected PositiveIntType minutesDuration; + + /** + * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot. + */ + @Child(name = "slot", type = {Slot.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="If provided, then no schedule and start/end values MUST match slot", formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot." ) + protected List slot; + /** + * The actual objects that are the target of the reference (The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.) + */ + protected List slotTarget; + + + /** + * Additional comments about the appointment. + */ + @Child(name = "comment", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional comments", formalDefinition="Additional comments about the appointment." ) + protected StringType comment; + + /** + * List of participants involved in the appointment. + */ + @Child(name = "participant", type = {}, order=11, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Participants involved in appointment", formalDefinition="List of participants involved in the appointment." ) + protected List participant; + + private static final long serialVersionUID = -1403944125L; + + /* + * Constructor + */ + public Appointment() { + super(); + } + + /* + * Constructor + */ + public Appointment(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Appointment addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new AppointmentStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Appointment setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. + */ + public AppointmentStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. + */ + public Appointment setStatus(AppointmentStatus value) { + if (this.status == null) + this.status = new Enumeration(new AppointmentStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).) + */ + public Appointment setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #reason} (The reason that this appointment is being scheduled. This is more clinical than administrative.) + */ + public CodeableConcept getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new CodeableConcept(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (The reason that this appointment is being scheduled. This is more clinical than administrative.) + */ + public Appointment setReason(CodeableConcept value) { + this.reason = value; + return this; + } + + /** + * @return {@link #priority} (The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public UnsignedIntType getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new UnsignedIntType(); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Appointment setPriorityElement(UnsignedIntType value) { + this.priority = value; + return this; + } + + /** + * @return The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority). + */ + public int getPriority() { + return this.priority == null || this.priority.isEmpty() ? 0 : this.priority.getValue(); + } + + /** + * @param value The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority). + */ + public Appointment setPriority(int value) { + if (this.priority == null) + this.priority = new UnsignedIntType(); + this.priority.setValue(value); + return this; + } + + /** + * @return {@link #description} (The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Appointment setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. + */ + public Appointment setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public InstantType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.start"); + else if (Configuration.doAutoCreate()) + this.start = new InstantType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public Appointment setStartElement(InstantType value) { + this.start = value; + return this; + } + + /** + * @return Date/Time that the appointment is to take place. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value Date/Time that the appointment is to take place. + */ + public Appointment setStart(Date value) { + if (value == null) + this.start = null; + else { + if (this.start == null) + this.start = new InstantType(); + this.start.setValue(value); + } + return this; + } + + /** + * @return {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public InstantType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.end"); + else if (Configuration.doAutoCreate()) + this.end = new InstantType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Appointment setEndElement(InstantType value) { + this.end = value; + return this; + } + + /** + * @return Date/Time that the appointment is to conclude. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value Date/Time that the appointment is to conclude. + */ + public Appointment setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new InstantType(); + this.end.setValue(value); + } + return this; + } + + /** + * @return {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value + */ + public PositiveIntType getMinutesDurationElement() { + if (this.minutesDuration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.minutesDuration"); + else if (Configuration.doAutoCreate()) + this.minutesDuration = new PositiveIntType(); // bb + return this.minutesDuration; + } + + public boolean hasMinutesDurationElement() { + return this.minutesDuration != null && !this.minutesDuration.isEmpty(); + } + + public boolean hasMinutesDuration() { + return this.minutesDuration != null && !this.minutesDuration.isEmpty(); + } + + /** + * @param value {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value + */ + public Appointment setMinutesDurationElement(PositiveIntType value) { + this.minutesDuration = value; + return this; + } + + /** + * @return Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request). + */ + public int getMinutesDuration() { + return this.minutesDuration == null || this.minutesDuration.isEmpty() ? 0 : this.minutesDuration.getValue(); + } + + /** + * @param value Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request). + */ + public Appointment setMinutesDuration(int value) { + if (this.minutesDuration == null) + this.minutesDuration = new PositiveIntType(); + this.minutesDuration.setValue(value); + return this; + } + + /** + * @return {@link #slot} (The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.) + */ + public List getSlot() { + if (this.slot == null) + this.slot = new ArrayList(); + return this.slot; + } + + public boolean hasSlot() { + if (this.slot == null) + return false; + for (Reference item : this.slot) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #slot} (The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.) + */ + // syntactic sugar + public Reference addSlot() { //3 + Reference t = new Reference(); + if (this.slot == null) + this.slot = new ArrayList(); + this.slot.add(t); + return t; + } + + // syntactic sugar + public Appointment addSlot(Reference t) { //3 + if (t == null) + return this; + if (this.slot == null) + this.slot = new ArrayList(); + this.slot.add(t); + return this; + } + + /** + * @return {@link #slot} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.) + */ + public List getSlotTarget() { + if (this.slotTarget == null) + this.slotTarget = new ArrayList(); + return this.slotTarget; + } + + // syntactic sugar + /** + * @return {@link #slot} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.) + */ + public Slot addSlotTarget() { + Slot r = new Slot(); + if (this.slotTarget == null) + this.slotTarget = new ArrayList(); + this.slotTarget.add(r); + return r; + } + + /** + * @return {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public Appointment setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return Additional comments about the appointment. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value Additional comments about the appointment. + */ + public Appointment setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + /** + * @return {@link #participant} (List of participants involved in the appointment.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (AppointmentParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (List of participants involved in the appointment.) + */ + // syntactic sugar + public AppointmentParticipantComponent addParticipant() { //3 + AppointmentParticipantComponent t = new AppointmentParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public Appointment addParticipant(AppointmentParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("type", "CodeableConcept", "The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("reason", "CodeableConcept", "The reason that this appointment is being scheduled. This is more clinical than administrative.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("priority", "unsignedInt", "The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("description", "string", "The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, java.lang.Integer.MAX_VALUE, end)); + childrenList.add(new Property("minutesDuration", "positiveInt", "Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).", 0, java.lang.Integer.MAX_VALUE, minutesDuration)); + childrenList.add(new Property("slot", "Reference(Slot)", "The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.", 0, java.lang.Integer.MAX_VALUE, slot)); + childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment)); + childrenList.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new AppointmentStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("reason")) + this.reason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("priority")) + this.priority = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("start")) + this.start = castToInstant(value); // InstantType + else if (name.equals("end")) + this.end = castToInstant(value); // InstantType + else if (name.equals("minutesDuration")) + this.minutesDuration = castToPositiveInt(value); // PositiveIntType + else if (name.equals("slot")) + this.getSlot().add(castToReference(value)); + else if (name.equals("comment")) + this.comment = castToString(value); // StringType + else if (name.equals("participant")) + this.getParticipant().add((AppointmentParticipantComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("reason")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.priority"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.description"); + } + else if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.end"); + } + else if (name.equals("minutesDuration")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.minutesDuration"); + } + else if (name.equals("slot")) { + return addSlot(); + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.comment"); + } + else if (name.equals("participant")) { + return addParticipant(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Appointment"; + + } + + public Appointment copy() { + Appointment dst = new Appointment(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.type = type == null ? null : type.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.priority = priority == null ? null : priority.copy(); + dst.description = description == null ? null : description.copy(); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + dst.minutesDuration = minutesDuration == null ? null : minutesDuration.copy(); + if (slot != null) { + dst.slot = new ArrayList(); + for (Reference i : slot) + dst.slot.add(i.copy()); + }; + dst.comment = comment == null ? null : comment.copy(); + if (participant != null) { + dst.participant = new ArrayList(); + for (AppointmentParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + return dst; + } + + protected Appointment typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Appointment)) + return false; + Appointment o = (Appointment) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) + && compareDeep(reason, o.reason, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true) + && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true) + && compareDeep(slot, o.slot, true) && compareDeep(comment, o.comment, true) && compareDeep(participant, o.participant, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Appointment)) + return false; + Appointment o = (Appointment) other; + return compareValues(status, o.status, true) && compareValues(priority, o.priority, true) && compareValues(description, o.description, true) + && compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(minutesDuration, o.minutesDuration, true) + && compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) && (priority == null || priority.isEmpty()) + && (description == null || description.isEmpty()) && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) + && (minutesDuration == null || minutesDuration.isEmpty()) && (slot == null || slot.isEmpty()) + && (comment == null || comment.isEmpty()) && (participant == null || participant.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Appointment; + } + + @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="practitioner", path="Appointment.participant.actor", description="One of the individuals of the appointment is this practitioner", type="reference" ) + public static final String SP_PRACTITIONER = "practitioner"; + @SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" ) + public static final String SP_PARTSTATUS = "part-status"; + @SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="location", path="Appointment.participant.actor", description="This location is listed in the participants of the appointment", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AppointmentResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AppointmentResponse.java new file mode 100644 index 00000000000..9dd694c41ff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AppointmentResponse.java @@ -0,0 +1,786 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ +@ResourceDef(name="AppointmentResponse", profile="http://hl7.org/fhir/Profile/AppointmentResponse") +public class AppointmentResponse extends DomainResource { + + public enum ParticipantStatus { + /** + * The appointment participant has accepted that they can attend the appointment at the time specified in the AppointmentResponse. + */ + ACCEPTED, + /** + * The appointment participant has declined the appointment. + */ + DECLINED, + /** + * The appointment participant has tentatively accepted the appointment. + */ + TENTATIVE, + /** + * The participant has in-process the appointment. + */ + INPROCESS, + /** + * The participant has completed the appointment. + */ + COMPLETED, + /** + * This is the intitial status of an appointment participant until a participant has replied. It implies that there is no commitment for the appointment. + */ + NEEDSACTION, + /** + * added to help the parsers + */ + NULL; + public static ParticipantStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("declined".equals(codeString)) + return DECLINED; + if ("tentative".equals(codeString)) + return TENTATIVE; + if ("in-process".equals(codeString)) + return INPROCESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("needs-action".equals(codeString)) + return NEEDSACTION; + throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCEPTED: return "accepted"; + case DECLINED: return "declined"; + case TENTATIVE: return "tentative"; + case INPROCESS: return "in-process"; + case COMPLETED: return "completed"; + case NEEDSACTION: return "needs-action"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACCEPTED: return "http://hl7.org/fhir/participantstatus"; + case DECLINED: return "http://hl7.org/fhir/participantstatus"; + case TENTATIVE: return "http://hl7.org/fhir/participantstatus"; + case INPROCESS: return "http://hl7.org/fhir/participantstatus"; + case COMPLETED: return "http://hl7.org/fhir/participantstatus"; + case NEEDSACTION: return "http://hl7.org/fhir/participantstatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACCEPTED: return "The appointment participant has accepted that they can attend the appointment at the time specified in the AppointmentResponse."; + case DECLINED: return "The appointment participant has declined the appointment."; + case TENTATIVE: return "The appointment participant has tentatively accepted the appointment."; + case INPROCESS: return "The participant has in-process the appointment."; + case COMPLETED: return "The participant has completed the appointment."; + case NEEDSACTION: return "This is the intitial status of an appointment participant until a participant has replied. It implies that there is no commitment for the appointment."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCEPTED: return "Accepted"; + case DECLINED: return "Declined"; + case TENTATIVE: return "Tentative"; + case INPROCESS: return "In Process"; + case COMPLETED: return "Completed"; + case NEEDSACTION: return "Needs Action"; + default: return "?"; + } + } + } + + public static class ParticipantStatusEnumFactory implements EnumFactory { + public ParticipantStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ParticipantStatus.ACCEPTED; + if ("declined".equals(codeString)) + return ParticipantStatus.DECLINED; + if ("tentative".equals(codeString)) + return ParticipantStatus.TENTATIVE; + if ("in-process".equals(codeString)) + return ParticipantStatus.INPROCESS; + if ("completed".equals(codeString)) + return ParticipantStatus.COMPLETED; + if ("needs-action".equals(codeString)) + return ParticipantStatus.NEEDSACTION; + throw new IllegalArgumentException("Unknown ParticipantStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return new Enumeration(this, ParticipantStatus.ACCEPTED); + if ("declined".equals(codeString)) + return new Enumeration(this, ParticipantStatus.DECLINED); + if ("tentative".equals(codeString)) + return new Enumeration(this, ParticipantStatus.TENTATIVE); + if ("in-process".equals(codeString)) + return new Enumeration(this, ParticipantStatus.INPROCESS); + if ("completed".equals(codeString)) + return new Enumeration(this, ParticipantStatus.COMPLETED); + if ("needs-action".equals(codeString)) + return new Enumeration(this, ParticipantStatus.NEEDSACTION); + throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'"); + } + public String toCode(ParticipantStatus code) { + if (code == ParticipantStatus.ACCEPTED) + return "accepted"; + if (code == ParticipantStatus.DECLINED) + return "declined"; + if (code == ParticipantStatus.TENTATIVE) + return "tentative"; + if (code == ParticipantStatus.INPROCESS) + return "in-process"; + if (code == ParticipantStatus.COMPLETED) + return "completed"; + if (code == ParticipantStatus.NEEDSACTION) + return "needs-action"; + return "?"; + } + } + + /** + * This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) + protected List identifier; + + /** + * Appointment that this response is replying to. + */ + @Child(name = "appointment", type = {Appointment.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Appointment this response relates to", formalDefinition="Appointment that this response is replying to." ) + protected Reference appointment; + + /** + * The actual object that is the target of the reference (Appointment that this response is replying to.) + */ + protected Appointment appointmentTarget; + + /** + * Date/Time that the appointment is to take place, or requested new start time. + */ + @Child(name = "start", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time from appointment, or requested new start time", formalDefinition="Date/Time that the appointment is to take place, or requested new start time." ) + protected InstantType start; + + /** + * This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. + */ + @Child(name = "end", type = {InstantType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time from appointment, or requested new end time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time." ) + protected InstantType end; + + /** + * Role of participant in the appointment. + */ + @Child(name = "participantType", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) + protected List participantType; + + /** + * A Person, Location/HealthcareService or Device that is participating in the appointment. + */ + @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Person, Location/HealthcareService or Device", formalDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + protected Resource actorTarget; + + /** + * Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. + */ + @Child(name = "participantStatus", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty." ) + protected Enumeration participantStatus; + + /** + * Additional comments about the appointment. + */ + @Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional comments", formalDefinition="Additional comments about the appointment." ) + protected StringType comment; + + private static final long serialVersionUID = 248548635L; + + /* + * Constructor + */ + public AppointmentResponse() { + super(); + } + + /* + * Constructor + */ + public AppointmentResponse(Reference appointment, Enumeration participantStatus) { + super(); + this.appointment = appointment; + this.participantStatus = participantStatus; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public AppointmentResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #appointment} (Appointment that this response is replying to.) + */ + public Reference getAppointment() { + if (this.appointment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.appointment"); + else if (Configuration.doAutoCreate()) + this.appointment = new Reference(); // cc + return this.appointment; + } + + public boolean hasAppointment() { + return this.appointment != null && !this.appointment.isEmpty(); + } + + /** + * @param value {@link #appointment} (Appointment that this response is replying to.) + */ + public AppointmentResponse setAppointment(Reference value) { + this.appointment = value; + return this; + } + + /** + * @return {@link #appointment} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Appointment that this response is replying to.) + */ + public Appointment getAppointmentTarget() { + if (this.appointmentTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.appointment"); + else if (Configuration.doAutoCreate()) + this.appointmentTarget = new Appointment(); // aa + return this.appointmentTarget; + } + + /** + * @param value {@link #appointment} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Appointment that this response is replying to.) + */ + public AppointmentResponse setAppointmentTarget(Appointment value) { + this.appointmentTarget = value; + return this; + } + + /** + * @return {@link #start} (Date/Time that the appointment is to take place, or requested new start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public InstantType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.start"); + else if (Configuration.doAutoCreate()) + this.start = new InstantType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Date/Time that the appointment is to take place, or requested new start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public AppointmentResponse setStartElement(InstantType value) { + this.start = value; + return this; + } + + /** + * @return Date/Time that the appointment is to take place, or requested new start time. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value Date/Time that the appointment is to take place, or requested new start time. + */ + public AppointmentResponse setStart(Date value) { + if (value == null) + this.start = null; + else { + if (this.start == null) + this.start = new InstantType(); + this.start.setValue(value); + } + return this; + } + + /** + * @return {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public InstantType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.end"); + else if (Configuration.doAutoCreate()) + this.end = new InstantType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public AppointmentResponse setEndElement(InstantType value) { + this.end = value; + return this; + } + + /** + * @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. + */ + public AppointmentResponse setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new InstantType(); + this.end.setValue(value); + } + return this; + } + + /** + * @return {@link #participantType} (Role of participant in the appointment.) + */ + public List getParticipantType() { + if (this.participantType == null) + this.participantType = new ArrayList(); + return this.participantType; + } + + public boolean hasParticipantType() { + if (this.participantType == null) + return false; + for (CodeableConcept item : this.participantType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participantType} (Role of participant in the appointment.) + */ + // syntactic sugar + public CodeableConcept addParticipantType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.participantType == null) + this.participantType = new ArrayList(); + this.participantType.add(t); + return t; + } + + // syntactic sugar + public AppointmentResponse addParticipantType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.participantType == null) + this.participantType = new ArrayList(); + this.participantType.add(t); + return this; + } + + /** + * @return {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public AppointmentResponse setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) + */ + public AppointmentResponse setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + /** + * @return {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value + */ + public Enumeration getParticipantStatusElement() { + if (this.participantStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.participantStatus"); + else if (Configuration.doAutoCreate()) + this.participantStatus = new Enumeration(new ParticipantStatusEnumFactory()); // bb + return this.participantStatus; + } + + public boolean hasParticipantStatusElement() { + return this.participantStatus != null && !this.participantStatus.isEmpty(); + } + + public boolean hasParticipantStatus() { + return this.participantStatus != null && !this.participantStatus.isEmpty(); + } + + /** + * @param value {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value + */ + public AppointmentResponse setParticipantStatusElement(Enumeration value) { + this.participantStatus = value; + return this; + } + + /** + * @return Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. + */ + public ParticipantStatus getParticipantStatus() { + return this.participantStatus == null ? null : this.participantStatus.getValue(); + } + + /** + * @param value Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. + */ + public AppointmentResponse setParticipantStatus(ParticipantStatus value) { + if (this.participantStatus == null) + this.participantStatus = new Enumeration(new ParticipantStatusEnumFactory()); + this.participantStatus.setValue(value); + return this; + } + + /** + * @return {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentResponse.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public AppointmentResponse setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return Additional comments about the appointment. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value Additional comments about the appointment. + */ + public AppointmentResponse setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("appointment", "Reference(Appointment)", "Appointment that this response is replying to.", 0, java.lang.Integer.MAX_VALUE, appointment)); + childrenList.add(new Property("start", "instant", "Date/Time that the appointment is to take place, or requested new start time.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.", 0, java.lang.Integer.MAX_VALUE, end)); + childrenList.add(new Property("participantType", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, participantType)); + childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "A Person, Location/HealthcareService or Device that is participating in the appointment.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("participantStatus", "code", "Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.", 0, java.lang.Integer.MAX_VALUE, participantStatus)); + childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("appointment")) + this.appointment = castToReference(value); // Reference + else if (name.equals("start")) + this.start = castToInstant(value); // InstantType + else if (name.equals("end")) + this.end = castToInstant(value); // InstantType + else if (name.equals("participantType")) + this.getParticipantType().add(castToCodeableConcept(value)); + else if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else if (name.equals("participantStatus")) + this.participantStatus = new ParticipantStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("comment")) + this.comment = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("appointment")) { + this.appointment = new Reference(); + return this.appointment; + } + else if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.end"); + } + else if (name.equals("participantType")) { + return addParticipantType(); + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("participantStatus")) { + throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.participantStatus"); + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.comment"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "AppointmentResponse"; + + } + + public AppointmentResponse copy() { + AppointmentResponse dst = new AppointmentResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.appointment = appointment == null ? null : appointment.copy(); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + if (participantType != null) { + dst.participantType = new ArrayList(); + for (CodeableConcept i : participantType) + dst.participantType.add(i.copy()); + }; + dst.actor = actor == null ? null : actor.copy(); + dst.participantStatus = participantStatus == null ? null : participantStatus.copy(); + dst.comment = comment == null ? null : comment.copy(); + return dst; + } + + protected AppointmentResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AppointmentResponse)) + return false; + AppointmentResponse o = (AppointmentResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(appointment, o.appointment, true) + && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(participantType, o.participantType, true) + && compareDeep(actor, o.actor, true) && compareDeep(participantStatus, o.participantStatus, true) + && compareDeep(comment, o.comment, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AppointmentResponse)) + return false; + AppointmentResponse o = (AppointmentResponse) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(participantStatus, o.participantStatus, true) + && compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (appointment == null || appointment.isEmpty()) + && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (participantType == null || participantType.isEmpty()) + && (actor == null || actor.isEmpty()) && (participantStatus == null || participantStatus.isEmpty()) + && (comment == null || comment.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.AppointmentResponse; + } + + @SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="identifier", path="AppointmentResponse.identifier", description="An Identifier in this appointment response", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="practitioner", path="AppointmentResponse.actor", description="This Response is for this Practitioner", type="reference" ) + public static final String SP_PRACTITIONER = "practitioner"; + @SearchParamDefinition(name="part-status", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token" ) + public static final String SP_PARTSTATUS = "part-status"; + @SearchParamDefinition(name="patient", path="AppointmentResponse.actor", description="This Response is for this Patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference" ) + public static final String SP_APPOINTMENT = "appointment"; + @SearchParamDefinition(name="location", path="AppointmentResponse.actor", description="This Response is for this Location", type="reference" ) + public static final String SP_LOCATION = "location"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Attachment.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Attachment.java new file mode 100644 index 00000000000..7c0798eb973 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Attachment.java @@ -0,0 +1,625 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * For referring to data content defined in other formats. + */ +@DatatypeDef(name="Attachment") +public class Attachment extends Type implements ICompositeType { + + /** + * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + @Child(name = "contentType", type = {CodeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." ) + protected CodeType contentType; + + /** + * The human language of the content. The value can be any valid value according to BCP 47. + */ + @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language of the content (BCP-47)", formalDefinition="The human language of the content. The value can be any valid value according to BCP 47." ) + protected CodeType language; + + /** + * The actual data of the attachment - a sequence of bytes. In XML, represented using base64. + */ + @Child(name = "data", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Data inline, base64ed", formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." ) + protected Base64BinaryType data; + + /** + * An alternative location where the data can be accessed. + */ + @Child(name = "url", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Uri where the data can be found", formalDefinition="An alternative location where the data can be accessed." ) + protected UriType url; + + /** + * The number of bytes of data that make up this attachment. + */ + @Child(name = "size", type = {UnsignedIntType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." ) + protected UnsignedIntType size; + + /** + * The calculated hash of the data using SHA-1. Represented using base64. + */ + @Child(name = "hash", type = {Base64BinaryType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Hash of the data (sha-1, base64ed)", formalDefinition="The calculated hash of the data using SHA-1. Represented using base64." ) + protected Base64BinaryType hash; + + /** + * A label or set of text to display in place of the data. + */ + @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." ) + protected StringType title; + + /** + * The date that the attachment was first created. + */ + @Child(name = "creation", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date attachment was first created", formalDefinition="The date that the attachment was first created." ) + protected DateTimeType creation; + + private static final long serialVersionUID = 581007080L; + + /* + * Constructor + */ + public Attachment() { + super(); + } + + /** + * @return {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public CodeType getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new CodeType(); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public Attachment setContentTypeElement(CodeType value) { + this.contentType = value; + return this; + } + + /** + * @return Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + public String getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + public Attachment setContentType(String value) { + if (Utilities.noString(value)) + this.contentType = null; + else { + if (this.contentType == null) + this.contentType = new CodeType(); + this.contentType.setValue(value); + } + return this; + } + + /** + * @return {@link #language} (The human language of the content. The value can be any valid value according to BCP 47.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The human language of the content. The value can be any valid value according to BCP 47.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public Attachment setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The human language of the content. The value can be any valid value according to BCP 47. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The human language of the content. The value can be any valid value according to BCP 47. + */ + public Attachment setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #data} (The actual data of the attachment - a sequence of bytes. In XML, represented using base64.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value + */ + public Base64BinaryType getDataElement() { + if (this.data == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.data"); + else if (Configuration.doAutoCreate()) + this.data = new Base64BinaryType(); // bb + return this.data; + } + + public boolean hasDataElement() { + return this.data != null && !this.data.isEmpty(); + } + + public boolean hasData() { + return this.data != null && !this.data.isEmpty(); + } + + /** + * @param value {@link #data} (The actual data of the attachment - a sequence of bytes. In XML, represented using base64.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value + */ + public Attachment setDataElement(Base64BinaryType value) { + this.data = value; + return this; + } + + /** + * @return The actual data of the attachment - a sequence of bytes. In XML, represented using base64. + */ + public byte[] getData() { + return this.data == null ? null : this.data.getValue(); + } + + /** + * @param value The actual data of the attachment - a sequence of bytes. In XML, represented using base64. + */ + public Attachment setData(byte[] value) { + if (value == null) + this.data = null; + else { + if (this.data == null) + this.data = new Base64BinaryType(); + this.data.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (An alternative location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An alternative location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Attachment setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An alternative location where the data can be accessed. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An alternative location where the data can be accessed. + */ + public Attachment setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value + */ + public UnsignedIntType getSizeElement() { + if (this.size == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.size"); + else if (Configuration.doAutoCreate()) + this.size = new UnsignedIntType(); // bb + return this.size; + } + + public boolean hasSizeElement() { + return this.size != null && !this.size.isEmpty(); + } + + public boolean hasSize() { + return this.size != null && !this.size.isEmpty(); + } + + /** + * @param value {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value + */ + public Attachment setSizeElement(UnsignedIntType value) { + this.size = value; + return this; + } + + /** + * @return The number of bytes of data that make up this attachment. + */ + public int getSize() { + return this.size == null || this.size.isEmpty() ? 0 : this.size.getValue(); + } + + /** + * @param value The number of bytes of data that make up this attachment. + */ + public Attachment setSize(int value) { + if (this.size == null) + this.size = new UnsignedIntType(); + this.size.setValue(value); + return this; + } + + /** + * @return {@link #hash} (The calculated hash of the data using SHA-1. Represented using base64.). This is the underlying object with id, value and extensions. The accessor "getHash" gives direct access to the value + */ + public Base64BinaryType getHashElement() { + if (this.hash == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.hash"); + else if (Configuration.doAutoCreate()) + this.hash = new Base64BinaryType(); // bb + return this.hash; + } + + public boolean hasHashElement() { + return this.hash != null && !this.hash.isEmpty(); + } + + public boolean hasHash() { + return this.hash != null && !this.hash.isEmpty(); + } + + /** + * @param value {@link #hash} (The calculated hash of the data using SHA-1. Represented using base64.). This is the underlying object with id, value and extensions. The accessor "getHash" gives direct access to the value + */ + public Attachment setHashElement(Base64BinaryType value) { + this.hash = value; + return this; + } + + /** + * @return The calculated hash of the data using SHA-1. Represented using base64. + */ + public byte[] getHash() { + return this.hash == null ? null : this.hash.getValue(); + } + + /** + * @param value The calculated hash of the data using SHA-1. Represented using base64. + */ + public Attachment setHash(byte[] value) { + if (value == null) + this.hash = null; + else { + if (this.hash == null) + this.hash = new Base64BinaryType(); + this.hash.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public Attachment setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return A label or set of text to display in place of the data. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value A label or set of text to display in place of the data. + */ + public Attachment setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #creation} (The date that the attachment was first created.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value + */ + public DateTimeType getCreationElement() { + if (this.creation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Attachment.creation"); + else if (Configuration.doAutoCreate()) + this.creation = new DateTimeType(); // bb + return this.creation; + } + + public boolean hasCreationElement() { + return this.creation != null && !this.creation.isEmpty(); + } + + public boolean hasCreation() { + return this.creation != null && !this.creation.isEmpty(); + } + + /** + * @param value {@link #creation} (The date that the attachment was first created.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value + */ + public Attachment setCreationElement(DateTimeType value) { + this.creation = value; + return this; + } + + /** + * @return The date that the attachment was first created. + */ + public Date getCreation() { + return this.creation == null ? null : this.creation.getValue(); + } + + /** + * @param value The date that the attachment was first created. + */ + public Attachment setCreation(Date value) { + if (value == null) + this.creation = null; + else { + if (this.creation == null) + this.creation = new DateTimeType(); + this.creation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("contentType", "code", "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("language", "code", "The human language of the content. The value can be any valid value according to BCP 47.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("data", "base64Binary", "The actual data of the attachment - a sequence of bytes. In XML, represented using base64.", 0, java.lang.Integer.MAX_VALUE, data)); + childrenList.add(new Property("url", "uri", "An alternative location where the data can be accessed.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("size", "unsignedInt", "The number of bytes of data that make up this attachment.", 0, java.lang.Integer.MAX_VALUE, size)); + childrenList.add(new Property("hash", "base64Binary", "The calculated hash of the data using SHA-1. Represented using base64.", 0, java.lang.Integer.MAX_VALUE, hash)); + childrenList.add(new Property("title", "string", "A label or set of text to display in place of the data.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, java.lang.Integer.MAX_VALUE, creation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("contentType")) + this.contentType = castToCode(value); // CodeType + else if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("data")) + this.data = castToBase64Binary(value); // Base64BinaryType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("size")) + this.size = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("hash")) + this.hash = castToBase64Binary(value); // Base64BinaryType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("creation")) + this.creation = castToDateTime(value); // DateTimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.contentType"); + } + else if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.language"); + } + else if (name.equals("data")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.data"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.url"); + } + else if (name.equals("size")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.size"); + } + else if (name.equals("hash")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.hash"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.title"); + } + else if (name.equals("creation")) { + throw new FHIRException("Cannot call addChild on a primitive type Attachment.creation"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Attachment"; + + } + + public Attachment copy() { + Attachment dst = new Attachment(); + copyValues(dst); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.language = language == null ? null : language.copy(); + dst.data = data == null ? null : data.copy(); + dst.url = url == null ? null : url.copy(); + dst.size = size == null ? null : size.copy(); + dst.hash = hash == null ? null : hash.copy(); + dst.title = title == null ? null : title.copy(); + dst.creation = creation == null ? null : creation.copy(); + return dst; + } + + protected Attachment typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Attachment)) + return false; + Attachment o = (Attachment) other; + return compareDeep(contentType, o.contentType, true) && compareDeep(language, o.language, true) + && compareDeep(data, o.data, true) && compareDeep(url, o.url, true) && compareDeep(size, o.size, true) + && compareDeep(hash, o.hash, true) && compareDeep(title, o.title, true) && compareDeep(creation, o.creation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Attachment)) + return false; + Attachment o = (Attachment) other; + return compareValues(contentType, o.contentType, true) && compareValues(language, o.language, true) + && compareValues(data, o.data, true) && compareValues(url, o.url, true) && compareValues(size, o.size, true) + && compareValues(hash, o.hash, true) && compareValues(title, o.title, true) && compareValues(creation, o.creation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (language == null || language.isEmpty()) + && (data == null || data.isEmpty()) && (url == null || url.isEmpty()) && (size == null || size.isEmpty()) + && (hash == null || hash.isEmpty()) && (title == null || title.isEmpty()) && (creation == null || creation.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AuditEvent.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AuditEvent.java new file mode 100644 index 00000000000..c0441e4d89d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/AuditEvent.java @@ -0,0 +1,3125 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ +@ResourceDef(name="AuditEvent", profile="http://hl7.org/fhir/Profile/AuditEvent") +public class AuditEvent extends DomainResource { + + public enum AuditEventAction { + /** + * Create a new database object, such as placing an order. + */ + C, + /** + * Display or print data, such as a doctor census. + */ + R, + /** + * Update data, such as revise patient information. + */ + U, + /** + * Delete items, such as a doctor master file record. + */ + D, + /** + * Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation. + */ + E, + /** + * added to help the parsers + */ + NULL; + public static AuditEventAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("R".equals(codeString)) + return R; + if ("U".equals(codeString)) + return U; + if ("D".equals(codeString)) + return D; + if ("E".equals(codeString)) + return E; + throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case R: return "R"; + case U: return "U"; + case D: return "D"; + case E: return "E"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case C: return "http://hl7.org/fhir/audit-event-action"; + case R: return "http://hl7.org/fhir/audit-event-action"; + case U: return "http://hl7.org/fhir/audit-event-action"; + case D: return "http://hl7.org/fhir/audit-event-action"; + case E: return "http://hl7.org/fhir/audit-event-action"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case C: return "Create a new database object, such as placing an order."; + case R: return "Display or print data, such as a doctor census."; + case U: return "Update data, such as revise patient information."; + case D: return "Delete items, such as a doctor master file record."; + case E: return "Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Create"; + case R: return "Read/View/Print"; + case U: return "Update"; + case D: return "Delete"; + case E: return "Execute"; + default: return "?"; + } + } + } + + public static class AuditEventActionEnumFactory implements EnumFactory { + public AuditEventAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return AuditEventAction.C; + if ("R".equals(codeString)) + return AuditEventAction.R; + if ("U".equals(codeString)) + return AuditEventAction.U; + if ("D".equals(codeString)) + return AuditEventAction.D; + if ("E".equals(codeString)) + return AuditEventAction.E; + throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return new Enumeration(this, AuditEventAction.C); + if ("R".equals(codeString)) + return new Enumeration(this, AuditEventAction.R); + if ("U".equals(codeString)) + return new Enumeration(this, AuditEventAction.U); + if ("D".equals(codeString)) + return new Enumeration(this, AuditEventAction.D); + if ("E".equals(codeString)) + return new Enumeration(this, AuditEventAction.E); + throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); + } + public String toCode(AuditEventAction code) { + if (code == AuditEventAction.C) + return "C"; + if (code == AuditEventAction.R) + return "R"; + if (code == AuditEventAction.U) + return "U"; + if (code == AuditEventAction.D) + return "D"; + if (code == AuditEventAction.E) + return "E"; + return "?"; + } + } + + public enum AuditEventOutcome { + /** + * The operation completed successfully (whether with warnings or not). + */ + _0, + /** + * The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response). + */ + _4, + /** + * The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response). + */ + _8, + /** + * An error of such magnitude occurred that the system is no longer available for use (i.e. the system died). + */ + _12, + /** + * added to help the parsers + */ + NULL; + public static AuditEventOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return _0; + if ("4".equals(codeString)) + return _4; + if ("8".equals(codeString)) + return _8; + if ("12".equals(codeString)) + return _12; + throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0: return "0"; + case _4: return "4"; + case _8: return "8"; + case _12: return "12"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case _0: return "http://hl7.org/fhir/audit-event-outcome"; + case _4: return "http://hl7.org/fhir/audit-event-outcome"; + case _8: return "http://hl7.org/fhir/audit-event-outcome"; + case _12: return "http://hl7.org/fhir/audit-event-outcome"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case _0: return "The operation completed successfully (whether with warnings or not)."; + case _4: return "The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response)."; + case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; + case _12: return "An error of such magnitude occurred that the system is no longer available for use (i.e. the system died)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0: return "Success"; + case _4: return "Minor failure"; + case _8: return "Serious failure"; + case _12: return "Major failure"; + default: return "?"; + } + } + } + + public static class AuditEventOutcomeEnumFactory implements EnumFactory { + public AuditEventOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return AuditEventOutcome._0; + if ("4".equals(codeString)) + return AuditEventOutcome._4; + if ("8".equals(codeString)) + return AuditEventOutcome._8; + if ("12".equals(codeString)) + return AuditEventOutcome._12; + throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return new Enumeration(this, AuditEventOutcome._0); + if ("4".equals(codeString)) + return new Enumeration(this, AuditEventOutcome._4); + if ("8".equals(codeString)) + return new Enumeration(this, AuditEventOutcome._8); + if ("12".equals(codeString)) + return new Enumeration(this, AuditEventOutcome._12); + throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); + } + public String toCode(AuditEventOutcome code) { + if (code == AuditEventOutcome._0) + return "0"; + if (code == AuditEventOutcome._4) + return "4"; + if (code == AuditEventOutcome._8) + return "8"; + if (code == AuditEventOutcome._12) + return "12"; + return "?"; + } + } + + public enum AuditEventParticipantNetworkType { + /** + * The machine name, including DNS name. + */ + _1, + /** + * The assigned Internet Protocol (IP) address. + */ + _2, + /** + * The assigned telephone number. + */ + _3, + /** + * The assigned email address. + */ + _4, + /** + * URI (User directory, HTTP-PUT, ftp, etc.). + */ + _5, + /** + * added to help the parsers + */ + NULL; + public static AuditEventParticipantNetworkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + throw new FHIRException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case _1: return "http://hl7.org/fhir/network-type"; + case _2: return "http://hl7.org/fhir/network-type"; + case _3: return "http://hl7.org/fhir/network-type"; + case _4: return "http://hl7.org/fhir/network-type"; + case _5: return "http://hl7.org/fhir/network-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case _1: return "The machine name, including DNS name."; + case _2: return "The assigned Internet Protocol (IP) address."; + case _3: return "The assigned telephone number."; + case _4: return "The assigned email address."; + case _5: return "URI (User directory, HTTP-PUT, ftp, etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Machine Name"; + case _2: return "IP Address"; + case _3: return "Telephone Number"; + case _4: return "Email address"; + case _5: return "URI"; + default: return "?"; + } + } + } + + public static class AuditEventParticipantNetworkTypeEnumFactory implements EnumFactory { + public AuditEventParticipantNetworkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return AuditEventParticipantNetworkType._1; + if ("2".equals(codeString)) + return AuditEventParticipantNetworkType._2; + if ("3".equals(codeString)) + return AuditEventParticipantNetworkType._3; + if ("4".equals(codeString)) + return AuditEventParticipantNetworkType._4; + if ("5".equals(codeString)) + return AuditEventParticipantNetworkType._5; + throw new IllegalArgumentException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return new Enumeration(this, AuditEventParticipantNetworkType._1); + if ("2".equals(codeString)) + return new Enumeration(this, AuditEventParticipantNetworkType._2); + if ("3".equals(codeString)) + return new Enumeration(this, AuditEventParticipantNetworkType._3); + if ("4".equals(codeString)) + return new Enumeration(this, AuditEventParticipantNetworkType._4); + if ("5".equals(codeString)) + return new Enumeration(this, AuditEventParticipantNetworkType._5); + throw new FHIRException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); + } + public String toCode(AuditEventParticipantNetworkType code) { + if (code == AuditEventParticipantNetworkType._1) + return "1"; + if (code == AuditEventParticipantNetworkType._2) + return "2"; + if (code == AuditEventParticipantNetworkType._3) + return "3"; + if (code == AuditEventParticipantNetworkType._4) + return "4"; + if (code == AuditEventParticipantNetworkType._5) + return "5"; + return "?"; + } + } + + @Block() + public static class AuditEventEventComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type/identifier of event", formalDefinition="Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function." ) + protected Coding type; + + /** + * Identifier for the category of event. + */ + @Child(name = "subtype", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="More specific type/id for the event", formalDefinition="Identifier for the category of event." ) + protected List subtype; + + /** + * Indicator for type of action performed during the event that generated the audit. + */ + @Child(name = "action", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of action performed during the event", formalDefinition="Indicator for type of action performed during the event that generated the audit." ) + protected Enumeration action; + + /** + * The time when the event occurred on the source. + */ + @Child(name = "dateTime", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time when the event occurred on source", formalDefinition="The time when the event occurred on the source." ) + protected InstantType dateTime; + + /** + * Indicates whether the event succeeded or failed. + */ + @Child(name = "outcome", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether the event succeeded or failed", formalDefinition="Indicates whether the event succeeded or failed." ) + protected Enumeration outcome; + + /** + * A free text description of the outcome of the event. + */ + @Child(name = "outcomeDesc", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of the event outcome", formalDefinition="A free text description of the outcome of the event." ) + protected StringType outcomeDesc; + + /** + * The purposeOfUse (reason) that was used during the event being recorded. + */ + @Child(name = "purposeOfEvent", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The purposeOfUse of the event", formalDefinition="The purposeOfUse (reason) that was used during the event being recorded." ) + protected List purposeOfEvent; + + private static final long serialVersionUID = 1916806397L; + + /* + * Constructor + */ + public AuditEventEventComponent() { + super(); + } + + /* + * Constructor + */ + public AuditEventEventComponent(Coding type, InstantType dateTime) { + super(); + this.type = type; + this.dateTime = dateTime; + } + + /** + * @return {@link #type} (Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventEventComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.) + */ + public AuditEventEventComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #subtype} (Identifier for the category of event.) + */ + public List getSubtype() { + if (this.subtype == null) + this.subtype = new ArrayList(); + return this.subtype; + } + + public boolean hasSubtype() { + if (this.subtype == null) + return false; + for (Coding item : this.subtype) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subtype} (Identifier for the category of event.) + */ + // syntactic sugar + public Coding addSubtype() { //3 + Coding t = new Coding(); + if (this.subtype == null) + this.subtype = new ArrayList(); + this.subtype.add(t); + return t; + } + + // syntactic sugar + public AuditEventEventComponent addSubtype(Coding t) { //3 + if (t == null) + return this; + if (this.subtype == null) + this.subtype = new ArrayList(); + this.subtype.add(t); + return this; + } + + /** + * @return {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public Enumeration getActionElement() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventEventComponent.action"); + else if (Configuration.doAutoCreate()) + this.action = new Enumeration(new AuditEventActionEnumFactory()); // bb + return this.action; + } + + public boolean hasActionElement() { + return this.action != null && !this.action.isEmpty(); + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public AuditEventEventComponent setActionElement(Enumeration value) { + this.action = value; + return this; + } + + /** + * @return Indicator for type of action performed during the event that generated the audit. + */ + public AuditEventAction getAction() { + return this.action == null ? null : this.action.getValue(); + } + + /** + * @param value Indicator for type of action performed during the event that generated the audit. + */ + public AuditEventEventComponent setAction(AuditEventAction value) { + if (value == null) + this.action = null; + else { + if (this.action == null) + this.action = new Enumeration(new AuditEventActionEnumFactory()); + this.action.setValue(value); + } + return this; + } + + /** + * @return {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public InstantType getDateTimeElement() { + if (this.dateTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventEventComponent.dateTime"); + else if (Configuration.doAutoCreate()) + this.dateTime = new InstantType(); // bb + return this.dateTime; + } + + public boolean hasDateTimeElement() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + public boolean hasDateTime() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + /** + * @param value {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public AuditEventEventComponent setDateTimeElement(InstantType value) { + this.dateTime = value; + return this; + } + + /** + * @return The time when the event occurred on the source. + */ + public Date getDateTime() { + return this.dateTime == null ? null : this.dateTime.getValue(); + } + + /** + * @param value The time when the event occurred on the source. + */ + public AuditEventEventComponent setDateTime(Date value) { + if (this.dateTime == null) + this.dateTime = new InstantType(); + this.dateTime.setValue(value); + return this; + } + + /** + * @return {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventEventComponent.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new AuditEventOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public AuditEventEventComponent setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Indicates whether the event succeeded or failed. + */ + public AuditEventOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Indicates whether the event succeeded or failed. + */ + public AuditEventEventComponent setOutcome(AuditEventOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new AuditEventOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value + */ + public StringType getOutcomeDescElement() { + if (this.outcomeDesc == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventEventComponent.outcomeDesc"); + else if (Configuration.doAutoCreate()) + this.outcomeDesc = new StringType(); // bb + return this.outcomeDesc; + } + + public boolean hasOutcomeDescElement() { + return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); + } + + public boolean hasOutcomeDesc() { + return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); + } + + /** + * @param value {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value + */ + public AuditEventEventComponent setOutcomeDescElement(StringType value) { + this.outcomeDesc = value; + return this; + } + + /** + * @return A free text description of the outcome of the event. + */ + public String getOutcomeDesc() { + return this.outcomeDesc == null ? null : this.outcomeDesc.getValue(); + } + + /** + * @param value A free text description of the outcome of the event. + */ + public AuditEventEventComponent setOutcomeDesc(String value) { + if (Utilities.noString(value)) + this.outcomeDesc = null; + else { + if (this.outcomeDesc == null) + this.outcomeDesc = new StringType(); + this.outcomeDesc.setValue(value); + } + return this; + } + + /** + * @return {@link #purposeOfEvent} (The purposeOfUse (reason) that was used during the event being recorded.) + */ + public List getPurposeOfEvent() { + if (this.purposeOfEvent == null) + this.purposeOfEvent = new ArrayList(); + return this.purposeOfEvent; + } + + public boolean hasPurposeOfEvent() { + if (this.purposeOfEvent == null) + return false; + for (Coding item : this.purposeOfEvent) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #purposeOfEvent} (The purposeOfUse (reason) that was used during the event being recorded.) + */ + // syntactic sugar + public Coding addPurposeOfEvent() { //3 + Coding t = new Coding(); + if (this.purposeOfEvent == null) + this.purposeOfEvent = new ArrayList(); + this.purposeOfEvent.add(t); + return t; + } + + // syntactic sugar + public AuditEventEventComponent addPurposeOfEvent(Coding t) { //3 + if (t == null) + return this; + if (this.purposeOfEvent == null) + this.purposeOfEvent = new ArrayList(); + this.purposeOfEvent.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype)); + childrenList.add(new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("dateTime", "instant", "The time when the event occurred on the source.", 0, java.lang.Integer.MAX_VALUE, dateTime)); + childrenList.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, java.lang.Integer.MAX_VALUE, outcomeDesc)); + childrenList.add(new Property("purposeOfEvent", "Coding", "The purposeOfUse (reason) that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfEvent)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("subtype")) + this.getSubtype().add(castToCoding(value)); + else if (name.equals("action")) + this.action = new AuditEventActionEnumFactory().fromType(value); // Enumeration + else if (name.equals("dateTime")) + this.dateTime = castToInstant(value); // InstantType + else if (name.equals("outcome")) + this.outcome = new AuditEventOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("outcomeDesc")) + this.outcomeDesc = castToString(value); // StringType + else if (name.equals("purposeOfEvent")) + this.getPurposeOfEvent().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("subtype")) { + return addSubtype(); + } + else if (name.equals("action")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action"); + } + else if (name.equals("dateTime")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.dateTime"); + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcome"); + } + else if (name.equals("outcomeDesc")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcomeDesc"); + } + else if (name.equals("purposeOfEvent")) { + return addPurposeOfEvent(); + } + else + return super.addChild(name); + } + + public AuditEventEventComponent copy() { + AuditEventEventComponent dst = new AuditEventEventComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + if (subtype != null) { + dst.subtype = new ArrayList(); + for (Coding i : subtype) + dst.subtype.add(i.copy()); + }; + dst.action = action == null ? null : action.copy(); + dst.dateTime = dateTime == null ? null : dateTime.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.outcomeDesc = outcomeDesc == null ? null : outcomeDesc.copy(); + if (purposeOfEvent != null) { + dst.purposeOfEvent = new ArrayList(); + for (Coding i : purposeOfEvent) + dst.purposeOfEvent.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventEventComponent)) + return false; + AuditEventEventComponent o = (AuditEventEventComponent) other; + return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(action, o.action, true) + && compareDeep(dateTime, o.dateTime, true) && compareDeep(outcome, o.outcome, true) && compareDeep(outcomeDesc, o.outcomeDesc, true) + && compareDeep(purposeOfEvent, o.purposeOfEvent, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventEventComponent)) + return false; + AuditEventEventComponent o = (AuditEventEventComponent) other; + return compareValues(action, o.action, true) && compareValues(dateTime, o.dateTime, true) && compareValues(outcome, o.outcome, true) + && compareValues(outcomeDesc, o.outcomeDesc, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty()) + && (action == null || action.isEmpty()) && (dateTime == null || dateTime.isEmpty()) && (outcome == null || outcome.isEmpty()) + && (outcomeDesc == null || outcomeDesc.isEmpty()) && (purposeOfEvent == null || purposeOfEvent.isEmpty()) + ; + } + + public String fhirType() { + return "AuditEvent.event"; + + } + + } + + @Block() + public static class AuditEventParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="User roles (e.g. local RBAC codes)", formalDefinition="Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context." ) + protected List role; + + /** + * Direct reference to a resource that identifies the participant. + */ + @Child(name = "reference", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Direct reference to resource", formalDefinition="Direct reference to a resource that identifies the participant." ) + protected Reference reference; + + /** + * The actual object that is the target of the reference (Direct reference to a resource that identifies the participant.) + */ + protected Resource referenceTarget; + + /** + * Unique identifier for the user actively participating in the event. + */ + @Child(name = "userId", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier for the user", formalDefinition="Unique identifier for the user actively participating in the event." ) + protected Identifier userId; + + /** + * Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. + */ + @Child(name = "altId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Alternative User id e.g. authentication", formalDefinition="Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available." ) + protected StringType altId; + + /** + * Human-meaningful name for the user. + */ + @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human-meaningful name for the user", formalDefinition="Human-meaningful name for the user." ) + protected StringType name; + + /** + * Indicator that the user is or is not the requestor, or initiator, for the event being audited. + */ + @Child(name = "requestor", type = {BooleanType.class}, order=6, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether user is initiator", formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." ) + protected BooleanType requestor; + + /** + * Where the event occurred. + */ + @Child(name = "location", type = {Location.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Where", formalDefinition="Where the event occurred." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (Where the event occurred.) + */ + protected Location locationTarget; + + /** + * The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used. + */ + @Child(name = "policy", type = {UriType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Policy that authorized event", formalDefinition="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used." ) + protected List policy; + + /** + * Type of media involved. Used when the event is about exporting/importing onto media. + */ + @Child(name = "media", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of media", formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media." ) + protected Coding media; + + /** + * Logical network location for application activity, if the activity has a network location. + */ + @Child(name = "network", type = {}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Logical network location for application activity", formalDefinition="Logical network location for application activity, if the activity has a network location." ) + protected AuditEventParticipantNetworkComponent network; + + /** + * The reason (purpose of use), specific to this participant, that was used during the event being recorded. + */ + @Child(name = "purposeOfUse", type = {Coding.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reason given for this user", formalDefinition="The reason (purpose of use), specific to this participant, that was used during the event being recorded." ) + protected List purposeOfUse; + + private static final long serialVersionUID = -1783296995L; + + /* + * Constructor + */ + public AuditEventParticipantComponent() { + super(); + } + + /* + * Constructor + */ + public AuditEventParticipantComponent(BooleanType requestor) { + super(); + this.requestor = requestor; + } + + /** + * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) + */ + public List getRole() { + if (this.role == null) + this.role = new ArrayList(); + return this.role; + } + + public boolean hasRole() { + if (this.role == null) + return false; + for (CodeableConcept item : this.role) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) + */ + // syntactic sugar + public CodeableConcept addRole() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return t; + } + + // syntactic sugar + public AuditEventParticipantComponent addRole(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return this; + } + + /** + * @return {@link #reference} (Direct reference to a resource that identifies the participant.) + */ + public Reference getReference() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new Reference(); // cc + return this.reference; + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (Direct reference to a resource that identifies the participant.) + */ + public AuditEventParticipantComponent setReference(Reference value) { + this.reference = value; + return this; + } + + /** + * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) + */ + public Resource getReferenceTarget() { + return this.referenceTarget; + } + + /** + * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) + */ + public AuditEventParticipantComponent setReferenceTarget(Resource value) { + this.referenceTarget = value; + return this; + } + + /** + * @return {@link #userId} (Unique identifier for the user actively participating in the event.) + */ + public Identifier getUserId() { + if (this.userId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.userId"); + else if (Configuration.doAutoCreate()) + this.userId = new Identifier(); // cc + return this.userId; + } + + public boolean hasUserId() { + return this.userId != null && !this.userId.isEmpty(); + } + + /** + * @param value {@link #userId} (Unique identifier for the user actively participating in the event.) + */ + public AuditEventParticipantComponent setUserId(Identifier value) { + this.userId = value; + return this; + } + + /** + * @return {@link #altId} (Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value + */ + public StringType getAltIdElement() { + if (this.altId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.altId"); + else if (Configuration.doAutoCreate()) + this.altId = new StringType(); // bb + return this.altId; + } + + public boolean hasAltIdElement() { + return this.altId != null && !this.altId.isEmpty(); + } + + public boolean hasAltId() { + return this.altId != null && !this.altId.isEmpty(); + } + + /** + * @param value {@link #altId} (Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value + */ + public AuditEventParticipantComponent setAltIdElement(StringType value) { + this.altId = value; + return this; + } + + /** + * @return Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. + */ + public String getAltId() { + return this.altId == null ? null : this.altId.getValue(); + } + + /** + * @param value Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. + */ + public AuditEventParticipantComponent setAltId(String value) { + if (Utilities.noString(value)) + this.altId = null; + else { + if (this.altId == null) + this.altId = new StringType(); + this.altId.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public AuditEventParticipantComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Human-meaningful name for the user. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Human-meaningful name for the user. + */ + public AuditEventParticipantComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value + */ + public BooleanType getRequestorElement() { + if (this.requestor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.requestor"); + else if (Configuration.doAutoCreate()) + this.requestor = new BooleanType(); // bb + return this.requestor; + } + + public boolean hasRequestorElement() { + return this.requestor != null && !this.requestor.isEmpty(); + } + + public boolean hasRequestor() { + return this.requestor != null && !this.requestor.isEmpty(); + } + + /** + * @param value {@link #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value + */ + public AuditEventParticipantComponent setRequestorElement(BooleanType value) { + this.requestor = value; + return this; + } + + /** + * @return Indicator that the user is or is not the requestor, or initiator, for the event being audited. + */ + public boolean getRequestor() { + return this.requestor == null || this.requestor.isEmpty() ? false : this.requestor.getValue(); + } + + /** + * @param value Indicator that the user is or is not the requestor, or initiator, for the event being audited. + */ + public AuditEventParticipantComponent setRequestor(boolean value) { + if (this.requestor == null) + this.requestor = new BooleanType(); + this.requestor.setValue(value); + return this; + } + + /** + * @return {@link #location} (Where the event occurred.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (Where the event occurred.) + */ + public AuditEventParticipantComponent setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the event occurred.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the event occurred.) + */ + public AuditEventParticipantComponent setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) + */ + public List getPolicy() { + if (this.policy == null) + this.policy = new ArrayList(); + return this.policy; + } + + public boolean hasPolicy() { + if (this.policy == null) + return false; + for (UriType item : this.policy) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) + */ + // syntactic sugar + public UriType addPolicyElement() {//2 + UriType t = new UriType(); + if (this.policy == null) + this.policy = new ArrayList(); + this.policy.add(t); + return t; + } + + /** + * @param value {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) + */ + public AuditEventParticipantComponent addPolicy(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.policy == null) + this.policy = new ArrayList(); + this.policy.add(t); + return this; + } + + /** + * @param value {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) + */ + public boolean hasPolicy(String value) { + if (this.policy == null) + return false; + for (UriType v : this.policy) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) + */ + public Coding getMedia() { + if (this.media == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.media"); + else if (Configuration.doAutoCreate()) + this.media = new Coding(); // cc + return this.media; + } + + public boolean hasMedia() { + return this.media != null && !this.media.isEmpty(); + } + + /** + * @param value {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) + */ + public AuditEventParticipantComponent setMedia(Coding value) { + this.media = value; + return this; + } + + /** + * @return {@link #network} (Logical network location for application activity, if the activity has a network location.) + */ + public AuditEventParticipantNetworkComponent getNetwork() { + if (this.network == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantComponent.network"); + else if (Configuration.doAutoCreate()) + this.network = new AuditEventParticipantNetworkComponent(); // cc + return this.network; + } + + public boolean hasNetwork() { + return this.network != null && !this.network.isEmpty(); + } + + /** + * @param value {@link #network} (Logical network location for application activity, if the activity has a network location.) + */ + public AuditEventParticipantComponent setNetwork(AuditEventParticipantNetworkComponent value) { + this.network = value; + return this; + } + + /** + * @return {@link #purposeOfUse} (The reason (purpose of use), specific to this participant, that was used during the event being recorded.) + */ + public List getPurposeOfUse() { + if (this.purposeOfUse == null) + this.purposeOfUse = new ArrayList(); + return this.purposeOfUse; + } + + public boolean hasPurposeOfUse() { + if (this.purposeOfUse == null) + return false; + for (Coding item : this.purposeOfUse) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #purposeOfUse} (The reason (purpose of use), specific to this participant, that was used during the event being recorded.) + */ + // syntactic sugar + public Coding addPurposeOfUse() { //3 + Coding t = new Coding(); + if (this.purposeOfUse == null) + this.purposeOfUse = new ArrayList(); + this.purposeOfUse.add(t); + return t; + } + + // syntactic sugar + public AuditEventParticipantComponent addPurposeOfUse(Coding t) { //3 + if (t == null) + return this; + if (this.purposeOfUse == null) + this.purposeOfUse = new ArrayList(); + this.purposeOfUse.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "CodeableConcept", "Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("reference", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the participant.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, java.lang.Integer.MAX_VALUE, userId)); + childrenList.add(new Property("altId", "string", "Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, java.lang.Integer.MAX_VALUE, altId)); + childrenList.add(new Property("name", "string", "Human-meaningful name for the user.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, java.lang.Integer.MAX_VALUE, requestor)); + childrenList.add(new Property("location", "Reference(Location)", "Where the event occurred.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("policy", "uri", "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", 0, java.lang.Integer.MAX_VALUE, policy)); + childrenList.add(new Property("media", "Coding", "Type of media involved. Used when the event is about exporting/importing onto media.", 0, java.lang.Integer.MAX_VALUE, media)); + childrenList.add(new Property("network", "", "Logical network location for application activity, if the activity has a network location.", 0, java.lang.Integer.MAX_VALUE, network)); + childrenList.add(new Property("purposeOfUse", "Coding", "The reason (purpose of use), specific to this participant, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.getRole().add(castToCodeableConcept(value)); + else if (name.equals("reference")) + this.reference = castToReference(value); // Reference + else if (name.equals("userId")) + this.userId = castToIdentifier(value); // Identifier + else if (name.equals("altId")) + this.altId = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("requestor")) + this.requestor = castToBoolean(value); // BooleanType + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("policy")) + this.getPolicy().add(castToUri(value)); + else if (name.equals("media")) + this.media = castToCoding(value); // Coding + else if (name.equals("network")) + this.network = (AuditEventParticipantNetworkComponent) value; // AuditEventParticipantNetworkComponent + else if (name.equals("purposeOfUse")) + this.getPurposeOfUse().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + return addRole(); + } + else if (name.equals("reference")) { + this.reference = new Reference(); + return this.reference; + } + else if (name.equals("userId")) { + this.userId = new Identifier(); + return this.userId; + } + else if (name.equals("altId")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.altId"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); + } + else if (name.equals("requestor")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.requestor"); + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("policy")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.policy"); + } + else if (name.equals("media")) { + this.media = new Coding(); + return this.media; + } + else if (name.equals("network")) { + this.network = new AuditEventParticipantNetworkComponent(); + return this.network; + } + else if (name.equals("purposeOfUse")) { + return addPurposeOfUse(); + } + else + return super.addChild(name); + } + + public AuditEventParticipantComponent copy() { + AuditEventParticipantComponent dst = new AuditEventParticipantComponent(); + copyValues(dst); + if (role != null) { + dst.role = new ArrayList(); + for (CodeableConcept i : role) + dst.role.add(i.copy()); + }; + dst.reference = reference == null ? null : reference.copy(); + dst.userId = userId == null ? null : userId.copy(); + dst.altId = altId == null ? null : altId.copy(); + dst.name = name == null ? null : name.copy(); + dst.requestor = requestor == null ? null : requestor.copy(); + dst.location = location == null ? null : location.copy(); + if (policy != null) { + dst.policy = new ArrayList(); + for (UriType i : policy) + dst.policy.add(i.copy()); + }; + dst.media = media == null ? null : media.copy(); + dst.network = network == null ? null : network.copy(); + if (purposeOfUse != null) { + dst.purposeOfUse = new ArrayList(); + for (Coding i : purposeOfUse) + dst.purposeOfUse.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventParticipantComponent)) + return false; + AuditEventParticipantComponent o = (AuditEventParticipantComponent) other; + return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) && compareDeep(userId, o.userId, true) + && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) && compareDeep(requestor, o.requestor, true) + && compareDeep(location, o.location, true) && compareDeep(policy, o.policy, true) && compareDeep(media, o.media, true) + && compareDeep(network, o.network, true) && compareDeep(purposeOfUse, o.purposeOfUse, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventParticipantComponent)) + return false; + AuditEventParticipantComponent o = (AuditEventParticipantComponent) other; + return compareValues(altId, o.altId, true) && compareValues(name, o.name, true) && compareValues(requestor, o.requestor, true) + && compareValues(policy, o.policy, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (role == null || role.isEmpty()) && (reference == null || reference.isEmpty()) + && (userId == null || userId.isEmpty()) && (altId == null || altId.isEmpty()) && (name == null || name.isEmpty()) + && (requestor == null || requestor.isEmpty()) && (location == null || location.isEmpty()) + && (policy == null || policy.isEmpty()) && (media == null || media.isEmpty()) && (network == null || network.isEmpty()) + && (purposeOfUse == null || purposeOfUse.isEmpty()); + } + + public String fhirType() { + return "AuditEvent.participant"; + + } + + } + + @Block() + public static class AuditEventParticipantNetworkComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An identifier for the network access point of the user device for the audit event. + */ + @Child(name = "address", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Identifier for the network access point of the user device", formalDefinition="An identifier for the network access point of the user device for the audit event." ) + protected StringType address; + + /** + * An identifier for the type of network access point that originated the audit event. + */ + @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of network access point", formalDefinition="An identifier for the type of network access point that originated the audit event." ) + protected Enumeration type; + + private static final long serialVersionUID = -1355220390L; + + /* + * Constructor + */ + public AuditEventParticipantNetworkComponent() { + super(); + } + + /** + * @return {@link #address} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value + */ + public StringType getAddressElement() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantNetworkComponent.address"); + else if (Configuration.doAutoCreate()) + this.address = new StringType(); // bb + return this.address; + } + + public boolean hasAddressElement() { + return this.address != null && !this.address.isEmpty(); + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value + */ + public AuditEventParticipantNetworkComponent setAddressElement(StringType value) { + this.address = value; + return this; + } + + /** + * @return An identifier for the network access point of the user device for the audit event. + */ + public String getAddress() { + return this.address == null ? null : this.address.getValue(); + } + + /** + * @param value An identifier for the network access point of the user device for the audit event. + */ + public AuditEventParticipantNetworkComponent setAddress(String value) { + if (Utilities.noString(value)) + this.address = null; + else { + if (this.address == null) + this.address = new StringType(); + this.address.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventParticipantNetworkComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new AuditEventParticipantNetworkTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public AuditEventParticipantNetworkComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return An identifier for the type of network access point that originated the audit event. + */ + public AuditEventParticipantNetworkType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value An identifier for the type of network access point that originated the audit event. + */ + public AuditEventParticipantNetworkComponent setType(AuditEventParticipantNetworkType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new AuditEventParticipantNetworkTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("address", "string", "An identifier for the network access point of the user device for the audit event.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, java.lang.Integer.MAX_VALUE, type)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("address")) + this.address = castToString(value); // StringType + else if (name.equals("type")) + this.type = new AuditEventParticipantNetworkTypeEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("address")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.address"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); + } + else + return super.addChild(name); + } + + public AuditEventParticipantNetworkComponent copy() { + AuditEventParticipantNetworkComponent dst = new AuditEventParticipantNetworkComponent(); + copyValues(dst); + dst.address = address == null ? null : address.copy(); + dst.type = type == null ? null : type.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventParticipantNetworkComponent)) + return false; + AuditEventParticipantNetworkComponent o = (AuditEventParticipantNetworkComponent) other; + return compareDeep(address, o.address, true) && compareDeep(type, o.type, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventParticipantNetworkComponent)) + return false; + AuditEventParticipantNetworkComponent o = (AuditEventParticipantNetworkComponent) other; + return compareValues(address, o.address, true) && compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (address == null || address.isEmpty()) && (type == null || type.isEmpty()) + ; + } + + public String fhirType() { + return "AuditEvent.participant.network"; + + } + + } + + @Block() + public static class AuditEventSourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. + */ + @Child(name = "site", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Logical source location within the enterprise", formalDefinition="Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group." ) + protected StringType site; + + /** + * Identifier of the source where the event was detected. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identity of source detecting the event", formalDefinition="Identifier of the source where the event was detected." ) + protected Identifier identifier; + + /** + * Code specifying the type of source where event originated. + */ + @Child(name = "type", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The type of source where event originated", formalDefinition="Code specifying the type of source where event originated." ) + protected List type; + + private static final long serialVersionUID = -1562673890L; + + /* + * Constructor + */ + public AuditEventSourceComponent() { + super(); + } + + /* + * Constructor + */ + public AuditEventSourceComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #site} (Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value + */ + public StringType getSiteElement() { + if (this.site == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventSourceComponent.site"); + else if (Configuration.doAutoCreate()) + this.site = new StringType(); // bb + return this.site; + } + + public boolean hasSiteElement() { + return this.site != null && !this.site.isEmpty(); + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value + */ + public AuditEventSourceComponent setSiteElement(StringType value) { + this.site = value; + return this; + } + + /** + * @return Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. + */ + public String getSite() { + return this.site == null ? null : this.site.getValue(); + } + + /** + * @param value Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. + */ + public AuditEventSourceComponent setSite(String value) { + if (Utilities.noString(value)) + this.site = null; + else { + if (this.site == null) + this.site = new StringType(); + this.site.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Identifier of the source where the event was detected.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventSourceComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifier of the source where the event was detected.) + */ + public AuditEventSourceComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #type} (Code specifying the type of source where event originated.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (Coding item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Code specifying the type of source where event originated.) + */ + // syntactic sugar + public Coding addType() { //3 + Coding t = new Coding(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public AuditEventSourceComponent addType(Coding t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("site", "string", "Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("identifier", "Identifier", "Identifier of the source where the event was detected.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("site")) + this.site = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("type")) + this.getType().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("site")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.site"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("type")) { + return addType(); + } + else + return super.addChild(name); + } + + public AuditEventSourceComponent copy() { + AuditEventSourceComponent dst = new AuditEventSourceComponent(); + copyValues(dst); + dst.site = site == null ? null : site.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (Coding i : type) + dst.type.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventSourceComponent)) + return false; + AuditEventSourceComponent o = (AuditEventSourceComponent) other; + return compareDeep(site, o.site, true) && compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventSourceComponent)) + return false; + AuditEventSourceComponent o = (AuditEventSourceComponent) other; + return compareValues(site, o.site, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (site == null || site.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (type == null || type.isEmpty()); + } + + public String fhirType() { + return "AuditEvent.source"; + + } + + } + + @Block() + public static class AuditEventObjectComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies a specific instance of the participant object. The reference should always be version specific. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific instance of object (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) + protected Identifier identifier; + + /** + * Identifies a specific instance of the participant object. The reference should always be version specific. + */ + @Child(name = "reference", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific instance of resource (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) + protected Reference reference; + + /** + * The actual object that is the target of the reference (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + protected Resource referenceTarget; + + /** + * The type of the object that was involved in this audit event. + */ + @Child(name = "type", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of object involved", formalDefinition="The type of the object that was involved in this audit event." ) + protected Coding type; + + /** + * Code representing the functional application role of Participant Object being audited. + */ + @Child(name = "role", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What role the Object played", formalDefinition="Code representing the functional application role of Participant Object being audited." ) + protected Coding role; + + /** + * Identifier for the data life-cycle stage for the participant object. + */ + @Child(name = "lifecycle", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Life-cycle stage for the object", formalDefinition="Identifier for the data life-cycle stage for the participant object." ) + protected Coding lifecycle; + + /** + * Denotes security labels for the identified object. + */ + @Child(name = "securityLabel", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Security labels applied to the object", formalDefinition="Denotes security labels for the identified object." ) + protected List securityLabel; + + /** + * An instance-specific descriptor of the Participant Object ID audited, such as a person's name. + */ + @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instance-specific descriptor for Object", formalDefinition="An instance-specific descriptor of the Participant Object ID audited, such as a person's name." ) + protected StringType name; + + /** + * Text that describes the object in more detail. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Descriptive text", formalDefinition="Text that describes the object in more detail." ) + protected StringType description; + + /** + * The actual query for a query-type participant object. + */ + @Child(name = "query", type = {Base64BinaryType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Actual query for object", formalDefinition="The actual query for a query-type participant object." ) + protected Base64BinaryType query; + + /** + * Additional Information about the Object. + */ + @Child(name = "detail", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional Information about the Object", formalDefinition="Additional Information about the Object." ) + protected List detail; + + private static final long serialVersionUID = 997591908L; + + /* + * Constructor + */ + public AuditEventObjectComponent() { + super(); + } + + /** + * @return {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public AuditEventObjectComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public Reference getReference() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new Reference(); // cc + return this.reference; + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public AuditEventObjectComponent setReference(Reference value) { + this.reference = value; + return this; + } + + /** + * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public Resource getReferenceTarget() { + return this.referenceTarget; + } + + /** + * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) + */ + public AuditEventObjectComponent setReferenceTarget(Resource value) { + this.referenceTarget = value; + return this; + } + + /** + * @return {@link #type} (The type of the object that was involved in this audit event.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the object that was involved in this audit event.) + */ + public AuditEventObjectComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #role} (Code representing the functional application role of Participant Object being audited.) + */ + public Coding getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new Coding(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (Code representing the functional application role of Participant Object being audited.) + */ + public AuditEventObjectComponent setRole(Coding value) { + this.role = value; + return this; + } + + /** + * @return {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.) + */ + public Coding getLifecycle() { + if (this.lifecycle == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.lifecycle"); + else if (Configuration.doAutoCreate()) + this.lifecycle = new Coding(); // cc + return this.lifecycle; + } + + public boolean hasLifecycle() { + return this.lifecycle != null && !this.lifecycle.isEmpty(); + } + + /** + * @param value {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.) + */ + public AuditEventObjectComponent setLifecycle(Coding value) { + this.lifecycle = value; + return this; + } + + /** + * @return {@link #securityLabel} (Denotes security labels for the identified object.) + */ + public List getSecurityLabel() { + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + return this.securityLabel; + } + + public boolean hasSecurityLabel() { + if (this.securityLabel == null) + return false; + for (Coding item : this.securityLabel) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #securityLabel} (Denotes security labels for the identified object.) + */ + // syntactic sugar + public Coding addSecurityLabel() { //3 + Coding t = new Coding(); + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + this.securityLabel.add(t); + return t; + } + + // syntactic sugar + public AuditEventObjectComponent addSecurityLabel(Coding t) { //3 + if (t == null) + return this; + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + this.securityLabel.add(t); + return this; + } + + /** + * @return {@link #name} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public AuditEventObjectComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return An instance-specific descriptor of the Participant Object ID audited, such as a person's name. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value An instance-specific descriptor of the Participant Object ID audited, such as a person's name. + */ + public AuditEventObjectComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (Text that describes the object in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Text that describes the object in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public AuditEventObjectComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Text that describes the object in more detail. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Text that describes the object in more detail. + */ + public AuditEventObjectComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value + */ + public Base64BinaryType getQueryElement() { + if (this.query == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectComponent.query"); + else if (Configuration.doAutoCreate()) + this.query = new Base64BinaryType(); // bb + return this.query; + } + + public boolean hasQueryElement() { + return this.query != null && !this.query.isEmpty(); + } + + public boolean hasQuery() { + return this.query != null && !this.query.isEmpty(); + } + + /** + * @param value {@link #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value + */ + public AuditEventObjectComponent setQueryElement(Base64BinaryType value) { + this.query = value; + return this; + } + + /** + * @return The actual query for a query-type participant object. + */ + public byte[] getQuery() { + return this.query == null ? null : this.query.getValue(); + } + + /** + * @param value The actual query for a query-type participant object. + */ + public AuditEventObjectComponent setQuery(byte[] value) { + if (value == null) + this.query = null; + else { + if (this.query == null) + this.query = new Base64BinaryType(); + this.query.setValue(value); + } + return this; + } + + /** + * @return {@link #detail} (Additional Information about the Object.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (AuditEventObjectDetailComponent item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (Additional Information about the Object.) + */ + // syntactic sugar + public AuditEventObjectDetailComponent addDetail() { //3 + AuditEventObjectDetailComponent t = new AuditEventObjectDetailComponent(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public AuditEventObjectComponent addDetail(AuditEventObjectDetailComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("reference", "Reference(Any)", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("type", "Coding", "The type of the object that was involved in this audit event.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("role", "Coding", "Code representing the functional application role of Participant Object being audited.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("lifecycle", "Coding", "Identifier for the data life-cycle stage for the participant object.", 0, java.lang.Integer.MAX_VALUE, lifecycle)); + childrenList.add(new Property("securityLabel", "Coding", "Denotes security labels for the identified object.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); + childrenList.add(new Property("name", "string", "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "Text that describes the object in more detail.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("query", "base64Binary", "The actual query for a query-type participant object.", 0, java.lang.Integer.MAX_VALUE, query)); + childrenList.add(new Property("detail", "", "Additional Information about the Object.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("reference")) + this.reference = castToReference(value); // Reference + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("role")) + this.role = castToCoding(value); // Coding + else if (name.equals("lifecycle")) + this.lifecycle = castToCoding(value); // Coding + else if (name.equals("securityLabel")) + this.getSecurityLabel().add(castToCoding(value)); + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("query")) + this.query = castToBase64Binary(value); // Base64BinaryType + else if (name.equals("detail")) + this.getDetail().add((AuditEventObjectDetailComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("reference")) { + this.reference = new Reference(); + return this.reference; + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("role")) { + this.role = new Coding(); + return this.role; + } + else if (name.equals("lifecycle")) { + this.lifecycle = new Coding(); + return this.lifecycle; + } + else if (name.equals("securityLabel")) { + return addSecurityLabel(); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.description"); + } + else if (name.equals("query")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.query"); + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public AuditEventObjectComponent copy() { + AuditEventObjectComponent dst = new AuditEventObjectComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.reference = reference == null ? null : reference.copy(); + dst.type = type == null ? null : type.copy(); + dst.role = role == null ? null : role.copy(); + dst.lifecycle = lifecycle == null ? null : lifecycle.copy(); + if (securityLabel != null) { + dst.securityLabel = new ArrayList(); + for (Coding i : securityLabel) + dst.securityLabel.add(i.copy()); + }; + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + dst.query = query == null ? null : query.copy(); + if (detail != null) { + dst.detail = new ArrayList(); + for (AuditEventObjectDetailComponent i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventObjectComponent)) + return false; + AuditEventObjectComponent o = (AuditEventObjectComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true) + && compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(lifecycle, o.lifecycle, true) + && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) + && compareDeep(query, o.query, true) && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventObjectComponent)) + return false; + AuditEventObjectComponent o = (AuditEventObjectComponent) other; + return compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(query, o.query, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) + && (type == null || type.isEmpty()) && (role == null || role.isEmpty()) && (lifecycle == null || lifecycle.isEmpty()) + && (securityLabel == null || securityLabel.isEmpty()) && (name == null || name.isEmpty()) + && (description == null || description.isEmpty()) && (query == null || query.isEmpty()) && (detail == null || detail.isEmpty()) + ; + } + + public String fhirType() { + return "AuditEvent.object"; + + } + + } + + @Block() + public static class AuditEventObjectDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Name of the property. + */ + @Child(name = "type", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of the property", formalDefinition="Name of the property." ) + protected StringType type; + + /** + * Property value. + */ + @Child(name = "value", type = {Base64BinaryType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Property value", formalDefinition="Property value." ) + protected Base64BinaryType value; + + private static final long serialVersionUID = 11139504L; + + /* + * Constructor + */ + public AuditEventObjectDetailComponent() { + super(); + } + + /* + * Constructor + */ + public AuditEventObjectDetailComponent(StringType type, Base64BinaryType value) { + super(); + this.type = type; + this.value = value; + } + + /** + * @return {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StringType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectDetailComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new StringType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public AuditEventObjectDetailComponent setTypeElement(StringType value) { + this.type = value; + return this; + } + + /** + * @return Name of the property. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Name of the property. + */ + public AuditEventObjectDetailComponent setType(String value) { + if (this.type == null) + this.type = new StringType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public Base64BinaryType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventObjectDetailComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new Base64BinaryType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public AuditEventObjectDetailComponent setValueElement(Base64BinaryType value) { + this.value = value; + return this; + } + + /** + * @return Property value. + */ + public byte[] getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value Property value. + */ + public AuditEventObjectDetailComponent setValue(byte[] value) { + if (this.value == null) + this.value = new Base64BinaryType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "string", "Name of the property.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("value", "base64Binary", "Property value.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToBase64Binary(value); // Base64BinaryType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.value"); + } + else + return super.addChild(name); + } + + public AuditEventObjectDetailComponent copy() { + AuditEventObjectDetailComponent dst = new AuditEventObjectDetailComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEventObjectDetailComponent)) + return false; + AuditEventObjectDetailComponent o = (AuditEventObjectDetailComponent) other; + return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEventObjectDetailComponent)) + return false; + AuditEventObjectDetailComponent o = (AuditEventObjectDetailComponent) other; + return compareValues(type, o.type, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "AuditEvent.object.detail"; + + } + + } + + /** + * Identifies the name, action type, time, and disposition of the audited event. + */ + @Child(name = "event", type = {}, order=0, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="What was done", formalDefinition="Identifies the name, action type, time, and disposition of the audited event." ) + protected AuditEventEventComponent event; + + /** + * A person, a hardware device or software process. + */ + @Child(name = "participant", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) + protected List participant; + + /** + * Application systems and processes. + */ + @Child(name = "source", type = {}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Application systems and processes", formalDefinition="Application systems and processes." ) + protected AuditEventSourceComponent source; + + /** + * Specific instances of data or objects that have been accessed. + */ + @Child(name = "object", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specific instances of data or objects that have been accessed", formalDefinition="Specific instances of data or objects that have been accessed." ) + protected List object; + + private static final long serialVersionUID = -1495151000L; + + /* + * Constructor + */ + public AuditEvent() { + super(); + } + + /* + * Constructor + */ + public AuditEvent(AuditEventEventComponent event, AuditEventSourceComponent source) { + super(); + this.event = event; + this.source = source; + } + + /** + * @return {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) + */ + public AuditEventEventComponent getEvent() { + if (this.event == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEvent.event"); + else if (Configuration.doAutoCreate()) + this.event = new AuditEventEventComponent(); // cc + return this.event; + } + + public boolean hasEvent() { + return this.event != null && !this.event.isEmpty(); + } + + /** + * @param value {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) + */ + public AuditEvent setEvent(AuditEventEventComponent value) { + this.event = value; + return this; + } + + /** + * @return {@link #participant} (A person, a hardware device or software process.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (AuditEventParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (A person, a hardware device or software process.) + */ + // syntactic sugar + public AuditEventParticipantComponent addParticipant() { //3 + AuditEventParticipantComponent t = new AuditEventParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public AuditEvent addParticipant(AuditEventParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return {@link #source} (Application systems and processes.) + */ + public AuditEventSourceComponent getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEvent.source"); + else if (Configuration.doAutoCreate()) + this.source = new AuditEventSourceComponent(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Application systems and processes.) + */ + public AuditEvent setSource(AuditEventSourceComponent value) { + this.source = value; + return this; + } + + /** + * @return {@link #object} (Specific instances of data or objects that have been accessed.) + */ + public List getObject() { + if (this.object == null) + this.object = new ArrayList(); + return this.object; + } + + public boolean hasObject() { + if (this.object == null) + return false; + for (AuditEventObjectComponent item : this.object) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #object} (Specific instances of data or objects that have been accessed.) + */ + // syntactic sugar + public AuditEventObjectComponent addObject() { //3 + AuditEventObjectComponent t = new AuditEventObjectComponent(); + if (this.object == null) + this.object = new ArrayList(); + this.object.add(t); + return t; + } + + // syntactic sugar + public AuditEvent addObject(AuditEventObjectComponent t) { //3 + if (t == null) + return this; + if (this.object == null) + this.object = new ArrayList(); + this.object.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("event", "", "Identifies the name, action type, time, and disposition of the audited event.", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("participant", "", "A person, a hardware device or software process.", 0, java.lang.Integer.MAX_VALUE, participant)); + childrenList.add(new Property("source", "", "Application systems and processes.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("object", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, object)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("event")) + this.event = (AuditEventEventComponent) value; // AuditEventEventComponent + else if (name.equals("participant")) + this.getParticipant().add((AuditEventParticipantComponent) value); + else if (name.equals("source")) + this.source = (AuditEventSourceComponent) value; // AuditEventSourceComponent + else if (name.equals("object")) + this.getObject().add((AuditEventObjectComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("event")) { + this.event = new AuditEventEventComponent(); + return this.event; + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("source")) { + this.source = new AuditEventSourceComponent(); + return this.source; + } + else if (name.equals("object")) { + return addObject(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "AuditEvent"; + + } + + public AuditEvent copy() { + AuditEvent dst = new AuditEvent(); + copyValues(dst); + dst.event = event == null ? null : event.copy(); + if (participant != null) { + dst.participant = new ArrayList(); + for (AuditEventParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + dst.source = source == null ? null : source.copy(); + if (object != null) { + dst.object = new ArrayList(); + for (AuditEventObjectComponent i : object) + dst.object.add(i.copy()); + }; + return dst; + } + + protected AuditEvent typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AuditEvent)) + return false; + AuditEvent o = (AuditEvent) other; + return compareDeep(event, o.event, true) && compareDeep(participant, o.participant, true) && compareDeep(source, o.source, true) + && compareDeep(object, o.object, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AuditEvent)) + return false; + AuditEvent o = (AuditEvent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (event == null || event.isEmpty()) && (participant == null || participant.isEmpty()) + && (source == null || source.isEmpty()) && (object == null || object.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.AuditEvent; + } + + @SearchParamDefinition(name="date", path="AuditEvent.event.dateTime", description="Time when the event occurred on source", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="address", path="AuditEvent.participant.network.address", description="Identifier for the network access point of the user device", type="token" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The identity of source detecting the event", type="token" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="AuditEvent.event.type", description="Type/identifier of event", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="altid", path="AuditEvent.participant.altId", description="Alternative User id e.g. authentication", type="token" ) + public static final String SP_ALTID = "altid"; + @SearchParamDefinition(name="participant", path="AuditEvent.participant.reference", description="Direct reference to resource", type="reference" ) + public static final String SP_PARTICIPANT = "participant"; + @SearchParamDefinition(name="reference", path="AuditEvent.object.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) + public static final String SP_REFERENCE = "reference"; + @SearchParamDefinition(name="site", path="AuditEvent.source.site", description="Logical source location within the enterprise", type="token" ) + public static final String SP_SITE = "site"; + @SearchParamDefinition(name="subtype", path="AuditEvent.event.subtype", description="More specific type/id for the event", type="token" ) + public static final String SP_SUBTYPE = "subtype"; + @SearchParamDefinition(name="identity", path="AuditEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) + public static final String SP_IDENTITY = "identity"; + @SearchParamDefinition(name="patient", path="AuditEvent.participant.reference|AuditEvent.object.reference", description="Direct reference to resource", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="object-type", path="AuditEvent.object.type", description="Type of object involved", type="token" ) + public static final String SP_OBJECTTYPE = "object-type"; + @SearchParamDefinition(name="name", path="AuditEvent.participant.name", description="Human-meaningful name for the user", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="action", path="AuditEvent.event.action", description="Type of action performed during the event", type="token" ) + public static final String SP_ACTION = "action"; + @SearchParamDefinition(name="user", path="AuditEvent.participant.userId", description="Unique identifier for the user", type="token" ) + public static final String SP_USER = "user"; + @SearchParamDefinition(name="desc", path="AuditEvent.object.name", description="Instance-specific descriptor for Object", type="string" ) + public static final String SP_DESC = "desc"; + @SearchParamDefinition(name="policy", path="AuditEvent.participant.policy", description="Policy that authorized event", type="uri" ) + public static final String SP_POLICY = "policy"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BackboneElement.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BackboneElement.java new file mode 100644 index 00000000000..5a47b54f8af --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BackboneElement.java @@ -0,0 +1,166 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Base definition for all elements that are defined inside a resource - but not those in a data type. + */ +@DatatypeDef(name="BackboneElement") +public abstract class BackboneElement extends Element implements IBaseBackboneElement { + + /** + * May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. + */ + @Child(name = "modifierExtension", type = {Extension.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=false) + @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) + protected List modifierExtension; + + private static final long serialVersionUID = -1431673179L; + + /* + * Constructor + */ + public BackboneElement() { + super(); + } + + /** + * @return {@link #modifierExtension} (May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.) + */ + public List getModifierExtension() { + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + return this.modifierExtension; + } + + public boolean hasModifierExtension() { + if (this.modifierExtension == null) + return false; + for (Extension item : this.modifierExtension) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifierExtension} (May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.) + */ + // syntactic sugar + public Extension addModifierExtension() { //3 + Extension t = new Extension(); + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + this.modifierExtension.add(t); + return t; + } + + // syntactic sugar + public BackboneElement addModifierExtension(Extension t) { //3 + if (t == null) + return this; + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + this.modifierExtension.add(t); + return this; + } + + protected void listChildren(List childrenList) { + childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("modifierExtension")) + this.getModifierExtension().add(castToExtension(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("modifierExtension")) { + return addModifierExtension(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "BackboneElement"; + + } + + public abstract BackboneElement copy(); + + public void copyValues(BackboneElement dst) { + if (modifierExtension != null) { + dst.modifierExtension = new ArrayList(); + for (Extension i : modifierExtension) + dst.modifierExtension.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BackboneElement)) + return false; + BackboneElement o = (BackboneElement) other; + return compareDeep(modifierExtension, o.modifierExtension, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BackboneElement)) + return false; + BackboneElement o = (BackboneElement) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (modifierExtension == null || modifierExtension.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base.java new file mode 100644 index 00000000000..ad5aef3db5c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base.java @@ -0,0 +1,524 @@ +package org.hl7.fhir.dstu21.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; + +import ca.uhn.fhir.model.api.IElement; + +public abstract class Base implements Serializable, IBase, IElement { + + /** + * User appended data items - allow users to add extra information to the class + */ +private Map userData; + + /** + * Round tracking xml comments for testing convenience + */ + private List formatCommentsPre; + + /** + * Round tracking xml comments for testing convenience + */ + private List formatCommentsPost; + + + public Object getUserData(String name) { + if (userData == null) + return null; + return userData.get(name); + } + + public void setUserData(String name, Object value) { + if (userData == null) + userData = new HashMap(); + userData.put(name, value); + } + + public void setUserDataINN(String name, Object value) { + if (value == null) + return; + + if (userData == null) + userData = new HashMap(); + userData.put(name, value); + } + + public boolean hasUserData(String name) { + if (userData == null) + return false; + else + return userData.containsKey(name); + } + + public String getUserString(String name) { + return (String) getUserData(name); + } + + public int getUserInt(String name) { + if (!hasUserData(name)) + return 0; + return (Integer) getUserData(name); + } + + public boolean hasFormatComment() { + return (formatCommentsPre != null && !formatCommentsPre.isEmpty()) || (formatCommentsPost != null && !formatCommentsPost.isEmpty()); + } + + public List getFormatCommentsPre() { + if (formatCommentsPre == null) + formatCommentsPre = new ArrayList(); + return formatCommentsPre; + } + + public List getFormatCommentsPost() { + if (formatCommentsPost == null) + formatCommentsPost = new ArrayList(); + return formatCommentsPost; + } + + // these 2 allow evaluation engines to get access to primitive values + public boolean isPrimitive() { + return false; + } + + public String primitiveValue() { + return null; + } + + public abstract String fhirType() ; + + public boolean hasType(String... name) { + String t = fhirType(); + for (String n : name) + if (n.equals(t)) + return true; + return false; + } + + protected abstract void listChildren(List result) ; + + public void setProperty(String name, Base value) throws FHIRException { + throw new FHIRException("Attempt to set unknown property "+name); + } + + public Base addChild(String name) throws FHIRException { + throw new FHIRException("Attempt to add child with unknown name "+name); + } + + /** + * Supports iterating the children elements in some generic processor or browser + * All defined children will be listed, even if they have no value on this instance + * + * Note that the actual content of primitive or xhtml elements is not iterated explicitly. + * To find these, the processing code must recognise the element as a primitive, typecast + * the value to a {@link Type}, and examine the value + * + * @return a list of all the children defined for this element + */ + public List children() { + List result = new ArrayList(); + listChildren(result); + return result; + } + + public Property getChildByName(String name) { + List children = new ArrayList(); + listChildren(children); + for (Property c : children) + if (c.getName().equals(name)) + return c; + return null; + } + + public List listChildrenByName(String name) { + List children = new ArrayList(); + listChildren(children); + for (Property c : children) + if (c.getName().equals(name) || (c.getName().endsWith("[x]") && name.startsWith(c.getName()))) + return c.getValues(); + return new ArrayList(); + } + + public boolean isEmpty() { + return true; // userData does not count + } + + public boolean equalsDeep(Base other) { + return other != null; + } + + public boolean equalsShallow(Base other) { + return other != null; + } + + public static boolean compareDeep(List e1, List e2, boolean allowNull) { + if (noList(e1) && noList(e2) && allowNull) + return true; + if (noList(e1) || noList(e2)) + return false; + if (e1.size() != e2.size()) + return false; + for (int i = 0; i < e1.size(); i++) { + if (!compareDeep(e1.get(i), e2.get(i), allowNull)) + return false; + } + return true; + } + + private static boolean noList(List list) { + return list == null || list.isEmpty(); + } + + public static boolean compareDeep(Base e1, Base e2, boolean allowNull) { + if (e1 == null && e2 == null && allowNull) + return true; + if (e1 == null || e2 == null) + return false; + if (e2.isMetadataBased() && !e1.isMetadataBased()) // respect existing order for debugging consistency; outcome must be the same either way + return e2.equalsDeep(e1); + else + return e1.equalsDeep(e2); + } + + public static boolean compareDeep(XhtmlNode div1, XhtmlNode div2, boolean allowNull) { + if (div1 == null && div2 == null && allowNull) + return true; + if (div1 == null || div2 == null) + return false; + return div1.equalsDeep(div2); + } + + + public static boolean compareValues(List e1, List e2, boolean allowNull) { + if (e1 == null && e2 == null && allowNull) + return true; + if (e1 == null || e2 == null) + return false; + if (e1.size() != e2.size()) + return false; + for (int i = 0; i < e1.size(); i++) { + if (!compareValues(e1.get(i), e2.get(i), allowNull)) + return false; + } + return true; + } + + public static boolean compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull) { + if (e1 == null && e2 == null && allowNull) + return true; + if (e1 == null || e2 == null) + return false; + return e1.equalsShallow(e2); + } + + // -- converters for property setters + + + public BooleanType castToBoolean(Base b) throws FHIRException { + if (b instanceof BooleanType) + return (BooleanType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Boolean"); + } + + public IntegerType castToInteger(Base b) throws FHIRException { + if (b instanceof IntegerType) + return (IntegerType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Integer"); + } + + public DecimalType castToDecimal(Base b) throws FHIRException { + if (b instanceof DecimalType) + return (DecimalType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Decimal"); + } + + public Base64BinaryType castToBase64Binary(Base b) throws FHIRException { + if (b instanceof Base64BinaryType) + return (Base64BinaryType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Base64Binary"); + } + + public InstantType castToInstant(Base b) throws FHIRException { + if (b instanceof InstantType) + return (InstantType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Instant"); + } + + public StringType castToString(Base b) throws FHIRException { + if (b instanceof StringType) + return (StringType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a String"); + } + + public UriType castToUri(Base b) throws FHIRException { + if (b instanceof UriType) + return (UriType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Uri"); + } + + public DateType castToDate(Base b) throws FHIRException { + if (b instanceof DateType) + return (DateType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Date"); + } + + public DateTimeType castToDateTime(Base b) throws FHIRException { + if (b instanceof DateTimeType) + return (DateTimeType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a DateTime"); + } + + public TimeType castToTime(Base b) throws FHIRException { + if (b instanceof TimeType) + return (TimeType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Time"); + } + + public CodeType castToCode(Base b) throws FHIRException { + if (b instanceof CodeType) + return (CodeType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Code"); + } + + public OidType castToOid(Base b) throws FHIRException { + if (b instanceof OidType) + return (OidType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Oid"); + } + + public IdType castToId(Base b) throws FHIRException { + if (b instanceof IdType) + return (IdType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Id"); + } + + public UnsignedIntType castToUnsignedInt(Base b) throws FHIRException { + if (b instanceof UnsignedIntType) + return (UnsignedIntType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a UnsignedInt"); + } + + public PositiveIntType castToPositiveInt(Base b) throws FHIRException { + if (b instanceof PositiveIntType) + return (PositiveIntType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a PositiveInt"); + } + + public MarkdownType castToMarkdown(Base b) throws FHIRException { + if (b instanceof MarkdownType) + return (MarkdownType) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Markdown"); + } + + public Annotation castToAnnotation(Base b) throws FHIRException { + if (b instanceof Annotation) + return (Annotation) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Annotation"); + } + + public Attachment castToAttachment(Base b) throws FHIRException { + if (b instanceof Attachment) + return (Attachment) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Attachment"); + } + + public Identifier castToIdentifier(Base b) throws FHIRException { + if (b instanceof Identifier) + return (Identifier) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Identifier"); + } + + public CodeableConcept castToCodeableConcept(Base b) throws FHIRException { + if (b instanceof CodeableConcept) + return (CodeableConcept) b; + else if (b instanceof CodeType) { + CodeableConcept cc = new CodeableConcept(); + cc.addCoding().setCode(((CodeType) b).asStringValue()); + return cc; + } else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a CodeableConcept"); + } + + public Coding castToCoding(Base b) throws FHIRException { + if (b instanceof Coding) + return (Coding) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Coding"); + } + + public Quantity castToQuantity(Base b) throws FHIRException { + if (b instanceof Quantity) + return (Quantity) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Quantity"); + } + + public Money castToMoney(Base b) throws FHIRException { + if (b instanceof Money) + return (Money) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Money"); + } + + public Duration castToDuration(Base b) throws FHIRException { + if (b instanceof Duration) + return (Duration) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an Duration"); + } + + public SimpleQuantity castToSimpleQuantity(Base b) throws FHIRException { + if (b instanceof SimpleQuantity) + return (SimpleQuantity) b; + else if (b instanceof Quantity) { + Quantity q = (Quantity) b; + SimpleQuantity sq = new SimpleQuantity(); + sq.setValueElement(q.getValueElement()); + sq.setComparatorElement(q.getComparatorElement()); + sq.setUnitElement(q.getUnitElement()); + sq.setSystemElement(q.getSystemElement()); + sq.setCodeElement(q.getCodeElement()); + return sq; + } else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to an SimpleQuantity"); + } + + public Range castToRange(Base b) throws FHIRException { + if (b instanceof Range) + return (Range) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Range"); + } + + public Period castToPeriod(Base b) throws FHIRException { + if (b instanceof Period) + return (Period) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Period"); + } + + public Ratio castToRatio(Base b) throws FHIRException { + if (b instanceof Ratio) + return (Ratio) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Ratio"); + } + + public SampledData castToSampledData(Base b) throws FHIRException { + if (b instanceof SampledData) + return (SampledData) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a SampledData"); + } + + public Signature castToSignature(Base b) throws FHIRException { + if (b instanceof Signature) + return (Signature) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Signature"); + } + + public HumanName castToHumanName(Base b) throws FHIRException { + if (b instanceof HumanName) + return (HumanName) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a HumanName"); + } + + public Address castToAddress(Base b) throws FHIRException { + if (b instanceof Address) + return (Address) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Address"); + } + + public ContactPoint castToContactPoint(Base b) throws FHIRException { + if (b instanceof ContactPoint) + return (ContactPoint) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ContactPoint"); + } + + public Timing castToTiming(Base b) throws FHIRException { + if (b instanceof Timing) + return (Timing) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Timing"); + } + + public Reference castToReference(Base b) throws FHIRException { + if (b instanceof Reference) + return (Reference) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Reference"); + } + + public Meta castToMeta(Base b) throws FHIRException { + if (b instanceof Meta) + return (Meta) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Meta"); + } + + public Extension castToExtension(Base b) throws FHIRException { + if (b instanceof Extension) + return (Extension) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Extension"); + } + + public Resource castToResource(Base b) throws FHIRException { + if (b instanceof Resource) + return (Resource) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Resource"); + } + + public Narrative castToNarrative(Base b) throws FHIRException { + if (b instanceof Narrative) + return (Narrative) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Narrative"); + } + + + public ElementDefinition castToElementDefinition(Base b) throws FHIRException { + if (b instanceof ElementDefinition) + return (ElementDefinition) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ElementDefinition"); + } + + protected boolean isMetadataBased() { + return false; + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base64BinaryType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base64BinaryType.java new file mode 100644 index 00000000000..84d98027dcf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Base64BinaryType.java @@ -0,0 +1,76 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.dstu21.model; + +import org.apache.commons.codec.binary.Base64; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "base64Binary" in FHIR: a sequence of bytes represented in base64 + */ +@DatatypeDef(name="base64binary") +public class Base64BinaryType extends PrimitiveType { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public Base64BinaryType() { + super(); + } + + public Base64BinaryType(byte[] theBytes) { + super(); + setValue(theBytes); + } + + public Base64BinaryType(String theValue) { + super(); + setValueAsString(theValue); + } + + protected byte[] parse(String theValue) { + return Base64.decodeBase64(theValue); + } + + protected String encode(byte[] theValue) { + return Base64.encodeBase64String(theValue); + } + + @Override + public Base64BinaryType copy() { + return new Base64BinaryType(getValue()); + } + + public String fhirType() { + return "base64Binary"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseBinary.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseBinary.java new file mode 100644 index 00000000000..e0881747b45 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseBinary.java @@ -0,0 +1,24 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseBinary; + +public abstract class BaseBinary extends Resource implements IBaseBinary { + + @Override + public String getContentAsBase64() { + return getContentElement().getValueAsString(); + } + + @Override + public BaseBinary setContentAsBase64(String theContent) { + if (theContent != null) { + getContentElement().setValueAsString(theContent); + } else { + setContent(null); + } + return this; + } + + abstract Base64BinaryType getContentElement(); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseDateTimeType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseDateTimeType.java new file mode 100644 index 00000000000..d361551b3a9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseDateTimeType.java @@ -0,0 +1,621 @@ +package org.hl7.fhir.dstu21.model; + +import static org.hl7.fhir.dstu21.model.TemporalPrecisionEnum.DAY; +import static org.hl7.fhir.dstu21.model.TemporalPrecisionEnum.MONTH; +import static org.hl7.fhir.dstu21.model.TemporalPrecisionEnum.YEAR; + +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.TimeZone; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.Validate; +import org.apache.commons.lang3.time.DateUtils; +import org.apache.commons.lang3.time.FastDateFormat; + +public abstract class BaseDateTimeType extends PrimitiveType { + + private static final long serialVersionUID = 1L; + + /* + * Add any new formatters to the static block below!! + */ + private static final List ourFormatters; + + private static final Pattern ourYearDashMonthDashDayPattern = Pattern.compile("[0-9]{4}-[0-9]{2}-[0-9]{2}"); + private static final Pattern ourYearDashMonthPattern = Pattern.compile("[0-9]{4}-[0-9]{2}"); + private static final FastDateFormat ourYearFormat = FastDateFormat.getInstance("yyyy"); + private static final FastDateFormat ourYearMonthDayFormat = FastDateFormat.getInstance("yyyy-MM-dd"); + private static final FastDateFormat ourYearMonthDayNoDashesFormat = FastDateFormat.getInstance("yyyyMMdd"); + private static final Pattern ourYearMonthDayPattern = Pattern.compile("[0-9]{4}[0-9]{2}[0-9]{2}"); + private static final FastDateFormat ourYearMonthDayTimeFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss"); + private static final FastDateFormat ourYearMonthDayTimeMilliFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS"); + private static final FastDateFormat ourYearMonthDayTimeMilliUTCZFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", TimeZone.getTimeZone("UTC")); + private static final FastDateFormat ourYearMonthDayTimeMilliZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSSZZ"); + private static final FastDateFormat ourYearMonthDayTimeUTCZFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC")); + private static final FastDateFormat ourYearMonthDayTimeZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ"); + private static final FastDateFormat ourYearMonthFormat = FastDateFormat.getInstance("yyyy-MM"); + private static final FastDateFormat ourYearMonthNoDashesFormat = FastDateFormat.getInstance("yyyyMM"); + private static final Pattern ourYearMonthPattern = Pattern.compile("[0-9]{4}[0-9]{2}"); + private static final Pattern ourYearPattern = Pattern.compile("[0-9]{4}"); + private static final FastDateFormat ourYearMonthDayTimeMinsFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm"); + private static final FastDateFormat ourYearMonthDayTimeMinsUTCZFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC")); + private static final FastDateFormat ourYearMonthDayTimeMinsZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mmZZ"); + + private static final FastDateFormat ourHumanDateTimeFormat = FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM); + private static final FastDateFormat ourHumanDateFormat = FastDateFormat.getDateInstance(FastDateFormat.MEDIUM); + + static { + ArrayList formatters = new ArrayList(); + formatters.add(ourYearFormat); + formatters.add(ourYearMonthDayFormat); + formatters.add(ourYearMonthDayNoDashesFormat); + formatters.add(ourYearMonthDayTimeFormat); + formatters.add(ourYearMonthDayTimeUTCZFormat); + formatters.add(ourYearMonthDayTimeZoneFormat); + formatters.add(ourYearMonthDayTimeMilliFormat); + formatters.add(ourYearMonthDayTimeMilliUTCZFormat); + formatters.add(ourYearMonthDayTimeMilliZoneFormat); + formatters.add(ourYearMonthDayTimeMinsFormat); + formatters.add(ourYearMonthDayTimeMinsUTCZFormat); + formatters.add(ourYearMonthDayTimeMinsZoneFormat); + formatters.add(ourYearMonthFormat); + formatters.add(ourYearMonthNoDashesFormat); + ourFormatters = Collections.unmodifiableList(formatters); + } + + private TemporalPrecisionEnum myPrecision = TemporalPrecisionEnum.SECOND; + + private TimeZone myTimeZone; + private boolean myTimeZoneZulu = false; + + /** + * Constructor + */ + public BaseDateTimeType() { + // nothing + } + + /** + * Constructor + * + * @throws IllegalArgumentException + * If the specified precision is not allowed for this type + */ + public BaseDateTimeType(Date theDate, TemporalPrecisionEnum thePrecision) { + setValue(theDate, thePrecision); + if (isPrecisionAllowed(thePrecision) == false) { + throw new IllegalArgumentException("Invalid date/time string (datatype " + getClass().getSimpleName() + " does not support " + thePrecision + " precision): " + theDate); + } + } + + /** + * Constructor + * + * @throws IllegalArgumentException + * If the specified precision is not allowed for this type + */ + public BaseDateTimeType(String theString) { + setValueAsString(theString); + if (isPrecisionAllowed(getPrecision()) == false) { + throw new IllegalArgumentException("Invalid date/time string (datatype " + getClass().getSimpleName() + " does not support " + getPrecision() + " precision): " + theString); + } + } + + /** + * Constructor + */ + public BaseDateTimeType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimeZone) { + this(theDate, thePrecision); + setTimeZone(theTimeZone); + } + + private void clearTimeZone() { + myTimeZone = null; + myTimeZoneZulu = false; + } + + @Override + protected String encode(Date theValue) { + if (theValue == null) { + return null; + } else { + switch (myPrecision) { + case DAY: + return ourYearMonthDayFormat.format(theValue); + case MONTH: + return ourYearMonthFormat.format(theValue); + case YEAR: + return ourYearFormat.format(theValue); + case MINUTE: + if (myTimeZoneZulu) { + GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + cal.setTime(theValue); + return ourYearMonthDayTimeMinsFormat.format(cal) + "Z"; + } else if (myTimeZone != null) { + GregorianCalendar cal = new GregorianCalendar(myTimeZone); + cal.setTime(theValue); + return (ourYearMonthDayTimeMinsZoneFormat.format(cal)); + } else { + return ourYearMonthDayTimeMinsFormat.format(theValue); + } + case SECOND: + if (myTimeZoneZulu) { + GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + cal.setTime(theValue); + return ourYearMonthDayTimeFormat.format(cal) + "Z"; + } else if (myTimeZone != null) { + GregorianCalendar cal = new GregorianCalendar(myTimeZone); + cal.setTime(theValue); + return (ourYearMonthDayTimeZoneFormat.format(cal)); + } else { + return ourYearMonthDayTimeFormat.format(theValue); + } + case MILLI: + if (myTimeZoneZulu) { + GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + cal.setTime(theValue); + return ourYearMonthDayTimeMilliFormat.format(cal) + "Z"; + } else if (myTimeZone != null) { + GregorianCalendar cal = new GregorianCalendar(myTimeZone); + cal.setTime(theValue); + return (ourYearMonthDayTimeMilliZoneFormat.format(cal)); + } else { + return ourYearMonthDayTimeMilliFormat.format(theValue); + } + } + throw new IllegalStateException("Invalid precision (this is a bug, shouldn't happen): " + myPrecision); + } + } + + /** + * Returns the default precision for the given datatype + */ + protected abstract TemporalPrecisionEnum getDefaultPrecisionForDatatype(); + + /** + * Gets the precision for this datatype (using the default for the given type if not set) + * + * @see #setPrecision(TemporalPrecisionEnum) + */ + public TemporalPrecisionEnum getPrecision() { + if (myPrecision == null) { + return getDefaultPrecisionForDatatype(); + } + return myPrecision; + } + + /** + * Returns the TimeZone associated with this dateTime's value. May return null if no timezone was + * supplied. + */ + public TimeZone getTimeZone() { + return myTimeZone; + } + + private boolean hasOffset(String theValue) { + boolean inTime = false; + for (int i = 0; i < theValue.length(); i++) { + switch (theValue.charAt(i)) { + case 'T': + inTime = true; + break; + case '+': + case '-': + if (inTime) { + return true; + } + break; + } + } + return false; + } + + /** + * To be implemented by subclasses to indicate whether the given precision is allowed by this type + */ + abstract boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision); + + public boolean isTimeZoneZulu() { + return myTimeZoneZulu; + } + + /** + * Returns true if this object represents a date that is today's date + * + * @throws NullPointerException + * if {@link #getValue()} returns null + */ + public boolean isToday() { + Validate.notNull(getValue(), getClass().getSimpleName() + " contains null value"); + return DateUtils.isSameDay(new Date(), getValue()); + } + + @Override + protected Date parse(String theValue) throws IllegalArgumentException { + try { + if (theValue.length() == 4 && ourYearPattern.matcher(theValue).matches()) { + if (!isPrecisionAllowed(YEAR)) { + // ourLog.debug("Invalid date/time string (datatype " + getClass().getSimpleName() + + // " does not support YEAR precision): " + theValue); + } + setPrecision(YEAR); + clearTimeZone(); + return ((ourYearFormat).parse(theValue)); + } else if (theValue.length() == 6 && ourYearMonthPattern.matcher(theValue).matches()) { + // Eg. 198401 (allow this just to be lenient) + if (!isPrecisionAllowed(MONTH)) { + // ourLog.debug("Invalid date/time string (datatype " + getClass().getSimpleName() + + // " does not support DAY precision): " + theValue); + } + setPrecision(MONTH); + clearTimeZone(); + return ((ourYearMonthNoDashesFormat).parse(theValue)); + } else if (theValue.length() == 7 && ourYearDashMonthPattern.matcher(theValue).matches()) { + // E.g. 1984-01 (this is valid according to the spec) + if (!isPrecisionAllowed(MONTH)) { + // ourLog.debug("Invalid date/time string (datatype " + getClass().getSimpleName() + + // " does not support MONTH precision): " + theValue); + } + setPrecision(MONTH); + clearTimeZone(); + return ((ourYearMonthFormat).parse(theValue)); + } else if (theValue.length() == 8 && ourYearMonthDayPattern.matcher(theValue).matches()) { + // Eg. 19840101 (allow this just to be lenient) + if (!isPrecisionAllowed(DAY)) { + // ourLog.debug("Invalid date/time string (datatype " + getClass().getSimpleName() + + // " does not support DAY precision): " + theValue); + } + setPrecision(DAY); + clearTimeZone(); + return ((ourYearMonthDayNoDashesFormat).parse(theValue)); + } else if (theValue.length() == 10 && ourYearDashMonthDashDayPattern.matcher(theValue).matches()) { + // E.g. 1984-01-01 (this is valid according to the spec) + if (!isPrecisionAllowed(DAY)) { + // ourLog.debug("Invalid date/time string (datatype " + getClass().getSimpleName() + + // " does not support DAY precision): " + theValue); + } + setPrecision(DAY); + clearTimeZone(); + return ((ourYearMonthDayFormat).parse(theValue)); + } else if (theValue.length() >= 16) { // date and time with possible time zone + int firstColonIndex = theValue.indexOf(':'); + if (firstColonIndex == -1) { + throw new IllegalArgumentException("Invalid date/time string: " + theValue); + } + + boolean hasSeconds = theValue.length() > firstColonIndex+3 ? theValue.charAt(firstColonIndex+3) == ':' : false; + + int dotIndex = theValue.length() >= 18 ? theValue.indexOf('.', 18): -1; + boolean hasMillis = dotIndex > -1; + +// if (!hasMillis && !isPrecisionAllowed(SECOND)) { + // ourLog.debug("Invalid date/time string (data type does not support SECONDS precision): " + + // theValue); +// } else if (hasMillis && !isPrecisionAllowed(MILLI)) { + // ourLog.debug("Invalid date/time string (data type " + getClass().getSimpleName() + + // " does not support MILLIS precision):" + theValue); +// } + + Date retVal; + if (hasMillis) { + try { + if (hasOffset(theValue)) { + retVal = ourYearMonthDayTimeMilliZoneFormat.parse(theValue); + } else if (theValue.endsWith("Z")) { + retVal = ourYearMonthDayTimeMilliUTCZFormat.parse(theValue); + } else { + retVal = ourYearMonthDayTimeMilliFormat.parse(theValue); + } + } catch (ParseException p2) { + throw new IllegalArgumentException("Invalid data/time string (" + p2.getMessage() + "): " + theValue); + } + setTimeZone(theValue, hasMillis); + setPrecision(TemporalPrecisionEnum.MILLI); + } else if (hasSeconds) { + try { + if (hasOffset(theValue)) { + retVal = ourYearMonthDayTimeZoneFormat.parse(theValue); + } else if (theValue.endsWith("Z")) { + retVal = ourYearMonthDayTimeUTCZFormat.parse(theValue); + } else { + retVal = ourYearMonthDayTimeFormat.parse(theValue); + } + } catch (ParseException p2) { + throw new IllegalArgumentException("Invalid data/time string (" + p2.getMessage() + "): " + theValue); + } + + setTimeZone(theValue, hasMillis); + setPrecision(TemporalPrecisionEnum.SECOND); + } else { + try { + if (hasOffset(theValue)) { + retVal = ourYearMonthDayTimeMinsZoneFormat.parse(theValue); + } else if (theValue.endsWith("Z")) { + retVal = ourYearMonthDayTimeMinsUTCZFormat.parse(theValue); + } else { + retVal = ourYearMonthDayTimeMinsFormat.parse(theValue); + } + } catch (ParseException p2) { + throw new IllegalArgumentException("Invalid data/time string (" + p2.getMessage() + "): " + theValue, p2); + } + + setTimeZone(theValue, hasMillis); + setPrecision(TemporalPrecisionEnum.MINUTE); + } + + return retVal; + } else { + throw new IllegalArgumentException("Invalid date/time string (invalid length): " + theValue); + } + } catch (ParseException e) { + throw new IllegalArgumentException("Invalid date string (" + e.getMessage() + "): " + theValue); + } + } + + /** + * Sets the precision for this datatype using field values from {@link Calendar}. Valid values are: + *
    + *
  • {@link Calendar#SECOND} + *
  • {@link Calendar#DAY_OF_MONTH} + *
  • {@link Calendar#MONTH} + *
  • {@link Calendar#YEAR} + *
+ * + * @throws IllegalArgumentException + */ + public void setPrecision(TemporalPrecisionEnum thePrecision) throws IllegalArgumentException { + if (thePrecision == null) { + throw new NullPointerException("Precision may not be null"); + } + myPrecision = thePrecision; + updateStringValue(); + } + + private void setTimeZone(String theValueString, boolean hasMillis) { + clearTimeZone(); + int timeZoneStart = 19; + if (hasMillis) + timeZoneStart += 4; + if (theValueString.endsWith("Z")) { + setTimeZoneZulu(true); + } else if (theValueString.indexOf("GMT", timeZoneStart) != -1) { + setTimeZone(TimeZone.getTimeZone(theValueString.substring(timeZoneStart))); + } else if (theValueString.indexOf('+', timeZoneStart) != -1 || theValueString.indexOf('-', timeZoneStart) != -1) { + setTimeZone(TimeZone.getTimeZone("GMT" + theValueString.substring(timeZoneStart))); + } + } + + public void setTimeZone(TimeZone theTimeZone) { + myTimeZone = theTimeZone; + updateStringValue(); + } + + public void setTimeZoneZulu(boolean theTimeZoneZulu) { + myTimeZoneZulu = theTimeZoneZulu; + updateStringValue(); + } + + /** + * Sets the value of this date/time using the default level of precision + * for this datatype + * using the system local time zone + * + * @param theValue + * The date value + */ + @Override + public BaseDateTimeType setValue(Date theValue) { + if (myTimeZoneZulu == false && myTimeZone == null) { + myTimeZone = TimeZone.getDefault(); + } + myPrecision = getDefaultPrecisionForDatatype(); + BaseDateTimeType retVal = (BaseDateTimeType) super.setValue(theValue); + return retVal; + } + + /** + * Sets the value of this date/time using the specified level of precision + * using the system local time zone + * + * @param theValue + * The date value + * @param thePrecision + * The precision + * @throws IllegalArgumentException + */ + public void setValue(Date theValue, TemporalPrecisionEnum thePrecision) throws IllegalArgumentException { + if (myTimeZoneZulu == false && myTimeZone == null) { + myTimeZone = TimeZone.getDefault(); + } + myPrecision = thePrecision; + super.setValue(theValue); + } + + @Override + public void setValueAsString(String theValue) throws IllegalArgumentException { + clearTimeZone(); + super.setValueAsString(theValue); + } + + /** + * For unit tests only + */ + static List getFormatters() { + return ourFormatters; + } + + public boolean before(DateTimeType theDateTimeType) { + return getValue().before(theDateTimeType.getValue()); + } + + public boolean after(DateTimeType theDateTimeType) { + return getValue().after(theDateTimeType.getValue()); + } + + /** + * Returns a human readable version of this date/time using the system local format. + *

+ * Note on time zones: This method renders the value using the time zone + * that is contained within the value. For example, if this date object contains the + * value "2012-01-05T12:00:00-08:00", the human display will be rendered as "12:00:00" + * even if the application is being executed on a system in a different time zone. If + * this behaviour is not what you want, use {@link #toHumanDisplayLocalTimezone()} + * instead. + *

+ */ + public String toHumanDisplay() { + TimeZone tz = getTimeZone(); + Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance(); + value.setTime(getValue()); + + switch (getPrecision()) { + case YEAR: + case MONTH: + case DAY: + return ourHumanDateFormat.format(value); + case MILLI: + case SECOND: + default: + return ourHumanDateTimeFormat.format(value); + } + } + + /** + * Returns a human readable version of this date/time using the system local format, + * converted to the local timezone if neccesary. + * + * @see #toHumanDisplay() for a method which does not convert the time to the local + * timezone before rendering it. + */ + public String toHumanDisplayLocalTimezone() { + switch (getPrecision()) { + case YEAR: + case MONTH: + case DAY: + return ourHumanDateFormat.format(getValue()); + case MILLI: + case SECOND: + default: + return ourHumanDateTimeFormat.format(getValue()); + } + } + + + /** + * Returns a view of this date/time as a Calendar object + */ + public Calendar toCalendar() { + Calendar retVal = Calendar.getInstance(); + retVal.setTime(getValue()); + retVal.setTimeZone(getTimeZone()); + return retVal; + } + + /** + * Sets the TimeZone offset in minutes relative to GMT + */ + public void setOffsetMinutes(int theZoneOffsetMinutes) { + int offsetAbs = Math.abs(theZoneOffsetMinutes); + + int mins = offsetAbs % 60; + int hours = offsetAbs / 60; + + if (theZoneOffsetMinutes < 0) { + setTimeZone(TimeZone.getTimeZone("GMT-" + hours + ":" + mins)); + } else { + setTimeZone(TimeZone.getTimeZone("GMT+" + hours + ":" + mins)); + } + } + + /** + * Returns the time in millis as represented by this Date/Time + */ + public long getTime() { + return getValue().getTime(); + } + + /** + * Adds the given amount to the field specified by theField + * + * @param theField + * The field, uses constants from {@link Calendar} such as {@link Calendar#YEAR} + * @param theValue + * The number to add (or subtract for a negative number) + */ + public void add(int theField, int theValue) { + switch (theField) { + case Calendar.YEAR: + setValue(DateUtils.addYears(getValue(), theValue), getPrecision()); + break; + case Calendar.MONTH: + setValue(DateUtils.addMonths(getValue(), theValue), getPrecision()); + break; + case Calendar.DATE: + setValue(DateUtils.addDays(getValue(), theValue), getPrecision()); + break; + case Calendar.HOUR: + setValue(DateUtils.addHours(getValue(), theValue), getPrecision()); + break; + case Calendar.MINUTE: + setValue(DateUtils.addMinutes(getValue(), theValue), getPrecision()); + break; + case Calendar.SECOND: + setValue(DateUtils.addSeconds(getValue(), theValue), getPrecision()); + break; + case Calendar.MILLISECOND: + setValue(DateUtils.addMilliseconds(getValue(), theValue), getPrecision()); + break; + default: + throw new IllegalArgumentException("Unknown field constant: " + theField); + } + } + + protected void setValueAsV3String(String theV3String) { + if (StringUtils.isBlank(theV3String)) { + setValue(null); + } else { + StringBuilder b = new StringBuilder(); + String timeZone = null; + for (int i = 0; i < theV3String.length(); i++) { + char nextChar = theV3String.charAt(i); + if (nextChar == '+' || nextChar == '-' || nextChar == 'Z') { + timeZone = (theV3String.substring(i)); + break; + } + + // assertEquals("2013-02-02T20:13:03-05:00", DateAndTime.parseV3("20130202201303-0500").toString()); + if (i == 4 || i == 6) { + b.append('-'); + } else if (i == 8) { + b.append('T'); + } else if (i == 10 || i == 12) { + b.append(':'); + } + + b.append(nextChar); + } + + if (b.length() == 16) + b.append(":00"); // schema rule, must have seconds + if (timeZone != null && b.length() > 10) { + if (timeZone.length() ==5) { + b.append(timeZone.substring(0, 3)); + b.append(':'); + b.append(timeZone.substring(3)); + }else { + b.append(timeZone); + } + } + + setValueAsString(b.toString()); + } + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseExtension.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseExtension.java new file mode 100644 index 00000000000..b42f25e59b1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseExtension.java @@ -0,0 +1,17 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; + +public abstract class BaseExtension extends Type implements IBaseExtension, IBaseHasExtensions { + + @Override + public Extension setValue(IBaseDatatype theValue) { + setValue((Type)theValue); + return (Extension) this; + } + + public abstract Extension setValue(Type theValue); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseNarrative.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseNarrative.java new file mode 100644 index 00000000000..b4b1839672b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseNarrative.java @@ -0,0 +1,39 @@ +package org.hl7.fhir.dstu21.model; + +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.INarrative; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; + +public abstract class BaseNarrative extends Type implements INarrative { + + /** + * Sets the value of + * + * @param theString + * @throws Exception + */ + public void setDivAsString(String theString) { + XhtmlNode div; + if (StringUtils.isNotBlank(theString)) { + div = new XhtmlNode(); + div.setValueAsString(theString); + } else { + div = null; + } + setDiv(div); + } + + protected abstract BaseNarrative setDiv(XhtmlNode theDiv); + + public String getDivAsString() { + XhtmlNode div = getDiv(); + if (div != null && !div.isEmpty()) { + return div.getValueAsString(); + } else { + return null; + } + } + + protected abstract XhtmlNode getDiv(); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseReference.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseReference.java new file mode 100644 index 00000000000..b571765d351 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseReference.java @@ -0,0 +1,65 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseReference; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.ICompositeType; +import org.hl7.fhir.instance.model.api.IIdType; + +public abstract class BaseReference extends Type implements IBaseReference, ICompositeType { + + /** + * This is not a part of the "wire format" resource, but can be changed/accessed by parsers + */ + private transient IBaseResource resource; + + public BaseReference(String theReference) { + setReference(theReference); + } + + public BaseReference(IdType theReference) { + if (theReference != null) { + setReference(theReference.getValue()); + } else { + setReference(null); + } + } + + public BaseReference(IAnyResource theResource) { + resource = theResource; + } + + public BaseReference() { + } + + /** + * Retrieves the actual resource referenced by this reference. Note that the resource itself is not + * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property + * may be changed/accessed by parsers. + */ + public IBaseResource getResource() { + return resource; + } + + @Override + public IIdType getReferenceElement() { + return new IdType(getReference()); + } + + abstract String getReference(); + + /** + * Sets the actual resource referenced by this reference. Note that the resource itself is not + * a part of the FHIR "wire format" and is never transmitted or receieved inline, but this property + * may be changed/accessed by parsers. + */ + public void setResource(IBaseResource theResource) { + resource = theResource; + } + + @Override + public boolean isEmpty() { + return resource == null && super.isEmpty(); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseResource.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseResource.java new file mode 100644 index 00000000000..e45a4265e9c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BaseResource.java @@ -0,0 +1,28 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IIdType; + +import ca.uhn.fhir.model.api.IElement; + +public abstract class BaseResource extends Base implements IAnyResource, IElement { + + private static final long serialVersionUID = 1L; + + /** + * @param value The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes. + */ + public BaseResource setId(IIdType value) { + if (value == null) { + setIdElement((IdType)null); + } else if (value instanceof IdType) { + setIdElement((IdType) value); + } else { + setIdElement(new IdType(value.getValue())); + } + return this; + } + + public abstract BaseResource setIdElement(IdType theIdType); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Basic.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Basic.java new file mode 100644 index 00000000000..bb0fa312688 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Basic.java @@ -0,0 +1,421 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ +@ResourceDef(name="Basic", profile="http://hl7.org/fhir/Profile/Basic") +public class Basic extends DomainResource { + + /** + * Identifier assigned to the resource for business purposes, outside the context of FHIR. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) + protected List identifier; + + /** + * Identifies the 'type' of resource - equivalent to the resource name for other resources. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) + protected CodeableConcept code; + + /** + * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource. + */ + @Child(name = "subject", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifies the focus of this resource", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resource." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.) + */ + protected Resource subjectTarget; + + /** + * Indicates who was responsible for creating the resource instance. + */ + @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Indicates who was responsible for creating the resource instance.) + */ + protected Resource authorTarget; + + /** + * Identifies when the resource was first created. + */ + @Child(name = "created", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) + protected DateType created; + + private static final long serialVersionUID = 916539354L; + + /* + * Constructor + */ + public Basic() { + super(); + } + + /* + * Constructor + */ + public Basic(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #identifier} (Identifier assigned to the resource for business purposes, outside the context of FHIR.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier assigned to the resource for business purposes, outside the context of FHIR.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Basic addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #code} (Identifies the 'type' of resource - equivalent to the resource name for other resources.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Basic.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identifies the 'type' of resource - equivalent to the resource name for other resources.) + */ + public Basic setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #subject} (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Basic.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.) + */ + public Basic setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.) + */ + public Basic setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #author} (Indicates who was responsible for creating the resource instance.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Basic.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Indicates who was responsible for creating the resource instance.) + */ + public Basic setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates who was responsible for creating the resource instance.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates who was responsible for creating the resource instance.) + */ + public Basic setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #created} (Identifies when the resource was first created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Basic.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (Identifies when the resource was first created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public Basic setCreatedElement(DateType value) { + this.created = value; + return this; + } + + /** + * @return Identifies when the resource was first created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value Identifies when the resource was first created. + */ + public Basic setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateType(); + this.created.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the resource for business purposes, outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("code", "CodeableConcept", "Identifies the 'type' of resource - equivalent to the resource name for other resources.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("subject", "Reference(Any)", "Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resource.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("author", "Reference(Practitioner|Patient|RelatedPerson)", "Indicates who was responsible for creating the resource instance.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("created", "date", "Identifies when the resource was first created.", 0, java.lang.Integer.MAX_VALUE, created)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("created")) + this.created = castToDate(value); // DateType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type Basic.created"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Basic"; + + } + + public Basic copy() { + Basic dst = new Basic(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.code = code == null ? null : code.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.author = author == null ? null : author.copy(); + dst.created = created == null ? null : created.copy(); + return dst; + } + + protected Basic typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Basic)) + return false; + Basic o = (Basic) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) + && compareDeep(author, o.author, true) && compareDeep(created, o.created, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Basic)) + return false; + Basic o = (Basic) other; + return compareValues(created, o.created, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) + && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (created == null || created.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Basic; + } + + @SearchParamDefinition(name="identifier", path="Basic.identifier", description="Business identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the focus of this resource", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the focus of this resource", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="author", path="Basic.author", description="Who created", type="reference" ) + public static final String SP_AUTHOR = "author"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Binary.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Binary.java new file mode 100644 index 00000000000..aa071f3116e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Binary.java @@ -0,0 +1,252 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ +@ResourceDef(name="Binary", profile="http://hl7.org/fhir/Profile/Binary") +public class Binary extends BaseBinary implements IBaseBinary { + + /** + * MimeType of the binary content represented as a standard MimeType (BCP 13). + */ + @Child(name = "contentType", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." ) + protected CodeType contentType; + + /** + * The actual content, base64 encoded. + */ + @Child(name = "content", type = {Base64BinaryType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." ) + protected Base64BinaryType content; + + private static final long serialVersionUID = 974764407L; + + /* + * Constructor + */ + public Binary() { + super(); + } + + /* + * Constructor + */ + public Binary(CodeType contentType, Base64BinaryType content) { + super(); + this.contentType = contentType; + this.content = content; + } + + /** + * @return {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public CodeType getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Binary.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new CodeType(); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public Binary setContentTypeElement(CodeType value) { + this.contentType = value; + return this; + } + + /** + * @return MimeType of the binary content represented as a standard MimeType (BCP 13). + */ + public String getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value MimeType of the binary content represented as a standard MimeType (BCP 13). + */ + public Binary setContentType(String value) { + if (this.contentType == null) + this.contentType = new CodeType(); + this.contentType.setValue(value); + return this; + } + + /** + * @return {@link #content} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value + */ + public Base64BinaryType getContentElement() { + if (this.content == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Binary.content"); + else if (Configuration.doAutoCreate()) + this.content = new Base64BinaryType(); // bb + return this.content; + } + + public boolean hasContentElement() { + return this.content != null && !this.content.isEmpty(); + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value + */ + public Binary setContentElement(Base64BinaryType value) { + this.content = value; + return this; + } + + /** + * @return The actual content, base64 encoded. + */ + public byte[] getContent() { + return this.content == null ? null : this.content.getValue(); + } + + /** + * @param value The actual content, base64 encoded. + */ + public Binary setContent(byte[] value) { + if (this.content == null) + this.content = new Base64BinaryType(); + this.content.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("contentType", "code", "MimeType of the binary content represented as a standard MimeType (BCP 13).", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("content", "base64Binary", "The actual content, base64 encoded.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("contentType")) + this.contentType = castToCode(value); // CodeType + else if (name.equals("content")) + this.content = castToBase64Binary(value); // Base64BinaryType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type Binary.contentType"); + } + else if (name.equals("content")) { + throw new FHIRException("Cannot call addChild on a primitive type Binary.content"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Binary"; + + } + + public Binary copy() { + Binary dst = new Binary(); + copyValues(dst); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.content = content == null ? null : content.copy(); + return dst; + } + + protected Binary typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Binary)) + return false; + Binary o = (Binary) other; + return compareDeep(contentType, o.contentType, true) && compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Binary)) + return false; + Binary o = (Binary) other; + return compareValues(contentType, o.contentType, true) && compareValues(content, o.content, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (content == null || content.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Binary; + } + + @SearchParamDefinition(name="contenttype", path="Binary.contentType", description="MimeType of the binary content", type="token" ) + public static final String SP_CONTENTTYPE = "contenttype"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BodySite.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BodySite.java new file mode 100644 index 00000000000..82abfde16e7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BodySite.java @@ -0,0 +1,479 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ +@ResourceDef(name="BodySite", profile="http://hl7.org/fhir/Profile/BodySite") +public class BodySite extends DomainResource { + + /** + * The person to which the body site belongs. + */ + @Child(name = "patient", type = {Patient.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient", formalDefinition="The person to which the body site belongs." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person to which the body site belongs.) + */ + protected Patient patientTarget; + + /** + * Identifier for this instance of the anatomical location. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Bodysite identifier", formalDefinition="Identifier for this instance of the anatomical location." ) + protected List identifier; + + /** + * Named anatomical location - ideally coded where possible. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Named anatomical location", formalDefinition="Named anatomical location - ideally coded where possible." ) + protected CodeableConcept code; + + /** + * Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane. + */ + @Child(name = "modifier", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Modification to location code", formalDefinition="Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane." ) + protected List modifier; + + /** + * Description of anatomical location. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The Description of anatomical location", formalDefinition="Description of anatomical location." ) + protected StringType description; + + /** + * Image or images used to identify a location. + */ + @Child(name = "image", type = {Attachment.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." ) + protected List image; + + private static final long serialVersionUID = 1568109920L; + + /* + * Constructor + */ + public BodySite() { + super(); + } + + /* + * Constructor + */ + public BodySite(Reference patient) { + super(); + this.patient = patient; + } + + /** + * @return {@link #patient} (The person to which the body site belongs.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BodySite.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person to which the body site belongs.) + */ + public BodySite setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person to which the body site belongs.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BodySite.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person to which the body site belongs.) + */ + public BodySite setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Identifier for this instance of the anatomical location.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier for this instance of the anatomical location.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public BodySite addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #code} (Named anatomical location - ideally coded where possible.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BodySite.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Named anatomical location - ideally coded where possible.) + */ + public BodySite setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #modifier} (Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.) + */ + public List getModifier() { + if (this.modifier == null) + this.modifier = new ArrayList(); + return this.modifier; + } + + public boolean hasModifier() { + if (this.modifier == null) + return false; + for (CodeableConcept item : this.modifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifier} (Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.) + */ + // syntactic sugar + public CodeableConcept addModifier() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return t; + } + + // syntactic sugar + public BodySite addModifier(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return this; + } + + /** + * @return {@link #description} (Description of anatomical location.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BodySite.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Description of anatomical location.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public BodySite setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Description of anatomical location. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Description of anatomical location. + */ + public BodySite setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #image} (Image or images used to identify a location.) + */ + public List getImage() { + if (this.image == null) + this.image = new ArrayList(); + return this.image; + } + + public boolean hasImage() { + if (this.image == null) + return false; + for (Attachment item : this.image) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #image} (Image or images used to identify a location.) + */ + // syntactic sugar + public Attachment addImage() { //3 + Attachment t = new Attachment(); + if (this.image == null) + this.image = new ArrayList(); + this.image.add(t); + return t; + } + + // syntactic sugar + public BodySite addImage(Attachment t) { //3 + if (t == null) + return this; + if (this.image == null) + this.image = new ArrayList(); + this.image.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("patient", "Reference(Patient)", "The person to which the body site belongs.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("identifier", "Identifier", "Identifier for this instance of the anatomical location.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("code", "CodeableConcept", "Named anatomical location - ideally coded where possible.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("modifier", "CodeableConcept", "Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("description", "string", "Description of anatomical location.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("modifier")) + this.getModifier().add(castToCodeableConcept(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("image")) + this.getImage().add(castToAttachment(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("modifier")) { + return addModifier(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type BodySite.description"); + } + else if (name.equals("image")) { + return addImage(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "BodySite"; + + } + + public BodySite copy() { + BodySite dst = new BodySite(); + copyValues(dst); + dst.patient = patient == null ? null : patient.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.code = code == null ? null : code.copy(); + if (modifier != null) { + dst.modifier = new ArrayList(); + for (CodeableConcept i : modifier) + dst.modifier.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + if (image != null) { + dst.image = new ArrayList(); + for (Attachment i : image) + dst.image.add(i.copy()); + }; + return dst; + } + + protected BodySite typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BodySite)) + return false; + BodySite o = (BodySite) other; + return compareDeep(patient, o.patient, true) && compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) + && compareDeep(modifier, o.modifier, true) && compareDeep(description, o.description, true) && compareDeep(image, o.image, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BodySite)) + return false; + BodySite o = (BodySite) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (patient == null || patient.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (code == null || code.isEmpty()) && (modifier == null || modifier.isEmpty()) && (description == null || description.isEmpty()) + && (image == null || image.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.BodySite; + } + + @SearchParamDefinition(name="identifier", path="BodySite.identifier", description="Identifier for this instance of the anatomical location", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="BodySite.code", description="Named anatomical location", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference" ) + public static final String SP_PATIENT = "patient"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BooleanType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BooleanType.java new file mode 100644 index 00000000000..b2839c332c0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/BooleanType.java @@ -0,0 +1,90 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "boolean" in FHIR "true" or "false" + */ +@DatatypeDef(name="boolean") +public class BooleanType extends PrimitiveType implements IBaseBooleanDatatype { + + private static final long serialVersionUID = 3L; + + public BooleanType() { + super(); + } + + public BooleanType(boolean theBoolean) { + super(); + setValue(theBoolean); + } + + public BooleanType(Boolean theBoolean) { + super(); + setValue(theBoolean); + } + + public BooleanType(String value) { + super(); + setValueAsString(value); + } + + protected Boolean parse(String theValue) { + String value = theValue.trim(); + if ("true".equals(value)) { + return Boolean.TRUE; + } else if ("false".equals(value)) { + return Boolean.FALSE; + } else { + throw new IllegalArgumentException("Invalid boolean string: '" + theValue + "'"); + } + } + + protected String encode(Boolean theValue) { + if (Boolean.TRUE.equals(theValue)) { + return "true"; + } else { + return "false"; + } + } + + public BooleanType copy() { + return new BooleanType(getValue()); + } + public String fhirType() { + return "boolean"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Bundle.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Bundle.java new file mode 100644 index 00000000000..f7144f60e4e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Bundle.java @@ -0,0 +1,2384 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A container for a collection of resources. + */ +@ResourceDef(name="Bundle", profile="http://hl7.org/fhir/Profile/Bundle") +public class Bundle extends Resource implements IBaseBundle { + + public enum BundleType { + /** + * The bundle is a document. The first resource is a Composition. + */ + DOCUMENT, + /** + * The bundle is a message. The first resource is a MessageHeader. + */ + MESSAGE, + /** + * The bundle is a transaction - intended to be processed by a server as an atomic commit. + */ + TRANSACTION, + /** + * The bundle is a transaction response. Because the response is a transaction response, the transactionhas succeeded, and all responses are error free. + */ + TRANSACTIONRESPONSE, + /** + * The bundle is a transaction - intended to be processed by a server as a group of actions. + */ + BATCH, + /** + * The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success. + */ + BATCHRESPONSE, + /** + * The bundle is a list of resources from a history interaction on a server. + */ + HISTORY, + /** + * The bundle is a list of resources returned as a result of a search/query interaction, operation, or message. + */ + SEARCHSET, + /** + * The bundle is a set of resources collected into a single document for ease of distribution. + */ + COLLECTION, + /** + * added to help the parsers + */ + NULL; + public static BundleType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("document".equals(codeString)) + return DOCUMENT; + if ("message".equals(codeString)) + return MESSAGE; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("transaction-response".equals(codeString)) + return TRANSACTIONRESPONSE; + if ("batch".equals(codeString)) + return BATCH; + if ("batch-response".equals(codeString)) + return BATCHRESPONSE; + if ("history".equals(codeString)) + return HISTORY; + if ("searchset".equals(codeString)) + return SEARCHSET; + if ("collection".equals(codeString)) + return COLLECTION; + throw new FHIRException("Unknown BundleType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCUMENT: return "document"; + case MESSAGE: return "message"; + case TRANSACTION: return "transaction"; + case TRANSACTIONRESPONSE: return "transaction-response"; + case BATCH: return "batch"; + case BATCHRESPONSE: return "batch-response"; + case HISTORY: return "history"; + case SEARCHSET: return "searchset"; + case COLLECTION: return "collection"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DOCUMENT: return "http://hl7.org/fhir/bundle-type"; + case MESSAGE: return "http://hl7.org/fhir/bundle-type"; + case TRANSACTION: return "http://hl7.org/fhir/bundle-type"; + case TRANSACTIONRESPONSE: return "http://hl7.org/fhir/bundle-type"; + case BATCH: return "http://hl7.org/fhir/bundle-type"; + case BATCHRESPONSE: return "http://hl7.org/fhir/bundle-type"; + case HISTORY: return "http://hl7.org/fhir/bundle-type"; + case SEARCHSET: return "http://hl7.org/fhir/bundle-type"; + case COLLECTION: return "http://hl7.org/fhir/bundle-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DOCUMENT: return "The bundle is a document. The first resource is a Composition."; + case MESSAGE: return "The bundle is a message. The first resource is a MessageHeader."; + case TRANSACTION: return "The bundle is a transaction - intended to be processed by a server as an atomic commit."; + case TRANSACTIONRESPONSE: return "The bundle is a transaction response. Because the response is a transaction response, the transactionhas succeeded, and all responses are error free."; + case BATCH: return "The bundle is a transaction - intended to be processed by a server as a group of actions."; + case BATCHRESPONSE: return "The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success."; + case HISTORY: return "The bundle is a list of resources from a history interaction on a server."; + case SEARCHSET: return "The bundle is a list of resources returned as a result of a search/query interaction, operation, or message."; + case COLLECTION: return "The bundle is a set of resources collected into a single document for ease of distribution."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCUMENT: return "Document"; + case MESSAGE: return "Message"; + case TRANSACTION: return "Transaction"; + case TRANSACTIONRESPONSE: return "Transaction Response"; + case BATCH: return "Batch"; + case BATCHRESPONSE: return "Batch Response"; + case HISTORY: return "History List"; + case SEARCHSET: return "Search Results"; + case COLLECTION: return "Collection"; + default: return "?"; + } + } + } + + public static class BundleTypeEnumFactory implements EnumFactory { + public BundleType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("document".equals(codeString)) + return BundleType.DOCUMENT; + if ("message".equals(codeString)) + return BundleType.MESSAGE; + if ("transaction".equals(codeString)) + return BundleType.TRANSACTION; + if ("transaction-response".equals(codeString)) + return BundleType.TRANSACTIONRESPONSE; + if ("batch".equals(codeString)) + return BundleType.BATCH; + if ("batch-response".equals(codeString)) + return BundleType.BATCHRESPONSE; + if ("history".equals(codeString)) + return BundleType.HISTORY; + if ("searchset".equals(codeString)) + return BundleType.SEARCHSET; + if ("collection".equals(codeString)) + return BundleType.COLLECTION; + throw new IllegalArgumentException("Unknown BundleType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("document".equals(codeString)) + return new Enumeration(this, BundleType.DOCUMENT); + if ("message".equals(codeString)) + return new Enumeration(this, BundleType.MESSAGE); + if ("transaction".equals(codeString)) + return new Enumeration(this, BundleType.TRANSACTION); + if ("transaction-response".equals(codeString)) + return new Enumeration(this, BundleType.TRANSACTIONRESPONSE); + if ("batch".equals(codeString)) + return new Enumeration(this, BundleType.BATCH); + if ("batch-response".equals(codeString)) + return new Enumeration(this, BundleType.BATCHRESPONSE); + if ("history".equals(codeString)) + return new Enumeration(this, BundleType.HISTORY); + if ("searchset".equals(codeString)) + return new Enumeration(this, BundleType.SEARCHSET); + if ("collection".equals(codeString)) + return new Enumeration(this, BundleType.COLLECTION); + throw new FHIRException("Unknown BundleType code '"+codeString+"'"); + } + public String toCode(BundleType code) { + if (code == BundleType.DOCUMENT) + return "document"; + if (code == BundleType.MESSAGE) + return "message"; + if (code == BundleType.TRANSACTION) + return "transaction"; + if (code == BundleType.TRANSACTIONRESPONSE) + return "transaction-response"; + if (code == BundleType.BATCH) + return "batch"; + if (code == BundleType.BATCHRESPONSE) + return "batch-response"; + if (code == BundleType.HISTORY) + return "history"; + if (code == BundleType.SEARCHSET) + return "searchset"; + if (code == BundleType.COLLECTION) + return "collection"; + return "?"; + } + } + + public enum SearchEntryMode { + /** + * This resource matched the search specification. + */ + MATCH, + /** + * This resource is returned because it is referred to from another resource in the search set. + */ + INCLUDE, + /** + * An OperationOutcome that provides additional information about the processing of a search. + */ + OUTCOME, + /** + * added to help the parsers + */ + NULL; + public static SearchEntryMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("match".equals(codeString)) + return MATCH; + if ("include".equals(codeString)) + return INCLUDE; + if ("outcome".equals(codeString)) + return OUTCOME; + throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MATCH: return "match"; + case INCLUDE: return "include"; + case OUTCOME: return "outcome"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MATCH: return "http://hl7.org/fhir/search-entry-mode"; + case INCLUDE: return "http://hl7.org/fhir/search-entry-mode"; + case OUTCOME: return "http://hl7.org/fhir/search-entry-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MATCH: return "This resource matched the search specification."; + case INCLUDE: return "This resource is returned because it is referred to from another resource in the search set."; + case OUTCOME: return "An OperationOutcome that provides additional information about the processing of a search."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MATCH: return "Match"; + case INCLUDE: return "Include"; + case OUTCOME: return "Outcome"; + default: return "?"; + } + } + } + + public static class SearchEntryModeEnumFactory implements EnumFactory { + public SearchEntryMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("match".equals(codeString)) + return SearchEntryMode.MATCH; + if ("include".equals(codeString)) + return SearchEntryMode.INCLUDE; + if ("outcome".equals(codeString)) + return SearchEntryMode.OUTCOME; + throw new IllegalArgumentException("Unknown SearchEntryMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("match".equals(codeString)) + return new Enumeration(this, SearchEntryMode.MATCH); + if ("include".equals(codeString)) + return new Enumeration(this, SearchEntryMode.INCLUDE); + if ("outcome".equals(codeString)) + return new Enumeration(this, SearchEntryMode.OUTCOME); + throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); + } + public String toCode(SearchEntryMode code) { + if (code == SearchEntryMode.MATCH) + return "match"; + if (code == SearchEntryMode.INCLUDE) + return "include"; + if (code == SearchEntryMode.OUTCOME) + return "outcome"; + return "?"; + } + } + + public enum HTTPVerb { + /** + * HTTP GET + */ + GET, + /** + * HTTP POST + */ + POST, + /** + * HTTP PUT + */ + PUT, + /** + * HTTP DELETE + */ + DELETE, + /** + * added to help the parsers + */ + NULL; + public static HTTPVerb fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GET".equals(codeString)) + return GET; + if ("POST".equals(codeString)) + return POST; + if ("PUT".equals(codeString)) + return PUT; + if ("DELETE".equals(codeString)) + return DELETE; + throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GET: return "GET"; + case POST: return "POST"; + case PUT: return "PUT"; + case DELETE: return "DELETE"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case GET: return "http://hl7.org/fhir/http-verb"; + case POST: return "http://hl7.org/fhir/http-verb"; + case PUT: return "http://hl7.org/fhir/http-verb"; + case DELETE: return "http://hl7.org/fhir/http-verb"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case GET: return "HTTP GET"; + case POST: return "HTTP POST"; + case PUT: return "HTTP PUT"; + case DELETE: return "HTTP DELETE"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GET: return "GET"; + case POST: return "POST"; + case PUT: return "PUT"; + case DELETE: return "DELETE"; + default: return "?"; + } + } + } + + public static class HTTPVerbEnumFactory implements EnumFactory { + public HTTPVerb fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("GET".equals(codeString)) + return HTTPVerb.GET; + if ("POST".equals(codeString)) + return HTTPVerb.POST; + if ("PUT".equals(codeString)) + return HTTPVerb.PUT; + if ("DELETE".equals(codeString)) + return HTTPVerb.DELETE; + throw new IllegalArgumentException("Unknown HTTPVerb code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("GET".equals(codeString)) + return new Enumeration(this, HTTPVerb.GET); + if ("POST".equals(codeString)) + return new Enumeration(this, HTTPVerb.POST); + if ("PUT".equals(codeString)) + return new Enumeration(this, HTTPVerb.PUT); + if ("DELETE".equals(codeString)) + return new Enumeration(this, HTTPVerb.DELETE); + throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); + } + public String toCode(HTTPVerb code) { + if (code == HTTPVerb.GET) + return "GET"; + if (code == HTTPVerb.POST) + return "POST"; + if (code == HTTPVerb.PUT) + return "PUT"; + if (code == HTTPVerb.DELETE) + return "DELETE"; + return "?"; + } + } + + @Block() + public static class BundleLinkComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]. + */ + @Child(name = "relation", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="http://www.iana.org/assignments/link-relations/link-relations.xhtml", formalDefinition="A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]." ) + protected StringType relation; + + /** + * The reference details for the link. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference details for the link", formalDefinition="The reference details for the link." ) + protected UriType url; + + private static final long serialVersionUID = -1010386066L; + + /* + * Constructor + */ + public BundleLinkComponent() { + super(); + } + + /* + * Constructor + */ + public BundleLinkComponent(StringType relation, UriType url) { + super(); + this.relation = relation; + this.url = url; + } + + /** + * @return {@link #relation} (A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].). This is the underlying object with id, value and extensions. The accessor "getRelation" gives direct access to the value + */ + public StringType getRelationElement() { + if (this.relation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleLinkComponent.relation"); + else if (Configuration.doAutoCreate()) + this.relation = new StringType(); // bb + return this.relation; + } + + public boolean hasRelationElement() { + return this.relation != null && !this.relation.isEmpty(); + } + + public boolean hasRelation() { + return this.relation != null && !this.relation.isEmpty(); + } + + /** + * @param value {@link #relation} (A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].). This is the underlying object with id, value and extensions. The accessor "getRelation" gives direct access to the value + */ + public BundleLinkComponent setRelationElement(StringType value) { + this.relation = value; + return this; + } + + /** + * @return A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]. + */ + public String getRelation() { + return this.relation == null ? null : this.relation.getValue(); + } + + /** + * @param value A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]. + */ + public BundleLinkComponent setRelation(String value) { + if (this.relation == null) + this.relation = new StringType(); + this.relation.setValue(value); + return this; + } + + /** + * @return {@link #url} (The reference details for the link.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleLinkComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The reference details for the link.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public BundleLinkComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The reference details for the link. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The reference details for the link. + */ + public BundleLinkComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("relation", "string", "A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].", 0, java.lang.Integer.MAX_VALUE, relation)); + childrenList.add(new Property("url", "uri", "The reference details for the link.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("relation")) + this.relation = castToString(value); // StringType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("relation")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.relation"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.url"); + } + else + return super.addChild(name); + } + + public BundleLinkComponent copy() { + BundleLinkComponent dst = new BundleLinkComponent(); + copyValues(dst); + dst.relation = relation == null ? null : relation.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BundleLinkComponent)) + return false; + BundleLinkComponent o = (BundleLinkComponent) other; + return compareDeep(relation, o.relation, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BundleLinkComponent)) + return false; + BundleLinkComponent o = (BundleLinkComponent) other; + return compareValues(relation, o.relation, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (relation == null || relation.isEmpty()) && (url == null || url.isEmpty()) + ; + } + + public String fhirType() { + return "Bundle.link"; + + } + + } + + @Block() + public static class BundleEntryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A series of links that provide context to this entry. + */ + @Child(name = "link", type = {BundleLinkComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Links related to this entry", formalDefinition="A series of links that provide context to this entry." ) + protected List link; + + /** + * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + */ + @Child(name = "fullUrl", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL for resource (server address, or UUID/OID)", formalDefinition="The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource." ) + protected UriType fullUrl; + + /** + * The Resources for the entry. + */ + @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A resource in the bundle", formalDefinition="The Resources for the entry." ) + protected Resource resource; + + /** + * Information about the search process that lead to the creation of this entry. + */ + @Child(name = "search", type = {}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Search related information", formalDefinition="Information about the search process that lead to the creation of this entry." ) + protected BundleEntrySearchComponent search; + + /** + * Additional information about how this entry should be processed as part of a transaction. + */ + @Child(name = "request", type = {}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Transaction Related Information", formalDefinition="Additional information about how this entry should be processed as part of a transaction." ) + protected BundleEntryRequestComponent request; + + /** + * Additional information about how this entry should be processed as part of a transaction. + */ + @Child(name = "response", type = {}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Transaction Related Information", formalDefinition="Additional information about how this entry should be processed as part of a transaction." ) + protected BundleEntryResponseComponent response; + + private static final long serialVersionUID = 517783054L; + + /* + * Constructor + */ + public BundleEntryComponent() { + super(); + } + + /** + * @return {@link #link} (A series of links that provide context to this entry.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (BundleLinkComponent item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (A series of links that provide context to this entry.) + */ + // syntactic sugar + public BundleLinkComponent addLink() { //3 + BundleLinkComponent t = new BundleLinkComponent(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + // syntactic sugar + public BundleEntryComponent addLink(BundleLinkComponent t) { //3 + if (t == null) + return this; + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + /** + * @return {@link #fullUrl} (The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value + */ + public UriType getFullUrlElement() { + if (this.fullUrl == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryComponent.fullUrl"); + else if (Configuration.doAutoCreate()) + this.fullUrl = new UriType(); // bb + return this.fullUrl; + } + + public boolean hasFullUrlElement() { + return this.fullUrl != null && !this.fullUrl.isEmpty(); + } + + public boolean hasFullUrl() { + return this.fullUrl != null && !this.fullUrl.isEmpty(); + } + + /** + * @param value {@link #fullUrl} (The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value + */ + public BundleEntryComponent setFullUrlElement(UriType value) { + this.fullUrl = value; + return this; + } + + /** + * @return The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + */ + public String getFullUrl() { + return this.fullUrl == null ? null : this.fullUrl.getValue(); + } + + /** + * @param value The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + */ + public BundleEntryComponent setFullUrl(String value) { + if (Utilities.noString(value)) + this.fullUrl = null; + else { + if (this.fullUrl == null) + this.fullUrl = new UriType(); + this.fullUrl.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (The Resources for the entry.) + */ + public Resource getResource() { + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The Resources for the entry.) + */ + public BundleEntryComponent setResource(Resource value) { + this.resource = value; + return this; + } + + /** + * @return {@link #search} (Information about the search process that lead to the creation of this entry.) + */ + public BundleEntrySearchComponent getSearch() { + if (this.search == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryComponent.search"); + else if (Configuration.doAutoCreate()) + this.search = new BundleEntrySearchComponent(); // cc + return this.search; + } + + public boolean hasSearch() { + return this.search != null && !this.search.isEmpty(); + } + + /** + * @param value {@link #search} (Information about the search process that lead to the creation of this entry.) + */ + public BundleEntryComponent setSearch(BundleEntrySearchComponent value) { + this.search = value; + return this; + } + + /** + * @return {@link #request} (Additional information about how this entry should be processed as part of a transaction.) + */ + public BundleEntryRequestComponent getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryComponent.request"); + else if (Configuration.doAutoCreate()) + this.request = new BundleEntryRequestComponent(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Additional information about how this entry should be processed as part of a transaction.) + */ + public BundleEntryComponent setRequest(BundleEntryRequestComponent value) { + this.request = value; + return this; + } + + /** + * @return {@link #response} (Additional information about how this entry should be processed as part of a transaction.) + */ + public BundleEntryResponseComponent getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryComponent.response"); + else if (Configuration.doAutoCreate()) + this.response = new BundleEntryResponseComponent(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Additional information about how this entry should be processed as part of a transaction.) + */ + public BundleEntryComponent setResponse(BundleEntryResponseComponent value) { + this.response = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("link", "@Bundle.link", "A series of links that provide context to this entry.", 0, java.lang.Integer.MAX_VALUE, link)); + childrenList.add(new Property("fullUrl", "uri", "The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.", 0, java.lang.Integer.MAX_VALUE, fullUrl)); + childrenList.add(new Property("resource", "Resource", "The Resources for the entry.", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, java.lang.Integer.MAX_VALUE, search)); + childrenList.add(new Property("request", "", "Additional information about how this entry should be processed as part of a transaction.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "", "Additional information about how this entry should be processed as part of a transaction.", 0, java.lang.Integer.MAX_VALUE, response)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("link")) + this.getLink().add((BundleLinkComponent) value); + else if (name.equals("fullUrl")) + this.fullUrl = castToUri(value); // UriType + else if (name.equals("resource")) + this.resource = castToResource(value); // Resource + else if (name.equals("search")) + this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent + else if (name.equals("request")) + this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent + else if (name.equals("response")) + this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("link")) { + return addLink(); + } + else if (name.equals("fullUrl")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.fullUrl"); + } + else if (name.equals("resource")) { + throw new FHIRException("Cannot call addChild on an abstract type Bundle.resource"); + } + else if (name.equals("search")) { + this.search = new BundleEntrySearchComponent(); + return this.search; + } + else if (name.equals("request")) { + this.request = new BundleEntryRequestComponent(); + return this.request; + } + else if (name.equals("response")) { + this.response = new BundleEntryResponseComponent(); + return this.response; + } + else + return super.addChild(name); + } + + public BundleEntryComponent copy() { + BundleEntryComponent dst = new BundleEntryComponent(); + copyValues(dst); + if (link != null) { + dst.link = new ArrayList(); + for (BundleLinkComponent i : link) + dst.link.add(i.copy()); + }; + dst.fullUrl = fullUrl == null ? null : fullUrl.copy(); + dst.resource = resource == null ? null : resource.copy(); + dst.search = search == null ? null : search.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BundleEntryComponent)) + return false; + BundleEntryComponent o = (BundleEntryComponent) other; + return compareDeep(link, o.link, true) && compareDeep(fullUrl, o.fullUrl, true) && compareDeep(resource, o.resource, true) + && compareDeep(search, o.search, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BundleEntryComponent)) + return false; + BundleEntryComponent o = (BundleEntryComponent) other; + return compareValues(fullUrl, o.fullUrl, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (link == null || link.isEmpty()) && (fullUrl == null || fullUrl.isEmpty()) + && (resource == null || resource.isEmpty()) && (search == null || search.isEmpty()) && (request == null || request.isEmpty()) + && (response == null || response.isEmpty()); + } + + public String fhirType() { + return "Bundle.entry"; + + } + + } + + @Block() + public static class BundleEntrySearchComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Why this entry is in the result set - whether it's included as a match or because of an _include requirement. + */ + @Child(name = "mode", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="match | include | outcome - why this is in the result set", formalDefinition="Why this entry is in the result set - whether it's included as a match or because of an _include requirement." ) + protected Enumeration mode; + + /** + * When searching, the server's search ranking score for the entry. + */ + @Child(name = "score", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Search ranking (between 0 and 1)", formalDefinition="When searching, the server's search ranking score for the entry." ) + protected DecimalType score; + + private static final long serialVersionUID = 837739866L; + + /* + * Constructor + */ + public BundleEntrySearchComponent() { + super(); + } + + /** + * @return {@link #mode} (Why this entry is in the result set - whether it's included as a match or because of an _include requirement.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntrySearchComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new SearchEntryModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (Why this entry is in the result set - whether it's included as a match or because of an _include requirement.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public BundleEntrySearchComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Why this entry is in the result set - whether it's included as a match or because of an _include requirement. + */ + public SearchEntryMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Why this entry is in the result set - whether it's included as a match or because of an _include requirement. + */ + public BundleEntrySearchComponent setMode(SearchEntryMode value) { + if (value == null) + this.mode = null; + else { + if (this.mode == null) + this.mode = new Enumeration(new SearchEntryModeEnumFactory()); + this.mode.setValue(value); + } + return this; + } + + /** + * @return {@link #score} (When searching, the server's search ranking score for the entry.). This is the underlying object with id, value and extensions. The accessor "getScore" gives direct access to the value + */ + public DecimalType getScoreElement() { + if (this.score == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntrySearchComponent.score"); + else if (Configuration.doAutoCreate()) + this.score = new DecimalType(); // bb + return this.score; + } + + public boolean hasScoreElement() { + return this.score != null && !this.score.isEmpty(); + } + + public boolean hasScore() { + return this.score != null && !this.score.isEmpty(); + } + + /** + * @param value {@link #score} (When searching, the server's search ranking score for the entry.). This is the underlying object with id, value and extensions. The accessor "getScore" gives direct access to the value + */ + public BundleEntrySearchComponent setScoreElement(DecimalType value) { + this.score = value; + return this; + } + + /** + * @return When searching, the server's search ranking score for the entry. + */ + public BigDecimal getScore() { + return this.score == null ? null : this.score.getValue(); + } + + /** + * @param value When searching, the server's search ranking score for the entry. + */ + public BundleEntrySearchComponent setScore(BigDecimal value) { + if (value == null) + this.score = null; + else { + if (this.score == null) + this.score = new DecimalType(); + this.score.setValue(value); + } + return this; + } + + /** + * @param value When searching, the server's search ranking score for the entry. + */ + public BundleEntrySearchComponent setScore(long value) { + this.score = new DecimalType(); + this.score.setValue(value); + return this; + } + + /** + * @param value When searching, the server's search ranking score for the entry. + */ + public BundleEntrySearchComponent setScore(double value) { + this.score = new DecimalType(); + this.score.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("mode", "code", "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, java.lang.Integer.MAX_VALUE, score)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("mode")) + this.mode = new SearchEntryModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("score")) + this.score = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.mode"); + } + else if (name.equals("score")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.score"); + } + else + return super.addChild(name); + } + + public BundleEntrySearchComponent copy() { + BundleEntrySearchComponent dst = new BundleEntrySearchComponent(); + copyValues(dst); + dst.mode = mode == null ? null : mode.copy(); + dst.score = score == null ? null : score.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BundleEntrySearchComponent)) + return false; + BundleEntrySearchComponent o = (BundleEntrySearchComponent) other; + return compareDeep(mode, o.mode, true) && compareDeep(score, o.score, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BundleEntrySearchComponent)) + return false; + BundleEntrySearchComponent o = (BundleEntrySearchComponent) other; + return compareValues(mode, o.mode, true) && compareValues(score, o.score, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (mode == null || mode.isEmpty()) && (score == null || score.isEmpty()) + ; + } + + public String fhirType() { + return "Bundle.entry.search"; + + } + + } + + @Block() + public static class BundleEntryRequestComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + */ + @Child(name = "method", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="GET | POST | PUT | DELETE", formalDefinition="The HTTP verb for this entry in either a update history, or a transaction/ transaction response." ) + protected Enumeration method; + + /** + * The URL for this entry, relative to the root (the address to which the request is posted). + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="URL for HTTP equivalent of this entry", formalDefinition="The URL for this entry, relative to the root (the address to which the request is posted)." ) + protected UriType url; + + /** + * If the ETag values match, return a 304 Not modified status. See the API documentation for ["Conditional Read"](http.html#cread). + */ + @Child(name = "ifNoneMatch", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For managing cache currency", formalDefinition="If the ETag values match, return a 304 Not modified status. See the API documentation for [\"Conditional Read\"](http.html#cread)." ) + protected StringType ifNoneMatch; + + /** + * Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). + */ + @Child(name = "ifModifiedSince", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread)." ) + protected InstantType ifModifiedSince; + + /** + * Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). + */ + @Child(name = "ifMatch", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency)." ) + protected StringType ifMatch; + + /** + * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). + */ + @Child(name = "ifNoneExist", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For conditional creates", formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\")." ) + protected StringType ifNoneExist; + + private static final long serialVersionUID = -1349769744L; + + /* + * Constructor + */ + public BundleEntryRequestComponent() { + super(); + } + + /* + * Constructor + */ + public BundleEntryRequestComponent(Enumeration method, UriType url) { + super(); + this.method = method; + this.url = url; + } + + /** + * @return {@link #method} (The HTTP verb for this entry in either a update history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value + */ + public Enumeration getMethodElement() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new Enumeration(new HTTPVerbEnumFactory()); // bb + return this.method; + } + + public boolean hasMethodElement() { + return this.method != null && !this.method.isEmpty(); + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (The HTTP verb for this entry in either a update history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value + */ + public BundleEntryRequestComponent setMethodElement(Enumeration value) { + this.method = value; + return this; + } + + /** + * @return The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + */ + public HTTPVerb getMethod() { + return this.method == null ? null : this.method.getValue(); + } + + /** + * @param value The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + */ + public BundleEntryRequestComponent setMethod(HTTPVerb value) { + if (this.method == null) + this.method = new Enumeration(new HTTPVerbEnumFactory()); + this.method.setValue(value); + return this; + } + + /** + * @return {@link #url} (The URL for this entry, relative to the root (the address to which the request is posted).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The URL for this entry, relative to the root (the address to which the request is posted).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public BundleEntryRequestComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The URL for this entry, relative to the root (the address to which the request is posted). + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The URL for this entry, relative to the root (the address to which the request is posted). + */ + public BundleEntryRequestComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value + */ + public StringType getIfNoneMatchElement() { + if (this.ifNoneMatch == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneMatch"); + else if (Configuration.doAutoCreate()) + this.ifNoneMatch = new StringType(); // bb + return this.ifNoneMatch; + } + + public boolean hasIfNoneMatchElement() { + return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); + } + + public boolean hasIfNoneMatch() { + return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); + } + + /** + * @param value {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value + */ + public BundleEntryRequestComponent setIfNoneMatchElement(StringType value) { + this.ifNoneMatch = value; + return this; + } + + /** + * @return If the ETag values match, return a 304 Not modified status. See the API documentation for ["Conditional Read"](http.html#cread). + */ + public String getIfNoneMatch() { + return this.ifNoneMatch == null ? null : this.ifNoneMatch.getValue(); + } + + /** + * @param value If the ETag values match, return a 304 Not modified status. See the API documentation for ["Conditional Read"](http.html#cread). + */ + public BundleEntryRequestComponent setIfNoneMatch(String value) { + if (Utilities.noString(value)) + this.ifNoneMatch = null; + else { + if (this.ifNoneMatch == null) + this.ifNoneMatch = new StringType(); + this.ifNoneMatch.setValue(value); + } + return this; + } + + /** + * @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value + */ + public InstantType getIfModifiedSinceElement() { + if (this.ifModifiedSince == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifModifiedSince"); + else if (Configuration.doAutoCreate()) + this.ifModifiedSince = new InstantType(); // bb + return this.ifModifiedSince; + } + + public boolean hasIfModifiedSinceElement() { + return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); + } + + public boolean hasIfModifiedSince() { + return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); + } + + /** + * @param value {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value + */ + public BundleEntryRequestComponent setIfModifiedSinceElement(InstantType value) { + this.ifModifiedSince = value; + return this; + } + + /** + * @return Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). + */ + public Date getIfModifiedSince() { + return this.ifModifiedSince == null ? null : this.ifModifiedSince.getValue(); + } + + /** + * @param value Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). + */ + public BundleEntryRequestComponent setIfModifiedSince(Date value) { + if (value == null) + this.ifModifiedSince = null; + else { + if (this.ifModifiedSince == null) + this.ifModifiedSince = new InstantType(); + this.ifModifiedSince.setValue(value); + } + return this; + } + + /** + * @return {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value + */ + public StringType getIfMatchElement() { + if (this.ifMatch == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch"); + else if (Configuration.doAutoCreate()) + this.ifMatch = new StringType(); // bb + return this.ifMatch; + } + + public boolean hasIfMatchElement() { + return this.ifMatch != null && !this.ifMatch.isEmpty(); + } + + public boolean hasIfMatch() { + return this.ifMatch != null && !this.ifMatch.isEmpty(); + } + + /** + * @param value {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value + */ + public BundleEntryRequestComponent setIfMatchElement(StringType value) { + this.ifMatch = value; + return this; + } + + /** + * @return Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). + */ + public String getIfMatch() { + return this.ifMatch == null ? null : this.ifMatch.getValue(); + } + + /** + * @param value Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). + */ + public BundleEntryRequestComponent setIfMatch(String value) { + if (Utilities.noString(value)) + this.ifMatch = null; + else { + if (this.ifMatch == null) + this.ifMatch = new StringType(); + this.ifMatch.setValue(value); + } + return this; + } + + /** + * @return {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value + */ + public StringType getIfNoneExistElement() { + if (this.ifNoneExist == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneExist"); + else if (Configuration.doAutoCreate()) + this.ifNoneExist = new StringType(); // bb + return this.ifNoneExist; + } + + public boolean hasIfNoneExistElement() { + return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); + } + + public boolean hasIfNoneExist() { + return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); + } + + /** + * @param value {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value + */ + public BundleEntryRequestComponent setIfNoneExistElement(StringType value) { + this.ifNoneExist = value; + return this; + } + + /** + * @return Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). + */ + public String getIfNoneExist() { + return this.ifNoneExist == null ? null : this.ifNoneExist.getValue(); + } + + /** + * @param value Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). + */ + public BundleEntryRequestComponent setIfNoneExist(String value) { + if (Utilities.noString(value)) + this.ifNoneExist = null; + else { + if (this.ifNoneExist == null) + this.ifNoneExist = new StringType(); + this.ifNoneExist.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("method", "code", "The HTTP verb for this entry in either a update history, or a transaction/ transaction response.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("url", "uri", "The URL for this entry, relative to the root (the address to which the request is posted).", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch)); + childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); + childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency).", 0, java.lang.Integer.MAX_VALUE, ifMatch)); + childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, java.lang.Integer.MAX_VALUE, ifNoneExist)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("method")) + this.method = new HTTPVerbEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("ifNoneMatch")) + this.ifNoneMatch = castToString(value); // StringType + else if (name.equals("ifModifiedSince")) + this.ifModifiedSince = castToInstant(value); // InstantType + else if (name.equals("ifMatch")) + this.ifMatch = castToString(value); // StringType + else if (name.equals("ifNoneExist")) + this.ifNoneExist = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("method")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.method"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.url"); + } + else if (name.equals("ifNoneMatch")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifNoneMatch"); + } + else if (name.equals("ifModifiedSince")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifModifiedSince"); + } + else if (name.equals("ifMatch")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifMatch"); + } + else if (name.equals("ifNoneExist")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifNoneExist"); + } + else + return super.addChild(name); + } + + public BundleEntryRequestComponent copy() { + BundleEntryRequestComponent dst = new BundleEntryRequestComponent(); + copyValues(dst); + dst.method = method == null ? null : method.copy(); + dst.url = url == null ? null : url.copy(); + dst.ifNoneMatch = ifNoneMatch == null ? null : ifNoneMatch.copy(); + dst.ifModifiedSince = ifModifiedSince == null ? null : ifModifiedSince.copy(); + dst.ifMatch = ifMatch == null ? null : ifMatch.copy(); + dst.ifNoneExist = ifNoneExist == null ? null : ifNoneExist.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BundleEntryRequestComponent)) + return false; + BundleEntryRequestComponent o = (BundleEntryRequestComponent) other; + return compareDeep(method, o.method, true) && compareDeep(url, o.url, true) && compareDeep(ifNoneMatch, o.ifNoneMatch, true) + && compareDeep(ifModifiedSince, o.ifModifiedSince, true) && compareDeep(ifMatch, o.ifMatch, true) + && compareDeep(ifNoneExist, o.ifNoneExist, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BundleEntryRequestComponent)) + return false; + BundleEntryRequestComponent o = (BundleEntryRequestComponent) other; + return compareValues(method, o.method, true) && compareValues(url, o.url, true) && compareValues(ifNoneMatch, o.ifNoneMatch, true) + && compareValues(ifModifiedSince, o.ifModifiedSince, true) && compareValues(ifMatch, o.ifMatch, true) + && compareValues(ifNoneExist, o.ifNoneExist, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (method == null || method.isEmpty()) && (url == null || url.isEmpty()) + && (ifNoneMatch == null || ifNoneMatch.isEmpty()) && (ifModifiedSince == null || ifModifiedSince.isEmpty()) + && (ifMatch == null || ifMatch.isEmpty()) && (ifNoneExist == null || ifNoneExist.isEmpty()) + ; + } + + public String fhirType() { + return "Bundle.entry.request"; + + } + + } + + @Block() + public static class BundleEntryResponseComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The status code returned by processing this entry. + */ + @Child(name = "status", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Status return code for entry", formalDefinition="The status code returned by processing this entry." ) + protected StringType status; + + /** + * The location header created by processing this operation. + */ + @Child(name = "location", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The location, if the operation returns a location", formalDefinition="The location header created by processing this operation." ) + protected UriType location; + + /** + * The etag for the resource, it the operation for the entry produced a versioned resource. + */ + @Child(name = "etag", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The etag for the resource (if relevant)", formalDefinition="The etag for the resource, it the operation for the entry produced a versioned resource." ) + protected StringType etag; + + /** + * The date/time that the resource was modified on the server. + */ + @Child(name = "lastModified", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." ) + protected InstantType lastModified; + + private static final long serialVersionUID = -1526413234L; + + /* + * Constructor + */ + public BundleEntryResponseComponent() { + super(); + } + + /* + * Constructor + */ + public BundleEntryResponseComponent(StringType status) { + super(); + this.status = status; + } + + /** + * @return {@link #status} (The status code returned by processing this entry.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public StringType getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryResponseComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new StringType(); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status code returned by processing this entry.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public BundleEntryResponseComponent setStatusElement(StringType value) { + this.status = value; + return this; + } + + /** + * @return The status code returned by processing this entry. + */ + public String getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status code returned by processing this entry. + */ + public BundleEntryResponseComponent setStatus(String value) { + if (this.status == null) + this.status = new StringType(); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #location} (The location header created by processing this operation.). This is the underlying object with id, value and extensions. The accessor "getLocation" gives direct access to the value + */ + public UriType getLocationElement() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryResponseComponent.location"); + else if (Configuration.doAutoCreate()) + this.location = new UriType(); // bb + return this.location; + } + + public boolean hasLocationElement() { + return this.location != null && !this.location.isEmpty(); + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The location header created by processing this operation.). This is the underlying object with id, value and extensions. The accessor "getLocation" gives direct access to the value + */ + public BundleEntryResponseComponent setLocationElement(UriType value) { + this.location = value; + return this; + } + + /** + * @return The location header created by processing this operation. + */ + public String getLocation() { + return this.location == null ? null : this.location.getValue(); + } + + /** + * @param value The location header created by processing this operation. + */ + public BundleEntryResponseComponent setLocation(String value) { + if (Utilities.noString(value)) + this.location = null; + else { + if (this.location == null) + this.location = new UriType(); + this.location.setValue(value); + } + return this; + } + + /** + * @return {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value + */ + public StringType getEtagElement() { + if (this.etag == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryResponseComponent.etag"); + else if (Configuration.doAutoCreate()) + this.etag = new StringType(); // bb + return this.etag; + } + + public boolean hasEtagElement() { + return this.etag != null && !this.etag.isEmpty(); + } + + public boolean hasEtag() { + return this.etag != null && !this.etag.isEmpty(); + } + + /** + * @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value + */ + public BundleEntryResponseComponent setEtagElement(StringType value) { + this.etag = value; + return this; + } + + /** + * @return The etag for the resource, it the operation for the entry produced a versioned resource. + */ + public String getEtag() { + return this.etag == null ? null : this.etag.getValue(); + } + + /** + * @param value The etag for the resource, it the operation for the entry produced a versioned resource. + */ + public BundleEntryResponseComponent setEtag(String value) { + if (Utilities.noString(value)) + this.etag = null; + else { + if (this.etag == null) + this.etag = new StringType(); + this.etag.setValue(value); + } + return this; + } + + /** + * @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public InstantType getLastModifiedElement() { + if (this.lastModified == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create BundleEntryResponseComponent.lastModified"); + else if (Configuration.doAutoCreate()) + this.lastModified = new InstantType(); // bb + return this.lastModified; + } + + public boolean hasLastModifiedElement() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + public boolean hasLastModified() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + /** + * @param value {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public BundleEntryResponseComponent setLastModifiedElement(InstantType value) { + this.lastModified = value; + return this; + } + + /** + * @return The date/time that the resource was modified on the server. + */ + public Date getLastModified() { + return this.lastModified == null ? null : this.lastModified.getValue(); + } + + /** + * @param value The date/time that the resource was modified on the server. + */ + public BundleEntryResponseComponent setLastModified(Date value) { + if (value == null) + this.lastModified = null; + else { + if (this.lastModified == null) + this.lastModified = new InstantType(); + this.lastModified.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "string", "The status code returned by processing this entry.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("location", "uri", "The location header created by processing this operation.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("etag", "string", "The etag for the resource, it the operation for the entry produced a versioned resource.", 0, java.lang.Integer.MAX_VALUE, etag)); + childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = castToString(value); // StringType + else if (name.equals("location")) + this.location = castToUri(value); // UriType + else if (name.equals("etag")) + this.etag = castToString(value); // StringType + else if (name.equals("lastModified")) + this.lastModified = castToInstant(value); // InstantType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.status"); + } + else if (name.equals("location")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.location"); + } + else if (name.equals("etag")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.etag"); + } + else if (name.equals("lastModified")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.lastModified"); + } + else + return super.addChild(name); + } + + public BundleEntryResponseComponent copy() { + BundleEntryResponseComponent dst = new BundleEntryResponseComponent(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + dst.location = location == null ? null : location.copy(); + dst.etag = etag == null ? null : etag.copy(); + dst.lastModified = lastModified == null ? null : lastModified.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof BundleEntryResponseComponent)) + return false; + BundleEntryResponseComponent o = (BundleEntryResponseComponent) other; + return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true) + && compareDeep(lastModified, o.lastModified, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof BundleEntryResponseComponent)) + return false; + BundleEntryResponseComponent o = (BundleEntryResponseComponent) other; + return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true) + && compareValues(lastModified, o.lastModified, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty()) + && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty()); + } + + public String fhirType() { + return "Bundle.entry.response"; + + } + + } + + /** + * Indicates the purpose of this bundle- how it was intended to be used. + */ + @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", formalDefinition="Indicates the purpose of this bundle- how it was intended to be used." ) + protected Enumeration type; + + /** + * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). + */ + @Child(name = "total", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If search, the total number of matches", formalDefinition="If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)." ) + protected UnsignedIntType total; + + /** + * A series of links that provide context to this bundle. + */ + @Child(name = "link", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." ) + protected List link; + + /** + * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only). + */ + @Child(name = "entry", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Entry in the bundle - will have a resource, or information", formalDefinition="An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)." ) + protected List entry; + + /** + * Digital Signature - base64 encoded. XML DigSIg or a JWT. + */ + @Child(name = "signature", type = {Signature.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Digital Signature", formalDefinition="Digital Signature - base64 encoded. XML DigSIg or a JWT." ) + protected Signature signature; + + private static final long serialVersionUID = -2041954721L; + + /* + * Constructor + */ + public Bundle() { + super(); + } + + /* + * Constructor + */ + public Bundle(Enumeration type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (Indicates the purpose of this bundle- how it was intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Bundle.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new BundleTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Indicates the purpose of this bundle- how it was intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Bundle setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Indicates the purpose of this bundle- how it was intended to be used. + */ + public BundleType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Indicates the purpose of this bundle- how it was intended to be used. + */ + public Bundle setType(BundleType value) { + if (this.type == null) + this.type = new Enumeration(new BundleTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #total} (If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value + */ + public UnsignedIntType getTotalElement() { + if (this.total == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Bundle.total"); + else if (Configuration.doAutoCreate()) + this.total = new UnsignedIntType(); // bb + return this.total; + } + + public boolean hasTotalElement() { + return this.total != null && !this.total.isEmpty(); + } + + public boolean hasTotal() { + return this.total != null && !this.total.isEmpty(); + } + + /** + * @param value {@link #total} (If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value + */ + public Bundle setTotalElement(UnsignedIntType value) { + this.total = value; + return this; + } + + /** + * @return If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). + */ + public int getTotal() { + return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue(); + } + + /** + * @param value If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). + */ + public Bundle setTotal(int value) { + if (this.total == null) + this.total = new UnsignedIntType(); + this.total.setValue(value); + return this; + } + + /** + * @return {@link #link} (A series of links that provide context to this bundle.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (BundleLinkComponent item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (A series of links that provide context to this bundle.) + */ + // syntactic sugar + public BundleLinkComponent addLink() { //3 + BundleLinkComponent t = new BundleLinkComponent(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + // syntactic sugar + public Bundle addLink(BundleLinkComponent t) { //3 + if (t == null) + return this; + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + /** + * @return {@link #entry} (An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).) + */ + public List getEntry() { + if (this.entry == null) + this.entry = new ArrayList(); + return this.entry; + } + + public boolean hasEntry() { + if (this.entry == null) + return false; + for (BundleEntryComponent item : this.entry) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #entry} (An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).) + */ + // syntactic sugar + public BundleEntryComponent addEntry() { //3 + BundleEntryComponent t = new BundleEntryComponent(); + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return t; + } + + // syntactic sugar + public Bundle addEntry(BundleEntryComponent t) { //3 + if (t == null) + return this; + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return this; + } + + /** + * @return {@link #signature} (Digital Signature - base64 encoded. XML DigSIg or a JWT.) + */ + public Signature getSignature() { + if (this.signature == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Bundle.signature"); + else if (Configuration.doAutoCreate()) + this.signature = new Signature(); // cc + return this.signature; + } + + public boolean hasSignature() { + return this.signature != null && !this.signature.isEmpty(); + } + + /** + * @param value {@link #signature} (Digital Signature - base64 encoded. XML DigSIg or a JWT.) + */ + public Bundle setSignature(Signature value) { + this.signature = value; + return this; + } + + /** + * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. + * If no link is found which matches the given relation, returns null. If more than one + * link is found which matches the given relation, returns the first matching BundleLinkComponent. + * + * @param theRelation + * The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. + * @return Returns a matching BundleLinkComponent, or null + * @see IBaseBundle#LINK_NEXT + * @see IBaseBundle#LINK_PREV + * @see IBaseBundle#LINK_SELF + */ + public BundleLinkComponent getLink(String theRelation) { + org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); + for (BundleLinkComponent next : getLink()) { + if (theRelation.equals(next.getRelation())) { + return next; + } + } + return null; + } + + /** + * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. + * If no link is found which matches the given relation, creates a new BundleLinkComponent with the + * given relation and adds it to this Bundle. If more than one + * link is found which matches the given relation, returns the first matching BundleLinkComponent. + * + * @param theRelation + * The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. + * @return Returns a matching BundleLinkComponent, or null + * @see IBaseBundle#LINK_NEXT + * @see IBaseBundle#LINK_PREV + * @see IBaseBundle#LINK_SELF + */ + public BundleLinkComponent getLinkOrCreate(String theRelation) { + org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); + for (BundleLinkComponent next : getLink()) { + if (theRelation.equals(next.getRelation())) { + return next; + } + } + BundleLinkComponent retVal = new BundleLinkComponent(); + retVal.setRelation(theRelation); + getLink().add(retVal); + return retVal; + } + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Indicates the purpose of this bundle- how it was intended to be used.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("total", "unsignedInt", "If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).", 0, java.lang.Integer.MAX_VALUE, total)); + childrenList.add(new Property("link", "", "A series of links that provide context to this bundle.", 0, java.lang.Integer.MAX_VALUE, link)); + childrenList.add(new Property("entry", "", "An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).", 0, java.lang.Integer.MAX_VALUE, entry)); + childrenList.add(new Property("signature", "Signature", "Digital Signature - base64 encoded. XML DigSIg or a JWT.", 0, java.lang.Integer.MAX_VALUE, signature)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new BundleTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("total")) + this.total = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("link")) + this.getLink().add((BundleLinkComponent) value); + else if (name.equals("entry")) + this.getEntry().add((BundleEntryComponent) value); + else if (name.equals("signature")) + this.signature = castToSignature(value); // Signature + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.type"); + } + else if (name.equals("total")) { + throw new FHIRException("Cannot call addChild on a primitive type Bundle.total"); + } + else if (name.equals("link")) { + return addLink(); + } + else if (name.equals("entry")) { + return addEntry(); + } + else if (name.equals("signature")) { + this.signature = new Signature(); + return this.signature; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Bundle"; + + } + + public Bundle copy() { + Bundle dst = new Bundle(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.total = total == null ? null : total.copy(); + if (link != null) { + dst.link = new ArrayList(); + for (BundleLinkComponent i : link) + dst.link.add(i.copy()); + }; + if (entry != null) { + dst.entry = new ArrayList(); + for (BundleEntryComponent i : entry) + dst.entry.add(i.copy()); + }; + dst.signature = signature == null ? null : signature.copy(); + return dst; + } + + protected Bundle typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Bundle)) + return false; + Bundle o = (Bundle) other; + return compareDeep(type, o.type, true) && compareDeep(total, o.total, true) && compareDeep(link, o.link, true) + && compareDeep(entry, o.entry, true) && compareDeep(signature, o.signature, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Bundle)) + return false; + Bundle o = (Bundle) other; + return compareValues(type, o.type, true) && compareValues(total, o.total, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (total == null || total.isEmpty()) + && (link == null || link.isEmpty()) && (entry == null || entry.isEmpty()) && (signature == null || signature.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Bundle; + } + + @SearchParamDefinition(name="composition", path="Bundle.entry.resource.item(0)", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference" ) + public static final String SP_COMPOSITION = "composition"; + @SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="message", path="Bundle.entry.resource.item(0)", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference" ) + public static final String SP_MESSAGE = "message"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CarePlan.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CarePlan.java new file mode 100644 index 00000000000..0198740c505 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CarePlan.java @@ -0,0 +1,3159 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ +@ResourceDef(name="CarePlan", profile="http://hl7.org/fhir/Profile/CarePlan") +public class CarePlan extends DomainResource { + + public enum CarePlanStatus { + /** + * The plan has been suggested but no commitment to it has yet been made. + */ + PROPOSED, + /** + * The plan is in development or awaiting use but is not yet intended to be acted upon. + */ + DRAFT, + /** + * The plan is intended to be followed and used as part of patient care. + */ + ACTIVE, + /** + * The plan is no longer in use and is not expected to be followed or used in patient care. + */ + COMPLETED, + /** + * The plan has been terminated prior to reaching completion (though it may have been replaced by a new plan). + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static CarePlanStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown CarePlanStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/care-plan-status"; + case DRAFT: return "http://hl7.org/fhir/care-plan-status"; + case ACTIVE: return "http://hl7.org/fhir/care-plan-status"; + case COMPLETED: return "http://hl7.org/fhir/care-plan-status"; + case CANCELLED: return "http://hl7.org/fhir/care-plan-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The plan has been suggested but no commitment to it has yet been made."; + case DRAFT: return "The plan is in development or awaiting use but is not yet intended to be acted upon."; + case ACTIVE: return "The plan is intended to be followed and used as part of patient care."; + case COMPLETED: return "The plan is no longer in use and is not expected to be followed or used in patient care."; + case CANCELLED: return "The plan has been terminated prior to reaching completion (though it may have been replaced by a new plan)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case DRAFT: return "Pending"; + case ACTIVE: return "Active"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class CarePlanStatusEnumFactory implements EnumFactory { + public CarePlanStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return CarePlanStatus.PROPOSED; + if ("draft".equals(codeString)) + return CarePlanStatus.DRAFT; + if ("active".equals(codeString)) + return CarePlanStatus.ACTIVE; + if ("completed".equals(codeString)) + return CarePlanStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return CarePlanStatus.CANCELLED; + throw new IllegalArgumentException("Unknown CarePlanStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, CarePlanStatus.PROPOSED); + if ("draft".equals(codeString)) + return new Enumeration(this, CarePlanStatus.DRAFT); + if ("active".equals(codeString)) + return new Enumeration(this, CarePlanStatus.ACTIVE); + if ("completed".equals(codeString)) + return new Enumeration(this, CarePlanStatus.COMPLETED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, CarePlanStatus.CANCELLED); + throw new FHIRException("Unknown CarePlanStatus code '"+codeString+"'"); + } + public String toCode(CarePlanStatus code) { + if (code == CarePlanStatus.PROPOSED) + return "proposed"; + if (code == CarePlanStatus.DRAFT) + return "draft"; + if (code == CarePlanStatus.ACTIVE) + return "active"; + if (code == CarePlanStatus.COMPLETED) + return "completed"; + if (code == CarePlanStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + public enum CarePlanRelationship { + /** + * The referenced plan is considered to be part of this plan. + */ + INCLUDES, + /** + * This plan takes the places of the referenced plan. + */ + REPLACES, + /** + * This plan provides details about how to perform activities defined at a higher level by the referenced plan. + */ + FULFILLS, + /** + * added to help the parsers + */ + NULL; + public static CarePlanRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("includes".equals(codeString)) + return INCLUDES; + if ("replaces".equals(codeString)) + return REPLACES; + if ("fulfills".equals(codeString)) + return FULFILLS; + throw new FHIRException("Unknown CarePlanRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INCLUDES: return "includes"; + case REPLACES: return "replaces"; + case FULFILLS: return "fulfills"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INCLUDES: return "http://hl7.org/fhir/care-plan-relationship"; + case REPLACES: return "http://hl7.org/fhir/care-plan-relationship"; + case FULFILLS: return "http://hl7.org/fhir/care-plan-relationship"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INCLUDES: return "The referenced plan is considered to be part of this plan."; + case REPLACES: return "This plan takes the places of the referenced plan."; + case FULFILLS: return "This plan provides details about how to perform activities defined at a higher level by the referenced plan."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INCLUDES: return "Includes"; + case REPLACES: return "Replaces"; + case FULFILLS: return "Fulfills"; + default: return "?"; + } + } + } + + public static class CarePlanRelationshipEnumFactory implements EnumFactory { + public CarePlanRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("includes".equals(codeString)) + return CarePlanRelationship.INCLUDES; + if ("replaces".equals(codeString)) + return CarePlanRelationship.REPLACES; + if ("fulfills".equals(codeString)) + return CarePlanRelationship.FULFILLS; + throw new IllegalArgumentException("Unknown CarePlanRelationship code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("includes".equals(codeString)) + return new Enumeration(this, CarePlanRelationship.INCLUDES); + if ("replaces".equals(codeString)) + return new Enumeration(this, CarePlanRelationship.REPLACES); + if ("fulfills".equals(codeString)) + return new Enumeration(this, CarePlanRelationship.FULFILLS); + throw new FHIRException("Unknown CarePlanRelationship code '"+codeString+"'"); + } + public String toCode(CarePlanRelationship code) { + if (code == CarePlanRelationship.INCLUDES) + return "includes"; + if (code == CarePlanRelationship.REPLACES) + return "replaces"; + if (code == CarePlanRelationship.FULFILLS) + return "fulfills"; + return "?"; + } + } + + public enum CarePlanActivityStatus { + /** + * Activity is planned but no action has yet been taken. + */ + NOTSTARTED, + /** + * Appointment or other booking has occurred but activity has not yet begun. + */ + SCHEDULED, + /** + * Activity has been started but is not yet complete. + */ + INPROGRESS, + /** + * Activity was started but has temporarily ceased with an expectation of resumption at a future time. + */ + ONHOLD, + /** + * The activities have been completed (more or less) as planned. + */ + COMPLETED, + /** + * The activities have been ended prior to completion (perhaps even before they were started). + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static CarePlanActivityStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-started".equals(codeString)) + return NOTSTARTED; + if ("scheduled".equals(codeString)) + return SCHEDULED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSTARTED: return "not-started"; + case SCHEDULED: return "scheduled"; + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NOTSTARTED: return "http://hl7.org/fhir/care-plan-activity-status"; + case SCHEDULED: return "http://hl7.org/fhir/care-plan-activity-status"; + case INPROGRESS: return "http://hl7.org/fhir/care-plan-activity-status"; + case ONHOLD: return "http://hl7.org/fhir/care-plan-activity-status"; + case COMPLETED: return "http://hl7.org/fhir/care-plan-activity-status"; + case CANCELLED: return "http://hl7.org/fhir/care-plan-activity-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NOTSTARTED: return "Activity is planned but no action has yet been taken."; + case SCHEDULED: return "Appointment or other booking has occurred but activity has not yet begun."; + case INPROGRESS: return "Activity has been started but is not yet complete."; + case ONHOLD: return "Activity was started but has temporarily ceased with an expectation of resumption at a future time."; + case COMPLETED: return "The activities have been completed (more or less) as planned."; + case CANCELLED: return "The activities have been ended prior to completion (perhaps even before they were started)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSTARTED: return "Not Started"; + case SCHEDULED: return "Scheduled"; + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class CarePlanActivityStatusEnumFactory implements EnumFactory { + public CarePlanActivityStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("not-started".equals(codeString)) + return CarePlanActivityStatus.NOTSTARTED; + if ("scheduled".equals(codeString)) + return CarePlanActivityStatus.SCHEDULED; + if ("in-progress".equals(codeString)) + return CarePlanActivityStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return CarePlanActivityStatus.ONHOLD; + if ("completed".equals(codeString)) + return CarePlanActivityStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return CarePlanActivityStatus.CANCELLED; + throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("not-started".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.NOTSTARTED); + if ("scheduled".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.SCHEDULED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.INPROGRESS); + if ("on-hold".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.ONHOLD); + if ("completed".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.COMPLETED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, CarePlanActivityStatus.CANCELLED); + throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); + } + public String toCode(CarePlanActivityStatus code) { + if (code == CarePlanActivityStatus.NOTSTARTED) + return "not-started"; + if (code == CarePlanActivityStatus.SCHEDULED) + return "scheduled"; + if (code == CarePlanActivityStatus.INPROGRESS) + return "in-progress"; + if (code == CarePlanActivityStatus.ONHOLD) + return "on-hold"; + if (code == CarePlanActivityStatus.COMPLETED) + return "completed"; + if (code == CarePlanActivityStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + @Block() + public static class CarePlanRelatedPlanComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the type of relationship this plan has to the target plan. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="includes | replaces | fulfills", formalDefinition="Identifies the type of relationship this plan has to the target plan." ) + protected Enumeration code; + + /** + * A reference to the plan to which a relationship is asserted. + */ + @Child(name = "plan", type = {CarePlan.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Plan relationship exists with", formalDefinition="A reference to the plan to which a relationship is asserted." ) + protected Reference plan; + + /** + * The actual object that is the target of the reference (A reference to the plan to which a relationship is asserted.) + */ + protected CarePlan planTarget; + + private static final long serialVersionUID = 1875598050L; + + /* + * Constructor + */ + public CarePlanRelatedPlanComponent() { + super(); + } + + /* + * Constructor + */ + public CarePlanRelatedPlanComponent(Reference plan) { + super(); + this.plan = plan; + } + + /** + * @return {@link #code} (Identifies the type of relationship this plan has to the target plan.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanRelatedPlanComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new CarePlanRelationshipEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identifies the type of relationship this plan has to the target plan.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CarePlanRelatedPlanComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return Identifies the type of relationship this plan has to the target plan. + */ + public CarePlanRelationship getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Identifies the type of relationship this plan has to the target plan. + */ + public CarePlanRelatedPlanComponent setCode(CarePlanRelationship value) { + if (value == null) + this.code = null; + else { + if (this.code == null) + this.code = new Enumeration(new CarePlanRelationshipEnumFactory()); + this.code.setValue(value); + } + return this; + } + + /** + * @return {@link #plan} (A reference to the plan to which a relationship is asserted.) + */ + public Reference getPlan() { + if (this.plan == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanRelatedPlanComponent.plan"); + else if (Configuration.doAutoCreate()) + this.plan = new Reference(); // cc + return this.plan; + } + + public boolean hasPlan() { + return this.plan != null && !this.plan.isEmpty(); + } + + /** + * @param value {@link #plan} (A reference to the plan to which a relationship is asserted.) + */ + public CarePlanRelatedPlanComponent setPlan(Reference value) { + this.plan = value; + return this; + } + + /** + * @return {@link #plan} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the plan to which a relationship is asserted.) + */ + public CarePlan getPlanTarget() { + if (this.planTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanRelatedPlanComponent.plan"); + else if (Configuration.doAutoCreate()) + this.planTarget = new CarePlan(); // aa + return this.planTarget; + } + + /** + * @param value {@link #plan} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the plan to which a relationship is asserted.) + */ + public CarePlanRelatedPlanComponent setPlanTarget(CarePlan value) { + this.planTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "Identifies the type of relationship this plan has to the target plan.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("plan", "Reference(CarePlan)", "A reference to the plan to which a relationship is asserted.", 0, java.lang.Integer.MAX_VALUE, plan)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = new CarePlanRelationshipEnumFactory().fromType(value); // Enumeration + else if (name.equals("plan")) + this.plan = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.code"); + } + else if (name.equals("plan")) { + this.plan = new Reference(); + return this.plan; + } + else + return super.addChild(name); + } + + public CarePlanRelatedPlanComponent copy() { + CarePlanRelatedPlanComponent dst = new CarePlanRelatedPlanComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.plan = plan == null ? null : plan.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CarePlanRelatedPlanComponent)) + return false; + CarePlanRelatedPlanComponent o = (CarePlanRelatedPlanComponent) other; + return compareDeep(code, o.code, true) && compareDeep(plan, o.plan, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CarePlanRelatedPlanComponent)) + return false; + CarePlanRelatedPlanComponent o = (CarePlanRelatedPlanComponent) other; + return compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (plan == null || plan.isEmpty()) + ; + } + + public String fhirType() { + return "CarePlan.relatedPlan"; + + } + + } + + @Block() + public static class CarePlanParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates specific responsibility of an individual within the care plan; e.g. "Primary physician", "Team coordinator", "Caregiver", etc. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of involvement", formalDefinition="Indicates specific responsibility of an individual within the care plan; e.g. \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc." ) + protected CodeableConcept role; + + /** + * The specific person or organization who is participating/expected to participate in the care plan. + */ + @Child(name = "member", type = {Practitioner.class, RelatedPerson.class, Patient.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who is involved", formalDefinition="The specific person or organization who is participating/expected to participate in the care plan." ) + protected Reference member; + + /** + * The actual object that is the target of the reference (The specific person or organization who is participating/expected to participate in the care plan.) + */ + protected Resource memberTarget; + + private static final long serialVersionUID = -466811117L; + + /* + * Constructor + */ + public CarePlanParticipantComponent() { + super(); + } + + /** + * @return {@link #role} (Indicates specific responsibility of an individual within the care plan; e.g. "Primary physician", "Team coordinator", "Caregiver", etc.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanParticipantComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (Indicates specific responsibility of an individual within the care plan; e.g. "Primary physician", "Team coordinator", "Caregiver", etc.) + */ + public CarePlanParticipantComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } + + /** + * @return {@link #member} (The specific person or organization who is participating/expected to participate in the care plan.) + */ + public Reference getMember() { + if (this.member == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanParticipantComponent.member"); + else if (Configuration.doAutoCreate()) + this.member = new Reference(); // cc + return this.member; + } + + public boolean hasMember() { + return this.member != null && !this.member.isEmpty(); + } + + /** + * @param value {@link #member} (The specific person or organization who is participating/expected to participate in the care plan.) + */ + public CarePlanParticipantComponent setMember(Reference value) { + this.member = value; + return this; + } + + /** + * @return {@link #member} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care plan.) + */ + public Resource getMemberTarget() { + return this.memberTarget; + } + + /** + * @param value {@link #member} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care plan.) + */ + public CarePlanParticipantComponent setMemberTarget(Resource value) { + this.memberTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "CodeableConcept", "Indicates specific responsibility of an individual within the care plan; e.g. \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("member", "Reference(Practitioner|RelatedPerson|Patient|Organization)", "The specific person or organization who is participating/expected to participate in the care plan.", 0, java.lang.Integer.MAX_VALUE, member)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.role = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("member")) + this.member = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + this.role = new CodeableConcept(); + return this.role; + } + else if (name.equals("member")) { + this.member = new Reference(); + return this.member; + } + else + return super.addChild(name); + } + + public CarePlanParticipantComponent copy() { + CarePlanParticipantComponent dst = new CarePlanParticipantComponent(); + copyValues(dst); + dst.role = role == null ? null : role.copy(); + dst.member = member == null ? null : member.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CarePlanParticipantComponent)) + return false; + CarePlanParticipantComponent o = (CarePlanParticipantComponent) other; + return compareDeep(role, o.role, true) && compareDeep(member, o.member, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CarePlanParticipantComponent)) + return false; + CarePlanParticipantComponent o = (CarePlanParticipantComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty()) + ; + } + + public String fhirType() { + return "CarePlan.participant"; + + } + + } + + @Block() + public static class CarePlanActivityComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc. + */ + @Child(name = "actionResulting", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Appointments, orders, etc.", formalDefinition="Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc." ) + protected List actionResulting; + /** + * The actual objects that are the target of the reference (Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.) + */ + protected List actionResultingTarget; + + + /** + * Notes about the adherence/status/progress of the activity. + */ + @Child(name = "progress", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Comments about the activity status/progress", formalDefinition="Notes about the adherence/status/progress of the activity." ) + protected List progress; + + /** + * The details of the proposed activity represented in a specific resource. + */ + @Child(name = "reference", type = {Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationOrder.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, SupplyRequest.class, VisionPrescription.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Activity details defined in specific resource", formalDefinition="The details of the proposed activity represented in a specific resource." ) + protected Reference reference; + + /** + * The actual object that is the target of the reference (The details of the proposed activity represented in a specific resource.) + */ + protected Resource referenceTarget; + + /** + * A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc. + */ + @Child(name = "detail", type = {}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="In-line definition of activity", formalDefinition="A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc." ) + protected CarePlanActivityDetailComponent detail; + + private static final long serialVersionUID = 40181608L; + + /* + * Constructor + */ + public CarePlanActivityComponent() { + super(); + } + + /** + * @return {@link #actionResulting} (Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.) + */ + public List getActionResulting() { + if (this.actionResulting == null) + this.actionResulting = new ArrayList(); + return this.actionResulting; + } + + public boolean hasActionResulting() { + if (this.actionResulting == null) + return false; + for (Reference item : this.actionResulting) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actionResulting} (Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.) + */ + // syntactic sugar + public Reference addActionResulting() { //3 + Reference t = new Reference(); + if (this.actionResulting == null) + this.actionResulting = new ArrayList(); + this.actionResulting.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityComponent addActionResulting(Reference t) { //3 + if (t == null) + return this; + if (this.actionResulting == null) + this.actionResulting = new ArrayList(); + this.actionResulting.add(t); + return this; + } + + /** + * @return {@link #actionResulting} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.) + */ + public List getActionResultingTarget() { + if (this.actionResultingTarget == null) + this.actionResultingTarget = new ArrayList(); + return this.actionResultingTarget; + } + + /** + * @return {@link #progress} (Notes about the adherence/status/progress of the activity.) + */ + public List getProgress() { + if (this.progress == null) + this.progress = new ArrayList(); + return this.progress; + } + + public boolean hasProgress() { + if (this.progress == null) + return false; + for (Annotation item : this.progress) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #progress} (Notes about the adherence/status/progress of the activity.) + */ + // syntactic sugar + public Annotation addProgress() { //3 + Annotation t = new Annotation(); + if (this.progress == null) + this.progress = new ArrayList(); + this.progress.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityComponent addProgress(Annotation t) { //3 + if (t == null) + return this; + if (this.progress == null) + this.progress = new ArrayList(); + this.progress.add(t); + return this; + } + + /** + * @return {@link #reference} (The details of the proposed activity represented in a specific resource.) + */ + public Reference getReference() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new Reference(); // cc + return this.reference; + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (The details of the proposed activity represented in a specific resource.) + */ + public CarePlanActivityComponent setReference(Reference value) { + this.reference = value; + return this; + } + + /** + * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The details of the proposed activity represented in a specific resource.) + */ + public Resource getReferenceTarget() { + return this.referenceTarget; + } + + /** + * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The details of the proposed activity represented in a specific resource.) + */ + public CarePlanActivityComponent setReferenceTarget(Resource value) { + this.referenceTarget = value; + return this; + } + + /** + * @return {@link #detail} (A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.) + */ + public CarePlanActivityDetailComponent getDetail() { + if (this.detail == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityComponent.detail"); + else if (Configuration.doAutoCreate()) + this.detail = new CarePlanActivityDetailComponent(); // cc + return this.detail; + } + + public boolean hasDetail() { + return this.detail != null && !this.detail.isEmpty(); + } + + /** + * @param value {@link #detail} (A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.) + */ + public CarePlanActivityComponent setDetail(CarePlanActivityDetailComponent value) { + this.detail = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionResulting", "Reference(Any)", "Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.", 0, java.lang.Integer.MAX_VALUE, actionResulting)); + childrenList.add(new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress)); + childrenList.add(new Property("reference", "Reference(Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationOrder|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|SupplyRequest|VisionPrescription)", "The details of the proposed activity represented in a specific resource.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("detail", "", "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionResulting")) + this.getActionResulting().add(castToReference(value)); + else if (name.equals("progress")) + this.getProgress().add(castToAnnotation(value)); + else if (name.equals("reference")) + this.reference = castToReference(value); // Reference + else if (name.equals("detail")) + this.detail = (CarePlanActivityDetailComponent) value; // CarePlanActivityDetailComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionResulting")) { + return addActionResulting(); + } + else if (name.equals("progress")) { + return addProgress(); + } + else if (name.equals("reference")) { + this.reference = new Reference(); + return this.reference; + } + else if (name.equals("detail")) { + this.detail = new CarePlanActivityDetailComponent(); + return this.detail; + } + else + return super.addChild(name); + } + + public CarePlanActivityComponent copy() { + CarePlanActivityComponent dst = new CarePlanActivityComponent(); + copyValues(dst); + if (actionResulting != null) { + dst.actionResulting = new ArrayList(); + for (Reference i : actionResulting) + dst.actionResulting.add(i.copy()); + }; + if (progress != null) { + dst.progress = new ArrayList(); + for (Annotation i : progress) + dst.progress.add(i.copy()); + }; + dst.reference = reference == null ? null : reference.copy(); + dst.detail = detail == null ? null : detail.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CarePlanActivityComponent)) + return false; + CarePlanActivityComponent o = (CarePlanActivityComponent) other; + return compareDeep(actionResulting, o.actionResulting, true) && compareDeep(progress, o.progress, true) + && compareDeep(reference, o.reference, true) && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CarePlanActivityComponent)) + return false; + CarePlanActivityComponent o = (CarePlanActivityComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (actionResulting == null || actionResulting.isEmpty()) && (progress == null || progress.isEmpty()) + && (reference == null || reference.isEmpty()) && (detail == null || detail.isEmpty()); + } + + public String fhirType() { + return "CarePlan.activity"; + + } + + } + + @Block() + public static class CarePlanActivityDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * High-level categorization of the type of activity in a care plan. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="diet | drug | encounter | observation | procedure | supply | other", formalDefinition="High-level categorization of the type of activity in a care plan." ) + protected CodeableConcept category; + + /** + * Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Detail type of activity", formalDefinition="Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter." ) + protected CodeableConcept code; + + /** + * Provides the rationale that drove the inclusion of this particular activity as part of the plan. + */ + @Child(name = "reasonCode", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Why activity should be done", formalDefinition="Provides the rationale that drove the inclusion of this particular activity as part of the plan." ) + protected List reasonCode; + + /** + * Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan. + */ + @Child(name = "reasonReference", type = {Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Condition triggering need for activity", formalDefinition="Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan." ) + protected List reasonReference; + /** + * The actual objects that are the target of the reference (Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.) + */ + protected List reasonReferenceTarget; + + + /** + * Internal reference that identifies the goals that this activity is intended to contribute towards meeting. + */ + @Child(name = "goal", type = {Goal.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Goals this activity relates to", formalDefinition="Internal reference that identifies the goals that this activity is intended to contribute towards meeting." ) + protected List goal; + /** + * The actual objects that are the target of the reference (Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) + */ + protected List goalTarget; + + + /** + * Identifies what progress is being made for the specific activity. + */ + @Child(name = "status", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=false) + @Description(shortDefinition="not-started | scheduled | in-progress | on-hold | completed | cancelled", formalDefinition="Identifies what progress is being made for the specific activity." ) + protected Enumeration status; + + /** + * Provides reason why the activity isn't yet started, is on hold, was cancelled, etc. + */ + @Child(name = "statusReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reason for current status", formalDefinition="Provides reason why the activity isn't yet started, is on hold, was cancelled, etc." ) + protected CodeableConcept statusReason; + + /** + * If true, indicates that the described activity is one that must NOT be engaged in when following the plan. + */ + @Child(name = "prohibited", type = {BooleanType.class}, order=8, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="Do NOT do", formalDefinition="If true, indicates that the described activity is one that must NOT be engaged in when following the plan." ) + protected BooleanType prohibited; + + /** + * The period, timing or frequency upon which the described activity is to occur. + */ + @Child(name = "scheduled", type = {Timing.class, Period.class, StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When activity is to occur", formalDefinition="The period, timing or frequency upon which the described activity is to occur." ) + protected Type scheduled; + + /** + * Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc. + */ + @Child(name = "location", type = {Location.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Where it should happen", formalDefinition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) + */ + protected Location locationTarget; + + /** + * Identifies who's expected to be involved in the activity. + */ + @Child(name = "performer", type = {Practitioner.class, Organization.class, RelatedPerson.class, Patient.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Who will be responsible?", formalDefinition="Identifies who's expected to be involved in the activity." ) + protected List performer; + /** + * The actual objects that are the target of the reference (Identifies who's expected to be involved in the activity.) + */ + protected List performerTarget; + + + /** + * Identifies the food, drug or other product to be consumed or supplied in the activity. + */ + @Child(name = "product", type = {CodeableConcept.class, Medication.class, Substance.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What is to be administered/supplied", formalDefinition="Identifies the food, drug or other product to be consumed or supplied in the activity." ) + protected Type product; + + /** + * Identifies the quantity expected to be consumed in a given day. + */ + @Child(name = "dailyAmount", type = {SimpleQuantity.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How to consume/day?", formalDefinition="Identifies the quantity expected to be consumed in a given day." ) + protected SimpleQuantity dailyAmount; + + /** + * Identifies the quantity expected to be supplied, administered or consumed by the subject. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How much to administer/supply/consume", formalDefinition="Identifies the quantity expected to be supplied, administered or consumed by the subject." ) + protected SimpleQuantity quantity; + + /** + * This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc. + */ + @Child(name = "description", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Extra info describing activity to perform", formalDefinition="This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc." ) + protected StringType description; + + private static final long serialVersionUID = -1763965702L; + + /* + * Constructor + */ + public CarePlanActivityDetailComponent() { + super(); + } + + /* + * Constructor + */ + public CarePlanActivityDetailComponent(BooleanType prohibited) { + super(); + this.prohibited = prohibited; + } + + /** + * @return {@link #category} (High-level categorization of the type of activity in a care plan.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (High-level categorization of the type of activity in a care plan.) + */ + public CarePlanActivityDetailComponent setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #code} (Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.) + */ + public CarePlanActivityDetailComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #reasonCode} (Provides the rationale that drove the inclusion of this particular activity as part of the plan.) + */ + public List getReasonCode() { + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + return this.reasonCode; + } + + public boolean hasReasonCode() { + if (this.reasonCode == null) + return false; + for (CodeableConcept item : this.reasonCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonCode} (Provides the rationale that drove the inclusion of this particular activity as part of the plan.) + */ + // syntactic sugar + public CodeableConcept addReasonCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityDetailComponent addReasonCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return this; + } + + /** + * @return {@link #reasonReference} (Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.) + */ + public List getReasonReference() { + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + return this.reasonReference; + } + + public boolean hasReasonReference() { + if (this.reasonReference == null) + return false; + for (Reference item : this.reasonReference) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonReference} (Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.) + */ + // syntactic sugar + public Reference addReasonReference() { //3 + Reference t = new Reference(); + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityDetailComponent addReasonReference(Reference t) { //3 + if (t == null) + return this; + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); + return this; + } + + /** + * @return {@link #reasonReference} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.) + */ + public List getReasonReferenceTarget() { + if (this.reasonReferenceTarget == null) + this.reasonReferenceTarget = new ArrayList(); + return this.reasonReferenceTarget; + } + + // syntactic sugar + /** + * @return {@link #reasonReference} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.) + */ + public Condition addReasonReferenceTarget() { + Condition r = new Condition(); + if (this.reasonReferenceTarget == null) + this.reasonReferenceTarget = new ArrayList(); + this.reasonReferenceTarget.add(r); + return r; + } + + /** + * @return {@link #goal} (Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) + */ + public List getGoal() { + if (this.goal == null) + this.goal = new ArrayList(); + return this.goal; + } + + public boolean hasGoal() { + if (this.goal == null) + return false; + for (Reference item : this.goal) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #goal} (Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) + */ + // syntactic sugar + public Reference addGoal() { //3 + Reference t = new Reference(); + if (this.goal == null) + this.goal = new ArrayList(); + this.goal.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityDetailComponent addGoal(Reference t) { //3 + if (t == null) + return this; + if (this.goal == null) + this.goal = new ArrayList(); + this.goal.add(t); + return this; + } + + /** + * @return {@link #goal} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) + */ + public List getGoalTarget() { + if (this.goalTarget == null) + this.goalTarget = new ArrayList(); + return this.goalTarget; + } + + // syntactic sugar + /** + * @return {@link #goal} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) + */ + public Goal addGoalTarget() { + Goal r = new Goal(); + if (this.goalTarget == null) + this.goalTarget = new ArrayList(); + this.goalTarget.add(r); + return r; + } + + /** + * @return {@link #status} (Identifies what progress is being made for the specific activity.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new CarePlanActivityStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Identifies what progress is being made for the specific activity.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public CarePlanActivityDetailComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Identifies what progress is being made for the specific activity. + */ + public CarePlanActivityStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Identifies what progress is being made for the specific activity. + */ + public CarePlanActivityDetailComponent setStatus(CarePlanActivityStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new CarePlanActivityStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #statusReason} (Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.) + */ + public CodeableConcept getStatusReason() { + if (this.statusReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.statusReason"); + else if (Configuration.doAutoCreate()) + this.statusReason = new CodeableConcept(); // cc + return this.statusReason; + } + + public boolean hasStatusReason() { + return this.statusReason != null && !this.statusReason.isEmpty(); + } + + /** + * @param value {@link #statusReason} (Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.) + */ + public CarePlanActivityDetailComponent setStatusReason(CodeableConcept value) { + this.statusReason = value; + return this; + } + + /** + * @return {@link #prohibited} (If true, indicates that the described activity is one that must NOT be engaged in when following the plan.). This is the underlying object with id, value and extensions. The accessor "getProhibited" gives direct access to the value + */ + public BooleanType getProhibitedElement() { + if (this.prohibited == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.prohibited"); + else if (Configuration.doAutoCreate()) + this.prohibited = new BooleanType(); // bb + return this.prohibited; + } + + public boolean hasProhibitedElement() { + return this.prohibited != null && !this.prohibited.isEmpty(); + } + + public boolean hasProhibited() { + return this.prohibited != null && !this.prohibited.isEmpty(); + } + + /** + * @param value {@link #prohibited} (If true, indicates that the described activity is one that must NOT be engaged in when following the plan.). This is the underlying object with id, value and extensions. The accessor "getProhibited" gives direct access to the value + */ + public CarePlanActivityDetailComponent setProhibitedElement(BooleanType value) { + this.prohibited = value; + return this; + } + + /** + * @return If true, indicates that the described activity is one that must NOT be engaged in when following the plan. + */ + public boolean getProhibited() { + return this.prohibited == null || this.prohibited.isEmpty() ? false : this.prohibited.getValue(); + } + + /** + * @param value If true, indicates that the described activity is one that must NOT be engaged in when following the plan. + */ + public CarePlanActivityDetailComponent setProhibited(boolean value) { + if (this.prohibited == null) + this.prohibited = new BooleanType(); + this.prohibited.setValue(value); + return this; + } + + /** + * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) + */ + public Type getScheduled() { + return this.scheduled; + } + + /** + * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) + */ + public Timing getScheduledTiming() throws FHIRException { + if (!(this.scheduled instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (Timing) this.scheduled; + } + + public boolean hasScheduledTiming() { + return this.scheduled instanceof Timing; + } + + /** + * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) + */ + public Period getScheduledPeriod() throws FHIRException { + if (!(this.scheduled instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (Period) this.scheduled; + } + + public boolean hasScheduledPeriod() { + return this.scheduled instanceof Period; + } + + /** + * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) + */ + public StringType getScheduledStringType() throws FHIRException { + if (!(this.scheduled instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (StringType) this.scheduled; + } + + public boolean hasScheduledStringType() { + return this.scheduled instanceof StringType; + } + + public boolean hasScheduled() { + return this.scheduled != null && !this.scheduled.isEmpty(); + } + + /** + * @param value {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) + */ + public CarePlanActivityDetailComponent setScheduled(Type value) { + this.scheduled = value; + return this; + } + + /** + * @return {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) + */ + public CarePlanActivityDetailComponent setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) + */ + public CarePlanActivityDetailComponent setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #performer} (Identifies who's expected to be involved in the activity.) + */ + public List getPerformer() { + if (this.performer == null) + this.performer = new ArrayList(); + return this.performer; + } + + public boolean hasPerformer() { + if (this.performer == null) + return false; + for (Reference item : this.performer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #performer} (Identifies who's expected to be involved in the activity.) + */ + // syntactic sugar + public Reference addPerformer() { //3 + Reference t = new Reference(); + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return t; + } + + // syntactic sugar + public CarePlanActivityDetailComponent addPerformer(Reference t) { //3 + if (t == null) + return this; + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return this; + } + + /** + * @return {@link #performer} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies who's expected to be involved in the activity.) + */ + public List getPerformerTarget() { + if (this.performerTarget == null) + this.performerTarget = new ArrayList(); + return this.performerTarget; + } + + /** + * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) + */ + public Type getProduct() { + return this.product; + } + + /** + * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) + */ + public CodeableConcept getProductCodeableConcept() throws FHIRException { + if (!(this.product instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.product.getClass().getName()+" was encountered"); + return (CodeableConcept) this.product; + } + + public boolean hasProductCodeableConcept() { + return this.product instanceof CodeableConcept; + } + + /** + * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) + */ + public Reference getProductReference() throws FHIRException { + if (!(this.product instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.product.getClass().getName()+" was encountered"); + return (Reference) this.product; + } + + public boolean hasProductReference() { + return this.product instanceof Reference; + } + + public boolean hasProduct() { + return this.product != null && !this.product.isEmpty(); + } + + /** + * @param value {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) + */ + public CarePlanActivityDetailComponent setProduct(Type value) { + this.product = value; + return this; + } + + /** + * @return {@link #dailyAmount} (Identifies the quantity expected to be consumed in a given day.) + */ + public SimpleQuantity getDailyAmount() { + if (this.dailyAmount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.dailyAmount"); + else if (Configuration.doAutoCreate()) + this.dailyAmount = new SimpleQuantity(); // cc + return this.dailyAmount; + } + + public boolean hasDailyAmount() { + return this.dailyAmount != null && !this.dailyAmount.isEmpty(); + } + + /** + * @param value {@link #dailyAmount} (Identifies the quantity expected to be consumed in a given day.) + */ + public CarePlanActivityDetailComponent setDailyAmount(SimpleQuantity value) { + this.dailyAmount = value; + return this; + } + + /** + * @return {@link #quantity} (Identifies the quantity expected to be supplied, administered or consumed by the subject.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (Identifies the quantity expected to be supplied, administered or consumed by the subject.) + */ + public CarePlanActivityDetailComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #description} (This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public CarePlanActivityDetailComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc. + */ + public CarePlanActivityDetailComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("category", "CodeableConcept", "High-level categorization of the type of activity in a care plan.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("code", "CodeableConcept", "Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("reasonCode", "CodeableConcept", "Provides the rationale that drove the inclusion of this particular activity as part of the plan.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); + childrenList.add(new Property("reasonReference", "Reference(Condition)", "Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); + childrenList.add(new Property("goal", "Reference(Goal)", "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", 0, java.lang.Integer.MAX_VALUE, goal)); + childrenList.add(new Property("status", "code", "Identifies what progress is being made for the specific activity.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("statusReason", "CodeableConcept", "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", 0, java.lang.Integer.MAX_VALUE, statusReason)); + childrenList.add(new Property("prohibited", "boolean", "If true, indicates that the described activity is one that must NOT be engaged in when following the plan.", 0, java.lang.Integer.MAX_VALUE, prohibited)); + childrenList.add(new Property("scheduled[x]", "Timing|Period|string", "The period, timing or frequency upon which the described activity is to occur.", 0, java.lang.Integer.MAX_VALUE, scheduled)); + childrenList.add(new Property("location", "Reference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("performer", "Reference(Practitioner|Organization|RelatedPerson|Patient)", "Identifies who's expected to be involved in the activity.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, java.lang.Integer.MAX_VALUE, product)); + childrenList.add(new Property("dailyAmount", "SimpleQuantity", "Identifies the quantity expected to be consumed in a given day.", 0, java.lang.Integer.MAX_VALUE, dailyAmount)); + childrenList.add(new Property("quantity", "SimpleQuantity", "Identifies the quantity expected to be supplied, administered or consumed by the subject.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("description", "string", "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", 0, java.lang.Integer.MAX_VALUE, description)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("reasonCode")) + this.getReasonCode().add(castToCodeableConcept(value)); + else if (name.equals("reasonReference")) + this.getReasonReference().add(castToReference(value)); + else if (name.equals("goal")) + this.getGoal().add(castToReference(value)); + else if (name.equals("status")) + this.status = new CarePlanActivityStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("statusReason")) + this.statusReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("prohibited")) + this.prohibited = castToBoolean(value); // BooleanType + else if (name.equals("scheduled[x]")) + this.scheduled = (Type) value; // Type + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("performer")) + this.getPerformer().add(castToReference(value)); + else if (name.equals("product[x]")) + this.product = (Type) value; // Type + else if (name.equals("dailyAmount")) + this.dailyAmount = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("description")) + this.description = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("reasonCode")) { + return addReasonCode(); + } + else if (name.equals("reasonReference")) { + return addReasonReference(); + } + else if (name.equals("goal")) { + return addGoal(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.status"); + } + else if (name.equals("statusReason")) { + this.statusReason = new CodeableConcept(); + return this.statusReason; + } + else if (name.equals("prohibited")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.prohibited"); + } + else if (name.equals("scheduledTiming")) { + this.scheduled = new Timing(); + return this.scheduled; + } + else if (name.equals("scheduledPeriod")) { + this.scheduled = new Period(); + return this.scheduled; + } + else if (name.equals("scheduledString")) { + this.scheduled = new StringType(); + return this.scheduled; + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("performer")) { + return addPerformer(); + } + else if (name.equals("productCodeableConcept")) { + this.product = new CodeableConcept(); + return this.product; + } + else if (name.equals("productReference")) { + this.product = new Reference(); + return this.product; + } + else if (name.equals("dailyAmount")) { + this.dailyAmount = new SimpleQuantity(); + return this.dailyAmount; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.description"); + } + else + return super.addChild(name); + } + + public CarePlanActivityDetailComponent copy() { + CarePlanActivityDetailComponent dst = new CarePlanActivityDetailComponent(); + copyValues(dst); + dst.category = category == null ? null : category.copy(); + dst.code = code == null ? null : code.copy(); + if (reasonCode != null) { + dst.reasonCode = new ArrayList(); + for (CodeableConcept i : reasonCode) + dst.reasonCode.add(i.copy()); + }; + if (reasonReference != null) { + dst.reasonReference = new ArrayList(); + for (Reference i : reasonReference) + dst.reasonReference.add(i.copy()); + }; + if (goal != null) { + dst.goal = new ArrayList(); + for (Reference i : goal) + dst.goal.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.statusReason = statusReason == null ? null : statusReason.copy(); + dst.prohibited = prohibited == null ? null : prohibited.copy(); + dst.scheduled = scheduled == null ? null : scheduled.copy(); + dst.location = location == null ? null : location.copy(); + if (performer != null) { + dst.performer = new ArrayList(); + for (Reference i : performer) + dst.performer.add(i.copy()); + }; + dst.product = product == null ? null : product.copy(); + dst.dailyAmount = dailyAmount == null ? null : dailyAmount.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.description = description == null ? null : description.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CarePlanActivityDetailComponent)) + return false; + CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other; + return compareDeep(category, o.category, true) && compareDeep(code, o.code, true) && compareDeep(reasonCode, o.reasonCode, true) + && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(goal, o.goal, true) && compareDeep(status, o.status, true) + && compareDeep(statusReason, o.statusReason, true) && compareDeep(prohibited, o.prohibited, true) + && compareDeep(scheduled, o.scheduled, true) && compareDeep(location, o.location, true) && compareDeep(performer, o.performer, true) + && compareDeep(product, o.product, true) && compareDeep(dailyAmount, o.dailyAmount, true) && compareDeep(quantity, o.quantity, true) + && compareDeep(description, o.description, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CarePlanActivityDetailComponent)) + return false; + CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other; + return compareValues(status, o.status, true) && compareValues(prohibited, o.prohibited, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) + && (reasonCode == null || reasonCode.isEmpty()) && (reasonReference == null || reasonReference.isEmpty()) + && (goal == null || goal.isEmpty()) && (status == null || status.isEmpty()) && (statusReason == null || statusReason.isEmpty()) + && (prohibited == null || prohibited.isEmpty()) && (scheduled == null || scheduled.isEmpty()) + && (location == null || location.isEmpty()) && (performer == null || performer.isEmpty()) + && (product == null || product.isEmpty()) && (dailyAmount == null || dailyAmount.isEmpty()) + && (quantity == null || quantity.isEmpty()) && (description == null || description.isEmpty()) + ; + } + + public String fhirType() { + return "CarePlan.activity.detail"; + + } + + } + + /** + * This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * Identifies the patient or group whose intended care is described by the plan. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient or group whose intended care is described by the plan." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Identifies the patient or group whose intended care is described by the plan.) + */ + protected Resource subjectTarget; + + /** + * Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | active | completed | cancelled", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record." ) + protected Enumeration status; + + /** + * Identifies the context in which this particular CarePlan is defined. + */ + @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Created in context of", formalDefinition="Identifies the context in which this particular CarePlan is defined." ) + protected Reference context; + + /** + * The actual object that is the target of the reference (Identifies the context in which this particular CarePlan is defined.) + */ + protected Resource contextTarget; + + /** + * Indicates when the plan did (or is intended to) come into effect and end. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) + protected Period period; + + /** + * Identifies the individual(s) or ogranization who is responsible for the content of the care plan. + */ + @Child(name = "author", type = {Patient.class, Practitioner.class, RelatedPerson.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who is responsible for contents of the plan", formalDefinition="Identifies the individual(s) or ogranization who is responsible for the content of the care plan." ) + protected List author; + /** + * The actual objects that are the target of the reference (Identifies the individual(s) or ogranization who is responsible for the content of the care plan.) + */ + protected List authorTarget; + + + /** + * Identifies the most recent date on which the plan has been revised. + */ + @Child(name = "modified", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) + protected DateTimeType modified; + + /** + * Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of plan", formalDefinition="Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc." ) + protected List category; + + /** + * A description of the scope and nature of the plan. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Summary of nature of plan", formalDefinition="A description of the scope and nature of the plan." ) + protected StringType description; + + /** + * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. + */ + @Child(name = "addresses", type = {Condition.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) + protected List addresses; + /** + * The actual objects that are the target of the reference (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) + */ + protected List addressesTarget; + + + /** + * Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc. + */ + @Child(name = "support", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Information considered as part of plan", formalDefinition="Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc." ) + protected List support; + /** + * The actual objects that are the target of the reference (Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.) + */ + protected List supportTarget; + + + /** + * Identifies CarePlans with some sort of formal relationship to the current plan. + */ + @Child(name = "relatedPlan", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Plans related to this one", formalDefinition="Identifies CarePlans with some sort of formal relationship to the current plan." ) + protected List relatedPlan; + + /** + * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. + */ + @Child(name = "participant", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) + protected List participant; + + /** + * Describes the intended objective(s) of carrying out the care plan. + */ + @Child(name = "goal", type = {Goal.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the care plan." ) + protected List goal; + /** + * The actual objects that are the target of the reference (Describes the intended objective(s) of carrying out the care plan.) + */ + protected List goalTarget; + + + /** + * Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. + */ + @Child(name = "activity", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Action to occur as part of plan", formalDefinition="Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) + protected List activity; + + /** + * General notes about the care plan not covered elsewhere. + */ + @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) + protected Annotation note; + + private static final long serialVersionUID = -307500543L; + + /* + * Constructor + */ + public CarePlan() { + super(); + } + + /* + * Constructor + */ + public CarePlan(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public CarePlan addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (Identifies the patient or group whose intended care is described by the plan.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Identifies the patient or group whose intended care is described by the plan.) + */ + public CarePlan setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient or group whose intended care is described by the plan.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient or group whose intended care is described by the plan.) + */ + public CarePlan setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new CarePlanStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public CarePlan setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. + */ + public CarePlanStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. + */ + public CarePlan setStatus(CarePlanStatus value) { + if (this.status == null) + this.status = new Enumeration(new CarePlanStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #context} (Identifies the context in which this particular CarePlan is defined.) + */ + public Reference getContext() { + if (this.context == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.context"); + else if (Configuration.doAutoCreate()) + this.context = new Reference(); // cc + return this.context; + } + + public boolean hasContext() { + return this.context != null && !this.context.isEmpty(); + } + + /** + * @param value {@link #context} (Identifies the context in which this particular CarePlan is defined.) + */ + public CarePlan setContext(Reference value) { + this.context = value; + return this; + } + + /** + * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the context in which this particular CarePlan is defined.) + */ + public Resource getContextTarget() { + return this.contextTarget; + } + + /** + * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the context in which this particular CarePlan is defined.) + */ + public CarePlan setContextTarget(Resource value) { + this.contextTarget = value; + return this; + } + + /** + * @return {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) + */ + public CarePlan setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #author} (Identifies the individual(s) or ogranization who is responsible for the content of the care plan.) + */ + public List getAuthor() { + if (this.author == null) + this.author = new ArrayList(); + return this.author; + } + + public boolean hasAuthor() { + if (this.author == null) + return false; + for (Reference item : this.author) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #author} (Identifies the individual(s) or ogranization who is responsible for the content of the care plan.) + */ + // syntactic sugar + public Reference addAuthor() { //3 + Reference t = new Reference(); + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return t; + } + + // syntactic sugar + public CarePlan addAuthor(Reference t) { //3 + if (t == null) + return this; + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return this; + } + + /** + * @return {@link #author} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the individual(s) or ogranization who is responsible for the content of the care plan.) + */ + public List getAuthorTarget() { + if (this.authorTarget == null) + this.authorTarget = new ArrayList(); + return this.authorTarget; + } + + /** + * @return {@link #modified} (Identifies the most recent date on which the plan has been revised.). This is the underlying object with id, value and extensions. The accessor "getModified" gives direct access to the value + */ + public DateTimeType getModifiedElement() { + if (this.modified == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.modified"); + else if (Configuration.doAutoCreate()) + this.modified = new DateTimeType(); // bb + return this.modified; + } + + public boolean hasModifiedElement() { + return this.modified != null && !this.modified.isEmpty(); + } + + public boolean hasModified() { + return this.modified != null && !this.modified.isEmpty(); + } + + /** + * @param value {@link #modified} (Identifies the most recent date on which the plan has been revised.). This is the underlying object with id, value and extensions. The accessor "getModified" gives direct access to the value + */ + public CarePlan setModifiedElement(DateTimeType value) { + this.modified = value; + return this; + } + + /** + * @return Identifies the most recent date on which the plan has been revised. + */ + public Date getModified() { + return this.modified == null ? null : this.modified.getValue(); + } + + /** + * @param value Identifies the most recent date on which the plan has been revised. + */ + public CarePlan setModified(Date value) { + if (value == null) + this.modified = null; + else { + if (this.modified == null) + this.modified = new DateTimeType(); + this.modified.setValue(value); + } + return this; + } + + /** + * @return {@link #category} (Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.) + */ + public List getCategory() { + if (this.category == null) + this.category = new ArrayList(); + return this.category; + } + + public boolean hasCategory() { + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #category} (Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.) + */ + // syntactic sugar + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + // syntactic sugar + public CarePlan addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; + } + + /** + * @return {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public CarePlan setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the scope and nature of the plan. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the scope and nature of the plan. + */ + public CarePlan setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #addresses} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) + */ + public List getAddresses() { + if (this.addresses == null) + this.addresses = new ArrayList(); + return this.addresses; + } + + public boolean hasAddresses() { + if (this.addresses == null) + return false; + for (Reference item : this.addresses) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #addresses} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) + */ + // syntactic sugar + public Reference addAddresses() { //3 + Reference t = new Reference(); + if (this.addresses == null) + this.addresses = new ArrayList(); + this.addresses.add(t); + return t; + } + + // syntactic sugar + public CarePlan addAddresses(Reference t) { //3 + if (t == null) + return this; + if (this.addresses == null) + this.addresses = new ArrayList(); + this.addresses.add(t); + return this; + } + + /** + * @return {@link #addresses} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) + */ + public List getAddressesTarget() { + if (this.addressesTarget == null) + this.addressesTarget = new ArrayList(); + return this.addressesTarget; + } + + // syntactic sugar + /** + * @return {@link #addresses} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) + */ + public Condition addAddressesTarget() { + Condition r = new Condition(); + if (this.addressesTarget == null) + this.addressesTarget = new ArrayList(); + this.addressesTarget.add(r); + return r; + } + + /** + * @return {@link #support} (Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.) + */ + public List getSupport() { + if (this.support == null) + this.support = new ArrayList(); + return this.support; + } + + public boolean hasSupport() { + if (this.support == null) + return false; + for (Reference item : this.support) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #support} (Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.) + */ + // syntactic sugar + public Reference addSupport() { //3 + Reference t = new Reference(); + if (this.support == null) + this.support = new ArrayList(); + this.support.add(t); + return t; + } + + // syntactic sugar + public CarePlan addSupport(Reference t) { //3 + if (t == null) + return this; + if (this.support == null) + this.support = new ArrayList(); + this.support.add(t); + return this; + } + + /** + * @return {@link #support} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.) + */ + public List getSupportTarget() { + if (this.supportTarget == null) + this.supportTarget = new ArrayList(); + return this.supportTarget; + } + + /** + * @return {@link #relatedPlan} (Identifies CarePlans with some sort of formal relationship to the current plan.) + */ + public List getRelatedPlan() { + if (this.relatedPlan == null) + this.relatedPlan = new ArrayList(); + return this.relatedPlan; + } + + public boolean hasRelatedPlan() { + if (this.relatedPlan == null) + return false; + for (CarePlanRelatedPlanComponent item : this.relatedPlan) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #relatedPlan} (Identifies CarePlans with some sort of formal relationship to the current plan.) + */ + // syntactic sugar + public CarePlanRelatedPlanComponent addRelatedPlan() { //3 + CarePlanRelatedPlanComponent t = new CarePlanRelatedPlanComponent(); + if (this.relatedPlan == null) + this.relatedPlan = new ArrayList(); + this.relatedPlan.add(t); + return t; + } + + // syntactic sugar + public CarePlan addRelatedPlan(CarePlanRelatedPlanComponent t) { //3 + if (t == null) + return this; + if (this.relatedPlan == null) + this.relatedPlan = new ArrayList(); + this.relatedPlan.add(t); + return this; + } + + /** + * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (CarePlanParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.) + */ + // syntactic sugar + public CarePlanParticipantComponent addParticipant() { //3 + CarePlanParticipantComponent t = new CarePlanParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public CarePlan addParticipant(CarePlanParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return {@link #goal} (Describes the intended objective(s) of carrying out the care plan.) + */ + public List getGoal() { + if (this.goal == null) + this.goal = new ArrayList(); + return this.goal; + } + + public boolean hasGoal() { + if (this.goal == null) + return false; + for (Reference item : this.goal) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #goal} (Describes the intended objective(s) of carrying out the care plan.) + */ + // syntactic sugar + public Reference addGoal() { //3 + Reference t = new Reference(); + if (this.goal == null) + this.goal = new ArrayList(); + this.goal.add(t); + return t; + } + + // syntactic sugar + public CarePlan addGoal(Reference t) { //3 + if (t == null) + return this; + if (this.goal == null) + this.goal = new ArrayList(); + this.goal.add(t); + return this; + } + + /** + * @return {@link #goal} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Describes the intended objective(s) of carrying out the care plan.) + */ + public List getGoalTarget() { + if (this.goalTarget == null) + this.goalTarget = new ArrayList(); + return this.goalTarget; + } + + // syntactic sugar + /** + * @return {@link #goal} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Describes the intended objective(s) of carrying out the care plan.) + */ + public Goal addGoalTarget() { + Goal r = new Goal(); + if (this.goalTarget == null) + this.goalTarget = new ArrayList(); + this.goalTarget.add(r); + return r; + } + + /** + * @return {@link #activity} (Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) + */ + public List getActivity() { + if (this.activity == null) + this.activity = new ArrayList(); + return this.activity; + } + + public boolean hasActivity() { + if (this.activity == null) + return false; + for (CarePlanActivityComponent item : this.activity) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #activity} (Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) + */ + // syntactic sugar + public CarePlanActivityComponent addActivity() { //3 + CarePlanActivityComponent t = new CarePlanActivityComponent(); + if (this.activity == null) + this.activity = new ArrayList(); + this.activity.add(t); + return t; + } + + // syntactic sugar + public CarePlan addActivity(CarePlanActivityComponent t) { //3 + if (t == null) + return this; + if (this.activity == null) + this.activity = new ArrayList(); + this.activity.add(t); + return this; + } + + /** + * @return {@link #note} (General notes about the care plan not covered elsewhere.) + */ + public Annotation getNote() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CarePlan.note"); + else if (Configuration.doAutoCreate()) + this.note = new Annotation(); // cc + return this.note; + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (General notes about the care plan not covered elsewhere.) + */ + public CarePlan setNote(Annotation value) { + this.note = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is described by the plan.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "Identifies the context in which this particular CarePlan is defined.", 0, java.lang.Integer.MAX_VALUE, context)); + childrenList.add(new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("author", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "Identifies the individual(s) or ogranization who is responsible for the content of the care plan.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("modified", "dateTime", "Identifies the most recent date on which the plan has been revised.", 0, java.lang.Integer.MAX_VALUE, modified)); + childrenList.add(new Property("category", "CodeableConcept", "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("description", "string", "A description of the scope and nature of the plan.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("addresses", "Reference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, addresses)); + childrenList.add(new Property("support", "Reference(Any)", "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", 0, java.lang.Integer.MAX_VALUE, support)); + childrenList.add(new Property("relatedPlan", "", "Identifies CarePlans with some sort of formal relationship to the current plan.", 0, java.lang.Integer.MAX_VALUE, relatedPlan)); + childrenList.add(new Property("participant", "", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, participant)); + childrenList.add(new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal)); + childrenList.add(new Property("activity", "", "Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.", 0, java.lang.Integer.MAX_VALUE, activity)); + childrenList.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new CarePlanStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("context")) + this.context = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("author")) + this.getAuthor().add(castToReference(value)); + else if (name.equals("modified")) + this.modified = castToDateTime(value); // DateTimeType + else if (name.equals("category")) + this.getCategory().add(castToCodeableConcept(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("addresses")) + this.getAddresses().add(castToReference(value)); + else if (name.equals("support")) + this.getSupport().add(castToReference(value)); + else if (name.equals("relatedPlan")) + this.getRelatedPlan().add((CarePlanRelatedPlanComponent) value); + else if (name.equals("participant")) + this.getParticipant().add((CarePlanParticipantComponent) value); + else if (name.equals("goal")) + this.getGoal().add(castToReference(value)); + else if (name.equals("activity")) + this.getActivity().add((CarePlanActivityComponent) value); + else if (name.equals("note")) + this.note = castToAnnotation(value); // Annotation + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.status"); + } + else if (name.equals("context")) { + this.context = new Reference(); + return this.context; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("author")) { + return addAuthor(); + } + else if (name.equals("modified")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.modified"); + } + else if (name.equals("category")) { + return addCategory(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.description"); + } + else if (name.equals("addresses")) { + return addAddresses(); + } + else if (name.equals("support")) { + return addSupport(); + } + else if (name.equals("relatedPlan")) { + return addRelatedPlan(); + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("goal")) { + return addGoal(); + } + else if (name.equals("activity")) { + return addActivity(); + } + else if (name.equals("note")) { + this.note = new Annotation(); + return this.note; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CarePlan"; + + } + + public CarePlan copy() { + CarePlan dst = new CarePlan(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.status = status == null ? null : status.copy(); + dst.context = context == null ? null : context.copy(); + dst.period = period == null ? null : period.copy(); + if (author != null) { + dst.author = new ArrayList(); + for (Reference i : author) + dst.author.add(i.copy()); + }; + dst.modified = modified == null ? null : modified.copy(); + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + if (addresses != null) { + dst.addresses = new ArrayList(); + for (Reference i : addresses) + dst.addresses.add(i.copy()); + }; + if (support != null) { + dst.support = new ArrayList(); + for (Reference i : support) + dst.support.add(i.copy()); + }; + if (relatedPlan != null) { + dst.relatedPlan = new ArrayList(); + for (CarePlanRelatedPlanComponent i : relatedPlan) + dst.relatedPlan.add(i.copy()); + }; + if (participant != null) { + dst.participant = new ArrayList(); + for (CarePlanParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + if (goal != null) { + dst.goal = new ArrayList(); + for (Reference i : goal) + dst.goal.add(i.copy()); + }; + if (activity != null) { + dst.activity = new ArrayList(); + for (CarePlanActivityComponent i : activity) + dst.activity.add(i.copy()); + }; + dst.note = note == null ? null : note.copy(); + return dst; + } + + protected CarePlan typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CarePlan)) + return false; + CarePlan o = (CarePlan) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(status, o.status, true) + && compareDeep(context, o.context, true) && compareDeep(period, o.period, true) && compareDeep(author, o.author, true) + && compareDeep(modified, o.modified, true) && compareDeep(category, o.category, true) && compareDeep(description, o.description, true) + && compareDeep(addresses, o.addresses, true) && compareDeep(support, o.support, true) && compareDeep(relatedPlan, o.relatedPlan, true) + && compareDeep(participant, o.participant, true) && compareDeep(goal, o.goal, true) && compareDeep(activity, o.activity, true) + && compareDeep(note, o.note, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CarePlan)) + return false; + CarePlan o = (CarePlan) other; + return compareValues(status, o.status, true) && compareValues(modified, o.modified, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) + && (status == null || status.isEmpty()) && (context == null || context.isEmpty()) && (period == null || period.isEmpty()) + && (author == null || author.isEmpty()) && (modified == null || modified.isEmpty()) && (category == null || category.isEmpty()) + && (description == null || description.isEmpty()) && (addresses == null || addresses.isEmpty()) + && (support == null || support.isEmpty()) && (relatedPlan == null || relatedPlan.isEmpty()) + && (participant == null || participant.isEmpty()) && (goal == null || goal.isEmpty()) && (activity == null || activity.isEmpty()) + && (note == null || note.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.CarePlan; + } + + @SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="activitycode", path="CarePlan.activity.detail.code", description="Detail type of activity", type="token" ) + public static final String SP_ACTIVITYCODE = "activitycode"; + @SearchParamDefinition(name="activitydate", path="CarePlan.activity.detail.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" ) + public static final String SP_ACTIVITYDATE = "activitydate"; + @SearchParamDefinition(name="activityreference", path="CarePlan.activity.reference", description="Activity details defined in specific resource", type="reference" ) + public static final String SP_ACTIVITYREFERENCE = "activityreference"; + @SearchParamDefinition(name="performer", path="CarePlan.activity.detail.performer", description="Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="goal", path="CarePlan.goal", description="Desired outcome of plan", type="reference" ) + public static final String SP_GOAL = "goal"; + @SearchParamDefinition(name="subject", path="CarePlan.subject", description="Who care plan is for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="relatedcode", path="CarePlan.relatedPlan.code", description="includes | replaces | fulfills", type="token" ) + public static final String SP_RELATEDCODE = "relatedcode"; + @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" ) + public static final String SP_PARTICIPANT = "participant"; + @SearchParamDefinition(name="relatedplan", path="CarePlan.relatedPlan.plan", description="Plan relationship exists with", type="reference" ) + public static final String SP_RELATEDPLAN = "relatedplan"; + @SearchParamDefinition(name="condition", path="CarePlan.addresses", description="Health issues this plan addresses", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="related", path="", description="A combination of the type of relationship and the related plan", type="composite" ) + public static final String SP_RELATED = "related"; + @SearchParamDefinition(name="patient", path="CarePlan.subject", description="Who care plan is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Claim.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Claim.java new file mode 100644 index 00000000000..177f56204cc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Claim.java @@ -0,0 +1,5631 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ +@ResourceDef(name="Claim", profile="http://hl7.org/fhir/Profile/Claim") +public class Claim extends DomainResource { + + public enum ClaimType { + /** + * A claim for Institution based, typically in-patient, goods and services. + */ + INSTITUTIONAL, + /** + * A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services. + */ + ORAL, + /** + * A claim for Pharmacy based goods and services. + */ + PHARMACY, + /** + * A claim for Professional, typically out-patient, goods and services. + */ + PROFESSIONAL, + /** + * A claim for Vision (Ophthamologist, Optometrist and Optician) goods and services. + */ + VISION, + /** + * added to help the parsers + */ + NULL; + public static ClaimType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return INSTITUTIONAL; + if ("oral".equals(codeString)) + return ORAL; + if ("pharmacy".equals(codeString)) + return PHARMACY; + if ("professional".equals(codeString)) + return PROFESSIONAL; + if ("vision".equals(codeString)) + return VISION; + throw new FHIRException("Unknown ClaimType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTITUTIONAL: return "institutional"; + case ORAL: return "oral"; + case PHARMACY: return "pharmacy"; + case PROFESSIONAL: return "professional"; + case VISION: return "vision"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INSTITUTIONAL: return "http://hl7.org/fhir/claim-type-link"; + case ORAL: return "http://hl7.org/fhir/claim-type-link"; + case PHARMACY: return "http://hl7.org/fhir/claim-type-link"; + case PROFESSIONAL: return "http://hl7.org/fhir/claim-type-link"; + case VISION: return "http://hl7.org/fhir/claim-type-link"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INSTITUTIONAL: return "A claim for Institution based, typically in-patient, goods and services."; + case ORAL: return "A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services."; + case PHARMACY: return "A claim for Pharmacy based goods and services."; + case PROFESSIONAL: return "A claim for Professional, typically out-patient, goods and services."; + case VISION: return "A claim for Vision (Ophthamologist, Optometrist and Optician) goods and services."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTITUTIONAL: return "Institutional"; + case ORAL: return "Oral Health"; + case PHARMACY: return "Pharmacy"; + case PROFESSIONAL: return "Professional"; + case VISION: return "Vision"; + default: return "?"; + } + } + } + + public static class ClaimTypeEnumFactory implements EnumFactory { + public ClaimType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return ClaimType.INSTITUTIONAL; + if ("oral".equals(codeString)) + return ClaimType.ORAL; + if ("pharmacy".equals(codeString)) + return ClaimType.PHARMACY; + if ("professional".equals(codeString)) + return ClaimType.PROFESSIONAL; + if ("vision".equals(codeString)) + return ClaimType.VISION; + throw new IllegalArgumentException("Unknown ClaimType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return new Enumeration(this, ClaimType.INSTITUTIONAL); + if ("oral".equals(codeString)) + return new Enumeration(this, ClaimType.ORAL); + if ("pharmacy".equals(codeString)) + return new Enumeration(this, ClaimType.PHARMACY); + if ("professional".equals(codeString)) + return new Enumeration(this, ClaimType.PROFESSIONAL); + if ("vision".equals(codeString)) + return new Enumeration(this, ClaimType.VISION); + throw new FHIRException("Unknown ClaimType code '"+codeString+"'"); + } + public String toCode(ClaimType code) { + if (code == ClaimType.INSTITUTIONAL) + return "institutional"; + if (code == ClaimType.ORAL) + return "oral"; + if (code == ClaimType.PHARMACY) + return "pharmacy"; + if (code == ClaimType.PROFESSIONAL) + return "professional"; + if (code == ClaimType.VISION) + return "vision"; + return "?"; + } + } + + public enum Use { + /** + * The treatment is complete and this represents a Claim for the services. + */ + COMPLETE, + /** + * The treatment is proposed and this represents a Pre-authorization for the services. + */ + PROPOSED, + /** + * The treatment is proposed and this represents a Pre-determination for the services. + */ + EXPLORATORY, + /** + * A locally defined or otherwise resolved status. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Use fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("exploratory".equals(codeString)) + return EXPLORATORY; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Use code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PROPOSED: return "proposed"; + case EXPLORATORY: return "exploratory"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/claim-use-link"; + case PROPOSED: return "http://hl7.org/fhir/claim-use-link"; + case EXPLORATORY: return "http://hl7.org/fhir/claim-use-link"; + case OTHER: return "http://hl7.org/fhir/claim-use-link"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; + case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; + case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; + case OTHER: return "A locally defined or otherwise resolved status."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PROPOSED: return "Proposed"; + case EXPLORATORY: return "Exploratory"; + case OTHER: return "Other"; + default: return "?"; + } + } + } + + public static class UseEnumFactory implements EnumFactory { + public Use fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return Use.COMPLETE; + if ("proposed".equals(codeString)) + return Use.PROPOSED; + if ("exploratory".equals(codeString)) + return Use.EXPLORATORY; + if ("other".equals(codeString)) + return Use.OTHER; + throw new IllegalArgumentException("Unknown Use code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, Use.COMPLETE); + if ("proposed".equals(codeString)) + return new Enumeration(this, Use.PROPOSED); + if ("exploratory".equals(codeString)) + return new Enumeration(this, Use.EXPLORATORY); + if ("other".equals(codeString)) + return new Enumeration(this, Use.OTHER); + throw new FHIRException("Unknown Use code '"+codeString+"'"); + } + public String toCode(Use code) { + if (code == Use.COMPLETE) + return "complete"; + if (code == Use.PROPOSED) + return "proposed"; + if (code == Use.EXPLORATORY) + return "exploratory"; + if (code == Use.OTHER) + return "other"; + return "?"; + } + } + + @Block() + public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Party to be reimbursed: Subscriber, provider, other. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + protected Coding type; + + /** + * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). + */ + @Child(name = "provider", type = {Practitioner.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + protected Practitioner providerTarget; + + /** + * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). + */ + @Child(name = "organization", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + protected Organization organizationTarget; + + /** + * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). + */ + @Child(name = "person", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) + protected Reference person; + + /** + * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + protected Patient personTarget; + + private static final long serialVersionUID = -503108488L; + + /* + * Constructor + */ + public PayeeComponent() { + super(); + } + + /** + * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + */ + public PayeeComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Reference getPerson() { + if (this.person == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.person"); + else if (Configuration.doAutoCreate()) + this.person = new Reference(); // cc + return this.person; + } + + public boolean hasPerson() { + return this.person != null && !this.person.isEmpty(); + } + + /** + * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setPerson(Reference value) { + this.person = value; + return this; + } + + /** + * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public Patient getPersonTarget() { + if (this.personTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PayeeComponent.person"); + else if (Configuration.doAutoCreate()) + this.personTarget = new Patient(); // aa + return this.personTarget; + } + + /** + * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + */ + public PayeeComponent setPersonTarget(Patient value) { + this.personTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("person")) + this.person = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("person")) { + this.person = new Reference(); + return this.person; + } + else + return super.addChild(name); + } + + public PayeeComponent copy() { + PayeeComponent dst = new PayeeComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.person = person == null ? null : person.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PayeeComponent)) + return false; + PayeeComponent o = (PayeeComponent) other; + return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(person, o.person, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PayeeComponent)) + return false; + PayeeComponent o = (PayeeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) + && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) + ; + } + + public String fhirType() { + return "Claim.payee"; + + } + + } + + @Block() + public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Sequence of diagnosis which serves to order and provide a link. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) + protected PositiveIntType sequence; + + /** + * The diagnosis. + */ + @Child(name = "diagnosis", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) + protected Coding diagnosis; + + private static final long serialVersionUID = -795010186L; + + /* + * Constructor + */ + public DiagnosisComponent() { + super(); + } + + /* + * Constructor + */ + public DiagnosisComponent(PositiveIntType sequence, Coding diagnosis) { + super(); + this.sequence = sequence; + this.diagnosis = diagnosis; + } + + /** + * @return {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public DiagnosisComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return Sequence of diagnosis which serves to order and provide a link. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value Sequence of diagnosis which serves to order and provide a link. + */ + public DiagnosisComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #diagnosis} (The diagnosis.) + */ + public Coding getDiagnosis() { + if (this.diagnosis == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); + else if (Configuration.doAutoCreate()) + this.diagnosis = new Coding(); // cc + return this.diagnosis; + } + + public boolean hasDiagnosis() { + return this.diagnosis != null && !this.diagnosis.isEmpty(); + } + + /** + * @param value {@link #diagnosis} (The diagnosis.) + */ + public DiagnosisComponent setDiagnosis(Coding value) { + this.diagnosis = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "Sequence of diagnosis which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("diagnosis")) + this.diagnosis = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("diagnosis")) { + this.diagnosis = new Coding(); + return this.diagnosis; + } + else + return super.addChild(name); + } + + public DiagnosisComponent copy() { + DiagnosisComponent dst = new DiagnosisComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosisComponent)) + return false; + DiagnosisComponent o = (DiagnosisComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosisComponent)) + return false; + DiagnosisComponent o = (DiagnosisComponent) other; + return compareValues(sequence, o.sequence, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) + ; + } + + public String fhirType() { + return "Claim.diagnosis"; + + } + + } + + @Block() + public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line item. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) + protected PositiveIntType sequence; + + /** + * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + @Child(name = "focal", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) + protected BooleanType focal; + + /** + * Reference to the program or plan identification, underwriter or payor. + */ + @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) + protected Reference coverage; + + /** + * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) + */ + protected Coverage coverageTarget; + + /** + * The contract number of a business agreement which describes the terms and conditions. + */ + @Child(name = "businessArrangement", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) + protected StringType businessArrangement; + + /** + * The relationship of the patient to the subscriber. + */ + @Child(name = "relationship", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) + protected Coding relationship; + + /** + * A list of references from the Insurer to which these services pertain. + */ + @Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) + protected List preAuthRef; + + /** + * The Coverages adjudication details. + */ + @Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) + protected Reference claimResponse; + + /** + * The actual object that is the target of the reference (The Coverages adjudication details.) + */ + protected ClaimResponse claimResponseTarget; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + private static final long serialVersionUID = 621250924L; + + /* + * Constructor + */ + public CoverageComponent() { + super(); + } + + /* + * Constructor + */ + public CoverageComponent(PositiveIntType sequence, BooleanType focal, Reference coverage, Coding relationship) { + super(); + this.sequence = sequence; + this.focal = focal; + this.coverage = coverage; + this.relationship = relationship; + } + + /** + * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public CoverageComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return A service line item. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value A service line item. + */ + public CoverageComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value + */ + public BooleanType getFocalElement() { + if (this.focal == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.focal"); + else if (Configuration.doAutoCreate()) + this.focal = new BooleanType(); // bb + return this.focal; + } + + public boolean hasFocalElement() { + return this.focal != null && !this.focal.isEmpty(); + } + + public boolean hasFocal() { + return this.focal != null && !this.focal.isEmpty(); + } + + /** + * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value + */ + public CoverageComponent setFocalElement(BooleanType value) { + this.focal = value; + return this; + } + + /** + * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + public boolean getFocal() { + return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); + } + + /** + * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + public CoverageComponent setFocal(boolean value) { + if (this.focal == null) + this.focal = new BooleanType(); + this.focal.setValue(value); + return this; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverage() { + if (this.coverage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.coverage"); + else if (Configuration.doAutoCreate()) + this.coverage = new Reference(); // cc + return this.coverage; + } + + public boolean hasCoverage() { + return this.coverage != null && !this.coverage.isEmpty(); + } + + /** + * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public CoverageComponent setCoverage(Reference value) { + this.coverage = value; + return this; + } + + /** + * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public Coverage getCoverageTarget() { + if (this.coverageTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.coverage"); + else if (Configuration.doAutoCreate()) + this.coverageTarget = new Coverage(); // aa + return this.coverageTarget; + } + + /** + * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public CoverageComponent setCoverageTarget(Coverage value) { + this.coverageTarget = value; + return this; + } + + /** + * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value + */ + public StringType getBusinessArrangementElement() { + if (this.businessArrangement == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); + else if (Configuration.doAutoCreate()) + this.businessArrangement = new StringType(); // bb + return this.businessArrangement; + } + + public boolean hasBusinessArrangementElement() { + return this.businessArrangement != null && !this.businessArrangement.isEmpty(); + } + + public boolean hasBusinessArrangement() { + return this.businessArrangement != null && !this.businessArrangement.isEmpty(); + } + + /** + * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value + */ + public CoverageComponent setBusinessArrangementElement(StringType value) { + this.businessArrangement = value; + return this; + } + + /** + * @return The contract number of a business agreement which describes the terms and conditions. + */ + public String getBusinessArrangement() { + return this.businessArrangement == null ? null : this.businessArrangement.getValue(); + } + + /** + * @param value The contract number of a business agreement which describes the terms and conditions. + */ + public CoverageComponent setBusinessArrangement(String value) { + if (Utilities.noString(value)) + this.businessArrangement = null; + else { + if (this.businessArrangement == null) + this.businessArrangement = new StringType(); + this.businessArrangement.setValue(value); + } + return this; + } + + /** + * @return {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public CoverageComponent setRelationship(Coding value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public List getPreAuthRef() { + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + return this.preAuthRef; + } + + public boolean hasPreAuthRef() { + if (this.preAuthRef == null) + return false; + for (StringType item : this.preAuthRef) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + // syntactic sugar + public StringType addPreAuthRefElement() {//2 + StringType t = new StringType(); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); + return t; + } + + /** + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public CoverageComponent addPreAuthRef(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); + return this; + } + + /** + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public boolean hasPreAuthRef(String value) { + if (this.preAuthRef == null) + return false; + for (StringType v : this.preAuthRef) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #claimResponse} (The Coverages adjudication details.) + */ + public Reference getClaimResponse() { + if (this.claimResponse == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); + else if (Configuration.doAutoCreate()) + this.claimResponse = new Reference(); // cc + return this.claimResponse; + } + + public boolean hasClaimResponse() { + return this.claimResponse != null && !this.claimResponse.isEmpty(); + } + + /** + * @param value {@link #claimResponse} (The Coverages adjudication details.) + */ + public CoverageComponent setClaimResponse(Reference value) { + this.claimResponse = value; + return this; + } + + /** + * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) + */ + public ClaimResponse getClaimResponseTarget() { + if (this.claimResponseTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); + else if (Configuration.doAutoCreate()) + this.claimResponseTarget = new ClaimResponse(); // aa + return this.claimResponseTarget; + } + + /** + * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) + */ + public CoverageComponent setClaimResponseTarget(ClaimResponse value) { + this.claimResponseTarget = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public CoverageComponent setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); + childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); + childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); + childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("focal")) + this.focal = castToBoolean(value); // BooleanType + else if (name.equals("coverage")) + this.coverage = castToReference(value); // Reference + else if (name.equals("businessArrangement")) + this.businessArrangement = castToString(value); // StringType + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding + else if (name.equals("preAuthRef")) + this.getPreAuthRef().add(castToString(value)); + else if (name.equals("claimResponse")) + this.claimResponse = castToReference(value); // Reference + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("focal")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.focal"); + } + else if (name.equals("coverage")) { + this.coverage = new Reference(); + return this.coverage; + } + else if (name.equals("businessArrangement")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.businessArrangement"); + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; + } + else if (name.equals("preAuthRef")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.preAuthRef"); + } + else if (name.equals("claimResponse")) { + this.claimResponse = new Reference(); + return this.claimResponse; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else + return super.addChild(name); + } + + public CoverageComponent copy() { + CoverageComponent dst = new CoverageComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.focal = focal == null ? null : focal.copy(); + dst.coverage = coverage == null ? null : coverage.copy(); + dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + if (preAuthRef != null) { + dst.preAuthRef = new ArrayList(); + for (StringType i : preAuthRef) + dst.preAuthRef.add(i.copy()); + }; + dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) + && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) + && compareDeep(originalRuleset, o.originalRuleset, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) + && compareValues(preAuthRef, o.preAuthRef, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) + && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) + && (relationship == null || relationship.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty()) + && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + ; + } + + public String fhirType() { + return "Claim.coverage"; + + } + + } + + @Block() + public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequence; + + /** + * The type of product or service. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) + protected Coding type; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "provider", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner providerTarget; + + /** + * Diagnosis applicable for this service or product line. + */ + @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) + protected List diagnosisLinkId; + + /** + * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. + */ + @Child(name = "service", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) + protected Coding service; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "serviceDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateType serviceDate; + + /** + * The number of repetitions of a service or product. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) + protected SimpleQuantity quantity; + + /** + * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. + */ + @Child(name = "unitPrice", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) + protected Money unitPrice; + + /** + * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + @Child(name = "factor", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) + protected DecimalType factor; + + /** + * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + @Child(name = "points", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) + protected DecimalType points; + + /** + * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. + */ + @Child(name = "net", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) + protected Money net; + + /** + * List of Unique Device Identifiers associated with this line item. + */ + @Child(name = "udi", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) + protected Coding udi; + + /** + * Physical service site on the patient (limb, tooth, etc.). + */ + @Child(name = "bodySite", type = {Coding.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc.)." ) + protected Coding bodySite; + + /** + * A region or surface of the site, e.g. limb region or tooth surface(s). + */ + @Child(name = "subSite", type = {Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, e.g. limb region or tooth surface(s)." ) + protected List subSite; + + /** + * Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + */ + @Child(name = "modifier", type = {Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) + protected List modifier; + + /** + * Second tier of goods and services. + */ + @Child(name = "detail", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) + protected List detail; + + /** + * The materials and placement date of prior fixed prosthesis. + */ + @Child(name = "prosthesis", type = {}, order=17, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Prosthetic details", formalDefinition="The materials and placement date of prior fixed prosthesis." ) + protected ProsthesisComponent prosthesis; + + private static final long serialVersionUID = 1295830456L; + + /* + * Constructor + */ + public ItemsComponent() { + super(); + } + + /* + * Constructor + */ + public ItemsComponent(PositiveIntType sequence, Coding type, Coding service) { + super(); + this.sequence = sequence; + this.type = type; + this.service = service; + } + + /** + * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public ItemsComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value A service line number. + */ + public ItemsComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of product or service.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of product or service.) + */ + public ItemsComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public ItemsComponent setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public ItemsComponent setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) + */ + public List getDiagnosisLinkId() { + if (this.diagnosisLinkId == null) + this.diagnosisLinkId = new ArrayList(); + return this.diagnosisLinkId; + } + + public boolean hasDiagnosisLinkId() { + if (this.diagnosisLinkId == null) + return false; + for (PositiveIntType item : this.diagnosisLinkId) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) + */ + // syntactic sugar + public PositiveIntType addDiagnosisLinkIdElement() {//2 + PositiveIntType t = new PositiveIntType(); + if (this.diagnosisLinkId == null) + this.diagnosisLinkId = new ArrayList(); + this.diagnosisLinkId.add(t); + return t; + } + + /** + * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) + */ + public ItemsComponent addDiagnosisLinkId(int value) { //1 + PositiveIntType t = new PositiveIntType(); + t.setValue(value); + if (this.diagnosisLinkId == null) + this.diagnosisLinkId = new ArrayList(); + this.diagnosisLinkId.add(t); + return this; + } + + /** + * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) + */ + public boolean hasDiagnosisLinkId(int value) { + if (this.diagnosisLinkId == null) + return false; + for (PositiveIntType v : this.diagnosisLinkId) + if (v.equals(value)) // positiveInt + return true; + return false; + } + + /** + * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) + */ + public Coding getService() { + if (this.service == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.service"); + else if (Configuration.doAutoCreate()) + this.service = new Coding(); // cc + return this.service; + } + + public boolean hasService() { + return this.service != null && !this.service.isEmpty(); + } + + /** + * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) + */ + public ItemsComponent setService(Coding value) { + this.service = value; + return this; + } + + /** + * @return {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value + */ + public DateType getServiceDateElement() { + if (this.serviceDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.serviceDate"); + else if (Configuration.doAutoCreate()) + this.serviceDate = new DateType(); // bb + return this.serviceDate; + } + + public boolean hasServiceDateElement() { + return this.serviceDate != null && !this.serviceDate.isEmpty(); + } + + public boolean hasServiceDate() { + return this.serviceDate != null && !this.serviceDate.isEmpty(); + } + + /** + * @param value {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value + */ + public ItemsComponent setServiceDateElement(DateType value) { + this.serviceDate = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getServiceDate() { + return this.serviceDate == null ? null : this.serviceDate.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public ItemsComponent setServiceDate(Date value) { + if (value == null) + this.serviceDate = null; + else { + if (this.serviceDate == null) + this.serviceDate = new DateType(); + this.serviceDate.setValue(value); + } + return this; + } + + /** + * @return {@link #quantity} (The number of repetitions of a service or product.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The number of repetitions of a service or product.) + */ + public ItemsComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) + */ + public Money getUnitPrice() { + if (this.unitPrice == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); + else if (Configuration.doAutoCreate()) + this.unitPrice = new Money(); // cc + return this.unitPrice; + } + + public boolean hasUnitPrice() { + return this.unitPrice != null && !this.unitPrice.isEmpty(); + } + + /** + * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) + */ + public ItemsComponent setUnitPrice(Money value) { + this.unitPrice = value; + return this; + } + + /** + * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public ItemsComponent setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ItemsComponent setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ItemsComponent setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ItemsComponent setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DecimalType getPointsElement() { + if (this.points == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.points"); + else if (Configuration.doAutoCreate()) + this.points = new DecimalType(); // bb + return this.points; + } + + public boolean hasPointsElement() { + return this.points != null && !this.points.isEmpty(); + } + + public boolean hasPoints() { + return this.points != null && !this.points.isEmpty(); + } + + /** + * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public ItemsComponent setPointsElement(DecimalType value) { + this.points = value; + return this; + } + + /** + * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public BigDecimal getPoints() { + return this.points == null ? null : this.points.getValue(); + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public ItemsComponent setPoints(BigDecimal value) { + if (value == null) + this.points = null; + else { + if (this.points == null) + this.points = new DecimalType(); + this.points.setValue(value); + } + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public ItemsComponent setPoints(long value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public ItemsComponent setPoints(double value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public Money getNet() { + if (this.net == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.net"); + else if (Configuration.doAutoCreate()) + this.net = new Money(); // cc + return this.net; + } + + public boolean hasNet() { + return this.net != null && !this.net.isEmpty(); + } + + /** + * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public ItemsComponent setNet(Money value) { + this.net = value; + return this; + } + + /** + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public Coding getUdi() { + if (this.udi == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.udi"); + else if (Configuration.doAutoCreate()) + this.udi = new Coding(); // cc + return this.udi; + } + + public boolean hasUdi() { + return this.udi != null && !this.udi.isEmpty(); + } + + /** + * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public ItemsComponent setUdi(Coding value) { + this.udi = value; + return this; + } + + /** + * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc.).) + */ + public Coding getBodySite() { + if (this.bodySite == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.bodySite"); + else if (Configuration.doAutoCreate()) + this.bodySite = new Coding(); // cc + return this.bodySite; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc.).) + */ + public ItemsComponent setBodySite(Coding value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #subSite} (A region or surface of the site, e.g. limb region or tooth surface(s).) + */ + public List getSubSite() { + if (this.subSite == null) + this.subSite = new ArrayList(); + return this.subSite; + } + + public boolean hasSubSite() { + if (this.subSite == null) + return false; + for (Coding item : this.subSite) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subSite} (A region or surface of the site, e.g. limb region or tooth surface(s).) + */ + // syntactic sugar + public Coding addSubSite() { //3 + Coding t = new Coding(); + if (this.subSite == null) + this.subSite = new ArrayList(); + this.subSite.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addSubSite(Coding t) { //3 + if (t == null) + return this; + if (this.subSite == null) + this.subSite = new ArrayList(); + this.subSite.add(t); + return this; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + public List getModifier() { + if (this.modifier == null) + this.modifier = new ArrayList(); + return this.modifier; + } + + public boolean hasModifier() { + if (this.modifier == null) + return false; + for (Coding item : this.modifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + // syntactic sugar + public Coding addModifier() { //3 + Coding t = new Coding(); + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addModifier(Coding t) { //3 + if (t == null) + return this; + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return this; + } + + /** + * @return {@link #detail} (Second tier of goods and services.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (DetailComponent item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (Second tier of goods and services.) + */ + // syntactic sugar + public DetailComponent addDetail() { //3 + DetailComponent t = new DetailComponent(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addDetail(DetailComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + /** + * @return {@link #prosthesis} (The materials and placement date of prior fixed prosthesis.) + */ + public ProsthesisComponent getProsthesis() { + if (this.prosthesis == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.prosthesis"); + else if (Configuration.doAutoCreate()) + this.prosthesis = new ProsthesisComponent(); // cc + return this.prosthesis; + } + + public boolean hasProsthesis() { + return this.prosthesis != null && !this.prosthesis.isEmpty(); + } + + /** + * @param value {@link #prosthesis} (The materials and placement date of prior fixed prosthesis.) + */ + public ItemsComponent setProsthesis(ProsthesisComponent value) { + this.prosthesis = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("diagnosisLinkId", "positiveInt", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); + childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); + childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); + childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); + childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("subSite", "Coding", "A region or surface of the site, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); + childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); + childrenList.add(new Property("prosthesis", "", "The materials and placement date of prior fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, prosthesis)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("diagnosisLinkId")) + this.getDiagnosisLinkId().add(castToPositiveInt(value)); + else if (name.equals("service")) + this.service = castToCoding(value); // Coding + else if (name.equals("serviceDate")) + this.serviceDate = castToDate(value); // DateType + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("unitPrice")) + this.unitPrice = castToMoney(value); // Money + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("points")) + this.points = castToDecimal(value); // DecimalType + else if (name.equals("net")) + this.net = castToMoney(value); // Money + else if (name.equals("udi")) + this.udi = castToCoding(value); // Coding + else if (name.equals("bodySite")) + this.bodySite = castToCoding(value); // Coding + else if (name.equals("subSite")) + this.getSubSite().add(castToCoding(value)); + else if (name.equals("modifier")) + this.getModifier().add(castToCoding(value)); + else if (name.equals("detail")) + this.getDetail().add((DetailComponent) value); + else if (name.equals("prosthesis")) + this.prosthesis = (ProsthesisComponent) value; // ProsthesisComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("diagnosisLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.diagnosisLinkId"); + } + else if (name.equals("service")) { + this.service = new Coding(); + return this.service; + } + else if (name.equals("serviceDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.serviceDate"); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("unitPrice")) { + this.unitPrice = new Money(); + return this.unitPrice; + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + } + else if (name.equals("points")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + } + else if (name.equals("net")) { + this.net = new Money(); + return this.net; + } + else if (name.equals("udi")) { + this.udi = new Coding(); + return this.udi; + } + else if (name.equals("bodySite")) { + this.bodySite = new Coding(); + return this.bodySite; + } + else if (name.equals("subSite")) { + return addSubSite(); + } + else if (name.equals("modifier")) { + return addModifier(); + } + else if (name.equals("detail")) { + return addDetail(); + } + else if (name.equals("prosthesis")) { + this.prosthesis = new ProsthesisComponent(); + return this.prosthesis; + } + else + return super.addChild(name); + } + + public ItemsComponent copy() { + ItemsComponent dst = new ItemsComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.type = type == null ? null : type.copy(); + dst.provider = provider == null ? null : provider.copy(); + if (diagnosisLinkId != null) { + dst.diagnosisLinkId = new ArrayList(); + for (PositiveIntType i : diagnosisLinkId) + dst.diagnosisLinkId.add(i.copy()); + }; + dst.service = service == null ? null : service.copy(); + dst.serviceDate = serviceDate == null ? null : serviceDate.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.points = points == null ? null : points.copy(); + dst.net = net == null ? null : net.copy(); + dst.udi = udi == null ? null : udi.copy(); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + if (subSite != null) { + dst.subSite = new ArrayList(); + for (Coding i : subSite) + dst.subSite.add(i.copy()); + }; + if (modifier != null) { + dst.modifier = new ArrayList(); + for (Coding i : modifier) + dst.modifier.add(i.copy()); + }; + if (detail != null) { + dst.detail = new ArrayList(); + for (DetailComponent i : detail) + dst.detail.add(i.copy()); + }; + dst.prosthesis = prosthesis == null ? null : prosthesis.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) + && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) + && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) + && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) + && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subSite, o.subSite, true) + && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true) && compareDeep(prosthesis, o.prosthesis, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) + && compareValues(serviceDate, o.serviceDate, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) + && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) + && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) + && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) + && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) + && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subSite == null || subSite.isEmpty()) + && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()) && (prosthesis == null || prosthesis.isEmpty()) + ; + } + + public String fhirType() { + return "Claim.item"; + + } + + } + + @Block() + public static class DetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequence; + + /** + * The type of product or service. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) + protected Coding type; + + /** + * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. + */ + @Child(name = "service", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) + protected Coding service; + + /** + * The number of repetitions of a service or product. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) + protected SimpleQuantity quantity; + + /** + * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. + */ + @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) + protected Money unitPrice; + + /** + * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) + protected DecimalType factor; + + /** + * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) + protected DecimalType points; + + /** + * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. + */ + @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) + protected Money net; + + /** + * List of Unique Device Identifiers associated with this line item. + */ + @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) + protected Coding udi; + + /** + * Third tier of goods and services. + */ + @Child(name = "subDetail", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) + protected List subDetail; + + private static final long serialVersionUID = 5768017L; + + /* + * Constructor + */ + public DetailComponent() { + super(); + } + + /* + * Constructor + */ + public DetailComponent(PositiveIntType sequence, Coding type, Coding service) { + super(); + this.sequence = sequence; + this.type = type; + this.service = service; + } + + /** + * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public DetailComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value A service line number. + */ + public DetailComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of product or service.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of product or service.) + */ + public DetailComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) + */ + public Coding getService() { + if (this.service == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.service"); + else if (Configuration.doAutoCreate()) + this.service = new Coding(); // cc + return this.service; + } + + public boolean hasService() { + return this.service != null && !this.service.isEmpty(); + } + + /** + * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) + */ + public DetailComponent setService(Coding value) { + this.service = value; + return this; + } + + /** + * @return {@link #quantity} (The number of repetitions of a service or product.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The number of repetitions of a service or product.) + */ + public DetailComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) + */ + public Money getUnitPrice() { + if (this.unitPrice == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.unitPrice"); + else if (Configuration.doAutoCreate()) + this.unitPrice = new Money(); // cc + return this.unitPrice; + } + + public boolean hasUnitPrice() { + return this.unitPrice != null && !this.unitPrice.isEmpty(); + } + + /** + * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) + */ + public DetailComponent setUnitPrice(Money value) { + this.unitPrice = value; + return this; + } + + /** + * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DetailComponent setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public DetailComponent setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public DetailComponent setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public DetailComponent setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DecimalType getPointsElement() { + if (this.points == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.points"); + else if (Configuration.doAutoCreate()) + this.points = new DecimalType(); // bb + return this.points; + } + + public boolean hasPointsElement() { + return this.points != null && !this.points.isEmpty(); + } + + public boolean hasPoints() { + return this.points != null && !this.points.isEmpty(); + } + + /** + * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DetailComponent setPointsElement(DecimalType value) { + this.points = value; + return this; + } + + /** + * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public BigDecimal getPoints() { + return this.points == null ? null : this.points.getValue(); + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public DetailComponent setPoints(BigDecimal value) { + if (value == null) + this.points = null; + else { + if (this.points == null) + this.points = new DecimalType(); + this.points.setValue(value); + } + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public DetailComponent setPoints(long value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public DetailComponent setPoints(double value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public Money getNet() { + if (this.net == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.net"); + else if (Configuration.doAutoCreate()) + this.net = new Money(); // cc + return this.net; + } + + public boolean hasNet() { + return this.net != null && !this.net.isEmpty(); + } + + /** + * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public DetailComponent setNet(Money value) { + this.net = value; + return this; + } + + /** + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public Coding getUdi() { + if (this.udi == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailComponent.udi"); + else if (Configuration.doAutoCreate()) + this.udi = new Coding(); // cc + return this.udi; + } + + public boolean hasUdi() { + return this.udi != null && !this.udi.isEmpty(); + } + + /** + * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public DetailComponent setUdi(Coding value) { + this.udi = value; + return this; + } + + /** + * @return {@link #subDetail} (Third tier of goods and services.) + */ + public List getSubDetail() { + if (this.subDetail == null) + this.subDetail = new ArrayList(); + return this.subDetail; + } + + public boolean hasSubDetail() { + if (this.subDetail == null) + return false; + for (SubDetailComponent item : this.subDetail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subDetail} (Third tier of goods and services.) + */ + // syntactic sugar + public SubDetailComponent addSubDetail() { //3 + SubDetailComponent t = new SubDetailComponent(); + if (this.subDetail == null) + this.subDetail = new ArrayList(); + this.subDetail.add(t); + return t; + } + + // syntactic sugar + public DetailComponent addSubDetail(SubDetailComponent t) { //3 + if (t == null) + return this; + if (this.subDetail == null) + this.subDetail = new ArrayList(); + this.subDetail.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); + childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); + childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); + childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("service")) + this.service = castToCoding(value); // Coding + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("unitPrice")) + this.unitPrice = castToMoney(value); // Money + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("points")) + this.points = castToDecimal(value); // DecimalType + else if (name.equals("net")) + this.net = castToMoney(value); // Money + else if (name.equals("udi")) + this.udi = castToCoding(value); // Coding + else if (name.equals("subDetail")) + this.getSubDetail().add((SubDetailComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("service")) { + this.service = new Coding(); + return this.service; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("unitPrice")) { + this.unitPrice = new Money(); + return this.unitPrice; + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + } + else if (name.equals("points")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + } + else if (name.equals("net")) { + this.net = new Money(); + return this.net; + } + else if (name.equals("udi")) { + this.udi = new Coding(); + return this.udi; + } + else if (name.equals("subDetail")) { + return addSubDetail(); + } + else + return super.addChild(name); + } + + public DetailComponent copy() { + DetailComponent dst = new DetailComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.type = type == null ? null : type.copy(); + dst.service = service == null ? null : service.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.points = points == null ? null : points.copy(); + dst.net = net == null ? null : net.copy(); + dst.udi = udi == null ? null : udi.copy(); + if (subDetail != null) { + dst.subDetail = new ArrayList(); + for (SubDetailComponent i : subDetail) + dst.subDetail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DetailComponent)) + return false; + DetailComponent o = (DetailComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) + && compareDeep(subDetail, o.subDetail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DetailComponent)) + return false; + DetailComponent o = (DetailComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) + && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) + && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) + && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); + } + + public String fhirType() { + return "Claim.item.detail"; + + } + + } + + @Block() + public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequence; + + /** + * The type of product or service. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) + protected Coding type; + + /** + * The fee for an additional service or product or charge. + */ + @Child(name = "service", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an additional service or product or charge." ) + protected Coding service; + + /** + * The number of repetitions of a service or product. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) + protected SimpleQuantity quantity; + + /** + * The fee for an additional service or product or charge. + */ + @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an additional service or product or charge." ) + protected Money unitPrice; + + /** + * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) + protected DecimalType factor; + + /** + * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) + protected DecimalType points; + + /** + * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. + */ + @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) + protected Money net; + + /** + * List of Unique Device Identifiers associated with this line item. + */ + @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) + protected Coding udi; + + private static final long serialVersionUID = 623567568L; + + /* + * Constructor + */ + public SubDetailComponent() { + super(); + } + + /* + * Constructor + */ + public SubDetailComponent(PositiveIntType sequence, Coding type, Coding service) { + super(); + this.sequence = sequence; + this.type = type; + this.service = service; + } + + /** + * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public SubDetailComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value A service line number. + */ + public SubDetailComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of product or service.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of product or service.) + */ + public SubDetailComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #service} (The fee for an additional service or product or charge.) + */ + public Coding getService() { + if (this.service == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.service"); + else if (Configuration.doAutoCreate()) + this.service = new Coding(); // cc + return this.service; + } + + public boolean hasService() { + return this.service != null && !this.service.isEmpty(); + } + + /** + * @param value {@link #service} (The fee for an additional service or product or charge.) + */ + public SubDetailComponent setService(Coding value) { + this.service = value; + return this; + } + + /** + * @return {@link #quantity} (The number of repetitions of a service or product.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The number of repetitions of a service or product.) + */ + public SubDetailComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #unitPrice} (The fee for an additional service or product or charge.) + */ + public Money getUnitPrice() { + if (this.unitPrice == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); + else if (Configuration.doAutoCreate()) + this.unitPrice = new Money(); // cc + return this.unitPrice; + } + + public boolean hasUnitPrice() { + return this.unitPrice != null && !this.unitPrice.isEmpty(); + } + + /** + * @param value {@link #unitPrice} (The fee for an additional service or product or charge.) + */ + public SubDetailComponent setUnitPrice(Money value) { + this.unitPrice = value; + return this; + } + + /** + * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public SubDetailComponent setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public SubDetailComponent setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public SubDetailComponent setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public SubDetailComponent setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DecimalType getPointsElement() { + if (this.points == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.points"); + else if (Configuration.doAutoCreate()) + this.points = new DecimalType(); // bb + return this.points; + } + + public boolean hasPointsElement() { + return this.points != null && !this.points.isEmpty(); + } + + public boolean hasPoints() { + return this.points != null && !this.points.isEmpty(); + } + + /** + * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public SubDetailComponent setPointsElement(DecimalType value) { + this.points = value; + return this; + } + + /** + * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public BigDecimal getPoints() { + return this.points == null ? null : this.points.getValue(); + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public SubDetailComponent setPoints(BigDecimal value) { + if (value == null) + this.points = null; + else { + if (this.points == null) + this.points = new DecimalType(); + this.points.setValue(value); + } + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public SubDetailComponent setPoints(long value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. + */ + public SubDetailComponent setPoints(double value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public Money getNet() { + if (this.net == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.net"); + else if (Configuration.doAutoCreate()) + this.net = new Money(); // cc + return this.net; + } + + public boolean hasNet() { + return this.net != null && !this.net.isEmpty(); + } + + /** + * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public SubDetailComponent setNet(Money value) { + this.net = value; + return this; + } + + /** + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public Coding getUdi() { + if (this.udi == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.udi"); + else if (Configuration.doAutoCreate()) + this.udi = new Coding(); // cc + return this.udi; + } + + public boolean hasUdi() { + return this.udi != null && !this.udi.isEmpty(); + } + + /** + * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + */ + public SubDetailComponent setUdi(Coding value) { + this.udi = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("service", "Coding", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("unitPrice", "Money", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); + childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); + childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); + childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("service")) + this.service = castToCoding(value); // Coding + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("unitPrice")) + this.unitPrice = castToMoney(value); // Money + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("points")) + this.points = castToDecimal(value); // DecimalType + else if (name.equals("net")) + this.net = castToMoney(value); // Money + else if (name.equals("udi")) + this.udi = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("service")) { + this.service = new Coding(); + return this.service; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("unitPrice")) { + this.unitPrice = new Money(); + return this.unitPrice; + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + } + else if (name.equals("points")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + } + else if (name.equals("net")) { + this.net = new Money(); + return this.net; + } + else if (name.equals("udi")) { + this.udi = new Coding(); + return this.udi; + } + else + return super.addChild(name); + } + + public SubDetailComponent copy() { + SubDetailComponent dst = new SubDetailComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.type = type == null ? null : type.copy(); + dst.service = service == null ? null : service.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.points = points == null ? null : points.copy(); + dst.net = net == null ? null : net.copy(); + dst.udi = udi == null ? null : udi.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubDetailComponent)) + return false; + SubDetailComponent o = (SubDetailComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubDetailComponent)) + return false; + SubDetailComponent o = (SubDetailComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) + && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) + && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) + && (udi == null || udi.isEmpty()); + } + + public String fhirType() { + return "Claim.item.detail.subDetail"; + + } + + } + + @Block() + public static class ProsthesisComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates whether this is the initial placement of a fixed prosthesis. + */ + @Child(name = "initial", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Is this the initial service", formalDefinition="Indicates whether this is the initial placement of a fixed prosthesis." ) + protected BooleanType initial; + + /** + * Date of the initial placement. + */ + @Child(name = "priorDate", type = {DateType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Initial service Date", formalDefinition="Date of the initial placement." ) + protected DateType priorDate; + + /** + * Material of the prior denture or bridge prosthesis. (Oral). + */ + @Child(name = "priorMaterial", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Prosthetic Material", formalDefinition="Material of the prior denture or bridge prosthesis. (Oral)." ) + protected Coding priorMaterial; + + private static final long serialVersionUID = 1739349641L; + + /* + * Constructor + */ + public ProsthesisComponent() { + super(); + } + + /** + * @return {@link #initial} (Indicates whether this is the initial placement of a fixed prosthesis.). This is the underlying object with id, value and extensions. The accessor "getInitial" gives direct access to the value + */ + public BooleanType getInitialElement() { + if (this.initial == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProsthesisComponent.initial"); + else if (Configuration.doAutoCreate()) + this.initial = new BooleanType(); // bb + return this.initial; + } + + public boolean hasInitialElement() { + return this.initial != null && !this.initial.isEmpty(); + } + + public boolean hasInitial() { + return this.initial != null && !this.initial.isEmpty(); + } + + /** + * @param value {@link #initial} (Indicates whether this is the initial placement of a fixed prosthesis.). This is the underlying object with id, value and extensions. The accessor "getInitial" gives direct access to the value + */ + public ProsthesisComponent setInitialElement(BooleanType value) { + this.initial = value; + return this; + } + + /** + * @return Indicates whether this is the initial placement of a fixed prosthesis. + */ + public boolean getInitial() { + return this.initial == null || this.initial.isEmpty() ? false : this.initial.getValue(); + } + + /** + * @param value Indicates whether this is the initial placement of a fixed prosthesis. + */ + public ProsthesisComponent setInitial(boolean value) { + if (this.initial == null) + this.initial = new BooleanType(); + this.initial.setValue(value); + return this; + } + + /** + * @return {@link #priorDate} (Date of the initial placement.). This is the underlying object with id, value and extensions. The accessor "getPriorDate" gives direct access to the value + */ + public DateType getPriorDateElement() { + if (this.priorDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProsthesisComponent.priorDate"); + else if (Configuration.doAutoCreate()) + this.priorDate = new DateType(); // bb + return this.priorDate; + } + + public boolean hasPriorDateElement() { + return this.priorDate != null && !this.priorDate.isEmpty(); + } + + public boolean hasPriorDate() { + return this.priorDate != null && !this.priorDate.isEmpty(); + } + + /** + * @param value {@link #priorDate} (Date of the initial placement.). This is the underlying object with id, value and extensions. The accessor "getPriorDate" gives direct access to the value + */ + public ProsthesisComponent setPriorDateElement(DateType value) { + this.priorDate = value; + return this; + } + + /** + * @return Date of the initial placement. + */ + public Date getPriorDate() { + return this.priorDate == null ? null : this.priorDate.getValue(); + } + + /** + * @param value Date of the initial placement. + */ + public ProsthesisComponent setPriorDate(Date value) { + if (value == null) + this.priorDate = null; + else { + if (this.priorDate == null) + this.priorDate = new DateType(); + this.priorDate.setValue(value); + } + return this; + } + + /** + * @return {@link #priorMaterial} (Material of the prior denture or bridge prosthesis. (Oral).) + */ + public Coding getPriorMaterial() { + if (this.priorMaterial == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProsthesisComponent.priorMaterial"); + else if (Configuration.doAutoCreate()) + this.priorMaterial = new Coding(); // cc + return this.priorMaterial; + } + + public boolean hasPriorMaterial() { + return this.priorMaterial != null && !this.priorMaterial.isEmpty(); + } + + /** + * @param value {@link #priorMaterial} (Material of the prior denture or bridge prosthesis. (Oral).) + */ + public ProsthesisComponent setPriorMaterial(Coding value) { + this.priorMaterial = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("initial", "boolean", "Indicates whether this is the initial placement of a fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, initial)); + childrenList.add(new Property("priorDate", "date", "Date of the initial placement.", 0, java.lang.Integer.MAX_VALUE, priorDate)); + childrenList.add(new Property("priorMaterial", "Coding", "Material of the prior denture or bridge prosthesis. (Oral).", 0, java.lang.Integer.MAX_VALUE, priorMaterial)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("initial")) + this.initial = castToBoolean(value); // BooleanType + else if (name.equals("priorDate")) + this.priorDate = castToDate(value); // DateType + else if (name.equals("priorMaterial")) + this.priorMaterial = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("initial")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.initial"); + } + else if (name.equals("priorDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.priorDate"); + } + else if (name.equals("priorMaterial")) { + this.priorMaterial = new Coding(); + return this.priorMaterial; + } + else + return super.addChild(name); + } + + public ProsthesisComponent copy() { + ProsthesisComponent dst = new ProsthesisComponent(); + copyValues(dst); + dst.initial = initial == null ? null : initial.copy(); + dst.priorDate = priorDate == null ? null : priorDate.copy(); + dst.priorMaterial = priorMaterial == null ? null : priorMaterial.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProsthesisComponent)) + return false; + ProsthesisComponent o = (ProsthesisComponent) other; + return compareDeep(initial, o.initial, true) && compareDeep(priorDate, o.priorDate, true) && compareDeep(priorMaterial, o.priorMaterial, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProsthesisComponent)) + return false; + ProsthesisComponent o = (ProsthesisComponent) other; + return compareValues(initial, o.initial, true) && compareValues(priorDate, o.priorDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty()) + && (priorMaterial == null || priorMaterial.isEmpty()); + } + + public String fhirType() { + return "Claim.item.prosthesis"; + + } + + } + + @Block() + public static class MissingTeethComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The code identifying which tooth is missing. + */ + @Child(name = "tooth", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Tooth Code", formalDefinition="The code identifying which tooth is missing." ) + protected Coding tooth; + + /** + * Missing reason may be: E-extraction, O-other. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for missing", formalDefinition="Missing reason may be: E-extraction, O-other." ) + protected Coding reason; + + /** + * The date of the extraction either known from records or patient reported estimate. + */ + @Child(name = "extractionDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date of Extraction", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) + protected DateType extractionDate; + + private static final long serialVersionUID = 352913313L; + + /* + * Constructor + */ + public MissingTeethComponent() { + super(); + } + + /* + * Constructor + */ + public MissingTeethComponent(Coding tooth) { + super(); + this.tooth = tooth; + } + + /** + * @return {@link #tooth} (The code identifying which tooth is missing.) + */ + public Coding getTooth() { + if (this.tooth == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.tooth"); + else if (Configuration.doAutoCreate()) + this.tooth = new Coding(); // cc + return this.tooth; + } + + public boolean hasTooth() { + return this.tooth != null && !this.tooth.isEmpty(); + } + + /** + * @param value {@link #tooth} (The code identifying which tooth is missing.) + */ + public MissingTeethComponent setTooth(Coding value) { + this.tooth = value; + return this; + } + + /** + * @return {@link #reason} (Missing reason may be: E-extraction, O-other.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Missing reason may be: E-extraction, O-other.) + */ + public MissingTeethComponent setReason(Coding value) { + this.reason = value; + return this; + } + + /** + * @return {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value + */ + public DateType getExtractionDateElement() { + if (this.extractionDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.extractionDate"); + else if (Configuration.doAutoCreate()) + this.extractionDate = new DateType(); // bb + return this.extractionDate; + } + + public boolean hasExtractionDateElement() { + return this.extractionDate != null && !this.extractionDate.isEmpty(); + } + + public boolean hasExtractionDate() { + return this.extractionDate != null && !this.extractionDate.isEmpty(); + } + + /** + * @param value {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value + */ + public MissingTeethComponent setExtractionDateElement(DateType value) { + this.extractionDate = value; + return this; + } + + /** + * @return The date of the extraction either known from records or patient reported estimate. + */ + public Date getExtractionDate() { + return this.extractionDate == null ? null : this.extractionDate.getValue(); + } + + /** + * @param value The date of the extraction either known from records or patient reported estimate. + */ + public MissingTeethComponent setExtractionDate(Date value) { + if (value == null) + this.extractionDate = null; + else { + if (this.extractionDate == null) + this.extractionDate = new DateType(); + this.extractionDate.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("tooth", "Coding", "The code identifying which tooth is missing.", 0, java.lang.Integer.MAX_VALUE, tooth)); + childrenList.add(new Property("reason", "Coding", "Missing reason may be: E-extraction, O-other.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("extractionDate", "date", "The date of the extraction either known from records or patient reported estimate.", 0, java.lang.Integer.MAX_VALUE, extractionDate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("tooth")) + this.tooth = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding + else if (name.equals("extractionDate")) + this.extractionDate = castToDate(value); // DateType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("tooth")) { + this.tooth = new Coding(); + return this.tooth; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; + } + else if (name.equals("extractionDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.extractionDate"); + } + else + return super.addChild(name); + } + + public MissingTeethComponent copy() { + MissingTeethComponent dst = new MissingTeethComponent(); + copyValues(dst); + dst.tooth = tooth == null ? null : tooth.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.extractionDate = extractionDate == null ? null : extractionDate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MissingTeethComponent)) + return false; + MissingTeethComponent o = (MissingTeethComponent) other; + return compareDeep(tooth, o.tooth, true) && compareDeep(reason, o.reason, true) && compareDeep(extractionDate, o.extractionDate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MissingTeethComponent)) + return false; + MissingTeethComponent o = (MissingTeethComponent) other; + return compareValues(extractionDate, o.extractionDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) + && (extractionDate == null || extractionDate.isEmpty()); + } + + public String fhirType() { + return "Claim.missingTeeth"; + + } + + } + + /** + * The category of claim this is. + */ + @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="institutional | oral | pharmacy | professional | vision", formalDefinition="The category of claim this is." ) + protected Enumeration type; + + /** + * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) + protected List identifier; + + /** + * The version of the specification on which this instance relies. + */ + @Child(name = "ruleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) + protected Coding ruleset; + + /** + * The version of the specification from which the original instance was created. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * Insurer Identifier, typical BIN number (6 digit). + */ + @Child(name = "target", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) + */ + protected Organization targetTarget; + + /** + * The provider which is responsible for the bill, claim pre-determination, pre-authorization. + */ + @Child(name = "provider", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the bill, claim pre-determination, pre-authorization. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + protected Organization organizationTarget; + + /** + * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). + */ + @Child(name = "use", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) + protected Enumeration use; + + /** + * Immediate (stat), best effort (normal), deferred (deferred). + */ + @Child(name = "priority", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (stat), best effort (normal), deferred (deferred)." ) + protected Coding priority; + + /** + * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. + */ + @Child(name = "fundsReserve", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) + protected Coding fundsReserve; + + /** + * Person who created the invoice/claim/pre-determination or pre-authorization. + */ + @Child(name = "enterer", type = {Practitioner.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) + protected Reference enterer; + + /** + * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + protected Practitioner entererTarget; + + /** + * Facility where the services were provided. + */ + @Child(name = "facility", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) + protected Reference facility; + + /** + * The actual object that is the target of the reference (Facility where the services were provided.) + */ + protected Location facilityTarget; + + /** + * Prescription to support the dispensing of Pharmacy or Vision products. + */ + @Child(name = "prescription", type = {MedicationOrder.class, VisionPrescription.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of Pharmacy or Vision products." ) + protected Reference prescription; + + /** + * The actual object that is the target of the reference (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + protected Resource prescriptionTarget; + + /** + * Original prescription to support the dispensing of pharmacy services, medications or products. + */ + @Child(name = "originalPrescription", type = {MedicationOrder.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription to support the dispensing of pharmacy services, medications or products." ) + protected Reference originalPrescription; + + /** + * The actual object that is the target of the reference (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + protected MedicationOrder originalPrescriptionTarget; + + /** + * The party to be reimbursed for the services. + */ + @Child(name = "payee", type = {}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) + protected PayeeComponent payee; + + /** + * The referral resource which lists the date, practitioner, reason and other supporting information. + */ + @Child(name = "referral", type = {ReferralRequest.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) + protected Reference referral; + + /** + * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + protected ReferralRequest referralTarget; + + /** + * Ordered list of patient diagnosis for which care is sought. + */ + @Child(name = "diagnosis", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) + protected List diagnosis; + + /** + * List of patient conditions for which care is sought. + */ + @Child(name = "condition", type = {Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) + protected List condition; + + /** + * Patient Resource. + */ + @Child(name = "patient", type = {Patient.class}, order=19, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Patient Resource.) + */ + protected Patient patientTarget; + + /** + * Financial instrument by which payment information for health care. + */ + @Child(name = "coverage", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) + protected List coverage; + + /** + * Factors which may influence the applicability of coverage. + */ + @Child(name = "exception", type = {Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) + protected List exception; + + /** + * Name of school for over-aged dependents. + */ + @Child(name = "school", type = {StringType.class}, order=22, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependents." ) + protected StringType school; + + /** + * Date of an accident which these services are addressing. + */ + @Child(name = "accident", type = {DateType.class}, order=23, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) + protected DateType accident; + + /** + * Type of accident: work, auto, etc. + */ + @Child(name = "accidentType", type = {Coding.class}, order=24, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) + protected Coding accidentType; + + /** + * A list of intervention and exception codes which may influence the adjudication of the claim. + */ + @Child(name = "interventionException", type = {Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) + protected List interventionException; + + /** + * First tier of goods and services. + */ + @Child(name = "item", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) + protected List item; + + /** + * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. + */ + @Child(name = "additionalMaterials", type = {Coding.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) + protected List additionalMaterials; + + /** + * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. + */ + @Child(name = "missingTeeth", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Only if type = oral", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) + protected List missingTeeth; + + private static final long serialVersionUID = 4272227L; + + /* + * Constructor + */ + public Claim() { + super(); + } + + /* + * Constructor + */ + public Claim(Enumeration type, Reference patient) { + super(); + this.type = type; + this.patient = patient; + } + + /** + * @return {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ClaimTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Claim setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The category of claim this is. + */ + public ClaimType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The category of claim this is. + */ + public Claim setType(ClaimType value) { + if (this.type == null) + this.type = new Enumeration(new ClaimTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Claim addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the specification on which this instance relies.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the specification on which this instance relies.) + */ + public Claim setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) + */ + public Claim setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public Claim setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public Claim setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) + */ + public Claim setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) + */ + public Claim setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Claim setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Claim setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Claim setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Claim setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new UseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Claim setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). + */ + public Use getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). + */ + public Claim setUse(Use value) { + if (value == null) + this.use = null; + else { + if (this.use == null) + this.use = new Enumeration(new UseEnumFactory()); + this.use.setValue(value); + } + return this; + } + + /** + * @return {@link #priority} (Immediate (stat), best effort (normal), deferred (deferred).) + */ + public Coding getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Coding(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Immediate (stat), best effort (normal), deferred (deferred).) + */ + public Claim setPriority(Coding value) { + this.priority = value; + return this; + } + + /** + * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) + */ + public Coding getFundsReserve() { + if (this.fundsReserve == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.fundsReserve"); + else if (Configuration.doAutoCreate()) + this.fundsReserve = new Coding(); // cc + return this.fundsReserve; + } + + public boolean hasFundsReserve() { + return this.fundsReserve != null && !this.fundsReserve.isEmpty(); + } + + /** + * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) + */ + public Claim setFundsReserve(Coding value) { + this.fundsReserve = value; + return this; + } + + /** + * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Reference getEnterer() { + if (this.enterer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.enterer"); + else if (Configuration.doAutoCreate()) + this.enterer = new Reference(); // cc + return this.enterer; + } + + public boolean hasEnterer() { + return this.enterer != null && !this.enterer.isEmpty(); + } + + /** + * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Claim setEnterer(Reference value) { + this.enterer = value; + return this; + } + + /** + * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Practitioner getEntererTarget() { + if (this.entererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.enterer"); + else if (Configuration.doAutoCreate()) + this.entererTarget = new Practitioner(); // aa + return this.entererTarget; + } + + /** + * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Claim setEntererTarget(Practitioner value) { + this.entererTarget = value; + return this; + } + + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Reference getFacility() { + if (this.facility == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.facility"); + else if (Configuration.doAutoCreate()) + this.facility = new Reference(); // cc + return this.facility; + } + + public boolean hasFacility() { + return this.facility != null && !this.facility.isEmpty(); + } + + /** + * @param value {@link #facility} (Facility where the services were provided.) + */ + public Claim setFacility(Reference value) { + this.facility = value; + return this; + } + + /** + * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) + */ + public Location getFacilityTarget() { + if (this.facilityTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.facility"); + else if (Configuration.doAutoCreate()) + this.facilityTarget = new Location(); // aa + return this.facilityTarget; + } + + /** + * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) + */ + public Claim setFacilityTarget(Location value) { + this.facilityTarget = value; + return this; + } + + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Reference getPrescription() { + if (this.prescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.prescription"); + else if (Configuration.doAutoCreate()) + this.prescription = new Reference(); // cc + return this.prescription; + } + + public boolean hasPrescription() { + return this.prescription != null && !this.prescription.isEmpty(); + } + + /** + * @param value {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Claim setPrescription(Reference value) { + this.prescription = value; + return this; + } + + /** + * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Resource getPrescriptionTarget() { + return this.prescriptionTarget; + } + + /** + * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Claim setPrescriptionTarget(Resource value) { + this.prescriptionTarget = value; + return this; + } + + /** + * @return {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Reference getOriginalPrescription() { + if (this.originalPrescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.originalPrescription"); + else if (Configuration.doAutoCreate()) + this.originalPrescription = new Reference(); // cc + return this.originalPrescription; + } + + public boolean hasOriginalPrescription() { + return this.originalPrescription != null && !this.originalPrescription.isEmpty(); + } + + /** + * @param value {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Claim setOriginalPrescription(Reference value) { + this.originalPrescription = value; + return this; + } + + /** + * @return {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public MedicationOrder getOriginalPrescriptionTarget() { + if (this.originalPrescriptionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.originalPrescription"); + else if (Configuration.doAutoCreate()) + this.originalPrescriptionTarget = new MedicationOrder(); // aa + return this.originalPrescriptionTarget; + } + + /** + * @param value {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Claim setOriginalPrescriptionTarget(MedicationOrder value) { + this.originalPrescriptionTarget = value; + return this; + } + + /** + * @return {@link #payee} (The party to be reimbursed for the services.) + */ + public PayeeComponent getPayee() { + if (this.payee == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.payee"); + else if (Configuration.doAutoCreate()) + this.payee = new PayeeComponent(); // cc + return this.payee; + } + + public boolean hasPayee() { + return this.payee != null && !this.payee.isEmpty(); + } + + /** + * @param value {@link #payee} (The party to be reimbursed for the services.) + */ + public Claim setPayee(PayeeComponent value) { + this.payee = value; + return this; + } + + /** + * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Reference getReferral() { + if (this.referral == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.referral"); + else if (Configuration.doAutoCreate()) + this.referral = new Reference(); // cc + return this.referral; + } + + public boolean hasReferral() { + return this.referral != null && !this.referral.isEmpty(); + } + + /** + * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Claim setReferral(Reference value) { + this.referral = value; + return this; + } + + /** + * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public ReferralRequest getReferralTarget() { + if (this.referralTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.referral"); + else if (Configuration.doAutoCreate()) + this.referralTarget = new ReferralRequest(); // aa + return this.referralTarget; + } + + /** + * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Claim setReferralTarget(ReferralRequest value) { + this.referralTarget = value; + return this; + } + + /** + * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) + */ + public List getDiagnosis() { + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + return this.diagnosis; + } + + public boolean hasDiagnosis() { + if (this.diagnosis == null) + return false; + for (DiagnosisComponent item : this.diagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) + */ + // syntactic sugar + public DiagnosisComponent addDiagnosis() { //3 + DiagnosisComponent t = new DiagnosisComponent(); + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return t; + } + + // syntactic sugar + public Claim addDiagnosis(DiagnosisComponent t) { //3 + if (t == null) + return this; + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return this; + } + + /** + * @return {@link #condition} (List of patient conditions for which care is sought.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (Coding item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #condition} (List of patient conditions for which care is sought.) + */ + // syntactic sugar + public Coding addCondition() { //3 + Coding t = new Coding(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + // syntactic sugar + public Claim addCondition(Coding t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + /** + * @return {@link #patient} (Patient Resource.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (Patient Resource.) + */ + public Claim setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) + */ + public Claim setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + public List getCoverage() { + if (this.coverage == null) + this.coverage = new ArrayList(); + return this.coverage; + } + + public boolean hasCoverage() { + if (this.coverage == null) + return false; + for (CoverageComponent item : this.coverage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + // syntactic sugar + public CoverageComponent addCoverage() { //3 + CoverageComponent t = new CoverageComponent(); + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return t; + } + + // syntactic sugar + public Claim addCoverage(CoverageComponent t) { //3 + if (t == null) + return this; + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return this; + } + + /** + * @return {@link #exception} (Factors which may influence the applicability of coverage.) + */ + public List getException() { + if (this.exception == null) + this.exception = new ArrayList(); + return this.exception; + } + + public boolean hasException() { + if (this.exception == null) + return false; + for (Coding item : this.exception) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #exception} (Factors which may influence the applicability of coverage.) + */ + // syntactic sugar + public Coding addException() { //3 + Coding t = new Coding(); + if (this.exception == null) + this.exception = new ArrayList(); + this.exception.add(t); + return t; + } + + // syntactic sugar + public Claim addException(Coding t) { //3 + if (t == null) + return this; + if (this.exception == null) + this.exception = new ArrayList(); + this.exception.add(t); + return this; + } + + /** + * @return {@link #school} (Name of school for over-aged dependents.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value + */ + public StringType getSchoolElement() { + if (this.school == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.school"); + else if (Configuration.doAutoCreate()) + this.school = new StringType(); // bb + return this.school; + } + + public boolean hasSchoolElement() { + return this.school != null && !this.school.isEmpty(); + } + + public boolean hasSchool() { + return this.school != null && !this.school.isEmpty(); + } + + /** + * @param value {@link #school} (Name of school for over-aged dependents.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value + */ + public Claim setSchoolElement(StringType value) { + this.school = value; + return this; + } + + /** + * @return Name of school for over-aged dependents. + */ + public String getSchool() { + return this.school == null ? null : this.school.getValue(); + } + + /** + * @param value Name of school for over-aged dependents. + */ + public Claim setSchool(String value) { + if (Utilities.noString(value)) + this.school = null; + else { + if (this.school == null) + this.school = new StringType(); + this.school.setValue(value); + } + return this; + } + + /** + * @return {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value + */ + public DateType getAccidentElement() { + if (this.accident == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.accident"); + else if (Configuration.doAutoCreate()) + this.accident = new DateType(); // bb + return this.accident; + } + + public boolean hasAccidentElement() { + return this.accident != null && !this.accident.isEmpty(); + } + + public boolean hasAccident() { + return this.accident != null && !this.accident.isEmpty(); + } + + /** + * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value + */ + public Claim setAccidentElement(DateType value) { + this.accident = value; + return this; + } + + /** + * @return Date of an accident which these services are addressing. + */ + public Date getAccident() { + return this.accident == null ? null : this.accident.getValue(); + } + + /** + * @param value Date of an accident which these services are addressing. + */ + public Claim setAccident(Date value) { + if (value == null) + this.accident = null; + else { + if (this.accident == null) + this.accident = new DateType(); + this.accident.setValue(value); + } + return this; + } + + /** + * @return {@link #accidentType} (Type of accident: work, auto, etc.) + */ + public Coding getAccidentType() { + if (this.accidentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.accidentType"); + else if (Configuration.doAutoCreate()) + this.accidentType = new Coding(); // cc + return this.accidentType; + } + + public boolean hasAccidentType() { + return this.accidentType != null && !this.accidentType.isEmpty(); + } + + /** + * @param value {@link #accidentType} (Type of accident: work, auto, etc.) + */ + public Claim setAccidentType(Coding value) { + this.accidentType = value; + return this; + } + + /** + * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) + */ + public List getInterventionException() { + if (this.interventionException == null) + this.interventionException = new ArrayList(); + return this.interventionException; + } + + public boolean hasInterventionException() { + if (this.interventionException == null) + return false; + for (Coding item : this.interventionException) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) + */ + // syntactic sugar + public Coding addInterventionException() { //3 + Coding t = new Coding(); + if (this.interventionException == null) + this.interventionException = new ArrayList(); + this.interventionException.add(t); + return t; + } + + // syntactic sugar + public Claim addInterventionException(Coding t) { //3 + if (t == null) + return this; + if (this.interventionException == null) + this.interventionException = new ArrayList(); + this.interventionException.add(t); + return this; + } + + /** + * @return {@link #item} (First tier of goods and services.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (ItemsComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (First tier of goods and services.) + */ + // syntactic sugar + public ItemsComponent addItem() { //3 + ItemsComponent t = new ItemsComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public Claim addItem(ItemsComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) + */ + public List getAdditionalMaterials() { + if (this.additionalMaterials == null) + this.additionalMaterials = new ArrayList(); + return this.additionalMaterials; + } + + public boolean hasAdditionalMaterials() { + if (this.additionalMaterials == null) + return false; + for (Coding item : this.additionalMaterials) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) + */ + // syntactic sugar + public Coding addAdditionalMaterials() { //3 + Coding t = new Coding(); + if (this.additionalMaterials == null) + this.additionalMaterials = new ArrayList(); + this.additionalMaterials.add(t); + return t; + } + + // syntactic sugar + public Claim addAdditionalMaterials(Coding t) { //3 + if (t == null) + return this; + if (this.additionalMaterials == null) + this.additionalMaterials = new ArrayList(); + this.additionalMaterials.add(t); + return this; + } + + /** + * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) + */ + public List getMissingTeeth() { + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + return this.missingTeeth; + } + + public boolean hasMissingTeeth() { + if (this.missingTeeth == null) + return false; + for (MissingTeethComponent item : this.missingTeeth) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) + */ + // syntactic sugar + public MissingTeethComponent addMissingTeeth() { //3 + MissingTeethComponent t = new MissingTeethComponent(); + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + this.missingTeeth.add(t); + return t; + } + + // syntactic sugar + public Claim addMissingTeeth(MissingTeethComponent t) { //3 + if (t == null) + return this; + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + this.missingTeeth.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The category of claim this is.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("priority", "Coding", "Immediate (stat), best effort (normal), deferred (deferred).", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); + childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); + childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); + childrenList.add(new Property("prescription", "Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); + childrenList.add(new Property("originalPrescription", "Reference(MedicationOrder)", "Original prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); + childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); + childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); + childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + childrenList.add(new Property("condition", "Coding", "List of patient conditions for which care is sought.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); + childrenList.add(new Property("school", "string", "Name of school for over-aged dependents.", 0, java.lang.Integer.MAX_VALUE, school)); + childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); + childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); + childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); + childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); + childrenList.add(new Property("missingTeeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingTeeth)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new ClaimTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("use")) + this.use = new UseEnumFactory().fromType(value); // Enumeration + else if (name.equals("priority")) + this.priority = castToCoding(value); // Coding + else if (name.equals("fundsReserve")) + this.fundsReserve = castToCoding(value); // Coding + else if (name.equals("enterer")) + this.enterer = castToReference(value); // Reference + else if (name.equals("facility")) + this.facility = castToReference(value); // Reference + else if (name.equals("prescription")) + this.prescription = castToReference(value); // Reference + else if (name.equals("originalPrescription")) + this.originalPrescription = castToReference(value); // Reference + else if (name.equals("payee")) + this.payee = (PayeeComponent) value; // PayeeComponent + else if (name.equals("referral")) + this.referral = castToReference(value); // Reference + else if (name.equals("diagnosis")) + this.getDiagnosis().add((DiagnosisComponent) value); + else if (name.equals("condition")) + this.getCondition().add(castToCoding(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("coverage")) + this.getCoverage().add((CoverageComponent) value); + else if (name.equals("exception")) + this.getException().add(castToCoding(value)); + else if (name.equals("school")) + this.school = castToString(value); // StringType + else if (name.equals("accident")) + this.accident = castToDate(value); // DateType + else if (name.equals("accidentType")) + this.accidentType = castToCoding(value); // Coding + else if (name.equals("interventionException")) + this.getInterventionException().add(castToCoding(value)); + else if (name.equals("item")) + this.getItem().add((ItemsComponent) value); + else if (name.equals("additionalMaterials")) + this.getAdditionalMaterials().add(castToCoding(value)); + else if (name.equals("missingTeeth")) + this.getMissingTeeth().add((MissingTeethComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.type"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.created"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.use"); + } + else if (name.equals("priority")) { + this.priority = new Coding(); + return this.priority; + } + else if (name.equals("fundsReserve")) { + this.fundsReserve = new Coding(); + return this.fundsReserve; + } + else if (name.equals("enterer")) { + this.enterer = new Reference(); + return this.enterer; + } + else if (name.equals("facility")) { + this.facility = new Reference(); + return this.facility; + } + else if (name.equals("prescription")) { + this.prescription = new Reference(); + return this.prescription; + } + else if (name.equals("originalPrescription")) { + this.originalPrescription = new Reference(); + return this.originalPrescription; + } + else if (name.equals("payee")) { + this.payee = new PayeeComponent(); + return this.payee; + } + else if (name.equals("referral")) { + this.referral = new Reference(); + return this.referral; + } + else if (name.equals("diagnosis")) { + return addDiagnosis(); + } + else if (name.equals("condition")) { + return addCondition(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("coverage")) { + return addCoverage(); + } + else if (name.equals("exception")) { + return addException(); + } + else if (name.equals("school")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.school"); + } + else if (name.equals("accident")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.accident"); + } + else if (name.equals("accidentType")) { + this.accidentType = new Coding(); + return this.accidentType; + } + else if (name.equals("interventionException")) { + return addInterventionException(); + } + else if (name.equals("item")) { + return addItem(); + } + else if (name.equals("additionalMaterials")) { + return addAdditionalMaterials(); + } + else if (name.equals("missingTeeth")) { + return addMissingTeeth(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Claim"; + + } + + public Claim copy() { + Claim dst = new Claim(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.use = use == null ? null : use.copy(); + dst.priority = priority == null ? null : priority.copy(); + dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); + dst.enterer = enterer == null ? null : enterer.copy(); + dst.facility = facility == null ? null : facility.copy(); + dst.prescription = prescription == null ? null : prescription.copy(); + dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); + dst.payee = payee == null ? null : payee.copy(); + dst.referral = referral == null ? null : referral.copy(); + if (diagnosis != null) { + dst.diagnosis = new ArrayList(); + for (DiagnosisComponent i : diagnosis) + dst.diagnosis.add(i.copy()); + }; + if (condition != null) { + dst.condition = new ArrayList(); + for (Coding i : condition) + dst.condition.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + if (coverage != null) { + dst.coverage = new ArrayList(); + for (CoverageComponent i : coverage) + dst.coverage.add(i.copy()); + }; + if (exception != null) { + dst.exception = new ArrayList(); + for (Coding i : exception) + dst.exception.add(i.copy()); + }; + dst.school = school == null ? null : school.copy(); + dst.accident = accident == null ? null : accident.copy(); + dst.accidentType = accidentType == null ? null : accidentType.copy(); + if (interventionException != null) { + dst.interventionException = new ArrayList(); + for (Coding i : interventionException) + dst.interventionException.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (ItemsComponent i : item) + dst.item.add(i.copy()); + }; + if (additionalMaterials != null) { + dst.additionalMaterials = new ArrayList(); + for (Coding i : additionalMaterials) + dst.additionalMaterials.add(i.copy()); + }; + if (missingTeeth != null) { + dst.missingTeeth = new ArrayList(); + for (MissingTeethComponent i : missingTeeth) + dst.missingTeeth.add(i.copy()); + }; + return dst; + } + + protected Claim typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Claim)) + return false; + Claim o = (Claim) other; + return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) + && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) + && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) && compareDeep(fundsReserve, o.fundsReserve, true) + && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) && compareDeep(prescription, o.prescription, true) + && compareDeep(originalPrescription, o.originalPrescription, true) && compareDeep(payee, o.payee, true) + && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(condition, o.condition, true) + && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) && compareDeep(exception, o.exception, true) + && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) && compareDeep(accidentType, o.accidentType, true) + && compareDeep(interventionException, o.interventionException, true) && compareDeep(item, o.item, true) + && compareDeep(additionalMaterials, o.additionalMaterials, true) && compareDeep(missingTeeth, o.missingTeeth, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Claim)) + return false; + Claim o = (Claim) other; + return compareValues(type, o.type, true) && compareValues(created, o.created, true) && compareValues(use, o.use, true) + && compareValues(school, o.school, true) && compareValues(accident, o.accident, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) + && (organization == null || organization.isEmpty()) && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) + && (fundsReserve == null || fundsReserve.isEmpty()) && (enterer == null || enterer.isEmpty()) + && (facility == null || facility.isEmpty()) && (prescription == null || prescription.isEmpty()) + && (originalPrescription == null || originalPrescription.isEmpty()) && (payee == null || payee.isEmpty()) + && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) + && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) + && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) + && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) + && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) + && (missingTeeth == null || missingTeeth.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Claim; + } + + @SearchParamDefinition(name="identifier", path="Claim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="provider", path="Claim.provider", description="Provider responsible for the claim", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="use", path="Claim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; + @SearchParamDefinition(name="patient", path="Claim.patient", description="Patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="priority", path="Claim.priority", description="Processing priority requested", type="token" ) + public static final String SP_PRIORITY = "priority"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClaimResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClaimResponse.java new file mode 100644 index 00000000000..35e2d1908c8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClaimResponse.java @@ -0,0 +1,5087 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides the adjudication details from the processing of a Claim resource. + */ +@ResourceDef(name="ClaimResponse", profile="http://hl7.org/fhir/Profile/ClaimResponse") +public class ClaimResponse extends DomainResource { + + @Block() + public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequenceLinkId; + + /** + * A list of note references to the notes provided below. + */ + @Child(name = "noteNumber", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) + protected List noteNumber; + + /** + * The adjudications results. + */ + @Child(name = "adjudication", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Adjudication details", formalDefinition="The adjudications results." ) + protected List adjudication; + + /** + * The second tier service adjudications for submitted services. + */ + @Child(name = "detail", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Detail line items", formalDefinition="The second tier service adjudications for submitted services." ) + protected List detail; + + private static final long serialVersionUID = -1917866697L; + + /* + * Constructor + */ + public ItemsComponent() { + super(); + } + + /* + * Constructor + */ + public ItemsComponent(PositiveIntType sequenceLinkId) { + super(); + this.sequenceLinkId = sequenceLinkId; + } + + /** + * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new PositiveIntType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public ItemsComponent setSequenceLinkIdElement(PositiveIntType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value A service line number. + */ + public ItemsComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new PositiveIntType(); + this.sequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #noteNumber} (A list of note references to the notes provided below.) + */ + public List getNoteNumber() { + if (this.noteNumber == null) + this.noteNumber = new ArrayList(); + return this.noteNumber; + } + + public boolean hasNoteNumber() { + if (this.noteNumber == null) + return false; + for (PositiveIntType item : this.noteNumber) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #noteNumber} (A list of note references to the notes provided below.) + */ + // syntactic sugar + public PositiveIntType addNoteNumberElement() {//2 + PositiveIntType t = new PositiveIntType(); + if (this.noteNumber == null) + this.noteNumber = new ArrayList(); + this.noteNumber.add(t); + return t; + } + + /** + * @param value {@link #noteNumber} (A list of note references to the notes provided below.) + */ + public ItemsComponent addNoteNumber(int value) { //1 + PositiveIntType t = new PositiveIntType(); + t.setValue(value); + if (this.noteNumber == null) + this.noteNumber = new ArrayList(); + this.noteNumber.add(t); + return this; + } + + /** + * @param value {@link #noteNumber} (A list of note references to the notes provided below.) + */ + public boolean hasNoteNumber(int value) { + if (this.noteNumber == null) + return false; + for (PositiveIntType v : this.noteNumber) + if (v.equals(value)) // positiveInt + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + public List getAdjudication() { + if (this.adjudication == null) + this.adjudication = new ArrayList(); + return this.adjudication; + } + + public boolean hasAdjudication() { + if (this.adjudication == null) + return false; + for (ItemAdjudicationComponent item : this.adjudication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + // syntactic sugar + public ItemAdjudicationComponent addAdjudication() { //3 + ItemAdjudicationComponent t = new ItemAdjudicationComponent(); + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addAdjudication(ItemAdjudicationComponent t) { //3 + if (t == null) + return this; + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return this; + } + + /** + * @return {@link #detail} (The second tier service adjudications for submitted services.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (ItemDetailComponent item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (The second tier service adjudications for submitted services.) + */ + // syntactic sugar + public ItemDetailComponent addDetail() { //3 + ItemDetailComponent t = new ItemDetailComponent(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addDetail(ItemDetailComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + childrenList.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); + childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); + childrenList.add(new Property("detail", "", "The second tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("noteNumber")) + this.getNoteNumber().add(castToPositiveInt(value)); + else if (name.equals("adjudication")) + this.getAdjudication().add((ItemAdjudicationComponent) value); + else if (name.equals("detail")) + this.getDetail().add((ItemDetailComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + } + else if (name.equals("noteNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.noteNumber"); + } + else if (name.equals("adjudication")) { + return addAdjudication(); + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public ItemsComponent copy() { + ItemsComponent dst = new ItemsComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + if (noteNumber != null) { + dst.noteNumber = new ArrayList(); + for (PositiveIntType i : noteNumber) + dst.noteNumber.add(i.copy()); + }; + if (adjudication != null) { + dst.adjudication = new ArrayList(); + for (ItemAdjudicationComponent i : adjudication) + dst.adjudication.add(i.copy()); + }; + if (detail != null) { + dst.detail = new ArrayList(); + for (ItemDetailComponent i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(noteNumber, o.noteNumber, true) + && compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumber, o.noteNumber, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (noteNumber == null || noteNumber.isEmpty()) + && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) + ; + } + + public String fhirType() { + return "ClaimResponse.item"; + + } + + } + + @Block() + public static class ItemAdjudicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) + protected Coding code; + + /** + * Monetary amount associated with the code. + */ + @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) + protected Money amount; + + /** + * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) + protected DecimalType value; + + private static final long serialVersionUID = -949880587L; + + /* + * Constructor + */ + public ItemAdjudicationComponent() { + super(); + } + + /* + * Constructor + */ + public ItemAdjudicationComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemAdjudicationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public ItemAdjudicationComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #amount} (Monetary amount associated with the code.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemAdjudicationComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Monetary amount associated with the code.) + */ + public ItemAdjudicationComponent setAmount(Money value) { + this.amount = value; + return this; + } + + /** + * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemAdjudicationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ItemAdjudicationComponent setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public ItemAdjudicationComponent setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public ItemAdjudicationComponent setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public ItemAdjudicationComponent setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); + childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + } + else + return super.addChild(name); + } + + public ItemAdjudicationComponent copy() { + ItemAdjudicationComponent dst = new ItemAdjudicationComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.amount = amount == null ? null : amount.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemAdjudicationComponent)) + return false; + ItemAdjudicationComponent o = (ItemAdjudicationComponent) other; + return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemAdjudicationComponent)) + return false; + ItemAdjudicationComponent o = (ItemAdjudicationComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.item.adjudication"; + + } + + } + + @Block() + public static class ItemDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequenceLinkId; + + /** + * The adjudications results. + */ + @Child(name = "adjudication", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Detail adjudication", formalDefinition="The adjudications results." ) + protected List adjudication; + + /** + * The third tier service adjudications for submitted services. + */ + @Child(name = "subDetail", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Subdetail line items", formalDefinition="The third tier service adjudications for submitted services." ) + protected List subDetail; + + private static final long serialVersionUID = -1751018357L; + + /* + * Constructor + */ + public ItemDetailComponent() { + super(); + } + + /* + * Constructor + */ + public ItemDetailComponent(PositiveIntType sequenceLinkId) { + super(); + this.sequenceLinkId = sequenceLinkId; + } + + /** + * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemDetailComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new PositiveIntType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public ItemDetailComponent setSequenceLinkIdElement(PositiveIntType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value A service line number. + */ + public ItemDetailComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new PositiveIntType(); + this.sequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + public List getAdjudication() { + if (this.adjudication == null) + this.adjudication = new ArrayList(); + return this.adjudication; + } + + public boolean hasAdjudication() { + if (this.adjudication == null) + return false; + for (DetailAdjudicationComponent item : this.adjudication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + // syntactic sugar + public DetailAdjudicationComponent addAdjudication() { //3 + DetailAdjudicationComponent t = new DetailAdjudicationComponent(); + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return t; + } + + // syntactic sugar + public ItemDetailComponent addAdjudication(DetailAdjudicationComponent t) { //3 + if (t == null) + return this; + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return this; + } + + /** + * @return {@link #subDetail} (The third tier service adjudications for submitted services.) + */ + public List getSubDetail() { + if (this.subDetail == null) + this.subDetail = new ArrayList(); + return this.subDetail; + } + + public boolean hasSubDetail() { + if (this.subDetail == null) + return false; + for (SubDetailComponent item : this.subDetail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subDetail} (The third tier service adjudications for submitted services.) + */ + // syntactic sugar + public SubDetailComponent addSubDetail() { //3 + SubDetailComponent t = new SubDetailComponent(); + if (this.subDetail == null) + this.subDetail = new ArrayList(); + this.subDetail.add(t); + return t; + } + + // syntactic sugar + public ItemDetailComponent addSubDetail(SubDetailComponent t) { //3 + if (t == null) + return this; + if (this.subDetail == null) + this.subDetail = new ArrayList(); + this.subDetail.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); + childrenList.add(new Property("subDetail", "", "The third tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("adjudication")) + this.getAdjudication().add((DetailAdjudicationComponent) value); + else if (name.equals("subDetail")) + this.getSubDetail().add((SubDetailComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + } + else if (name.equals("adjudication")) { + return addAdjudication(); + } + else if (name.equals("subDetail")) { + return addSubDetail(); + } + else + return super.addChild(name); + } + + public ItemDetailComponent copy() { + ItemDetailComponent dst = new ItemDetailComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + if (adjudication != null) { + dst.adjudication = new ArrayList(); + for (DetailAdjudicationComponent i : adjudication) + dst.adjudication.add(i.copy()); + }; + if (subDetail != null) { + dst.subDetail = new ArrayList(); + for (SubDetailComponent i : subDetail) + dst.subDetail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemDetailComponent)) + return false; + ItemDetailComponent o = (ItemDetailComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(adjudication, o.adjudication, true) + && compareDeep(subDetail, o.subDetail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemDetailComponent)) + return false; + ItemDetailComponent o = (ItemDetailComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty()) + && (subDetail == null || subDetail.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.item.detail"; + + } + + } + + @Block() + public static class DetailAdjudicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) + protected Coding code; + + /** + * Monetary amount associated with the code. + */ + @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) + protected Money amount; + + /** + * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) + protected DecimalType value; + + private static final long serialVersionUID = -949880587L; + + /* + * Constructor + */ + public DetailAdjudicationComponent() { + super(); + } + + /* + * Constructor + */ + public DetailAdjudicationComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailAdjudicationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public DetailAdjudicationComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #amount} (Monetary amount associated with the code.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailAdjudicationComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Monetary amount associated with the code.) + */ + public DetailAdjudicationComponent setAmount(Money value) { + this.amount = value; + return this; + } + + /** + * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailAdjudicationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DetailAdjudicationComponent setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public DetailAdjudicationComponent setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public DetailAdjudicationComponent setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public DetailAdjudicationComponent setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); + childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + } + else + return super.addChild(name); + } + + public DetailAdjudicationComponent copy() { + DetailAdjudicationComponent dst = new DetailAdjudicationComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.amount = amount == null ? null : amount.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DetailAdjudicationComponent)) + return false; + DetailAdjudicationComponent o = (DetailAdjudicationComponent) other; + return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DetailAdjudicationComponent)) + return false; + DetailAdjudicationComponent o = (DetailAdjudicationComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.item.detail.adjudication"; + + } + + } + + @Block() + public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected PositiveIntType sequenceLinkId; + + /** + * The adjudications results. + */ + @Child(name = "adjudication", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Subdetail adjudication", formalDefinition="The adjudications results." ) + protected List adjudication; + + private static final long serialVersionUID = 1780202110L; + + /* + * Constructor + */ + public SubDetailComponent() { + super(); + } + + /* + * Constructor + */ + public SubDetailComponent(PositiveIntType sequenceLinkId) { + super(); + this.sequenceLinkId = sequenceLinkId; + } + + /** + * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubDetailComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new PositiveIntType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public SubDetailComponent setSequenceLinkIdElement(PositiveIntType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value A service line number. + */ + public SubDetailComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new PositiveIntType(); + this.sequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + public List getAdjudication() { + if (this.adjudication == null) + this.adjudication = new ArrayList(); + return this.adjudication; + } + + public boolean hasAdjudication() { + if (this.adjudication == null) + return false; + for (SubdetailAdjudicationComponent item : this.adjudication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + // syntactic sugar + public SubdetailAdjudicationComponent addAdjudication() { //3 + SubdetailAdjudicationComponent t = new SubdetailAdjudicationComponent(); + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return t; + } + + // syntactic sugar + public SubDetailComponent addAdjudication(SubdetailAdjudicationComponent t) { //3 + if (t == null) + return this; + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("adjudication")) + this.getAdjudication().add((SubdetailAdjudicationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + } + else if (name.equals("adjudication")) { + return addAdjudication(); + } + else + return super.addChild(name); + } + + public SubDetailComponent copy() { + SubDetailComponent dst = new SubDetailComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + if (adjudication != null) { + dst.adjudication = new ArrayList(); + for (SubdetailAdjudicationComponent i : adjudication) + dst.adjudication.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubDetailComponent)) + return false; + SubDetailComponent o = (SubDetailComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(adjudication, o.adjudication, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubDetailComponent)) + return false; + SubDetailComponent o = (SubDetailComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty()) + ; + } + + public String fhirType() { + return "ClaimResponse.item.detail.subDetail"; + + } + + } + + @Block() + public static class SubdetailAdjudicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) + protected Coding code; + + /** + * Monetary amount associated with the code. + */ + @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) + protected Money amount; + + /** + * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) + protected DecimalType value; + + private static final long serialVersionUID = -949880587L; + + /* + * Constructor + */ + public SubdetailAdjudicationComponent() { + super(); + } + + /* + * Constructor + */ + public SubdetailAdjudicationComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public SubdetailAdjudicationComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #amount} (Monetary amount associated with the code.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Monetary amount associated with the code.) + */ + public SubdetailAdjudicationComponent setAmount(Money value) { + this.amount = value; + return this; + } + + /** + * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public SubdetailAdjudicationComponent setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public SubdetailAdjudicationComponent setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public SubdetailAdjudicationComponent setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public SubdetailAdjudicationComponent setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); + childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + } + else + return super.addChild(name); + } + + public SubdetailAdjudicationComponent copy() { + SubdetailAdjudicationComponent dst = new SubdetailAdjudicationComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.amount = amount == null ? null : amount.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubdetailAdjudicationComponent)) + return false; + SubdetailAdjudicationComponent o = (SubdetailAdjudicationComponent) other; + return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubdetailAdjudicationComponent)) + return false; + SubdetailAdjudicationComponent o = (SubdetailAdjudicationComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.item.detail.subDetail.adjudication"; + + } + + } + + @Block() + public static class AddedItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * List of input service items which this service line is intended to replace. + */ + @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service instances", formalDefinition="List of input service items which this service line is intended to replace." ) + protected List sequenceLinkId; + + /** + * A code to indicate the Professional Service or Product supplied. + */ + @Child(name = "service", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Group, Service or Product", formalDefinition="A code to indicate the Professional Service or Product supplied." ) + protected Coding service; + + /** + * The fee charged for the professional service or product.. + */ + @Child(name = "fee", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Professional fee or Product charge", formalDefinition="The fee charged for the professional service or product.." ) + protected Money fee; + + /** + * A list of note references to the notes provided below. + */ + @Child(name = "noteNumberLinkId", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) + protected List noteNumberLinkId; + + /** + * The adjudications results. + */ + @Child(name = "adjudication", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Added items adjudication", formalDefinition="The adjudications results." ) + protected List adjudication; + + /** + * The second tier service adjudications for payor added services. + */ + @Child(name = "detail", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Added items details", formalDefinition="The second tier service adjudications for payor added services." ) + protected List detail; + + private static final long serialVersionUID = -1675935854L; + + /* + * Constructor + */ + public AddedItemComponent() { + super(); + } + + /* + * Constructor + */ + public AddedItemComponent(Coding service) { + super(); + this.service = service; + } + + /** + * @return {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) + */ + public List getSequenceLinkId() { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new ArrayList(); + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkId() { + if (this.sequenceLinkId == null) + return false; + for (PositiveIntType item : this.sequenceLinkId) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) + */ + // syntactic sugar + public PositiveIntType addSequenceLinkIdElement() {//2 + PositiveIntType t = new PositiveIntType(); + if (this.sequenceLinkId == null) + this.sequenceLinkId = new ArrayList(); + this.sequenceLinkId.add(t); + return t; + } + + /** + * @param value {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) + */ + public AddedItemComponent addSequenceLinkId(int value) { //1 + PositiveIntType t = new PositiveIntType(); + t.setValue(value); + if (this.sequenceLinkId == null) + this.sequenceLinkId = new ArrayList(); + this.sequenceLinkId.add(t); + return this; + } + + /** + * @param value {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) + */ + public boolean hasSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + return false; + for (PositiveIntType v : this.sequenceLinkId) + if (v.equals(value)) // positiveInt + return true; + return false; + } + + /** + * @return {@link #service} (A code to indicate the Professional Service or Product supplied.) + */ + public Coding getService() { + if (this.service == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemComponent.service"); + else if (Configuration.doAutoCreate()) + this.service = new Coding(); // cc + return this.service; + } + + public boolean hasService() { + return this.service != null && !this.service.isEmpty(); + } + + /** + * @param value {@link #service} (A code to indicate the Professional Service or Product supplied.) + */ + public AddedItemComponent setService(Coding value) { + this.service = value; + return this; + } + + /** + * @return {@link #fee} (The fee charged for the professional service or product..) + */ + public Money getFee() { + if (this.fee == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemComponent.fee"); + else if (Configuration.doAutoCreate()) + this.fee = new Money(); // cc + return this.fee; + } + + public boolean hasFee() { + return this.fee != null && !this.fee.isEmpty(); + } + + /** + * @param value {@link #fee} (The fee charged for the professional service or product..) + */ + public AddedItemComponent setFee(Money value) { + this.fee = value; + return this; + } + + /** + * @return {@link #noteNumberLinkId} (A list of note references to the notes provided below.) + */ + public List getNoteNumberLinkId() { + if (this.noteNumberLinkId == null) + this.noteNumberLinkId = new ArrayList(); + return this.noteNumberLinkId; + } + + public boolean hasNoteNumberLinkId() { + if (this.noteNumberLinkId == null) + return false; + for (PositiveIntType item : this.noteNumberLinkId) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #noteNumberLinkId} (A list of note references to the notes provided below.) + */ + // syntactic sugar + public PositiveIntType addNoteNumberLinkIdElement() {//2 + PositiveIntType t = new PositiveIntType(); + if (this.noteNumberLinkId == null) + this.noteNumberLinkId = new ArrayList(); + this.noteNumberLinkId.add(t); + return t; + } + + /** + * @param value {@link #noteNumberLinkId} (A list of note references to the notes provided below.) + */ + public AddedItemComponent addNoteNumberLinkId(int value) { //1 + PositiveIntType t = new PositiveIntType(); + t.setValue(value); + if (this.noteNumberLinkId == null) + this.noteNumberLinkId = new ArrayList(); + this.noteNumberLinkId.add(t); + return this; + } + + /** + * @param value {@link #noteNumberLinkId} (A list of note references to the notes provided below.) + */ + public boolean hasNoteNumberLinkId(int value) { + if (this.noteNumberLinkId == null) + return false; + for (PositiveIntType v : this.noteNumberLinkId) + if (v.equals(value)) // positiveInt + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + public List getAdjudication() { + if (this.adjudication == null) + this.adjudication = new ArrayList(); + return this.adjudication; + } + + public boolean hasAdjudication() { + if (this.adjudication == null) + return false; + for (AddedItemAdjudicationComponent item : this.adjudication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + // syntactic sugar + public AddedItemAdjudicationComponent addAdjudication() { //3 + AddedItemAdjudicationComponent t = new AddedItemAdjudicationComponent(); + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return t; + } + + // syntactic sugar + public AddedItemComponent addAdjudication(AddedItemAdjudicationComponent t) { //3 + if (t == null) + return this; + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return this; + } + + /** + * @return {@link #detail} (The second tier service adjudications for payor added services.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (AddedItemsDetailComponent item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (The second tier service adjudications for payor added services.) + */ + // syntactic sugar + public AddedItemsDetailComponent addDetail() { //3 + AddedItemsDetailComponent t = new AddedItemsDetailComponent(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public AddedItemComponent addDetail(AddedItemsDetailComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "positiveInt", "List of input service items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + childrenList.add(new Property("service", "Coding", "A code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("fee", "Money", "The fee charged for the professional service or product..", 0, java.lang.Integer.MAX_VALUE, fee)); + childrenList.add(new Property("noteNumberLinkId", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumberLinkId)); + childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); + childrenList.add(new Property("detail", "", "The second tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.getSequenceLinkId().add(castToPositiveInt(value)); + else if (name.equals("service")) + this.service = castToCoding(value); // Coding + else if (name.equals("fee")) + this.fee = castToMoney(value); // Money + else if (name.equals("noteNumberLinkId")) + this.getNoteNumberLinkId().add(castToPositiveInt(value)); + else if (name.equals("adjudication")) + this.getAdjudication().add((AddedItemAdjudicationComponent) value); + else if (name.equals("detail")) + this.getDetail().add((AddedItemsDetailComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + } + else if (name.equals("service")) { + this.service = new Coding(); + return this.service; + } + else if (name.equals("fee")) { + this.fee = new Money(); + return this.fee; + } + else if (name.equals("noteNumberLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.noteNumberLinkId"); + } + else if (name.equals("adjudication")) { + return addAdjudication(); + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public AddedItemComponent copy() { + AddedItemComponent dst = new AddedItemComponent(); + copyValues(dst); + if (sequenceLinkId != null) { + dst.sequenceLinkId = new ArrayList(); + for (PositiveIntType i : sequenceLinkId) + dst.sequenceLinkId.add(i.copy()); + }; + dst.service = service == null ? null : service.copy(); + dst.fee = fee == null ? null : fee.copy(); + if (noteNumberLinkId != null) { + dst.noteNumberLinkId = new ArrayList(); + for (PositiveIntType i : noteNumberLinkId) + dst.noteNumberLinkId.add(i.copy()); + }; + if (adjudication != null) { + dst.adjudication = new ArrayList(); + for (AddedItemAdjudicationComponent i : adjudication) + dst.adjudication.add(i.copy()); + }; + if (detail != null) { + dst.detail = new ArrayList(); + for (AddedItemsDetailComponent i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AddedItemComponent)) + return false; + AddedItemComponent o = (AddedItemComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(service, o.service, true) + && compareDeep(fee, o.fee, true) && compareDeep(noteNumberLinkId, o.noteNumberLinkId, true) && compareDeep(adjudication, o.adjudication, true) + && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AddedItemComponent)) + return false; + AddedItemComponent o = (AddedItemComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumberLinkId, o.noteNumberLinkId, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (service == null || service.isEmpty()) + && (fee == null || fee.isEmpty()) && (noteNumberLinkId == null || noteNumberLinkId.isEmpty()) + && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) + ; + } + + public String fhirType() { + return "ClaimResponse.addItem"; + + } + + } + + @Block() + public static class AddedItemAdjudicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) + protected Coding code; + + /** + * Monetary amount associated with the code. + */ + @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) + protected Money amount; + + /** + * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) + protected DecimalType value; + + private static final long serialVersionUID = -949880587L; + + /* + * Constructor + */ + public AddedItemAdjudicationComponent() { + super(); + } + + /* + * Constructor + */ + public AddedItemAdjudicationComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public AddedItemAdjudicationComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #amount} (Monetary amount associated with the code.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Monetary amount associated with the code.) + */ + public AddedItemAdjudicationComponent setAmount(Money value) { + this.amount = value; + return this; + } + + /** + * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public AddedItemAdjudicationComponent setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemAdjudicationComponent setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemAdjudicationComponent setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemAdjudicationComponent setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); + childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + } + else + return super.addChild(name); + } + + public AddedItemAdjudicationComponent copy() { + AddedItemAdjudicationComponent dst = new AddedItemAdjudicationComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.amount = amount == null ? null : amount.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AddedItemAdjudicationComponent)) + return false; + AddedItemAdjudicationComponent o = (AddedItemAdjudicationComponent) other; + return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AddedItemAdjudicationComponent)) + return false; + AddedItemAdjudicationComponent o = (AddedItemAdjudicationComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.addItem.adjudication"; + + } + + } + + @Block() + public static class AddedItemsDetailComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code to indicate the Professional Service or Product supplied. + */ + @Child(name = "service", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service or Product", formalDefinition="A code to indicate the Professional Service or Product supplied." ) + protected Coding service; + + /** + * The fee charged for the professional service or product.. + */ + @Child(name = "fee", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Professional fee or Product charge", formalDefinition="The fee charged for the professional service or product.." ) + protected Money fee; + + /** + * The adjudications results. + */ + @Child(name = "adjudication", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Added items detail adjudication", formalDefinition="The adjudications results." ) + protected List adjudication; + + private static final long serialVersionUID = -2104242020L; + + /* + * Constructor + */ + public AddedItemsDetailComponent() { + super(); + } + + /* + * Constructor + */ + public AddedItemsDetailComponent(Coding service) { + super(); + this.service = service; + } + + /** + * @return {@link #service} (A code to indicate the Professional Service or Product supplied.) + */ + public Coding getService() { + if (this.service == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemsDetailComponent.service"); + else if (Configuration.doAutoCreate()) + this.service = new Coding(); // cc + return this.service; + } + + public boolean hasService() { + return this.service != null && !this.service.isEmpty(); + } + + /** + * @param value {@link #service} (A code to indicate the Professional Service or Product supplied.) + */ + public AddedItemsDetailComponent setService(Coding value) { + this.service = value; + return this; + } + + /** + * @return {@link #fee} (The fee charged for the professional service or product..) + */ + public Money getFee() { + if (this.fee == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemsDetailComponent.fee"); + else if (Configuration.doAutoCreate()) + this.fee = new Money(); // cc + return this.fee; + } + + public boolean hasFee() { + return this.fee != null && !this.fee.isEmpty(); + } + + /** + * @param value {@link #fee} (The fee charged for the professional service or product..) + */ + public AddedItemsDetailComponent setFee(Money value) { + this.fee = value; + return this; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + public List getAdjudication() { + if (this.adjudication == null) + this.adjudication = new ArrayList(); + return this.adjudication; + } + + public boolean hasAdjudication() { + if (this.adjudication == null) + return false; + for (AddedItemDetailAdjudicationComponent item : this.adjudication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #adjudication} (The adjudications results.) + */ + // syntactic sugar + public AddedItemDetailAdjudicationComponent addAdjudication() { //3 + AddedItemDetailAdjudicationComponent t = new AddedItemDetailAdjudicationComponent(); + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return t; + } + + // syntactic sugar + public AddedItemsDetailComponent addAdjudication(AddedItemDetailAdjudicationComponent t) { //3 + if (t == null) + return this; + if (this.adjudication == null) + this.adjudication = new ArrayList(); + this.adjudication.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("service", "Coding", "A code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("fee", "Money", "The fee charged for the professional service or product..", 0, java.lang.Integer.MAX_VALUE, fee)); + childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("service")) + this.service = castToCoding(value); // Coding + else if (name.equals("fee")) + this.fee = castToMoney(value); // Money + else if (name.equals("adjudication")) + this.getAdjudication().add((AddedItemDetailAdjudicationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("service")) { + this.service = new Coding(); + return this.service; + } + else if (name.equals("fee")) { + this.fee = new Money(); + return this.fee; + } + else if (name.equals("adjudication")) { + return addAdjudication(); + } + else + return super.addChild(name); + } + + public AddedItemsDetailComponent copy() { + AddedItemsDetailComponent dst = new AddedItemsDetailComponent(); + copyValues(dst); + dst.service = service == null ? null : service.copy(); + dst.fee = fee == null ? null : fee.copy(); + if (adjudication != null) { + dst.adjudication = new ArrayList(); + for (AddedItemDetailAdjudicationComponent i : adjudication) + dst.adjudication.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AddedItemsDetailComponent)) + return false; + AddedItemsDetailComponent o = (AddedItemsDetailComponent) other; + return compareDeep(service, o.service, true) && compareDeep(fee, o.fee, true) && compareDeep(adjudication, o.adjudication, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AddedItemsDetailComponent)) + return false; + AddedItemsDetailComponent o = (AddedItemsDetailComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (service == null || service.isEmpty()) && (fee == null || fee.isEmpty()) + && (adjudication == null || adjudication.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.addItem.detail"; + + } + + } + + @Block() + public static class AddedItemDetailAdjudicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) + protected Coding code; + + /** + * Monetary amount associated with the code. + */ + @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) + protected Money amount; + + /** + * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) + protected DecimalType value; + + private static final long serialVersionUID = -949880587L; + + /* + * Constructor + */ + public AddedItemDetailAdjudicationComponent() { + super(); + } + + /* + * Constructor + */ + public AddedItemDetailAdjudicationComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + */ + public AddedItemDetailAdjudicationComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #amount} (Monetary amount associated with the code.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Monetary amount associated with the code.) + */ + public AddedItemDetailAdjudicationComponent setAmount(Money value) { + this.amount = value; + return this; + } + + /** + * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public AddedItemDetailAdjudicationComponent setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemDetailAdjudicationComponent setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemDetailAdjudicationComponent setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. + */ + public AddedItemDetailAdjudicationComponent setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); + childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + } + else + return super.addChild(name); + } + + public AddedItemDetailAdjudicationComponent copy() { + AddedItemDetailAdjudicationComponent dst = new AddedItemDetailAdjudicationComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.amount = amount == null ? null : amount.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AddedItemDetailAdjudicationComponent)) + return false; + AddedItemDetailAdjudicationComponent o = (AddedItemDetailAdjudicationComponent) other; + return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AddedItemDetailAdjudicationComponent)) + return false; + AddedItemDetailAdjudicationComponent o = (AddedItemDetailAdjudicationComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.addItem.detail.adjudication"; + + } + + } + + @Block() + public static class ErrorsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. + */ + @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Item sequence number", formalDefinition="The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere." ) + protected PositiveIntType sequenceLinkId; + + /** + * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + @Child(name = "detailSequenceLinkId", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Detail sequence number", formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition." ) + protected PositiveIntType detailSequenceLinkId; + + /** + * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + @Child(name = "subdetailSequenceLinkId", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Subdetail sequence number", formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition." ) + protected PositiveIntType subdetailSequenceLinkId; + + /** + * An error code,froma specified code system, which details why the claim could not be adjudicated. + */ + @Child(name = "code", type = {Coding.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Error code detailing processing issues", formalDefinition="An error code,froma specified code system, which details why the claim could not be adjudicated." ) + protected Coding code; + + private static final long serialVersionUID = -1893641175L; + + /* + * Constructor + */ + public ErrorsComponent() { + super(); + } + + /* + * Constructor + */ + public ErrorsComponent(Coding code) { + super(); + this.code = code; + } + + /** + * @return {@link #sequenceLinkId} (The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ErrorsComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new PositiveIntType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public ErrorsComponent setSequenceLinkIdElement(PositiveIntType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. + */ + public ErrorsComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new PositiveIntType(); + this.sequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #detailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getDetailSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getDetailSequenceLinkIdElement() { + if (this.detailSequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ErrorsComponent.detailSequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.detailSequenceLinkId = new PositiveIntType(); // bb + return this.detailSequenceLinkId; + } + + public boolean hasDetailSequenceLinkIdElement() { + return this.detailSequenceLinkId != null && !this.detailSequenceLinkId.isEmpty(); + } + + public boolean hasDetailSequenceLinkId() { + return this.detailSequenceLinkId != null && !this.detailSequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #detailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getDetailSequenceLinkId" gives direct access to the value + */ + public ErrorsComponent setDetailSequenceLinkIdElement(PositiveIntType value) { + this.detailSequenceLinkId = value; + return this; + } + + /** + * @return The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + public int getDetailSequenceLinkId() { + return this.detailSequenceLinkId == null || this.detailSequenceLinkId.isEmpty() ? 0 : this.detailSequenceLinkId.getValue(); + } + + /** + * @param value The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + public ErrorsComponent setDetailSequenceLinkId(int value) { + if (this.detailSequenceLinkId == null) + this.detailSequenceLinkId = new PositiveIntType(); + this.detailSequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #subdetailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getSubdetailSequenceLinkId" gives direct access to the value + */ + public PositiveIntType getSubdetailSequenceLinkIdElement() { + if (this.subdetailSequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ErrorsComponent.subdetailSequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.subdetailSequenceLinkId = new PositiveIntType(); // bb + return this.subdetailSequenceLinkId; + } + + public boolean hasSubdetailSequenceLinkIdElement() { + return this.subdetailSequenceLinkId != null && !this.subdetailSequenceLinkId.isEmpty(); + } + + public boolean hasSubdetailSequenceLinkId() { + return this.subdetailSequenceLinkId != null && !this.subdetailSequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #subdetailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getSubdetailSequenceLinkId" gives direct access to the value + */ + public ErrorsComponent setSubdetailSequenceLinkIdElement(PositiveIntType value) { + this.subdetailSequenceLinkId = value; + return this; + } + + /** + * @return The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + public int getSubdetailSequenceLinkId() { + return this.subdetailSequenceLinkId == null || this.subdetailSequenceLinkId.isEmpty() ? 0 : this.subdetailSequenceLinkId.getValue(); + } + + /** + * @param value The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. + */ + public ErrorsComponent setSubdetailSequenceLinkId(int value) { + if (this.subdetailSequenceLinkId == null) + this.subdetailSequenceLinkId = new PositiveIntType(); + this.subdetailSequenceLinkId.setValue(value); + return this; + } + + /** + * @return {@link #code} (An error code,froma specified code system, which details why the claim could not be adjudicated.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ErrorsComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (An error code,froma specified code system, which details why the claim could not be adjudicated.) + */ + public ErrorsComponent setCode(Coding value) { + this.code = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "positiveInt", "The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + childrenList.add(new Property("detailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, java.lang.Integer.MAX_VALUE, detailSequenceLinkId)); + childrenList.add(new Property("subdetailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, java.lang.Integer.MAX_VALUE, subdetailSequenceLinkId)); + childrenList.add(new Property("code", "Coding", "An error code,froma specified code system, which details why the claim could not be adjudicated.", 0, java.lang.Integer.MAX_VALUE, code)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("detailSequenceLinkId")) + this.detailSequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("subdetailSequenceLinkId")) + this.subdetailSequenceLinkId = castToPositiveInt(value); // PositiveIntType + else if (name.equals("code")) + this.code = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + } + else if (name.equals("detailSequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.detailSequenceLinkId"); + } + else if (name.equals("subdetailSequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.subdetailSequenceLinkId"); + } + else if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else + return super.addChild(name); + } + + public ErrorsComponent copy() { + ErrorsComponent dst = new ErrorsComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + dst.detailSequenceLinkId = detailSequenceLinkId == null ? null : detailSequenceLinkId.copy(); + dst.subdetailSequenceLinkId = subdetailSequenceLinkId == null ? null : subdetailSequenceLinkId.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ErrorsComponent)) + return false; + ErrorsComponent o = (ErrorsComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(detailSequenceLinkId, o.detailSequenceLinkId, true) + && compareDeep(subdetailSequenceLinkId, o.subdetailSequenceLinkId, true) && compareDeep(code, o.code, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ErrorsComponent)) + return false; + ErrorsComponent o = (ErrorsComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(detailSequenceLinkId, o.detailSequenceLinkId, true) + && compareValues(subdetailSequenceLinkId, o.subdetailSequenceLinkId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (detailSequenceLinkId == null || detailSequenceLinkId.isEmpty()) + && (subdetailSequenceLinkId == null || subdetailSequenceLinkId.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + public String fhirType() { + return "ClaimResponse.error"; + + } + + } + + @Block() + public static class NotesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An integer associated with each note which may be referred to from each service line item. + */ + @Child(name = "number", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Note Number for this note", formalDefinition="An integer associated with each note which may be referred to from each service line item." ) + protected PositiveIntType number; + + /** + * The note purpose: Print/Display. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) + protected Coding type; + + /** + * The note text. + */ + @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Note explanatory text", formalDefinition="The note text." ) + protected StringType text; + + private static final long serialVersionUID = 1768923951L; + + /* + * Constructor + */ + public NotesComponent() { + super(); + } + + /** + * @return {@link #number} (An integer associated with each note which may be referred to from each service line item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public PositiveIntType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NotesComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new PositiveIntType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (An integer associated with each note which may be referred to from each service line item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public NotesComponent setNumberElement(PositiveIntType value) { + this.number = value; + return this; + } + + /** + * @return An integer associated with each note which may be referred to from each service line item. + */ + public int getNumber() { + return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); + } + + /** + * @param value An integer associated with each note which may be referred to from each service line item. + */ + public NotesComponent setNumber(int value) { + if (this.number == null) + this.number = new PositiveIntType(); + this.number.setValue(value); + return this; + } + + /** + * @return {@link #type} (The note purpose: Print/Display.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NotesComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The note purpose: Print/Display.) + */ + public NotesComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NotesComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public NotesComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return The note text. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value The note text. + */ + public NotesComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("number")) + this.number = castToPositiveInt(value); // PositiveIntType + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.number"); + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.text"); + } + else + return super.addChild(name); + } + + public NotesComponent copy() { + NotesComponent dst = new NotesComponent(); + copyValues(dst); + dst.number = number == null ? null : number.copy(); + dst.type = type == null ? null : type.copy(); + dst.text = text == null ? null : text.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NotesComponent)) + return false; + NotesComponent o = (NotesComponent) other; + return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(text, o.text, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NotesComponent)) + return false; + NotesComponent o = (NotesComponent) other; + return compareValues(number, o.number, true) && compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (number == null || number.isEmpty()) && (type == null || type.isEmpty()) + && (text == null || text.isEmpty()); + } + + public String fhirType() { + return "ClaimResponse.note"; + + } + + } + + @Block() + public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line item. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) + protected PositiveIntType sequence; + + /** + * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + @Child(name = "focal", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) + protected BooleanType focal; + + /** + * Reference to the program or plan identification, underwriter or payor. + */ + @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) + protected Reference coverage; + + /** + * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) + */ + protected Coverage coverageTarget; + + /** + * The contract number of a business agreement which describes the terms and conditions. + */ + @Child(name = "businessArrangement", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) + protected StringType businessArrangement; + + /** + * The relationship of the patient to the subscriber. + */ + @Child(name = "relationship", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) + protected Coding relationship; + + /** + * A list of references from the Insurer to which these services pertain. + */ + @Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) + protected List preAuthRef; + + /** + * The Coverages adjudication details. + */ + @Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) + protected Reference claimResponse; + + /** + * The actual object that is the target of the reference (The Coverages adjudication details.) + */ + protected ClaimResponse claimResponseTarget; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + private static final long serialVersionUID = 621250924L; + + /* + * Constructor + */ + public CoverageComponent() { + super(); + } + + /* + * Constructor + */ + public CoverageComponent(PositiveIntType sequence, BooleanType focal, Reference coverage, Coding relationship) { + super(); + this.sequence = sequence; + this.focal = focal; + this.coverage = coverage; + this.relationship = relationship; + } + + /** + * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public CoverageComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return A service line item. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value A service line item. + */ + public CoverageComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value + */ + public BooleanType getFocalElement() { + if (this.focal == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.focal"); + else if (Configuration.doAutoCreate()) + this.focal = new BooleanType(); // bb + return this.focal; + } + + public boolean hasFocalElement() { + return this.focal != null && !this.focal.isEmpty(); + } + + public boolean hasFocal() { + return this.focal != null && !this.focal.isEmpty(); + } + + /** + * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value + */ + public CoverageComponent setFocalElement(BooleanType value) { + this.focal = value; + return this; + } + + /** + * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + public boolean getFocal() { + return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); + } + + /** + * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. + */ + public CoverageComponent setFocal(boolean value) { + if (this.focal == null) + this.focal = new BooleanType(); + this.focal.setValue(value); + return this; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverage() { + if (this.coverage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.coverage"); + else if (Configuration.doAutoCreate()) + this.coverage = new Reference(); // cc + return this.coverage; + } + + public boolean hasCoverage() { + return this.coverage != null && !this.coverage.isEmpty(); + } + + /** + * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public CoverageComponent setCoverage(Reference value) { + this.coverage = value; + return this; + } + + /** + * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public Coverage getCoverageTarget() { + if (this.coverageTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.coverage"); + else if (Configuration.doAutoCreate()) + this.coverageTarget = new Coverage(); // aa + return this.coverageTarget; + } + + /** + * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public CoverageComponent setCoverageTarget(Coverage value) { + this.coverageTarget = value; + return this; + } + + /** + * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value + */ + public StringType getBusinessArrangementElement() { + if (this.businessArrangement == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); + else if (Configuration.doAutoCreate()) + this.businessArrangement = new StringType(); // bb + return this.businessArrangement; + } + + public boolean hasBusinessArrangementElement() { + return this.businessArrangement != null && !this.businessArrangement.isEmpty(); + } + + public boolean hasBusinessArrangement() { + return this.businessArrangement != null && !this.businessArrangement.isEmpty(); + } + + /** + * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value + */ + public CoverageComponent setBusinessArrangementElement(StringType value) { + this.businessArrangement = value; + return this; + } + + /** + * @return The contract number of a business agreement which describes the terms and conditions. + */ + public String getBusinessArrangement() { + return this.businessArrangement == null ? null : this.businessArrangement.getValue(); + } + + /** + * @param value The contract number of a business agreement which describes the terms and conditions. + */ + public CoverageComponent setBusinessArrangement(String value) { + if (Utilities.noString(value)) + this.businessArrangement = null; + else { + if (this.businessArrangement == null) + this.businessArrangement = new StringType(); + this.businessArrangement.setValue(value); + } + return this; + } + + /** + * @return {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public CoverageComponent setRelationship(Coding value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public List getPreAuthRef() { + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + return this.preAuthRef; + } + + public boolean hasPreAuthRef() { + if (this.preAuthRef == null) + return false; + for (StringType item : this.preAuthRef) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + // syntactic sugar + public StringType addPreAuthRefElement() {//2 + StringType t = new StringType(); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); + return t; + } + + /** + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public CoverageComponent addPreAuthRef(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); + return this; + } + + /** + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) + */ + public boolean hasPreAuthRef(String value) { + if (this.preAuthRef == null) + return false; + for (StringType v : this.preAuthRef) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #claimResponse} (The Coverages adjudication details.) + */ + public Reference getClaimResponse() { + if (this.claimResponse == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); + else if (Configuration.doAutoCreate()) + this.claimResponse = new Reference(); // cc + return this.claimResponse; + } + + public boolean hasClaimResponse() { + return this.claimResponse != null && !this.claimResponse.isEmpty(); + } + + /** + * @param value {@link #claimResponse} (The Coverages adjudication details.) + */ + public CoverageComponent setClaimResponse(Reference value) { + this.claimResponse = value; + return this; + } + + /** + * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) + */ + public ClaimResponse getClaimResponseTarget() { + if (this.claimResponseTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); + else if (Configuration.doAutoCreate()) + this.claimResponseTarget = new ClaimResponse(); // aa + return this.claimResponseTarget; + } + + /** + * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) + */ + public CoverageComponent setClaimResponseTarget(ClaimResponse value) { + this.claimResponseTarget = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public CoverageComponent setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); + childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); + childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); + childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("focal")) + this.focal = castToBoolean(value); // BooleanType + else if (name.equals("coverage")) + this.coverage = castToReference(value); // Reference + else if (name.equals("businessArrangement")) + this.businessArrangement = castToString(value); // StringType + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding + else if (name.equals("preAuthRef")) + this.getPreAuthRef().add(castToString(value)); + else if (name.equals("claimResponse")) + this.claimResponse = castToReference(value); // Reference + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequence"); + } + else if (name.equals("focal")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.focal"); + } + else if (name.equals("coverage")) { + this.coverage = new Reference(); + return this.coverage; + } + else if (name.equals("businessArrangement")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.businessArrangement"); + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; + } + else if (name.equals("preAuthRef")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.preAuthRef"); + } + else if (name.equals("claimResponse")) { + this.claimResponse = new Reference(); + return this.claimResponse; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else + return super.addChild(name); + } + + public CoverageComponent copy() { + CoverageComponent dst = new CoverageComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.focal = focal == null ? null : focal.copy(); + dst.coverage = coverage == null ? null : coverage.copy(); + dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + if (preAuthRef != null) { + dst.preAuthRef = new ArrayList(); + for (StringType i : preAuthRef) + dst.preAuthRef.add(i.copy()); + }; + dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) + && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) + && compareDeep(originalRuleset, o.originalRuleset, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) + && compareValues(preAuthRef, o.preAuthRef, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) + && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) + && (relationship == null || relationship.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty()) + && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + ; + } + + public String fhirType() { + return "ClaimResponse.coverage"; + + } + + } + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Response number", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource referrence. + */ + @Child(name = "request", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource referrence.) + */ + protected Claim requestTarget; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The Insurer who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + /** + * Transaction status: error, complete. + */ + @Child(name = "outcome", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) + protected Enumeration outcome; + + /** + * A description of the status of the adjudication. + */ + @Child(name = "disposition", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) + protected StringType disposition; + + /** + * Party to be reimbursed: Subscriber, provider, other. + */ + @Child(name = "payeeType", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + protected Coding payeeType; + + /** + * The first tier service adjudications for submitted services. + */ + @Child(name = "item", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Line items", formalDefinition="The first tier service adjudications for submitted services." ) + protected List item; + + /** + * The first tier service adjudications for payor added services. + */ + @Child(name = "addItem", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." ) + protected List addItem; + + /** + * Mutually exclusive with Services Provided (Item). + */ + @Child(name = "error", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) + protected List error; + + /** + * The total cost of the services reported. + */ + @Child(name = "totalCost", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." ) + protected Money totalCost; + + /** + * The amount of deductible applied which was not allocated to any particular service line. + */ + @Child(name = "unallocDeductable", type = {Money.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unallocated deductible", formalDefinition="The amount of deductible applied which was not allocated to any particular service line." ) + protected Money unallocDeductable; + + /** + * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible). + */ + @Child(name = "totalBenefit", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible)." ) + protected Money totalBenefit; + + /** + * Adjustment to the payment of this transaction which is not related to adjudication of this transaction. + */ + @Child(name = "paymentAdjustment", type = {Money.class}, order=17, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." ) + protected Money paymentAdjustment; + + /** + * Reason for the payment adjustment. + */ + @Child(name = "paymentAdjustmentReason", type = {Coding.class}, order=18, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for Payment adjustment", formalDefinition="Reason for the payment adjustment." ) + protected Coding paymentAdjustmentReason; + + /** + * Estimated payment data. + */ + @Child(name = "paymentDate", type = {DateType.class}, order=19, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." ) + protected DateType paymentDate; + + /** + * Payable less any payment adjustment. + */ + @Child(name = "paymentAmount", type = {Money.class}, order=20, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Payment amount", formalDefinition="Payable less any payment adjustment." ) + protected Money paymentAmount; + + /** + * Payment identifier. + */ + @Child(name = "paymentRef", type = {Identifier.class}, order=21, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Payment identifier", formalDefinition="Payment identifier." ) + protected Identifier paymentRef; + + /** + * Status of funds reservation (For provider, for Patient, None). + */ + @Child(name = "reserved", type = {Coding.class}, order=22, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." ) + protected Coding reserved; + + /** + * The form to be used for printing the content. + */ + @Child(name = "form", type = {Coding.class}, order=23, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) + protected Coding form; + + /** + * Note text. + */ + @Child(name = "note", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Processing notes", formalDefinition="Note text." ) + protected List note; + + /** + * Financial instrument by which payment information for health care. + */ + @Child(name = "coverage", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) + protected List coverage; + + private static final long serialVersionUID = 2021598689L; + + /* + * Constructor + */ + public ClaimResponse() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource referrence.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource referrence.) + */ + public ClaimResponse setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) + */ + public Claim getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new Claim(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) + */ + public ClaimResponse setRequestTarget(Claim value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public ClaimResponse setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public ClaimResponse setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public ClaimResponse setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public ClaimResponse setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public ClaimResponse setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public ClaimResponse setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public ClaimResponse setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public ClaimResponse setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public ClaimResponse setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public ClaimResponse setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public ClaimResponse setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public ClaimResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public ClaimResponse setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication. + */ + public ClaimResponse setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #payeeType} (Party to be reimbursed: Subscriber, provider, other.) + */ + public Coding getPayeeType() { + if (this.payeeType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.payeeType"); + else if (Configuration.doAutoCreate()) + this.payeeType = new Coding(); // cc + return this.payeeType; + } + + public boolean hasPayeeType() { + return this.payeeType != null && !this.payeeType.isEmpty(); + } + + /** + * @param value {@link #payeeType} (Party to be reimbursed: Subscriber, provider, other.) + */ + public ClaimResponse setPayeeType(Coding value) { + this.payeeType = value; + return this; + } + + /** + * @return {@link #item} (The first tier service adjudications for submitted services.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (ItemsComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (The first tier service adjudications for submitted services.) + */ + // syntactic sugar + public ItemsComponent addItem() { //3 + ItemsComponent t = new ItemsComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addItem(ItemsComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #addItem} (The first tier service adjudications for payor added services.) + */ + public List getAddItem() { + if (this.addItem == null) + this.addItem = new ArrayList(); + return this.addItem; + } + + public boolean hasAddItem() { + if (this.addItem == null) + return false; + for (AddedItemComponent item : this.addItem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #addItem} (The first tier service adjudications for payor added services.) + */ + // syntactic sugar + public AddedItemComponent addAddItem() { //3 + AddedItemComponent t = new AddedItemComponent(); + if (this.addItem == null) + this.addItem = new ArrayList(); + this.addItem.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addAddItem(AddedItemComponent t) { //3 + if (t == null) + return this; + if (this.addItem == null) + this.addItem = new ArrayList(); + this.addItem.add(t); + return this; + } + + /** + * @return {@link #error} (Mutually exclusive with Services Provided (Item).) + */ + public List getError() { + if (this.error == null) + this.error = new ArrayList(); + return this.error; + } + + public boolean hasError() { + if (this.error == null) + return false; + for (ErrorsComponent item : this.error) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #error} (Mutually exclusive with Services Provided (Item).) + */ + // syntactic sugar + public ErrorsComponent addError() { //3 + ErrorsComponent t = new ErrorsComponent(); + if (this.error == null) + this.error = new ArrayList(); + this.error.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addError(ErrorsComponent t) { //3 + if (t == null) + return this; + if (this.error == null) + this.error = new ArrayList(); + this.error.add(t); + return this; + } + + /** + * @return {@link #totalCost} (The total cost of the services reported.) + */ + public Money getTotalCost() { + if (this.totalCost == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.totalCost"); + else if (Configuration.doAutoCreate()) + this.totalCost = new Money(); // cc + return this.totalCost; + } + + public boolean hasTotalCost() { + return this.totalCost != null && !this.totalCost.isEmpty(); + } + + /** + * @param value {@link #totalCost} (The total cost of the services reported.) + */ + public ClaimResponse setTotalCost(Money value) { + this.totalCost = value; + return this; + } + + /** + * @return {@link #unallocDeductable} (The amount of deductible applied which was not allocated to any particular service line.) + */ + public Money getUnallocDeductable() { + if (this.unallocDeductable == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.unallocDeductable"); + else if (Configuration.doAutoCreate()) + this.unallocDeductable = new Money(); // cc + return this.unallocDeductable; + } + + public boolean hasUnallocDeductable() { + return this.unallocDeductable != null && !this.unallocDeductable.isEmpty(); + } + + /** + * @param value {@link #unallocDeductable} (The amount of deductible applied which was not allocated to any particular service line.) + */ + public ClaimResponse setUnallocDeductable(Money value) { + this.unallocDeductable = value; + return this; + } + + /** + * @return {@link #totalBenefit} (Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).) + */ + public Money getTotalBenefit() { + if (this.totalBenefit == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.totalBenefit"); + else if (Configuration.doAutoCreate()) + this.totalBenefit = new Money(); // cc + return this.totalBenefit; + } + + public boolean hasTotalBenefit() { + return this.totalBenefit != null && !this.totalBenefit.isEmpty(); + } + + /** + * @param value {@link #totalBenefit} (Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).) + */ + public ClaimResponse setTotalBenefit(Money value) { + this.totalBenefit = value; + return this; + } + + /** + * @return {@link #paymentAdjustment} (Adjustment to the payment of this transaction which is not related to adjudication of this transaction.) + */ + public Money getPaymentAdjustment() { + if (this.paymentAdjustment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.paymentAdjustment"); + else if (Configuration.doAutoCreate()) + this.paymentAdjustment = new Money(); // cc + return this.paymentAdjustment; + } + + public boolean hasPaymentAdjustment() { + return this.paymentAdjustment != null && !this.paymentAdjustment.isEmpty(); + } + + /** + * @param value {@link #paymentAdjustment} (Adjustment to the payment of this transaction which is not related to adjudication of this transaction.) + */ + public ClaimResponse setPaymentAdjustment(Money value) { + this.paymentAdjustment = value; + return this; + } + + /** + * @return {@link #paymentAdjustmentReason} (Reason for the payment adjustment.) + */ + public Coding getPaymentAdjustmentReason() { + if (this.paymentAdjustmentReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.paymentAdjustmentReason"); + else if (Configuration.doAutoCreate()) + this.paymentAdjustmentReason = new Coding(); // cc + return this.paymentAdjustmentReason; + } + + public boolean hasPaymentAdjustmentReason() { + return this.paymentAdjustmentReason != null && !this.paymentAdjustmentReason.isEmpty(); + } + + /** + * @param value {@link #paymentAdjustmentReason} (Reason for the payment adjustment.) + */ + public ClaimResponse setPaymentAdjustmentReason(Coding value) { + this.paymentAdjustmentReason = value; + return this; + } + + /** + * @return {@link #paymentDate} (Estimated payment data.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value + */ + public DateType getPaymentDateElement() { + if (this.paymentDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.paymentDate"); + else if (Configuration.doAutoCreate()) + this.paymentDate = new DateType(); // bb + return this.paymentDate; + } + + public boolean hasPaymentDateElement() { + return this.paymentDate != null && !this.paymentDate.isEmpty(); + } + + public boolean hasPaymentDate() { + return this.paymentDate != null && !this.paymentDate.isEmpty(); + } + + /** + * @param value {@link #paymentDate} (Estimated payment data.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value + */ + public ClaimResponse setPaymentDateElement(DateType value) { + this.paymentDate = value; + return this; + } + + /** + * @return Estimated payment data. + */ + public Date getPaymentDate() { + return this.paymentDate == null ? null : this.paymentDate.getValue(); + } + + /** + * @param value Estimated payment data. + */ + public ClaimResponse setPaymentDate(Date value) { + if (value == null) + this.paymentDate = null; + else { + if (this.paymentDate == null) + this.paymentDate = new DateType(); + this.paymentDate.setValue(value); + } + return this; + } + + /** + * @return {@link #paymentAmount} (Payable less any payment adjustment.) + */ + public Money getPaymentAmount() { + if (this.paymentAmount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.paymentAmount"); + else if (Configuration.doAutoCreate()) + this.paymentAmount = new Money(); // cc + return this.paymentAmount; + } + + public boolean hasPaymentAmount() { + return this.paymentAmount != null && !this.paymentAmount.isEmpty(); + } + + /** + * @param value {@link #paymentAmount} (Payable less any payment adjustment.) + */ + public ClaimResponse setPaymentAmount(Money value) { + this.paymentAmount = value; + return this; + } + + /** + * @return {@link #paymentRef} (Payment identifier.) + */ + public Identifier getPaymentRef() { + if (this.paymentRef == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.paymentRef"); + else if (Configuration.doAutoCreate()) + this.paymentRef = new Identifier(); // cc + return this.paymentRef; + } + + public boolean hasPaymentRef() { + return this.paymentRef != null && !this.paymentRef.isEmpty(); + } + + /** + * @param value {@link #paymentRef} (Payment identifier.) + */ + public ClaimResponse setPaymentRef(Identifier value) { + this.paymentRef = value; + return this; + } + + /** + * @return {@link #reserved} (Status of funds reservation (For provider, for Patient, None).) + */ + public Coding getReserved() { + if (this.reserved == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.reserved"); + else if (Configuration.doAutoCreate()) + this.reserved = new Coding(); // cc + return this.reserved; + } + + public boolean hasReserved() { + return this.reserved != null && !this.reserved.isEmpty(); + } + + /** + * @param value {@link #reserved} (Status of funds reservation (For provider, for Patient, None).) + */ + public ClaimResponse setReserved(Coding value) { + this.reserved = value; + return this; + } + + /** + * @return {@link #form} (The form to be used for printing the content.) + */ + public Coding getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClaimResponse.form"); + else if (Configuration.doAutoCreate()) + this.form = new Coding(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (The form to be used for printing the content.) + */ + public ClaimResponse setForm(Coding value) { + this.form = value; + return this; + } + + /** + * @return {@link #note} (Note text.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (NotesComponent item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Note text.) + */ + // syntactic sugar + public NotesComponent addNote() { //3 + NotesComponent t = new NotesComponent(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addNote(NotesComponent t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + public List getCoverage() { + if (this.coverage == null) + this.coverage = new ArrayList(); + return this.coverage; + } + + public boolean hasCoverage() { + if (this.coverage == null) + return false; + for (CoverageComponent item : this.coverage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + // syntactic sugar + public CoverageComponent addCoverage() { //3 + CoverageComponent t = new CoverageComponent(); + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return t; + } + + // syntactic sugar + public ClaimResponse addCoverage(CoverageComponent t) { //3 + if (t == null) + return this; + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("payeeType", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, payeeType)); + childrenList.add(new Property("item", "", "The first tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("addItem", "", "The first tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, addItem)); + childrenList.add(new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error)); + childrenList.add(new Property("totalCost", "Money", "The total cost of the services reported.", 0, java.lang.Integer.MAX_VALUE, totalCost)); + childrenList.add(new Property("unallocDeductable", "Money", "The amount of deductible applied which was not allocated to any particular service line.", 0, java.lang.Integer.MAX_VALUE, unallocDeductable)); + childrenList.add(new Property("totalBenefit", "Money", "Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).", 0, java.lang.Integer.MAX_VALUE, totalBenefit)); + childrenList.add(new Property("paymentAdjustment", "Money", "Adjustment to the payment of this transaction which is not related to adjudication of this transaction.", 0, java.lang.Integer.MAX_VALUE, paymentAdjustment)); + childrenList.add(new Property("paymentAdjustmentReason", "Coding", "Reason for the payment adjustment.", 0, java.lang.Integer.MAX_VALUE, paymentAdjustmentReason)); + childrenList.add(new Property("paymentDate", "date", "Estimated payment data.", 0, java.lang.Integer.MAX_VALUE, paymentDate)); + childrenList.add(new Property("paymentAmount", "Money", "Payable less any payment adjustment.", 0, java.lang.Integer.MAX_VALUE, paymentAmount)); + childrenList.add(new Property("paymentRef", "Identifier", "Payment identifier.", 0, java.lang.Integer.MAX_VALUE, paymentRef)); + childrenList.add(new Property("reserved", "Coding", "Status of funds reservation (For provider, for Patient, None).", 0, java.lang.Integer.MAX_VALUE, reserved)); + childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); + childrenList.add(new Property("note", "", "Note text.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("payeeType")) + this.payeeType = castToCoding(value); // Coding + else if (name.equals("item")) + this.getItem().add((ItemsComponent) value); + else if (name.equals("addItem")) + this.getAddItem().add((AddedItemComponent) value); + else if (name.equals("error")) + this.getError().add((ErrorsComponent) value); + else if (name.equals("totalCost")) + this.totalCost = castToMoney(value); // Money + else if (name.equals("unallocDeductable")) + this.unallocDeductable = castToMoney(value); // Money + else if (name.equals("totalBenefit")) + this.totalBenefit = castToMoney(value); // Money + else if (name.equals("paymentAdjustment")) + this.paymentAdjustment = castToMoney(value); // Money + else if (name.equals("paymentAdjustmentReason")) + this.paymentAdjustmentReason = castToCoding(value); // Coding + else if (name.equals("paymentDate")) + this.paymentDate = castToDate(value); // DateType + else if (name.equals("paymentAmount")) + this.paymentAmount = castToMoney(value); // Money + else if (name.equals("paymentRef")) + this.paymentRef = castToIdentifier(value); // Identifier + else if (name.equals("reserved")) + this.reserved = castToCoding(value); // Coding + else if (name.equals("form")) + this.form = castToCoding(value); // Coding + else if (name.equals("note")) + this.getNote().add((NotesComponent) value); + else if (name.equals("coverage")) + this.getCoverage().add((CoverageComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.created"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.outcome"); + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.disposition"); + } + else if (name.equals("payeeType")) { + this.payeeType = new Coding(); + return this.payeeType; + } + else if (name.equals("item")) { + return addItem(); + } + else if (name.equals("addItem")) { + return addAddItem(); + } + else if (name.equals("error")) { + return addError(); + } + else if (name.equals("totalCost")) { + this.totalCost = new Money(); + return this.totalCost; + } + else if (name.equals("unallocDeductable")) { + this.unallocDeductable = new Money(); + return this.unallocDeductable; + } + else if (name.equals("totalBenefit")) { + this.totalBenefit = new Money(); + return this.totalBenefit; + } + else if (name.equals("paymentAdjustment")) { + this.paymentAdjustment = new Money(); + return this.paymentAdjustment; + } + else if (name.equals("paymentAdjustmentReason")) { + this.paymentAdjustmentReason = new Coding(); + return this.paymentAdjustmentReason; + } + else if (name.equals("paymentDate")) { + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.paymentDate"); + } + else if (name.equals("paymentAmount")) { + this.paymentAmount = new Money(); + return this.paymentAmount; + } + else if (name.equals("paymentRef")) { + this.paymentRef = new Identifier(); + return this.paymentRef; + } + else if (name.equals("reserved")) { + this.reserved = new Coding(); + return this.reserved; + } + else if (name.equals("form")) { + this.form = new Coding(); + return this.form; + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("coverage")) { + return addCoverage(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ClaimResponse"; + + } + + public ClaimResponse copy() { + ClaimResponse dst = new ClaimResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.payeeType = payeeType == null ? null : payeeType.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (ItemsComponent i : item) + dst.item.add(i.copy()); + }; + if (addItem != null) { + dst.addItem = new ArrayList(); + for (AddedItemComponent i : addItem) + dst.addItem.add(i.copy()); + }; + if (error != null) { + dst.error = new ArrayList(); + for (ErrorsComponent i : error) + dst.error.add(i.copy()); + }; + dst.totalCost = totalCost == null ? null : totalCost.copy(); + dst.unallocDeductable = unallocDeductable == null ? null : unallocDeductable.copy(); + dst.totalBenefit = totalBenefit == null ? null : totalBenefit.copy(); + dst.paymentAdjustment = paymentAdjustment == null ? null : paymentAdjustment.copy(); + dst.paymentAdjustmentReason = paymentAdjustmentReason == null ? null : paymentAdjustmentReason.copy(); + dst.paymentDate = paymentDate == null ? null : paymentDate.copy(); + dst.paymentAmount = paymentAmount == null ? null : paymentAmount.copy(); + dst.paymentRef = paymentRef == null ? null : paymentRef.copy(); + dst.reserved = reserved == null ? null : reserved.copy(); + dst.form = form == null ? null : form.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (NotesComponent i : note) + dst.note.add(i.copy()); + }; + if (coverage != null) { + dst.coverage = new ArrayList(); + for (CoverageComponent i : coverage) + dst.coverage.add(i.copy()); + }; + return dst; + } + + protected ClaimResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ClaimResponse)) + return false; + ClaimResponse o = (ClaimResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(ruleset, o.ruleset, true) + && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) + && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) + && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(payeeType, o.payeeType, true) && compareDeep(item, o.item, true) + && compareDeep(addItem, o.addItem, true) && compareDeep(error, o.error, true) && compareDeep(totalCost, o.totalCost, true) + && compareDeep(unallocDeductable, o.unallocDeductable, true) && compareDeep(totalBenefit, o.totalBenefit, true) + && compareDeep(paymentAdjustment, o.paymentAdjustment, true) && compareDeep(paymentAdjustmentReason, o.paymentAdjustmentReason, true) + && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(paymentAmount, o.paymentAmount, true) + && compareDeep(paymentRef, o.paymentRef, true) && compareDeep(reserved, o.reserved, true) && compareDeep(form, o.form, true) + && compareDeep(note, o.note, true) && compareDeep(coverage, o.coverage, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ClaimResponse)) + return false; + ClaimResponse o = (ClaimResponse) other; + return compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) + && compareValues(paymentDate, o.paymentDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (payeeType == null || payeeType.isEmpty()) && (item == null || item.isEmpty()) && (addItem == null || addItem.isEmpty()) + && (error == null || error.isEmpty()) && (totalCost == null || totalCost.isEmpty()) && (unallocDeductable == null || unallocDeductable.isEmpty()) + && (totalBenefit == null || totalBenefit.isEmpty()) && (paymentAdjustment == null || paymentAdjustment.isEmpty()) + && (paymentAdjustmentReason == null || paymentAdjustmentReason.isEmpty()) && (paymentDate == null || paymentDate.isEmpty()) + && (paymentAmount == null || paymentAmount.isEmpty()) && (paymentRef == null || paymentRef.isEmpty()) + && (reserved == null || reserved.isEmpty()) && (form == null || form.isEmpty()) && (note == null || note.isEmpty()) + && (coverage == null || coverage.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ClaimResponse; + } + + @SearchParamDefinition(name="identifier", path="ClaimResponse.identifier", description="The identity of the insurer", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClinicalImpression.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClinicalImpression.java new file mode 100644 index 00000000000..18facff9f2a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ClinicalImpression.java @@ -0,0 +1,1883 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ +@ResourceDef(name="ClinicalImpression", profile="http://hl7.org/fhir/Profile/ClinicalImpression") +public class ClinicalImpression extends DomainResource { + + public enum ClinicalImpressionStatus { + /** + * The assessment is still on-going and results are not yet final. + */ + INPROGRESS, + /** + * The assessment is done and the results are final. + */ + COMPLETED, + /** + * This assessment was never actually done and the record is erroneous (e.g. Wrong patient). + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ClinicalImpressionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/clinical-impression-status"; + case COMPLETED: return "http://hl7.org/fhir/clinical-impression-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/clinical-impression-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The assessment is still on-going and results are not yet final."; + case COMPLETED: return "The assessment is done and the results are final."; + case ENTEREDINERROR: return "This assessment was never actually done and the record is erroneous (e.g. Wrong patient)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In progress"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class ClinicalImpressionStatusEnumFactory implements EnumFactory { + public ClinicalImpressionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return ClinicalImpressionStatus.INPROGRESS; + if ("completed".equals(codeString)) + return ClinicalImpressionStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ClinicalImpressionStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, ClinicalImpressionStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, ClinicalImpressionStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ClinicalImpressionStatus.ENTEREDINERROR); + throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); + } + public String toCode(ClinicalImpressionStatus code) { + if (code == ClinicalImpressionStatus.INPROGRESS) + return "in-progress"; + if (code == ClinicalImpressionStatus.COMPLETED) + return "completed"; + if (code == ClinicalImpressionStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + @Block() + public static class ClinicalImpressionInvestigationsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="A name/code for the set", formalDefinition="A name/code for the group (\"set\") of investigations. Typically, this will be something like \"signs\", \"symptoms\", \"clinical\", \"diagnostic\", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used." ) + protected CodeableConcept code; + + /** + * A record of a specific investigation that was undertaken. + */ + @Child(name = "item", type = {Observation.class, QuestionnaireResponse.class, FamilyMemberHistory.class, DiagnosticReport.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Record of a specific investigation", formalDefinition="A record of a specific investigation that was undertaken." ) + protected List item; + /** + * The actual objects that are the target of the reference (A record of a specific investigation that was undertaken.) + */ + protected List itemTarget; + + + private static final long serialVersionUID = -301363326L; + + /* + * Constructor + */ + public ClinicalImpressionInvestigationsComponent() { + super(); + } + + /* + * Constructor + */ + public ClinicalImpressionInvestigationsComponent(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpressionInvestigationsComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.) + */ + public ClinicalImpressionInvestigationsComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #item} (A record of a specific investigation that was undertaken.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (Reference item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (A record of a specific investigation that was undertaken.) + */ + // syntactic sugar + public Reference addItem() { //3 + Reference t = new Reference(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpressionInvestigationsComponent addItem(Reference t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #item} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A record of a specific investigation that was undertaken.) + */ + public List getItemTarget() { + if (this.itemTarget == null) + this.itemTarget = new ArrayList(); + return this.itemTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "A name/code for the group (\"set\") of investigations. Typically, this will be something like \"signs\", \"symptoms\", \"clinical\", \"diagnostic\", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("item", "Reference(Observation|QuestionnaireResponse|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("item")) + this.getItem().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public ClinicalImpressionInvestigationsComponent copy() { + ClinicalImpressionInvestigationsComponent dst = new ClinicalImpressionInvestigationsComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (Reference i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ClinicalImpressionInvestigationsComponent)) + return false; + ClinicalImpressionInvestigationsComponent o = (ClinicalImpressionInvestigationsComponent) other; + return compareDeep(code, o.code, true) && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ClinicalImpressionInvestigationsComponent)) + return false; + ClinicalImpressionInvestigationsComponent o = (ClinicalImpressionInvestigationsComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (item == null || item.isEmpty()) + ; + } + + public String fhirType() { + return "ClinicalImpression.investigations"; + + } + + } + + @Block() + public static class ClinicalImpressionFindingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specific text of code for finding or diagnosis. + */ + @Child(name = "item", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific text or code for finding", formalDefinition="Specific text of code for finding or diagnosis." ) + protected CodeableConcept item; + + /** + * Which investigations support finding or diagnosis. + */ + @Child(name = "cause", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Which investigations support finding", formalDefinition="Which investigations support finding or diagnosis." ) + protected StringType cause; + + private static final long serialVersionUID = -888590978L; + + /* + * Constructor + */ + public ClinicalImpressionFindingComponent() { + super(); + } + + /* + * Constructor + */ + public ClinicalImpressionFindingComponent(CodeableConcept item) { + super(); + this.item = item; + } + + /** + * @return {@link #item} (Specific text of code for finding or diagnosis.) + */ + public CodeableConcept getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new CodeableConcept(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (Specific text of code for finding or diagnosis.) + */ + public ClinicalImpressionFindingComponent setItem(CodeableConcept value) { + this.item = value; + return this; + } + + /** + * @return {@link #cause} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value + */ + public StringType getCauseElement() { + if (this.cause == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.cause"); + else if (Configuration.doAutoCreate()) + this.cause = new StringType(); // bb + return this.cause; + } + + public boolean hasCauseElement() { + return this.cause != null && !this.cause.isEmpty(); + } + + public boolean hasCause() { + return this.cause != null && !this.cause.isEmpty(); + } + + /** + * @param value {@link #cause} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value + */ + public ClinicalImpressionFindingComponent setCauseElement(StringType value) { + this.cause = value; + return this; + } + + /** + * @return Which investigations support finding or diagnosis. + */ + public String getCause() { + return this.cause == null ? null : this.cause.getValue(); + } + + /** + * @param value Which investigations support finding or diagnosis. + */ + public ClinicalImpressionFindingComponent setCause(String value) { + if (Utilities.noString(value)) + this.cause = null; + else { + if (this.cause == null) + this.cause = new StringType(); + this.cause.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("cause", "string", "Which investigations support finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, cause)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("item")) + this.item = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("cause")) + this.cause = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("item")) { + this.item = new CodeableConcept(); + return this.item; + } + else if (name.equals("cause")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.cause"); + } + else + return super.addChild(name); + } + + public ClinicalImpressionFindingComponent copy() { + ClinicalImpressionFindingComponent dst = new ClinicalImpressionFindingComponent(); + copyValues(dst); + dst.item = item == null ? null : item.copy(); + dst.cause = cause == null ? null : cause.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ClinicalImpressionFindingComponent)) + return false; + ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other; + return compareDeep(item, o.item, true) && compareDeep(cause, o.cause, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ClinicalImpressionFindingComponent)) + return false; + ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other; + return compareValues(cause, o.cause, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (item == null || item.isEmpty()) && (cause == null || cause.isEmpty()) + ; + } + + public String fhirType() { + return "ClinicalImpression.finding"; + + } + + } + + @Block() + public static class ClinicalImpressionRuledOutComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specific text of code for diagnosis. + */ + @Child(name = "item", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific text of code for diagnosis", formalDefinition="Specific text of code for diagnosis." ) + protected CodeableConcept item; + + /** + * Grounds for elimination. + */ + @Child(name = "reason", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Grounds for elimination", formalDefinition="Grounds for elimination." ) + protected StringType reason; + + private static final long serialVersionUID = -1001661243L; + + /* + * Constructor + */ + public ClinicalImpressionRuledOutComponent() { + super(); + } + + /* + * Constructor + */ + public ClinicalImpressionRuledOutComponent(CodeableConcept item) { + super(); + this.item = item; + } + + /** + * @return {@link #item} (Specific text of code for diagnosis.) + */ + public CodeableConcept getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpressionRuledOutComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new CodeableConcept(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (Specific text of code for diagnosis.) + */ + public ClinicalImpressionRuledOutComponent setItem(CodeableConcept value) { + this.item = value; + return this; + } + + /** + * @return {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value + */ + public StringType getReasonElement() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpressionRuledOutComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new StringType(); // bb + return this.reason; + } + + public boolean hasReasonElement() { + return this.reason != null && !this.reason.isEmpty(); + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value + */ + public ClinicalImpressionRuledOutComponent setReasonElement(StringType value) { + this.reason = value; + return this; + } + + /** + * @return Grounds for elimination. + */ + public String getReason() { + return this.reason == null ? null : this.reason.getValue(); + } + + /** + * @param value Grounds for elimination. + */ + public ClinicalImpressionRuledOutComponent setReason(String value) { + if (Utilities.noString(value)) + this.reason = null; + else { + if (this.reason == null) + this.reason = new StringType(); + this.reason.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for diagnosis.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("reason", "string", "Grounds for elimination.", 0, java.lang.Integer.MAX_VALUE, reason)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("item")) + this.item = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("reason")) + this.reason = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("item")) { + this.item = new CodeableConcept(); + return this.item; + } + else if (name.equals("reason")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.reason"); + } + else + return super.addChild(name); + } + + public ClinicalImpressionRuledOutComponent copy() { + ClinicalImpressionRuledOutComponent dst = new ClinicalImpressionRuledOutComponent(); + copyValues(dst); + dst.item = item == null ? null : item.copy(); + dst.reason = reason == null ? null : reason.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ClinicalImpressionRuledOutComponent)) + return false; + ClinicalImpressionRuledOutComponent o = (ClinicalImpressionRuledOutComponent) other; + return compareDeep(item, o.item, true) && compareDeep(reason, o.reason, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ClinicalImpressionRuledOutComponent)) + return false; + ClinicalImpressionRuledOutComponent o = (ClinicalImpressionRuledOutComponent) other; + return compareValues(reason, o.reason, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (item == null || item.isEmpty()) && (reason == null || reason.isEmpty()) + ; + } + + public String fhirType() { + return "ClinicalImpression.ruledOut"; + + } + + } + + /** + * The patient being assessed. + */ + @Child(name = "patient", type = {Patient.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The patient being assessed", formalDefinition="The patient being assessed." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient being assessed.) + */ + protected Patient patientTarget; + + /** + * The clinician performing the assessment. + */ + @Child(name = "assessor", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The clinician performing the assessment", formalDefinition="The clinician performing the assessment." ) + protected Reference assessor; + + /** + * The actual object that is the target of the reference (The clinician performing the assessment.) + */ + protected Practitioner assessorTarget; + + /** + * Identifies the workflow status of the assessment. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | completed | entered-in-error", formalDefinition="Identifies the workflow status of the assessment." ) + protected Enumeration status; + + /** + * The point in time at which the assessment was concluded (not when it was recorded). + */ + @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." ) + protected DateTimeType date; + + /** + * A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." ) + protected StringType description; + + /** + * A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes. + */ + @Child(name = "previous", type = {ClinicalImpression.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." ) + protected Reference previous; + + /** + * The actual object that is the target of the reference (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) + */ + protected ClinicalImpression previousTarget; + + /** + * This a list of the general problems/conditions for a patient. + */ + @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." ) + protected List problem; + /** + * The actual objects that are the target of the reference (This a list of the general problems/conditions for a patient.) + */ + protected List problemTarget; + + + /** + * The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource. + */ + @Child(name = "trigger", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Request or event that necessitated this assessment", formalDefinition="The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource." ) + protected Type trigger; + + /** + * One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes. + */ + @Child(name = "investigations", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="One or more sets of investigations (signs, symptions, etc.)", formalDefinition="One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." ) + protected List investigations; + + /** + * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. + */ + @Child(name = "protocol", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." ) + protected UriType protocol; + + /** + * A text summary of the investigations and the diagnosis. + */ + @Child(name = "summary", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." ) + protected StringType summary; + + /** + * Specific findings or diagnoses that was considered likely or relevant to ongoing treatment. + */ + @Child(name = "finding", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Possible or likely findings and diagnoses", formalDefinition="Specific findings or diagnoses that was considered likely or relevant to ongoing treatment." ) + protected List finding; + + /** + * Diagnoses/conditions resolved since the last assessment. + */ + @Child(name = "resolved", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Diagnoses/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." ) + protected List resolved; + + /** + * Diagnosis considered not possible. + */ + @Child(name = "ruledOut", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." ) + protected List ruledOut; + + /** + * Estimate of likely outcome. + */ + @Child(name = "prognosis", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." ) + protected StringType prognosis; + + /** + * Plan of action after assessment. + */ + @Child(name = "plan", type = {CarePlan.class, Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationOrder.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, SupplyRequest.class, VisionPrescription.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." ) + protected List plan; + /** + * The actual objects that are the target of the reference (Plan of action after assessment.) + */ + protected List planTarget; + + + /** + * Actions taken during assessment. + */ + @Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationOrder.class, DiagnosticOrder.class, NutritionOrder.class, SupplyRequest.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." ) + protected List action; + /** + * The actual objects that are the target of the reference (Actions taken during assessment.) + */ + protected List actionTarget; + + + private static final long serialVersionUID = 1650458630L; + + /* + * Constructor + */ + public ClinicalImpression() { + super(); + } + + /* + * Constructor + */ + public ClinicalImpression(Reference patient, Enumeration status) { + super(); + this.patient = patient; + this.status = status; + } + + /** + * @return {@link #patient} (The patient being assessed.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient being assessed.) + */ + public ClinicalImpression setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient being assessed.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient being assessed.) + */ + public ClinicalImpression setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #assessor} (The clinician performing the assessment.) + */ + public Reference getAssessor() { + if (this.assessor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.assessor"); + else if (Configuration.doAutoCreate()) + this.assessor = new Reference(); // cc + return this.assessor; + } + + public boolean hasAssessor() { + return this.assessor != null && !this.assessor.isEmpty(); + } + + /** + * @param value {@link #assessor} (The clinician performing the assessment.) + */ + public ClinicalImpression setAssessor(Reference value) { + this.assessor = value; + return this; + } + + /** + * @return {@link #assessor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The clinician performing the assessment.) + */ + public Practitioner getAssessorTarget() { + if (this.assessorTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.assessor"); + else if (Configuration.doAutoCreate()) + this.assessorTarget = new Practitioner(); // aa + return this.assessorTarget; + } + + /** + * @param value {@link #assessor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The clinician performing the assessment.) + */ + public ClinicalImpression setAssessorTarget(Practitioner value) { + this.assessorTarget = value; + return this; + } + + /** + * @return {@link #status} (Identifies the workflow status of the assessment.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ClinicalImpressionStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Identifies the workflow status of the assessment.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ClinicalImpression setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Identifies the workflow status of the assessment. + */ + public ClinicalImpressionStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Identifies the workflow status of the assessment. + */ + public ClinicalImpression setStatus(ClinicalImpressionStatus value) { + if (this.status == null) + this.status = new Enumeration(new ClinicalImpressionStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ClinicalImpression setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The point in time at which the assessment was concluded (not when it was recorded). + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The point in time at which the assessment was concluded (not when it was recorded). + */ + public ClinicalImpression setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ClinicalImpression setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. + */ + public ClinicalImpression setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #previous} (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) + */ + public Reference getPrevious() { + if (this.previous == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.previous"); + else if (Configuration.doAutoCreate()) + this.previous = new Reference(); // cc + return this.previous; + } + + public boolean hasPrevious() { + return this.previous != null && !this.previous.isEmpty(); + } + + /** + * @param value {@link #previous} (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) + */ + public ClinicalImpression setPrevious(Reference value) { + this.previous = value; + return this; + } + + /** + * @return {@link #previous} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) + */ + public ClinicalImpression getPreviousTarget() { + if (this.previousTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.previous"); + else if (Configuration.doAutoCreate()) + this.previousTarget = new ClinicalImpression(); // aa + return this.previousTarget; + } + + /** + * @param value {@link #previous} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) + */ + public ClinicalImpression setPreviousTarget(ClinicalImpression value) { + this.previousTarget = value; + return this; + } + + /** + * @return {@link #problem} (This a list of the general problems/conditions for a patient.) + */ + public List getProblem() { + if (this.problem == null) + this.problem = new ArrayList(); + return this.problem; + } + + public boolean hasProblem() { + if (this.problem == null) + return false; + for (Reference item : this.problem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #problem} (This a list of the general problems/conditions for a patient.) + */ + // syntactic sugar + public Reference addProblem() { //3 + Reference t = new Reference(); + if (this.problem == null) + this.problem = new ArrayList(); + this.problem.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addProblem(Reference t) { //3 + if (t == null) + return this; + if (this.problem == null) + this.problem = new ArrayList(); + this.problem.add(t); + return this; + } + + /** + * @return {@link #problem} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. This a list of the general problems/conditions for a patient.) + */ + public List getProblemTarget() { + if (this.problemTarget == null) + this.problemTarget = new ArrayList(); + return this.problemTarget; + } + + /** + * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.) + */ + public Type getTrigger() { + return this.trigger; + } + + /** + * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.) + */ + public CodeableConcept getTriggerCodeableConcept() throws FHIRException { + if (!(this.trigger instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.trigger.getClass().getName()+" was encountered"); + return (CodeableConcept) this.trigger; + } + + public boolean hasTriggerCodeableConcept() { + return this.trigger instanceof CodeableConcept; + } + + /** + * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.) + */ + public Reference getTriggerReference() throws FHIRException { + if (!(this.trigger instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.trigger.getClass().getName()+" was encountered"); + return (Reference) this.trigger; + } + + public boolean hasTriggerReference() { + return this.trigger instanceof Reference; + } + + public boolean hasTrigger() { + return this.trigger != null && !this.trigger.isEmpty(); + } + + /** + * @param value {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.) + */ + public ClinicalImpression setTrigger(Type value) { + this.trigger = value; + return this; + } + + /** + * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.) + */ + public List getInvestigations() { + if (this.investigations == null) + this.investigations = new ArrayList(); + return this.investigations; + } + + public boolean hasInvestigations() { + if (this.investigations == null) + return false; + for (ClinicalImpressionInvestigationsComponent item : this.investigations) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.) + */ + // syntactic sugar + public ClinicalImpressionInvestigationsComponent addInvestigations() { //3 + ClinicalImpressionInvestigationsComponent t = new ClinicalImpressionInvestigationsComponent(); + if (this.investigations == null) + this.investigations = new ArrayList(); + this.investigations.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addInvestigations(ClinicalImpressionInvestigationsComponent t) { //3 + if (t == null) + return this; + if (this.investigations == null) + this.investigations = new ArrayList(); + this.investigations.add(t); + return this; + } + + /** + * @return {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value + */ + public UriType getProtocolElement() { + if (this.protocol == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.protocol"); + else if (Configuration.doAutoCreate()) + this.protocol = new UriType(); // bb + return this.protocol; + } + + public boolean hasProtocolElement() { + return this.protocol != null && !this.protocol.isEmpty(); + } + + public boolean hasProtocol() { + return this.protocol != null && !this.protocol.isEmpty(); + } + + /** + * @param value {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value + */ + public ClinicalImpression setProtocolElement(UriType value) { + this.protocol = value; + return this; + } + + /** + * @return Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. + */ + public String getProtocol() { + return this.protocol == null ? null : this.protocol.getValue(); + } + + /** + * @param value Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. + */ + public ClinicalImpression setProtocol(String value) { + if (Utilities.noString(value)) + this.protocol = null; + else { + if (this.protocol == null) + this.protocol = new UriType(); + this.protocol.setValue(value); + } + return this; + } + + /** + * @return {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value + */ + public StringType getSummaryElement() { + if (this.summary == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.summary"); + else if (Configuration.doAutoCreate()) + this.summary = new StringType(); // bb + return this.summary; + } + + public boolean hasSummaryElement() { + return this.summary != null && !this.summary.isEmpty(); + } + + public boolean hasSummary() { + return this.summary != null && !this.summary.isEmpty(); + } + + /** + * @param value {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value + */ + public ClinicalImpression setSummaryElement(StringType value) { + this.summary = value; + return this; + } + + /** + * @return A text summary of the investigations and the diagnosis. + */ + public String getSummary() { + return this.summary == null ? null : this.summary.getValue(); + } + + /** + * @param value A text summary of the investigations and the diagnosis. + */ + public ClinicalImpression setSummary(String value) { + if (Utilities.noString(value)) + this.summary = null; + else { + if (this.summary == null) + this.summary = new StringType(); + this.summary.setValue(value); + } + return this; + } + + /** + * @return {@link #finding} (Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.) + */ + public List getFinding() { + if (this.finding == null) + this.finding = new ArrayList(); + return this.finding; + } + + public boolean hasFinding() { + if (this.finding == null) + return false; + for (ClinicalImpressionFindingComponent item : this.finding) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #finding} (Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.) + */ + // syntactic sugar + public ClinicalImpressionFindingComponent addFinding() { //3 + ClinicalImpressionFindingComponent t = new ClinicalImpressionFindingComponent(); + if (this.finding == null) + this.finding = new ArrayList(); + this.finding.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addFinding(ClinicalImpressionFindingComponent t) { //3 + if (t == null) + return this; + if (this.finding == null) + this.finding = new ArrayList(); + this.finding.add(t); + return this; + } + + /** + * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.) + */ + public List getResolved() { + if (this.resolved == null) + this.resolved = new ArrayList(); + return this.resolved; + } + + public boolean hasResolved() { + if (this.resolved == null) + return false; + for (CodeableConcept item : this.resolved) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.) + */ + // syntactic sugar + public CodeableConcept addResolved() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.resolved == null) + this.resolved = new ArrayList(); + this.resolved.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addResolved(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.resolved == null) + this.resolved = new ArrayList(); + this.resolved.add(t); + return this; + } + + /** + * @return {@link #ruledOut} (Diagnosis considered not possible.) + */ + public List getRuledOut() { + if (this.ruledOut == null) + this.ruledOut = new ArrayList(); + return this.ruledOut; + } + + public boolean hasRuledOut() { + if (this.ruledOut == null) + return false; + for (ClinicalImpressionRuledOutComponent item : this.ruledOut) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #ruledOut} (Diagnosis considered not possible.) + */ + // syntactic sugar + public ClinicalImpressionRuledOutComponent addRuledOut() { //3 + ClinicalImpressionRuledOutComponent t = new ClinicalImpressionRuledOutComponent(); + if (this.ruledOut == null) + this.ruledOut = new ArrayList(); + this.ruledOut.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addRuledOut(ClinicalImpressionRuledOutComponent t) { //3 + if (t == null) + return this; + if (this.ruledOut == null) + this.ruledOut = new ArrayList(); + this.ruledOut.add(t); + return this; + } + + /** + * @return {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value + */ + public StringType getPrognosisElement() { + if (this.prognosis == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ClinicalImpression.prognosis"); + else if (Configuration.doAutoCreate()) + this.prognosis = new StringType(); // bb + return this.prognosis; + } + + public boolean hasPrognosisElement() { + return this.prognosis != null && !this.prognosis.isEmpty(); + } + + public boolean hasPrognosis() { + return this.prognosis != null && !this.prognosis.isEmpty(); + } + + /** + * @param value {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value + */ + public ClinicalImpression setPrognosisElement(StringType value) { + this.prognosis = value; + return this; + } + + /** + * @return Estimate of likely outcome. + */ + public String getPrognosis() { + return this.prognosis == null ? null : this.prognosis.getValue(); + } + + /** + * @param value Estimate of likely outcome. + */ + public ClinicalImpression setPrognosis(String value) { + if (Utilities.noString(value)) + this.prognosis = null; + else { + if (this.prognosis == null) + this.prognosis = new StringType(); + this.prognosis.setValue(value); + } + return this; + } + + /** + * @return {@link #plan} (Plan of action after assessment.) + */ + public List getPlan() { + if (this.plan == null) + this.plan = new ArrayList(); + return this.plan; + } + + public boolean hasPlan() { + if (this.plan == null) + return false; + for (Reference item : this.plan) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #plan} (Plan of action after assessment.) + */ + // syntactic sugar + public Reference addPlan() { //3 + Reference t = new Reference(); + if (this.plan == null) + this.plan = new ArrayList(); + this.plan.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addPlan(Reference t) { //3 + if (t == null) + return this; + if (this.plan == null) + this.plan = new ArrayList(); + this.plan.add(t); + return this; + } + + /** + * @return {@link #plan} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Plan of action after assessment.) + */ + public List getPlanTarget() { + if (this.planTarget == null) + this.planTarget = new ArrayList(); + return this.planTarget; + } + + /** + * @return {@link #action} (Actions taken during assessment.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (Reference item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Actions taken during assessment.) + */ + // syntactic sugar + public Reference addAction() { //3 + Reference t = new Reference(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public ClinicalImpression addAction(Reference t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + /** + * @return {@link #action} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Actions taken during assessment.) + */ + public List getActionTarget() { + if (this.actionTarget == null) + this.actionTarget = new ArrayList(); + return this.actionTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient being assessed.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("assessor", "Reference(Practitioner)", "The clinician performing the assessment.", 0, java.lang.Integer.MAX_VALUE, assessor)); + childrenList.add(new Property("status", "code", "Identifies the workflow status of the assessment.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("date", "dateTime", "The point in time at which the assessment was concluded (not when it was recorded).", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("previous", "Reference(ClinicalImpression)", "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", 0, java.lang.Integer.MAX_VALUE, previous)); + childrenList.add(new Property("problem", "Reference(Condition|AllergyIntolerance)", "This a list of the general problems/conditions for a patient.", 0, java.lang.Integer.MAX_VALUE, problem)); + childrenList.add(new Property("trigger[x]", "CodeableConcept|Reference(Any)", "The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.", 0, java.lang.Integer.MAX_VALUE, trigger)); + childrenList.add(new Property("investigations", "", "One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.", 0, java.lang.Integer.MAX_VALUE, investigations)); + childrenList.add(new Property("protocol", "uri", "Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.", 0, java.lang.Integer.MAX_VALUE, protocol)); + childrenList.add(new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, java.lang.Integer.MAX_VALUE, summary)); + childrenList.add(new Property("finding", "", "Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.", 0, java.lang.Integer.MAX_VALUE, finding)); + childrenList.add(new Property("resolved", "CodeableConcept", "Diagnoses/conditions resolved since the last assessment.", 0, java.lang.Integer.MAX_VALUE, resolved)); + childrenList.add(new Property("ruledOut", "", "Diagnosis considered not possible.", 0, java.lang.Integer.MAX_VALUE, ruledOut)); + childrenList.add(new Property("prognosis", "string", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosis)); + childrenList.add(new Property("plan", "Reference(CarePlan|Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationOrder|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|SupplyRequest|VisionPrescription)", "Plan of action after assessment.", 0, java.lang.Integer.MAX_VALUE, plan)); + childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationOrder|DiagnosticOrder|NutritionOrder|SupplyRequest|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("assessor")) + this.assessor = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new ClinicalImpressionStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("previous")) + this.previous = castToReference(value); // Reference + else if (name.equals("problem")) + this.getProblem().add(castToReference(value)); + else if (name.equals("trigger[x]")) + this.trigger = (Type) value; // Type + else if (name.equals("investigations")) + this.getInvestigations().add((ClinicalImpressionInvestigationsComponent) value); + else if (name.equals("protocol")) + this.protocol = castToUri(value); // UriType + else if (name.equals("summary")) + this.summary = castToString(value); // StringType + else if (name.equals("finding")) + this.getFinding().add((ClinicalImpressionFindingComponent) value); + else if (name.equals("resolved")) + this.getResolved().add(castToCodeableConcept(value)); + else if (name.equals("ruledOut")) + this.getRuledOut().add((ClinicalImpressionRuledOutComponent) value); + else if (name.equals("prognosis")) + this.prognosis = castToString(value); // StringType + else if (name.equals("plan")) + this.getPlan().add(castToReference(value)); + else if (name.equals("action")) + this.getAction().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("assessor")) { + this.assessor = new Reference(); + return this.assessor; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.status"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.description"); + } + else if (name.equals("previous")) { + this.previous = new Reference(); + return this.previous; + } + else if (name.equals("problem")) { + return addProblem(); + } + else if (name.equals("triggerCodeableConcept")) { + this.trigger = new CodeableConcept(); + return this.trigger; + } + else if (name.equals("triggerReference")) { + this.trigger = new Reference(); + return this.trigger; + } + else if (name.equals("investigations")) { + return addInvestigations(); + } + else if (name.equals("protocol")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.protocol"); + } + else if (name.equals("summary")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.summary"); + } + else if (name.equals("finding")) { + return addFinding(); + } + else if (name.equals("resolved")) { + return addResolved(); + } + else if (name.equals("ruledOut")) { + return addRuledOut(); + } + else if (name.equals("prognosis")) { + throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.prognosis"); + } + else if (name.equals("plan")) { + return addPlan(); + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ClinicalImpression"; + + } + + public ClinicalImpression copy() { + ClinicalImpression dst = new ClinicalImpression(); + copyValues(dst); + dst.patient = patient == null ? null : patient.copy(); + dst.assessor = assessor == null ? null : assessor.copy(); + dst.status = status == null ? null : status.copy(); + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + dst.previous = previous == null ? null : previous.copy(); + if (problem != null) { + dst.problem = new ArrayList(); + for (Reference i : problem) + dst.problem.add(i.copy()); + }; + dst.trigger = trigger == null ? null : trigger.copy(); + if (investigations != null) { + dst.investigations = new ArrayList(); + for (ClinicalImpressionInvestigationsComponent i : investigations) + dst.investigations.add(i.copy()); + }; + dst.protocol = protocol == null ? null : protocol.copy(); + dst.summary = summary == null ? null : summary.copy(); + if (finding != null) { + dst.finding = new ArrayList(); + for (ClinicalImpressionFindingComponent i : finding) + dst.finding.add(i.copy()); + }; + if (resolved != null) { + dst.resolved = new ArrayList(); + for (CodeableConcept i : resolved) + dst.resolved.add(i.copy()); + }; + if (ruledOut != null) { + dst.ruledOut = new ArrayList(); + for (ClinicalImpressionRuledOutComponent i : ruledOut) + dst.ruledOut.add(i.copy()); + }; + dst.prognosis = prognosis == null ? null : prognosis.copy(); + if (plan != null) { + dst.plan = new ArrayList(); + for (Reference i : plan) + dst.plan.add(i.copy()); + }; + if (action != null) { + dst.action = new ArrayList(); + for (Reference i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + protected ClinicalImpression typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ClinicalImpression)) + return false; + ClinicalImpression o = (ClinicalImpression) other; + return compareDeep(patient, o.patient, true) && compareDeep(assessor, o.assessor, true) && compareDeep(status, o.status, true) + && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) && compareDeep(previous, o.previous, true) + && compareDeep(problem, o.problem, true) && compareDeep(trigger, o.trigger, true) && compareDeep(investigations, o.investigations, true) + && compareDeep(protocol, o.protocol, true) && compareDeep(summary, o.summary, true) && compareDeep(finding, o.finding, true) + && compareDeep(resolved, o.resolved, true) && compareDeep(ruledOut, o.ruledOut, true) && compareDeep(prognosis, o.prognosis, true) + && compareDeep(plan, o.plan, true) && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ClinicalImpression)) + return false; + ClinicalImpression o = (ClinicalImpression) other; + return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) + && compareValues(protocol, o.protocol, true) && compareValues(summary, o.summary, true) && compareValues(prognosis, o.prognosis, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (patient == null || patient.isEmpty()) && (assessor == null || assessor.isEmpty()) + && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) + && (previous == null || previous.isEmpty()) && (problem == null || problem.isEmpty()) && (trigger == null || trigger.isEmpty()) + && (investigations == null || investigations.isEmpty()) && (protocol == null || protocol.isEmpty()) + && (summary == null || summary.isEmpty()) && (finding == null || finding.isEmpty()) && (resolved == null || resolved.isEmpty()) + && (ruledOut == null || ruledOut.isEmpty()) && (prognosis == null || prognosis.isEmpty()) + && (plan == null || plan.isEmpty()) && (action == null || action.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ClinicalImpression; + } + + @SearchParamDefinition(name="date", path="ClinicalImpression.date", description="When the assessment occurred", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference" ) + public static final String SP_PREVIOUS = "previous"; + @SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference" ) + public static final String SP_ASSESSOR = "assessor"; + @SearchParamDefinition(name="trigger", path="ClinicalImpression.triggerReference", description="Request or event that necessitated this assessment", type="reference" ) + public static final String SP_TRIGGER = "trigger"; + @SearchParamDefinition(name="finding", path="ClinicalImpression.finding.item", description="Specific text or code for finding", type="token" ) + public static final String SP_FINDING = "finding"; + @SearchParamDefinition(name="ruledout", path="ClinicalImpression.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) + public static final String SP_RULEDOUT = "ruledout"; + @SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="General assessment of patient state", type="reference" ) + public static final String SP_PROBLEM = "problem"; + @SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="investigation", path="ClinicalImpression.investigations.item", description="Record of a specific investigation", type="reference" ) + public static final String SP_INVESTIGATION = "investigation"; + @SearchParamDefinition(name="action", path="ClinicalImpression.action", description="Actions taken during assessment", type="reference" ) + public static final String SP_ACTION = "action"; + @SearchParamDefinition(name="trigger-code", path="ClinicalImpression.triggerCodeableConcept", description="Request or event that necessitated this assessment", type="token" ) + public static final String SP_TRIGGERCODE = "trigger-code"; + @SearchParamDefinition(name="plan", path="ClinicalImpression.plan", description="Plan of action after assessment", type="reference" ) + public static final String SP_PLAN = "plan"; + @SearchParamDefinition(name="resolved", path="ClinicalImpression.resolved", description="Diagnoses/conditions resolved since previous assessment", type="token" ) + public static final String SP_RESOLVED = "resolved"; + @SearchParamDefinition(name="status", path="ClinicalImpression.status", description="in-progress | completed | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeType.java new file mode 100644 index 00000000000..0a30f5ad358 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeType.java @@ -0,0 +1,76 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.dstu21.model; + +import static org.apache.commons.lang3.StringUtils.defaultString; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "code" in FHIR, when not bound to an enumerated list of codes + */ +@DatatypeDef(name="code", profileOf=StringType.class) +public class CodeType extends StringType implements Comparable { + + private static final long serialVersionUID = 3L; + + public CodeType() { + super(); + } + + public CodeType(String theCode) { + setValue(theCode); + } + + public int compareTo(CodeType theCode) { + if (theCode == null) { + return 1; + } + return defaultString(getValue()).compareTo(defaultString(theCode.getValue())); + } + + @Override + protected String parse(String theValue) { + return theValue.trim(); + } + + @Override + protected String encode(String theValue) { + return theValue; + } + + @Override + public CodeType copy() { + return new CodeType(getValue()); + } + + public String fhirType() { + return "code"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeableConcept.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeableConcept.java new file mode 100644 index 00000000000..ad2c9745ecf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CodeableConcept.java @@ -0,0 +1,237 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. + */ +@DatatypeDef(name="CodeableConcept") +public class CodeableConcept extends Type implements ICompositeType { + + /** + * A reference to a code defined by a terminology system. + */ + @Child(name = "coding", type = {Coding.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Code defined by a terminology system", formalDefinition="A reference to a code defined by a terminology system." ) + protected List coding; + + /** + * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Plain text representation of the concept", formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." ) + protected StringType text; + + private static final long serialVersionUID = 760353246L; + + /* + * Constructor + */ + public CodeableConcept() { + super(); + } + + /** + * @return {@link #coding} (A reference to a code defined by a terminology system.) + */ + public List getCoding() { + if (this.coding == null) + this.coding = new ArrayList(); + return this.coding; + } + + public boolean hasCoding() { + if (this.coding == null) + return false; + for (Coding item : this.coding) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #coding} (A reference to a code defined by a terminology system.) + */ + // syntactic sugar + public Coding addCoding() { //3 + Coding t = new Coding(); + if (this.coding == null) + this.coding = new ArrayList(); + this.coding.add(t); + return t; + } + + // syntactic sugar + public CodeableConcept addCoding(Coding t) { //3 + if (t == null) + return this; + if (this.coding == null) + this.coding = new ArrayList(); + this.coding.add(t); + return this; + } + + /** + * @return {@link #text} (A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CodeableConcept.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public CodeableConcept setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. + */ + public CodeableConcept setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("coding", "Coding", "A reference to a code defined by a terminology system.", 0, java.lang.Integer.MAX_VALUE, coding)); + childrenList.add(new Property("text", "string", "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("coding")) + this.getCoding().add(castToCoding(value)); + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("coding")) { + return addCoding(); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type CodeableConcept.text"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CodeableConcept"; + + } + + public CodeableConcept copy() { + CodeableConcept dst = new CodeableConcept(); + copyValues(dst); + if (coding != null) { + dst.coding = new ArrayList(); + for (Coding i : coding) + dst.coding.add(i.copy()); + }; + dst.text = text == null ? null : text.copy(); + return dst; + } + + protected CodeableConcept typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CodeableConcept)) + return false; + CodeableConcept o = (CodeableConcept) other; + return compareDeep(coding, o.coding, true) && compareDeep(text, o.text, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CodeableConcept)) + return false; + CodeableConcept o = (CodeableConcept) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (coding == null || coding.isEmpty()) && (text == null || text.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coding.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coding.java new file mode 100644 index 00000000000..58b22116692 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coding.java @@ -0,0 +1,430 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A reference to a code defined by a terminology system. + */ +@DatatypeDef(name="Coding") +public class Coding extends Type implements IBaseCoding, ICompositeType { + + /** + * The identification of the code system that defines the meaning of the symbol in the code. + */ + @Child(name = "system", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identity of the terminology system", formalDefinition="The identification of the code system that defines the meaning of the symbol in the code." ) + protected UriType system; + + /** + * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Version of the system - if relevant", formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." ) + protected StringType version; + + /** + * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + */ + @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Symbol in syntax defined by the system", formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." ) + protected CodeType code; + + /** + * A representation of the meaning of the code in the system, following the rules of the system. + */ + @Child(name = "display", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Representation defined by the system", formalDefinition="A representation of the meaning of the code in the system, following the rules of the system." ) + protected StringType display; + + /** + * Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays). + */ + @Child(name = "userSelected", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If this coding was chosen directly by the user", formalDefinition="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." ) + protected BooleanType userSelected; + + private static final long serialVersionUID = -1417514061L; + + /* + * Constructor + */ + public Coding() { + super(); + } + + /** + * @return {@link #system} (The identification of the code system that defines the meaning of the symbol in the code.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coding.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (The identification of the code system that defines the meaning of the symbol in the code.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public Coding setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return The identification of the code system that defines the meaning of the symbol in the code. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value The identification of the code system that defines the meaning of the symbol in the code. + */ + public Coding setSystem(String value) { + if (Utilities.noString(value)) + this.system = null; + else { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coding.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Coding setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. + */ + public Coding setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coding.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Coding setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + */ + public Coding setCode(String value) { + if (Utilities.noString(value)) + this.code = null; + else { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + } + return this; + } + + /** + * @return {@link #display} (A representation of the meaning of the code in the system, following the rules of the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coding.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (A representation of the meaning of the code in the system, following the rules of the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public Coding setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return A representation of the meaning of the code in the system, following the rules of the system. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value A representation of the meaning of the code in the system, following the rules of the system. + */ + public Coding setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #userSelected} (Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).). This is the underlying object with id, value and extensions. The accessor "getUserSelected" gives direct access to the value + */ + public BooleanType getUserSelectedElement() { + if (this.userSelected == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coding.userSelected"); + else if (Configuration.doAutoCreate()) + this.userSelected = new BooleanType(); // bb + return this.userSelected; + } + + public boolean hasUserSelectedElement() { + return this.userSelected != null && !this.userSelected.isEmpty(); + } + + public boolean hasUserSelected() { + return this.userSelected != null && !this.userSelected.isEmpty(); + } + + /** + * @param value {@link #userSelected} (Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).). This is the underlying object with id, value and extensions. The accessor "getUserSelected" gives direct access to the value + */ + public Coding setUserSelectedElement(BooleanType value) { + this.userSelected = value; + return this; + } + + /** + * @return Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays). + */ + public boolean getUserSelected() { + return this.userSelected == null || this.userSelected.isEmpty() ? false : this.userSelected.getValue(); + } + + /** + * @param value Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays). + */ + public Coding setUserSelected(boolean value) { + if (this.userSelected == null) + this.userSelected = new BooleanType(); + this.userSelected.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "The identification of the code system that defines the meaning of the symbol in the code.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("code", "code", "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("display", "string", "A representation of the meaning of the code in the system, following the rules of the system.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("userSelected", "boolean", "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", 0, java.lang.Integer.MAX_VALUE, userSelected)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("userSelected")) + this.userSelected = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type Coding.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Coding.version"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type Coding.code"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type Coding.display"); + } + else if (name.equals("userSelected")) { + throw new FHIRException("Cannot call addChild on a primitive type Coding.userSelected"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Coding"; + + } + + public Coding copy() { + Coding dst = new Coding(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); + dst.code = code == null ? null : code.copy(); + dst.display = display == null ? null : display.copy(); + dst.userSelected = userSelected == null ? null : userSelected.copy(); + return dst; + } + + protected Coding typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Coding)) + return false; + Coding o = (Coding) other; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(code, o.code, true) + && compareDeep(display, o.display, true) && compareDeep(userSelected, o.userSelected, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Coding)) + return false; + Coding o = (Coding) other; + return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(code, o.code, true) + && compareValues(display, o.display, true) && compareValues(userSelected, o.userSelected, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) + && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) && (userSelected == null || userSelected.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Communication.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Communication.java new file mode 100644 index 00000000000..1c19ad91fea --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Communication.java @@ -0,0 +1,1223 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ +@ResourceDef(name="Communication", profile="http://hl7.org/fhir/Profile/Communication") +public class Communication extends DomainResource { + + public enum CommunicationStatus { + /** + * The communication transmission is ongoing. + */ + INPROGRESS, + /** + * The message transmission is complete, i.e., delivered to the recipient's destination. + */ + COMPLETED, + /** + * The communication transmission has been held by originating system/user request. + */ + SUSPENDED, + /** + * The receiving system has declined to accept the message. + */ + REJECTED, + /** + * There was a failure in transmitting the message out. + */ + FAILED, + /** + * added to help the parsers + */ + NULL; + public static CommunicationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("failed".equals(codeString)) + return FAILED; + throw new FHIRException("Unknown CommunicationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case SUSPENDED: return "suspended"; + case REJECTED: return "rejected"; + case FAILED: return "failed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/communication-status"; + case COMPLETED: return "http://hl7.org/fhir/communication-status"; + case SUSPENDED: return "http://hl7.org/fhir/communication-status"; + case REJECTED: return "http://hl7.org/fhir/communication-status"; + case FAILED: return "http://hl7.org/fhir/communication-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The communication transmission is ongoing."; + case COMPLETED: return "The message transmission is complete, i.e., delivered to the recipient's destination."; + case SUSPENDED: return "The communication transmission has been held by originating system/user request."; + case REJECTED: return "The receiving system has declined to accept the message."; + case FAILED: return "There was a failure in transmitting the message out."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case SUSPENDED: return "Suspended"; + case REJECTED: return "Rejected"; + case FAILED: return "Failed"; + default: return "?"; + } + } + } + + public static class CommunicationStatusEnumFactory implements EnumFactory { + public CommunicationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return CommunicationStatus.INPROGRESS; + if ("completed".equals(codeString)) + return CommunicationStatus.COMPLETED; + if ("suspended".equals(codeString)) + return CommunicationStatus.SUSPENDED; + if ("rejected".equals(codeString)) + return CommunicationStatus.REJECTED; + if ("failed".equals(codeString)) + return CommunicationStatus.FAILED; + throw new IllegalArgumentException("Unknown CommunicationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, CommunicationStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, CommunicationStatus.COMPLETED); + if ("suspended".equals(codeString)) + return new Enumeration(this, CommunicationStatus.SUSPENDED); + if ("rejected".equals(codeString)) + return new Enumeration(this, CommunicationStatus.REJECTED); + if ("failed".equals(codeString)) + return new Enumeration(this, CommunicationStatus.FAILED); + throw new FHIRException("Unknown CommunicationStatus code '"+codeString+"'"); + } + public String toCode(CommunicationStatus code) { + if (code == CommunicationStatus.INPROGRESS) + return "in-progress"; + if (code == CommunicationStatus.COMPLETED) + return "completed"; + if (code == CommunicationStatus.SUSPENDED) + return "suspended"; + if (code == CommunicationStatus.REJECTED) + return "rejected"; + if (code == CommunicationStatus.FAILED) + return "failed"; + return "?"; + } + } + + @Block() + public static class CommunicationPayloadComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A communicated content (or for multi-part communications, one portion of the communication). + */ + @Child(name = "content", type = {StringType.class, Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message part content", formalDefinition="A communicated content (or for multi-part communications, one portion of the communication)." ) + protected Type content; + + private static final long serialVersionUID = -1763459053L; + + /* + * Constructor + */ + public CommunicationPayloadComponent() { + super(); + } + + /* + * Constructor + */ + public CommunicationPayloadComponent(Type content) { + super(); + this.content = content; + } + + /** + * @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).) + */ + public Type getContent() { + return this.content; + } + + /** + * @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).) + */ + public StringType getContentStringType() throws FHIRException { + if (!(this.content instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.content.getClass().getName()+" was encountered"); + return (StringType) this.content; + } + + public boolean hasContentStringType() { + return this.content instanceof StringType; + } + + /** + * @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).) + */ + public Attachment getContentAttachment() throws FHIRException { + if (!(this.content instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Attachment) this.content; + } + + public boolean hasContentAttachment() { + return this.content instanceof Attachment; + } + + /** + * @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).) + */ + public Reference getContentReference() throws FHIRException { + if (!(this.content instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Reference) this.content; + } + + public boolean hasContentReference() { + return this.content instanceof Reference; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).) + */ + public CommunicationPayloadComponent setContent(Type value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "A communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("content[x]")) + this.content = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentString")) { + this.content = new StringType(); + return this.content; + } + else if (name.equals("contentAttachment")) { + this.content = new Attachment(); + return this.content; + } + else if (name.equals("contentReference")) { + this.content = new Reference(); + return this.content; + } + else + return super.addChild(name); + } + + public CommunicationPayloadComponent copy() { + CommunicationPayloadComponent dst = new CommunicationPayloadComponent(); + copyValues(dst); + dst.content = content == null ? null : content.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CommunicationPayloadComponent)) + return false; + CommunicationPayloadComponent o = (CommunicationPayloadComponent) other; + return compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CommunicationPayloadComponent)) + return false; + CommunicationPayloadComponent o = (CommunicationPayloadComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "Communication.payload"; + + } + + } + + /** + * Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * The type of message conveyed such as alert, notification, reminder, instruction, etc. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message category", formalDefinition="The type of message conveyed such as alert, notification, reminder, instruction, etc." ) + protected CodeableConcept category; + + /** + * The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication. + */ + @Child(name = "sender", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication." ) + protected Reference sender; + + /** + * The actual object that is the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.) + */ + protected Resource senderTarget; + + /** + * The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time). + */ + @Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Group.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time)." ) + protected List recipient; + /** + * The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).) + */ + protected List recipientTarget; + + + /** + * Text, attachment(s), or resource(s) that was communicated to the recipient. + */ + @Child(name = "payload", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) that was communicated to the recipient." ) + protected List payload; + + /** + * A channel that was used for this communication (e.g. email, fax). + */ + @Child(name = "medium", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." ) + protected List medium; + + /** + * The status of the transmission. + */ + @Child(name = "status", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the transmission." ) + protected Enumeration status; + + /** + * The encounter within which the communication was sent. + */ + @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication was sent." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter within which the communication was sent.) + */ + protected Encounter encounterTarget; + + /** + * The time when this communication was sent. + */ + @Child(name = "sent", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When sent", formalDefinition="The time when this communication was sent." ) + protected DateTimeType sent; + + /** + * The time when this communication arrived at the destination. + */ + @Child(name = "received", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When received", formalDefinition="The time when this communication arrived at the destination." ) + protected DateTimeType received; + + /** + * The reason or justification for the communication. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication." ) + protected List reason; + + /** + * The patient who was the focus of this communication. + */ + @Child(name = "subject", type = {Patient.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Focus of message", formalDefinition="The patient who was the focus of this communication." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient who was the focus of this communication.) + */ + protected Patient subjectTarget; + + /** + * The communication request that was responsible for producing this communication. + */ + @Child(name = "requestDetail", type = {CommunicationRequest.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="CommunicationRequest producing this message", formalDefinition="The communication request that was responsible for producing this communication." ) + protected Reference requestDetail; + + /** + * The actual object that is the target of the reference (The communication request that was responsible for producing this communication.) + */ + protected CommunicationRequest requestDetailTarget; + + private static final long serialVersionUID = -1654449146L; + + /* + * Constructor + */ + public Communication() { + super(); + } + + /** + * @return {@link #identifier} (Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Communication addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #category} (The type of message conveyed such as alert, notification, reminder, instruction, etc.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (The type of message conveyed such as alert, notification, reminder, instruction, etc.) + */ + public Communication setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.) + */ + public Reference getSender() { + if (this.sender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.sender"); + else if (Configuration.doAutoCreate()) + this.sender = new Reference(); // cc + return this.sender; + } + + public boolean hasSender() { + return this.sender != null && !this.sender.isEmpty(); + } + + /** + * @param value {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.) + */ + public Communication setSender(Reference value) { + this.sender = value; + return this; + } + + /** + * @return {@link #sender} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.) + */ + public Resource getSenderTarget() { + return this.senderTarget; + } + + /** + * @param value {@link #sender} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.) + */ + public Communication setSenderTarget(Resource value) { + this.senderTarget = value; + return this; + } + + /** + * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).) + */ + public List getRecipient() { + if (this.recipient == null) + this.recipient = new ArrayList(); + return this.recipient; + } + + public boolean hasRecipient() { + if (this.recipient == null) + return false; + for (Reference item : this.recipient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).) + */ + // syntactic sugar + public Reference addRecipient() { //3 + Reference t = new Reference(); + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return t; + } + + // syntactic sugar + public Communication addRecipient(Reference t) { //3 + if (t == null) + return this; + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return this; + } + + /** + * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).) + */ + public List getRecipientTarget() { + if (this.recipientTarget == null) + this.recipientTarget = new ArrayList(); + return this.recipientTarget; + } + + /** + * @return {@link #payload} (Text, attachment(s), or resource(s) that was communicated to the recipient.) + */ + public List getPayload() { + if (this.payload == null) + this.payload = new ArrayList(); + return this.payload; + } + + public boolean hasPayload() { + if (this.payload == null) + return false; + for (CommunicationPayloadComponent item : this.payload) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #payload} (Text, attachment(s), or resource(s) that was communicated to the recipient.) + */ + // syntactic sugar + public CommunicationPayloadComponent addPayload() { //3 + CommunicationPayloadComponent t = new CommunicationPayloadComponent(); + if (this.payload == null) + this.payload = new ArrayList(); + this.payload.add(t); + return t; + } + + // syntactic sugar + public Communication addPayload(CommunicationPayloadComponent t) { //3 + if (t == null) + return this; + if (this.payload == null) + this.payload = new ArrayList(); + this.payload.add(t); + return this; + } + + /** + * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).) + */ + public List getMedium() { + if (this.medium == null) + this.medium = new ArrayList(); + return this.medium; + } + + public boolean hasMedium() { + if (this.medium == null) + return false; + for (CodeableConcept item : this.medium) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).) + */ + // syntactic sugar + public CodeableConcept addMedium() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.medium == null) + this.medium = new ArrayList(); + this.medium.add(t); + return t; + } + + // syntactic sugar + public Communication addMedium(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.medium == null) + this.medium = new ArrayList(); + this.medium.add(t); + return this; + } + + /** + * @return {@link #status} (The status of the transmission.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new CommunicationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the transmission.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Communication setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the transmission. + */ + public CommunicationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the transmission. + */ + public Communication setStatus(CommunicationStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new CommunicationStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #encounter} (The encounter within which the communication was sent.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter within which the communication was sent.) + */ + public Communication setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter within which the communication was sent.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter within which the communication was sent.) + */ + public Communication setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #sent} (The time when this communication was sent.). This is the underlying object with id, value and extensions. The accessor "getSent" gives direct access to the value + */ + public DateTimeType getSentElement() { + if (this.sent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.sent"); + else if (Configuration.doAutoCreate()) + this.sent = new DateTimeType(); // bb + return this.sent; + } + + public boolean hasSentElement() { + return this.sent != null && !this.sent.isEmpty(); + } + + public boolean hasSent() { + return this.sent != null && !this.sent.isEmpty(); + } + + /** + * @param value {@link #sent} (The time when this communication was sent.). This is the underlying object with id, value and extensions. The accessor "getSent" gives direct access to the value + */ + public Communication setSentElement(DateTimeType value) { + this.sent = value; + return this; + } + + /** + * @return The time when this communication was sent. + */ + public Date getSent() { + return this.sent == null ? null : this.sent.getValue(); + } + + /** + * @param value The time when this communication was sent. + */ + public Communication setSent(Date value) { + if (value == null) + this.sent = null; + else { + if (this.sent == null) + this.sent = new DateTimeType(); + this.sent.setValue(value); + } + return this; + } + + /** + * @return {@link #received} (The time when this communication arrived at the destination.). This is the underlying object with id, value and extensions. The accessor "getReceived" gives direct access to the value + */ + public DateTimeType getReceivedElement() { + if (this.received == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.received"); + else if (Configuration.doAutoCreate()) + this.received = new DateTimeType(); // bb + return this.received; + } + + public boolean hasReceivedElement() { + return this.received != null && !this.received.isEmpty(); + } + + public boolean hasReceived() { + return this.received != null && !this.received.isEmpty(); + } + + /** + * @param value {@link #received} (The time when this communication arrived at the destination.). This is the underlying object with id, value and extensions. The accessor "getReceived" gives direct access to the value + */ + public Communication setReceivedElement(DateTimeType value) { + this.received = value; + return this; + } + + /** + * @return The time when this communication arrived at the destination. + */ + public Date getReceived() { + return this.received == null ? null : this.received.getValue(); + } + + /** + * @param value The time when this communication arrived at the destination. + */ + public Communication setReceived(Date value) { + if (value == null) + this.received = null; + else { + if (this.received == null) + this.received = new DateTimeType(); + this.received.setValue(value); + } + return this; + } + + /** + * @return {@link #reason} (The reason or justification for the communication.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (The reason or justification for the communication.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public Communication addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #subject} (The patient who was the focus of this communication.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient who was the focus of this communication.) + */ + public Communication setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who was the focus of this communication.) + */ + public Patient getSubjectTarget() { + if (this.subjectTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.subject"); + else if (Configuration.doAutoCreate()) + this.subjectTarget = new Patient(); // aa + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who was the focus of this communication.) + */ + public Communication setSubjectTarget(Patient value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #requestDetail} (The communication request that was responsible for producing this communication.) + */ + public Reference getRequestDetail() { + if (this.requestDetail == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.requestDetail"); + else if (Configuration.doAutoCreate()) + this.requestDetail = new Reference(); // cc + return this.requestDetail; + } + + public boolean hasRequestDetail() { + return this.requestDetail != null && !this.requestDetail.isEmpty(); + } + + /** + * @param value {@link #requestDetail} (The communication request that was responsible for producing this communication.) + */ + public Communication setRequestDetail(Reference value) { + this.requestDetail = value; + return this; + } + + /** + * @return {@link #requestDetail} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The communication request that was responsible for producing this communication.) + */ + public CommunicationRequest getRequestDetailTarget() { + if (this.requestDetailTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Communication.requestDetail"); + else if (Configuration.doAutoCreate()) + this.requestDetailTarget = new CommunicationRequest(); // aa + return this.requestDetailTarget; + } + + /** + * @param value {@link #requestDetail} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The communication request that was responsible for producing this communication.) + */ + public Communication setRequestDetailTarget(CommunicationRequest value) { + this.requestDetailTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("category", "CodeableConcept", "The type of message conveyed such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender)); + childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson|Group)", "The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).", 0, java.lang.Integer.MAX_VALUE, recipient)); + childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) that was communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload)); + childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium)); + childrenList.add(new Property("status", "code", "The status of the transmission.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the communication was sent.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("sent", "dateTime", "The time when this communication was sent.", 0, java.lang.Integer.MAX_VALUE, sent)); + childrenList.add(new Property("received", "dateTime", "The time when this communication arrived at the destination.", 0, java.lang.Integer.MAX_VALUE, received)); + childrenList.add(new Property("reason", "CodeableConcept", "The reason or justification for the communication.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("subject", "Reference(Patient)", "The patient who was the focus of this communication.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("requestDetail", "Reference(CommunicationRequest)", "The communication request that was responsible for producing this communication.", 0, java.lang.Integer.MAX_VALUE, requestDetail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("sender")) + this.sender = castToReference(value); // Reference + else if (name.equals("recipient")) + this.getRecipient().add(castToReference(value)); + else if (name.equals("payload")) + this.getPayload().add((CommunicationPayloadComponent) value); + else if (name.equals("medium")) + this.getMedium().add(castToCodeableConcept(value)); + else if (name.equals("status")) + this.status = new CommunicationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("sent")) + this.sent = castToDateTime(value); // DateTimeType + else if (name.equals("received")) + this.received = castToDateTime(value); // DateTimeType + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("requestDetail")) + this.requestDetail = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("sender")) { + this.sender = new Reference(); + return this.sender; + } + else if (name.equals("recipient")) { + return addRecipient(); + } + else if (name.equals("payload")) { + return addPayload(); + } + else if (name.equals("medium")) { + return addMedium(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Communication.status"); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("sent")) { + throw new FHIRException("Cannot call addChild on a primitive type Communication.sent"); + } + else if (name.equals("received")) { + throw new FHIRException("Cannot call addChild on a primitive type Communication.received"); + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("requestDetail")) { + this.requestDetail = new Reference(); + return this.requestDetail; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Communication"; + + } + + public Communication copy() { + Communication dst = new Communication(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.category = category == null ? null : category.copy(); + dst.sender = sender == null ? null : sender.copy(); + if (recipient != null) { + dst.recipient = new ArrayList(); + for (Reference i : recipient) + dst.recipient.add(i.copy()); + }; + if (payload != null) { + dst.payload = new ArrayList(); + for (CommunicationPayloadComponent i : payload) + dst.payload.add(i.copy()); + }; + if (medium != null) { + dst.medium = new ArrayList(); + for (CodeableConcept i : medium) + dst.medium.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.sent = sent == null ? null : sent.copy(); + dst.received = received == null ? null : received.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.requestDetail = requestDetail == null ? null : requestDetail.copy(); + return dst; + } + + protected Communication typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Communication)) + return false; + Communication o = (Communication) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(sender, o.sender, true) + && compareDeep(recipient, o.recipient, true) && compareDeep(payload, o.payload, true) && compareDeep(medium, o.medium, true) + && compareDeep(status, o.status, true) && compareDeep(encounter, o.encounter, true) && compareDeep(sent, o.sent, true) + && compareDeep(received, o.received, true) && compareDeep(reason, o.reason, true) && compareDeep(subject, o.subject, true) + && compareDeep(requestDetail, o.requestDetail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Communication)) + return false; + Communication o = (Communication) other; + return compareValues(status, o.status, true) && compareValues(sent, o.sent, true) && compareValues(received, o.received, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) + && (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty()) + && (medium == null || medium.isEmpty()) && (status == null || status.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (sent == null || sent.isEmpty()) && (received == null || received.isEmpty()) && (reason == null || reason.isEmpty()) + && (subject == null || subject.isEmpty()) && (requestDetail == null || requestDetail.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Communication; + } + + @SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="request", path="Communication.requestDetail", description="CommunicationRequest producing this message", type="reference" ) + public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" ) + public static final String SP_SENDER = "sender"; + @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference" ) + public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" ) + public static final String SP_RECEIVED = "received"; + @SearchParamDefinition(name="medium", path="Communication.medium", description="A channel of communication", type="token" ) + public static final String SP_MEDIUM = "medium"; + @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" ) + public static final String SP_SENT = "sent"; + @SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CommunicationRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CommunicationRequest.java new file mode 100644 index 00000000000..821cbdbd8b3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/CommunicationRequest.java @@ -0,0 +1,1339 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ +@ResourceDef(name="CommunicationRequest", profile="http://hl7.org/fhir/Profile/CommunicationRequest") +public class CommunicationRequest extends DomainResource { + + public enum CommunicationRequestStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The receiving system has received the request but not yet decided whether it will be performed. + */ + RECEIVED, + /** + * The receiving system has accepted the order, but work has not yet commenced. + */ + ACCEPTED, + /** + * The work to fulfill the order is happening. + */ + INPROGRESS, + /** + * The work has been complete, the report(s) released, and no further work is planned. + */ + COMPLETED, + /** + * The request has been held by originating system/user request. + */ + SUSPENDED, + /** + * The receiving system has declined to fulfill the request + */ + REJECTED, + /** + * The communication was attempted, but due to some procedural error, it could not be completed. + */ + FAILED, + /** + * added to help the parsers + */ + NULL; + public static CommunicationRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("failed".equals(codeString)) + return FAILED; + throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case SUSPENDED: return "suspended"; + case REJECTED: return "rejected"; + case FAILED: return "failed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/communication-request-status"; + case PLANNED: return "http://hl7.org/fhir/communication-request-status"; + case REQUESTED: return "http://hl7.org/fhir/communication-request-status"; + case RECEIVED: return "http://hl7.org/fhir/communication-request-status"; + case ACCEPTED: return "http://hl7.org/fhir/communication-request-status"; + case INPROGRESS: return "http://hl7.org/fhir/communication-request-status"; + case COMPLETED: return "http://hl7.org/fhir/communication-request-status"; + case SUSPENDED: return "http://hl7.org/fhir/communication-request-status"; + case REJECTED: return "http://hl7.org/fhir/communication-request-status"; + case FAILED: return "http://hl7.org/fhir/communication-request-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case RECEIVED: return "The receiving system has received the request but not yet decided whether it will be performed."; + case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced."; + case INPROGRESS: return "The work to fulfill the order is happening."; + case COMPLETED: return "The work has been complete, the report(s) released, and no further work is planned."; + case SUSPENDED: return "The request has been held by originating system/user request."; + case REJECTED: return "The receiving system has declined to fulfill the request"; + case FAILED: return "The communication was attempted, but due to some procedural error, it could not be completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PLANNED: return "Planned"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case SUSPENDED: return "Suspended"; + case REJECTED: return "Rejected"; + case FAILED: return "Failed"; + default: return "?"; + } + } + } + + public static class CommunicationRequestStatusEnumFactory implements EnumFactory { + public CommunicationRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return CommunicationRequestStatus.PROPOSED; + if ("planned".equals(codeString)) + return CommunicationRequestStatus.PLANNED; + if ("requested".equals(codeString)) + return CommunicationRequestStatus.REQUESTED; + if ("received".equals(codeString)) + return CommunicationRequestStatus.RECEIVED; + if ("accepted".equals(codeString)) + return CommunicationRequestStatus.ACCEPTED; + if ("in-progress".equals(codeString)) + return CommunicationRequestStatus.INPROGRESS; + if ("completed".equals(codeString)) + return CommunicationRequestStatus.COMPLETED; + if ("suspended".equals(codeString)) + return CommunicationRequestStatus.SUSPENDED; + if ("rejected".equals(codeString)) + return CommunicationRequestStatus.REJECTED; + if ("failed".equals(codeString)) + return CommunicationRequestStatus.FAILED; + throw new IllegalArgumentException("Unknown CommunicationRequestStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.PROPOSED); + if ("planned".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.PLANNED); + if ("requested".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.RECEIVED); + if ("accepted".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.ACCEPTED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.COMPLETED); + if ("suspended".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.SUSPENDED); + if ("rejected".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.REJECTED); + if ("failed".equals(codeString)) + return new Enumeration(this, CommunicationRequestStatus.FAILED); + throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'"); + } + public String toCode(CommunicationRequestStatus code) { + if (code == CommunicationRequestStatus.PROPOSED) + return "proposed"; + if (code == CommunicationRequestStatus.PLANNED) + return "planned"; + if (code == CommunicationRequestStatus.REQUESTED) + return "requested"; + if (code == CommunicationRequestStatus.RECEIVED) + return "received"; + if (code == CommunicationRequestStatus.ACCEPTED) + return "accepted"; + if (code == CommunicationRequestStatus.INPROGRESS) + return "in-progress"; + if (code == CommunicationRequestStatus.COMPLETED) + return "completed"; + if (code == CommunicationRequestStatus.SUSPENDED) + return "suspended"; + if (code == CommunicationRequestStatus.REJECTED) + return "rejected"; + if (code == CommunicationRequestStatus.FAILED) + return "failed"; + return "?"; + } + } + + @Block() + public static class CommunicationRequestPayloadComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The communicated content (or for multi-part communications, one portion of the communication). + */ + @Child(name = "content", type = {StringType.class, Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message part content", formalDefinition="The communicated content (or for multi-part communications, one portion of the communication)." ) + protected Type content; + + private static final long serialVersionUID = -1763459053L; + + /* + * Constructor + */ + public CommunicationRequestPayloadComponent() { + super(); + } + + /* + * Constructor + */ + public CommunicationRequestPayloadComponent(Type content) { + super(); + this.content = content; + } + + /** + * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) + */ + public Type getContent() { + return this.content; + } + + /** + * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) + */ + public StringType getContentStringType() throws FHIRException { + if (!(this.content instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.content.getClass().getName()+" was encountered"); + return (StringType) this.content; + } + + public boolean hasContentStringType() { + return this.content instanceof StringType; + } + + /** + * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) + */ + public Attachment getContentAttachment() throws FHIRException { + if (!(this.content instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Attachment) this.content; + } + + public boolean hasContentAttachment() { + return this.content instanceof Attachment; + } + + /** + * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) + */ + public Reference getContentReference() throws FHIRException { + if (!(this.content instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Reference) this.content; + } + + public boolean hasContentReference() { + return this.content instanceof Reference; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) + */ + public CommunicationRequestPayloadComponent setContent(Type value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("content[x]")) + this.content = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentString")) { + this.content = new StringType(); + return this.content; + } + else if (name.equals("contentAttachment")) { + this.content = new Attachment(); + return this.content; + } + else if (name.equals("contentReference")) { + this.content = new Reference(); + return this.content; + } + else + return super.addChild(name); + } + + public CommunicationRequestPayloadComponent copy() { + CommunicationRequestPayloadComponent dst = new CommunicationRequestPayloadComponent(); + copyValues(dst); + dst.content = content == null ? null : content.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CommunicationRequestPayloadComponent)) + return false; + CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other; + return compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CommunicationRequestPayloadComponent)) + return false; + CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "CommunicationRequest.payload"; + + } + + } + + /** + * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system." ) + protected List identifier; + + /** + * The type of message to be sent such as alert, notification, reminder, instruction, etc. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message category", formalDefinition="The type of message to be sent such as alert, notification, reminder, instruction, etc." ) + protected CodeableConcept category; + + /** + * The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication. + */ + @Child(name = "sender", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication." ) + protected Reference sender; + + /** + * The actual object that is the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) + */ + protected Resource senderTarget; + + /** + * The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication. + */ + @Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication." ) + protected List recipient; + /** + * The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) + */ + protected List recipientTarget; + + + /** + * Text, attachment(s), or resource(s) to be communicated to the recipient. + */ + @Child(name = "payload", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) + protected List payload; + + /** + * A channel that was used for this communication (e.g. email, fax). + */ + @Child(name = "medium", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." ) + protected List medium; + + /** + * The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application. + */ + @Child(name = "requester", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An individual who requested a communication", formalDefinition="The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application." ) + protected Reference requester; + + /** + * The actual object that is the target of the reference (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.) + */ + protected Resource requesterTarget; + + /** + * The status of the proposal or order. + */ + @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the proposal or order." ) + protected Enumeration status; + + /** + * The encounter within which the communication request was created. + */ + @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication request was created." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter within which the communication request was created.) + */ + protected Encounter encounterTarget; + + /** + * The time when this communication is to occur. + */ + @Child(name = "scheduled", type = {DateTimeType.class, Period.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." ) + protected Type scheduled; + + /** + * The reason or justification for the communication request. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication request." ) + protected List reason; + + /** + * The time when the request was made. + */ + @Child(name = "requestedOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." ) + protected DateTimeType requestedOn; + + /** + * The patient who is the focus of this communication request. + */ + @Child(name = "subject", type = {Patient.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication request." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient who is the focus of this communication request.) + */ + protected Patient subjectTarget; + + /** + * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. + */ + @Child(name = "priority", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." ) + protected CodeableConcept priority; + + private static final long serialVersionUID = 146906020L; + + /* + * Constructor + */ + public CommunicationRequest() { + super(); + } + + /** + * @return {@link #identifier} (A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public CommunicationRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #category} (The type of message to be sent such as alert, notification, reminder, instruction, etc.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (The type of message to be sent such as alert, notification, reminder, instruction, etc.) + */ + public CommunicationRequest setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) + */ + public Reference getSender() { + if (this.sender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.sender"); + else if (Configuration.doAutoCreate()) + this.sender = new Reference(); // cc + return this.sender; + } + + public boolean hasSender() { + return this.sender != null && !this.sender.isEmpty(); + } + + /** + * @param value {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) + */ + public CommunicationRequest setSender(Reference value) { + this.sender = value; + return this; + } + + /** + * @return {@link #sender} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) + */ + public Resource getSenderTarget() { + return this.senderTarget; + } + + /** + * @param value {@link #sender} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) + */ + public CommunicationRequest setSenderTarget(Resource value) { + this.senderTarget = value; + return this; + } + + /** + * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) + */ + public List getRecipient() { + if (this.recipient == null) + this.recipient = new ArrayList(); + return this.recipient; + } + + public boolean hasRecipient() { + if (this.recipient == null) + return false; + for (Reference item : this.recipient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) + */ + // syntactic sugar + public Reference addRecipient() { //3 + Reference t = new Reference(); + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return t; + } + + // syntactic sugar + public CommunicationRequest addRecipient(Reference t) { //3 + if (t == null) + return this; + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return this; + } + + /** + * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) + */ + public List getRecipientTarget() { + if (this.recipientTarget == null) + this.recipientTarget = new ArrayList(); + return this.recipientTarget; + } + + /** + * @return {@link #payload} (Text, attachment(s), or resource(s) to be communicated to the recipient.) + */ + public List getPayload() { + if (this.payload == null) + this.payload = new ArrayList(); + return this.payload; + } + + public boolean hasPayload() { + if (this.payload == null) + return false; + for (CommunicationRequestPayloadComponent item : this.payload) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #payload} (Text, attachment(s), or resource(s) to be communicated to the recipient.) + */ + // syntactic sugar + public CommunicationRequestPayloadComponent addPayload() { //3 + CommunicationRequestPayloadComponent t = new CommunicationRequestPayloadComponent(); + if (this.payload == null) + this.payload = new ArrayList(); + this.payload.add(t); + return t; + } + + // syntactic sugar + public CommunicationRequest addPayload(CommunicationRequestPayloadComponent t) { //3 + if (t == null) + return this; + if (this.payload == null) + this.payload = new ArrayList(); + this.payload.add(t); + return this; + } + + /** + * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).) + */ + public List getMedium() { + if (this.medium == null) + this.medium = new ArrayList(); + return this.medium; + } + + public boolean hasMedium() { + if (this.medium == null) + return false; + for (CodeableConcept item : this.medium) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).) + */ + // syntactic sugar + public CodeableConcept addMedium() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.medium == null) + this.medium = new ArrayList(); + this.medium.add(t); + return t; + } + + // syntactic sugar + public CommunicationRequest addMedium(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.medium == null) + this.medium = new ArrayList(); + this.medium.add(t); + return this; + } + + /** + * @return {@link #requester} (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.) + */ + public Reference getRequester() { + if (this.requester == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.requester"); + else if (Configuration.doAutoCreate()) + this.requester = new Reference(); // cc + return this.requester; + } + + public boolean hasRequester() { + return this.requester != null && !this.requester.isEmpty(); + } + + /** + * @param value {@link #requester} (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.) + */ + public CommunicationRequest setRequester(Reference value) { + this.requester = value; + return this; + } + + /** + * @return {@link #requester} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.) + */ + public Resource getRequesterTarget() { + return this.requesterTarget; + } + + /** + * @param value {@link #requester} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.) + */ + public CommunicationRequest setRequesterTarget(Resource value) { + this.requesterTarget = value; + return this; + } + + /** + * @return {@link #status} (The status of the proposal or order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new CommunicationRequestStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the proposal or order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public CommunicationRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the proposal or order. + */ + public CommunicationRequestStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the proposal or order. + */ + public CommunicationRequest setStatus(CommunicationRequestStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new CommunicationRequestStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #encounter} (The encounter within which the communication request was created.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter within which the communication request was created.) + */ + public CommunicationRequest setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter within which the communication request was created.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter within which the communication request was created.) + */ + public CommunicationRequest setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #scheduled} (The time when this communication is to occur.) + */ + public Type getScheduled() { + return this.scheduled; + } + + /** + * @return {@link #scheduled} (The time when this communication is to occur.) + */ + public DateTimeType getScheduledDateTimeType() throws FHIRException { + if (!(this.scheduled instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (DateTimeType) this.scheduled; + } + + public boolean hasScheduledDateTimeType() { + return this.scheduled instanceof DateTimeType; + } + + /** + * @return {@link #scheduled} (The time when this communication is to occur.) + */ + public Period getScheduledPeriod() throws FHIRException { + if (!(this.scheduled instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (Period) this.scheduled; + } + + public boolean hasScheduledPeriod() { + return this.scheduled instanceof Period; + } + + public boolean hasScheduled() { + return this.scheduled != null && !this.scheduled.isEmpty(); + } + + /** + * @param value {@link #scheduled} (The time when this communication is to occur.) + */ + public CommunicationRequest setScheduled(Type value) { + this.scheduled = value; + return this; + } + + /** + * @return {@link #reason} (The reason or justification for the communication request.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (The reason or justification for the communication request.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public CommunicationRequest addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value + */ + public DateTimeType getRequestedOnElement() { + if (this.requestedOn == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.requestedOn"); + else if (Configuration.doAutoCreate()) + this.requestedOn = new DateTimeType(); // bb + return this.requestedOn; + } + + public boolean hasRequestedOnElement() { + return this.requestedOn != null && !this.requestedOn.isEmpty(); + } + + public boolean hasRequestedOn() { + return this.requestedOn != null && !this.requestedOn.isEmpty(); + } + + /** + * @param value {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value + */ + public CommunicationRequest setRequestedOnElement(DateTimeType value) { + this.requestedOn = value; + return this; + } + + /** + * @return The time when the request was made. + */ + public Date getRequestedOn() { + return this.requestedOn == null ? null : this.requestedOn.getValue(); + } + + /** + * @param value The time when the request was made. + */ + public CommunicationRequest setRequestedOn(Date value) { + if (value == null) + this.requestedOn = null; + else { + if (this.requestedOn == null) + this.requestedOn = new DateTimeType(); + this.requestedOn.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (The patient who is the focus of this communication request.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient who is the focus of this communication request.) + */ + public CommunicationRequest setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who is the focus of this communication request.) + */ + public Patient getSubjectTarget() { + if (this.subjectTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subjectTarget = new Patient(); // aa + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who is the focus of this communication request.) + */ + public CommunicationRequest setSubjectTarget(Patient value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CommunicationRequest.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.) + */ + public CommunicationRequest setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("category", "CodeableConcept", "The type of message to be sent such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender)); + childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient)); + childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload)); + childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium)); + childrenList.add(new Property("requester", "Reference(Practitioner|Patient|RelatedPerson)", "The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.", 0, java.lang.Integer.MAX_VALUE, requester)); + childrenList.add(new Property("status", "code", "The status of the proposal or order.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the communication request was created.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("scheduled[x]", "dateTime|Period", "The time when this communication is to occur.", 0, java.lang.Integer.MAX_VALUE, scheduled)); + childrenList.add(new Property("reason", "CodeableConcept", "The reason or justification for the communication request.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("requestedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, requestedOn)); + childrenList.add(new Property("subject", "Reference(Patient)", "The patient who is the focus of this communication request.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("priority", "CodeableConcept", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("sender")) + this.sender = castToReference(value); // Reference + else if (name.equals("recipient")) + this.getRecipient().add(castToReference(value)); + else if (name.equals("payload")) + this.getPayload().add((CommunicationRequestPayloadComponent) value); + else if (name.equals("medium")) + this.getMedium().add(castToCodeableConcept(value)); + else if (name.equals("requester")) + this.requester = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new CommunicationRequestStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("scheduled[x]")) + this.scheduled = (Type) value; // Type + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("requestedOn")) + this.requestedOn = castToDateTime(value); // DateTimeType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("priority")) + this.priority = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("sender")) { + this.sender = new Reference(); + return this.sender; + } + else if (name.equals("recipient")) { + return addRecipient(); + } + else if (name.equals("payload")) { + return addPayload(); + } + else if (name.equals("medium")) { + return addMedium(); + } + else if (name.equals("requester")) { + this.requester = new Reference(); + return this.requester; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.status"); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("scheduledDateTime")) { + this.scheduled = new DateTimeType(); + return this.scheduled; + } + else if (name.equals("scheduledPeriod")) { + this.scheduled = new Period(); + return this.scheduled; + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("requestedOn")) { + throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.requestedOn"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CommunicationRequest"; + + } + + public CommunicationRequest copy() { + CommunicationRequest dst = new CommunicationRequest(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.category = category == null ? null : category.copy(); + dst.sender = sender == null ? null : sender.copy(); + if (recipient != null) { + dst.recipient = new ArrayList(); + for (Reference i : recipient) + dst.recipient.add(i.copy()); + }; + if (payload != null) { + dst.payload = new ArrayList(); + for (CommunicationRequestPayloadComponent i : payload) + dst.payload.add(i.copy()); + }; + if (medium != null) { + dst.medium = new ArrayList(); + for (CodeableConcept i : medium) + dst.medium.add(i.copy()); + }; + dst.requester = requester == null ? null : requester.copy(); + dst.status = status == null ? null : status.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.scheduled = scheduled == null ? null : scheduled.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + dst.requestedOn = requestedOn == null ? null : requestedOn.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.priority = priority == null ? null : priority.copy(); + return dst; + } + + protected CommunicationRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CommunicationRequest)) + return false; + CommunicationRequest o = (CommunicationRequest) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(sender, o.sender, true) + && compareDeep(recipient, o.recipient, true) && compareDeep(payload, o.payload, true) && compareDeep(medium, o.medium, true) + && compareDeep(requester, o.requester, true) && compareDeep(status, o.status, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(scheduled, o.scheduled, true) && compareDeep(reason, o.reason, true) && compareDeep(requestedOn, o.requestedOn, true) + && compareDeep(subject, o.subject, true) && compareDeep(priority, o.priority, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CommunicationRequest)) + return false; + CommunicationRequest o = (CommunicationRequest) other; + return compareValues(status, o.status, true) && compareValues(requestedOn, o.requestedOn, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) + && (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty()) + && (medium == null || medium.isEmpty()) && (requester == null || requester.isEmpty()) && (status == null || status.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (scheduled == null || scheduled.isEmpty()) + && (reason == null || reason.isEmpty()) && (requestedOn == null || requestedOn.isEmpty()) + && (subject == null || subject.isEmpty()) && (priority == null || priority.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.CommunicationRequest; + } + + @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference" ) + public static final String SP_REQUESTER = "requester"; + @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token" ) + public static final String SP_MEDIUM = "medium"; + @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) + public static final String SP_PRIORITY = "priority"; + @SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="When ordered or proposed", type="date" ) + public static final String SP_REQUESTED = "requested"; + @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" ) + public static final String SP_SENDER = "sender"; + @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" ) + public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledDateTime", description="When scheduled", type="date" ) + public static final String SP_TIME = "time"; + @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Comparison.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Comparison.java new file mode 100644 index 00000000000..33f5e692d96 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Comparison.java @@ -0,0 +1,110 @@ +package org.hl7.fhir.dstu21.model; + +import java.util.List; + +import org.apache.commons.lang3.NotImplementedException; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.Utilities; + +/** + * See http://www.healthintersections.com.au/?p=1941 + * + * @author Grahame + * + */ +public class Comparison { + + public class MatchProfile { + + } + + public static boolean matches(String c1, String c2, MatchProfile profile) { + if (Utilities.noString(c1) || Utilities.noString(c2)) + return false; + c1 = Utilities.normalize(c1); + c2 = Utilities.normalize(c2); + return c1.equals(c2); + } + + public static > boolean matches(Enumeration e1, Enumeration e2, MatchProfile profile) { + if (e1 == null || e2 == null) + return false; + return e1.getValue().equals(e2.getValue()); + } + + public static boolean matches(CodeableConcept c1, CodeableConcept c2, MatchProfile profile) throws FHIRException { + if (profile != null) + throw new NotImplementedException("Not Implemented Yet"); + + if (c1.getCoding().isEmpty() && c2.getCoding().isEmpty()) { + return matches(c1.getText(), c2.getText(), null); + } else { + // in the absence of specific guidance, we just require that all codes match + boolean ok = true; + for (Coding c : c1.getCoding()) { + ok = ok && inList(c2.getCoding(), c, null); + } + for (Coding c : c2.getCoding()) { + ok = ok && inList(c1.getCoding(), c, null); + } + return ok; + } + } + + public static void merge(CodeableConcept dst, CodeableConcept src) { + if (dst.getTextElement() == null && src.getTextElement() != null) + dst.setTextElement(src.getTextElement()); + } + + + public static boolean inList(List list, Coding c, MatchProfile profile) { + for (Coding item : list) { + if (matches(item, c, profile)) + return true; + } + return false; + } + + public static boolean matches(Coding c1, Coding c2, MatchProfile profile) { + if (profile != null) + throw new NotImplementedException("Not Implemented Yet"); + + // in the absence of a profile, we ignore version + return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null); + } + + public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) { + if (profile != null) + throw new NotImplementedException("Not Implemented Yet"); + + // in the absence of a profile, we ignore version + return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null); + } + + public static void merge(Identifier dst, Identifier src) { + if (dst.getUseElement() == null && src.getUseElement() != null) + dst.setUseElement(src.getUseElement()); + if (dst.getType() == null && src.getType() != null) + dst.setType(src.getType()); + if (dst.getPeriod() == null && src.getPeriod() != null) + dst.setPeriod(src.getPeriod()); + if (dst.getAssigner() == null && src.getAssigner() != null) + dst.setAssigner(src.getAssigner()); + } + + public static boolean matches(ContactPoint c1, ContactPoint c2, Object profile) { + if (profile != null) + throw new NotImplementedException("Not Implemented Yet"); + + // in the absence of a profile, we insist on system + return matches(c1.getSystemElement(), c2.getSystemElement(), null) && matches(c1.getValue(), c2.getValue(), null); + } + + public static void merge(ContactPoint dst, ContactPoint src) { + if (dst.getUseElement() == null && src.getUseElement() != null) + dst.setUseElement(src.getUseElement()); + if (dst.getPeriod() == null && src.getPeriod() != null) + dst.setPeriod(src.getPeriod()); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Composition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Composition.java new file mode 100644 index 00000000000..a425ec9f4dd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Composition.java @@ -0,0 +1,2174 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ +@ResourceDef(name="Composition", profile="http://hl7.org/fhir/Profile/Composition") +public class Composition extends DomainResource { + + public enum CompositionStatus { + /** + * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified. + */ + PRELIMINARY, + /** + * This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition. + */ + FINAL, + /** + * The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as "final" and the composition is complete and verified by an authorized person. + */ + AMENDED, + /** + * The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static CompositionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preliminary".equals(codeString)) + return PRELIMINARY; + if ("final".equals(codeString)) + return FINAL; + if ("amended".equals(codeString)) + return AMENDED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRELIMINARY: return "preliminary"; + case FINAL: return "final"; + case AMENDED: return "amended"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PRELIMINARY: return "http://hl7.org/fhir/composition-status"; + case FINAL: return "http://hl7.org/fhir/composition-status"; + case AMENDED: return "http://hl7.org/fhir/composition-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/composition-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified."; + case FINAL: return "This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition."; + case AMENDED: return "The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as \"final\" and the composition is complete and verified by an authorized person."; + case ENTEREDINERROR: return "The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRELIMINARY: return "Preliminary"; + case FINAL: return "Final"; + case AMENDED: return "Amended"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class CompositionStatusEnumFactory implements EnumFactory { + public CompositionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("preliminary".equals(codeString)) + return CompositionStatus.PRELIMINARY; + if ("final".equals(codeString)) + return CompositionStatus.FINAL; + if ("amended".equals(codeString)) + return CompositionStatus.AMENDED; + if ("entered-in-error".equals(codeString)) + return CompositionStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("preliminary".equals(codeString)) + return new Enumeration(this, CompositionStatus.PRELIMINARY); + if ("final".equals(codeString)) + return new Enumeration(this, CompositionStatus.FINAL); + if ("amended".equals(codeString)) + return new Enumeration(this, CompositionStatus.AMENDED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, CompositionStatus.ENTEREDINERROR); + throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); + } + public String toCode(CompositionStatus code) { + if (code == CompositionStatus.PRELIMINARY) + return "preliminary"; + if (code == CompositionStatus.FINAL) + return "final"; + if (code == CompositionStatus.AMENDED) + return "amended"; + if (code == CompositionStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + public enum CompositionAttestationMode { + /** + * The person authenticated the content in their personal capacity. + */ + PERSONAL, + /** + * The person authenticated the content in their professional capacity. + */ + PROFESSIONAL, + /** + * The person authenticated the content and accepted legal responsibility for its content. + */ + LEGAL, + /** + * The organization authenticated the content as consistent with their policies and procedures. + */ + OFFICIAL, + /** + * added to help the parsers + */ + NULL; + public static CompositionAttestationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("personal".equals(codeString)) + return PERSONAL; + if ("professional".equals(codeString)) + return PROFESSIONAL; + if ("legal".equals(codeString)) + return LEGAL; + if ("official".equals(codeString)) + return OFFICIAL; + throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSONAL: return "personal"; + case PROFESSIONAL: return "professional"; + case LEGAL: return "legal"; + case OFFICIAL: return "official"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PERSONAL: return "http://hl7.org/fhir/composition-attestation-mode"; + case PROFESSIONAL: return "http://hl7.org/fhir/composition-attestation-mode"; + case LEGAL: return "http://hl7.org/fhir/composition-attestation-mode"; + case OFFICIAL: return "http://hl7.org/fhir/composition-attestation-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PERSONAL: return "The person authenticated the content in their personal capacity."; + case PROFESSIONAL: return "The person authenticated the content in their professional capacity."; + case LEGAL: return "The person authenticated the content and accepted legal responsibility for its content."; + case OFFICIAL: return "The organization authenticated the content as consistent with their policies and procedures."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSONAL: return "Personal"; + case PROFESSIONAL: return "Professional"; + case LEGAL: return "Legal"; + case OFFICIAL: return "Official"; + default: return "?"; + } + } + } + + public static class CompositionAttestationModeEnumFactory implements EnumFactory { + public CompositionAttestationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("personal".equals(codeString)) + return CompositionAttestationMode.PERSONAL; + if ("professional".equals(codeString)) + return CompositionAttestationMode.PROFESSIONAL; + if ("legal".equals(codeString)) + return CompositionAttestationMode.LEGAL; + if ("official".equals(codeString)) + return CompositionAttestationMode.OFFICIAL; + throw new IllegalArgumentException("Unknown CompositionAttestationMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("personal".equals(codeString)) + return new Enumeration(this, CompositionAttestationMode.PERSONAL); + if ("professional".equals(codeString)) + return new Enumeration(this, CompositionAttestationMode.PROFESSIONAL); + if ("legal".equals(codeString)) + return new Enumeration(this, CompositionAttestationMode.LEGAL); + if ("official".equals(codeString)) + return new Enumeration(this, CompositionAttestationMode.OFFICIAL); + throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); + } + public String toCode(CompositionAttestationMode code) { + if (code == CompositionAttestationMode.PERSONAL) + return "personal"; + if (code == CompositionAttestationMode.PROFESSIONAL) + return "professional"; + if (code == CompositionAttestationMode.LEGAL) + return "legal"; + if (code == CompositionAttestationMode.OFFICIAL) + return "official"; + return "?"; + } + } + + @Block() + public static class CompositionAttesterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of attestation the authenticator offers. + */ + @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="personal | professional | legal | official", formalDefinition="The type of attestation the authenticator offers." ) + protected List> mode; + + /** + * When composition was attested by the party. + */ + @Child(name = "time", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When composition attested", formalDefinition="When composition was attested by the party." ) + protected DateTimeType time; + + /** + * Who attested the composition in the specified way. + */ + @Child(name = "party", type = {Patient.class, Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who attested the composition", formalDefinition="Who attested the composition in the specified way." ) + protected Reference party; + + /** + * The actual object that is the target of the reference (Who attested the composition in the specified way.) + */ + protected Resource partyTarget; + + private static final long serialVersionUID = -436604745L; + + /* + * Constructor + */ + public CompositionAttesterComponent() { + super(); + } + + /** + * @return {@link #mode} (The type of attestation the authenticator offers.) + */ + public List> getMode() { + if (this.mode == null) + this.mode = new ArrayList>(); + return this.mode; + } + + public boolean hasMode() { + if (this.mode == null) + return false; + for (Enumeration item : this.mode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mode} (The type of attestation the authenticator offers.) + */ + // syntactic sugar + public Enumeration addModeElement() {//2 + Enumeration t = new Enumeration(new CompositionAttestationModeEnumFactory()); + if (this.mode == null) + this.mode = new ArrayList>(); + this.mode.add(t); + return t; + } + + /** + * @param value {@link #mode} (The type of attestation the authenticator offers.) + */ + public CompositionAttesterComponent addMode(CompositionAttestationMode value) { //1 + Enumeration t = new Enumeration(new CompositionAttestationModeEnumFactory()); + t.setValue(value); + if (this.mode == null) + this.mode = new ArrayList>(); + this.mode.add(t); + return this; + } + + /** + * @param value {@link #mode} (The type of attestation the authenticator offers.) + */ + public boolean hasMode(CompositionAttestationMode value) { + if (this.mode == null) + return false; + for (Enumeration v : this.mode) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #time} (When composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public DateTimeType getTimeElement() { + if (this.time == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompositionAttesterComponent.time"); + else if (Configuration.doAutoCreate()) + this.time = new DateTimeType(); // bb + return this.time; + } + + public boolean hasTimeElement() { + return this.time != null && !this.time.isEmpty(); + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (When composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public CompositionAttesterComponent setTimeElement(DateTimeType value) { + this.time = value; + return this; + } + + /** + * @return When composition was attested by the party. + */ + public Date getTime() { + return this.time == null ? null : this.time.getValue(); + } + + /** + * @param value When composition was attested by the party. + */ + public CompositionAttesterComponent setTime(Date value) { + if (value == null) + this.time = null; + else { + if (this.time == null) + this.time = new DateTimeType(); + this.time.setValue(value); + } + return this; + } + + /** + * @return {@link #party} (Who attested the composition in the specified way.) + */ + public Reference getParty() { + if (this.party == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompositionAttesterComponent.party"); + else if (Configuration.doAutoCreate()) + this.party = new Reference(); // cc + return this.party; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); + } + + /** + * @param value {@link #party} (Who attested the composition in the specified way.) + */ + public CompositionAttesterComponent setParty(Reference value) { + this.party = value; + return this; + } + + /** + * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who attested the composition in the specified way.) + */ + public Resource getPartyTarget() { + return this.partyTarget; + } + + /** + * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who attested the composition in the specified way.) + */ + public CompositionAttesterComponent setPartyTarget(Resource value) { + this.partyTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("mode", "code", "The type of attestation the authenticator offers.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("time", "dateTime", "When composition was attested by the party.", 0, java.lang.Integer.MAX_VALUE, time)); + childrenList.add(new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, java.lang.Integer.MAX_VALUE, party)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("mode")) + this.getMode().add(new CompositionAttestationModeEnumFactory().fromType(value)); + else if (name.equals("time")) + this.time = castToDateTime(value); // DateTimeType + else if (name.equals("party")) + this.party = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); + } + else if (name.equals("time")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.time"); + } + else if (name.equals("party")) { + this.party = new Reference(); + return this.party; + } + else + return super.addChild(name); + } + + public CompositionAttesterComponent copy() { + CompositionAttesterComponent dst = new CompositionAttesterComponent(); + copyValues(dst); + if (mode != null) { + dst.mode = new ArrayList>(); + for (Enumeration i : mode) + dst.mode.add(i.copy()); + }; + dst.time = time == null ? null : time.copy(); + dst.party = party == null ? null : party.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CompositionAttesterComponent)) + return false; + CompositionAttesterComponent o = (CompositionAttesterComponent) other; + return compareDeep(mode, o.mode, true) && compareDeep(time, o.time, true) && compareDeep(party, o.party, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CompositionAttesterComponent)) + return false; + CompositionAttesterComponent o = (CompositionAttesterComponent) other; + return compareValues(mode, o.mode, true) && compareValues(time, o.time, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (mode == null || mode.isEmpty()) && (time == null || time.isEmpty()) + && (party == null || party.isEmpty()); + } + + public String fhirType() { + return "Composition.attester"; + + } + + } + + @Block() + public static class CompositionEventComponent extends BackboneElement implements IBaseBackboneElement { + /** + * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Code(s) that apply to the event being documented", formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act." ) + protected List code; + + /** + * The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The period covered by the documentation", formalDefinition="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time." ) + protected Period period; + + /** + * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy. + */ + @Child(name = "detail", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The event(s) being documented", formalDefinition="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy." ) + protected List detail; + /** + * The actual objects that are the target of the reference (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) + */ + protected List detailTarget; + + + private static final long serialVersionUID = -1581379774L; + + /* + * Constructor + */ + public CompositionEventComponent() { + super(); + } + + /** + * @return {@link #code} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.) + */ + public List getCode() { + if (this.code == null) + this.code = new ArrayList(); + return this.code; + } + + public boolean hasCode() { + if (this.code == null) + return false; + for (CodeableConcept item : this.code) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #code} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.) + */ + // syntactic sugar + public CodeableConcept addCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return t; + } + + // syntactic sugar + public CompositionEventComponent addCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return this; + } + + /** + * @return {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompositionEventComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.) + */ + public CompositionEventComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #detail} (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (Reference item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) + */ + // syntactic sugar + public Reference addDetail() { //3 + Reference t = new Reference(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public CompositionEventComponent addDetail(Reference t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + /** + * @return {@link #detail} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) + */ + public List getDetailTarget() { + if (this.detailTarget == null) + this.detailTarget = new ArrayList(); + return this.detailTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("period", "Period", "The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.getCode().add(castToCodeableConcept(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("detail")) + this.getDetail().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + return addCode(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public CompositionEventComponent copy() { + CompositionEventComponent dst = new CompositionEventComponent(); + copyValues(dst); + if (code != null) { + dst.code = new ArrayList(); + for (CodeableConcept i : code) + dst.code.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + if (detail != null) { + dst.detail = new ArrayList(); + for (Reference i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CompositionEventComponent)) + return false; + CompositionEventComponent o = (CompositionEventComponent) other; + return compareDeep(code, o.code, true) && compareDeep(period, o.period, true) && compareDeep(detail, o.detail, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CompositionEventComponent)) + return false; + CompositionEventComponent o = (CompositionEventComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (period == null || period.isEmpty()) + && (detail == null || detail.isEmpty()); + } + + public String fhirType() { + return "Composition.event"; + + } + + } + + @Block() + public static class SectionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. + */ + @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Label for section (e.g. for ToC)", formalDefinition="The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents." ) + protected StringType title; + + /** + * A code identifying the kind of content contained within the section. This must be consistent with the section title. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Classification of section (recommended)", formalDefinition="A code identifying the kind of content contained within the section. This must be consistent with the section title." ) + protected CodeableConcept code; + + /** + * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. + */ + @Child(name = "text", type = {Narrative.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Text summary of the section, for human interpretation", formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative." ) + protected Narrative text; + + /** + * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + @Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="working | snapshot | changes", formalDefinition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) + protected CodeType mode; + + /** + * Specifies the order applied to the items in the section entries. + */ + @Child(name = "orderedBy", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Order of section entries", formalDefinition="Specifies the order applied to the items in the section entries." ) + protected CodeableConcept orderedBy; + + /** + * A reference to the actual resource from which the narrative in the section is derived. + */ + @Child(name = "entry", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A reference to data that supports this section", formalDefinition="A reference to the actual resource from which the narrative in the section is derived." ) + protected List entry; + /** + * The actual objects that are the target of the reference (A reference to the actual resource from which the narrative in the section is derived.) + */ + protected List entryTarget; + + + /** + * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason. + */ + @Child(name = "emptyReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why the section is empty", formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason." ) + protected CodeableConcept emptyReason; + + /** + * A nested sub-section within this section. + */ + @Child(name = "section", type = {SectionComponent.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested Section", formalDefinition="A nested sub-section within this section." ) + protected List section; + + private static final long serialVersionUID = -726390626L; + + /* + * Constructor + */ + public SectionComponent() { + super(); + } + + /** + * @return {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public SectionComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. + */ + public SectionComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.) + */ + public SectionComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.) + */ + public Narrative getText() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new Narrative(); // cc + return this.text; + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.) + */ + public SectionComponent setText(Narrative value) { + this.text = value; + return this; + } + + /** + * @return {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public CodeType getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new CodeType(); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public SectionComponent setModeElement(CodeType value) { + this.mode = value; + return this; + } + + /** + * @return How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + public String getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + public SectionComponent setMode(String value) { + if (Utilities.noString(value)) + this.mode = null; + else { + if (this.mode == null) + this.mode = new CodeType(); + this.mode.setValue(value); + } + return this; + } + + /** + * @return {@link #orderedBy} (Specifies the order applied to the items in the section entries.) + */ + public CodeableConcept getOrderedBy() { + if (this.orderedBy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.orderedBy"); + else if (Configuration.doAutoCreate()) + this.orderedBy = new CodeableConcept(); // cc + return this.orderedBy; + } + + public boolean hasOrderedBy() { + return this.orderedBy != null && !this.orderedBy.isEmpty(); + } + + /** + * @param value {@link #orderedBy} (Specifies the order applied to the items in the section entries.) + */ + public SectionComponent setOrderedBy(CodeableConcept value) { + this.orderedBy = value; + return this; + } + + /** + * @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.) + */ + public List getEntry() { + if (this.entry == null) + this.entry = new ArrayList(); + return this.entry; + } + + public boolean hasEntry() { + if (this.entry == null) + return false; + for (Reference item : this.entry) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.) + */ + // syntactic sugar + public Reference addEntry() { //3 + Reference t = new Reference(); + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return t; + } + + // syntactic sugar + public SectionComponent addEntry(Reference t) { //3 + if (t == null) + return this; + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return this; + } + + /** + * @return {@link #entry} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to the actual resource from which the narrative in the section is derived.) + */ + public List getEntryTarget() { + if (this.entryTarget == null) + this.entryTarget = new ArrayList(); + return this.entryTarget; + } + + /** + * @return {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) + */ + public CodeableConcept getEmptyReason() { + if (this.emptyReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SectionComponent.emptyReason"); + else if (Configuration.doAutoCreate()) + this.emptyReason = new CodeableConcept(); // cc + return this.emptyReason; + } + + public boolean hasEmptyReason() { + return this.emptyReason != null && !this.emptyReason.isEmpty(); + } + + /** + * @param value {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) + */ + public SectionComponent setEmptyReason(CodeableConcept value) { + this.emptyReason = value; + return this; + } + + /** + * @return {@link #section} (A nested sub-section within this section.) + */ + public List getSection() { + if (this.section == null) + this.section = new ArrayList(); + return this.section; + } + + public boolean hasSection() { + if (this.section == null) + return false; + for (SectionComponent item : this.section) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #section} (A nested sub-section within this section.) + */ + // syntactic sugar + public SectionComponent addSection() { //3 + SectionComponent t = new SectionComponent(); + if (this.section == null) + this.section = new ArrayList(); + this.section.add(t); + return t; + } + + // syntactic sugar + public SectionComponent addSection(SectionComponent t) { //3 + if (t == null) + return this; + if (this.section == null) + this.section = new ArrayList(); + this.section.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, java.lang.Integer.MAX_VALUE, orderedBy)); + childrenList.add(new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry)); + childrenList.add(new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, java.lang.Integer.MAX_VALUE, emptyReason)); + childrenList.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("text")) + this.text = castToNarrative(value); // Narrative + else if (name.equals("mode")) + this.mode = castToCode(value); // CodeType + else if (name.equals("orderedBy")) + this.orderedBy = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("entry")) + this.getEntry().add(castToReference(value)); + else if (name.equals("emptyReason")) + this.emptyReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("section")) + this.getSection().add((SectionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("text")) { + this.text = new Narrative(); + return this.text; + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); + } + else if (name.equals("orderedBy")) { + this.orderedBy = new CodeableConcept(); + return this.orderedBy; + } + else if (name.equals("entry")) { + return addEntry(); + } + else if (name.equals("emptyReason")) { + this.emptyReason = new CodeableConcept(); + return this.emptyReason; + } + else if (name.equals("section")) { + return addSection(); + } + else + return super.addChild(name); + } + + public SectionComponent copy() { + SectionComponent dst = new SectionComponent(); + copyValues(dst); + dst.title = title == null ? null : title.copy(); + dst.code = code == null ? null : code.copy(); + dst.text = text == null ? null : text.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.orderedBy = orderedBy == null ? null : orderedBy.copy(); + if (entry != null) { + dst.entry = new ArrayList(); + for (Reference i : entry) + dst.entry.add(i.copy()); + }; + dst.emptyReason = emptyReason == null ? null : emptyReason.copy(); + if (section != null) { + dst.section = new ArrayList(); + for (SectionComponent i : section) + dst.section.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SectionComponent)) + return false; + SectionComponent o = (SectionComponent) other; + return compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(text, o.text, true) + && compareDeep(mode, o.mode, true) && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(entry, o.entry, true) + && compareDeep(emptyReason, o.emptyReason, true) && compareDeep(section, o.section, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SectionComponent)) + return false; + SectionComponent o = (SectionComponent) other; + return compareValues(title, o.title, true) && compareValues(mode, o.mode, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (title == null || title.isEmpty()) && (code == null || code.isEmpty()) + && (text == null || text.isEmpty()) && (mode == null || mode.isEmpty()) && (orderedBy == null || orderedBy.isEmpty()) + && (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()) && (section == null || section.isEmpty()) + ; + } + + public String fhirType() { + return "Composition.section"; + + } + + } + + /** + * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier of composition (version-independent)", formalDefinition="Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time." ) + protected Identifier identifier; + + /** + * The composition editing time, when the composition was last logically changed by the author. + */ + @Child(name = "date", type = {DateTimeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." ) + protected DateTimeType date; + + /** + * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." ) + protected CodeableConcept type; + + /** + * A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type. + */ + @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." ) + protected CodeableConcept class_; + + /** + * Official human-readable label for the composition. + */ + @Child(name = "title", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." ) + protected StringType title; + + /** + * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. + */ + @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="preliminary | final | amended | entered-in-error", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." ) + protected Enumeration status; + + /** + * The code specifying the level of confidentiality of the Composition. + */ + @Child(name = "confidentiality", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="As defined by affinity domain", formalDefinition="The code specifying the level of confidentiality of the Composition." ) + protected CodeType confidentiality; + + /** + * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure). + */ + @Child(name = "subject", type = {}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) + */ + protected Resource subjectTarget; + + /** + * Identifies who is responsible for the information in the composition, not necessarily who typed it in. + */ + @Child(name = "author", type = {Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=8, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in." ) + protected List author; + /** + * The actual objects that are the target of the reference (Identifies who is responsible for the information in the composition, not necessarily who typed it in.) + */ + protected List authorTarget; + + + /** + * A participant who has attested to the accuracy of the composition/document. + */ + @Child(name = "attester", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." ) + protected List attester; + + /** + * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information. + */ + @Child(name = "custodian", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." ) + protected Reference custodian; + + /** + * The actual object that is the target of the reference (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) + */ + protected Organization custodianTarget; + + /** + * The clinical service, such as a colonoscopy or an appendectomy, being documented. + */ + @Child(name = "event", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." ) + protected List event; + + /** + * Describes the clinical encounter or type of care this documentation is associated with. + */ + @Child(name = "encounter", type = {Encounter.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Context of the Composition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (Describes the clinical encounter or type of care this documentation is associated with.) + */ + protected Encounter encounterTarget; + + /** + * The root of the sections that make up the composition. + */ + @Child(name = "section", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." ) + protected List section; + + private static final long serialVersionUID = 2127852326L; + + /* + * Constructor + */ + public Composition() { + super(); + } + + /* + * Constructor + */ + public Composition(DateTimeType date, CodeableConcept type, StringType title, Enumeration status, Reference subject) { + super(); + this.date = date; + this.type = type; + this.title = title; + this.status = status; + this.subject = subject; + } + + /** + * @return {@link #identifier} (Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.) + */ + public Composition setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Composition setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The composition editing time, when the composition was last logically changed by the author. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The composition editing time, when the composition was last logically changed by the author. + */ + public Composition setDate(Date value) { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + return this; + } + + /** + * @return {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.) + */ + public Composition setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #class_} (A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.) + */ + public CodeableConcept getClass_() { + if (this.class_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.class_"); + else if (Configuration.doAutoCreate()) + this.class_ = new CodeableConcept(); // cc + return this.class_; + } + + public boolean hasClass_() { + return this.class_ != null && !this.class_.isEmpty(); + } + + /** + * @param value {@link #class_} (A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.) + */ + public Composition setClass_(CodeableConcept value) { + this.class_ = value; + return this; + } + + /** + * @return {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public Composition setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return Official human-readable label for the composition. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value Official human-readable label for the composition. + */ + public Composition setTitle(String value) { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + return this; + } + + /** + * @return {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new CompositionStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Composition setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. + */ + public CompositionStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. + */ + public Composition setStatus(CompositionStatus value) { + if (this.status == null) + this.status = new Enumeration(new CompositionStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #confidentiality} (The code specifying the level of confidentiality of the Composition.). This is the underlying object with id, value and extensions. The accessor "getConfidentiality" gives direct access to the value + */ + public CodeType getConfidentialityElement() { + if (this.confidentiality == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.confidentiality"); + else if (Configuration.doAutoCreate()) + this.confidentiality = new CodeType(); // bb + return this.confidentiality; + } + + public boolean hasConfidentialityElement() { + return this.confidentiality != null && !this.confidentiality.isEmpty(); + } + + public boolean hasConfidentiality() { + return this.confidentiality != null && !this.confidentiality.isEmpty(); + } + + /** + * @param value {@link #confidentiality} (The code specifying the level of confidentiality of the Composition.). This is the underlying object with id, value and extensions. The accessor "getConfidentiality" gives direct access to the value + */ + public Composition setConfidentialityElement(CodeType value) { + this.confidentiality = value; + return this; + } + + /** + * @return The code specifying the level of confidentiality of the Composition. + */ + public String getConfidentiality() { + return this.confidentiality == null ? null : this.confidentiality.getValue(); + } + + /** + * @param value The code specifying the level of confidentiality of the Composition. + */ + public Composition setConfidentiality(String value) { + if (Utilities.noString(value)) + this.confidentiality = null; + else { + if (this.confidentiality == null) + this.confidentiality = new CodeType(); + this.confidentiality.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) + */ + public Composition setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) + */ + public Composition setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #author} (Identifies who is responsible for the information in the composition, not necessarily who typed it in.) + */ + public List getAuthor() { + if (this.author == null) + this.author = new ArrayList(); + return this.author; + } + + public boolean hasAuthor() { + if (this.author == null) + return false; + for (Reference item : this.author) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #author} (Identifies who is responsible for the information in the composition, not necessarily who typed it in.) + */ + // syntactic sugar + public Reference addAuthor() { //3 + Reference t = new Reference(); + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return t; + } + + // syntactic sugar + public Composition addAuthor(Reference t) { //3 + if (t == null) + return this; + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return this; + } + + /** + * @return {@link #author} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies who is responsible for the information in the composition, not necessarily who typed it in.) + */ + public List getAuthorTarget() { + if (this.authorTarget == null) + this.authorTarget = new ArrayList(); + return this.authorTarget; + } + + /** + * @return {@link #attester} (A participant who has attested to the accuracy of the composition/document.) + */ + public List getAttester() { + if (this.attester == null) + this.attester = new ArrayList(); + return this.attester; + } + + public boolean hasAttester() { + if (this.attester == null) + return false; + for (CompositionAttesterComponent item : this.attester) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #attester} (A participant who has attested to the accuracy of the composition/document.) + */ + // syntactic sugar + public CompositionAttesterComponent addAttester() { //3 + CompositionAttesterComponent t = new CompositionAttesterComponent(); + if (this.attester == null) + this.attester = new ArrayList(); + this.attester.add(t); + return t; + } + + // syntactic sugar + public Composition addAttester(CompositionAttesterComponent t) { //3 + if (t == null) + return this; + if (this.attester == null) + this.attester = new ArrayList(); + this.attester.add(t); + return this; + } + + /** + * @return {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) + */ + public Reference getCustodian() { + if (this.custodian == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.custodian"); + else if (Configuration.doAutoCreate()) + this.custodian = new Reference(); // cc + return this.custodian; + } + + public boolean hasCustodian() { + return this.custodian != null && !this.custodian.isEmpty(); + } + + /** + * @param value {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) + */ + public Composition setCustodian(Reference value) { + this.custodian = value; + return this; + } + + /** + * @return {@link #custodian} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) + */ + public Organization getCustodianTarget() { + if (this.custodianTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.custodian"); + else if (Configuration.doAutoCreate()) + this.custodianTarget = new Organization(); // aa + return this.custodianTarget; + } + + /** + * @param value {@link #custodian} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) + */ + public Composition setCustodianTarget(Organization value) { + this.custodianTarget = value; + return this; + } + + /** + * @return {@link #event} (The clinical service, such as a colonoscopy or an appendectomy, being documented.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (CompositionEventComponent item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (The clinical service, such as a colonoscopy or an appendectomy, being documented.) + */ + // syntactic sugar + public CompositionEventComponent addEvent() { //3 + CompositionEventComponent t = new CompositionEventComponent(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + // syntactic sugar + public Composition addEvent(CompositionEventComponent t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + /** + * @return {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.) + */ + public Composition setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the clinical encounter or type of care this documentation is associated with.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Composition.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the clinical encounter or type of care this documentation is associated with.) + */ + public Composition setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #section} (The root of the sections that make up the composition.) + */ + public List getSection() { + if (this.section == null) + this.section = new ArrayList(); + return this.section; + } + + public boolean hasSection() { + if (this.section == null) + return false; + for (SectionComponent item : this.section) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #section} (The root of the sections that make up the composition.) + */ + // syntactic sugar + public SectionComponent addSection() { //3 + SectionComponent t = new SectionComponent(); + if (this.section == null) + this.section = new ArrayList(); + this.section.add(t); + return t; + } + + // syntactic sugar + public Composition addSection(SectionComponent t) { //3 + if (t == null) + return this; + if (this.section == null) + this.section = new ArrayList(); + this.section.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("type", "CodeableConcept", "Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("class", "CodeableConcept", "A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, java.lang.Integer.MAX_VALUE, class_)); + childrenList.add(new Property("title", "string", "Official human-readable label for the composition.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("status", "code", "The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("confidentiality", "code", "The code specifying the level of confidentiality of the Composition.", 0, java.lang.Integer.MAX_VALUE, confidentiality)); + childrenList.add(new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("author", "Reference(Practitioner|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester)); + childrenList.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", 0, java.lang.Integer.MAX_VALUE, custodian)); + childrenList.add(new Property("event", "", "The clinical service, such as a colonoscopy or an appendectomy, being documented.", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("class")) + this.class_ = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("status")) + this.status = new CompositionStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("confidentiality")) + this.confidentiality = castToCode(value); // CodeType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("author")) + this.getAuthor().add(castToReference(value)); + else if (name.equals("attester")) + this.getAttester().add((CompositionAttesterComponent) value); + else if (name.equals("custodian")) + this.custodian = castToReference(value); // Reference + else if (name.equals("event")) + this.getEvent().add((CompositionEventComponent) value); + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("section")) + this.getSection().add((SectionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.date"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("class")) { + this.class_ = new CodeableConcept(); + return this.class_; + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.status"); + } + else if (name.equals("confidentiality")) { + throw new FHIRException("Cannot call addChild on a primitive type Composition.confidentiality"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("author")) { + return addAuthor(); + } + else if (name.equals("attester")) { + return addAttester(); + } + else if (name.equals("custodian")) { + this.custodian = new Reference(); + return this.custodian; + } + else if (name.equals("event")) { + return addEvent(); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("section")) { + return addSection(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Composition"; + + } + + public Composition copy() { + Composition dst = new Composition(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.date = date == null ? null : date.copy(); + dst.type = type == null ? null : type.copy(); + dst.class_ = class_ == null ? null : class_.copy(); + dst.title = title == null ? null : title.copy(); + dst.status = status == null ? null : status.copy(); + dst.confidentiality = confidentiality == null ? null : confidentiality.copy(); + dst.subject = subject == null ? null : subject.copy(); + if (author != null) { + dst.author = new ArrayList(); + for (Reference i : author) + dst.author.add(i.copy()); + }; + if (attester != null) { + dst.attester = new ArrayList(); + for (CompositionAttesterComponent i : attester) + dst.attester.add(i.copy()); + }; + dst.custodian = custodian == null ? null : custodian.copy(); + if (event != null) { + dst.event = new ArrayList(); + for (CompositionEventComponent i : event) + dst.event.add(i.copy()); + }; + dst.encounter = encounter == null ? null : encounter.copy(); + if (section != null) { + dst.section = new ArrayList(); + for (SectionComponent i : section) + dst.section.add(i.copy()); + }; + return dst; + } + + protected Composition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Composition)) + return false; + Composition o = (Composition) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(date, o.date, true) && compareDeep(type, o.type, true) + && compareDeep(class_, o.class_, true) && compareDeep(title, o.title, true) && compareDeep(status, o.status, true) + && compareDeep(confidentiality, o.confidentiality, true) && compareDeep(subject, o.subject, true) + && compareDeep(author, o.author, true) && compareDeep(attester, o.attester, true) && compareDeep(custodian, o.custodian, true) + && compareDeep(event, o.event, true) && compareDeep(encounter, o.encounter, true) && compareDeep(section, o.section, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Composition)) + return false; + Composition o = (Composition) other; + return compareValues(date, o.date, true) && compareValues(title, o.title, true) && compareValues(status, o.status, true) + && compareValues(confidentiality, o.confidentiality, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty()) + && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty()) && (title == null || title.isEmpty()) + && (status == null || status.isEmpty()) && (confidentiality == null || confidentiality.isEmpty()) + && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (attester == null || attester.isEmpty()) + && (custodian == null || custodian.isEmpty()) && (event == null || event.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (section == null || section.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Composition; + } + + @SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) + public static final String SP_CONFIDENTIALITY = "confidentiality"; + @SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) + public static final String SP_SECTION = "section"; + @SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" ) + public static final String SP_ATTESTER = "attester"; + @SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference" ) + public static final String SP_ENTRY = "entry"; + @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | amended | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ConceptMap.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ConceptMap.java new file mode 100644 index 00000000000..ff049130c93 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ConceptMap.java @@ -0,0 +1,2277 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ +@ResourceDef(name="ConceptMap", profile="http://hl7.org/fhir/Profile/ConceptMap") +public class ConceptMap extends DomainResource { + + @Block() + public static class ConceptMapContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the concept map. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the concept map." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public ConceptMapContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMapContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConceptMapContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the concept map. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the concept map. + */ + public ConceptMapContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ConceptMapContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the concept map.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ConceptMapContactComponent copy() { + ConceptMapContactComponent dst = new ConceptMapContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptMapContactComponent)) + return false; + ConceptMapContactComponent o = (ConceptMapContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptMapContactComponent)) + return false; + ConceptMapContactComponent o = (ConceptMapContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "ConceptMap.contact"; + + } + + } + + @Block() + public static class SourceElementComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). + */ + @Child(name = "codeSystem", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code System (if value set crosses code systems)", formalDefinition="An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system)." ) + protected UriType codeSystem; + + /** + * Identity (code or path) or the element/item being mapped. + */ + @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Identifies element being mapped", formalDefinition="Identity (code or path) or the element/item being mapped." ) + protected CodeType code; + + /** + * A concept from the target value set that this concept maps to. + */ + @Child(name = "target", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Concept in target system for element", formalDefinition="A concept from the target value set that this concept maps to." ) + protected List target; + + private static final long serialVersionUID = -458143877L; + + /* + * Constructor + */ + public SourceElementComponent() { + super(); + } + + /** + * @return {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public UriType getCodeSystemElement() { + if (this.codeSystem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SourceElementComponent.codeSystem"); + else if (Configuration.doAutoCreate()) + this.codeSystem = new UriType(); // bb + return this.codeSystem; + } + + public boolean hasCodeSystemElement() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + public boolean hasCodeSystem() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + /** + * @param value {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public SourceElementComponent setCodeSystemElement(UriType value) { + this.codeSystem = value; + return this; + } + + /** + * @return An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). + */ + public String getCodeSystem() { + return this.codeSystem == null ? null : this.codeSystem.getValue(); + } + + /** + * @param value An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). + */ + public SourceElementComponent setCodeSystem(String value) { + if (Utilities.noString(value)) + this.codeSystem = null; + else { + if (this.codeSystem == null) + this.codeSystem = new UriType(); + this.codeSystem.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (Identity (code or path) or the element/item being mapped.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SourceElementComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identity (code or path) or the element/item being mapped.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public SourceElementComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return Identity (code or path) or the element/item being mapped. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Identity (code or path) or the element/item being mapped. + */ + public SourceElementComponent setCode(String value) { + if (Utilities.noString(value)) + this.code = null; + else { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (A concept from the target value set that this concept maps to.) + */ + public List getTarget() { + if (this.target == null) + this.target = new ArrayList(); + return this.target; + } + + public boolean hasTarget() { + if (this.target == null) + return false; + for (TargetElementComponent item : this.target) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #target} (A concept from the target value set that this concept maps to.) + */ + // syntactic sugar + public TargetElementComponent addTarget() { //3 + TargetElementComponent t = new TargetElementComponent(); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return t; + } + + // syntactic sugar + public SourceElementComponent addTarget(TargetElementComponent t) { //3 + if (t == null) + return this; + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("codeSystem")) + this.codeSystem = castToUri(value); // UriType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("target")) + this.getTarget().add((TargetElementComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("codeSystem")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + } + else if (name.equals("target")) { + return addTarget(); + } + else + return super.addChild(name); + } + + public SourceElementComponent copy() { + SourceElementComponent dst = new SourceElementComponent(); + copyValues(dst); + dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.code = code == null ? null : code.copy(); + if (target != null) { + dst.target = new ArrayList(); + for (TargetElementComponent i : target) + dst.target.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SourceElementComponent)) + return false; + SourceElementComponent o = (SourceElementComponent) other; + return compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) && compareDeep(target, o.target, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SourceElementComponent)) + return false; + SourceElementComponent o = (SourceElementComponent) other; + return compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()) && (code == null || code.isEmpty()) + && (target == null || target.isEmpty()); + } + + public String fhirType() { + return "ConceptMap.element"; + + } + + } + + @Block() + public static class TargetElementComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). + */ + @Child(name = "codeSystem", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="System of the target (if necessary)", formalDefinition="An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems)." ) + protected UriType codeSystem; + + /** + * Identity (code or path) or the element/item that the map refers to. + */ + @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code that identifies the target element", formalDefinition="Identity (code or path) or the element/item that the map refers to." ) + protected CodeType code; + + /** + * The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source). + */ + @Child(name = "equivalence", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." ) + protected Enumeration equivalence; + + /** + * A description of status/issues in mapping that conveys additional information not represented in the structured data. + */ + @Child(name = "comments", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of status/issues in mapping", formalDefinition="A description of status/issues in mapping that conveys additional information not represented in the structured data." ) + protected StringType comments; + + /** + * A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value. + */ + @Child(name = "dependsOn", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Other elements required for this mapping (from context)", formalDefinition="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value." ) + protected List dependsOn; + + /** + * A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on. + */ + @Child(name = "product", type = {OtherElementComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." ) + protected List product; + + private static final long serialVersionUID = -804990059L; + + /* + * Constructor + */ + public TargetElementComponent() { + super(); + } + + /* + * Constructor + */ + public TargetElementComponent(Enumeration equivalence) { + super(); + this.equivalence = equivalence; + } + + /** + * @return {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public UriType getCodeSystemElement() { + if (this.codeSystem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TargetElementComponent.codeSystem"); + else if (Configuration.doAutoCreate()) + this.codeSystem = new UriType(); // bb + return this.codeSystem; + } + + public boolean hasCodeSystemElement() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + public boolean hasCodeSystem() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + /** + * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public TargetElementComponent setCodeSystemElement(UriType value) { + this.codeSystem = value; + return this; + } + + /** + * @return An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). + */ + public String getCodeSystem() { + return this.codeSystem == null ? null : this.codeSystem.getValue(); + } + + /** + * @param value An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). + */ + public TargetElementComponent setCodeSystem(String value) { + if (Utilities.noString(value)) + this.codeSystem = null; + else { + if (this.codeSystem == null) + this.codeSystem = new UriType(); + this.codeSystem.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (Identity (code or path) or the element/item that the map refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TargetElementComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identity (code or path) or the element/item that the map refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public TargetElementComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return Identity (code or path) or the element/item that the map refers to. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Identity (code or path) or the element/item that the map refers to. + */ + public TargetElementComponent setCode(String value) { + if (Utilities.noString(value)) + this.code = null; + else { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + } + return this; + } + + /** + * @return {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value + */ + public Enumeration getEquivalenceElement() { + if (this.equivalence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TargetElementComponent.equivalence"); + else if (Configuration.doAutoCreate()) + this.equivalence = new Enumeration(new ConceptMapEquivalenceEnumFactory()); // bb + return this.equivalence; + } + + public boolean hasEquivalenceElement() { + return this.equivalence != null && !this.equivalence.isEmpty(); + } + + public boolean hasEquivalence() { + return this.equivalence != null && !this.equivalence.isEmpty(); + } + + /** + * @param value {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value + */ + public TargetElementComponent setEquivalenceElement(Enumeration value) { + this.equivalence = value; + return this; + } + + /** + * @return The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source). + */ + public ConceptMapEquivalence getEquivalence() { + return this.equivalence == null ? null : this.equivalence.getValue(); + } + + /** + * @param value The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source). + */ + public TargetElementComponent setEquivalence(ConceptMapEquivalence value) { + if (this.equivalence == null) + this.equivalence = new Enumeration(new ConceptMapEquivalenceEnumFactory()); + this.equivalence.setValue(value); + return this; + } + + /** + * @return {@link #comments} (A description of status/issues in mapping that conveys additional information not represented in the structured data.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public StringType getCommentsElement() { + if (this.comments == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TargetElementComponent.comments"); + else if (Configuration.doAutoCreate()) + this.comments = new StringType(); // bb + return this.comments; + } + + public boolean hasCommentsElement() { + return this.comments != null && !this.comments.isEmpty(); + } + + public boolean hasComments() { + return this.comments != null && !this.comments.isEmpty(); + } + + /** + * @param value {@link #comments} (A description of status/issues in mapping that conveys additional information not represented in the structured data.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public TargetElementComponent setCommentsElement(StringType value) { + this.comments = value; + return this; + } + + /** + * @return A description of status/issues in mapping that conveys additional information not represented in the structured data. + */ + public String getComments() { + return this.comments == null ? null : this.comments.getValue(); + } + + /** + * @param value A description of status/issues in mapping that conveys additional information not represented in the structured data. + */ + public TargetElementComponent setComments(String value) { + if (Utilities.noString(value)) + this.comments = null; + else { + if (this.comments == null) + this.comments = new StringType(); + this.comments.setValue(value); + } + return this; + } + + /** + * @return {@link #dependsOn} (A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.) + */ + public List getDependsOn() { + if (this.dependsOn == null) + this.dependsOn = new ArrayList(); + return this.dependsOn; + } + + public boolean hasDependsOn() { + if (this.dependsOn == null) + return false; + for (OtherElementComponent item : this.dependsOn) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dependsOn} (A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.) + */ + // syntactic sugar + public OtherElementComponent addDependsOn() { //3 + OtherElementComponent t = new OtherElementComponent(); + if (this.dependsOn == null) + this.dependsOn = new ArrayList(); + this.dependsOn.add(t); + return t; + } + + // syntactic sugar + public TargetElementComponent addDependsOn(OtherElementComponent t) { //3 + if (t == null) + return this; + if (this.dependsOn == null) + this.dependsOn = new ArrayList(); + this.dependsOn.add(t); + return this; + } + + /** + * @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.) + */ + public List getProduct() { + if (this.product == null) + this.product = new ArrayList(); + return this.product; + } + + public boolean hasProduct() { + if (this.product == null) + return false; + for (OtherElementComponent item : this.product) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.) + */ + // syntactic sugar + public OtherElementComponent addProduct() { //3 + OtherElementComponent t = new OtherElementComponent(); + if (this.product == null) + this.product = new ArrayList(); + this.product.add(t); + return t; + } + + // syntactic sugar + public TargetElementComponent addProduct(OtherElementComponent t) { //3 + if (t == null) + return this; + if (this.product == null) + this.product = new ArrayList(); + this.product.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, java.lang.Integer.MAX_VALUE, equivalence)); + childrenList.add(new Property("comments", "string", "A description of status/issues in mapping that conveys additional information not represented in the structured data.", 0, java.lang.Integer.MAX_VALUE, comments)); + childrenList.add(new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn)); + childrenList.add(new Property("product", "@ConceptMap.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("codeSystem")) + this.codeSystem = castToUri(value); // UriType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("equivalence")) + this.equivalence = new ConceptMapEquivalenceEnumFactory().fromType(value); // Enumeration + else if (name.equals("comments")) + this.comments = castToString(value); // StringType + else if (name.equals("dependsOn")) + this.getDependsOn().add((OtherElementComponent) value); + else if (name.equals("product")) + this.getProduct().add((OtherElementComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("codeSystem")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + } + else if (name.equals("equivalence")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.equivalence"); + } + else if (name.equals("comments")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.comments"); + } + else if (name.equals("dependsOn")) { + return addDependsOn(); + } + else if (name.equals("product")) { + return addProduct(); + } + else + return super.addChild(name); + } + + public TargetElementComponent copy() { + TargetElementComponent dst = new TargetElementComponent(); + copyValues(dst); + dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.code = code == null ? null : code.copy(); + dst.equivalence = equivalence == null ? null : equivalence.copy(); + dst.comments = comments == null ? null : comments.copy(); + if (dependsOn != null) { + dst.dependsOn = new ArrayList(); + for (OtherElementComponent i : dependsOn) + dst.dependsOn.add(i.copy()); + }; + if (product != null) { + dst.product = new ArrayList(); + for (OtherElementComponent i : product) + dst.product.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TargetElementComponent)) + return false; + TargetElementComponent o = (TargetElementComponent) other; + return compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) && compareDeep(equivalence, o.equivalence, true) + && compareDeep(comments, o.comments, true) && compareDeep(dependsOn, o.dependsOn, true) && compareDeep(product, o.product, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TargetElementComponent)) + return false; + TargetElementComponent o = (TargetElementComponent) other; + return compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true) && compareValues(equivalence, o.equivalence, true) + && compareValues(comments, o.comments, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()) && (code == null || code.isEmpty()) + && (equivalence == null || equivalence.isEmpty()) && (comments == null || comments.isEmpty()) + && (dependsOn == null || dependsOn.isEmpty()) && (product == null || product.isEmpty()); + } + + public String fhirType() { + return "ConceptMap.element.target"; + + } + + } + + @Block() + public static class OtherElementComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition. + */ + @Child(name = "element", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reference to element/field/ValueSet mapping depends on", formalDefinition="A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition." ) + protected UriType element; + + /** + * An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). + */ + @Child(name = "codeSystem", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code System (if necessary)", formalDefinition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)." ) + protected UriType codeSystem; + + /** + * Identity (code or path) or the element/item/ValueSet that the map depends on / refers to. + */ + @Child(name = "code", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value of the referenced element", formalDefinition="Identity (code or path) or the element/item/ValueSet that the map depends on / refers to." ) + protected StringType code; + + private static final long serialVersionUID = 1488522448L; + + /* + * Constructor + */ + public OtherElementComponent() { + super(); + } + + /* + * Constructor + */ + public OtherElementComponent(UriType element, UriType codeSystem, StringType code) { + super(); + this.element = element; + this.codeSystem = codeSystem; + this.code = code; + } + + /** + * @return {@link #element} (A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public UriType getElementElement() { + if (this.element == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OtherElementComponent.element"); + else if (Configuration.doAutoCreate()) + this.element = new UriType(); // bb + return this.element; + } + + public boolean hasElementElement() { + return this.element != null && !this.element.isEmpty(); + } + + public boolean hasElement() { + return this.element != null && !this.element.isEmpty(); + } + + /** + * @param value {@link #element} (A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public OtherElementComponent setElementElement(UriType value) { + this.element = value; + return this; + } + + /** + * @return A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition. + */ + public String getElement() { + return this.element == null ? null : this.element.getValue(); + } + + /** + * @param value A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition. + */ + public OtherElementComponent setElement(String value) { + if (this.element == null) + this.element = new UriType(); + this.element.setValue(value); + return this; + } + + /** + * @return {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public UriType getCodeSystemElement() { + if (this.codeSystem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OtherElementComponent.codeSystem"); + else if (Configuration.doAutoCreate()) + this.codeSystem = new UriType(); // bb + return this.codeSystem; + } + + public boolean hasCodeSystemElement() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + public boolean hasCodeSystem() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + /** + * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + */ + public OtherElementComponent setCodeSystemElement(UriType value) { + this.codeSystem = value; + return this; + } + + /** + * @return An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). + */ + public String getCodeSystem() { + return this.codeSystem == null ? null : this.codeSystem.getValue(); + } + + /** + * @param value An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). + */ + public OtherElementComponent setCodeSystem(String value) { + if (this.codeSystem == null) + this.codeSystem = new UriType(); + this.codeSystem.setValue(value); + return this; + } + + /** + * @return {@link #code} (Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public StringType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OtherElementComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new StringType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public OtherElementComponent setCodeElement(StringType value) { + this.code = value; + return this; + } + + /** + * @return Identity (code or path) or the element/item/ValueSet that the map depends on / refers to. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Identity (code or path) or the element/item/ValueSet that the map depends on / refers to. + */ + public OtherElementComponent setCode(String value) { + if (this.code == null) + this.code = new StringType(); + this.code.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("element", "uri", "A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.", 0, java.lang.Integer.MAX_VALUE, element)); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("element")) + this.element = castToUri(value); // UriType + else if (name.equals("codeSystem")) + this.codeSystem = castToUri(value); // UriType + else if (name.equals("code")) + this.code = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("element")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.element"); + } + else if (name.equals("codeSystem")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + } + else + return super.addChild(name); + } + + public OtherElementComponent copy() { + OtherElementComponent dst = new OtherElementComponent(); + copyValues(dst); + dst.element = element == null ? null : element.copy(); + dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OtherElementComponent)) + return false; + OtherElementComponent o = (OtherElementComponent) other; + return compareDeep(element, o.element, true) && compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OtherElementComponent)) + return false; + OtherElementComponent o = (OtherElementComponent) other; + return compareValues(element, o.element, true) && compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (element == null || element.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) + && (code == null || code.isEmpty()); + } + + public String fhirType() { + return "ConceptMap.element.target.dependsOn"; + + } + + } + + /** + * An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Globally unique logical id for concept map", formalDefinition="An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional identifier for the concept map", formalDefinition="Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected Identifier identifier; + + /** + * The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the concept map", formalDefinition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) + protected StringType version; + + /** + * A free text natural language name describing the concept map. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." ) + protected StringType name; + + /** + * The status of the concept map. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." ) + protected Enumeration status; + + /** + * This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the concept map. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for given status", formalDefinition="The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances." ) + protected List useContext; + + /** + * Explains why this concept map is needed and why it has been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why needed", formalDefinition="Explains why this concept map is needed and why it has been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the concept map and/or its contents. + */ + @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents." ) + protected StringType copyright; + + /** + * The source value set that specifies the concepts that are being mapped. + */ + @Child(name = "source", type = {UriType.class, ValueSet.class, StructureDefinition.class}, order=13, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." ) + protected Type source; + + /** + * The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made. + */ + @Child(name = "target", type = {UriType.class, ValueSet.class, StructureDefinition.class}, order=14, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." ) + protected Type target; + + /** + * Mappings for an individual concept in the source to one or more concepts in the target. + */ + @Child(name = "element", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." ) + protected List element; + + private static final long serialVersionUID = 1687563642L; + + /* + * Constructor + */ + public ConceptMap() { + super(); + } + + /* + * Constructor + */ + public ConceptMap(Enumeration status, Type source, Type target) { + super(); + this.status = status; + this.source = source; + this.target = target; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ConceptMap setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. + */ + public ConceptMap setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public ConceptMap setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ConceptMap setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public ConceptMap setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name describing the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name describing the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConceptMap setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name describing the concept map. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name describing the concept map. + */ + public ConceptMap setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ConceptMap setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the concept map. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the concept map. + */ + public ConceptMap setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ConceptMap setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public ConceptMap setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public ConceptMap setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the concept map. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the concept map. + */ + public ConceptMap setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ConceptMapContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ConceptMapContactComponent addContact() { //3 + ConceptMapContactComponent t = new ConceptMapContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ConceptMap addContact(ConceptMapContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ConceptMap setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes. + */ + public ConceptMap setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ConceptMap setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. + */ + public ConceptMap setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public ConceptMap addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #requirements} (Explains why this concept map is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this concept map is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public ConceptMap setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this concept map is needed and why it has been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this concept map is needed and why it has been constrained as it has. + */ + public ConceptMap setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the concept map and/or its contents.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the concept map and/or its contents.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public ConceptMap setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the concept map and/or its contents. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the concept map and/or its contents. + */ + public ConceptMap setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #source} (The source value set that specifies the concepts that are being mapped.) + */ + public Type getSource() { + return this.source; + } + + /** + * @return {@link #source} (The source value set that specifies the concepts that are being mapped.) + */ + public UriType getSourceUriType() throws FHIRException { + if (!(this.source instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered"); + return (UriType) this.source; + } + + public boolean hasSourceUriType() { + return this.source instanceof UriType; + } + + /** + * @return {@link #source} (The source value set that specifies the concepts that are being mapped.) + */ + public Reference getSourceReference() throws FHIRException { + if (!(this.source instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.source.getClass().getName()+" was encountered"); + return (Reference) this.source; + } + + public boolean hasSourceReference() { + return this.source instanceof Reference; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The source value set that specifies the concepts that are being mapped.) + */ + public ConceptMap setSource(Type value) { + this.source = value; + return this; + } + + /** + * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.) + */ + public Type getTarget() { + return this.target; + } + + /** + * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.) + */ + public UriType getTargetUriType() throws FHIRException { + if (!(this.target instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.target.getClass().getName()+" was encountered"); + return (UriType) this.target; + } + + public boolean hasTargetUriType() { + return this.target instanceof UriType; + } + + /** + * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.) + */ + public Reference getTargetReference() throws FHIRException { + if (!(this.target instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Reference) this.target; + } + + public boolean hasTargetReference() { + return this.target instanceof Reference; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.) + */ + public ConceptMap setTarget(Type value) { + this.target = value; + return this; + } + + /** + * @return {@link #element} (Mappings for an individual concept in the source to one or more concepts in the target.) + */ + public List getElement() { + if (this.element == null) + this.element = new ArrayList(); + return this.element; + } + + public boolean hasElement() { + if (this.element == null) + return false; + for (SourceElementComponent item : this.element) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #element} (Mappings for an individual concept in the source to one or more concepts in the target.) + */ + // syntactic sugar + public SourceElementComponent addElement() { //3 + SourceElementComponent t = new SourceElementComponent(); + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return t; + } + + // syntactic sugar + public ConceptMap addElement(SourceElementComponent t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name describing the concept map.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the concept map.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the concept map.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("requirements", "string", "Explains why this concept map is needed and why it has been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the concept map and/or its contents.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("source[x]", "uri|Reference(ValueSet|StructureDefinition)", "The source value set that specifies the concepts that are being mapped.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("target[x]", "uri|Reference(ValueSet|StructureDefinition)", "The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ConceptMapContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("source[x]")) + this.source = (Type) value; // Type + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("element")) + this.getElement().add((SourceElementComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.url"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.copyright"); + } + else if (name.equals("sourceUri")) { + this.source = new UriType(); + return this.source; + } + else if (name.equals("sourceReference")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("targetUri")) { + this.target = new UriType(); + return this.target; + } + else if (name.equals("targetReference")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("element")) { + return addElement(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ConceptMap"; + + } + + public ConceptMap copy() { + ConceptMap dst = new ConceptMap(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ConceptMapContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + dst.source = source == null ? null : source.copy(); + dst.target = target == null ? null : target.copy(); + if (element != null) { + dst.element = new ArrayList(); + for (SourceElementComponent i : element) + dst.element.add(i.copy()); + }; + return dst; + } + + protected ConceptMap typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptMap)) + return false; + ConceptMap o = (ConceptMap) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(element, o.element, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptMap)) + return false; + ConceptMap o = (ConceptMap) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) + && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty()) + && (element == null || element.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ConceptMap; + } + + @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="Additional identifier for the concept map", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="product", path="ConceptMap.element.target.product.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" ) + public static final String SP_PRODUCT = "product"; + @SearchParamDefinition(name="dependson", path="ConceptMap.element.target.dependsOn.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" ) + public static final String SP_DEPENDSON = "dependson"; + @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="targetsystem", path="ConceptMap.element.target.codeSystem", description="System of the target (if necessary)", type="uri" ) + public static final String SP_TARGETSYSTEM = "targetsystem"; + @SearchParamDefinition(name="source", path="ConceptMap.sourceReference", description="Identifies the source of the concepts which are being mapped", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="sourcesystem", path="ConceptMap.element.codeSystem", description="Code System (if value set crosses code systems)", type="uri" ) + public static final String SP_SOURCESYSTEM = "sourcesystem"; + @SearchParamDefinition(name="url", path="ConceptMap.url", description="The URL of the concept map", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) + public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="sourcecode", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" ) + public static final String SP_SOURCECODE = "sourcecode"; + @SearchParamDefinition(name="sourceuri", path="ConceptMap.sourceUri", description="Identifies the source of the concepts which are being mapped", type="reference" ) + public static final String SP_SOURCEURI = "sourceuri"; + @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="targetcode", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token" ) + public static final String SP_TARGETCODE = "targetcode"; + @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Condition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Condition.java new file mode 100644 index 00000000000..99e6de8b32a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Condition.java @@ -0,0 +1,1685 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. + */ +@ResourceDef(name="Condition", profile="http://hl7.org/fhir/Profile/Condition") +public class Condition extends DomainResource { + + public enum ConditionVerificationStatus { + /** + * This is a tentative diagnosis - still a candidate that is under consideration. + */ + PROVISIONAL, + /** + * One of a set of potential (and typically mutually exclusive) diagnosis asserted to further guide the diagnostic process and preliminary treatment. + */ + DIFFERENTIAL, + /** + * There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition. + */ + CONFIRMED, + /** + * This condition has been ruled out by diagnostic and clinical evidence. + */ + REFUTED, + /** + * The statement was entered in error and is not valid. + */ + ENTEREDINERROR, + /** + * The condition status is unknown. Note that "unknown" is a value of last resort and every attempt should be made to provide a meaningful value other than "unknown". + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ConditionVerificationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("provisional".equals(codeString)) + return PROVISIONAL; + if ("differential".equals(codeString)) + return DIFFERENTIAL; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ConditionVerificationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROVISIONAL: return "provisional"; + case DIFFERENTIAL: return "differential"; + case CONFIRMED: return "confirmed"; + case REFUTED: return "refuted"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROVISIONAL: return "http://hl7.org/fhir/condition-ver-status"; + case DIFFERENTIAL: return "http://hl7.org/fhir/condition-ver-status"; + case CONFIRMED: return "http://hl7.org/fhir/condition-ver-status"; + case REFUTED: return "http://hl7.org/fhir/condition-ver-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/condition-ver-status"; + case UNKNOWN: return "http://hl7.org/fhir/condition-ver-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROVISIONAL: return "This is a tentative diagnosis - still a candidate that is under consideration."; + case DIFFERENTIAL: return "One of a set of potential (and typically mutually exclusive) diagnosis asserted to further guide the diagnostic process and preliminary treatment."; + case CONFIRMED: return "There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition."; + case REFUTED: return "This condition has been ruled out by diagnostic and clinical evidence."; + case ENTEREDINERROR: return "The statement was entered in error and is not valid."; + case UNKNOWN: return "The condition status is unknown. Note that \"unknown\" is a value of last resort and every attempt should be made to provide a meaningful value other than \"unknown\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROVISIONAL: return "Provisional"; + case DIFFERENTIAL: return "Differential"; + case CONFIRMED: return "Confirmed"; + case REFUTED: return "Refuted"; + case ENTEREDINERROR: return "Entered In Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + } + + public static class ConditionVerificationStatusEnumFactory implements EnumFactory { + public ConditionVerificationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("provisional".equals(codeString)) + return ConditionVerificationStatus.PROVISIONAL; + if ("differential".equals(codeString)) + return ConditionVerificationStatus.DIFFERENTIAL; + if ("confirmed".equals(codeString)) + return ConditionVerificationStatus.CONFIRMED; + if ("refuted".equals(codeString)) + return ConditionVerificationStatus.REFUTED; + if ("entered-in-error".equals(codeString)) + return ConditionVerificationStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return ConditionVerificationStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ConditionVerificationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("provisional".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.PROVISIONAL); + if ("differential".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.DIFFERENTIAL); + if ("confirmed".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.CONFIRMED); + if ("refuted".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.REFUTED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.ENTEREDINERROR); + if ("unknown".equals(codeString)) + return new Enumeration(this, ConditionVerificationStatus.UNKNOWN); + throw new FHIRException("Unknown ConditionVerificationStatus code '"+codeString+"'"); + } + public String toCode(ConditionVerificationStatus code) { + if (code == ConditionVerificationStatus.PROVISIONAL) + return "provisional"; + if (code == ConditionVerificationStatus.DIFFERENTIAL) + return "differential"; + if (code == ConditionVerificationStatus.CONFIRMED) + return "confirmed"; + if (code == ConditionVerificationStatus.REFUTED) + return "refuted"; + if (code == ConditionVerificationStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ConditionVerificationStatus.UNKNOWN) + return "unknown"; + return "?"; + } + } + + @Block() + public static class ConditionStageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific. + */ + @Child(name = "summary", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Simple summary (disease specific)", formalDefinition="A simple summary of the stage such as \"Stage 3\". The determination of the stage is disease-specific." ) + protected CodeableConcept summary; + + /** + * Reference to a formal record of the evidence on which the staging assessment is based. + */ + @Child(name = "assessment", type = {ClinicalImpression.class, DiagnosticReport.class, Observation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Formal record of assessment", formalDefinition="Reference to a formal record of the evidence on which the staging assessment is based." ) + protected List assessment; + /** + * The actual objects that are the target of the reference (Reference to a formal record of the evidence on which the staging assessment is based.) + */ + protected List assessmentTarget; + + + private static final long serialVersionUID = -1961530405L; + + /* + * Constructor + */ + public ConditionStageComponent() { + super(); + } + + /** + * @return {@link #summary} (A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.) + */ + public CodeableConcept getSummary() { + if (this.summary == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConditionStageComponent.summary"); + else if (Configuration.doAutoCreate()) + this.summary = new CodeableConcept(); // cc + return this.summary; + } + + public boolean hasSummary() { + return this.summary != null && !this.summary.isEmpty(); + } + + /** + * @param value {@link #summary} (A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.) + */ + public ConditionStageComponent setSummary(CodeableConcept value) { + this.summary = value; + return this; + } + + /** + * @return {@link #assessment} (Reference to a formal record of the evidence on which the staging assessment is based.) + */ + public List getAssessment() { + if (this.assessment == null) + this.assessment = new ArrayList(); + return this.assessment; + } + + public boolean hasAssessment() { + if (this.assessment == null) + return false; + for (Reference item : this.assessment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #assessment} (Reference to a formal record of the evidence on which the staging assessment is based.) + */ + // syntactic sugar + public Reference addAssessment() { //3 + Reference t = new Reference(); + if (this.assessment == null) + this.assessment = new ArrayList(); + this.assessment.add(t); + return t; + } + + // syntactic sugar + public ConditionStageComponent addAssessment(Reference t) { //3 + if (t == null) + return this; + if (this.assessment == null) + this.assessment = new ArrayList(); + this.assessment.add(t); + return this; + } + + /** + * @return {@link #assessment} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Reference to a formal record of the evidence on which the staging assessment is based.) + */ + public List getAssessmentTarget() { + if (this.assessmentTarget == null) + this.assessmentTarget = new ArrayList(); + return this.assessmentTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("summary", "CodeableConcept", "A simple summary of the stage such as \"Stage 3\". The determination of the stage is disease-specific.", 0, java.lang.Integer.MAX_VALUE, summary)); + childrenList.add(new Property("assessment", "Reference(ClinicalImpression|DiagnosticReport|Observation)", "Reference to a formal record of the evidence on which the staging assessment is based.", 0, java.lang.Integer.MAX_VALUE, assessment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("summary")) + this.summary = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("assessment")) + this.getAssessment().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("summary")) { + this.summary = new CodeableConcept(); + return this.summary; + } + else if (name.equals("assessment")) { + return addAssessment(); + } + else + return super.addChild(name); + } + + public ConditionStageComponent copy() { + ConditionStageComponent dst = new ConditionStageComponent(); + copyValues(dst); + dst.summary = summary == null ? null : summary.copy(); + if (assessment != null) { + dst.assessment = new ArrayList(); + for (Reference i : assessment) + dst.assessment.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConditionStageComponent)) + return false; + ConditionStageComponent o = (ConditionStageComponent) other; + return compareDeep(summary, o.summary, true) && compareDeep(assessment, o.assessment, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConditionStageComponent)) + return false; + ConditionStageComponent o = (ConditionStageComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (summary == null || summary.isEmpty()) && (assessment == null || assessment.isEmpty()) + ; + } + + public String fhirType() { + return "Condition.stage"; + + } + + } + + @Block() + public static class ConditionEvidenceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A manifestation or symptom that led to the recording of this condition. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Manifestation/symptom", formalDefinition="A manifestation or symptom that led to the recording of this condition." ) + protected CodeableConcept code; + + /** + * Links to other relevant information, including pathology reports. + */ + @Child(name = "detail", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supporting information found elsewhere", formalDefinition="Links to other relevant information, including pathology reports." ) + protected List detail; + /** + * The actual objects that are the target of the reference (Links to other relevant information, including pathology reports.) + */ + protected List detailTarget; + + + private static final long serialVersionUID = 945689926L; + + /* + * Constructor + */ + public ConditionEvidenceComponent() { + super(); + } + + /** + * @return {@link #code} (A manifestation or symptom that led to the recording of this condition.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConditionEvidenceComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A manifestation or symptom that led to the recording of this condition.) + */ + public ConditionEvidenceComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #detail} (Links to other relevant information, including pathology reports.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (Reference item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (Links to other relevant information, including pathology reports.) + */ + // syntactic sugar + public Reference addDetail() { //3 + Reference t = new Reference(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public ConditionEvidenceComponent addDetail(Reference t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + /** + * @return {@link #detail} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Links to other relevant information, including pathology reports.) + */ + public List getDetailTarget() { + if (this.detailTarget == null) + this.detailTarget = new ArrayList(); + return this.detailTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "A manifestation or symptom that led to the recording of this condition.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("detail", "Reference(Any)", "Links to other relevant information, including pathology reports.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("detail")) + this.getDetail().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public ConditionEvidenceComponent copy() { + ConditionEvidenceComponent dst = new ConditionEvidenceComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + if (detail != null) { + dst.detail = new ArrayList(); + for (Reference i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConditionEvidenceComponent)) + return false; + ConditionEvidenceComponent o = (ConditionEvidenceComponent) other; + return compareDeep(code, o.code, true) && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConditionEvidenceComponent)) + return false; + ConditionEvidenceComponent o = (ConditionEvidenceComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (detail == null || detail.isEmpty()) + ; + } + + public String fhirType() { + return "Condition.evidence"; + + } + + } + + /** + * This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this condition", formalDefinition="This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * Indicates the patient who the condition record is associated with. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who has the condition?", formalDefinition="Indicates the patient who the condition record is associated with." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Indicates the patient who the condition record is associated with.) + */ + protected Patient patientTarget; + + /** + * Encounter during which the condition was first asserted. + */ + @Child(name = "encounter", type = {Encounter.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter when condition first asserted", formalDefinition="Encounter during which the condition was first asserted." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (Encounter during which the condition was first asserted.) + */ + protected Encounter encounterTarget; + + /** + * Individual who is making the condition statement. + */ + @Child(name = "asserter", type = {Practitioner.class, Patient.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Person who asserts this condition", formalDefinition="Individual who is making the condition statement." ) + protected Reference asserter; + + /** + * The actual object that is the target of the reference (Individual who is making the condition statement.) + */ + protected Resource asserterTarget; + + /** + * A date, when the Condition statement was documented. + */ + @Child(name = "dateRecorded", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When first entered", formalDefinition="A date, when the Condition statement was documented." ) + protected DateType dateRecorded; + + /** + * Identification of the condition, problem or diagnosis. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." ) + protected CodeableConcept code; + + /** + * A category assigned to the condition. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complaint | symptom | finding | diagnosis", formalDefinition="A category assigned to the condition." ) + protected CodeableConcept category; + + /** + * The clinical status of the condition. + */ + @Child(name = "clinicalStatus", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | relapse | remission | resolved", formalDefinition="The clinical status of the condition." ) + protected CodeType clinicalStatus; + + /** + * The verification status to support the clinical status of the condition. + */ + @Child(name = "verificationStatus", type = {CodeType.class}, order=8, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="provisional | differential | confirmed | refuted | entered-in-error | unknown", formalDefinition="The verification status to support the clinical status of the condition." ) + protected Enumeration verificationStatus; + + /** + * A subjective assessment of the severity of the condition as evaluated by the clinician. + */ + @Child(name = "severity", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." ) + protected CodeableConcept severity; + + /** + * Estimated or actual date or date-time the condition began, in the opinion of the clinician. + */ + @Child(name = "onset", type = {DateTimeType.class, Age.class, Period.class, Range.class, StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Estimated or actual date, date-time, or age", formalDefinition="Estimated or actual date or date-time the condition began, in the opinion of the clinician." ) + protected Type onset; + + /** + * The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate. + */ + @Child(name = "abatement", type = {DateTimeType.class, Age.class, BooleanType.class, Period.class, Range.class, StringType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If/when in resolution/remission", formalDefinition="The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate." ) + protected Type abatement; + + /** + * Clinical stage or grade of a condition. May include formal severity assessments. + */ + @Child(name = "stage", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." ) + protected ConditionStageComponent stage; + + /** + * Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed. + */ + @Child(name = "evidence", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supporting evidence", formalDefinition="Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed." ) + protected List evidence; + + /** + * The anatomical location where this condition manifests itself. + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." ) + protected List bodySite; + + /** + * Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. + */ + @Child(name = "notes", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." ) + protected StringType notes; + + private static final long serialVersionUID = -341227215L; + + /* + * Constructor + */ + public Condition() { + super(); + } + + /* + * Constructor + */ + public Condition(Reference patient, CodeableConcept code, Enumeration verificationStatus) { + super(); + this.patient = patient; + this.code = code; + this.verificationStatus = verificationStatus; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Condition addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (Indicates the patient who the condition record is associated with.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (Indicates the patient who the condition record is associated with.) + */ + public Condition setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the patient who the condition record is associated with.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the patient who the condition record is associated with.) + */ + public Condition setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #encounter} (Encounter during which the condition was first asserted.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (Encounter during which the condition was first asserted.) + */ + public Condition setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Encounter during which the condition was first asserted.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Encounter during which the condition was first asserted.) + */ + public Condition setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #asserter} (Individual who is making the condition statement.) + */ + public Reference getAsserter() { + if (this.asserter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.asserter"); + else if (Configuration.doAutoCreate()) + this.asserter = new Reference(); // cc + return this.asserter; + } + + public boolean hasAsserter() { + return this.asserter != null && !this.asserter.isEmpty(); + } + + /** + * @param value {@link #asserter} (Individual who is making the condition statement.) + */ + public Condition setAsserter(Reference value) { + this.asserter = value; + return this; + } + + /** + * @return {@link #asserter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual who is making the condition statement.) + */ + public Resource getAsserterTarget() { + return this.asserterTarget; + } + + /** + * @param value {@link #asserter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual who is making the condition statement.) + */ + public Condition setAsserterTarget(Resource value) { + this.asserterTarget = value; + return this; + } + + /** + * @return {@link #dateRecorded} (A date, when the Condition statement was documented.). This is the underlying object with id, value and extensions. The accessor "getDateRecorded" gives direct access to the value + */ + public DateType getDateRecordedElement() { + if (this.dateRecorded == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.dateRecorded"); + else if (Configuration.doAutoCreate()) + this.dateRecorded = new DateType(); // bb + return this.dateRecorded; + } + + public boolean hasDateRecordedElement() { + return this.dateRecorded != null && !this.dateRecorded.isEmpty(); + } + + public boolean hasDateRecorded() { + return this.dateRecorded != null && !this.dateRecorded.isEmpty(); + } + + /** + * @param value {@link #dateRecorded} (A date, when the Condition statement was documented.). This is the underlying object with id, value and extensions. The accessor "getDateRecorded" gives direct access to the value + */ + public Condition setDateRecordedElement(DateType value) { + this.dateRecorded = value; + return this; + } + + /** + * @return A date, when the Condition statement was documented. + */ + public Date getDateRecorded() { + return this.dateRecorded == null ? null : this.dateRecorded.getValue(); + } + + /** + * @param value A date, when the Condition statement was documented. + */ + public Condition setDateRecorded(Date value) { + if (value == null) + this.dateRecorded = null; + else { + if (this.dateRecorded == null) + this.dateRecorded = new DateType(); + this.dateRecorded.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (Identification of the condition, problem or diagnosis.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Identification of the condition, problem or diagnosis.) + */ + public Condition setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #category} (A category assigned to the condition.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (A category assigned to the condition.) + */ + public Condition setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #clinicalStatus} (The clinical status of the condition.). This is the underlying object with id, value and extensions. The accessor "getClinicalStatus" gives direct access to the value + */ + public CodeType getClinicalStatusElement() { + if (this.clinicalStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.clinicalStatus"); + else if (Configuration.doAutoCreate()) + this.clinicalStatus = new CodeType(); // bb + return this.clinicalStatus; + } + + public boolean hasClinicalStatusElement() { + return this.clinicalStatus != null && !this.clinicalStatus.isEmpty(); + } + + public boolean hasClinicalStatus() { + return this.clinicalStatus != null && !this.clinicalStatus.isEmpty(); + } + + /** + * @param value {@link #clinicalStatus} (The clinical status of the condition.). This is the underlying object with id, value and extensions. The accessor "getClinicalStatus" gives direct access to the value + */ + public Condition setClinicalStatusElement(CodeType value) { + this.clinicalStatus = value; + return this; + } + + /** + * @return The clinical status of the condition. + */ + public String getClinicalStatus() { + return this.clinicalStatus == null ? null : this.clinicalStatus.getValue(); + } + + /** + * @param value The clinical status of the condition. + */ + public Condition setClinicalStatus(String value) { + if (Utilities.noString(value)) + this.clinicalStatus = null; + else { + if (this.clinicalStatus == null) + this.clinicalStatus = new CodeType(); + this.clinicalStatus.setValue(value); + } + return this; + } + + /** + * @return {@link #verificationStatus} (The verification status to support the clinical status of the condition.). This is the underlying object with id, value and extensions. The accessor "getVerificationStatus" gives direct access to the value + */ + public Enumeration getVerificationStatusElement() { + if (this.verificationStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.verificationStatus"); + else if (Configuration.doAutoCreate()) + this.verificationStatus = new Enumeration(new ConditionVerificationStatusEnumFactory()); // bb + return this.verificationStatus; + } + + public boolean hasVerificationStatusElement() { + return this.verificationStatus != null && !this.verificationStatus.isEmpty(); + } + + public boolean hasVerificationStatus() { + return this.verificationStatus != null && !this.verificationStatus.isEmpty(); + } + + /** + * @param value {@link #verificationStatus} (The verification status to support the clinical status of the condition.). This is the underlying object with id, value and extensions. The accessor "getVerificationStatus" gives direct access to the value + */ + public Condition setVerificationStatusElement(Enumeration value) { + this.verificationStatus = value; + return this; + } + + /** + * @return The verification status to support the clinical status of the condition. + */ + public ConditionVerificationStatus getVerificationStatus() { + return this.verificationStatus == null ? null : this.verificationStatus.getValue(); + } + + /** + * @param value The verification status to support the clinical status of the condition. + */ + public Condition setVerificationStatus(ConditionVerificationStatus value) { + if (this.verificationStatus == null) + this.verificationStatus = new Enumeration(new ConditionVerificationStatusEnumFactory()); + this.verificationStatus.setValue(value); + return this; + } + + /** + * @return {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.) + */ + public CodeableConcept getSeverity() { + if (this.severity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.severity"); + else if (Configuration.doAutoCreate()) + this.severity = new CodeableConcept(); // cc + return this.severity; + } + + public boolean hasSeverity() { + return this.severity != null && !this.severity.isEmpty(); + } + + /** + * @param value {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.) + */ + public Condition setSeverity(CodeableConcept value) { + this.severity = value; + return this; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public Type getOnset() { + return this.onset; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public DateTimeType getOnsetDateTimeType() throws FHIRException { + if (!(this.onset instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (DateTimeType) this.onset; + } + + public boolean hasOnsetDateTimeType() { + return this.onset instanceof DateTimeType; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public Age getOnsetAge() throws FHIRException { + if (!(this.onset instanceof Age)) + throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Age) this.onset; + } + + public boolean hasOnsetAge() { + return this.onset instanceof Age; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public Period getOnsetPeriod() throws FHIRException { + if (!(this.onset instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Period) this.onset; + } + + public boolean hasOnsetPeriod() { + return this.onset instanceof Period; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public Range getOnsetRange() throws FHIRException { + if (!(this.onset instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Range) this.onset; + } + + public boolean hasOnsetRange() { + return this.onset instanceof Range; + } + + /** + * @return {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public StringType getOnsetStringType() throws FHIRException { + if (!(this.onset instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (StringType) this.onset; + } + + public boolean hasOnsetStringType() { + return this.onset instanceof StringType; + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Estimated or actual date or date-time the condition began, in the opinion of the clinician.) + */ + public Condition setOnset(Type value) { + this.onset = value; + return this; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public Type getAbatement() { + return this.abatement; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public DateTimeType getAbatementDateTimeType() throws FHIRException { + if (!(this.abatement instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (DateTimeType) this.abatement; + } + + public boolean hasAbatementDateTimeType() { + return this.abatement instanceof DateTimeType; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public Age getAbatementAge() throws FHIRException { + if (!(this.abatement instanceof Age)) + throw new FHIRException("Type mismatch: the type Age was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (Age) this.abatement; + } + + public boolean hasAbatementAge() { + return this.abatement instanceof Age; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public BooleanType getAbatementBooleanType() throws FHIRException { + if (!(this.abatement instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (BooleanType) this.abatement; + } + + public boolean hasAbatementBooleanType() { + return this.abatement instanceof BooleanType; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public Period getAbatementPeriod() throws FHIRException { + if (!(this.abatement instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (Period) this.abatement; + } + + public boolean hasAbatementPeriod() { + return this.abatement instanceof Period; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public Range getAbatementRange() throws FHIRException { + if (!(this.abatement instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (Range) this.abatement; + } + + public boolean hasAbatementRange() { + return this.abatement instanceof Range; + } + + /** + * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public StringType getAbatementStringType() throws FHIRException { + if (!(this.abatement instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.abatement.getClass().getName()+" was encountered"); + return (StringType) this.abatement; + } + + public boolean hasAbatementStringType() { + return this.abatement instanceof StringType; + } + + public boolean hasAbatement() { + return this.abatement != null && !this.abatement.isEmpty(); + } + + /** + * @param value {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.) + */ + public Condition setAbatement(Type value) { + this.abatement = value; + return this; + } + + /** + * @return {@link #stage} (Clinical stage or grade of a condition. May include formal severity assessments.) + */ + public ConditionStageComponent getStage() { + if (this.stage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.stage"); + else if (Configuration.doAutoCreate()) + this.stage = new ConditionStageComponent(); // cc + return this.stage; + } + + public boolean hasStage() { + return this.stage != null && !this.stage.isEmpty(); + } + + /** + * @param value {@link #stage} (Clinical stage or grade of a condition. May include formal severity assessments.) + */ + public Condition setStage(ConditionStageComponent value) { + this.stage = value; + return this; + } + + /** + * @return {@link #evidence} (Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.) + */ + public List getEvidence() { + if (this.evidence == null) + this.evidence = new ArrayList(); + return this.evidence; + } + + public boolean hasEvidence() { + if (this.evidence == null) + return false; + for (ConditionEvidenceComponent item : this.evidence) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #evidence} (Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.) + */ + // syntactic sugar + public ConditionEvidenceComponent addEvidence() { //3 + ConditionEvidenceComponent t = new ConditionEvidenceComponent(); + if (this.evidence == null) + this.evidence = new ArrayList(); + this.evidence.add(t); + return t; + } + + // syntactic sugar + public Condition addEvidence(ConditionEvidenceComponent t) { //3 + if (t == null) + return this; + if (this.evidence == null) + this.evidence = new ArrayList(); + this.evidence.add(t); + return this; + } + + /** + * @return {@link #bodySite} (The anatomical location where this condition manifests itself.) + */ + public List getBodySite() { + if (this.bodySite == null) + this.bodySite = new ArrayList(); + return this.bodySite; + } + + public boolean hasBodySite() { + if (this.bodySite == null) + return false; + for (CodeableConcept item : this.bodySite) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #bodySite} (The anatomical location where this condition manifests itself.) + */ + // syntactic sugar + public CodeableConcept addBodySite() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return t; + } + + // syntactic sugar + public Condition addBodySite(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return this; + } + + /** + * @return {@link #notes} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public StringType getNotesElement() { + if (this.notes == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Condition.notes"); + else if (Configuration.doAutoCreate()) + this.notes = new StringType(); // bb + return this.notes; + } + + public boolean hasNotesElement() { + return this.notes != null && !this.notes.isEmpty(); + } + + public boolean hasNotes() { + return this.notes != null && !this.notes.isEmpty(); + } + + /** + * @param value {@link #notes} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public Condition setNotesElement(StringType value) { + this.notes = value; + return this; + } + + /** + * @return Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. + */ + public String getNotes() { + return this.notes == null ? null : this.notes.getValue(); + } + + /** + * @param value Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. + */ + public Condition setNotes(String value) { + if (Utilities.noString(value)) + this.notes = null; + else { + if (this.notes == null) + this.notes = new StringType(); + this.notes.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "Indicates the patient who the condition record is associated with.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "Encounter during which the condition was first asserted.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("asserter", "Reference(Practitioner|Patient)", "Individual who is making the condition statement.", 0, java.lang.Integer.MAX_VALUE, asserter)); + childrenList.add(new Property("dateRecorded", "date", "A date, when the Condition statement was documented.", 0, java.lang.Integer.MAX_VALUE, dateRecorded)); + childrenList.add(new Property("code", "CodeableConcept", "Identification of the condition, problem or diagnosis.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "CodeableConcept", "A category assigned to the condition.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("clinicalStatus", "code", "The clinical status of the condition.", 0, java.lang.Integer.MAX_VALUE, clinicalStatus)); + childrenList.add(new Property("verificationStatus", "code", "The verification status to support the clinical status of the condition.", 0, java.lang.Integer.MAX_VALUE, verificationStatus)); + childrenList.add(new Property("severity", "CodeableConcept", "A subjective assessment of the severity of the condition as evaluated by the clinician.", 0, java.lang.Integer.MAX_VALUE, severity)); + childrenList.add(new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time the condition began, in the opinion of the clinician.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("abatement[x]", "dateTime|Age|boolean|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, java.lang.Integer.MAX_VALUE, abatement)); + childrenList.add(new Property("stage", "", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, java.lang.Integer.MAX_VALUE, stage)); + childrenList.add(new Property("evidence", "", "Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.", 0, java.lang.Integer.MAX_VALUE, evidence)); + childrenList.add(new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("notes", "string", "Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.", 0, java.lang.Integer.MAX_VALUE, notes)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("asserter")) + this.asserter = castToReference(value); // Reference + else if (name.equals("dateRecorded")) + this.dateRecorded = castToDate(value); // DateType + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("clinicalStatus")) + this.clinicalStatus = castToCode(value); // CodeType + else if (name.equals("verificationStatus")) + this.verificationStatus = new ConditionVerificationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("severity")) + this.severity = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("onset[x]")) + this.onset = (Type) value; // Type + else if (name.equals("abatement[x]")) + this.abatement = (Type) value; // Type + else if (name.equals("stage")) + this.stage = (ConditionStageComponent) value; // ConditionStageComponent + else if (name.equals("evidence")) + this.getEvidence().add((ConditionEvidenceComponent) value); + else if (name.equals("bodySite")) + this.getBodySite().add(castToCodeableConcept(value)); + else if (name.equals("notes")) + this.notes = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("asserter")) { + this.asserter = new Reference(); + return this.asserter; + } + else if (name.equals("dateRecorded")) { + throw new FHIRException("Cannot call addChild on a primitive type Condition.dateRecorded"); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("clinicalStatus")) { + throw new FHIRException("Cannot call addChild on a primitive type Condition.clinicalStatus"); + } + else if (name.equals("verificationStatus")) { + throw new FHIRException("Cannot call addChild on a primitive type Condition.verificationStatus"); + } + else if (name.equals("severity")) { + this.severity = new CodeableConcept(); + return this.severity; + } + else if (name.equals("onsetDateTime")) { + this.onset = new DateTimeType(); + return this.onset; + } + else if (name.equals("onsetAge")) { + this.onset = new Age(); + return this.onset; + } + else if (name.equals("onsetPeriod")) { + this.onset = new Period(); + return this.onset; + } + else if (name.equals("onsetRange")) { + this.onset = new Range(); + return this.onset; + } + else if (name.equals("onsetString")) { + this.onset = new StringType(); + return this.onset; + } + else if (name.equals("abatementDateTime")) { + this.abatement = new DateTimeType(); + return this.abatement; + } + else if (name.equals("abatementAge")) { + this.abatement = new Age(); + return this.abatement; + } + else if (name.equals("abatementBoolean")) { + this.abatement = new BooleanType(); + return this.abatement; + } + else if (name.equals("abatementPeriod")) { + this.abatement = new Period(); + return this.abatement; + } + else if (name.equals("abatementRange")) { + this.abatement = new Range(); + return this.abatement; + } + else if (name.equals("abatementString")) { + this.abatement = new StringType(); + return this.abatement; + } + else if (name.equals("stage")) { + this.stage = new ConditionStageComponent(); + return this.stage; + } + else if (name.equals("evidence")) { + return addEvidence(); + } + else if (name.equals("bodySite")) { + return addBodySite(); + } + else if (name.equals("notes")) { + throw new FHIRException("Cannot call addChild on a primitive type Condition.notes"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Condition"; + + } + + public Condition copy() { + Condition dst = new Condition(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.asserter = asserter == null ? null : asserter.copy(); + dst.dateRecorded = dateRecorded == null ? null : dateRecorded.copy(); + dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.clinicalStatus = clinicalStatus == null ? null : clinicalStatus.copy(); + dst.verificationStatus = verificationStatus == null ? null : verificationStatus.copy(); + dst.severity = severity == null ? null : severity.copy(); + dst.onset = onset == null ? null : onset.copy(); + dst.abatement = abatement == null ? null : abatement.copy(); + dst.stage = stage == null ? null : stage.copy(); + if (evidence != null) { + dst.evidence = new ArrayList(); + for (ConditionEvidenceComponent i : evidence) + dst.evidence.add(i.copy()); + }; + if (bodySite != null) { + dst.bodySite = new ArrayList(); + for (CodeableConcept i : bodySite) + dst.bodySite.add(i.copy()); + }; + dst.notes = notes == null ? null : notes.copy(); + return dst; + } + + protected Condition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Condition)) + return false; + Condition o = (Condition) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(asserter, o.asserter, true) && compareDeep(dateRecorded, o.dateRecorded, true) && compareDeep(code, o.code, true) + && compareDeep(category, o.category, true) && compareDeep(clinicalStatus, o.clinicalStatus, true) + && compareDeep(verificationStatus, o.verificationStatus, true) && compareDeep(severity, o.severity, true) + && compareDeep(onset, o.onset, true) && compareDeep(abatement, o.abatement, true) && compareDeep(stage, o.stage, true) + && compareDeep(evidence, o.evidence, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(notes, o.notes, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Condition)) + return false; + Condition o = (Condition) other; + return compareValues(dateRecorded, o.dateRecorded, true) && compareValues(clinicalStatus, o.clinicalStatus, true) + && compareValues(verificationStatus, o.verificationStatus, true) && compareValues(notes, o.notes, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (asserter == null || asserter.isEmpty()) + && (dateRecorded == null || dateRecorded.isEmpty()) && (code == null || code.isEmpty()) && (category == null || category.isEmpty()) + && (clinicalStatus == null || clinicalStatus.isEmpty()) && (verificationStatus == null || verificationStatus.isEmpty()) + && (severity == null || severity.isEmpty()) && (onset == null || onset.isEmpty()) && (abatement == null || abatement.isEmpty()) + && (stage == null || stage.isEmpty()) && (evidence == null || evidence.isEmpty()) && (bodySite == null || bodySite.isEmpty()) + && (notes == null || notes.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Condition; + } + + @SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token" ) + public static final String SP_SEVERITY = "severity"; + @SearchParamDefinition(name="identifier", path="Condition.identifier", description="A unique identifier of the condition record", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="clinicalstatus", path="Condition.clinicalStatus", description="The clinical status of the condition", type="token" ) + public static final String SP_CLINICALSTATUS = "clinicalstatus"; + @SearchParamDefinition(name="onset-info", path="Condition.onset[x]", description="Other onsets (boolean, age, range, string)", type="string" ) + public static final String SP_ONSETINFO = "onset-info"; + @SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" ) + public static final String SP_EVIDENCE = "evidence"; + @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="Date related onsets (dateTime and Period)", type="date" ) + public static final String SP_ONSET = "onset"; + @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" ) + public static final String SP_ASSERTER = "asserter"; + @SearchParamDefinition(name="date-recorded", path="Condition.dateRecorded", description="A date, when the Condition statement was documented", type="date" ) + public static final String SP_DATERECORDED = "date-recorded"; + @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" ) + public static final String SP_STAGE = "stage"; + @SearchParamDefinition(name="patient", path="Condition.patient", description="Who has the condition?", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="body-site", path="Condition.bodySite", description="Anatomical location, if relevant", type="token" ) + public static final String SP_BODYSITE = "body-site"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Configuration.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Configuration.java new file mode 100644 index 00000000000..863bc2d383c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Configuration.java @@ -0,0 +1,106 @@ +package org.hl7.fhir.dstu21.model; + +/* +Copyright (c) 2011+, HL7, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +/** + * This class is created to help implementers deal with a change to + * the API that was made between versions 0.81 and 0.9 + * + * The change is the behaviour of the .getX() where the cardinality of + * x is 0..1 or 1..1. Before the change, these routines would return + * null if the object had not previously been assigned, and after the ' + * change, they will automatically create the object if it had not + * been assigned (unless the object is polymorphic, in which case, + * only the type specific getters create the object) + * + * When making the transition from the old style to the new style, + * the main change is that when testing for presence or abssense + * of the element, instead of doing one of these two: + * + * if (obj.getProperty() == null) + * if (obj.getProperty() != null) + * + * you instead do + * + * if (!obj.hasProperty()) + * if (obj.hasProperty()) + * + * or else one of these two: + * + * if (obj.getProperty().isEmpty()) + * if (!obj.getProperty().isEmpty()) + * + * The only way to sort this out is by finding all these things + * in the code, and changing them. + * + * To help with that, you can set the status field of this class + * to change how this API behaves. Note: the status value is tied + * to the way that you program. The intent of this class is to + * help make developers the transiition to status = 0. The old + * behaviour is status = 2. To make the transition, set the + * status code to 1. This way, any time a .getX routine needs + * to automatically create an object, an exception will be + * raised instead. The expected use of this is: + * - set status = 1 + * - test your code (all paths) + * - when an exception happens, change the code to use .hasX() or .isEmpty() + * - when all execution paths don't raise an exception, set status = 0 + * - start programming to the new style. + * + * You can set status = 2 and leave it like that, but this is not + * compatible with the utilities and validation code, nor with the + * HAPI code. So everyone shoul make this transition + * + * This is a difficult change to make to an API. Most users should engage with it + * as they migrate from DSTU1 to DSTU2, at the same time as they encounter + * other changes. This change was made in order to align the two java reference + * implementations on a common object model, which is an important outcome that + * justifies making this change to implementers (sorry for any pain caused) + * + * @author Grahame + * + */ +public class Configuration { + + private static int status = 0; + // 0: auto-create + // 1: error + // 2: return null + + public static boolean errorOnAutoCreate() { + return status == 1; + } + + + public static boolean doAutoCreate() { + return status == 0; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Conformance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Conformance.java new file mode 100644 index 00000000000..efbf3b33b70 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Conformance.java @@ -0,0 +1,7777 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ +@ResourceDef(name="Conformance", profile="http://hl7.org/fhir/Profile/Conformance") +public class Conformance extends DomainResource implements IBaseConformance { + + public enum ConformanceStatementKind { + /** + * The Conformance instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point. + */ + INSTANCE, + /** + * The Conformance instance represents the capabilities of a system or piece of software, independent of a particular installation. + */ + CAPABILITY, + /** + * The Conformance instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'. + */ + REQUIREMENTS, + /** + * added to help the parsers + */ + NULL; + public static ConformanceStatementKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("capability".equals(codeString)) + return CAPABILITY; + if ("requirements".equals(codeString)) + return REQUIREMENTS; + throw new FHIRException("Unknown ConformanceStatementKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case CAPABILITY: return "capability"; + case REQUIREMENTS: return "requirements"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INSTANCE: return "http://hl7.org/fhir/conformance-statement-kind"; + case CAPABILITY: return "http://hl7.org/fhir/conformance-statement-kind"; + case REQUIREMENTS: return "http://hl7.org/fhir/conformance-statement-kind"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The Conformance instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point."; + case CAPABILITY: return "The Conformance instance represents the capabilities of a system or piece of software, independent of a particular installation."; + case REQUIREMENTS: return "The Conformance instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case CAPABILITY: return "Capability"; + case REQUIREMENTS: return "Requirements"; + default: return "?"; + } + } + } + + public static class ConformanceStatementKindEnumFactory implements EnumFactory { + public ConformanceStatementKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return ConformanceStatementKind.INSTANCE; + if ("capability".equals(codeString)) + return ConformanceStatementKind.CAPABILITY; + if ("requirements".equals(codeString)) + return ConformanceStatementKind.REQUIREMENTS; + throw new IllegalArgumentException("Unknown ConformanceStatementKind code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return new Enumeration(this, ConformanceStatementKind.INSTANCE); + if ("capability".equals(codeString)) + return new Enumeration(this, ConformanceStatementKind.CAPABILITY); + if ("requirements".equals(codeString)) + return new Enumeration(this, ConformanceStatementKind.REQUIREMENTS); + throw new FHIRException("Unknown ConformanceStatementKind code '"+codeString+"'"); + } + public String toCode(ConformanceStatementKind code) { + if (code == ConformanceStatementKind.INSTANCE) + return "instance"; + if (code == ConformanceStatementKind.CAPABILITY) + return "capability"; + if (code == ConformanceStatementKind.REQUIREMENTS) + return "requirements"; + return "?"; + } + } + + public enum UnknownContentCode { + /** + * The application does not accept either unknown elements or extensions. + */ + NO, + /** + * The application accepts unknown extensions, but not unknown elements. + */ + EXTENSIONS, + /** + * The application accepts unknown elements, but not unknown extensions. + */ + ELEMENTS, + /** + * The application accepts unknown elements and extensions. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static UnknownContentCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no".equals(codeString)) + return NO; + if ("extensions".equals(codeString)) + return EXTENSIONS; + if ("elements".equals(codeString)) + return ELEMENTS; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NO: return "no"; + case EXTENSIONS: return "extensions"; + case ELEMENTS: return "elements"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NO: return "http://hl7.org/fhir/unknown-content-code"; + case EXTENSIONS: return "http://hl7.org/fhir/unknown-content-code"; + case ELEMENTS: return "http://hl7.org/fhir/unknown-content-code"; + case BOTH: return "http://hl7.org/fhir/unknown-content-code"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NO: return "The application does not accept either unknown elements or extensions."; + case EXTENSIONS: return "The application accepts unknown extensions, but not unknown elements."; + case ELEMENTS: return "The application accepts unknown elements, but not unknown extensions."; + case BOTH: return "The application accepts unknown elements and extensions."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NO: return "Neither Elements or Extensions"; + case EXTENSIONS: return "Unknown Extensions"; + case ELEMENTS: return "Unknown Elements"; + case BOTH: return "Unknown Elements and Extensions"; + default: return "?"; + } + } + } + + public static class UnknownContentCodeEnumFactory implements EnumFactory { + public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("no".equals(codeString)) + return UnknownContentCode.NO; + if ("extensions".equals(codeString)) + return UnknownContentCode.EXTENSIONS; + if ("elements".equals(codeString)) + return UnknownContentCode.ELEMENTS; + if ("both".equals(codeString)) + return UnknownContentCode.BOTH; + throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("no".equals(codeString)) + return new Enumeration(this, UnknownContentCode.NO); + if ("extensions".equals(codeString)) + return new Enumeration(this, UnknownContentCode.EXTENSIONS); + if ("elements".equals(codeString)) + return new Enumeration(this, UnknownContentCode.ELEMENTS); + if ("both".equals(codeString)) + return new Enumeration(this, UnknownContentCode.BOTH); + throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); + } + public String toCode(UnknownContentCode code) { + if (code == UnknownContentCode.NO) + return "no"; + if (code == UnknownContentCode.EXTENSIONS) + return "extensions"; + if (code == UnknownContentCode.ELEMENTS) + return "elements"; + if (code == UnknownContentCode.BOTH) + return "both"; + return "?"; + } + } + + public enum RestfulConformanceMode { + /** + * The application acts as a client for this resource. + */ + CLIENT, + /** + * The application acts as a server for this resource. + */ + SERVER, + /** + * added to help the parsers + */ + NULL; + public static RestfulConformanceMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("client".equals(codeString)) + return CLIENT; + if ("server".equals(codeString)) + return SERVER; + throw new FHIRException("Unknown RestfulConformanceMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CLIENT: return "client"; + case SERVER: return "server"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CLIENT: return "http://hl7.org/fhir/restful-conformance-mode"; + case SERVER: return "http://hl7.org/fhir/restful-conformance-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CLIENT: return "The application acts as a client for this resource."; + case SERVER: return "The application acts as a server for this resource."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CLIENT: return "Client"; + case SERVER: return "Server"; + default: return "?"; + } + } + } + + public static class RestfulConformanceModeEnumFactory implements EnumFactory { + public RestfulConformanceMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("client".equals(codeString)) + return RestfulConformanceMode.CLIENT; + if ("server".equals(codeString)) + return RestfulConformanceMode.SERVER; + throw new IllegalArgumentException("Unknown RestfulConformanceMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("client".equals(codeString)) + return new Enumeration(this, RestfulConformanceMode.CLIENT); + if ("server".equals(codeString)) + return new Enumeration(this, RestfulConformanceMode.SERVER); + throw new FHIRException("Unknown RestfulConformanceMode code '"+codeString+"'"); + } + public String toCode(RestfulConformanceMode code) { + if (code == RestfulConformanceMode.CLIENT) + return "client"; + if (code == RestfulConformanceMode.SERVER) + return "server"; + return "?"; + } + } + + public enum TypeRestfulInteraction { + /** + * null + */ + READ, + /** + * null + */ + VREAD, + /** + * null + */ + UPDATE, + /** + * null + */ + DELETE, + /** + * null + */ + HISTORYINSTANCE, + /** + * null + */ + VALIDATE, + /** + * null + */ + HISTORYTYPE, + /** + * null + */ + CREATE, + /** + * null + */ + SEARCHTYPE, + /** + * added to help the parsers + */ + NULL; + public static TypeRestfulInteraction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return READ; + if ("vread".equals(codeString)) + return VREAD; + if ("update".equals(codeString)) + return UPDATE; + if ("delete".equals(codeString)) + return DELETE; + if ("history-instance".equals(codeString)) + return HISTORYINSTANCE; + if ("validate".equals(codeString)) + return VALIDATE; + if ("history-type".equals(codeString)) + return HISTORYTYPE; + if ("create".equals(codeString)) + return CREATE; + if ("search-type".equals(codeString)) + return SEARCHTYPE; + throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case DELETE: return "delete"; + case HISTORYINSTANCE: return "history-instance"; + case VALIDATE: return "validate"; + case HISTORYTYPE: return "history-type"; + case CREATE: return "create"; + case SEARCHTYPE: return "search-type"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case READ: return "http://hl7.org/fhir/restful-interaction"; + case VREAD: return "http://hl7.org/fhir/restful-interaction"; + case UPDATE: return "http://hl7.org/fhir/restful-interaction"; + case DELETE: return "http://hl7.org/fhir/restful-interaction"; + case HISTORYINSTANCE: return "http://hl7.org/fhir/restful-interaction"; + case VALIDATE: return "http://hl7.org/fhir/restful-interaction"; + case HISTORYTYPE: return "http://hl7.org/fhir/restful-interaction"; + case CREATE: return "http://hl7.org/fhir/restful-interaction"; + case SEARCHTYPE: return "http://hl7.org/fhir/restful-interaction"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case READ: return ""; + case VREAD: return ""; + case UPDATE: return ""; + case DELETE: return ""; + case HISTORYINSTANCE: return ""; + case VALIDATE: return ""; + case HISTORYTYPE: return ""; + case CREATE: return ""; + case SEARCHTYPE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case DELETE: return "delete"; + case HISTORYINSTANCE: return "history-instance"; + case VALIDATE: return "validate"; + case HISTORYTYPE: return "history-type"; + case CREATE: return "create"; + case SEARCHTYPE: return "search-type"; + default: return "?"; + } + } + } + + public static class TypeRestfulInteractionEnumFactory implements EnumFactory { + public TypeRestfulInteraction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return TypeRestfulInteraction.READ; + if ("vread".equals(codeString)) + return TypeRestfulInteraction.VREAD; + if ("update".equals(codeString)) + return TypeRestfulInteraction.UPDATE; + if ("delete".equals(codeString)) + return TypeRestfulInteraction.DELETE; + if ("history-instance".equals(codeString)) + return TypeRestfulInteraction.HISTORYINSTANCE; + if ("validate".equals(codeString)) + return TypeRestfulInteraction.VALIDATE; + if ("history-type".equals(codeString)) + return TypeRestfulInteraction.HISTORYTYPE; + if ("create".equals(codeString)) + return TypeRestfulInteraction.CREATE; + if ("search-type".equals(codeString)) + return TypeRestfulInteraction.SEARCHTYPE; + throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.READ); + if ("vread".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.VREAD); + if ("update".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.UPDATE); + if ("delete".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.DELETE); + if ("history-instance".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.HISTORYINSTANCE); + if ("validate".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.VALIDATE); + if ("history-type".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.HISTORYTYPE); + if ("create".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.CREATE); + if ("search-type".equals(codeString)) + return new Enumeration(this, TypeRestfulInteraction.SEARCHTYPE); + throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); + } + public String toCode(TypeRestfulInteraction code) { + if (code == TypeRestfulInteraction.READ) + return "read"; + if (code == TypeRestfulInteraction.VREAD) + return "vread"; + if (code == TypeRestfulInteraction.UPDATE) + return "update"; + if (code == TypeRestfulInteraction.DELETE) + return "delete"; + if (code == TypeRestfulInteraction.HISTORYINSTANCE) + return "history-instance"; + if (code == TypeRestfulInteraction.VALIDATE) + return "validate"; + if (code == TypeRestfulInteraction.HISTORYTYPE) + return "history-type"; + if (code == TypeRestfulInteraction.CREATE) + return "create"; + if (code == TypeRestfulInteraction.SEARCHTYPE) + return "search-type"; + return "?"; + } + } + + public enum ResourceVersionPolicy { + /** + * VersionId meta-property is not supported (server) or used (client). + */ + NOVERSION, + /** + * VersionId meta-property is supported (server) or used (client). + */ + VERSIONED, + /** + * VersionId is must be correct for updates (server) or will be specified (If-match header) for updates (client). + */ + VERSIONEDUPDATE, + /** + * added to help the parsers + */ + NULL; + public static ResourceVersionPolicy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no-version".equals(codeString)) + return NOVERSION; + if ("versioned".equals(codeString)) + return VERSIONED; + if ("versioned-update".equals(codeString)) + return VERSIONEDUPDATE; + throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOVERSION: return "no-version"; + case VERSIONED: return "versioned"; + case VERSIONEDUPDATE: return "versioned-update"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NOVERSION: return "http://hl7.org/fhir/versioning-policy"; + case VERSIONED: return "http://hl7.org/fhir/versioning-policy"; + case VERSIONEDUPDATE: return "http://hl7.org/fhir/versioning-policy"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NOVERSION: return "VersionId meta-property is not supported (server) or used (client)."; + case VERSIONED: return "VersionId meta-property is supported (server) or used (client)."; + case VERSIONEDUPDATE: return "VersionId is must be correct for updates (server) or will be specified (If-match header) for updates (client)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOVERSION: return "No VersionId Support"; + case VERSIONED: return "Versioned"; + case VERSIONEDUPDATE: return "VersionId tracked fully"; + default: return "?"; + } + } + } + + public static class ResourceVersionPolicyEnumFactory implements EnumFactory { + public ResourceVersionPolicy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("no-version".equals(codeString)) + return ResourceVersionPolicy.NOVERSION; + if ("versioned".equals(codeString)) + return ResourceVersionPolicy.VERSIONED; + if ("versioned-update".equals(codeString)) + return ResourceVersionPolicy.VERSIONEDUPDATE; + throw new IllegalArgumentException("Unknown ResourceVersionPolicy code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("no-version".equals(codeString)) + return new Enumeration(this, ResourceVersionPolicy.NOVERSION); + if ("versioned".equals(codeString)) + return new Enumeration(this, ResourceVersionPolicy.VERSIONED); + if ("versioned-update".equals(codeString)) + return new Enumeration(this, ResourceVersionPolicy.VERSIONEDUPDATE); + throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); + } + public String toCode(ResourceVersionPolicy code) { + if (code == ResourceVersionPolicy.NOVERSION) + return "no-version"; + if (code == ResourceVersionPolicy.VERSIONED) + return "versioned"; + if (code == ResourceVersionPolicy.VERSIONEDUPDATE) + return "versioned-update"; + return "?"; + } + } + + public enum ConditionalDeleteStatus { + /** + * No support for conditional deletes. + */ + NOTSUPPORTED, + /** + * Conditional deletes are supported, but only single resources at a time. + */ + SINGLE, + /** + * Conditional deletes are supported, and multiple resources can be deleted in a single interaction. + */ + MULTIPLE, + /** + * added to help the parsers + */ + NULL; + public static ConditionalDeleteStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("single".equals(codeString)) + return SINGLE; + if ("multiple".equals(codeString)) + return MULTIPLE; + throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSUPPORTED: return "not-supported"; + case SINGLE: return "single"; + case MULTIPLE: return "multiple"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NOTSUPPORTED: return "http://hl7.org/fhir/conditional-delete-status"; + case SINGLE: return "http://hl7.org/fhir/conditional-delete-status"; + case MULTIPLE: return "http://hl7.org/fhir/conditional-delete-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NOTSUPPORTED: return "No support for conditional deletes."; + case SINGLE: return "Conditional deletes are supported, but only single resources at a time."; + case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSUPPORTED: return "Not Supported"; + case SINGLE: return "Single Deletes Supported"; + case MULTIPLE: return "Multiple Deletes Supported"; + default: return "?"; + } + } + } + + public static class ConditionalDeleteStatusEnumFactory implements EnumFactory { + public ConditionalDeleteStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return ConditionalDeleteStatus.NOTSUPPORTED; + if ("single".equals(codeString)) + return ConditionalDeleteStatus.SINGLE; + if ("multiple".equals(codeString)) + return ConditionalDeleteStatus.MULTIPLE; + throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return new Enumeration(this, ConditionalDeleteStatus.NOTSUPPORTED); + if ("single".equals(codeString)) + return new Enumeration(this, ConditionalDeleteStatus.SINGLE); + if ("multiple".equals(codeString)) + return new Enumeration(this, ConditionalDeleteStatus.MULTIPLE); + throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); + } + public String toCode(ConditionalDeleteStatus code) { + if (code == ConditionalDeleteStatus.NOTSUPPORTED) + return "not-supported"; + if (code == ConditionalDeleteStatus.SINGLE) + return "single"; + if (code == ConditionalDeleteStatus.MULTIPLE) + return "multiple"; + return "?"; + } + } + + public enum SearchModifierCode { + /** + * The search parameter returns resources that have a value or not. + */ + MISSING, + /** + * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). + */ + EXACT, + /** + * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. + */ + CONTAINS, + /** + * The search parameter returns resources that do not contain a match . + */ + NOT, + /** + * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. + */ + TEXT, + /** + * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. + */ + IN, + /** + * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. + */ + NOTIN, + /** + * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). + */ + BELOW, + /** + * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). + */ + ABOVE, + /** + * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). + */ + TYPE, + /** + * added to help the parsers + */ + NULL; + public static SearchModifierCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("missing".equals(codeString)) + return MISSING; + if ("exact".equals(codeString)) + return EXACT; + if ("contains".equals(codeString)) + return CONTAINS; + if ("not".equals(codeString)) + return NOT; + if ("text".equals(codeString)) + return TEXT; + if ("in".equals(codeString)) + return IN; + if ("not-in".equals(codeString)) + return NOTIN; + if ("below".equals(codeString)) + return BELOW; + if ("above".equals(codeString)) + return ABOVE; + if ("type".equals(codeString)) + return TYPE; + throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MISSING: return "missing"; + case EXACT: return "exact"; + case CONTAINS: return "contains"; + case NOT: return "not"; + case TEXT: return "text"; + case IN: return "in"; + case NOTIN: return "not-in"; + case BELOW: return "below"; + case ABOVE: return "above"; + case TYPE: return "type"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MISSING: return "http://hl7.org/fhir/search-modifier-code"; + case EXACT: return "http://hl7.org/fhir/search-modifier-code"; + case CONTAINS: return "http://hl7.org/fhir/search-modifier-code"; + case NOT: return "http://hl7.org/fhir/search-modifier-code"; + case TEXT: return "http://hl7.org/fhir/search-modifier-code"; + case IN: return "http://hl7.org/fhir/search-modifier-code"; + case NOTIN: return "http://hl7.org/fhir/search-modifier-code"; + case BELOW: return "http://hl7.org/fhir/search-modifier-code"; + case ABOVE: return "http://hl7.org/fhir/search-modifier-code"; + case TYPE: return "http://hl7.org/fhir/search-modifier-code"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MISSING: return "The search parameter returns resources that have a value or not."; + case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; + case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; + case NOT: return "The search parameter returns resources that do not contain a match ."; + case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; + case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; + case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; + case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; + case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; + case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MISSING: return "Missing"; + case EXACT: return "Exact"; + case CONTAINS: return "Contains"; + case NOT: return "Not"; + case TEXT: return "Text"; + case IN: return "In"; + case NOTIN: return "Not In"; + case BELOW: return "Below"; + case ABOVE: return "Above"; + case TYPE: return "Type"; + default: return "?"; + } + } + } + + public static class SearchModifierCodeEnumFactory implements EnumFactory { + public SearchModifierCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("missing".equals(codeString)) + return SearchModifierCode.MISSING; + if ("exact".equals(codeString)) + return SearchModifierCode.EXACT; + if ("contains".equals(codeString)) + return SearchModifierCode.CONTAINS; + if ("not".equals(codeString)) + return SearchModifierCode.NOT; + if ("text".equals(codeString)) + return SearchModifierCode.TEXT; + if ("in".equals(codeString)) + return SearchModifierCode.IN; + if ("not-in".equals(codeString)) + return SearchModifierCode.NOTIN; + if ("below".equals(codeString)) + return SearchModifierCode.BELOW; + if ("above".equals(codeString)) + return SearchModifierCode.ABOVE; + if ("type".equals(codeString)) + return SearchModifierCode.TYPE; + throw new IllegalArgumentException("Unknown SearchModifierCode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("missing".equals(codeString)) + return new Enumeration(this, SearchModifierCode.MISSING); + if ("exact".equals(codeString)) + return new Enumeration(this, SearchModifierCode.EXACT); + if ("contains".equals(codeString)) + return new Enumeration(this, SearchModifierCode.CONTAINS); + if ("not".equals(codeString)) + return new Enumeration(this, SearchModifierCode.NOT); + if ("text".equals(codeString)) + return new Enumeration(this, SearchModifierCode.TEXT); + if ("in".equals(codeString)) + return new Enumeration(this, SearchModifierCode.IN); + if ("not-in".equals(codeString)) + return new Enumeration(this, SearchModifierCode.NOTIN); + if ("below".equals(codeString)) + return new Enumeration(this, SearchModifierCode.BELOW); + if ("above".equals(codeString)) + return new Enumeration(this, SearchModifierCode.ABOVE); + if ("type".equals(codeString)) + return new Enumeration(this, SearchModifierCode.TYPE); + throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); + } + public String toCode(SearchModifierCode code) { + if (code == SearchModifierCode.MISSING) + return "missing"; + if (code == SearchModifierCode.EXACT) + return "exact"; + if (code == SearchModifierCode.CONTAINS) + return "contains"; + if (code == SearchModifierCode.NOT) + return "not"; + if (code == SearchModifierCode.TEXT) + return "text"; + if (code == SearchModifierCode.IN) + return "in"; + if (code == SearchModifierCode.NOTIN) + return "not-in"; + if (code == SearchModifierCode.BELOW) + return "below"; + if (code == SearchModifierCode.ABOVE) + return "above"; + if (code == SearchModifierCode.TYPE) + return "type"; + return "?"; + } + } + + public enum SystemRestfulInteraction { + /** + * null + */ + TRANSACTION, + /** + * null + */ + SEARCHSYSTEM, + /** + * null + */ + HISTORYSYSTEM, + /** + * added to help the parsers + */ + NULL; + public static SystemRestfulInteraction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("search-system".equals(codeString)) + return SEARCHSYSTEM; + if ("history-system".equals(codeString)) + return HISTORYSYSTEM; + throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TRANSACTION: return "transaction"; + case SEARCHSYSTEM: return "search-system"; + case HISTORYSYSTEM: return "history-system"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case TRANSACTION: return "http://hl7.org/fhir/restful-interaction"; + case SEARCHSYSTEM: return "http://hl7.org/fhir/restful-interaction"; + case HISTORYSYSTEM: return "http://hl7.org/fhir/restful-interaction"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case TRANSACTION: return ""; + case SEARCHSYSTEM: return ""; + case HISTORYSYSTEM: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TRANSACTION: return "transaction"; + case SEARCHSYSTEM: return "search-system"; + case HISTORYSYSTEM: return "history-system"; + default: return "?"; + } + } + } + + public static class SystemRestfulInteractionEnumFactory implements EnumFactory { + public SystemRestfulInteraction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("transaction".equals(codeString)) + return SystemRestfulInteraction.TRANSACTION; + if ("search-system".equals(codeString)) + return SystemRestfulInteraction.SEARCHSYSTEM; + if ("history-system".equals(codeString)) + return SystemRestfulInteraction.HISTORYSYSTEM; + throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("transaction".equals(codeString)) + return new Enumeration(this, SystemRestfulInteraction.TRANSACTION); + if ("search-system".equals(codeString)) + return new Enumeration(this, SystemRestfulInteraction.SEARCHSYSTEM); + if ("history-system".equals(codeString)) + return new Enumeration(this, SystemRestfulInteraction.HISTORYSYSTEM); + throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); + } + public String toCode(SystemRestfulInteraction code) { + if (code == SystemRestfulInteraction.TRANSACTION) + return "transaction"; + if (code == SystemRestfulInteraction.SEARCHSYSTEM) + return "search-system"; + if (code == SystemRestfulInteraction.HISTORYSYSTEM) + return "history-system"; + return "?"; + } + } + + public enum TransactionMode { + /** + * Neither batch or transaction is supported. + */ + NOTSUPPORTED, + /** + * Batches are supported. + */ + BATCH, + /** + * Transactions are supported. + */ + TRANSACTION, + /** + * Both batches and transactions are supported. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static TransactionMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("batch".equals(codeString)) + return BATCH; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown TransactionMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSUPPORTED: return "not-supported"; + case BATCH: return "batch"; + case TRANSACTION: return "transaction"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NOTSUPPORTED: return "http://hl7.org/fhir/transaction-mode"; + case BATCH: return "http://hl7.org/fhir/transaction-mode"; + case TRANSACTION: return "http://hl7.org/fhir/transaction-mode"; + case BOTH: return "http://hl7.org/fhir/transaction-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NOTSUPPORTED: return "Neither batch or transaction is supported."; + case BATCH: return "Batches are supported."; + case TRANSACTION: return "Transactions are supported."; + case BOTH: return "Both batches and transactions are supported."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSUPPORTED: return "None"; + case BATCH: return "Batches supported"; + case TRANSACTION: return "Transactions Supported"; + case BOTH: return "Batches & Transactions"; + default: return "?"; + } + } + } + + public static class TransactionModeEnumFactory implements EnumFactory { + public TransactionMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return TransactionMode.NOTSUPPORTED; + if ("batch".equals(codeString)) + return TransactionMode.BATCH; + if ("transaction".equals(codeString)) + return TransactionMode.TRANSACTION; + if ("both".equals(codeString)) + return TransactionMode.BOTH; + throw new IllegalArgumentException("Unknown TransactionMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return new Enumeration(this, TransactionMode.NOTSUPPORTED); + if ("batch".equals(codeString)) + return new Enumeration(this, TransactionMode.BATCH); + if ("transaction".equals(codeString)) + return new Enumeration(this, TransactionMode.TRANSACTION); + if ("both".equals(codeString)) + return new Enumeration(this, TransactionMode.BOTH); + throw new FHIRException("Unknown TransactionMode code '"+codeString+"'"); + } + public String toCode(TransactionMode code) { + if (code == TransactionMode.NOTSUPPORTED) + return "not-supported"; + if (code == TransactionMode.BATCH) + return "batch"; + if (code == TransactionMode.TRANSACTION) + return "transaction"; + if (code == TransactionMode.BOTH) + return "both"; + return "?"; + } + } + + public enum MessageSignificanceCategory { + /** + * The message represents/requests a change that should not be processed more than once; e.g. Making a booking for an appointment. + */ + CONSEQUENCE, + /** + * The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful. + */ + CURRENCY, + /** + * The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications. + */ + NOTIFICATION, + /** + * added to help the parsers + */ + NULL; + public static MessageSignificanceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Consequence".equals(codeString)) + return CONSEQUENCE; + if ("Currency".equals(codeString)) + return CURRENCY; + if ("Notification".equals(codeString)) + return NOTIFICATION; + throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONSEQUENCE: return "Consequence"; + case CURRENCY: return "Currency"; + case NOTIFICATION: return "Notification"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CONSEQUENCE: return "http://hl7.org/fhir/message-significance-category"; + case CURRENCY: return "http://hl7.org/fhir/message-significance-category"; + case NOTIFICATION: return "http://hl7.org/fhir/message-significance-category"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CONSEQUENCE: return "The message represents/requests a change that should not be processed more than once; e.g. Making a booking for an appointment."; + case CURRENCY: return "The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful."; + case NOTIFICATION: return "The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONSEQUENCE: return "Consequence"; + case CURRENCY: return "Currency"; + case NOTIFICATION: return "Notification"; + default: return "?"; + } + } + } + + public static class MessageSignificanceCategoryEnumFactory implements EnumFactory { + public MessageSignificanceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Consequence".equals(codeString)) + return MessageSignificanceCategory.CONSEQUENCE; + if ("Currency".equals(codeString)) + return MessageSignificanceCategory.CURRENCY; + if ("Notification".equals(codeString)) + return MessageSignificanceCategory.NOTIFICATION; + throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Consequence".equals(codeString)) + return new Enumeration(this, MessageSignificanceCategory.CONSEQUENCE); + if ("Currency".equals(codeString)) + return new Enumeration(this, MessageSignificanceCategory.CURRENCY); + if ("Notification".equals(codeString)) + return new Enumeration(this, MessageSignificanceCategory.NOTIFICATION); + throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); + } + public String toCode(MessageSignificanceCategory code) { + if (code == MessageSignificanceCategory.CONSEQUENCE) + return "Consequence"; + if (code == MessageSignificanceCategory.CURRENCY) + return "Currency"; + if (code == MessageSignificanceCategory.NOTIFICATION) + return "Notification"; + return "?"; + } + } + + public enum ConformanceEventMode { + /** + * The application sends requests and receives responses. + */ + SENDER, + /** + * The application receives requests and sends responses. + */ + RECEIVER, + /** + * added to help the parsers + */ + NULL; + public static ConformanceEventMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("sender".equals(codeString)) + return SENDER; + if ("receiver".equals(codeString)) + return RECEIVER; + throw new FHIRException("Unknown ConformanceEventMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SENDER: return "sender"; + case RECEIVER: return "receiver"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SENDER: return "http://hl7.org/fhir/message-conformance-event-mode"; + case RECEIVER: return "http://hl7.org/fhir/message-conformance-event-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SENDER: return "The application sends requests and receives responses."; + case RECEIVER: return "The application receives requests and sends responses."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SENDER: return "Sender"; + case RECEIVER: return "Receiver"; + default: return "?"; + } + } + } + + public static class ConformanceEventModeEnumFactory implements EnumFactory { + public ConformanceEventMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("sender".equals(codeString)) + return ConformanceEventMode.SENDER; + if ("receiver".equals(codeString)) + return ConformanceEventMode.RECEIVER; + throw new IllegalArgumentException("Unknown ConformanceEventMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("sender".equals(codeString)) + return new Enumeration(this, ConformanceEventMode.SENDER); + if ("receiver".equals(codeString)) + return new Enumeration(this, ConformanceEventMode.RECEIVER); + throw new FHIRException("Unknown ConformanceEventMode code '"+codeString+"'"); + } + public String toCode(ConformanceEventMode code) { + if (code == ConformanceEventMode.SENDER) + return "sender"; + if (code == ConformanceEventMode.RECEIVER) + return "receiver"; + return "?"; + } + } + + public enum DocumentMode { + /** + * The application produces documents of the specified type. + */ + PRODUCER, + /** + * The application consumes documents of the specified type. + */ + CONSUMER, + /** + * added to help the parsers + */ + NULL; + public static DocumentMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("producer".equals(codeString)) + return PRODUCER; + if ("consumer".equals(codeString)) + return CONSUMER; + throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRODUCER: return "producer"; + case CONSUMER: return "consumer"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PRODUCER: return "http://hl7.org/fhir/document-mode"; + case CONSUMER: return "http://hl7.org/fhir/document-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PRODUCER: return "The application produces documents of the specified type."; + case CONSUMER: return "The application consumes documents of the specified type."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRODUCER: return "Producer"; + case CONSUMER: return "Consumer"; + default: return "?"; + } + } + } + + public static class DocumentModeEnumFactory implements EnumFactory { + public DocumentMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("producer".equals(codeString)) + return DocumentMode.PRODUCER; + if ("consumer".equals(codeString)) + return DocumentMode.CONSUMER; + throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("producer".equals(codeString)) + return new Enumeration(this, DocumentMode.PRODUCER); + if ("consumer".equals(codeString)) + return new Enumeration(this, DocumentMode.CONSUMER); + throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); + } + public String toCode(DocumentMode code) { + if (code == DocumentMode.PRODUCER) + return "producer"; + if (code == DocumentMode.CONSUMER) + return "consumer"; + return "?"; + } + } + + @Block() + public static class ConformanceContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the conformance. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the conformance." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public ConformanceContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the conformance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the conformance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConformanceContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the conformance. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the conformance. + */ + public ConformanceContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ConformanceContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the conformance.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ConformanceContactComponent copy() { + ConformanceContactComponent dst = new ConformanceContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceContactComponent)) + return false; + ConformanceContactComponent o = (ConformanceContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceContactComponent)) + return false; + ConformanceContactComponent o = (ConformanceContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.contact"; + + } + + } + + @Block() + public static class ConformanceSoftwareComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Name software is known by. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="A name the software is known by", formalDefinition="Name software is known by." ) + protected StringType name; + + /** + * The version identifier for the software covered by this statement. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Version covered by this statement", formalDefinition="The version identifier for the software covered by this statement." ) + protected StringType version; + + /** + * Date this version of the software released. + */ + @Child(name = "releaseDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date this version released", formalDefinition="Date this version of the software released." ) + protected DateTimeType releaseDate; + + private static final long serialVersionUID = 1819769027L; + + /* + * Constructor + */ + public ConformanceSoftwareComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceSoftwareComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceSoftwareComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConformanceSoftwareComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name software is known by. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name software is known by. + */ + public ConformanceSoftwareComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version identifier for the software covered by this statement.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceSoftwareComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version identifier for the software covered by this statement.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ConformanceSoftwareComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version identifier for the software covered by this statement. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version identifier for the software covered by this statement. + */ + public ConformanceSoftwareComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #releaseDate} (Date this version of the software released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value + */ + public DateTimeType getReleaseDateElement() { + if (this.releaseDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceSoftwareComponent.releaseDate"); + else if (Configuration.doAutoCreate()) + this.releaseDate = new DateTimeType(); // bb + return this.releaseDate; + } + + public boolean hasReleaseDateElement() { + return this.releaseDate != null && !this.releaseDate.isEmpty(); + } + + public boolean hasReleaseDate() { + return this.releaseDate != null && !this.releaseDate.isEmpty(); + } + + /** + * @param value {@link #releaseDate} (Date this version of the software released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value + */ + public ConformanceSoftwareComponent setReleaseDateElement(DateTimeType value) { + this.releaseDate = value; + return this; + } + + /** + * @return Date this version of the software released. + */ + public Date getReleaseDate() { + return this.releaseDate == null ? null : this.releaseDate.getValue(); + } + + /** + * @param value Date this version of the software released. + */ + public ConformanceSoftwareComponent setReleaseDate(Date value) { + if (value == null) + this.releaseDate = null; + else { + if (this.releaseDate == null) + this.releaseDate = new DateTimeType(); + this.releaseDate.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Name software is known by.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("version", "string", "The version identifier for the software covered by this statement.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("releaseDate", "dateTime", "Date this version of the software released.", 0, java.lang.Integer.MAX_VALUE, releaseDate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("releaseDate")) + this.releaseDate = castToDateTime(value); // DateTimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); + } + else if (name.equals("releaseDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.releaseDate"); + } + else + return super.addChild(name); + } + + public ConformanceSoftwareComponent copy() { + ConformanceSoftwareComponent dst = new ConformanceSoftwareComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.version = version == null ? null : version.copy(); + dst.releaseDate = releaseDate == null ? null : releaseDate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceSoftwareComponent)) + return false; + ConformanceSoftwareComponent o = (ConformanceSoftwareComponent) other; + return compareDeep(name, o.name, true) && compareDeep(version, o.version, true) && compareDeep(releaseDate, o.releaseDate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceSoftwareComponent)) + return false; + ConformanceSoftwareComponent o = (ConformanceSoftwareComponent) other; + return compareValues(name, o.name, true) && compareValues(version, o.version, true) && compareValues(releaseDate, o.releaseDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (version == null || version.isEmpty()) + && (releaseDate == null || releaseDate.isEmpty()); + } + + public String fhirType() { + return "Conformance.software"; + + } + + } + + @Block() + public static class ConformanceImplementationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Information about the specific installation that this conformance statement relates to. + */ + @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Describes this specific instance", formalDefinition="Information about the specific installation that this conformance statement relates to." ) + protected StringType description; + + /** + * An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Base URL for the installation", formalDefinition="An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." ) + protected UriType url; + + private static final long serialVersionUID = -289238508L; + + /* + * Constructor + */ + public ConformanceImplementationComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceImplementationComponent(StringType description) { + super(); + this.description = description; + } + + /** + * @return {@link #description} (Information about the specific installation that this conformance statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceImplementationComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Information about the specific installation that this conformance statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ConformanceImplementationComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Information about the specific installation that this conformance statement relates to. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Information about the specific installation that this conformance statement relates to. + */ + public ConformanceImplementationComponent setDescription(String value) { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceImplementationComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ConformanceImplementationComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + */ + public ConformanceImplementationComponent setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("description", "string", "Information about the specific installation that this conformance statement relates to.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("url", "uri", "An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); + } + else + return super.addChild(name); + } + + public ConformanceImplementationComponent copy() { + ConformanceImplementationComponent dst = new ConformanceImplementationComponent(); + copyValues(dst); + dst.description = description == null ? null : description.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceImplementationComponent)) + return false; + ConformanceImplementationComponent o = (ConformanceImplementationComponent) other; + return compareDeep(description, o.description, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceImplementationComponent)) + return false; + ConformanceImplementationComponent o = (ConformanceImplementationComponent) other; + return compareValues(description, o.description, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (description == null || description.isEmpty()) && (url == null || url.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.implementation"; + + } + + } + + @Block() + public static class ConformanceRestComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. + */ + @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="client | server", formalDefinition="Identifies whether this portion of the statement is describing ability to initiate or receive restful operations." ) + protected Enumeration mode; + + /** + * Information about the system's restful capabilities that apply across all applications, such as security. + */ + @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="General description of implementation", formalDefinition="Information about the system's restful capabilities that apply across all applications, such as security." ) + protected StringType documentation; + + /** + * Information about security implementation from an interface perspective - what a client needs to know. + */ + @Child(name = "security", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Information about security of implementation", formalDefinition="Information about security implementation from an interface perspective - what a client needs to know." ) + protected ConformanceRestSecurityComponent security; + + /** + * A specification of the restful capabilities of the solution for a specific resource type. + */ + @Child(name = "resource", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." ) + protected List resource; + + /** + * A specification of restful operations supported by the system. + */ + @Child(name = "interaction", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What operations are supported?", formalDefinition="A specification of restful operations supported by the system." ) + protected List interaction; + + /** + * A code that indicates how transactions are supported. + */ + @Child(name = "transactionMode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="not-supported | batch | transaction | both", formalDefinition="A code that indicates how transactions are supported." ) + protected Enumeration transactionMode; + + /** + * Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. + */ + @Child(name = "searchParam", type = {ConformanceRestResourceSearchParamComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Search params for searching all resources", formalDefinition="Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." ) + protected List searchParam; + + /** + * Definition of an operation or a named query and with its parameters and their meaning and type. + */ + @Child(name = "operation", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Definition of an operation or a custom query", formalDefinition="Definition of an operation or a named query and with its parameters and their meaning and type." ) + protected List operation; + + /** + * An absolute URI which is a reference to the definition of a compartment hosted by the system. + */ + @Child(name = "compartment", type = {UriType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment hosted by the system." ) + protected List compartment; + + private static final long serialVersionUID = 931983837L; + + /* + * Constructor + */ + public ConformanceRestComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceRestComponent(Enumeration mode) { + super(); + this.mode = mode; + } + + /** + * @return {@link #mode} (Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new RestfulConformanceModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public ConformanceRestComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. + */ + public RestfulConformanceMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. + */ + public ConformanceRestComponent setMode(RestfulConformanceMode value) { + if (this.mode == null) + this.mode = new Enumeration(new RestfulConformanceModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ConformanceRestComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Information about the system's restful capabilities that apply across all applications, such as security. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Information about the system's restful capabilities that apply across all applications, such as security. + */ + public ConformanceRestComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) + */ + public ConformanceRestSecurityComponent getSecurity() { + if (this.security == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestComponent.security"); + else if (Configuration.doAutoCreate()) + this.security = new ConformanceRestSecurityComponent(); // cc + return this.security; + } + + public boolean hasSecurity() { + return this.security != null && !this.security.isEmpty(); + } + + /** + * @param value {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) + */ + public ConformanceRestComponent setSecurity(ConformanceRestSecurityComponent value) { + this.security = value; + return this; + } + + /** + * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.) + */ + public List getResource() { + if (this.resource == null) + this.resource = new ArrayList(); + return this.resource; + } + + public boolean hasResource() { + if (this.resource == null) + return false; + for (ConformanceRestResourceComponent item : this.resource) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.) + */ + // syntactic sugar + public ConformanceRestResourceComponent addResource() { //3 + ConformanceRestResourceComponent t = new ConformanceRestResourceComponent(); + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestComponent addResource(ConformanceRestResourceComponent t) { //3 + if (t == null) + return this; + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return this; + } + + /** + * @return {@link #interaction} (A specification of restful operations supported by the system.) + */ + public List getInteraction() { + if (this.interaction == null) + this.interaction = new ArrayList(); + return this.interaction; + } + + public boolean hasInteraction() { + if (this.interaction == null) + return false; + for (SystemInteractionComponent item : this.interaction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #interaction} (A specification of restful operations supported by the system.) + */ + // syntactic sugar + public SystemInteractionComponent addInteraction() { //3 + SystemInteractionComponent t = new SystemInteractionComponent(); + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestComponent addInteraction(SystemInteractionComponent t) { //3 + if (t == null) + return this; + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return this; + } + + /** + * @return {@link #transactionMode} (A code that indicates how transactions are supported.). This is the underlying object with id, value and extensions. The accessor "getTransactionMode" gives direct access to the value + */ + public Enumeration getTransactionModeElement() { + if (this.transactionMode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestComponent.transactionMode"); + else if (Configuration.doAutoCreate()) + this.transactionMode = new Enumeration(new TransactionModeEnumFactory()); // bb + return this.transactionMode; + } + + public boolean hasTransactionModeElement() { + return this.transactionMode != null && !this.transactionMode.isEmpty(); + } + + public boolean hasTransactionMode() { + return this.transactionMode != null && !this.transactionMode.isEmpty(); + } + + /** + * @param value {@link #transactionMode} (A code that indicates how transactions are supported.). This is the underlying object with id, value and extensions. The accessor "getTransactionMode" gives direct access to the value + */ + public ConformanceRestComponent setTransactionModeElement(Enumeration value) { + this.transactionMode = value; + return this; + } + + /** + * @return A code that indicates how transactions are supported. + */ + public TransactionMode getTransactionMode() { + return this.transactionMode == null ? null : this.transactionMode.getValue(); + } + + /** + * @param value A code that indicates how transactions are supported. + */ + public ConformanceRestComponent setTransactionMode(TransactionMode value) { + if (value == null) + this.transactionMode = null; + else { + if (this.transactionMode == null) + this.transactionMode = new Enumeration(new TransactionModeEnumFactory()); + this.transactionMode.setValue(value); + } + return this; + } + + /** + * @return {@link #searchParam} (Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) + */ + public List getSearchParam() { + if (this.searchParam == null) + this.searchParam = new ArrayList(); + return this.searchParam; + } + + public boolean hasSearchParam() { + if (this.searchParam == null) + return false; + for (ConformanceRestResourceSearchParamComponent item : this.searchParam) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #searchParam} (Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) + */ + // syntactic sugar + public ConformanceRestResourceSearchParamComponent addSearchParam() { //3 + ConformanceRestResourceSearchParamComponent t = new ConformanceRestResourceSearchParamComponent(); + if (this.searchParam == null) + this.searchParam = new ArrayList(); + this.searchParam.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestComponent addSearchParam(ConformanceRestResourceSearchParamComponent t) { //3 + if (t == null) + return this; + if (this.searchParam == null) + this.searchParam = new ArrayList(); + this.searchParam.add(t); + return this; + } + + /** + * @return {@link #operation} (Definition of an operation or a named query and with its parameters and their meaning and type.) + */ + public List getOperation() { + if (this.operation == null) + this.operation = new ArrayList(); + return this.operation; + } + + public boolean hasOperation() { + if (this.operation == null) + return false; + for (ConformanceRestOperationComponent item : this.operation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #operation} (Definition of an operation or a named query and with its parameters and their meaning and type.) + */ + // syntactic sugar + public ConformanceRestOperationComponent addOperation() { //3 + ConformanceRestOperationComponent t = new ConformanceRestOperationComponent(); + if (this.operation == null) + this.operation = new ArrayList(); + this.operation.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestComponent addOperation(ConformanceRestOperationComponent t) { //3 + if (t == null) + return this; + if (this.operation == null) + this.operation = new ArrayList(); + this.operation.add(t); + return this; + } + + /** + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public List getCompartment() { + if (this.compartment == null) + this.compartment = new ArrayList(); + return this.compartment; + } + + public boolean hasCompartment() { + if (this.compartment == null) + return false; + for (UriType item : this.compartment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + // syntactic sugar + public UriType addCompartmentElement() {//2 + UriType t = new UriType(); + if (this.compartment == null) + this.compartment = new ArrayList(); + this.compartment.add(t); + return t; + } + + /** + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public ConformanceRestComponent addCompartment(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.compartment == null) + this.compartment = new ArrayList(); + this.compartment.add(t); + return this; + } + + /** + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public boolean hasCompartment(String value) { + if (this.compartment == null) + return false; + for (UriType v : this.compartment) + if (v.equals(value)) // uri + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("mode", "code", "Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("documentation", "string", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("security", "", "Information about security implementation from an interface perspective - what a client needs to know.", 0, java.lang.Integer.MAX_VALUE, security)); + childrenList.add(new Property("resource", "", "A specification of the restful capabilities of the solution for a specific resource type.", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction)); + childrenList.add(new Property("transactionMode", "code", "A code that indicates how transactions are supported.", 0, java.lang.Integer.MAX_VALUE, transactionMode)); + childrenList.add(new Property("searchParam", "@Conformance.rest.resource.searchParam", "Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam)); + childrenList.add(new Property("operation", "", "Definition of an operation or a named query and with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation)); + childrenList.add(new Property("compartment", "uri", "An absolute URI which is a reference to the definition of a compartment hosted by the system.", 0, java.lang.Integer.MAX_VALUE, compartment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("mode")) + this.mode = new RestfulConformanceModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("security")) + this.security = (ConformanceRestSecurityComponent) value; // ConformanceRestSecurityComponent + else if (name.equals("resource")) + this.getResource().add((ConformanceRestResourceComponent) value); + else if (name.equals("interaction")) + this.getInteraction().add((SystemInteractionComponent) value); + else if (name.equals("transactionMode")) + this.transactionMode = new TransactionModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("searchParam")) + this.getSearchParam().add((ConformanceRestResourceSearchParamComponent) value); + else if (name.equals("operation")) + this.getOperation().add((ConformanceRestOperationComponent) value); + else if (name.equals("compartment")) + this.getCompartment().add(castToUri(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else if (name.equals("security")) { + this.security = new ConformanceRestSecurityComponent(); + return this.security; + } + else if (name.equals("resource")) { + return addResource(); + } + else if (name.equals("interaction")) { + return addInteraction(); + } + else if (name.equals("transactionMode")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.transactionMode"); + } + else if (name.equals("searchParam")) { + return addSearchParam(); + } + else if (name.equals("operation")) { + return addOperation(); + } + else if (name.equals("compartment")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.compartment"); + } + else + return super.addChild(name); + } + + public ConformanceRestComponent copy() { + ConformanceRestComponent dst = new ConformanceRestComponent(); + copyValues(dst); + dst.mode = mode == null ? null : mode.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.security = security == null ? null : security.copy(); + if (resource != null) { + dst.resource = new ArrayList(); + for (ConformanceRestResourceComponent i : resource) + dst.resource.add(i.copy()); + }; + if (interaction != null) { + dst.interaction = new ArrayList(); + for (SystemInteractionComponent i : interaction) + dst.interaction.add(i.copy()); + }; + dst.transactionMode = transactionMode == null ? null : transactionMode.copy(); + if (searchParam != null) { + dst.searchParam = new ArrayList(); + for (ConformanceRestResourceSearchParamComponent i : searchParam) + dst.searchParam.add(i.copy()); + }; + if (operation != null) { + dst.operation = new ArrayList(); + for (ConformanceRestOperationComponent i : operation) + dst.operation.add(i.copy()); + }; + if (compartment != null) { + dst.compartment = new ArrayList(); + for (UriType i : compartment) + dst.compartment.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestComponent)) + return false; + ConformanceRestComponent o = (ConformanceRestComponent) other; + return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(security, o.security, true) + && compareDeep(resource, o.resource, true) && compareDeep(interaction, o.interaction, true) && compareDeep(transactionMode, o.transactionMode, true) + && compareDeep(searchParam, o.searchParam, true) && compareDeep(operation, o.operation, true) && compareDeep(compartment, o.compartment, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestComponent)) + return false; + ConformanceRestComponent o = (ConformanceRestComponent) other; + return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) && compareValues(transactionMode, o.transactionMode, true) + && compareValues(compartment, o.compartment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (security == null || security.isEmpty()) && (resource == null || resource.isEmpty()) && (interaction == null || interaction.isEmpty()) + && (transactionMode == null || transactionMode.isEmpty()) && (searchParam == null || searchParam.isEmpty()) + && (operation == null || operation.isEmpty()) && (compartment == null || compartment.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest"; + + } + + } + + @Block() + public static class ConformanceRestSecurityComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Server adds CORS headers when responding to requests - this enables javascript applications to use the server. + */ + @Child(name = "cors", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Adds CORS Headers (http://enable-cors.org/)", formalDefinition="Server adds CORS headers when responding to requests - this enables javascript applications to use the server." ) + protected BooleanType cors; + + /** + * Types of security services are supported/required by the system. + */ + @Child(name = "service", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", formalDefinition="Types of security services are supported/required by the system." ) + protected List service; + + /** + * General description of how security works. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="General description of how security works", formalDefinition="General description of how security works." ) + protected StringType description; + + /** + * Certificates associated with security profiles. + */ + @Child(name = "certificate", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Certificates associated with security profiles", formalDefinition="Certificates associated with security profiles." ) + protected List certificate; + + private static final long serialVersionUID = 391663952L; + + /* + * Constructor + */ + public ConformanceRestSecurityComponent() { + super(); + } + + /** + * @return {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value + */ + public BooleanType getCorsElement() { + if (this.cors == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestSecurityComponent.cors"); + else if (Configuration.doAutoCreate()) + this.cors = new BooleanType(); // bb + return this.cors; + } + + public boolean hasCorsElement() { + return this.cors != null && !this.cors.isEmpty(); + } + + public boolean hasCors() { + return this.cors != null && !this.cors.isEmpty(); + } + + /** + * @param value {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value + */ + public ConformanceRestSecurityComponent setCorsElement(BooleanType value) { + this.cors = value; + return this; + } + + /** + * @return Server adds CORS headers when responding to requests - this enables javascript applications to use the server. + */ + public boolean getCors() { + return this.cors == null || this.cors.isEmpty() ? false : this.cors.getValue(); + } + + /** + * @param value Server adds CORS headers when responding to requests - this enables javascript applications to use the server. + */ + public ConformanceRestSecurityComponent setCors(boolean value) { + if (this.cors == null) + this.cors = new BooleanType(); + this.cors.setValue(value); + return this; + } + + /** + * @return {@link #service} (Types of security services are supported/required by the system.) + */ + public List getService() { + if (this.service == null) + this.service = new ArrayList(); + return this.service; + } + + public boolean hasService() { + if (this.service == null) + return false; + for (CodeableConcept item : this.service) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #service} (Types of security services are supported/required by the system.) + */ + // syntactic sugar + public CodeableConcept addService() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.service == null) + this.service = new ArrayList(); + this.service.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestSecurityComponent addService(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.service == null) + this.service = new ArrayList(); + this.service.add(t); + return this; + } + + /** + * @return {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestSecurityComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ConformanceRestSecurityComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return General description of how security works. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value General description of how security works. + */ + public ConformanceRestSecurityComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #certificate} (Certificates associated with security profiles.) + */ + public List getCertificate() { + if (this.certificate == null) + this.certificate = new ArrayList(); + return this.certificate; + } + + public boolean hasCertificate() { + if (this.certificate == null) + return false; + for (ConformanceRestSecurityCertificateComponent item : this.certificate) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #certificate} (Certificates associated with security profiles.) + */ + // syntactic sugar + public ConformanceRestSecurityCertificateComponent addCertificate() { //3 + ConformanceRestSecurityCertificateComponent t = new ConformanceRestSecurityCertificateComponent(); + if (this.certificate == null) + this.certificate = new ArrayList(); + this.certificate.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestSecurityComponent addCertificate(ConformanceRestSecurityCertificateComponent t) { //3 + if (t == null) + return this; + if (this.certificate == null) + this.certificate = new ArrayList(); + this.certificate.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("cors", "boolean", "Server adds CORS headers when responding to requests - this enables javascript applications to use the server.", 0, java.lang.Integer.MAX_VALUE, cors)); + childrenList.add(new Property("service", "CodeableConcept", "Types of security services are supported/required by the system.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("description", "string", "General description of how security works.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("certificate", "", "Certificates associated with security profiles.", 0, java.lang.Integer.MAX_VALUE, certificate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("cors")) + this.cors = castToBoolean(value); // BooleanType + else if (name.equals("service")) + this.getService().add(castToCodeableConcept(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("certificate")) + this.getCertificate().add((ConformanceRestSecurityCertificateComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("cors")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.cors"); + } + else if (name.equals("service")) { + return addService(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + } + else if (name.equals("certificate")) { + return addCertificate(); + } + else + return super.addChild(name); + } + + public ConformanceRestSecurityComponent copy() { + ConformanceRestSecurityComponent dst = new ConformanceRestSecurityComponent(); + copyValues(dst); + dst.cors = cors == null ? null : cors.copy(); + if (service != null) { + dst.service = new ArrayList(); + for (CodeableConcept i : service) + dst.service.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + if (certificate != null) { + dst.certificate = new ArrayList(); + for (ConformanceRestSecurityCertificateComponent i : certificate) + dst.certificate.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestSecurityComponent)) + return false; + ConformanceRestSecurityComponent o = (ConformanceRestSecurityComponent) other; + return compareDeep(cors, o.cors, true) && compareDeep(service, o.service, true) && compareDeep(description, o.description, true) + && compareDeep(certificate, o.certificate, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestSecurityComponent)) + return false; + ConformanceRestSecurityComponent o = (ConformanceRestSecurityComponent) other; + return compareValues(cors, o.cors, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (cors == null || cors.isEmpty()) && (service == null || service.isEmpty()) + && (description == null || description.isEmpty()) && (certificate == null || certificate.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.security"; + + } + + } + + @Block() + public static class ConformanceRestSecurityCertificateComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Mime type for certificate. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Mime type for certificate", formalDefinition="Mime type for certificate." ) + protected CodeType type; + + /** + * Actual certificate. + */ + @Child(name = "blob", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Actual certificate", formalDefinition="Actual certificate." ) + protected Base64BinaryType blob; + + private static final long serialVersionUID = 2092655854L; + + /* + * Constructor + */ + public ConformanceRestSecurityCertificateComponent() { + super(); + } + + /** + * @return {@link #type} (Mime type for certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestSecurityCertificateComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Mime type for certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ConformanceRestSecurityCertificateComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return Mime type for certificate. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Mime type for certificate. + */ + public ConformanceRestSecurityCertificateComponent setType(String value) { + if (Utilities.noString(value)) + this.type = null; + else { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + */ + public Base64BinaryType getBlobElement() { + if (this.blob == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestSecurityCertificateComponent.blob"); + else if (Configuration.doAutoCreate()) + this.blob = new Base64BinaryType(); // bb + return this.blob; + } + + public boolean hasBlobElement() { + return this.blob != null && !this.blob.isEmpty(); + } + + public boolean hasBlob() { + return this.blob != null && !this.blob.isEmpty(); + } + + /** + * @param value {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + */ + public ConformanceRestSecurityCertificateComponent setBlobElement(Base64BinaryType value) { + this.blob = value; + return this; + } + + /** + * @return Actual certificate. + */ + public byte[] getBlob() { + return this.blob == null ? null : this.blob.getValue(); + } + + /** + * @param value Actual certificate. + */ + public ConformanceRestSecurityCertificateComponent setBlob(byte[] value) { + if (value == null) + this.blob = null; + else { + if (this.blob == null) + this.blob = new Base64BinaryType(); + this.blob.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Mime type for certificate.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("blob", "base64Binary", "Actual certificate.", 0, java.lang.Integer.MAX_VALUE, blob)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("blob")) + this.blob = castToBase64Binary(value); // Base64BinaryType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + } + else if (name.equals("blob")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.blob"); + } + else + return super.addChild(name); + } + + public ConformanceRestSecurityCertificateComponent copy() { + ConformanceRestSecurityCertificateComponent dst = new ConformanceRestSecurityCertificateComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.blob = blob == null ? null : blob.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestSecurityCertificateComponent)) + return false; + ConformanceRestSecurityCertificateComponent o = (ConformanceRestSecurityCertificateComponent) other; + return compareDeep(type, o.type, true) && compareDeep(blob, o.blob, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestSecurityCertificateComponent)) + return false; + ConformanceRestSecurityCertificateComponent o = (ConformanceRestSecurityCertificateComponent) other; + return compareValues(type, o.type, true) && compareValues(blob, o.blob, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (blob == null || blob.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.security.certificate"; + + } + + } + + @Block() + public static class ConformanceRestResourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A type of resource exposed via the restful interface. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="A resource type that is supported", formalDefinition="A type of resource exposed via the restful interface." ) + protected CodeType type; + + /** + * A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Base System profile for all uses of resource", formalDefinition="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + protected StructureDefinition profileTarget; + + /** + * Identifies a restful operation supported by the solution. + */ + @Child(name = "interaction", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What operations are supported?", formalDefinition="Identifies a restful operation supported by the solution." ) + protected List interaction; + + /** + * This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. + */ + @Child(name = "versioning", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="no-version | versioned | versioned-update", formalDefinition="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API." ) + protected Enumeration versioning; + + /** + * A flag for whether the server is able to return past versions as part of the vRead operation. + */ + @Child(name = "readHistory", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether vRead can return past versions", formalDefinition="A flag for whether the server is able to return past versions as part of the vRead operation." ) + protected BooleanType readHistory; + + /** + * A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. + */ + @Child(name = "updateCreate", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If update can commit to a new identity", formalDefinition="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server." ) + protected BooleanType updateCreate; + + /** + * A flag that indicates that the server supports conditional create. + */ + @Child(name = "conditionalCreate", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If allows/uses conditional create", formalDefinition="A flag that indicates that the server supports conditional create." ) + protected BooleanType conditionalCreate; + + /** + * A flag that indicates that the server supports conditional update. + */ + @Child(name = "conditionalUpdate", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If allows/uses conditional update", formalDefinition="A flag that indicates that the server supports conditional update." ) + protected BooleanType conditionalUpdate; + + /** + * A code that indicates how the server supports conditional delete. + */ + @Child(name = "conditionalDelete", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="not-supported | single | multiple - how conditional delete is supported", formalDefinition="A code that indicates how the server supports conditional delete." ) + protected Enumeration conditionalDelete; + + /** + * A list of _include values supported by the server. + */ + @Child(name = "searchInclude", type = {StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="_include values supported by the server", formalDefinition="A list of _include values supported by the server." ) + protected List searchInclude; + + /** + * A list of _revinclude (reverse include) values supported by the server. + */ + @Child(name = "searchRevInclude", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="_revinclude values supported by the server", formalDefinition="A list of _revinclude (reverse include) values supported by the server." ) + protected List searchRevInclude; + + /** + * Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. + */ + @Child(name = "searchParam", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Search params supported by implementation", formalDefinition="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." ) + protected List searchParam; + + private static final long serialVersionUID = 1781959905L; + + /* + * Constructor + */ + public ConformanceRestResourceComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceRestResourceComponent(CodeType type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ConformanceRestResourceComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return A type of resource exposed via the restful interface. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value A type of resource exposed via the restful interface. + */ + public ConformanceRestResourceComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public ConformanceRestResourceComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public ConformanceRestResourceComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + /** + * @return {@link #interaction} (Identifies a restful operation supported by the solution.) + */ + public List getInteraction() { + if (this.interaction == null) + this.interaction = new ArrayList(); + return this.interaction; + } + + public boolean hasInteraction() { + if (this.interaction == null) + return false; + for (ResourceInteractionComponent item : this.interaction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #interaction} (Identifies a restful operation supported by the solution.) + */ + // syntactic sugar + public ResourceInteractionComponent addInteraction() { //3 + ResourceInteractionComponent t = new ResourceInteractionComponent(); + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestResourceComponent addInteraction(ResourceInteractionComponent t) { //3 + if (t == null) + return this; + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return this; + } + + /** + * @return {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value + */ + public Enumeration getVersioningElement() { + if (this.versioning == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.versioning"); + else if (Configuration.doAutoCreate()) + this.versioning = new Enumeration(new ResourceVersionPolicyEnumFactory()); // bb + return this.versioning; + } + + public boolean hasVersioningElement() { + return this.versioning != null && !this.versioning.isEmpty(); + } + + public boolean hasVersioning() { + return this.versioning != null && !this.versioning.isEmpty(); + } + + /** + * @param value {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value + */ + public ConformanceRestResourceComponent setVersioningElement(Enumeration value) { + this.versioning = value; + return this; + } + + /** + * @return This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. + */ + public ResourceVersionPolicy getVersioning() { + return this.versioning == null ? null : this.versioning.getValue(); + } + + /** + * @param value This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. + */ + public ConformanceRestResourceComponent setVersioning(ResourceVersionPolicy value) { + if (value == null) + this.versioning = null; + else { + if (this.versioning == null) + this.versioning = new Enumeration(new ResourceVersionPolicyEnumFactory()); + this.versioning.setValue(value); + } + return this; + } + + /** + * @return {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value + */ + public BooleanType getReadHistoryElement() { + if (this.readHistory == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.readHistory"); + else if (Configuration.doAutoCreate()) + this.readHistory = new BooleanType(); // bb + return this.readHistory; + } + + public boolean hasReadHistoryElement() { + return this.readHistory != null && !this.readHistory.isEmpty(); + } + + public boolean hasReadHistory() { + return this.readHistory != null && !this.readHistory.isEmpty(); + } + + /** + * @param value {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value + */ + public ConformanceRestResourceComponent setReadHistoryElement(BooleanType value) { + this.readHistory = value; + return this; + } + + /** + * @return A flag for whether the server is able to return past versions as part of the vRead operation. + */ + public boolean getReadHistory() { + return this.readHistory == null || this.readHistory.isEmpty() ? false : this.readHistory.getValue(); + } + + /** + * @param value A flag for whether the server is able to return past versions as part of the vRead operation. + */ + public ConformanceRestResourceComponent setReadHistory(boolean value) { + if (this.readHistory == null) + this.readHistory = new BooleanType(); + this.readHistory.setValue(value); + return this; + } + + /** + * @return {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value + */ + public BooleanType getUpdateCreateElement() { + if (this.updateCreate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.updateCreate"); + else if (Configuration.doAutoCreate()) + this.updateCreate = new BooleanType(); // bb + return this.updateCreate; + } + + public boolean hasUpdateCreateElement() { + return this.updateCreate != null && !this.updateCreate.isEmpty(); + } + + public boolean hasUpdateCreate() { + return this.updateCreate != null && !this.updateCreate.isEmpty(); + } + + /** + * @param value {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value + */ + public ConformanceRestResourceComponent setUpdateCreateElement(BooleanType value) { + this.updateCreate = value; + return this; + } + + /** + * @return A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. + */ + public boolean getUpdateCreate() { + return this.updateCreate == null || this.updateCreate.isEmpty() ? false : this.updateCreate.getValue(); + } + + /** + * @param value A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. + */ + public ConformanceRestResourceComponent setUpdateCreate(boolean value) { + if (this.updateCreate == null) + this.updateCreate = new BooleanType(); + this.updateCreate.setValue(value); + return this; + } + + /** + * @return {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value + */ + public BooleanType getConditionalCreateElement() { + if (this.conditionalCreate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalCreate"); + else if (Configuration.doAutoCreate()) + this.conditionalCreate = new BooleanType(); // bb + return this.conditionalCreate; + } + + public boolean hasConditionalCreateElement() { + return this.conditionalCreate != null && !this.conditionalCreate.isEmpty(); + } + + public boolean hasConditionalCreate() { + return this.conditionalCreate != null && !this.conditionalCreate.isEmpty(); + } + + /** + * @param value {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value + */ + public ConformanceRestResourceComponent setConditionalCreateElement(BooleanType value) { + this.conditionalCreate = value; + return this; + } + + /** + * @return A flag that indicates that the server supports conditional create. + */ + public boolean getConditionalCreate() { + return this.conditionalCreate == null || this.conditionalCreate.isEmpty() ? false : this.conditionalCreate.getValue(); + } + + /** + * @param value A flag that indicates that the server supports conditional create. + */ + public ConformanceRestResourceComponent setConditionalCreate(boolean value) { + if (this.conditionalCreate == null) + this.conditionalCreate = new BooleanType(); + this.conditionalCreate.setValue(value); + return this; + } + + /** + * @return {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value + */ + public BooleanType getConditionalUpdateElement() { + if (this.conditionalUpdate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalUpdate"); + else if (Configuration.doAutoCreate()) + this.conditionalUpdate = new BooleanType(); // bb + return this.conditionalUpdate; + } + + public boolean hasConditionalUpdateElement() { + return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty(); + } + + public boolean hasConditionalUpdate() { + return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty(); + } + + /** + * @param value {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value + */ + public ConformanceRestResourceComponent setConditionalUpdateElement(BooleanType value) { + this.conditionalUpdate = value; + return this; + } + + /** + * @return A flag that indicates that the server supports conditional update. + */ + public boolean getConditionalUpdate() { + return this.conditionalUpdate == null || this.conditionalUpdate.isEmpty() ? false : this.conditionalUpdate.getValue(); + } + + /** + * @param value A flag that indicates that the server supports conditional update. + */ + public ConformanceRestResourceComponent setConditionalUpdate(boolean value) { + if (this.conditionalUpdate == null) + this.conditionalUpdate = new BooleanType(); + this.conditionalUpdate.setValue(value); + return this; + } + + /** + * @return {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value + */ + public Enumeration getConditionalDeleteElement() { + if (this.conditionalDelete == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalDelete"); + else if (Configuration.doAutoCreate()) + this.conditionalDelete = new Enumeration(new ConditionalDeleteStatusEnumFactory()); // bb + return this.conditionalDelete; + } + + public boolean hasConditionalDeleteElement() { + return this.conditionalDelete != null && !this.conditionalDelete.isEmpty(); + } + + public boolean hasConditionalDelete() { + return this.conditionalDelete != null && !this.conditionalDelete.isEmpty(); + } + + /** + * @param value {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value + */ + public ConformanceRestResourceComponent setConditionalDeleteElement(Enumeration value) { + this.conditionalDelete = value; + return this; + } + + /** + * @return A code that indicates how the server supports conditional delete. + */ + public ConditionalDeleteStatus getConditionalDelete() { + return this.conditionalDelete == null ? null : this.conditionalDelete.getValue(); + } + + /** + * @param value A code that indicates how the server supports conditional delete. + */ + public ConformanceRestResourceComponent setConditionalDelete(ConditionalDeleteStatus value) { + if (value == null) + this.conditionalDelete = null; + else { + if (this.conditionalDelete == null) + this.conditionalDelete = new Enumeration(new ConditionalDeleteStatusEnumFactory()); + this.conditionalDelete.setValue(value); + } + return this; + } + + /** + * @return {@link #searchInclude} (A list of _include values supported by the server.) + */ + public List getSearchInclude() { + if (this.searchInclude == null) + this.searchInclude = new ArrayList(); + return this.searchInclude; + } + + public boolean hasSearchInclude() { + if (this.searchInclude == null) + return false; + for (StringType item : this.searchInclude) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #searchInclude} (A list of _include values supported by the server.) + */ + // syntactic sugar + public StringType addSearchIncludeElement() {//2 + StringType t = new StringType(); + if (this.searchInclude == null) + this.searchInclude = new ArrayList(); + this.searchInclude.add(t); + return t; + } + + /** + * @param value {@link #searchInclude} (A list of _include values supported by the server.) + */ + public ConformanceRestResourceComponent addSearchInclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.searchInclude == null) + this.searchInclude = new ArrayList(); + this.searchInclude.add(t); + return this; + } + + /** + * @param value {@link #searchInclude} (A list of _include values supported by the server.) + */ + public boolean hasSearchInclude(String value) { + if (this.searchInclude == null) + return false; + for (StringType v : this.searchInclude) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) + */ + public List getSearchRevInclude() { + if (this.searchRevInclude == null) + this.searchRevInclude = new ArrayList(); + return this.searchRevInclude; + } + + public boolean hasSearchRevInclude() { + if (this.searchRevInclude == null) + return false; + for (StringType item : this.searchRevInclude) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) + */ + // syntactic sugar + public StringType addSearchRevIncludeElement() {//2 + StringType t = new StringType(); + if (this.searchRevInclude == null) + this.searchRevInclude = new ArrayList(); + this.searchRevInclude.add(t); + return t; + } + + /** + * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) + */ + public ConformanceRestResourceComponent addSearchRevInclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.searchRevInclude == null) + this.searchRevInclude = new ArrayList(); + this.searchRevInclude.add(t); + return this; + } + + /** + * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) + */ + public boolean hasSearchRevInclude(String value) { + if (this.searchRevInclude == null) + return false; + for (StringType v : this.searchRevInclude) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #searchParam} (Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) + */ + public List getSearchParam() { + if (this.searchParam == null) + this.searchParam = new ArrayList(); + return this.searchParam; + } + + public boolean hasSearchParam() { + if (this.searchParam == null) + return false; + for (ConformanceRestResourceSearchParamComponent item : this.searchParam) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #searchParam} (Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) + */ + // syntactic sugar + public ConformanceRestResourceSearchParamComponent addSearchParam() { //3 + ConformanceRestResourceSearchParamComponent t = new ConformanceRestResourceSearchParamComponent(); + if (this.searchParam == null) + this.searchParam = new ArrayList(); + this.searchParam.add(t); + return t; + } + + // syntactic sugar + public ConformanceRestResourceComponent addSearchParam(ConformanceRestResourceSearchParamComponent t) { //3 + if (t == null) + return this; + if (this.searchParam == null) + this.searchParam = new ArrayList(); + this.searchParam.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "A type of resource exposed via the restful interface.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction)); + childrenList.add(new Property("versioning", "code", "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", 0, java.lang.Integer.MAX_VALUE, versioning)); + childrenList.add(new Property("readHistory", "boolean", "A flag for whether the server is able to return past versions as part of the vRead operation.", 0, java.lang.Integer.MAX_VALUE, readHistory)); + childrenList.add(new Property("updateCreate", "boolean", "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", 0, java.lang.Integer.MAX_VALUE, updateCreate)); + childrenList.add(new Property("conditionalCreate", "boolean", "A flag that indicates that the server supports conditional create.", 0, java.lang.Integer.MAX_VALUE, conditionalCreate)); + childrenList.add(new Property("conditionalUpdate", "boolean", "A flag that indicates that the server supports conditional update.", 0, java.lang.Integer.MAX_VALUE, conditionalUpdate)); + childrenList.add(new Property("conditionalDelete", "code", "A code that indicates how the server supports conditional delete.", 0, java.lang.Integer.MAX_VALUE, conditionalDelete)); + childrenList.add(new Property("searchInclude", "string", "A list of _include values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchInclude)); + childrenList.add(new Property("searchRevInclude", "string", "A list of _revinclude (reverse include) values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchRevInclude)); + childrenList.add(new Property("searchParam", "", "Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else if (name.equals("interaction")) + this.getInteraction().add((ResourceInteractionComponent) value); + else if (name.equals("versioning")) + this.versioning = new ResourceVersionPolicyEnumFactory().fromType(value); // Enumeration + else if (name.equals("readHistory")) + this.readHistory = castToBoolean(value); // BooleanType + else if (name.equals("updateCreate")) + this.updateCreate = castToBoolean(value); // BooleanType + else if (name.equals("conditionalCreate")) + this.conditionalCreate = castToBoolean(value); // BooleanType + else if (name.equals("conditionalUpdate")) + this.conditionalUpdate = castToBoolean(value); // BooleanType + else if (name.equals("conditionalDelete")) + this.conditionalDelete = new ConditionalDeleteStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("searchInclude")) + this.getSearchInclude().add(castToString(value)); + else if (name.equals("searchRevInclude")) + this.getSearchRevInclude().add(castToString(value)); + else if (name.equals("searchParam")) + this.getSearchParam().add((ConformanceRestResourceSearchParamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else if (name.equals("interaction")) { + return addInteraction(); + } + else if (name.equals("versioning")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.versioning"); + } + else if (name.equals("readHistory")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.readHistory"); + } + else if (name.equals("updateCreate")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.updateCreate"); + } + else if (name.equals("conditionalCreate")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalCreate"); + } + else if (name.equals("conditionalUpdate")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalUpdate"); + } + else if (name.equals("conditionalDelete")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalDelete"); + } + else if (name.equals("searchInclude")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchInclude"); + } + else if (name.equals("searchRevInclude")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchRevInclude"); + } + else if (name.equals("searchParam")) { + return addSearchParam(); + } + else + return super.addChild(name); + } + + public ConformanceRestResourceComponent copy() { + ConformanceRestResourceComponent dst = new ConformanceRestResourceComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + if (interaction != null) { + dst.interaction = new ArrayList(); + for (ResourceInteractionComponent i : interaction) + dst.interaction.add(i.copy()); + }; + dst.versioning = versioning == null ? null : versioning.copy(); + dst.readHistory = readHistory == null ? null : readHistory.copy(); + dst.updateCreate = updateCreate == null ? null : updateCreate.copy(); + dst.conditionalCreate = conditionalCreate == null ? null : conditionalCreate.copy(); + dst.conditionalUpdate = conditionalUpdate == null ? null : conditionalUpdate.copy(); + dst.conditionalDelete = conditionalDelete == null ? null : conditionalDelete.copy(); + if (searchInclude != null) { + dst.searchInclude = new ArrayList(); + for (StringType i : searchInclude) + dst.searchInclude.add(i.copy()); + }; + if (searchRevInclude != null) { + dst.searchRevInclude = new ArrayList(); + for (StringType i : searchRevInclude) + dst.searchRevInclude.add(i.copy()); + }; + if (searchParam != null) { + dst.searchParam = new ArrayList(); + for (ConformanceRestResourceSearchParamComponent i : searchParam) + dst.searchParam.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestResourceComponent)) + return false; + ConformanceRestResourceComponent o = (ConformanceRestResourceComponent) other; + return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(interaction, o.interaction, true) + && compareDeep(versioning, o.versioning, true) && compareDeep(readHistory, o.readHistory, true) + && compareDeep(updateCreate, o.updateCreate, true) && compareDeep(conditionalCreate, o.conditionalCreate, true) + && compareDeep(conditionalUpdate, o.conditionalUpdate, true) && compareDeep(conditionalDelete, o.conditionalDelete, true) + && compareDeep(searchInclude, o.searchInclude, true) && compareDeep(searchRevInclude, o.searchRevInclude, true) + && compareDeep(searchParam, o.searchParam, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestResourceComponent)) + return false; + ConformanceRestResourceComponent o = (ConformanceRestResourceComponent) other; + return compareValues(type, o.type, true) && compareValues(versioning, o.versioning, true) && compareValues(readHistory, o.readHistory, true) + && compareValues(updateCreate, o.updateCreate, true) && compareValues(conditionalCreate, o.conditionalCreate, true) + && compareValues(conditionalUpdate, o.conditionalUpdate, true) && compareValues(conditionalDelete, o.conditionalDelete, true) + && compareValues(searchInclude, o.searchInclude, true) && compareValues(searchRevInclude, o.searchRevInclude, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) + && (interaction == null || interaction.isEmpty()) && (versioning == null || versioning.isEmpty()) + && (readHistory == null || readHistory.isEmpty()) && (updateCreate == null || updateCreate.isEmpty()) + && (conditionalCreate == null || conditionalCreate.isEmpty()) && (conditionalUpdate == null || conditionalUpdate.isEmpty()) + && (conditionalDelete == null || conditionalDelete.isEmpty()) && (searchInclude == null || searchInclude.isEmpty()) + && (searchRevInclude == null || searchRevInclude.isEmpty()) && (searchParam == null || searchParam.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.resource"; + + } + + } + + @Block() + public static class ResourceInteractionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Coded identifier of the operation, supported by the system resource. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="read | vread | update | delete | history-instance | validate | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." ) + protected Enumeration code; + + /** + * Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. + */ + @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'." ) + protected StringType documentation; + + private static final long serialVersionUID = -437507806L; + + /* + * Constructor + */ + public ResourceInteractionComponent() { + super(); + } + + /* + * Constructor + */ + public ResourceInteractionComponent(Enumeration code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ResourceInteractionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new TypeRestfulInteractionEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public ResourceInteractionComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return Coded identifier of the operation, supported by the system resource. + */ + public TypeRestfulInteraction getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Coded identifier of the operation, supported by the system resource. + */ + public ResourceInteractionComponent setCode(TypeRestfulInteraction value) { + if (this.code == null) + this.code = new Enumeration(new TypeRestfulInteractionEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ResourceInteractionComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ResourceInteractionComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. + */ + public ResourceInteractionComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("documentation", "string", "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = new TypeRestfulInteractionEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else + return super.addChild(name); + } + + public ResourceInteractionComponent copy() { + ResourceInteractionComponent dst = new ResourceInteractionComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ResourceInteractionComponent)) + return false; + ResourceInteractionComponent o = (ResourceInteractionComponent) other; + return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ResourceInteractionComponent)) + return false; + ResourceInteractionComponent o = (ResourceInteractionComponent) other; + return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.resource.interaction"; + + } + + } + + @Block() + public static class ConformanceRestResourceSearchParamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the search parameter used in the interface. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the search parameter used in the interface." ) + protected StringType name; + + /** + * An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). + */ + @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Source of definition for parameter", formalDefinition="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]])." ) + protected UriType definition; + + /** + * The type of value a search parameter refers to, and how the content is interpreted. + */ + @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) + protected Enumeration type; + + /** + * This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. + */ + @Child(name = "documentation", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Server-specific usage", formalDefinition="This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms." ) + protected StringType documentation; + + /** + * Types of resource (if a resource is referenced). + */ + @Child(name = "target", type = {CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) + protected List target; + + /** + * A modifier supported for the search parameter. + */ + @Child(name = "modifier", type = {CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="missing | exact | contains | not | text | in | not-in | below | above | type", formalDefinition="A modifier supported for the search parameter." ) + protected List> modifier; + + /** + * Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type. + */ + @Child(name = "chain", type = {StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Chained names supported", formalDefinition="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type." ) + protected List chain; + + private static final long serialVersionUID = -1020405086L; + + /* + * Constructor + */ + public ConformanceRestResourceSearchParamComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceRestResourceSearchParamComponent(StringType name, Enumeration type) { + super(); + this.name = name; + this.type = type; + } + + /** + * @return {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConformanceRestResourceSearchParamComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the search parameter used in the interface. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the search parameter used in the interface. + */ + public ConformanceRestResourceSearchParamComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public UriType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new UriType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public ConformanceRestResourceSearchParamComponent setDefinitionElement(UriType value) { + this.definition = value; + return this; + } + + /** + * @return An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). + */ + public ConformanceRestResourceSearchParamComponent setDefinition(String value) { + if (Utilities.noString(value)) + this.definition = null; + else { + if (this.definition == null) + this.definition = new UriType(); + this.definition.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new SearchParamTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ConformanceRestResourceSearchParamComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of value a search parameter refers to, and how the content is interpreted. + */ + public SearchParamType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of value a search parameter refers to, and how the content is interpreted. + */ + public ConformanceRestResourceSearchParamComponent setType(SearchParamType value) { + if (this.type == null) + this.type = new Enumeration(new SearchParamTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ConformanceRestResourceSearchParamComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. + */ + public ConformanceRestResourceSearchParamComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (Types of resource (if a resource is referenced).) + */ + public List getTarget() { + if (this.target == null) + this.target = new ArrayList(); + return this.target; + } + + public boolean hasTarget() { + if (this.target == null) + return false; + for (CodeType item : this.target) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #target} (Types of resource (if a resource is referenced).) + */ + // syntactic sugar + public CodeType addTargetElement() {//2 + CodeType t = new CodeType(); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return t; + } + + /** + * @param value {@link #target} (Types of resource (if a resource is referenced).) + */ + public ConformanceRestResourceSearchParamComponent addTarget(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return this; + } + + /** + * @param value {@link #target} (Types of resource (if a resource is referenced).) + */ + public boolean hasTarget(String value) { + if (this.target == null) + return false; + for (CodeType v : this.target) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #modifier} (A modifier supported for the search parameter.) + */ + public List> getModifier() { + if (this.modifier == null) + this.modifier = new ArrayList>(); + return this.modifier; + } + + public boolean hasModifier() { + if (this.modifier == null) + return false; + for (Enumeration item : this.modifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifier} (A modifier supported for the search parameter.) + */ + // syntactic sugar + public Enumeration addModifierElement() {//2 + Enumeration t = new Enumeration(new SearchModifierCodeEnumFactory()); + if (this.modifier == null) + this.modifier = new ArrayList>(); + this.modifier.add(t); + return t; + } + + /** + * @param value {@link #modifier} (A modifier supported for the search parameter.) + */ + public ConformanceRestResourceSearchParamComponent addModifier(SearchModifierCode value) { //1 + Enumeration t = new Enumeration(new SearchModifierCodeEnumFactory()); + t.setValue(value); + if (this.modifier == null) + this.modifier = new ArrayList>(); + this.modifier.add(t); + return this; + } + + /** + * @param value {@link #modifier} (A modifier supported for the search parameter.) + */ + public boolean hasModifier(SearchModifierCode value) { + if (this.modifier == null) + return false; + for (Enumeration v : this.modifier) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) + */ + public List getChain() { + if (this.chain == null) + this.chain = new ArrayList(); + return this.chain; + } + + public boolean hasChain() { + if (this.chain == null) + return false; + for (StringType item : this.chain) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) + */ + // syntactic sugar + public StringType addChainElement() {//2 + StringType t = new StringType(); + if (this.chain == null) + this.chain = new ArrayList(); + this.chain.add(t); + return t; + } + + /** + * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) + */ + public ConformanceRestResourceSearchParamComponent addChain(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.chain == null) + this.chain = new ArrayList(); + this.chain.add(t); + return this; + } + + /** + * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) + */ + public boolean hasChain(String value) { + if (this.chain == null) + return false; + for (StringType v : this.chain) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the search parameter used in the interface.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("definition", "uri", "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("documentation", "string", "This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("definition")) + this.definition = castToUri(value); // UriType + else if (name.equals("type")) + this.type = new SearchParamTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("target")) + this.getTarget().add(castToCode(value)); + else if (name.equals("modifier")) + this.getModifier().add(new SearchModifierCodeEnumFactory().fromType(value)); + else if (name.equals("chain")) + this.getChain().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.definition"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else if (name.equals("target")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.target"); + } + else if (name.equals("modifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.modifier"); + } + else if (name.equals("chain")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.chain"); + } + else + return super.addChild(name); + } + + public ConformanceRestResourceSearchParamComponent copy() { + ConformanceRestResourceSearchParamComponent dst = new ConformanceRestResourceSearchParamComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.definition = definition == null ? null : definition.copy(); + dst.type = type == null ? null : type.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + if (target != null) { + dst.target = new ArrayList(); + for (CodeType i : target) + dst.target.add(i.copy()); + }; + if (modifier != null) { + dst.modifier = new ArrayList>(); + for (Enumeration i : modifier) + dst.modifier.add(i.copy()); + }; + if (chain != null) { + dst.chain = new ArrayList(); + for (StringType i : chain) + dst.chain.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestResourceSearchParamComponent)) + return false; + ConformanceRestResourceSearchParamComponent o = (ConformanceRestResourceSearchParamComponent) other; + return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true) && compareDeep(type, o.type, true) + && compareDeep(documentation, o.documentation, true) && compareDeep(target, o.target, true) && compareDeep(modifier, o.modifier, true) + && compareDeep(chain, o.chain, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestResourceSearchParamComponent)) + return false; + ConformanceRestResourceSearchParamComponent o = (ConformanceRestResourceSearchParamComponent) other; + return compareValues(name, o.name, true) && compareValues(definition, o.definition, true) && compareValues(type, o.type, true) + && compareValues(documentation, o.documentation, true) && compareValues(target, o.target, true) && compareValues(modifier, o.modifier, true) + && compareValues(chain, o.chain, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) + && (type == null || type.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (target == null || target.isEmpty()) && (modifier == null || modifier.isEmpty()) && (chain == null || chain.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.resource.searchParam"; + + } + + } + + @Block() + public static class SystemInteractionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A coded identifier of the operation, supported by the system. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="transaction | search-system | history-system", formalDefinition="A coded identifier of the operation, supported by the system." ) + protected Enumeration code; + + /** + * Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. + */ + @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented." ) + protected StringType documentation; + + private static final long serialVersionUID = 510675287L; + + /* + * Constructor + */ + public SystemInteractionComponent() { + super(); + } + + /* + * Constructor + */ + public SystemInteractionComponent(Enumeration code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SystemInteractionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new SystemRestfulInteractionEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public SystemInteractionComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return A coded identifier of the operation, supported by the system. + */ + public SystemRestfulInteraction getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value A coded identifier of the operation, supported by the system. + */ + public SystemInteractionComponent setCode(SystemRestfulInteraction value) { + if (this.code == null) + this.code = new Enumeration(new SystemRestfulInteractionEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SystemInteractionComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public SystemInteractionComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. + */ + public SystemInteractionComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("documentation", "string", "Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = new SystemRestfulInteractionEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else + return super.addChild(name); + } + + public SystemInteractionComponent copy() { + SystemInteractionComponent dst = new SystemInteractionComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SystemInteractionComponent)) + return false; + SystemInteractionComponent o = (SystemInteractionComponent) other; + return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SystemInteractionComponent)) + return false; + SystemInteractionComponent o = (SystemInteractionComponent) other; + return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.interaction"; + + } + + } + + @Block() + public static class ConformanceRestOperationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of a query, which is used in the _query parameter when the query is called. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of a query, which is used in the _query parameter when the query is called." ) + protected StringType name; + + /** + * Where the formal definition can be found. + */ + @Child(name = "definition", type = {OperationDefinition.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The defined operation/query", formalDefinition="Where the formal definition can be found." ) + protected Reference definition; + + /** + * The actual object that is the target of the reference (Where the formal definition can be found.) + */ + protected OperationDefinition definitionTarget; + + private static final long serialVersionUID = 122107272L; + + /* + * Constructor + */ + public ConformanceRestOperationComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceRestOperationComponent(StringType name, Reference definition) { + super(); + this.name = name; + this.definition = definition; + } + + /** + * @return {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestOperationComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConformanceRestOperationComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of a query, which is used in the _query parameter when the query is called. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of a query, which is used in the _query parameter when the query is called. + */ + public ConformanceRestOperationComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #definition} (Where the formal definition can be found.) + */ + public Reference getDefinition() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestOperationComponent.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new Reference(); // cc + return this.definition; + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (Where the formal definition can be found.) + */ + public ConformanceRestOperationComponent setDefinition(Reference value) { + this.definition = value; + return this; + } + + /** + * @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.) + */ + public OperationDefinition getDefinitionTarget() { + if (this.definitionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceRestOperationComponent.definition"); + else if (Configuration.doAutoCreate()) + this.definitionTarget = new OperationDefinition(); // aa + return this.definitionTarget; + } + + /** + * @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.) + */ + public ConformanceRestOperationComponent setDefinitionTarget(OperationDefinition value) { + this.definitionTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of a query, which is used in the _query parameter when the query is called.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("definition", "Reference(OperationDefinition)", "Where the formal definition can be found.", 0, java.lang.Integer.MAX_VALUE, definition)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("definition")) + this.definition = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + } + else if (name.equals("definition")) { + this.definition = new Reference(); + return this.definition; + } + else + return super.addChild(name); + } + + public ConformanceRestOperationComponent copy() { + ConformanceRestOperationComponent dst = new ConformanceRestOperationComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.definition = definition == null ? null : definition.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceRestOperationComponent)) + return false; + ConformanceRestOperationComponent o = (ConformanceRestOperationComponent) other; + return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceRestOperationComponent)) + return false; + ConformanceRestOperationComponent o = (ConformanceRestOperationComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.rest.operation"; + + } + + } + + @Block() + public static class ConformanceMessagingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An endpoint (network accessible address) to which messages and/or replies are to be sent. + */ + @Child(name = "endpoint", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A messaging service end-point", formalDefinition="An endpoint (network accessible address) to which messages and/or replies are to be sent." ) + protected List endpoint; + + /** + * Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). + */ + @Child(name = "reliableCache", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reliable Message Cache Length (min)", formalDefinition="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)." ) + protected UnsignedIntType reliableCache; + + /** + * Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Messaging interface behavior details", formalDefinition="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner." ) + protected StringType documentation; + + /** + * A description of the solution's support for an event at this end-point. + */ + @Child(name = "event", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Declare support for this event", formalDefinition="A description of the solution's support for an event at this end-point." ) + protected List event; + + private static final long serialVersionUID = -712362545L; + + /* + * Constructor + */ + public ConformanceMessagingComponent() { + super(); + } + + /** + * @return {@link #endpoint} (An endpoint (network accessible address) to which messages and/or replies are to be sent.) + */ + public List getEndpoint() { + if (this.endpoint == null) + this.endpoint = new ArrayList(); + return this.endpoint; + } + + public boolean hasEndpoint() { + if (this.endpoint == null) + return false; + for (ConformanceMessagingEndpointComponent item : this.endpoint) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #endpoint} (An endpoint (network accessible address) to which messages and/or replies are to be sent.) + */ + // syntactic sugar + public ConformanceMessagingEndpointComponent addEndpoint() { //3 + ConformanceMessagingEndpointComponent t = new ConformanceMessagingEndpointComponent(); + if (this.endpoint == null) + this.endpoint = new ArrayList(); + this.endpoint.add(t); + return t; + } + + // syntactic sugar + public ConformanceMessagingComponent addEndpoint(ConformanceMessagingEndpointComponent t) { //3 + if (t == null) + return this; + if (this.endpoint == null) + this.endpoint = new ArrayList(); + this.endpoint.add(t); + return this; + } + + /** + * @return {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value + */ + public UnsignedIntType getReliableCacheElement() { + if (this.reliableCache == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingComponent.reliableCache"); + else if (Configuration.doAutoCreate()) + this.reliableCache = new UnsignedIntType(); // bb + return this.reliableCache; + } + + public boolean hasReliableCacheElement() { + return this.reliableCache != null && !this.reliableCache.isEmpty(); + } + + public boolean hasReliableCache() { + return this.reliableCache != null && !this.reliableCache.isEmpty(); + } + + /** + * @param value {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value + */ + public ConformanceMessagingComponent setReliableCacheElement(UnsignedIntType value) { + this.reliableCache = value; + return this; + } + + /** + * @return Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). + */ + public int getReliableCache() { + return this.reliableCache == null || this.reliableCache.isEmpty() ? 0 : this.reliableCache.getValue(); + } + + /** + * @param value Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). + */ + public ConformanceMessagingComponent setReliableCache(int value) { + if (this.reliableCache == null) + this.reliableCache = new UnsignedIntType(); + this.reliableCache.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ConformanceMessagingComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. + */ + public ConformanceMessagingComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #event} (A description of the solution's support for an event at this end-point.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (ConformanceMessagingEventComponent item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (A description of the solution's support for an event at this end-point.) + */ + // syntactic sugar + public ConformanceMessagingEventComponent addEvent() { //3 + ConformanceMessagingEventComponent t = new ConformanceMessagingEventComponent(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + // syntactic sugar + public ConformanceMessagingComponent addEvent(ConformanceMessagingEventComponent t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("endpoint", "", "An endpoint (network accessible address) to which messages and/or replies are to be sent.", 0, java.lang.Integer.MAX_VALUE, endpoint)); + childrenList.add(new Property("reliableCache", "unsignedInt", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, java.lang.Integer.MAX_VALUE, reliableCache)); + childrenList.add(new Property("documentation", "string", "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("event", "", "A description of the solution's support for an event at this end-point.", 0, java.lang.Integer.MAX_VALUE, event)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("endpoint")) + this.getEndpoint().add((ConformanceMessagingEndpointComponent) value); + else if (name.equals("reliableCache")) + this.reliableCache = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("event")) + this.getEvent().add((ConformanceMessagingEventComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("endpoint")) { + return addEndpoint(); + } + else if (name.equals("reliableCache")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.reliableCache"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else if (name.equals("event")) { + return addEvent(); + } + else + return super.addChild(name); + } + + public ConformanceMessagingComponent copy() { + ConformanceMessagingComponent dst = new ConformanceMessagingComponent(); + copyValues(dst); + if (endpoint != null) { + dst.endpoint = new ArrayList(); + for (ConformanceMessagingEndpointComponent i : endpoint) + dst.endpoint.add(i.copy()); + }; + dst.reliableCache = reliableCache == null ? null : reliableCache.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + if (event != null) { + dst.event = new ArrayList(); + for (ConformanceMessagingEventComponent i : event) + dst.event.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceMessagingComponent)) + return false; + ConformanceMessagingComponent o = (ConformanceMessagingComponent) other; + return compareDeep(endpoint, o.endpoint, true) && compareDeep(reliableCache, o.reliableCache, true) + && compareDeep(documentation, o.documentation, true) && compareDeep(event, o.event, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceMessagingComponent)) + return false; + ConformanceMessagingComponent o = (ConformanceMessagingComponent) other; + return compareValues(reliableCache, o.reliableCache, true) && compareValues(documentation, o.documentation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (endpoint == null || endpoint.isEmpty()) && (reliableCache == null || reliableCache.isEmpty()) + && (documentation == null || documentation.isEmpty()) && (event == null || event.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.messaging"; + + } + + } + + @Block() + public static class ConformanceMessagingEndpointComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A list of the messaging transport protocol(s) identifiers, supported by this endpoint. + */ + @Child(name = "protocol", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="http | ftp | mllp +", formalDefinition="A list of the messaging transport protocol(s) identifiers, supported by this endpoint." ) + protected Coding protocol; + + /** + * The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. + */ + @Child(name = "address", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Address of end-point", formalDefinition="The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier." ) + protected UriType address; + + private static final long serialVersionUID = 1294656428L; + + /* + * Constructor + */ + public ConformanceMessagingEndpointComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceMessagingEndpointComponent(Coding protocol, UriType address) { + super(); + this.protocol = protocol; + this.address = address; + } + + /** + * @return {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.) + */ + public Coding getProtocol() { + if (this.protocol == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEndpointComponent.protocol"); + else if (Configuration.doAutoCreate()) + this.protocol = new Coding(); // cc + return this.protocol; + } + + public boolean hasProtocol() { + return this.protocol != null && !this.protocol.isEmpty(); + } + + /** + * @param value {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.) + */ + public ConformanceMessagingEndpointComponent setProtocol(Coding value) { + this.protocol = value; + return this; + } + + /** + * @return {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value + */ + public UriType getAddressElement() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEndpointComponent.address"); + else if (Configuration.doAutoCreate()) + this.address = new UriType(); // bb + return this.address; + } + + public boolean hasAddressElement() { + return this.address != null && !this.address.isEmpty(); + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value + */ + public ConformanceMessagingEndpointComponent setAddressElement(UriType value) { + this.address = value; + return this; + } + + /** + * @return The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. + */ + public String getAddress() { + return this.address == null ? null : this.address.getValue(); + } + + /** + * @param value The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. + */ + public ConformanceMessagingEndpointComponent setAddress(String value) { + if (this.address == null) + this.address = new UriType(); + this.address.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("protocol", "Coding", "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.", 0, java.lang.Integer.MAX_VALUE, protocol)); + childrenList.add(new Property("address", "uri", "The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.", 0, java.lang.Integer.MAX_VALUE, address)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("protocol")) + this.protocol = castToCoding(value); // Coding + else if (name.equals("address")) + this.address = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("protocol")) { + this.protocol = new Coding(); + return this.protocol; + } + else if (name.equals("address")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.address"); + } + else + return super.addChild(name); + } + + public ConformanceMessagingEndpointComponent copy() { + ConformanceMessagingEndpointComponent dst = new ConformanceMessagingEndpointComponent(); + copyValues(dst); + dst.protocol = protocol == null ? null : protocol.copy(); + dst.address = address == null ? null : address.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceMessagingEndpointComponent)) + return false; + ConformanceMessagingEndpointComponent o = (ConformanceMessagingEndpointComponent) other; + return compareDeep(protocol, o.protocol, true) && compareDeep(address, o.address, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceMessagingEndpointComponent)) + return false; + ConformanceMessagingEndpointComponent o = (ConformanceMessagingEndpointComponent) other; + return compareValues(address, o.address, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (protocol == null || protocol.isEmpty()) && (address == null || address.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.messaging.endpoint"; + + } + + } + + @Block() + public static class ConformanceMessagingEventComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A coded identifier of a supported messaging event. + */ + @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Event type", formalDefinition="A coded identifier of a supported messaging event." ) + protected Coding code; + + /** + * The impact of the content of the message. + */ + @Child(name = "category", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Consequence | Currency | Notification", formalDefinition="The impact of the content of the message." ) + protected Enumeration category; + + /** + * The mode of this event declaration - whether application is sender or receiver. + */ + @Child(name = "mode", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="sender | receiver", formalDefinition="The mode of this event declaration - whether application is sender or receiver." ) + protected Enumeration mode; + + /** + * A resource associated with the event. This is the resource that defines the event. + */ + @Child(name = "focus", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Resource that's focus of message", formalDefinition="A resource associated with the event. This is the resource that defines the event." ) + protected CodeType focus; + + /** + * Information about the request for this event. + */ + @Child(name = "request", type = {StructureDefinition.class}, order=5, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Profile that describes the request", formalDefinition="Information about the request for this event." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Information about the request for this event.) + */ + protected StructureDefinition requestTarget; + + /** + * Information about the response for this event. + */ + @Child(name = "response", type = {StructureDefinition.class}, order=6, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Profile that describes the response", formalDefinition="Information about the response for this event." ) + protected Reference response; + + /** + * The actual object that is the target of the reference (Information about the response for this event.) + */ + protected StructureDefinition responseTarget; + + /** + * Guidance on how this event is handled, such as internal system trigger points, business rules, etc. + */ + @Child(name = "documentation", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Endpoint-specific event documentation", formalDefinition="Guidance on how this event is handled, such as internal system trigger points, business rules, etc." ) + protected StringType documentation; + + private static final long serialVersionUID = -47031390L; + + /* + * Constructor + */ + public ConformanceMessagingEventComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceMessagingEventComponent(Coding code, Enumeration mode, CodeType focus, Reference request, Reference response) { + super(); + this.code = code; + this.mode = mode; + this.focus = focus; + this.request = request; + this.response = response; + } + + /** + * @return {@link #code} (A coded identifier of a supported messaging event.) + */ + public Coding getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Coding(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A coded identifier of a supported messaging event.) + */ + public ConformanceMessagingEventComponent setCode(Coding value) { + this.code = value; + return this; + } + + /** + * @return {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public Enumeration getCategoryElement() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.category"); + else if (Configuration.doAutoCreate()) + this.category = new Enumeration(new MessageSignificanceCategoryEnumFactory()); // bb + return this.category; + } + + public boolean hasCategoryElement() { + return this.category != null && !this.category.isEmpty(); + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public ConformanceMessagingEventComponent setCategoryElement(Enumeration value) { + this.category = value; + return this; + } + + /** + * @return The impact of the content of the message. + */ + public MessageSignificanceCategory getCategory() { + return this.category == null ? null : this.category.getValue(); + } + + /** + * @param value The impact of the content of the message. + */ + public ConformanceMessagingEventComponent setCategory(MessageSignificanceCategory value) { + if (value == null) + this.category = null; + else { + if (this.category == null) + this.category = new Enumeration(new MessageSignificanceCategoryEnumFactory()); + this.category.setValue(value); + } + return this; + } + + /** + * @return {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new ConformanceEventModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public ConformanceMessagingEventComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return The mode of this event declaration - whether application is sender or receiver. + */ + public ConformanceEventMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value The mode of this event declaration - whether application is sender or receiver. + */ + public ConformanceMessagingEventComponent setMode(ConformanceEventMode value) { + if (this.mode == null) + this.mode = new Enumeration(new ConformanceEventModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #focus} (A resource associated with the event. This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + */ + public CodeType getFocusElement() { + if (this.focus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.focus"); + else if (Configuration.doAutoCreate()) + this.focus = new CodeType(); // bb + return this.focus; + } + + public boolean hasFocusElement() { + return this.focus != null && !this.focus.isEmpty(); + } + + public boolean hasFocus() { + return this.focus != null && !this.focus.isEmpty(); + } + + /** + * @param value {@link #focus} (A resource associated with the event. This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + */ + public ConformanceMessagingEventComponent setFocusElement(CodeType value) { + this.focus = value; + return this; + } + + /** + * @return A resource associated with the event. This is the resource that defines the event. + */ + public String getFocus() { + return this.focus == null ? null : this.focus.getValue(); + } + + /** + * @param value A resource associated with the event. This is the resource that defines the event. + */ + public ConformanceMessagingEventComponent setFocus(String value) { + if (this.focus == null) + this.focus = new CodeType(); + this.focus.setValue(value); + return this; + } + + /** + * @return {@link #request} (Information about the request for this event.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Information about the request for this event.) + */ + public ConformanceMessagingEventComponent setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) + */ + public StructureDefinition getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new StructureDefinition(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) + */ + public ConformanceMessagingEventComponent setRequestTarget(StructureDefinition value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #response} (Information about the response for this event.) + */ + public Reference getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.response"); + else if (Configuration.doAutoCreate()) + this.response = new Reference(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Information about the response for this event.) + */ + public ConformanceMessagingEventComponent setResponse(Reference value) { + this.response = value; + return this; + } + + /** + * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) + */ + public StructureDefinition getResponseTarget() { + if (this.responseTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.response"); + else if (Configuration.doAutoCreate()) + this.responseTarget = new StructureDefinition(); // aa + return this.responseTarget; + } + + /** + * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) + */ + public ConformanceMessagingEventComponent setResponseTarget(StructureDefinition value) { + this.responseTarget = value; + return this; + } + + /** + * @return {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ConformanceMessagingEventComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Guidance on how this event is handled, such as internal system trigger points, business rules, etc. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Guidance on how this event is handled, such as internal system trigger points, business rules, etc. + */ + public ConformanceMessagingEventComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "Coding", "A coded identifier of a supported messaging event.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "code", "The impact of the content of the message.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("mode", "code", "The mode of this event declaration - whether application is sender or receiver.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("focus", "code", "A resource associated with the event. This is the resource that defines the event.", 0, java.lang.Integer.MAX_VALUE, focus)); + childrenList.add(new Property("request", "Reference(StructureDefinition)", "Information about the request for this event.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "Reference(StructureDefinition)", "Information about the response for this event.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("documentation", "string", "Guidance on how this event is handled, such as internal system trigger points, business rules, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCoding(value); // Coding + else if (name.equals("category")) + this.category = new MessageSignificanceCategoryEnumFactory().fromType(value); // Enumeration + else if (name.equals("mode")) + this.mode = new ConformanceEventModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("focus")) + this.focus = castToCode(value); // CodeType + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("response")) + this.response = castToReference(value); // Reference + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new Coding(); + return this.code; + } + else if (name.equals("category")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.category"); + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + } + else if (name.equals("focus")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.focus"); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("response")) { + this.response = new Reference(); + return this.response; + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else + return super.addChild(name); + } + + public ConformanceMessagingEventComponent copy() { + ConformanceMessagingEventComponent dst = new ConformanceMessagingEventComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.focus = focus == null ? null : focus.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceMessagingEventComponent)) + return false; + ConformanceMessagingEventComponent o = (ConformanceMessagingEventComponent) other; + return compareDeep(code, o.code, true) && compareDeep(category, o.category, true) && compareDeep(mode, o.mode, true) + && compareDeep(focus, o.focus, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) + && compareDeep(documentation, o.documentation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceMessagingEventComponent)) + return false; + ConformanceMessagingEventComponent o = (ConformanceMessagingEventComponent) other; + return compareValues(category, o.category, true) && compareValues(mode, o.mode, true) && compareValues(focus, o.focus, true) + && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (category == null || category.isEmpty()) + && (mode == null || mode.isEmpty()) && (focus == null || focus.isEmpty()) && (request == null || request.isEmpty()) + && (response == null || response.isEmpty()) && (documentation == null || documentation.isEmpty()) + ; + } + + public String fhirType() { + return "Conformance.messaging.event"; + + } + + } + + @Block() + public static class ConformanceDocumentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Mode of this document declaration - whether application is producer or consumer. + */ + @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="producer | consumer", formalDefinition="Mode of this document declaration - whether application is producer or consumer." ) + protected Enumeration mode; + + /** + * A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. + */ + @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of document support", formalDefinition="A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc." ) + protected StringType documentation; + + /** + * A constraint on a resource used in the document. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Constraint on a resource used in the document", formalDefinition="A constraint on a resource used in the document." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (A constraint on a resource used in the document.) + */ + protected StructureDefinition profileTarget; + + private static final long serialVersionUID = -1059555053L; + + /* + * Constructor + */ + public ConformanceDocumentComponent() { + super(); + } + + /* + * Constructor + */ + public ConformanceDocumentComponent(Enumeration mode, Reference profile) { + super(); + this.mode = mode; + this.profile = profile; + } + + /** + * @return {@link #mode} (Mode of this document declaration - whether application is producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceDocumentComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new DocumentModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (Mode of this document declaration - whether application is producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public ConformanceDocumentComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Mode of this document declaration - whether application is producer or consumer. + */ + public DocumentMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Mode of this document declaration - whether application is producer or consumer. + */ + public ConformanceDocumentComponent setMode(DocumentMode value) { + if (this.mode == null) + this.mode = new Enumeration(new DocumentModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceDocumentComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ConformanceDocumentComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. + */ + public ConformanceDocumentComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #profile} (A constraint on a resource used in the document.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceDocumentComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (A constraint on a resource used in the document.) + */ + public ConformanceDocumentComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConformanceDocumentComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) + */ + public ConformanceDocumentComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("mode", "code", "Mode of this document declaration - whether application is producer or consumer.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("documentation", "string", "A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A constraint on a resource used in the document.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("mode")) + this.mode = new DocumentModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else + return super.addChild(name); + } + + public ConformanceDocumentComponent copy() { + ConformanceDocumentComponent dst = new ConformanceDocumentComponent(); + copyValues(dst); + dst.mode = mode == null ? null : mode.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceDocumentComponent)) + return false; + ConformanceDocumentComponent o = (ConformanceDocumentComponent) other; + return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(profile, o.profile, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceDocumentComponent)) + return false; + ConformanceDocumentComponent o = (ConformanceDocumentComponent) other; + return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (profile == null || profile.isEmpty()); + } + + public String fhirType() { + return "Conformance.document"; + + } + + } + + /** + * An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical uri to reference this statement", formalDefinition="An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published." ) + protected UriType url; + + /** + * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) + protected StringType version; + + /** + * A free text natural language name identifying the conformance statement. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." ) + protected StringType name; + + /** + * The status of this conformance statement. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) + protected Enumeration status; + + /** + * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the conformance. + */ + @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the conformance." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) + protected StringType description; + + /** + * Explains why this conformance statement is needed and why it's been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this conformance statement is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement." ) + protected StringType copyright; + + /** + * The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). + */ + @Child(name = "kind", type = {CodeType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="instance | capability | requirements", formalDefinition="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase)." ) + protected Enumeration kind; + + /** + * Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation. + */ + @Child(name = "software", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation." ) + protected ConformanceSoftwareComponent software; + + /** + * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. + */ + @Child(name = "implementation", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) + protected ConformanceImplementationComponent implementation; + + /** + * The version of the FHIR specification on which this conformance statement is based. + */ + @Child(name = "fhirVersion", type = {IdType.class}, order=14, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="FHIR Version the system uses", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) + protected IdType fhirVersion; + + /** + * A code that indicates whether the application accepts unknown elements or extensions when reading resources. + */ + @Child(name = "acceptUnknown", type = {CodeType.class}, order=15, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="no | extensions | elements | both", formalDefinition="A code that indicates whether the application accepts unknown elements or extensions when reading resources." ) + protected Enumeration acceptUnknown; + + /** + * A list of the formats supported by this implementation using their content types. + */ + @Child(name = "format", type = {CodeType.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." ) + protected List format; + + /** + * A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Profiles for use cases supported", formalDefinition="A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}." ) + protected List profile; + /** + * The actual objects that are the target of the reference (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + protected List profileTarget; + + + /** + * A definition of the restful capabilities of the solution, if any. + */ + @Child(name = "rest", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) + protected List rest; + + /** + * A description of the messaging capabilities of the solution. + */ + @Child(name = "messaging", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) + protected List messaging; + + /** + * A document definition. + */ + @Child(name = "document", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) + protected List document; + + private static final long serialVersionUID = 1863739648L; + + /* + * Constructor + */ + public Conformance() { + super(); + } + + /* + * Constructor + */ + public Conformance(DateTimeType date, Enumeration kind, IdType fhirVersion, Enumeration acceptUnknown) { + super(); + this.date = date; + this.kind = kind; + this.fhirVersion = fhirVersion; + this.acceptUnknown = acceptUnknown; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Conformance setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. + */ + public Conformance setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Conformance setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public Conformance setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Conformance setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the conformance statement. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the conformance statement. + */ + public Conformance setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Conformance setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this conformance statement. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this conformance statement. + */ + public Conformance setStatus(ConformanceResourceStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #experimental} (A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public Conformance setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public Conformance setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public Conformance setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the conformance. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the conformance. + */ + public Conformance setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ConformanceContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ConformanceContactComponent addContact() { //3 + ConformanceContactComponent t = new ConformanceContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Conformance addContact(ConformanceContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Conformance setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. + */ + public Conformance setDate(Date value) { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Conformance setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + */ + public Conformance setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public Conformance setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this conformance statement is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this conformance statement is needed and why it's been constrained as it has. + */ + public Conformance setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public Conformance setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + public Conformance setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #kind} (The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Enumeration getKindElement() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new Enumeration(new ConformanceStatementKindEnumFactory()); // bb + return this.kind; + } + + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Conformance setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). + */ + public ConformanceStatementKind getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). + */ + public Conformance setKind(ConformanceStatementKind value) { + if (this.kind == null) + this.kind = new Enumeration(new ConformanceStatementKindEnumFactory()); + this.kind.setValue(value); + return this; + } + + /** + * @return {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) + */ + public ConformanceSoftwareComponent getSoftware() { + if (this.software == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.software"); + else if (Configuration.doAutoCreate()) + this.software = new ConformanceSoftwareComponent(); // cc + return this.software; + } + + public boolean hasSoftware() { + return this.software != null && !this.software.isEmpty(); + } + + /** + * @param value {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) + */ + public Conformance setSoftware(ConformanceSoftwareComponent value) { + this.software = value; + return this; + } + + /** + * @return {@link #implementation} (Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.) + */ + public ConformanceImplementationComponent getImplementation() { + if (this.implementation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.implementation"); + else if (Configuration.doAutoCreate()) + this.implementation = new ConformanceImplementationComponent(); // cc + return this.implementation; + } + + public boolean hasImplementation() { + return this.implementation != null && !this.implementation.isEmpty(); + } + + /** + * @param value {@link #implementation} (Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.) + */ + public Conformance setImplementation(ConformanceImplementationComponent value) { + this.implementation = value; + return this; + } + + /** + * @return {@link #fhirVersion} (The version of the FHIR specification on which this conformance statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public IdType getFhirVersionElement() { + if (this.fhirVersion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.fhirVersion"); + else if (Configuration.doAutoCreate()) + this.fhirVersion = new IdType(); // bb + return this.fhirVersion; + } + + public boolean hasFhirVersionElement() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + public boolean hasFhirVersion() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + /** + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this conformance statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public Conformance setFhirVersionElement(IdType value) { + this.fhirVersion = value; + return this; + } + + /** + * @return The version of the FHIR specification on which this conformance statement is based. + */ + public String getFhirVersion() { + return this.fhirVersion == null ? null : this.fhirVersion.getValue(); + } + + /** + * @param value The version of the FHIR specification on which this conformance statement is based. + */ + public Conformance setFhirVersion(String value) { + if (this.fhirVersion == null) + this.fhirVersion = new IdType(); + this.fhirVersion.setValue(value); + return this; + } + + /** + * @return {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value + */ + public Enumeration getAcceptUnknownElement() { + if (this.acceptUnknown == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.acceptUnknown"); + else if (Configuration.doAutoCreate()) + this.acceptUnknown = new Enumeration(new UnknownContentCodeEnumFactory()); // bb + return this.acceptUnknown; + } + + public boolean hasAcceptUnknownElement() { + return this.acceptUnknown != null && !this.acceptUnknown.isEmpty(); + } + + public boolean hasAcceptUnknown() { + return this.acceptUnknown != null && !this.acceptUnknown.isEmpty(); + } + + /** + * @param value {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value + */ + public Conformance setAcceptUnknownElement(Enumeration value) { + this.acceptUnknown = value; + return this; + } + + /** + * @return A code that indicates whether the application accepts unknown elements or extensions when reading resources. + */ + public UnknownContentCode getAcceptUnknown() { + return this.acceptUnknown == null ? null : this.acceptUnknown.getValue(); + } + + /** + * @param value A code that indicates whether the application accepts unknown elements or extensions when reading resources. + */ + public Conformance setAcceptUnknown(UnknownContentCode value) { + if (this.acceptUnknown == null) + this.acceptUnknown = new Enumeration(new UnknownContentCodeEnumFactory()); + this.acceptUnknown.setValue(value); + return this; + } + + /** + * @return {@link #format} (A list of the formats supported by this implementation using their content types.) + */ + public List getFormat() { + if (this.format == null) + this.format = new ArrayList(); + return this.format; + } + + public boolean hasFormat() { + if (this.format == null) + return false; + for (CodeType item : this.format) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #format} (A list of the formats supported by this implementation using their content types.) + */ + // syntactic sugar + public CodeType addFormatElement() {//2 + CodeType t = new CodeType(); + if (this.format == null) + this.format = new ArrayList(); + this.format.add(t); + return t; + } + + /** + * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) + */ + public Conformance addFormat(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.format == null) + this.format = new ArrayList(); + this.format.add(t); + return this; + } + + /** + * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) + */ + public boolean hasFormat(String value) { + if (this.format == null) + return false; + for (CodeType v : this.format) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #profile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public List getProfile() { + if (this.profile == null) + this.profile = new ArrayList(); + return this.profile; + } + + public boolean hasProfile() { + if (this.profile == null) + return false; + for (Reference item : this.profile) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #profile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + // syntactic sugar + public Reference addProfile() { //3 + Reference t = new Reference(); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return t; + } + + // syntactic sugar + public Conformance addProfile(Reference t) { //3 + if (t == null) + return this; + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return this; + } + + /** + * @return {@link #profile} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public List getProfileTarget() { + if (this.profileTarget == null) + this.profileTarget = new ArrayList(); + return this.profileTarget; + } + + // syntactic sugar + /** + * @return {@link #profile} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) + */ + public StructureDefinition addProfileTarget() { + StructureDefinition r = new StructureDefinition(); + if (this.profileTarget == null) + this.profileTarget = new ArrayList(); + this.profileTarget.add(r); + return r; + } + + /** + * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.) + */ + public List getRest() { + if (this.rest == null) + this.rest = new ArrayList(); + return this.rest; + } + + public boolean hasRest() { + if (this.rest == null) + return false; + for (ConformanceRestComponent item : this.rest) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.) + */ + // syntactic sugar + public ConformanceRestComponent addRest() { //3 + ConformanceRestComponent t = new ConformanceRestComponent(); + if (this.rest == null) + this.rest = new ArrayList(); + this.rest.add(t); + return t; + } + + // syntactic sugar + public Conformance addRest(ConformanceRestComponent t) { //3 + if (t == null) + return this; + if (this.rest == null) + this.rest = new ArrayList(); + this.rest.add(t); + return this; + } + + /** + * @return {@link #messaging} (A description of the messaging capabilities of the solution.) + */ + public List getMessaging() { + if (this.messaging == null) + this.messaging = new ArrayList(); + return this.messaging; + } + + public boolean hasMessaging() { + if (this.messaging == null) + return false; + for (ConformanceMessagingComponent item : this.messaging) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #messaging} (A description of the messaging capabilities of the solution.) + */ + // syntactic sugar + public ConformanceMessagingComponent addMessaging() { //3 + ConformanceMessagingComponent t = new ConformanceMessagingComponent(); + if (this.messaging == null) + this.messaging = new ArrayList(); + this.messaging.add(t); + return t; + } + + // syntactic sugar + public Conformance addMessaging(ConformanceMessagingComponent t) { //3 + if (t == null) + return this; + if (this.messaging == null) + this.messaging = new ArrayList(); + this.messaging.add(t); + return this; + } + + /** + * @return {@link #document} (A document definition.) + */ + public List getDocument() { + if (this.document == null) + this.document = new ArrayList(); + return this.document; + } + + public boolean hasDocument() { + if (this.document == null) + return false; + for (ConformanceDocumentComponent item : this.document) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #document} (A document definition.) + */ + // syntactic sugar + public ConformanceDocumentComponent addDocument() { //3 + ConformanceDocumentComponent t = new ConformanceDocumentComponent(); + if (this.document == null) + this.document = new ArrayList(); + this.document.add(t); + return t; + } + + // syntactic sugar + public Conformance addDocument(ConformanceDocumentComponent t) { //3 + if (t == null) + return this; + if (this.document == null) + this.document = new ArrayList(); + this.document.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the conformance statement.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of this conformance statement.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the conformance.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "Explains why this conformance statement is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("kind", "code", "The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("software", "", "Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.", 0, java.lang.Integer.MAX_VALUE, software)); + childrenList.add(new Property("implementation", "", "Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.", 0, java.lang.Integer.MAX_VALUE, implementation)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this conformance statement is based.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("acceptUnknown", "code", "A code that indicates whether the application accepts unknown elements or extensions when reading resources.", 0, java.lang.Integer.MAX_VALUE, acceptUnknown)); + childrenList.add(new Property("format", "code", "A list of the formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, format)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest)); + childrenList.add(new Property("messaging", "", "A description of the messaging capabilities of the solution.", 0, java.lang.Integer.MAX_VALUE, messaging)); + childrenList.add(new Property("document", "", "A document definition.", 0, java.lang.Integer.MAX_VALUE, document)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ConformanceContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("kind")) + this.kind = new ConformanceStatementKindEnumFactory().fromType(value); // Enumeration + else if (name.equals("software")) + this.software = (ConformanceSoftwareComponent) value; // ConformanceSoftwareComponent + else if (name.equals("implementation")) + this.implementation = (ConformanceImplementationComponent) value; // ConformanceImplementationComponent + else if (name.equals("fhirVersion")) + this.fhirVersion = castToId(value); // IdType + else if (name.equals("acceptUnknown")) + this.acceptUnknown = new UnknownContentCodeEnumFactory().fromType(value); // Enumeration + else if (name.equals("format")) + this.getFormat().add(castToCode(value)); + else if (name.equals("profile")) + this.getProfile().add(castToReference(value)); + else if (name.equals("rest")) + this.getRest().add((ConformanceRestComponent) value); + else if (name.equals("messaging")) + this.getMessaging().add((ConformanceMessagingComponent) value); + else if (name.equals("document")) + this.getDocument().add((ConformanceDocumentComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.copyright"); + } + else if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.kind"); + } + else if (name.equals("software")) { + this.software = new ConformanceSoftwareComponent(); + return this.software; + } + else if (name.equals("implementation")) { + this.implementation = new ConformanceImplementationComponent(); + return this.implementation; + } + else if (name.equals("fhirVersion")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.fhirVersion"); + } + else if (name.equals("acceptUnknown")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.acceptUnknown"); + } + else if (name.equals("format")) { + throw new FHIRException("Cannot call addChild on a primitive type Conformance.format"); + } + else if (name.equals("profile")) { + return addProfile(); + } + else if (name.equals("rest")) { + return addRest(); + } + else if (name.equals("messaging")) { + return addMessaging(); + } + else if (name.equals("document")) { + return addDocument(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Conformance"; + + } + + public Conformance copy() { + Conformance dst = new Conformance(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ConformanceContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + dst.kind = kind == null ? null : kind.copy(); + dst.software = software == null ? null : software.copy(); + dst.implementation = implementation == null ? null : implementation.copy(); + dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); + dst.acceptUnknown = acceptUnknown == null ? null : acceptUnknown.copy(); + if (format != null) { + dst.format = new ArrayList(); + for (CodeType i : format) + dst.format.add(i.copy()); + }; + if (profile != null) { + dst.profile = new ArrayList(); + for (Reference i : profile) + dst.profile.add(i.copy()); + }; + if (rest != null) { + dst.rest = new ArrayList(); + for (ConformanceRestComponent i : rest) + dst.rest.add(i.copy()); + }; + if (messaging != null) { + dst.messaging = new ArrayList(); + for (ConformanceMessagingComponent i : messaging) + dst.messaging.add(i.copy()); + }; + if (document != null) { + dst.document = new ArrayList(); + for (ConformanceDocumentComponent i : document) + dst.document.add(i.copy()); + }; + return dst; + } + + protected Conformance typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Conformance)) + return false; + Conformance o = (Conformance) other; + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(kind, o.kind, true) && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true) + && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(acceptUnknown, o.acceptUnknown, true) + && compareDeep(format, o.format, true) && compareDeep(profile, o.profile, true) && compareDeep(rest, o.rest, true) + && compareDeep(messaging, o.messaging, true) && compareDeep(document, o.document, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Conformance)) + return false; + Conformance o = (Conformance) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(kind, o.kind, true) && compareValues(fhirVersion, o.fhirVersion, true) + && compareValues(acceptUnknown, o.acceptUnknown, true) && compareValues(format, o.format, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) + && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (kind == null || kind.isEmpty()) && (software == null || software.isEmpty()) + && (implementation == null || implementation.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) + && (acceptUnknown == null || acceptUnknown.isEmpty()) && (format == null || format.isEmpty()) + && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty()) && (messaging == null || messaging.isEmpty()) + && (document == null || document.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Conformance; + } + + @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) + public static final String SP_SOFTWARE = "software"; + @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) + public static final String SP_RESOURCE = "resource"; + @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" ) + public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) + public static final String SP_FORMAT = "format"; + @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) + public static final String SP_FHIRVERSION = "fhirversion"; + @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="Conformance.url", description="The uri that identifies the conformance statement", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles for use cases supported", type="reference" ) + public static final String SP_SUPPORTEDPROFILE = "supported-profile"; + @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) + public static final String SP_MODE = "mode"; + @SearchParamDefinition(name="security", path="Conformance.rest.security.service", description="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", type="token" ) + public static final String SP_SECURITY = "security"; + @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Constants.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Constants.java new file mode 100644 index 00000000000..08e490a1aa7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Constants.java @@ -0,0 +1,40 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +public class Constants { + + public final static String VERSION = "1.1.0"; + public final static String REVISION = "7388"; + public final static String DATE = "Sun Dec 06 19:25:18 EST 2015"; +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ContactPoint.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ContactPoint.java new file mode 100644 index 00000000000..3e93970e8ef --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ContactPoint.java @@ -0,0 +1,670 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + */ +@DatatypeDef(name="ContactPoint") +public class ContactPoint extends Type implements ICompositeType { + + public enum ContactPointSystem { + /** + * The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. + */ + PHONE, + /** + * The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. + */ + FAX, + /** + * The value is an email address. + */ + EMAIL, + /** + * The value is a pager number. These may be local pager numbers that are only usable on a particular pager system. + */ + PAGER, + /** + * A contact that is not a phone, fax, or email address. The format of the value SHOULD be a URL. This is intended for various personal contacts including blogs, Twitter, Facebook, etc. Do not use for email addresses. If this is not a URL, then it will require human interpretation. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static ContactPointSystem fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("phone".equals(codeString)) + return PHONE; + if ("fax".equals(codeString)) + return FAX; + if ("email".equals(codeString)) + return EMAIL; + if ("pager".equals(codeString)) + return PAGER; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PHONE: return "phone"; + case FAX: return "fax"; + case EMAIL: return "email"; + case PAGER: return "pager"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PHONE: return "http://hl7.org/fhir/contact-point-system"; + case FAX: return "http://hl7.org/fhir/contact-point-system"; + case EMAIL: return "http://hl7.org/fhir/contact-point-system"; + case PAGER: return "http://hl7.org/fhir/contact-point-system"; + case OTHER: return "http://hl7.org/fhir/contact-point-system"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PHONE: return "The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required."; + case FAX: return "The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required."; + case EMAIL: return "The value is an email address."; + case PAGER: return "The value is a pager number. These may be local pager numbers that are only usable on a particular pager system."; + case OTHER: return "A contact that is not a phone, fax, or email address. The format of the value SHOULD be a URL. This is intended for various personal contacts including blogs, Twitter, Facebook, etc. Do not use for email addresses. If this is not a URL, then it will require human interpretation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PHONE: return "Phone"; + case FAX: return "Fax"; + case EMAIL: return "Email"; + case PAGER: return "Pager"; + case OTHER: return "URL"; + default: return "?"; + } + } + } + + public static class ContactPointSystemEnumFactory implements EnumFactory { + public ContactPointSystem fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("phone".equals(codeString)) + return ContactPointSystem.PHONE; + if ("fax".equals(codeString)) + return ContactPointSystem.FAX; + if ("email".equals(codeString)) + return ContactPointSystem.EMAIL; + if ("pager".equals(codeString)) + return ContactPointSystem.PAGER; + if ("other".equals(codeString)) + return ContactPointSystem.OTHER; + throw new IllegalArgumentException("Unknown ContactPointSystem code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("phone".equals(codeString)) + return new Enumeration(this, ContactPointSystem.PHONE); + if ("fax".equals(codeString)) + return new Enumeration(this, ContactPointSystem.FAX); + if ("email".equals(codeString)) + return new Enumeration(this, ContactPointSystem.EMAIL); + if ("pager".equals(codeString)) + return new Enumeration(this, ContactPointSystem.PAGER); + if ("other".equals(codeString)) + return new Enumeration(this, ContactPointSystem.OTHER); + throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'"); + } + public String toCode(ContactPointSystem code) { + if (code == ContactPointSystem.PHONE) + return "phone"; + if (code == ContactPointSystem.FAX) + return "fax"; + if (code == ContactPointSystem.EMAIL) + return "email"; + if (code == ContactPointSystem.PAGER) + return "pager"; + if (code == ContactPointSystem.OTHER) + return "other"; + return "?"; + } + } + + public enum ContactPointUse { + /** + * A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. + */ + HOME, + /** + * An office contact point. First choice for business related contacts during business hours. + */ + WORK, + /** + * A temporary contact point. The period can provide more detailed information. + */ + TEMP, + /** + * This contact point is no longer in use (or was never correct, but retained for records). + */ + OLD, + /** + * A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. + */ + MOBILE, + /** + * added to help the parsers + */ + NULL; + public static ContactPointUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("work".equals(codeString)) + return WORK; + if ("temp".equals(codeString)) + return TEMP; + if ("old".equals(codeString)) + return OLD; + if ("mobile".equals(codeString)) + return MOBILE; + throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case WORK: return "work"; + case TEMP: return "temp"; + case OLD: return "old"; + case MOBILE: return "mobile"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case HOME: return "http://hl7.org/fhir/contact-point-use"; + case WORK: return "http://hl7.org/fhir/contact-point-use"; + case TEMP: return "http://hl7.org/fhir/contact-point-use"; + case OLD: return "http://hl7.org/fhir/contact-point-use"; + case MOBILE: return "http://hl7.org/fhir/contact-point-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case HOME: return "A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available."; + case WORK: return "An office contact point. First choice for business related contacts during business hours."; + case TEMP: return "A temporary contact point. The period can provide more detailed information."; + case OLD: return "This contact point is no longer in use (or was never correct, but retained for records)."; + case MOBILE: return "A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case WORK: return "Work"; + case TEMP: return "Temp"; + case OLD: return "Old"; + case MOBILE: return "Mobile"; + default: return "?"; + } + } + } + + public static class ContactPointUseEnumFactory implements EnumFactory { + public ContactPointUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return ContactPointUse.HOME; + if ("work".equals(codeString)) + return ContactPointUse.WORK; + if ("temp".equals(codeString)) + return ContactPointUse.TEMP; + if ("old".equals(codeString)) + return ContactPointUse.OLD; + if ("mobile".equals(codeString)) + return ContactPointUse.MOBILE; + throw new IllegalArgumentException("Unknown ContactPointUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return new Enumeration(this, ContactPointUse.HOME); + if ("work".equals(codeString)) + return new Enumeration(this, ContactPointUse.WORK); + if ("temp".equals(codeString)) + return new Enumeration(this, ContactPointUse.TEMP); + if ("old".equals(codeString)) + return new Enumeration(this, ContactPointUse.OLD); + if ("mobile".equals(codeString)) + return new Enumeration(this, ContactPointUse.MOBILE); + throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'"); + } + public String toCode(ContactPointUse code) { + if (code == ContactPointUse.HOME) + return "home"; + if (code == ContactPointUse.WORK) + return "work"; + if (code == ContactPointUse.TEMP) + return "temp"; + if (code == ContactPointUse.OLD) + return "old"; + if (code == ContactPointUse.MOBILE) + return "mobile"; + return "?"; + } + } + + /** + * Telecommunications form for contact point - what communications system is required to make use of the contact. + */ + @Child(name = "system", type = {CodeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="phone | fax | email | pager | other", formalDefinition="Telecommunications form for contact point - what communications system is required to make use of the contact." ) + protected Enumeration system; + + /** + * The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + */ + @Child(name = "value", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The actual contact point details", formalDefinition="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." ) + protected StringType value; + + /** + * Identifies the purpose for the contact point. + */ + @Child(name = "use", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="home | work | temp | old | mobile - purpose of this contact point", formalDefinition="Identifies the purpose for the contact point." ) + protected Enumeration use; + + /** + * Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values. + */ + @Child(name = "rank", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specify preferred order of use (1 = highest)", formalDefinition="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values." ) + protected PositiveIntType rank; + + /** + * Time period when the contact point was/is in use. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period when the contact point was/is in use", formalDefinition="Time period when the contact point was/is in use." ) + protected Period period; + + private static final long serialVersionUID = 1509610874L; + + /* + * Constructor + */ + public ContactPoint() { + super(); + } + + /** + * @return {@link #system} (Telecommunications form for contact point - what communications system is required to make use of the contact.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public Enumeration getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactPoint.system"); + else if (Configuration.doAutoCreate()) + this.system = new Enumeration(new ContactPointSystemEnumFactory()); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (Telecommunications form for contact point - what communications system is required to make use of the contact.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ContactPoint setSystemElement(Enumeration value) { + this.system = value; + return this; + } + + /** + * @return Telecommunications form for contact point - what communications system is required to make use of the contact. + */ + public ContactPointSystem getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value Telecommunications form for contact point - what communications system is required to make use of the contact. + */ + public ContactPoint setSystem(ContactPointSystem value) { + if (value == null) + this.system = null; + else { + if (this.system == null) + this.system = new Enumeration(new ContactPointSystemEnumFactory()); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #value} (The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactPoint.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ContactPoint setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + */ + public ContactPoint setValue(String value) { + if (Utilities.noString(value)) + this.value = null; + else { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (Identifies the purpose for the contact point.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactPoint.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new ContactPointUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Identifies the purpose for the contact point.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public ContactPoint setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return Identifies the purpose for the contact point. + */ + public ContactPointUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Identifies the purpose for the contact point. + */ + public ContactPoint setUse(ContactPointUse value) { + if (value == null) + this.use = null; + else { + if (this.use == null) + this.use = new Enumeration(new ContactPointUseEnumFactory()); + this.use.setValue(value); + } + return this; + } + + /** + * @return {@link #rank} (Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.). This is the underlying object with id, value and extensions. The accessor "getRank" gives direct access to the value + */ + public PositiveIntType getRankElement() { + if (this.rank == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactPoint.rank"); + else if (Configuration.doAutoCreate()) + this.rank = new PositiveIntType(); // bb + return this.rank; + } + + public boolean hasRankElement() { + return this.rank != null && !this.rank.isEmpty(); + } + + public boolean hasRank() { + return this.rank != null && !this.rank.isEmpty(); + } + + /** + * @param value {@link #rank} (Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.). This is the underlying object with id, value and extensions. The accessor "getRank" gives direct access to the value + */ + public ContactPoint setRankElement(PositiveIntType value) { + this.rank = value; + return this; + } + + /** + * @return Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values. + */ + public int getRank() { + return this.rank == null || this.rank.isEmpty() ? 0 : this.rank.getValue(); + } + + /** + * @param value Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values. + */ + public ContactPoint setRank(int value) { + if (this.rank == null) + this.rank = new PositiveIntType(); + this.rank.setValue(value); + return this; + } + + /** + * @return {@link #period} (Time period when the contact point was/is in use.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactPoint.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Time period when the contact point was/is in use.) + */ + public ContactPoint setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "code", "Telecommunications form for contact point - what communications system is required to make use of the contact.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("value", "string", "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("use", "code", "Identifies the purpose for the contact point.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("rank", "positiveInt", "Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.", 0, java.lang.Integer.MAX_VALUE, rank)); + childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = new ContactPointSystemEnumFactory().fromType(value); // Enumeration + else if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("use")) + this.use = new ContactPointUseEnumFactory().fromType(value); // Enumeration + else if (name.equals("rank")) + this.rank = castToPositiveInt(value); // PositiveIntType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.system"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.value"); + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.use"); + } + else if (name.equals("rank")) { + throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.rank"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ContactPoint"; + + } + + public ContactPoint copy() { + ContactPoint dst = new ContactPoint(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.value = value == null ? null : value.copy(); + dst.use = use == null ? null : use.copy(); + dst.rank = rank == null ? null : rank.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected ContactPoint typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ContactPoint)) + return false; + ContactPoint o = (ContactPoint) other; + return compareDeep(system, o.system, true) && compareDeep(value, o.value, true) && compareDeep(use, o.use, true) + && compareDeep(rank, o.rank, true) && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ContactPoint)) + return false; + ContactPoint o = (ContactPoint) other; + return compareValues(system, o.system, true) && compareValues(value, o.value, true) && compareValues(use, o.use, true) + && compareValues(rank, o.rank, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (value == null || value.isEmpty()) + && (use == null || use.isEmpty()) && (rank == null || rank.isEmpty()) && (period == null || period.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Contract.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Contract.java new file mode 100644 index 00000000000..995177ccd69 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Contract.java @@ -0,0 +1,3962 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ +@ResourceDef(name="Contract", profile="http://hl7.org/fhir/Profile/Contract") +public class Contract extends DomainResource { + + @Block() + public static class ActorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Who or what actors are assigned roles in this Contract. + */ + @Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Actor Type", formalDefinition="Who or what actors are assigned roles in this Contract." ) + protected Reference entity; + + /** + * The actual object that is the target of the reference (Who or what actors are assigned roles in this Contract.) + */ + protected Resource entityTarget; + + /** + * Role type of actors assigned roles in this Contract. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Actor Role", formalDefinition="Role type of actors assigned roles in this Contract." ) + protected List role; + + private static final long serialVersionUID = 1371245689L; + + /* + * Constructor + */ + public ActorComponent() { + super(); + } + + /* + * Constructor + */ + public ActorComponent(Reference entity) { + super(); + this.entity = entity; + } + + /** + * @return {@link #entity} (Who or what actors are assigned roles in this Contract.) + */ + public Reference getEntity() { + if (this.entity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActorComponent.entity"); + else if (Configuration.doAutoCreate()) + this.entity = new Reference(); // cc + return this.entity; + } + + public boolean hasEntity() { + return this.entity != null && !this.entity.isEmpty(); + } + + /** + * @param value {@link #entity} (Who or what actors are assigned roles in this Contract.) + */ + public ActorComponent setEntity(Reference value) { + this.entity = value; + return this; + } + + /** + * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what actors are assigned roles in this Contract.) + */ + public Resource getEntityTarget() { + return this.entityTarget; + } + + /** + * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what actors are assigned roles in this Contract.) + */ + public ActorComponent setEntityTarget(Resource value) { + this.entityTarget = value; + return this; + } + + /** + * @return {@link #role} (Role type of actors assigned roles in this Contract.) + */ + public List getRole() { + if (this.role == null) + this.role = new ArrayList(); + return this.role; + } + + public boolean hasRole() { + if (this.role == null) + return false; + for (CodeableConcept item : this.role) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #role} (Role type of actors assigned roles in this Contract.) + */ + // syntactic sugar + public CodeableConcept addRole() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return t; + } + + // syntactic sugar + public ActorComponent addRole(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "Who or what actors are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("role", "CodeableConcept", "Role type of actors assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, role)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("entity")) + this.entity = castToReference(value); // Reference + else if (name.equals("role")) + this.getRole().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("entity")) { + this.entity = new Reference(); + return this.entity; + } + else if (name.equals("role")) { + return addRole(); + } + else + return super.addChild(name); + } + + public ActorComponent copy() { + ActorComponent dst = new ActorComponent(); + copyValues(dst); + dst.entity = entity == null ? null : entity.copy(); + if (role != null) { + dst.role = new ArrayList(); + for (CodeableConcept i : role) + dst.role.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ActorComponent)) + return false; + ActorComponent o = (ActorComponent) other; + return compareDeep(entity, o.entity, true) && compareDeep(role, o.role, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ActorComponent)) + return false; + ActorComponent o = (ActorComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (entity == null || entity.isEmpty()) && (role == null || role.isEmpty()) + ; + } + + public String fhirType() { + return "Contract.actor"; + + } + + } + + @Block() + public static class ValuedItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specific type of Contract Valued Item that may be priced. + */ + @Child(name = "entity", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item Type", formalDefinition="Specific type of Contract Valued Item that may be priced." ) + protected Type entity; + + /** + * Identifies a Contract Valued Item instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item Identifier", formalDefinition="Identifies a Contract Valued Item instance." ) + protected Identifier identifier; + + /** + * Indicates the time during which this Contract ValuedItem information is effective. + */ + @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract ValuedItem information is effective." ) + protected DateTimeType effectiveTime; + + /** + * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Count of Contract Valued Items", formalDefinition="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances." ) + protected SimpleQuantity quantity; + + /** + * A Contract Valued Item unit valuation measure. + */ + @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item fee, charge, or cost", formalDefinition="A Contract Valued Item unit valuation measure." ) + protected Money unitPrice; + + /** + * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item Price Scaling Factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) + protected DecimalType factor; + + /** + * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. + */ + @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item Difficulty Scaling Factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point." ) + protected DecimalType points; + + /** + * Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. + */ + @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Total Contract Valued Item Value", formalDefinition="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) + protected Money net; + + private static final long serialVersionUID = 1782449516L; + + /* + * Constructor + */ + public ValuedItemComponent() { + super(); + } + + /** + * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) + */ + public Type getEntity() { + return this.entity; + } + + /** + * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) + */ + public CodeableConcept getEntityCodeableConcept() throws FHIRException { + if (!(this.entity instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); + return (CodeableConcept) this.entity; + } + + public boolean hasEntityCodeableConcept() { + return this.entity instanceof CodeableConcept; + } + + /** + * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) + */ + public Reference getEntityReference() throws FHIRException { + if (!(this.entity instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); + return (Reference) this.entity; + } + + public boolean hasEntityReference() { + return this.entity instanceof Reference; + } + + public boolean hasEntity() { + return this.entity != null && !this.entity.isEmpty(); + } + + /** + * @param value {@link #entity} (Specific type of Contract Valued Item that may be priced.) + */ + public ValuedItemComponent setEntity(Type value) { + this.entity = value; + return this; + } + + /** + * @return {@link #identifier} (Identifies a Contract Valued Item instance.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifies a Contract Valued Item instance.) + */ + public ValuedItemComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value + */ + public DateTimeType getEffectiveTimeElement() { + if (this.effectiveTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.effectiveTime"); + else if (Configuration.doAutoCreate()) + this.effectiveTime = new DateTimeType(); // bb + return this.effectiveTime; + } + + public boolean hasEffectiveTimeElement() { + return this.effectiveTime != null && !this.effectiveTime.isEmpty(); + } + + public boolean hasEffectiveTime() { + return this.effectiveTime != null && !this.effectiveTime.isEmpty(); + } + + /** + * @param value {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value + */ + public ValuedItemComponent setEffectiveTimeElement(DateTimeType value) { + this.effectiveTime = value; + return this; + } + + /** + * @return Indicates the time during which this Contract ValuedItem information is effective. + */ + public Date getEffectiveTime() { + return this.effectiveTime == null ? null : this.effectiveTime.getValue(); + } + + /** + * @param value Indicates the time during which this Contract ValuedItem information is effective. + */ + public ValuedItemComponent setEffectiveTime(Date value) { + if (value == null) + this.effectiveTime = null; + else { + if (this.effectiveTime == null) + this.effectiveTime = new DateTimeType(); + this.effectiveTime.setValue(value); + } + return this; + } + + /** + * @return {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) + */ + public ValuedItemComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #unitPrice} (A Contract Valued Item unit valuation measure.) + */ + public Money getUnitPrice() { + if (this.unitPrice == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.unitPrice"); + else if (Configuration.doAutoCreate()) + this.unitPrice = new Money(); // cc + return this.unitPrice; + } + + public boolean hasUnitPrice() { + return this.unitPrice != null && !this.unitPrice.isEmpty(); + } + + /** + * @param value {@link #unitPrice} (A Contract Valued Item unit valuation measure.) + */ + public ValuedItemComponent setUnitPrice(Money value) { + this.unitPrice = value; + return this; + } + + /** + * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public ValuedItemComponent setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ValuedItemComponent setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ValuedItemComponent setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public ValuedItemComponent setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DecimalType getPointsElement() { + if (this.points == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.points"); + else if (Configuration.doAutoCreate()) + this.points = new DecimalType(); // bb + return this.points; + } + + public boolean hasPointsElement() { + return this.points != null && !this.points.isEmpty(); + } + + public boolean hasPoints() { + return this.points != null && !this.points.isEmpty(); + } + + /** + * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public ValuedItemComponent setPointsElement(DecimalType value) { + this.points = value; + return this; + } + + /** + * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. + */ + public BigDecimal getPoints() { + return this.points == null ? null : this.points.getValue(); + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. + */ + public ValuedItemComponent setPoints(BigDecimal value) { + if (value == null) + this.points = null; + else { + if (this.points == null) + this.points = new DecimalType(); + this.points.setValue(value); + } + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. + */ + public ValuedItemComponent setPoints(long value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. + */ + public ValuedItemComponent setPoints(double value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @return {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public Money getNet() { + if (this.net == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValuedItemComponent.net"); + else if (Configuration.doAutoCreate()) + this.net = new Money(); // cc + return this.net; + } + + public boolean hasNet() { + return this.net != null && !this.net.isEmpty(); + } + + /** + * @param value {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public ValuedItemComponent setNet(Money value) { + this.net = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, java.lang.Integer.MAX_VALUE, effectiveTime)); + childrenList.add(new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); + childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); + childrenList.add(new Property("net", "Money", "Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("entity[x]")) + this.entity = (Type) value; // Type + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("effectiveTime")) + this.effectiveTime = castToDateTime(value); // DateTimeType + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("unitPrice")) + this.unitPrice = castToMoney(value); // Money + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("points")) + this.points = castToDecimal(value); // DecimalType + else if (name.equals("net")) + this.net = castToMoney(value); // Money + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("entityCodeableConcept")) { + this.entity = new CodeableConcept(); + return this.entity; + } + else if (name.equals("entityReference")) { + this.entity = new Reference(); + return this.entity; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("effectiveTime")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("unitPrice")) { + this.unitPrice = new Money(); + return this.unitPrice; + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); + } + else if (name.equals("points")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); + } + else if (name.equals("net")) { + this.net = new Money(); + return this.net; + } + else + return super.addChild(name); + } + + public ValuedItemComponent copy() { + ValuedItemComponent dst = new ValuedItemComponent(); + copyValues(dst); + dst.entity = entity == null ? null : entity.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.points = points == null ? null : points.copy(); + dst.net = net == null ? null : net.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValuedItemComponent)) + return false; + ValuedItemComponent o = (ValuedItemComponent) other; + return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValuedItemComponent)) + return false; + ValuedItemComponent o = (ValuedItemComponent) other; + return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) + && compareValues(points, o.points, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) + && (net == null || net.isEmpty()); + } + + public String fhirType() { + return "Contract.valuedItem"; + + } + + } + + @Block() + public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of this Contract signer, e.g. notary, grantee. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Signer Type", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) + protected Coding type; + + /** + * Party which is a signator to this Contract. + */ + @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) + protected Reference party; + + /** + * The actual object that is the target of the reference (Party which is a signator to this Contract.) + */ + protected Resource partyTarget; + + /** + * Legally binding Contract DSIG signature contents in Base64. + */ + @Child(name = "signature", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) + protected StringType signature; + + private static final long serialVersionUID = -1870392043L; + + /* + * Constructor + */ + public SignatoryComponent() { + super(); + } + + /* + * Constructor + */ + public SignatoryComponent(Coding type, Reference party, StringType signature) { + super(); + this.type = type; + this.party = party; + this.signature = signature; + } + + /** + * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SignatoryComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) + */ + public SignatoryComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #party} (Party which is a signator to this Contract.) + */ + public Reference getParty() { + if (this.party == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SignatoryComponent.party"); + else if (Configuration.doAutoCreate()) + this.party = new Reference(); // cc + return this.party; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); + } + + /** + * @param value {@link #party} (Party which is a signator to this Contract.) + */ + public SignatoryComponent setParty(Reference value) { + this.party = value; + return this; + } + + /** + * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) + */ + public Resource getPartyTarget() { + return this.partyTarget; + } + + /** + * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) + */ + public SignatoryComponent setPartyTarget(Resource value) { + this.partyTarget = value; + return this; + } + + /** + * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.). This is the underlying object with id, value and extensions. The accessor "getSignature" gives direct access to the value + */ + public StringType getSignatureElement() { + if (this.signature == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SignatoryComponent.signature"); + else if (Configuration.doAutoCreate()) + this.signature = new StringType(); // bb + return this.signature; + } + + public boolean hasSignatureElement() { + return this.signature != null && !this.signature.isEmpty(); + } + + public boolean hasSignature() { + return this.signature != null && !this.signature.isEmpty(); + } + + /** + * @param value {@link #signature} (Legally binding Contract DSIG signature contents in Base64.). This is the underlying object with id, value and extensions. The accessor "getSignature" gives direct access to the value + */ + public SignatoryComponent setSignatureElement(StringType value) { + this.signature = value; + return this; + } + + /** + * @return Legally binding Contract DSIG signature contents in Base64. + */ + public String getSignature() { + return this.signature == null ? null : this.signature.getValue(); + } + + /** + * @param value Legally binding Contract DSIG signature contents in Base64. + */ + public SignatoryComponent setSignature(String value) { + if (this.signature == null) + this.signature = new StringType(); + this.signature.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, java.lang.Integer.MAX_VALUE, party)); + childrenList.add(new Property("signature", "string", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("party")) + this.party = castToReference(value); // Reference + else if (name.equals("signature")) + this.signature = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("party")) { + this.party = new Reference(); + return this.party; + } + else if (name.equals("signature")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.signature"); + } + else + return super.addChild(name); + } + + public SignatoryComponent copy() { + SignatoryComponent dst = new SignatoryComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.party = party == null ? null : party.copy(); + dst.signature = signature == null ? null : signature.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SignatoryComponent)) + return false; + SignatoryComponent o = (SignatoryComponent) other; + return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SignatoryComponent)) + return false; + SignatoryComponent o = (SignatoryComponent) other; + return compareValues(signature, o.signature, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) + && (signature == null || signature.isEmpty()); + } + + public String fhirType() { + return "Contract.signer"; + + } + + } + + @Block() + public static class TermComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Unique identifier for this particular Contract Provision. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract Term identifier", formalDefinition="Unique identifier for this particular Contract Provision." ) + protected Identifier identifier; + + /** + * When this Contract Provision was issued. + */ + @Child(name = "issued", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract Term Issue Date Time", formalDefinition="When this Contract Provision was issued." ) + protected DateTimeType issued; + + /** + * Relevant time or time-period when this Contract Provision is applicable. + */ + @Child(name = "applies", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract Term Effective Time", formalDefinition="Relevant time or time-period when this Contract Provision is applicable." ) + protected Period applies; + + /** + * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Type", formalDefinition="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit." ) + protected CodeableConcept type; + + /** + * Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment. + */ + @Child(name = "subType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Subtype", formalDefinition="Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment." ) + protected CodeableConcept subType; + + /** + * Who or what this Contract Provision is about. + */ + @Child(name = "subject", type = {}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Subject of this Contract Term", formalDefinition="Who or what this Contract Provision is about." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who or what this Contract Provision is about.) + */ + protected Resource subjectTarget; + + /** + * Action stipulated by this Contract Provision. + */ + @Child(name = "action", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Action", formalDefinition="Action stipulated by this Contract Provision." ) + protected List action; + + /** + * Reason or purpose for the action stipulated by this Contract Provision. + */ + @Child(name = "actionReason", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Action Reason", formalDefinition="Reason or purpose for the action stipulated by this Contract Provision." ) + protected List actionReason; + + /** + * List of actors participating in this Contract Provision. + */ + @Child(name = "actor", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Actor List", formalDefinition="List of actors participating in this Contract Provision." ) + protected List actor; + + /** + * Human readable form of this Contract Provision. + */ + @Child(name = "text", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human readable Contract term text", formalDefinition="Human readable form of this Contract Provision." ) + protected StringType text; + + /** + * Contract Provision Valued Item List. + */ + @Child(name = "valuedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item", formalDefinition="Contract Provision Valued Item List." ) + protected List valuedItem; + + /** + * Nested group of Contract Provisions. + */ + @Child(name = "group", type = {TermComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested Contract Term Group", formalDefinition="Nested group of Contract Provisions." ) + protected List group; + + private static final long serialVersionUID = -1137577465L; + + /* + * Constructor + */ + public TermComponent() { + super(); + } + + /** + * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Unique identifier for this particular Contract Provision.) + */ + public TermComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public DateTimeType getIssuedElement() { + if (this.issued == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.issued"); + else if (Configuration.doAutoCreate()) + this.issued = new DateTimeType(); // bb + return this.issued; + } + + public boolean hasIssuedElement() { + return this.issued != null && !this.issued.isEmpty(); + } + + public boolean hasIssued() { + return this.issued != null && !this.issued.isEmpty(); + } + + /** + * @param value {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public TermComponent setIssuedElement(DateTimeType value) { + this.issued = value; + return this; + } + + /** + * @return When this Contract Provision was issued. + */ + public Date getIssued() { + return this.issued == null ? null : this.issued.getValue(); + } + + /** + * @param value When this Contract Provision was issued. + */ + public TermComponent setIssued(Date value) { + if (value == null) + this.issued = null; + else { + if (this.issued == null) + this.issued = new DateTimeType(); + this.issued.setValue(value); + } + return this; + } + + /** + * @return {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) + */ + public Period getApplies() { + if (this.applies == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.applies"); + else if (Configuration.doAutoCreate()) + this.applies = new Period(); // cc + return this.applies; + } + + public boolean hasApplies() { + return this.applies != null && !this.applies.isEmpty(); + } + + /** + * @param value {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) + */ + public TermComponent setApplies(Period value) { + this.applies = value; + return this; + } + + /** + * @return {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) + */ + public TermComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #subType} (Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.) + */ + public CodeableConcept getSubType() { + if (this.subType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.subType"); + else if (Configuration.doAutoCreate()) + this.subType = new CodeableConcept(); // cc + return this.subType; + } + + public boolean hasSubType() { + return this.subType != null && !this.subType.isEmpty(); + } + + /** + * @param value {@link #subType} (Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.) + */ + public TermComponent setSubType(CodeableConcept value) { + this.subType = value; + return this; + } + + /** + * @return {@link #subject} (Who or what this Contract Provision is about.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who or what this Contract Provision is about.) + */ + public TermComponent setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what this Contract Provision is about.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what this Contract Provision is about.) + */ + public TermComponent setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #action} (Action stipulated by this Contract Provision.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (CodeableConcept item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Action stipulated by this Contract Provision.) + */ + // syntactic sugar + public CodeableConcept addAction() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public TermComponent addAction(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + /** + * @return {@link #actionReason} (Reason or purpose for the action stipulated by this Contract Provision.) + */ + public List getActionReason() { + if (this.actionReason == null) + this.actionReason = new ArrayList(); + return this.actionReason; + } + + public boolean hasActionReason() { + if (this.actionReason == null) + return false; + for (CodeableConcept item : this.actionReason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actionReason} (Reason or purpose for the action stipulated by this Contract Provision.) + */ + // syntactic sugar + public CodeableConcept addActionReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.actionReason == null) + this.actionReason = new ArrayList(); + this.actionReason.add(t); + return t; + } + + // syntactic sugar + public TermComponent addActionReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.actionReason == null) + this.actionReason = new ArrayList(); + this.actionReason.add(t); + return this; + } + + /** + * @return {@link #actor} (List of actors participating in this Contract Provision.) + */ + public List getActor() { + if (this.actor == null) + this.actor = new ArrayList(); + return this.actor; + } + + public boolean hasActor() { + if (this.actor == null) + return false; + for (TermActorComponent item : this.actor) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actor} (List of actors participating in this Contract Provision.) + */ + // syntactic sugar + public TermActorComponent addActor() { //3 + TermActorComponent t = new TermActorComponent(); + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return t; + } + + // syntactic sugar + public TermComponent addActor(TermActorComponent t) { //3 + if (t == null) + return this; + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return this; + } + + /** + * @return {@link #text} (Human readable form of this Contract Provision.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Human readable form of this Contract Provision.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public TermComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Human readable form of this Contract Provision. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Human readable form of this Contract Provision. + */ + public TermComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #valuedItem} (Contract Provision Valued Item List.) + */ + public List getValuedItem() { + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + return this.valuedItem; + } + + public boolean hasValuedItem() { + if (this.valuedItem == null) + return false; + for (TermValuedItemComponent item : this.valuedItem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valuedItem} (Contract Provision Valued Item List.) + */ + // syntactic sugar + public TermValuedItemComponent addValuedItem() { //3 + TermValuedItemComponent t = new TermValuedItemComponent(); + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + this.valuedItem.add(t); + return t; + } + + // syntactic sugar + public TermComponent addValuedItem(TermValuedItemComponent t) { //3 + if (t == null) + return this; + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + this.valuedItem.add(t); + return this; + } + + /** + * @return {@link #group} (Nested group of Contract Provisions.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (TermComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (Nested group of Contract Provisions.) + */ + // syntactic sugar + public TermComponent addGroup() { //3 + TermComponent t = new TermComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return t; + } + + // syntactic sugar + public TermComponent addGroup(TermComponent t) { //3 + if (t == null) + return this; + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, java.lang.Integer.MAX_VALUE, issued)); + childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); + childrenList.add(new Property("type", "CodeableConcept", "Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subType", "CodeableConcept", "Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.", 0, java.lang.Integer.MAX_VALUE, subType)); + childrenList.add(new Property("subject", "Reference(Any)", "Who or what this Contract Provision is about.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("actionReason", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actionReason)); + childrenList.add(new Property("actor", "", "List of actors participating in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("text", "string", "Human readable form of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("valuedItem", "", "Contract Provision Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); + childrenList.add(new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("issued")) + this.issued = castToDateTime(value); // DateTimeType + else if (name.equals("applies")) + this.applies = castToPeriod(value); // Period + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subType")) + this.subType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("action")) + this.getAction().add(castToCodeableConcept(value)); + else if (name.equals("actionReason")) + this.getActionReason().add(castToCodeableConcept(value)); + else if (name.equals("actor")) + this.getActor().add((TermActorComponent) value); + else if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("valuedItem")) + this.getValuedItem().add((TermValuedItemComponent) value); + else if (name.equals("group")) + this.getGroup().add((TermComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("issued")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); + } + else if (name.equals("applies")) { + this.applies = new Period(); + return this.applies; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("subType")) { + this.subType = new CodeableConcept(); + return this.subType; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("action")) { + return addAction(); + } + else if (name.equals("actionReason")) { + return addActionReason(); + } + else if (name.equals("actor")) { + return addActor(); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); + } + else if (name.equals("valuedItem")) { + return addValuedItem(); + } + else if (name.equals("group")) { + return addGroup(); + } + else + return super.addChild(name); + } + + public TermComponent copy() { + TermComponent dst = new TermComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.issued = issued == null ? null : issued.copy(); + dst.applies = applies == null ? null : applies.copy(); + dst.type = type == null ? null : type.copy(); + dst.subType = subType == null ? null : subType.copy(); + dst.subject = subject == null ? null : subject.copy(); + if (action != null) { + dst.action = new ArrayList(); + for (CodeableConcept i : action) + dst.action.add(i.copy()); + }; + if (actionReason != null) { + dst.actionReason = new ArrayList(); + for (CodeableConcept i : actionReason) + dst.actionReason.add(i.copy()); + }; + if (actor != null) { + dst.actor = new ArrayList(); + for (TermActorComponent i : actor) + dst.actor.add(i.copy()); + }; + dst.text = text == null ? null : text.copy(); + if (valuedItem != null) { + dst.valuedItem = new ArrayList(); + for (TermValuedItemComponent i : valuedItem) + dst.valuedItem.add(i.copy()); + }; + if (group != null) { + dst.group = new ArrayList(); + for (TermComponent i : group) + dst.group.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TermComponent)) + return false; + TermComponent o = (TermComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) + && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(subject, o.subject, true) + && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) && compareDeep(actor, o.actor, true) + && compareDeep(text, o.text, true) && compareDeep(valuedItem, o.valuedItem, true) && compareDeep(group, o.group, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TermComponent)) + return false; + TermComponent o = (TermComponent) other; + return compareValues(issued, o.issued, true) && compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) + && (applies == null || applies.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) + && (subject == null || subject.isEmpty()) && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty()) + && (actor == null || actor.isEmpty()) && (text == null || text.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) + && (group == null || group.isEmpty()); + } + + public String fhirType() { + return "Contract.term"; + + } + + } + + @Block() + public static class TermActorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The actor assigned a role in this Contract Provision. + */ + @Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Actor", formalDefinition="The actor assigned a role in this Contract Provision." ) + protected Reference entity; + + /** + * The actual object that is the target of the reference (The actor assigned a role in this Contract Provision.) + */ + protected Resource entityTarget; + + /** + * Role played by the actor assigned this role in this Contract Provision. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Actor Role", formalDefinition="Role played by the actor assigned this role in this Contract Provision." ) + protected List role; + + private static final long serialVersionUID = 1371245689L; + + /* + * Constructor + */ + public TermActorComponent() { + super(); + } + + /* + * Constructor + */ + public TermActorComponent(Reference entity) { + super(); + this.entity = entity; + } + + /** + * @return {@link #entity} (The actor assigned a role in this Contract Provision.) + */ + public Reference getEntity() { + if (this.entity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermActorComponent.entity"); + else if (Configuration.doAutoCreate()) + this.entity = new Reference(); // cc + return this.entity; + } + + public boolean hasEntity() { + return this.entity != null && !this.entity.isEmpty(); + } + + /** + * @param value {@link #entity} (The actor assigned a role in this Contract Provision.) + */ + public TermActorComponent setEntity(Reference value) { + this.entity = value; + return this; + } + + /** + * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The actor assigned a role in this Contract Provision.) + */ + public Resource getEntityTarget() { + return this.entityTarget; + } + + /** + * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The actor assigned a role in this Contract Provision.) + */ + public TermActorComponent setEntityTarget(Resource value) { + this.entityTarget = value; + return this; + } + + /** + * @return {@link #role} (Role played by the actor assigned this role in this Contract Provision.) + */ + public List getRole() { + if (this.role == null) + this.role = new ArrayList(); + return this.role; + } + + public boolean hasRole() { + if (this.role == null) + return false; + for (CodeableConcept item : this.role) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #role} (Role played by the actor assigned this role in this Contract Provision.) + */ + // syntactic sugar + public CodeableConcept addRole() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return t; + } + + // syntactic sugar + public TermActorComponent addRole(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "The actor assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("role", "CodeableConcept", "Role played by the actor assigned this role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, role)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("entity")) + this.entity = castToReference(value); // Reference + else if (name.equals("role")) + this.getRole().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("entity")) { + this.entity = new Reference(); + return this.entity; + } + else if (name.equals("role")) { + return addRole(); + } + else + return super.addChild(name); + } + + public TermActorComponent copy() { + TermActorComponent dst = new TermActorComponent(); + copyValues(dst); + dst.entity = entity == null ? null : entity.copy(); + if (role != null) { + dst.role = new ArrayList(); + for (CodeableConcept i : role) + dst.role.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TermActorComponent)) + return false; + TermActorComponent o = (TermActorComponent) other; + return compareDeep(entity, o.entity, true) && compareDeep(role, o.role, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TermActorComponent)) + return false; + TermActorComponent o = (TermActorComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (entity == null || entity.isEmpty()) && (role == null || role.isEmpty()) + ; + } + + public String fhirType() { + return "Contract.term.actor"; + + } + + } + + @Block() + public static class TermValuedItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specific type of Contract Provision Valued Item that may be priced. + */ + @Child(name = "entity", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Type", formalDefinition="Specific type of Contract Provision Valued Item that may be priced." ) + protected Type entity; + + /** + * Identifies a Contract Provision Valued Item instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Identifier", formalDefinition="Identifies a Contract Provision Valued Item instance." ) + protected Identifier identifier; + + /** + * Indicates the time during which this Contract Term ValuedItem information is effective. + */ + @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract Term ValuedItem information is effective." ) + protected DateTimeType effectiveTime; + + /** + * Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Count", formalDefinition="Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances." ) + protected SimpleQuantity quantity; + + /** + * A Contract Provision Valued Item unit valuation measure. + */ + @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item fee, charge, or cost", formalDefinition="A Contract Provision Valued Item unit valuation measure." ) + protected Money unitPrice; + + /** + * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Price Scaling Factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) + protected DecimalType factor; + + /** + * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. + */ + @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Valued Item Difficulty Scaling Factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point." ) + protected DecimalType points; + + /** + * Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. + */ + @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Total Contract Term Valued Item Value", formalDefinition="Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) + protected Money net; + + private static final long serialVersionUID = 1782449516L; + + /* + * Constructor + */ + public TermValuedItemComponent() { + super(); + } + + /** + * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) + */ + public Type getEntity() { + return this.entity; + } + + /** + * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) + */ + public CodeableConcept getEntityCodeableConcept() throws FHIRException { + if (!(this.entity instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); + return (CodeableConcept) this.entity; + } + + public boolean hasEntityCodeableConcept() { + return this.entity instanceof CodeableConcept; + } + + /** + * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) + */ + public Reference getEntityReference() throws FHIRException { + if (!(this.entity instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); + return (Reference) this.entity; + } + + public boolean hasEntityReference() { + return this.entity instanceof Reference; + } + + public boolean hasEntity() { + return this.entity != null && !this.entity.isEmpty(); + } + + /** + * @param value {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) + */ + public TermValuedItemComponent setEntity(Type value) { + this.entity = value; + return this; + } + + /** + * @return {@link #identifier} (Identifies a Contract Provision Valued Item instance.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifies a Contract Provision Valued Item instance.) + */ + public TermValuedItemComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #effectiveTime} (Indicates the time during which this Contract Term ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value + */ + public DateTimeType getEffectiveTimeElement() { + if (this.effectiveTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.effectiveTime"); + else if (Configuration.doAutoCreate()) + this.effectiveTime = new DateTimeType(); // bb + return this.effectiveTime; + } + + public boolean hasEffectiveTimeElement() { + return this.effectiveTime != null && !this.effectiveTime.isEmpty(); + } + + public boolean hasEffectiveTime() { + return this.effectiveTime != null && !this.effectiveTime.isEmpty(); + } + + /** + * @param value {@link #effectiveTime} (Indicates the time during which this Contract Term ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value + */ + public TermValuedItemComponent setEffectiveTimeElement(DateTimeType value) { + this.effectiveTime = value; + return this; + } + + /** + * @return Indicates the time during which this Contract Term ValuedItem information is effective. + */ + public Date getEffectiveTime() { + return this.effectiveTime == null ? null : this.effectiveTime.getValue(); + } + + /** + * @param value Indicates the time during which this Contract Term ValuedItem information is effective. + */ + public TermValuedItemComponent setEffectiveTime(Date value) { + if (value == null) + this.effectiveTime = null; + else { + if (this.effectiveTime == null) + this.effectiveTime = new DateTimeType(); + this.effectiveTime.setValue(value); + } + return this; + } + + /** + * @return {@link #quantity} (Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.) + */ + public TermValuedItemComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #unitPrice} (A Contract Provision Valued Item unit valuation measure.) + */ + public Money getUnitPrice() { + if (this.unitPrice == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.unitPrice"); + else if (Configuration.doAutoCreate()) + this.unitPrice = new Money(); // cc + return this.unitPrice; + } + + public boolean hasUnitPrice() { + return this.unitPrice != null && !this.unitPrice.isEmpty(); + } + + /** + * @param value {@link #unitPrice} (A Contract Provision Valued Item unit valuation measure.) + */ + public TermValuedItemComponent setUnitPrice(Money value) { + this.unitPrice = value; + return this; + } + + /** + * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public TermValuedItemComponent setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public TermValuedItemComponent setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public TermValuedItemComponent setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. + */ + public TermValuedItemComponent setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public DecimalType getPointsElement() { + if (this.points == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.points"); + else if (Configuration.doAutoCreate()) + this.points = new DecimalType(); // bb + return this.points; + } + + public boolean hasPointsElement() { + return this.points != null && !this.points.isEmpty(); + } + + public boolean hasPoints() { + return this.points != null && !this.points.isEmpty(); + } + + /** + * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value + */ + public TermValuedItemComponent setPointsElement(DecimalType value) { + this.points = value; + return this; + } + + /** + * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. + */ + public BigDecimal getPoints() { + return this.points == null ? null : this.points.getValue(); + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. + */ + public TermValuedItemComponent setPoints(BigDecimal value) { + if (value == null) + this.points = null; + else { + if (this.points == null) + this.points = new DecimalType(); + this.points.setValue(value); + } + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. + */ + public TermValuedItemComponent setPoints(long value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. + */ + public TermValuedItemComponent setPoints(double value) { + this.points = new DecimalType(); + this.points.setValue(value); + return this; + } + + /** + * @return {@link #net} (Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public Money getNet() { + if (this.net == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TermValuedItemComponent.net"); + else if (Configuration.doAutoCreate()) + this.net = new Money(); // cc + return this.net; + } + + public boolean hasNet() { + return this.net != null && !this.net.isEmpty(); + } + + /** + * @param value {@link #net} (Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) + */ + public TermValuedItemComponent setNet(Money value) { + this.net = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Provision Valued Item that may be priced.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("identifier", "Identifier", "Identifies a Contract Provision Valued Item instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract Term ValuedItem information is effective.", 0, java.lang.Integer.MAX_VALUE, effectiveTime)); + childrenList.add(new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("unitPrice", "Money", "A Contract Provision Valued Item unit valuation measure.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); + childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); + childrenList.add(new Property("net", "Money", "Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("entity[x]")) + this.entity = (Type) value; // Type + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("effectiveTime")) + this.effectiveTime = castToDateTime(value); // DateTimeType + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("unitPrice")) + this.unitPrice = castToMoney(value); // Money + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("points")) + this.points = castToDecimal(value); // DecimalType + else if (name.equals("net")) + this.net = castToMoney(value); // Money + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("entityCodeableConcept")) { + this.entity = new CodeableConcept(); + return this.entity; + } + else if (name.equals("entityReference")) { + this.entity = new Reference(); + return this.entity; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("effectiveTime")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("unitPrice")) { + this.unitPrice = new Money(); + return this.unitPrice; + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); + } + else if (name.equals("points")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); + } + else if (name.equals("net")) { + this.net = new Money(); + return this.net; + } + else + return super.addChild(name); + } + + public TermValuedItemComponent copy() { + TermValuedItemComponent dst = new TermValuedItemComponent(); + copyValues(dst); + dst.entity = entity == null ? null : entity.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.points = points == null ? null : points.copy(); + dst.net = net == null ? null : net.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TermValuedItemComponent)) + return false; + TermValuedItemComponent o = (TermValuedItemComponent) other; + return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TermValuedItemComponent)) + return false; + TermValuedItemComponent o = (TermValuedItemComponent) other; + return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) + && compareValues(points, o.points, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) + && (net == null || net.isEmpty()); + } + + public String fhirType() { + return "Contract.term.valuedItem"; + + } + + } + + @Block() + public static class FriendlyLanguageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability. + */ + @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Easily comprehended representation of this Contract", formalDefinition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability." ) + protected Type content; + + private static final long serialVersionUID = -1763459053L; + + /* + * Constructor + */ + public FriendlyLanguageComponent() { + super(); + } + + /* + * Constructor + */ + public FriendlyLanguageComponent(Type content) { + super(); + this.content = content; + } + + /** + * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) + */ + public Type getContent() { + return this.content; + } + + /** + * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) + */ + public Attachment getContentAttachment() throws FHIRException { + if (!(this.content instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Attachment) this.content; + } + + public boolean hasContentAttachment() { + return this.content instanceof Attachment; + } + + /** + * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) + */ + public Reference getContentReference() throws FHIRException { + if (!(this.content instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Reference) this.content; + } + + public boolean hasContentReference() { + return this.content instanceof Reference; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) + */ + public FriendlyLanguageComponent setContent(Type value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("content[x]")) + this.content = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentAttachment")) { + this.content = new Attachment(); + return this.content; + } + else if (name.equals("contentReference")) { + this.content = new Reference(); + return this.content; + } + else + return super.addChild(name); + } + + public FriendlyLanguageComponent copy() { + FriendlyLanguageComponent dst = new FriendlyLanguageComponent(); + copyValues(dst); + dst.content = content == null ? null : content.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FriendlyLanguageComponent)) + return false; + FriendlyLanguageComponent o = (FriendlyLanguageComponent) other; + return compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FriendlyLanguageComponent)) + return false; + FriendlyLanguageComponent o = (FriendlyLanguageComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "Contract.friendly"; + + } + + } + + @Block() + public static class LegalLanguageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Contract legal text in human renderable form. + */ + @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Legal Text", formalDefinition="Contract legal text in human renderable form." ) + protected Type content; + + private static final long serialVersionUID = -1763459053L; + + /* + * Constructor + */ + public LegalLanguageComponent() { + super(); + } + + /* + * Constructor + */ + public LegalLanguageComponent(Type content) { + super(); + this.content = content; + } + + /** + * @return {@link #content} (Contract legal text in human renderable form.) + */ + public Type getContent() { + return this.content; + } + + /** + * @return {@link #content} (Contract legal text in human renderable form.) + */ + public Attachment getContentAttachment() throws FHIRException { + if (!(this.content instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Attachment) this.content; + } + + public boolean hasContentAttachment() { + return this.content instanceof Attachment; + } + + /** + * @return {@link #content} (Contract legal text in human renderable form.) + */ + public Reference getContentReference() throws FHIRException { + if (!(this.content instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Reference) this.content; + } + + public boolean hasContentReference() { + return this.content instanceof Reference; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (Contract legal text in human renderable form.) + */ + public LegalLanguageComponent setContent(Type value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("content[x]")) + this.content = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentAttachment")) { + this.content = new Attachment(); + return this.content; + } + else if (name.equals("contentReference")) { + this.content = new Reference(); + return this.content; + } + else + return super.addChild(name); + } + + public LegalLanguageComponent copy() { + LegalLanguageComponent dst = new LegalLanguageComponent(); + copyValues(dst); + dst.content = content == null ? null : content.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LegalLanguageComponent)) + return false; + LegalLanguageComponent o = (LegalLanguageComponent) other; + return compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LegalLanguageComponent)) + return false; + LegalLanguageComponent o = (LegalLanguageComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "Contract.legal"; + + } + + } + + @Block() + public static class ComputableLanguageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal). + */ + @Child(name = "content", type = {Attachment.class, DocumentReference.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Computable Contract Rules", formalDefinition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal)." ) + protected Type content; + + private static final long serialVersionUID = -1763459053L; + + /* + * Constructor + */ + public ComputableLanguageComponent() { + super(); + } + + /* + * Constructor + */ + public ComputableLanguageComponent(Type content) { + super(); + this.content = content; + } + + /** + * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) + */ + public Type getContent() { + return this.content; + } + + /** + * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) + */ + public Attachment getContentAttachment() throws FHIRException { + if (!(this.content instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Attachment) this.content; + } + + public boolean hasContentAttachment() { + return this.content instanceof Attachment; + } + + /** + * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) + */ + public Reference getContentReference() throws FHIRException { + if (!(this.content instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); + return (Reference) this.content; + } + + public boolean hasContentReference() { + return this.content instanceof Reference; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) + */ + public ComputableLanguageComponent setContent(Type value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("content[x]")) + this.content = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentAttachment")) { + this.content = new Attachment(); + return this.content; + } + else if (name.equals("contentReference")) { + this.content = new Reference(); + return this.content; + } + else + return super.addChild(name); + } + + public ComputableLanguageComponent copy() { + ComputableLanguageComponent dst = new ComputableLanguageComponent(); + copyValues(dst); + dst.content = content == null ? null : content.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ComputableLanguageComponent)) + return false; + ComputableLanguageComponent o = (ComputableLanguageComponent) other; + return compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ComputableLanguageComponent)) + return false; + ComputableLanguageComponent o = (ComputableLanguageComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "Contract.rule"; + + } + + } + + /** + * Unique identifier for this Contract. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract identifier", formalDefinition="Unique identifier for this Contract." ) + protected Identifier identifier; + + /** + * When this Contract was issued. + */ + @Child(name = "issued", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When this Contract was issued", formalDefinition="When this Contract was issued." ) + protected DateTimeType issued; + + /** + * Relevant time or time-period when this Contract is applicable. + */ + @Child(name = "applies", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Effective time", formalDefinition="Relevant time or time-period when this Contract is applicable." ) + protected Period applies; + + /** + * Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services. + */ + @Child(name = "subject", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Subject of this Contract", formalDefinition="Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services." ) + protected List subject; + /** + * The actual objects that are the target of the reference (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + */ + protected List subjectTarget; + + + /** + * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies. + */ + @Child(name = "authority", type = {Organization.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Authority under which this Contract has standing", formalDefinition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies." ) + protected List authority; + /** + * The actual objects that are the target of the reference (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) + */ + protected List authorityTarget; + + + /** + * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources. + */ + @Child(name = "domain", type = {Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Domain in which this Contract applies", formalDefinition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources." ) + protected List domain; + /** + * The actual objects that are the target of the reference (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) + */ + protected List domainTarget; + + + /** + * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract Tyoe", formalDefinition="Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc." ) + protected CodeableConcept type; + + /** + * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent. + */ + @Child(name = "subType", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contract Subtype", formalDefinition="More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent." ) + protected List subType; + + /** + * Action stipulated by this Contract. + */ + @Child(name = "action", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Action", formalDefinition="Action stipulated by this Contract." ) + protected List action; + + /** + * Reason for action stipulated by this Contract. + */ + @Child(name = "actionReason", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Action Reason", formalDefinition="Reason for action stipulated by this Contract." ) + protected List actionReason; + + /** + * List of Contract actors. + */ + @Child(name = "actor", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Actor", formalDefinition="List of Contract actors." ) + protected List actor; + + /** + * Contract Valued Item List. + */ + @Child(name = "valuedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Valued Item", formalDefinition="Contract Valued Item List." ) + protected List valuedItem; + + /** + * Party signing this Contract. + */ + @Child(name = "signer", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Signer", formalDefinition="Party signing this Contract." ) + protected List signer; + + /** + * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups. + */ + @Child(name = "term", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term List", formalDefinition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups." ) + protected List term; + + /** + * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract. + */ + @Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract." ) + protected Type binding; + + /** + * The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement. + */ + @Child(name = "friendly", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Friendly Language", formalDefinition="The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement." ) + protected List friendly; + + /** + * List of Legal expressions or representations of this Contract. + */ + @Child(name = "legal", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Legal Language", formalDefinition="List of Legal expressions or representations of this Contract." ) + protected List legal; + + /** + * List of Computable Policy Rule Language Representations of this Contract. + */ + @Child(name = "rule", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Computable Contract Language", formalDefinition="List of Computable Policy Rule Language Representations of this Contract." ) + protected List rule; + + private static final long serialVersionUID = -1785608373L; + + /* + * Constructor + */ + public Contract() { + super(); + } + + /** + * @return {@link #identifier} (Unique identifier for this Contract.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Contract.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Unique identifier for this Contract.) + */ + public Contract setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public DateTimeType getIssuedElement() { + if (this.issued == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Contract.issued"); + else if (Configuration.doAutoCreate()) + this.issued = new DateTimeType(); // bb + return this.issued; + } + + public boolean hasIssuedElement() { + return this.issued != null && !this.issued.isEmpty(); + } + + public boolean hasIssued() { + return this.issued != null && !this.issued.isEmpty(); + } + + /** + * @param value {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public Contract setIssuedElement(DateTimeType value) { + this.issued = value; + return this; + } + + /** + * @return When this Contract was issued. + */ + public Date getIssued() { + return this.issued == null ? null : this.issued.getValue(); + } + + /** + * @param value When this Contract was issued. + */ + public Contract setIssued(Date value) { + if (value == null) + this.issued = null; + else { + if (this.issued == null) + this.issued = new DateTimeType(); + this.issued.setValue(value); + } + return this; + } + + /** + * @return {@link #applies} (Relevant time or time-period when this Contract is applicable.) + */ + public Period getApplies() { + if (this.applies == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Contract.applies"); + else if (Configuration.doAutoCreate()) + this.applies = new Period(); // cc + return this.applies; + } + + public boolean hasApplies() { + return this.applies != null && !this.applies.isEmpty(); + } + + /** + * @param value {@link #applies} (Relevant time or time-period when this Contract is applicable.) + */ + public Contract setApplies(Period value) { + this.applies = value; + return this; + } + + /** + * @return {@link #subject} (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + */ + public List getSubject() { + if (this.subject == null) + this.subject = new ArrayList(); + return this.subject; + } + + public boolean hasSubject() { + if (this.subject == null) + return false; + for (Reference item : this.subject) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subject} (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + */ + // syntactic sugar + public Reference addSubject() { //3 + Reference t = new Reference(); + if (this.subject == null) + this.subject = new ArrayList(); + this.subject.add(t); + return t; + } + + // syntactic sugar + public Contract addSubject(Reference t) { //3 + if (t == null) + return this; + if (this.subject == null) + this.subject = new ArrayList(); + this.subject.add(t); + return this; + } + + /** + * @return {@link #subject} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + */ + public List getSubjectTarget() { + if (this.subjectTarget == null) + this.subjectTarget = new ArrayList(); + return this.subjectTarget; + } + + /** + * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) + */ + public List getAuthority() { + if (this.authority == null) + this.authority = new ArrayList(); + return this.authority; + } + + public boolean hasAuthority() { + if (this.authority == null) + return false; + for (Reference item : this.authority) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) + */ + // syntactic sugar + public Reference addAuthority() { //3 + Reference t = new Reference(); + if (this.authority == null) + this.authority = new ArrayList(); + this.authority.add(t); + return t; + } + + // syntactic sugar + public Contract addAuthority(Reference t) { //3 + if (t == null) + return this; + if (this.authority == null) + this.authority = new ArrayList(); + this.authority.add(t); + return this; + } + + /** + * @return {@link #authority} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) + */ + public List getAuthorityTarget() { + if (this.authorityTarget == null) + this.authorityTarget = new ArrayList(); + return this.authorityTarget; + } + + // syntactic sugar + /** + * @return {@link #authority} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) + */ + public Organization addAuthorityTarget() { + Organization r = new Organization(); + if (this.authorityTarget == null) + this.authorityTarget = new ArrayList(); + this.authorityTarget.add(r); + return r; + } + + /** + * @return {@link #domain} (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) + */ + public List getDomain() { + if (this.domain == null) + this.domain = new ArrayList(); + return this.domain; + } + + public boolean hasDomain() { + if (this.domain == null) + return false; + for (Reference item : this.domain) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #domain} (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) + */ + // syntactic sugar + public Reference addDomain() { //3 + Reference t = new Reference(); + if (this.domain == null) + this.domain = new ArrayList(); + this.domain.add(t); + return t; + } + + // syntactic sugar + public Contract addDomain(Reference t) { //3 + if (t == null) + return this; + if (this.domain == null) + this.domain = new ArrayList(); + this.domain.add(t); + return this; + } + + /** + * @return {@link #domain} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) + */ + public List getDomainTarget() { + if (this.domainTarget == null) + this.domainTarget = new ArrayList(); + return this.domainTarget; + } + + // syntactic sugar + /** + * @return {@link #domain} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) + */ + public Location addDomainTarget() { + Location r = new Location(); + if (this.domainTarget == null) + this.domainTarget = new ArrayList(); + this.domainTarget.add(r); + return r; + } + + /** + * @return {@link #type} (Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Contract.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.) + */ + public Contract setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #subType} (More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.) + */ + public List getSubType() { + if (this.subType == null) + this.subType = new ArrayList(); + return this.subType; + } + + public boolean hasSubType() { + if (this.subType == null) + return false; + for (CodeableConcept item : this.subType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subType} (More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.) + */ + // syntactic sugar + public CodeableConcept addSubType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); + return t; + } + + // syntactic sugar + public Contract addSubType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); + return this; + } + + /** + * @return {@link #action} (Action stipulated by this Contract.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (CodeableConcept item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Action stipulated by this Contract.) + */ + // syntactic sugar + public CodeableConcept addAction() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public Contract addAction(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + /** + * @return {@link #actionReason} (Reason for action stipulated by this Contract.) + */ + public List getActionReason() { + if (this.actionReason == null) + this.actionReason = new ArrayList(); + return this.actionReason; + } + + public boolean hasActionReason() { + if (this.actionReason == null) + return false; + for (CodeableConcept item : this.actionReason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actionReason} (Reason for action stipulated by this Contract.) + */ + // syntactic sugar + public CodeableConcept addActionReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.actionReason == null) + this.actionReason = new ArrayList(); + this.actionReason.add(t); + return t; + } + + // syntactic sugar + public Contract addActionReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.actionReason == null) + this.actionReason = new ArrayList(); + this.actionReason.add(t); + return this; + } + + /** + * @return {@link #actor} (List of Contract actors.) + */ + public List getActor() { + if (this.actor == null) + this.actor = new ArrayList(); + return this.actor; + } + + public boolean hasActor() { + if (this.actor == null) + return false; + for (ActorComponent item : this.actor) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actor} (List of Contract actors.) + */ + // syntactic sugar + public ActorComponent addActor() { //3 + ActorComponent t = new ActorComponent(); + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return t; + } + + // syntactic sugar + public Contract addActor(ActorComponent t) { //3 + if (t == null) + return this; + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return this; + } + + /** + * @return {@link #valuedItem} (Contract Valued Item List.) + */ + public List getValuedItem() { + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + return this.valuedItem; + } + + public boolean hasValuedItem() { + if (this.valuedItem == null) + return false; + for (ValuedItemComponent item : this.valuedItem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valuedItem} (Contract Valued Item List.) + */ + // syntactic sugar + public ValuedItemComponent addValuedItem() { //3 + ValuedItemComponent t = new ValuedItemComponent(); + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + this.valuedItem.add(t); + return t; + } + + // syntactic sugar + public Contract addValuedItem(ValuedItemComponent t) { //3 + if (t == null) + return this; + if (this.valuedItem == null) + this.valuedItem = new ArrayList(); + this.valuedItem.add(t); + return this; + } + + /** + * @return {@link #signer} (Party signing this Contract.) + */ + public List getSigner() { + if (this.signer == null) + this.signer = new ArrayList(); + return this.signer; + } + + public boolean hasSigner() { + if (this.signer == null) + return false; + for (SignatoryComponent item : this.signer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #signer} (Party signing this Contract.) + */ + // syntactic sugar + public SignatoryComponent addSigner() { //3 + SignatoryComponent t = new SignatoryComponent(); + if (this.signer == null) + this.signer = new ArrayList(); + this.signer.add(t); + return t; + } + + // syntactic sugar + public Contract addSigner(SignatoryComponent t) { //3 + if (t == null) + return this; + if (this.signer == null) + this.signer = new ArrayList(); + this.signer.add(t); + return this; + } + + /** + * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) + */ + public List getTerm() { + if (this.term == null) + this.term = new ArrayList(); + return this.term; + } + + public boolean hasTerm() { + if (this.term == null) + return false; + for (TermComponent item : this.term) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) + */ + // syntactic sugar + public TermComponent addTerm() { //3 + TermComponent t = new TermComponent(); + if (this.term == null) + this.term = new ArrayList(); + this.term.add(t); + return t; + } + + // syntactic sugar + public Contract addTerm(TermComponent t) { //3 + if (t == null) + return this; + if (this.term == null) + this.term = new ArrayList(); + this.term.add(t); + return this; + } + + /** + * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) + */ + public Type getBinding() { + return this.binding; + } + + /** + * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) + */ + public Attachment getBindingAttachment() throws FHIRException { + if (!(this.binding instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.binding.getClass().getName()+" was encountered"); + return (Attachment) this.binding; + } + + public boolean hasBindingAttachment() { + return this.binding instanceof Attachment; + } + + /** + * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) + */ + public Reference getBindingReference() throws FHIRException { + if (!(this.binding instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.binding.getClass().getName()+" was encountered"); + return (Reference) this.binding; + } + + public boolean hasBindingReference() { + return this.binding instanceof Reference; + } + + public boolean hasBinding() { + return this.binding != null && !this.binding.isEmpty(); + } + + /** + * @param value {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) + */ + public Contract setBinding(Type value) { + this.binding = value; + return this; + } + + /** + * @return {@link #friendly} (The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.) + */ + public List getFriendly() { + if (this.friendly == null) + this.friendly = new ArrayList(); + return this.friendly; + } + + public boolean hasFriendly() { + if (this.friendly == null) + return false; + for (FriendlyLanguageComponent item : this.friendly) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #friendly} (The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.) + */ + // syntactic sugar + public FriendlyLanguageComponent addFriendly() { //3 + FriendlyLanguageComponent t = new FriendlyLanguageComponent(); + if (this.friendly == null) + this.friendly = new ArrayList(); + this.friendly.add(t); + return t; + } + + // syntactic sugar + public Contract addFriendly(FriendlyLanguageComponent t) { //3 + if (t == null) + return this; + if (this.friendly == null) + this.friendly = new ArrayList(); + this.friendly.add(t); + return this; + } + + /** + * @return {@link #legal} (List of Legal expressions or representations of this Contract.) + */ + public List getLegal() { + if (this.legal == null) + this.legal = new ArrayList(); + return this.legal; + } + + public boolean hasLegal() { + if (this.legal == null) + return false; + for (LegalLanguageComponent item : this.legal) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #legal} (List of Legal expressions or representations of this Contract.) + */ + // syntactic sugar + public LegalLanguageComponent addLegal() { //3 + LegalLanguageComponent t = new LegalLanguageComponent(); + if (this.legal == null) + this.legal = new ArrayList(); + this.legal.add(t); + return t; + } + + // syntactic sugar + public Contract addLegal(LegalLanguageComponent t) { //3 + if (t == null) + return this; + if (this.legal == null) + this.legal = new ArrayList(); + this.legal.add(t); + return this; + } + + /** + * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (ComputableLanguageComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) + */ + // syntactic sugar + public ComputableLanguageComponent addRule() { //3 + ComputableLanguageComponent t = new ComputableLanguageComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public Contract addRule(ComputableLanguageComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this Contract.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("issued", "dateTime", "When this Contract was issued.", 0, java.lang.Integer.MAX_VALUE, issued)); + childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); + childrenList.add(new Property("subject", "Reference(Any)", "Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("authority", "Reference(Organization)", "A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", 0, java.lang.Integer.MAX_VALUE, authority)); + childrenList.add(new Property("domain", "Reference(Location)", "Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", 0, java.lang.Integer.MAX_VALUE, domain)); + childrenList.add(new Property("type", "CodeableConcept", "Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subType", "CodeableConcept", "More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.", 0, java.lang.Integer.MAX_VALUE, subType)); + childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("actionReason", "CodeableConcept", "Reason for action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, actionReason)); + childrenList.add(new Property("actor", "", "List of Contract actors.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); + childrenList.add(new Property("signer", "", "Party signing this Contract.", 0, java.lang.Integer.MAX_VALUE, signer)); + childrenList.add(new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term)); + childrenList.add(new Property("binding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, java.lang.Integer.MAX_VALUE, binding)); + childrenList.add(new Property("friendly", "", "The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly)); + childrenList.add(new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal)); + childrenList.add(new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("issued")) + this.issued = castToDateTime(value); // DateTimeType + else if (name.equals("applies")) + this.applies = castToPeriod(value); // Period + else if (name.equals("subject")) + this.getSubject().add(castToReference(value)); + else if (name.equals("authority")) + this.getAuthority().add(castToReference(value)); + else if (name.equals("domain")) + this.getDomain().add(castToReference(value)); + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subType")) + this.getSubType().add(castToCodeableConcept(value)); + else if (name.equals("action")) + this.getAction().add(castToCodeableConcept(value)); + else if (name.equals("actionReason")) + this.getActionReason().add(castToCodeableConcept(value)); + else if (name.equals("actor")) + this.getActor().add((ActorComponent) value); + else if (name.equals("valuedItem")) + this.getValuedItem().add((ValuedItemComponent) value); + else if (name.equals("signer")) + this.getSigner().add((SignatoryComponent) value); + else if (name.equals("term")) + this.getTerm().add((TermComponent) value); + else if (name.equals("binding[x]")) + this.binding = (Type) value; // Type + else if (name.equals("friendly")) + this.getFriendly().add((FriendlyLanguageComponent) value); + else if (name.equals("legal")) + this.getLegal().add((LegalLanguageComponent) value); + else if (name.equals("rule")) + this.getRule().add((ComputableLanguageComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("issued")) { + throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); + } + else if (name.equals("applies")) { + this.applies = new Period(); + return this.applies; + } + else if (name.equals("subject")) { + return addSubject(); + } + else if (name.equals("authority")) { + return addAuthority(); + } + else if (name.equals("domain")) { + return addDomain(); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("subType")) { + return addSubType(); + } + else if (name.equals("action")) { + return addAction(); + } + else if (name.equals("actionReason")) { + return addActionReason(); + } + else if (name.equals("actor")) { + return addActor(); + } + else if (name.equals("valuedItem")) { + return addValuedItem(); + } + else if (name.equals("signer")) { + return addSigner(); + } + else if (name.equals("term")) { + return addTerm(); + } + else if (name.equals("bindingAttachment")) { + this.binding = new Attachment(); + return this.binding; + } + else if (name.equals("bindingReference")) { + this.binding = new Reference(); + return this.binding; + } + else if (name.equals("friendly")) { + return addFriendly(); + } + else if (name.equals("legal")) { + return addLegal(); + } + else if (name.equals("rule")) { + return addRule(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Contract"; + + } + + public Contract copy() { + Contract dst = new Contract(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.issued = issued == null ? null : issued.copy(); + dst.applies = applies == null ? null : applies.copy(); + if (subject != null) { + dst.subject = new ArrayList(); + for (Reference i : subject) + dst.subject.add(i.copy()); + }; + if (authority != null) { + dst.authority = new ArrayList(); + for (Reference i : authority) + dst.authority.add(i.copy()); + }; + if (domain != null) { + dst.domain = new ArrayList(); + for (Reference i : domain) + dst.domain.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + if (subType != null) { + dst.subType = new ArrayList(); + for (CodeableConcept i : subType) + dst.subType.add(i.copy()); + }; + if (action != null) { + dst.action = new ArrayList(); + for (CodeableConcept i : action) + dst.action.add(i.copy()); + }; + if (actionReason != null) { + dst.actionReason = new ArrayList(); + for (CodeableConcept i : actionReason) + dst.actionReason.add(i.copy()); + }; + if (actor != null) { + dst.actor = new ArrayList(); + for (ActorComponent i : actor) + dst.actor.add(i.copy()); + }; + if (valuedItem != null) { + dst.valuedItem = new ArrayList(); + for (ValuedItemComponent i : valuedItem) + dst.valuedItem.add(i.copy()); + }; + if (signer != null) { + dst.signer = new ArrayList(); + for (SignatoryComponent i : signer) + dst.signer.add(i.copy()); + }; + if (term != null) { + dst.term = new ArrayList(); + for (TermComponent i : term) + dst.term.add(i.copy()); + }; + dst.binding = binding == null ? null : binding.copy(); + if (friendly != null) { + dst.friendly = new ArrayList(); + for (FriendlyLanguageComponent i : friendly) + dst.friendly.add(i.copy()); + }; + if (legal != null) { + dst.legal = new ArrayList(); + for (LegalLanguageComponent i : legal) + dst.legal.add(i.copy()); + }; + if (rule != null) { + dst.rule = new ArrayList(); + for (ComputableLanguageComponent i : rule) + dst.rule.add(i.copy()); + }; + return dst; + } + + protected Contract typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Contract)) + return false; + Contract o = (Contract) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) + && compareDeep(subject, o.subject, true) && compareDeep(authority, o.authority, true) && compareDeep(domain, o.domain, true) + && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(action, o.action, true) + && compareDeep(actionReason, o.actionReason, true) && compareDeep(actor, o.actor, true) && compareDeep(valuedItem, o.valuedItem, true) + && compareDeep(signer, o.signer, true) && compareDeep(term, o.term, true) && compareDeep(binding, o.binding, true) + && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) && compareDeep(rule, o.rule, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Contract)) + return false; + Contract o = (Contract) other; + return compareValues(issued, o.issued, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) + && (applies == null || applies.isEmpty()) && (subject == null || subject.isEmpty()) && (authority == null || authority.isEmpty()) + && (domain == null || domain.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) + && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty()) + && (actor == null || actor.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) && (signer == null || signer.isEmpty()) + && (term == null || term.isEmpty()) && (binding == null || binding.isEmpty()) && (friendly == null || friendly.isEmpty()) + && (legal == null || legal.isEmpty()) && (rule == null || rule.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Contract; + } + + @SearchParamDefinition(name="actor", path="Contract.actor.entity", description="Contract Actor Type", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="identifier", path="Contract.identifier", description="The identity of the contract", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="signer", path="Contract.signer.party", description="Contract Signatory Party", type="reference" ) + public static final String SP_SIGNER = "signer"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Count.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Count.java new file mode 100644 index 00000000000..cc7b08e804c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Count.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Count", profileOf=Quantity.class) +public class Count extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public Count copy() { + Count dst = new Count(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Count typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Count)) + return false; + Count o = (Count) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Count)) + return false; + Count o = (Count) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coverage.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coverage.java new file mode 100644 index 00000000000..8a53f10bfb6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Coverage.java @@ -0,0 +1,919 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Financial instrument which may be used to pay for or reimburse health care products and services. + */ +@ResourceDef(name="Coverage", profile="http://hl7.org/fhir/Profile/Coverage") +public class Coverage extends DomainResource { + + /** + * The program or plan underwriter or payor. + */ + @Child(name = "issuer", type = {Organization.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." ) + protected Reference issuer; + + /** + * The actual object that is the target of the reference (The program or plan underwriter or payor.) + */ + protected Organization issuerTarget; + + /** + * Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business. + */ + @Child(name = "bin", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="BIN Number", formalDefinition="Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business." ) + protected Identifier bin; + + /** + * Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Coverage start and end dates", formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." ) + protected Period period; + + /** + * The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health. + */ + @Child(name = "type", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of coverage", formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health." ) + protected Coding type; + + /** + * The id issued to the subscriber. + */ + @Child(name = "subscriberId", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Subscriber ID", formalDefinition="The id issued to the subscriber." ) + protected Identifier subscriberId; + + /** + * The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID. + */ + @Child(name = "identifier", type = {Identifier.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The primary coverage ID", formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID." ) + protected List identifier; + + /** + * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + @Child(name = "group", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An identifier for the group", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) + protected StringType group; + + /** + * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + @Child(name = "plan", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An identifier for the plan", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) + protected StringType plan; + + /** + * Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. + */ + @Child(name = "subPlan", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An identifier for the subsection of the plan", formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID." ) + protected StringType subPlan; + + /** + * A unique identifier for a dependent under the coverage. + */ + @Child(name = "dependent", type = {PositiveIntType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) + protected PositiveIntType dependent; + + /** + * An optional counter for a particular instance of the identified coverage which increments upon each renewal. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The plan instance or sequence counter", formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal." ) + protected PositiveIntType sequence; + + /** + * The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due. + */ + @Child(name = "subscriber", type = {Patient.class}, order=11, min=0, max=1, modifier=true, summary=false) + @Description(shortDefinition="Plan holder information", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." ) + protected Reference subscriber; + + /** + * The actual object that is the target of the reference (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + protected Patient subscriberTarget; + + /** + * The identifier for a community of providers. + */ + @Child(name = "network", type = {Identifier.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer network", formalDefinition="The identifier for a community of providers." ) + protected Identifier network; + + /** + * The policy(s) which constitute this insurance coverage. + */ + @Child(name = "contract", type = {Contract.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." ) + protected List contract; + /** + * The actual objects that are the target of the reference (The policy(s) which constitute this insurance coverage.) + */ + protected List contractTarget; + + + private static final long serialVersionUID = -1312031251L; + + /* + * Constructor + */ + public Coverage() { + super(); + } + + /** + * @return {@link #issuer} (The program or plan underwriter or payor.) + */ + public Reference getIssuer() { + if (this.issuer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.issuer"); + else if (Configuration.doAutoCreate()) + this.issuer = new Reference(); // cc + return this.issuer; + } + + public boolean hasIssuer() { + return this.issuer != null && !this.issuer.isEmpty(); + } + + /** + * @param value {@link #issuer} (The program or plan underwriter or payor.) + */ + public Coverage setIssuer(Reference value) { + this.issuer = value; + return this; + } + + /** + * @return {@link #issuer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The program or plan underwriter or payor.) + */ + public Organization getIssuerTarget() { + if (this.issuerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.issuer"); + else if (Configuration.doAutoCreate()) + this.issuerTarget = new Organization(); // aa + return this.issuerTarget; + } + + /** + * @param value {@link #issuer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The program or plan underwriter or payor.) + */ + public Coverage setIssuerTarget(Organization value) { + this.issuerTarget = value; + return this; + } + + /** + * @return {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.) + */ + public Identifier getBin() { + if (this.bin == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.bin"); + else if (Configuration.doAutoCreate()) + this.bin = new Identifier(); // cc + return this.bin; + } + + public boolean hasBin() { + return this.bin != null && !this.bin.isEmpty(); + } + + /** + * @param value {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.) + */ + public Coverage setBin(Identifier value) { + this.bin = value; + return this; + } + + /** + * @return {@link #period} (Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.) + */ + public Coverage setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #type} (The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.) + */ + public Coverage setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #subscriberId} (The id issued to the subscriber.) + */ + public Identifier getSubscriberId() { + if (this.subscriberId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.subscriberId"); + else if (Configuration.doAutoCreate()) + this.subscriberId = new Identifier(); // cc + return this.subscriberId; + } + + public boolean hasSubscriberId() { + return this.subscriberId != null && !this.subscriberId.isEmpty(); + } + + /** + * @param value {@link #subscriberId} (The id issued to the subscriber.) + */ + public Coverage setSubscriberId(Identifier value) { + this.subscriberId = value; + return this; + } + + /** + * @return {@link #identifier} (The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Coverage addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #group} (Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.). This is the underlying object with id, value and extensions. The accessor "getGroup" gives direct access to the value + */ + public StringType getGroupElement() { + if (this.group == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.group"); + else if (Configuration.doAutoCreate()) + this.group = new StringType(); // bb + return this.group; + } + + public boolean hasGroupElement() { + return this.group != null && !this.group.isEmpty(); + } + + public boolean hasGroup() { + return this.group != null && !this.group.isEmpty(); + } + + /** + * @param value {@link #group} (Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.). This is the underlying object with id, value and extensions. The accessor "getGroup" gives direct access to the value + */ + public Coverage setGroupElement(StringType value) { + this.group = value; + return this; + } + + /** + * @return Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + public String getGroup() { + return this.group == null ? null : this.group.getValue(); + } + + /** + * @param value Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + public Coverage setGroup(String value) { + if (Utilities.noString(value)) + this.group = null; + else { + if (this.group == null) + this.group = new StringType(); + this.group.setValue(value); + } + return this; + } + + /** + * @return {@link #plan} (Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.). This is the underlying object with id, value and extensions. The accessor "getPlan" gives direct access to the value + */ + public StringType getPlanElement() { + if (this.plan == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.plan"); + else if (Configuration.doAutoCreate()) + this.plan = new StringType(); // bb + return this.plan; + } + + public boolean hasPlanElement() { + return this.plan != null && !this.plan.isEmpty(); + } + + public boolean hasPlan() { + return this.plan != null && !this.plan.isEmpty(); + } + + /** + * @param value {@link #plan} (Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.). This is the underlying object with id, value and extensions. The accessor "getPlan" gives direct access to the value + */ + public Coverage setPlanElement(StringType value) { + this.plan = value; + return this; + } + + /** + * @return Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + public String getPlan() { + return this.plan == null ? null : this.plan.getValue(); + } + + /** + * @param value Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. + */ + public Coverage setPlan(String value) { + if (Utilities.noString(value)) + this.plan = null; + else { + if (this.plan == null) + this.plan = new StringType(); + this.plan.setValue(value); + } + return this; + } + + /** + * @return {@link #subPlan} (Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.). This is the underlying object with id, value and extensions. The accessor "getSubPlan" gives direct access to the value + */ + public StringType getSubPlanElement() { + if (this.subPlan == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.subPlan"); + else if (Configuration.doAutoCreate()) + this.subPlan = new StringType(); // bb + return this.subPlan; + } + + public boolean hasSubPlanElement() { + return this.subPlan != null && !this.subPlan.isEmpty(); + } + + public boolean hasSubPlan() { + return this.subPlan != null && !this.subPlan.isEmpty(); + } + + /** + * @param value {@link #subPlan} (Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.). This is the underlying object with id, value and extensions. The accessor "getSubPlan" gives direct access to the value + */ + public Coverage setSubPlanElement(StringType value) { + this.subPlan = value; + return this; + } + + /** + * @return Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. + */ + public String getSubPlan() { + return this.subPlan == null ? null : this.subPlan.getValue(); + } + + /** + * @param value Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. + */ + public Coverage setSubPlan(String value) { + if (Utilities.noString(value)) + this.subPlan = null; + else { + if (this.subPlan == null) + this.subPlan = new StringType(); + this.subPlan.setValue(value); + } + return this; + } + + /** + * @return {@link #dependent} (A unique identifier for a dependent under the coverage.). This is the underlying object with id, value and extensions. The accessor "getDependent" gives direct access to the value + */ + public PositiveIntType getDependentElement() { + if (this.dependent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.dependent"); + else if (Configuration.doAutoCreate()) + this.dependent = new PositiveIntType(); // bb + return this.dependent; + } + + public boolean hasDependentElement() { + return this.dependent != null && !this.dependent.isEmpty(); + } + + public boolean hasDependent() { + return this.dependent != null && !this.dependent.isEmpty(); + } + + /** + * @param value {@link #dependent} (A unique identifier for a dependent under the coverage.). This is the underlying object with id, value and extensions. The accessor "getDependent" gives direct access to the value + */ + public Coverage setDependentElement(PositiveIntType value) { + this.dependent = value; + return this; + } + + /** + * @return A unique identifier for a dependent under the coverage. + */ + public int getDependent() { + return this.dependent == null || this.dependent.isEmpty() ? 0 : this.dependent.getValue(); + } + + /** + * @param value A unique identifier for a dependent under the coverage. + */ + public Coverage setDependent(int value) { + if (this.dependent == null) + this.dependent = new PositiveIntType(); + this.dependent.setValue(value); + return this; + } + + /** + * @return {@link #sequence} (An optional counter for a particular instance of the identified coverage which increments upon each renewal.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (An optional counter for a particular instance of the identified coverage which increments upon each renewal.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public Coverage setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return An optional counter for a particular instance of the identified coverage which increments upon each renewal. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value An optional counter for a particular instance of the identified coverage which increments upon each renewal. + */ + public Coverage setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #subscriber} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Reference getSubscriber() { + if (this.subscriber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.subscriber"); + else if (Configuration.doAutoCreate()) + this.subscriber = new Reference(); // cc + return this.subscriber; + } + + public boolean hasSubscriber() { + return this.subscriber != null && !this.subscriber.isEmpty(); + } + + /** + * @param value {@link #subscriber} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Coverage setSubscriber(Reference value) { + this.subscriber = value; + return this; + } + + /** + * @return {@link #subscriber} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Patient getSubscriberTarget() { + if (this.subscriberTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.subscriber"); + else if (Configuration.doAutoCreate()) + this.subscriberTarget = new Patient(); // aa + return this.subscriberTarget; + } + + /** + * @param value {@link #subscriber} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Coverage setSubscriberTarget(Patient value) { + this.subscriberTarget = value; + return this; + } + + /** + * @return {@link #network} (The identifier for a community of providers.) + */ + public Identifier getNetwork() { + if (this.network == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.network"); + else if (Configuration.doAutoCreate()) + this.network = new Identifier(); // cc + return this.network; + } + + public boolean hasNetwork() { + return this.network != null && !this.network.isEmpty(); + } + + /** + * @param value {@link #network} (The identifier for a community of providers.) + */ + public Coverage setNetwork(Identifier value) { + this.network = value; + return this; + } + + /** + * @return {@link #contract} (The policy(s) which constitute this insurance coverage.) + */ + public List getContract() { + if (this.contract == null) + this.contract = new ArrayList(); + return this.contract; + } + + public boolean hasContract() { + if (this.contract == null) + return false; + for (Reference item : this.contract) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contract} (The policy(s) which constitute this insurance coverage.) + */ + // syntactic sugar + public Reference addContract() { //3 + Reference t = new Reference(); + if (this.contract == null) + this.contract = new ArrayList(); + this.contract.add(t); + return t; + } + + // syntactic sugar + public Coverage addContract(Reference t) { //3 + if (t == null) + return this; + if (this.contract == null) + this.contract = new ArrayList(); + this.contract.add(t); + return this; + } + + /** + * @return {@link #contract} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The policy(s) which constitute this insurance coverage.) + */ + public List getContractTarget() { + if (this.contractTarget == null) + this.contractTarget = new ArrayList(); + return this.contractTarget; + } + + // syntactic sugar + /** + * @return {@link #contract} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The policy(s) which constitute this insurance coverage.) + */ + public Contract addContractTarget() { + Contract r = new Contract(); + if (this.contractTarget == null) + this.contractTarget = new ArrayList(); + this.contractTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("issuer", "Reference(Organization)", "The program or plan underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, issuer)); + childrenList.add(new Property("bin", "Identifier", "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", 0, java.lang.Integer.MAX_VALUE, bin)); + childrenList.add(new Property("period", "Period", "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("type", "Coding", "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subscriberId", "Identifier", "The id issued to the subscriber.", 0, java.lang.Integer.MAX_VALUE, subscriberId)); + childrenList.add(new Property("identifier", "Identifier", "The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("group", "string", "Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.", 0, java.lang.Integer.MAX_VALUE, group)); + childrenList.add(new Property("plan", "string", "Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.", 0, java.lang.Integer.MAX_VALUE, plan)); + childrenList.add(new Property("subPlan", "string", "Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.", 0, java.lang.Integer.MAX_VALUE, subPlan)); + childrenList.add(new Property("dependent", "positiveInt", "A unique identifier for a dependent under the coverage.", 0, java.lang.Integer.MAX_VALUE, dependent)); + childrenList.add(new Property("sequence", "positiveInt", "An optional counter for a particular instance of the identified coverage which increments upon each renewal.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("subscriber", "Reference(Patient)", "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", 0, java.lang.Integer.MAX_VALUE, subscriber)); + childrenList.add(new Property("network", "Identifier", "The identifier for a community of providers.", 0, java.lang.Integer.MAX_VALUE, network)); + childrenList.add(new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("issuer")) + this.issuer = castToReference(value); // Reference + else if (name.equals("bin")) + this.bin = castToIdentifier(value); // Identifier + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("subscriberId")) + this.subscriberId = castToIdentifier(value); // Identifier + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("group")) + this.group = castToString(value); // StringType + else if (name.equals("plan")) + this.plan = castToString(value); // StringType + else if (name.equals("subPlan")) + this.subPlan = castToString(value); // StringType + else if (name.equals("dependent")) + this.dependent = castToPositiveInt(value); // PositiveIntType + else if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("subscriber")) + this.subscriber = castToReference(value); // Reference + else if (name.equals("network")) + this.network = castToIdentifier(value); // Identifier + else if (name.equals("contract")) + this.getContract().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("issuer")) { + this.issuer = new Reference(); + return this.issuer; + } + else if (name.equals("bin")) { + this.bin = new Identifier(); + return this.bin; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("subscriberId")) { + this.subscriberId = new Identifier(); + return this.subscriberId; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("group")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.group"); + } + else if (name.equals("plan")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.plan"); + } + else if (name.equals("subPlan")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.subPlan"); + } + else if (name.equals("dependent")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.dependent"); + } + else if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.sequence"); + } + else if (name.equals("subscriber")) { + this.subscriber = new Reference(); + return this.subscriber; + } + else if (name.equals("network")) { + this.network = new Identifier(); + return this.network; + } + else if (name.equals("contract")) { + return addContract(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Coverage"; + + } + + public Coverage copy() { + Coverage dst = new Coverage(); + copyValues(dst); + dst.issuer = issuer == null ? null : issuer.copy(); + dst.bin = bin == null ? null : bin.copy(); + dst.period = period == null ? null : period.copy(); + dst.type = type == null ? null : type.copy(); + dst.subscriberId = subscriberId == null ? null : subscriberId.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.group = group == null ? null : group.copy(); + dst.plan = plan == null ? null : plan.copy(); + dst.subPlan = subPlan == null ? null : subPlan.copy(); + dst.dependent = dependent == null ? null : dependent.copy(); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.subscriber = subscriber == null ? null : subscriber.copy(); + dst.network = network == null ? null : network.copy(); + if (contract != null) { + dst.contract = new ArrayList(); + for (Reference i : contract) + dst.contract.add(i.copy()); + }; + return dst; + } + + protected Coverage typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Coverage)) + return false; + Coverage o = (Coverage) other; + return compareDeep(issuer, o.issuer, true) && compareDeep(bin, o.bin, true) && compareDeep(period, o.period, true) + && compareDeep(type, o.type, true) && compareDeep(subscriberId, o.subscriberId, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(group, o.group, true) && compareDeep(plan, o.plan, true) && compareDeep(subPlan, o.subPlan, true) + && compareDeep(dependent, o.dependent, true) && compareDeep(sequence, o.sequence, true) && compareDeep(subscriber, o.subscriber, true) + && compareDeep(network, o.network, true) && compareDeep(contract, o.contract, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Coverage)) + return false; + Coverage o = (Coverage) other; + return compareValues(group, o.group, true) && compareValues(plan, o.plan, true) && compareValues(subPlan, o.subPlan, true) + && compareValues(dependent, o.dependent, true) && compareValues(sequence, o.sequence, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (issuer == null || issuer.isEmpty()) && (bin == null || bin.isEmpty()) + && (period == null || period.isEmpty()) && (type == null || type.isEmpty()) && (subscriberId == null || subscriberId.isEmpty()) + && (identifier == null || identifier.isEmpty()) && (group == null || group.isEmpty()) && (plan == null || plan.isEmpty()) + && (subPlan == null || subPlan.isEmpty()) && (dependent == null || dependent.isEmpty()) && (sequence == null || sequence.isEmpty()) + && (subscriber == null || subscriber.isEmpty()) && (network == null || network.isEmpty()) + && (contract == null || contract.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Coverage; + } + + @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) + public static final String SP_SEQUENCE = "sequence"; + @SearchParamDefinition(name="subplan", path="Coverage.subPlan", description="Sub-plan identifier", type="token" ) + public static final String SP_SUBPLAN = "subplan"; + @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" ) + public static final String SP_PLAN = "plan"; + @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" ) + public static final String SP_DEPENDENT = "dependent"; + @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" ) + public static final String SP_ISSUER = "issuer"; + @SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" ) + public static final String SP_GROUP = "group"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DataElement.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DataElement.java new file mode 100644 index 00000000000..6d65258be36 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DataElement.java @@ -0,0 +1,1670 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The formal description of a single piece of information that can be gathered and reported. + */ +@ResourceDef(name="DataElement", profile="http://hl7.org/fhir/Profile/DataElement") +public class DataElement extends DomainResource { + + public enum DataElementStringency { + /** + * The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required). + */ + COMPARABLE, + /** + * The data element is fully specified down to a single value set, single unit of measure, single data type, etc. Multiple pieces of data associated with this data element are fully comparable. + */ + FULLYSPECIFIED, + /** + * The data element allows multiple units of measure having equivalent meaning; e.g. "cc" (cubic centimeter) and "mL" (milliliter). + */ + EQUIVALENT, + /** + * The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning. + */ + CONVERTABLE, + /** + * A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg. + */ + SCALEABLE, + /** + * The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible. + */ + FLEXIBLE, + /** + * added to help the parsers + */ + NULL; + public static DataElementStringency fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("comparable".equals(codeString)) + return COMPARABLE; + if ("fully-specified".equals(codeString)) + return FULLYSPECIFIED; + if ("equivalent".equals(codeString)) + return EQUIVALENT; + if ("convertable".equals(codeString)) + return CONVERTABLE; + if ("scaleable".equals(codeString)) + return SCALEABLE; + if ("flexible".equals(codeString)) + return FLEXIBLE; + throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPARABLE: return "comparable"; + case FULLYSPECIFIED: return "fully-specified"; + case EQUIVALENT: return "equivalent"; + case CONVERTABLE: return "convertable"; + case SCALEABLE: return "scaleable"; + case FLEXIBLE: return "flexible"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPARABLE: return "http://hl7.org/fhir/dataelement-stringency"; + case FULLYSPECIFIED: return "http://hl7.org/fhir/dataelement-stringency"; + case EQUIVALENT: return "http://hl7.org/fhir/dataelement-stringency"; + case CONVERTABLE: return "http://hl7.org/fhir/dataelement-stringency"; + case SCALEABLE: return "http://hl7.org/fhir/dataelement-stringency"; + case FLEXIBLE: return "http://hl7.org/fhir/dataelement-stringency"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPARABLE: return "The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required)."; + case FULLYSPECIFIED: return "The data element is fully specified down to a single value set, single unit of measure, single data type, etc. Multiple pieces of data associated with this data element are fully comparable."; + case EQUIVALENT: return "The data element allows multiple units of measure having equivalent meaning; e.g. \"cc\" (cubic centimeter) and \"mL\" (milliliter)."; + case CONVERTABLE: return "The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning."; + case SCALEABLE: return "A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg."; + case FLEXIBLE: return "The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPARABLE: return "Comparable"; + case FULLYSPECIFIED: return "Fully Specified"; + case EQUIVALENT: return "Equivalent"; + case CONVERTABLE: return "Convertable"; + case SCALEABLE: return "Scaleable"; + case FLEXIBLE: return "Flexible"; + default: return "?"; + } + } + } + + public static class DataElementStringencyEnumFactory implements EnumFactory { + public DataElementStringency fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("comparable".equals(codeString)) + return DataElementStringency.COMPARABLE; + if ("fully-specified".equals(codeString)) + return DataElementStringency.FULLYSPECIFIED; + if ("equivalent".equals(codeString)) + return DataElementStringency.EQUIVALENT; + if ("convertable".equals(codeString)) + return DataElementStringency.CONVERTABLE; + if ("scaleable".equals(codeString)) + return DataElementStringency.SCALEABLE; + if ("flexible".equals(codeString)) + return DataElementStringency.FLEXIBLE; + throw new IllegalArgumentException("Unknown DataElementStringency code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("comparable".equals(codeString)) + return new Enumeration(this, DataElementStringency.COMPARABLE); + if ("fully-specified".equals(codeString)) + return new Enumeration(this, DataElementStringency.FULLYSPECIFIED); + if ("equivalent".equals(codeString)) + return new Enumeration(this, DataElementStringency.EQUIVALENT); + if ("convertable".equals(codeString)) + return new Enumeration(this, DataElementStringency.CONVERTABLE); + if ("scaleable".equals(codeString)) + return new Enumeration(this, DataElementStringency.SCALEABLE); + if ("flexible".equals(codeString)) + return new Enumeration(this, DataElementStringency.FLEXIBLE); + throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'"); + } + public String toCode(DataElementStringency code) { + if (code == DataElementStringency.COMPARABLE) + return "comparable"; + if (code == DataElementStringency.FULLYSPECIFIED) + return "fully-specified"; + if (code == DataElementStringency.EQUIVALENT) + return "equivalent"; + if (code == DataElementStringency.CONVERTABLE) + return "convertable"; + if (code == DataElementStringency.SCALEABLE) + return "scaleable"; + if (code == DataElementStringency.FLEXIBLE) + return "flexible"; + return "?"; + } + } + + @Block() + public static class DataElementContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the data element. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the data element." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public DataElementContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the data element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElementContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the data element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public DataElementContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the data element. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the data element. + */ + public DataElementContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public DataElementContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the data element.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public DataElementContactComponent copy() { + DataElementContactComponent dst = new DataElementContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataElementContactComponent)) + return false; + DataElementContactComponent o = (DataElementContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataElementContactComponent)) + return false; + DataElementContactComponent o = (DataElementContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "DataElement.contact"; + + } + + } + + @Block() + public static class DataElementMappingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. + */ + @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis." ) + protected IdType identity; + + /** + * An absolute URI that identifies the specification that this mapping is expressed to. + */ + @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="An absolute URI that identifies the specification that this mapping is expressed to." ) + protected UriType uri; + + /** + * A name for the specification that is being mapped to. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) + protected StringType name; + + /** + * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + @Child(name = "comments", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Versions, Issues, Scope limitations etc.", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) + protected StringType comments; + + private static final long serialVersionUID = 299630820L; + + /* + * Constructor + */ + public DataElementMappingComponent() { + super(); + } + + /* + * Constructor + */ + public DataElementMappingComponent(IdType identity) { + super(); + this.identity = identity; + } + + /** + * @return {@link #identity} (An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public IdType getIdentityElement() { + if (this.identity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElementMappingComponent.identity"); + else if (Configuration.doAutoCreate()) + this.identity = new IdType(); // bb + return this.identity; + } + + public boolean hasIdentityElement() { + return this.identity != null && !this.identity.isEmpty(); + } + + public boolean hasIdentity() { + return this.identity != null && !this.identity.isEmpty(); + } + + /** + * @param value {@link #identity} (An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public DataElementMappingComponent setIdentityElement(IdType value) { + this.identity = value; + return this; + } + + /** + * @return An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. + */ + public String getIdentity() { + return this.identity == null ? null : this.identity.getValue(); + } + + /** + * @param value An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. + */ + public DataElementMappingComponent setIdentity(String value) { + if (this.identity == null) + this.identity = new IdType(); + this.identity.setValue(value); + return this; + } + + /** + * @return {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public UriType getUriElement() { + if (this.uri == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElementMappingComponent.uri"); + else if (Configuration.doAutoCreate()) + this.uri = new UriType(); // bb + return this.uri; + } + + public boolean hasUriElement() { + return this.uri != null && !this.uri.isEmpty(); + } + + public boolean hasUri() { + return this.uri != null && !this.uri.isEmpty(); + } + + /** + * @param value {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public DataElementMappingComponent setUriElement(UriType value) { + this.uri = value; + return this; + } + + /** + * @return An absolute URI that identifies the specification that this mapping is expressed to. + */ + public String getUri() { + return this.uri == null ? null : this.uri.getValue(); + } + + /** + * @param value An absolute URI that identifies the specification that this mapping is expressed to. + */ + public DataElementMappingComponent setUri(String value) { + if (Utilities.noString(value)) + this.uri = null; + else { + if (this.uri == null) + this.uri = new UriType(); + this.uri.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElementMappingComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public DataElementMappingComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A name for the specification that is being mapped to. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A name for the specification that is being mapped to. + */ + public DataElementMappingComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public StringType getCommentsElement() { + if (this.comments == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElementMappingComponent.comments"); + else if (Configuration.doAutoCreate()) + this.comments = new StringType(); // bb + return this.comments; + } + + public boolean hasCommentsElement() { + return this.comments != null && !this.comments.isEmpty(); + } + + public boolean hasComments() { + return this.comments != null && !this.comments.isEmpty(); + } + + /** + * @param value {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public DataElementMappingComponent setCommentsElement(StringType value) { + this.comments = value; + return this; + } + + /** + * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + public String getComments() { + return this.comments == null ? null : this.comments.getValue(); + } + + /** + * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + public DataElementMappingComponent setComments(String value) { + if (Utilities.noString(value)) + this.comments = null; + else { + if (this.comments == null) + this.comments = new StringType(); + this.comments.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identity", "id", "An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.", 0, java.lang.Integer.MAX_VALUE, identity)); + childrenList.add(new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); + childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identity")) + this.identity = castToId(value); // IdType + else if (name.equals("uri")) + this.uri = castToUri(value); // UriType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("comments")) + this.comments = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identity")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.identity"); + } + else if (name.equals("uri")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.uri"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + } + else if (name.equals("comments")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.comments"); + } + else + return super.addChild(name); + } + + public DataElementMappingComponent copy() { + DataElementMappingComponent dst = new DataElementMappingComponent(); + copyValues(dst); + dst.identity = identity == null ? null : identity.copy(); + dst.uri = uri == null ? null : uri.copy(); + dst.name = name == null ? null : name.copy(); + dst.comments = comments == null ? null : comments.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataElementMappingComponent)) + return false; + DataElementMappingComponent o = (DataElementMappingComponent) other; + return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) + && compareDeep(comments, o.comments, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataElementMappingComponent)) + return false; + DataElementMappingComponent o = (DataElementMappingComponent) other; + return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) + && compareValues(comments, o.comments, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) + && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); + } + + public String fhirType() { + return "DataElement.mapping"; + + } + + } + + /** + * An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Globally unique logical id for data element", formalDefinition="An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical id to reference this data element", formalDefinition="Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected List identifier; + + /** + * The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the data element", formalDefinition="The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually." ) + protected StringType version; + + /** + * The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." ) + protected StringType name; + + /** + * The status of the data element. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." ) + protected Enumeration status; + + /** + * A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the data element. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the data element." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for this version of the data element", formalDefinition="The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes." ) + protected DateTimeType date; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions." ) + protected List useContext; + + /** + * A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element. + */ + @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element." ) + protected StringType copyright; + + /** + * Identifies how precise the data element is in its definition. + */ + @Child(name = "stringency", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." ) + protected Enumeration stringency; + + /** + * Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with. + */ + @Child(name = "mapping", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="External specification mapped to", formalDefinition="Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with." ) + protected List mapping; + + /** + * Defines the structure, type, allowed values and other constraining characteristics of the data element. + */ + @Child(name = "element", type = {ElementDefinition.class}, order=13, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Definition of element", formalDefinition="Defines the structure, type, allowed values and other constraining characteristics of the data element." ) + protected List element; + + private static final long serialVersionUID = 2017352331L; + + /* + * Constructor + */ + public DataElement() { + super(); + } + + /* + * Constructor + */ + public DataElement(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public DataElement setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. + */ + public DataElement setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DataElement addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public DataElement setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually. + */ + public DataElement setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public DataElement setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + public DataElement setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of the data element.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the data element.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DataElement setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the data element. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the data element. + */ + public DataElement setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public DataElement setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public DataElement setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the data element.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the data element.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public DataElement setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the data element. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the data element. + */ + public DataElement setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (DataElementContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public DataElementContactComponent addContact() { //3 + DataElementContactComponent t = new DataElementContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public DataElement addContact(DataElementContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DataElement setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. + */ + public DataElement setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public DataElement addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public DataElement setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element. + */ + public DataElement setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value + */ + public Enumeration getStringencyElement() { + if (this.stringency == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.stringency"); + else if (Configuration.doAutoCreate()) + this.stringency = new Enumeration(new DataElementStringencyEnumFactory()); // bb + return this.stringency; + } + + public boolean hasStringencyElement() { + return this.stringency != null && !this.stringency.isEmpty(); + } + + public boolean hasStringency() { + return this.stringency != null && !this.stringency.isEmpty(); + } + + /** + * @param value {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value + */ + public DataElement setStringencyElement(Enumeration value) { + this.stringency = value; + return this; + } + + /** + * @return Identifies how precise the data element is in its definition. + */ + public DataElementStringency getStringency() { + return this.stringency == null ? null : this.stringency.getValue(); + } + + /** + * @param value Identifies how precise the data element is in its definition. + */ + public DataElement setStringency(DataElementStringency value) { + if (value == null) + this.stringency = null; + else { + if (this.stringency == null) + this.stringency = new Enumeration(new DataElementStringencyEnumFactory()); + this.stringency.setValue(value); + } + return this; + } + + /** + * @return {@link #mapping} (Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.) + */ + public List getMapping() { + if (this.mapping == null) + this.mapping = new ArrayList(); + return this.mapping; + } + + public boolean hasMapping() { + if (this.mapping == null) + return false; + for (DataElementMappingComponent item : this.mapping) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mapping} (Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.) + */ + // syntactic sugar + public DataElementMappingComponent addMapping() { //3 + DataElementMappingComponent t = new DataElementMappingComponent(); + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return t; + } + + // syntactic sugar + public DataElement addMapping(DataElementMappingComponent t) { //3 + if (t == null) + return this; + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return this; + } + + /** + * @return {@link #element} (Defines the structure, type, allowed values and other constraining characteristics of the data element.) + */ + public List getElement() { + if (this.element == null) + this.element = new ArrayList(); + return this.element; + } + + public boolean hasElement() { + if (this.element == null) + return false; + for (ElementDefinition item : this.element) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #element} (Defines the structure, type, allowed values and other constraining characteristics of the data element.) + */ + // syntactic sugar + public ElementDefinition addElement() { //3 + ElementDefinition t = new ElementDefinition(); + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return t; + } + + // syntactic sugar + public DataElement addElement(ElementDefinition t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the data element.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the data element.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("stringency", "code", "Identifies how precise the data element is in its definition.", 0, java.lang.Integer.MAX_VALUE, stringency)); + childrenList.add(new Property("mapping", "", "Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.", 0, java.lang.Integer.MAX_VALUE, mapping)); + childrenList.add(new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((DataElementContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("stringency")) + this.stringency = new DataElementStringencyEnumFactory().fromType(value); // Enumeration + else if (name.equals("mapping")) + this.getMapping().add((DataElementMappingComponent) value); + else if (name.equals("element")) + this.getElement().add(castToElementDefinition(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.url"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.date"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.copyright"); + } + else if (name.equals("stringency")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.stringency"); + } + else if (name.equals("mapping")) { + return addMapping(); + } + else if (name.equals("element")) { + return addElement(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DataElement"; + + } + + public DataElement copy() { + DataElement dst = new DataElement(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (DataElementContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.copyright = copyright == null ? null : copyright.copy(); + dst.stringency = stringency == null ? null : stringency.copy(); + if (mapping != null) { + dst.mapping = new ArrayList(); + for (DataElementMappingComponent i : mapping) + dst.mapping.add(i.copy()); + }; + if (element != null) { + dst.element = new ArrayList(); + for (ElementDefinition i : element) + dst.element.add(i.copy()); + }; + return dst; + } + + protected DataElement typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataElement)) + return false; + DataElement o = (DataElement) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(useContext, o.useContext, true) && compareDeep(copyright, o.copyright, true) && compareDeep(stringency, o.stringency, true) + && compareDeep(mapping, o.mapping, true) && compareDeep(element, o.element, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataElement)) + return false; + DataElement o = (DataElement) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(copyright, o.copyright, true) && compareValues(stringency, o.stringency, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (stringency == null || stringency.isEmpty()) + && (mapping == null || mapping.isEmpty()) && (element == null || element.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DataElement; + } + + @SearchParamDefinition(name="date", path="DataElement.date", description="The data element publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="DataElement.identifier", description="The identifier of the data element", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="DataElement.element.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="stringency", path="DataElement.stringency", description="The stringency of the data element definition", type="token" ) + public static final String SP_STRINGENCY = "stringency"; + @SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="DataElement.useContext", description="A use context assigned to the data element", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="DataElement.element.definition", description="Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="version", path="DataElement.version", description="The version identifier of the data element", type="string" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="DataElement.url", description="The official URL for the data element", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateTimeType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateTimeType.java new file mode 100644 index 00000000000..f5ae4faac0d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateTimeType.java @@ -0,0 +1,196 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +package org.hl7.fhir.dstu21.model; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; +import java.util.zip.DataFormatException; + +import org.apache.commons.lang3.time.DateUtils; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR dateTime datatype. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ +@DatatypeDef(name = "dateTime") +public class DateTimeType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.SECOND; + + /** + * Constructor + */ + public DateTimeType() { + super(); + } + + /** + * Create a new DateTimeDt with seconds precision and the local time zone + */ + public DateTimeType(Date theDate) { + super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); + } + + /** + * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision) { + super(theDate, thePrecision, TimeZone.getDefault()); + } + + /** + * Create a new instance using a string date/time + * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public DateTimeType(String theValue) { + super(theValue); + } + + /** + * Constructor which accepts a date value, precision value, and time zone. Valid precisions values for this type + * are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ + public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { + super(theDate, thePrecision, theTimezone); + } + + /** + * Constructor + */ + public DateTimeType(Calendar theCalendar) { + if (theCalendar != null) { + setValue(theCalendar.getTime()); + setPrecision(DEFAULT_PRECISION); + setTimeZone(theCalendar.getTimeZone()); + } + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case YEAR: + case MONTH: + case DAY: + case SECOND: + case MILLI: + return true; + default: + return false; + } + } + + /** + * Returns a new instance of DateTimeType with the current system time and SECOND precision and the system local time + * zone + */ + public static DateTimeType now() { + return new DateTimeType(new Date(), TemporalPrecisionEnum.SECOND, TimeZone.getDefault()); + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + @Override + public DateTimeType copy() { + return new DateTimeType(getValueAsString()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static DateTimeType parseV3(String theV3String) { + DateTimeType retVal = new DateTimeType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + public static DateTimeType today() { + DateTimeType retVal = now(); + retVal.setPrecision(TemporalPrecisionEnum.DAY); + return retVal; + } + + public boolean getTzSign() { + return getTimeZone().getRawOffset() >= 0; + } + + public int getTzHour() { + return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) / 60; + } + + public int getTzMin() { + return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) % 60; + } + + + public String fhirType() { + return "dateTime"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateType.java new file mode 100644 index 00000000000..3c22336c19a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DateType.java @@ -0,0 +1,141 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +package org.hl7.fhir.dstu21.model; + +/** + * Primitive type "date" in FHIR: any day in a gregorian calendar + */ + +import java.util.Date; +import java.util.TimeZone; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR date datatype. Valid precisions values for this type are: + *
    + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} + *
+ */ +@DatatypeDef(name = "date") +public class DateType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.DAY; + + /** + * Constructor + */ + public DateType() { + super(); + } + + /** + * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type + */ + public DateType(Date theDate) { + super(theDate, DEFAULT_PRECISION); + } + + /** + * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: + *
    + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} + *
+ * + * @throws ca.uhn.fhir.parser.DataFormatException + * If the specified precision is not allowed for this type + */ + public DateType(Date theDate, TemporalPrecisionEnum thePrecision) { + super(theDate, thePrecision); + } + + /** + * Constructor which accepts a date as a string in FHIR format + * + * @throws ca.uhn.fhir.parser.DataFormatException + * If the precision in the date string is not allowed for this type + */ + public DateType(String theDate) { + super(theDate); + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case YEAR: + case MONTH: + case DAY: + return true; + default: + return false; + } + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + @Override + public DateType copy() { + return new DateType(getValue()); + } + + public static InstantType today() { + return new InstantType(new Date(), TemporalPrecisionEnum.DAY, TimeZone.getDefault()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static DateType parseV3(String theV3String) { + DateType retVal = new DateType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + public String fhirType() { + return "date"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecimalType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecimalType.java new file mode 100644 index 00000000000..b64d8911509 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecimalType.java @@ -0,0 +1,177 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; + +import org.hl7.fhir.instance.model.api.IBaseDecimalDatatype; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "decimal" in FHIR: A rational number + */ +@DatatypeDef(name = "decimal") +public class DecimalType extends PrimitiveType implements Comparable, IBaseDecimalDatatype { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public DecimalType() { + super(); + } + + /** + * Constructor + */ + public DecimalType(BigDecimal theValue) { + setValue(theValue); + } + + /** + * Constructor + */ + public DecimalType(double theValue) { + // Use the valueOf here because the constructor gives wacky precision + // changes due to the floating point conversion + setValue(BigDecimal.valueOf(theValue)); + } + + /** + * Constructor + */ + public DecimalType(long theValue) { + setValue(new BigDecimal(theValue)); + } + + /** + * Constructor + */ + public DecimalType(String theValue) { + setValue(new BigDecimal(theValue)); + } + + @Override + public int compareTo(DecimalType theObj) { + if (getValue() == null && theObj.getValue() == null) { + return 0; + } + if (getValue() != null && theObj.getValue() == null) { + return 1; + } + if (getValue() == null && theObj.getValue() != null) { + return -1; + } + return getValue().compareTo(theObj.getValue()); + } + + @Override + protected String encode(BigDecimal theValue) { + return getValue().toPlainString(); + } + + /** + * Gets the value as an integer, using {@link BigDecimal#intValue()} + */ + public int getValueAsInteger() { + return getValue().intValue(); + } + + public Number getValueAsNumber() { + return getValue(); + } + + @Override + protected BigDecimal parse(String theValue) { + return new BigDecimal(theValue); + } + + /** + * Rounds the value to the given prevision + * + * @see MathContext#getPrecision() + */ + public void round(int thePrecision) { + if (getValue() != null) { + BigDecimal newValue = getValue().round(new MathContext(thePrecision)); + setValue(newValue); + } + } + + /** + * Rounds the value to the given prevision + * + * @see MathContext#getPrecision() + * @see MathContext#getRoundingMode() + */ + public void round(int thePrecision, RoundingMode theRoundingMode) { + if (getValue() != null) { + BigDecimal newValue = getValue().round(new MathContext(thePrecision, theRoundingMode)); + setValue(newValue); + } + } + + /** + * Sets a new value using an integer + */ + public void setValueAsInteger(int theValue) { + setValue(new BigDecimal(theValue)); + } + + /** + * Sets a new value using a long + */ + public void setValue(long theValue) { + setValue(new BigDecimal(theValue)); + } + + /** + * Sets a new value using a double + */ + public void setValue(double theValue) { + setValue(new BigDecimal(theValue)); + } + + @Override + public DecimalType copy() { + return new DecimalType(getValue()); + } + + public String fhirType() { + return "decimal"; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportRule.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportRule.java new file mode 100644 index 00000000000..125721da7a7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportRule.java @@ -0,0 +1,2308 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource defines a decision support rule of the form [on Event] if Condition then Action. + */ +@ResourceDef(name="DecisionSupportRule", profile="http://hl7.org/fhir/Profile/DecisionSupportRule") +public class DecisionSupportRule extends DomainResource { + + public enum DecisionSupportRuleTriggerType { + /** + * The trigger occurs in response to a specific named event + */ + NAMEDEVENT, + /** + * The trigger occurs at a specific time or periodically as described by a timing or schedule + */ + PERIODIC, + /** + * The trigger occurs whenever data of a particular type is added + */ + DATAADDED, + /** + * The trigger occurs whenever data of a particular type is modified + */ + DATAMODIFIED, + /** + * The trigger occurs whenever data of a particular type is removed + */ + DATAREMOVED, + /** + * The trigger occurs whenever data of a particular type is accessed + */ + DATAACCESSED, + /** + * The trigger occurs whenever access to data of a particular type is completed + */ + DATAACCESSENDED, + /** + * added to help the parsers + */ + NULL; + public static DecisionSupportRuleTriggerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return NAMEDEVENT; + if ("periodic".equals(codeString)) + return PERIODIC; + if ("data-added".equals(codeString)) + return DATAADDED; + if ("data-modified".equals(codeString)) + return DATAMODIFIED; + if ("data-removed".equals(codeString)) + return DATAREMOVED; + if ("data-accessed".equals(codeString)) + return DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return DATAACCESSENDED; + throw new FHIRException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NAMEDEVENT: return "named-event"; + case PERIODIC: return "periodic"; + case DATAADDED: return "data-added"; + case DATAMODIFIED: return "data-modified"; + case DATAREMOVED: return "data-removed"; + case DATAACCESSED: return "data-accessed"; + case DATAACCESSENDED: return "data-access-ended"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NAMEDEVENT: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case PERIODIC: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case DATAADDED: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case DATAMODIFIED: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case DATAREMOVED: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case DATAACCESSED: return "http://hl7.org/fhir/cds-rule-trigger-type"; + case DATAACCESSENDED: return "http://hl7.org/fhir/cds-rule-trigger-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NAMEDEVENT: return "The trigger occurs in response to a specific named event"; + case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule"; + case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; + case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; + case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; + case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed"; + case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NAMEDEVENT: return "Named Event"; + case PERIODIC: return "Periodic"; + case DATAADDED: return "Data Added"; + case DATAMODIFIED: return "Data Modified"; + case DATAREMOVED: return "Data Removed"; + case DATAACCESSED: return "Data Accessed"; + case DATAACCESSENDED: return "Data Access Ended"; + default: return "?"; + } + } + } + + public static class DecisionSupportRuleTriggerTypeEnumFactory implements EnumFactory { + public DecisionSupportRuleTriggerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return DecisionSupportRuleTriggerType.NAMEDEVENT; + if ("periodic".equals(codeString)) + return DecisionSupportRuleTriggerType.PERIODIC; + if ("data-added".equals(codeString)) + return DecisionSupportRuleTriggerType.DATAADDED; + if ("data-modified".equals(codeString)) + return DecisionSupportRuleTriggerType.DATAMODIFIED; + if ("data-removed".equals(codeString)) + return DecisionSupportRuleTriggerType.DATAREMOVED; + if ("data-accessed".equals(codeString)) + return DecisionSupportRuleTriggerType.DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return DecisionSupportRuleTriggerType.DATAACCESSENDED; + throw new IllegalArgumentException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.NAMEDEVENT); + if ("periodic".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.PERIODIC); + if ("data-added".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.DATAADDED); + if ("data-modified".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.DATAMODIFIED); + if ("data-removed".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.DATAREMOVED); + if ("data-accessed".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.DATAACCESSED); + if ("data-access-ended".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleTriggerType.DATAACCESSENDED); + throw new FHIRException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); + } + public String toCode(DecisionSupportRuleTriggerType code) { + if (code == DecisionSupportRuleTriggerType.NAMEDEVENT) + return "named-event"; + if (code == DecisionSupportRuleTriggerType.PERIODIC) + return "periodic"; + if (code == DecisionSupportRuleTriggerType.DATAADDED) + return "data-added"; + if (code == DecisionSupportRuleTriggerType.DATAMODIFIED) + return "data-modified"; + if (code == DecisionSupportRuleTriggerType.DATAREMOVED) + return "data-removed"; + if (code == DecisionSupportRuleTriggerType.DATAACCESSED) + return "data-accessed"; + if (code == DecisionSupportRuleTriggerType.DATAACCESSENDED) + return "data-access-ended"; + return "?"; + } + } + + public enum DecisionSupportRuleParticipantType { + /** + * The participant is the patient under evaluation + */ + PATIENT, + /** + * The participant is a person + */ + PERSON, + /** + * The participant is a practitioner involved in the patient's care + */ + PRACTITIONER, + /** + * The participant is a person related to the patient + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static DecisionSupportRuleParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("person".equals(codeString)) + return PERSON; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("related-person".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PERSON: return "person"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "related-person"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PATIENT: return "http://hl7.org/fhir/cds-rule-participant"; + case PERSON: return "http://hl7.org/fhir/cds-rule-participant"; + case PRACTITIONER: return "http://hl7.org/fhir/cds-rule-participant"; + case RELATEDPERSON: return "http://hl7.org/fhir/cds-rule-participant"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The participant is the patient under evaluation"; + case PERSON: return "The participant is a person"; + case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; + case RELATEDPERSON: return "The participant is a person related to the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "Related Person"; + default: return "?"; + } + } + } + + public static class DecisionSupportRuleParticipantTypeEnumFactory implements EnumFactory { + public DecisionSupportRuleParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return DecisionSupportRuleParticipantType.PATIENT; + if ("person".equals(codeString)) + return DecisionSupportRuleParticipantType.PERSON; + if ("practitioner".equals(codeString)) + return DecisionSupportRuleParticipantType.PRACTITIONER; + if ("related-person".equals(codeString)) + return DecisionSupportRuleParticipantType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleParticipantType.PATIENT); + if ("person".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleParticipantType.PERSON); + if ("practitioner".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleParticipantType.PRACTITIONER); + if ("related-person".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleParticipantType.RELATEDPERSON); + throw new FHIRException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); + } + public String toCode(DecisionSupportRuleParticipantType code) { + if (code == DecisionSupportRuleParticipantType.PATIENT) + return "patient"; + if (code == DecisionSupportRuleParticipantType.PERSON) + return "person"; + if (code == DecisionSupportRuleParticipantType.PRACTITIONER) + return "practitioner"; + if (code == DecisionSupportRuleParticipantType.RELATEDPERSON) + return "related-person"; + return "?"; + } + } + + public enum DecisionSupportRuleActionType { + /** + * The action is to create a new resource + */ + CREATE, + /** + * The action is to update an existing resource + */ + UPDATE, + /** + * The action is to remove an existing resource + */ + REMOVE, + /** + * The action is to fire a specific event + */ + FIREEVENT, + /** + * added to help the parsers + */ + NULL; + public static DecisionSupportRuleActionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("remove".equals(codeString)) + return REMOVE; + if ("fire-event".equals(codeString)) + return FIREEVENT; + throw new FHIRException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case REMOVE: return "remove"; + case FIREEVENT: return "fire-event"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CREATE: return "http://hl7.org/fhir/cds-rule-action-type"; + case UPDATE: return "http://hl7.org/fhir/cds-rule-action-type"; + case REMOVE: return "http://hl7.org/fhir/cds-rule-action-type"; + case FIREEVENT: return "http://hl7.org/fhir/cds-rule-action-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CREATE: return "The action is to create a new resource"; + case UPDATE: return "The action is to update an existing resource"; + case REMOVE: return "The action is to remove an existing resource"; + case FIREEVENT: return "The action is to fire a specific event"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Create"; + case UPDATE: return "Update"; + case REMOVE: return "Remove"; + case FIREEVENT: return "Fire Event"; + default: return "?"; + } + } + } + + public static class DecisionSupportRuleActionTypeEnumFactory implements EnumFactory { + public DecisionSupportRuleActionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return DecisionSupportRuleActionType.CREATE; + if ("update".equals(codeString)) + return DecisionSupportRuleActionType.UPDATE; + if ("remove".equals(codeString)) + return DecisionSupportRuleActionType.REMOVE; + if ("fire-event".equals(codeString)) + return DecisionSupportRuleActionType.FIREEVENT; + throw new IllegalArgumentException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleActionType.CREATE); + if ("update".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleActionType.UPDATE); + if ("remove".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleActionType.REMOVE); + if ("fire-event".equals(codeString)) + return new Enumeration(this, DecisionSupportRuleActionType.FIREEVENT); + throw new FHIRException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); + } + public String toCode(DecisionSupportRuleActionType code) { + if (code == DecisionSupportRuleActionType.CREATE) + return "create"; + if (code == DecisionSupportRuleActionType.UPDATE) + return "update"; + if (code == DecisionSupportRuleActionType.REMOVE) + return "remove"; + if (code == DecisionSupportRuleActionType.FIREEVENT) + return "fire-event"; + return "?"; + } + } + + @Block() + public static class DecisionSupportRuleTriggerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of triggering event. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="named-event | periodic | data-added | data-modified | data-removed | data-accessed | data-access-ended", formalDefinition="The type of triggering event." ) + protected Enumeration type; + + /** + * The name of the event (if this is a named-event trigger). + */ + @Child(name = "eventName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The name of the event (if this is a named-event trigger)." ) + protected StringType eventName; + + /** + * The timing of the event (if this is a period trigger). + */ + @Child(name = "eventTiming", type = {Timing.class, Schedule.class, DateType.class, DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The timing of the event (if this is a period trigger)." ) + protected Type eventTiming; + + private static final long serialVersionUID = 1233218436L; + + /* + * Constructor + */ + public DecisionSupportRuleTriggerComponent() { + super(); + } + + /* + * Constructor + */ + public DecisionSupportRuleTriggerComponent(Enumeration type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleTriggerComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DecisionSupportRuleTriggerTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public DecisionSupportRuleTriggerComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of triggering event. + */ + public DecisionSupportRuleTriggerType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of triggering event. + */ + public DecisionSupportRuleTriggerComponent setType(DecisionSupportRuleTriggerType value) { + if (this.type == null) + this.type = new Enumeration(new DecisionSupportRuleTriggerTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + */ + public StringType getEventNameElement() { + if (this.eventName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleTriggerComponent.eventName"); + else if (Configuration.doAutoCreate()) + this.eventName = new StringType(); // bb + return this.eventName; + } + + public boolean hasEventNameElement() { + return this.eventName != null && !this.eventName.isEmpty(); + } + + public boolean hasEventName() { + return this.eventName != null && !this.eventName.isEmpty(); + } + + /** + * @param value {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + */ + public DecisionSupportRuleTriggerComponent setEventNameElement(StringType value) { + this.eventName = value; + return this; + } + + /** + * @return The name of the event (if this is a named-event trigger). + */ + public String getEventName() { + return this.eventName == null ? null : this.eventName.getValue(); + } + + /** + * @param value The name of the event (if this is a named-event trigger). + */ + public DecisionSupportRuleTriggerComponent setEventName(String value) { + if (Utilities.noString(value)) + this.eventName = null; + else { + if (this.eventName == null) + this.eventName = new StringType(); + this.eventName.setValue(value); + } + return this; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Type getEventTiming() { + return this.eventTiming; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Timing getEventTimingTiming() throws FHIRException { + if (!(this.eventTiming instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (Timing) this.eventTiming; + } + + public boolean hasEventTimingTiming() { + return this.eventTiming instanceof Timing; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Reference getEventTimingReference() throws FHIRException { + if (!(this.eventTiming instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (Reference) this.eventTiming; + } + + public boolean hasEventTimingReference() { + return this.eventTiming instanceof Reference; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public DateType getEventTimingDateType() throws FHIRException { + if (!(this.eventTiming instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (DateType) this.eventTiming; + } + + public boolean hasEventTimingDateType() { + return this.eventTiming instanceof DateType; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public DateTimeType getEventTimingDateTimeType() throws FHIRException { + if (!(this.eventTiming instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (DateTimeType) this.eventTiming; + } + + public boolean hasEventTimingDateTimeType() { + return this.eventTiming instanceof DateTimeType; + } + + public boolean hasEventTiming() { + return this.eventTiming != null && !this.eventTiming.isEmpty(); + } + + /** + * @param value {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public DecisionSupportRuleTriggerComponent setEventTiming(Type value) { + this.eventTiming = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of triggering event.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("eventName", "string", "The name of the event (if this is a named-event trigger).", 0, java.lang.Integer.MAX_VALUE, eventName)); + childrenList.add(new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, java.lang.Integer.MAX_VALUE, eventTiming)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DecisionSupportRuleTriggerTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("eventName")) + this.eventName = castToString(value); // StringType + else if (name.equals("eventTiming[x]")) + this.eventTiming = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.type"); + } + else if (name.equals("eventName")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.eventName"); + } + else if (name.equals("eventTimingTiming")) { + this.eventTiming = new Timing(); + return this.eventTiming; + } + else if (name.equals("eventTimingReference")) { + this.eventTiming = new Reference(); + return this.eventTiming; + } + else if (name.equals("eventTimingDate")) { + this.eventTiming = new DateType(); + return this.eventTiming; + } + else if (name.equals("eventTimingDateTime")) { + this.eventTiming = new DateTimeType(); + return this.eventTiming; + } + else + return super.addChild(name); + } + + public DecisionSupportRuleTriggerComponent copy() { + DecisionSupportRuleTriggerComponent dst = new DecisionSupportRuleTriggerComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.eventName = eventName == null ? null : eventName.copy(); + dst.eventTiming = eventTiming == null ? null : eventTiming.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportRuleTriggerComponent)) + return false; + DecisionSupportRuleTriggerComponent o = (DecisionSupportRuleTriggerComponent) other; + return compareDeep(type, o.type, true) && compareDeep(eventName, o.eventName, true) && compareDeep(eventTiming, o.eventTiming, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportRuleTriggerComponent)) + return false; + DecisionSupportRuleTriggerComponent o = (DecisionSupportRuleTriggerComponent) other; + return compareValues(type, o.type, true) && compareValues(eventName, o.eventName, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (eventName == null || eventName.isEmpty()) + && (eventTiming == null || eventTiming.isEmpty()); + } + + public String fhirType() { + return "DecisionSupportRule.trigger"; + + } + + } + + @Block() + public static class DecisionSupportRuleActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A unique identifier for the action. + */ + @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A unique identifier for the action." ) + protected Identifier actionIdentifier; + + /** + * A user-visible number for the action. + */ + @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A user-visible number for the action." ) + protected StringType number; + + /** + * Supporting evidence for the action. + */ + @Child(name = "supportingEvidence", type = {Attachment.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting evidence for the action." ) + protected List supportingEvidence; + + /** + * Supporting documentation for the action. + */ + @Child(name = "documentation", type = {Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting documentation for the action." ) + protected List documentation; + + /** + * The type of participant in the action. + */ + @Child(name = "participantType", type = {CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="patient | person | practitioner | related-person", formalDefinition="The type of participant in the action." ) + protected List> participantType; + + /** + * The title of the action. + */ + @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The title of the action." ) + protected StringType title; + + /** + * A short description of the action. + */ + @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A short description of the action." ) + protected StringType description; + + /** + * A text equivalent of the action to be performed. + */ + @Child(name = "textEquivalent", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A text equivalent of the action to be performed." ) + protected StringType textEquivalent; + + /** + * Concepts associated with the action. + */ + @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Concepts associated with the action." ) + protected List concept; + + /** + * The type of action to perform (create, update, remove). + */ + @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) + protected Enumeration type; + + /** + * The resource that is the target of the action (e.g. CommunicationRequest). + */ + @Child(name = "resource", type = {}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + protected Resource resourceTarget; + + /** + * Customizations that should be applied to the statically defined resource. + */ + @Child(name = "customization", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Customizations that should be applied to the statically defined resource." ) + protected List customization; + + /** + * Sub actions. + */ + @Child(name = "actions", type = {DecisionSupportRuleActionComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Sub actions." ) + protected List actions; + + private static final long serialVersionUID = -450005378L; + + /* + * Constructor + */ + public DecisionSupportRuleActionComponent() { + super(); + } + + /** + * @return {@link #actionIdentifier} (A unique identifier for the action.) + */ + public Identifier getActionIdentifier() { + if (this.actionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.actionIdentifier"); + else if (Configuration.doAutoCreate()) + this.actionIdentifier = new Identifier(); // cc + return this.actionIdentifier; + } + + public boolean hasActionIdentifier() { + return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); + } + + /** + * @param value {@link #actionIdentifier} (A unique identifier for the action.) + */ + public DecisionSupportRuleActionComponent setActionIdentifier(Identifier value) { + this.actionIdentifier = value; + return this; + } + + /** + * @return {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public StringType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new StringType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public DecisionSupportRuleActionComponent setNumberElement(StringType value) { + this.number = value; + return this; + } + + /** + * @return A user-visible number for the action. + */ + public String getNumber() { + return this.number == null ? null : this.number.getValue(); + } + + /** + * @param value A user-visible number for the action. + */ + public DecisionSupportRuleActionComponent setNumber(String value) { + if (Utilities.noString(value)) + this.number = null; + else { + if (this.number == null) + this.number = new StringType(); + this.number.setValue(value); + } + return this; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the action.) + */ + public List getSupportingEvidence() { + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + return this.supportingEvidence; + } + + public boolean hasSupportingEvidence() { + if (this.supportingEvidence == null) + return false; + for (Attachment item : this.supportingEvidence) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the action.) + */ + // syntactic sugar + public Attachment addSupportingEvidence() { //3 + Attachment t = new Attachment(); + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRuleActionComponent addSupportingEvidence(Attachment t) { //3 + if (t == null) + return this; + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return this; + } + + /** + * @return {@link #documentation} (Supporting documentation for the action.) + */ + public List getDocumentation() { + if (this.documentation == null) + this.documentation = new ArrayList(); + return this.documentation; + } + + public boolean hasDocumentation() { + if (this.documentation == null) + return false; + for (Attachment item : this.documentation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #documentation} (Supporting documentation for the action.) + */ + // syntactic sugar + public Attachment addDocumentation() { //3 + Attachment t = new Attachment(); + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRuleActionComponent addDocumentation(Attachment t) { //3 + if (t == null) + return this; + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return this; + } + + /** + * @return {@link #participantType} (The type of participant in the action.) + */ + public List> getParticipantType() { + if (this.participantType == null) + this.participantType = new ArrayList>(); + return this.participantType; + } + + public boolean hasParticipantType() { + if (this.participantType == null) + return false; + for (Enumeration item : this.participantType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participantType} (The type of participant in the action.) + */ + // syntactic sugar + public Enumeration addParticipantTypeElement() {//2 + Enumeration t = new Enumeration(new DecisionSupportRuleParticipantTypeEnumFactory()); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return t; + } + + /** + * @param value {@link #participantType} (The type of participant in the action.) + */ + public DecisionSupportRuleActionComponent addParticipantType(DecisionSupportRuleParticipantType value) { //1 + Enumeration t = new Enumeration(new DecisionSupportRuleParticipantTypeEnumFactory()); + t.setValue(value); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return this; + } + + /** + * @param value {@link #participantType} (The type of participant in the action.) + */ + public boolean hasParticipantType(DecisionSupportRuleParticipantType value) { + if (this.participantType == null) + return false; + for (Enumeration v : this.participantType) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public DecisionSupportRuleActionComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The title of the action. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The title of the action. + */ + public DecisionSupportRuleActionComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public DecisionSupportRuleActionComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the action. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the action. + */ + public DecisionSupportRuleActionComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public StringType getTextEquivalentElement() { + if (this.textEquivalent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.textEquivalent"); + else if (Configuration.doAutoCreate()) + this.textEquivalent = new StringType(); // bb + return this.textEquivalent; + } + + public boolean hasTextEquivalentElement() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + public boolean hasTextEquivalent() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + /** + * @param value {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public DecisionSupportRuleActionComponent setTextEquivalentElement(StringType value) { + this.textEquivalent = value; + return this; + } + + /** + * @return A text equivalent of the action to be performed. + */ + public String getTextEquivalent() { + return this.textEquivalent == null ? null : this.textEquivalent.getValue(); + } + + /** + * @param value A text equivalent of the action to be performed. + */ + public DecisionSupportRuleActionComponent setTextEquivalent(String value) { + if (Utilities.noString(value)) + this.textEquivalent = null; + else { + if (this.textEquivalent == null) + this.textEquivalent = new StringType(); + this.textEquivalent.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (Concepts associated with the action.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (CodeableConcept item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Concepts associated with the action.) + */ + // syntactic sugar + public CodeableConcept addConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRuleActionComponent addConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DecisionSupportRuleActionTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public DecisionSupportRuleActionComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of action to perform (create, update, remove). + */ + public DecisionSupportRuleActionType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of action to perform (create, update, remove). + */ + public DecisionSupportRuleActionComponent setType(DecisionSupportRuleActionType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new DecisionSupportRuleActionTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public DecisionSupportRuleActionComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public DecisionSupportRuleActionComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) + */ + public List getCustomization() { + if (this.customization == null) + this.customization = new ArrayList(); + return this.customization; + } + + public boolean hasCustomization() { + if (this.customization == null) + return false; + for (DecisionSupportRuleActionCustomizationComponent item : this.customization) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) + */ + // syntactic sugar + public DecisionSupportRuleActionCustomizationComponent addCustomization() { //3 + DecisionSupportRuleActionCustomizationComponent t = new DecisionSupportRuleActionCustomizationComponent(); + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRuleActionComponent addCustomization(DecisionSupportRuleActionCustomizationComponent t) { //3 + if (t == null) + return this; + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return this; + } + + /** + * @return {@link #actions} (Sub actions.) + */ + public List getActions() { + if (this.actions == null) + this.actions = new ArrayList(); + return this.actions; + } + + public boolean hasActions() { + if (this.actions == null) + return false; + for (DecisionSupportRuleActionComponent item : this.actions) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actions} (Sub actions.) + */ + // syntactic sugar + public DecisionSupportRuleActionComponent addActions() { //3 + DecisionSupportRuleActionComponent t = new DecisionSupportRuleActionComponent(); + if (this.actions == null) + this.actions = new ArrayList(); + this.actions.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRuleActionComponent addActions(DecisionSupportRuleActionComponent t) { //3 + if (t == null) + return this; + if (this.actions == null) + this.actions = new ArrayList(); + this.actions.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("number", "string", "A user-visible number for the action.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); + childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the action.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("participantType", "code", "The type of participant in the action.", 0, java.lang.Integer.MAX_VALUE, participantType)); + childrenList.add(new Property("title", "string", "The title of the action.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "A short description of the action.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); + childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the action.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("type", "code", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("customization", "", "Customizations that should be applied to the statically defined resource.", 0, java.lang.Integer.MAX_VALUE, customization)); + childrenList.add(new Property("actions", "@DecisionSupportRule.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, actions)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionIdentifier")) + this.actionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("number")) + this.number = castToString(value); // StringType + else if (name.equals("supportingEvidence")) + this.getSupportingEvidence().add(castToAttachment(value)); + else if (name.equals("documentation")) + this.getDocumentation().add(castToAttachment(value)); + else if (name.equals("participantType")) + this.getParticipantType().add(new DecisionSupportRuleParticipantTypeEnumFactory().fromType(value)); + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("textEquivalent")) + this.textEquivalent = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add(castToCodeableConcept(value)); + else if (name.equals("type")) + this.type = new DecisionSupportRuleActionTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("customization")) + this.getCustomization().add((DecisionSupportRuleActionCustomizationComponent) value); + else if (name.equals("actions")) + this.getActions().add((DecisionSupportRuleActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionIdentifier")) { + this.actionIdentifier = new Identifier(); + return this.actionIdentifier; + } + else if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.number"); + } + else if (name.equals("supportingEvidence")) { + return addSupportingEvidence(); + } + else if (name.equals("documentation")) { + return addDocumentation(); + } + else if (name.equals("participantType")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.participantType"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.title"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.description"); + } + else if (name.equals("textEquivalent")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.textEquivalent"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.type"); + } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("customization")) { + return addCustomization(); + } + else if (name.equals("actions")) { + return addActions(); + } + else + return super.addChild(name); + } + + public DecisionSupportRuleActionComponent copy() { + DecisionSupportRuleActionComponent dst = new DecisionSupportRuleActionComponent(); + copyValues(dst); + dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); + dst.number = number == null ? null : number.copy(); + if (supportingEvidence != null) { + dst.supportingEvidence = new ArrayList(); + for (Attachment i : supportingEvidence) + dst.supportingEvidence.add(i.copy()); + }; + if (documentation != null) { + dst.documentation = new ArrayList(); + for (Attachment i : documentation) + dst.documentation.add(i.copy()); + }; + if (participantType != null) { + dst.participantType = new ArrayList>(); + for (Enumeration i : participantType) + dst.participantType.add(i.copy()); + }; + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (CodeableConcept i : concept) + dst.concept.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.resource = resource == null ? null : resource.copy(); + if (customization != null) { + dst.customization = new ArrayList(); + for (DecisionSupportRuleActionCustomizationComponent i : customization) + dst.customization.add(i.copy()); + }; + if (actions != null) { + dst.actions = new ArrayList(); + for (DecisionSupportRuleActionComponent i : actions) + dst.actions.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportRuleActionComponent)) + return false; + DecisionSupportRuleActionComponent o = (DecisionSupportRuleActionComponent) other; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(number, o.number, true) + && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(participantType, o.participantType, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) + && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(concept, o.concept, true) + && compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(customization, o.customization, true) + && compareDeep(actions, o.actions, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportRuleActionComponent)) + return false; + DecisionSupportRuleActionComponent o = (DecisionSupportRuleActionComponent) other; + return compareValues(number, o.number, true) && compareValues(participantType, o.participantType, true) + && compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(textEquivalent, o.textEquivalent, true) + && compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (number == null || number.isEmpty()) + && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (participantType == null || participantType.isEmpty()) && (title == null || title.isEmpty()) + && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty()) + && (concept == null || concept.isEmpty()) && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) + && (customization == null || customization.isEmpty()) && (actions == null || actions.isEmpty()) + ; + } + + public String fhirType() { + return "DecisionSupportRule.action"; + + } + + } + + @Block() + public static class DecisionSupportRuleActionCustomizationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The path to the element to be customized. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The path to the element to be customized." ) + protected StringType path; + + /** + * An expression specifying the value of the customized element. + */ + @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="An expression specifying the value of the customized element." ) + protected StringType expression; + + private static final long serialVersionUID = -252690483L; + + /* + * Constructor + */ + public DecisionSupportRuleActionCustomizationComponent() { + super(); + } + + /* + * Constructor + */ + public DecisionSupportRuleActionCustomizationComponent(StringType path, StringType expression) { + super(); + this.path = path; + this.expression = expression; + } + + /** + * @return {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionCustomizationComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public DecisionSupportRuleActionCustomizationComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The path to the element to be customized. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The path to the element to be customized. + */ + public DecisionSupportRuleActionCustomizationComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public StringType getExpressionElement() { + if (this.expression == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRuleActionCustomizationComponent.expression"); + else if (Configuration.doAutoCreate()) + this.expression = new StringType(); // bb + return this.expression; + } + + public boolean hasExpressionElement() { + return this.expression != null && !this.expression.isEmpty(); + } + + public boolean hasExpression() { + return this.expression != null && !this.expression.isEmpty(); + } + + /** + * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public DecisionSupportRuleActionCustomizationComponent setExpressionElement(StringType value) { + this.expression = value; + return this; + } + + /** + * @return An expression specifying the value of the customized element. + */ + public String getExpression() { + return this.expression == null ? null : this.expression.getValue(); + } + + /** + * @param value An expression specifying the value of the customized element. + */ + public DecisionSupportRuleActionCustomizationComponent setExpression(String value) { + if (this.expression == null) + this.expression = new StringType(); + this.expression.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The path to the element to be customized.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("expression")) + this.expression = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.path"); + } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.expression"); + } + else + return super.addChild(name); + } + + public DecisionSupportRuleActionCustomizationComponent copy() { + DecisionSupportRuleActionCustomizationComponent dst = new DecisionSupportRuleActionCustomizationComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.expression = expression == null ? null : expression.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportRuleActionCustomizationComponent)) + return false; + DecisionSupportRuleActionCustomizationComponent o = (DecisionSupportRuleActionCustomizationComponent) other; + return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportRuleActionCustomizationComponent)) + return false; + DecisionSupportRuleActionCustomizationComponent o = (DecisionSupportRuleActionCustomizationComponent) other; + return compareValues(path, o.path, true) && compareValues(expression, o.expression, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty()) + ; + } + + public String fhirType() { + return "DecisionSupportRule.action.customization"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A reference to a ModuleMetadata resource that provides metadata for the rule. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Module information for the rule", formalDefinition="A reference to a ModuleMetadata resource that provides metadata for the rule." ) + protected Reference moduleMetadata; + + /** + * The actual object that is the target of the reference (A reference to a ModuleMetadata resource that provides metadata for the rule.) + */ + protected ModuleMetadata moduleMetadataTarget; + + /** + * A reference to a Library containing the formal logic used by the rule. + */ + @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A library containing logic used by the rule", formalDefinition="A reference to a Library containing the formal logic used by the rule." ) + protected List library; + /** + * The actual objects that are the target of the reference (A reference to a Library containing the formal logic used by the rule.) + */ + protected List libraryTarget; + + + /** + * A description of a triggering event. + */ + @Child(name = "trigger", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A description of a triggering event." ) + protected List trigger; + + /** + * The condition for the artifact. + */ + @Child(name = "condition", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The condition for the artifact." ) + protected StringType condition; + + /** + * The definition of the actions that should be returned by evaluation of the artifact. + */ + @Child(name = "action", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The definition of the actions that should be returned by evaluation of the artifact." ) + protected List action; + + private static final long serialVersionUID = 1585395635L; + + /* + * Constructor + */ + public DecisionSupportRule() { + super(); + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRule addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRule.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public DecisionSupportRule setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public DecisionSupportRule setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource that provides metadata for the rule.) + */ + public Reference getModuleMetadata() { + if (this.moduleMetadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRule.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadata = new Reference(); // cc + return this.moduleMetadata; + } + + public boolean hasModuleMetadata() { + return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); + } + + /** + * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource that provides metadata for the rule.) + */ + public DecisionSupportRule setModuleMetadata(Reference value) { + this.moduleMetadata = value; + return this; + } + + /** + * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that provides metadata for the rule.) + */ + public ModuleMetadata getModuleMetadataTarget() { + if (this.moduleMetadataTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRule.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadataTarget = new ModuleMetadata(); // aa + return this.moduleMetadataTarget; + } + + /** + * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that provides metadata for the rule.) + */ + public DecisionSupportRule setModuleMetadataTarget(ModuleMetadata value) { + this.moduleMetadataTarget = value; + return this; + } + + /** + * @return {@link #library} (A reference to a Library containing the formal logic used by the rule.) + */ + public List getLibrary() { + if (this.library == null) + this.library = new ArrayList(); + return this.library; + } + + public boolean hasLibrary() { + if (this.library == null) + return false; + for (Reference item : this.library) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #library} (A reference to a Library containing the formal logic used by the rule.) + */ + // syntactic sugar + public Reference addLibrary() { //3 + Reference t = new Reference(); + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRule addLibrary(Reference t) { //3 + if (t == null) + return this; + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return this; + } + + /** + * @return {@link #library} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to a Library containing the formal logic used by the rule.) + */ + public List getLibraryTarget() { + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + return this.libraryTarget; + } + + // syntactic sugar + /** + * @return {@link #library} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A reference to a Library containing the formal logic used by the rule.) + */ + public Library addLibraryTarget() { + Library r = new Library(); + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + this.libraryTarget.add(r); + return r; + } + + /** + * @return {@link #trigger} (A description of a triggering event.) + */ + public List getTrigger() { + if (this.trigger == null) + this.trigger = new ArrayList(); + return this.trigger; + } + + public boolean hasTrigger() { + if (this.trigger == null) + return false; + for (DecisionSupportRuleTriggerComponent item : this.trigger) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #trigger} (A description of a triggering event.) + */ + // syntactic sugar + public DecisionSupportRuleTriggerComponent addTrigger() { //3 + DecisionSupportRuleTriggerComponent t = new DecisionSupportRuleTriggerComponent(); + if (this.trigger == null) + this.trigger = new ArrayList(); + this.trigger.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRule addTrigger(DecisionSupportRuleTriggerComponent t) { //3 + if (t == null) + return this; + if (this.trigger == null) + this.trigger = new ArrayList(); + this.trigger.add(t); + return this; + } + + /** + * @return {@link #condition} (The condition for the artifact.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + */ + public StringType getConditionElement() { + if (this.condition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportRule.condition"); + else if (Configuration.doAutoCreate()) + this.condition = new StringType(); // bb + return this.condition; + } + + public boolean hasConditionElement() { + return this.condition != null && !this.condition.isEmpty(); + } + + public boolean hasCondition() { + return this.condition != null && !this.condition.isEmpty(); + } + + /** + * @param value {@link #condition} (The condition for the artifact.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + */ + public DecisionSupportRule setConditionElement(StringType value) { + this.condition = value; + return this; + } + + /** + * @return The condition for the artifact. + */ + public String getCondition() { + return this.condition == null ? null : this.condition.getValue(); + } + + /** + * @param value The condition for the artifact. + */ + public DecisionSupportRule setCondition(String value) { + if (Utilities.noString(value)) + this.condition = null; + else { + if (this.condition == null) + this.condition = new StringType(); + this.condition.setValue(value); + } + return this; + } + + /** + * @return {@link #action} (The definition of the actions that should be returned by evaluation of the artifact.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (DecisionSupportRuleActionComponent item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (The definition of the actions that should be returned by evaluation of the artifact.) + */ + // syntactic sugar + public DecisionSupportRuleActionComponent addAction() { //3 + DecisionSupportRuleActionComponent t = new DecisionSupportRuleActionComponent(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportRule addAction(DecisionSupportRuleActionComponent t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource that provides metadata for the rule.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library containing the formal logic used by the rule.", 0, java.lang.Integer.MAX_VALUE, library)); + childrenList.add(new Property("trigger", "", "A description of a triggering event.", 0, java.lang.Integer.MAX_VALUE, trigger)); + childrenList.add(new Property("condition", "string", "The condition for the artifact.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("action", "", "The definition of the actions that should be returned by evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("moduleMetadata")) + this.moduleMetadata = castToReference(value); // Reference + else if (name.equals("library")) + this.getLibrary().add(castToReference(value)); + else if (name.equals("trigger")) + this.getTrigger().add((DecisionSupportRuleTriggerComponent) value); + else if (name.equals("condition")) + this.condition = castToString(value); // StringType + else if (name.equals("action")) + this.getAction().add((DecisionSupportRuleActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.version"); + } + else if (name.equals("moduleMetadata")) { + this.moduleMetadata = new Reference(); + return this.moduleMetadata; + } + else if (name.equals("library")) { + return addLibrary(); + } + else if (name.equals("trigger")) { + return addTrigger(); + } + else if (name.equals("condition")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.condition"); + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DecisionSupportRule"; + + } + + public DecisionSupportRule copy() { + DecisionSupportRule dst = new DecisionSupportRule(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + if (library != null) { + dst.library = new ArrayList(); + for (Reference i : library) + dst.library.add(i.copy()); + }; + if (trigger != null) { + dst.trigger = new ArrayList(); + for (DecisionSupportRuleTriggerComponent i : trigger) + dst.trigger.add(i.copy()); + }; + dst.condition = condition == null ? null : condition.copy(); + if (action != null) { + dst.action = new ArrayList(); + for (DecisionSupportRuleActionComponent i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + protected DecisionSupportRule typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportRule)) + return false; + DecisionSupportRule o = (DecisionSupportRule) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) + && compareDeep(library, o.library, true) && compareDeep(trigger, o.trigger, true) && compareDeep(condition, o.condition, true) + && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportRule)) + return false; + DecisionSupportRule o = (DecisionSupportRule) other; + return compareValues(version, o.version, true) && compareValues(condition, o.condition, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) + && (trigger == null || trigger.isEmpty()) && (condition == null || condition.isEmpty()) && (action == null || action.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DecisionSupportRule; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportServiceModule.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportServiceModule.java new file mode 100644 index 00000000000..f7b15fa82c1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DecisionSupportServiceModule.java @@ -0,0 +1,1391 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + */ +@ResourceDef(name="DecisionSupportServiceModule", profile="http://hl7.org/fhir/Profile/DecisionSupportServiceModule") +public class DecisionSupportServiceModule extends DomainResource { + + @Block() + public static class DecisionSupportServiceModuleParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the parameter. + */ + @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The name of the parameter." ) + protected CodeType name; + + /** + * Whether the parameter is input or output for the module. + */ + @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Whether the parameter is input or output for the module." ) + protected CodeType use; + + /** + * A brief description of the parameter. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A brief description of the parameter." ) + protected StringType documentation; + + /** + * The type of the parameter. + */ + @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The type of the parameter." ) + protected CodeType type; + + /** + * The profile of the parameter, if any. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The profile of the parameter, if any." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (The profile of the parameter, if any.) + */ + protected StructureDefinition profileTarget; + + /** + * Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. + */ + @Child(name = "mustSupport", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Indicates that specific structure elements are referenced by the knowledge module", formalDefinition="Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available." ) + protected List mustSupport; + + /** + * Code filters for the required data, if any. + */ + @Child(name = "codeFilter", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Code filters for the required data, if any." ) + protected List codeFilter; + + /** + * Date filters for the required data, if any. + */ + @Child(name = "dateFilter", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Date filters for the required data, if any." ) + protected List dateFilter; + + private static final long serialVersionUID = 484857813L; + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterComponent() { + super(); + } + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterComponent(CodeType name, CodeType use, CodeType type) { + super(); + this.name = name; + this.use = use; + this.type = type; + } + + /** + * @return {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CodeType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new CodeType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterComponent setNameElement(CodeType value) { + this.name = value; + return this; + } + + /** + * @return The name of the parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the parameter. + */ + public DecisionSupportServiceModuleParameterComponent setName(String value) { + if (this.name == null) + this.name = new CodeType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public CodeType getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new CodeType(); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterComponent setUseElement(CodeType value) { + this.use = value; + return this; + } + + /** + * @return Whether the parameter is input or output for the module. + */ + public String getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Whether the parameter is input or output for the module. + */ + public DecisionSupportServiceModuleParameterComponent setUse(String value) { + if (this.use == null) + this.use = new CodeType(); + this.use.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (A brief description of the parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (A brief description of the parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return A brief description of the parameter. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value A brief description of the parameter. + */ + public DecisionSupportServiceModuleParameterComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the parameter. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the parameter. + */ + public DecisionSupportServiceModuleParameterComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The profile of the parameter, if any.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The profile of the parameter, if any.) + */ + public DecisionSupportServiceModuleParameterComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The profile of the parameter, if any.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The profile of the parameter, if any.) + */ + public DecisionSupportServiceModuleParameterComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public List getMustSupport() { + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + return this.mustSupport; + } + + public boolean hasMustSupport() { + if (this.mustSupport == null) + return false; + for (StringType item : this.mustSupport) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + // syntactic sugar + public StringType addMustSupportElement() {//2 + StringType t = new StringType(); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return t; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public DecisionSupportServiceModuleParameterComponent addMustSupport(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return this; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public boolean hasMustSupport(String value) { + if (this.mustSupport == null) + return false; + for (StringType v : this.mustSupport) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters for the required data, if any.) + */ + public List getCodeFilter() { + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + return this.codeFilter; + } + + public boolean hasCodeFilter() { + if (this.codeFilter == null) + return false; + for (DecisionSupportServiceModuleParameterCodeFilterComponent item : this.codeFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters for the required data, if any.) + */ + // syntactic sugar + public DecisionSupportServiceModuleParameterCodeFilterComponent addCodeFilter() { //3 + DecisionSupportServiceModuleParameterCodeFilterComponent t = new DecisionSupportServiceModuleParameterCodeFilterComponent(); + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModuleParameterComponent addCodeFilter(DecisionSupportServiceModuleParameterCodeFilterComponent t) { //3 + if (t == null) + return this; + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return this; + } + + /** + * @return {@link #dateFilter} (Date filters for the required data, if any.) + */ + public List getDateFilter() { + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + return this.dateFilter; + } + + public boolean hasDateFilter() { + if (this.dateFilter == null) + return false; + for (DecisionSupportServiceModuleParameterDateFilterComponent item : this.dateFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dateFilter} (Date filters for the required data, if any.) + */ + // syntactic sugar + public DecisionSupportServiceModuleParameterDateFilterComponent addDateFilter() { //3 + DecisionSupportServiceModuleParameterDateFilterComponent t = new DecisionSupportServiceModuleParameterDateFilterComponent(); + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModuleParameterComponent addDateFilter(DecisionSupportServiceModuleParameterDateFilterComponent t) { //3 + if (t == null) + return this; + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "code", "The name of the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("use", "code", "Whether the parameter is input or output for the module.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("documentation", "string", "A brief description of the parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("type", "code", "The type of the parameter.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "The profile of the parameter, if any.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); + childrenList.add(new Property("codeFilter", "", "Code filters for the required data, if any.", 0, java.lang.Integer.MAX_VALUE, codeFilter)); + childrenList.add(new Property("dateFilter", "", "Date filters for the required data, if any.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCode(value); // CodeType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else if (name.equals("mustSupport")) + this.getMustSupport().add(castToString(value)); + else if (name.equals("codeFilter")) + this.getCodeFilter().add((DecisionSupportServiceModuleParameterCodeFilterComponent) value); + else if (name.equals("dateFilter")) + this.getDateFilter().add((DecisionSupportServiceModuleParameterDateFilterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.name"); + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.use"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.documentation"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else if (name.equals("mustSupport")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.mustSupport"); + } + else if (name.equals("codeFilter")) { + return addCodeFilter(); + } + else if (name.equals("dateFilter")) { + return addDateFilter(); + } + else + return super.addChild(name); + } + + public DecisionSupportServiceModuleParameterComponent copy() { + DecisionSupportServiceModuleParameterComponent dst = new DecisionSupportServiceModuleParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.use = use == null ? null : use.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + if (mustSupport != null) { + dst.mustSupport = new ArrayList(); + for (StringType i : mustSupport) + dst.mustSupport.add(i.copy()); + }; + if (codeFilter != null) { + dst.codeFilter = new ArrayList(); + for (DecisionSupportServiceModuleParameterCodeFilterComponent i : codeFilter) + dst.codeFilter.add(i.copy()); + }; + if (dateFilter != null) { + dst.dateFilter = new ArrayList(); + for (DecisionSupportServiceModuleParameterDateFilterComponent i : dateFilter) + dst.dateFilter.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterComponent)) + return false; + DecisionSupportServiceModuleParameterComponent o = (DecisionSupportServiceModuleParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(mustSupport, o.mustSupport, true) + && compareDeep(codeFilter, o.codeFilter, true) && compareDeep(dateFilter, o.dateFilter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterComponent)) + return false; + DecisionSupportServiceModuleParameterComponent o = (DecisionSupportServiceModuleParameterComponent) other; + return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(documentation, o.documentation, true) + && compareValues(type, o.type, true) && compareValues(mustSupport, o.mustSupport, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) + && (documentation == null || documentation.isEmpty()) && (type == null || type.isEmpty()) + && (profile == null || profile.isEmpty()) && (mustSupport == null || mustSupport.isEmpty()) + && (codeFilter == null || codeFilter.isEmpty()) && (dateFilter == null || dateFilter.isEmpty()) + ; + } + + public String fhirType() { + return "DecisionSupportServiceModule.parameter"; + + } + + } + + @Block() + public static class DecisionSupportServiceModuleParameterCodeFilterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The code-valued attribute of the filter", formalDefinition="The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept." ) + protected StringType path; + + /** + * The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + */ + @Child(name = "valueSet", type = {StringType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The valueset for the code filter", formalDefinition="The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) + protected Type valueSet; + + /** + * The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts. + */ + @Child(name = "codeableConcept", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The codeableConcepts for the filter", formalDefinition="The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts." ) + protected List codeableConcept; + + private static final long serialVersionUID = -666343535L; + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterCodeFilterComponent() { + super(); + } + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterCodeFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterCodeFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterCodeFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public DecisionSupportServiceModuleParameterCodeFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Type getValueSet() { + return this.valueSet; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public StringType getValueSetStringType() throws FHIRException { + if (!(this.valueSet instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (StringType) this.valueSet; + } + + public boolean hasValueSetStringType() { + return this.valueSet instanceof StringType; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Reference getValueSetReference() throws FHIRException { + if (!(this.valueSet instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (Reference) this.valueSet; + } + + public boolean hasValueSetReference() { + return this.valueSet instanceof Reference; + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public DecisionSupportServiceModuleParameterCodeFilterComponent setValueSet(Type value) { + this.valueSet = value; + return this; + } + + /** + * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) + */ + public List getCodeableConcept() { + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + return this.codeableConcept; + } + + public boolean hasCodeableConcept() { + if (this.codeableConcept == null) + return false; + for (CodeableConcept item : this.codeableConcept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) + */ + // syntactic sugar + public CodeableConcept addCodeableConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + this.codeableConcept.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModuleParameterCodeFilterComponent addCodeableConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + this.codeableConcept.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + childrenList.add(new Property("codeableConcept", "CodeableConcept", "The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.", 0, java.lang.Integer.MAX_VALUE, codeableConcept)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("valueSet[x]")) + this.valueSet = (Type) value; // Type + else if (name.equals("codeableConcept")) + this.getCodeableConcept().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.path"); + } + else if (name.equals("valueSetString")) { + this.valueSet = new StringType(); + return this.valueSet; + } + else if (name.equals("valueSetReference")) { + this.valueSet = new Reference(); + return this.valueSet; + } + else if (name.equals("codeableConcept")) { + return addCodeableConcept(); + } + else + return super.addChild(name); + } + + public DecisionSupportServiceModuleParameterCodeFilterComponent copy() { + DecisionSupportServiceModuleParameterCodeFilterComponent dst = new DecisionSupportServiceModuleParameterCodeFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); + if (codeableConcept != null) { + dst.codeableConcept = new ArrayList(); + for (CodeableConcept i : codeableConcept) + dst.codeableConcept.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterCodeFilterComponent)) + return false; + DecisionSupportServiceModuleParameterCodeFilterComponent o = (DecisionSupportServiceModuleParameterCodeFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(codeableConcept, o.codeableConcept, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterCodeFilterComponent)) + return false; + DecisionSupportServiceModuleParameterCodeFilterComponent o = (DecisionSupportServiceModuleParameterCodeFilterComponent) other; + return compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty()) + && (codeableConcept == null || codeableConcept.isEmpty()); + } + + public String fhirType() { + return "DecisionSupportServiceModule.parameter.codeFilter"; + + } + + } + + @Block() + public static class DecisionSupportServiceModuleParameterDateFilterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The date-valued attribute of the filter", formalDefinition="The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing." ) + protected StringType path; + + /** + * The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. + */ + @Child(name = "value", type = {DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The value of the filter, as a Period or dateTime value", formalDefinition="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime." ) + protected Type value; + + private static final long serialVersionUID = 1791957163L; + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterDateFilterComponent() { + super(); + } + + /* + * Constructor + */ + public DecisionSupportServiceModuleParameterDateFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterDateFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public DecisionSupportServiceModuleParameterDateFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public DecisionSupportServiceModuleParameterDateFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Period getValuePeriod() throws FHIRException { + if (!(this.value instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Period) this.value; + } + + public boolean hasValuePeriod() { + return this.value instanceof Period; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public DecisionSupportServiceModuleParameterDateFilterComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.path"); + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else + return super.addChild(name); + } + + public DecisionSupportServiceModuleParameterDateFilterComponent copy() { + DecisionSupportServiceModuleParameterDateFilterComponent dst = new DecisionSupportServiceModuleParameterDateFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterDateFilterComponent)) + return false; + DecisionSupportServiceModuleParameterDateFilterComponent o = (DecisionSupportServiceModuleParameterDateFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportServiceModuleParameterDateFilterComponent)) + return false; + DecisionSupportServiceModuleParameterDateFilterComponent o = (DecisionSupportServiceModuleParameterDateFilterComponent) other; + return compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "DecisionSupportServiceModule.parameter.dateFilter"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A reference to a ModuleMetadata resource describing the metadata for the decision support service module. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Metadata for the service module", formalDefinition="A reference to a ModuleMetadata resource describing the metadata for the decision support service module." ) + protected Reference moduleMetadata; + + /** + * The actual object that is the target of the reference (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + */ + protected ModuleMetadata moduleMetadataTarget; + + /** + * Parameters to the module. + */ + @Child(name = "parameter", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Parameters to the module." ) + protected List parameter; + + private static final long serialVersionUID = 1535823227L; + + /* + * Constructor + */ + public DecisionSupportServiceModule() { + super(); + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModule addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModule.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public DecisionSupportServiceModule setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public DecisionSupportServiceModule setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + */ + public Reference getModuleMetadata() { + if (this.moduleMetadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModule.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadata = new Reference(); // cc + return this.moduleMetadata; + } + + public boolean hasModuleMetadata() { + return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); + } + + /** + * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + */ + public DecisionSupportServiceModule setModuleMetadata(Reference value) { + this.moduleMetadata = value; + return this; + } + + /** + * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + */ + public ModuleMetadata getModuleMetadataTarget() { + if (this.moduleMetadataTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DecisionSupportServiceModule.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadataTarget = new ModuleMetadata(); // aa + return this.moduleMetadataTarget; + } + + /** + * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + */ + public DecisionSupportServiceModule setModuleMetadataTarget(ModuleMetadata value) { + this.moduleMetadataTarget = value; + return this; + } + + /** + * @return {@link #parameter} (Parameters to the module.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (DecisionSupportServiceModuleParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (Parameters to the module.) + */ + // syntactic sugar + public DecisionSupportServiceModuleParameterComponent addParameter() { //3 + DecisionSupportServiceModuleParameterComponent t = new DecisionSupportServiceModuleParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModule addParameter(DecisionSupportServiceModuleParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource describing the metadata for the decision support service module.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("parameter", "", "Parameters to the module.", 0, java.lang.Integer.MAX_VALUE, parameter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("moduleMetadata")) + this.moduleMetadata = castToReference(value); // Reference + else if (name.equals("parameter")) + this.getParameter().add((DecisionSupportServiceModuleParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.version"); + } + else if (name.equals("moduleMetadata")) { + this.moduleMetadata = new Reference(); + return this.moduleMetadata; + } + else if (name.equals("parameter")) { + return addParameter(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DecisionSupportServiceModule"; + + } + + public DecisionSupportServiceModule copy() { + DecisionSupportServiceModule dst = new DecisionSupportServiceModule(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + if (parameter != null) { + dst.parameter = new ArrayList(); + for (DecisionSupportServiceModuleParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + return dst; + } + + protected DecisionSupportServiceModule typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DecisionSupportServiceModule)) + return false; + DecisionSupportServiceModule o = (DecisionSupportServiceModule) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) + && compareDeep(parameter, o.parameter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DecisionSupportServiceModule)) + return false; + DecisionSupportServiceModule o = (DecisionSupportServiceModule) other; + return compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (moduleMetadata == null || moduleMetadata.isEmpty()) && (parameter == null || parameter.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DecisionSupportServiceModule; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DetectedIssue.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DetectedIssue.java new file mode 100644 index 00000000000..f313af87fc6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DetectedIssue.java @@ -0,0 +1,1064 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ +@ResourceDef(name="DetectedIssue", profile="http://hl7.org/fhir/Profile/DetectedIssue") +public class DetectedIssue extends DomainResource { + + public enum DetectedIssueSeverity { + /** + * Indicates the issue may be life-threatening or has the potential to cause permanent injury. + */ + HIGH, + /** + * Indicates the issue may result in noticeable adverse consequences but is unlikely to be life-threatening or cause permanent injury. + */ + MODERATE, + /** + * Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subject. + */ + LOW, + /** + * added to help the parsers + */ + NULL; + public static DetectedIssueSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return HIGH; + if ("moderate".equals(codeString)) + return MODERATE; + if ("low".equals(codeString)) + return LOW; + throw new FHIRException("Unknown DetectedIssueSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HIGH: return "high"; + case MODERATE: return "moderate"; + case LOW: return "low"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case HIGH: return "http://hl7.org/fhir/detectedissue-severity"; + case MODERATE: return "http://hl7.org/fhir/detectedissue-severity"; + case LOW: return "http://hl7.org/fhir/detectedissue-severity"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case HIGH: return "Indicates the issue may be life-threatening or has the potential to cause permanent injury."; + case MODERATE: return "Indicates the issue may result in noticeable adverse consequences but is unlikely to be life-threatening or cause permanent injury."; + case LOW: return "Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subject."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HIGH: return "High"; + case MODERATE: return "Moderate"; + case LOW: return "Low"; + default: return "?"; + } + } + } + + public static class DetectedIssueSeverityEnumFactory implements EnumFactory { + public DetectedIssueSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return DetectedIssueSeverity.HIGH; + if ("moderate".equals(codeString)) + return DetectedIssueSeverity.MODERATE; + if ("low".equals(codeString)) + return DetectedIssueSeverity.LOW; + throw new IllegalArgumentException("Unknown DetectedIssueSeverity code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return new Enumeration(this, DetectedIssueSeverity.HIGH); + if ("moderate".equals(codeString)) + return new Enumeration(this, DetectedIssueSeverity.MODERATE); + if ("low".equals(codeString)) + return new Enumeration(this, DetectedIssueSeverity.LOW); + throw new FHIRException("Unknown DetectedIssueSeverity code '"+codeString+"'"); + } + public String toCode(DetectedIssueSeverity code) { + if (code == DetectedIssueSeverity.HIGH) + return "high"; + if (code == DetectedIssueSeverity.MODERATE) + return "moderate"; + if (code == DetectedIssueSeverity.LOW) + return "low"; + return "?"; + } + } + + @Block() + public static class DetectedIssueMitigationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue. + */ + @Child(name = "action", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="What mitigation?", formalDefinition="Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue." ) + protected CodeableConcept action; + + /** + * Indicates when the mitigating action was documented. + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Date committed", formalDefinition="Indicates when the mitigating action was documented." ) + protected DateTimeType date; + + /** + * Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring. + */ + @Child(name = "author", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who is committing?", formalDefinition="Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.) + */ + protected Practitioner authorTarget; + + private static final long serialVersionUID = -1994768436L; + + /* + * Constructor + */ + public DetectedIssueMitigationComponent() { + super(); + } + + /* + * Constructor + */ + public DetectedIssueMitigationComponent(CodeableConcept action) { + super(); + this.action = action; + } + + /** + * @return {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.) + */ + public CodeableConcept getAction() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.action"); + else if (Configuration.doAutoCreate()) + this.action = new CodeableConcept(); // cc + return this.action; + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.) + */ + public DetectedIssueMitigationComponent setAction(CodeableConcept value) { + this.action = value; + return this; + } + + /** + * @return {@link #date} (Indicates when the mitigating action was documented.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Indicates when the mitigating action was documented.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DetectedIssueMitigationComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Indicates when the mitigating action was documented. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Indicates when the mitigating action was documented. + */ + public DetectedIssueMitigationComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #author} (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.) + */ + public DetectedIssueMitigationComponent setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.) + */ + public Practitioner getAuthorTarget() { + if (this.authorTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.author"); + else if (Configuration.doAutoCreate()) + this.authorTarget = new Practitioner(); // aa + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.) + */ + public DetectedIssueMitigationComponent setAuthorTarget(Practitioner value) { + this.authorTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "CodeableConcept", "Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("date", "dateTime", "Indicates when the mitigating action was documented.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("author", "Reference(Practitioner)", "Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.", 0, java.lang.Integer.MAX_VALUE, author)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("action")) + this.action = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("action")) { + this.action = new CodeableConcept(); + return this.action; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.date"); + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else + return super.addChild(name); + } + + public DetectedIssueMitigationComponent copy() { + DetectedIssueMitigationComponent dst = new DetectedIssueMitigationComponent(); + copyValues(dst); + dst.action = action == null ? null : action.copy(); + dst.date = date == null ? null : date.copy(); + dst.author = author == null ? null : author.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DetectedIssueMitigationComponent)) + return false; + DetectedIssueMitigationComponent o = (DetectedIssueMitigationComponent) other; + return compareDeep(action, o.action, true) && compareDeep(date, o.date, true) && compareDeep(author, o.author, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DetectedIssueMitigationComponent)) + return false; + DetectedIssueMitigationComponent o = (DetectedIssueMitigationComponent) other; + return compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()) && (date == null || date.isEmpty()) + && (author == null || author.isEmpty()); + } + + public String fhirType() { + return "DetectedIssue.mitigation"; + + } + + } + + /** + * Indicates the patient whose record the detected issue is associated with. + */ + @Child(name = "patient", type = {Patient.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the detected issue is associated with." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Indicates the patient whose record the detected issue is associated with.) + */ + protected Patient patientTarget; + + /** + * Identifies the general type of issue identified. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Issue Category, e.g. drug-drug, duplicate therapy, etc.", formalDefinition="Identifies the general type of issue identified." ) + protected CodeableConcept category; + + /** + * Indicates the degree of importance associated with the identified issue based on the potential impact on the patient. + */ + @Child(name = "severity", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="high | moderate | low", formalDefinition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." ) + protected Enumeration severity; + + /** + * Indicates the resource representing the current activity or proposed activity that is potentially problematic. + */ + @Child(name = "implicated", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that is potentially problematic." ) + protected List implicated; + /** + * The actual objects that are the target of the reference (Indicates the resource representing the current activity or proposed activity that is potentially problematic.) + */ + protected List implicatedTarget; + + + /** + * A textual explanation of the detected issue. + */ + @Child(name = "detail", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the detected issue." ) + protected StringType detail; + + /** + * The date or date-time when the detected issue was initially identified. + */ + @Child(name = "date", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When identified", formalDefinition="The date or date-time when the detected issue was initially identified." ) + protected DateTimeType date; + + /** + * Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review. + */ + @Child(name = "author", type = {Practitioner.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The provider or device that identified the issue", formalDefinition="Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.) + */ + protected Resource authorTarget; + + /** + * Business identifier associated with the detected issue record. + */ + @Child(name = "identifier", type = {Identifier.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique id for the detected issue", formalDefinition="Business identifier associated with the detected issue record." ) + protected Identifier identifier; + + /** + * The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified. + */ + @Child(name = "reference", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified." ) + protected UriType reference; + + /** + * Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action. + */ + @Child(name = "mitigation", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." ) + protected List mitigation; + + private static final long serialVersionUID = -403732234L; + + /* + * Constructor + */ + public DetectedIssue() { + super(); + } + + /** + * @return {@link #patient} (Indicates the patient whose record the detected issue is associated with.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (Indicates the patient whose record the detected issue is associated with.) + */ + public DetectedIssue setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the detected issue is associated with.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the detected issue is associated with.) + */ + public DetectedIssue setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #category} (Identifies the general type of issue identified.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (Identifies the general type of issue identified.) + */ + public DetectedIssue setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #severity} (Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public Enumeration getSeverityElement() { + if (this.severity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.severity"); + else if (Configuration.doAutoCreate()) + this.severity = new Enumeration(new DetectedIssueSeverityEnumFactory()); // bb + return this.severity; + } + + public boolean hasSeverityElement() { + return this.severity != null && !this.severity.isEmpty(); + } + + public boolean hasSeverity() { + return this.severity != null && !this.severity.isEmpty(); + } + + /** + * @param value {@link #severity} (Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public DetectedIssue setSeverityElement(Enumeration value) { + this.severity = value; + return this; + } + + /** + * @return Indicates the degree of importance associated with the identified issue based on the potential impact on the patient. + */ + public DetectedIssueSeverity getSeverity() { + return this.severity == null ? null : this.severity.getValue(); + } + + /** + * @param value Indicates the degree of importance associated with the identified issue based on the potential impact on the patient. + */ + public DetectedIssue setSeverity(DetectedIssueSeverity value) { + if (value == null) + this.severity = null; + else { + if (this.severity == null) + this.severity = new Enumeration(new DetectedIssueSeverityEnumFactory()); + this.severity.setValue(value); + } + return this; + } + + /** + * @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that is potentially problematic.) + */ + public List getImplicated() { + if (this.implicated == null) + this.implicated = new ArrayList(); + return this.implicated; + } + + public boolean hasImplicated() { + if (this.implicated == null) + return false; + for (Reference item : this.implicated) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that is potentially problematic.) + */ + // syntactic sugar + public Reference addImplicated() { //3 + Reference t = new Reference(); + if (this.implicated == null) + this.implicated = new ArrayList(); + this.implicated.add(t); + return t; + } + + // syntactic sugar + public DetectedIssue addImplicated(Reference t) { //3 + if (t == null) + return this; + if (this.implicated == null) + this.implicated = new ArrayList(); + this.implicated.add(t); + return this; + } + + /** + * @return {@link #implicated} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the resource representing the current activity or proposed activity that is potentially problematic.) + */ + public List getImplicatedTarget() { + if (this.implicatedTarget == null) + this.implicatedTarget = new ArrayList(); + return this.implicatedTarget; + } + + /** + * @return {@link #detail} (A textual explanation of the detected issue.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value + */ + public StringType getDetailElement() { + if (this.detail == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.detail"); + else if (Configuration.doAutoCreate()) + this.detail = new StringType(); // bb + return this.detail; + } + + public boolean hasDetailElement() { + return this.detail != null && !this.detail.isEmpty(); + } + + public boolean hasDetail() { + return this.detail != null && !this.detail.isEmpty(); + } + + /** + * @param value {@link #detail} (A textual explanation of the detected issue.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value + */ + public DetectedIssue setDetailElement(StringType value) { + this.detail = value; + return this; + } + + /** + * @return A textual explanation of the detected issue. + */ + public String getDetail() { + return this.detail == null ? null : this.detail.getValue(); + } + + /** + * @param value A textual explanation of the detected issue. + */ + public DetectedIssue setDetail(String value) { + if (Utilities.noString(value)) + this.detail = null; + else { + if (this.detail == null) + this.detail = new StringType(); + this.detail.setValue(value); + } + return this; + } + + /** + * @return {@link #date} (The date or date-time when the detected issue was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date or date-time when the detected issue was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DetectedIssue setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date or date-time when the detected issue was initially identified. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date or date-time when the detected issue was initially identified. + */ + public DetectedIssue setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #author} (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.) + */ + public DetectedIssue setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.) + */ + public DetectedIssue setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Business identifier associated with the detected issue record.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Business identifier associated with the detected issue record.) + */ + public DetectedIssue setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public UriType getReferenceElement() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetectedIssue.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new UriType(); // bb + return this.reference; + } + + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public DetectedIssue setReferenceElement(UriType value) { + this.reference = value; + return this; + } + + /** + * @return The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified. + */ + public DetectedIssue setReference(String value) { + if (Utilities.noString(value)) + this.reference = null; + else { + if (this.reference == null) + this.reference = new UriType(); + this.reference.setValue(value); + } + return this; + } + + /** + * @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.) + */ + public List getMitigation() { + if (this.mitigation == null) + this.mitigation = new ArrayList(); + return this.mitigation; + } + + public boolean hasMitigation() { + if (this.mitigation == null) + return false; + for (DetectedIssueMitigationComponent item : this.mitigation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.) + */ + // syntactic sugar + public DetectedIssueMitigationComponent addMitigation() { //3 + DetectedIssueMitigationComponent t = new DetectedIssueMitigationComponent(); + if (this.mitigation == null) + this.mitigation = new ArrayList(); + this.mitigation.add(t); + return t; + } + + // syntactic sugar + public DetectedIssue addMitigation(DetectedIssueMitigationComponent t) { //3 + if (t == null) + return this; + if (this.mitigation == null) + this.mitigation = new ArrayList(); + this.mitigation.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("patient", "Reference(Patient)", "Indicates the patient whose record the detected issue is associated with.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("category", "CodeableConcept", "Identifies the general type of issue identified.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("severity", "code", "Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.", 0, java.lang.Integer.MAX_VALUE, severity)); + childrenList.add(new Property("implicated", "Reference(Any)", "Indicates the resource representing the current activity or proposed activity that is potentially problematic.", 0, java.lang.Integer.MAX_VALUE, implicated)); + childrenList.add(new Property("detail", "string", "A textual explanation of the detected issue.", 0, java.lang.Integer.MAX_VALUE, detail)); + childrenList.add(new Property("date", "dateTime", "The date or date-time when the detected issue was initially identified.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("author", "Reference(Practitioner|Device)", "Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("identifier", "Identifier", "Business identifier associated with the detected issue record.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("reference", "uri", "The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("mitigation", "", "Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", 0, java.lang.Integer.MAX_VALUE, mitigation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("severity")) + this.severity = new DetectedIssueSeverityEnumFactory().fromType(value); // Enumeration + else if (name.equals("implicated")) + this.getImplicated().add(castToReference(value)); + else if (name.equals("detail")) + this.detail = castToString(value); // StringType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("reference")) + this.reference = castToUri(value); // UriType + else if (name.equals("mitigation")) + this.getMitigation().add((DetectedIssueMitigationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("severity")) { + throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.severity"); + } + else if (name.equals("implicated")) { + return addImplicated(); + } + else if (name.equals("detail")) { + throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.detail"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.date"); + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("reference")) { + throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.reference"); + } + else if (name.equals("mitigation")) { + return addMitigation(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DetectedIssue"; + + } + + public DetectedIssue copy() { + DetectedIssue dst = new DetectedIssue(); + copyValues(dst); + dst.patient = patient == null ? null : patient.copy(); + dst.category = category == null ? null : category.copy(); + dst.severity = severity == null ? null : severity.copy(); + if (implicated != null) { + dst.implicated = new ArrayList(); + for (Reference i : implicated) + dst.implicated.add(i.copy()); + }; + dst.detail = detail == null ? null : detail.copy(); + dst.date = date == null ? null : date.copy(); + dst.author = author == null ? null : author.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.reference = reference == null ? null : reference.copy(); + if (mitigation != null) { + dst.mitigation = new ArrayList(); + for (DetectedIssueMitigationComponent i : mitigation) + dst.mitigation.add(i.copy()); + }; + return dst; + } + + protected DetectedIssue typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DetectedIssue)) + return false; + DetectedIssue o = (DetectedIssue) other; + return compareDeep(patient, o.patient, true) && compareDeep(category, o.category, true) && compareDeep(severity, o.severity, true) + && compareDeep(implicated, o.implicated, true) && compareDeep(detail, o.detail, true) && compareDeep(date, o.date, true) + && compareDeep(author, o.author, true) && compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true) + && compareDeep(mitigation, o.mitigation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DetectedIssue)) + return false; + DetectedIssue o = (DetectedIssue) other; + return compareValues(severity, o.severity, true) && compareValues(detail, o.detail, true) && compareValues(date, o.date, true) + && compareValues(reference, o.reference, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (patient == null || patient.isEmpty()) && (category == null || category.isEmpty()) + && (severity == null || severity.isEmpty()) && (implicated == null || implicated.isEmpty()) + && (detail == null || detail.isEmpty()) && (date == null || date.isEmpty()) && (author == null || author.isEmpty()) + && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) + && (mitigation == null || mitigation.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DetectedIssue; + } + + @SearchParamDefinition(name="date", path="DetectedIssue.date", description="When identified", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="DetectedIssue.identifier", description="Unique id for the detected issue", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="implicated", path="DetectedIssue.implicated", description="Problem resource", type="reference" ) + public static final String SP_IMPLICATED = "implicated"; + @SearchParamDefinition(name="category", path="DetectedIssue.category", description="Issue Category, e.g. drug-drug, duplicate therapy, etc.", type="token" ) + public static final String SP_CATEGORY = "category"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Device.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Device.java new file mode 100644 index 00000000000..8d7dcbb7571 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Device.java @@ -0,0 +1,1232 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ +@ResourceDef(name="Device", profile="http://hl7.org/fhir/Profile/Device") +public class Device extends DomainResource { + + public enum DeviceStatus { + /** + * The Device is available for use. + */ + AVAILABLE, + /** + * The Device is no longer available for use (e.g. lost, expired, damaged). + */ + NOTAVAILABLE, + /** + * The Device was entered in error and voided. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static DeviceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return AVAILABLE; + if ("not-available".equals(codeString)) + return NOTAVAILABLE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AVAILABLE: return "available"; + case NOTAVAILABLE: return "not-available"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case AVAILABLE: return "http://hl7.org/fhir/devicestatus"; + case NOTAVAILABLE: return "http://hl7.org/fhir/devicestatus"; + case ENTEREDINERROR: return "http://hl7.org/fhir/devicestatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case AVAILABLE: return "The Device is available for use."; + case NOTAVAILABLE: return "The Device is no longer available for use (e.g. lost, expired, damaged)."; + case ENTEREDINERROR: return "The Device was entered in error and voided."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AVAILABLE: return "Available"; + case NOTAVAILABLE: return "Not Available"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class DeviceStatusEnumFactory implements EnumFactory { + public DeviceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return DeviceStatus.AVAILABLE; + if ("not-available".equals(codeString)) + return DeviceStatus.NOTAVAILABLE; + if ("entered-in-error".equals(codeString)) + return DeviceStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown DeviceStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return new Enumeration(this, DeviceStatus.AVAILABLE); + if ("not-available".equals(codeString)) + return new Enumeration(this, DeviceStatus.NOTAVAILABLE); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, DeviceStatus.ENTEREDINERROR); + throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'"); + } + public String toCode(DeviceStatus code) { + if (code == DeviceStatus.AVAILABLE) + return "available"; + if (code == DeviceStatus.NOTAVAILABLE) + return "not-available"; + if (code == DeviceStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + /** + * Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Instance id from manufacturer, owner, and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used." ) + protected List identifier; + + /** + * Code or identifier to identify a kind of device. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device." ) + protected CodeableConcept type; + + /** + * Descriptive information, usage information or implantation information that is not captured in an existing element. + */ + @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) + protected List note; + + /** + * Status of the Device availability. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="available | not-available | entered-in-error", formalDefinition="Status of the Device availability." ) + protected Enumeration status; + + /** + * A name of the manufacturer. + */ + @Child(name = "manufacturer", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) + protected StringType manufacturer; + + /** + * The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. + */ + @Child(name = "model", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) + protected StringType model; + + /** + * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. + */ + @Child(name = "version", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) + protected StringType version; + + /** + * The date and time when the device was manufactured. + */ + @Child(name = "manufactureDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Manufacture date", formalDefinition="The date and time when the device was manufactured." ) + protected DateTimeType manufactureDate; + + /** + * The date and time beyond which this device is no longer valid or should not be used (if applicable). + */ + @Child(name = "expiry", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." ) + protected DateTimeType expiry; + + /** + * United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. + */ + @Child(name = "udi", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="FDA mandated Unique Device Identifier", formalDefinition="United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) + protected StringType udi; + + /** + * Lot number assigned by the manufacturer. + */ + @Child(name = "lotNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) + protected StringType lotNumber; + + /** + * An organization that is responsible for the provision and ongoing maintenance of the device. + */ + @Child(name = "owner", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) + protected Reference owner; + + /** + * The actual object that is the target of the reference (An organization that is responsible for the provision and ongoing maintenance of the device.) + */ + protected Organization ownerTarget; + + /** + * The place where the device can be found. + */ + @Child(name = "location", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Where the resource is found", formalDefinition="The place where the device can be found." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The place where the device can be found.) + */ + protected Location locationTarget; + + /** + * Patient information, if the resource is affixed to a person. + */ + @Child(name = "patient", type = {Patient.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Patient information, if the resource is affixed to a person.) + */ + protected Patient patientTarget; + + /** + * Contact details for an organization or a particular human that is responsible for the device. + */ + @Child(name = "contact", type = {ContactPoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) + protected List contact; + + /** + * A network address on which the device may be contacted directly. + */ + @Child(name = "url", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) + protected UriType url; + + private static final long serialVersionUID = 366690094L; + + /* + * Constructor + */ + public Device() { + super(); + } + + /* + * Constructor + */ + public Device(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Device addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #type} (Code or identifier to identify a kind of device.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Code or identifier to identify a kind of device.) + */ + public Device setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) + */ + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public Device addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DeviceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Device setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Status of the Device availability. + */ + public DeviceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Status of the Device availability. + */ + public Device setStatus(DeviceStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new DeviceStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value + */ + public StringType getManufacturerElement() { + if (this.manufacturer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.manufacturer"); + else if (Configuration.doAutoCreate()) + this.manufacturer = new StringType(); // bb + return this.manufacturer; + } + + public boolean hasManufacturerElement() { + return this.manufacturer != null && !this.manufacturer.isEmpty(); + } + + public boolean hasManufacturer() { + return this.manufacturer != null && !this.manufacturer.isEmpty(); + } + + /** + * @param value {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value + */ + public Device setManufacturerElement(StringType value) { + this.manufacturer = value; + return this; + } + + /** + * @return A name of the manufacturer. + */ + public String getManufacturer() { + return this.manufacturer == null ? null : this.manufacturer.getValue(); + } + + /** + * @param value A name of the manufacturer. + */ + public Device setManufacturer(String value) { + if (Utilities.noString(value)) + this.manufacturer = null; + else { + if (this.manufacturer == null) + this.manufacturer = new StringType(); + this.manufacturer.setValue(value); + } + return this; + } + + /** + * @return {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value + */ + public StringType getModelElement() { + if (this.model == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.model"); + else if (Configuration.doAutoCreate()) + this.model = new StringType(); // bb + return this.model; + } + + public boolean hasModelElement() { + return this.model != null && !this.model.isEmpty(); + } + + public boolean hasModel() { + return this.model != null && !this.model.isEmpty(); + } + + /** + * @param value {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value + */ + public Device setModelElement(StringType value) { + this.model = value; + return this; + } + + /** + * @return The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. + */ + public String getModel() { + return this.model == null ? null : this.model.getValue(); + } + + /** + * @param value The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. + */ + public Device setModel(String value) { + if (Utilities.noString(value)) + this.model = null; + else { + if (this.model == null) + this.model = new StringType(); + this.model.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Device setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. + */ + public Device setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + */ + public DateTimeType getManufactureDateElement() { + if (this.manufactureDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.manufactureDate"); + else if (Configuration.doAutoCreate()) + this.manufactureDate = new DateTimeType(); // bb + return this.manufactureDate; + } + + public boolean hasManufactureDateElement() { + return this.manufactureDate != null && !this.manufactureDate.isEmpty(); + } + + public boolean hasManufactureDate() { + return this.manufactureDate != null && !this.manufactureDate.isEmpty(); + } + + /** + * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + */ + public Device setManufactureDateElement(DateTimeType value) { + this.manufactureDate = value; + return this; + } + + /** + * @return The date and time when the device was manufactured. + */ + public Date getManufactureDate() { + return this.manufactureDate == null ? null : this.manufactureDate.getValue(); + } + + /** + * @param value The date and time when the device was manufactured. + */ + public Device setManufactureDate(Date value) { + if (value == null) + this.manufactureDate = null; + else { + if (this.manufactureDate == null) + this.manufactureDate = new DateTimeType(); + this.manufactureDate.setValue(value); + } + return this; + } + + /** + * @return {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value + */ + public DateTimeType getExpiryElement() { + if (this.expiry == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.expiry"); + else if (Configuration.doAutoCreate()) + this.expiry = new DateTimeType(); // bb + return this.expiry; + } + + public boolean hasExpiryElement() { + return this.expiry != null && !this.expiry.isEmpty(); + } + + public boolean hasExpiry() { + return this.expiry != null && !this.expiry.isEmpty(); + } + + /** + * @param value {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value + */ + public Device setExpiryElement(DateTimeType value) { + this.expiry = value; + return this; + } + + /** + * @return The date and time beyond which this device is no longer valid or should not be used (if applicable). + */ + public Date getExpiry() { + return this.expiry == null ? null : this.expiry.getValue(); + } + + /** + * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable). + */ + public Device setExpiry(Date value) { + if (value == null) + this.expiry = null; + else { + if (this.expiry == null) + this.expiry = new DateTimeType(); + this.expiry.setValue(value); + } + return this; + } + + /** + * @return {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value + */ + public StringType getUdiElement() { + if (this.udi == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.udi"); + else if (Configuration.doAutoCreate()) + this.udi = new StringType(); // bb + return this.udi; + } + + public boolean hasUdiElement() { + return this.udi != null && !this.udi.isEmpty(); + } + + public boolean hasUdi() { + return this.udi != null && !this.udi.isEmpty(); + } + + /** + * @param value {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value + */ + public Device setUdiElement(StringType value) { + this.udi = value; + return this; + } + + /** + * @return United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. + */ + public String getUdi() { + return this.udi == null ? null : this.udi.getValue(); + } + + /** + * @param value United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. + */ + public Device setUdi(String value) { + if (Utilities.noString(value)) + this.udi = null; + else { + if (this.udi == null) + this.udi = new StringType(); + this.udi.setValue(value); + } + return this; + } + + /** + * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public StringType getLotNumberElement() { + if (this.lotNumber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.lotNumber"); + else if (Configuration.doAutoCreate()) + this.lotNumber = new StringType(); // bb + return this.lotNumber; + } + + public boolean hasLotNumberElement() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + public boolean hasLotNumber() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + /** + * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public Device setLotNumberElement(StringType value) { + this.lotNumber = value; + return this; + } + + /** + * @return Lot number assigned by the manufacturer. + */ + public String getLotNumber() { + return this.lotNumber == null ? null : this.lotNumber.getValue(); + } + + /** + * @param value Lot number assigned by the manufacturer. + */ + public Device setLotNumber(String value) { + if (Utilities.noString(value)) + this.lotNumber = null; + else { + if (this.lotNumber == null) + this.lotNumber = new StringType(); + this.lotNumber.setValue(value); + } + return this; + } + + /** + * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) + */ + public Reference getOwner() { + if (this.owner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.owner"); + else if (Configuration.doAutoCreate()) + this.owner = new Reference(); // cc + return this.owner; + } + + public boolean hasOwner() { + return this.owner != null && !this.owner.isEmpty(); + } + + /** + * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) + */ + public Device setOwner(Reference value) { + this.owner = value; + return this; + } + + /** + * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) + */ + public Organization getOwnerTarget() { + if (this.ownerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.owner"); + else if (Configuration.doAutoCreate()) + this.ownerTarget = new Organization(); // aa + return this.ownerTarget; + } + + /** + * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) + */ + public Device setOwnerTarget(Organization value) { + this.ownerTarget = value; + return this; + } + + /** + * @return {@link #location} (The place where the device can be found.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The place where the device can be found.) + */ + public Device setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The place where the device can be found.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The place where the device can be found.) + */ + public Device setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #patient} (Patient information, if the resource is affixed to a person.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (Patient information, if the resource is affixed to a person.) + */ + public Device setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) + */ + public Device setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ContactPoint item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) + */ + // syntactic sugar + public ContactPoint addContact() { //3 + ContactPoint t = new ContactPoint(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Device addContact(ContactPoint t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Device setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return A network address on which the device may be contacted directly. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value A network address on which the device may be contacted directly. + */ + public Device setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "CodeableConcept", "Code or identifier to identify a kind of device.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("status", "code", "Status of the Device availability.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); + childrenList.add(new Property("model", "string", "The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", 0, java.lang.Integer.MAX_VALUE, model)); + childrenList.add(new Property("version", "string", "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, java.lang.Integer.MAX_VALUE, manufactureDate)); + childrenList.add(new Property("expiry", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, java.lang.Integer.MAX_VALUE, expiry)); + childrenList.add(new Property("udi", "string", "United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); + childrenList.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, java.lang.Integer.MAX_VALUE, owner)); + childrenList.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("patient", "Reference(Patient)", "Patient information, if the resource is affixed to a person.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("note")) + this.getNote().add(castToAnnotation(value)); + else if (name.equals("status")) + this.status = new DeviceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("manufacturer")) + this.manufacturer = castToString(value); // StringType + else if (name.equals("model")) + this.model = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("manufactureDate")) + this.manufactureDate = castToDateTime(value); // DateTimeType + else if (name.equals("expiry")) + this.expiry = castToDateTime(value); // DateTimeType + else if (name.equals("udi")) + this.udi = castToString(value); // StringType + else if (name.equals("lotNumber")) + this.lotNumber = castToString(value); // StringType + else if (name.equals("owner")) + this.owner = castToReference(value); // Reference + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("contact")) + this.getContact().add(castToContactPoint(value)); + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.status"); + } + else if (name.equals("manufacturer")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer"); + } + else if (name.equals("model")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.model"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.version"); + } + else if (name.equals("manufactureDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); + } + else if (name.equals("expiry")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.expiry"); + } + else if (name.equals("udi")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.udi"); + } + else if (name.equals("lotNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); + } + else if (name.equals("owner")) { + this.owner = new Reference(); + return this.owner; + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.url"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Device"; + + } + + public Device copy() { + Device dst = new Device(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); + dst.model = model == null ? null : model.copy(); + dst.version = version == null ? null : version.copy(); + dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); + dst.expiry = expiry == null ? null : expiry.copy(); + dst.udi = udi == null ? null : udi.copy(); + dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); + dst.owner = owner == null ? null : owner.copy(); + dst.location = location == null ? null : location.copy(); + dst.patient = patient == null ? null : patient.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ContactPoint i : contact) + dst.contact.add(i.copy()); + }; + dst.url = url == null ? null : url.copy(); + return dst; + } + + protected Device typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Device)) + return false; + Device o = (Device) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(note, o.note, true) + && compareDeep(status, o.status, true) && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(model, o.model, true) + && compareDeep(version, o.version, true) && compareDeep(manufactureDate, o.manufactureDate, true) + && compareDeep(expiry, o.expiry, true) && compareDeep(udi, o.udi, true) && compareDeep(lotNumber, o.lotNumber, true) + && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(patient, o.patient, true) + && compareDeep(contact, o.contact, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Device)) + return false; + Device o = (Device) other; + return compareValues(status, o.status, true) && compareValues(manufacturer, o.manufacturer, true) && compareValues(model, o.model, true) + && compareValues(version, o.version, true) && compareValues(manufactureDate, o.manufactureDate, true) + && compareValues(expiry, o.expiry, true) && compareValues(udi, o.udi, true) && compareValues(lotNumber, o.lotNumber, true) + && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) + && (note == null || note.isEmpty()) && (status == null || status.isEmpty()) && (manufacturer == null || manufacturer.isEmpty()) + && (model == null || model.isEmpty()) && (version == null || version.isEmpty()) && (manufactureDate == null || manufactureDate.isEmpty()) + && (expiry == null || expiry.isEmpty()) && (udi == null || udi.isEmpty()) && (lotNumber == null || lotNumber.isEmpty()) + && (owner == null || owner.isEmpty()) && (location == null || location.isEmpty()) && (patient == null || patient.isEmpty()) + && (contact == null || contact.isEmpty()) && (url == null || url.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Device; + } + + @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" ) + public static final String SP_MODEL = "model"; + @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="udi", path="Device.udi", description="FDA mandated Unique Device Identifier", type="string" ) + public static final String SP_UDI = "udi"; + @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) + public static final String SP_MANUFACTURER = "manufacturer"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceComponent.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceComponent.java new file mode 100644 index 00000000000..f603de747b3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceComponent.java @@ -0,0 +1,1105 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device. + */ +@ResourceDef(name="DeviceComponent", profile="http://hl7.org/fhir/Profile/DeviceComponent") +public class DeviceComponent extends DomainResource { + + public enum MeasmntPrinciple { + /** + * Measurement principle isn't in the list. + */ + OTHER, + /** + * Measurement is done using the chemical principle. + */ + CHEMICAL, + /** + * Measurement is done using the electrical principle. + */ + ELECTRICAL, + /** + * Measurement is done using the impedance principle. + */ + IMPEDANCE, + /** + * Measurement is done using the nuclear principle. + */ + NUCLEAR, + /** + * Measurement is done using the optical principle. + */ + OPTICAL, + /** + * Measurement is done using the thermal principle. + */ + THERMAL, + /** + * Measurement is done using the biological principle. + */ + BIOLOGICAL, + /** + * Measurement is done using the mechanical principle. + */ + MECHANICAL, + /** + * Measurement is done using the acoustical principle. + */ + ACOUSTICAL, + /** + * Measurement is done using the manual principle. + */ + MANUAL, + /** + * added to help the parsers + */ + NULL; + public static MeasmntPrinciple fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("other".equals(codeString)) + return OTHER; + if ("chemical".equals(codeString)) + return CHEMICAL; + if ("electrical".equals(codeString)) + return ELECTRICAL; + if ("impedance".equals(codeString)) + return IMPEDANCE; + if ("nuclear".equals(codeString)) + return NUCLEAR; + if ("optical".equals(codeString)) + return OPTICAL; + if ("thermal".equals(codeString)) + return THERMAL; + if ("biological".equals(codeString)) + return BIOLOGICAL; + if ("mechanical".equals(codeString)) + return MECHANICAL; + if ("acoustical".equals(codeString)) + return ACOUSTICAL; + if ("manual".equals(codeString)) + return MANUAL; + throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OTHER: return "other"; + case CHEMICAL: return "chemical"; + case ELECTRICAL: return "electrical"; + case IMPEDANCE: return "impedance"; + case NUCLEAR: return "nuclear"; + case OPTICAL: return "optical"; + case THERMAL: return "thermal"; + case BIOLOGICAL: return "biological"; + case MECHANICAL: return "mechanical"; + case ACOUSTICAL: return "acoustical"; + case MANUAL: return "manual"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case OTHER: return "http://hl7.org/fhir/measurement-principle"; + case CHEMICAL: return "http://hl7.org/fhir/measurement-principle"; + case ELECTRICAL: return "http://hl7.org/fhir/measurement-principle"; + case IMPEDANCE: return "http://hl7.org/fhir/measurement-principle"; + case NUCLEAR: return "http://hl7.org/fhir/measurement-principle"; + case OPTICAL: return "http://hl7.org/fhir/measurement-principle"; + case THERMAL: return "http://hl7.org/fhir/measurement-principle"; + case BIOLOGICAL: return "http://hl7.org/fhir/measurement-principle"; + case MECHANICAL: return "http://hl7.org/fhir/measurement-principle"; + case ACOUSTICAL: return "http://hl7.org/fhir/measurement-principle"; + case MANUAL: return "http://hl7.org/fhir/measurement-principle"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case OTHER: return "Measurement principle isn't in the list."; + case CHEMICAL: return "Measurement is done using the chemical principle."; + case ELECTRICAL: return "Measurement is done using the electrical principle."; + case IMPEDANCE: return "Measurement is done using the impedance principle."; + case NUCLEAR: return "Measurement is done using the nuclear principle."; + case OPTICAL: return "Measurement is done using the optical principle."; + case THERMAL: return "Measurement is done using the thermal principle."; + case BIOLOGICAL: return "Measurement is done using the biological principle."; + case MECHANICAL: return "Measurement is done using the mechanical principle."; + case ACOUSTICAL: return "Measurement is done using the acoustical principle."; + case MANUAL: return "Measurement is done using the manual principle."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OTHER: return "MSP Other"; + case CHEMICAL: return "MSP Chemical"; + case ELECTRICAL: return "MSP Electrical"; + case IMPEDANCE: return "MSP Impedance"; + case NUCLEAR: return "MSP Nuclear"; + case OPTICAL: return "MSP Optical"; + case THERMAL: return "MSP Thermal"; + case BIOLOGICAL: return "MSP Biological"; + case MECHANICAL: return "MSP Mechanical"; + case ACOUSTICAL: return "MSP Acoustical"; + case MANUAL: return "MSP Manual"; + default: return "?"; + } + } + } + + public static class MeasmntPrincipleEnumFactory implements EnumFactory { + public MeasmntPrinciple fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("other".equals(codeString)) + return MeasmntPrinciple.OTHER; + if ("chemical".equals(codeString)) + return MeasmntPrinciple.CHEMICAL; + if ("electrical".equals(codeString)) + return MeasmntPrinciple.ELECTRICAL; + if ("impedance".equals(codeString)) + return MeasmntPrinciple.IMPEDANCE; + if ("nuclear".equals(codeString)) + return MeasmntPrinciple.NUCLEAR; + if ("optical".equals(codeString)) + return MeasmntPrinciple.OPTICAL; + if ("thermal".equals(codeString)) + return MeasmntPrinciple.THERMAL; + if ("biological".equals(codeString)) + return MeasmntPrinciple.BIOLOGICAL; + if ("mechanical".equals(codeString)) + return MeasmntPrinciple.MECHANICAL; + if ("acoustical".equals(codeString)) + return MeasmntPrinciple.ACOUSTICAL; + if ("manual".equals(codeString)) + return MeasmntPrinciple.MANUAL; + throw new IllegalArgumentException("Unknown MeasmntPrinciple code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("other".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.OTHER); + if ("chemical".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.CHEMICAL); + if ("electrical".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.ELECTRICAL); + if ("impedance".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.IMPEDANCE); + if ("nuclear".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.NUCLEAR); + if ("optical".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.OPTICAL); + if ("thermal".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.THERMAL); + if ("biological".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.BIOLOGICAL); + if ("mechanical".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.MECHANICAL); + if ("acoustical".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.ACOUSTICAL); + if ("manual".equals(codeString)) + return new Enumeration(this, MeasmntPrinciple.MANUAL); + throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'"); + } + public String toCode(MeasmntPrinciple code) { + if (code == MeasmntPrinciple.OTHER) + return "other"; + if (code == MeasmntPrinciple.CHEMICAL) + return "chemical"; + if (code == MeasmntPrinciple.ELECTRICAL) + return "electrical"; + if (code == MeasmntPrinciple.IMPEDANCE) + return "impedance"; + if (code == MeasmntPrinciple.NUCLEAR) + return "nuclear"; + if (code == MeasmntPrinciple.OPTICAL) + return "optical"; + if (code == MeasmntPrinciple.THERMAL) + return "thermal"; + if (code == MeasmntPrinciple.BIOLOGICAL) + return "biological"; + if (code == MeasmntPrinciple.MECHANICAL) + return "mechanical"; + if (code == MeasmntPrinciple.ACOUSTICAL) + return "acoustical"; + if (code == MeasmntPrinciple.MANUAL) + return "manual"; + return "?"; + } + } + + @Block() + public static class DeviceComponentProductionSpecificationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc. + */ + @Child(name = "specType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specification type", formalDefinition="Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc." ) + protected CodeableConcept specType; + + /** + * Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of. + */ + @Child(name = "componentId", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Internal component unique identification", formalDefinition="Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of." ) + protected Identifier componentId; + + /** + * Describes the printable string defining the component. + */ + @Child(name = "productionSpec", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A printable string defining the component", formalDefinition="Describes the printable string defining the component." ) + protected StringType productionSpec; + + private static final long serialVersionUID = -1476597516L; + + /* + * Constructor + */ + public DeviceComponentProductionSpecificationComponent() { + super(); + } + + /** + * @return {@link #specType} (Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.) + */ + public CodeableConcept getSpecType() { + if (this.specType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.specType"); + else if (Configuration.doAutoCreate()) + this.specType = new CodeableConcept(); // cc + return this.specType; + } + + public boolean hasSpecType() { + return this.specType != null && !this.specType.isEmpty(); + } + + /** + * @param value {@link #specType} (Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.) + */ + public DeviceComponentProductionSpecificationComponent setSpecType(CodeableConcept value) { + this.specType = value; + return this; + } + + /** + * @return {@link #componentId} (Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.) + */ + public Identifier getComponentId() { + if (this.componentId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.componentId"); + else if (Configuration.doAutoCreate()) + this.componentId = new Identifier(); // cc + return this.componentId; + } + + public boolean hasComponentId() { + return this.componentId != null && !this.componentId.isEmpty(); + } + + /** + * @param value {@link #componentId} (Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.) + */ + public DeviceComponentProductionSpecificationComponent setComponentId(Identifier value) { + this.componentId = value; + return this; + } + + /** + * @return {@link #productionSpec} (Describes the printable string defining the component.). This is the underlying object with id, value and extensions. The accessor "getProductionSpec" gives direct access to the value + */ + public StringType getProductionSpecElement() { + if (this.productionSpec == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.productionSpec"); + else if (Configuration.doAutoCreate()) + this.productionSpec = new StringType(); // bb + return this.productionSpec; + } + + public boolean hasProductionSpecElement() { + return this.productionSpec != null && !this.productionSpec.isEmpty(); + } + + public boolean hasProductionSpec() { + return this.productionSpec != null && !this.productionSpec.isEmpty(); + } + + /** + * @param value {@link #productionSpec} (Describes the printable string defining the component.). This is the underlying object with id, value and extensions. The accessor "getProductionSpec" gives direct access to the value + */ + public DeviceComponentProductionSpecificationComponent setProductionSpecElement(StringType value) { + this.productionSpec = value; + return this; + } + + /** + * @return Describes the printable string defining the component. + */ + public String getProductionSpec() { + return this.productionSpec == null ? null : this.productionSpec.getValue(); + } + + /** + * @param value Describes the printable string defining the component. + */ + public DeviceComponentProductionSpecificationComponent setProductionSpec(String value) { + if (Utilities.noString(value)) + this.productionSpec = null; + else { + if (this.productionSpec == null) + this.productionSpec = new StringType(); + this.productionSpec.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("specType", "CodeableConcept", "Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.", 0, java.lang.Integer.MAX_VALUE, specType)); + childrenList.add(new Property("componentId", "Identifier", "Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.", 0, java.lang.Integer.MAX_VALUE, componentId)); + childrenList.add(new Property("productionSpec", "string", "Describes the printable string defining the component.", 0, java.lang.Integer.MAX_VALUE, productionSpec)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("specType")) + this.specType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("componentId")) + this.componentId = castToIdentifier(value); // Identifier + else if (name.equals("productionSpec")) + this.productionSpec = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("specType")) { + this.specType = new CodeableConcept(); + return this.specType; + } + else if (name.equals("componentId")) { + this.componentId = new Identifier(); + return this.componentId; + } + else if (name.equals("productionSpec")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.productionSpec"); + } + else + return super.addChild(name); + } + + public DeviceComponentProductionSpecificationComponent copy() { + DeviceComponentProductionSpecificationComponent dst = new DeviceComponentProductionSpecificationComponent(); + copyValues(dst); + dst.specType = specType == null ? null : specType.copy(); + dst.componentId = componentId == null ? null : componentId.copy(); + dst.productionSpec = productionSpec == null ? null : productionSpec.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceComponentProductionSpecificationComponent)) + return false; + DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other; + return compareDeep(specType, o.specType, true) && compareDeep(componentId, o.componentId, true) + && compareDeep(productionSpec, o.productionSpec, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceComponentProductionSpecificationComponent)) + return false; + DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other; + return compareValues(productionSpec, o.productionSpec, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (specType == null || specType.isEmpty()) && (componentId == null || componentId.isEmpty()) + && (productionSpec == null || productionSpec.isEmpty()); + } + + public String fhirType() { + return "DeviceComponent.productionSpecification"; + + } + + } + + /** + * Describes the specific component type as defined in the object-oriented or metric nomenclature partition. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What kind of component it is", formalDefinition="Describes the specific component type as defined in the object-oriented or metric nomenclature partition." ) + protected CodeableConcept type; + + /** + * Describes the local assigned unique identification by the software. For example: handle ID. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instance id assigned by the software stack", formalDefinition="Describes the local assigned unique identification by the software. For example: handle ID." ) + protected Identifier identifier; + + /** + * Describes the timestamp for the most recent system change which includes device configuration or setting change. + */ + @Child(name = "lastSystemChange", type = {InstantType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Recent system change timestamp", formalDefinition="Describes the timestamp for the most recent system change which includes device configuration or setting change." ) + protected InstantType lastSystemChange; + + /** + * Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc. + */ + @Child(name = "source", type = {Device.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A source device of this component", formalDefinition="Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.) + */ + protected Device sourceTarget; + + /** + * Describes the link to the parent resource. For example: Channel is linked to its VMD parent. + */ + @Child(name = "parent", type = {DeviceComponent.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Parent resource link", formalDefinition="Describes the link to the parent resource. For example: Channel is linked to its VMD parent." ) + protected Reference parent; + + /** + * The actual object that is the target of the reference (Describes the link to the parent resource. For example: Channel is linked to its VMD parent.) + */ + protected DeviceComponent parentTarget; + + /** + * Indicates current operational status of the device. For example: On, Off, Standby, etc. + */ + @Child(name = "operationalStatus", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Component operational status", formalDefinition="Indicates current operational status of the device. For example: On, Off, Standby, etc." ) + protected List operationalStatus; + + /** + * Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular. + */ + @Child(name = "parameterGroup", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Current supported parameter group", formalDefinition="Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular." ) + protected CodeableConcept parameterGroup; + + /** + * Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. + */ + @Child(name = "measurementPrinciple", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="other | chemical | electrical | impedance | nuclear | optical | thermal | biological | mechanical | acoustical | manual+", formalDefinition="Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) + protected Enumeration measurementPrinciple; + + /** + * Describes the production specification such as component revision, serial number, etc. + */ + @Child(name = "productionSpecification", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Production specification of the component", formalDefinition="Describes the production specification such as component revision, serial number, etc." ) + protected List productionSpecification; + + /** + * Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US. + */ + @Child(name = "languageCode", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Language code for the human-readable text strings produced by the device", formalDefinition="Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US." ) + protected CodeableConcept languageCode; + + private static final long serialVersionUID = -1742890034L; + + /* + * Constructor + */ + public DeviceComponent() { + super(); + } + + /* + * Constructor + */ + public DeviceComponent(CodeableConcept type, Identifier identifier, InstantType lastSystemChange) { + super(); + this.type = type; + this.identifier = identifier; + this.lastSystemChange = lastSystemChange; + } + + /** + * @return {@link #type} (Describes the specific component type as defined in the object-oriented or metric nomenclature partition.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Describes the specific component type as defined in the object-oriented or metric nomenclature partition.) + */ + public DeviceComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #identifier} (Describes the local assigned unique identification by the software. For example: handle ID.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Describes the local assigned unique identification by the software. For example: handle ID.) + */ + public DeviceComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #lastSystemChange} (Describes the timestamp for the most recent system change which includes device configuration or setting change.). This is the underlying object with id, value and extensions. The accessor "getLastSystemChange" gives direct access to the value + */ + public InstantType getLastSystemChangeElement() { + if (this.lastSystemChange == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.lastSystemChange"); + else if (Configuration.doAutoCreate()) + this.lastSystemChange = new InstantType(); // bb + return this.lastSystemChange; + } + + public boolean hasLastSystemChangeElement() { + return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); + } + + public boolean hasLastSystemChange() { + return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); + } + + /** + * @param value {@link #lastSystemChange} (Describes the timestamp for the most recent system change which includes device configuration or setting change.). This is the underlying object with id, value and extensions. The accessor "getLastSystemChange" gives direct access to the value + */ + public DeviceComponent setLastSystemChangeElement(InstantType value) { + this.lastSystemChange = value; + return this; + } + + /** + * @return Describes the timestamp for the most recent system change which includes device configuration or setting change. + */ + public Date getLastSystemChange() { + return this.lastSystemChange == null ? null : this.lastSystemChange.getValue(); + } + + /** + * @param value Describes the timestamp for the most recent system change which includes device configuration or setting change. + */ + public DeviceComponent setLastSystemChange(Date value) { + if (this.lastSystemChange == null) + this.lastSystemChange = new InstantType(); + this.lastSystemChange.setValue(value); + return this; + } + + /** + * @return {@link #source} (Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.) + */ + public DeviceComponent setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.) + */ + public Device getSourceTarget() { + if (this.sourceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.source"); + else if (Configuration.doAutoCreate()) + this.sourceTarget = new Device(); // aa + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.) + */ + public DeviceComponent setSourceTarget(Device value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #parent} (Describes the link to the parent resource. For example: Channel is linked to its VMD parent.) + */ + public Reference getParent() { + if (this.parent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.parent"); + else if (Configuration.doAutoCreate()) + this.parent = new Reference(); // cc + return this.parent; + } + + public boolean hasParent() { + return this.parent != null && !this.parent.isEmpty(); + } + + /** + * @param value {@link #parent} (Describes the link to the parent resource. For example: Channel is linked to its VMD parent.) + */ + public DeviceComponent setParent(Reference value) { + this.parent = value; + return this; + } + + /** + * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the parent resource. For example: Channel is linked to its VMD parent.) + */ + public DeviceComponent getParentTarget() { + if (this.parentTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.parent"); + else if (Configuration.doAutoCreate()) + this.parentTarget = new DeviceComponent(); // aa + return this.parentTarget; + } + + /** + * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the parent resource. For example: Channel is linked to its VMD parent.) + */ + public DeviceComponent setParentTarget(DeviceComponent value) { + this.parentTarget = value; + return this; + } + + /** + * @return {@link #operationalStatus} (Indicates current operational status of the device. For example: On, Off, Standby, etc.) + */ + public List getOperationalStatus() { + if (this.operationalStatus == null) + this.operationalStatus = new ArrayList(); + return this.operationalStatus; + } + + public boolean hasOperationalStatus() { + if (this.operationalStatus == null) + return false; + for (CodeableConcept item : this.operationalStatus) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #operationalStatus} (Indicates current operational status of the device. For example: On, Off, Standby, etc.) + */ + // syntactic sugar + public CodeableConcept addOperationalStatus() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.operationalStatus == null) + this.operationalStatus = new ArrayList(); + this.operationalStatus.add(t); + return t; + } + + // syntactic sugar + public DeviceComponent addOperationalStatus(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.operationalStatus == null) + this.operationalStatus = new ArrayList(); + this.operationalStatus.add(t); + return this; + } + + /** + * @return {@link #parameterGroup} (Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.) + */ + public CodeableConcept getParameterGroup() { + if (this.parameterGroup == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.parameterGroup"); + else if (Configuration.doAutoCreate()) + this.parameterGroup = new CodeableConcept(); // cc + return this.parameterGroup; + } + + public boolean hasParameterGroup() { + return this.parameterGroup != null && !this.parameterGroup.isEmpty(); + } + + /** + * @param value {@link #parameterGroup} (Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.) + */ + public DeviceComponent setParameterGroup(CodeableConcept value) { + this.parameterGroup = value; + return this; + } + + /** + * @return {@link #measurementPrinciple} (Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPrinciple" gives direct access to the value + */ + public Enumeration getMeasurementPrincipleElement() { + if (this.measurementPrinciple == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.measurementPrinciple"); + else if (Configuration.doAutoCreate()) + this.measurementPrinciple = new Enumeration(new MeasmntPrincipleEnumFactory()); // bb + return this.measurementPrinciple; + } + + public boolean hasMeasurementPrincipleElement() { + return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); + } + + public boolean hasMeasurementPrinciple() { + return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); + } + + /** + * @param value {@link #measurementPrinciple} (Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPrinciple" gives direct access to the value + */ + public DeviceComponent setMeasurementPrincipleElement(Enumeration value) { + this.measurementPrinciple = value; + return this; + } + + /** + * @return Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. + */ + public MeasmntPrinciple getMeasurementPrinciple() { + return this.measurementPrinciple == null ? null : this.measurementPrinciple.getValue(); + } + + /** + * @param value Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc. + */ + public DeviceComponent setMeasurementPrinciple(MeasmntPrinciple value) { + if (value == null) + this.measurementPrinciple = null; + else { + if (this.measurementPrinciple == null) + this.measurementPrinciple = new Enumeration(new MeasmntPrincipleEnumFactory()); + this.measurementPrinciple.setValue(value); + } + return this; + } + + /** + * @return {@link #productionSpecification} (Describes the production specification such as component revision, serial number, etc.) + */ + public List getProductionSpecification() { + if (this.productionSpecification == null) + this.productionSpecification = new ArrayList(); + return this.productionSpecification; + } + + public boolean hasProductionSpecification() { + if (this.productionSpecification == null) + return false; + for (DeviceComponentProductionSpecificationComponent item : this.productionSpecification) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #productionSpecification} (Describes the production specification such as component revision, serial number, etc.) + */ + // syntactic sugar + public DeviceComponentProductionSpecificationComponent addProductionSpecification() { //3 + DeviceComponentProductionSpecificationComponent t = new DeviceComponentProductionSpecificationComponent(); + if (this.productionSpecification == null) + this.productionSpecification = new ArrayList(); + this.productionSpecification.add(t); + return t; + } + + // syntactic sugar + public DeviceComponent addProductionSpecification(DeviceComponentProductionSpecificationComponent t) { //3 + if (t == null) + return this; + if (this.productionSpecification == null) + this.productionSpecification = new ArrayList(); + this.productionSpecification.add(t); + return this; + } + + /** + * @return {@link #languageCode} (Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.) + */ + public CodeableConcept getLanguageCode() { + if (this.languageCode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponent.languageCode"); + else if (Configuration.doAutoCreate()) + this.languageCode = new CodeableConcept(); // cc + return this.languageCode; + } + + public boolean hasLanguageCode() { + return this.languageCode != null && !this.languageCode.isEmpty(); + } + + /** + * @param value {@link #languageCode} (Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.) + */ + public DeviceComponent setLanguageCode(CodeableConcept value) { + this.languageCode = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "Describes the specific component type as defined in the object-oriented or metric nomenclature partition.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("identifier", "Identifier", "Describes the local assigned unique identification by the software. For example: handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("lastSystemChange", "instant", "Describes the timestamp for the most recent system change which includes device configuration or setting change.", 0, java.lang.Integer.MAX_VALUE, lastSystemChange)); + childrenList.add(new Property("source", "Reference(Device)", "Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("parent", "Reference(DeviceComponent)", "Describes the link to the parent resource. For example: Channel is linked to its VMD parent.", 0, java.lang.Integer.MAX_VALUE, parent)); + childrenList.add(new Property("operationalStatus", "CodeableConcept", "Indicates current operational status of the device. For example: On, Off, Standby, etc.", 0, java.lang.Integer.MAX_VALUE, operationalStatus)); + childrenList.add(new Property("parameterGroup", "CodeableConcept", "Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.", 0, java.lang.Integer.MAX_VALUE, parameterGroup)); + childrenList.add(new Property("measurementPrinciple", "code", "Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, java.lang.Integer.MAX_VALUE, measurementPrinciple)); + childrenList.add(new Property("productionSpecification", "", "Describes the production specification such as component revision, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, productionSpecification)); + childrenList.add(new Property("languageCode", "CodeableConcept", "Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 0, java.lang.Integer.MAX_VALUE, languageCode)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("lastSystemChange")) + this.lastSystemChange = castToInstant(value); // InstantType + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("parent")) + this.parent = castToReference(value); // Reference + else if (name.equals("operationalStatus")) + this.getOperationalStatus().add(castToCodeableConcept(value)); + else if (name.equals("parameterGroup")) + this.parameterGroup = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("measurementPrinciple")) + this.measurementPrinciple = new MeasmntPrincipleEnumFactory().fromType(value); // Enumeration + else if (name.equals("productionSpecification")) + this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); + else if (name.equals("languageCode")) + this.languageCode = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("lastSystemChange")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.lastSystemChange"); + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("parent")) { + this.parent = new Reference(); + return this.parent; + } + else if (name.equals("operationalStatus")) { + return addOperationalStatus(); + } + else if (name.equals("parameterGroup")) { + this.parameterGroup = new CodeableConcept(); + return this.parameterGroup; + } + else if (name.equals("measurementPrinciple")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.measurementPrinciple"); + } + else if (name.equals("productionSpecification")) { + return addProductionSpecification(); + } + else if (name.equals("languageCode")) { + this.languageCode = new CodeableConcept(); + return this.languageCode; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DeviceComponent"; + + } + + public DeviceComponent copy() { + DeviceComponent dst = new DeviceComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.lastSystemChange = lastSystemChange == null ? null : lastSystemChange.copy(); + dst.source = source == null ? null : source.copy(); + dst.parent = parent == null ? null : parent.copy(); + if (operationalStatus != null) { + dst.operationalStatus = new ArrayList(); + for (CodeableConcept i : operationalStatus) + dst.operationalStatus.add(i.copy()); + }; + dst.parameterGroup = parameterGroup == null ? null : parameterGroup.copy(); + dst.measurementPrinciple = measurementPrinciple == null ? null : measurementPrinciple.copy(); + if (productionSpecification != null) { + dst.productionSpecification = new ArrayList(); + for (DeviceComponentProductionSpecificationComponent i : productionSpecification) + dst.productionSpecification.add(i.copy()); + }; + dst.languageCode = languageCode == null ? null : languageCode.copy(); + return dst; + } + + protected DeviceComponent typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceComponent)) + return false; + DeviceComponent o = (DeviceComponent) other; + return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(lastSystemChange, o.lastSystemChange, true) + && compareDeep(source, o.source, true) && compareDeep(parent, o.parent, true) && compareDeep(operationalStatus, o.operationalStatus, true) + && compareDeep(parameterGroup, o.parameterGroup, true) && compareDeep(measurementPrinciple, o.measurementPrinciple, true) + && compareDeep(productionSpecification, o.productionSpecification, true) && compareDeep(languageCode, o.languageCode, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceComponent)) + return false; + DeviceComponent o = (DeviceComponent) other; + return compareValues(lastSystemChange, o.lastSystemChange, true) && compareValues(measurementPrinciple, o.measurementPrinciple, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (lastSystemChange == null || lastSystemChange.isEmpty()) && (source == null || source.isEmpty()) + && (parent == null || parent.isEmpty()) && (operationalStatus == null || operationalStatus.isEmpty()) + && (parameterGroup == null || parameterGroup.isEmpty()) && (measurementPrinciple == null || measurementPrinciple.isEmpty()) + && (productionSpecification == null || productionSpecification.isEmpty()) && (languageCode == null || languageCode.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DeviceComponent; + } + + @SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference" ) + public static final String SP_PARENT = "parent"; + @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token" ) + public static final String SP_TYPE = "type"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceMetric.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceMetric.java new file mode 100644 index 00000000000..ccf785bff25 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceMetric.java @@ -0,0 +1,1560 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes a measurement, calculation or setting capability of a medical device. + */ +@ResourceDef(name="DeviceMetric", profile="http://hl7.org/fhir/Profile/DeviceMetric") +public class DeviceMetric extends DomainResource { + + public enum DeviceMetricOperationalStatus { + /** + * The DeviceMetric is operating and will generate DeviceObservations. + */ + ON, + /** + * The DeviceMetric is not operating. + */ + OFF, + /** + * The DeviceMetric is operating, but will not generate any DeviceObservations. + */ + STANDBY, + /** + * added to help the parsers + */ + NULL; + public static DeviceMetricOperationalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("on".equals(codeString)) + return ON; + if ("off".equals(codeString)) + return OFF; + if ("standby".equals(codeString)) + return STANDBY; + throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ON: return "on"; + case OFF: return "off"; + case STANDBY: return "standby"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ON: return "http://hl7.org/fhir/metric-operational-status"; + case OFF: return "http://hl7.org/fhir/metric-operational-status"; + case STANDBY: return "http://hl7.org/fhir/metric-operational-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ON: return "The DeviceMetric is operating and will generate DeviceObservations."; + case OFF: return "The DeviceMetric is not operating."; + case STANDBY: return "The DeviceMetric is operating, but will not generate any DeviceObservations."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ON: return "On"; + case OFF: return "Off"; + case STANDBY: return "Standby"; + default: return "?"; + } + } + } + + public static class DeviceMetricOperationalStatusEnumFactory implements EnumFactory { + public DeviceMetricOperationalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("on".equals(codeString)) + return DeviceMetricOperationalStatus.ON; + if ("off".equals(codeString)) + return DeviceMetricOperationalStatus.OFF; + if ("standby".equals(codeString)) + return DeviceMetricOperationalStatus.STANDBY; + throw new IllegalArgumentException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("on".equals(codeString)) + return new Enumeration(this, DeviceMetricOperationalStatus.ON); + if ("off".equals(codeString)) + return new Enumeration(this, DeviceMetricOperationalStatus.OFF); + if ("standby".equals(codeString)) + return new Enumeration(this, DeviceMetricOperationalStatus.STANDBY); + throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); + } + public String toCode(DeviceMetricOperationalStatus code) { + if (code == DeviceMetricOperationalStatus.ON) + return "on"; + if (code == DeviceMetricOperationalStatus.OFF) + return "off"; + if (code == DeviceMetricOperationalStatus.STANDBY) + return "standby"; + return "?"; + } + } + + public enum DeviceMetricColor { + /** + * Color for representation - black. + */ + BLACK, + /** + * Color for representation - red. + */ + RED, + /** + * Color for representation - green. + */ + GREEN, + /** + * Color for representation - yellow. + */ + YELLOW, + /** + * Color for representation - blue. + */ + BLUE, + /** + * Color for representation - magenta. + */ + MAGENTA, + /** + * Color for representation - cyan. + */ + CYAN, + /** + * Color for representation - white. + */ + WHITE, + /** + * added to help the parsers + */ + NULL; + public static DeviceMetricColor fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("black".equals(codeString)) + return BLACK; + if ("red".equals(codeString)) + return RED; + if ("green".equals(codeString)) + return GREEN; + if ("yellow".equals(codeString)) + return YELLOW; + if ("blue".equals(codeString)) + return BLUE; + if ("magenta".equals(codeString)) + return MAGENTA; + if ("cyan".equals(codeString)) + return CYAN; + if ("white".equals(codeString)) + return WHITE; + throw new FHIRException("Unknown DeviceMetricColor code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BLACK: return "black"; + case RED: return "red"; + case GREEN: return "green"; + case YELLOW: return "yellow"; + case BLUE: return "blue"; + case MAGENTA: return "magenta"; + case CYAN: return "cyan"; + case WHITE: return "white"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case BLACK: return "http://hl7.org/fhir/metric-color"; + case RED: return "http://hl7.org/fhir/metric-color"; + case GREEN: return "http://hl7.org/fhir/metric-color"; + case YELLOW: return "http://hl7.org/fhir/metric-color"; + case BLUE: return "http://hl7.org/fhir/metric-color"; + case MAGENTA: return "http://hl7.org/fhir/metric-color"; + case CYAN: return "http://hl7.org/fhir/metric-color"; + case WHITE: return "http://hl7.org/fhir/metric-color"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case BLACK: return "Color for representation - black."; + case RED: return "Color for representation - red."; + case GREEN: return "Color for representation - green."; + case YELLOW: return "Color for representation - yellow."; + case BLUE: return "Color for representation - blue."; + case MAGENTA: return "Color for representation - magenta."; + case CYAN: return "Color for representation - cyan."; + case WHITE: return "Color for representation - white."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BLACK: return "Color Black"; + case RED: return "Color Red"; + case GREEN: return "Color Green"; + case YELLOW: return "Color Yellow"; + case BLUE: return "Color Blue"; + case MAGENTA: return "Color Magenta"; + case CYAN: return "Color Cyan"; + case WHITE: return "Color White"; + default: return "?"; + } + } + } + + public static class DeviceMetricColorEnumFactory implements EnumFactory { + public DeviceMetricColor fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("black".equals(codeString)) + return DeviceMetricColor.BLACK; + if ("red".equals(codeString)) + return DeviceMetricColor.RED; + if ("green".equals(codeString)) + return DeviceMetricColor.GREEN; + if ("yellow".equals(codeString)) + return DeviceMetricColor.YELLOW; + if ("blue".equals(codeString)) + return DeviceMetricColor.BLUE; + if ("magenta".equals(codeString)) + return DeviceMetricColor.MAGENTA; + if ("cyan".equals(codeString)) + return DeviceMetricColor.CYAN; + if ("white".equals(codeString)) + return DeviceMetricColor.WHITE; + throw new IllegalArgumentException("Unknown DeviceMetricColor code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("black".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.BLACK); + if ("red".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.RED); + if ("green".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.GREEN); + if ("yellow".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.YELLOW); + if ("blue".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.BLUE); + if ("magenta".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.MAGENTA); + if ("cyan".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.CYAN); + if ("white".equals(codeString)) + return new Enumeration(this, DeviceMetricColor.WHITE); + throw new FHIRException("Unknown DeviceMetricColor code '"+codeString+"'"); + } + public String toCode(DeviceMetricColor code) { + if (code == DeviceMetricColor.BLACK) + return "black"; + if (code == DeviceMetricColor.RED) + return "red"; + if (code == DeviceMetricColor.GREEN) + return "green"; + if (code == DeviceMetricColor.YELLOW) + return "yellow"; + if (code == DeviceMetricColor.BLUE) + return "blue"; + if (code == DeviceMetricColor.MAGENTA) + return "magenta"; + if (code == DeviceMetricColor.CYAN) + return "cyan"; + if (code == DeviceMetricColor.WHITE) + return "white"; + return "?"; + } + } + + public enum DeviceMetricCategory { + /** + * DeviceObservations generated for this DeviceMetric are measured. + */ + MEASUREMENT, + /** + * DeviceObservations generated for this DeviceMetric is a setting that will influence the behavior of the Device. + */ + SETTING, + /** + * DeviceObservations generated for this DeviceMetric are calculated. + */ + CALCULATION, + /** + * The category of this DeviceMetric is unspecified. + */ + UNSPECIFIED, + /** + * added to help the parsers + */ + NULL; + public static DeviceMetricCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("measurement".equals(codeString)) + return MEASUREMENT; + if ("setting".equals(codeString)) + return SETTING; + if ("calculation".equals(codeString)) + return CALCULATION; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEASUREMENT: return "measurement"; + case SETTING: return "setting"; + case CALCULATION: return "calculation"; + case UNSPECIFIED: return "unspecified"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MEASUREMENT: return "http://hl7.org/fhir/metric-category"; + case SETTING: return "http://hl7.org/fhir/metric-category"; + case CALCULATION: return "http://hl7.org/fhir/metric-category"; + case UNSPECIFIED: return "http://hl7.org/fhir/metric-category"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MEASUREMENT: return "DeviceObservations generated for this DeviceMetric are measured."; + case SETTING: return "DeviceObservations generated for this DeviceMetric is a setting that will influence the behavior of the Device."; + case CALCULATION: return "DeviceObservations generated for this DeviceMetric are calculated."; + case UNSPECIFIED: return "The category of this DeviceMetric is unspecified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEASUREMENT: return "Measurement"; + case SETTING: return "Setting"; + case CALCULATION: return "Calculation"; + case UNSPECIFIED: return "Unspecified"; + default: return "?"; + } + } + } + + public static class DeviceMetricCategoryEnumFactory implements EnumFactory { + public DeviceMetricCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("measurement".equals(codeString)) + return DeviceMetricCategory.MEASUREMENT; + if ("setting".equals(codeString)) + return DeviceMetricCategory.SETTING; + if ("calculation".equals(codeString)) + return DeviceMetricCategory.CALCULATION; + if ("unspecified".equals(codeString)) + return DeviceMetricCategory.UNSPECIFIED; + throw new IllegalArgumentException("Unknown DeviceMetricCategory code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("measurement".equals(codeString)) + return new Enumeration(this, DeviceMetricCategory.MEASUREMENT); + if ("setting".equals(codeString)) + return new Enumeration(this, DeviceMetricCategory.SETTING); + if ("calculation".equals(codeString)) + return new Enumeration(this, DeviceMetricCategory.CALCULATION); + if ("unspecified".equals(codeString)) + return new Enumeration(this, DeviceMetricCategory.UNSPECIFIED); + throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'"); + } + public String toCode(DeviceMetricCategory code) { + if (code == DeviceMetricCategory.MEASUREMENT) + return "measurement"; + if (code == DeviceMetricCategory.SETTING) + return "setting"; + if (code == DeviceMetricCategory.CALCULATION) + return "calculation"; + if (code == DeviceMetricCategory.UNSPECIFIED) + return "unspecified"; + return "?"; + } + } + + public enum DeviceMetricCalibrationType { + /** + * TODO + */ + UNSPECIFIED, + /** + * TODO + */ + OFFSET, + /** + * TODO + */ + GAIN, + /** + * TODO + */ + TWOPOINT, + /** + * added to help the parsers + */ + NULL; + public static DeviceMetricCalibrationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + if ("offset".equals(codeString)) + return OFFSET; + if ("gain".equals(codeString)) + return GAIN; + if ("two-point".equals(codeString)) + return TWOPOINT; + throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNSPECIFIED: return "unspecified"; + case OFFSET: return "offset"; + case GAIN: return "gain"; + case TWOPOINT: return "two-point"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case UNSPECIFIED: return "http://hl7.org/fhir/metric-calibration-type"; + case OFFSET: return "http://hl7.org/fhir/metric-calibration-type"; + case GAIN: return "http://hl7.org/fhir/metric-calibration-type"; + case TWOPOINT: return "http://hl7.org/fhir/metric-calibration-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case UNSPECIFIED: return "TODO"; + case OFFSET: return "TODO"; + case GAIN: return "TODO"; + case TWOPOINT: return "TODO"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNSPECIFIED: return "Unspecified"; + case OFFSET: return "Offset"; + case GAIN: return "Gain"; + case TWOPOINT: return "Two Point"; + default: return "?"; + } + } + } + + public static class DeviceMetricCalibrationTypeEnumFactory implements EnumFactory { + public DeviceMetricCalibrationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return DeviceMetricCalibrationType.UNSPECIFIED; + if ("offset".equals(codeString)) + return DeviceMetricCalibrationType.OFFSET; + if ("gain".equals(codeString)) + return DeviceMetricCalibrationType.GAIN; + if ("two-point".equals(codeString)) + return DeviceMetricCalibrationType.TWOPOINT; + throw new IllegalArgumentException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationType.UNSPECIFIED); + if ("offset".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationType.OFFSET); + if ("gain".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationType.GAIN); + if ("two-point".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationType.TWOPOINT); + throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); + } + public String toCode(DeviceMetricCalibrationType code) { + if (code == DeviceMetricCalibrationType.UNSPECIFIED) + return "unspecified"; + if (code == DeviceMetricCalibrationType.OFFSET) + return "offset"; + if (code == DeviceMetricCalibrationType.GAIN) + return "gain"; + if (code == DeviceMetricCalibrationType.TWOPOINT) + return "two-point"; + return "?"; + } + } + + public enum DeviceMetricCalibrationState { + /** + * The metric has not been calibrated. + */ + NOTCALIBRATED, + /** + * The metric needs to be calibrated. + */ + CALIBRATIONREQUIRED, + /** + * The metric has been calibrated. + */ + CALIBRATED, + /** + * The state of calibration of this metric is unspecified. + */ + UNSPECIFIED, + /** + * added to help the parsers + */ + NULL; + public static DeviceMetricCalibrationState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-calibrated".equals(codeString)) + return NOTCALIBRATED; + if ("calibration-required".equals(codeString)) + return CALIBRATIONREQUIRED; + if ("calibrated".equals(codeString)) + return CALIBRATED; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTCALIBRATED: return "not-calibrated"; + case CALIBRATIONREQUIRED: return "calibration-required"; + case CALIBRATED: return "calibrated"; + case UNSPECIFIED: return "unspecified"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NOTCALIBRATED: return "http://hl7.org/fhir/metric-calibration-state"; + case CALIBRATIONREQUIRED: return "http://hl7.org/fhir/metric-calibration-state"; + case CALIBRATED: return "http://hl7.org/fhir/metric-calibration-state"; + case UNSPECIFIED: return "http://hl7.org/fhir/metric-calibration-state"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NOTCALIBRATED: return "The metric has not been calibrated."; + case CALIBRATIONREQUIRED: return "The metric needs to be calibrated."; + case CALIBRATED: return "The metric has been calibrated."; + case UNSPECIFIED: return "The state of calibration of this metric is unspecified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTCALIBRATED: return "Not Calibrated"; + case CALIBRATIONREQUIRED: return "Calibration Required"; + case CALIBRATED: return "Calibrated"; + case UNSPECIFIED: return "Unspecified"; + default: return "?"; + } + } + } + + public static class DeviceMetricCalibrationStateEnumFactory implements EnumFactory { + public DeviceMetricCalibrationState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("not-calibrated".equals(codeString)) + return DeviceMetricCalibrationState.NOTCALIBRATED; + if ("calibration-required".equals(codeString)) + return DeviceMetricCalibrationState.CALIBRATIONREQUIRED; + if ("calibrated".equals(codeString)) + return DeviceMetricCalibrationState.CALIBRATED; + if ("unspecified".equals(codeString)) + return DeviceMetricCalibrationState.UNSPECIFIED; + throw new IllegalArgumentException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("not-calibrated".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationState.NOTCALIBRATED); + if ("calibration-required".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationState.CALIBRATIONREQUIRED); + if ("calibrated".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationState.CALIBRATED); + if ("unspecified".equals(codeString)) + return new Enumeration(this, DeviceMetricCalibrationState.UNSPECIFIED); + throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); + } + public String toCode(DeviceMetricCalibrationState code) { + if (code == DeviceMetricCalibrationState.NOTCALIBRATED) + return "not-calibrated"; + if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED) + return "calibration-required"; + if (code == DeviceMetricCalibrationState.CALIBRATED) + return "calibrated"; + if (code == DeviceMetricCalibrationState.UNSPECIFIED) + return "unspecified"; + return "?"; + } + } + + @Block() + public static class DeviceMetricCalibrationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes the type of the calibration method. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="unspecified | offset | gain | two-point", formalDefinition="Describes the type of the calibration method." ) + protected Enumeration type; + + /** + * Describes the state of the calibration. + */ + @Child(name = "state", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="not-calibrated | calibration-required | calibrated | unspecified", formalDefinition="Describes the state of the calibration." ) + protected Enumeration state; + + /** + * Describes the time last calibration has been performed. + */ + @Child(name = "time", type = {InstantType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Describes the time last calibration has been performed", formalDefinition="Describes the time last calibration has been performed." ) + protected InstantType time; + + private static final long serialVersionUID = 1163986578L; + + /* + * Constructor + */ + public DeviceMetricCalibrationComponent() { + super(); + } + + /** + * @return {@link #type} (Describes the type of the calibration method.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DeviceMetricCalibrationTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Describes the type of the calibration method.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public DeviceMetricCalibrationComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Describes the type of the calibration method. + */ + public DeviceMetricCalibrationType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Describes the type of the calibration method. + */ + public DeviceMetricCalibrationComponent setType(DeviceMetricCalibrationType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new DeviceMetricCalibrationTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #state} (Describes the state of the calibration.). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value + */ + public Enumeration getStateElement() { + if (this.state == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.state"); + else if (Configuration.doAutoCreate()) + this.state = new Enumeration(new DeviceMetricCalibrationStateEnumFactory()); // bb + return this.state; + } + + public boolean hasStateElement() { + return this.state != null && !this.state.isEmpty(); + } + + public boolean hasState() { + return this.state != null && !this.state.isEmpty(); + } + + /** + * @param value {@link #state} (Describes the state of the calibration.). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value + */ + public DeviceMetricCalibrationComponent setStateElement(Enumeration value) { + this.state = value; + return this; + } + + /** + * @return Describes the state of the calibration. + */ + public DeviceMetricCalibrationState getState() { + return this.state == null ? null : this.state.getValue(); + } + + /** + * @param value Describes the state of the calibration. + */ + public DeviceMetricCalibrationComponent setState(DeviceMetricCalibrationState value) { + if (value == null) + this.state = null; + else { + if (this.state == null) + this.state = new Enumeration(new DeviceMetricCalibrationStateEnumFactory()); + this.state.setValue(value); + } + return this; + } + + /** + * @return {@link #time} (Describes the time last calibration has been performed.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public InstantType getTimeElement() { + if (this.time == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.time"); + else if (Configuration.doAutoCreate()) + this.time = new InstantType(); // bb + return this.time; + } + + public boolean hasTimeElement() { + return this.time != null && !this.time.isEmpty(); + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (Describes the time last calibration has been performed.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public DeviceMetricCalibrationComponent setTimeElement(InstantType value) { + this.time = value; + return this; + } + + /** + * @return Describes the time last calibration has been performed. + */ + public Date getTime() { + return this.time == null ? null : this.time.getValue(); + } + + /** + * @param value Describes the time last calibration has been performed. + */ + public DeviceMetricCalibrationComponent setTime(Date value) { + if (value == null) + this.time = null; + else { + if (this.time == null) + this.time = new InstantType(); + this.time.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Describes the type of the calibration method.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("state", "code", "Describes the state of the calibration.", 0, java.lang.Integer.MAX_VALUE, state)); + childrenList.add(new Property("time", "instant", "Describes the time last calibration has been performed.", 0, java.lang.Integer.MAX_VALUE, time)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DeviceMetricCalibrationTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("state")) + this.state = new DeviceMetricCalibrationStateEnumFactory().fromType(value); // Enumeration + else if (name.equals("time")) + this.time = castToInstant(value); // InstantType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.type"); + } + else if (name.equals("state")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.state"); + } + else if (name.equals("time")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.time"); + } + else + return super.addChild(name); + } + + public DeviceMetricCalibrationComponent copy() { + DeviceMetricCalibrationComponent dst = new DeviceMetricCalibrationComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.state = state == null ? null : state.copy(); + dst.time = time == null ? null : time.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceMetricCalibrationComponent)) + return false; + DeviceMetricCalibrationComponent o = (DeviceMetricCalibrationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(state, o.state, true) && compareDeep(time, o.time, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceMetricCalibrationComponent)) + return false; + DeviceMetricCalibrationComponent o = (DeviceMetricCalibrationComponent) other; + return compareValues(type, o.type, true) && compareValues(state, o.state, true) && compareValues(time, o.time, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (state == null || state.isEmpty()) + && (time == null || time.isEmpty()); + } + + public String fhirType() { + return "DeviceMetric.calibration"; + + } + + } + + /** + * Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of metric", formalDefinition="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." ) + protected CodeableConcept type; + + /** + * Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier of this DeviceMetric", formalDefinition="Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device." ) + protected Identifier identifier; + + /** + * Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc. + */ + @Child(name = "unit", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unit of metric", formalDefinition="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." ) + protected CodeableConcept unit; + + /** + * Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc. + */ + @Child(name = "source", type = {Device.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Describes the link to the source Device", formalDefinition="Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.) + */ + protected Device sourceTarget; + + /** + * Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location. + */ + @Child(name = "parent", type = {DeviceComponent.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Describes the link to the parent DeviceComponent", formalDefinition="Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location." ) + protected Reference parent; + + /** + * The actual object that is the target of the reference (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) + */ + protected DeviceComponent parentTarget; + + /** + * Indicates current operational state of the device. For example: On, Off, Standby, etc. + */ + @Child(name = "operationalStatus", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="on | off | standby", formalDefinition="Indicates current operational state of the device. For example: On, Off, Standby, etc." ) + protected Enumeration operationalStatus; + + /** + * Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta. + */ + @Child(name = "color", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="black | red | green | yellow | blue | magenta | cyan | white", formalDefinition="Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta." ) + protected Enumeration color; + + /** + * Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation. + */ + @Child(name = "category", type = {CodeType.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="measurement | setting | calculation | unspecified", formalDefinition="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." ) + protected Enumeration category; + + /** + * Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured. + */ + @Child(name = "measurementPeriod", type = {Timing.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Describes the measurement repetition time", formalDefinition="Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured." ) + protected Timing measurementPeriod; + + /** + * Describes the calibrations that have been performed or that are required to be performed. + */ + @Child(name = "calibration", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Describes the calibrations that have been performed or that are required to be performed", formalDefinition="Describes the calibrations that have been performed or that are required to be performed." ) + protected List calibration; + + private static final long serialVersionUID = 1786401018L; + + /* + * Constructor + */ + public DeviceMetric() { + super(); + } + + /* + * Constructor + */ + public DeviceMetric(CodeableConcept type, Identifier identifier, Enumeration category) { + super(); + this.type = type; + this.identifier = identifier; + this.category = category; + } + + /** + * @return {@link #type} (Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.) + */ + public DeviceMetric setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) + */ + public DeviceMetric setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #unit} (Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.) + */ + public CodeableConcept getUnit() { + if (this.unit == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.unit"); + else if (Configuration.doAutoCreate()) + this.unit = new CodeableConcept(); // cc + return this.unit; + } + + public boolean hasUnit() { + return this.unit != null && !this.unit.isEmpty(); + } + + /** + * @param value {@link #unit} (Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.) + */ + public DeviceMetric setUnit(CodeableConcept value) { + this.unit = value; + return this; + } + + /** + * @return {@link #source} (Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.) + */ + public DeviceMetric setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.) + */ + public Device getSourceTarget() { + if (this.sourceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.source"); + else if (Configuration.doAutoCreate()) + this.sourceTarget = new Device(); // aa + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.) + */ + public DeviceMetric setSourceTarget(Device value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) + */ + public Reference getParent() { + if (this.parent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.parent"); + else if (Configuration.doAutoCreate()) + this.parent = new Reference(); // cc + return this.parent; + } + + public boolean hasParent() { + return this.parent != null && !this.parent.isEmpty(); + } + + /** + * @param value {@link #parent} (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) + */ + public DeviceMetric setParent(Reference value) { + this.parent = value; + return this; + } + + /** + * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) + */ + public DeviceComponent getParentTarget() { + if (this.parentTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.parent"); + else if (Configuration.doAutoCreate()) + this.parentTarget = new DeviceComponent(); // aa + return this.parentTarget; + } + + /** + * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.) + */ + public DeviceMetric setParentTarget(DeviceComponent value) { + this.parentTarget = value; + return this; + } + + /** + * @return {@link #operationalStatus} (Indicates current operational state of the device. For example: On, Off, Standby, etc.). This is the underlying object with id, value and extensions. The accessor "getOperationalStatus" gives direct access to the value + */ + public Enumeration getOperationalStatusElement() { + if (this.operationalStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.operationalStatus"); + else if (Configuration.doAutoCreate()) + this.operationalStatus = new Enumeration(new DeviceMetricOperationalStatusEnumFactory()); // bb + return this.operationalStatus; + } + + public boolean hasOperationalStatusElement() { + return this.operationalStatus != null && !this.operationalStatus.isEmpty(); + } + + public boolean hasOperationalStatus() { + return this.operationalStatus != null && !this.operationalStatus.isEmpty(); + } + + /** + * @param value {@link #operationalStatus} (Indicates current operational state of the device. For example: On, Off, Standby, etc.). This is the underlying object with id, value and extensions. The accessor "getOperationalStatus" gives direct access to the value + */ + public DeviceMetric setOperationalStatusElement(Enumeration value) { + this.operationalStatus = value; + return this; + } + + /** + * @return Indicates current operational state of the device. For example: On, Off, Standby, etc. + */ + public DeviceMetricOperationalStatus getOperationalStatus() { + return this.operationalStatus == null ? null : this.operationalStatus.getValue(); + } + + /** + * @param value Indicates current operational state of the device. For example: On, Off, Standby, etc. + */ + public DeviceMetric setOperationalStatus(DeviceMetricOperationalStatus value) { + if (value == null) + this.operationalStatus = null; + else { + if (this.operationalStatus == null) + this.operationalStatus = new Enumeration(new DeviceMetricOperationalStatusEnumFactory()); + this.operationalStatus.setValue(value); + } + return this; + } + + /** + * @return {@link #color} (Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value + */ + public Enumeration getColorElement() { + if (this.color == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.color"); + else if (Configuration.doAutoCreate()) + this.color = new Enumeration(new DeviceMetricColorEnumFactory()); // bb + return this.color; + } + + public boolean hasColorElement() { + return this.color != null && !this.color.isEmpty(); + } + + public boolean hasColor() { + return this.color != null && !this.color.isEmpty(); + } + + /** + * @param value {@link #color} (Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value + */ + public DeviceMetric setColorElement(Enumeration value) { + this.color = value; + return this; + } + + /** + * @return Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta. + */ + public DeviceMetricColor getColor() { + return this.color == null ? null : this.color.getValue(); + } + + /** + * @param value Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta. + */ + public DeviceMetric setColor(DeviceMetricColor value) { + if (value == null) + this.color = null; + else { + if (this.color == null) + this.color = new Enumeration(new DeviceMetricColorEnumFactory()); + this.color.setValue(value); + } + return this; + } + + /** + * @return {@link #category} (Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public Enumeration getCategoryElement() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.category"); + else if (Configuration.doAutoCreate()) + this.category = new Enumeration(new DeviceMetricCategoryEnumFactory()); // bb + return this.category; + } + + public boolean hasCategoryElement() { + return this.category != null && !this.category.isEmpty(); + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public DeviceMetric setCategoryElement(Enumeration value) { + this.category = value; + return this; + } + + /** + * @return Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation. + */ + public DeviceMetricCategory getCategory() { + return this.category == null ? null : this.category.getValue(); + } + + /** + * @param value Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation. + */ + public DeviceMetric setCategory(DeviceMetricCategory value) { + if (this.category == null) + this.category = new Enumeration(new DeviceMetricCategoryEnumFactory()); + this.category.setValue(value); + return this; + } + + /** + * @return {@link #measurementPeriod} (Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.) + */ + public Timing getMeasurementPeriod() { + if (this.measurementPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceMetric.measurementPeriod"); + else if (Configuration.doAutoCreate()) + this.measurementPeriod = new Timing(); // cc + return this.measurementPeriod; + } + + public boolean hasMeasurementPeriod() { + return this.measurementPeriod != null && !this.measurementPeriod.isEmpty(); + } + + /** + * @param value {@link #measurementPeriod} (Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.) + */ + public DeviceMetric setMeasurementPeriod(Timing value) { + this.measurementPeriod = value; + return this; + } + + /** + * @return {@link #calibration} (Describes the calibrations that have been performed or that are required to be performed.) + */ + public List getCalibration() { + if (this.calibration == null) + this.calibration = new ArrayList(); + return this.calibration; + } + + public boolean hasCalibration() { + if (this.calibration == null) + return false; + for (DeviceMetricCalibrationComponent item : this.calibration) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #calibration} (Describes the calibrations that have been performed or that are required to be performed.) + */ + // syntactic sugar + public DeviceMetricCalibrationComponent addCalibration() { //3 + DeviceMetricCalibrationComponent t = new DeviceMetricCalibrationComponent(); + if (this.calibration == null) + this.calibration = new ArrayList(); + this.calibration.add(t); + return t; + } + + // syntactic sugar + public DeviceMetric addCalibration(DeviceMetricCalibrationComponent t) { //3 + if (t == null) + return this; + if (this.calibration == null) + this.calibration = new ArrayList(); + this.calibration.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("identifier", "Identifier", "Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("unit", "CodeableConcept", "Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", 0, java.lang.Integer.MAX_VALUE, unit)); + childrenList.add(new Property("source", "Reference(Device)", "Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("parent", "Reference(DeviceComponent)", "Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.", 0, java.lang.Integer.MAX_VALUE, parent)); + childrenList.add(new Property("operationalStatus", "code", "Indicates current operational state of the device. For example: On, Off, Standby, etc.", 0, java.lang.Integer.MAX_VALUE, operationalStatus)); + childrenList.add(new Property("color", "code", "Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.", 0, java.lang.Integer.MAX_VALUE, color)); + childrenList.add(new Property("category", "code", "Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("measurementPeriod", "Timing", "Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.", 0, java.lang.Integer.MAX_VALUE, measurementPeriod)); + childrenList.add(new Property("calibration", "", "Describes the calibrations that have been performed or that are required to be performed.", 0, java.lang.Integer.MAX_VALUE, calibration)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("unit")) + this.unit = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("parent")) + this.parent = castToReference(value); // Reference + else if (name.equals("operationalStatus")) + this.operationalStatus = new DeviceMetricOperationalStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("color")) + this.color = new DeviceMetricColorEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = new DeviceMetricCategoryEnumFactory().fromType(value); // Enumeration + else if (name.equals("measurementPeriod")) + this.measurementPeriod = castToTiming(value); // Timing + else if (name.equals("calibration")) + this.getCalibration().add((DeviceMetricCalibrationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("unit")) { + this.unit = new CodeableConcept(); + return this.unit; + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("parent")) { + this.parent = new Reference(); + return this.parent; + } + else if (name.equals("operationalStatus")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.operationalStatus"); + } + else if (name.equals("color")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.color"); + } + else if (name.equals("category")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.category"); + } + else if (name.equals("measurementPeriod")) { + this.measurementPeriod = new Timing(); + return this.measurementPeriod; + } + else if (name.equals("calibration")) { + return addCalibration(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DeviceMetric"; + + } + + public DeviceMetric copy() { + DeviceMetric dst = new DeviceMetric(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.source = source == null ? null : source.copy(); + dst.parent = parent == null ? null : parent.copy(); + dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy(); + dst.color = color == null ? null : color.copy(); + dst.category = category == null ? null : category.copy(); + dst.measurementPeriod = measurementPeriod == null ? null : measurementPeriod.copy(); + if (calibration != null) { + dst.calibration = new ArrayList(); + for (DeviceMetricCalibrationComponent i : calibration) + dst.calibration.add(i.copy()); + }; + return dst; + } + + protected DeviceMetric typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceMetric)) + return false; + DeviceMetric o = (DeviceMetric) other; + return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(unit, o.unit, true) + && compareDeep(source, o.source, true) && compareDeep(parent, o.parent, true) && compareDeep(operationalStatus, o.operationalStatus, true) + && compareDeep(color, o.color, true) && compareDeep(category, o.category, true) && compareDeep(measurementPeriod, o.measurementPeriod, true) + && compareDeep(calibration, o.calibration, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceMetric)) + return false; + DeviceMetric o = (DeviceMetric) other; + return compareValues(operationalStatus, o.operationalStatus, true) && compareValues(color, o.color, true) + && compareValues(category, o.category, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (unit == null || unit.isEmpty()) && (source == null || source.isEmpty()) && (parent == null || parent.isEmpty()) + && (operationalStatus == null || operationalStatus.isEmpty()) && (color == null || color.isEmpty()) + && (category == null || category.isEmpty()) && (measurementPeriod == null || measurementPeriod.isEmpty()) + && (calibration == null || calibration.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DeviceMetric; + } + + @SearchParamDefinition(name="parent", path="DeviceMetric.parent", description="The parent DeviceMetric resource", type="reference" ) + public static final String SP_PARENT = "parent"; + @SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" ) + public static final String SP_CATEGORY = "category"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseRequest.java new file mode 100644 index 00000000000..96cdb52f7f2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseRequest.java @@ -0,0 +1,1309 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ +@ResourceDef(name="DeviceUseRequest", profile="http://hl7.org/fhir/Profile/DeviceUseRequest") +public class DeviceUseRequest extends DomainResource { + + public enum DeviceUseRequestStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The receiving system has received the request but not yet decided whether it will be performed. + */ + RECEIVED, + /** + * The receiving system has accepted the request but work has not yet commenced. + */ + ACCEPTED, + /** + * The work to fulfill the order is happening. + */ + INPROGRESS, + /** + * The work has been complete, the report(s) released, and no further work is planned. + */ + COMPLETED, + /** + * The request has been held by originating system/user request. + */ + SUSPENDED, + /** + * The receiving system has declined to fulfill the request. + */ + REJECTED, + /** + * The request was attempted, but due to some procedural error, it could not be completed. + */ + ABORTED, + /** + * added to help the parsers + */ + NULL; + public static DeviceUseRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("aborted".equals(codeString)) + return ABORTED; + throw new FHIRException("Unknown DeviceUseRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case SUSPENDED: return "suspended"; + case REJECTED: return "rejected"; + case ABORTED: return "aborted"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/device-use-request-status"; + case PLANNED: return "http://hl7.org/fhir/device-use-request-status"; + case REQUESTED: return "http://hl7.org/fhir/device-use-request-status"; + case RECEIVED: return "http://hl7.org/fhir/device-use-request-status"; + case ACCEPTED: return "http://hl7.org/fhir/device-use-request-status"; + case INPROGRESS: return "http://hl7.org/fhir/device-use-request-status"; + case COMPLETED: return "http://hl7.org/fhir/device-use-request-status"; + case SUSPENDED: return "http://hl7.org/fhir/device-use-request-status"; + case REJECTED: return "http://hl7.org/fhir/device-use-request-status"; + case ABORTED: return "http://hl7.org/fhir/device-use-request-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case RECEIVED: return "The receiving system has received the request but not yet decided whether it will be performed."; + case ACCEPTED: return "The receiving system has accepted the request but work has not yet commenced."; + case INPROGRESS: return "The work to fulfill the order is happening."; + case COMPLETED: return "The work has been complete, the report(s) released, and no further work is planned."; + case SUSPENDED: return "The request has been held by originating system/user request."; + case REJECTED: return "The receiving system has declined to fulfill the request."; + case ABORTED: return "The request was attempted, but due to some procedural error, it could not be completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PLANNED: return "Planned"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case SUSPENDED: return "Suspended"; + case REJECTED: return "Rejected"; + case ABORTED: return "Aborted"; + default: return "?"; + } + } + } + + public static class DeviceUseRequestStatusEnumFactory implements EnumFactory { + public DeviceUseRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return DeviceUseRequestStatus.PROPOSED; + if ("planned".equals(codeString)) + return DeviceUseRequestStatus.PLANNED; + if ("requested".equals(codeString)) + return DeviceUseRequestStatus.REQUESTED; + if ("received".equals(codeString)) + return DeviceUseRequestStatus.RECEIVED; + if ("accepted".equals(codeString)) + return DeviceUseRequestStatus.ACCEPTED; + if ("in-progress".equals(codeString)) + return DeviceUseRequestStatus.INPROGRESS; + if ("completed".equals(codeString)) + return DeviceUseRequestStatus.COMPLETED; + if ("suspended".equals(codeString)) + return DeviceUseRequestStatus.SUSPENDED; + if ("rejected".equals(codeString)) + return DeviceUseRequestStatus.REJECTED; + if ("aborted".equals(codeString)) + return DeviceUseRequestStatus.ABORTED; + throw new IllegalArgumentException("Unknown DeviceUseRequestStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.PROPOSED); + if ("planned".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.PLANNED); + if ("requested".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.RECEIVED); + if ("accepted".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.ACCEPTED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.COMPLETED); + if ("suspended".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.SUSPENDED); + if ("rejected".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.REJECTED); + if ("aborted".equals(codeString)) + return new Enumeration(this, DeviceUseRequestStatus.ABORTED); + throw new FHIRException("Unknown DeviceUseRequestStatus code '"+codeString+"'"); + } + public String toCode(DeviceUseRequestStatus code) { + if (code == DeviceUseRequestStatus.PROPOSED) + return "proposed"; + if (code == DeviceUseRequestStatus.PLANNED) + return "planned"; + if (code == DeviceUseRequestStatus.REQUESTED) + return "requested"; + if (code == DeviceUseRequestStatus.RECEIVED) + return "received"; + if (code == DeviceUseRequestStatus.ACCEPTED) + return "accepted"; + if (code == DeviceUseRequestStatus.INPROGRESS) + return "in-progress"; + if (code == DeviceUseRequestStatus.COMPLETED) + return "completed"; + if (code == DeviceUseRequestStatus.SUSPENDED) + return "suspended"; + if (code == DeviceUseRequestStatus.REJECTED) + return "rejected"; + if (code == DeviceUseRequestStatus.ABORTED) + return "aborted"; + return "?"; + } + } + + public enum DeviceUseRequestPriority { + /** + * The request has a normal priority. + */ + ROUTINE, + /** + * The request should be done urgently. + */ + URGENT, + /** + * The request is time-critical. + */ + STAT, + /** + * The request should be acted on as soon as possible. + */ + ASAP, + /** + * added to help the parsers + */ + NULL; + public static DeviceUseRequestPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("stat".equals(codeString)) + return STAT; + if ("asap".equals(codeString)) + return ASAP; + throw new FHIRException("Unknown DeviceUseRequestPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case STAT: return "stat"; + case ASAP: return "asap"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ROUTINE: return "http://hl7.org/fhir/device-use-request-priority"; + case URGENT: return "http://hl7.org/fhir/device-use-request-priority"; + case STAT: return "http://hl7.org/fhir/device-use-request-priority"; + case ASAP: return "http://hl7.org/fhir/device-use-request-priority"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The request has a normal priority."; + case URGENT: return "The request should be done urgently."; + case STAT: return "The request is time-critical."; + case ASAP: return "The request should be acted on as soon as possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case STAT: return "Stat"; + case ASAP: return "ASAP"; + default: return "?"; + } + } + } + + public static class DeviceUseRequestPriorityEnumFactory implements EnumFactory { + public DeviceUseRequestPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return DeviceUseRequestPriority.ROUTINE; + if ("urgent".equals(codeString)) + return DeviceUseRequestPriority.URGENT; + if ("stat".equals(codeString)) + return DeviceUseRequestPriority.STAT; + if ("asap".equals(codeString)) + return DeviceUseRequestPriority.ASAP; + throw new IllegalArgumentException("Unknown DeviceUseRequestPriority code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return new Enumeration(this, DeviceUseRequestPriority.ROUTINE); + if ("urgent".equals(codeString)) + return new Enumeration(this, DeviceUseRequestPriority.URGENT); + if ("stat".equals(codeString)) + return new Enumeration(this, DeviceUseRequestPriority.STAT); + if ("asap".equals(codeString)) + return new Enumeration(this, DeviceUseRequestPriority.ASAP); + throw new FHIRException("Unknown DeviceUseRequestPriority code '"+codeString+"'"); + } + public String toCode(DeviceUseRequestPriority code) { + if (code == DeviceUseRequestPriority.ROUTINE) + return "routine"; + if (code == DeviceUseRequestPriority.URGENT) + return "urgent"; + if (code == DeviceUseRequestPriority.STAT) + return "stat"; + if (code == DeviceUseRequestPriority.ASAP) + return "asap"; + return "?"; + } + } + + /** + * Indicates the site on the subject's body where the device should be used ( i.e. the target site). + */ + @Child(name = "bodySite", type = {CodeableConcept.class, BodySite.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Target body site", formalDefinition="Indicates the site on the subject's body where the device should be used ( i.e. the target site)." ) + protected Type bodySite; + + /** + * The status of the request. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the request." ) + protected Enumeration status; + + /** + * The details of the device to be used. + */ + @Child(name = "device", type = {Device.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Device requested", formalDefinition="The details of the device to be used." ) + protected Reference device; + + /** + * The actual object that is the target of the reference (The details of the device to be used.) + */ + protected Device deviceTarget; + + /** + * An encounter that provides additional context in which this request is made. + */ + @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter motivating request", formalDefinition="An encounter that provides additional context in which this request is made." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (An encounter that provides additional context in which this request is made.) + */ + protected Encounter encounterTarget; + + /** + * Identifiers assigned to this order by the orderer or by the receiver. + */ + @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Request identifier", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) + protected List identifier; + + /** + * Reason or justification for the use of this device. + */ + @Child(name = "indication", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason for request", formalDefinition="Reason or justification for the use of this device." ) + protected List indication; + + /** + * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. + */ + @Child(name = "notes", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Notes or comments", formalDefinition="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) + protected List notes; + + /** + * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%. + */ + @Child(name = "prnReason", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="PRN", formalDefinition="The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%." ) + protected List prnReason; + + /** + * The time when the request was made. + */ + @Child(name = "orderedOn", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When ordered", formalDefinition="The time when the request was made." ) + protected DateTimeType orderedOn; + + /** + * The time at which the request was made/recorded. + */ + @Child(name = "recordedOn", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When recorded", formalDefinition="The time at which the request was made/recorded." ) + protected DateTimeType recordedOn; + + /** + * The patient who will use the device. + */ + @Child(name = "subject", type = {Patient.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Focus of request", formalDefinition="The patient who will use the device." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient who will use the device.) + */ + protected Patient subjectTarget; + + /** + * The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". + */ + @Child(name = "timing", type = {Timing.class, Period.class, DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Schedule for use", formalDefinition="The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"." ) + protected Type timing; + + /** + * Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. + */ + @Child(name = "priority", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine." ) + protected Enumeration priority; + + private static final long serialVersionUID = 1208477058L; + + /* + * Constructor + */ + public DeviceUseRequest() { + super(); + } + + /* + * Constructor + */ + public DeviceUseRequest(Reference device, Reference subject) { + super(); + this.device = device; + this.subject = subject; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device should be used ( i.e. the target site).) + */ + public Type getBodySite() { + return this.bodySite; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device should be used ( i.e. the target site).) + */ + public CodeableConcept getBodySiteCodeableConcept() throws FHIRException { + if (!(this.bodySite instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.bodySite.getClass().getName()+" was encountered"); + return (CodeableConcept) this.bodySite; + } + + public boolean hasBodySiteCodeableConcept() { + return this.bodySite instanceof CodeableConcept; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device should be used ( i.e. the target site).) + */ + public Reference getBodySiteReference() throws FHIRException { + if (!(this.bodySite instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.bodySite.getClass().getName()+" was encountered"); + return (Reference) this.bodySite; + } + + public boolean hasBodySiteReference() { + return this.bodySite instanceof Reference; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Indicates the site on the subject's body where the device should be used ( i.e. the target site).) + */ + public DeviceUseRequest setBodySite(Type value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #status} (The status of the request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DeviceUseRequestStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DeviceUseRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the request. + */ + public DeviceUseRequestStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the request. + */ + public DeviceUseRequest setStatus(DeviceUseRequestStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new DeviceUseRequestStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #device} (The details of the device to be used.) + */ + public Reference getDevice() { + if (this.device == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.device"); + else if (Configuration.doAutoCreate()) + this.device = new Reference(); // cc + return this.device; + } + + public boolean hasDevice() { + return this.device != null && !this.device.isEmpty(); + } + + /** + * @param value {@link #device} (The details of the device to be used.) + */ + public DeviceUseRequest setDevice(Reference value) { + this.device = value; + return this; + } + + /** + * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The details of the device to be used.) + */ + public Device getDeviceTarget() { + if (this.deviceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.device"); + else if (Configuration.doAutoCreate()) + this.deviceTarget = new Device(); // aa + return this.deviceTarget; + } + + /** + * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The details of the device to be used.) + */ + public DeviceUseRequest setDeviceTarget(Device value) { + this.deviceTarget = value; + return this; + } + + /** + * @return {@link #encounter} (An encounter that provides additional context in which this request is made.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (An encounter that provides additional context in which this request is made.) + */ + public DeviceUseRequest setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An encounter that provides additional context in which this request is made.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An encounter that provides additional context in which this request is made.) + */ + public DeviceUseRequest setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the orderer or by the receiver.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the orderer or by the receiver.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DeviceUseRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #indication} (Reason or justification for the use of this device.) + */ + public List getIndication() { + if (this.indication == null) + this.indication = new ArrayList(); + return this.indication; + } + + public boolean hasIndication() { + if (this.indication == null) + return false; + for (CodeableConcept item : this.indication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #indication} (Reason or justification for the use of this device.) + */ + // syntactic sugar + public CodeableConcept addIndication() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return t; + } + + // syntactic sugar + public DeviceUseRequest addIndication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return this; + } + + /** + * @return {@link #notes} (Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public List getNotes() { + if (this.notes == null) + this.notes = new ArrayList(); + return this.notes; + } + + public boolean hasNotes() { + if (this.notes == null) + return false; + for (StringType item : this.notes) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notes} (Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + // syntactic sugar + public StringType addNotesElement() {//2 + StringType t = new StringType(); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return t; + } + + /** + * @param value {@link #notes} (Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public DeviceUseRequest addNotes(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return this; + } + + /** + * @param value {@link #notes} (Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public boolean hasNotes(String value) { + if (this.notes == null) + return false; + for (StringType v : this.notes) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #prnReason} (The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.) + */ + public List getPrnReason() { + if (this.prnReason == null) + this.prnReason = new ArrayList(); + return this.prnReason; + } + + public boolean hasPrnReason() { + if (this.prnReason == null) + return false; + for (CodeableConcept item : this.prnReason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #prnReason} (The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.) + */ + // syntactic sugar + public CodeableConcept addPrnReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.prnReason == null) + this.prnReason = new ArrayList(); + this.prnReason.add(t); + return t; + } + + // syntactic sugar + public DeviceUseRequest addPrnReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.prnReason == null) + this.prnReason = new ArrayList(); + this.prnReason.add(t); + return this; + } + + /** + * @return {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value + */ + public DateTimeType getOrderedOnElement() { + if (this.orderedOn == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.orderedOn"); + else if (Configuration.doAutoCreate()) + this.orderedOn = new DateTimeType(); // bb + return this.orderedOn; + } + + public boolean hasOrderedOnElement() { + return this.orderedOn != null && !this.orderedOn.isEmpty(); + } + + public boolean hasOrderedOn() { + return this.orderedOn != null && !this.orderedOn.isEmpty(); + } + + /** + * @param value {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value + */ + public DeviceUseRequest setOrderedOnElement(DateTimeType value) { + this.orderedOn = value; + return this; + } + + /** + * @return The time when the request was made. + */ + public Date getOrderedOn() { + return this.orderedOn == null ? null : this.orderedOn.getValue(); + } + + /** + * @param value The time when the request was made. + */ + public DeviceUseRequest setOrderedOn(Date value) { + if (value == null) + this.orderedOn = null; + else { + if (this.orderedOn == null) + this.orderedOn = new DateTimeType(); + this.orderedOn.setValue(value); + } + return this; + } + + /** + * @return {@link #recordedOn} (The time at which the request was made/recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedOn" gives direct access to the value + */ + public DateTimeType getRecordedOnElement() { + if (this.recordedOn == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.recordedOn"); + else if (Configuration.doAutoCreate()) + this.recordedOn = new DateTimeType(); // bb + return this.recordedOn; + } + + public boolean hasRecordedOnElement() { + return this.recordedOn != null && !this.recordedOn.isEmpty(); + } + + public boolean hasRecordedOn() { + return this.recordedOn != null && !this.recordedOn.isEmpty(); + } + + /** + * @param value {@link #recordedOn} (The time at which the request was made/recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedOn" gives direct access to the value + */ + public DeviceUseRequest setRecordedOnElement(DateTimeType value) { + this.recordedOn = value; + return this; + } + + /** + * @return The time at which the request was made/recorded. + */ + public Date getRecordedOn() { + return this.recordedOn == null ? null : this.recordedOn.getValue(); + } + + /** + * @param value The time at which the request was made/recorded. + */ + public DeviceUseRequest setRecordedOn(Date value) { + if (value == null) + this.recordedOn = null; + else { + if (this.recordedOn == null) + this.recordedOn = new DateTimeType(); + this.recordedOn.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (The patient who will use the device.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient who will use the device.) + */ + public DeviceUseRequest setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who will use the device.) + */ + public Patient getSubjectTarget() { + if (this.subjectTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subjectTarget = new Patient(); // aa + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who will use the device.) + */ + public DeviceUseRequest setSubjectTarget(Patient value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #timing} (The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Type getTiming() { + return this.timing; + } + + /** + * @return {@link #timing} (The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Timing getTimingTiming() throws FHIRException { + if (!(this.timing instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Timing) this.timing; + } + + public boolean hasTimingTiming() { + return this.timing instanceof Timing; + } + + /** + * @return {@link #timing} (The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Period getTimingPeriod() throws FHIRException { + if (!(this.timing instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Period) this.timing; + } + + public boolean hasTimingPeriod() { + return this.timing instanceof Period; + } + + /** + * @return {@link #timing} (The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public DateTimeType getTimingDateTimeType() throws FHIRException { + if (!(this.timing instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (DateTimeType) this.timing; + } + + public boolean hasTimingDateTimeType() { + return this.timing instanceof DateTimeType; + } + + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); + } + + /** + * @param value {@link #timing} (The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public DeviceUseRequest setTiming(Type value) { + this.timing = value; + return this; + } + + /** + * @return {@link #priority} (Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseRequest.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Enumeration(new DeviceUseRequestPriorityEnumFactory()); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public DeviceUseRequest setPriorityElement(Enumeration value) { + this.priority = value; + return this; + } + + /** + * @return Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. + */ + public DeviceUseRequestPriority getPriority() { + return this.priority == null ? null : this.priority.getValue(); + } + + /** + * @param value Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. + */ + public DeviceUseRequest setPriority(DeviceUseRequestPriority value) { + if (value == null) + this.priority = null; + else { + if (this.priority == null) + this.priority = new Enumeration(new DeviceUseRequestPriorityEnumFactory()); + this.priority.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("bodySite[x]", "CodeableConcept|Reference(BodySite)", "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("status", "code", "The status of the request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("device", "Reference(Device)", "The details of the device to be used.", 0, java.lang.Integer.MAX_VALUE, device)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the orderer or by the receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("indication", "CodeableConcept", "Reason or justification for the use of this device.", 0, java.lang.Integer.MAX_VALUE, indication)); + childrenList.add(new Property("notes", "string", "Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("prnReason", "CodeableConcept", "The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.", 0, java.lang.Integer.MAX_VALUE, prnReason)); + childrenList.add(new Property("orderedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, orderedOn)); + childrenList.add(new Property("recordedOn", "dateTime", "The time at which the request was made/recorded.", 0, java.lang.Integer.MAX_VALUE, recordedOn)); + childrenList.add(new Property("subject", "Reference(Patient)", "The patient who will use the device.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("timing[x]", "Timing|Period|dateTime", "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".", 0, java.lang.Integer.MAX_VALUE, timing)); + childrenList.add(new Property("priority", "code", "Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("bodySite[x]")) + this.bodySite = (Type) value; // Type + else if (name.equals("status")) + this.status = new DeviceUseRequestStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("device")) + this.device = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("indication")) + this.getIndication().add(castToCodeableConcept(value)); + else if (name.equals("notes")) + this.getNotes().add(castToString(value)); + else if (name.equals("prnReason")) + this.getPrnReason().add(castToCodeableConcept(value)); + else if (name.equals("orderedOn")) + this.orderedOn = castToDateTime(value); // DateTimeType + else if (name.equals("recordedOn")) + this.recordedOn = castToDateTime(value); // DateTimeType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("timing[x]")) + this.timing = (Type) value; // Type + else if (name.equals("priority")) + this.priority = new DeviceUseRequestPriorityEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("bodySiteCodeableConcept")) { + this.bodySite = new CodeableConcept(); + return this.bodySite; + } + else if (name.equals("bodySiteReference")) { + this.bodySite = new Reference(); + return this.bodySite; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.status"); + } + else if (name.equals("device")) { + this.device = new Reference(); + return this.device; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("indication")) { + return addIndication(); + } + else if (name.equals("notes")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.notes"); + } + else if (name.equals("prnReason")) { + return addPrnReason(); + } + else if (name.equals("orderedOn")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.orderedOn"); + } + else if (name.equals("recordedOn")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.recordedOn"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("timingTiming")) { + this.timing = new Timing(); + return this.timing; + } + else if (name.equals("timingPeriod")) { + this.timing = new Period(); + return this.timing; + } + else if (name.equals("timingDateTime")) { + this.timing = new DateTimeType(); + return this.timing; + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.priority"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DeviceUseRequest"; + + } + + public DeviceUseRequest copy() { + DeviceUseRequest dst = new DeviceUseRequest(); + copyValues(dst); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + dst.status = status == null ? null : status.copy(); + dst.device = device == null ? null : device.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (indication != null) { + dst.indication = new ArrayList(); + for (CodeableConcept i : indication) + dst.indication.add(i.copy()); + }; + if (notes != null) { + dst.notes = new ArrayList(); + for (StringType i : notes) + dst.notes.add(i.copy()); + }; + if (prnReason != null) { + dst.prnReason = new ArrayList(); + for (CodeableConcept i : prnReason) + dst.prnReason.add(i.copy()); + }; + dst.orderedOn = orderedOn == null ? null : orderedOn.copy(); + dst.recordedOn = recordedOn == null ? null : recordedOn.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.timing = timing == null ? null : timing.copy(); + dst.priority = priority == null ? null : priority.copy(); + return dst; + } + + protected DeviceUseRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceUseRequest)) + return false; + DeviceUseRequest o = (DeviceUseRequest) other; + return compareDeep(bodySite, o.bodySite, true) && compareDeep(status, o.status, true) && compareDeep(device, o.device, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(identifier, o.identifier, true) && compareDeep(indication, o.indication, true) + && compareDeep(notes, o.notes, true) && compareDeep(prnReason, o.prnReason, true) && compareDeep(orderedOn, o.orderedOn, true) + && compareDeep(recordedOn, o.recordedOn, true) && compareDeep(subject, o.subject, true) && compareDeep(timing, o.timing, true) + && compareDeep(priority, o.priority, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceUseRequest)) + return false; + DeviceUseRequest o = (DeviceUseRequest) other; + return compareValues(status, o.status, true) && compareValues(notes, o.notes, true) && compareValues(orderedOn, o.orderedOn, true) + && compareValues(recordedOn, o.recordedOn, true) && compareValues(priority, o.priority, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) + && (device == null || device.isEmpty()) && (encounter == null || encounter.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (indication == null || indication.isEmpty()) && (notes == null || notes.isEmpty()) && (prnReason == null || prnReason.isEmpty()) + && (orderedOn == null || orderedOn.isEmpty()) && (recordedOn == null || recordedOn.isEmpty()) + && (subject == null || subject.isEmpty()) && (timing == null || timing.isEmpty()) && (priority == null || priority.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DeviceUseRequest; + } + + @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="Device requested", type="reference" ) + public static final String SP_DEVICE = "device"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseStatement.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseStatement.java new file mode 100644 index 00000000000..7cde14e47bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DeviceUseStatement.java @@ -0,0 +1,705 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ +@ResourceDef(name="DeviceUseStatement", profile="http://hl7.org/fhir/Profile/DeviceUseStatement") +public class DeviceUseStatement extends DomainResource { + + /** + * Indicates the site on the subject's body where the device was used ( i.e. the target site). + */ + @Child(name = "bodySite", type = {CodeableConcept.class, BodySite.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Target body site", formalDefinition="Indicates the site on the subject's body where the device was used ( i.e. the target site)." ) + protected Type bodySite; + + /** + * The time period over which the device was used. + */ + @Child(name = "whenUsed", type = {Period.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The time period over which the device was used." ) + protected Period whenUsed; + + /** + * The details of the device used. + */ + @Child(name = "device", type = {Device.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The details of the device used." ) + protected Reference device; + + /** + * The actual object that is the target of the reference (The details of the device used.) + */ + protected Device deviceTarget; + + /** + * An external identifier for this statement such as an IRI. + */ + @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="An external identifier for this statement such as an IRI." ) + protected List identifier; + + /** + * Reason or justification for the use of the device. + */ + @Child(name = "indication", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Reason or justification for the use of the device." ) + protected List indication; + + /** + * Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. + */ + @Child(name = "notes", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." ) + protected List notes; + + /** + * The time at which the statement was made/recorded. + */ + @Child(name = "recordedOn", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The time at which the statement was made/recorded." ) + protected DateTimeType recordedOn; + + /** + * The patient who used the device. + */ + @Child(name = "subject", type = {Patient.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The patient who used the device." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient who used the device.) + */ + protected Patient subjectTarget; + + /** + * How often the device was used. + */ + @Child(name = "timing", type = {Timing.class, Period.class, DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="How often the device was used." ) + protected Type timing; + + private static final long serialVersionUID = -1668571635L; + + /* + * Constructor + */ + public DeviceUseStatement() { + super(); + } + + /* + * Constructor + */ + public DeviceUseStatement(Reference device, Reference subject) { + super(); + this.device = device; + this.subject = subject; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device was used ( i.e. the target site).) + */ + public Type getBodySite() { + return this.bodySite; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device was used ( i.e. the target site).) + */ + public CodeableConcept getBodySiteCodeableConcept() throws FHIRException { + if (!(this.bodySite instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.bodySite.getClass().getName()+" was encountered"); + return (CodeableConcept) this.bodySite; + } + + public boolean hasBodySiteCodeableConcept() { + return this.bodySite instanceof CodeableConcept; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the device was used ( i.e. the target site).) + */ + public Reference getBodySiteReference() throws FHIRException { + if (!(this.bodySite instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.bodySite.getClass().getName()+" was encountered"); + return (Reference) this.bodySite; + } + + public boolean hasBodySiteReference() { + return this.bodySite instanceof Reference; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Indicates the site on the subject's body where the device was used ( i.e. the target site).) + */ + public DeviceUseStatement setBodySite(Type value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #whenUsed} (The time period over which the device was used.) + */ + public Period getWhenUsed() { + if (this.whenUsed == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.whenUsed"); + else if (Configuration.doAutoCreate()) + this.whenUsed = new Period(); // cc + return this.whenUsed; + } + + public boolean hasWhenUsed() { + return this.whenUsed != null && !this.whenUsed.isEmpty(); + } + + /** + * @param value {@link #whenUsed} (The time period over which the device was used.) + */ + public DeviceUseStatement setWhenUsed(Period value) { + this.whenUsed = value; + return this; + } + + /** + * @return {@link #device} (The details of the device used.) + */ + public Reference getDevice() { + if (this.device == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.device"); + else if (Configuration.doAutoCreate()) + this.device = new Reference(); // cc + return this.device; + } + + public boolean hasDevice() { + return this.device != null && !this.device.isEmpty(); + } + + /** + * @param value {@link #device} (The details of the device used.) + */ + public DeviceUseStatement setDevice(Reference value) { + this.device = value; + return this; + } + + /** + * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The details of the device used.) + */ + public Device getDeviceTarget() { + if (this.deviceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.device"); + else if (Configuration.doAutoCreate()) + this.deviceTarget = new Device(); // aa + return this.deviceTarget; + } + + /** + * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The details of the device used.) + */ + public DeviceUseStatement setDeviceTarget(Device value) { + this.deviceTarget = value; + return this; + } + + /** + * @return {@link #identifier} (An external identifier for this statement such as an IRI.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (An external identifier for this statement such as an IRI.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DeviceUseStatement addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #indication} (Reason or justification for the use of the device.) + */ + public List getIndication() { + if (this.indication == null) + this.indication = new ArrayList(); + return this.indication; + } + + public boolean hasIndication() { + if (this.indication == null) + return false; + for (CodeableConcept item : this.indication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #indication} (Reason or justification for the use of the device.) + */ + // syntactic sugar + public CodeableConcept addIndication() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return t; + } + + // syntactic sugar + public DeviceUseStatement addIndication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return this; + } + + /** + * @return {@link #notes} (Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public List getNotes() { + if (this.notes == null) + this.notes = new ArrayList(); + return this.notes; + } + + public boolean hasNotes() { + if (this.notes == null) + return false; + for (StringType item : this.notes) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notes} (Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + // syntactic sugar + public StringType addNotesElement() {//2 + StringType t = new StringType(); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return t; + } + + /** + * @param value {@link #notes} (Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public DeviceUseStatement addNotes(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return this; + } + + /** + * @param value {@link #notes} (Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.) + */ + public boolean hasNotes(String value) { + if (this.notes == null) + return false; + for (StringType v : this.notes) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #recordedOn} (The time at which the statement was made/recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedOn" gives direct access to the value + */ + public DateTimeType getRecordedOnElement() { + if (this.recordedOn == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.recordedOn"); + else if (Configuration.doAutoCreate()) + this.recordedOn = new DateTimeType(); // bb + return this.recordedOn; + } + + public boolean hasRecordedOnElement() { + return this.recordedOn != null && !this.recordedOn.isEmpty(); + } + + public boolean hasRecordedOn() { + return this.recordedOn != null && !this.recordedOn.isEmpty(); + } + + /** + * @param value {@link #recordedOn} (The time at which the statement was made/recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedOn" gives direct access to the value + */ + public DeviceUseStatement setRecordedOnElement(DateTimeType value) { + this.recordedOn = value; + return this; + } + + /** + * @return The time at which the statement was made/recorded. + */ + public Date getRecordedOn() { + return this.recordedOn == null ? null : this.recordedOn.getValue(); + } + + /** + * @param value The time at which the statement was made/recorded. + */ + public DeviceUseStatement setRecordedOn(Date value) { + if (value == null) + this.recordedOn = null; + else { + if (this.recordedOn == null) + this.recordedOn = new DateTimeType(); + this.recordedOn.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (The patient who used the device.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient who used the device.) + */ + public DeviceUseStatement setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who used the device.) + */ + public Patient getSubjectTarget() { + if (this.subjectTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceUseStatement.subject"); + else if (Configuration.doAutoCreate()) + this.subjectTarget = new Patient(); // aa + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who used the device.) + */ + public DeviceUseStatement setSubjectTarget(Patient value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #timing} (How often the device was used.) + */ + public Type getTiming() { + return this.timing; + } + + /** + * @return {@link #timing} (How often the device was used.) + */ + public Timing getTimingTiming() throws FHIRException { + if (!(this.timing instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Timing) this.timing; + } + + public boolean hasTimingTiming() { + return this.timing instanceof Timing; + } + + /** + * @return {@link #timing} (How often the device was used.) + */ + public Period getTimingPeriod() throws FHIRException { + if (!(this.timing instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Period) this.timing; + } + + public boolean hasTimingPeriod() { + return this.timing instanceof Period; + } + + /** + * @return {@link #timing} (How often the device was used.) + */ + public DateTimeType getTimingDateTimeType() throws FHIRException { + if (!(this.timing instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (DateTimeType) this.timing; + } + + public boolean hasTimingDateTimeType() { + return this.timing instanceof DateTimeType; + } + + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); + } + + /** + * @param value {@link #timing} (How often the device was used.) + */ + public DeviceUseStatement setTiming(Type value) { + this.timing = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("bodySite[x]", "CodeableConcept|Reference(BodySite)", "Indicates the site on the subject's body where the device was used ( i.e. the target site).", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("whenUsed", "Period", "The time period over which the device was used.", 0, java.lang.Integer.MAX_VALUE, whenUsed)); + childrenList.add(new Property("device", "Reference(Device)", "The details of the device used.", 0, java.lang.Integer.MAX_VALUE, device)); + childrenList.add(new Property("identifier", "Identifier", "An external identifier for this statement such as an IRI.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("indication", "CodeableConcept", "Reason or justification for the use of the device.", 0, java.lang.Integer.MAX_VALUE, indication)); + childrenList.add(new Property("notes", "string", "Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("recordedOn", "dateTime", "The time at which the statement was made/recorded.", 0, java.lang.Integer.MAX_VALUE, recordedOn)); + childrenList.add(new Property("subject", "Reference(Patient)", "The patient who used the device.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, java.lang.Integer.MAX_VALUE, timing)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("bodySite[x]")) + this.bodySite = (Type) value; // Type + else if (name.equals("whenUsed")) + this.whenUsed = castToPeriod(value); // Period + else if (name.equals("device")) + this.device = castToReference(value); // Reference + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("indication")) + this.getIndication().add(castToCodeableConcept(value)); + else if (name.equals("notes")) + this.getNotes().add(castToString(value)); + else if (name.equals("recordedOn")) + this.recordedOn = castToDateTime(value); // DateTimeType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("timing[x]")) + this.timing = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("bodySiteCodeableConcept")) { + this.bodySite = new CodeableConcept(); + return this.bodySite; + } + else if (name.equals("bodySiteReference")) { + this.bodySite = new Reference(); + return this.bodySite; + } + else if (name.equals("whenUsed")) { + this.whenUsed = new Period(); + return this.whenUsed; + } + else if (name.equals("device")) { + this.device = new Reference(); + return this.device; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("indication")) { + return addIndication(); + } + else if (name.equals("notes")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseStatement.notes"); + } + else if (name.equals("recordedOn")) { + throw new FHIRException("Cannot call addChild on a primitive type DeviceUseStatement.recordedOn"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("timingTiming")) { + this.timing = new Timing(); + return this.timing; + } + else if (name.equals("timingPeriod")) { + this.timing = new Period(); + return this.timing; + } + else if (name.equals("timingDateTime")) { + this.timing = new DateTimeType(); + return this.timing; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DeviceUseStatement"; + + } + + public DeviceUseStatement copy() { + DeviceUseStatement dst = new DeviceUseStatement(); + copyValues(dst); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + dst.whenUsed = whenUsed == null ? null : whenUsed.copy(); + dst.device = device == null ? null : device.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (indication != null) { + dst.indication = new ArrayList(); + for (CodeableConcept i : indication) + dst.indication.add(i.copy()); + }; + if (notes != null) { + dst.notes = new ArrayList(); + for (StringType i : notes) + dst.notes.add(i.copy()); + }; + dst.recordedOn = recordedOn == null ? null : recordedOn.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.timing = timing == null ? null : timing.copy(); + return dst; + } + + protected DeviceUseStatement typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceUseStatement)) + return false; + DeviceUseStatement o = (DeviceUseStatement) other; + return compareDeep(bodySite, o.bodySite, true) && compareDeep(whenUsed, o.whenUsed, true) && compareDeep(device, o.device, true) + && compareDeep(identifier, o.identifier, true) && compareDeep(indication, o.indication, true) && compareDeep(notes, o.notes, true) + && compareDeep(recordedOn, o.recordedOn, true) && compareDeep(subject, o.subject, true) && compareDeep(timing, o.timing, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceUseStatement)) + return false; + DeviceUseStatement o = (DeviceUseStatement) other; + return compareValues(notes, o.notes, true) && compareValues(recordedOn, o.recordedOn, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (whenUsed == null || whenUsed.isEmpty()) + && (device == null || device.isEmpty()) && (identifier == null || identifier.isEmpty()) && (indication == null || indication.isEmpty()) + && (notes == null || notes.isEmpty()) && (recordedOn == null || recordedOn.isEmpty()) && (subject == null || subject.isEmpty()) + && (timing == null || timing.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DeviceUseStatement; + } + + @SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="device", path="DeviceUseStatement.device", description="Search by device", type="reference" ) + public static final String SP_DEVICE = "device"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticOrder.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticOrder.java new file mode 100644 index 00000000000..e28d2c54a90 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticOrder.java @@ -0,0 +1,1956 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of a request for a diagnostic investigation service to be performed. + */ +@ResourceDef(name="DiagnosticOrder", profile="http://hl7.org/fhir/Profile/DiagnosticOrder") +public class DiagnosticOrder extends DomainResource { + + public enum DiagnosticOrderStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request is in preliminary form prior to being sent. + */ + DRAFT, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The receiving system has received the order, but not yet decided whether it will be performed. + */ + RECEIVED, + /** + * The receiving system has accepted the order, but work has not yet commenced. + */ + ACCEPTED, + /** + * The work to fulfill the order is happening. + */ + INPROGRESS, + /** + * The work is complete, and the outcomes are being reviewed for approval. + */ + REVIEW, + /** + * The work has been completed, the report(s) released, and no further work is planned. + */ + COMPLETED, + /** + * The request has been withdrawn. + */ + CANCELLED, + /** + * The request has been held by originating system/user request. + */ + SUSPENDED, + /** + * The receiving system has declined to fulfill the request. + */ + REJECTED, + /** + * The diagnostic investigation was attempted, but due to some procedural error, it could not be completed. + */ + FAILED, + /** + * added to help the parsers + */ + NULL; + public static DiagnosticOrderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("draft".equals(codeString)) + return DRAFT; + if ("planned".equals(codeString)) + return PLANNED; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("review".equals(codeString)) + return REVIEW; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("failed".equals(codeString)) + return FAILED; + throw new FHIRException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case DRAFT: return "draft"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case INPROGRESS: return "in-progress"; + case REVIEW: return "review"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + case SUSPENDED: return "suspended"; + case REJECTED: return "rejected"; + case FAILED: return "failed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/diagnostic-order-status"; + case DRAFT: return "http://hl7.org/fhir/diagnostic-order-status"; + case PLANNED: return "http://hl7.org/fhir/diagnostic-order-status"; + case REQUESTED: return "http://hl7.org/fhir/diagnostic-order-status"; + case RECEIVED: return "http://hl7.org/fhir/diagnostic-order-status"; + case ACCEPTED: return "http://hl7.org/fhir/diagnostic-order-status"; + case INPROGRESS: return "http://hl7.org/fhir/diagnostic-order-status"; + case REVIEW: return "http://hl7.org/fhir/diagnostic-order-status"; + case COMPLETED: return "http://hl7.org/fhir/diagnostic-order-status"; + case CANCELLED: return "http://hl7.org/fhir/diagnostic-order-status"; + case SUSPENDED: return "http://hl7.org/fhir/diagnostic-order-status"; + case REJECTED: return "http://hl7.org/fhir/diagnostic-order-status"; + case FAILED: return "http://hl7.org/fhir/diagnostic-order-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case DRAFT: return "The request is in preliminary form prior to being sent."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case RECEIVED: return "The receiving system has received the order, but not yet decided whether it will be performed."; + case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced."; + case INPROGRESS: return "The work to fulfill the order is happening."; + case REVIEW: return "The work is complete, and the outcomes are being reviewed for approval."; + case COMPLETED: return "The work has been completed, the report(s) released, and no further work is planned."; + case CANCELLED: return "The request has been withdrawn."; + case SUSPENDED: return "The request has been held by originating system/user request."; + case REJECTED: return "The receiving system has declined to fulfill the request."; + case FAILED: return "The diagnostic investigation was attempted, but due to some procedural error, it could not be completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case DRAFT: return "Draft"; + case PLANNED: return "Planned"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case INPROGRESS: return "In-Progress"; + case REVIEW: return "Review"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + case SUSPENDED: return "Suspended"; + case REJECTED: return "Rejected"; + case FAILED: return "Failed"; + default: return "?"; + } + } + } + + public static class DiagnosticOrderStatusEnumFactory implements EnumFactory { + public DiagnosticOrderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return DiagnosticOrderStatus.PROPOSED; + if ("draft".equals(codeString)) + return DiagnosticOrderStatus.DRAFT; + if ("planned".equals(codeString)) + return DiagnosticOrderStatus.PLANNED; + if ("requested".equals(codeString)) + return DiagnosticOrderStatus.REQUESTED; + if ("received".equals(codeString)) + return DiagnosticOrderStatus.RECEIVED; + if ("accepted".equals(codeString)) + return DiagnosticOrderStatus.ACCEPTED; + if ("in-progress".equals(codeString)) + return DiagnosticOrderStatus.INPROGRESS; + if ("review".equals(codeString)) + return DiagnosticOrderStatus.REVIEW; + if ("completed".equals(codeString)) + return DiagnosticOrderStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return DiagnosticOrderStatus.CANCELLED; + if ("suspended".equals(codeString)) + return DiagnosticOrderStatus.SUSPENDED; + if ("rejected".equals(codeString)) + return DiagnosticOrderStatus.REJECTED; + if ("failed".equals(codeString)) + return DiagnosticOrderStatus.FAILED; + throw new IllegalArgumentException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.PROPOSED); + if ("draft".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.DRAFT); + if ("planned".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.PLANNED); + if ("requested".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.RECEIVED); + if ("accepted".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.ACCEPTED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.INPROGRESS); + if ("review".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.REVIEW); + if ("completed".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.COMPLETED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.CANCELLED); + if ("suspended".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.SUSPENDED); + if ("rejected".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.REJECTED); + if ("failed".equals(codeString)) + return new Enumeration(this, DiagnosticOrderStatus.FAILED); + throw new FHIRException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); + } + public String toCode(DiagnosticOrderStatus code) { + if (code == DiagnosticOrderStatus.PROPOSED) + return "proposed"; + if (code == DiagnosticOrderStatus.DRAFT) + return "draft"; + if (code == DiagnosticOrderStatus.PLANNED) + return "planned"; + if (code == DiagnosticOrderStatus.REQUESTED) + return "requested"; + if (code == DiagnosticOrderStatus.RECEIVED) + return "received"; + if (code == DiagnosticOrderStatus.ACCEPTED) + return "accepted"; + if (code == DiagnosticOrderStatus.INPROGRESS) + return "in-progress"; + if (code == DiagnosticOrderStatus.REVIEW) + return "review"; + if (code == DiagnosticOrderStatus.COMPLETED) + return "completed"; + if (code == DiagnosticOrderStatus.CANCELLED) + return "cancelled"; + if (code == DiagnosticOrderStatus.SUSPENDED) + return "suspended"; + if (code == DiagnosticOrderStatus.REJECTED) + return "rejected"; + if (code == DiagnosticOrderStatus.FAILED) + return "failed"; + return "?"; + } + } + + public enum DiagnosticOrderPriority { + /** + * The order has a normal priority . + */ + ROUTINE, + /** + * The order should be urgently. + */ + URGENT, + /** + * The order is time-critical. + */ + STAT, + /** + * The order should be acted on as soon as possible. + */ + ASAP, + /** + * added to help the parsers + */ + NULL; + public static DiagnosticOrderPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("stat".equals(codeString)) + return STAT; + if ("asap".equals(codeString)) + return ASAP; + throw new FHIRException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case STAT: return "stat"; + case ASAP: return "asap"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ROUTINE: return "http://hl7.org/fhir/diagnostic-order-priority"; + case URGENT: return "http://hl7.org/fhir/diagnostic-order-priority"; + case STAT: return "http://hl7.org/fhir/diagnostic-order-priority"; + case ASAP: return "http://hl7.org/fhir/diagnostic-order-priority"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The order has a normal priority ."; + case URGENT: return "The order should be urgently."; + case STAT: return "The order is time-critical."; + case ASAP: return "The order should be acted on as soon as possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case STAT: return "Stat"; + case ASAP: return "ASAP"; + default: return "?"; + } + } + } + + public static class DiagnosticOrderPriorityEnumFactory implements EnumFactory { + public DiagnosticOrderPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return DiagnosticOrderPriority.ROUTINE; + if ("urgent".equals(codeString)) + return DiagnosticOrderPriority.URGENT; + if ("stat".equals(codeString)) + return DiagnosticOrderPriority.STAT; + if ("asap".equals(codeString)) + return DiagnosticOrderPriority.ASAP; + throw new IllegalArgumentException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return new Enumeration(this, DiagnosticOrderPriority.ROUTINE); + if ("urgent".equals(codeString)) + return new Enumeration(this, DiagnosticOrderPriority.URGENT); + if ("stat".equals(codeString)) + return new Enumeration(this, DiagnosticOrderPriority.STAT); + if ("asap".equals(codeString)) + return new Enumeration(this, DiagnosticOrderPriority.ASAP); + throw new FHIRException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); + } + public String toCode(DiagnosticOrderPriority code) { + if (code == DiagnosticOrderPriority.ROUTINE) + return "routine"; + if (code == DiagnosticOrderPriority.URGENT) + return "urgent"; + if (code == DiagnosticOrderPriority.STAT) + return "stat"; + if (code == DiagnosticOrderPriority.ASAP) + return "asap"; + return "?"; + } + } + + @Block() + public static class DiagnosticOrderEventComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The status for the event. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", formalDefinition="The status for the event." ) + protected Enumeration status; + + /** + * Additional information about the event that occurred - e.g. if the status remained unchanged. + */ + @Child(name = "description", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="More information about the event and its context", formalDefinition="Additional information about the event that occurred - e.g. if the status remained unchanged." ) + protected CodeableConcept description; + + /** + * The date/time at which the event occurred. + */ + @Child(name = "dateTime", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date at which the event happened", formalDefinition="The date/time at which the event occurred." ) + protected DateTimeType dateTime; + + /** + * The person responsible for performing or recording the action. + */ + @Child(name = "actor", type = {Practitioner.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who recorded or did this", formalDefinition="The person responsible for performing or recording the action." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (The person responsible for performing or recording the action.) + */ + protected Resource actorTarget; + + private static final long serialVersionUID = -370793723L; + + /* + * Constructor + */ + public DiagnosticOrderEventComponent() { + super(); + } + + /* + * Constructor + */ + public DiagnosticOrderEventComponent(Enumeration status, DateTimeType dateTime) { + super(); + this.status = status; + this.dateTime = dateTime; + } + + /** + * @return {@link #status} (The status for the event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status for the event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DiagnosticOrderEventComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status for the event. + */ + public DiagnosticOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status for the event. + */ + public DiagnosticOrderEventComponent setStatus(DiagnosticOrderStatus value) { + if (this.status == null) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #description} (Additional information about the event that occurred - e.g. if the status remained unchanged.) + */ + public CodeableConcept getDescription() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new CodeableConcept(); // cc + return this.description; + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Additional information about the event that occurred - e.g. if the status remained unchanged.) + */ + public DiagnosticOrderEventComponent setDescription(CodeableConcept value) { + this.description = value; + return this; + } + + /** + * @return {@link #dateTime} (The date/time at which the event occurred.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public DateTimeType getDateTimeElement() { + if (this.dateTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.dateTime"); + else if (Configuration.doAutoCreate()) + this.dateTime = new DateTimeType(); // bb + return this.dateTime; + } + + public boolean hasDateTimeElement() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + public boolean hasDateTime() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + /** + * @param value {@link #dateTime} (The date/time at which the event occurred.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public DiagnosticOrderEventComponent setDateTimeElement(DateTimeType value) { + this.dateTime = value; + return this; + } + + /** + * @return The date/time at which the event occurred. + */ + public Date getDateTime() { + return this.dateTime == null ? null : this.dateTime.getValue(); + } + + /** + * @param value The date/time at which the event occurred. + */ + public DiagnosticOrderEventComponent setDateTime(Date value) { + if (this.dateTime == null) + this.dateTime = new DateTimeType(); + this.dateTime.setValue(value); + return this; + } + + /** + * @return {@link #actor} (The person responsible for performing or recording the action.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (The person responsible for performing or recording the action.) + */ + public DiagnosticOrderEventComponent setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person responsible for performing or recording the action.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person responsible for performing or recording the action.) + */ + public DiagnosticOrderEventComponent setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "code", "The status for the event.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("description", "CodeableConcept", "Additional information about the event that occurred - e.g. if the status remained unchanged.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("dateTime", "dateTime", "The date/time at which the event occurred.", 0, java.lang.Integer.MAX_VALUE, dateTime)); + childrenList.add(new Property("actor", "Reference(Practitioner|Device)", "The person responsible for performing or recording the action.", 0, java.lang.Integer.MAX_VALUE, actor)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dateTime")) + this.dateTime = castToDateTime(value); // DateTimeType + else if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + } + else if (name.equals("description")) { + this.description = new CodeableConcept(); + return this.description; + } + else if (name.equals("dateTime")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.dateTime"); + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else + return super.addChild(name); + } + + public DiagnosticOrderEventComponent copy() { + DiagnosticOrderEventComponent dst = new DiagnosticOrderEventComponent(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + dst.description = description == null ? null : description.copy(); + dst.dateTime = dateTime == null ? null : dateTime.copy(); + dst.actor = actor == null ? null : actor.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosticOrderEventComponent)) + return false; + DiagnosticOrderEventComponent o = (DiagnosticOrderEventComponent) other; + return compareDeep(status, o.status, true) && compareDeep(description, o.description, true) && compareDeep(dateTime, o.dateTime, true) + && compareDeep(actor, o.actor, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosticOrderEventComponent)) + return false; + DiagnosticOrderEventComponent o = (DiagnosticOrderEventComponent) other; + return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (description == null || description.isEmpty()) + && (dateTime == null || dateTime.isEmpty()) && (actor == null || actor.isEmpty()); + } + + public String fhirType() { + return "DiagnosticOrder.event"; + + } + + } + + @Block() + public static class DiagnosticOrderItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code to indicate the item (test or panel) being ordered", formalDefinition="A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested." ) + protected CodeableConcept code; + + /** + * If the item is related to a specific specimen. + */ + @Child(name = "specimen", type = {Specimen.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="If this item relates to specific specimens", formalDefinition="If the item is related to a specific specimen." ) + protected List specimen; + /** + * The actual objects that are the target of the reference (If the item is related to a specific specimen.) + */ + protected List specimenTarget; + + + /** + * Anatomical location where the request test should be performed. This is the target site. + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Location of requested test (if applicable)", formalDefinition="Anatomical location where the request test should be performed. This is the target site." ) + protected CodeableConcept bodySite; + + /** + * The status of this individual item within the order. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", formalDefinition="The status of this individual item within the order." ) + protected Enumeration status; + + /** + * A summary of the events of interest that have occurred as this item of the request is processed. + */ + @Child(name = "event", type = {DiagnosticOrderEventComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Events specific to this item", formalDefinition="A summary of the events of interest that have occurred as this item of the request is processed." ) + protected List event; + + private static final long serialVersionUID = 381238192L; + + /* + * Constructor + */ + public DiagnosticOrderItemComponent() { + super(); + } + + /* + * Constructor + */ + public DiagnosticOrderItemComponent(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.) + */ + public DiagnosticOrderItemComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #specimen} (If the item is related to a specific specimen.) + */ + public List getSpecimen() { + if (this.specimen == null) + this.specimen = new ArrayList(); + return this.specimen; + } + + public boolean hasSpecimen() { + if (this.specimen == null) + return false; + for (Reference item : this.specimen) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specimen} (If the item is related to a specific specimen.) + */ + // syntactic sugar + public Reference addSpecimen() { //3 + Reference t = new Reference(); + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrderItemComponent addSpecimen(Reference t) { //3 + if (t == null) + return this; + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return this; + } + + /** + * @return {@link #specimen} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. If the item is related to a specific specimen.) + */ + public List getSpecimenTarget() { + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + return this.specimenTarget; + } + + // syntactic sugar + /** + * @return {@link #specimen} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. If the item is related to a specific specimen.) + */ + public Specimen addSpecimenTarget() { + Specimen r = new Specimen(); + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + this.specimenTarget.add(r); + return r; + } + + /** + * @return {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.) + */ + public CodeableConcept getBodySite() { + if (this.bodySite == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.bodySite"); + else if (Configuration.doAutoCreate()) + this.bodySite = new CodeableConcept(); // cc + return this.bodySite; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.) + */ + public DiagnosticOrderItemComponent setBodySite(CodeableConcept value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #status} (The status of this individual item within the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this individual item within the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DiagnosticOrderItemComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this individual item within the order. + */ + public DiagnosticOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this individual item within the order. + */ + public DiagnosticOrderItemComponent setStatus(DiagnosticOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #event} (A summary of the events of interest that have occurred as this item of the request is processed.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (DiagnosticOrderEventComponent item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (A summary of the events of interest that have occurred as this item of the request is processed.) + */ + // syntactic sugar + public DiagnosticOrderEventComponent addEvent() { //3 + DiagnosticOrderEventComponent t = new DiagnosticOrderEventComponent(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrderItemComponent addEvent(DiagnosticOrderEventComponent t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("specimen", "Reference(Specimen)", "If the item is related to a specific specimen.", 0, java.lang.Integer.MAX_VALUE, specimen)); + childrenList.add(new Property("bodySite", "CodeableConcept", "Anatomical location where the request test should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("status", "code", "The status of this individual item within the order.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("event", "@DiagnosticOrder.event", "A summary of the events of interest that have occurred as this item of the request is processed.", 0, java.lang.Integer.MAX_VALUE, event)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("specimen")) + this.getSpecimen().add(castToReference(value)); + else if (name.equals("bodySite")) + this.bodySite = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("status")) + this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("event")) + this.getEvent().add((DiagnosticOrderEventComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("specimen")) { + return addSpecimen(); + } + else if (name.equals("bodySite")) { + this.bodySite = new CodeableConcept(); + return this.bodySite; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + } + else if (name.equals("event")) { + return addEvent(); + } + else + return super.addChild(name); + } + + public DiagnosticOrderItemComponent copy() { + DiagnosticOrderItemComponent dst = new DiagnosticOrderItemComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + if (specimen != null) { + dst.specimen = new ArrayList(); + for (Reference i : specimen) + dst.specimen.add(i.copy()); + }; + dst.bodySite = bodySite == null ? null : bodySite.copy(); + dst.status = status == null ? null : status.copy(); + if (event != null) { + dst.event = new ArrayList(); + for (DiagnosticOrderEventComponent i : event) + dst.event.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosticOrderItemComponent)) + return false; + DiagnosticOrderItemComponent o = (DiagnosticOrderItemComponent) other; + return compareDeep(code, o.code, true) && compareDeep(specimen, o.specimen, true) && compareDeep(bodySite, o.bodySite, true) + && compareDeep(status, o.status, true) && compareDeep(event, o.event, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosticOrderItemComponent)) + return false; + DiagnosticOrderItemComponent o = (DiagnosticOrderItemComponent) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (specimen == null || specimen.isEmpty()) + && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) && (event == null || event.isEmpty()) + ; + } + + public String fhirType() { + return "DiagnosticOrder.item"; + + } + + } + + /** + * Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). + */ + @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what test is about", formalDefinition="Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + protected Resource subjectTarget; + + /** + * The practitioner that holds legal responsibility for ordering the investigation. + */ + @Child(name = "orderer", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) + protected Reference orderer; + + /** + * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the investigation.) + */ + protected Practitioner ordererTarget; + + /** + * Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." ) + protected List identifier; + + /** + * An encounter that provides additional information about the healthcare context in which this request is made. + */ + @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The encounter that this diagnostic order is associated with", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + protected Encounter encounterTarget; + + /** + * An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation." ) + protected List reason; + + /** + * Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order. + */ + @Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order." ) + protected List supportingInformation; + /** + * The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) + */ + protected List supportingInformationTarget; + + + /** + * One or more specimens that the diagnostic investigation is about. + */ + @Child(name = "specimen", type = {Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="If the whole order relates to specific specimens", formalDefinition="One or more specimens that the diagnostic investigation is about." ) + protected List specimen; + /** + * The actual objects that are the target of the reference (One or more specimens that the diagnostic investigation is about.) + */ + protected List specimenTarget; + + + /** + * The status of the order. + */ + @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", formalDefinition="The status of the order." ) + protected Enumeration status; + + /** + * The clinical priority associated with this order. + */ + @Child(name = "priority", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) + protected Enumeration priority; + + /** + * A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed. + */ + @Child(name = "event", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed." ) + protected List event; + + /** + * The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested. + */ + @Child(name = "item", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The items the orderer requested", formalDefinition="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested." ) + protected List item; + + /** + * Any other notes associated with this patient, specimen or order (e.g. "patient hates needles"). + */ + @Child(name = "note", type = {Annotation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Other notes and comments", formalDefinition="Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\")." ) + protected List note; + + private static final long serialVersionUID = 700891227L; + + /* + * Constructor + */ + public DiagnosticOrder() { + super(); + } + + /* + * Constructor + */ + public DiagnosticOrder(Reference subject) { + super(); + this.subject = subject; + } + + /** + * @return {@link #subject} (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public DiagnosticOrder setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public DiagnosticOrder setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public Reference getOrderer() { + if (this.orderer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.orderer = new Reference(); // cc + return this.orderer; + } + + public boolean hasOrderer() { + return this.orderer != null && !this.orderer.isEmpty(); + } + + /** + * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public DiagnosticOrder setOrderer(Reference value) { + this.orderer = value; + return this; + } + + /** + * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public Practitioner getOrdererTarget() { + if (this.ordererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.ordererTarget = new Practitioner(); // aa + return this.ordererTarget; + } + + /** + * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public DiagnosticOrder setOrdererTarget(Practitioner value) { + this.ordererTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public DiagnosticOrder setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public DiagnosticOrder setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) + */ + // syntactic sugar + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) + */ + public List getSupportingInformationTarget() { + if (this.supportingInformationTarget == null) + this.supportingInformationTarget = new ArrayList(); + return this.supportingInformationTarget; + } + + /** + * @return {@link #specimen} (One or more specimens that the diagnostic investigation is about.) + */ + public List getSpecimen() { + if (this.specimen == null) + this.specimen = new ArrayList(); + return this.specimen; + } + + public boolean hasSpecimen() { + if (this.specimen == null) + return false; + for (Reference item : this.specimen) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specimen} (One or more specimens that the diagnostic investigation is about.) + */ + // syntactic sugar + public Reference addSpecimen() { //3 + Reference t = new Reference(); + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addSpecimen(Reference t) { //3 + if (t == null) + return this; + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return this; + } + + /** + * @return {@link #specimen} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. One or more specimens that the diagnostic investigation is about.) + */ + public List getSpecimenTarget() { + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + return this.specimenTarget; + } + + // syntactic sugar + /** + * @return {@link #specimen} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. One or more specimens that the diagnostic investigation is about.) + */ + public Specimen addSpecimenTarget() { + Specimen r = new Specimen(); + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + this.specimenTarget.add(r); + return r; + } + + /** + * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DiagnosticOrder setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the order. + */ + public DiagnosticOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the order. + */ + public DiagnosticOrder setStatus(DiagnosticOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public DiagnosticOrder setPriorityElement(Enumeration value) { + this.priority = value; + return this; + } + + /** + * @return The clinical priority associated with this order. + */ + public DiagnosticOrderPriority getPriority() { + return this.priority == null ? null : this.priority.getValue(); + } + + /** + * @param value The clinical priority associated with this order. + */ + public DiagnosticOrder setPriority(DiagnosticOrderPriority value) { + if (value == null) + this.priority = null; + else { + if (this.priority == null) + this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); + this.priority.setValue(value); + } + return this; + } + + /** + * @return {@link #event} (A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (DiagnosticOrderEventComponent item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.) + */ + // syntactic sugar + public DiagnosticOrderEventComponent addEvent() { //3 + DiagnosticOrderEventComponent t = new DiagnosticOrderEventComponent(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addEvent(DiagnosticOrderEventComponent t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + /** + * @return {@link #item} (The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (DiagnosticOrderItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.) + */ + // syntactic sugar + public DiagnosticOrderItemComponent addItem() { //3 + DiagnosticOrderItemComponent t = new DiagnosticOrderItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addItem(DiagnosticOrderItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #note} (Any other notes associated with this patient, specimen or order (e.g. "patient hates needles").) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Any other notes associated with this patient, specimen or order (e.g. "patient hates needles").) + */ + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public DiagnosticOrder addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the investigation.", 0, java.lang.Integer.MAX_VALUE, orderer)); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("reason", "CodeableConcept", "An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen)); + childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("event", "", "A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("item", "", "The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\").", 0, java.lang.Integer.MAX_VALUE, note)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("orderer")) + this.orderer = castToReference(value); // Reference + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("supportingInformation")) + this.getSupportingInformation().add(castToReference(value)); + else if (name.equals("specimen")) + this.getSpecimen().add(castToReference(value)); + else if (name.equals("status")) + this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("priority")) + this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration + else if (name.equals("event")) + this.getEvent().add((DiagnosticOrderEventComponent) value); + else if (name.equals("item")) + this.getItem().add((DiagnosticOrderItemComponent) value); + else if (name.equals("note")) + this.getNote().add(castToAnnotation(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("orderer")) { + this.orderer = new Reference(); + return this.orderer; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } + else if (name.equals("specimen")) { + return addSpecimen(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.priority"); + } + else if (name.equals("event")) { + return addEvent(); + } + else if (name.equals("item")) { + return addItem(); + } + else if (name.equals("note")) { + return addNote(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DiagnosticOrder"; + + } + + public DiagnosticOrder copy() { + DiagnosticOrder dst = new DiagnosticOrder(); + copyValues(dst); + dst.subject = subject == null ? null : subject.copy(); + dst.orderer = orderer == null ? null : orderer.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.encounter = encounter == null ? null : encounter.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; + if (specimen != null) { + dst.specimen = new ArrayList(); + for (Reference i : specimen) + dst.specimen.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.priority = priority == null ? null : priority.copy(); + if (event != null) { + dst.event = new ArrayList(); + for (DiagnosticOrderEventComponent i : event) + dst.event.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (DiagnosticOrderItemComponent i : item) + dst.item.add(i.copy()); + }; + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + return dst; + } + + protected DiagnosticOrder typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosticOrder)) + return false; + DiagnosticOrder o = (DiagnosticOrder) other; + return compareDeep(subject, o.subject, true) && compareDeep(orderer, o.orderer, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(reason, o.reason, true) && compareDeep(supportingInformation, o.supportingInformation, true) + && compareDeep(specimen, o.specimen, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true) + && compareDeep(event, o.event, true) && compareDeep(item, o.item, true) && compareDeep(note, o.note, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosticOrder)) + return false; + DiagnosticOrder o = (DiagnosticOrder) other; + return compareValues(status, o.status, true) && compareValues(priority, o.priority, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (subject == null || subject.isEmpty()) && (orderer == null || orderer.isEmpty()) + && (identifier == null || identifier.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (reason == null || reason.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) + && (specimen == null || specimen.isEmpty()) && (status == null || status.isEmpty()) && (priority == null || priority.isEmpty()) + && (event == null || event.isEmpty()) && (item == null || item.isEmpty()) && (note == null || note.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DiagnosticOrder; + } + + @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", type="token" ) + public static final String SP_ITEMPASTSTATUS = "item-past-status"; + @SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="Location of requested test (if applicable)", type="token" ) + public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) + public static final String SP_EVENTDATE = "event-date"; + @SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite" ) + public static final String SP_EVENTSTATUSDATE = "event-status-date"; + @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor|DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) + public static final String SP_ITEMDATE = "item-date"; + @SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite" ) + public static final String SP_ITEMSTATUSDATE = "item-status-date"; + @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", type="token" ) + public static final String SP_EVENTSTATUS = "event-status"; + @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", type="token" ) + public static final String SP_ITEMSTATUS = "item-status"; + @SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) + public static final String SP_ORDERER = "orderer"; + @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen|DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) + public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticReport.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticReport.java new file mode 100644 index 00000000000..b8577ebb5bf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DiagnosticReport.java @@ -0,0 +1,1590 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ +@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/Profile/DiagnosticReport") +public class DiagnosticReport extends DomainResource { + + public enum DiagnosticReportStatus { + /** + * The existence of the report is registered, but there is nothing yet available. + */ + REGISTERED, + /** + * This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified. + */ + PARTIAL, + /** + * The report is complete and verified by an authorized person. + */ + FINAL, + /** + * The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed + */ + CORRECTED, + /** + * The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed. + */ + APPENDED, + /** + * The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). + */ + CANCELLED, + /** + * The report has been withdrawn following a previous final release. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static DiagnosticReportStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return REGISTERED; + if ("partial".equals(codeString)) + return PARTIAL; + if ("final".equals(codeString)) + return FINAL; + if ("corrected".equals(codeString)) + return CORRECTED; + if ("appended".equals(codeString)) + return APPENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REGISTERED: return "registered"; + case PARTIAL: return "partial"; + case FINAL: return "final"; + case CORRECTED: return "corrected"; + case APPENDED: return "appended"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REGISTERED: return "http://hl7.org/fhir/diagnostic-report-status"; + case PARTIAL: return "http://hl7.org/fhir/diagnostic-report-status"; + case FINAL: return "http://hl7.org/fhir/diagnostic-report-status"; + case CORRECTED: return "http://hl7.org/fhir/diagnostic-report-status"; + case APPENDED: return "http://hl7.org/fhir/diagnostic-report-status"; + case CANCELLED: return "http://hl7.org/fhir/diagnostic-report-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/diagnostic-report-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REGISTERED: return "The existence of the report is registered, but there is nothing yet available."; + case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified."; + case FINAL: return "The report is complete and verified by an authorized person."; + case CORRECTED: return "The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed"; + case APPENDED: return "The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed."; + case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; + case ENTEREDINERROR: return "The report has been withdrawn following a previous final release."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REGISTERED: return "Registered"; + case PARTIAL: return "Partial"; + case FINAL: return "Final"; + case CORRECTED: return "Corrected"; + case APPENDED: return "Appended"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class DiagnosticReportStatusEnumFactory implements EnumFactory { + public DiagnosticReportStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return DiagnosticReportStatus.REGISTERED; + if ("partial".equals(codeString)) + return DiagnosticReportStatus.PARTIAL; + if ("final".equals(codeString)) + return DiagnosticReportStatus.FINAL; + if ("corrected".equals(codeString)) + return DiagnosticReportStatus.CORRECTED; + if ("appended".equals(codeString)) + return DiagnosticReportStatus.APPENDED; + if ("cancelled".equals(codeString)) + return DiagnosticReportStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return DiagnosticReportStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.REGISTERED); + if ("partial".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.PARTIAL); + if ("final".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.FINAL); + if ("corrected".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.CORRECTED); + if ("appended".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.APPENDED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.CANCELLED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, DiagnosticReportStatus.ENTEREDINERROR); + throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); + } + public String toCode(DiagnosticReportStatus code) { + if (code == DiagnosticReportStatus.REGISTERED) + return "registered"; + if (code == DiagnosticReportStatus.PARTIAL) + return "partial"; + if (code == DiagnosticReportStatus.FINAL) + return "final"; + if (code == DiagnosticReportStatus.CORRECTED) + return "corrected"; + if (code == DiagnosticReportStatus.APPENDED) + return "appended"; + if (code == DiagnosticReportStatus.CANCELLED) + return "cancelled"; + if (code == DiagnosticReportStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + @Block() + public static class DiagnosticReportImageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. + */ + @Child(name = "comment", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comment about the image (e.g. explanation)", formalDefinition="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features." ) + protected StringType comment; + + /** + * Reference to the image source. + */ + @Child(name = "link", type = {Media.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to the image source", formalDefinition="Reference to the image source." ) + protected Reference link; + + /** + * The actual object that is the target of the reference (Reference to the image source.) + */ + protected Media linkTarget; + + private static final long serialVersionUID = 935791940L; + + /* + * Constructor + */ + public DiagnosticReportImageComponent() { + super(); + } + + /* + * Constructor + */ + public DiagnosticReportImageComponent(Reference link) { + super(); + this.link = link; + } + + /** + * @return {@link #comment} (A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReportImageComponent.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public DiagnosticReportImageComponent setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. + */ + public DiagnosticReportImageComponent setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + /** + * @return {@link #link} (Reference to the image source.) + */ + public Reference getLink() { + if (this.link == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReportImageComponent.link"); + else if (Configuration.doAutoCreate()) + this.link = new Reference(); // cc + return this.link; + } + + public boolean hasLink() { + return this.link != null && !this.link.isEmpty(); + } + + /** + * @param value {@link #link} (Reference to the image source.) + */ + public DiagnosticReportImageComponent setLink(Reference value) { + this.link = value; + return this; + } + + /** + * @return {@link #link} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the image source.) + */ + public Media getLinkTarget() { + if (this.linkTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReportImageComponent.link"); + else if (Configuration.doAutoCreate()) + this.linkTarget = new Media(); // aa + return this.linkTarget; + } + + /** + * @param value {@link #link} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the image source.) + */ + public DiagnosticReportImageComponent setLinkTarget(Media value) { + this.linkTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("comment", "string", "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", 0, java.lang.Integer.MAX_VALUE, comment)); + childrenList.add(new Property("link", "Reference(Media)", "Reference to the image source.", 0, java.lang.Integer.MAX_VALUE, link)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("comment")) + this.comment = castToString(value); // StringType + else if (name.equals("link")) + this.link = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.comment"); + } + else if (name.equals("link")) { + this.link = new Reference(); + return this.link; + } + else + return super.addChild(name); + } + + public DiagnosticReportImageComponent copy() { + DiagnosticReportImageComponent dst = new DiagnosticReportImageComponent(); + copyValues(dst); + dst.comment = comment == null ? null : comment.copy(); + dst.link = link == null ? null : link.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosticReportImageComponent)) + return false; + DiagnosticReportImageComponent o = (DiagnosticReportImageComponent) other; + return compareDeep(comment, o.comment, true) && compareDeep(link, o.link, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosticReportImageComponent)) + return false; + DiagnosticReportImageComponent o = (DiagnosticReportImageComponent) other; + return compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (comment == null || comment.isEmpty()) && (link == null || link.isEmpty()) + ; + } + + public String fhirType() { + return "DiagnosticReport.image"; + + } + + } + + /** + * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Id for external references to this report", formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider." ) + protected List identifier; + + /** + * The status of the diagnostic report as a whole. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="registered | partial | final | corrected | appended | cancelled | entered-in-error", formalDefinition="The status of the diagnostic report as a whole." ) + protected Enumeration status; + + /** + * A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service category", formalDefinition="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes." ) + protected CodeableConcept category; + + /** + * A code or name that describes this diagnostic report. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." ) + protected CodeableConcept code; + + /** + * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The subject of the report, usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) + */ + protected Resource subjectTarget; + + /** + * The link to the health care event (encounter) when the order was made. + */ + @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Health care event when test ordered", formalDefinition="The link to the health care event (encounter) when the order was made." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The link to the health care event (encounter) when the order was made.) + */ + protected Encounter encounterTarget; + + /** + * The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself. + */ + @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Clinically Relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." ) + protected Type effective; + + /** + * The date and time that this version of the report was released from the source diagnostic service. + */ + @Child(name = "issued", type = {InstantType.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="DateTime this version was released", formalDefinition="The date and time that this version of the report was released from the source diagnostic service." ) + protected InstantType issued; + + /** + * The diagnostic service that is responsible for issuing the report. + */ + @Child(name = "performer", type = {Practitioner.class, Organization.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." ) + protected Reference performer; + + /** + * The actual object that is the target of the reference (The diagnostic service that is responsible for issuing the report.) + */ + protected Resource performerTarget; + + /** + * Details concerning a test or procedure requested. + */ + @Child(name = "request", type = {DiagnosticOrder.class, ProcedureRequest.class, ReferralRequest.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What was requested", formalDefinition="Details concerning a test or procedure requested." ) + protected List request; + /** + * The actual objects that are the target of the reference (Details concerning a test or procedure requested.) + */ + protected List requestTarget; + + + /** + * Details about the specimens on which this diagnostic report is based. + */ + @Child(name = "specimen", type = {Specimen.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specimens this report is based on", formalDefinition="Details about the specimens on which this diagnostic report is based." ) + protected List specimen; + /** + * The actual objects that are the target of the reference (Details about the specimens on which this diagnostic report is based.) + */ + protected List specimenTarget; + + + /** + * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels"). + */ + @Child(name = "result", type = {Observation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Observations - simple, or complex nested groups", formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")." ) + protected List result; + /** + * The actual objects that are the target of the reference (Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) + */ + protected List resultTarget; + + + /** + * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. + */ + @Child(name = "imagingStudy", type = {ImagingStudy.class, ImagingObjectSelection.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reference to full details of imaging associated with the diagnostic report", formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images." ) + protected List imagingStudy; + /** + * The actual objects that are the target of the reference (One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) + */ + protected List imagingStudyTarget; + + + /** + * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest). + */ + @Child(name = "image", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Key images associated with this report", formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." ) + protected List image; + + /** + * Concise and clinically contextualized narrative interpretation of the diagnostic report. + */ + @Child(name = "conclusion", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Clinical Interpretation of test results", formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report." ) + protected StringType conclusion; + + /** + * Codes for the conclusion. + */ + @Child(name = "codedDiagnosis", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Codes for the conclusion", formalDefinition="Codes for the conclusion." ) + protected List codedDiagnosis; + + /** + * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent. + */ + @Child(name = "presentedForm", type = {Attachment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Entire report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." ) + protected List presentedForm; + + private static final long serialVersionUID = 920334551L; + + /* + * Constructor + */ + public DiagnosticReport() { + super(); + } + + /* + * Constructor + */ + public DiagnosticReport(Enumeration status, CodeableConcept code, Reference subject, Type effective, InstantType issued, Reference performer) { + super(); + this.status = status; + this.code = code; + this.subject = subject; + this.effective = effective; + this.issued = issued; + this.performer = performer; + } + + /** + * @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (The status of the diagnostic report as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DiagnosticReportStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the diagnostic report as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DiagnosticReport setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the diagnostic report as a whole. + */ + public DiagnosticReportStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the diagnostic report as a whole. + */ + public DiagnosticReport setStatus(DiagnosticReportStatus value) { + if (this.status == null) + this.status = new Enumeration(new DiagnosticReportStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #category} (A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.) + */ + public DiagnosticReport setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #code} (A code or name that describes this diagnostic report.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code or name that describes this diagnostic report.) + */ + public DiagnosticReport setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) + */ + public DiagnosticReport setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) + */ + public DiagnosticReport setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The link to the health care event (encounter) when the order was made.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The link to the health care event (encounter) when the order was made.) + */ + public DiagnosticReport setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The link to the health care event (encounter) when the order was made.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The link to the health care event (encounter) when the order was made.) + */ + public DiagnosticReport setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) + */ + public Type getEffective() { + return this.effective; + } + + /** + * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) + */ + public DateTimeType getEffectiveDateTimeType() throws FHIRException { + if (!(this.effective instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (DateTimeType) this.effective; + } + + public boolean hasEffectiveDateTimeType() { + return this.effective instanceof DateTimeType; + } + + /** + * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) + */ + public Period getEffectivePeriod() throws FHIRException { + if (!(this.effective instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (Period) this.effective; + } + + public boolean hasEffectivePeriod() { + return this.effective instanceof Period; + } + + public boolean hasEffective() { + return this.effective != null && !this.effective.isEmpty(); + } + + /** + * @param value {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) + */ + public DiagnosticReport setEffective(Type value) { + this.effective = value; + return this; + } + + /** + * @return {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public InstantType getIssuedElement() { + if (this.issued == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.issued"); + else if (Configuration.doAutoCreate()) + this.issued = new InstantType(); // bb + return this.issued; + } + + public boolean hasIssuedElement() { + return this.issued != null && !this.issued.isEmpty(); + } + + public boolean hasIssued() { + return this.issued != null && !this.issued.isEmpty(); + } + + /** + * @param value {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public DiagnosticReport setIssuedElement(InstantType value) { + this.issued = value; + return this; + } + + /** + * @return The date and time that this version of the report was released from the source diagnostic service. + */ + public Date getIssued() { + return this.issued == null ? null : this.issued.getValue(); + } + + /** + * @param value The date and time that this version of the report was released from the source diagnostic service. + */ + public DiagnosticReport setIssued(Date value) { + if (this.issued == null) + this.issued = new InstantType(); + this.issued.setValue(value); + return this; + } + + /** + * @return {@link #performer} (The diagnostic service that is responsible for issuing the report.) + */ + public Reference getPerformer() { + if (this.performer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.performer"); + else if (Configuration.doAutoCreate()) + this.performer = new Reference(); // cc + return this.performer; + } + + public boolean hasPerformer() { + return this.performer != null && !this.performer.isEmpty(); + } + + /** + * @param value {@link #performer} (The diagnostic service that is responsible for issuing the report.) + */ + public DiagnosticReport setPerformer(Reference value) { + this.performer = value; + return this; + } + + /** + * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.) + */ + public Resource getPerformerTarget() { + return this.performerTarget; + } + + /** + * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.) + */ + public DiagnosticReport setPerformerTarget(Resource value) { + this.performerTarget = value; + return this; + } + + /** + * @return {@link #request} (Details concerning a test or procedure requested.) + */ + public List getRequest() { + if (this.request == null) + this.request = new ArrayList(); + return this.request; + } + + public boolean hasRequest() { + if (this.request == null) + return false; + for (Reference item : this.request) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #request} (Details concerning a test or procedure requested.) + */ + // syntactic sugar + public Reference addRequest() { //3 + Reference t = new Reference(); + if (this.request == null) + this.request = new ArrayList(); + this.request.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addRequest(Reference t) { //3 + if (t == null) + return this; + if (this.request == null) + this.request = new ArrayList(); + this.request.add(t); + return this; + } + + /** + * @return {@link #request} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Details concerning a test or procedure requested.) + */ + public List getRequestTarget() { + if (this.requestTarget == null) + this.requestTarget = new ArrayList(); + return this.requestTarget; + } + + /** + * @return {@link #specimen} (Details about the specimens on which this diagnostic report is based.) + */ + public List getSpecimen() { + if (this.specimen == null) + this.specimen = new ArrayList(); + return this.specimen; + } + + public boolean hasSpecimen() { + if (this.specimen == null) + return false; + for (Reference item : this.specimen) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specimen} (Details about the specimens on which this diagnostic report is based.) + */ + // syntactic sugar + public Reference addSpecimen() { //3 + Reference t = new Reference(); + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addSpecimen(Reference t) { //3 + if (t == null) + return this; + if (this.specimen == null) + this.specimen = new ArrayList(); + this.specimen.add(t); + return this; + } + + /** + * @return {@link #specimen} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Details about the specimens on which this diagnostic report is based.) + */ + public List getSpecimenTarget() { + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + return this.specimenTarget; + } + + // syntactic sugar + /** + * @return {@link #specimen} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Details about the specimens on which this diagnostic report is based.) + */ + public Specimen addSpecimenTarget() { + Specimen r = new Specimen(); + if (this.specimenTarget == null) + this.specimenTarget = new ArrayList(); + this.specimenTarget.add(r); + return r; + } + + /** + * @return {@link #result} (Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) + */ + public List getResult() { + if (this.result == null) + this.result = new ArrayList(); + return this.result; + } + + public boolean hasResult() { + if (this.result == null) + return false; + for (Reference item : this.result) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #result} (Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) + */ + // syntactic sugar + public Reference addResult() { //3 + Reference t = new Reference(); + if (this.result == null) + this.result = new ArrayList(); + this.result.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addResult(Reference t) { //3 + if (t == null) + return this; + if (this.result == null) + this.result = new ArrayList(); + this.result.add(t); + return this; + } + + /** + * @return {@link #result} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) + */ + public List getResultTarget() { + if (this.resultTarget == null) + this.resultTarget = new ArrayList(); + return this.resultTarget; + } + + // syntactic sugar + /** + * @return {@link #result} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) + */ + public Observation addResultTarget() { + Observation r = new Observation(); + if (this.resultTarget == null) + this.resultTarget = new ArrayList(); + this.resultTarget.add(r); + return r; + } + + /** + * @return {@link #imagingStudy} (One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) + */ + public List getImagingStudy() { + if (this.imagingStudy == null) + this.imagingStudy = new ArrayList(); + return this.imagingStudy; + } + + public boolean hasImagingStudy() { + if (this.imagingStudy == null) + return false; + for (Reference item : this.imagingStudy) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #imagingStudy} (One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) + */ + // syntactic sugar + public Reference addImagingStudy() { //3 + Reference t = new Reference(); + if (this.imagingStudy == null) + this.imagingStudy = new ArrayList(); + this.imagingStudy.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addImagingStudy(Reference t) { //3 + if (t == null) + return this; + if (this.imagingStudy == null) + this.imagingStudy = new ArrayList(); + this.imagingStudy.add(t); + return this; + } + + /** + * @return {@link #imagingStudy} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) + */ + public List getImagingStudyTarget() { + if (this.imagingStudyTarget == null) + this.imagingStudyTarget = new ArrayList(); + return this.imagingStudyTarget; + } + + /** + * @return {@link #image} (A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).) + */ + public List getImage() { + if (this.image == null) + this.image = new ArrayList(); + return this.image; + } + + public boolean hasImage() { + if (this.image == null) + return false; + for (DiagnosticReportImageComponent item : this.image) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #image} (A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).) + */ + // syntactic sugar + public DiagnosticReportImageComponent addImage() { //3 + DiagnosticReportImageComponent t = new DiagnosticReportImageComponent(); + if (this.image == null) + this.image = new ArrayList(); + this.image.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addImage(DiagnosticReportImageComponent t) { //3 + if (t == null) + return this; + if (this.image == null) + this.image = new ArrayList(); + this.image.add(t); + return this; + } + + /** + * @return {@link #conclusion} (Concise and clinically contextualized narrative interpretation of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value + */ + public StringType getConclusionElement() { + if (this.conclusion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticReport.conclusion"); + else if (Configuration.doAutoCreate()) + this.conclusion = new StringType(); // bb + return this.conclusion; + } + + public boolean hasConclusionElement() { + return this.conclusion != null && !this.conclusion.isEmpty(); + } + + public boolean hasConclusion() { + return this.conclusion != null && !this.conclusion.isEmpty(); + } + + /** + * @param value {@link #conclusion} (Concise and clinically contextualized narrative interpretation of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value + */ + public DiagnosticReport setConclusionElement(StringType value) { + this.conclusion = value; + return this; + } + + /** + * @return Concise and clinically contextualized narrative interpretation of the diagnostic report. + */ + public String getConclusion() { + return this.conclusion == null ? null : this.conclusion.getValue(); + } + + /** + * @param value Concise and clinically contextualized narrative interpretation of the diagnostic report. + */ + public DiagnosticReport setConclusion(String value) { + if (Utilities.noString(value)) + this.conclusion = null; + else { + if (this.conclusion == null) + this.conclusion = new StringType(); + this.conclusion.setValue(value); + } + return this; + } + + /** + * @return {@link #codedDiagnosis} (Codes for the conclusion.) + */ + public List getCodedDiagnosis() { + if (this.codedDiagnosis == null) + this.codedDiagnosis = new ArrayList(); + return this.codedDiagnosis; + } + + public boolean hasCodedDiagnosis() { + if (this.codedDiagnosis == null) + return false; + for (CodeableConcept item : this.codedDiagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codedDiagnosis} (Codes for the conclusion.) + */ + // syntactic sugar + public CodeableConcept addCodedDiagnosis() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.codedDiagnosis == null) + this.codedDiagnosis = new ArrayList(); + this.codedDiagnosis.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addCodedDiagnosis(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.codedDiagnosis == null) + this.codedDiagnosis = new ArrayList(); + this.codedDiagnosis.add(t); + return this; + } + + /** + * @return {@link #presentedForm} (Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.) + */ + public List getPresentedForm() { + if (this.presentedForm == null) + this.presentedForm = new ArrayList(); + return this.presentedForm; + } + + public boolean hasPresentedForm() { + if (this.presentedForm == null) + return false; + for (Attachment item : this.presentedForm) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #presentedForm} (Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.) + */ + // syntactic sugar + public Attachment addPresentedForm() { //3 + Attachment t = new Attachment(); + if (this.presentedForm == null) + this.presentedForm = new ArrayList(); + this.presentedForm.add(t); + return t; + } + + // syntactic sugar + public DiagnosticReport addPresentedForm(Attachment t) { //3 + if (t == null) + return this; + if (this.presentedForm == null) + this.presentedForm = new ArrayList(); + this.presentedForm.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The status of the diagnostic report as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The link to the health care event (encounter) when the order was made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, java.lang.Integer.MAX_VALUE, effective)); + childrenList.add(new Property("issued", "instant", "The date and time that this version of the report was released from the source diagnostic service.", 0, java.lang.Integer.MAX_VALUE, issued)); + childrenList.add(new Property("performer", "Reference(Practitioner|Organization)", "The diagnostic service that is responsible for issuing the report.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("request", "Reference(DiagnosticOrder|ProcedureRequest|ReferralRequest)", "Details concerning a test or procedure requested.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen)); + childrenList.add(new Property("result", "Reference(Observation)", "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\").", 0, java.lang.Integer.MAX_VALUE, result)); + childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy|ImagingObjectSelection)", "One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.", 0, java.lang.Integer.MAX_VALUE, imagingStudy)); + childrenList.add(new Property("image", "", "A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", 0, java.lang.Integer.MAX_VALUE, image)); + childrenList.add(new Property("conclusion", "string", "Concise and clinically contextualized narrative interpretation of the diagnostic report.", 0, java.lang.Integer.MAX_VALUE, conclusion)); + childrenList.add(new Property("codedDiagnosis", "CodeableConcept", "Codes for the conclusion.", 0, java.lang.Integer.MAX_VALUE, codedDiagnosis)); + childrenList.add(new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new DiagnosticReportStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("effective[x]")) + this.effective = (Type) value; // Type + else if (name.equals("issued")) + this.issued = castToInstant(value); // InstantType + else if (name.equals("performer")) + this.performer = castToReference(value); // Reference + else if (name.equals("request")) + this.getRequest().add(castToReference(value)); + else if (name.equals("specimen")) + this.getSpecimen().add(castToReference(value)); + else if (name.equals("result")) + this.getResult().add(castToReference(value)); + else if (name.equals("imagingStudy")) + this.getImagingStudy().add(castToReference(value)); + else if (name.equals("image")) + this.getImage().add((DiagnosticReportImageComponent) value); + else if (name.equals("conclusion")) + this.conclusion = castToString(value); // StringType + else if (name.equals("codedDiagnosis")) + this.getCodedDiagnosis().add(castToCodeableConcept(value)); + else if (name.equals("presentedForm")) + this.getPresentedForm().add(castToAttachment(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.status"); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("effectiveDateTime")) { + this.effective = new DateTimeType(); + return this.effective; + } + else if (name.equals("effectivePeriod")) { + this.effective = new Period(); + return this.effective; + } + else if (name.equals("issued")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.issued"); + } + else if (name.equals("performer")) { + this.performer = new Reference(); + return this.performer; + } + else if (name.equals("request")) { + return addRequest(); + } + else if (name.equals("specimen")) { + return addSpecimen(); + } + else if (name.equals("result")) { + return addResult(); + } + else if (name.equals("imagingStudy")) { + return addImagingStudy(); + } + else if (name.equals("image")) { + return addImage(); + } + else if (name.equals("conclusion")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.conclusion"); + } + else if (name.equals("codedDiagnosis")) { + return addCodedDiagnosis(); + } + else if (name.equals("presentedForm")) { + return addPresentedForm(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DiagnosticReport"; + + } + + public DiagnosticReport copy() { + DiagnosticReport dst = new DiagnosticReport(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.category = category == null ? null : category.copy(); + dst.code = code == null ? null : code.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.effective = effective == null ? null : effective.copy(); + dst.issued = issued == null ? null : issued.copy(); + dst.performer = performer == null ? null : performer.copy(); + if (request != null) { + dst.request = new ArrayList(); + for (Reference i : request) + dst.request.add(i.copy()); + }; + if (specimen != null) { + dst.specimen = new ArrayList(); + for (Reference i : specimen) + dst.specimen.add(i.copy()); + }; + if (result != null) { + dst.result = new ArrayList(); + for (Reference i : result) + dst.result.add(i.copy()); + }; + if (imagingStudy != null) { + dst.imagingStudy = new ArrayList(); + for (Reference i : imagingStudy) + dst.imagingStudy.add(i.copy()); + }; + if (image != null) { + dst.image = new ArrayList(); + for (DiagnosticReportImageComponent i : image) + dst.image.add(i.copy()); + }; + dst.conclusion = conclusion == null ? null : conclusion.copy(); + if (codedDiagnosis != null) { + dst.codedDiagnosis = new ArrayList(); + for (CodeableConcept i : codedDiagnosis) + dst.codedDiagnosis.add(i.copy()); + }; + if (presentedForm != null) { + dst.presentedForm = new ArrayList(); + for (Attachment i : presentedForm) + dst.presentedForm.add(i.copy()); + }; + return dst; + } + + protected DiagnosticReport typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DiagnosticReport)) + return false; + DiagnosticReport o = (DiagnosticReport) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) + && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true) + && compareDeep(request, o.request, true) && compareDeep(specimen, o.specimen, true) && compareDeep(result, o.result, true) + && compareDeep(imagingStudy, o.imagingStudy, true) && compareDeep(image, o.image, true) && compareDeep(conclusion, o.conclusion, true) + && compareDeep(codedDiagnosis, o.codedDiagnosis, true) && compareDeep(presentedForm, o.presentedForm, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DiagnosticReport)) + return false; + DiagnosticReport o = (DiagnosticReport) other; + return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(conclusion, o.conclusion, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty()) + && (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (request == null || request.isEmpty()) + && (specimen == null || specimen.isEmpty()) && (result == null || result.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty()) + && (image == null || image.isEmpty()) && (conclusion == null || conclusion.isEmpty()) && (codedDiagnosis == null || codedDiagnosis.isEmpty()) + && (presentedForm == null || presentedForm.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DiagnosticReport; + } + + @SearchParamDefinition(name="date", path="DiagnosticReport.effective[x]", description="The clinically relevant time of the report", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference" ) + public static final String SP_IMAGE = "image"; + @SearchParamDefinition(name="request", path="DiagnosticReport.request", description="Reference to the test or procedure request.", type="reference" ) + public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="code", path="DiagnosticReport.code", description="The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token" ) + public static final String SP_DIAGNOSIS = "diagnosis"; + @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" ) + public static final String SP_RESULT = "result"; + @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference" ) + public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) + public static final String SP_ISSUED = "issued"; + @SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Distance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Distance.java new file mode 100644 index 00000000000..373a624c156 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Distance.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Distance", profileOf=Quantity.class) +public class Distance extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public Distance copy() { + Distance dst = new Distance(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Distance typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Distance)) + return false; + Distance o = (Distance) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Distance)) + return false; + Distance o = (Distance) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentManifest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentManifest.java new file mode 100644 index 00000000000..a3d6e83d9c1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentManifest.java @@ -0,0 +1,1167 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A manifest that defines a set of documents. + */ +@ResourceDef(name="DocumentManifest", profile="http://hl7.org/fhir/Profile/DocumentManifest") +public class DocumentManifest extends DomainResource { + + @Block() + public static class DocumentManifestContentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed. + */ + @Child(name = "p", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." ) + protected Type p; + + private static final long serialVersionUID = -347538500L; + + /* + * Constructor + */ + public DocumentManifestContentComponent() { + super(); + } + + /* + * Constructor + */ + public DocumentManifestContentComponent(Type p) { + super(); + this.p = p; + } + + /** + * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + */ + public Type getP() { + return this.p; + } + + /** + * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + */ + public Attachment getPAttachment() throws FHIRException { + if (!(this.p instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.p.getClass().getName()+" was encountered"); + return (Attachment) this.p; + } + + public boolean hasPAttachment() { + return this.p instanceof Attachment; + } + + /** + * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + */ + public Reference getPReference() throws FHIRException { + if (!(this.p instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.p.getClass().getName()+" was encountered"); + return (Reference) this.p; + } + + public boolean hasPReference() { + return this.p instanceof Reference; + } + + public boolean hasP() { + return this.p != null && !this.p.isEmpty(); + } + + /** + * @param value {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + */ + public DocumentManifestContentComponent setP(Type value) { + this.p = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, java.lang.Integer.MAX_VALUE, p)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("p[x]")) + this.p = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("pAttachment")) { + this.p = new Attachment(); + return this.p; + } + else if (name.equals("pReference")) { + this.p = new Reference(); + return this.p; + } + else + return super.addChild(name); + } + + public DocumentManifestContentComponent copy() { + DocumentManifestContentComponent dst = new DocumentManifestContentComponent(); + copyValues(dst); + dst.p = p == null ? null : p.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentManifestContentComponent)) + return false; + DocumentManifestContentComponent o = (DocumentManifestContentComponent) other; + return compareDeep(p, o.p, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentManifestContentComponent)) + return false; + DocumentManifestContentComponent o = (DocumentManifestContentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (p == null || p.isEmpty()); + } + + public String fhirType() { + return "DocumentManifest.content"; + + } + + } + + @Block() + public static class DocumentManifestRelatedComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers." ) + protected Identifier identifier; + + /** + * Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc. + */ + @Child(name = "ref", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc." ) + protected Reference ref; + + /** + * The actual object that is the target of the reference (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.) + */ + protected Resource refTarget; + + private static final long serialVersionUID = -1670123330L; + + /* + * Constructor + */ + public DocumentManifestRelatedComponent() { + super(); + } + + /** + * @return {@link #identifier} (Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.) + */ + public DocumentManifestRelatedComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #ref} (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.) + */ + public Reference getRef() { + if (this.ref == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.ref"); + else if (Configuration.doAutoCreate()) + this.ref = new Reference(); // cc + return this.ref; + } + + public boolean hasRef() { + return this.ref != null && !this.ref.isEmpty(); + } + + /** + * @param value {@link #ref} (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.) + */ + public DocumentManifestRelatedComponent setRef(Reference value) { + this.ref = value; + return this; + } + + /** + * @return {@link #ref} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.) + */ + public Resource getRefTarget() { + return this.refTarget; + } + + /** + * @param value {@link #ref} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.) + */ + public DocumentManifestRelatedComponent setRefTarget(Resource value) { + this.refTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.", 0, java.lang.Integer.MAX_VALUE, ref)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("ref")) + this.ref = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("ref")) { + this.ref = new Reference(); + return this.ref; + } + else + return super.addChild(name); + } + + public DocumentManifestRelatedComponent copy() { + DocumentManifestRelatedComponent dst = new DocumentManifestRelatedComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.ref = ref == null ? null : ref.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentManifestRelatedComponent)) + return false; + DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(ref, o.ref, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentManifestRelatedComponent)) + return false; + DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty()) + ; + } + + public String fhirType() { + return "DocumentManifest.related"; + + } + + } + + /** + * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts. + */ + @Child(name = "masterIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique Identifier for the set of documents", formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." ) + protected Identifier masterIdentifier; + + /** + * Other identifiers associated with the document manifest, including version independent identifiers. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document manifest, including version independent identifiers." ) + protected List identifier; + + /** + * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case). + */ + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The subject of the set of documents", formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) + */ + protected Resource subjectTarget; + + /** + * A patient, practitioner, or organization for which this set of documents is intended. + */ + @Child(name = "recipient", type = {Patient.class, Practitioner.class, RelatedPerson.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." ) + protected List recipient; + /** + * The actual objects that are the target of the reference (A patient, practitioner, or organization for which this set of documents is intended.) + */ + protected List recipientTarget; + + + /** + * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of document set", formalDefinition="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider." ) + protected CodeableConcept type; + + /** + * Identifies who is responsible for creating the manifest, and adding documents to it. + */ + @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what authored the manifest", formalDefinition="Identifies who is responsible for creating the manifest, and adding documents to it." ) + protected List author; + /** + * The actual objects that are the target of the reference (Identifies who is responsible for creating the manifest, and adding documents to it.) + */ + protected List authorTarget; + + + /** + * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)." ) + protected DateTimeType created; + + /** + * Identifies the source system, application, or software that produced the document manifest. + */ + @Child(name = "source", type = {UriType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." ) + protected UriType source; + + /** + * The status of this document manifest. + */ + @Child(name = "status", type = {CodeType.class}, order=8, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document manifest." ) + protected Enumeration status; + + /** + * Human-readable description of the source document. This is sometimes known as the "title". + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." ) + protected StringType description; + + /** + * The list of Documents included in the manifest. + */ + @Child(name = "content", type = {}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The items included", formalDefinition="The list of Documents included in the manifest." ) + protected List content; + + /** + * Related identifiers or resources associated with the DocumentManifest. + */ + @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Related things", formalDefinition="Related identifiers or resources associated with the DocumentManifest." ) + protected List related; + + private static final long serialVersionUID = -2056683927L; + + /* + * Constructor + */ + public DocumentManifest() { + super(); + } + + /* + * Constructor + */ + public DocumentManifest(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.) + */ + public Identifier getMasterIdentifier() { + if (this.masterIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.masterIdentifier"); + else if (Configuration.doAutoCreate()) + this.masterIdentifier = new Identifier(); // cc + return this.masterIdentifier; + } + + public boolean hasMasterIdentifier() { + return this.masterIdentifier != null && !this.masterIdentifier.isEmpty(); + } + + /** + * @param value {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.) + */ + public DocumentManifest setMasterIdentifier(Identifier value) { + this.masterIdentifier = value; + return this; + } + + /** + * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent identifiers.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent identifiers.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DocumentManifest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) + */ + public DocumentManifest setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) + */ + public DocumentManifest setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.) + */ + public List getRecipient() { + if (this.recipient == null) + this.recipient = new ArrayList(); + return this.recipient; + } + + public boolean hasRecipient() { + if (this.recipient == null) + return false; + for (Reference item : this.recipient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.) + */ + // syntactic sugar + public Reference addRecipient() { //3 + Reference t = new Reference(); + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return t; + } + + // syntactic sugar + public DocumentManifest addRecipient(Reference t) { //3 + if (t == null) + return this; + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return this; + } + + /** + * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A patient, practitioner, or organization for which this set of documents is intended.) + */ + public List getRecipientTarget() { + if (this.recipientTarget == null) + this.recipientTarget = new ArrayList(); + return this.recipientTarget; + } + + /** + * @return {@link #type} (Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.) + */ + public DocumentManifest setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #author} (Identifies who is responsible for creating the manifest, and adding documents to it.) + */ + public List getAuthor() { + if (this.author == null) + this.author = new ArrayList(); + return this.author; + } + + public boolean hasAuthor() { + if (this.author == null) + return false; + for (Reference item : this.author) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #author} (Identifies who is responsible for creating the manifest, and adding documents to it.) + */ + // syntactic sugar + public Reference addAuthor() { //3 + Reference t = new Reference(); + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return t; + } + + // syntactic sugar + public DocumentManifest addAuthor(Reference t) { //3 + if (t == null) + return this; + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return this; + } + + /** + * @return {@link #author} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies who is responsible for creating the manifest, and adding documents to it.) + */ + public List getAuthorTarget() { + if (this.authorTarget == null) + this.authorTarget = new ArrayList(); + return this.authorTarget; + } + + /** + * @return {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DocumentManifest setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). + */ + public DocumentManifest setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value + */ + public UriType getSourceElement() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.source"); + else if (Configuration.doAutoCreate()) + this.source = new UriType(); // bb + return this.source; + } + + public boolean hasSourceElement() { + return this.source != null && !this.source.isEmpty(); + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value + */ + public DocumentManifest setSourceElement(UriType value) { + this.source = value; + return this; + } + + /** + * @return Identifies the source system, application, or software that produced the document manifest. + */ + public String getSource() { + return this.source == null ? null : this.source.getValue(); + } + + /** + * @param value Identifies the source system, application, or software that produced the document manifest. + */ + public DocumentManifest setSource(String value) { + if (Utilities.noString(value)) + this.source = null; + else { + if (this.source == null) + this.source = new UriType(); + this.source.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DocumentReferenceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DocumentManifest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this document manifest. + */ + public DocumentReferenceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this document manifest. + */ + public DocumentManifest setStatus(DocumentReferenceStatus value) { + if (this.status == null) + this.status = new Enumeration(new DocumentReferenceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifest.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public DocumentManifest setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Human-readable description of the source document. This is sometimes known as the "title". + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Human-readable description of the source document. This is sometimes known as the "title". + */ + public DocumentManifest setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #content} (The list of Documents included in the manifest.) + */ + public List getContent() { + if (this.content == null) + this.content = new ArrayList(); + return this.content; + } + + public boolean hasContent() { + if (this.content == null) + return false; + for (DocumentManifestContentComponent item : this.content) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #content} (The list of Documents included in the manifest.) + */ + // syntactic sugar + public DocumentManifestContentComponent addContent() { //3 + DocumentManifestContentComponent t = new DocumentManifestContentComponent(); + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return t; + } + + // syntactic sugar + public DocumentManifest addContent(DocumentManifestContentComponent t) { //3 + if (t == null) + return this; + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return this; + } + + /** + * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.) + */ + public List getRelated() { + if (this.related == null) + this.related = new ArrayList(); + return this.related; + } + + public boolean hasRelated() { + if (this.related == null) + return false; + for (DocumentManifestRelatedComponent item : this.related) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.) + */ + // syntactic sugar + public DocumentManifestRelatedComponent addRelated() { //3 + DocumentManifestRelatedComponent t = new DocumentManifestRelatedComponent(); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return t; + } + + // syntactic sugar + public DocumentManifest addRelated(DocumentManifestRelatedComponent t) { //3 + if (t == null) + return this; + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("masterIdentifier", "Identifier", "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", 0, java.lang.Integer.MAX_VALUE, masterIdentifier)); + childrenList.add(new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("recipient", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient)); + childrenList.add(new Property("type", "CodeableConcept", "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for creating the manifest, and adding documents to it.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("status", "code", "The status of this document manifest.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("content", "", "The list of Documents included in the manifest.", 0, java.lang.Integer.MAX_VALUE, content)); + childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("masterIdentifier")) + this.masterIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("recipient")) + this.getRecipient().add(castToReference(value)); + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("author")) + this.getAuthor().add(castToReference(value)); + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("source")) + this.source = castToUri(value); // UriType + else if (name.equals("status")) + this.status = new DocumentReferenceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("content")) + this.getContent().add((DocumentManifestContentComponent) value); + else if (name.equals("related")) + this.getRelated().add((DocumentManifestRelatedComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("masterIdentifier")) { + this.masterIdentifier = new Identifier(); + return this.masterIdentifier; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("recipient")) { + return addRecipient(); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("author")) { + return addAuthor(); + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created"); + } + else if (name.equals("source")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.source"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.status"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.description"); + } + else if (name.equals("content")) { + return addContent(); + } + else if (name.equals("related")) { + return addRelated(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DocumentManifest"; + + } + + public DocumentManifest copy() { + DocumentManifest dst = new DocumentManifest(); + copyValues(dst); + dst.masterIdentifier = masterIdentifier == null ? null : masterIdentifier.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + if (recipient != null) { + dst.recipient = new ArrayList(); + for (Reference i : recipient) + dst.recipient.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + if (author != null) { + dst.author = new ArrayList(); + for (Reference i : author) + dst.author.add(i.copy()); + }; + dst.created = created == null ? null : created.copy(); + dst.source = source == null ? null : source.copy(); + dst.status = status == null ? null : status.copy(); + dst.description = description == null ? null : description.copy(); + if (content != null) { + dst.content = new ArrayList(); + for (DocumentManifestContentComponent i : content) + dst.content.add(i.copy()); + }; + if (related != null) { + dst.related = new ArrayList(); + for (DocumentManifestRelatedComponent i : related) + dst.related.add(i.copy()); + }; + return dst; + } + + protected DocumentManifest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentManifest)) + return false; + DocumentManifest o = (DocumentManifest) other; + return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(subject, o.subject, true) && compareDeep(recipient, o.recipient, true) && compareDeep(type, o.type, true) + && compareDeep(author, o.author, true) && compareDeep(created, o.created, true) && compareDeep(source, o.source, true) + && compareDeep(status, o.status, true) && compareDeep(description, o.description, true) && compareDeep(content, o.content, true) + && compareDeep(related, o.related, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentManifest)) + return false; + DocumentManifest o = (DocumentManifest) other; + return compareValues(created, o.created, true) && compareValues(source, o.source, true) && compareValues(status, o.status, true) + && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (subject == null || subject.isEmpty()) && (recipient == null || recipient.isEmpty()) && (type == null || type.isEmpty()) + && (author == null || author.isEmpty()) && (created == null || created.isEmpty()) && (source == null || source.isEmpty()) + && (status == null || status.isEmpty()) && (description == null || description.isEmpty()) + && (content == null || content.isEmpty()) && (related == null || related.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DocumentManifest; + } + + @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier|DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" ) + public static final String SP_RELATEDID = "related-id"; + @SearchParamDefinition(name="content-ref", path="DocumentManifest.content.pReference", description="Contents of this set of documents", type="reference" ) + public static final String SP_CONTENTREF = "content-ref"; + @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" ) + public static final String SP_RELATEDREF = "related-ref"; + @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" ) + public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentReference.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentReference.java new file mode 100644 index 00000000000..570a4cc747f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DocumentReference.java @@ -0,0 +1,2199 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A reference to a document . + */ +@ResourceDef(name="DocumentReference", profile="http://hl7.org/fhir/Profile/DocumentReference") +public class DocumentReference extends DomainResource { + + public enum DocumentRelationshipType { + /** + * This document logically replaces or supersedes the target document. + */ + REPLACES, + /** + * This document was generated by transforming the target document (e.g. format or language conversion). + */ + TRANSFORMS, + /** + * This document is a signature of the target document. + */ + SIGNS, + /** + * This document adds additional information to the target document. + */ + APPENDS, + /** + * added to help the parsers + */ + NULL; + public static DocumentRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replaces".equals(codeString)) + return REPLACES; + if ("transforms".equals(codeString)) + return TRANSFORMS; + if ("signs".equals(codeString)) + return SIGNS; + if ("appends".equals(codeString)) + return APPENDS; + throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REPLACES: return "replaces"; + case TRANSFORMS: return "transforms"; + case SIGNS: return "signs"; + case APPENDS: return "appends"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REPLACES: return "http://hl7.org/fhir/document-relationship-type"; + case TRANSFORMS: return "http://hl7.org/fhir/document-relationship-type"; + case SIGNS: return "http://hl7.org/fhir/document-relationship-type"; + case APPENDS: return "http://hl7.org/fhir/document-relationship-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REPLACES: return "This document logically replaces or supersedes the target document."; + case TRANSFORMS: return "This document was generated by transforming the target document (e.g. format or language conversion)."; + case SIGNS: return "This document is a signature of the target document."; + case APPENDS: return "This document adds additional information to the target document."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REPLACES: return "Replaces"; + case TRANSFORMS: return "Transforms"; + case SIGNS: return "Signs"; + case APPENDS: return "Appends"; + default: return "?"; + } + } + } + + public static class DocumentRelationshipTypeEnumFactory implements EnumFactory { + public DocumentRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("replaces".equals(codeString)) + return DocumentRelationshipType.REPLACES; + if ("transforms".equals(codeString)) + return DocumentRelationshipType.TRANSFORMS; + if ("signs".equals(codeString)) + return DocumentRelationshipType.SIGNS; + if ("appends".equals(codeString)) + return DocumentRelationshipType.APPENDS; + throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("replaces".equals(codeString)) + return new Enumeration(this, DocumentRelationshipType.REPLACES); + if ("transforms".equals(codeString)) + return new Enumeration(this, DocumentRelationshipType.TRANSFORMS); + if ("signs".equals(codeString)) + return new Enumeration(this, DocumentRelationshipType.SIGNS); + if ("appends".equals(codeString)) + return new Enumeration(this, DocumentRelationshipType.APPENDS); + throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); + } + public String toCode(DocumentRelationshipType code) { + if (code == DocumentRelationshipType.REPLACES) + return "replaces"; + if (code == DocumentRelationshipType.TRANSFORMS) + return "transforms"; + if (code == DocumentRelationshipType.SIGNS) + return "signs"; + if (code == DocumentRelationshipType.APPENDS) + return "appends"; + return "?"; + } + } + + @Block() + public static class DocumentReferenceRelatesToComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of relationship that this document has with anther document. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="replaces | transforms | signs | appends", formalDefinition="The type of relationship that this document has with anther document." ) + protected Enumeration code; + + /** + * The target document of this relationship. + */ + @Child(name = "target", type = {DocumentReference.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Target of the relationship", formalDefinition="The target document of this relationship." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The target document of this relationship.) + */ + protected DocumentReference targetTarget; + + private static final long serialVersionUID = -347257495L; + + /* + * Constructor + */ + public DocumentReferenceRelatesToComponent() { + super(); + } + + /* + * Constructor + */ + public DocumentReferenceRelatesToComponent(Enumeration code, Reference target) { + super(); + this.code = code; + this.target = target; + } + + /** + * @return {@link #code} (The type of relationship that this document has with anther document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceRelatesToComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new DocumentRelationshipTypeEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The type of relationship that this document has with anther document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public DocumentReferenceRelatesToComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return The type of relationship that this document has with anther document. + */ + public DocumentRelationshipType getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value The type of relationship that this document has with anther document. + */ + public DocumentReferenceRelatesToComponent setCode(DocumentRelationshipType value) { + if (this.code == null) + this.code = new Enumeration(new DocumentRelationshipTypeEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #target} (The target document of this relationship.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceRelatesToComponent.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The target document of this relationship.) + */ + public DocumentReferenceRelatesToComponent setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The target document of this relationship.) + */ + public DocumentReference getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceRelatesToComponent.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new DocumentReference(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The target document of this relationship.) + */ + public DocumentReferenceRelatesToComponent setTargetTarget(DocumentReference value) { + this.targetTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "The type of relationship that this document has with anther document.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("target", "Reference(DocumentReference)", "The target document of this relationship.", 0, java.lang.Integer.MAX_VALUE, target)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = new DocumentRelationshipTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.code"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else + return super.addChild(name); + } + + public DocumentReferenceRelatesToComponent copy() { + DocumentReferenceRelatesToComponent dst = new DocumentReferenceRelatesToComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.target = target == null ? null : target.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReferenceRelatesToComponent)) + return false; + DocumentReferenceRelatesToComponent o = (DocumentReferenceRelatesToComponent) other; + return compareDeep(code, o.code, true) && compareDeep(target, o.target, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReferenceRelatesToComponent)) + return false; + DocumentReferenceRelatesToComponent o = (DocumentReferenceRelatesToComponent) other; + return compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (target == null || target.isEmpty()) + ; + } + + public String fhirType() { + return "DocumentReference.relatesTo"; + + } + + } + + @Block() + public static class DocumentReferenceContentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The document or url of the document along with critical metadata to prove content has integrity. + */ + @Child(name = "attachment", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where to access the document", formalDefinition="The document or url of the document along with critical metadata to prove content has integrity." ) + protected Attachment attachment; + + /** + * An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType. + */ + @Child(name = "format", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Format/content rules for the document", formalDefinition="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType." ) + protected List format; + + private static final long serialVersionUID = -1412643085L; + + /* + * Constructor + */ + public DocumentReferenceContentComponent() { + super(); + } + + /* + * Constructor + */ + public DocumentReferenceContentComponent(Attachment attachment) { + super(); + this.attachment = attachment; + } + + /** + * @return {@link #attachment} (The document or url of the document along with critical metadata to prove content has integrity.) + */ + public Attachment getAttachment() { + if (this.attachment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContentComponent.attachment"); + else if (Configuration.doAutoCreate()) + this.attachment = new Attachment(); // cc + return this.attachment; + } + + public boolean hasAttachment() { + return this.attachment != null && !this.attachment.isEmpty(); + } + + /** + * @param value {@link #attachment} (The document or url of the document along with critical metadata to prove content has integrity.) + */ + public DocumentReferenceContentComponent setAttachment(Attachment value) { + this.attachment = value; + return this; + } + + /** + * @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.) + */ + public List getFormat() { + if (this.format == null) + this.format = new ArrayList(); + return this.format; + } + + public boolean hasFormat() { + if (this.format == null) + return false; + for (Coding item : this.format) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.) + */ + // syntactic sugar + public Coding addFormat() { //3 + Coding t = new Coding(); + if (this.format == null) + this.format = new ArrayList(); + this.format.add(t); + return t; + } + + // syntactic sugar + public DocumentReferenceContentComponent addFormat(Coding t) { //3 + if (t == null) + return this; + if (this.format == null) + this.format = new ArrayList(); + this.format.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("attachment", "Attachment", "The document or url of the document along with critical metadata to prove content has integrity.", 0, java.lang.Integer.MAX_VALUE, attachment)); + childrenList.add(new Property("format", "Coding", "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", 0, java.lang.Integer.MAX_VALUE, format)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("attachment")) + this.attachment = castToAttachment(value); // Attachment + else if (name.equals("format")) + this.getFormat().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("attachment")) { + this.attachment = new Attachment(); + return this.attachment; + } + else if (name.equals("format")) { + return addFormat(); + } + else + return super.addChild(name); + } + + public DocumentReferenceContentComponent copy() { + DocumentReferenceContentComponent dst = new DocumentReferenceContentComponent(); + copyValues(dst); + dst.attachment = attachment == null ? null : attachment.copy(); + if (format != null) { + dst.format = new ArrayList(); + for (Coding i : format) + dst.format.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReferenceContentComponent)) + return false; + DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other; + return compareDeep(attachment, o.attachment, true) && compareDeep(format, o.format, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReferenceContentComponent)) + return false; + DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (attachment == null || attachment.isEmpty()) && (format == null || format.isEmpty()) + ; + } + + public String fhirType() { + return "DocumentReference.content"; + + } + + } + + @Block() + public static class DocumentReferenceContextComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes the clinical encounter or type of care that the document content is associated with. + */ + @Child(name = "encounter", type = {Encounter.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Context of the document content", formalDefinition="Describes the clinical encounter or type of care that the document content is associated with." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (Describes the clinical encounter or type of care that the document content is associated with.) + */ + protected Encounter encounterTarget; + + /** + * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act. + */ + @Child(name = "event", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Main Clinical Acts Documented", formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act." ) + protected List event; + + /** + * The time period over which the service that is described by the document was provided. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time of service that is being documented", formalDefinition="The time period over which the service that is described by the document was provided." ) + protected Period period; + + /** + * The kind of facility where the patient was seen. + */ + @Child(name = "facilityType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of facility where patient was seen", formalDefinition="The kind of facility where the patient was seen." ) + protected CodeableConcept facilityType; + + /** + * This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty. + */ + @Child(name = "practiceSetting", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional details about where the content was created (e.g. clinical specialty)", formalDefinition="This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty." ) + protected CodeableConcept practiceSetting; + + /** + * The Patient Information as known when the document was published. May be a reference to a version specific, or contained. + */ + @Child(name = "sourcePatientInfo", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient demographics from source", formalDefinition="The Patient Information as known when the document was published. May be a reference to a version specific, or contained." ) + protected Reference sourcePatientInfo; + + /** + * The actual object that is the target of the reference (The Patient Information as known when the document was published. May be a reference to a version specific, or contained.) + */ + protected Patient sourcePatientInfoTarget; + + /** + * Related identifiers or resources associated with the DocumentReference. + */ + @Child(name = "related", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Related identifiers or resources", formalDefinition="Related identifiers or resources associated with the DocumentReference." ) + protected List related; + + private static final long serialVersionUID = 994799273L; + + /* + * Constructor + */ + public DocumentReferenceContextComponent() { + super(); + } + + /** + * @return {@link #encounter} (Describes the clinical encounter or type of care that the document content is associated with.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (Describes the clinical encounter or type of care that the document content is associated with.) + */ + public DocumentReferenceContextComponent setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the clinical encounter or type of care that the document content is associated with.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the clinical encounter or type of care that the document content is associated with.) + */ + public DocumentReferenceContextComponent setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #event} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (CodeableConcept item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.) + */ + // syntactic sugar + public CodeableConcept addEvent() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + // syntactic sugar + public DocumentReferenceContextComponent addEvent(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + /** + * @return {@link #period} (The time period over which the service that is described by the document was provided.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The time period over which the service that is described by the document was provided.) + */ + public DocumentReferenceContextComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #facilityType} (The kind of facility where the patient was seen.) + */ + public CodeableConcept getFacilityType() { + if (this.facilityType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.facilityType"); + else if (Configuration.doAutoCreate()) + this.facilityType = new CodeableConcept(); // cc + return this.facilityType; + } + + public boolean hasFacilityType() { + return this.facilityType != null && !this.facilityType.isEmpty(); + } + + /** + * @param value {@link #facilityType} (The kind of facility where the patient was seen.) + */ + public DocumentReferenceContextComponent setFacilityType(CodeableConcept value) { + this.facilityType = value; + return this; + } + + /** + * @return {@link #practiceSetting} (This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.) + */ + public CodeableConcept getPracticeSetting() { + if (this.practiceSetting == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.practiceSetting"); + else if (Configuration.doAutoCreate()) + this.practiceSetting = new CodeableConcept(); // cc + return this.practiceSetting; + } + + public boolean hasPracticeSetting() { + return this.practiceSetting != null && !this.practiceSetting.isEmpty(); + } + + /** + * @param value {@link #practiceSetting} (This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.) + */ + public DocumentReferenceContextComponent setPracticeSetting(CodeableConcept value) { + this.practiceSetting = value; + return this; + } + + /** + * @return {@link #sourcePatientInfo} (The Patient Information as known when the document was published. May be a reference to a version specific, or contained.) + */ + public Reference getSourcePatientInfo() { + if (this.sourcePatientInfo == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.sourcePatientInfo"); + else if (Configuration.doAutoCreate()) + this.sourcePatientInfo = new Reference(); // cc + return this.sourcePatientInfo; + } + + public boolean hasSourcePatientInfo() { + return this.sourcePatientInfo != null && !this.sourcePatientInfo.isEmpty(); + } + + /** + * @param value {@link #sourcePatientInfo} (The Patient Information as known when the document was published. May be a reference to a version specific, or contained.) + */ + public DocumentReferenceContextComponent setSourcePatientInfo(Reference value) { + this.sourcePatientInfo = value; + return this; + } + + /** + * @return {@link #sourcePatientInfo} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Patient Information as known when the document was published. May be a reference to a version specific, or contained.) + */ + public Patient getSourcePatientInfoTarget() { + if (this.sourcePatientInfoTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextComponent.sourcePatientInfo"); + else if (Configuration.doAutoCreate()) + this.sourcePatientInfoTarget = new Patient(); // aa + return this.sourcePatientInfoTarget; + } + + /** + * @param value {@link #sourcePatientInfo} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Patient Information as known when the document was published. May be a reference to a version specific, or contained.) + */ + public DocumentReferenceContextComponent setSourcePatientInfoTarget(Patient value) { + this.sourcePatientInfoTarget = value; + return this; + } + + /** + * @return {@link #related} (Related identifiers or resources associated with the DocumentReference.) + */ + public List getRelated() { + if (this.related == null) + this.related = new ArrayList(); + return this.related; + } + + public boolean hasRelated() { + if (this.related == null) + return false; + for (DocumentReferenceContextRelatedComponent item : this.related) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #related} (Related identifiers or resources associated with the DocumentReference.) + */ + // syntactic sugar + public DocumentReferenceContextRelatedComponent addRelated() { //3 + DocumentReferenceContextRelatedComponent t = new DocumentReferenceContextRelatedComponent(); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return t; + } + + // syntactic sugar + public DocumentReferenceContextComponent addRelated(DocumentReferenceContextRelatedComponent t) { //3 + if (t == null) + return this; + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care that the document content is associated with.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("event", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("period", "Period", "The time period over which the service that is described by the document was provided.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("facilityType", "CodeableConcept", "The kind of facility where the patient was seen.", 0, java.lang.Integer.MAX_VALUE, facilityType)); + childrenList.add(new Property("practiceSetting", "CodeableConcept", "This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.", 0, java.lang.Integer.MAX_VALUE, practiceSetting)); + childrenList.add(new Property("sourcePatientInfo", "Reference(Patient)", "The Patient Information as known when the document was published. May be a reference to a version specific, or contained.", 0, java.lang.Integer.MAX_VALUE, sourcePatientInfo)); + childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentReference.", 0, java.lang.Integer.MAX_VALUE, related)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("event")) + this.getEvent().add(castToCodeableConcept(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("facilityType")) + this.facilityType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("practiceSetting")) + this.practiceSetting = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("sourcePatientInfo")) + this.sourcePatientInfo = castToReference(value); // Reference + else if (name.equals("related")) + this.getRelated().add((DocumentReferenceContextRelatedComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("event")) { + return addEvent(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("facilityType")) { + this.facilityType = new CodeableConcept(); + return this.facilityType; + } + else if (name.equals("practiceSetting")) { + this.practiceSetting = new CodeableConcept(); + return this.practiceSetting; + } + else if (name.equals("sourcePatientInfo")) { + this.sourcePatientInfo = new Reference(); + return this.sourcePatientInfo; + } + else if (name.equals("related")) { + return addRelated(); + } + else + return super.addChild(name); + } + + public DocumentReferenceContextComponent copy() { + DocumentReferenceContextComponent dst = new DocumentReferenceContextComponent(); + copyValues(dst); + dst.encounter = encounter == null ? null : encounter.copy(); + if (event != null) { + dst.event = new ArrayList(); + for (CodeableConcept i : event) + dst.event.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.facilityType = facilityType == null ? null : facilityType.copy(); + dst.practiceSetting = practiceSetting == null ? null : practiceSetting.copy(); + dst.sourcePatientInfo = sourcePatientInfo == null ? null : sourcePatientInfo.copy(); + if (related != null) { + dst.related = new ArrayList(); + for (DocumentReferenceContextRelatedComponent i : related) + dst.related.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReferenceContextComponent)) + return false; + DocumentReferenceContextComponent o = (DocumentReferenceContextComponent) other; + return compareDeep(encounter, o.encounter, true) && compareDeep(event, o.event, true) && compareDeep(period, o.period, true) + && compareDeep(facilityType, o.facilityType, true) && compareDeep(practiceSetting, o.practiceSetting, true) + && compareDeep(sourcePatientInfo, o.sourcePatientInfo, true) && compareDeep(related, o.related, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReferenceContextComponent)) + return false; + DocumentReferenceContextComponent o = (DocumentReferenceContextComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (encounter == null || encounter.isEmpty()) && (event == null || event.isEmpty()) + && (period == null || period.isEmpty()) && (facilityType == null || facilityType.isEmpty()) + && (practiceSetting == null || practiceSetting.isEmpty()) && (sourcePatientInfo == null || sourcePatientInfo.isEmpty()) + && (related == null || related.isEmpty()); + } + + public String fhirType() { + return "DocumentReference.context"; + + } + + } + + @Block() + public static class DocumentReferenceContextRelatedComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of related objects or events", formalDefinition="Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing." ) + protected Identifier identifier; + + /** + * Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing. + */ + @Child(name = "ref", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing." ) + protected Reference ref; + + /** + * The actual object that is the target of the reference (Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + protected Resource refTarget; + + private static final long serialVersionUID = -1670123330L; + + /* + * Constructor + */ + public DocumentReferenceContextRelatedComponent() { + super(); + } + + /** + * @return {@link #identifier} (Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextRelatedComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public DocumentReferenceContextRelatedComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #ref} (Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public Reference getRef() { + if (this.ref == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceContextRelatedComponent.ref"); + else if (Configuration.doAutoCreate()) + this.ref = new Reference(); // cc + return this.ref; + } + + public boolean hasRef() { + return this.ref != null && !this.ref.isEmpty(); + } + + /** + * @param value {@link #ref} (Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public DocumentReferenceContextRelatedComponent setRef(Reference value) { + this.ref = value; + return this; + } + + /** + * @return {@link #ref} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public Resource getRefTarget() { + return this.refTarget; + } + + /** + * @param value {@link #ref} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.) + */ + public DocumentReferenceContextRelatedComponent setRefTarget(Resource value) { + this.refTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.", 0, java.lang.Integer.MAX_VALUE, ref)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("ref")) + this.ref = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("ref")) { + this.ref = new Reference(); + return this.ref; + } + else + return super.addChild(name); + } + + public DocumentReferenceContextRelatedComponent copy() { + DocumentReferenceContextRelatedComponent dst = new DocumentReferenceContextRelatedComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.ref = ref == null ? null : ref.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReferenceContextRelatedComponent)) + return false; + DocumentReferenceContextRelatedComponent o = (DocumentReferenceContextRelatedComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(ref, o.ref, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReferenceContextRelatedComponent)) + return false; + DocumentReferenceContextRelatedComponent o = (DocumentReferenceContextRelatedComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty()) + ; + } + + public String fhirType() { + return "DocumentReference.context.related"; + + } + + } + + /** + * Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document. + */ + @Child(name = "masterIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Master Version Specific Identifier", formalDefinition="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document." ) + protected Identifier masterIdentifier; + + /** + * Other identifiers associated with the document, including version independent identifiers. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the document", formalDefinition="Other identifiers associated with the document, including version independent identifiers." ) + protected List identifier; + + /** + * Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). + */ + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who/what is the subject of the document", formalDefinition="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).) + */ + protected Resource subjectTarget; + + /** + * Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of document (LOINC if possible)", formalDefinition="Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced." ) + protected CodeableConcept type; + + /** + * A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type. + */ + @Child(name = "class", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Categorization of document", formalDefinition="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type." ) + protected CodeableConcept class_; + + /** + * Identifies who is responsible for adding the information to the document. + */ + @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) + protected List author; + /** + * The actual objects that are the target of the reference (Identifies who is responsible for adding the information to the document.) + */ + protected List authorTarget; + + + /** + * Identifies the organization or group who is responsible for ongoing maintenance of and access to the document. + */ + @Child(name = "custodian", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization which maintains the document", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." ) + protected Reference custodian; + + /** + * The actual object that is the target of the reference (Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.) + */ + protected Organization custodianTarget; + + /** + * Which person or organization authenticates that this document is valid. + */ + @Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who/what authenticated the document", formalDefinition="Which person or organization authenticates that this document is valid." ) + protected Reference authenticator; + + /** + * The actual object that is the target of the reference (Which person or organization authenticates that this document is valid.) + */ + protected Resource authenticatorTarget; + + /** + * When the document was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Document creation time", formalDefinition="When the document was created." ) + protected DateTimeType created; + + /** + * When the document reference was created. + */ + @Child(name = "indexed", type = {InstantType.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="When this document reference created", formalDefinition="When the document reference was created." ) + protected InstantType indexed; + + /** + * The status of this document reference. + */ + @Child(name = "status", type = {CodeType.class}, order=10, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document reference." ) + protected Enumeration status; + + /** + * The status of the underlying document. + */ + @Child(name = "docStatus", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The status of the underlying document." ) + protected CodeableConcept docStatus; + + /** + * Relationships that this document has with other document references that already exist. + */ + @Child(name = "relatesTo", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=true) + @Description(shortDefinition="Relationships to other documents", formalDefinition="Relationships that this document has with other document references that already exist." ) + protected List relatesTo; + + /** + * Human-readable description of the source document. This is sometimes known as the "title". + */ + @Child(name = "description", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." ) + protected StringType description; + + /** + * A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to. + */ + @Child(name = "securityLabel", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Document security-tags", formalDefinition="A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to." ) + protected List securityLabel; + + /** + * The document and format referenced. There may be multiple content element repetitions, each with a different format. + */ + @Child(name = "content", type = {}, order=15, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Document referenced", formalDefinition="The document and format referenced. There may be multiple content element repetitions, each with a different format." ) + protected List content; + + /** + * The clinical context in which the document was prepared. + */ + @Child(name = "context", type = {}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Clinical context of document", formalDefinition="The clinical context in which the document was prepared." ) + protected DocumentReferenceContextComponent context; + + private static final long serialVersionUID = -1009325322L; + + /* + * Constructor + */ + public DocumentReference() { + super(); + } + + /* + * Constructor + */ + public DocumentReference(CodeableConcept type, InstantType indexed, Enumeration status) { + super(); + this.type = type; + this.indexed = indexed; + this.status = status; + } + + /** + * @return {@link #masterIdentifier} (Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.) + */ + public Identifier getMasterIdentifier() { + if (this.masterIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.masterIdentifier"); + else if (Configuration.doAutoCreate()) + this.masterIdentifier = new Identifier(); // cc + return this.masterIdentifier; + } + + public boolean hasMasterIdentifier() { + return this.masterIdentifier != null && !this.masterIdentifier.isEmpty(); + } + + /** + * @param value {@link #masterIdentifier} (Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.) + */ + public DocumentReference setMasterIdentifier(Identifier value) { + this.masterIdentifier = value; + return this; + } + + /** + * @return {@link #identifier} (Other identifiers associated with the document, including version independent identifiers.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Other identifiers associated with the document, including version independent identifiers.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public DocumentReference addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).) + */ + public DocumentReference setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).) + */ + public DocumentReference setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #type} (Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.) + */ + public DocumentReference setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #class_} (A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.) + */ + public CodeableConcept getClass_() { + if (this.class_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.class_"); + else if (Configuration.doAutoCreate()) + this.class_ = new CodeableConcept(); // cc + return this.class_; + } + + public boolean hasClass_() { + return this.class_ != null && !this.class_.isEmpty(); + } + + /** + * @param value {@link #class_} (A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.) + */ + public DocumentReference setClass_(CodeableConcept value) { + this.class_ = value; + return this; + } + + /** + * @return {@link #author} (Identifies who is responsible for adding the information to the document.) + */ + public List getAuthor() { + if (this.author == null) + this.author = new ArrayList(); + return this.author; + } + + public boolean hasAuthor() { + if (this.author == null) + return false; + for (Reference item : this.author) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #author} (Identifies who is responsible for adding the information to the document.) + */ + // syntactic sugar + public Reference addAuthor() { //3 + Reference t = new Reference(); + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return t; + } + + // syntactic sugar + public DocumentReference addAuthor(Reference t) { //3 + if (t == null) + return this; + if (this.author == null) + this.author = new ArrayList(); + this.author.add(t); + return this; + } + + /** + * @return {@link #author} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies who is responsible for adding the information to the document.) + */ + public List getAuthorTarget() { + if (this.authorTarget == null) + this.authorTarget = new ArrayList(); + return this.authorTarget; + } + + /** + * @return {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.) + */ + public Reference getCustodian() { + if (this.custodian == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.custodian"); + else if (Configuration.doAutoCreate()) + this.custodian = new Reference(); // cc + return this.custodian; + } + + public boolean hasCustodian() { + return this.custodian != null && !this.custodian.isEmpty(); + } + + /** + * @param value {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.) + */ + public DocumentReference setCustodian(Reference value) { + this.custodian = value; + return this; + } + + /** + * @return {@link #custodian} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.) + */ + public Organization getCustodianTarget() { + if (this.custodianTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.custodian"); + else if (Configuration.doAutoCreate()) + this.custodianTarget = new Organization(); // aa + return this.custodianTarget; + } + + /** + * @param value {@link #custodian} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.) + */ + public DocumentReference setCustodianTarget(Organization value) { + this.custodianTarget = value; + return this; + } + + /** + * @return {@link #authenticator} (Which person or organization authenticates that this document is valid.) + */ + public Reference getAuthenticator() { + if (this.authenticator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.authenticator"); + else if (Configuration.doAutoCreate()) + this.authenticator = new Reference(); // cc + return this.authenticator; + } + + public boolean hasAuthenticator() { + return this.authenticator != null && !this.authenticator.isEmpty(); + } + + /** + * @param value {@link #authenticator} (Which person or organization authenticates that this document is valid.) + */ + public DocumentReference setAuthenticator(Reference value) { + this.authenticator = value; + return this; + } + + /** + * @return {@link #authenticator} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Which person or organization authenticates that this document is valid.) + */ + public Resource getAuthenticatorTarget() { + return this.authenticatorTarget; + } + + /** + * @param value {@link #authenticator} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Which person or organization authenticates that this document is valid.) + */ + public DocumentReference setAuthenticatorTarget(Resource value) { + this.authenticatorTarget = value; + return this; + } + + /** + * @return {@link #created} (When the document was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (When the document was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DocumentReference setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return When the document was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value When the document was created. + */ + public DocumentReference setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #indexed} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getIndexed" gives direct access to the value + */ + public InstantType getIndexedElement() { + if (this.indexed == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.indexed"); + else if (Configuration.doAutoCreate()) + this.indexed = new InstantType(); // bb + return this.indexed; + } + + public boolean hasIndexedElement() { + return this.indexed != null && !this.indexed.isEmpty(); + } + + public boolean hasIndexed() { + return this.indexed != null && !this.indexed.isEmpty(); + } + + /** + * @param value {@link #indexed} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getIndexed" gives direct access to the value + */ + public DocumentReference setIndexedElement(InstantType value) { + this.indexed = value; + return this; + } + + /** + * @return When the document reference was created. + */ + public Date getIndexed() { + return this.indexed == null ? null : this.indexed.getValue(); + } + + /** + * @param value When the document reference was created. + */ + public DocumentReference setIndexed(Date value) { + if (this.indexed == null) + this.indexed = new InstantType(); + this.indexed.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of this document reference.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DocumentReferenceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this document reference.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DocumentReference setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this document reference. + */ + public DocumentReferenceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this document reference. + */ + public DocumentReference setStatus(DocumentReferenceStatus value) { + if (this.status == null) + this.status = new Enumeration(new DocumentReferenceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #docStatus} (The status of the underlying document.) + */ + public CodeableConcept getDocStatus() { + if (this.docStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.docStatus"); + else if (Configuration.doAutoCreate()) + this.docStatus = new CodeableConcept(); // cc + return this.docStatus; + } + + public boolean hasDocStatus() { + return this.docStatus != null && !this.docStatus.isEmpty(); + } + + /** + * @param value {@link #docStatus} (The status of the underlying document.) + */ + public DocumentReference setDocStatus(CodeableConcept value) { + this.docStatus = value; + return this; + } + + /** + * @return {@link #relatesTo} (Relationships that this document has with other document references that already exist.) + */ + public List getRelatesTo() { + if (this.relatesTo == null) + this.relatesTo = new ArrayList(); + return this.relatesTo; + } + + public boolean hasRelatesTo() { + if (this.relatesTo == null) + return false; + for (DocumentReferenceRelatesToComponent item : this.relatesTo) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #relatesTo} (Relationships that this document has with other document references that already exist.) + */ + // syntactic sugar + public DocumentReferenceRelatesToComponent addRelatesTo() { //3 + DocumentReferenceRelatesToComponent t = new DocumentReferenceRelatesToComponent(); + if (this.relatesTo == null) + this.relatesTo = new ArrayList(); + this.relatesTo.add(t); + return t; + } + + // syntactic sugar + public DocumentReference addRelatesTo(DocumentReferenceRelatesToComponent t) { //3 + if (t == null) + return this; + if (this.relatesTo == null) + this.relatesTo = new ArrayList(); + this.relatesTo.add(t); + return this; + } + + /** + * @return {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public DocumentReference setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Human-readable description of the source document. This is sometimes known as the "title". + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Human-readable description of the source document. This is sometimes known as the "title". + */ + public DocumentReference setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #securityLabel} (A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.) + */ + public List getSecurityLabel() { + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + return this.securityLabel; + } + + public boolean hasSecurityLabel() { + if (this.securityLabel == null) + return false; + for (CodeableConcept item : this.securityLabel) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #securityLabel} (A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.) + */ + // syntactic sugar + public CodeableConcept addSecurityLabel() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + this.securityLabel.add(t); + return t; + } + + // syntactic sugar + public DocumentReference addSecurityLabel(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.securityLabel == null) + this.securityLabel = new ArrayList(); + this.securityLabel.add(t); + return this; + } + + /** + * @return {@link #content} (The document and format referenced. There may be multiple content element repetitions, each with a different format.) + */ + public List getContent() { + if (this.content == null) + this.content = new ArrayList(); + return this.content; + } + + public boolean hasContent() { + if (this.content == null) + return false; + for (DocumentReferenceContentComponent item : this.content) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #content} (The document and format referenced. There may be multiple content element repetitions, each with a different format.) + */ + // syntactic sugar + public DocumentReferenceContentComponent addContent() { //3 + DocumentReferenceContentComponent t = new DocumentReferenceContentComponent(); + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return t; + } + + // syntactic sugar + public DocumentReference addContent(DocumentReferenceContentComponent t) { //3 + if (t == null) + return this; + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return this; + } + + /** + * @return {@link #context} (The clinical context in which the document was prepared.) + */ + public DocumentReferenceContextComponent getContext() { + if (this.context == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReference.context"); + else if (Configuration.doAutoCreate()) + this.context = new DocumentReferenceContextComponent(); // cc + return this.context; + } + + public boolean hasContext() { + return this.context != null && !this.context.isEmpty(); + } + + /** + * @param value {@link #context} (The clinical context in which the document was prepared.) + */ + public DocumentReference setContext(DocumentReferenceContextComponent value) { + this.context = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("masterIdentifier", "Identifier", "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", 0, java.lang.Integer.MAX_VALUE, masterIdentifier)); + childrenList.add(new Property("identifier", "Identifier", "Other identifiers associated with the document, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("type", "CodeableConcept", "Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("class", "CodeableConcept", "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", 0, java.lang.Integer.MAX_VALUE, class_)); + childrenList.add(new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", 0, java.lang.Integer.MAX_VALUE, custodian)); + childrenList.add(new Property("authenticator", "Reference(Practitioner|Organization)", "Which person or organization authenticates that this document is valid.", 0, java.lang.Integer.MAX_VALUE, authenticator)); + childrenList.add(new Property("created", "dateTime", "When the document was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("indexed", "instant", "When the document reference was created.", 0, java.lang.Integer.MAX_VALUE, indexed)); + childrenList.add(new Property("status", "code", "The status of this document reference.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("docStatus", "CodeableConcept", "The status of the underlying document.", 0, java.lang.Integer.MAX_VALUE, docStatus)); + childrenList.add(new Property("relatesTo", "", "Relationships that this document has with other document references that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo)); + childrenList.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("securityLabel", "CodeableConcept", "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); + childrenList.add(new Property("content", "", "The document and format referenced. There may be multiple content element repetitions, each with a different format.", 0, java.lang.Integer.MAX_VALUE, content)); + childrenList.add(new Property("context", "", "The clinical context in which the document was prepared.", 0, java.lang.Integer.MAX_VALUE, context)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("masterIdentifier")) + this.masterIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("class")) + this.class_ = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("author")) + this.getAuthor().add(castToReference(value)); + else if (name.equals("custodian")) + this.custodian = castToReference(value); // Reference + else if (name.equals("authenticator")) + this.authenticator = castToReference(value); // Reference + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("indexed")) + this.indexed = castToInstant(value); // InstantType + else if (name.equals("status")) + this.status = new DocumentReferenceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("docStatus")) + this.docStatus = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("relatesTo")) + this.getRelatesTo().add((DocumentReferenceRelatesToComponent) value); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("securityLabel")) + this.getSecurityLabel().add(castToCodeableConcept(value)); + else if (name.equals("content")) + this.getContent().add((DocumentReferenceContentComponent) value); + else if (name.equals("context")) + this.context = (DocumentReferenceContextComponent) value; // DocumentReferenceContextComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("masterIdentifier")) { + this.masterIdentifier = new Identifier(); + return this.masterIdentifier; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("class")) { + this.class_ = new CodeableConcept(); + return this.class_; + } + else if (name.equals("author")) { + return addAuthor(); + } + else if (name.equals("custodian")) { + this.custodian = new Reference(); + return this.custodian; + } + else if (name.equals("authenticator")) { + this.authenticator = new Reference(); + return this.authenticator; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.created"); + } + else if (name.equals("indexed")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.indexed"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.status"); + } + else if (name.equals("docStatus")) { + this.docStatus = new CodeableConcept(); + return this.docStatus; + } + else if (name.equals("relatesTo")) { + return addRelatesTo(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.description"); + } + else if (name.equals("securityLabel")) { + return addSecurityLabel(); + } + else if (name.equals("content")) { + return addContent(); + } + else if (name.equals("context")) { + this.context = new DocumentReferenceContextComponent(); + return this.context; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DocumentReference"; + + } + + public DocumentReference copy() { + DocumentReference dst = new DocumentReference(); + copyValues(dst); + dst.masterIdentifier = masterIdentifier == null ? null : masterIdentifier.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.type = type == null ? null : type.copy(); + dst.class_ = class_ == null ? null : class_.copy(); + if (author != null) { + dst.author = new ArrayList(); + for (Reference i : author) + dst.author.add(i.copy()); + }; + dst.custodian = custodian == null ? null : custodian.copy(); + dst.authenticator = authenticator == null ? null : authenticator.copy(); + dst.created = created == null ? null : created.copy(); + dst.indexed = indexed == null ? null : indexed.copy(); + dst.status = status == null ? null : status.copy(); + dst.docStatus = docStatus == null ? null : docStatus.copy(); + if (relatesTo != null) { + dst.relatesTo = new ArrayList(); + for (DocumentReferenceRelatesToComponent i : relatesTo) + dst.relatesTo.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + if (securityLabel != null) { + dst.securityLabel = new ArrayList(); + for (CodeableConcept i : securityLabel) + dst.securityLabel.add(i.copy()); + }; + if (content != null) { + dst.content = new ArrayList(); + for (DocumentReferenceContentComponent i : content) + dst.content.add(i.copy()); + }; + dst.context = context == null ? null : context.copy(); + return dst; + } + + protected DocumentReference typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReference)) + return false; + DocumentReference o = (DocumentReference) other; + return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(subject, o.subject, true) && compareDeep(type, o.type, true) && compareDeep(class_, o.class_, true) + && compareDeep(author, o.author, true) && compareDeep(custodian, o.custodian, true) && compareDeep(authenticator, o.authenticator, true) + && compareDeep(created, o.created, true) && compareDeep(indexed, o.indexed, true) && compareDeep(status, o.status, true) + && compareDeep(docStatus, o.docStatus, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(description, o.description, true) + && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(content, o.content, true) && compareDeep(context, o.context, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReference)) + return false; + DocumentReference o = (DocumentReference) other; + return compareValues(created, o.created, true) && compareValues(indexed, o.indexed, true) && compareValues(status, o.status, true) + && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (subject == null || subject.isEmpty()) && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty()) + && (author == null || author.isEmpty()) && (custodian == null || custodian.isEmpty()) && (authenticator == null || authenticator.isEmpty()) + && (created == null || created.isEmpty()) && (indexed == null || indexed.isEmpty()) && (status == null || status.isEmpty()) + && (docStatus == null || docStatus.isEmpty()) && (relatesTo == null || relatesTo.isEmpty()) + && (description == null || description.isEmpty()) && (securityLabel == null || securityLabel.isEmpty()) + && (content == null || content.isEmpty()) && (context == null || context.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.DocumentReference; + } + + @SearchParamDefinition(name="securitylabel", path="DocumentReference.securityLabel", description="Document security-tags", type="token" ) + public static final String SP_SECURITYLABEL = "securitylabel"; + @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="language", path="DocumentReference.content.attachment.language", description="Human language of the content (BCP-47)", type="token" ) + public static final String SP_LANGUAGE = "language"; + @SearchParamDefinition(name="type", path="DocumentReference.type", description="Kind of document (LOINC if possible)", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" ) + public static final String SP_RELATION = "relation"; + @SearchParamDefinition(name="setting", path="DocumentReference.context.practiceSetting", description="Additional details about where the content was created (e.g. clinical specialty)", type="token" ) + public static final String SP_SETTING = "setting"; + @SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite" ) + public static final String SP_RELATIONSHIP = "relationship"; + @SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="class", path="DocumentReference.class", description="Categorization of document", type="token" ) + public static final String SP_CLASS = "class"; + @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/what authenticated the document", type="reference" ) + public static final String SP_AUTHENTICATOR = "authenticator"; + @SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier|DocumentReference.identifier", description="Master Version Specific Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date" ) + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name="related-id", path="DocumentReference.context.related.identifier", description="Identifier of related objects or events", type="token" ) + public static final String SP_RELATEDID = "related-id"; + @SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Organization which maintains the document", type="reference" ) + public static final String SP_CUSTODIAN = "custodian"; + @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" ) + public static final String SP_INDEXED = "indexed"; + @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="created", path="DocumentReference.created", description="Document creation time", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="format", path="DocumentReference.content.format", description="Format/content rules for the document", type="token" ) + public static final String SP_FORMAT = "format"; + @SearchParamDefinition(name="encounter", path="DocumentReference.context.encounter", description="Context of the document content", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="related-ref", path="DocumentReference.context.related.ref", description="Related Resource", type="reference" ) + public static final String SP_RELATEDREF = "related-ref"; + @SearchParamDefinition(name="location", path="DocumentReference.content.attachment.url", description="Uri where the data can be found", type="uri" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" ) + public static final String SP_RELATESTO = "relatesto"; + @SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token" ) + public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superseded | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DomainResource.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DomainResource.java new file mode 100644 index 00000000000..a3b0db02c7e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/DomainResource.java @@ -0,0 +1,302 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A resource that includes narrative, extensions, and contained resources. + */ +public abstract class DomainResource extends Resource implements IBaseHasExtensions, IBaseHasModifierExtensions, IDomainResource { + + /** + * A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. + */ + @Child(name = "text", type = {Narrative.class}, order=0, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Text summary of the resource, for human interpretation", formalDefinition="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ) + protected Narrative text; + + /** + * These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. + */ + @Child(name = "contained", type = {Resource.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contained, inline Resources", formalDefinition="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ) + protected List contained; + + /** + * May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. + */ + @Child(name = "extension", type = {Extension.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) + protected List extension; + + /** + * May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. + */ + @Child(name = "modifierExtension", type = {Extension.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=false) + @Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." ) + protected List modifierExtension; + + private static final long serialVersionUID = -970285559L; + + /* + * Constructor + */ + public DomainResource() { + super(); + } + + /** + * @return {@link #text} (A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.) + */ + public Narrative getText() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DomainResource.text"); + else if (Configuration.doAutoCreate()) + this.text = new Narrative(); // cc + return this.text; + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.) + */ + public DomainResource setText(Narrative value) { + this.text = value; + return this; + } + + /** + * @return {@link #contained} (These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.) + */ + public List getContained() { + if (this.contained == null) + this.contained = new ArrayList(); + return this.contained; + } + + public boolean hasContained() { + if (this.contained == null) + return false; + for (Resource item : this.contained) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #extension} (May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.) + */ + public List getExtension() { + if (this.extension == null) + this.extension = new ArrayList(); + return this.extension; + } + + public boolean hasExtension() { + if (this.extension == null) + return false; + for (Extension item : this.extension) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #extension} (May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.) + */ + // syntactic sugar + public Extension addExtension() { //3 + Extension t = new Extension(); + if (this.extension == null) + this.extension = new ArrayList(); + this.extension.add(t); + return t; + } + + // syntactic sugar + public DomainResource addExtension(Extension t) { //3 + if (t == null) + return this; + if (this.extension == null) + this.extension = new ArrayList(); + this.extension.add(t); + return this; + } + + /** + * @return {@link #modifierExtension} (May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.) + */ + public List getModifierExtension() { + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + return this.modifierExtension; + } + + public boolean hasModifierExtension() { + if (this.modifierExtension == null) + return false; + for (Extension item : this.modifierExtension) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifierExtension} (May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.) + */ + // syntactic sugar + public Extension addModifierExtension() { //3 + Extension t = new Extension(); + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + this.modifierExtension.add(t); + return t; + } + + // syntactic sugar + public DomainResource addModifierExtension(Extension t) { //3 + if (t == null) + return this; + if (this.modifierExtension == null) + this.modifierExtension = new ArrayList(); + this.modifierExtension.add(t); + return this; + } + + protected void listChildren(List childrenList) { + childrenList.add(new Property("text", "Narrative", "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("contained", "Resource", "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.", 0, java.lang.Integer.MAX_VALUE, contained)); + childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension)); + childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) + this.text = castToNarrative(value); // Narrative + else if (name.equals("contained")) + this.getContained().add(castToResource(value)); + else if (name.equals("extension")) + this.getExtension().add(castToExtension(value)); + else if (name.equals("modifierExtension")) + this.getModifierExtension().add(castToExtension(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + this.text = new Narrative(); + return this.text; + } + else if (name.equals("contained")) { + throw new FHIRException("Cannot call addChild on an abstract type DomainResource.contained"); + } + else if (name.equals("extension")) { + return addExtension(); + } + else if (name.equals("modifierExtension")) { + return addModifierExtension(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DomainResource"; + + } + + public abstract DomainResource copy(); + + public void copyValues(DomainResource dst) { + dst.text = text == null ? null : text.copy(); + if (contained != null) { + dst.contained = new ArrayList(); + for (Resource i : contained) + dst.contained.add(i.copy()); + }; + if (extension != null) { + dst.extension = new ArrayList(); + for (Extension i : extension) + dst.extension.add(i.copy()); + }; + if (modifierExtension != null) { + dst.modifierExtension = new ArrayList(); + for (Extension i : modifierExtension) + dst.modifierExtension.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DomainResource)) + return false; + DomainResource o = (DomainResource) other; + return compareDeep(text, o.text, true) && compareDeep(contained, o.contained, true) && compareDeep(extension, o.extension, true) + && compareDeep(modifierExtension, o.modifierExtension, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DomainResource)) + return false; + DomainResource o = (DomainResource) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (text == null || text.isEmpty()) && (contained == null || contained.isEmpty()) + && (extension == null || extension.isEmpty()) && (modifierExtension == null || modifierExtension.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Duration.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Duration.java new file mode 100644 index 00000000000..e2fb95b1e59 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Duration.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Duration", profileOf=Quantity.class) +public class Duration extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public Duration copy() { + Duration dst = new Duration(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Duration typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Duration)) + return false; + Duration o = (Duration) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Duration)) + return false; + Duration o = (Duration) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Element.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Element.java new file mode 100644 index 00000000000..3ef976e9d09 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Element.java @@ -0,0 +1,263 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Base definition for all elements in a resource. + */ +public abstract class Element extends Base implements IBaseHasExtensions { + + /** + * unique id for the element within a resource (for internal references). + */ + @Child(name = "id", type = {IdType.class}, order=0, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="xml:id (or equivalent in JSON)", formalDefinition="unique id for the element within a resource (for internal references)." ) + protected IdType id; + + /** + * May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. + */ + @Child(name = "extension", type = {Extension.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional Content defined by implementations", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ) + protected List extension; + + private static final long serialVersionUID = -158027598L; + + /* + * Constructor + */ + public Element() { + super(); + } + + /** + * @return {@link #id} (unique id for the element within a resource (for internal references).). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value + */ + public IdType getIdElement() { + if (this.id == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Element.id"); + else if (Configuration.doAutoCreate()) + this.id = new IdType(); // bb + return this.id; + } + + public boolean hasIdElement() { + return this.id != null && !this.id.isEmpty(); + } + + public boolean hasId() { + return this.id != null && !this.id.isEmpty(); + } + + /** + * @param value {@link #id} (unique id for the element within a resource (for internal references).). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value + */ + public Element setIdElement(IdType value) { + this.id = value; + return this; + } + + /** + * @return unique id for the element within a resource (for internal references). + */ + public String getId() { + return this.id == null ? null : this.id.getValue(); + } + + /** + * @param value unique id for the element within a resource (for internal references). + */ + public Element setId(String value) { + if (Utilities.noString(value)) + this.id = null; + else { + if (this.id == null) + this.id = new IdType(); + this.id.setValue(value); + } + return this; + } + + /** + * @return {@link #extension} (May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.) + */ + public List getExtension() { + if (this.extension == null) + this.extension = new ArrayList(); + return this.extension; + } + + public boolean hasExtension() { + if (this.extension == null) + return false; + for (Extension item : this.extension) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #extension} (May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.) + */ + // syntactic sugar + public Extension addExtension() { //3 + Extension t = new Extension(); + if (this.extension == null) + this.extension = new ArrayList(); + this.extension.add(t); + return t; + } + + // syntactic sugar + public Element addExtension(Extension t) { //3 + if (t == null) + return this; + if (this.extension == null) + this.extension = new ArrayList(); + this.extension.add(t); + return this; + } + + /** + * Returns an unmodifiable list containing all extensions on this element which + * match the given URL. + * + * @param theUrl The URL. Must not be blank or null. + * @return an unmodifiable list containing all extensions on this element which + * match the given URL + */ + public List getExtensionsByUrl(String theUrl) { + org.apache.commons.lang3.Validate.notBlank(theUrl, "theUrl must not be blank or null"); + ArrayList retVal = new ArrayList(); + for (Extension next : getExtension()) { + if (theUrl.equals(next.getUrl())) { + retVal.add(next); + } + } + return java.util.Collections.unmodifiableList(retVal); + } + public boolean hasExtension(String theUrl) { + return !getExtensionsByUrl(theUrl).isEmpty(); + } + + public String getExtensionString(String theUrl) throws FHIRException { + List ext = getExtensionsByUrl(theUrl); + if (ext.isEmpty()) + return null; + if (ext.size() > 1) + throw new FHIRException("Multiple matching extensions found"); + if (!ext.get(0).getValue().isPrimitive()) + throw new FHIRException("Extension could not be converted to a string"); + return ext.get(0).getValue().primitiveValue(); + } + + protected void listChildren(List childrenList) { + childrenList.add(new Property("id", "id", "unique id for the element within a resource (for internal references).", 0, java.lang.Integer.MAX_VALUE, id)); + childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("id")) + this.id = castToId(value); // IdType + else if (name.equals("extension")) + this.getExtension().add(castToExtension(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("id")) { + throw new FHIRException("Cannot call addChild on a primitive type Element.id"); + } + else if (name.equals("extension")) { + return addExtension(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Element"; + + } + + public abstract Element copy(); + + public void copyValues(Element dst) { + dst.id = id == null ? null : id.copy(); + if (extension != null) { + dst.extension = new ArrayList(); + for (Extension i : extension) + dst.extension.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Element)) + return false; + Element o = (Element) other; + return compareDeep(id, o.id, true) && compareDeep(extension, o.extension, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Element)) + return false; + Element o = (Element) other; + return compareValues(id, o.id, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (id == null || id.isEmpty()) && (extension == null || extension.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ElementDefinition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ElementDefinition.java new file mode 100644 index 00000000000..dbd1412bcd8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ElementDefinition.java @@ -0,0 +1,4719 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Captures constraints on each element within the resource, profile, or extension. + */ +@DatatypeDef(name="ElementDefinition") +public class ElementDefinition extends Type implements ICompositeType { + + public enum PropertyRepresentation { + /** + * In XML, this property is represented as an attribute not an element. + */ + XMLATTR, + /** + * added to help the parsers + */ + NULL; + public static PropertyRepresentation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xmlAttr".equals(codeString)) + return XMLATTR; + throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XMLATTR: return "xmlAttr"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case XMLATTR: return "http://hl7.org/fhir/property-representation"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case XMLATTR: return "In XML, this property is represented as an attribute not an element."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XMLATTR: return "XML Attribute"; + default: return "?"; + } + } + } + + public static class PropertyRepresentationEnumFactory implements EnumFactory { + public PropertyRepresentation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("xmlAttr".equals(codeString)) + return PropertyRepresentation.XMLATTR; + throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("xmlAttr".equals(codeString)) + return new Enumeration(this, PropertyRepresentation.XMLATTR); + throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); + } + public String toCode(PropertyRepresentation code) { + if (code == PropertyRepresentation.XMLATTR) + return "xmlAttr"; + return "?"; + } + } + + public enum SlicingRules { + /** + * No additional content is allowed other than that described by the slices in this profile. + */ + CLOSED, + /** + * Additional content is allowed anywhere in the list. + */ + OPEN, + /** + * Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required. + */ + OPENATEND, + /** + * added to help the parsers + */ + NULL; + public static SlicingRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("closed".equals(codeString)) + return CLOSED; + if ("open".equals(codeString)) + return OPEN; + if ("openAtEnd".equals(codeString)) + return OPENATEND; + throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CLOSED: return "closed"; + case OPEN: return "open"; + case OPENATEND: return "openAtEnd"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CLOSED: return "http://hl7.org/fhir/resource-slicing-rules"; + case OPEN: return "http://hl7.org/fhir/resource-slicing-rules"; + case OPENATEND: return "http://hl7.org/fhir/resource-slicing-rules"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CLOSED: return "No additional content is allowed other than that described by the slices in this profile."; + case OPEN: return "Additional content is allowed anywhere in the list."; + case OPENATEND: return "Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CLOSED: return "Closed"; + case OPEN: return "Open"; + case OPENATEND: return "Open at End"; + default: return "?"; + } + } + } + + public static class SlicingRulesEnumFactory implements EnumFactory { + public SlicingRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("closed".equals(codeString)) + return SlicingRules.CLOSED; + if ("open".equals(codeString)) + return SlicingRules.OPEN; + if ("openAtEnd".equals(codeString)) + return SlicingRules.OPENATEND; + throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("closed".equals(codeString)) + return new Enumeration(this, SlicingRules.CLOSED); + if ("open".equals(codeString)) + return new Enumeration(this, SlicingRules.OPEN); + if ("openAtEnd".equals(codeString)) + return new Enumeration(this, SlicingRules.OPENATEND); + throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); + } + public String toCode(SlicingRules code) { + if (code == SlicingRules.CLOSED) + return "closed"; + if (code == SlicingRules.OPEN) + return "open"; + if (code == SlicingRules.OPENATEND) + return "openAtEnd"; + return "?"; + } + } + + public enum AggregationMode { + /** + * The reference is a local reference to a contained resource. + */ + CONTAINED, + /** + * The reference to a resource that has to be resolved externally to the resource that includes the reference. + */ + REFERENCED, + /** + * The resource the reference points to will be found in the same bundle as the resource that includes the reference. + */ + BUNDLED, + /** + * added to help the parsers + */ + NULL; + public static AggregationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("contained".equals(codeString)) + return CONTAINED; + if ("referenced".equals(codeString)) + return REFERENCED; + if ("bundled".equals(codeString)) + return BUNDLED; + throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONTAINED: return "contained"; + case REFERENCED: return "referenced"; + case BUNDLED: return "bundled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CONTAINED: return "http://hl7.org/fhir/resource-aggregation-mode"; + case REFERENCED: return "http://hl7.org/fhir/resource-aggregation-mode"; + case BUNDLED: return "http://hl7.org/fhir/resource-aggregation-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CONTAINED: return "The reference is a local reference to a contained resource."; + case REFERENCED: return "The reference to a resource that has to be resolved externally to the resource that includes the reference."; + case BUNDLED: return "The resource the reference points to will be found in the same bundle as the resource that includes the reference."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONTAINED: return "Contained"; + case REFERENCED: return "Referenced"; + case BUNDLED: return "Bundled"; + default: return "?"; + } + } + } + + public static class AggregationModeEnumFactory implements EnumFactory { + public AggregationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("contained".equals(codeString)) + return AggregationMode.CONTAINED; + if ("referenced".equals(codeString)) + return AggregationMode.REFERENCED; + if ("bundled".equals(codeString)) + return AggregationMode.BUNDLED; + throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("contained".equals(codeString)) + return new Enumeration(this, AggregationMode.CONTAINED); + if ("referenced".equals(codeString)) + return new Enumeration(this, AggregationMode.REFERENCED); + if ("bundled".equals(codeString)) + return new Enumeration(this, AggregationMode.BUNDLED); + throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); + } + public String toCode(AggregationMode code) { + if (code == AggregationMode.CONTAINED) + return "contained"; + if (code == AggregationMode.REFERENCED) + return "referenced"; + if (code == AggregationMode.BUNDLED) + return "bundled"; + return "?"; + } + } + + public enum ConstraintSeverity { + /** + * If the constraint is violated, the resource is not conformant. + */ + ERROR, + /** + * If the constraint is violated, the resource is conformant, but it is not necessarily following best practice. + */ + WARNING, + /** + * added to help the parsers + */ + NULL; + public static ConstraintSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ERROR; + if ("warning".equals(codeString)) + return WARNING; + throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ERROR: return "error"; + case WARNING: return "warning"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ERROR: return "http://hl7.org/fhir/constraint-severity"; + case WARNING: return "http://hl7.org/fhir/constraint-severity"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ERROR: return "If the constraint is violated, the resource is not conformant."; + case WARNING: return "If the constraint is violated, the resource is conformant, but it is not necessarily following best practice."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ERROR: return "Error"; + case WARNING: return "Warning"; + default: return "?"; + } + } + } + + public static class ConstraintSeverityEnumFactory implements EnumFactory { + public ConstraintSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ConstraintSeverity.ERROR; + if ("warning".equals(codeString)) + return ConstraintSeverity.WARNING; + throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return new Enumeration(this, ConstraintSeverity.ERROR); + if ("warning".equals(codeString)) + return new Enumeration(this, ConstraintSeverity.WARNING); + throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); + } + public String toCode(ConstraintSeverity code) { + if (code == ConstraintSeverity.ERROR) + return "error"; + if (code == ConstraintSeverity.WARNING) + return "warning"; + return "?"; + } + } + + @Block() + public static class ElementDefinitionSlicingComponent extends Element implements IBaseDatatypeElement { + /** + * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices. + */ + @Child(name = "discriminator", type = {StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Element values that used to distinguish the slices", formalDefinition="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." ) + protected List discriminator; + + /** + * A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text description of how slicing works (or not)", formalDefinition="A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated." ) + protected StringType description; + + /** + * If the matching elements have to occur in the same order as defined in the profile. + */ + @Child(name = "ordered", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If elements must be in same order as slices", formalDefinition="If the matching elements have to occur in the same order as defined in the profile." ) + protected BooleanType ordered; + + /** + * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. + */ + @Child(name = "rules", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="closed | open | openAtEnd", formalDefinition="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end." ) + protected Enumeration rules; + + private static final long serialVersionUID = 233544215L; + + /* + * Constructor + */ + public ElementDefinitionSlicingComponent() { + super(); + } + + /* + * Constructor + */ + public ElementDefinitionSlicingComponent(Enumeration rules) { + super(); + this.rules = rules; + } + + /** + * @return {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.) + */ + public List getDiscriminator() { + if (this.discriminator == null) + this.discriminator = new ArrayList(); + return this.discriminator; + } + + public boolean hasDiscriminator() { + if (this.discriminator == null) + return false; + for (StringType item : this.discriminator) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.) + */ + // syntactic sugar + public StringType addDiscriminatorElement() {//2 + StringType t = new StringType(); + if (this.discriminator == null) + this.discriminator = new ArrayList(); + this.discriminator.add(t); + return t; + } + + /** + * @param value {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.) + */ + public ElementDefinitionSlicingComponent addDiscriminator(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.discriminator == null) + this.discriminator = new ArrayList(); + this.discriminator.add(t); + return this; + } + + /** + * @param value {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.) + */ + public boolean hasDiscriminator(String value) { + if (this.discriminator == null) + return false; + for (StringType v : this.discriminator) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ElementDefinitionSlicingComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. + */ + public ElementDefinitionSlicingComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value + */ + public BooleanType getOrderedElement() { + if (this.ordered == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.ordered"); + else if (Configuration.doAutoCreate()) + this.ordered = new BooleanType(); // bb + return this.ordered; + } + + public boolean hasOrderedElement() { + return this.ordered != null && !this.ordered.isEmpty(); + } + + public boolean hasOrdered() { + return this.ordered != null && !this.ordered.isEmpty(); + } + + /** + * @param value {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value + */ + public ElementDefinitionSlicingComponent setOrderedElement(BooleanType value) { + this.ordered = value; + return this; + } + + /** + * @return If the matching elements have to occur in the same order as defined in the profile. + */ + public boolean getOrdered() { + return this.ordered == null || this.ordered.isEmpty() ? false : this.ordered.getValue(); + } + + /** + * @param value If the matching elements have to occur in the same order as defined in the profile. + */ + public ElementDefinitionSlicingComponent setOrdered(boolean value) { + if (this.ordered == null) + this.ordered = new BooleanType(); + this.ordered.setValue(value); + return this; + } + + /** + * @return {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value + */ + public Enumeration getRulesElement() { + if (this.rules == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.rules"); + else if (Configuration.doAutoCreate()) + this.rules = new Enumeration(new SlicingRulesEnumFactory()); // bb + return this.rules; + } + + public boolean hasRulesElement() { + return this.rules != null && !this.rules.isEmpty(); + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + /** + * @param value {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value + */ + public ElementDefinitionSlicingComponent setRulesElement(Enumeration value) { + this.rules = value; + return this; + } + + /** + * @return Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. + */ + public SlicingRules getRules() { + return this.rules == null ? null : this.rules.getValue(); + } + + /** + * @param value Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. + */ + public ElementDefinitionSlicingComponent setRules(SlicingRules value) { + if (this.rules == null) + this.rules = new Enumeration(new SlicingRulesEnumFactory()); + this.rules.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("discriminator", "string", "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", 0, java.lang.Integer.MAX_VALUE, discriminator)); + childrenList.add(new Property("description", "string", "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("ordered", "boolean", "If the matching elements have to occur in the same order as defined in the profile.", 0, java.lang.Integer.MAX_VALUE, ordered)); + childrenList.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, java.lang.Integer.MAX_VALUE, rules)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("discriminator")) + this.getDiscriminator().add(castToString(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("ordered")) + this.ordered = castToBoolean(value); // BooleanType + else if (name.equals("rules")) + this.rules = new SlicingRulesEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("discriminator")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.discriminator"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); + } + else if (name.equals("ordered")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.ordered"); + } + else if (name.equals("rules")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.rules"); + } + else + return super.addChild(name); + } + + public ElementDefinitionSlicingComponent copy() { + ElementDefinitionSlicingComponent dst = new ElementDefinitionSlicingComponent(); + copyValues(dst); + if (discriminator != null) { + dst.discriminator = new ArrayList(); + for (StringType i : discriminator) + dst.discriminator.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + dst.ordered = ordered == null ? null : ordered.copy(); + dst.rules = rules == null ? null : rules.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinitionSlicingComponent)) + return false; + ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other; + return compareDeep(discriminator, o.discriminator, true) && compareDeep(description, o.description, true) + && compareDeep(ordered, o.ordered, true) && compareDeep(rules, o.rules, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinitionSlicingComponent)) + return false; + ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other; + return compareValues(discriminator, o.discriminator, true) && compareValues(description, o.description, true) + && compareValues(ordered, o.ordered, true) && compareValues(rules, o.rules, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (discriminator == null || discriminator.isEmpty()) && (description == null || description.isEmpty()) + && (ordered == null || ordered.isEmpty()) && (rules == null || rules.isEmpty()); + } + + public String fhirType() { + return "ElementDefinition.slicing"; + + } + + } + + @Block() + public static class ElementDefinitionBaseComponent extends Element implements IBaseDatatypeElement { + /** + * The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Path that identifies the base element", formalDefinition="The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base." ) + protected StringType path; + + /** + * Minimum cardinality of the base element identified by the path. + */ + @Child(name = "min", type = {IntegerType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Min cardinality of the base element", formalDefinition="Minimum cardinality of the base element identified by the path." ) + protected IntegerType min; + + /** + * Maximum cardinality of the base element identified by the path. + */ + @Child(name = "max", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Max cardinality of the base element", formalDefinition="Maximum cardinality of the base element identified by the path." ) + protected StringType max; + + private static final long serialVersionUID = 232204455L; + + /* + * Constructor + */ + public ElementDefinitionBaseComponent() { + super(); + } + + /* + * Constructor + */ + public ElementDefinitionBaseComponent(StringType path, IntegerType min, StringType max) { + super(); + this.path = path; + this.min = min; + this.max = max; + } + + /** + * @return {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public ElementDefinitionBaseComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. + */ + public ElementDefinitionBaseComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public IntegerType getMinElement() { + if (this.min == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.min"); + else if (Configuration.doAutoCreate()) + this.min = new IntegerType(); // bb + return this.min; + } + + public boolean hasMinElement() { + return this.min != null && !this.min.isEmpty(); + } + + public boolean hasMin() { + return this.min != null && !this.min.isEmpty(); + } + + /** + * @param value {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public ElementDefinitionBaseComponent setMinElement(IntegerType value) { + this.min = value; + return this; + } + + /** + * @return Minimum cardinality of the base element identified by the path. + */ + public int getMin() { + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); + } + + /** + * @param value Minimum cardinality of the base element identified by the path. + */ + public ElementDefinitionBaseComponent setMin(int value) { + if (this.min == null) + this.min = new IntegerType(); + this.min.setValue(value); + return this; + } + + /** + * @return {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public StringType getMaxElement() { + if (this.max == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.max"); + else if (Configuration.doAutoCreate()) + this.max = new StringType(); // bb + return this.max; + } + + public boolean hasMaxElement() { + return this.max != null && !this.max.isEmpty(); + } + + public boolean hasMax() { + return this.max != null && !this.max.isEmpty(); + } + + /** + * @param value {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public ElementDefinitionBaseComponent setMaxElement(StringType value) { + this.max = value; + return this; + } + + /** + * @return Maximum cardinality of the base element identified by the path. + */ + public String getMax() { + return this.max == null ? null : this.max.getValue(); + } + + /** + * @param value Maximum cardinality of the base element identified by the path. + */ + public ElementDefinitionBaseComponent setMax(String value) { + if (this.max == null) + this.max = new StringType(); + this.max.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("min", "integer", "Minimum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, min)); + childrenList.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, max)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("min")) + this.min = castToInteger(value); // IntegerType + else if (name.equals("max")) + this.max = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); + } + else if (name.equals("min")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); + } + else if (name.equals("max")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); + } + else + return super.addChild(name); + } + + public ElementDefinitionBaseComponent copy() { + ElementDefinitionBaseComponent dst = new ElementDefinitionBaseComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.min = min == null ? null : min.copy(); + dst.max = max == null ? null : max.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinitionBaseComponent)) + return false; + ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other; + return compareDeep(path, o.path, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinitionBaseComponent)) + return false; + ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other; + return compareValues(path, o.path, true) && compareValues(min, o.min, true) && compareValues(max, o.max, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (min == null || min.isEmpty()) + && (max == null || max.isEmpty()); + } + + public String fhirType() { + return "ElementDefinition.base"; + + } + + } + + @Block() + public static class TypeRefComponent extends Element implements IBaseDatatypeElement { + /** + * Name of Data type or Resource that is a(or the) type used for this element. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of Data type or Resource", formalDefinition="Name of Data type or Resource that is a(or the) type used for this element." ) + protected CodeType code; + + /** + * Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. + */ + @Child(name = "profile", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Profile (StructureDefinition) to apply (or IG)", formalDefinition="Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide." ) + protected List profile; + + /** + * If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle. + */ + @Child(name = "aggregation", type = {CodeType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="contained | referenced | bundled - how aggregated", formalDefinition="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle." ) + protected List> aggregation; + + private static final long serialVersionUID = -988693373L; + + /* + * Constructor + */ + public TypeRefComponent() { + super(); + } + + /* + * Constructor + */ + public TypeRefComponent(CodeType code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Name of Data type or Resource that is a(or the) type used for this element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TypeRefComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Name of Data type or Resource that is a(or the) type used for this element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public TypeRefComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return Name of Data type or Resource that is a(or the) type used for this element. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Name of Data type or Resource that is a(or the) type used for this element. + */ + public TypeRefComponent setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.) + */ + public List getProfile() { + if (this.profile == null) + this.profile = new ArrayList(); + return this.profile; + } + + public boolean hasProfile() { + if (this.profile == null) + return false; + for (UriType item : this.profile) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.) + */ + // syntactic sugar + public UriType addProfileElement() {//2 + UriType t = new UriType(); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return t; + } + + /** + * @param value {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.) + */ + public TypeRefComponent addProfile(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return this; + } + + /** + * @param value {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.) + */ + public boolean hasProfile(String value) { + if (this.profile == null) + return false; + for (UriType v : this.profile) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) + */ + public List> getAggregation() { + if (this.aggregation == null) + this.aggregation = new ArrayList>(); + return this.aggregation; + } + + public boolean hasAggregation() { + if (this.aggregation == null) + return false; + for (Enumeration item : this.aggregation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) + */ + // syntactic sugar + public Enumeration addAggregationElement() {//2 + Enumeration t = new Enumeration(new AggregationModeEnumFactory()); + if (this.aggregation == null) + this.aggregation = new ArrayList>(); + this.aggregation.add(t); + return t; + } + + /** + * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) + */ + public TypeRefComponent addAggregation(AggregationMode value) { //1 + Enumeration t = new Enumeration(new AggregationModeEnumFactory()); + t.setValue(value); + if (this.aggregation == null) + this.aggregation = new ArrayList>(); + this.aggregation.add(t); + return this; + } + + /** + * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) + */ + public boolean hasAggregation(AggregationMode value) { + if (this.aggregation == null) + return false; + for (Enumeration v : this.aggregation) + if (v.equals(value)) // code + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "Name of Data type or Resource that is a(or the) type used for this element.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("profile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("profile")) + this.getProfile().add(castToUri(value)); + else if (name.equals("aggregation")) + this.getAggregation().add(new AggregationModeEnumFactory().fromType(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.code"); + } + else if (name.equals("profile")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.profile"); + } + else if (name.equals("aggregation")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.aggregation"); + } + else + return super.addChild(name); + } + + public TypeRefComponent copy() { + TypeRefComponent dst = new TypeRefComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + if (profile != null) { + dst.profile = new ArrayList(); + for (UriType i : profile) + dst.profile.add(i.copy()); + }; + if (aggregation != null) { + dst.aggregation = new ArrayList>(); + for (Enumeration i : aggregation) + dst.aggregation.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TypeRefComponent)) + return false; + TypeRefComponent o = (TypeRefComponent) other; + return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(aggregation, o.aggregation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TypeRefComponent)) + return false; + TypeRefComponent o = (TypeRefComponent) other; + return compareValues(code, o.code, true) && compareValues(profile, o.profile, true) && compareValues(aggregation, o.aggregation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (profile == null || profile.isEmpty()) + && (aggregation == null || aggregation.isEmpty()); + } + + public String fhirType() { + return "ElementDefinition.type"; + + } + + } + + @Block() + public static class ElementDefinitionConstraintComponent extends Element implements IBaseDatatypeElement { + /** + * Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. + */ + @Child(name = "key", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Target of 'condition' reference above", formalDefinition="Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality." ) + protected IdType key; + + /** + * Description of why this constraint is necessary or appropriate. + */ + @Child(name = "requirements", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why this constraint necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." ) + protected StringType requirements; + + /** + * Identifies the impact constraint violation has on the conformance of the instance. + */ + @Child(name = "severity", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="error | warning", formalDefinition="Identifies the impact constraint violation has on the conformance of the instance." ) + protected Enumeration severity; + + /** + * Text that can be used to describe the constraint in messages identifying that the constraint has been violated. + */ + @Child(name = "human", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human description of constraint", formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated." ) + protected StringType human; + + /** + * An XPath expression of constraint that can be executed to see if this constraint is met. + */ + @Child(name = "xpath", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="XPath expression of constraint", formalDefinition="An XPath expression of constraint that can be executed to see if this constraint is met." ) + protected StringType xpath; + + private static final long serialVersionUID = 854521265L; + + /* + * Constructor + */ + public ElementDefinitionConstraintComponent() { + super(); + } + + /* + * Constructor + */ + public ElementDefinitionConstraintComponent(IdType key, Enumeration severity, StringType human, StringType xpath) { + super(); + this.key = key; + this.severity = severity; + this.human = human; + this.xpath = xpath; + } + + /** + * @return {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value + */ + public IdType getKeyElement() { + if (this.key == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.key"); + else if (Configuration.doAutoCreate()) + this.key = new IdType(); // bb + return this.key; + } + + public boolean hasKeyElement() { + return this.key != null && !this.key.isEmpty(); + } + + public boolean hasKey() { + return this.key != null && !this.key.isEmpty(); + } + + /** + * @param value {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setKeyElement(IdType value) { + this.key = value; + return this; + } + + /** + * @return Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. + */ + public String getKey() { + return this.key == null ? null : this.key.getValue(); + } + + /** + * @param value Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. + */ + public ElementDefinitionConstraintComponent setKey(String value) { + if (this.key == null) + this.key = new IdType(); + this.key.setValue(value); + return this; + } + + /** + * @return {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Description of why this constraint is necessary or appropriate. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Description of why this constraint is necessary or appropriate. + */ + public ElementDefinitionConstraintComponent setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public Enumeration getSeverityElement() { + if (this.severity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.severity"); + else if (Configuration.doAutoCreate()) + this.severity = new Enumeration(new ConstraintSeverityEnumFactory()); // bb + return this.severity; + } + + public boolean hasSeverityElement() { + return this.severity != null && !this.severity.isEmpty(); + } + + public boolean hasSeverity() { + return this.severity != null && !this.severity.isEmpty(); + } + + /** + * @param value {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setSeverityElement(Enumeration value) { + this.severity = value; + return this; + } + + /** + * @return Identifies the impact constraint violation has on the conformance of the instance. + */ + public ConstraintSeverity getSeverity() { + return this.severity == null ? null : this.severity.getValue(); + } + + /** + * @param value Identifies the impact constraint violation has on the conformance of the instance. + */ + public ElementDefinitionConstraintComponent setSeverity(ConstraintSeverity value) { + if (this.severity == null) + this.severity = new Enumeration(new ConstraintSeverityEnumFactory()); + this.severity.setValue(value); + return this; + } + + /** + * @return {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value + */ + public StringType getHumanElement() { + if (this.human == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.human"); + else if (Configuration.doAutoCreate()) + this.human = new StringType(); // bb + return this.human; + } + + public boolean hasHumanElement() { + return this.human != null && !this.human.isEmpty(); + } + + public boolean hasHuman() { + return this.human != null && !this.human.isEmpty(); + } + + /** + * @param value {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setHumanElement(StringType value) { + this.human = value; + return this; + } + + /** + * @return Text that can be used to describe the constraint in messages identifying that the constraint has been violated. + */ + public String getHuman() { + return this.human == null ? null : this.human.getValue(); + } + + /** + * @param value Text that can be used to describe the constraint in messages identifying that the constraint has been violated. + */ + public ElementDefinitionConstraintComponent setHuman(String value) { + if (this.human == null) + this.human = new StringType(); + this.human.setValue(value); + return this; + } + + /** + * @return {@link #xpath} (An XPath expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value + */ + public StringType getXpathElement() { + if (this.xpath == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.xpath"); + else if (Configuration.doAutoCreate()) + this.xpath = new StringType(); // bb + return this.xpath; + } + + public boolean hasXpathElement() { + return this.xpath != null && !this.xpath.isEmpty(); + } + + public boolean hasXpath() { + return this.xpath != null && !this.xpath.isEmpty(); + } + + /** + * @param value {@link #xpath} (An XPath expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setXpathElement(StringType value) { + this.xpath = value; + return this; + } + + /** + * @return An XPath expression of constraint that can be executed to see if this constraint is met. + */ + public String getXpath() { + return this.xpath == null ? null : this.xpath.getValue(); + } + + /** + * @param value An XPath expression of constraint that can be executed to see if this constraint is met. + */ + public ElementDefinitionConstraintComponent setXpath(String value) { + if (this.xpath == null) + this.xpath = new StringType(); + this.xpath.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("key", "id", "Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.", 0, java.lang.Integer.MAX_VALUE, key)); + childrenList.add(new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, java.lang.Integer.MAX_VALUE, severity)); + childrenList.add(new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, java.lang.Integer.MAX_VALUE, human)); + childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("key")) + this.key = castToId(value); // IdType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("severity")) + this.severity = new ConstraintSeverityEnumFactory().fromType(value); // Enumeration + else if (name.equals("human")) + this.human = castToString(value); // StringType + else if (name.equals("xpath")) + this.xpath = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("key")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.key"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); + } + else if (name.equals("severity")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.severity"); + } + else if (name.equals("human")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.human"); + } + else if (name.equals("xpath")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.xpath"); + } + else + return super.addChild(name); + } + + public ElementDefinitionConstraintComponent copy() { + ElementDefinitionConstraintComponent dst = new ElementDefinitionConstraintComponent(); + copyValues(dst); + dst.key = key == null ? null : key.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.severity = severity == null ? null : severity.copy(); + dst.human = human == null ? null : human.copy(); + dst.xpath = xpath == null ? null : xpath.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinitionConstraintComponent)) + return false; + ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other; + return compareDeep(key, o.key, true) && compareDeep(requirements, o.requirements, true) && compareDeep(severity, o.severity, true) + && compareDeep(human, o.human, true) && compareDeep(xpath, o.xpath, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinitionConstraintComponent)) + return false; + ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other; + return compareValues(key, o.key, true) && compareValues(requirements, o.requirements, true) && compareValues(severity, o.severity, true) + && compareValues(human, o.human, true) && compareValues(xpath, o.xpath, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (key == null || key.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (severity == null || severity.isEmpty()) && (human == null || human.isEmpty()) && (xpath == null || xpath.isEmpty()) + ; + } + + public String fhirType() { + return "ElementDefinition.constraint"; + + } + + } + + @Block() + public static class ElementDefinitionBindingComponent extends Element implements IBaseDatatypeElement { + /** + * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." ) + protected Enumeration strength; + + /** + * Describes the intended use of this particular set of codes. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human explanation of the value set", formalDefinition="Describes the intended use of this particular set of codes." ) + protected StringType description; + + /** + * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. + */ + @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Source of value set", formalDefinition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used." ) + protected Type valueSet; + + private static final long serialVersionUID = 1355538460L; + + /* + * Constructor + */ + public ElementDefinitionBindingComponent() { + super(); + } + + /* + * Constructor + */ + public ElementDefinitionBindingComponent(Enumeration strength) { + super(); + this.strength = strength; + } + + /** + * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value + */ + public Enumeration getStrengthElement() { + if (this.strength == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.strength"); + else if (Configuration.doAutoCreate()) + this.strength = new Enumeration(new BindingStrengthEnumFactory()); // bb + return this.strength; + } + + public boolean hasStrengthElement() { + return this.strength != null && !this.strength.isEmpty(); + } + + public boolean hasStrength() { + return this.strength != null && !this.strength.isEmpty(); + } + + /** + * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value + */ + public ElementDefinitionBindingComponent setStrengthElement(Enumeration value) { + this.strength = value; + return this; + } + + /** + * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + public BindingStrength getStrength() { + return this.strength == null ? null : this.strength.getValue(); + } + + /** + * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + public ElementDefinitionBindingComponent setStrength(BindingStrength value) { + if (this.strength == null) + this.strength = new Enumeration(new BindingStrengthEnumFactory()); + this.strength.setValue(value); + return this; + } + + /** + * @return {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ElementDefinitionBindingComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Describes the intended use of this particular set of codes. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Describes the intended use of this particular set of codes. + */ + public ElementDefinitionBindingComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public Type getValueSet() { + return this.valueSet; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public UriType getValueSetUriType() throws FHIRException { + if (!(this.valueSet instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (UriType) this.valueSet; + } + + public boolean hasValueSetUriType() { + return this.valueSet instanceof UriType; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public Reference getValueSetReference() throws FHIRException { + if (!(this.valueSet instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (Reference) this.valueSet; + } + + public boolean hasValueSetReference() { + return this.valueSet instanceof Reference; + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public ElementDefinitionBindingComponent setValueSet(Type value) { + this.valueSet = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, java.lang.Integer.MAX_VALUE, strength)); + childrenList.add(new Property("description", "string", "Describes the intended use of this particular set of codes.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("strength")) + this.strength = new BindingStrengthEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("valueSet[x]")) + this.valueSet = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("strength")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.strength"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); + } + else if (name.equals("valueSetUri")) { + this.valueSet = new UriType(); + return this.valueSet; + } + else if (name.equals("valueSetReference")) { + this.valueSet = new Reference(); + return this.valueSet; + } + else + return super.addChild(name); + } + + public ElementDefinitionBindingComponent copy() { + ElementDefinitionBindingComponent dst = new ElementDefinitionBindingComponent(); + copyValues(dst); + dst.strength = strength == null ? null : strength.copy(); + dst.description = description == null ? null : description.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinitionBindingComponent)) + return false; + ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other; + return compareDeep(strength, o.strength, true) && compareDeep(description, o.description, true) + && compareDeep(valueSet, o.valueSet, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinitionBindingComponent)) + return false; + ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other; + return compareValues(strength, o.strength, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (strength == null || strength.isEmpty()) && (description == null || description.isEmpty()) + && (valueSet == null || valueSet.isEmpty()); + } + + public String fhirType() { + return "ElementDefinition.binding"; + + } + + } + + @Block() + public static class ElementDefinitionMappingComponent extends Element implements IBaseDatatypeElement { + /** + * An internal reference to the definition of a mapping. + */ + @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to mapping declaration", formalDefinition="An internal reference to the definition of a mapping." ) + protected IdType identity; + + /** + * Identifies the computable language in which mapping.map is expressed. + */ + @Child(name = "language", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Computable language of mapping", formalDefinition="Identifies the computable language in which mapping.map is expressed." ) + protected CodeType language; + + /** + * Expresses what part of the target specification corresponds to this element. + */ + @Child(name = "map", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Details of the mapping", formalDefinition="Expresses what part of the target specification corresponds to this element." ) + protected StringType map; + + private static final long serialVersionUID = -669205371L; + + /* + * Constructor + */ + public ElementDefinitionMappingComponent() { + super(); + } + + /* + * Constructor + */ + public ElementDefinitionMappingComponent(IdType identity, StringType map) { + super(); + this.identity = identity; + this.map = map; + } + + /** + * @return {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public IdType getIdentityElement() { + if (this.identity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.identity"); + else if (Configuration.doAutoCreate()) + this.identity = new IdType(); // bb + return this.identity; + } + + public boolean hasIdentityElement() { + return this.identity != null && !this.identity.isEmpty(); + } + + public boolean hasIdentity() { + return this.identity != null && !this.identity.isEmpty(); + } + + /** + * @param value {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public ElementDefinitionMappingComponent setIdentityElement(IdType value) { + this.identity = value; + return this; + } + + /** + * @return An internal reference to the definition of a mapping. + */ + public String getIdentity() { + return this.identity == null ? null : this.identity.getValue(); + } + + /** + * @param value An internal reference to the definition of a mapping. + */ + public ElementDefinitionMappingComponent setIdentity(String value) { + if (this.identity == null) + this.identity = new IdType(); + this.identity.setValue(value); + return this; + } + + /** + * @return {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public ElementDefinitionMappingComponent setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return Identifies the computable language in which mapping.map is expressed. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value Identifies the computable language in which mapping.map is expressed. + */ + public ElementDefinitionMappingComponent setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value + */ + public StringType getMapElement() { + if (this.map == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.map"); + else if (Configuration.doAutoCreate()) + this.map = new StringType(); // bb + return this.map; + } + + public boolean hasMapElement() { + return this.map != null && !this.map.isEmpty(); + } + + public boolean hasMap() { + return this.map != null && !this.map.isEmpty(); + } + + /** + * @param value {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value + */ + public ElementDefinitionMappingComponent setMapElement(StringType value) { + this.map = value; + return this; + } + + /** + * @return Expresses what part of the target specification corresponds to this element. + */ + public String getMap() { + return this.map == null ? null : this.map.getValue(); + } + + /** + * @param value Expresses what part of the target specification corresponds to this element. + */ + public ElementDefinitionMappingComponent setMap(String value) { + if (this.map == null) + this.map = new StringType(); + this.map.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, java.lang.Integer.MAX_VALUE, identity)); + childrenList.add(new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, map)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identity")) + this.identity = castToId(value); // IdType + else if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("map")) + this.map = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identity")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.identity"); + } + else if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.language"); + } + else if (name.equals("map")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.map"); + } + else + return super.addChild(name); + } + + public ElementDefinitionMappingComponent copy() { + ElementDefinitionMappingComponent dst = new ElementDefinitionMappingComponent(); + copyValues(dst); + dst.identity = identity == null ? null : identity.copy(); + dst.language = language == null ? null : language.copy(); + dst.map = map == null ? null : map.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinitionMappingComponent)) + return false; + ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other; + return compareDeep(identity, o.identity, true) && compareDeep(language, o.language, true) && compareDeep(map, o.map, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinitionMappingComponent)) + return false; + ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other; + return compareValues(identity, o.identity, true) && compareValues(language, o.language, true) && compareValues(map, o.map, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identity == null || identity.isEmpty()) && (language == null || language.isEmpty()) + && (map == null || map.isEmpty()); + } + + public String fhirType() { + return "ElementDefinition.mapping"; + + } + + } + + /** + * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. + */ + @Child(name = "path", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The path of the element (see the Detailed Descriptions)", formalDefinition="The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension." ) + protected StringType path; + + /** + * Codes that define how this element is represented in instances, when the deviation varies from the normal case. + */ + @Child(name = "representation", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="How this element is represented in instances", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) + protected List> representation; + + /** + * The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name for this particular element definition (reference target)", formalDefinition="The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element." ) + protected StringType name; + + /** + * The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. + */ + @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." ) + protected StringType label; + + /** + * A code that provides the meaning for the element according to a particular terminology. + */ + @Child(name = "code", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Defining code", formalDefinition="A code that provides the meaning for the element according to a particular terminology." ) + protected List code; + + /** + * Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set). + */ + @Child(name = "slicing", type = {}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." ) + protected ElementDefinitionSlicingComponent slicing; + + /** + * A concise description of what this element means (e.g. for use in autogenerated summaries). + */ + @Child(name = "short", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Concise definition for xml presentation", formalDefinition="A concise description of what this element means (e.g. for use in autogenerated summaries)." ) + protected StringType short_; + + /** + * Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. + */ + @Child(name = "definition", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Full formal definition as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource." ) + protected MarkdownType definition; + + /** + * Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. + */ + @Child(name = "comments", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Comments about the use of this element", formalDefinition="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc." ) + protected MarkdownType comments; + + /** + * This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. + */ + @Child(name = "requirements", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why is this needed?", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." ) + protected MarkdownType requirements; + + /** + * Identifies additional names by which this element might also be known. + */ + @Child(name = "alias", type = {StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) + protected List alias; + + /** + * The minimum number of times this element SHALL appear in the instance. + */ + @Child(name = "min", type = {IntegerType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." ) + protected IntegerType min; + + /** + * The maximum number of times this element is permitted to appear in the instance. + */ + @Child(name = "max", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." ) + protected StringType max; + + /** + * Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition. + */ + @Child(name = "base", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Base definition information for tools", formalDefinition="Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition." ) + protected ElementDefinitionBaseComponent base; + + /** + * The data type or resource that the value of this element is permitted to be. + */ + @Child(name = "type", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." ) + protected List type; + + /** + * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. + */ + @Child(name = "nameReference", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="To another element constraint (by element.name)", formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element." ) + protected StringType nameReference; + + /** + * The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false'). + */ + @Child(name = "defaultValue", type = {}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specified value it missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')." ) + protected org.hl7.fhir.dstu21.model.Type defaultValue; + + /** + * The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. + */ + @Child(name = "meaningWhenMissing", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'." ) + protected MarkdownType meaningWhenMissing; + + /** + * Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing. + */ + @Child(name = "fixed", type = {}, order=18, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing." ) + protected org.hl7.fhir.dstu21.model.Type fixed; + + /** + * Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.). + */ + @Child(name = "pattern", type = {}, order=19, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.)." ) + protected org.hl7.fhir.dstu21.model.Type pattern; + + /** + * A sample value for this element demonstrating the type of information that would typically be captured. + */ + @Child(name = "example", type = {}, order=20, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="A sample value for this element demonstrating the type of information that would typically be captured." ) + protected org.hl7.fhir.dstu21.model.Type example; + + /** + * The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity. + */ + @Child(name = "minValue", type = {}, order=21, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Minimum Allowed Value (for some types)", formalDefinition="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." ) + protected org.hl7.fhir.dstu21.model.Type minValue; + + /** + * The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity. + */ + @Child(name = "maxValue", type = {}, order=22, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Maximum Allowed Value (for some types)", formalDefinition="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." ) + protected org.hl7.fhir.dstu21.model.Type maxValue; + + /** + * Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. + */ + @Child(name = "maxLength", type = {IntegerType.class}, order=23, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Max length for strings", formalDefinition="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element." ) + protected IntegerType maxLength; + + /** + * A reference to an invariant that may make additional statements about the cardinality or value in the instance. + */ + @Child(name = "condition", type = {IdType.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reference to invariant about presence", formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance." ) + protected List condition; + + /** + * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance. + */ + @Child(name = "constraint", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Condition that must evaluate to true", formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." ) + protected List constraint; + + /** + * If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. + */ + @Child(name = "mustSupport", type = {BooleanType.class}, order=26, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If the element must supported", formalDefinition="If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported." ) + protected BooleanType mustSupport; + + /** + * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. + */ + @Child(name = "isModifier", type = {BooleanType.class}, order=27, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If this modifies the meaning of other elements", formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system." ) + protected BooleanType isModifier; + + /** + * Whether the element should be included if a client requests a search with the parameter _summary=true. + */ + @Child(name = "isSummary", type = {BooleanType.class}, order=28, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." ) + protected BooleanType isSummary; + + /** + * Binds to a value set if this element is coded (code, Coding, CodeableConcept). + */ + @Child(name = "binding", type = {}, order=29, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)." ) + protected ElementDefinitionBindingComponent binding; + + /** + * Identifies a concept from an external specification that roughly corresponds to this element. + */ + @Child(name = "mapping", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) + protected List mapping; + + private static final long serialVersionUID = 529293980L; + + /* + * Constructor + */ + public ElementDefinition() { + super(); + } + + /* + * Constructor + */ + public ElementDefinition(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public ElementDefinition setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. + */ + public ElementDefinition setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) + */ + public List> getRepresentation() { + if (this.representation == null) + this.representation = new ArrayList>(); + return this.representation; + } + + public boolean hasRepresentation() { + if (this.representation == null) + return false; + for (Enumeration item : this.representation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) + */ + // syntactic sugar + public Enumeration addRepresentationElement() {//2 + Enumeration t = new Enumeration(new PropertyRepresentationEnumFactory()); + if (this.representation == null) + this.representation = new ArrayList>(); + this.representation.add(t); + return t; + } + + /** + * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) + */ + public ElementDefinition addRepresentation(PropertyRepresentation value) { //1 + Enumeration t = new Enumeration(new PropertyRepresentationEnumFactory()); + t.setValue(value); + if (this.representation == null) + this.representation = new ArrayList>(); + this.representation.add(t); + return this; + } + + /** + * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) + */ + public boolean hasRepresentation(PropertyRepresentation value) { + if (this.representation == null) + return false; + for (Enumeration v : this.representation) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #name} (The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ElementDefinition setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + */ + public ElementDefinition setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #label} (The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public StringType getLabelElement() { + if (this.label == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.label"); + else if (Configuration.doAutoCreate()) + this.label = new StringType(); // bb + return this.label; + } + + public boolean hasLabelElement() { + return this.label != null && !this.label.isEmpty(); + } + + public boolean hasLabel() { + return this.label != null && !this.label.isEmpty(); + } + + /** + * @param value {@link #label} (The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public ElementDefinition setLabelElement(StringType value) { + this.label = value; + return this; + } + + /** + * @return The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. + */ + public String getLabel() { + return this.label == null ? null : this.label.getValue(); + } + + /** + * @param value The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. + */ + public ElementDefinition setLabel(String value) { + if (Utilities.noString(value)) + this.label = null; + else { + if (this.label == null) + this.label = new StringType(); + this.label.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (A code that provides the meaning for the element according to a particular terminology.) + */ + public List getCode() { + if (this.code == null) + this.code = new ArrayList(); + return this.code; + } + + public boolean hasCode() { + if (this.code == null) + return false; + for (Coding item : this.code) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #code} (A code that provides the meaning for the element according to a particular terminology.) + */ + // syntactic sugar + public Coding addCode() { //3 + Coding t = new Coding(); + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return t; + } + + // syntactic sugar + public ElementDefinition addCode(Coding t) { //3 + if (t == null) + return this; + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return this; + } + + /** + * @return {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).) + */ + public ElementDefinitionSlicingComponent getSlicing() { + if (this.slicing == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.slicing"); + else if (Configuration.doAutoCreate()) + this.slicing = new ElementDefinitionSlicingComponent(); // cc + return this.slicing; + } + + public boolean hasSlicing() { + return this.slicing != null && !this.slicing.isEmpty(); + } + + /** + * @param value {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).) + */ + public ElementDefinition setSlicing(ElementDefinitionSlicingComponent value) { + this.slicing = value; + return this; + } + + /** + * @return {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value + */ + public StringType getShortElement() { + if (this.short_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.short_"); + else if (Configuration.doAutoCreate()) + this.short_ = new StringType(); // bb + return this.short_; + } + + public boolean hasShortElement() { + return this.short_ != null && !this.short_.isEmpty(); + } + + public boolean hasShort() { + return this.short_ != null && !this.short_.isEmpty(); + } + + /** + * @param value {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value + */ + public ElementDefinition setShortElement(StringType value) { + this.short_ = value; + return this; + } + + /** + * @return A concise description of what this element means (e.g. for use in autogenerated summaries). + */ + public String getShort() { + return this.short_ == null ? null : this.short_.getValue(); + } + + /** + * @param value A concise description of what this element means (e.g. for use in autogenerated summaries). + */ + public ElementDefinition setShort(String value) { + if (Utilities.noString(value)) + this.short_ = null; + else { + if (this.short_ == null) + this.short_ = new StringType(); + this.short_.setValue(value); + } + return this; + } + + /** + * @return {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public MarkdownType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new MarkdownType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public ElementDefinition setDefinitionElement(MarkdownType value) { + this.definition = value; + return this; + } + + /** + * @return Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. + */ + public ElementDefinition setDefinition(String value) { + if (value == null) + this.definition = null; + else { + if (this.definition == null) + this.definition = new MarkdownType(); + this.definition.setValue(value); + } + return this; + } + + /** + * @return {@link #comments} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public MarkdownType getCommentsElement() { + if (this.comments == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.comments"); + else if (Configuration.doAutoCreate()) + this.comments = new MarkdownType(); // bb + return this.comments; + } + + public boolean hasCommentsElement() { + return this.comments != null && !this.comments.isEmpty(); + } + + public boolean hasComments() { + return this.comments != null && !this.comments.isEmpty(); + } + + /** + * @param value {@link #comments} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public ElementDefinition setCommentsElement(MarkdownType value) { + this.comments = value; + return this; + } + + /** + * @return Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. + */ + public String getComments() { + return this.comments == null ? null : this.comments.getValue(); + } + + /** + * @param value Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. + */ + public ElementDefinition setComments(String value) { + if (value == null) + this.comments = null; + else { + if (this.comments == null) + this.comments = new MarkdownType(); + this.comments.setValue(value); + } + return this; + } + + /** + * @return {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public MarkdownType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new MarkdownType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public ElementDefinition setRequirementsElement(MarkdownType value) { + this.requirements = value; + return this; + } + + /** + * @return This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. + */ + public ElementDefinition setRequirements(String value) { + if (value == null) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new MarkdownType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #alias} (Identifies additional names by which this element might also be known.) + */ + public List getAlias() { + if (this.alias == null) + this.alias = new ArrayList(); + return this.alias; + } + + public boolean hasAlias() { + if (this.alias == null) + return false; + for (StringType item : this.alias) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #alias} (Identifies additional names by which this element might also be known.) + */ + // syntactic sugar + public StringType addAliasElement() {//2 + StringType t = new StringType(); + if (this.alias == null) + this.alias = new ArrayList(); + this.alias.add(t); + return t; + } + + /** + * @param value {@link #alias} (Identifies additional names by which this element might also be known.) + */ + public ElementDefinition addAlias(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.alias == null) + this.alias = new ArrayList(); + this.alias.add(t); + return this; + } + + /** + * @param value {@link #alias} (Identifies additional names by which this element might also be known.) + */ + public boolean hasAlias(String value) { + if (this.alias == null) + return false; + for (StringType v : this.alias) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public IntegerType getMinElement() { + if (this.min == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.min"); + else if (Configuration.doAutoCreate()) + this.min = new IntegerType(); // bb + return this.min; + } + + public boolean hasMinElement() { + return this.min != null && !this.min.isEmpty(); + } + + public boolean hasMin() { + return this.min != null && !this.min.isEmpty(); + } + + /** + * @param value {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public ElementDefinition setMinElement(IntegerType value) { + this.min = value; + return this; + } + + /** + * @return The minimum number of times this element SHALL appear in the instance. + */ + public int getMin() { + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); + } + + /** + * @param value The minimum number of times this element SHALL appear in the instance. + */ + public ElementDefinition setMin(int value) { + if (this.min == null) + this.min = new IntegerType(); + this.min.setValue(value); + return this; + } + + /** + * @return {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public StringType getMaxElement() { + if (this.max == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.max"); + else if (Configuration.doAutoCreate()) + this.max = new StringType(); // bb + return this.max; + } + + public boolean hasMaxElement() { + return this.max != null && !this.max.isEmpty(); + } + + public boolean hasMax() { + return this.max != null && !this.max.isEmpty(); + } + + /** + * @param value {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public ElementDefinition setMaxElement(StringType value) { + this.max = value; + return this; + } + + /** + * @return The maximum number of times this element is permitted to appear in the instance. + */ + public String getMax() { + return this.max == null ? null : this.max.getValue(); + } + + /** + * @param value The maximum number of times this element is permitted to appear in the instance. + */ + public ElementDefinition setMax(String value) { + if (Utilities.noString(value)) + this.max = null; + else { + if (this.max == null) + this.max = new StringType(); + this.max.setValue(value); + } + return this; + } + + /** + * @return {@link #base} (Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) + */ + public ElementDefinitionBaseComponent getBase() { + if (this.base == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.base"); + else if (Configuration.doAutoCreate()) + this.base = new ElementDefinitionBaseComponent(); // cc + return this.base; + } + + public boolean hasBase() { + return this.base != null && !this.base.isEmpty(); + } + + /** + * @param value {@link #base} (Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) + */ + public ElementDefinition setBase(ElementDefinitionBaseComponent value) { + this.base = value; + return this; + } + + /** + * @return {@link #type} (The data type or resource that the value of this element is permitted to be.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (TypeRefComponent item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (The data type or resource that the value of this element is permitted to be.) + */ + // syntactic sugar + public TypeRefComponent addType() { //3 + TypeRefComponent t = new TypeRefComponent(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public ElementDefinition addType(TypeRefComponent t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #nameReference} (Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getNameReference" gives direct access to the value + */ + public StringType getNameReferenceElement() { + if (this.nameReference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.nameReference"); + else if (Configuration.doAutoCreate()) + this.nameReference = new StringType(); // bb + return this.nameReference; + } + + public boolean hasNameReferenceElement() { + return this.nameReference != null && !this.nameReference.isEmpty(); + } + + public boolean hasNameReference() { + return this.nameReference != null && !this.nameReference.isEmpty(); + } + + /** + * @param value {@link #nameReference} (Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getNameReference" gives direct access to the value + */ + public ElementDefinition setNameReferenceElement(StringType value) { + this.nameReference = value; + return this; + } + + /** + * @return Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. + */ + public String getNameReference() { + return this.nameReference == null ? null : this.nameReference.getValue(); + } + + /** + * @param value Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. + */ + public ElementDefinition setNameReference(String value) { + if (Utilities.noString(value)) + this.nameReference = null; + else { + if (this.nameReference == null) + this.nameReference = new StringType(); + this.nameReference.setValue(value); + } + return this; + } + + /** + * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').) + */ + public org.hl7.fhir.dstu21.model.Type getDefaultValue() { + return this.defaultValue; + } + + public boolean hasDefaultValue() { + return this.defaultValue != null && !this.defaultValue.isEmpty(); + } + + /** + * @param value {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').) + */ + public ElementDefinition setDefaultValue(org.hl7.fhir.dstu21.model.Type value) { + this.defaultValue = value; + return this; + } + + /** + * @return {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value + */ + public MarkdownType getMeaningWhenMissingElement() { + if (this.meaningWhenMissing == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.meaningWhenMissing"); + else if (Configuration.doAutoCreate()) + this.meaningWhenMissing = new MarkdownType(); // bb + return this.meaningWhenMissing; + } + + public boolean hasMeaningWhenMissingElement() { + return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty(); + } + + public boolean hasMeaningWhenMissing() { + return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty(); + } + + /** + * @param value {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value + */ + public ElementDefinition setMeaningWhenMissingElement(MarkdownType value) { + this.meaningWhenMissing = value; + return this; + } + + /** + * @return The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. + */ + public String getMeaningWhenMissing() { + return this.meaningWhenMissing == null ? null : this.meaningWhenMissing.getValue(); + } + + /** + * @param value The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. + */ + public ElementDefinition setMeaningWhenMissing(String value) { + if (value == null) + this.meaningWhenMissing = null; + else { + if (this.meaningWhenMissing == null) + this.meaningWhenMissing = new MarkdownType(); + this.meaningWhenMissing.setValue(value); + } + return this; + } + + /** + * @return {@link #fixed} (Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.) + */ + public org.hl7.fhir.dstu21.model.Type getFixed() { + return this.fixed; + } + + public boolean hasFixed() { + return this.fixed != null && !this.fixed.isEmpty(); + } + + /** + * @param value {@link #fixed} (Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.) + */ + public ElementDefinition setFixed(org.hl7.fhir.dstu21.model.Type value) { + this.fixed = value; + return this; + } + + /** + * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).) + */ + public org.hl7.fhir.dstu21.model.Type getPattern() { + return this.pattern; + } + + public boolean hasPattern() { + return this.pattern != null && !this.pattern.isEmpty(); + } + + /** + * @param value {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).) + */ + public ElementDefinition setPattern(org.hl7.fhir.dstu21.model.Type value) { + this.pattern = value; + return this; + } + + /** + * @return {@link #example} (A sample value for this element demonstrating the type of information that would typically be captured.) + */ + public org.hl7.fhir.dstu21.model.Type getExample() { + return this.example; + } + + public boolean hasExample() { + return this.example != null && !this.example.isEmpty(); + } + + /** + * @param value {@link #example} (A sample value for this element demonstrating the type of information that would typically be captured.) + */ + public ElementDefinition setExample(org.hl7.fhir.dstu21.model.Type value) { + this.example = value; + return this; + } + + /** + * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) + */ + public org.hl7.fhir.dstu21.model.Type getMinValue() { + return this.minValue; + } + + public boolean hasMinValue() { + return this.minValue != null && !this.minValue.isEmpty(); + } + + /** + * @param value {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) + */ + public ElementDefinition setMinValue(org.hl7.fhir.dstu21.model.Type value) { + this.minValue = value; + return this; + } + + /** + * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) + */ + public org.hl7.fhir.dstu21.model.Type getMaxValue() { + return this.maxValue; + } + + public boolean hasMaxValue() { + return this.maxValue != null && !this.maxValue.isEmpty(); + } + + /** + * @param value {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) + */ + public ElementDefinition setMaxValue(org.hl7.fhir.dstu21.model.Type value) { + this.maxValue = value; + return this; + } + + /** + * @return {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value + */ + public IntegerType getMaxLengthElement() { + if (this.maxLength == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.maxLength"); + else if (Configuration.doAutoCreate()) + this.maxLength = new IntegerType(); // bb + return this.maxLength; + } + + public boolean hasMaxLengthElement() { + return this.maxLength != null && !this.maxLength.isEmpty(); + } + + public boolean hasMaxLength() { + return this.maxLength != null && !this.maxLength.isEmpty(); + } + + /** + * @param value {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value + */ + public ElementDefinition setMaxLengthElement(IntegerType value) { + this.maxLength = value; + return this; + } + + /** + * @return Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. + */ + public int getMaxLength() { + return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue(); + } + + /** + * @param value Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. + */ + public ElementDefinition setMaxLength(int value) { + if (this.maxLength == null) + this.maxLength = new IntegerType(); + this.maxLength.setValue(value); + return this; + } + + /** + * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (IdType item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) + */ + // syntactic sugar + public IdType addConditionElement() {//2 + IdType t = new IdType(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + /** + * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) + */ + public ElementDefinition addCondition(String value) { //1 + IdType t = new IdType(); + t.setValue(value); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + /** + * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) + */ + public boolean hasCondition(String value) { + if (this.condition == null) + return false; + for (IdType v : this.condition) + if (v.equals(value)) // id + return true; + return false; + } + + /** + * @return {@link #constraint} (Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.) + */ + public List getConstraint() { + if (this.constraint == null) + this.constraint = new ArrayList(); + return this.constraint; + } + + public boolean hasConstraint() { + if (this.constraint == null) + return false; + for (ElementDefinitionConstraintComponent item : this.constraint) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #constraint} (Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.) + */ + // syntactic sugar + public ElementDefinitionConstraintComponent addConstraint() { //3 + ElementDefinitionConstraintComponent t = new ElementDefinitionConstraintComponent(); + if (this.constraint == null) + this.constraint = new ArrayList(); + this.constraint.add(t); + return t; + } + + // syntactic sugar + public ElementDefinition addConstraint(ElementDefinitionConstraintComponent t) { //3 + if (t == null) + return this; + if (this.constraint == null) + this.constraint = new ArrayList(); + this.constraint.add(t); + return this; + } + + /** + * @return {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value + */ + public BooleanType getMustSupportElement() { + if (this.mustSupport == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.mustSupport"); + else if (Configuration.doAutoCreate()) + this.mustSupport = new BooleanType(); // bb + return this.mustSupport; + } + + public boolean hasMustSupportElement() { + return this.mustSupport != null && !this.mustSupport.isEmpty(); + } + + public boolean hasMustSupport() { + return this.mustSupport != null && !this.mustSupport.isEmpty(); + } + + /** + * @param value {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value + */ + public ElementDefinition setMustSupportElement(BooleanType value) { + this.mustSupport = value; + return this; + } + + /** + * @return If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. + */ + public boolean getMustSupport() { + return this.mustSupport == null || this.mustSupport.isEmpty() ? false : this.mustSupport.getValue(); + } + + /** + * @param value If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. + */ + public ElementDefinition setMustSupport(boolean value) { + if (this.mustSupport == null) + this.mustSupport = new BooleanType(); + this.mustSupport.setValue(value); + return this; + } + + /** + * @return {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value + */ + public BooleanType getIsModifierElement() { + if (this.isModifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.isModifier"); + else if (Configuration.doAutoCreate()) + this.isModifier = new BooleanType(); // bb + return this.isModifier; + } + + public boolean hasIsModifierElement() { + return this.isModifier != null && !this.isModifier.isEmpty(); + } + + public boolean hasIsModifier() { + return this.isModifier != null && !this.isModifier.isEmpty(); + } + + /** + * @param value {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value + */ + public ElementDefinition setIsModifierElement(BooleanType value) { + this.isModifier = value; + return this; + } + + /** + * @return If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. + */ + public boolean getIsModifier() { + return this.isModifier == null || this.isModifier.isEmpty() ? false : this.isModifier.getValue(); + } + + /** + * @param value If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. + */ + public ElementDefinition setIsModifier(boolean value) { + if (this.isModifier == null) + this.isModifier = new BooleanType(); + this.isModifier.setValue(value); + return this; + } + + /** + * @return {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value + */ + public BooleanType getIsSummaryElement() { + if (this.isSummary == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.isSummary"); + else if (Configuration.doAutoCreate()) + this.isSummary = new BooleanType(); // bb + return this.isSummary; + } + + public boolean hasIsSummaryElement() { + return this.isSummary != null && !this.isSummary.isEmpty(); + } + + public boolean hasIsSummary() { + return this.isSummary != null && !this.isSummary.isEmpty(); + } + + /** + * @param value {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value + */ + public ElementDefinition setIsSummaryElement(BooleanType value) { + this.isSummary = value; + return this; + } + + /** + * @return Whether the element should be included if a client requests a search with the parameter _summary=true. + */ + public boolean getIsSummary() { + return this.isSummary == null || this.isSummary.isEmpty() ? false : this.isSummary.getValue(); + } + + /** + * @param value Whether the element should be included if a client requests a search with the parameter _summary=true. + */ + public ElementDefinition setIsSummary(boolean value) { + if (this.isSummary == null) + this.isSummary = new BooleanType(); + this.isSummary.setValue(value); + return this; + } + + /** + * @return {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept).) + */ + public ElementDefinitionBindingComponent getBinding() { + if (this.binding == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.binding"); + else if (Configuration.doAutoCreate()) + this.binding = new ElementDefinitionBindingComponent(); // cc + return this.binding; + } + + public boolean hasBinding() { + return this.binding != null && !this.binding.isEmpty(); + } + + /** + * @param value {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept).) + */ + public ElementDefinition setBinding(ElementDefinitionBindingComponent value) { + this.binding = value; + return this; + } + + /** + * @return {@link #mapping} (Identifies a concept from an external specification that roughly corresponds to this element.) + */ + public List getMapping() { + if (this.mapping == null) + this.mapping = new ArrayList(); + return this.mapping; + } + + public boolean hasMapping() { + if (this.mapping == null) + return false; + for (ElementDefinitionMappingComponent item : this.mapping) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mapping} (Identifies a concept from an external specification that roughly corresponds to this element.) + */ + // syntactic sugar + public ElementDefinitionMappingComponent addMapping() { //3 + ElementDefinitionMappingComponent t = new ElementDefinitionMappingComponent(); + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return t; + } + + // syntactic sugar + public ElementDefinition addMapping(ElementDefinitionMappingComponent t) { //3 + if (t == null) + return this; + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case.", 0, java.lang.Integer.MAX_VALUE, representation)); + childrenList.add(new Property("name", "string", "The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("label", "string", "The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, java.lang.Integer.MAX_VALUE, label)); + childrenList.add(new Property("code", "Coding", "A code that provides the meaning for the element according to a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, java.lang.Integer.MAX_VALUE, slicing)); + childrenList.add(new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, java.lang.Integer.MAX_VALUE, short_)); + childrenList.add(new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("comments", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.", 0, java.lang.Integer.MAX_VALUE, comments)); + childrenList.add(new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias)); + childrenList.add(new Property("min", "integer", "The minimum number of times this element SHALL appear in the instance.", 0, java.lang.Integer.MAX_VALUE, min)); + childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, java.lang.Integer.MAX_VALUE, max)); + childrenList.add(new Property("base", "", "Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("nameReference", "string", "Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.", 0, java.lang.Integer.MAX_VALUE, nameReference)); + childrenList.add(new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, java.lang.Integer.MAX_VALUE, defaultValue)); + childrenList.add(new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", 0, java.lang.Integer.MAX_VALUE, meaningWhenMissing)); + childrenList.add(new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, java.lang.Integer.MAX_VALUE, fixed)); + childrenList.add(new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, java.lang.Integer.MAX_VALUE, pattern)); + childrenList.add(new Property("example[x]", "*", "A sample value for this element demonstrating the type of information that would typically be captured.", 0, java.lang.Integer.MAX_VALUE, example)); + childrenList.add(new Property("minValue[x]", "*", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, java.lang.Integer.MAX_VALUE, minValue)); + childrenList.add(new Property("maxValue[x]", "*", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, java.lang.Integer.MAX_VALUE, maxValue)); + childrenList.add(new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.", 0, java.lang.Integer.MAX_VALUE, maxLength)); + childrenList.add(new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint)); + childrenList.add(new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); + childrenList.add(new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.", 0, java.lang.Integer.MAX_VALUE, isModifier)); + childrenList.add(new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, java.lang.Integer.MAX_VALUE, isSummary)); + childrenList.add(new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept).", 0, java.lang.Integer.MAX_VALUE, binding)); + childrenList.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("representation")) + this.getRepresentation().add(new PropertyRepresentationEnumFactory().fromType(value)); + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("label")) + this.label = castToString(value); // StringType + else if (name.equals("code")) + this.getCode().add(castToCoding(value)); + else if (name.equals("slicing")) + this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent + else if (name.equals("short")) + this.short_ = castToString(value); // StringType + else if (name.equals("definition")) + this.definition = castToMarkdown(value); // MarkdownType + else if (name.equals("comments")) + this.comments = castToMarkdown(value); // MarkdownType + else if (name.equals("requirements")) + this.requirements = castToMarkdown(value); // MarkdownType + else if (name.equals("alias")) + this.getAlias().add(castToString(value)); + else if (name.equals("min")) + this.min = castToInteger(value); // IntegerType + else if (name.equals("max")) + this.max = castToString(value); // StringType + else if (name.equals("base")) + this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent + else if (name.equals("type")) + this.getType().add((TypeRefComponent) value); + else if (name.equals("nameReference")) + this.nameReference = castToString(value); // StringType + else if (name.equals("defaultValue[x]")) + this.defaultValue = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("meaningWhenMissing")) + this.meaningWhenMissing = castToMarkdown(value); // MarkdownType + else if (name.equals("fixed[x]")) + this.fixed = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("pattern[x]")) + this.pattern = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("example[x]")) + this.example = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("minValue[x]")) + this.minValue = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("maxValue[x]")) + this.maxValue = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("maxLength")) + this.maxLength = castToInteger(value); // IntegerType + else if (name.equals("condition")) + this.getCondition().add(castToId(value)); + else if (name.equals("constraint")) + this.getConstraint().add((ElementDefinitionConstraintComponent) value); + else if (name.equals("mustSupport")) + this.mustSupport = castToBoolean(value); // BooleanType + else if (name.equals("isModifier")) + this.isModifier = castToBoolean(value); // BooleanType + else if (name.equals("isSummary")) + this.isSummary = castToBoolean(value); // BooleanType + else if (name.equals("binding")) + this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent + else if (name.equals("mapping")) + this.getMapping().add((ElementDefinitionMappingComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); + } + else if (name.equals("representation")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.representation"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.name"); + } + else if (name.equals("label")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.label"); + } + else if (name.equals("code")) { + return addCode(); + } + else if (name.equals("slicing")) { + this.slicing = new ElementDefinitionSlicingComponent(); + return this.slicing; + } + else if (name.equals("short")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.short"); + } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.definition"); + } + else if (name.equals("comments")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.comments"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); + } + else if (name.equals("alias")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.alias"); + } + else if (name.equals("min")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); + } + else if (name.equals("max")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); + } + else if (name.equals("base")) { + this.base = new ElementDefinitionBaseComponent(); + return this.base; + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("nameReference")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.nameReference"); + } + else if (name.equals("defaultValueBoolean")) { + this.defaultValue = new BooleanType(); + return this.defaultValue; + } + else if (name.equals("defaultValueInteger")) { + this.defaultValue = new IntegerType(); + return this.defaultValue; + } + else if (name.equals("defaultValueDecimal")) { + this.defaultValue = new DecimalType(); + return this.defaultValue; + } + else if (name.equals("defaultValueBase64Binary")) { + this.defaultValue = new Base64BinaryType(); + return this.defaultValue; + } + else if (name.equals("defaultValueInstant")) { + this.defaultValue = new InstantType(); + return this.defaultValue; + } + else if (name.equals("defaultValueString")) { + this.defaultValue = new StringType(); + return this.defaultValue; + } + else if (name.equals("defaultValueUri")) { + this.defaultValue = new UriType(); + return this.defaultValue; + } + else if (name.equals("defaultValueDate")) { + this.defaultValue = new DateType(); + return this.defaultValue; + } + else if (name.equals("defaultValueDateTime")) { + this.defaultValue = new DateTimeType(); + return this.defaultValue; + } + else if (name.equals("defaultValueTime")) { + this.defaultValue = new TimeType(); + return this.defaultValue; + } + else if (name.equals("defaultValueCode")) { + this.defaultValue = new CodeType(); + return this.defaultValue; + } + else if (name.equals("defaultValueOid")) { + this.defaultValue = new OidType(); + return this.defaultValue; + } + else if (name.equals("defaultValueId")) { + this.defaultValue = new IdType(); + return this.defaultValue; + } + else if (name.equals("defaultValueUnsignedInt")) { + this.defaultValue = new UnsignedIntType(); + return this.defaultValue; + } + else if (name.equals("defaultValuePositiveInt")) { + this.defaultValue = new PositiveIntType(); + return this.defaultValue; + } + else if (name.equals("defaultValueMarkdown")) { + this.defaultValue = new MarkdownType(); + return this.defaultValue; + } + else if (name.equals("defaultValueAnnotation")) { + this.defaultValue = new Annotation(); + return this.defaultValue; + } + else if (name.equals("defaultValueAttachment")) { + this.defaultValue = new Attachment(); + return this.defaultValue; + } + else if (name.equals("defaultValueIdentifier")) { + this.defaultValue = new Identifier(); + return this.defaultValue; + } + else if (name.equals("defaultValueCodeableConcept")) { + this.defaultValue = new CodeableConcept(); + return this.defaultValue; + } + else if (name.equals("defaultValueCoding")) { + this.defaultValue = new Coding(); + return this.defaultValue; + } + else if (name.equals("defaultValueQuantity")) { + this.defaultValue = new Quantity(); + return this.defaultValue; + } + else if (name.equals("defaultValueRange")) { + this.defaultValue = new Range(); + return this.defaultValue; + } + else if (name.equals("defaultValuePeriod")) { + this.defaultValue = new Period(); + return this.defaultValue; + } + else if (name.equals("defaultValueRatio")) { + this.defaultValue = new Ratio(); + return this.defaultValue; + } + else if (name.equals("defaultValueSampledData")) { + this.defaultValue = new SampledData(); + return this.defaultValue; + } + else if (name.equals("defaultValueSignature")) { + this.defaultValue = new Signature(); + return this.defaultValue; + } + else if (name.equals("defaultValueHumanName")) { + this.defaultValue = new HumanName(); + return this.defaultValue; + } + else if (name.equals("defaultValueAddress")) { + this.defaultValue = new Address(); + return this.defaultValue; + } + else if (name.equals("defaultValueContactPoint")) { + this.defaultValue = new ContactPoint(); + return this.defaultValue; + } + else if (name.equals("defaultValueTiming")) { + this.defaultValue = new Timing(); + return this.defaultValue; + } + else if (name.equals("defaultValueReference")) { + this.defaultValue = new Reference(); + return this.defaultValue; + } + else if (name.equals("defaultValueMeta")) { + this.defaultValue = new Meta(); + return this.defaultValue; + } + else if (name.equals("meaningWhenMissing")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.meaningWhenMissing"); + } + else if (name.equals("fixedBoolean")) { + this.fixed = new BooleanType(); + return this.fixed; + } + else if (name.equals("fixedInteger")) { + this.fixed = new IntegerType(); + return this.fixed; + } + else if (name.equals("fixedDecimal")) { + this.fixed = new DecimalType(); + return this.fixed; + } + else if (name.equals("fixedBase64Binary")) { + this.fixed = new Base64BinaryType(); + return this.fixed; + } + else if (name.equals("fixedInstant")) { + this.fixed = new InstantType(); + return this.fixed; + } + else if (name.equals("fixedString")) { + this.fixed = new StringType(); + return this.fixed; + } + else if (name.equals("fixedUri")) { + this.fixed = new UriType(); + return this.fixed; + } + else if (name.equals("fixedDate")) { + this.fixed = new DateType(); + return this.fixed; + } + else if (name.equals("fixedDateTime")) { + this.fixed = new DateTimeType(); + return this.fixed; + } + else if (name.equals("fixedTime")) { + this.fixed = new TimeType(); + return this.fixed; + } + else if (name.equals("fixedCode")) { + this.fixed = new CodeType(); + return this.fixed; + } + else if (name.equals("fixedOid")) { + this.fixed = new OidType(); + return this.fixed; + } + else if (name.equals("fixedId")) { + this.fixed = new IdType(); + return this.fixed; + } + else if (name.equals("fixedUnsignedInt")) { + this.fixed = new UnsignedIntType(); + return this.fixed; + } + else if (name.equals("fixedPositiveInt")) { + this.fixed = new PositiveIntType(); + return this.fixed; + } + else if (name.equals("fixedMarkdown")) { + this.fixed = new MarkdownType(); + return this.fixed; + } + else if (name.equals("fixedAnnotation")) { + this.fixed = new Annotation(); + return this.fixed; + } + else if (name.equals("fixedAttachment")) { + this.fixed = new Attachment(); + return this.fixed; + } + else if (name.equals("fixedIdentifier")) { + this.fixed = new Identifier(); + return this.fixed; + } + else if (name.equals("fixedCodeableConcept")) { + this.fixed = new CodeableConcept(); + return this.fixed; + } + else if (name.equals("fixedCoding")) { + this.fixed = new Coding(); + return this.fixed; + } + else if (name.equals("fixedQuantity")) { + this.fixed = new Quantity(); + return this.fixed; + } + else if (name.equals("fixedRange")) { + this.fixed = new Range(); + return this.fixed; + } + else if (name.equals("fixedPeriod")) { + this.fixed = new Period(); + return this.fixed; + } + else if (name.equals("fixedRatio")) { + this.fixed = new Ratio(); + return this.fixed; + } + else if (name.equals("fixedSampledData")) { + this.fixed = new SampledData(); + return this.fixed; + } + else if (name.equals("fixedSignature")) { + this.fixed = new Signature(); + return this.fixed; + } + else if (name.equals("fixedHumanName")) { + this.fixed = new HumanName(); + return this.fixed; + } + else if (name.equals("fixedAddress")) { + this.fixed = new Address(); + return this.fixed; + } + else if (name.equals("fixedContactPoint")) { + this.fixed = new ContactPoint(); + return this.fixed; + } + else if (name.equals("fixedTiming")) { + this.fixed = new Timing(); + return this.fixed; + } + else if (name.equals("fixedReference")) { + this.fixed = new Reference(); + return this.fixed; + } + else if (name.equals("fixedMeta")) { + this.fixed = new Meta(); + return this.fixed; + } + else if (name.equals("patternBoolean")) { + this.pattern = new BooleanType(); + return this.pattern; + } + else if (name.equals("patternInteger")) { + this.pattern = new IntegerType(); + return this.pattern; + } + else if (name.equals("patternDecimal")) { + this.pattern = new DecimalType(); + return this.pattern; + } + else if (name.equals("patternBase64Binary")) { + this.pattern = new Base64BinaryType(); + return this.pattern; + } + else if (name.equals("patternInstant")) { + this.pattern = new InstantType(); + return this.pattern; + } + else if (name.equals("patternString")) { + this.pattern = new StringType(); + return this.pattern; + } + else if (name.equals("patternUri")) { + this.pattern = new UriType(); + return this.pattern; + } + else if (name.equals("patternDate")) { + this.pattern = new DateType(); + return this.pattern; + } + else if (name.equals("patternDateTime")) { + this.pattern = new DateTimeType(); + return this.pattern; + } + else if (name.equals("patternTime")) { + this.pattern = new TimeType(); + return this.pattern; + } + else if (name.equals("patternCode")) { + this.pattern = new CodeType(); + return this.pattern; + } + else if (name.equals("patternOid")) { + this.pattern = new OidType(); + return this.pattern; + } + else if (name.equals("patternId")) { + this.pattern = new IdType(); + return this.pattern; + } + else if (name.equals("patternUnsignedInt")) { + this.pattern = new UnsignedIntType(); + return this.pattern; + } + else if (name.equals("patternPositiveInt")) { + this.pattern = new PositiveIntType(); + return this.pattern; + } + else if (name.equals("patternMarkdown")) { + this.pattern = new MarkdownType(); + return this.pattern; + } + else if (name.equals("patternAnnotation")) { + this.pattern = new Annotation(); + return this.pattern; + } + else if (name.equals("patternAttachment")) { + this.pattern = new Attachment(); + return this.pattern; + } + else if (name.equals("patternIdentifier")) { + this.pattern = new Identifier(); + return this.pattern; + } + else if (name.equals("patternCodeableConcept")) { + this.pattern = new CodeableConcept(); + return this.pattern; + } + else if (name.equals("patternCoding")) { + this.pattern = new Coding(); + return this.pattern; + } + else if (name.equals("patternQuantity")) { + this.pattern = new Quantity(); + return this.pattern; + } + else if (name.equals("patternRange")) { + this.pattern = new Range(); + return this.pattern; + } + else if (name.equals("patternPeriod")) { + this.pattern = new Period(); + return this.pattern; + } + else if (name.equals("patternRatio")) { + this.pattern = new Ratio(); + return this.pattern; + } + else if (name.equals("patternSampledData")) { + this.pattern = new SampledData(); + return this.pattern; + } + else if (name.equals("patternSignature")) { + this.pattern = new Signature(); + return this.pattern; + } + else if (name.equals("patternHumanName")) { + this.pattern = new HumanName(); + return this.pattern; + } + else if (name.equals("patternAddress")) { + this.pattern = new Address(); + return this.pattern; + } + else if (name.equals("patternContactPoint")) { + this.pattern = new ContactPoint(); + return this.pattern; + } + else if (name.equals("patternTiming")) { + this.pattern = new Timing(); + return this.pattern; + } + else if (name.equals("patternReference")) { + this.pattern = new Reference(); + return this.pattern; + } + else if (name.equals("patternMeta")) { + this.pattern = new Meta(); + return this.pattern; + } + else if (name.equals("exampleBoolean")) { + this.example = new BooleanType(); + return this.example; + } + else if (name.equals("exampleInteger")) { + this.example = new IntegerType(); + return this.example; + } + else if (name.equals("exampleDecimal")) { + this.example = new DecimalType(); + return this.example; + } + else if (name.equals("exampleBase64Binary")) { + this.example = new Base64BinaryType(); + return this.example; + } + else if (name.equals("exampleInstant")) { + this.example = new InstantType(); + return this.example; + } + else if (name.equals("exampleString")) { + this.example = new StringType(); + return this.example; + } + else if (name.equals("exampleUri")) { + this.example = new UriType(); + return this.example; + } + else if (name.equals("exampleDate")) { + this.example = new DateType(); + return this.example; + } + else if (name.equals("exampleDateTime")) { + this.example = new DateTimeType(); + return this.example; + } + else if (name.equals("exampleTime")) { + this.example = new TimeType(); + return this.example; + } + else if (name.equals("exampleCode")) { + this.example = new CodeType(); + return this.example; + } + else if (name.equals("exampleOid")) { + this.example = new OidType(); + return this.example; + } + else if (name.equals("exampleId")) { + this.example = new IdType(); + return this.example; + } + else if (name.equals("exampleUnsignedInt")) { + this.example = new UnsignedIntType(); + return this.example; + } + else if (name.equals("examplePositiveInt")) { + this.example = new PositiveIntType(); + return this.example; + } + else if (name.equals("exampleMarkdown")) { + this.example = new MarkdownType(); + return this.example; + } + else if (name.equals("exampleAnnotation")) { + this.example = new Annotation(); + return this.example; + } + else if (name.equals("exampleAttachment")) { + this.example = new Attachment(); + return this.example; + } + else if (name.equals("exampleIdentifier")) { + this.example = new Identifier(); + return this.example; + } + else if (name.equals("exampleCodeableConcept")) { + this.example = new CodeableConcept(); + return this.example; + } + else if (name.equals("exampleCoding")) { + this.example = new Coding(); + return this.example; + } + else if (name.equals("exampleQuantity")) { + this.example = new Quantity(); + return this.example; + } + else if (name.equals("exampleRange")) { + this.example = new Range(); + return this.example; + } + else if (name.equals("examplePeriod")) { + this.example = new Period(); + return this.example; + } + else if (name.equals("exampleRatio")) { + this.example = new Ratio(); + return this.example; + } + else if (name.equals("exampleSampledData")) { + this.example = new SampledData(); + return this.example; + } + else if (name.equals("exampleSignature")) { + this.example = new Signature(); + return this.example; + } + else if (name.equals("exampleHumanName")) { + this.example = new HumanName(); + return this.example; + } + else if (name.equals("exampleAddress")) { + this.example = new Address(); + return this.example; + } + else if (name.equals("exampleContactPoint")) { + this.example = new ContactPoint(); + return this.example; + } + else if (name.equals("exampleTiming")) { + this.example = new Timing(); + return this.example; + } + else if (name.equals("exampleReference")) { + this.example = new Reference(); + return this.example; + } + else if (name.equals("exampleMeta")) { + this.example = new Meta(); + return this.example; + } + else if (name.equals("minValueBoolean")) { + this.minValue = new BooleanType(); + return this.minValue; + } + else if (name.equals("minValueInteger")) { + this.minValue = new IntegerType(); + return this.minValue; + } + else if (name.equals("minValueDecimal")) { + this.minValue = new DecimalType(); + return this.minValue; + } + else if (name.equals("minValueBase64Binary")) { + this.minValue = new Base64BinaryType(); + return this.minValue; + } + else if (name.equals("minValueInstant")) { + this.minValue = new InstantType(); + return this.minValue; + } + else if (name.equals("minValueString")) { + this.minValue = new StringType(); + return this.minValue; + } + else if (name.equals("minValueUri")) { + this.minValue = new UriType(); + return this.minValue; + } + else if (name.equals("minValueDate")) { + this.minValue = new DateType(); + return this.minValue; + } + else if (name.equals("minValueDateTime")) { + this.minValue = new DateTimeType(); + return this.minValue; + } + else if (name.equals("minValueTime")) { + this.minValue = new TimeType(); + return this.minValue; + } + else if (name.equals("minValueCode")) { + this.minValue = new CodeType(); + return this.minValue; + } + else if (name.equals("minValueOid")) { + this.minValue = new OidType(); + return this.minValue; + } + else if (name.equals("minValueId")) { + this.minValue = new IdType(); + return this.minValue; + } + else if (name.equals("minValueUnsignedInt")) { + this.minValue = new UnsignedIntType(); + return this.minValue; + } + else if (name.equals("minValuePositiveInt")) { + this.minValue = new PositiveIntType(); + return this.minValue; + } + else if (name.equals("minValueMarkdown")) { + this.minValue = new MarkdownType(); + return this.minValue; + } + else if (name.equals("minValueAnnotation")) { + this.minValue = new Annotation(); + return this.minValue; + } + else if (name.equals("minValueAttachment")) { + this.minValue = new Attachment(); + return this.minValue; + } + else if (name.equals("minValueIdentifier")) { + this.minValue = new Identifier(); + return this.minValue; + } + else if (name.equals("minValueCodeableConcept")) { + this.minValue = new CodeableConcept(); + return this.minValue; + } + else if (name.equals("minValueCoding")) { + this.minValue = new Coding(); + return this.minValue; + } + else if (name.equals("minValueQuantity")) { + this.minValue = new Quantity(); + return this.minValue; + } + else if (name.equals("minValueRange")) { + this.minValue = new Range(); + return this.minValue; + } + else if (name.equals("minValuePeriod")) { + this.minValue = new Period(); + return this.minValue; + } + else if (name.equals("minValueRatio")) { + this.minValue = new Ratio(); + return this.minValue; + } + else if (name.equals("minValueSampledData")) { + this.minValue = new SampledData(); + return this.minValue; + } + else if (name.equals("minValueSignature")) { + this.minValue = new Signature(); + return this.minValue; + } + else if (name.equals("minValueHumanName")) { + this.minValue = new HumanName(); + return this.minValue; + } + else if (name.equals("minValueAddress")) { + this.minValue = new Address(); + return this.minValue; + } + else if (name.equals("minValueContactPoint")) { + this.minValue = new ContactPoint(); + return this.minValue; + } + else if (name.equals("minValueTiming")) { + this.minValue = new Timing(); + return this.minValue; + } + else if (name.equals("minValueReference")) { + this.minValue = new Reference(); + return this.minValue; + } + else if (name.equals("minValueMeta")) { + this.minValue = new Meta(); + return this.minValue; + } + else if (name.equals("maxValueBoolean")) { + this.maxValue = new BooleanType(); + return this.maxValue; + } + else if (name.equals("maxValueInteger")) { + this.maxValue = new IntegerType(); + return this.maxValue; + } + else if (name.equals("maxValueDecimal")) { + this.maxValue = new DecimalType(); + return this.maxValue; + } + else if (name.equals("maxValueBase64Binary")) { + this.maxValue = new Base64BinaryType(); + return this.maxValue; + } + else if (name.equals("maxValueInstant")) { + this.maxValue = new InstantType(); + return this.maxValue; + } + else if (name.equals("maxValueString")) { + this.maxValue = new StringType(); + return this.maxValue; + } + else if (name.equals("maxValueUri")) { + this.maxValue = new UriType(); + return this.maxValue; + } + else if (name.equals("maxValueDate")) { + this.maxValue = new DateType(); + return this.maxValue; + } + else if (name.equals("maxValueDateTime")) { + this.maxValue = new DateTimeType(); + return this.maxValue; + } + else if (name.equals("maxValueTime")) { + this.maxValue = new TimeType(); + return this.maxValue; + } + else if (name.equals("maxValueCode")) { + this.maxValue = new CodeType(); + return this.maxValue; + } + else if (name.equals("maxValueOid")) { + this.maxValue = new OidType(); + return this.maxValue; + } + else if (name.equals("maxValueId")) { + this.maxValue = new IdType(); + return this.maxValue; + } + else if (name.equals("maxValueUnsignedInt")) { + this.maxValue = new UnsignedIntType(); + return this.maxValue; + } + else if (name.equals("maxValuePositiveInt")) { + this.maxValue = new PositiveIntType(); + return this.maxValue; + } + else if (name.equals("maxValueMarkdown")) { + this.maxValue = new MarkdownType(); + return this.maxValue; + } + else if (name.equals("maxValueAnnotation")) { + this.maxValue = new Annotation(); + return this.maxValue; + } + else if (name.equals("maxValueAttachment")) { + this.maxValue = new Attachment(); + return this.maxValue; + } + else if (name.equals("maxValueIdentifier")) { + this.maxValue = new Identifier(); + return this.maxValue; + } + else if (name.equals("maxValueCodeableConcept")) { + this.maxValue = new CodeableConcept(); + return this.maxValue; + } + else if (name.equals("maxValueCoding")) { + this.maxValue = new Coding(); + return this.maxValue; + } + else if (name.equals("maxValueQuantity")) { + this.maxValue = new Quantity(); + return this.maxValue; + } + else if (name.equals("maxValueRange")) { + this.maxValue = new Range(); + return this.maxValue; + } + else if (name.equals("maxValuePeriod")) { + this.maxValue = new Period(); + return this.maxValue; + } + else if (name.equals("maxValueRatio")) { + this.maxValue = new Ratio(); + return this.maxValue; + } + else if (name.equals("maxValueSampledData")) { + this.maxValue = new SampledData(); + return this.maxValue; + } + else if (name.equals("maxValueSignature")) { + this.maxValue = new Signature(); + return this.maxValue; + } + else if (name.equals("maxValueHumanName")) { + this.maxValue = new HumanName(); + return this.maxValue; + } + else if (name.equals("maxValueAddress")) { + this.maxValue = new Address(); + return this.maxValue; + } + else if (name.equals("maxValueContactPoint")) { + this.maxValue = new ContactPoint(); + return this.maxValue; + } + else if (name.equals("maxValueTiming")) { + this.maxValue = new Timing(); + return this.maxValue; + } + else if (name.equals("maxValueReference")) { + this.maxValue = new Reference(); + return this.maxValue; + } + else if (name.equals("maxValueMeta")) { + this.maxValue = new Meta(); + return this.maxValue; + } + else if (name.equals("maxLength")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.maxLength"); + } + else if (name.equals("condition")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.condition"); + } + else if (name.equals("constraint")) { + return addConstraint(); + } + else if (name.equals("mustSupport")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mustSupport"); + } + else if (name.equals("isModifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isModifier"); + } + else if (name.equals("isSummary")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isSummary"); + } + else if (name.equals("binding")) { + this.binding = new ElementDefinitionBindingComponent(); + return this.binding; + } + else if (name.equals("mapping")) { + return addMapping(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ElementDefinition"; + + } + + public ElementDefinition copy() { + ElementDefinition dst = new ElementDefinition(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + if (representation != null) { + dst.representation = new ArrayList>(); + for (Enumeration i : representation) + dst.representation.add(i.copy()); + }; + dst.name = name == null ? null : name.copy(); + dst.label = label == null ? null : label.copy(); + if (code != null) { + dst.code = new ArrayList(); + for (Coding i : code) + dst.code.add(i.copy()); + }; + dst.slicing = slicing == null ? null : slicing.copy(); + dst.short_ = short_ == null ? null : short_.copy(); + dst.definition = definition == null ? null : definition.copy(); + dst.comments = comments == null ? null : comments.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + if (alias != null) { + dst.alias = new ArrayList(); + for (StringType i : alias) + dst.alias.add(i.copy()); + }; + dst.min = min == null ? null : min.copy(); + dst.max = max == null ? null : max.copy(); + dst.base = base == null ? null : base.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (TypeRefComponent i : type) + dst.type.add(i.copy()); + }; + dst.nameReference = nameReference == null ? null : nameReference.copy(); + dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); + dst.meaningWhenMissing = meaningWhenMissing == null ? null : meaningWhenMissing.copy(); + dst.fixed = fixed == null ? null : fixed.copy(); + dst.pattern = pattern == null ? null : pattern.copy(); + dst.example = example == null ? null : example.copy(); + dst.minValue = minValue == null ? null : minValue.copy(); + dst.maxValue = maxValue == null ? null : maxValue.copy(); + dst.maxLength = maxLength == null ? null : maxLength.copy(); + if (condition != null) { + dst.condition = new ArrayList(); + for (IdType i : condition) + dst.condition.add(i.copy()); + }; + if (constraint != null) { + dst.constraint = new ArrayList(); + for (ElementDefinitionConstraintComponent i : constraint) + dst.constraint.add(i.copy()); + }; + dst.mustSupport = mustSupport == null ? null : mustSupport.copy(); + dst.isModifier = isModifier == null ? null : isModifier.copy(); + dst.isSummary = isSummary == null ? null : isSummary.copy(); + dst.binding = binding == null ? null : binding.copy(); + if (mapping != null) { + dst.mapping = new ArrayList(); + for (ElementDefinitionMappingComponent i : mapping) + dst.mapping.add(i.copy()); + }; + return dst; + } + + protected ElementDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ElementDefinition)) + return false; + ElementDefinition o = (ElementDefinition) other; + return compareDeep(path, o.path, true) && compareDeep(representation, o.representation, true) && compareDeep(name, o.name, true) + && compareDeep(label, o.label, true) && compareDeep(code, o.code, true) && compareDeep(slicing, o.slicing, true) + && compareDeep(short_, o.short_, true) && compareDeep(definition, o.definition, true) && compareDeep(comments, o.comments, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(alias, o.alias, true) && compareDeep(min, o.min, true) + && compareDeep(max, o.max, true) && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) + && compareDeep(nameReference, o.nameReference, true) && compareDeep(defaultValue, o.defaultValue, true) + && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true) && compareDeep(fixed, o.fixed, true) + && compareDeep(pattern, o.pattern, true) && compareDeep(example, o.example, true) && compareDeep(minValue, o.minValue, true) + && compareDeep(maxValue, o.maxValue, true) && compareDeep(maxLength, o.maxLength, true) && compareDeep(condition, o.condition, true) + && compareDeep(constraint, o.constraint, true) && compareDeep(mustSupport, o.mustSupport, true) + && compareDeep(isModifier, o.isModifier, true) && compareDeep(isSummary, o.isSummary, true) && compareDeep(binding, o.binding, true) + && compareDeep(mapping, o.mapping, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ElementDefinition)) + return false; + ElementDefinition o = (ElementDefinition) other; + return compareValues(path, o.path, true) && compareValues(representation, o.representation, true) && compareValues(name, o.name, true) + && compareValues(label, o.label, true) && compareValues(short_, o.short_, true) && compareValues(definition, o.definition, true) + && compareValues(comments, o.comments, true) && compareValues(requirements, o.requirements, true) && compareValues(alias, o.alias, true) + && compareValues(min, o.min, true) && compareValues(max, o.max, true) && compareValues(nameReference, o.nameReference, true) + && compareValues(meaningWhenMissing, o.meaningWhenMissing, true) && compareValues(maxLength, o.maxLength, true) + && compareValues(condition, o.condition, true) && compareValues(mustSupport, o.mustSupport, true) && compareValues(isModifier, o.isModifier, true) + && compareValues(isSummary, o.isSummary, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (representation == null || representation.isEmpty()) + && (name == null || name.isEmpty()) && (label == null || label.isEmpty()) && (code == null || code.isEmpty()) + && (slicing == null || slicing.isEmpty()) && (short_ == null || short_.isEmpty()) && (definition == null || definition.isEmpty()) + && (comments == null || comments.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (alias == null || alias.isEmpty()) && (min == null || min.isEmpty()) && (max == null || max.isEmpty()) + && (base == null || base.isEmpty()) && (type == null || type.isEmpty()) && (nameReference == null || nameReference.isEmpty()) + && (defaultValue == null || defaultValue.isEmpty()) && (meaningWhenMissing == null || meaningWhenMissing.isEmpty()) + && (fixed == null || fixed.isEmpty()) && (pattern == null || pattern.isEmpty()) && (example == null || example.isEmpty()) + && (minValue == null || minValue.isEmpty()) && (maxValue == null || maxValue.isEmpty()) && (maxLength == null || maxLength.isEmpty()) + && (condition == null || condition.isEmpty()) && (constraint == null || constraint.isEmpty()) + && (mustSupport == null || mustSupport.isEmpty()) && (isModifier == null || isModifier.isEmpty()) + && (isSummary == null || isSummary.isEmpty()) && (binding == null || binding.isEmpty()) && (mapping == null || mapping.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityRequest.java new file mode 100644 index 00000000000..88cd3dd6b22 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityRequest.java @@ -0,0 +1,519 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service. + */ +@ResourceDef(name="EligibilityRequest", profile="http://hl7.org/fhir/Profile/EligibilityRequest") +public class EligibilityRequest extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when this resource was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) + protected DateTimeType created; + + /** + * The Insurer who is target of the request. + */ + @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The Insurer who is target of the request.) + */ + protected Organization targetTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization organizationTarget; + + private static final long serialVersionUID = 1836339504L; + + /* + * Constructor + */ + public EligibilityRequest() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public EligibilityRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public EligibilityRequest setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public EligibilityRequest setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public EligibilityRequest setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when this resource was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when this resource was created. + */ + public EligibilityRequest setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The Insurer who is target of the request.) + */ + public EligibilityRequest setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public EligibilityRequest setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public EligibilityRequest setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public EligibilityRequest setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public EligibilityRequest setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public EligibilityRequest setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type EligibilityRequest.created"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "EligibilityRequest"; + + } + + public EligibilityRequest copy() { + EligibilityRequest dst = new EligibilityRequest(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + return dst; + } + + protected EligibilityRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EligibilityRequest)) + return false; + EligibilityRequest o = (EligibilityRequest) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) + && compareDeep(organization, o.organization, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EligibilityRequest)) + return false; + EligibilityRequest o = (EligibilityRequest) other; + return compareValues(created, o.created, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) + && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) + && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.EligibilityRequest; + } + + @SearchParamDefinition(name="identifier", path="EligibilityRequest.identifier", description="The business identifier of the Eligibility", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityResponse.java new file mode 100644 index 00000000000..9af4be7e222 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EligibilityResponse.java @@ -0,0 +1,714 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ +@ResourceDef(name="EligibilityResponse", profile="http://hl7.org/fhir/Profile/EligibilityResponse") +public class EligibilityResponse extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource reference. + */ + @Child(name = "request", type = {EligibilityRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource reference.) + */ + protected EligibilityRequest requestTarget; + + /** + * Transaction status: error, complete. + */ + @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) + protected Enumeration outcome; + + /** + * A description of the status of the adjudication. + */ + @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) + protected StringType disposition; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The Insurer who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + private static final long serialVersionUID = -299931023L; + + /* + * Constructor + */ + public EligibilityResponse() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public EligibilityResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource reference.) + */ + public EligibilityResponse setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public EligibilityRequest getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new EligibilityRequest(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public EligibilityResponse setRequestTarget(EligibilityRequest value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public EligibilityResponse setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public EligibilityResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public EligibilityResponse setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication. + */ + public EligibilityResponse setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public EligibilityResponse setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public EligibilityResponse setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public EligibilityResponse setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public EligibilityResponse setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public EligibilityResponse setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public EligibilityResponse setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public EligibilityResponse setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public EligibilityResponse setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public EligibilityResponse setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EligibilityResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public EligibilityResponse setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(EligibilityRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.outcome"); + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.disposition"); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.created"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "EligibilityResponse"; + + } + + public EligibilityResponse copy() { + EligibilityResponse dst = new EligibilityResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + return dst; + } + + protected EligibilityResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EligibilityResponse)) + return false; + EligibilityResponse o = (EligibilityResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) + && compareDeep(requestOrganization, o.requestOrganization, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EligibilityResponse)) + return false; + EligibilityResponse o = (EligibilityResponse) other; + return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.EligibilityResponse; + } + + @SearchParamDefinition(name="identifier", path="EligibilityResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Encounter.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Encounter.java new file mode 100644 index 00000000000..1e227402945 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Encounter.java @@ -0,0 +1,3105 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ +@ResourceDef(name="Encounter", profile="http://hl7.org/fhir/Profile/Encounter") +public class Encounter extends DomainResource { + + public enum EncounterState { + /** + * The Encounter has not yet started. + */ + PLANNED, + /** + * The Patient is present for the encounter, however is not currently meeting with a practitioner. + */ + ARRIVED, + /** + * The Encounter has begun and the patient is present / the practitioner and the patient are meeting. + */ + INPROGRESS, + /** + * The Encounter has begun, but the patient is temporarily on leave. + */ + ONLEAVE, + /** + * The Encounter has ended. + */ + FINISHED, + /** + * The Encounter has ended before it has begun. + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static EncounterState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("onleave".equals(codeString)) + return ONLEAVE; + if ("finished".equals(codeString)) + return FINISHED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown EncounterState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case ARRIVED: return "arrived"; + case INPROGRESS: return "in-progress"; + case ONLEAVE: return "onleave"; + case FINISHED: return "finished"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PLANNED: return "http://hl7.org/fhir/encounter-state"; + case ARRIVED: return "http://hl7.org/fhir/encounter-state"; + case INPROGRESS: return "http://hl7.org/fhir/encounter-state"; + case ONLEAVE: return "http://hl7.org/fhir/encounter-state"; + case FINISHED: return "http://hl7.org/fhir/encounter-state"; + case CANCELLED: return "http://hl7.org/fhir/encounter-state"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The Encounter has not yet started."; + case ARRIVED: return "The Patient is present for the encounter, however is not currently meeting with a practitioner."; + case INPROGRESS: return "The Encounter has begun and the patient is present / the practitioner and the patient are meeting."; + case ONLEAVE: return "The Encounter has begun, but the patient is temporarily on leave."; + case FINISHED: return "The Encounter has ended."; + case CANCELLED: return "The Encounter has ended before it has begun."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case ARRIVED: return "Arrived"; + case INPROGRESS: return "in Progress"; + case ONLEAVE: return "On Leave"; + case FINISHED: return "Finished"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class EncounterStateEnumFactory implements EnumFactory { + public EncounterState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EncounterState.PLANNED; + if ("arrived".equals(codeString)) + return EncounterState.ARRIVED; + if ("in-progress".equals(codeString)) + return EncounterState.INPROGRESS; + if ("onleave".equals(codeString)) + return EncounterState.ONLEAVE; + if ("finished".equals(codeString)) + return EncounterState.FINISHED; + if ("cancelled".equals(codeString)) + return EncounterState.CANCELLED; + throw new IllegalArgumentException("Unknown EncounterState code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return new Enumeration(this, EncounterState.PLANNED); + if ("arrived".equals(codeString)) + return new Enumeration(this, EncounterState.ARRIVED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, EncounterState.INPROGRESS); + if ("onleave".equals(codeString)) + return new Enumeration(this, EncounterState.ONLEAVE); + if ("finished".equals(codeString)) + return new Enumeration(this, EncounterState.FINISHED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, EncounterState.CANCELLED); + throw new FHIRException("Unknown EncounterState code '"+codeString+"'"); + } + public String toCode(EncounterState code) { + if (code == EncounterState.PLANNED) + return "planned"; + if (code == EncounterState.ARRIVED) + return "arrived"; + if (code == EncounterState.INPROGRESS) + return "in-progress"; + if (code == EncounterState.ONLEAVE) + return "onleave"; + if (code == EncounterState.FINISHED) + return "finished"; + if (code == EncounterState.CANCELLED) + return "cancelled"; + return "?"; + } + } + + public enum EncounterClass { + /** + * An encounter during which the patient is hospitalized and stays overnight. + */ + INPATIENT, + /** + * An encounter during which the patient is not hospitalized overnight. + */ + OUTPATIENT, + /** + * An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit. + */ + AMBULATORY, + /** + * An encounter in the Emergency Care Department. + */ + EMERGENCY, + /** + * An encounter where the practitioner visits the patient at his/her home. + */ + HOME, + /** + * An encounter taking place outside the regular environment for giving care. + */ + FIELD, + /** + * An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight. + */ + DAYTIME, + /** + * An encounter that takes place where the patient and practitioner do not physically meet but use electronic means for contact. + */ + VIRTUAL, + /** + * Any other encounter type that is not described by one of the other values. Where this is used it is expected that an implementer will include an extension value to define what the actual other type is. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static EncounterClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return INPATIENT; + if ("outpatient".equals(codeString)) + return OUTPATIENT; + if ("ambulatory".equals(codeString)) + return AMBULATORY; + if ("emergency".equals(codeString)) + return EMERGENCY; + if ("home".equals(codeString)) + return HOME; + if ("field".equals(codeString)) + return FIELD; + if ("daytime".equals(codeString)) + return DAYTIME; + if ("virtual".equals(codeString)) + return VIRTUAL; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown EncounterClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPATIENT: return "inpatient"; + case OUTPATIENT: return "outpatient"; + case AMBULATORY: return "ambulatory"; + case EMERGENCY: return "emergency"; + case HOME: return "home"; + case FIELD: return "field"; + case DAYTIME: return "daytime"; + case VIRTUAL: return "virtual"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPATIENT: return "http://hl7.org/fhir/encounter-class"; + case OUTPATIENT: return "http://hl7.org/fhir/encounter-class"; + case AMBULATORY: return "http://hl7.org/fhir/encounter-class"; + case EMERGENCY: return "http://hl7.org/fhir/encounter-class"; + case HOME: return "http://hl7.org/fhir/encounter-class"; + case FIELD: return "http://hl7.org/fhir/encounter-class"; + case DAYTIME: return "http://hl7.org/fhir/encounter-class"; + case VIRTUAL: return "http://hl7.org/fhir/encounter-class"; + case OTHER: return "http://hl7.org/fhir/encounter-class"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPATIENT: return "An encounter during which the patient is hospitalized and stays overnight."; + case OUTPATIENT: return "An encounter during which the patient is not hospitalized overnight."; + case AMBULATORY: return "An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit."; + case EMERGENCY: return "An encounter in the Emergency Care Department."; + case HOME: return "An encounter where the practitioner visits the patient at his/her home."; + case FIELD: return "An encounter taking place outside the regular environment for giving care."; + case DAYTIME: return "An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight."; + case VIRTUAL: return "An encounter that takes place where the patient and practitioner do not physically meet but use electronic means for contact."; + case OTHER: return "Any other encounter type that is not described by one of the other values. Where this is used it is expected that an implementer will include an extension value to define what the actual other type is."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPATIENT: return "Inpatient"; + case OUTPATIENT: return "Outpatient"; + case AMBULATORY: return "Ambulatory"; + case EMERGENCY: return "Emergency"; + case HOME: return "Home"; + case FIELD: return "Field"; + case DAYTIME: return "Daytime"; + case VIRTUAL: return "Virtual"; + case OTHER: return "Other"; + default: return "?"; + } + } + } + + public static class EncounterClassEnumFactory implements EnumFactory { + public EncounterClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return EncounterClass.INPATIENT; + if ("outpatient".equals(codeString)) + return EncounterClass.OUTPATIENT; + if ("ambulatory".equals(codeString)) + return EncounterClass.AMBULATORY; + if ("emergency".equals(codeString)) + return EncounterClass.EMERGENCY; + if ("home".equals(codeString)) + return EncounterClass.HOME; + if ("field".equals(codeString)) + return EncounterClass.FIELD; + if ("daytime".equals(codeString)) + return EncounterClass.DAYTIME; + if ("virtual".equals(codeString)) + return EncounterClass.VIRTUAL; + if ("other".equals(codeString)) + return EncounterClass.OTHER; + throw new IllegalArgumentException("Unknown EncounterClass code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return new Enumeration(this, EncounterClass.INPATIENT); + if ("outpatient".equals(codeString)) + return new Enumeration(this, EncounterClass.OUTPATIENT); + if ("ambulatory".equals(codeString)) + return new Enumeration(this, EncounterClass.AMBULATORY); + if ("emergency".equals(codeString)) + return new Enumeration(this, EncounterClass.EMERGENCY); + if ("home".equals(codeString)) + return new Enumeration(this, EncounterClass.HOME); + if ("field".equals(codeString)) + return new Enumeration(this, EncounterClass.FIELD); + if ("daytime".equals(codeString)) + return new Enumeration(this, EncounterClass.DAYTIME); + if ("virtual".equals(codeString)) + return new Enumeration(this, EncounterClass.VIRTUAL); + if ("other".equals(codeString)) + return new Enumeration(this, EncounterClass.OTHER); + throw new FHIRException("Unknown EncounterClass code '"+codeString+"'"); + } + public String toCode(EncounterClass code) { + if (code == EncounterClass.INPATIENT) + return "inpatient"; + if (code == EncounterClass.OUTPATIENT) + return "outpatient"; + if (code == EncounterClass.AMBULATORY) + return "ambulatory"; + if (code == EncounterClass.EMERGENCY) + return "emergency"; + if (code == EncounterClass.HOME) + return "home"; + if (code == EncounterClass.FIELD) + return "field"; + if (code == EncounterClass.DAYTIME) + return "daytime"; + if (code == EncounterClass.VIRTUAL) + return "virtual"; + if (code == EncounterClass.OTHER) + return "other"; + return "?"; + } + } + + public enum EncounterLocationStatus { + /** + * The patient is planned to be moved to this location at some point in the future. + */ + PLANNED, + /** + * The patient is currently at this location, or was between the period specified. + +A system may update these records when the patient leaves the location to either reserved, or completed + */ + ACTIVE, + /** + * This location is held empty for this patient. + */ + RESERVED, + /** + * The patient was at this location during the period specified. + +Not to be used when the patient is currently at the location + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static EncounterLocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("active".equals(codeString)) + return ACTIVE; + if ("reserved".equals(codeString)) + return RESERVED; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case ACTIVE: return "active"; + case RESERVED: return "reserved"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PLANNED: return "http://hl7.org/fhir/encounter-location-status"; + case ACTIVE: return "http://hl7.org/fhir/encounter-location-status"; + case RESERVED: return "http://hl7.org/fhir/encounter-location-status"; + case COMPLETED: return "http://hl7.org/fhir/encounter-location-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The patient is planned to be moved to this location at some point in the future."; + case ACTIVE: return "The patient is currently at this location, or was between the period specified.\n\nA system may update these records when the patient leaves the location to either reserved, or completed"; + case RESERVED: return "This location is held empty for this patient."; + case COMPLETED: return "The patient was at this location during the period specified.\n\nNot to be used when the patient is currently at the location"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case ACTIVE: return "Active"; + case RESERVED: return "Reserved"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + } + + public static class EncounterLocationStatusEnumFactory implements EnumFactory { + public EncounterLocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EncounterLocationStatus.PLANNED; + if ("active".equals(codeString)) + return EncounterLocationStatus.ACTIVE; + if ("reserved".equals(codeString)) + return EncounterLocationStatus.RESERVED; + if ("completed".equals(codeString)) + return EncounterLocationStatus.COMPLETED; + throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.PLANNED); + if ("active".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.ACTIVE); + if ("reserved".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.RESERVED); + if ("completed".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.COMPLETED); + throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public String toCode(EncounterLocationStatus code) { + if (code == EncounterLocationStatus.PLANNED) + return "planned"; + if (code == EncounterLocationStatus.ACTIVE) + return "active"; + if (code == EncounterLocationStatus.RESERVED) + return "reserved"; + if (code == EncounterLocationStatus.COMPLETED) + return "completed"; + return "?"; + } + } + + @Block() + public static class EncounterStatusHistoryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * planned | arrived | in-progress | onleave | finished | cancelled. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="planned | arrived | in-progress | onleave | finished | cancelled", formalDefinition="planned | arrived | in-progress | onleave | finished | cancelled." ) + protected Enumeration status; + + /** + * The time that the episode was in the specified status. + */ + @Child(name = "period", type = {Period.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The time that the episode was in the specified status", formalDefinition="The time that the episode was in the specified status." ) + protected Period period; + + private static final long serialVersionUID = 919229161L; + + /* + * Constructor + */ + public EncounterStatusHistoryComponent() { + super(); + } + + /* + * Constructor + */ + public EncounterStatusHistoryComponent(Enumeration status, Period period) { + super(); + this.status = status; + this.period = period; + } + + /** + * @return {@link #status} (planned | arrived | in-progress | onleave | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterStatusHistoryComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EncounterStateEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (planned | arrived | in-progress | onleave | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public EncounterStatusHistoryComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return planned | arrived | in-progress | onleave | finished | cancelled. + */ + public EncounterState getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value planned | arrived | in-progress | onleave | finished | cancelled. + */ + public EncounterStatusHistoryComponent setStatus(EncounterState value) { + if (this.status == null) + this.status = new Enumeration(new EncounterStateEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #period} (The time that the episode was in the specified status.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterStatusHistoryComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The time that the episode was in the specified status.) + */ + public EncounterStatusHistoryComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "code", "planned | arrived | in-progress | onleave | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("period", "Period", "The time that the episode was in the specified status.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = new EncounterStateEnumFactory().fromType(value); // Enumeration + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public EncounterStatusHistoryComponent copy() { + EncounterStatusHistoryComponent dst = new EncounterStatusHistoryComponent(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EncounterStatusHistoryComponent)) + return false; + EncounterStatusHistoryComponent o = (EncounterStatusHistoryComponent) other; + return compareDeep(status, o.status, true) && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EncounterStatusHistoryComponent)) + return false; + EncounterStatusHistoryComponent o = (EncounterStatusHistoryComponent) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) + ; + } + + public String fhirType() { + return "Encounter.statusHistory"; + + } + + } + + @Block() + public static class EncounterParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of participant in encounter. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Role of participant in encounter", formalDefinition="Role of participant in encounter." ) + protected List type; + + /** + * The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period of time during the encounter participant was present", formalDefinition="The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period." ) + protected Period period; + + /** + * Persons involved in the encounter other than the patient. + */ + @Child(name = "individual", type = {Practitioner.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Persons involved in the encounter other than the patient", formalDefinition="Persons involved in the encounter other than the patient." ) + protected Reference individual; + + /** + * The actual object that is the target of the reference (Persons involved in the encounter other than the patient.) + */ + protected Resource individualTarget; + + private static final long serialVersionUID = 317095765L; + + /* + * Constructor + */ + public EncounterParticipantComponent() { + super(); + } + + /** + * @return {@link #type} (Role of participant in encounter.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Role of participant in encounter.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public EncounterParticipantComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #period} (The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterParticipantComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.) + */ + public EncounterParticipantComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #individual} (Persons involved in the encounter other than the patient.) + */ + public Reference getIndividual() { + if (this.individual == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterParticipantComponent.individual"); + else if (Configuration.doAutoCreate()) + this.individual = new Reference(); // cc + return this.individual; + } + + public boolean hasIndividual() { + return this.individual != null && !this.individual.isEmpty(); + } + + /** + * @param value {@link #individual} (Persons involved in the encounter other than the patient.) + */ + public EncounterParticipantComponent setIndividual(Reference value) { + this.individual = value; + return this; + } + + /** + * @return {@link #individual} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Persons involved in the encounter other than the patient.) + */ + public Resource getIndividualTarget() { + return this.individualTarget; + } + + /** + * @param value {@link #individual} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Persons involved in the encounter other than the patient.) + */ + public EncounterParticipantComponent setIndividualTarget(Resource value) { + this.individualTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "Role of participant in encounter.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("period", "Period", "The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("individual", "Reference(Practitioner|RelatedPerson)", "Persons involved in the encounter other than the patient.", 0, java.lang.Integer.MAX_VALUE, individual)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("individual")) + this.individual = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("individual")) { + this.individual = new Reference(); + return this.individual; + } + else + return super.addChild(name); + } + + public EncounterParticipantComponent copy() { + EncounterParticipantComponent dst = new EncounterParticipantComponent(); + copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.individual = individual == null ? null : individual.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EncounterParticipantComponent)) + return false; + EncounterParticipantComponent o = (EncounterParticipantComponent) other; + return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(individual, o.individual, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EncounterParticipantComponent)) + return false; + EncounterParticipantComponent o = (EncounterParticipantComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (period == null || period.isEmpty()) + && (individual == null || individual.isEmpty()); + } + + public String fhirType() { + return "Encounter.participant"; + + } + + } + + @Block() + public static class EncounterHospitalizationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Pre-admission identifier. + */ + @Child(name = "preAdmissionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Pre-admission identifier", formalDefinition="Pre-admission identifier." ) + protected Identifier preAdmissionIdentifier; + + /** + * The location from which the patient came before admission. + */ + @Child(name = "origin", type = {Location.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The location from which the patient came before admission", formalDefinition="The location from which the patient came before admission." ) + protected Reference origin; + + /** + * The actual object that is the target of the reference (The location from which the patient came before admission.) + */ + protected Location originTarget; + + /** + * From where patient was admitted (physician referral, transfer). + */ + @Child(name = "admitSource", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="From where patient was admitted (physician referral, transfer)", formalDefinition="From where patient was admitted (physician referral, transfer)." ) + protected CodeableConcept admitSource; + + /** + * The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter. + */ + @Child(name = "admittingDiagnosis", type = {Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The admitting diagnosis as reported by admitting practitioner", formalDefinition="The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter." ) + protected List admittingDiagnosis; + /** + * The actual objects that are the target of the reference (The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.) + */ + protected List admittingDiagnosisTarget; + + + /** + * Whether this hospitalization is a readmission and why if known. + */ + @Child(name = "reAdmission", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission", formalDefinition="Whether this hospitalization is a readmission and why if known." ) + protected CodeableConcept reAdmission; + + /** + * Diet preferences reported by the patient. + */ + @Child(name = "dietPreference", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Diet preferences reported by the patient", formalDefinition="Diet preferences reported by the patient." ) + protected List dietPreference; + + /** + * Special courtesies (VIP, board member). + */ + @Child(name = "specialCourtesy", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Special courtesies (VIP, board member)", formalDefinition="Special courtesies (VIP, board member)." ) + protected List specialCourtesy; + + /** + * Wheelchair, translator, stretcher, etc. + */ + @Child(name = "specialArrangement", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Wheelchair, translator, stretcher, etc.", formalDefinition="Wheelchair, translator, stretcher, etc." ) + protected List specialArrangement; + + /** + * Location to which the patient is discharged. + */ + @Child(name = "destination", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Location to which the patient is discharged", formalDefinition="Location to which the patient is discharged." ) + protected Reference destination; + + /** + * The actual object that is the target of the reference (Location to which the patient is discharged.) + */ + protected Location destinationTarget; + + /** + * Category or kind of location after discharge. + */ + @Child(name = "dischargeDisposition", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Category or kind of location after discharge", formalDefinition="Category or kind of location after discharge." ) + protected CodeableConcept dischargeDisposition; + + /** + * The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete. + */ + @Child(name = "dischargeDiagnosis", type = {Condition.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete", formalDefinition="The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete." ) + protected List dischargeDiagnosis; + /** + * The actual objects that are the target of the reference (The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.) + */ + protected List dischargeDiagnosisTarget; + + + private static final long serialVersionUID = 164618034L; + + /* + * Constructor + */ + public EncounterHospitalizationComponent() { + super(); + } + + /** + * @return {@link #preAdmissionIdentifier} (Pre-admission identifier.) + */ + public Identifier getPreAdmissionIdentifier() { + if (this.preAdmissionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.preAdmissionIdentifier"); + else if (Configuration.doAutoCreate()) + this.preAdmissionIdentifier = new Identifier(); // cc + return this.preAdmissionIdentifier; + } + + public boolean hasPreAdmissionIdentifier() { + return this.preAdmissionIdentifier != null && !this.preAdmissionIdentifier.isEmpty(); + } + + /** + * @param value {@link #preAdmissionIdentifier} (Pre-admission identifier.) + */ + public EncounterHospitalizationComponent setPreAdmissionIdentifier(Identifier value) { + this.preAdmissionIdentifier = value; + return this; + } + + /** + * @return {@link #origin} (The location from which the patient came before admission.) + */ + public Reference getOrigin() { + if (this.origin == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.origin"); + else if (Configuration.doAutoCreate()) + this.origin = new Reference(); // cc + return this.origin; + } + + public boolean hasOrigin() { + return this.origin != null && !this.origin.isEmpty(); + } + + /** + * @param value {@link #origin} (The location from which the patient came before admission.) + */ + public EncounterHospitalizationComponent setOrigin(Reference value) { + this.origin = value; + return this; + } + + /** + * @return {@link #origin} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location from which the patient came before admission.) + */ + public Location getOriginTarget() { + if (this.originTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.origin"); + else if (Configuration.doAutoCreate()) + this.originTarget = new Location(); // aa + return this.originTarget; + } + + /** + * @param value {@link #origin} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location from which the patient came before admission.) + */ + public EncounterHospitalizationComponent setOriginTarget(Location value) { + this.originTarget = value; + return this; + } + + /** + * @return {@link #admitSource} (From where patient was admitted (physician referral, transfer).) + */ + public CodeableConcept getAdmitSource() { + if (this.admitSource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.admitSource"); + else if (Configuration.doAutoCreate()) + this.admitSource = new CodeableConcept(); // cc + return this.admitSource; + } + + public boolean hasAdmitSource() { + return this.admitSource != null && !this.admitSource.isEmpty(); + } + + /** + * @param value {@link #admitSource} (From where patient was admitted (physician referral, transfer).) + */ + public EncounterHospitalizationComponent setAdmitSource(CodeableConcept value) { + this.admitSource = value; + return this; + } + + /** + * @return {@link #admittingDiagnosis} (The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.) + */ + public List getAdmittingDiagnosis() { + if (this.admittingDiagnosis == null) + this.admittingDiagnosis = new ArrayList(); + return this.admittingDiagnosis; + } + + public boolean hasAdmittingDiagnosis() { + if (this.admittingDiagnosis == null) + return false; + for (Reference item : this.admittingDiagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #admittingDiagnosis} (The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.) + */ + // syntactic sugar + public Reference addAdmittingDiagnosis() { //3 + Reference t = new Reference(); + if (this.admittingDiagnosis == null) + this.admittingDiagnosis = new ArrayList(); + this.admittingDiagnosis.add(t); + return t; + } + + // syntactic sugar + public EncounterHospitalizationComponent addAdmittingDiagnosis(Reference t) { //3 + if (t == null) + return this; + if (this.admittingDiagnosis == null) + this.admittingDiagnosis = new ArrayList(); + this.admittingDiagnosis.add(t); + return this; + } + + /** + * @return {@link #admittingDiagnosis} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.) + */ + public List getAdmittingDiagnosisTarget() { + if (this.admittingDiagnosisTarget == null) + this.admittingDiagnosisTarget = new ArrayList(); + return this.admittingDiagnosisTarget; + } + + // syntactic sugar + /** + * @return {@link #admittingDiagnosis} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.) + */ + public Condition addAdmittingDiagnosisTarget() { + Condition r = new Condition(); + if (this.admittingDiagnosisTarget == null) + this.admittingDiagnosisTarget = new ArrayList(); + this.admittingDiagnosisTarget.add(r); + return r; + } + + /** + * @return {@link #reAdmission} (Whether this hospitalization is a readmission and why if known.) + */ + public CodeableConcept getReAdmission() { + if (this.reAdmission == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.reAdmission"); + else if (Configuration.doAutoCreate()) + this.reAdmission = new CodeableConcept(); // cc + return this.reAdmission; + } + + public boolean hasReAdmission() { + return this.reAdmission != null && !this.reAdmission.isEmpty(); + } + + /** + * @param value {@link #reAdmission} (Whether this hospitalization is a readmission and why if known.) + */ + public EncounterHospitalizationComponent setReAdmission(CodeableConcept value) { + this.reAdmission = value; + return this; + } + + /** + * @return {@link #dietPreference} (Diet preferences reported by the patient.) + */ + public List getDietPreference() { + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + return this.dietPreference; + } + + public boolean hasDietPreference() { + if (this.dietPreference == null) + return false; + for (CodeableConcept item : this.dietPreference) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dietPreference} (Diet preferences reported by the patient.) + */ + // syntactic sugar + public CodeableConcept addDietPreference() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + this.dietPreference.add(t); + return t; + } + + // syntactic sugar + public EncounterHospitalizationComponent addDietPreference(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + this.dietPreference.add(t); + return this; + } + + /** + * @return {@link #specialCourtesy} (Special courtesies (VIP, board member).) + */ + public List getSpecialCourtesy() { + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + return this.specialCourtesy; + } + + public boolean hasSpecialCourtesy() { + if (this.specialCourtesy == null) + return false; + for (CodeableConcept item : this.specialCourtesy) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialCourtesy} (Special courtesies (VIP, board member).) + */ + // syntactic sugar + public CodeableConcept addSpecialCourtesy() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + this.specialCourtesy.add(t); + return t; + } + + // syntactic sugar + public EncounterHospitalizationComponent addSpecialCourtesy(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + this.specialCourtesy.add(t); + return this; + } + + /** + * @return {@link #specialArrangement} (Wheelchair, translator, stretcher, etc.) + */ + public List getSpecialArrangement() { + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + return this.specialArrangement; + } + + public boolean hasSpecialArrangement() { + if (this.specialArrangement == null) + return false; + for (CodeableConcept item : this.specialArrangement) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialArrangement} (Wheelchair, translator, stretcher, etc.) + */ + // syntactic sugar + public CodeableConcept addSpecialArrangement() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + this.specialArrangement.add(t); + return t; + } + + // syntactic sugar + public EncounterHospitalizationComponent addSpecialArrangement(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + this.specialArrangement.add(t); + return this; + } + + /** + * @return {@link #destination} (Location to which the patient is discharged.) + */ + public Reference getDestination() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new Reference(); // cc + return this.destination; + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (Location to which the patient is discharged.) + */ + public EncounterHospitalizationComponent setDestination(Reference value) { + this.destination = value; + return this; + } + + /** + * @return {@link #destination} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Location to which the patient is discharged.) + */ + public Location getDestinationTarget() { + if (this.destinationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.destination"); + else if (Configuration.doAutoCreate()) + this.destinationTarget = new Location(); // aa + return this.destinationTarget; + } + + /** + * @param value {@link #destination} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Location to which the patient is discharged.) + */ + public EncounterHospitalizationComponent setDestinationTarget(Location value) { + this.destinationTarget = value; + return this; + } + + /** + * @return {@link #dischargeDisposition} (Category or kind of location after discharge.) + */ + public CodeableConcept getDischargeDisposition() { + if (this.dischargeDisposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterHospitalizationComponent.dischargeDisposition"); + else if (Configuration.doAutoCreate()) + this.dischargeDisposition = new CodeableConcept(); // cc + return this.dischargeDisposition; + } + + public boolean hasDischargeDisposition() { + return this.dischargeDisposition != null && !this.dischargeDisposition.isEmpty(); + } + + /** + * @param value {@link #dischargeDisposition} (Category or kind of location after discharge.) + */ + public EncounterHospitalizationComponent setDischargeDisposition(CodeableConcept value) { + this.dischargeDisposition = value; + return this; + } + + /** + * @return {@link #dischargeDiagnosis} (The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.) + */ + public List getDischargeDiagnosis() { + if (this.dischargeDiagnosis == null) + this.dischargeDiagnosis = new ArrayList(); + return this.dischargeDiagnosis; + } + + public boolean hasDischargeDiagnosis() { + if (this.dischargeDiagnosis == null) + return false; + for (Reference item : this.dischargeDiagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dischargeDiagnosis} (The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.) + */ + // syntactic sugar + public Reference addDischargeDiagnosis() { //3 + Reference t = new Reference(); + if (this.dischargeDiagnosis == null) + this.dischargeDiagnosis = new ArrayList(); + this.dischargeDiagnosis.add(t); + return t; + } + + // syntactic sugar + public EncounterHospitalizationComponent addDischargeDiagnosis(Reference t) { //3 + if (t == null) + return this; + if (this.dischargeDiagnosis == null) + this.dischargeDiagnosis = new ArrayList(); + this.dischargeDiagnosis.add(t); + return this; + } + + /** + * @return {@link #dischargeDiagnosis} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.) + */ + public List getDischargeDiagnosisTarget() { + if (this.dischargeDiagnosisTarget == null) + this.dischargeDiagnosisTarget = new ArrayList(); + return this.dischargeDiagnosisTarget; + } + + // syntactic sugar + /** + * @return {@link #dischargeDiagnosis} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.) + */ + public Condition addDischargeDiagnosisTarget() { + Condition r = new Condition(); + if (this.dischargeDiagnosisTarget == null) + this.dischargeDiagnosisTarget = new ArrayList(); + this.dischargeDiagnosisTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("preAdmissionIdentifier", "Identifier", "Pre-admission identifier.", 0, java.lang.Integer.MAX_VALUE, preAdmissionIdentifier)); + childrenList.add(new Property("origin", "Reference(Location)", "The location from which the patient came before admission.", 0, java.lang.Integer.MAX_VALUE, origin)); + childrenList.add(new Property("admitSource", "CodeableConcept", "From where patient was admitted (physician referral, transfer).", 0, java.lang.Integer.MAX_VALUE, admitSource)); + childrenList.add(new Property("admittingDiagnosis", "Reference(Condition)", "The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.", 0, java.lang.Integer.MAX_VALUE, admittingDiagnosis)); + childrenList.add(new Property("reAdmission", "CodeableConcept", "Whether this hospitalization is a readmission and why if known.", 0, java.lang.Integer.MAX_VALUE, reAdmission)); + childrenList.add(new Property("dietPreference", "CodeableConcept", "Diet preferences reported by the patient.", 0, java.lang.Integer.MAX_VALUE, dietPreference)); + childrenList.add(new Property("specialCourtesy", "CodeableConcept", "Special courtesies (VIP, board member).", 0, java.lang.Integer.MAX_VALUE, specialCourtesy)); + childrenList.add(new Property("specialArrangement", "CodeableConcept", "Wheelchair, translator, stretcher, etc.", 0, java.lang.Integer.MAX_VALUE, specialArrangement)); + childrenList.add(new Property("destination", "Reference(Location)", "Location to which the patient is discharged.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("dischargeDisposition", "CodeableConcept", "Category or kind of location after discharge.", 0, java.lang.Integer.MAX_VALUE, dischargeDisposition)); + childrenList.add(new Property("dischargeDiagnosis", "Reference(Condition)", "The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.", 0, java.lang.Integer.MAX_VALUE, dischargeDiagnosis)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("preAdmissionIdentifier")) + this.preAdmissionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("origin")) + this.origin = castToReference(value); // Reference + else if (name.equals("admitSource")) + this.admitSource = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("admittingDiagnosis")) + this.getAdmittingDiagnosis().add(castToReference(value)); + else if (name.equals("reAdmission")) + this.reAdmission = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dietPreference")) + this.getDietPreference().add(castToCodeableConcept(value)); + else if (name.equals("specialCourtesy")) + this.getSpecialCourtesy().add(castToCodeableConcept(value)); + else if (name.equals("specialArrangement")) + this.getSpecialArrangement().add(castToCodeableConcept(value)); + else if (name.equals("destination")) + this.destination = castToReference(value); // Reference + else if (name.equals("dischargeDisposition")) + this.dischargeDisposition = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dischargeDiagnosis")) + this.getDischargeDiagnosis().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("preAdmissionIdentifier")) { + this.preAdmissionIdentifier = new Identifier(); + return this.preAdmissionIdentifier; + } + else if (name.equals("origin")) { + this.origin = new Reference(); + return this.origin; + } + else if (name.equals("admitSource")) { + this.admitSource = new CodeableConcept(); + return this.admitSource; + } + else if (name.equals("admittingDiagnosis")) { + return addAdmittingDiagnosis(); + } + else if (name.equals("reAdmission")) { + this.reAdmission = new CodeableConcept(); + return this.reAdmission; + } + else if (name.equals("dietPreference")) { + return addDietPreference(); + } + else if (name.equals("specialCourtesy")) { + return addSpecialCourtesy(); + } + else if (name.equals("specialArrangement")) { + return addSpecialArrangement(); + } + else if (name.equals("destination")) { + this.destination = new Reference(); + return this.destination; + } + else if (name.equals("dischargeDisposition")) { + this.dischargeDisposition = new CodeableConcept(); + return this.dischargeDisposition; + } + else if (name.equals("dischargeDiagnosis")) { + return addDischargeDiagnosis(); + } + else + return super.addChild(name); + } + + public EncounterHospitalizationComponent copy() { + EncounterHospitalizationComponent dst = new EncounterHospitalizationComponent(); + copyValues(dst); + dst.preAdmissionIdentifier = preAdmissionIdentifier == null ? null : preAdmissionIdentifier.copy(); + dst.origin = origin == null ? null : origin.copy(); + dst.admitSource = admitSource == null ? null : admitSource.copy(); + if (admittingDiagnosis != null) { + dst.admittingDiagnosis = new ArrayList(); + for (Reference i : admittingDiagnosis) + dst.admittingDiagnosis.add(i.copy()); + }; + dst.reAdmission = reAdmission == null ? null : reAdmission.copy(); + if (dietPreference != null) { + dst.dietPreference = new ArrayList(); + for (CodeableConcept i : dietPreference) + dst.dietPreference.add(i.copy()); + }; + if (specialCourtesy != null) { + dst.specialCourtesy = new ArrayList(); + for (CodeableConcept i : specialCourtesy) + dst.specialCourtesy.add(i.copy()); + }; + if (specialArrangement != null) { + dst.specialArrangement = new ArrayList(); + for (CodeableConcept i : specialArrangement) + dst.specialArrangement.add(i.copy()); + }; + dst.destination = destination == null ? null : destination.copy(); + dst.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.copy(); + if (dischargeDiagnosis != null) { + dst.dischargeDiagnosis = new ArrayList(); + for (Reference i : dischargeDiagnosis) + dst.dischargeDiagnosis.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EncounterHospitalizationComponent)) + return false; + EncounterHospitalizationComponent o = (EncounterHospitalizationComponent) other; + return compareDeep(preAdmissionIdentifier, o.preAdmissionIdentifier, true) && compareDeep(origin, o.origin, true) + && compareDeep(admitSource, o.admitSource, true) && compareDeep(admittingDiagnosis, o.admittingDiagnosis, true) + && compareDeep(reAdmission, o.reAdmission, true) && compareDeep(dietPreference, o.dietPreference, true) + && compareDeep(specialCourtesy, o.specialCourtesy, true) && compareDeep(specialArrangement, o.specialArrangement, true) + && compareDeep(destination, o.destination, true) && compareDeep(dischargeDisposition, o.dischargeDisposition, true) + && compareDeep(dischargeDiagnosis, o.dischargeDiagnosis, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EncounterHospitalizationComponent)) + return false; + EncounterHospitalizationComponent o = (EncounterHospitalizationComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (preAdmissionIdentifier == null || preAdmissionIdentifier.isEmpty()) + && (origin == null || origin.isEmpty()) && (admitSource == null || admitSource.isEmpty()) + && (admittingDiagnosis == null || admittingDiagnosis.isEmpty()) && (reAdmission == null || reAdmission.isEmpty()) + && (dietPreference == null || dietPreference.isEmpty()) && (specialCourtesy == null || specialCourtesy.isEmpty()) + && (specialArrangement == null || specialArrangement.isEmpty()) && (destination == null || destination.isEmpty()) + && (dischargeDisposition == null || dischargeDisposition.isEmpty()) && (dischargeDiagnosis == null || dischargeDiagnosis.isEmpty()) + ; + } + + public String fhirType() { + return "Encounter.hospitalization"; + + } + + } + + @Block() + public static class EncounterLocationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The location where the encounter takes place. + */ + @Child(name = "location", type = {Location.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Location the encounter takes place", formalDefinition="The location where the encounter takes place." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The location where the encounter takes place.) + */ + protected Location locationTarget; + + /** + * The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="planned | active | reserved | completed", formalDefinition="The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time." ) + protected Enumeration status; + + /** + * Time period during which the patient was present at the location. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time period during which the patient was present at the location", formalDefinition="Time period during which the patient was present at the location." ) + protected Period period; + + private static final long serialVersionUID = -322984880L; + + /* + * Constructor + */ + public EncounterLocationComponent() { + super(); + } + + /* + * Constructor + */ + public EncounterLocationComponent(Reference location) { + super(); + this.location = location; + } + + /** + * @return {@link #location} (The location where the encounter takes place.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The location where the encounter takes place.) + */ + public EncounterLocationComponent setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where the encounter takes place.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where the encounter takes place.) + */ + public EncounterLocationComponent setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #status} (The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public EncounterLocationComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time. + */ + public EncounterLocationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time. + */ + public EncounterLocationComponent setStatus(EncounterLocationStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #period} (Time period during which the patient was present at the location.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Time period during which the patient was present at the location.) + */ + public EncounterLocationComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("location", "Reference(Location)", "The location where the encounter takes place.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("status", "code", "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("period", "Period", "Time period during which the patient was present at the location.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new EncounterLocationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public EncounterLocationComponent copy() { + EncounterLocationComponent dst = new EncounterLocationComponent(); + copyValues(dst); + dst.location = location == null ? null : location.copy(); + dst.status = status == null ? null : status.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EncounterLocationComponent)) + return false; + EncounterLocationComponent o = (EncounterLocationComponent) other; + return compareDeep(location, o.location, true) && compareDeep(status, o.status, true) && compareDeep(period, o.period, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EncounterLocationComponent)) + return false; + EncounterLocationComponent o = (EncounterLocationComponent) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (location == null || location.isEmpty()) && (status == null || status.isEmpty()) + && (period == null || period.isEmpty()); + } + + public String fhirType() { + return "Encounter.location"; + + } + + } + + /** + * Identifier(s) by which this encounter is known. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifier(s) by which this encounter is known", formalDefinition="Identifier(s) by which this encounter is known." ) + protected List identifier; + + /** + * planned | arrived | in-progress | onleave | finished | cancelled. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="planned | arrived | in-progress | onleave | finished | cancelled", formalDefinition="planned | arrived | in-progress | onleave | finished | cancelled." ) + protected Enumeration status; + + /** + * The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them. + */ + @Child(name = "statusHistory", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="List of past encounter statuses", formalDefinition="The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them." ) + protected List statusHistory; + + /** + * inpatient | outpatient | ambulatory | emergency +. + */ + @Child(name = "class", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="inpatient | outpatient | ambulatory | emergency +", formalDefinition="inpatient | outpatient | ambulatory | emergency +." ) + protected Enumeration class_; + + /** + * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific type of encounter", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." ) + protected List type; + + /** + * Indicates the urgency of the encounter. + */ + @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." ) + protected CodeableConcept priority; + + /** + * The patient present at the encounter. + */ + @Child(name = "patient", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The patient present at the encounter", formalDefinition="The patient present at the encounter." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient present at the encounter.) + */ + protected Patient patientTarget; + + /** + * Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years). + */ + @Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Episode(s) of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)." ) + protected List episodeOfCare; + /** + * The actual objects that are the target of the reference (Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + protected List episodeOfCareTarget; + + + /** + * The referral request this encounter satisfies (incoming referral). + */ + @Child(name = "incomingReferral", type = {ReferralRequest.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The ReferralRequest that initiated this encounter", formalDefinition="The referral request this encounter satisfies (incoming referral)." ) + protected List incomingReferral; + /** + * The actual objects that are the target of the reference (The referral request this encounter satisfies (incoming referral).) + */ + protected List incomingReferralTarget; + + + /** + * The list of people responsible for providing the service. + */ + @Child(name = "participant", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The list of people responsible for providing the service." ) + protected List participant; + + /** + * The appointment that scheduled this encounter. + */ + @Child(name = "appointment", type = {Appointment.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." ) + protected Reference appointment; + + /** + * The actual object that is the target of the reference (The appointment that scheduled this encounter.) + */ + protected Appointment appointmentTarget; + + /** + * The start and end time of the encounter. + */ + @Child(name = "period", type = {Period.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The start and end time of the encounter", formalDefinition="The start and end time of the encounter." ) + protected Period period; + + /** + * Quantity of time the encounter lasted. This excludes the time during leaves of absence. + */ + @Child(name = "length", type = {Duration.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Quantity of time the encounter lasted (less time absent)", formalDefinition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." ) + protected Duration length; + + /** + * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason the encounter takes place (code)", formalDefinition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." ) + protected List reason; + + /** + * Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure. + */ + @Child(name = "indication", type = {Condition.class, Procedure.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reason the encounter takes place (resource)", formalDefinition="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." ) + protected List indication; + /** + * The actual objects that are the target of the reference (Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) + */ + protected List indicationTarget; + + + /** + * Details about the admission to a healthcare service. + */ + @Child(name = "hospitalization", type = {}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details about the admission to a healthcare service", formalDefinition="Details about the admission to a healthcare service." ) + protected EncounterHospitalizationComponent hospitalization; + + /** + * List of locations where the patient has been during this encounter. + */ + @Child(name = "location", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="List of locations where the patient has been", formalDefinition="List of locations where the patient has been during this encounter." ) + protected List location; + + /** + * An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization. + */ + @Child(name = "serviceProvider", type = {Organization.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The custodian organization of this Encounter record", formalDefinition="An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization." ) + protected Reference serviceProvider; + + /** + * The actual object that is the target of the reference (An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.) + */ + protected Organization serviceProviderTarget; + + /** + * Another Encounter of which this encounter is a part of (administratively or in time). + */ + @Child(name = "partOf", type = {Encounter.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Another Encounter this encounter is part of", formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." ) + protected Reference partOf; + + /** + * The actual object that is the target of the reference (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + protected Encounter partOfTarget; + + private static final long serialVersionUID = 929562300L; + + /* + * Constructor + */ + public Encounter() { + super(); + } + + /* + * Constructor + */ + public Encounter(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #identifier} (Identifier(s) by which this encounter is known.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier(s) by which this encounter is known.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Encounter addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (planned | arrived | in-progress | onleave | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EncounterStateEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (planned | arrived | in-progress | onleave | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Encounter setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return planned | arrived | in-progress | onleave | finished | cancelled. + */ + public EncounterState getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value planned | arrived | in-progress | onleave | finished | cancelled. + */ + public Encounter setStatus(EncounterState value) { + if (this.status == null) + this.status = new Enumeration(new EncounterStateEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #statusHistory} (The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.) + */ + public List getStatusHistory() { + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + return this.statusHistory; + } + + public boolean hasStatusHistory() { + if (this.statusHistory == null) + return false; + for (EncounterStatusHistoryComponent item : this.statusHistory) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #statusHistory} (The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.) + */ + // syntactic sugar + public EncounterStatusHistoryComponent addStatusHistory() { //3 + EncounterStatusHistoryComponent t = new EncounterStatusHistoryComponent(); + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + this.statusHistory.add(t); + return t; + } + + // syntactic sugar + public Encounter addStatusHistory(EncounterStatusHistoryComponent t) { //3 + if (t == null) + return this; + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + this.statusHistory.add(t); + return this; + } + + /** + * @return {@link #class_} (inpatient | outpatient | ambulatory | emergency +.). This is the underlying object with id, value and extensions. The accessor "getClass_" gives direct access to the value + */ + public Enumeration getClass_Element() { + if (this.class_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.class_"); + else if (Configuration.doAutoCreate()) + this.class_ = new Enumeration(new EncounterClassEnumFactory()); // bb + return this.class_; + } + + public boolean hasClass_Element() { + return this.class_ != null && !this.class_.isEmpty(); + } + + public boolean hasClass_() { + return this.class_ != null && !this.class_.isEmpty(); + } + + /** + * @param value {@link #class_} (inpatient | outpatient | ambulatory | emergency +.). This is the underlying object with id, value and extensions. The accessor "getClass_" gives direct access to the value + */ + public Encounter setClass_Element(Enumeration value) { + this.class_ = value; + return this; + } + + /** + * @return inpatient | outpatient | ambulatory | emergency +. + */ + public EncounterClass getClass_() { + return this.class_ == null ? null : this.class_.getValue(); + } + + /** + * @param value inpatient | outpatient | ambulatory | emergency +. + */ + public Encounter setClass_(EncounterClass value) { + if (value == null) + this.class_ = null; + else { + if (this.class_ == null) + this.class_ = new Enumeration(new EncounterClassEnumFactory()); + this.class_.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public Encounter addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #priority} (Indicates the urgency of the encounter.) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Indicates the urgency of the encounter.) + */ + public Encounter setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + /** + * @return {@link #patient} (The patient present at the encounter.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient present at the encounter.) + */ + public Encounter setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient present at the encounter.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient present at the encounter.) + */ + public Encounter setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #episodeOfCare} (Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + public List getEpisodeOfCare() { + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + return this.episodeOfCare; + } + + public boolean hasEpisodeOfCare() { + if (this.episodeOfCare == null) + return false; + for (Reference item : this.episodeOfCare) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #episodeOfCare} (Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + // syntactic sugar + public Reference addEpisodeOfCare() { //3 + Reference t = new Reference(); + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + this.episodeOfCare.add(t); + return t; + } + + // syntactic sugar + public Encounter addEpisodeOfCare(Reference t) { //3 + if (t == null) + return this; + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + this.episodeOfCare.add(t); + return this; + } + + /** + * @return {@link #episodeOfCare} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + public List getEpisodeOfCareTarget() { + if (this.episodeOfCareTarget == null) + this.episodeOfCareTarget = new ArrayList(); + return this.episodeOfCareTarget; + } + + // syntactic sugar + /** + * @return {@link #episodeOfCare} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + public EpisodeOfCare addEpisodeOfCareTarget() { + EpisodeOfCare r = new EpisodeOfCare(); + if (this.episodeOfCareTarget == null) + this.episodeOfCareTarget = new ArrayList(); + this.episodeOfCareTarget.add(r); + return r; + } + + /** + * @return {@link #incomingReferral} (The referral request this encounter satisfies (incoming referral).) + */ + public List getIncomingReferral() { + if (this.incomingReferral == null) + this.incomingReferral = new ArrayList(); + return this.incomingReferral; + } + + public boolean hasIncomingReferral() { + if (this.incomingReferral == null) + return false; + for (Reference item : this.incomingReferral) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #incomingReferral} (The referral request this encounter satisfies (incoming referral).) + */ + // syntactic sugar + public Reference addIncomingReferral() { //3 + Reference t = new Reference(); + if (this.incomingReferral == null) + this.incomingReferral = new ArrayList(); + this.incomingReferral.add(t); + return t; + } + + // syntactic sugar + public Encounter addIncomingReferral(Reference t) { //3 + if (t == null) + return this; + if (this.incomingReferral == null) + this.incomingReferral = new ArrayList(); + this.incomingReferral.add(t); + return this; + } + + /** + * @return {@link #incomingReferral} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The referral request this encounter satisfies (incoming referral).) + */ + public List getIncomingReferralTarget() { + if (this.incomingReferralTarget == null) + this.incomingReferralTarget = new ArrayList(); + return this.incomingReferralTarget; + } + + // syntactic sugar + /** + * @return {@link #incomingReferral} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The referral request this encounter satisfies (incoming referral).) + */ + public ReferralRequest addIncomingReferralTarget() { + ReferralRequest r = new ReferralRequest(); + if (this.incomingReferralTarget == null) + this.incomingReferralTarget = new ArrayList(); + this.incomingReferralTarget.add(r); + return r; + } + + /** + * @return {@link #participant} (The list of people responsible for providing the service.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (EncounterParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (The list of people responsible for providing the service.) + */ + // syntactic sugar + public EncounterParticipantComponent addParticipant() { //3 + EncounterParticipantComponent t = new EncounterParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public Encounter addParticipant(EncounterParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return {@link #appointment} (The appointment that scheduled this encounter.) + */ + public Reference getAppointment() { + if (this.appointment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.appointment"); + else if (Configuration.doAutoCreate()) + this.appointment = new Reference(); // cc + return this.appointment; + } + + public boolean hasAppointment() { + return this.appointment != null && !this.appointment.isEmpty(); + } + + /** + * @param value {@link #appointment} (The appointment that scheduled this encounter.) + */ + public Encounter setAppointment(Reference value) { + this.appointment = value; + return this; + } + + /** + * @return {@link #appointment} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The appointment that scheduled this encounter.) + */ + public Appointment getAppointmentTarget() { + if (this.appointmentTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.appointment"); + else if (Configuration.doAutoCreate()) + this.appointmentTarget = new Appointment(); // aa + return this.appointmentTarget; + } + + /** + * @param value {@link #appointment} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The appointment that scheduled this encounter.) + */ + public Encounter setAppointmentTarget(Appointment value) { + this.appointmentTarget = value; + return this; + } + + /** + * @return {@link #period} (The start and end time of the encounter.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The start and end time of the encounter.) + */ + public Encounter setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #length} (Quantity of time the encounter lasted. This excludes the time during leaves of absence.) + */ + public Duration getLength() { + if (this.length == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.length"); + else if (Configuration.doAutoCreate()) + this.length = new Duration(); // cc + return this.length; + } + + public boolean hasLength() { + return this.length != null && !this.length.isEmpty(); + } + + /** + * @param value {@link #length} (Quantity of time the encounter lasted. This excludes the time during leaves of absence.) + */ + public Encounter setLength(Duration value) { + this.length = value; + return this; + } + + /** + * @return {@link #reason} (Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public Encounter addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #indication} (Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) + */ + public List getIndication() { + if (this.indication == null) + this.indication = new ArrayList(); + return this.indication; + } + + public boolean hasIndication() { + if (this.indication == null) + return false; + for (Reference item : this.indication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #indication} (Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) + */ + // syntactic sugar + public Reference addIndication() { //3 + Reference t = new Reference(); + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return t; + } + + // syntactic sugar + public Encounter addIndication(Reference t) { //3 + if (t == null) + return this; + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return this; + } + + /** + * @return {@link #indication} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) + */ + public List getIndicationTarget() { + if (this.indicationTarget == null) + this.indicationTarget = new ArrayList(); + return this.indicationTarget; + } + + /** + * @return {@link #hospitalization} (Details about the admission to a healthcare service.) + */ + public EncounterHospitalizationComponent getHospitalization() { + if (this.hospitalization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.hospitalization"); + else if (Configuration.doAutoCreate()) + this.hospitalization = new EncounterHospitalizationComponent(); // cc + return this.hospitalization; + } + + public boolean hasHospitalization() { + return this.hospitalization != null && !this.hospitalization.isEmpty(); + } + + /** + * @param value {@link #hospitalization} (Details about the admission to a healthcare service.) + */ + public Encounter setHospitalization(EncounterHospitalizationComponent value) { + this.hospitalization = value; + return this; + } + + /** + * @return {@link #location} (List of locations where the patient has been during this encounter.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (EncounterLocationComponent item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #location} (List of locations where the patient has been during this encounter.) + */ + // syntactic sugar + public EncounterLocationComponent addLocation() { //3 + EncounterLocationComponent t = new EncounterLocationComponent(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + // syntactic sugar + public Encounter addLocation(EncounterLocationComponent t) { //3 + if (t == null) + return this; + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return this; + } + + /** + * @return {@link #serviceProvider} (An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.) + */ + public Reference getServiceProvider() { + if (this.serviceProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.serviceProvider"); + else if (Configuration.doAutoCreate()) + this.serviceProvider = new Reference(); // cc + return this.serviceProvider; + } + + public boolean hasServiceProvider() { + return this.serviceProvider != null && !this.serviceProvider.isEmpty(); + } + + /** + * @param value {@link #serviceProvider} (An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.) + */ + public Encounter setServiceProvider(Reference value) { + this.serviceProvider = value; + return this; + } + + /** + * @return {@link #serviceProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.) + */ + public Organization getServiceProviderTarget() { + if (this.serviceProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.serviceProvider"); + else if (Configuration.doAutoCreate()) + this.serviceProviderTarget = new Organization(); // aa + return this.serviceProviderTarget; + } + + /** + * @param value {@link #serviceProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.) + */ + public Encounter setServiceProviderTarget(Organization value) { + this.serviceProviderTarget = value; + return this; + } + + /** + * @return {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Reference getPartOf() { + if (this.partOf == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.partOf"); + else if (Configuration.doAutoCreate()) + this.partOf = new Reference(); // cc + return this.partOf; + } + + public boolean hasPartOf() { + return this.partOf != null && !this.partOf.isEmpty(); + } + + /** + * @param value {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Encounter setPartOf(Reference value) { + this.partOf = value; + return this; + } + + /** + * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Encounter getPartOfTarget() { + if (this.partOfTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.partOf"); + else if (Configuration.doAutoCreate()) + this.partOfTarget = new Encounter(); // aa + return this.partOfTarget; + } + + /** + * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Encounter setPartOfTarget(Encounter value) { + this.partOfTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier(s) by which this encounter is known.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "planned | arrived | in-progress | onleave | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("statusHistory", "", "The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.", 0, java.lang.Integer.MAX_VALUE, statusHistory)); + childrenList.add(new Property("class", "code", "inpatient | outpatient | ambulatory | emergency +.", 0, java.lang.Integer.MAX_VALUE, class_)); + childrenList.add(new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient present at the encounter.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare)); + childrenList.add(new Property("incomingReferral", "Reference(ReferralRequest)", "The referral request this encounter satisfies (incoming referral).", 0, java.lang.Integer.MAX_VALUE, incomingReferral)); + childrenList.add(new Property("participant", "", "The list of people responsible for providing the service.", 0, java.lang.Integer.MAX_VALUE, participant)); + childrenList.add(new Property("appointment", "Reference(Appointment)", "The appointment that scheduled this encounter.", 0, java.lang.Integer.MAX_VALUE, appointment)); + childrenList.add(new Property("period", "Period", "The start and end time of the encounter.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("length", "Duration", "Quantity of time the encounter lasted. This excludes the time during leaves of absence.", 0, java.lang.Integer.MAX_VALUE, length)); + childrenList.add(new Property("reason", "CodeableConcept", "Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("indication", "Reference(Condition|Procedure)", "Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, indication)); + childrenList.add(new Property("hospitalization", "", "Details about the admission to a healthcare service.", 0, java.lang.Integer.MAX_VALUE, hospitalization)); + childrenList.add(new Property("location", "", "List of locations where the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("serviceProvider", "Reference(Organization)", "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", 0, java.lang.Integer.MAX_VALUE, serviceProvider)); + childrenList.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, java.lang.Integer.MAX_VALUE, partOf)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new EncounterStateEnumFactory().fromType(value); // Enumeration + else if (name.equals("statusHistory")) + this.getStatusHistory().add((EncounterStatusHistoryComponent) value); + else if (name.equals("class")) + this.class_ = new EncounterClassEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("priority")) + this.priority = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("episodeOfCare")) + this.getEpisodeOfCare().add(castToReference(value)); + else if (name.equals("incomingReferral")) + this.getIncomingReferral().add(castToReference(value)); + else if (name.equals("participant")) + this.getParticipant().add((EncounterParticipantComponent) value); + else if (name.equals("appointment")) + this.appointment = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("length")) + this.length = castToDuration(value); // Duration + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("indication")) + this.getIndication().add(castToReference(value)); + else if (name.equals("hospitalization")) + this.hospitalization = (EncounterHospitalizationComponent) value; // EncounterHospitalizationComponent + else if (name.equals("location")) + this.getLocation().add((EncounterLocationComponent) value); + else if (name.equals("serviceProvider")) + this.serviceProvider = castToReference(value); // Reference + else if (name.equals("partOf")) + this.partOf = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + } + else if (name.equals("statusHistory")) { + return addStatusHistory(); + } + else if (name.equals("class")) { + throw new FHIRException("Cannot call addChild on a primitive type Encounter.class"); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("episodeOfCare")) { + return addEpisodeOfCare(); + } + else if (name.equals("incomingReferral")) { + return addIncomingReferral(); + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("appointment")) { + this.appointment = new Reference(); + return this.appointment; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("length")) { + this.length = new Duration(); + return this.length; + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("indication")) { + return addIndication(); + } + else if (name.equals("hospitalization")) { + this.hospitalization = new EncounterHospitalizationComponent(); + return this.hospitalization; + } + else if (name.equals("location")) { + return addLocation(); + } + else if (name.equals("serviceProvider")) { + this.serviceProvider = new Reference(); + return this.serviceProvider; + } + else if (name.equals("partOf")) { + this.partOf = new Reference(); + return this.partOf; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Encounter"; + + } + + public Encounter copy() { + Encounter dst = new Encounter(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + if (statusHistory != null) { + dst.statusHistory = new ArrayList(); + for (EncounterStatusHistoryComponent i : statusHistory) + dst.statusHistory.add(i.copy()); + }; + dst.class_ = class_ == null ? null : class_.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.priority = priority == null ? null : priority.copy(); + dst.patient = patient == null ? null : patient.copy(); + if (episodeOfCare != null) { + dst.episodeOfCare = new ArrayList(); + for (Reference i : episodeOfCare) + dst.episodeOfCare.add(i.copy()); + }; + if (incomingReferral != null) { + dst.incomingReferral = new ArrayList(); + for (Reference i : incomingReferral) + dst.incomingReferral.add(i.copy()); + }; + if (participant != null) { + dst.participant = new ArrayList(); + for (EncounterParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + dst.appointment = appointment == null ? null : appointment.copy(); + dst.period = period == null ? null : period.copy(); + dst.length = length == null ? null : length.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + if (indication != null) { + dst.indication = new ArrayList(); + for (Reference i : indication) + dst.indication.add(i.copy()); + }; + dst.hospitalization = hospitalization == null ? null : hospitalization.copy(); + if (location != null) { + dst.location = new ArrayList(); + for (EncounterLocationComponent i : location) + dst.location.add(i.copy()); + }; + dst.serviceProvider = serviceProvider == null ? null : serviceProvider.copy(); + dst.partOf = partOf == null ? null : partOf.copy(); + return dst; + } + + protected Encounter typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Encounter)) + return false; + Encounter o = (Encounter) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusHistory, o.statusHistory, true) + && compareDeep(class_, o.class_, true) && compareDeep(type, o.type, true) && compareDeep(priority, o.priority, true) + && compareDeep(patient, o.patient, true) && compareDeep(episodeOfCare, o.episodeOfCare, true) && compareDeep(incomingReferral, o.incomingReferral, true) + && compareDeep(participant, o.participant, true) && compareDeep(appointment, o.appointment, true) + && compareDeep(period, o.period, true) && compareDeep(length, o.length, true) && compareDeep(reason, o.reason, true) + && compareDeep(indication, o.indication, true) && compareDeep(hospitalization, o.hospitalization, true) + && compareDeep(location, o.location, true) && compareDeep(serviceProvider, o.serviceProvider, true) + && compareDeep(partOf, o.partOf, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Encounter)) + return false; + Encounter o = (Encounter) other; + return compareValues(status, o.status, true) && compareValues(class_, o.class_, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (statusHistory == null || statusHistory.isEmpty()) && (class_ == null || class_.isEmpty()) + && (type == null || type.isEmpty()) && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty()) + && (episodeOfCare == null || episodeOfCare.isEmpty()) && (incomingReferral == null || incomingReferral.isEmpty()) + && (participant == null || participant.isEmpty()) && (appointment == null || appointment.isEmpty()) + && (period == null || period.isEmpty()) && (length == null || length.isEmpty()) && (reason == null || reason.isEmpty()) + && (indication == null || indication.isEmpty()) && (hospitalization == null || hospitalization.isEmpty()) + && (location == null || location.isEmpty()) && (serviceProvider == null || serviceProvider.isEmpty()) + && (partOf == null || partOf.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Encounter; + } + + @SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Encounter.identifier", description="Identifier(s) by which this encounter is known", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="reason", path="Encounter.reason", description="Reason the encounter takes place (code)", type="token" ) + public static final String SP_REASON = "reason"; + @SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="Episode(s) of care that this encounter should be recorded against", type="reference" ) + public static final String SP_EPISODEOFCARE = "episodeofcare"; + @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) + public static final String SP_PARTICIPANTTYPE = "participant-type"; + @SearchParamDefinition(name="incomingreferral", path="Encounter.incomingReferral", description="The ReferralRequest that initiated this encounter", type="reference" ) + public static final String SP_INCOMINGREFERRAL = "incomingreferral"; + @SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference" ) + public static final String SP_PRACTITIONER = "practitioner"; + @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) + public static final String SP_LENGTH = "length"; + @SearchParamDefinition(name="appointment", path="Encounter.appointment", description="The appointment that scheduled this encounter", type="reference" ) + public static final String SP_APPOINTMENT = "appointment"; + @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference" ) + public static final String SP_PARTOF = "part-of"; + @SearchParamDefinition(name="procedure", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) + public static final String SP_PROCEDURE = "procedure"; + @SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference" ) + public static final String SP_PARTICIPANT = "participant"; + @SearchParamDefinition(name="condition", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date" ) + public static final String SP_LOCATIONPERIOD = "location-period"; + @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) + public static final String SP_INDICATION = "indication"; + @SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc.", type="token" ) + public static final String SP_SPECIALARRANGEMENT = "special-arrangement"; + @SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentRequest.java new file mode 100644 index 00000000000..3e94be981ec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentRequest.java @@ -0,0 +1,702 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ +@ResourceDef(name="EnrollmentRequest", profile="http://hl7.org/fhir/Profile/EnrollmentRequest") +public class EnrollmentRequest extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when this resource was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) + protected DateTimeType created; + + /** + * The Insurer who is target of the request. + */ + @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The Insurer who is target of the request.) + */ + protected Organization targetTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization organizationTarget; + + /** + * Patient Resource. + */ + @Child(name = "subject", type = {Patient.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Patient Resource.) + */ + protected Patient subjectTarget; + + /** + * Reference to the program or plan identification, underwriter or payor. + */ + @Child(name = "coverage", type = {Coverage.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) + protected Reference coverage; + + /** + * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) + */ + protected Coverage coverageTarget; + + /** + * The relationship of the patient to the subscriber. + */ + @Child(name = "relationship", type = {Coding.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) + protected Coding relationship; + + private static final long serialVersionUID = -1656505325L; + + /* + * Constructor + */ + public EnrollmentRequest() { + super(); + } + + /* + * Constructor + */ + public EnrollmentRequest(Reference subject, Reference coverage, Coding relationship) { + super(); + this.subject = subject; + this.coverage = coverage; + this.relationship = relationship; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public EnrollmentRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public EnrollmentRequest setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public EnrollmentRequest setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public EnrollmentRequest setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when this resource was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when this resource was created. + */ + public EnrollmentRequest setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The Insurer who is target of the request.) + */ + public EnrollmentRequest setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public EnrollmentRequest setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public EnrollmentRequest setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public EnrollmentRequest setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public EnrollmentRequest setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public EnrollmentRequest setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #subject} (Patient Resource.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Patient Resource.) + */ + public EnrollmentRequest setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) + */ + public Patient getSubjectTarget() { + if (this.subjectTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subjectTarget = new Patient(); // aa + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) + */ + public EnrollmentRequest setSubjectTarget(Patient value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverage() { + if (this.coverage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.coverage"); + else if (Configuration.doAutoCreate()) + this.coverage = new Reference(); // cc + return this.coverage; + } + + public boolean hasCoverage() { + return this.coverage != null && !this.coverage.isEmpty(); + } + + /** + * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public EnrollmentRequest setCoverage(Reference value) { + this.coverage = value; + return this; + } + + /** + * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public Coverage getCoverageTarget() { + if (this.coverageTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.coverage"); + else if (Configuration.doAutoCreate()) + this.coverageTarget = new Coverage(); // aa + return this.coverageTarget; + } + + /** + * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) + */ + public EnrollmentRequest setCoverageTarget(Coverage value) { + this.coverageTarget = value; + return this; + } + + /** + * @return {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentRequest.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of the patient to the subscriber.) + */ + public EnrollmentRequest setRelationship(Coding value) { + this.relationship = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("subject", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("coverage")) + this.coverage = castToReference(value); // Reference + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type EnrollmentRequest.created"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("coverage")) { + this.coverage = new Reference(); + return this.coverage; + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "EnrollmentRequest"; + + } + + public EnrollmentRequest copy() { + EnrollmentRequest dst = new EnrollmentRequest(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.coverage = coverage == null ? null : coverage.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + return dst; + } + + protected EnrollmentRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EnrollmentRequest)) + return false; + EnrollmentRequest o = (EnrollmentRequest) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) + && compareDeep(organization, o.organization, true) && compareDeep(subject, o.subject, true) && compareDeep(coverage, o.coverage, true) + && compareDeep(relationship, o.relationship, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EnrollmentRequest)) + return false; + EnrollmentRequest o = (EnrollmentRequest) other; + return compareValues(created, o.created, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) + && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) + && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) + && (subject == null || subject.isEmpty()) && (coverage == null || coverage.isEmpty()) && (relationship == null || relationship.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.EnrollmentRequest; + } + + @SearchParamDefinition(name="identifier", path="EnrollmentRequest.identifier", description="The business identifier of the Enrollment", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) + public static final String SP_PATIENT = "patient"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentResponse.java new file mode 100644 index 00000000000..976f7ae1fac --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnrollmentResponse.java @@ -0,0 +1,714 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ +@ResourceDef(name="EnrollmentResponse", profile="http://hl7.org/fhir/Profile/EnrollmentResponse") +public class EnrollmentResponse extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource reference. + */ + @Child(name = "request", type = {EnrollmentRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource reference.) + */ + protected EnrollmentRequest requestTarget; + + /** + * Transaction status: error, complete. + */ + @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) + protected Enumeration outcome; + + /** + * A description of the status of the adjudication. + */ + @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) + protected StringType disposition; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The Insurer who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + private static final long serialVersionUID = -1740067108L; + + /* + * Constructor + */ + public EnrollmentResponse() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public EnrollmentResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource reference.) + */ + public EnrollmentResponse setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public EnrollmentRequest getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new EnrollmentRequest(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public EnrollmentResponse setRequestTarget(EnrollmentRequest value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public EnrollmentResponse setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public EnrollmentResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public EnrollmentResponse setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication. + */ + public EnrollmentResponse setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public EnrollmentResponse setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public EnrollmentResponse setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public EnrollmentResponse setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public EnrollmentResponse setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public EnrollmentResponse setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public EnrollmentResponse setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public EnrollmentResponse setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public EnrollmentResponse setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public EnrollmentResponse setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EnrollmentResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public EnrollmentResponse setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.outcome"); + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.disposition"); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.created"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "EnrollmentResponse"; + + } + + public EnrollmentResponse copy() { + EnrollmentResponse dst = new EnrollmentResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + return dst; + } + + protected EnrollmentResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EnrollmentResponse)) + return false; + EnrollmentResponse o = (EnrollmentResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) + && compareDeep(requestOrganization, o.requestOrganization, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EnrollmentResponse)) + return false; + EnrollmentResponse o = (EnrollmentResponse) other; + return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.EnrollmentResponse; + } + + @SearchParamDefinition(name="identifier", path="EnrollmentResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnumFactory.java new file mode 100644 index 00000000000..d9ea5491cff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EnumFactory.java @@ -0,0 +1,56 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseEnumFactory; + + +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +/** + * Helper class to help manage generic enumerated types + */ +public interface EnumFactory> extends IBaseEnumFactory { + + /** + * Read an enumeration value from the string that represents it on the XML or JSON + * @param codeString the value found in the XML or JSON + * @return the enumeration value + * @throws Exception is the value is not known + */ + public T fromCode(String codeString) throws IllegalArgumentException; + + /** + * Get the XML/JSON representation for an enumerated value + * @param code - the enumeration value + * @return the XML/JSON representation + * @throws Exception if the enumeration is not valid (would usually indicate a code generation bug) + */ + public String toCode(T code); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumeration.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumeration.java new file mode 100644 index 00000000000..f4aff65aab5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumeration.java @@ -0,0 +1,97 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseEnumeration; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +/** + * Primitive type "code" in FHIR, where the code is tied to an enumerated list of possible values + * + */ +@DatatypeDef(name="code", isSpecialization=true) +public class Enumeration> extends PrimitiveType implements IBaseEnumeration { + + private static final long serialVersionUID = 1L; + private EnumFactory myEnumFactory; + + /** + * Constructor + */ + public Enumeration(EnumFactory theEnumFactory) { + if (theEnumFactory == null) + throw new IllegalArgumentException("An enumeration factory must be provided"); + myEnumFactory = theEnumFactory; + } + + /** + * Constructor + */ + public Enumeration(EnumFactory theEnumFactory, T theValue) { + if (theEnumFactory == null) + throw new IllegalArgumentException("An enumeration factory must be provided"); + myEnumFactory = theEnumFactory; + setValue(theValue); + } + + /** + * Constructor + */ + public Enumeration(EnumFactory theEnumFactory, String theValue) { + if (theEnumFactory == null) + throw new IllegalArgumentException("An enumeration factory must be provided"); + myEnumFactory = theEnumFactory; + setValueAsString(theValue); + } + + @Override + protected T parse(String theValue) { + if (myEnumFactory != null) { + return myEnumFactory.fromCode(theValue); + } + return null; + } + + @Override + protected String encode(T theValue) { + return myEnumFactory.toCode(theValue); + } + + @Override + public Enumeration copy() { + return new Enumeration(myEnumFactory, getValue()); + } + + + public String fhirType() { + return "code"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumerations.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumerations.java new file mode 100644 index 00000000000..c7c380974c2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Enumerations.java @@ -0,0 +1,6776 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; + +public class Enumerations { + +// In here: +// AdministrativeGender: The gender of a person used for administrative purposes. +// AgeUnits: A valueSet of UCUM codes for representing age value units. +// BindingStrength: Indication of the degree of conformance expectations associated with a binding. +// ConceptMapEquivalence: The degree of equivalence between concepts. +// ConformanceResourceStatus: The lifecycle status of a Value Set or Concept Map. +// DataAbsentReason: Used to specify why the normally expected content of the data element is missing. +// DataType: The type of an element - one of the FHIR data types. +// DocumentReferenceStatus: The status of the document reference. +// FHIRDefinedType: Either a resource or a data type. +// MessageEvent: One of the message events defined as part of FHIR. +// NoteType: The presentation types of notes. +// RemittanceOutcome: The outcome of the processing. +// ResourceType: One of the resource types defined as part of FHIR. +// SearchParamType: Data types allowed to be used for search parameters. +// SpecialValues: A set of generally useful codes defined so they can be included in value sets. + + + public enum AdministrativeGender { + /** + * Male + */ + MALE, + /** + * Female + */ + FEMALE, + /** + * Other + */ + OTHER, + /** + * Unknown + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AdministrativeGender fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return MALE; + if ("female".equals(codeString)) + return FEMALE; + if ("other".equals(codeString)) + return OTHER; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MALE: return "male"; + case FEMALE: return "female"; + case OTHER: return "other"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MALE: return "http://hl7.org/fhir/administrative-gender"; + case FEMALE: return "http://hl7.org/fhir/administrative-gender"; + case OTHER: return "http://hl7.org/fhir/administrative-gender"; + case UNKNOWN: return "http://hl7.org/fhir/administrative-gender"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + } + + public static class AdministrativeGenderEnumFactory implements EnumFactory { + public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return AdministrativeGender.MALE; + if ("female".equals(codeString)) + return AdministrativeGender.FEMALE; + if ("other".equals(codeString)) + return AdministrativeGender.OTHER; + if ("unknown".equals(codeString)) + return AdministrativeGender.UNKNOWN; + throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return new Enumeration(this, AdministrativeGender.MALE); + if ("female".equals(codeString)) + return new Enumeration(this, AdministrativeGender.FEMALE); + if ("other".equals(codeString)) + return new Enumeration(this, AdministrativeGender.OTHER); + if ("unknown".equals(codeString)) + return new Enumeration(this, AdministrativeGender.UNKNOWN); + throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'"); + } + public String toCode(AdministrativeGender code) { + if (code == AdministrativeGender.MALE) + return "male"; + if (code == AdministrativeGender.FEMALE) + return "female"; + if (code == AdministrativeGender.OTHER) + return "other"; + if (code == AdministrativeGender.UNKNOWN) + return "unknown"; + return "?"; + } + } + + public enum AgeUnits { + /** + * null + */ + MIN, + /** + * null + */ + H, + /** + * null + */ + D, + /** + * null + */ + WK, + /** + * null + */ + MO, + /** + * null + */ + A, + /** + * added to help the parsers + */ + NULL; + public static AgeUnits fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("min".equals(codeString)) + return MIN; + if ("h".equals(codeString)) + return H; + if ("d".equals(codeString)) + return D; + if ("wk".equals(codeString)) + return WK; + if ("mo".equals(codeString)) + return MO; + if ("a".equals(codeString)) + return A; + throw new FHIRException("Unknown AgeUnits code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MIN: return "min"; + case H: return "h"; + case D: return "d"; + case WK: return "wk"; + case MO: return "mo"; + case A: return "a"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MIN: return "http://unitsofmeasure.org"; + case H: return "http://unitsofmeasure.org"; + case D: return "http://unitsofmeasure.org"; + case WK: return "http://unitsofmeasure.org"; + case MO: return "http://unitsofmeasure.org"; + case A: return "http://unitsofmeasure.org"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MIN: return ""; + case H: return ""; + case D: return ""; + case WK: return ""; + case MO: return ""; + case A: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MIN: return "Minute"; + case H: return "Hour"; + case D: return "Day"; + case WK: return "Week"; + case MO: return "Month"; + case A: return "Year"; + default: return "?"; + } + } + } + + public static class AgeUnitsEnumFactory implements EnumFactory { + public AgeUnits fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("min".equals(codeString)) + return AgeUnits.MIN; + if ("h".equals(codeString)) + return AgeUnits.H; + if ("d".equals(codeString)) + return AgeUnits.D; + if ("wk".equals(codeString)) + return AgeUnits.WK; + if ("mo".equals(codeString)) + return AgeUnits.MO; + if ("a".equals(codeString)) + return AgeUnits.A; + throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("min".equals(codeString)) + return new Enumeration(this, AgeUnits.MIN); + if ("h".equals(codeString)) + return new Enumeration(this, AgeUnits.H); + if ("d".equals(codeString)) + return new Enumeration(this, AgeUnits.D); + if ("wk".equals(codeString)) + return new Enumeration(this, AgeUnits.WK); + if ("mo".equals(codeString)) + return new Enumeration(this, AgeUnits.MO); + if ("a".equals(codeString)) + return new Enumeration(this, AgeUnits.A); + throw new FHIRException("Unknown AgeUnits code '"+codeString+"'"); + } + public String toCode(AgeUnits code) { + if (code == AgeUnits.MIN) + return "min"; + if (code == AgeUnits.H) + return "h"; + if (code == AgeUnits.D) + return "d"; + if (code == AgeUnits.WK) + return "wk"; + if (code == AgeUnits.MO) + return "mo"; + if (code == AgeUnits.A) + return "a"; + return "?"; + } + } + + public enum BindingStrength { + /** + * To be conformant, instances of this element SHALL include a code from the specified value set. + */ + REQUIRED, + /** + * To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the valueset does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. + */ + EXTENSIBLE, + /** + * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant. + */ + PREFERRED, + /** + * Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included. + */ + EXAMPLE, + /** + * added to help the parsers + */ + NULL; + public static BindingStrength fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return REQUIRED; + if ("extensible".equals(codeString)) + return EXTENSIBLE; + if ("preferred".equals(codeString)) + return PREFERRED; + if ("example".equals(codeString)) + return EXAMPLE; + throw new FHIRException("Unknown BindingStrength code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUIRED: return "required"; + case EXTENSIBLE: return "extensible"; + case PREFERRED: return "preferred"; + case EXAMPLE: return "example"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REQUIRED: return "http://hl7.org/fhir/binding-strength"; + case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength"; + case PREFERRED: return "http://hl7.org/fhir/binding-strength"; + case EXAMPLE: return "http://hl7.org/fhir/binding-strength"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REQUIRED: return "To be conformant, instances of this element SHALL include a code from the specified value set."; + case EXTENSIBLE: return "To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the valueset does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead."; + case PREFERRED: return "Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant."; + case EXAMPLE: return "Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUIRED: return "Required"; + case EXTENSIBLE: return "Extensible"; + case PREFERRED: return "Preferred"; + case EXAMPLE: return "Example"; + default: return "?"; + } + } + } + + public static class BindingStrengthEnumFactory implements EnumFactory { + public BindingStrength fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return BindingStrength.REQUIRED; + if ("extensible".equals(codeString)) + return BindingStrength.EXTENSIBLE; + if ("preferred".equals(codeString)) + return BindingStrength.PREFERRED; + if ("example".equals(codeString)) + return BindingStrength.EXAMPLE; + throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return new Enumeration(this, BindingStrength.REQUIRED); + if ("extensible".equals(codeString)) + return new Enumeration(this, BindingStrength.EXTENSIBLE); + if ("preferred".equals(codeString)) + return new Enumeration(this, BindingStrength.PREFERRED); + if ("example".equals(codeString)) + return new Enumeration(this, BindingStrength.EXAMPLE); + throw new FHIRException("Unknown BindingStrength code '"+codeString+"'"); + } + public String toCode(BindingStrength code) { + if (code == BindingStrength.REQUIRED) + return "required"; + if (code == BindingStrength.EXTENSIBLE) + return "extensible"; + if (code == BindingStrength.PREFERRED) + return "preferred"; + if (code == BindingStrength.EXAMPLE) + return "example"; + return "?"; + } + } + + public enum ConceptMapEquivalence { + /** + * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical). + */ + EQUIVALENT, + /** + * The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical). + */ + EQUAL, + /** + * The target mapping is wider in meaning than the source concept. + */ + WIDER, + /** + * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target). + */ + SUBSUMES, + /** + * The target mapping is narrower in meaning that the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally. + */ + NARROWER, + /** + * The target mapping specializes the meaning of the source concept (e.g. the target is-a source). + */ + SPECIALIZES, + /** + * The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally. + */ + INEXACT, + /** + * There is no match for this concept in the destination concept system. + */ + UNMATCHED, + /** + * This is an explicit assertion that there is no mapping between the source and target concept. + */ + DISJOINT, + /** + * added to help the parsers + */ + NULL; + public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("equivalent".equals(codeString)) + return EQUIVALENT; + if ("equal".equals(codeString)) + return EQUAL; + if ("wider".equals(codeString)) + return WIDER; + if ("subsumes".equals(codeString)) + return SUBSUMES; + if ("narrower".equals(codeString)) + return NARROWER; + if ("specializes".equals(codeString)) + return SPECIALIZES; + if ("inexact".equals(codeString)) + return INEXACT; + if ("unmatched".equals(codeString)) + return UNMATCHED; + if ("disjoint".equals(codeString)) + return DISJOINT; + throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQUIVALENT: return "equivalent"; + case EQUAL: return "equal"; + case WIDER: return "wider"; + case SUBSUMES: return "subsumes"; + case NARROWER: return "narrower"; + case SPECIALIZES: return "specializes"; + case INEXACT: return "inexact"; + case UNMATCHED: return "unmatched"; + case DISJOINT: return "disjoint"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case EQUIVALENT: return "http://hl7.org/fhir/concept-map-equivalence"; + case EQUAL: return "http://hl7.org/fhir/concept-map-equivalence"; + case WIDER: return "http://hl7.org/fhir/concept-map-equivalence"; + case SUBSUMES: return "http://hl7.org/fhir/concept-map-equivalence"; + case NARROWER: return "http://hl7.org/fhir/concept-map-equivalence"; + case SPECIALIZES: return "http://hl7.org/fhir/concept-map-equivalence"; + case INEXACT: return "http://hl7.org/fhir/concept-map-equivalence"; + case UNMATCHED: return "http://hl7.org/fhir/concept-map-equivalence"; + case DISJOINT: return "http://hl7.org/fhir/concept-map-equivalence"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical)."; + case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical)."; + case WIDER: return "The target mapping is wider in meaning than the source concept."; + case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target)."; + case NARROWER: return "The target mapping is narrower in meaning that the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally."; + case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source)."; + case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally."; + case UNMATCHED: return "There is no match for this concept in the destination concept system."; + case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQUIVALENT: return "Equivalent"; + case EQUAL: return "Equal"; + case WIDER: return "Wider"; + case SUBSUMES: return "Subsumes"; + case NARROWER: return "Narrower"; + case SPECIALIZES: return "Specializes"; + case INEXACT: return "Inexact"; + case UNMATCHED: return "Unmatched"; + case DISJOINT: return "Disjoint"; + default: return "?"; + } + } + } + + public static class ConceptMapEquivalenceEnumFactory implements EnumFactory { + public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("equivalent".equals(codeString)) + return ConceptMapEquivalence.EQUIVALENT; + if ("equal".equals(codeString)) + return ConceptMapEquivalence.EQUAL; + if ("wider".equals(codeString)) + return ConceptMapEquivalence.WIDER; + if ("subsumes".equals(codeString)) + return ConceptMapEquivalence.SUBSUMES; + if ("narrower".equals(codeString)) + return ConceptMapEquivalence.NARROWER; + if ("specializes".equals(codeString)) + return ConceptMapEquivalence.SPECIALIZES; + if ("inexact".equals(codeString)) + return ConceptMapEquivalence.INEXACT; + if ("unmatched".equals(codeString)) + return ConceptMapEquivalence.UNMATCHED; + if ("disjoint".equals(codeString)) + return ConceptMapEquivalence.DISJOINT; + throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("equivalent".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.EQUIVALENT); + if ("equal".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.EQUAL); + if ("wider".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.WIDER); + if ("subsumes".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.SUBSUMES); + if ("narrower".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.NARROWER); + if ("specializes".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.SPECIALIZES); + if ("inexact".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.INEXACT); + if ("unmatched".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.UNMATCHED); + if ("disjoint".equals(codeString)) + return new Enumeration(this, ConceptMapEquivalence.DISJOINT); + throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'"); + } + public String toCode(ConceptMapEquivalence code) { + if (code == ConceptMapEquivalence.EQUIVALENT) + return "equivalent"; + if (code == ConceptMapEquivalence.EQUAL) + return "equal"; + if (code == ConceptMapEquivalence.WIDER) + return "wider"; + if (code == ConceptMapEquivalence.SUBSUMES) + return "subsumes"; + if (code == ConceptMapEquivalence.NARROWER) + return "narrower"; + if (code == ConceptMapEquivalence.SPECIALIZES) + return "specializes"; + if (code == ConceptMapEquivalence.INEXACT) + return "inexact"; + if (code == ConceptMapEquivalence.UNMATCHED) + return "unmatched"; + if (code == ConceptMapEquivalence.DISJOINT) + return "disjoint"; + return "?"; + } + } + + public enum ConformanceResourceStatus { + /** + * This resource is still under development. + */ + DRAFT, + /** + * This resource is ready for normal use. + */ + ACTIVE, + /** + * This resource has been withdrawn or superseded and should no longer be used. + */ + RETIRED, + /** + * added to help the parsers + */ + NULL; + public static ConformanceResourceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("retired".equals(codeString)) + return RETIRED; + throw new FHIRException("Unknown ConformanceResourceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case RETIRED: return "retired"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/conformance-resource-status"; + case ACTIVE: return "http://hl7.org/fhir/conformance-resource-status"; + case RETIRED: return "http://hl7.org/fhir/conformance-resource-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "This resource is still under development."; + case ACTIVE: return "This resource is ready for normal use."; + case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case RETIRED: return "Retired"; + default: return "?"; + } + } + } + + public static class ConformanceResourceStatusEnumFactory implements EnumFactory { + public ConformanceResourceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ConformanceResourceStatus.DRAFT; + if ("active".equals(codeString)) + return ConformanceResourceStatus.ACTIVE; + if ("retired".equals(codeString)) + return ConformanceResourceStatus.RETIRED; + throw new IllegalArgumentException("Unknown ConformanceResourceStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, ConformanceResourceStatus.DRAFT); + if ("active".equals(codeString)) + return new Enumeration(this, ConformanceResourceStatus.ACTIVE); + if ("retired".equals(codeString)) + return new Enumeration(this, ConformanceResourceStatus.RETIRED); + throw new FHIRException("Unknown ConformanceResourceStatus code '"+codeString+"'"); + } + public String toCode(ConformanceResourceStatus code) { + if (code == ConformanceResourceStatus.DRAFT) + return "draft"; + if (code == ConformanceResourceStatus.ACTIVE) + return "active"; + if (code == ConformanceResourceStatus.RETIRED) + return "retired"; + return "?"; + } + } + + public enum DataAbsentReason { + /** + * The value is not known. + */ + UNKNOWN, + /** + * The source human does not know the value. + */ + ASKED, + /** + * There is reason to expect (from the workflow) that the value may become known. + */ + TEMP, + /** + * The workflow didn't lead to this value being known. + */ + NOTASKED, + /** + * The information is not available due to security, privacy or related reasons. + */ + MASKED, + /** + * The source system wasn't capable of supporting this element. + */ + UNSUPPORTED, + /** + * The content of the data is represented in the resource narrative. + */ + ASTEXT, + /** + * Some system or workflow process error means that the information is not available. + */ + ERROR, + /** + * NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value. + */ + NAN, + /** + * added to help the parsers + */ + NULL; + public static DataAbsentReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("asked".equals(codeString)) + return ASKED; + if ("temp".equals(codeString)) + return TEMP; + if ("not-asked".equals(codeString)) + return NOTASKED; + if ("masked".equals(codeString)) + return MASKED; + if ("unsupported".equals(codeString)) + return UNSUPPORTED; + if ("astext".equals(codeString)) + return ASTEXT; + if ("error".equals(codeString)) + return ERROR; + if ("NaN".equals(codeString)) + return NAN; + throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNKNOWN: return "unknown"; + case ASKED: return "asked"; + case TEMP: return "temp"; + case NOTASKED: return "not-asked"; + case MASKED: return "masked"; + case UNSUPPORTED: return "unsupported"; + case ASTEXT: return "astext"; + case ERROR: return "error"; + case NAN: return "NaN"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case UNKNOWN: return "http://hl7.org/fhir/data-absent-reason"; + case ASKED: return "http://hl7.org/fhir/data-absent-reason"; + case TEMP: return "http://hl7.org/fhir/data-absent-reason"; + case NOTASKED: return "http://hl7.org/fhir/data-absent-reason"; + case MASKED: return "http://hl7.org/fhir/data-absent-reason"; + case UNSUPPORTED: return "http://hl7.org/fhir/data-absent-reason"; + case ASTEXT: return "http://hl7.org/fhir/data-absent-reason"; + case ERROR: return "http://hl7.org/fhir/data-absent-reason"; + case NAN: return "http://hl7.org/fhir/data-absent-reason"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case UNKNOWN: return "The value is not known."; + case ASKED: return "The source human does not know the value."; + case TEMP: return "There is reason to expect (from the workflow) that the value may become known."; + case NOTASKED: return "The workflow didn't lead to this value being known."; + case MASKED: return "The information is not available due to security, privacy or related reasons."; + case UNSUPPORTED: return "The source system wasn't capable of supporting this element."; + case ASTEXT: return "The content of the data is represented in the resource narrative."; + case ERROR: return "Some system or workflow process error means that the information is not available."; + case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNKNOWN: return "Unknown"; + case ASKED: return "Asked"; + case TEMP: return "Temp"; + case NOTASKED: return "Not Asked"; + case MASKED: return "Masked"; + case UNSUPPORTED: return "Unsupported"; + case ASTEXT: return "As Text"; + case ERROR: return "Error"; + case NAN: return "Not a Number"; + default: return "?"; + } + } + } + + public static class DataAbsentReasonEnumFactory implements EnumFactory { + public DataAbsentReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return DataAbsentReason.UNKNOWN; + if ("asked".equals(codeString)) + return DataAbsentReason.ASKED; + if ("temp".equals(codeString)) + return DataAbsentReason.TEMP; + if ("not-asked".equals(codeString)) + return DataAbsentReason.NOTASKED; + if ("masked".equals(codeString)) + return DataAbsentReason.MASKED; + if ("unsupported".equals(codeString)) + return DataAbsentReason.UNSUPPORTED; + if ("astext".equals(codeString)) + return DataAbsentReason.ASTEXT; + if ("error".equals(codeString)) + return DataAbsentReason.ERROR; + if ("NaN".equals(codeString)) + return DataAbsentReason.NAN; + throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return new Enumeration(this, DataAbsentReason.UNKNOWN); + if ("asked".equals(codeString)) + return new Enumeration(this, DataAbsentReason.ASKED); + if ("temp".equals(codeString)) + return new Enumeration(this, DataAbsentReason.TEMP); + if ("not-asked".equals(codeString)) + return new Enumeration(this, DataAbsentReason.NOTASKED); + if ("masked".equals(codeString)) + return new Enumeration(this, DataAbsentReason.MASKED); + if ("unsupported".equals(codeString)) + return new Enumeration(this, DataAbsentReason.UNSUPPORTED); + if ("astext".equals(codeString)) + return new Enumeration(this, DataAbsentReason.ASTEXT); + if ("error".equals(codeString)) + return new Enumeration(this, DataAbsentReason.ERROR); + if ("NaN".equals(codeString)) + return new Enumeration(this, DataAbsentReason.NAN); + throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); + } + public String toCode(DataAbsentReason code) { + if (code == DataAbsentReason.UNKNOWN) + return "unknown"; + if (code == DataAbsentReason.ASKED) + return "asked"; + if (code == DataAbsentReason.TEMP) + return "temp"; + if (code == DataAbsentReason.NOTASKED) + return "not-asked"; + if (code == DataAbsentReason.MASKED) + return "masked"; + if (code == DataAbsentReason.UNSUPPORTED) + return "unsupported"; + if (code == DataAbsentReason.ASTEXT) + return "astext"; + if (code == DataAbsentReason.ERROR) + return "error"; + if (code == DataAbsentReason.NAN) + return "NaN"; + return "?"; + } + } + + public enum DataType { + /** + * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + */ + ADDRESS, + /** + * null + */ + AGE, + /** + * A text note which also contains information about who made the statement and when. + */ + ANNOTATION, + /** + * For referring to data content defined in other formats. + */ + ATTACHMENT, + /** + * Base definition for all elements that are defined inside a resource - but not those in a data type. + */ + BACKBONEELEMENT, + /** + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. + */ + CODEABLECONCEPT, + /** + * A reference to a code defined by a terminology system. + */ + CODING, + /** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + */ + CONTACTPOINT, + /** + * null + */ + COUNT, + /** + * null + */ + DISTANCE, + /** + * null + */ + DURATION, + /** + * Base definition for all elements in a resource. + */ + ELEMENT, + /** + * Captures constraints on each element within the resource, profile, or extension. + */ + ELEMENTDEFINITION, + /** + * Optional Extensions Element - found in all resources. + */ + EXTENSION, + /** + * A human's name with the ability to identify parts and usage. + */ + HUMANNAME, + /** + * A technical identifier - identifies some entity uniquely and unambiguously. + */ + IDENTIFIER, + /** + * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ + META, + /** + * null + */ + MONEY, + /** + * A human-readable formatted text, including images. + */ + NARRATIVE, + /** + * A time period defined by a start and end date and optionally time. + */ + PERIOD, + /** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ + QUANTITY, + /** + * A set of ordered Quantities defined by a low and high limit. + */ + RANGE, + /** + * A relationship of two Quantity values - expressed as a numerator and a denominator. + */ + RATIO, + /** + * A reference from one resource to another. + */ + REFERENCE, + /** + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. + */ + SAMPLEDDATA, + /** + * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities. + */ + SIGNATURE, + /** + * null + */ + SIMPLEQUANTITY, + /** + * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. + */ + TIMING, + /** + * A stream of bytes + */ + BASE64BINARY, + /** + * Value of "true" or "false" + */ + BOOLEAN, + /** + * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents + */ + CODE, + /** + * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates. + */ + DATE, + /** + * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates. + */ + DATETIME, + /** + * A rational number with implicit precision + */ + DECIMAL, + /** + * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive. + */ + ID, + /** + * An instant in time - known at least to the second + */ + INSTANT, + /** + * A whole number + */ + INTEGER, + /** + * A string that may contain markdown syntax for optional processing by a mark down presentation engine + */ + MARKDOWN, + /** + * An oid represented as a URI + */ + OID, + /** + * An integer with a value that is positive (e.g. >0) + */ + POSITIVEINT, + /** + * A sequence of Unicode characters + */ + STRING, + /** + * A time during the day, with no date specified + */ + TIME, + /** + * An integer with a value that is not negative (e.g. >= 0) + */ + UNSIGNEDINT, + /** + * String of characters used to identify a name or a resource + */ + URI, + /** + * A UUID, represented as a URI + */ + UUID, + /** + * XHTML format, as defined by W3C, but restricted usage (mainly, no active content) + */ + XHTML, + /** + * added to help the parsers + */ + NULL; + public static DataType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return ADDRESS; + if ("Age".equals(codeString)) + return AGE; + if ("Annotation".equals(codeString)) + return ANNOTATION; + if ("Attachment".equals(codeString)) + return ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return CODING; + if ("ContactPoint".equals(codeString)) + return CONTACTPOINT; + if ("Count".equals(codeString)) + return COUNT; + if ("Distance".equals(codeString)) + return DISTANCE; + if ("Duration".equals(codeString)) + return DURATION; + if ("Element".equals(codeString)) + return ELEMENT; + if ("ElementDefinition".equals(codeString)) + return ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return EXTENSION; + if ("HumanName".equals(codeString)) + return HUMANNAME; + if ("Identifier".equals(codeString)) + return IDENTIFIER; + if ("Meta".equals(codeString)) + return META; + if ("Money".equals(codeString)) + return MONEY; + if ("Narrative".equals(codeString)) + return NARRATIVE; + if ("Period".equals(codeString)) + return PERIOD; + if ("Quantity".equals(codeString)) + return QUANTITY; + if ("Range".equals(codeString)) + return RANGE; + if ("Ratio".equals(codeString)) + return RATIO; + if ("Reference".equals(codeString)) + return REFERENCE; + if ("SampledData".equals(codeString)) + return SAMPLEDDATA; + if ("Signature".equals(codeString)) + return SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return TIMING; + if ("base64Binary".equals(codeString)) + return BASE64BINARY; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("code".equals(codeString)) + return CODE; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("id".equals(codeString)) + return ID; + if ("instant".equals(codeString)) + return INSTANT; + if ("integer".equals(codeString)) + return INTEGER; + if ("markdown".equals(codeString)) + return MARKDOWN; + if ("oid".equals(codeString)) + return OID; + if ("positiveInt".equals(codeString)) + return POSITIVEINT; + if ("string".equals(codeString)) + return STRING; + if ("time".equals(codeString)) + return TIME; + if ("unsignedInt".equals(codeString)) + return UNSIGNEDINT; + if ("uri".equals(codeString)) + return URI; + if ("uuid".equals(codeString)) + return UUID; + if ("xhtml".equals(codeString)) + return XHTML; + throw new FHIRException("Unknown DataType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "xhtml"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ADDRESS: return "http://hl7.org/fhir/data-types"; + case AGE: return "http://hl7.org/fhir/data-types"; + case ANNOTATION: return "http://hl7.org/fhir/data-types"; + case ATTACHMENT: return "http://hl7.org/fhir/data-types"; + case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types"; + case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types"; + case CODING: return "http://hl7.org/fhir/data-types"; + case CONTACTPOINT: return "http://hl7.org/fhir/data-types"; + case COUNT: return "http://hl7.org/fhir/data-types"; + case DISTANCE: return "http://hl7.org/fhir/data-types"; + case DURATION: return "http://hl7.org/fhir/data-types"; + case ELEMENT: return "http://hl7.org/fhir/data-types"; + case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types"; + case EXTENSION: return "http://hl7.org/fhir/data-types"; + case HUMANNAME: return "http://hl7.org/fhir/data-types"; + case IDENTIFIER: return "http://hl7.org/fhir/data-types"; + case META: return "http://hl7.org/fhir/data-types"; + case MONEY: return "http://hl7.org/fhir/data-types"; + case NARRATIVE: return "http://hl7.org/fhir/data-types"; + case PERIOD: return "http://hl7.org/fhir/data-types"; + case QUANTITY: return "http://hl7.org/fhir/data-types"; + case RANGE: return "http://hl7.org/fhir/data-types"; + case RATIO: return "http://hl7.org/fhir/data-types"; + case REFERENCE: return "http://hl7.org/fhir/data-types"; + case SAMPLEDDATA: return "http://hl7.org/fhir/data-types"; + case SIGNATURE: return "http://hl7.org/fhir/data-types"; + case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types"; + case TIMING: return "http://hl7.org/fhir/data-types"; + case BASE64BINARY: return "http://hl7.org/fhir/data-types"; + case BOOLEAN: return "http://hl7.org/fhir/data-types"; + case CODE: return "http://hl7.org/fhir/data-types"; + case DATE: return "http://hl7.org/fhir/data-types"; + case DATETIME: return "http://hl7.org/fhir/data-types"; + case DECIMAL: return "http://hl7.org/fhir/data-types"; + case ID: return "http://hl7.org/fhir/data-types"; + case INSTANT: return "http://hl7.org/fhir/data-types"; + case INTEGER: return "http://hl7.org/fhir/data-types"; + case MARKDOWN: return "http://hl7.org/fhir/data-types"; + case OID: return "http://hl7.org/fhir/data-types"; + case POSITIVEINT: return "http://hl7.org/fhir/data-types"; + case STRING: return "http://hl7.org/fhir/data-types"; + case TIME: return "http://hl7.org/fhir/data-types"; + case UNSIGNEDINT: return "http://hl7.org/fhir/data-types"; + case URI: return "http://hl7.org/fhir/data-types"; + case UUID: return "http://hl7.org/fhir/data-types"; + case XHTML: return "http://hl7.org/fhir/data-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ADDRESS: return "There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."; + case AGE: return ""; + case ANNOTATION: return "A text note which also contains information about who made the statement and when."; + case ATTACHMENT: return "For referring to data content defined in other formats."; + case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type."; + case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."; + case CODING: return "A reference to a code defined by a terminology system."; + case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; + case COUNT: return ""; + case DISTANCE: return ""; + case DURATION: return ""; + case ELEMENT: return "Base definition for all elements in a resource."; + case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension."; + case EXTENSION: return "Optional Extensions Element - found in all resources."; + case HUMANNAME: return "A human's name with the ability to identify parts and usage."; + case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; + case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MONEY: return ""; + case NARRATIVE: return "A human-readable formatted text, including images."; + case PERIOD: return "A time period defined by a start and end date and optionally time."; + case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; + case RANGE: return "A set of ordered Quantities defined by a low and high limit."; + case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator."; + case REFERENCE: return "A reference from one resource to another."; + case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."; + case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities."; + case SIMPLEQUANTITY: return ""; + case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds."; + case BASE64BINARY: return "A stream of bytes"; + case BOOLEAN: return "Value of \"true\" or \"false\""; + case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; + case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."; + case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."; + case DECIMAL: return "A rational number with implicit precision"; + case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive."; + case INSTANT: return "An instant in time - known at least to the second"; + case INTEGER: return "A whole number"; + case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine"; + case OID: return "An oid represented as a URI"; + case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)"; + case STRING: return "A sequence of Unicode characters"; + case TIME: return "A time during the day, with no date specified"; + case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)"; + case URI: return "String of characters used to identify a name or a resource"; + case UUID: return "A UUID, represented as a URI"; + case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "XHTML"; + default: return "?"; + } + } + } + + public static class DataTypeEnumFactory implements EnumFactory { + public DataType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return DataType.ADDRESS; + if ("Age".equals(codeString)) + return DataType.AGE; + if ("Annotation".equals(codeString)) + return DataType.ANNOTATION; + if ("Attachment".equals(codeString)) + return DataType.ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return DataType.BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return DataType.CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return DataType.CODING; + if ("ContactPoint".equals(codeString)) + return DataType.CONTACTPOINT; + if ("Count".equals(codeString)) + return DataType.COUNT; + if ("Distance".equals(codeString)) + return DataType.DISTANCE; + if ("Duration".equals(codeString)) + return DataType.DURATION; + if ("Element".equals(codeString)) + return DataType.ELEMENT; + if ("ElementDefinition".equals(codeString)) + return DataType.ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return DataType.EXTENSION; + if ("HumanName".equals(codeString)) + return DataType.HUMANNAME; + if ("Identifier".equals(codeString)) + return DataType.IDENTIFIER; + if ("Meta".equals(codeString)) + return DataType.META; + if ("Money".equals(codeString)) + return DataType.MONEY; + if ("Narrative".equals(codeString)) + return DataType.NARRATIVE; + if ("Period".equals(codeString)) + return DataType.PERIOD; + if ("Quantity".equals(codeString)) + return DataType.QUANTITY; + if ("Range".equals(codeString)) + return DataType.RANGE; + if ("Ratio".equals(codeString)) + return DataType.RATIO; + if ("Reference".equals(codeString)) + return DataType.REFERENCE; + if ("SampledData".equals(codeString)) + return DataType.SAMPLEDDATA; + if ("Signature".equals(codeString)) + return DataType.SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return DataType.SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return DataType.TIMING; + if ("base64Binary".equals(codeString)) + return DataType.BASE64BINARY; + if ("boolean".equals(codeString)) + return DataType.BOOLEAN; + if ("code".equals(codeString)) + return DataType.CODE; + if ("date".equals(codeString)) + return DataType.DATE; + if ("dateTime".equals(codeString)) + return DataType.DATETIME; + if ("decimal".equals(codeString)) + return DataType.DECIMAL; + if ("id".equals(codeString)) + return DataType.ID; + if ("instant".equals(codeString)) + return DataType.INSTANT; + if ("integer".equals(codeString)) + return DataType.INTEGER; + if ("markdown".equals(codeString)) + return DataType.MARKDOWN; + if ("oid".equals(codeString)) + return DataType.OID; + if ("positiveInt".equals(codeString)) + return DataType.POSITIVEINT; + if ("string".equals(codeString)) + return DataType.STRING; + if ("time".equals(codeString)) + return DataType.TIME; + if ("unsignedInt".equals(codeString)) + return DataType.UNSIGNEDINT; + if ("uri".equals(codeString)) + return DataType.URI; + if ("uuid".equals(codeString)) + return DataType.UUID; + if ("xhtml".equals(codeString)) + return DataType.XHTML; + throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return new Enumeration(this, DataType.ADDRESS); + if ("Age".equals(codeString)) + return new Enumeration(this, DataType.AGE); + if ("Annotation".equals(codeString)) + return new Enumeration(this, DataType.ANNOTATION); + if ("Attachment".equals(codeString)) + return new Enumeration(this, DataType.ATTACHMENT); + if ("BackboneElement".equals(codeString)) + return new Enumeration(this, DataType.BACKBONEELEMENT); + if ("CodeableConcept".equals(codeString)) + return new Enumeration(this, DataType.CODEABLECONCEPT); + if ("Coding".equals(codeString)) + return new Enumeration(this, DataType.CODING); + if ("ContactPoint".equals(codeString)) + return new Enumeration(this, DataType.CONTACTPOINT); + if ("Count".equals(codeString)) + return new Enumeration(this, DataType.COUNT); + if ("Distance".equals(codeString)) + return new Enumeration(this, DataType.DISTANCE); + if ("Duration".equals(codeString)) + return new Enumeration(this, DataType.DURATION); + if ("Element".equals(codeString)) + return new Enumeration(this, DataType.ELEMENT); + if ("ElementDefinition".equals(codeString)) + return new Enumeration(this, DataType.ELEMENTDEFINITION); + if ("Extension".equals(codeString)) + return new Enumeration(this, DataType.EXTENSION); + if ("HumanName".equals(codeString)) + return new Enumeration(this, DataType.HUMANNAME); + if ("Identifier".equals(codeString)) + return new Enumeration(this, DataType.IDENTIFIER); + if ("Meta".equals(codeString)) + return new Enumeration(this, DataType.META); + if ("Money".equals(codeString)) + return new Enumeration(this, DataType.MONEY); + if ("Narrative".equals(codeString)) + return new Enumeration(this, DataType.NARRATIVE); + if ("Period".equals(codeString)) + return new Enumeration(this, DataType.PERIOD); + if ("Quantity".equals(codeString)) + return new Enumeration(this, DataType.QUANTITY); + if ("Range".equals(codeString)) + return new Enumeration(this, DataType.RANGE); + if ("Ratio".equals(codeString)) + return new Enumeration(this, DataType.RATIO); + if ("Reference".equals(codeString)) + return new Enumeration(this, DataType.REFERENCE); + if ("SampledData".equals(codeString)) + return new Enumeration(this, DataType.SAMPLEDDATA); + if ("Signature".equals(codeString)) + return new Enumeration(this, DataType.SIGNATURE); + if ("SimpleQuantity".equals(codeString)) + return new Enumeration(this, DataType.SIMPLEQUANTITY); + if ("Timing".equals(codeString)) + return new Enumeration(this, DataType.TIMING); + if ("base64Binary".equals(codeString)) + return new Enumeration(this, DataType.BASE64BINARY); + if ("boolean".equals(codeString)) + return new Enumeration(this, DataType.BOOLEAN); + if ("code".equals(codeString)) + return new Enumeration(this, DataType.CODE); + if ("date".equals(codeString)) + return new Enumeration(this, DataType.DATE); + if ("dateTime".equals(codeString)) + return new Enumeration(this, DataType.DATETIME); + if ("decimal".equals(codeString)) + return new Enumeration(this, DataType.DECIMAL); + if ("id".equals(codeString)) + return new Enumeration(this, DataType.ID); + if ("instant".equals(codeString)) + return new Enumeration(this, DataType.INSTANT); + if ("integer".equals(codeString)) + return new Enumeration(this, DataType.INTEGER); + if ("markdown".equals(codeString)) + return new Enumeration(this, DataType.MARKDOWN); + if ("oid".equals(codeString)) + return new Enumeration(this, DataType.OID); + if ("positiveInt".equals(codeString)) + return new Enumeration(this, DataType.POSITIVEINT); + if ("string".equals(codeString)) + return new Enumeration(this, DataType.STRING); + if ("time".equals(codeString)) + return new Enumeration(this, DataType.TIME); + if ("unsignedInt".equals(codeString)) + return new Enumeration(this, DataType.UNSIGNEDINT); + if ("uri".equals(codeString)) + return new Enumeration(this, DataType.URI); + if ("uuid".equals(codeString)) + return new Enumeration(this, DataType.UUID); + if ("xhtml".equals(codeString)) + return new Enumeration(this, DataType.XHTML); + throw new FHIRException("Unknown DataType code '"+codeString+"'"); + } + public String toCode(DataType code) { + if (code == DataType.ADDRESS) + return "Address"; + if (code == DataType.AGE) + return "Age"; + if (code == DataType.ANNOTATION) + return "Annotation"; + if (code == DataType.ATTACHMENT) + return "Attachment"; + if (code == DataType.BACKBONEELEMENT) + return "BackboneElement"; + if (code == DataType.CODEABLECONCEPT) + return "CodeableConcept"; + if (code == DataType.CODING) + return "Coding"; + if (code == DataType.CONTACTPOINT) + return "ContactPoint"; + if (code == DataType.COUNT) + return "Count"; + if (code == DataType.DISTANCE) + return "Distance"; + if (code == DataType.DURATION) + return "Duration"; + if (code == DataType.ELEMENT) + return "Element"; + if (code == DataType.ELEMENTDEFINITION) + return "ElementDefinition"; + if (code == DataType.EXTENSION) + return "Extension"; + if (code == DataType.HUMANNAME) + return "HumanName"; + if (code == DataType.IDENTIFIER) + return "Identifier"; + if (code == DataType.META) + return "Meta"; + if (code == DataType.MONEY) + return "Money"; + if (code == DataType.NARRATIVE) + return "Narrative"; + if (code == DataType.PERIOD) + return "Period"; + if (code == DataType.QUANTITY) + return "Quantity"; + if (code == DataType.RANGE) + return "Range"; + if (code == DataType.RATIO) + return "Ratio"; + if (code == DataType.REFERENCE) + return "Reference"; + if (code == DataType.SAMPLEDDATA) + return "SampledData"; + if (code == DataType.SIGNATURE) + return "Signature"; + if (code == DataType.SIMPLEQUANTITY) + return "SimpleQuantity"; + if (code == DataType.TIMING) + return "Timing"; + if (code == DataType.BASE64BINARY) + return "base64Binary"; + if (code == DataType.BOOLEAN) + return "boolean"; + if (code == DataType.CODE) + return "code"; + if (code == DataType.DATE) + return "date"; + if (code == DataType.DATETIME) + return "dateTime"; + if (code == DataType.DECIMAL) + return "decimal"; + if (code == DataType.ID) + return "id"; + if (code == DataType.INSTANT) + return "instant"; + if (code == DataType.INTEGER) + return "integer"; + if (code == DataType.MARKDOWN) + return "markdown"; + if (code == DataType.OID) + return "oid"; + if (code == DataType.POSITIVEINT) + return "positiveInt"; + if (code == DataType.STRING) + return "string"; + if (code == DataType.TIME) + return "time"; + if (code == DataType.UNSIGNEDINT) + return "unsignedInt"; + if (code == DataType.URI) + return "uri"; + if (code == DataType.UUID) + return "uuid"; + if (code == DataType.XHTML) + return "xhtml"; + return "?"; + } + } + + public enum DocumentReferenceStatus { + /** + * This is the current reference for this document. + */ + CURRENT, + /** + * This reference has been superseded by another reference. + */ + SUPERSEDED, + /** + * This reference was created in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return CURRENT; + if ("superseded".equals(codeString)) + return SUPERSEDED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CURRENT: return "current"; + case SUPERSEDED: return "superseded"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CURRENT: return "http://hl7.org/fhir/document-reference-status"; + case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CURRENT: return "This is the current reference for this document."; + case SUPERSEDED: return "This reference has been superseded by another reference."; + case ENTEREDINERROR: return "This reference was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CURRENT: return "Current"; + case SUPERSEDED: return "Superseded"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class DocumentReferenceStatusEnumFactory implements EnumFactory { + public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return DocumentReferenceStatus.CURRENT; + if ("superseded".equals(codeString)) + return DocumentReferenceStatus.SUPERSEDED; + if ("entered-in-error".equals(codeString)) + return DocumentReferenceStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return new Enumeration(this, DocumentReferenceStatus.CURRENT); + if ("superseded".equals(codeString)) + return new Enumeration(this, DocumentReferenceStatus.SUPERSEDED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, DocumentReferenceStatus.ENTEREDINERROR); + throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'"); + } + public String toCode(DocumentReferenceStatus code) { + if (code == DocumentReferenceStatus.CURRENT) + return "current"; + if (code == DocumentReferenceStatus.SUPERSEDED) + return "superseded"; + if (code == DocumentReferenceStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + public enum FHIRDefinedType { + /** + * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + */ + ADDRESS, + /** + * null + */ + AGE, + /** + * A text note which also contains information about who made the statement and when. + */ + ANNOTATION, + /** + * For referring to data content defined in other formats. + */ + ATTACHMENT, + /** + * Base definition for all elements that are defined inside a resource - but not those in a data type. + */ + BACKBONEELEMENT, + /** + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. + */ + CODEABLECONCEPT, + /** + * A reference to a code defined by a terminology system. + */ + CODING, + /** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + */ + CONTACTPOINT, + /** + * null + */ + COUNT, + /** + * null + */ + DISTANCE, + /** + * null + */ + DURATION, + /** + * Base definition for all elements in a resource. + */ + ELEMENT, + /** + * Captures constraints on each element within the resource, profile, or extension. + */ + ELEMENTDEFINITION, + /** + * Optional Extensions Element - found in all resources. + */ + EXTENSION, + /** + * A human's name with the ability to identify parts and usage. + */ + HUMANNAME, + /** + * A technical identifier - identifies some entity uniquely and unambiguously. + */ + IDENTIFIER, + /** + * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ + META, + /** + * null + */ + MONEY, + /** + * A human-readable formatted text, including images. + */ + NARRATIVE, + /** + * A time period defined by a start and end date and optionally time. + */ + PERIOD, + /** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ + QUANTITY, + /** + * A set of ordered Quantities defined by a low and high limit. + */ + RANGE, + /** + * A relationship of two Quantity values - expressed as a numerator and a denominator. + */ + RATIO, + /** + * A reference from one resource to another. + */ + REFERENCE, + /** + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. + */ + SAMPLEDDATA, + /** + * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities. + */ + SIGNATURE, + /** + * null + */ + SIMPLEQUANTITY, + /** + * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. + */ + TIMING, + /** + * A stream of bytes + */ + BASE64BINARY, + /** + * Value of "true" or "false" + */ + BOOLEAN, + /** + * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents + */ + CODE, + /** + * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates. + */ + DATE, + /** + * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates. + */ + DATETIME, + /** + * A rational number with implicit precision + */ + DECIMAL, + /** + * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive. + */ + ID, + /** + * An instant in time - known at least to the second + */ + INSTANT, + /** + * A whole number + */ + INTEGER, + /** + * A string that may contain markdown syntax for optional processing by a mark down presentation engine + */ + MARKDOWN, + /** + * An oid represented as a URI + */ + OID, + /** + * An integer with a value that is positive (e.g. >0) + */ + POSITIVEINT, + /** + * A sequence of Unicode characters + */ + STRING, + /** + * A time during the day, with no date specified + */ + TIME, + /** + * An integer with a value that is not negative (e.g. >= 0) + */ + UNSIGNEDINT, + /** + * String of characters used to identify a name or a resource + */ + URI, + /** + * A UUID, represented as a URI + */ + UUID, + /** + * XHTML format, as defined by W3C, but restricted usage (mainly, no active content) + */ + XHTML, + /** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc. + */ + ACCOUNT, + /** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ + ALLERGYINTOLERANCE, + /** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ + APPOINTMENT, + /** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ + APPOINTMENTRESPONSE, + /** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ + AUDITEVENT, + /** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ + BASIC, + /** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ + BINARY, + /** + * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ + BODYSITE, + /** + * A container for a collection of resources. + */ + BUNDLE, + /** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ + CAREPLAN, + /** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ + CLAIM, + /** + * This resource provides the adjudication details from the processing of a Claim resource. + */ + CLAIMRESPONSE, + /** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ + CLINICALIMPRESSION, + /** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ + COMMUNICATION, + /** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ + COMMUNICATIONREQUEST, + /** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ + COMPOSITION, + /** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ + CONCEPTMAP, + /** + * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. + */ + CONDITION, + /** + * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ + CONFORMANCE, + /** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ + CONTRACT, + /** + * Financial instrument which may be used to pay for or reimburse health care products and services. + */ + COVERAGE, + /** + * The formal description of a single piece of information that can be gathered and reported. + */ + DATAELEMENT, + /** + * This resource defines a decision support rule of the form [on Event] if Condition then Action. + */ + DECISIONSUPPORTRULE, + /** + * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + */ + DECISIONSUPPORTSERVICEMODULE, + /** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ + DETECTEDISSUE, + /** + * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ + DEVICE, + /** + * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device. + */ + DEVICECOMPONENT, + /** + * Describes a measurement, calculation or setting capability of a medical device. + */ + DEVICEMETRIC, + /** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ + DEVICEUSEREQUEST, + /** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ + DEVICEUSESTATEMENT, + /** + * A record of a request for a diagnostic investigation service to be performed. + */ + DIAGNOSTICORDER, + /** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ + DIAGNOSTICREPORT, + /** + * A manifest that defines a set of documents. + */ + DOCUMENTMANIFEST, + /** + * A reference to a document . + */ + DOCUMENTREFERENCE, + /** + * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources. + */ + DOMAINRESOURCE, + /** + * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service. + */ + ELIGIBILITYREQUEST, + /** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ + ELIGIBILITYRESPONSE, + /** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ + ENCOUNTER, + /** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ + ENROLLMENTREQUEST, + /** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ + ENROLLMENTRESPONSE, + /** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ + EPISODEOFCARE, + /** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ + EXPANSIONPROFILE, + /** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ + EXPLANATIONOFBENEFIT, + /** + * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. + */ + FAMILYMEMBERHISTORY, + /** + * Prospective warnings of potential issues when providing care to the patient. + */ + FLAG, + /** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ + GOAL, + /** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ + GROUP, + /** + * A guidance request is a request to evaluate a particular knowledge module focused on decision support, providing information relevant to decision support such as workflow and user context. + */ + GUIDANCEREQUEST, + /** + * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + */ + GUIDANCERESPONSE, + /** + * The details of a healthcare service available at a location. + */ + HEALTHCARESERVICE, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGOBJECTSELECTION, + /** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ + IMAGINGSTUDY, + /** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ + IMMUNIZATION, + /** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ + IMMUNIZATIONRECOMMENDATION, + /** + * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. + */ + IMPLEMENTATIONGUIDE, + /** + * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library. + */ + LIBRARY, + /** + * A set of information summarized from a list of other resources. + */ + LIST, + /** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ + LOCATION, + /** + * The Measure resource provides the definition of a quality measure. + */ + MEASURE, + /** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ + MEDIA, + /** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ + MEDICATION, + /** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ + MEDICATIONADMINISTRATION, + /** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ + MEDICATIONDISPENSE, + /** + * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc. + */ + MEDICATIONORDER, + /** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ + MEDICATIONSTATEMENT, + /** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ + MESSAGEHEADER, + /** + * The ModuleDefinition resource defines the data requirements for a quality artifact. + */ + MODULEDEFINITION, + /** + * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ + MODULEMETADATA, + /** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ + NAMINGSYSTEM, + /** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ + NUTRITIONORDER, + /** + * Measurements and simple assertions made about a patient, device or other subject. + */ + OBSERVATION, + /** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ + OPERATIONDEFINITION, + /** + * A collection of error, warning or information messages that result from a system action. + */ + OPERATIONOUTCOME, + /** + * A request to perform an action. + */ + ORDER, + /** + * A response to an order. + */ + ORDERRESPONSE, + /** + * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support. + */ + ORDERSET, + /** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ + ORGANIZATION, + /** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ + PARAMETERS, + /** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ + PATIENT, + /** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ + PAYMENTNOTICE, + /** + * This resource provides payment details and claim references supporting a bulk payment. + */ + PAYMENTRECONCILIATION, + /** + * Demographics and administrative information about a person independent of a specific health-related context. + */ + PERSON, + /** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ + PROCEDURE, + /** + * A request for a procedure to be performed. May be a proposal or an order. + */ + PROCEDUREREQUEST, + /** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ + PROCESSREQUEST, + /** + * This resource provides processing status, errors and notes from the processing of a resource. + */ + PROCESSRESPONSE, + /** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ + PROVENANCE, + /** + * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRE, + /** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRERESPONSE, + /** + * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization. + */ + REFERRALREQUEST, + /** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * --- Abstract Type! ---This is the base resource type for everything. + */ + RESOURCE, + /** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ + RISKASSESSMENT, + /** + * A container for slot(s) of time that may be available for booking appointments. + */ + SCHEDULE, + /** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ + SEARCHPARAMETER, + /** + * A slot of time on a schedule that may be available for booking appointments. + */ + SLOT, + /** + * A sample to be used for analysis. + */ + SPECIMEN, + /** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. + */ + STRUCTUREDEFINITION, + /** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ + SUBSCRIPTION, + /** + * A homogeneous material with a definite composition. + */ + SUBSTANCE, + /** + * Record of delivery of what is supplied. + */ + SUPPLYDELIVERY, + /** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ + SUPPLYREQUEST, + /** + * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ + TESTSCRIPT, + /** + * A value set specifies a set of codes drawn from one or more code systems. + */ + VALUESET, + /** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers + */ + NULL; + public static FHIRDefinedType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return ADDRESS; + if ("Age".equals(codeString)) + return AGE; + if ("Annotation".equals(codeString)) + return ANNOTATION; + if ("Attachment".equals(codeString)) + return ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return CODING; + if ("ContactPoint".equals(codeString)) + return CONTACTPOINT; + if ("Count".equals(codeString)) + return COUNT; + if ("Distance".equals(codeString)) + return DISTANCE; + if ("Duration".equals(codeString)) + return DURATION; + if ("Element".equals(codeString)) + return ELEMENT; + if ("ElementDefinition".equals(codeString)) + return ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return EXTENSION; + if ("HumanName".equals(codeString)) + return HUMANNAME; + if ("Identifier".equals(codeString)) + return IDENTIFIER; + if ("Meta".equals(codeString)) + return META; + if ("Money".equals(codeString)) + return MONEY; + if ("Narrative".equals(codeString)) + return NARRATIVE; + if ("Period".equals(codeString)) + return PERIOD; + if ("Quantity".equals(codeString)) + return QUANTITY; + if ("Range".equals(codeString)) + return RANGE; + if ("Ratio".equals(codeString)) + return RATIO; + if ("Reference".equals(codeString)) + return REFERENCE; + if ("SampledData".equals(codeString)) + return SAMPLEDDATA; + if ("Signature".equals(codeString)) + return SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return TIMING; + if ("base64Binary".equals(codeString)) + return BASE64BINARY; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("code".equals(codeString)) + return CODE; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("id".equals(codeString)) + return ID; + if ("instant".equals(codeString)) + return INSTANT; + if ("integer".equals(codeString)) + return INTEGER; + if ("markdown".equals(codeString)) + return MARKDOWN; + if ("oid".equals(codeString)) + return OID; + if ("positiveInt".equals(codeString)) + return POSITIVEINT; + if ("string".equals(codeString)) + return STRING; + if ("time".equals(codeString)) + return TIME; + if ("unsignedInt".equals(codeString)) + return UNSIGNEDINT; + if ("uri".equals(codeString)) + return URI; + if ("uuid".equals(codeString)) + return UUID; + if ("xhtml".equals(codeString)) + return XHTML; + if ("Account".equals(codeString)) + return ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return AUDITEVENT; + if ("Basic".equals(codeString)) + return BASIC; + if ("Binary".equals(codeString)) + return BINARY; + if ("BodySite".equals(codeString)) + return BODYSITE; + if ("Bundle".equals(codeString)) + return BUNDLE; + if ("CarePlan".equals(codeString)) + return CAREPLAN; + if ("Claim".equals(codeString)) + return CLAIM; + if ("ClaimResponse".equals(codeString)) + return CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return CLINICALIMPRESSION; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("Composition".equals(codeString)) + return COMPOSITION; + if ("ConceptMap".equals(codeString)) + return CONCEPTMAP; + if ("Condition".equals(codeString)) + return CONDITION; + if ("Conformance".equals(codeString)) + return CONFORMANCE; + if ("Contract".equals(codeString)) + return CONTRACT; + if ("Coverage".equals(codeString)) + return COVERAGE; + if ("DataElement".equals(codeString)) + return DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return DETECTEDISSUE; + if ("Device".equals(codeString)) + return DEVICE; + if ("DeviceComponent".equals(codeString)) + return DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FLAG; + if ("Goal".equals(codeString)) + return GOAL; + if ("Group".equals(codeString)) + return GROUP; + if ("GuidanceRequest".equals(codeString)) + return GUIDANCEREQUEST; + if ("GuidanceResponse".equals(codeString)) + return GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return HEALTHCARESERVICE; + if ("ImagingObjectSelection".equals(codeString)) + return IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return LIBRARY; + if ("List".equals(codeString)) + return LIST; + if ("Location".equals(codeString)) + return LOCATION; + if ("Measure".equals(codeString)) + return MEASURE; + if ("Media".equals(codeString)) + return MEDIA; + if ("Medication".equals(codeString)) + return MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return MODULEDEFINITION; + if ("ModuleMetadata".equals(codeString)) + return MODULEMETADATA; + if ("NamingSystem".equals(codeString)) + return NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Observation".equals(codeString)) + return OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return ORDER; + if ("OrderResponse".equals(codeString)) + return ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return ORDERSET; + if ("Organization".equals(codeString)) + return ORGANIZATION; + if ("Parameters".equals(codeString)) + return PARAMETERS; + if ("Patient".equals(codeString)) + return PATIENT; + if ("PaymentNotice".equals(codeString)) + return PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return PERSON; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("Procedure".equals(codeString)) + return PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return PROVENANCE; + if ("Questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("Resource".equals(codeString)) + return RESOURCE; + if ("RiskAssessment".equals(codeString)) + return RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return SCHEDULE; + if ("SearchParameter".equals(codeString)) + return SEARCHPARAMETER; + if ("Slot".equals(codeString)) + return SLOT; + if ("Specimen".equals(codeString)) + return SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return STRUCTUREDEFINITION; + if ("Subscription".equals(codeString)) + return SUBSCRIPTION; + if ("Substance".equals(codeString)) + return SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return SUPPLYREQUEST; + if ("TestScript".equals(codeString)) + return TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return VALUESET; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "xhtml"; + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCEREQUEST: return "GuidanceRequest"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case MODULEMETADATA: return "ModuleMetadata"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ADDRESS: return "http://hl7.org/fhir/data-types"; + case AGE: return "http://hl7.org/fhir/data-types"; + case ANNOTATION: return "http://hl7.org/fhir/data-types"; + case ATTACHMENT: return "http://hl7.org/fhir/data-types"; + case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types"; + case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types"; + case CODING: return "http://hl7.org/fhir/data-types"; + case CONTACTPOINT: return "http://hl7.org/fhir/data-types"; + case COUNT: return "http://hl7.org/fhir/data-types"; + case DISTANCE: return "http://hl7.org/fhir/data-types"; + case DURATION: return "http://hl7.org/fhir/data-types"; + case ELEMENT: return "http://hl7.org/fhir/data-types"; + case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types"; + case EXTENSION: return "http://hl7.org/fhir/data-types"; + case HUMANNAME: return "http://hl7.org/fhir/data-types"; + case IDENTIFIER: return "http://hl7.org/fhir/data-types"; + case META: return "http://hl7.org/fhir/data-types"; + case MONEY: return "http://hl7.org/fhir/data-types"; + case NARRATIVE: return "http://hl7.org/fhir/data-types"; + case PERIOD: return "http://hl7.org/fhir/data-types"; + case QUANTITY: return "http://hl7.org/fhir/data-types"; + case RANGE: return "http://hl7.org/fhir/data-types"; + case RATIO: return "http://hl7.org/fhir/data-types"; + case REFERENCE: return "http://hl7.org/fhir/data-types"; + case SAMPLEDDATA: return "http://hl7.org/fhir/data-types"; + case SIGNATURE: return "http://hl7.org/fhir/data-types"; + case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types"; + case TIMING: return "http://hl7.org/fhir/data-types"; + case BASE64BINARY: return "http://hl7.org/fhir/data-types"; + case BOOLEAN: return "http://hl7.org/fhir/data-types"; + case CODE: return "http://hl7.org/fhir/data-types"; + case DATE: return "http://hl7.org/fhir/data-types"; + case DATETIME: return "http://hl7.org/fhir/data-types"; + case DECIMAL: return "http://hl7.org/fhir/data-types"; + case ID: return "http://hl7.org/fhir/data-types"; + case INSTANT: return "http://hl7.org/fhir/data-types"; + case INTEGER: return "http://hl7.org/fhir/data-types"; + case MARKDOWN: return "http://hl7.org/fhir/data-types"; + case OID: return "http://hl7.org/fhir/data-types"; + case POSITIVEINT: return "http://hl7.org/fhir/data-types"; + case STRING: return "http://hl7.org/fhir/data-types"; + case TIME: return "http://hl7.org/fhir/data-types"; + case UNSIGNEDINT: return "http://hl7.org/fhir/data-types"; + case URI: return "http://hl7.org/fhir/data-types"; + case UUID: return "http://hl7.org/fhir/data-types"; + case XHTML: return "http://hl7.org/fhir/data-types"; + case ACCOUNT: return "http://hl7.org/fhir/resource-types"; + case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENT: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case AUDITEVENT: return "http://hl7.org/fhir/resource-types"; + case BASIC: return "http://hl7.org/fhir/resource-types"; + case BINARY: return "http://hl7.org/fhir/resource-types"; + case BODYSITE: return "http://hl7.org/fhir/resource-types"; + case BUNDLE: return "http://hl7.org/fhir/resource-types"; + case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CLAIM: return "http://hl7.org/fhir/resource-types"; + case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; + case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPOSITION: return "http://hl7.org/fhir/resource-types"; + case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; + case CONDITION: return "http://hl7.org/fhir/resource-types"; + case CONFORMANCE: return "http://hl7.org/fhir/resource-types"; + case CONTRACT: return "http://hl7.org/fhir/resource-types"; + case COVERAGE: return "http://hl7.org/fhir/resource-types"; + case DATAELEMENT: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types"; + case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types"; + case DEVICE: return "http://hl7.org/fhir/resource-types"; + case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types"; + case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types"; + case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ENCOUNTER: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; + case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; + case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; + case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; + case FLAG: return "http://hl7.org/fhir/resource-types"; + case GOAL: return "http://hl7.org/fhir/resource-types"; + case GROUP: return "http://hl7.org/fhir/resource-types"; + case GUIDANCEREQUEST: return "http://hl7.org/fhir/resource-types"; + case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; + case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types"; + case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types"; + case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types"; + case LIBRARY: return "http://hl7.org/fhir/resource-types"; + case LIST: return "http://hl7.org/fhir/resource-types"; + case LOCATION: return "http://hl7.org/fhir/resource-types"; + case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEDIA: return "http://hl7.org/fhir/resource-types"; + case MEDICATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; + case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; + case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types"; + case MODULEMETADATA: return "http://hl7.org/fhir/resource-types"; + case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; + case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; + case OBSERVATION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types"; + case ORDER: return "http://hl7.org/fhir/resource-types"; + case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ORDERSET: return "http://hl7.org/fhir/resource-types"; + case ORGANIZATION: return "http://hl7.org/fhir/resource-types"; + case PARAMETERS: return "http://hl7.org/fhir/resource-types"; + case PATIENT: return "http://hl7.org/fhir/resource-types"; + case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types"; + case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; + case PERSON: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PROCEDURE: return "http://hl7.org/fhir/resource-types"; + case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types"; + case PROVENANCE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types"; + case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types"; + case RELATEDPERSON: return "http://hl7.org/fhir/resource-types"; + case RESOURCE: return "http://hl7.org/fhir/resource-types"; + case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types"; + case SCHEDULE: return "http://hl7.org/fhir/resource-types"; + case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types"; + case SLOT: return "http://hl7.org/fhir/resource-types"; + case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; + case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; + case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; + case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; + case VALUESET: return "http://hl7.org/fhir/resource-types"; + case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ADDRESS: return "There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."; + case AGE: return ""; + case ANNOTATION: return "A text note which also contains information about who made the statement and when."; + case ATTACHMENT: return "For referring to data content defined in other formats."; + case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type."; + case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."; + case CODING: return "A reference to a code defined by a terminology system."; + case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; + case COUNT: return ""; + case DISTANCE: return ""; + case DURATION: return ""; + case ELEMENT: return "Base definition for all elements in a resource."; + case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension."; + case EXTENSION: return "Optional Extensions Element - found in all resources."; + case HUMANNAME: return "A human's name with the ability to identify parts and usage."; + case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; + case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MONEY: return ""; + case NARRATIVE: return "A human-readable formatted text, including images."; + case PERIOD: return "A time period defined by a start and end date and optionally time."; + case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; + case RANGE: return "A set of ordered Quantities defined by a low and high limit."; + case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator."; + case REFERENCE: return "A reference from one resource to another."; + case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."; + case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities."; + case SIMPLEQUANTITY: return ""; + case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds."; + case BASE64BINARY: return "A stream of bytes"; + case BOOLEAN: return "Value of \"true\" or \"false\""; + case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; + case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."; + case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."; + case DECIMAL: return "A rational number with implicit precision"; + case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive."; + case INSTANT: return "An instant in time - known at least to the second"; + case INTEGER: return "A whole number"; + case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine"; + case OID: return "An oid represented as a URI"; + case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)"; + case STRING: return "A sequence of Unicode characters"; + case TIME: return "A time during the day, with no date specified"; + case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)"; + case URI: return "String of characters used to identify a name or a resource"; + case UUID: return "A UUID, represented as a URI"; + case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)"; + case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc."; + case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."; + case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; + case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; + case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."; + case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."; + case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc."; + case BODYSITE: return "Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; + case BUNDLE: return "A container for a collection of resources."; + case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; + case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; + case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; + case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; + case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; + case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; + case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary."; + case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; + case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; + case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services."; + case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported."; + case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action."; + case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule resource describes decision support functionality that is available as a service."; + case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; + case DEVICE: return "This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device."; + case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; + case DEVICEUSEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; + case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."; + case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed."; + case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."; + case DOCUMENTMANIFEST: return "A manifest that defines a set of documents."; + case DOCUMENTREFERENCE: return "A reference to a document ."; + case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources."; + case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service."; + case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource."; + case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient."; + case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage."; + case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; + case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; + case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; + case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; + case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."; + case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; + case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; + case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; + case GUIDANCEREQUEST: return "A guidance request is a request to evaluate a particular knowledge module focused on decision support, providing information relevant to decision support such as workflow and user context."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken."; + case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; + case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; + case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; + case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification."; + case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts."; + case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library."; + case LIST: return "A set of information summarized from a list of other resources."; + case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; + case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; + case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; + case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; + case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; + case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; + case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact."; + case MODULEMETADATA: return "The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; + case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; + case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; + case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; + case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."; + case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action."; + case ORDER: return "A request to perform an action."; + case ORDERRESPONSE: return "A response to an order."; + case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support."; + case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc."; + case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it."; + case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services."; + case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references."; + case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; + case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; + case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; + case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order."; + case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; + case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource."; + case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."; + case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization."; + case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything."; + case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."; + case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments."; + case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource."; + case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; + case SPECIMEN: return "A sample to be used for analysis."; + case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types."; + case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; + case SUBSTANCE: return "A homogeneous material with a definite composition."; + case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; + case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."; + case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; + case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "XHTML"; + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCEREQUEST: return "GuidanceRequest"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case MODULEMETADATA: return "ModuleMetadata"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + } + + public static class FHIRDefinedTypeEnumFactory implements EnumFactory { + public FHIRDefinedType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return FHIRDefinedType.ADDRESS; + if ("Age".equals(codeString)) + return FHIRDefinedType.AGE; + if ("Annotation".equals(codeString)) + return FHIRDefinedType.ANNOTATION; + if ("Attachment".equals(codeString)) + return FHIRDefinedType.ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return FHIRDefinedType.BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return FHIRDefinedType.CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return FHIRDefinedType.CODING; + if ("ContactPoint".equals(codeString)) + return FHIRDefinedType.CONTACTPOINT; + if ("Count".equals(codeString)) + return FHIRDefinedType.COUNT; + if ("Distance".equals(codeString)) + return FHIRDefinedType.DISTANCE; + if ("Duration".equals(codeString)) + return FHIRDefinedType.DURATION; + if ("Element".equals(codeString)) + return FHIRDefinedType.ELEMENT; + if ("ElementDefinition".equals(codeString)) + return FHIRDefinedType.ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return FHIRDefinedType.EXTENSION; + if ("HumanName".equals(codeString)) + return FHIRDefinedType.HUMANNAME; + if ("Identifier".equals(codeString)) + return FHIRDefinedType.IDENTIFIER; + if ("Meta".equals(codeString)) + return FHIRDefinedType.META; + if ("Money".equals(codeString)) + return FHIRDefinedType.MONEY; + if ("Narrative".equals(codeString)) + return FHIRDefinedType.NARRATIVE; + if ("Period".equals(codeString)) + return FHIRDefinedType.PERIOD; + if ("Quantity".equals(codeString)) + return FHIRDefinedType.QUANTITY; + if ("Range".equals(codeString)) + return FHIRDefinedType.RANGE; + if ("Ratio".equals(codeString)) + return FHIRDefinedType.RATIO; + if ("Reference".equals(codeString)) + return FHIRDefinedType.REFERENCE; + if ("SampledData".equals(codeString)) + return FHIRDefinedType.SAMPLEDDATA; + if ("Signature".equals(codeString)) + return FHIRDefinedType.SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return FHIRDefinedType.SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return FHIRDefinedType.TIMING; + if ("base64Binary".equals(codeString)) + return FHIRDefinedType.BASE64BINARY; + if ("boolean".equals(codeString)) + return FHIRDefinedType.BOOLEAN; + if ("code".equals(codeString)) + return FHIRDefinedType.CODE; + if ("date".equals(codeString)) + return FHIRDefinedType.DATE; + if ("dateTime".equals(codeString)) + return FHIRDefinedType.DATETIME; + if ("decimal".equals(codeString)) + return FHIRDefinedType.DECIMAL; + if ("id".equals(codeString)) + return FHIRDefinedType.ID; + if ("instant".equals(codeString)) + return FHIRDefinedType.INSTANT; + if ("integer".equals(codeString)) + return FHIRDefinedType.INTEGER; + if ("markdown".equals(codeString)) + return FHIRDefinedType.MARKDOWN; + if ("oid".equals(codeString)) + return FHIRDefinedType.OID; + if ("positiveInt".equals(codeString)) + return FHIRDefinedType.POSITIVEINT; + if ("string".equals(codeString)) + return FHIRDefinedType.STRING; + if ("time".equals(codeString)) + return FHIRDefinedType.TIME; + if ("unsignedInt".equals(codeString)) + return FHIRDefinedType.UNSIGNEDINT; + if ("uri".equals(codeString)) + return FHIRDefinedType.URI; + if ("uuid".equals(codeString)) + return FHIRDefinedType.UUID; + if ("xhtml".equals(codeString)) + return FHIRDefinedType.XHTML; + if ("Account".equals(codeString)) + return FHIRDefinedType.ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return FHIRDefinedType.ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return FHIRDefinedType.APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return FHIRDefinedType.APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return FHIRDefinedType.AUDITEVENT; + if ("Basic".equals(codeString)) + return FHIRDefinedType.BASIC; + if ("Binary".equals(codeString)) + return FHIRDefinedType.BINARY; + if ("BodySite".equals(codeString)) + return FHIRDefinedType.BODYSITE; + if ("Bundle".equals(codeString)) + return FHIRDefinedType.BUNDLE; + if ("CarePlan".equals(codeString)) + return FHIRDefinedType.CAREPLAN; + if ("Claim".equals(codeString)) + return FHIRDefinedType.CLAIM; + if ("ClaimResponse".equals(codeString)) + return FHIRDefinedType.CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return FHIRDefinedType.CLINICALIMPRESSION; + if ("Communication".equals(codeString)) + return FHIRDefinedType.COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return FHIRDefinedType.COMMUNICATIONREQUEST; + if ("Composition".equals(codeString)) + return FHIRDefinedType.COMPOSITION; + if ("ConceptMap".equals(codeString)) + return FHIRDefinedType.CONCEPTMAP; + if ("Condition".equals(codeString)) + return FHIRDefinedType.CONDITION; + if ("Conformance".equals(codeString)) + return FHIRDefinedType.CONFORMANCE; + if ("Contract".equals(codeString)) + return FHIRDefinedType.CONTRACT; + if ("Coverage".equals(codeString)) + return FHIRDefinedType.COVERAGE; + if ("DataElement".equals(codeString)) + return FHIRDefinedType.DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return FHIRDefinedType.DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return FHIRDefinedType.DETECTEDISSUE; + if ("Device".equals(codeString)) + return FHIRDefinedType.DEVICE; + if ("DeviceComponent".equals(codeString)) + return FHIRDefinedType.DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return FHIRDefinedType.DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return FHIRDefinedType.DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return FHIRDefinedType.DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return FHIRDefinedType.DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return FHIRDefinedType.DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return FHIRDefinedType.DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return FHIRDefinedType.DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return FHIRDefinedType.DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return FHIRDefinedType.ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return FHIRDefinedType.ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return FHIRDefinedType.ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return FHIRDefinedType.ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return FHIRDefinedType.ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return FHIRDefinedType.EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return FHIRDefinedType.EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return FHIRDefinedType.EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FHIRDefinedType.FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FHIRDefinedType.FLAG; + if ("Goal".equals(codeString)) + return FHIRDefinedType.GOAL; + if ("Group".equals(codeString)) + return FHIRDefinedType.GROUP; + if ("GuidanceRequest".equals(codeString)) + return FHIRDefinedType.GUIDANCEREQUEST; + if ("GuidanceResponse".equals(codeString)) + return FHIRDefinedType.GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return FHIRDefinedType.HEALTHCARESERVICE; + if ("ImagingObjectSelection".equals(codeString)) + return FHIRDefinedType.IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return FHIRDefinedType.IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return FHIRDefinedType.IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return FHIRDefinedType.IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return FHIRDefinedType.IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return FHIRDefinedType.LIBRARY; + if ("List".equals(codeString)) + return FHIRDefinedType.LIST; + if ("Location".equals(codeString)) + return FHIRDefinedType.LOCATION; + if ("Measure".equals(codeString)) + return FHIRDefinedType.MEASURE; + if ("Media".equals(codeString)) + return FHIRDefinedType.MEDIA; + if ("Medication".equals(codeString)) + return FHIRDefinedType.MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return FHIRDefinedType.MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return FHIRDefinedType.MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return FHIRDefinedType.MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return FHIRDefinedType.MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return FHIRDefinedType.MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return FHIRDefinedType.MODULEDEFINITION; + if ("ModuleMetadata".equals(codeString)) + return FHIRDefinedType.MODULEMETADATA; + if ("NamingSystem".equals(codeString)) + return FHIRDefinedType.NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return FHIRDefinedType.NUTRITIONORDER; + if ("Observation".equals(codeString)) + return FHIRDefinedType.OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return FHIRDefinedType.OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return FHIRDefinedType.OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return FHIRDefinedType.ORDER; + if ("OrderResponse".equals(codeString)) + return FHIRDefinedType.ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return FHIRDefinedType.ORDERSET; + if ("Organization".equals(codeString)) + return FHIRDefinedType.ORGANIZATION; + if ("Parameters".equals(codeString)) + return FHIRDefinedType.PARAMETERS; + if ("Patient".equals(codeString)) + return FHIRDefinedType.PATIENT; + if ("PaymentNotice".equals(codeString)) + return FHIRDefinedType.PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return FHIRDefinedType.PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return FHIRDefinedType.PERSON; + if ("Practitioner".equals(codeString)) + return FHIRDefinedType.PRACTITIONER; + if ("Procedure".equals(codeString)) + return FHIRDefinedType.PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return FHIRDefinedType.PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return FHIRDefinedType.PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return FHIRDefinedType.PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return FHIRDefinedType.PROVENANCE; + if ("Questionnaire".equals(codeString)) + return FHIRDefinedType.QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return FHIRDefinedType.QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return FHIRDefinedType.REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return FHIRDefinedType.RELATEDPERSON; + if ("Resource".equals(codeString)) + return FHIRDefinedType.RESOURCE; + if ("RiskAssessment".equals(codeString)) + return FHIRDefinedType.RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return FHIRDefinedType.SCHEDULE; + if ("SearchParameter".equals(codeString)) + return FHIRDefinedType.SEARCHPARAMETER; + if ("Slot".equals(codeString)) + return FHIRDefinedType.SLOT; + if ("Specimen".equals(codeString)) + return FHIRDefinedType.SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return FHIRDefinedType.STRUCTUREDEFINITION; + if ("Subscription".equals(codeString)) + return FHIRDefinedType.SUBSCRIPTION; + if ("Substance".equals(codeString)) + return FHIRDefinedType.SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return FHIRDefinedType.SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return FHIRDefinedType.SUPPLYREQUEST; + if ("TestScript".equals(codeString)) + return FHIRDefinedType.TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return FHIRDefinedType.VALUESET; + if ("VisionPrescription".equals(codeString)) + return FHIRDefinedType.VISIONPRESCRIPTION; + throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ADDRESS); + if ("Age".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.AGE); + if ("Annotation".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ANNOTATION); + if ("Attachment".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ATTACHMENT); + if ("BackboneElement".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BACKBONEELEMENT); + if ("CodeableConcept".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CODEABLECONCEPT); + if ("Coding".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CODING); + if ("ContactPoint".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CONTACTPOINT); + if ("Count".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COUNT); + if ("Distance".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DISTANCE); + if ("Duration".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DURATION); + if ("Element".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ELEMENT); + if ("ElementDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ELEMENTDEFINITION); + if ("Extension".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.EXTENSION); + if ("HumanName".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.HUMANNAME); + if ("Identifier".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IDENTIFIER); + if ("Meta".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.META); + if ("Money".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MONEY); + if ("Narrative".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.NARRATIVE); + if ("Period".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PERIOD); + if ("Quantity".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.QUANTITY); + if ("Range".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.RANGE); + if ("Ratio".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.RATIO); + if ("Reference".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.REFERENCE); + if ("SampledData".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SAMPLEDDATA); + if ("Signature".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SIGNATURE); + if ("SimpleQuantity".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SIMPLEQUANTITY); + if ("Timing".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.TIMING); + if ("base64Binary".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BASE64BINARY); + if ("boolean".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BOOLEAN); + if ("code".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CODE); + if ("date".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DATE); + if ("dateTime".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DATETIME); + if ("decimal".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DECIMAL); + if ("id".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ID); + if ("instant".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.INSTANT); + if ("integer".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.INTEGER); + if ("markdown".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MARKDOWN); + if ("oid".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.OID); + if ("positiveInt".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.POSITIVEINT); + if ("string".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.STRING); + if ("time".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.TIME); + if ("unsignedInt".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.UNSIGNEDINT); + if ("uri".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.URI); + if ("uuid".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.UUID); + if ("xhtml".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.XHTML); + if ("Account".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ACCOUNT); + if ("AllergyIntolerance".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ALLERGYINTOLERANCE); + if ("Appointment".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.APPOINTMENT); + if ("AppointmentResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.APPOINTMENTRESPONSE); + if ("AuditEvent".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.AUDITEVENT); + if ("Basic".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BASIC); + if ("Binary".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BINARY); + if ("BodySite".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BODYSITE); + if ("Bundle".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.BUNDLE); + if ("CarePlan".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CAREPLAN); + if ("Claim".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CLAIM); + if ("ClaimResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CLAIMRESPONSE); + if ("ClinicalImpression".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CLINICALIMPRESSION); + if ("Communication".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COMMUNICATION); + if ("CommunicationRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COMMUNICATIONREQUEST); + if ("Composition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COMPOSITION); + if ("ConceptMap".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CONCEPTMAP); + if ("Condition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CONDITION); + if ("Conformance".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CONFORMANCE); + if ("Contract".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CONTRACT); + if ("Coverage".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COVERAGE); + if ("DataElement".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DATAELEMENT); + if ("DecisionSupportRule".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DECISIONSUPPORTRULE); + if ("DecisionSupportServiceModule".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE); + if ("DetectedIssue".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DETECTEDISSUE); + if ("Device".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DEVICE); + if ("DeviceComponent".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DEVICECOMPONENT); + if ("DeviceMetric".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DEVICEMETRIC); + if ("DeviceUseRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DEVICEUSEREQUEST); + if ("DeviceUseStatement".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DEVICEUSESTATEMENT); + if ("DiagnosticOrder".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DIAGNOSTICORDER); + if ("DiagnosticReport".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DIAGNOSTICREPORT); + if ("DocumentManifest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DOCUMENTMANIFEST); + if ("DocumentReference".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DOCUMENTREFERENCE); + if ("DomainResource".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DOMAINRESOURCE); + if ("EligibilityRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ELIGIBILITYREQUEST); + if ("EligibilityResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ELIGIBILITYRESPONSE); + if ("Encounter".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ENCOUNTER); + if ("EnrollmentRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ENROLLMENTREQUEST); + if ("EnrollmentResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ENROLLMENTRESPONSE); + if ("EpisodeOfCare".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.EPISODEOFCARE); + if ("ExpansionProfile".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.EXPANSIONPROFILE); + if ("ExplanationOfBenefit".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.EXPLANATIONOFBENEFIT); + if ("FamilyMemberHistory".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.FAMILYMEMBERHISTORY); + if ("Flag".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.FLAG); + if ("Goal".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.GOAL); + if ("Group".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.GROUP); + if ("GuidanceRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.GUIDANCEREQUEST); + if ("GuidanceResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.GUIDANCERESPONSE); + if ("HealthcareService".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.HEALTHCARESERVICE); + if ("ImagingObjectSelection".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMAGINGOBJECTSELECTION); + if ("ImagingStudy".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMAGINGSTUDY); + if ("Immunization".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMMUNIZATION); + if ("ImmunizationRecommendation".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMMUNIZATIONRECOMMENDATION); + if ("ImplementationGuide".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMPLEMENTATIONGUIDE); + if ("Library".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.LIBRARY); + if ("List".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.LIST); + if ("Location".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.LOCATION); + if ("Measure".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEASURE); + if ("Media".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDIA); + if ("Medication".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDICATION); + if ("MedicationAdministration".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDICATIONADMINISTRATION); + if ("MedicationDispense".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDICATIONDISPENSE); + if ("MedicationOrder".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDICATIONORDER); + if ("MedicationStatement".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEDICATIONSTATEMENT); + if ("MessageHeader".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MESSAGEHEADER); + if ("ModuleDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MODULEDEFINITION); + if ("ModuleMetadata".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MODULEMETADATA); + if ("NamingSystem".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.NAMINGSYSTEM); + if ("NutritionOrder".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.NUTRITIONORDER); + if ("Observation".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.OBSERVATION); + if ("OperationDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.OPERATIONDEFINITION); + if ("OperationOutcome".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.OPERATIONOUTCOME); + if ("Order".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ORDER); + if ("OrderResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ORDERRESPONSE); + if ("OrderSet".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ORDERSET); + if ("Organization".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ORGANIZATION); + if ("Parameters".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PARAMETERS); + if ("Patient".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PATIENT); + if ("PaymentNotice".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PAYMENTNOTICE); + if ("PaymentReconciliation".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PAYMENTRECONCILIATION); + if ("Person".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PERSON); + if ("Practitioner".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PRACTITIONER); + if ("Procedure".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PROCEDURE); + if ("ProcedureRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PROCEDUREREQUEST); + if ("ProcessRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PROCESSREQUEST); + if ("ProcessResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PROCESSRESPONSE); + if ("Provenance".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PROVENANCE); + if ("Questionnaire".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.QUESTIONNAIRE); + if ("QuestionnaireResponse".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.QUESTIONNAIRERESPONSE); + if ("ReferralRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.REFERRALREQUEST); + if ("RelatedPerson".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.RELATEDPERSON); + if ("Resource".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.RESOURCE); + if ("RiskAssessment".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.RISKASSESSMENT); + if ("Schedule".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SCHEDULE); + if ("SearchParameter".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SEARCHPARAMETER); + if ("Slot".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SLOT); + if ("Specimen".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SPECIMEN); + if ("StructureDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.STRUCTUREDEFINITION); + if ("Subscription".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SUBSCRIPTION); + if ("Substance".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SUBSTANCE); + if ("SupplyDelivery".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SUPPLYDELIVERY); + if ("SupplyRequest".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SUPPLYREQUEST); + if ("TestScript".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.TESTSCRIPT); + if ("ValueSet".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.VALUESET); + if ("VisionPrescription".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.VISIONPRESCRIPTION); + throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); + } + public String toCode(FHIRDefinedType code) { + if (code == FHIRDefinedType.ADDRESS) + return "Address"; + if (code == FHIRDefinedType.AGE) + return "Age"; + if (code == FHIRDefinedType.ANNOTATION) + return "Annotation"; + if (code == FHIRDefinedType.ATTACHMENT) + return "Attachment"; + if (code == FHIRDefinedType.BACKBONEELEMENT) + return "BackboneElement"; + if (code == FHIRDefinedType.CODEABLECONCEPT) + return "CodeableConcept"; + if (code == FHIRDefinedType.CODING) + return "Coding"; + if (code == FHIRDefinedType.CONTACTPOINT) + return "ContactPoint"; + if (code == FHIRDefinedType.COUNT) + return "Count"; + if (code == FHIRDefinedType.DISTANCE) + return "Distance"; + if (code == FHIRDefinedType.DURATION) + return "Duration"; + if (code == FHIRDefinedType.ELEMENT) + return "Element"; + if (code == FHIRDefinedType.ELEMENTDEFINITION) + return "ElementDefinition"; + if (code == FHIRDefinedType.EXTENSION) + return "Extension"; + if (code == FHIRDefinedType.HUMANNAME) + return "HumanName"; + if (code == FHIRDefinedType.IDENTIFIER) + return "Identifier"; + if (code == FHIRDefinedType.META) + return "Meta"; + if (code == FHIRDefinedType.MONEY) + return "Money"; + if (code == FHIRDefinedType.NARRATIVE) + return "Narrative"; + if (code == FHIRDefinedType.PERIOD) + return "Period"; + if (code == FHIRDefinedType.QUANTITY) + return "Quantity"; + if (code == FHIRDefinedType.RANGE) + return "Range"; + if (code == FHIRDefinedType.RATIO) + return "Ratio"; + if (code == FHIRDefinedType.REFERENCE) + return "Reference"; + if (code == FHIRDefinedType.SAMPLEDDATA) + return "SampledData"; + if (code == FHIRDefinedType.SIGNATURE) + return "Signature"; + if (code == FHIRDefinedType.SIMPLEQUANTITY) + return "SimpleQuantity"; + if (code == FHIRDefinedType.TIMING) + return "Timing"; + if (code == FHIRDefinedType.BASE64BINARY) + return "base64Binary"; + if (code == FHIRDefinedType.BOOLEAN) + return "boolean"; + if (code == FHIRDefinedType.CODE) + return "code"; + if (code == FHIRDefinedType.DATE) + return "date"; + if (code == FHIRDefinedType.DATETIME) + return "dateTime"; + if (code == FHIRDefinedType.DECIMAL) + return "decimal"; + if (code == FHIRDefinedType.ID) + return "id"; + if (code == FHIRDefinedType.INSTANT) + return "instant"; + if (code == FHIRDefinedType.INTEGER) + return "integer"; + if (code == FHIRDefinedType.MARKDOWN) + return "markdown"; + if (code == FHIRDefinedType.OID) + return "oid"; + if (code == FHIRDefinedType.POSITIVEINT) + return "positiveInt"; + if (code == FHIRDefinedType.STRING) + return "string"; + if (code == FHIRDefinedType.TIME) + return "time"; + if (code == FHIRDefinedType.UNSIGNEDINT) + return "unsignedInt"; + if (code == FHIRDefinedType.URI) + return "uri"; + if (code == FHIRDefinedType.UUID) + return "uuid"; + if (code == FHIRDefinedType.XHTML) + return "xhtml"; + if (code == FHIRDefinedType.ACCOUNT) + return "Account"; + if (code == FHIRDefinedType.ALLERGYINTOLERANCE) + return "AllergyIntolerance"; + if (code == FHIRDefinedType.APPOINTMENT) + return "Appointment"; + if (code == FHIRDefinedType.APPOINTMENTRESPONSE) + return "AppointmentResponse"; + if (code == FHIRDefinedType.AUDITEVENT) + return "AuditEvent"; + if (code == FHIRDefinedType.BASIC) + return "Basic"; + if (code == FHIRDefinedType.BINARY) + return "Binary"; + if (code == FHIRDefinedType.BODYSITE) + return "BodySite"; + if (code == FHIRDefinedType.BUNDLE) + return "Bundle"; + if (code == FHIRDefinedType.CAREPLAN) + return "CarePlan"; + if (code == FHIRDefinedType.CLAIM) + return "Claim"; + if (code == FHIRDefinedType.CLAIMRESPONSE) + return "ClaimResponse"; + if (code == FHIRDefinedType.CLINICALIMPRESSION) + return "ClinicalImpression"; + if (code == FHIRDefinedType.COMMUNICATION) + return "Communication"; + if (code == FHIRDefinedType.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == FHIRDefinedType.COMPOSITION) + return "Composition"; + if (code == FHIRDefinedType.CONCEPTMAP) + return "ConceptMap"; + if (code == FHIRDefinedType.CONDITION) + return "Condition"; + if (code == FHIRDefinedType.CONFORMANCE) + return "Conformance"; + if (code == FHIRDefinedType.CONTRACT) + return "Contract"; + if (code == FHIRDefinedType.COVERAGE) + return "Coverage"; + if (code == FHIRDefinedType.DATAELEMENT) + return "DataElement"; + if (code == FHIRDefinedType.DECISIONSUPPORTRULE) + return "DecisionSupportRule"; + if (code == FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE) + return "DecisionSupportServiceModule"; + if (code == FHIRDefinedType.DETECTEDISSUE) + return "DetectedIssue"; + if (code == FHIRDefinedType.DEVICE) + return "Device"; + if (code == FHIRDefinedType.DEVICECOMPONENT) + return "DeviceComponent"; + if (code == FHIRDefinedType.DEVICEMETRIC) + return "DeviceMetric"; + if (code == FHIRDefinedType.DEVICEUSEREQUEST) + return "DeviceUseRequest"; + if (code == FHIRDefinedType.DEVICEUSESTATEMENT) + return "DeviceUseStatement"; + if (code == FHIRDefinedType.DIAGNOSTICORDER) + return "DiagnosticOrder"; + if (code == FHIRDefinedType.DIAGNOSTICREPORT) + return "DiagnosticReport"; + if (code == FHIRDefinedType.DOCUMENTMANIFEST) + return "DocumentManifest"; + if (code == FHIRDefinedType.DOCUMENTREFERENCE) + return "DocumentReference"; + if (code == FHIRDefinedType.DOMAINRESOURCE) + return "DomainResource"; + if (code == FHIRDefinedType.ELIGIBILITYREQUEST) + return "EligibilityRequest"; + if (code == FHIRDefinedType.ELIGIBILITYRESPONSE) + return "EligibilityResponse"; + if (code == FHIRDefinedType.ENCOUNTER) + return "Encounter"; + if (code == FHIRDefinedType.ENROLLMENTREQUEST) + return "EnrollmentRequest"; + if (code == FHIRDefinedType.ENROLLMENTRESPONSE) + return "EnrollmentResponse"; + if (code == FHIRDefinedType.EPISODEOFCARE) + return "EpisodeOfCare"; + if (code == FHIRDefinedType.EXPANSIONPROFILE) + return "ExpansionProfile"; + if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT) + return "ExplanationOfBenefit"; + if (code == FHIRDefinedType.FAMILYMEMBERHISTORY) + return "FamilyMemberHistory"; + if (code == FHIRDefinedType.FLAG) + return "Flag"; + if (code == FHIRDefinedType.GOAL) + return "Goal"; + if (code == FHIRDefinedType.GROUP) + return "Group"; + if (code == FHIRDefinedType.GUIDANCEREQUEST) + return "GuidanceRequest"; + if (code == FHIRDefinedType.GUIDANCERESPONSE) + return "GuidanceResponse"; + if (code == FHIRDefinedType.HEALTHCARESERVICE) + return "HealthcareService"; + if (code == FHIRDefinedType.IMAGINGOBJECTSELECTION) + return "ImagingObjectSelection"; + if (code == FHIRDefinedType.IMAGINGSTUDY) + return "ImagingStudy"; + if (code == FHIRDefinedType.IMMUNIZATION) + return "Immunization"; + if (code == FHIRDefinedType.IMMUNIZATIONRECOMMENDATION) + return "ImmunizationRecommendation"; + if (code == FHIRDefinedType.IMPLEMENTATIONGUIDE) + return "ImplementationGuide"; + if (code == FHIRDefinedType.LIBRARY) + return "Library"; + if (code == FHIRDefinedType.LIST) + return "List"; + if (code == FHIRDefinedType.LOCATION) + return "Location"; + if (code == FHIRDefinedType.MEASURE) + return "Measure"; + if (code == FHIRDefinedType.MEDIA) + return "Media"; + if (code == FHIRDefinedType.MEDICATION) + return "Medication"; + if (code == FHIRDefinedType.MEDICATIONADMINISTRATION) + return "MedicationAdministration"; + if (code == FHIRDefinedType.MEDICATIONDISPENSE) + return "MedicationDispense"; + if (code == FHIRDefinedType.MEDICATIONORDER) + return "MedicationOrder"; + if (code == FHIRDefinedType.MEDICATIONSTATEMENT) + return "MedicationStatement"; + if (code == FHIRDefinedType.MESSAGEHEADER) + return "MessageHeader"; + if (code == FHIRDefinedType.MODULEDEFINITION) + return "ModuleDefinition"; + if (code == FHIRDefinedType.MODULEMETADATA) + return "ModuleMetadata"; + if (code == FHIRDefinedType.NAMINGSYSTEM) + return "NamingSystem"; + if (code == FHIRDefinedType.NUTRITIONORDER) + return "NutritionOrder"; + if (code == FHIRDefinedType.OBSERVATION) + return "Observation"; + if (code == FHIRDefinedType.OPERATIONDEFINITION) + return "OperationDefinition"; + if (code == FHIRDefinedType.OPERATIONOUTCOME) + return "OperationOutcome"; + if (code == FHIRDefinedType.ORDER) + return "Order"; + if (code == FHIRDefinedType.ORDERRESPONSE) + return "OrderResponse"; + if (code == FHIRDefinedType.ORDERSET) + return "OrderSet"; + if (code == FHIRDefinedType.ORGANIZATION) + return "Organization"; + if (code == FHIRDefinedType.PARAMETERS) + return "Parameters"; + if (code == FHIRDefinedType.PATIENT) + return "Patient"; + if (code == FHIRDefinedType.PAYMENTNOTICE) + return "PaymentNotice"; + if (code == FHIRDefinedType.PAYMENTRECONCILIATION) + return "PaymentReconciliation"; + if (code == FHIRDefinedType.PERSON) + return "Person"; + if (code == FHIRDefinedType.PRACTITIONER) + return "Practitioner"; + if (code == FHIRDefinedType.PROCEDURE) + return "Procedure"; + if (code == FHIRDefinedType.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == FHIRDefinedType.PROCESSREQUEST) + return "ProcessRequest"; + if (code == FHIRDefinedType.PROCESSRESPONSE) + return "ProcessResponse"; + if (code == FHIRDefinedType.PROVENANCE) + return "Provenance"; + if (code == FHIRDefinedType.QUESTIONNAIRE) + return "Questionnaire"; + if (code == FHIRDefinedType.QUESTIONNAIRERESPONSE) + return "QuestionnaireResponse"; + if (code == FHIRDefinedType.REFERRALREQUEST) + return "ReferralRequest"; + if (code == FHIRDefinedType.RELATEDPERSON) + return "RelatedPerson"; + if (code == FHIRDefinedType.RESOURCE) + return "Resource"; + if (code == FHIRDefinedType.RISKASSESSMENT) + return "RiskAssessment"; + if (code == FHIRDefinedType.SCHEDULE) + return "Schedule"; + if (code == FHIRDefinedType.SEARCHPARAMETER) + return "SearchParameter"; + if (code == FHIRDefinedType.SLOT) + return "Slot"; + if (code == FHIRDefinedType.SPECIMEN) + return "Specimen"; + if (code == FHIRDefinedType.STRUCTUREDEFINITION) + return "StructureDefinition"; + if (code == FHIRDefinedType.SUBSCRIPTION) + return "Subscription"; + if (code == FHIRDefinedType.SUBSTANCE) + return "Substance"; + if (code == FHIRDefinedType.SUPPLYDELIVERY) + return "SupplyDelivery"; + if (code == FHIRDefinedType.SUPPLYREQUEST) + return "SupplyRequest"; + if (code == FHIRDefinedType.TESTSCRIPT) + return "TestScript"; + if (code == FHIRDefinedType.VALUESET) + return "ValueSet"; + if (code == FHIRDefinedType.VISIONPRESCRIPTION) + return "VisionPrescription"; + return "?"; + } + } + + public enum MessageEvent { + /** + * Change the status of a Medication Administration to show that it is complete. + */ + MEDICATIONADMINISTRATIONCOMPLETE, + /** + * Someone wishes to record that the record of administration of a medication is in error and should be ignored. + */ + MEDICATIONADMINISTRATIONNULLIFICATION, + /** + * Indicates that a medication has been recorded against the patient's record. + */ + MEDICATIONADMINISTRATIONRECORDING, + /** + * Update a Medication Administration record. + */ + MEDICATIONADMINISTRATIONUPDATE, + /** + * Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use. + */ + ADMINNOTIFY, + /** + * Provide a diagnostic report, or update a previously provided diagnostic report. + */ + DIAGNOSTICREPORTPROVIDE, + /** + * Provide a simple observation or update a previously provided simple observation. + */ + OBSERVATIONPROVIDE, + /** + * Notification that two patient records actually identify the same patient. + */ + PATIENTLINK, + /** + * Notification that previous advice that two patient records concern the same patient is now considered incorrect. + */ + PATIENTUNLINK, + /** + * The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message. + */ + VALUESETEXPAND, + /** + * added to help the parsers + */ + NULL; + public static MessageEvent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MedicationAdministration-Complete".equals(codeString)) + return MEDICATIONADMINISTRATIONCOMPLETE; + if ("MedicationAdministration-Nullification".equals(codeString)) + return MEDICATIONADMINISTRATIONNULLIFICATION; + if ("MedicationAdministration-Recording".equals(codeString)) + return MEDICATIONADMINISTRATIONRECORDING; + if ("MedicationAdministration-Update".equals(codeString)) + return MEDICATIONADMINISTRATIONUPDATE; + if ("admin-notify".equals(codeString)) + return ADMINNOTIFY; + if ("diagnosticreport-provide".equals(codeString)) + return DIAGNOSTICREPORTPROVIDE; + if ("observation-provide".equals(codeString)) + return OBSERVATIONPROVIDE; + if ("patient-link".equals(codeString)) + return PATIENTLINK; + if ("patient-unlink".equals(codeString)) + return PATIENTUNLINK; + if ("valueset-expand".equals(codeString)) + return VALUESETEXPAND; + throw new FHIRException("Unknown MessageEvent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete"; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification"; + case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording"; + case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update"; + case ADMINNOTIFY: return "admin-notify"; + case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide"; + case OBSERVATIONPROVIDE: return "observation-provide"; + case PATIENTLINK: return "patient-link"; + case PATIENTUNLINK: return "patient-unlink"; + case VALUESETEXPAND: return "valueset-expand"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "http://hl7.org/fhir/message-events"; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "http://hl7.org/fhir/message-events"; + case MEDICATIONADMINISTRATIONRECORDING: return "http://hl7.org/fhir/message-events"; + case MEDICATIONADMINISTRATIONUPDATE: return "http://hl7.org/fhir/message-events"; + case ADMINNOTIFY: return "http://hl7.org/fhir/message-events"; + case DIAGNOSTICREPORTPROVIDE: return "http://hl7.org/fhir/message-events"; + case OBSERVATIONPROVIDE: return "http://hl7.org/fhir/message-events"; + case PATIENTLINK: return "http://hl7.org/fhir/message-events"; + case PATIENTUNLINK: return "http://hl7.org/fhir/message-events"; + case VALUESETEXPAND: return "http://hl7.org/fhir/message-events"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "Change the status of a Medication Administration to show that it is complete."; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "Someone wishes to record that the record of administration of a medication is in error and should be ignored."; + case MEDICATIONADMINISTRATIONRECORDING: return "Indicates that a medication has been recorded against the patient's record."; + case MEDICATIONADMINISTRATIONUPDATE: return "Update a Medication Administration record."; + case ADMINNOTIFY: return "Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use."; + case DIAGNOSTICREPORTPROVIDE: return "Provide a diagnostic report, or update a previously provided diagnostic report."; + case OBSERVATIONPROVIDE: return "Provide a simple observation or update a previously provided simple observation."; + case PATIENTLINK: return "Notification that two patient records actually identify the same patient."; + case PATIENTUNLINK: return "Notification that previous advice that two patient records concern the same patient is now considered incorrect."; + case VALUESETEXPAND: return "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete"; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification"; + case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording"; + case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update"; + case ADMINNOTIFY: return "admin-notify"; + case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide"; + case OBSERVATIONPROVIDE: return "observation-provide"; + case PATIENTLINK: return "patient-link"; + case PATIENTUNLINK: return "patient-unlink"; + case VALUESETEXPAND: return "valueset-expand"; + default: return "?"; + } + } + } + + public static class MessageEventEnumFactory implements EnumFactory { + public MessageEvent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("MedicationAdministration-Complete".equals(codeString)) + return MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE; + if ("MedicationAdministration-Nullification".equals(codeString)) + return MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION; + if ("MedicationAdministration-Recording".equals(codeString)) + return MessageEvent.MEDICATIONADMINISTRATIONRECORDING; + if ("MedicationAdministration-Update".equals(codeString)) + return MessageEvent.MEDICATIONADMINISTRATIONUPDATE; + if ("admin-notify".equals(codeString)) + return MessageEvent.ADMINNOTIFY; + if ("diagnosticreport-provide".equals(codeString)) + return MessageEvent.DIAGNOSTICREPORTPROVIDE; + if ("observation-provide".equals(codeString)) + return MessageEvent.OBSERVATIONPROVIDE; + if ("patient-link".equals(codeString)) + return MessageEvent.PATIENTLINK; + if ("patient-unlink".equals(codeString)) + return MessageEvent.PATIENTUNLINK; + if ("valueset-expand".equals(codeString)) + return MessageEvent.VALUESETEXPAND; + throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("MedicationAdministration-Complete".equals(codeString)) + return new Enumeration(this, MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE); + if ("MedicationAdministration-Nullification".equals(codeString)) + return new Enumeration(this, MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION); + if ("MedicationAdministration-Recording".equals(codeString)) + return new Enumeration(this, MessageEvent.MEDICATIONADMINISTRATIONRECORDING); + if ("MedicationAdministration-Update".equals(codeString)) + return new Enumeration(this, MessageEvent.MEDICATIONADMINISTRATIONUPDATE); + if ("admin-notify".equals(codeString)) + return new Enumeration(this, MessageEvent.ADMINNOTIFY); + if ("diagnosticreport-provide".equals(codeString)) + return new Enumeration(this, MessageEvent.DIAGNOSTICREPORTPROVIDE); + if ("observation-provide".equals(codeString)) + return new Enumeration(this, MessageEvent.OBSERVATIONPROVIDE); + if ("patient-link".equals(codeString)) + return new Enumeration(this, MessageEvent.PATIENTLINK); + if ("patient-unlink".equals(codeString)) + return new Enumeration(this, MessageEvent.PATIENTUNLINK); + if ("valueset-expand".equals(codeString)) + return new Enumeration(this, MessageEvent.VALUESETEXPAND); + throw new FHIRException("Unknown MessageEvent code '"+codeString+"'"); + } + public String toCode(MessageEvent code) { + if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE) + return "MedicationAdministration-Complete"; + if (code == MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION) + return "MedicationAdministration-Nullification"; + if (code == MessageEvent.MEDICATIONADMINISTRATIONRECORDING) + return "MedicationAdministration-Recording"; + if (code == MessageEvent.MEDICATIONADMINISTRATIONUPDATE) + return "MedicationAdministration-Update"; + if (code == MessageEvent.ADMINNOTIFY) + return "admin-notify"; + if (code == MessageEvent.DIAGNOSTICREPORTPROVIDE) + return "diagnosticreport-provide"; + if (code == MessageEvent.OBSERVATIONPROVIDE) + return "observation-provide"; + if (code == MessageEvent.PATIENTLINK) + return "patient-link"; + if (code == MessageEvent.PATIENTUNLINK) + return "patient-unlink"; + if (code == MessageEvent.VALUESETEXPAND) + return "valueset-expand"; + return "?"; + } + } + + public enum NoteType { + /** + * Display the note. + */ + DISPLAY, + /** + * Print the note on the form. + */ + PRINT, + /** + * Print the note for the operator. + */ + PRINTOPER, + /** + * added to help the parsers + */ + NULL; + public static NoteType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("display".equals(codeString)) + return DISPLAY; + if ("print".equals(codeString)) + return PRINT; + if ("printoper".equals(codeString)) + return PRINTOPER; + throw new FHIRException("Unknown NoteType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DISPLAY: return "display"; + case PRINT: return "print"; + case PRINTOPER: return "printoper"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DISPLAY: return "http://hl7.org/fhir/note-type"; + case PRINT: return "http://hl7.org/fhir/note-type"; + case PRINTOPER: return "http://hl7.org/fhir/note-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DISPLAY: return "Display the note."; + case PRINT: return "Print the note on the form."; + case PRINTOPER: return "Print the note for the operator."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DISPLAY: return "Display"; + case PRINT: return "Print (Form)"; + case PRINTOPER: return "Print (Operator)"; + default: return "?"; + } + } + } + + public static class NoteTypeEnumFactory implements EnumFactory { + public NoteType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("display".equals(codeString)) + return NoteType.DISPLAY; + if ("print".equals(codeString)) + return NoteType.PRINT; + if ("printoper".equals(codeString)) + return NoteType.PRINTOPER; + throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("display".equals(codeString)) + return new Enumeration(this, NoteType.DISPLAY); + if ("print".equals(codeString)) + return new Enumeration(this, NoteType.PRINT); + if ("printoper".equals(codeString)) + return new Enumeration(this, NoteType.PRINTOPER); + throw new FHIRException("Unknown NoteType code '"+codeString+"'"); + } + public String toCode(NoteType code) { + if (code == NoteType.DISPLAY) + return "display"; + if (code == NoteType.PRINT) + return "print"; + if (code == NoteType.PRINTOPER) + return "printoper"; + return "?"; + } + } + + public enum RemittanceOutcome { + /** + * The processing completed without errors. + */ + COMPLETE, + /** + * The processing identified errors. + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static RemittanceOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/remittance-outcome"; + case ERROR: return "http://hl7.org/fhir/remittance-outcome"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The processing completed without errors."; + case ERROR: return "The processing identified errors."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case ERROR: return "Error"; + default: return "?"; + } + } + } + + public static class RemittanceOutcomeEnumFactory implements EnumFactory { + public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return RemittanceOutcome.COMPLETE; + if ("error".equals(codeString)) + return RemittanceOutcome.ERROR; + throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.COMPLETE); + if ("error".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.ERROR); + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode(RemittanceOutcome code) { + if (code == RemittanceOutcome.COMPLETE) + return "complete"; + if (code == RemittanceOutcome.ERROR) + return "error"; + return "?"; + } + } + + public enum ResourceType { + /** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc. + */ + ACCOUNT, + /** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ + ALLERGYINTOLERANCE, + /** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ + APPOINTMENT, + /** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ + APPOINTMENTRESPONSE, + /** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ + AUDITEVENT, + /** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ + BASIC, + /** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ + BINARY, + /** + * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ + BODYSITE, + /** + * A container for a collection of resources. + */ + BUNDLE, + /** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ + CAREPLAN, + /** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ + CLAIM, + /** + * This resource provides the adjudication details from the processing of a Claim resource. + */ + CLAIMRESPONSE, + /** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ + CLINICALIMPRESSION, + /** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ + COMMUNICATION, + /** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ + COMMUNICATIONREQUEST, + /** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ + COMPOSITION, + /** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ + CONCEPTMAP, + /** + * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. + */ + CONDITION, + /** + * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ + CONFORMANCE, + /** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ + CONTRACT, + /** + * Financial instrument which may be used to pay for or reimburse health care products and services. + */ + COVERAGE, + /** + * The formal description of a single piece of information that can be gathered and reported. + */ + DATAELEMENT, + /** + * This resource defines a decision support rule of the form [on Event] if Condition then Action. + */ + DECISIONSUPPORTRULE, + /** + * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + */ + DECISIONSUPPORTSERVICEMODULE, + /** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ + DETECTEDISSUE, + /** + * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ + DEVICE, + /** + * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device. + */ + DEVICECOMPONENT, + /** + * Describes a measurement, calculation or setting capability of a medical device. + */ + DEVICEMETRIC, + /** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ + DEVICEUSEREQUEST, + /** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ + DEVICEUSESTATEMENT, + /** + * A record of a request for a diagnostic investigation service to be performed. + */ + DIAGNOSTICORDER, + /** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ + DIAGNOSTICREPORT, + /** + * A manifest that defines a set of documents. + */ + DOCUMENTMANIFEST, + /** + * A reference to a document . + */ + DOCUMENTREFERENCE, + /** + * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources. + */ + DOMAINRESOURCE, + /** + * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service. + */ + ELIGIBILITYREQUEST, + /** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ + ELIGIBILITYRESPONSE, + /** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ + ENCOUNTER, + /** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ + ENROLLMENTREQUEST, + /** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ + ENROLLMENTRESPONSE, + /** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ + EPISODEOFCARE, + /** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ + EXPANSIONPROFILE, + /** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ + EXPLANATIONOFBENEFIT, + /** + * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. + */ + FAMILYMEMBERHISTORY, + /** + * Prospective warnings of potential issues when providing care to the patient. + */ + FLAG, + /** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ + GOAL, + /** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ + GROUP, + /** + * A guidance request is a request to evaluate a particular knowledge module focused on decision support, providing information relevant to decision support such as workflow and user context. + */ + GUIDANCEREQUEST, + /** + * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + */ + GUIDANCERESPONSE, + /** + * The details of a healthcare service available at a location. + */ + HEALTHCARESERVICE, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGOBJECTSELECTION, + /** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ + IMAGINGSTUDY, + /** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ + IMMUNIZATION, + /** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ + IMMUNIZATIONRECOMMENDATION, + /** + * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. + */ + IMPLEMENTATIONGUIDE, + /** + * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library. + */ + LIBRARY, + /** + * A set of information summarized from a list of other resources. + */ + LIST, + /** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ + LOCATION, + /** + * The Measure resource provides the definition of a quality measure. + */ + MEASURE, + /** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ + MEDIA, + /** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ + MEDICATION, + /** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ + MEDICATIONADMINISTRATION, + /** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ + MEDICATIONDISPENSE, + /** + * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc. + */ + MEDICATIONORDER, + /** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ + MEDICATIONSTATEMENT, + /** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ + MESSAGEHEADER, + /** + * The ModuleDefinition resource defines the data requirements for a quality artifact. + */ + MODULEDEFINITION, + /** + * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ + MODULEMETADATA, + /** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ + NAMINGSYSTEM, + /** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ + NUTRITIONORDER, + /** + * Measurements and simple assertions made about a patient, device or other subject. + */ + OBSERVATION, + /** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ + OPERATIONDEFINITION, + /** + * A collection of error, warning or information messages that result from a system action. + */ + OPERATIONOUTCOME, + /** + * A request to perform an action. + */ + ORDER, + /** + * A response to an order. + */ + ORDERRESPONSE, + /** + * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support. + */ + ORDERSET, + /** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ + ORGANIZATION, + /** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ + PARAMETERS, + /** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ + PATIENT, + /** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ + PAYMENTNOTICE, + /** + * This resource provides payment details and claim references supporting a bulk payment. + */ + PAYMENTRECONCILIATION, + /** + * Demographics and administrative information about a person independent of a specific health-related context. + */ + PERSON, + /** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ + PROCEDURE, + /** + * A request for a procedure to be performed. May be a proposal or an order. + */ + PROCEDUREREQUEST, + /** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ + PROCESSREQUEST, + /** + * This resource provides processing status, errors and notes from the processing of a resource. + */ + PROCESSRESPONSE, + /** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ + PROVENANCE, + /** + * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRE, + /** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRERESPONSE, + /** + * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization. + */ + REFERRALREQUEST, + /** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * --- Abstract Type! ---This is the base resource type for everything. + */ + RESOURCE, + /** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ + RISKASSESSMENT, + /** + * A container for slot(s) of time that may be available for booking appointments. + */ + SCHEDULE, + /** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ + SEARCHPARAMETER, + /** + * A slot of time on a schedule that may be available for booking appointments. + */ + SLOT, + /** + * A sample to be used for analysis. + */ + SPECIMEN, + /** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. + */ + STRUCTUREDEFINITION, + /** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ + SUBSCRIPTION, + /** + * A homogeneous material with a definite composition. + */ + SUBSTANCE, + /** + * Record of delivery of what is supplied. + */ + SUPPLYDELIVERY, + /** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ + SUPPLYREQUEST, + /** + * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ + TESTSCRIPT, + /** + * A value set specifies a set of codes drawn from one or more code systems. + */ + VALUESET, + /** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers + */ + NULL; + public static ResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return AUDITEVENT; + if ("Basic".equals(codeString)) + return BASIC; + if ("Binary".equals(codeString)) + return BINARY; + if ("BodySite".equals(codeString)) + return BODYSITE; + if ("Bundle".equals(codeString)) + return BUNDLE; + if ("CarePlan".equals(codeString)) + return CAREPLAN; + if ("Claim".equals(codeString)) + return CLAIM; + if ("ClaimResponse".equals(codeString)) + return CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return CLINICALIMPRESSION; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("Composition".equals(codeString)) + return COMPOSITION; + if ("ConceptMap".equals(codeString)) + return CONCEPTMAP; + if ("Condition".equals(codeString)) + return CONDITION; + if ("Conformance".equals(codeString)) + return CONFORMANCE; + if ("Contract".equals(codeString)) + return CONTRACT; + if ("Coverage".equals(codeString)) + return COVERAGE; + if ("DataElement".equals(codeString)) + return DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return DETECTEDISSUE; + if ("Device".equals(codeString)) + return DEVICE; + if ("DeviceComponent".equals(codeString)) + return DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FLAG; + if ("Goal".equals(codeString)) + return GOAL; + if ("Group".equals(codeString)) + return GROUP; + if ("GuidanceRequest".equals(codeString)) + return GUIDANCEREQUEST; + if ("GuidanceResponse".equals(codeString)) + return GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return HEALTHCARESERVICE; + if ("ImagingObjectSelection".equals(codeString)) + return IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return LIBRARY; + if ("List".equals(codeString)) + return LIST; + if ("Location".equals(codeString)) + return LOCATION; + if ("Measure".equals(codeString)) + return MEASURE; + if ("Media".equals(codeString)) + return MEDIA; + if ("Medication".equals(codeString)) + return MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return MODULEDEFINITION; + if ("ModuleMetadata".equals(codeString)) + return MODULEMETADATA; + if ("NamingSystem".equals(codeString)) + return NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Observation".equals(codeString)) + return OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return ORDER; + if ("OrderResponse".equals(codeString)) + return ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return ORDERSET; + if ("Organization".equals(codeString)) + return ORGANIZATION; + if ("Parameters".equals(codeString)) + return PARAMETERS; + if ("Patient".equals(codeString)) + return PATIENT; + if ("PaymentNotice".equals(codeString)) + return PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return PERSON; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("Procedure".equals(codeString)) + return PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return PROVENANCE; + if ("Questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("Resource".equals(codeString)) + return RESOURCE; + if ("RiskAssessment".equals(codeString)) + return RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return SCHEDULE; + if ("SearchParameter".equals(codeString)) + return SEARCHPARAMETER; + if ("Slot".equals(codeString)) + return SLOT; + if ("Specimen".equals(codeString)) + return SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return STRUCTUREDEFINITION; + if ("Subscription".equals(codeString)) + return SUBSCRIPTION; + if ("Substance".equals(codeString)) + return SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return SUPPLYREQUEST; + if ("TestScript".equals(codeString)) + return TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return VALUESET; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + throw new FHIRException("Unknown ResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCEREQUEST: return "GuidanceRequest"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case MODULEMETADATA: return "ModuleMetadata"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACCOUNT: return "http://hl7.org/fhir/resource-types"; + case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENT: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case AUDITEVENT: return "http://hl7.org/fhir/resource-types"; + case BASIC: return "http://hl7.org/fhir/resource-types"; + case BINARY: return "http://hl7.org/fhir/resource-types"; + case BODYSITE: return "http://hl7.org/fhir/resource-types"; + case BUNDLE: return "http://hl7.org/fhir/resource-types"; + case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CLAIM: return "http://hl7.org/fhir/resource-types"; + case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; + case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPOSITION: return "http://hl7.org/fhir/resource-types"; + case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; + case CONDITION: return "http://hl7.org/fhir/resource-types"; + case CONFORMANCE: return "http://hl7.org/fhir/resource-types"; + case CONTRACT: return "http://hl7.org/fhir/resource-types"; + case COVERAGE: return "http://hl7.org/fhir/resource-types"; + case DATAELEMENT: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types"; + case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types"; + case DEVICE: return "http://hl7.org/fhir/resource-types"; + case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types"; + case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types"; + case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ENCOUNTER: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; + case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; + case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; + case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; + case FLAG: return "http://hl7.org/fhir/resource-types"; + case GOAL: return "http://hl7.org/fhir/resource-types"; + case GROUP: return "http://hl7.org/fhir/resource-types"; + case GUIDANCEREQUEST: return "http://hl7.org/fhir/resource-types"; + case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; + case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types"; + case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types"; + case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types"; + case LIBRARY: return "http://hl7.org/fhir/resource-types"; + case LIST: return "http://hl7.org/fhir/resource-types"; + case LOCATION: return "http://hl7.org/fhir/resource-types"; + case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEDIA: return "http://hl7.org/fhir/resource-types"; + case MEDICATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; + case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; + case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types"; + case MODULEMETADATA: return "http://hl7.org/fhir/resource-types"; + case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; + case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; + case OBSERVATION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types"; + case ORDER: return "http://hl7.org/fhir/resource-types"; + case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ORDERSET: return "http://hl7.org/fhir/resource-types"; + case ORGANIZATION: return "http://hl7.org/fhir/resource-types"; + case PARAMETERS: return "http://hl7.org/fhir/resource-types"; + case PATIENT: return "http://hl7.org/fhir/resource-types"; + case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types"; + case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; + case PERSON: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PROCEDURE: return "http://hl7.org/fhir/resource-types"; + case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types"; + case PROVENANCE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types"; + case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types"; + case RELATEDPERSON: return "http://hl7.org/fhir/resource-types"; + case RESOURCE: return "http://hl7.org/fhir/resource-types"; + case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types"; + case SCHEDULE: return "http://hl7.org/fhir/resource-types"; + case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types"; + case SLOT: return "http://hl7.org/fhir/resource-types"; + case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; + case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; + case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; + case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; + case VALUESET: return "http://hl7.org/fhir/resource-types"; + case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc."; + case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."; + case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; + case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; + case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."; + case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."; + case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc."; + case BODYSITE: return "Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; + case BUNDLE: return "A container for a collection of resources."; + case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; + case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; + case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; + case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; + case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; + case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; + case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary."; + case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; + case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; + case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services."; + case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported."; + case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action."; + case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule resource describes decision support functionality that is available as a service."; + case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; + case DEVICE: return "This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device."; + case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; + case DEVICEUSEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; + case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."; + case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed."; + case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."; + case DOCUMENTMANIFEST: return "A manifest that defines a set of documents."; + case DOCUMENTREFERENCE: return "A reference to a document ."; + case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources."; + case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service."; + case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource."; + case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient."; + case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage."; + case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; + case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; + case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; + case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; + case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."; + case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; + case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; + case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; + case GUIDANCEREQUEST: return "A guidance request is a request to evaluate a particular knowledge module focused on decision support, providing information relevant to decision support such as workflow and user context."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken."; + case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; + case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; + case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; + case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification."; + case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts."; + case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library."; + case LIST: return "A set of information summarized from a list of other resources."; + case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; + case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; + case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; + case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; + case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; + case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; + case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact."; + case MODULEMETADATA: return "The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; + case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; + case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; + case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; + case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."; + case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action."; + case ORDER: return "A request to perform an action."; + case ORDERRESPONSE: return "A response to an order."; + case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support."; + case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc."; + case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it."; + case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services."; + case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references."; + case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; + case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; + case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; + case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order."; + case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; + case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource."; + case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."; + case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization."; + case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything."; + case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."; + case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments."; + case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource."; + case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; + case SPECIMEN: return "A sample to be used for analysis."; + case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types."; + case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; + case SUBSTANCE: return "A homogeneous material with a definite composition."; + case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; + case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."; + case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; + case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCEREQUEST: return "GuidanceRequest"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case MODULEMETADATA: return "ModuleMetadata"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + } + + public static class ResourceTypeEnumFactory implements EnumFactory { + public ResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return ResourceType.ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return ResourceType.ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return ResourceType.APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return ResourceType.APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return ResourceType.AUDITEVENT; + if ("Basic".equals(codeString)) + return ResourceType.BASIC; + if ("Binary".equals(codeString)) + return ResourceType.BINARY; + if ("BodySite".equals(codeString)) + return ResourceType.BODYSITE; + if ("Bundle".equals(codeString)) + return ResourceType.BUNDLE; + if ("CarePlan".equals(codeString)) + return ResourceType.CAREPLAN; + if ("Claim".equals(codeString)) + return ResourceType.CLAIM; + if ("ClaimResponse".equals(codeString)) + return ResourceType.CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return ResourceType.CLINICALIMPRESSION; + if ("Communication".equals(codeString)) + return ResourceType.COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return ResourceType.COMMUNICATIONREQUEST; + if ("Composition".equals(codeString)) + return ResourceType.COMPOSITION; + if ("ConceptMap".equals(codeString)) + return ResourceType.CONCEPTMAP; + if ("Condition".equals(codeString)) + return ResourceType.CONDITION; + if ("Conformance".equals(codeString)) + return ResourceType.CONFORMANCE; + if ("Contract".equals(codeString)) + return ResourceType.CONTRACT; + if ("Coverage".equals(codeString)) + return ResourceType.COVERAGE; + if ("DataElement".equals(codeString)) + return ResourceType.DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return ResourceType.DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return ResourceType.DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return ResourceType.DETECTEDISSUE; + if ("Device".equals(codeString)) + return ResourceType.DEVICE; + if ("DeviceComponent".equals(codeString)) + return ResourceType.DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return ResourceType.DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return ResourceType.DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return ResourceType.DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return ResourceType.DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return ResourceType.DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return ResourceType.DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return ResourceType.DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return ResourceType.DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ResourceType.ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ResourceType.ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ResourceType.ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return ResourceType.ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ResourceType.ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return ResourceType.EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return ResourceType.EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return ResourceType.EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return ResourceType.FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return ResourceType.FLAG; + if ("Goal".equals(codeString)) + return ResourceType.GOAL; + if ("Group".equals(codeString)) + return ResourceType.GROUP; + if ("GuidanceRequest".equals(codeString)) + return ResourceType.GUIDANCEREQUEST; + if ("GuidanceResponse".equals(codeString)) + return ResourceType.GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return ResourceType.HEALTHCARESERVICE; + if ("ImagingObjectSelection".equals(codeString)) + return ResourceType.IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return ResourceType.IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return ResourceType.IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return ResourceType.IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return ResourceType.IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return ResourceType.LIBRARY; + if ("List".equals(codeString)) + return ResourceType.LIST; + if ("Location".equals(codeString)) + return ResourceType.LOCATION; + if ("Measure".equals(codeString)) + return ResourceType.MEASURE; + if ("Media".equals(codeString)) + return ResourceType.MEDIA; + if ("Medication".equals(codeString)) + return ResourceType.MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return ResourceType.MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return ResourceType.MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return ResourceType.MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return ResourceType.MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return ResourceType.MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return ResourceType.MODULEDEFINITION; + if ("ModuleMetadata".equals(codeString)) + return ResourceType.MODULEMETADATA; + if ("NamingSystem".equals(codeString)) + return ResourceType.NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return ResourceType.NUTRITIONORDER; + if ("Observation".equals(codeString)) + return ResourceType.OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return ResourceType.OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return ResourceType.OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return ResourceType.ORDER; + if ("OrderResponse".equals(codeString)) + return ResourceType.ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return ResourceType.ORDERSET; + if ("Organization".equals(codeString)) + return ResourceType.ORGANIZATION; + if ("Parameters".equals(codeString)) + return ResourceType.PARAMETERS; + if ("Patient".equals(codeString)) + return ResourceType.PATIENT; + if ("PaymentNotice".equals(codeString)) + return ResourceType.PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return ResourceType.PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return ResourceType.PERSON; + if ("Practitioner".equals(codeString)) + return ResourceType.PRACTITIONER; + if ("Procedure".equals(codeString)) + return ResourceType.PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return ResourceType.PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return ResourceType.PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return ResourceType.PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return ResourceType.PROVENANCE; + if ("Questionnaire".equals(codeString)) + return ResourceType.QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return ResourceType.QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return ResourceType.REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return ResourceType.RELATEDPERSON; + if ("Resource".equals(codeString)) + return ResourceType.RESOURCE; + if ("RiskAssessment".equals(codeString)) + return ResourceType.RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return ResourceType.SCHEDULE; + if ("SearchParameter".equals(codeString)) + return ResourceType.SEARCHPARAMETER; + if ("Slot".equals(codeString)) + return ResourceType.SLOT; + if ("Specimen".equals(codeString)) + return ResourceType.SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return ResourceType.STRUCTUREDEFINITION; + if ("Subscription".equals(codeString)) + return ResourceType.SUBSCRIPTION; + if ("Substance".equals(codeString)) + return ResourceType.SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return ResourceType.SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return ResourceType.SUPPLYREQUEST; + if ("TestScript".equals(codeString)) + return ResourceType.TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return ResourceType.VALUESET; + if ("VisionPrescription".equals(codeString)) + return ResourceType.VISIONPRESCRIPTION; + throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return new Enumeration(this, ResourceType.ACCOUNT); + if ("AllergyIntolerance".equals(codeString)) + return new Enumeration(this, ResourceType.ALLERGYINTOLERANCE); + if ("Appointment".equals(codeString)) + return new Enumeration(this, ResourceType.APPOINTMENT); + if ("AppointmentResponse".equals(codeString)) + return new Enumeration(this, ResourceType.APPOINTMENTRESPONSE); + if ("AuditEvent".equals(codeString)) + return new Enumeration(this, ResourceType.AUDITEVENT); + if ("Basic".equals(codeString)) + return new Enumeration(this, ResourceType.BASIC); + if ("Binary".equals(codeString)) + return new Enumeration(this, ResourceType.BINARY); + if ("BodySite".equals(codeString)) + return new Enumeration(this, ResourceType.BODYSITE); + if ("Bundle".equals(codeString)) + return new Enumeration(this, ResourceType.BUNDLE); + if ("CarePlan".equals(codeString)) + return new Enumeration(this, ResourceType.CAREPLAN); + if ("Claim".equals(codeString)) + return new Enumeration(this, ResourceType.CLAIM); + if ("ClaimResponse".equals(codeString)) + return new Enumeration(this, ResourceType.CLAIMRESPONSE); + if ("ClinicalImpression".equals(codeString)) + return new Enumeration(this, ResourceType.CLINICALIMPRESSION); + if ("Communication".equals(codeString)) + return new Enumeration(this, ResourceType.COMMUNICATION); + if ("CommunicationRequest".equals(codeString)) + return new Enumeration(this, ResourceType.COMMUNICATIONREQUEST); + if ("Composition".equals(codeString)) + return new Enumeration(this, ResourceType.COMPOSITION); + if ("ConceptMap".equals(codeString)) + return new Enumeration(this, ResourceType.CONCEPTMAP); + if ("Condition".equals(codeString)) + return new Enumeration(this, ResourceType.CONDITION); + if ("Conformance".equals(codeString)) + return new Enumeration(this, ResourceType.CONFORMANCE); + if ("Contract".equals(codeString)) + return new Enumeration(this, ResourceType.CONTRACT); + if ("Coverage".equals(codeString)) + return new Enumeration(this, ResourceType.COVERAGE); + if ("DataElement".equals(codeString)) + return new Enumeration(this, ResourceType.DATAELEMENT); + if ("DecisionSupportRule".equals(codeString)) + return new Enumeration(this, ResourceType.DECISIONSUPPORTRULE); + if ("DecisionSupportServiceModule".equals(codeString)) + return new Enumeration(this, ResourceType.DECISIONSUPPORTSERVICEMODULE); + if ("DetectedIssue".equals(codeString)) + return new Enumeration(this, ResourceType.DETECTEDISSUE); + if ("Device".equals(codeString)) + return new Enumeration(this, ResourceType.DEVICE); + if ("DeviceComponent".equals(codeString)) + return new Enumeration(this, ResourceType.DEVICECOMPONENT); + if ("DeviceMetric".equals(codeString)) + return new Enumeration(this, ResourceType.DEVICEMETRIC); + if ("DeviceUseRequest".equals(codeString)) + return new Enumeration(this, ResourceType.DEVICEUSEREQUEST); + if ("DeviceUseStatement".equals(codeString)) + return new Enumeration(this, ResourceType.DEVICEUSESTATEMENT); + if ("DiagnosticOrder".equals(codeString)) + return new Enumeration(this, ResourceType.DIAGNOSTICORDER); + if ("DiagnosticReport".equals(codeString)) + return new Enumeration(this, ResourceType.DIAGNOSTICREPORT); + if ("DocumentManifest".equals(codeString)) + return new Enumeration(this, ResourceType.DOCUMENTMANIFEST); + if ("DocumentReference".equals(codeString)) + return new Enumeration(this, ResourceType.DOCUMENTREFERENCE); + if ("DomainResource".equals(codeString)) + return new Enumeration(this, ResourceType.DOMAINRESOURCE); + if ("EligibilityRequest".equals(codeString)) + return new Enumeration(this, ResourceType.ELIGIBILITYREQUEST); + if ("EligibilityResponse".equals(codeString)) + return new Enumeration(this, ResourceType.ELIGIBILITYRESPONSE); + if ("Encounter".equals(codeString)) + return new Enumeration(this, ResourceType.ENCOUNTER); + if ("EnrollmentRequest".equals(codeString)) + return new Enumeration(this, ResourceType.ENROLLMENTREQUEST); + if ("EnrollmentResponse".equals(codeString)) + return new Enumeration(this, ResourceType.ENROLLMENTRESPONSE); + if ("EpisodeOfCare".equals(codeString)) + return new Enumeration(this, ResourceType.EPISODEOFCARE); + if ("ExpansionProfile".equals(codeString)) + return new Enumeration(this, ResourceType.EXPANSIONPROFILE); + if ("ExplanationOfBenefit".equals(codeString)) + return new Enumeration(this, ResourceType.EXPLANATIONOFBENEFIT); + if ("FamilyMemberHistory".equals(codeString)) + return new Enumeration(this, ResourceType.FAMILYMEMBERHISTORY); + if ("Flag".equals(codeString)) + return new Enumeration(this, ResourceType.FLAG); + if ("Goal".equals(codeString)) + return new Enumeration(this, ResourceType.GOAL); + if ("Group".equals(codeString)) + return new Enumeration(this, ResourceType.GROUP); + if ("GuidanceRequest".equals(codeString)) + return new Enumeration(this, ResourceType.GUIDANCEREQUEST); + if ("GuidanceResponse".equals(codeString)) + return new Enumeration(this, ResourceType.GUIDANCERESPONSE); + if ("HealthcareService".equals(codeString)) + return new Enumeration(this, ResourceType.HEALTHCARESERVICE); + if ("ImagingObjectSelection".equals(codeString)) + return new Enumeration(this, ResourceType.IMAGINGOBJECTSELECTION); + if ("ImagingStudy".equals(codeString)) + return new Enumeration(this, ResourceType.IMAGINGSTUDY); + if ("Immunization".equals(codeString)) + return new Enumeration(this, ResourceType.IMMUNIZATION); + if ("ImmunizationRecommendation".equals(codeString)) + return new Enumeration(this, ResourceType.IMMUNIZATIONRECOMMENDATION); + if ("ImplementationGuide".equals(codeString)) + return new Enumeration(this, ResourceType.IMPLEMENTATIONGUIDE); + if ("Library".equals(codeString)) + return new Enumeration(this, ResourceType.LIBRARY); + if ("List".equals(codeString)) + return new Enumeration(this, ResourceType.LIST); + if ("Location".equals(codeString)) + return new Enumeration(this, ResourceType.LOCATION); + if ("Measure".equals(codeString)) + return new Enumeration(this, ResourceType.MEASURE); + if ("Media".equals(codeString)) + return new Enumeration(this, ResourceType.MEDIA); + if ("Medication".equals(codeString)) + return new Enumeration(this, ResourceType.MEDICATION); + if ("MedicationAdministration".equals(codeString)) + return new Enumeration(this, ResourceType.MEDICATIONADMINISTRATION); + if ("MedicationDispense".equals(codeString)) + return new Enumeration(this, ResourceType.MEDICATIONDISPENSE); + if ("MedicationOrder".equals(codeString)) + return new Enumeration(this, ResourceType.MEDICATIONORDER); + if ("MedicationStatement".equals(codeString)) + return new Enumeration(this, ResourceType.MEDICATIONSTATEMENT); + if ("MessageHeader".equals(codeString)) + return new Enumeration(this, ResourceType.MESSAGEHEADER); + if ("ModuleDefinition".equals(codeString)) + return new Enumeration(this, ResourceType.MODULEDEFINITION); + if ("ModuleMetadata".equals(codeString)) + return new Enumeration(this, ResourceType.MODULEMETADATA); + if ("NamingSystem".equals(codeString)) + return new Enumeration(this, ResourceType.NAMINGSYSTEM); + if ("NutritionOrder".equals(codeString)) + return new Enumeration(this, ResourceType.NUTRITIONORDER); + if ("Observation".equals(codeString)) + return new Enumeration(this, ResourceType.OBSERVATION); + if ("OperationDefinition".equals(codeString)) + return new Enumeration(this, ResourceType.OPERATIONDEFINITION); + if ("OperationOutcome".equals(codeString)) + return new Enumeration(this, ResourceType.OPERATIONOUTCOME); + if ("Order".equals(codeString)) + return new Enumeration(this, ResourceType.ORDER); + if ("OrderResponse".equals(codeString)) + return new Enumeration(this, ResourceType.ORDERRESPONSE); + if ("OrderSet".equals(codeString)) + return new Enumeration(this, ResourceType.ORDERSET); + if ("Organization".equals(codeString)) + return new Enumeration(this, ResourceType.ORGANIZATION); + if ("Parameters".equals(codeString)) + return new Enumeration(this, ResourceType.PARAMETERS); + if ("Patient".equals(codeString)) + return new Enumeration(this, ResourceType.PATIENT); + if ("PaymentNotice".equals(codeString)) + return new Enumeration(this, ResourceType.PAYMENTNOTICE); + if ("PaymentReconciliation".equals(codeString)) + return new Enumeration(this, ResourceType.PAYMENTRECONCILIATION); + if ("Person".equals(codeString)) + return new Enumeration(this, ResourceType.PERSON); + if ("Practitioner".equals(codeString)) + return new Enumeration(this, ResourceType.PRACTITIONER); + if ("Procedure".equals(codeString)) + return new Enumeration(this, ResourceType.PROCEDURE); + if ("ProcedureRequest".equals(codeString)) + return new Enumeration(this, ResourceType.PROCEDUREREQUEST); + if ("ProcessRequest".equals(codeString)) + return new Enumeration(this, ResourceType.PROCESSREQUEST); + if ("ProcessResponse".equals(codeString)) + return new Enumeration(this, ResourceType.PROCESSRESPONSE); + if ("Provenance".equals(codeString)) + return new Enumeration(this, ResourceType.PROVENANCE); + if ("Questionnaire".equals(codeString)) + return new Enumeration(this, ResourceType.QUESTIONNAIRE); + if ("QuestionnaireResponse".equals(codeString)) + return new Enumeration(this, ResourceType.QUESTIONNAIRERESPONSE); + if ("ReferralRequest".equals(codeString)) + return new Enumeration(this, ResourceType.REFERRALREQUEST); + if ("RelatedPerson".equals(codeString)) + return new Enumeration(this, ResourceType.RELATEDPERSON); + if ("Resource".equals(codeString)) + return new Enumeration(this, ResourceType.RESOURCE); + if ("RiskAssessment".equals(codeString)) + return new Enumeration(this, ResourceType.RISKASSESSMENT); + if ("Schedule".equals(codeString)) + return new Enumeration(this, ResourceType.SCHEDULE); + if ("SearchParameter".equals(codeString)) + return new Enumeration(this, ResourceType.SEARCHPARAMETER); + if ("Slot".equals(codeString)) + return new Enumeration(this, ResourceType.SLOT); + if ("Specimen".equals(codeString)) + return new Enumeration(this, ResourceType.SPECIMEN); + if ("StructureDefinition".equals(codeString)) + return new Enumeration(this, ResourceType.STRUCTUREDEFINITION); + if ("Subscription".equals(codeString)) + return new Enumeration(this, ResourceType.SUBSCRIPTION); + if ("Substance".equals(codeString)) + return new Enumeration(this, ResourceType.SUBSTANCE); + if ("SupplyDelivery".equals(codeString)) + return new Enumeration(this, ResourceType.SUPPLYDELIVERY); + if ("SupplyRequest".equals(codeString)) + return new Enumeration(this, ResourceType.SUPPLYREQUEST); + if ("TestScript".equals(codeString)) + return new Enumeration(this, ResourceType.TESTSCRIPT); + if ("ValueSet".equals(codeString)) + return new Enumeration(this, ResourceType.VALUESET); + if ("VisionPrescription".equals(codeString)) + return new Enumeration(this, ResourceType.VISIONPRESCRIPTION); + throw new FHIRException("Unknown ResourceType code '"+codeString+"'"); + } + public String toCode(ResourceType code) { + if (code == ResourceType.ACCOUNT) + return "Account"; + if (code == ResourceType.ALLERGYINTOLERANCE) + return "AllergyIntolerance"; + if (code == ResourceType.APPOINTMENT) + return "Appointment"; + if (code == ResourceType.APPOINTMENTRESPONSE) + return "AppointmentResponse"; + if (code == ResourceType.AUDITEVENT) + return "AuditEvent"; + if (code == ResourceType.BASIC) + return "Basic"; + if (code == ResourceType.BINARY) + return "Binary"; + if (code == ResourceType.BODYSITE) + return "BodySite"; + if (code == ResourceType.BUNDLE) + return "Bundle"; + if (code == ResourceType.CAREPLAN) + return "CarePlan"; + if (code == ResourceType.CLAIM) + return "Claim"; + if (code == ResourceType.CLAIMRESPONSE) + return "ClaimResponse"; + if (code == ResourceType.CLINICALIMPRESSION) + return "ClinicalImpression"; + if (code == ResourceType.COMMUNICATION) + return "Communication"; + if (code == ResourceType.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == ResourceType.COMPOSITION) + return "Composition"; + if (code == ResourceType.CONCEPTMAP) + return "ConceptMap"; + if (code == ResourceType.CONDITION) + return "Condition"; + if (code == ResourceType.CONFORMANCE) + return "Conformance"; + if (code == ResourceType.CONTRACT) + return "Contract"; + if (code == ResourceType.COVERAGE) + return "Coverage"; + if (code == ResourceType.DATAELEMENT) + return "DataElement"; + if (code == ResourceType.DECISIONSUPPORTRULE) + return "DecisionSupportRule"; + if (code == ResourceType.DECISIONSUPPORTSERVICEMODULE) + return "DecisionSupportServiceModule"; + if (code == ResourceType.DETECTEDISSUE) + return "DetectedIssue"; + if (code == ResourceType.DEVICE) + return "Device"; + if (code == ResourceType.DEVICECOMPONENT) + return "DeviceComponent"; + if (code == ResourceType.DEVICEMETRIC) + return "DeviceMetric"; + if (code == ResourceType.DEVICEUSEREQUEST) + return "DeviceUseRequest"; + if (code == ResourceType.DEVICEUSESTATEMENT) + return "DeviceUseStatement"; + if (code == ResourceType.DIAGNOSTICORDER) + return "DiagnosticOrder"; + if (code == ResourceType.DIAGNOSTICREPORT) + return "DiagnosticReport"; + if (code == ResourceType.DOCUMENTMANIFEST) + return "DocumentManifest"; + if (code == ResourceType.DOCUMENTREFERENCE) + return "DocumentReference"; + if (code == ResourceType.DOMAINRESOURCE) + return "DomainResource"; + if (code == ResourceType.ELIGIBILITYREQUEST) + return "EligibilityRequest"; + if (code == ResourceType.ELIGIBILITYRESPONSE) + return "EligibilityResponse"; + if (code == ResourceType.ENCOUNTER) + return "Encounter"; + if (code == ResourceType.ENROLLMENTREQUEST) + return "EnrollmentRequest"; + if (code == ResourceType.ENROLLMENTRESPONSE) + return "EnrollmentResponse"; + if (code == ResourceType.EPISODEOFCARE) + return "EpisodeOfCare"; + if (code == ResourceType.EXPANSIONPROFILE) + return "ExpansionProfile"; + if (code == ResourceType.EXPLANATIONOFBENEFIT) + return "ExplanationOfBenefit"; + if (code == ResourceType.FAMILYMEMBERHISTORY) + return "FamilyMemberHistory"; + if (code == ResourceType.FLAG) + return "Flag"; + if (code == ResourceType.GOAL) + return "Goal"; + if (code == ResourceType.GROUP) + return "Group"; + if (code == ResourceType.GUIDANCEREQUEST) + return "GuidanceRequest"; + if (code == ResourceType.GUIDANCERESPONSE) + return "GuidanceResponse"; + if (code == ResourceType.HEALTHCARESERVICE) + return "HealthcareService"; + if (code == ResourceType.IMAGINGOBJECTSELECTION) + return "ImagingObjectSelection"; + if (code == ResourceType.IMAGINGSTUDY) + return "ImagingStudy"; + if (code == ResourceType.IMMUNIZATION) + return "Immunization"; + if (code == ResourceType.IMMUNIZATIONRECOMMENDATION) + return "ImmunizationRecommendation"; + if (code == ResourceType.IMPLEMENTATIONGUIDE) + return "ImplementationGuide"; + if (code == ResourceType.LIBRARY) + return "Library"; + if (code == ResourceType.LIST) + return "List"; + if (code == ResourceType.LOCATION) + return "Location"; + if (code == ResourceType.MEASURE) + return "Measure"; + if (code == ResourceType.MEDIA) + return "Media"; + if (code == ResourceType.MEDICATION) + return "Medication"; + if (code == ResourceType.MEDICATIONADMINISTRATION) + return "MedicationAdministration"; + if (code == ResourceType.MEDICATIONDISPENSE) + return "MedicationDispense"; + if (code == ResourceType.MEDICATIONORDER) + return "MedicationOrder"; + if (code == ResourceType.MEDICATIONSTATEMENT) + return "MedicationStatement"; + if (code == ResourceType.MESSAGEHEADER) + return "MessageHeader"; + if (code == ResourceType.MODULEDEFINITION) + return "ModuleDefinition"; + if (code == ResourceType.MODULEMETADATA) + return "ModuleMetadata"; + if (code == ResourceType.NAMINGSYSTEM) + return "NamingSystem"; + if (code == ResourceType.NUTRITIONORDER) + return "NutritionOrder"; + if (code == ResourceType.OBSERVATION) + return "Observation"; + if (code == ResourceType.OPERATIONDEFINITION) + return "OperationDefinition"; + if (code == ResourceType.OPERATIONOUTCOME) + return "OperationOutcome"; + if (code == ResourceType.ORDER) + return "Order"; + if (code == ResourceType.ORDERRESPONSE) + return "OrderResponse"; + if (code == ResourceType.ORDERSET) + return "OrderSet"; + if (code == ResourceType.ORGANIZATION) + return "Organization"; + if (code == ResourceType.PARAMETERS) + return "Parameters"; + if (code == ResourceType.PATIENT) + return "Patient"; + if (code == ResourceType.PAYMENTNOTICE) + return "PaymentNotice"; + if (code == ResourceType.PAYMENTRECONCILIATION) + return "PaymentReconciliation"; + if (code == ResourceType.PERSON) + return "Person"; + if (code == ResourceType.PRACTITIONER) + return "Practitioner"; + if (code == ResourceType.PROCEDURE) + return "Procedure"; + if (code == ResourceType.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == ResourceType.PROCESSREQUEST) + return "ProcessRequest"; + if (code == ResourceType.PROCESSRESPONSE) + return "ProcessResponse"; + if (code == ResourceType.PROVENANCE) + return "Provenance"; + if (code == ResourceType.QUESTIONNAIRE) + return "Questionnaire"; + if (code == ResourceType.QUESTIONNAIRERESPONSE) + return "QuestionnaireResponse"; + if (code == ResourceType.REFERRALREQUEST) + return "ReferralRequest"; + if (code == ResourceType.RELATEDPERSON) + return "RelatedPerson"; + if (code == ResourceType.RESOURCE) + return "Resource"; + if (code == ResourceType.RISKASSESSMENT) + return "RiskAssessment"; + if (code == ResourceType.SCHEDULE) + return "Schedule"; + if (code == ResourceType.SEARCHPARAMETER) + return "SearchParameter"; + if (code == ResourceType.SLOT) + return "Slot"; + if (code == ResourceType.SPECIMEN) + return "Specimen"; + if (code == ResourceType.STRUCTUREDEFINITION) + return "StructureDefinition"; + if (code == ResourceType.SUBSCRIPTION) + return "Subscription"; + if (code == ResourceType.SUBSTANCE) + return "Substance"; + if (code == ResourceType.SUPPLYDELIVERY) + return "SupplyDelivery"; + if (code == ResourceType.SUPPLYREQUEST) + return "SupplyRequest"; + if (code == ResourceType.TESTSCRIPT) + return "TestScript"; + if (code == ResourceType.VALUESET) + return "ValueSet"; + if (code == ResourceType.VISIONPRESCRIPTION) + return "VisionPrescription"; + return "?"; + } + } + + public enum SearchParamType { + /** + * Search parameter SHALL be a number (a whole number, or a decimal). + */ + NUMBER, + /** + * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported. + */ + DATE, + /** + * Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces. + */ + STRING, + /** + * Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used. + */ + TOKEN, + /** + * A reference to another resource. + */ + REFERENCE, + /** + * A composite search parameter that combines a search on two values together. + */ + COMPOSITE, + /** + * A search parameter that searches on a quantity. + */ + QUANTITY, + /** + * A search parameter that searches on a URI (RFC 3986). + */ + URI, + /** + * added to help the parsers + */ + NULL; + public static SearchParamType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("number".equals(codeString)) + return NUMBER; + if ("date".equals(codeString)) + return DATE; + if ("string".equals(codeString)) + return STRING; + if ("token".equals(codeString)) + return TOKEN; + if ("reference".equals(codeString)) + return REFERENCE; + if ("composite".equals(codeString)) + return COMPOSITE; + if ("quantity".equals(codeString)) + return QUANTITY; + if ("uri".equals(codeString)) + return URI; + throw new FHIRException("Unknown SearchParamType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NUMBER: return "number"; + case DATE: return "date"; + case STRING: return "string"; + case TOKEN: return "token"; + case REFERENCE: return "reference"; + case COMPOSITE: return "composite"; + case QUANTITY: return "quantity"; + case URI: return "uri"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NUMBER: return "http://hl7.org/fhir/search-param-type"; + case DATE: return "http://hl7.org/fhir/search-param-type"; + case STRING: return "http://hl7.org/fhir/search-param-type"; + case TOKEN: return "http://hl7.org/fhir/search-param-type"; + case REFERENCE: return "http://hl7.org/fhir/search-param-type"; + case COMPOSITE: return "http://hl7.org/fhir/search-param-type"; + case QUANTITY: return "http://hl7.org/fhir/search-param-type"; + case URI: return "http://hl7.org/fhir/search-param-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal)."; + case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported."; + case STRING: return "Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces."; + case TOKEN: return "Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a \"|\", depending on the modifier used."; + case REFERENCE: return "A reference to another resource."; + case COMPOSITE: return "A composite search parameter that combines a search on two values together."; + case QUANTITY: return "A search parameter that searches on a quantity."; + case URI: return "A search parameter that searches on a URI (RFC 3986)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NUMBER: return "Number"; + case DATE: return "Date/DateTime"; + case STRING: return "String"; + case TOKEN: return "Token"; + case REFERENCE: return "Reference"; + case COMPOSITE: return "Composite"; + case QUANTITY: return "Quantity"; + case URI: return "URI"; + default: return "?"; + } + } + } + + public static class SearchParamTypeEnumFactory implements EnumFactory { + public SearchParamType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("number".equals(codeString)) + return SearchParamType.NUMBER; + if ("date".equals(codeString)) + return SearchParamType.DATE; + if ("string".equals(codeString)) + return SearchParamType.STRING; + if ("token".equals(codeString)) + return SearchParamType.TOKEN; + if ("reference".equals(codeString)) + return SearchParamType.REFERENCE; + if ("composite".equals(codeString)) + return SearchParamType.COMPOSITE; + if ("quantity".equals(codeString)) + return SearchParamType.QUANTITY; + if ("uri".equals(codeString)) + return SearchParamType.URI; + throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("number".equals(codeString)) + return new Enumeration(this, SearchParamType.NUMBER); + if ("date".equals(codeString)) + return new Enumeration(this, SearchParamType.DATE); + if ("string".equals(codeString)) + return new Enumeration(this, SearchParamType.STRING); + if ("token".equals(codeString)) + return new Enumeration(this, SearchParamType.TOKEN); + if ("reference".equals(codeString)) + return new Enumeration(this, SearchParamType.REFERENCE); + if ("composite".equals(codeString)) + return new Enumeration(this, SearchParamType.COMPOSITE); + if ("quantity".equals(codeString)) + return new Enumeration(this, SearchParamType.QUANTITY); + if ("uri".equals(codeString)) + return new Enumeration(this, SearchParamType.URI); + throw new FHIRException("Unknown SearchParamType code '"+codeString+"'"); + } + public String toCode(SearchParamType code) { + if (code == SearchParamType.NUMBER) + return "number"; + if (code == SearchParamType.DATE) + return "date"; + if (code == SearchParamType.STRING) + return "string"; + if (code == SearchParamType.TOKEN) + return "token"; + if (code == SearchParamType.REFERENCE) + return "reference"; + if (code == SearchParamType.COMPOSITE) + return "composite"; + if (code == SearchParamType.QUANTITY) + return "quantity"; + if (code == SearchParamType.URI) + return "uri"; + return "?"; + } + } + + public enum SpecialValues { + /** + * Boolean true. + */ + TRUE, + /** + * Boolean false. + */ + FALSE, + /** + * The content is greater than zero, but too small to be quantified. + */ + TRACE, + /** + * The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. + */ + SUFFICIENT, + /** + * The value is no longer available. + */ + WITHDRAWN, + /** + * The are no known applicable values in this context. + */ + NILKNOWN, + /** + * added to help the parsers + */ + NULL; + public static SpecialValues fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("true".equals(codeString)) + return TRUE; + if ("false".equals(codeString)) + return FALSE; + if ("trace".equals(codeString)) + return TRACE; + if ("sufficient".equals(codeString)) + return SUFFICIENT; + if ("withdrawn".equals(codeString)) + return WITHDRAWN; + if ("nil-known".equals(codeString)) + return NILKNOWN; + throw new FHIRException("Unknown SpecialValues code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TRUE: return "true"; + case FALSE: return "false"; + case TRACE: return "trace"; + case SUFFICIENT: return "sufficient"; + case WITHDRAWN: return "withdrawn"; + case NILKNOWN: return "nil-known"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case TRUE: return "http://hl7.org/fhir/special-values"; + case FALSE: return "http://hl7.org/fhir/special-values"; + case TRACE: return "http://hl7.org/fhir/special-values"; + case SUFFICIENT: return "http://hl7.org/fhir/special-values"; + case WITHDRAWN: return "http://hl7.org/fhir/special-values"; + case NILKNOWN: return "http://hl7.org/fhir/special-values"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case TRUE: return "Boolean true."; + case FALSE: return "Boolean false."; + case TRACE: return "The content is greater than zero, but too small to be quantified."; + case SUFFICIENT: return "The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material."; + case WITHDRAWN: return "The value is no longer available."; + case NILKNOWN: return "The are no known applicable values in this context."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TRUE: return "true"; + case FALSE: return "false"; + case TRACE: return "Trace Amount Detected"; + case SUFFICIENT: return "Sufficient Quantity"; + case WITHDRAWN: return "Value Withdrawn"; + case NILKNOWN: return "Nil Known"; + default: return "?"; + } + } + } + + public static class SpecialValuesEnumFactory implements EnumFactory { + public SpecialValues fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("true".equals(codeString)) + return SpecialValues.TRUE; + if ("false".equals(codeString)) + return SpecialValues.FALSE; + if ("trace".equals(codeString)) + return SpecialValues.TRACE; + if ("sufficient".equals(codeString)) + return SpecialValues.SUFFICIENT; + if ("withdrawn".equals(codeString)) + return SpecialValues.WITHDRAWN; + if ("nil-known".equals(codeString)) + return SpecialValues.NILKNOWN; + throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("true".equals(codeString)) + return new Enumeration(this, SpecialValues.TRUE); + if ("false".equals(codeString)) + return new Enumeration(this, SpecialValues.FALSE); + if ("trace".equals(codeString)) + return new Enumeration(this, SpecialValues.TRACE); + if ("sufficient".equals(codeString)) + return new Enumeration(this, SpecialValues.SUFFICIENT); + if ("withdrawn".equals(codeString)) + return new Enumeration(this, SpecialValues.WITHDRAWN); + if ("nil-known".equals(codeString)) + return new Enumeration(this, SpecialValues.NILKNOWN); + throw new FHIRException("Unknown SpecialValues code '"+codeString+"'"); + } + public String toCode(SpecialValues code) { + if (code == SpecialValues.TRUE) + return "true"; + if (code == SpecialValues.FALSE) + return "false"; + if (code == SpecialValues.TRACE) + return "trace"; + if (code == SpecialValues.SUFFICIENT) + return "sufficient"; + if (code == SpecialValues.WITHDRAWN) + return "withdrawn"; + if (code == SpecialValues.NILKNOWN) + return "nil-known"; + return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EpisodeOfCare.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EpisodeOfCare.java new file mode 100644 index 00000000000..b3fd44954e8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/EpisodeOfCare.java @@ -0,0 +1,1391 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ +@ResourceDef(name="EpisodeOfCare", profile="http://hl7.org/fhir/Profile/EpisodeOfCare") +public class EpisodeOfCare extends DomainResource { + + public enum EpisodeOfCareStatus { + /** + * This episode of care is planned to start at the date specified in the period.start. During this status an organization may perform assessments to determine if they are eligible to receive services, or be organizing to make resources available to provide care services. + */ + PLANNED, + /** + * This episode has been placed on a waitlist, pending the episode being made active (or cancelled). + */ + WAITLIST, + /** + * This episode of care is current. + */ + ACTIVE, + /** + * This episode of care is on hold, the organization has limited responsibility for the patient (such as while on respite). + */ + ONHOLD, + /** + * This episode of care is finished at the organization is not expecting to be providing care to the patient. Can also be known as "closed", "completed" or other similar terms. + */ + FINISHED, + /** + * The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow. + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static EpisodeOfCareStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("waitlist".equals(codeString)) + return WAITLIST; + if ("active".equals(codeString)) + return ACTIVE; + if ("onhold".equals(codeString)) + return ONHOLD; + if ("finished".equals(codeString)) + return FINISHED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case WAITLIST: return "waitlist"; + case ACTIVE: return "active"; + case ONHOLD: return "onhold"; + case FINISHED: return "finished"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PLANNED: return "http://hl7.org/fhir/episode-of-care-status"; + case WAITLIST: return "http://hl7.org/fhir/episode-of-care-status"; + case ACTIVE: return "http://hl7.org/fhir/episode-of-care-status"; + case ONHOLD: return "http://hl7.org/fhir/episode-of-care-status"; + case FINISHED: return "http://hl7.org/fhir/episode-of-care-status"; + case CANCELLED: return "http://hl7.org/fhir/episode-of-care-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PLANNED: return "This episode of care is planned to start at the date specified in the period.start. During this status an organization may perform assessments to determine if they are eligible to receive services, or be organizing to make resources available to provide care services."; + case WAITLIST: return "This episode has been placed on a waitlist, pending the episode being made active (or cancelled)."; + case ACTIVE: return "This episode of care is current."; + case ONHOLD: return "This episode of care is on hold, the organization has limited responsibility for the patient (such as while on respite)."; + case FINISHED: return "This episode of care is finished at the organization is not expecting to be providing care to the patient. Can also be known as \"closed\", \"completed\" or other similar terms."; + case CANCELLED: return "The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case WAITLIST: return "Waitlist"; + case ACTIVE: return "Active"; + case ONHOLD: return "On Hold"; + case FINISHED: return "Finished"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class EpisodeOfCareStatusEnumFactory implements EnumFactory { + public EpisodeOfCareStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EpisodeOfCareStatus.PLANNED; + if ("waitlist".equals(codeString)) + return EpisodeOfCareStatus.WAITLIST; + if ("active".equals(codeString)) + return EpisodeOfCareStatus.ACTIVE; + if ("onhold".equals(codeString)) + return EpisodeOfCareStatus.ONHOLD; + if ("finished".equals(codeString)) + return EpisodeOfCareStatus.FINISHED; + if ("cancelled".equals(codeString)) + return EpisodeOfCareStatus.CANCELLED; + throw new IllegalArgumentException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.PLANNED); + if ("waitlist".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.WAITLIST); + if ("active".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.ACTIVE); + if ("onhold".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.ONHOLD); + if ("finished".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.FINISHED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, EpisodeOfCareStatus.CANCELLED); + throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); + } + public String toCode(EpisodeOfCareStatus code) { + if (code == EpisodeOfCareStatus.PLANNED) + return "planned"; + if (code == EpisodeOfCareStatus.WAITLIST) + return "waitlist"; + if (code == EpisodeOfCareStatus.ACTIVE) + return "active"; + if (code == EpisodeOfCareStatus.ONHOLD) + return "onhold"; + if (code == EpisodeOfCareStatus.FINISHED) + return "finished"; + if (code == EpisodeOfCareStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + @Block() + public static class EpisodeOfCareStatusHistoryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * planned | waitlist | active | onhold | finished | cancelled. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="planned | waitlist | active | onhold | finished | cancelled", formalDefinition="planned | waitlist | active | onhold | finished | cancelled." ) + protected Enumeration status; + + /** + * The period during this EpisodeOfCare that the specific status applied. + */ + @Child(name = "period", type = {Period.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period for the status", formalDefinition="The period during this EpisodeOfCare that the specific status applied." ) + protected Period period; + + private static final long serialVersionUID = -1192432864L; + + /* + * Constructor + */ + public EpisodeOfCareStatusHistoryComponent() { + super(); + } + + /* + * Constructor + */ + public EpisodeOfCareStatusHistoryComponent(Enumeration status, Period period) { + super(); + this.status = status; + this.period = period; + } + + /** + * @return {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCareStatusHistoryComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EpisodeOfCareStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public EpisodeOfCareStatusHistoryComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return planned | waitlist | active | onhold | finished | cancelled. + */ + public EpisodeOfCareStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value planned | waitlist | active | onhold | finished | cancelled. + */ + public EpisodeOfCareStatusHistoryComponent setStatus(EpisodeOfCareStatus value) { + if (this.status == null) + this.status = new Enumeration(new EpisodeOfCareStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #period} (The period during this EpisodeOfCare that the specific status applied.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCareStatusHistoryComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during this EpisodeOfCare that the specific status applied.) + */ + public EpisodeOfCareStatusHistoryComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("period", "Period", "The period during this EpisodeOfCare that the specific status applied.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = new EpisodeOfCareStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type EpisodeOfCare.status"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public EpisodeOfCareStatusHistoryComponent copy() { + EpisodeOfCareStatusHistoryComponent dst = new EpisodeOfCareStatusHistoryComponent(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EpisodeOfCareStatusHistoryComponent)) + return false; + EpisodeOfCareStatusHistoryComponent o = (EpisodeOfCareStatusHistoryComponent) other; + return compareDeep(status, o.status, true) && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EpisodeOfCareStatusHistoryComponent)) + return false; + EpisodeOfCareStatusHistoryComponent o = (EpisodeOfCareStatusHistoryComponent) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) + ; + } + + public String fhirType() { + return "EpisodeOfCare.statusHistory"; + + } + + } + + @Block() + public static class EpisodeOfCareCareTeamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The role this team member is taking within this episode of care. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Role taken by this team member", formalDefinition="The role this team member is taking within this episode of care." ) + protected List role; + + /** + * The period of time this practitioner is performing some role within the episode of care. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period of time for this role", formalDefinition="The period of time this practitioner is performing some role within the episode of care." ) + protected Period period; + + /** + * The practitioner (or Organization) within the team. + */ + @Child(name = "member", type = {Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The practitioner (or Organization) within the team", formalDefinition="The practitioner (or Organization) within the team." ) + protected Reference member; + + /** + * The actual object that is the target of the reference (The practitioner (or Organization) within the team.) + */ + protected Resource memberTarget; + + private static final long serialVersionUID = -437303089L; + + /* + * Constructor + */ + public EpisodeOfCareCareTeamComponent() { + super(); + } + + /** + * @return {@link #role} (The role this team member is taking within this episode of care.) + */ + public List getRole() { + if (this.role == null) + this.role = new ArrayList(); + return this.role; + } + + public boolean hasRole() { + if (this.role == null) + return false; + for (CodeableConcept item : this.role) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #role} (The role this team member is taking within this episode of care.) + */ + // syntactic sugar + public CodeableConcept addRole() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCareCareTeamComponent addRole(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return this; + } + + /** + * @return {@link #period} (The period of time this practitioner is performing some role within the episode of care.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCareCareTeamComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time this practitioner is performing some role within the episode of care.) + */ + public EpisodeOfCareCareTeamComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #member} (The practitioner (or Organization) within the team.) + */ + public Reference getMember() { + if (this.member == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCareCareTeamComponent.member"); + else if (Configuration.doAutoCreate()) + this.member = new Reference(); // cc + return this.member; + } + + public boolean hasMember() { + return this.member != null && !this.member.isEmpty(); + } + + /** + * @param value {@link #member} (The practitioner (or Organization) within the team.) + */ + public EpisodeOfCareCareTeamComponent setMember(Reference value) { + this.member = value; + return this; + } + + /** + * @return {@link #member} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner (or Organization) within the team.) + */ + public Resource getMemberTarget() { + return this.memberTarget; + } + + /** + * @param value {@link #member} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner (or Organization) within the team.) + */ + public EpisodeOfCareCareTeamComponent setMemberTarget(Resource value) { + this.memberTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "CodeableConcept", "The role this team member is taking within this episode of care.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("period", "Period", "The period of time this practitioner is performing some role within the episode of care.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("member", "Reference(Practitioner|Organization)", "The practitioner (or Organization) within the team.", 0, java.lang.Integer.MAX_VALUE, member)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.getRole().add(castToCodeableConcept(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("member")) + this.member = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + return addRole(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("member")) { + this.member = new Reference(); + return this.member; + } + else + return super.addChild(name); + } + + public EpisodeOfCareCareTeamComponent copy() { + EpisodeOfCareCareTeamComponent dst = new EpisodeOfCareCareTeamComponent(); + copyValues(dst); + if (role != null) { + dst.role = new ArrayList(); + for (CodeableConcept i : role) + dst.role.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.member = member == null ? null : member.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EpisodeOfCareCareTeamComponent)) + return false; + EpisodeOfCareCareTeamComponent o = (EpisodeOfCareCareTeamComponent) other; + return compareDeep(role, o.role, true) && compareDeep(period, o.period, true) && compareDeep(member, o.member, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EpisodeOfCareCareTeamComponent)) + return false; + EpisodeOfCareCareTeamComponent o = (EpisodeOfCareCareTeamComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (role == null || role.isEmpty()) && (period == null || period.isEmpty()) + && (member == null || member.isEmpty()); + } + + public String fhirType() { + return "EpisodeOfCare.careTeam"; + + } + + } + + /** + * Identifier(s) by which this EpisodeOfCare is known. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Identifier(s) for the EpisodeOfCare", formalDefinition="Identifier(s) by which this EpisodeOfCare is known." ) + protected List identifier; + + /** + * planned | waitlist | active | onhold | finished | cancelled. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="planned | waitlist | active | onhold | finished | cancelled", formalDefinition="planned | waitlist | active | onhold | finished | cancelled." ) + protected Enumeration status; + + /** + * The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource). + */ + @Child(name = "statusHistory", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Past list of status codes", formalDefinition="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)." ) + protected List statusHistory; + + /** + * A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type/class - e.g. specialist referral, disease management", formalDefinition="A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care." ) + protected List type; + + /** + * A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for. + */ + @Child(name = "condition", type = {Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Conditions/problems/diagnoses this episode of care is for", formalDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." ) + protected List condition; + /** + * The actual objects that are the target of the reference (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.) + */ + protected List conditionTarget; + + + /** + * The patient that this EpisodeOfCare applies to. + */ + @Child(name = "patient", type = {Patient.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient for this episode of care", formalDefinition="The patient that this EpisodeOfCare applies to." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient that this EpisodeOfCare applies to.) + */ + protected Patient patientTarget; + + /** + * The organization that has assumed the specific responsibilities for the specified duration. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization that assumes care", formalDefinition="The organization that has assumed the specific responsibilities for the specified duration." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The organization that has assumed the specific responsibilities for the specified duration.) + */ + protected Organization managingOrganizationTarget; + + /** + * The interval during which the managing organization assumes the defined responsibility. + */ + @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Interval during responsibility is assumed", formalDefinition="The interval during which the managing organization assumes the defined responsibility." ) + protected Period period; + + /** + * Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals. + */ + @Child(name = "referralRequest", type = {ReferralRequest.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Originating Referral Request(s)", formalDefinition="Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals." ) + protected List referralRequest; + /** + * The actual objects that are the target of the reference (Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.) + */ + protected List referralRequestTarget; + + + /** + * The practitioner that is the care manager/care co-ordinator for this patient. + */ + @Child(name = "careManager", type = {Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Care manager/care co-ordinator for the patient", formalDefinition="The practitioner that is the care manager/care co-ordinator for this patient." ) + protected Reference careManager; + + /** + * The actual object that is the target of the reference (The practitioner that is the care manager/care co-ordinator for this patient.) + */ + protected Practitioner careManagerTarget; + + /** + * The list of practitioners that may be facilitating this episode of care for specific purposes. + */ + @Child(name = "careTeam", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Other practitioners facilitating this episode of care", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." ) + protected List careTeam; + + private static final long serialVersionUID = 1652653406L; + + /* + * Constructor + */ + public EpisodeOfCare() { + super(); + } + + /* + * Constructor + */ + public EpisodeOfCare(Enumeration status, Reference patient) { + super(); + this.status = status; + this.patient = patient; + } + + /** + * @return {@link #identifier} (Identifier(s) by which this EpisodeOfCare is known.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier(s) by which this EpisodeOfCare is known.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EpisodeOfCareStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public EpisodeOfCare setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return planned | waitlist | active | onhold | finished | cancelled. + */ + public EpisodeOfCareStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value planned | waitlist | active | onhold | finished | cancelled. + */ + public EpisodeOfCare setStatus(EpisodeOfCareStatus value) { + if (this.status == null) + this.status = new Enumeration(new EpisodeOfCareStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #statusHistory} (The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).) + */ + public List getStatusHistory() { + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + return this.statusHistory; + } + + public boolean hasStatusHistory() { + if (this.statusHistory == null) + return false; + for (EpisodeOfCareStatusHistoryComponent item : this.statusHistory) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #statusHistory} (The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).) + */ + // syntactic sugar + public EpisodeOfCareStatusHistoryComponent addStatusHistory() { //3 + EpisodeOfCareStatusHistoryComponent t = new EpisodeOfCareStatusHistoryComponent(); + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + this.statusHistory.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addStatusHistory(EpisodeOfCareStatusHistoryComponent t) { //3 + if (t == null) + return this; + if (this.statusHistory == null) + this.statusHistory = new ArrayList(); + this.statusHistory.add(t); + return this; + } + + /** + * @return {@link #type} (A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (Reference item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.) + */ + // syntactic sugar + public Reference addCondition() { //3 + Reference t = new Reference(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addCondition(Reference t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + /** + * @return {@link #condition} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.) + */ + public List getConditionTarget() { + if (this.conditionTarget == null) + this.conditionTarget = new ArrayList(); + return this.conditionTarget; + } + + // syntactic sugar + /** + * @return {@link #condition} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.) + */ + public Condition addConditionTarget() { + Condition r = new Condition(); + if (this.conditionTarget == null) + this.conditionTarget = new ArrayList(); + this.conditionTarget.add(r); + return r; + } + + /** + * @return {@link #patient} (The patient that this EpisodeOfCare applies to.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient that this EpisodeOfCare applies to.) + */ + public EpisodeOfCare setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient that this EpisodeOfCare applies to.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient that this EpisodeOfCare applies to.) + */ + public EpisodeOfCare setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #managingOrganization} (The organization that has assumed the specific responsibilities for the specified duration.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The organization that has assumed the specific responsibilities for the specified duration.) + */ + public EpisodeOfCare setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that has assumed the specific responsibilities for the specified duration.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that has assumed the specific responsibilities for the specified duration.) + */ + public EpisodeOfCare setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #period} (The interval during which the managing organization assumes the defined responsibility.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The interval during which the managing organization assumes the defined responsibility.) + */ + public EpisodeOfCare setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #referralRequest} (Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.) + */ + public List getReferralRequest() { + if (this.referralRequest == null) + this.referralRequest = new ArrayList(); + return this.referralRequest; + } + + public boolean hasReferralRequest() { + if (this.referralRequest == null) + return false; + for (Reference item : this.referralRequest) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #referralRequest} (Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.) + */ + // syntactic sugar + public Reference addReferralRequest() { //3 + Reference t = new Reference(); + if (this.referralRequest == null) + this.referralRequest = new ArrayList(); + this.referralRequest.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addReferralRequest(Reference t) { //3 + if (t == null) + return this; + if (this.referralRequest == null) + this.referralRequest = new ArrayList(); + this.referralRequest.add(t); + return this; + } + + /** + * @return {@link #referralRequest} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.) + */ + public List getReferralRequestTarget() { + if (this.referralRequestTarget == null) + this.referralRequestTarget = new ArrayList(); + return this.referralRequestTarget; + } + + // syntactic sugar + /** + * @return {@link #referralRequest} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.) + */ + public ReferralRequest addReferralRequestTarget() { + ReferralRequest r = new ReferralRequest(); + if (this.referralRequestTarget == null) + this.referralRequestTarget = new ArrayList(); + this.referralRequestTarget.add(r); + return r; + } + + /** + * @return {@link #careManager} (The practitioner that is the care manager/care co-ordinator for this patient.) + */ + public Reference getCareManager() { + if (this.careManager == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.careManager"); + else if (Configuration.doAutoCreate()) + this.careManager = new Reference(); // cc + return this.careManager; + } + + public boolean hasCareManager() { + return this.careManager != null && !this.careManager.isEmpty(); + } + + /** + * @param value {@link #careManager} (The practitioner that is the care manager/care co-ordinator for this patient.) + */ + public EpisodeOfCare setCareManager(Reference value) { + this.careManager = value; + return this; + } + + /** + * @return {@link #careManager} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that is the care manager/care co-ordinator for this patient.) + */ + public Practitioner getCareManagerTarget() { + if (this.careManagerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EpisodeOfCare.careManager"); + else if (Configuration.doAutoCreate()) + this.careManagerTarget = new Practitioner(); // aa + return this.careManagerTarget; + } + + /** + * @param value {@link #careManager} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that is the care manager/care co-ordinator for this patient.) + */ + public EpisodeOfCare setCareManagerTarget(Practitioner value) { + this.careManagerTarget = value; + return this; + } + + /** + * @return {@link #careTeam} (The list of practitioners that may be facilitating this episode of care for specific purposes.) + */ + public List getCareTeam() { + if (this.careTeam == null) + this.careTeam = new ArrayList(); + return this.careTeam; + } + + public boolean hasCareTeam() { + if (this.careTeam == null) + return false; + for (EpisodeOfCareCareTeamComponent item : this.careTeam) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #careTeam} (The list of practitioners that may be facilitating this episode of care for specific purposes.) + */ + // syntactic sugar + public EpisodeOfCareCareTeamComponent addCareTeam() { //3 + EpisodeOfCareCareTeamComponent t = new EpisodeOfCareCareTeamComponent(); + if (this.careTeam == null) + this.careTeam = new ArrayList(); + this.careTeam.add(t); + return t; + } + + // syntactic sugar + public EpisodeOfCare addCareTeam(EpisodeOfCareCareTeamComponent t) { //3 + if (t == null) + return this; + if (this.careTeam == null) + this.careTeam = new ArrayList(); + this.careTeam.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier(s) by which this EpisodeOfCare is known.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("statusHistory", "", "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", 0, java.lang.Integer.MAX_VALUE, statusHistory)); + childrenList.add(new Property("type", "CodeableConcept", "A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("condition", "Reference(Condition)", "A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient that this EpisodeOfCare applies to.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization that has assumed the specific responsibilities for the specified duration.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("period", "Period", "The interval during which the managing organization assumes the defined responsibility.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("referralRequest", "Reference(ReferralRequest)", "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", 0, java.lang.Integer.MAX_VALUE, referralRequest)); + childrenList.add(new Property("careManager", "Reference(Practitioner)", "The practitioner that is the care manager/care co-ordinator for this patient.", 0, java.lang.Integer.MAX_VALUE, careManager)); + childrenList.add(new Property("careTeam", "", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, careTeam)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new EpisodeOfCareStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("statusHistory")) + this.getStatusHistory().add((EpisodeOfCareStatusHistoryComponent) value); + else if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("condition")) + this.getCondition().add(castToReference(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("referralRequest")) + this.getReferralRequest().add(castToReference(value)); + else if (name.equals("careManager")) + this.careManager = castToReference(value); // Reference + else if (name.equals("careTeam")) + this.getCareTeam().add((EpisodeOfCareCareTeamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type EpisodeOfCare.status"); + } + else if (name.equals("statusHistory")) { + return addStatusHistory(); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("condition")) { + return addCondition(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("referralRequest")) { + return addReferralRequest(); + } + else if (name.equals("careManager")) { + this.careManager = new Reference(); + return this.careManager; + } + else if (name.equals("careTeam")) { + return addCareTeam(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "EpisodeOfCare"; + + } + + public EpisodeOfCare copy() { + EpisodeOfCare dst = new EpisodeOfCare(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + if (statusHistory != null) { + dst.statusHistory = new ArrayList(); + for (EpisodeOfCareStatusHistoryComponent i : statusHistory) + dst.statusHistory.add(i.copy()); + }; + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + if (condition != null) { + dst.condition = new ArrayList(); + for (Reference i : condition) + dst.condition.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.period = period == null ? null : period.copy(); + if (referralRequest != null) { + dst.referralRequest = new ArrayList(); + for (Reference i : referralRequest) + dst.referralRequest.add(i.copy()); + }; + dst.careManager = careManager == null ? null : careManager.copy(); + if (careTeam != null) { + dst.careTeam = new ArrayList(); + for (EpisodeOfCareCareTeamComponent i : careTeam) + dst.careTeam.add(i.copy()); + }; + return dst; + } + + protected EpisodeOfCare typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof EpisodeOfCare)) + return false; + EpisodeOfCare o = (EpisodeOfCare) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusHistory, o.statusHistory, true) + && compareDeep(type, o.type, true) && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) + && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(period, o.period, true) + && compareDeep(referralRequest, o.referralRequest, true) && compareDeep(careManager, o.careManager, true) + && compareDeep(careTeam, o.careTeam, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof EpisodeOfCare)) + return false; + EpisodeOfCare o = (EpisodeOfCare) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (statusHistory == null || statusHistory.isEmpty()) && (type == null || type.isEmpty()) + && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) + && (period == null || period.isEmpty()) && (referralRequest == null || referralRequest.isEmpty()) + && (careManager == null || careManager.isEmpty()) && (careTeam == null || careTeam.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.EpisodeOfCare; + } + + @SearchParamDefinition(name="date", path="EpisodeOfCare.period", description="The provided date search value falls within the episode of care's period", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="EpisodeOfCare.identifier", description="Identifier(s) for the EpisodeOfCare", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="Conditions/problems/diagnoses this episode of care is for", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="incomingreferral", path="EpisodeOfCare.referralRequest", description="Incoming Referral Request", type="reference" ) + public static final String SP_INCOMINGREFERRAL = "incomingreferral"; + @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="Patient for this episode of care", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities of this EpisodeOfCare", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="team-member", path="EpisodeOfCare.careTeam.member", description="A Practitioner or Organization allocated to the care team for this EpisodeOfCare", type="reference" ) + public static final String SP_TEAMMEMBER = "team-member"; + @SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Type/class - e.g. specialist referral, disease management", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="Care manager/care co-ordinator for the patient", type="reference" ) + public static final String SP_CAREMANAGER = "care-manager"; + @SearchParamDefinition(name="status", path="EpisodeOfCare.status", description="The current status of the Episode of Care as provided (does not check the status history collection)", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpansionProfile.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpansionProfile.java new file mode 100644 index 00000000000..1234ca1497c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpansionProfile.java @@ -0,0 +1,2940 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ +@ResourceDef(name="ExpansionProfile", profile="http://hl7.org/fhir/Profile/ExpansionProfile") +public class ExpansionProfile extends DomainResource { + + @Block() + public static class ExpansionProfileContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the expansion profile. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the expansion profile." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public ExpansionProfileContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExpansionProfileContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the expansion profile. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the expansion profile. + */ + public ExpansionProfileContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfileContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the expansion profile.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ExpansionProfileContactComponent copy() { + ExpansionProfileContactComponent dst = new ExpansionProfileContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileContactComponent)) + return false; + ExpansionProfileContactComponent o = (ExpansionProfileContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileContactComponent)) + return false; + ExpansionProfileContactComponent o = (ExpansionProfileContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.contact"; + + } + + } + + @Block() + public static class ExpansionProfileCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code systems to be included in value set expansions. + */ + @Child(name = "include", type = {}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code systems to be included", formalDefinition="Code systems to be included in value set expansions." ) + protected ExpansionProfileCodeSystemIncludeComponent include; + + /** + * Code systems to be excluded from value set expansions. + */ + @Child(name = "exclude", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code systems to be excluded", formalDefinition="Code systems to be excluded from value set expansions." ) + protected ExpansionProfileCodeSystemExcludeComponent exclude; + + private static final long serialVersionUID = 141288544L; + + /* + * Constructor + */ + public ExpansionProfileCodeSystemComponent() { + super(); + } + + /** + * @return {@link #include} (Code systems to be included in value set expansions.) + */ + public ExpansionProfileCodeSystemIncludeComponent getInclude() { + if (this.include == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemComponent.include"); + else if (Configuration.doAutoCreate()) + this.include = new ExpansionProfileCodeSystemIncludeComponent(); // cc + return this.include; + } + + public boolean hasInclude() { + return this.include != null && !this.include.isEmpty(); + } + + /** + * @param value {@link #include} (Code systems to be included in value set expansions.) + */ + public ExpansionProfileCodeSystemComponent setInclude(ExpansionProfileCodeSystemIncludeComponent value) { + this.include = value; + return this; + } + + /** + * @return {@link #exclude} (Code systems to be excluded from value set expansions.) + */ + public ExpansionProfileCodeSystemExcludeComponent getExclude() { + if (this.exclude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemComponent.exclude"); + else if (Configuration.doAutoCreate()) + this.exclude = new ExpansionProfileCodeSystemExcludeComponent(); // cc + return this.exclude; + } + + public boolean hasExclude() { + return this.exclude != null && !this.exclude.isEmpty(); + } + + /** + * @param value {@link #exclude} (Code systems to be excluded from value set expansions.) + */ + public ExpansionProfileCodeSystemComponent setExclude(ExpansionProfileCodeSystemExcludeComponent value) { + this.exclude = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("include", "", "Code systems to be included in value set expansions.", 0, java.lang.Integer.MAX_VALUE, include)); + childrenList.add(new Property("exclude", "", "Code systems to be excluded from value set expansions.", 0, java.lang.Integer.MAX_VALUE, exclude)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("include")) + this.include = (ExpansionProfileCodeSystemIncludeComponent) value; // ExpansionProfileCodeSystemIncludeComponent + else if (name.equals("exclude")) + this.exclude = (ExpansionProfileCodeSystemExcludeComponent) value; // ExpansionProfileCodeSystemExcludeComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("include")) { + this.include = new ExpansionProfileCodeSystemIncludeComponent(); + return this.include; + } + else if (name.equals("exclude")) { + this.exclude = new ExpansionProfileCodeSystemExcludeComponent(); + return this.exclude; + } + else + return super.addChild(name); + } + + public ExpansionProfileCodeSystemComponent copy() { + ExpansionProfileCodeSystemComponent dst = new ExpansionProfileCodeSystemComponent(); + copyValues(dst); + dst.include = include == null ? null : include.copy(); + dst.exclude = exclude == null ? null : exclude.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemComponent o = (ExpansionProfileCodeSystemComponent) other; + return compareDeep(include, o.include, true) && compareDeep(exclude, o.exclude, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemComponent o = (ExpansionProfileCodeSystemComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.codeSystem"; + + } + + } + + @Block() + public static class ExpansionProfileCodeSystemIncludeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A data group for each code system to be included. + */ + @Child(name = "codeSystem", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The code systems to be included", formalDefinition="A data group for each code system to be included." ) + protected List codeSystem; + + private static final long serialVersionUID = -676240849L; + + /* + * Constructor + */ + public ExpansionProfileCodeSystemIncludeComponent() { + super(); + } + + /** + * @return {@link #codeSystem} (A data group for each code system to be included.) + */ + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (ExpansionProfileCodeSystemIncludeCodeSystemComponent item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeSystem} (A data group for each code system to be included.) + */ + // syntactic sugar + public ExpansionProfileCodeSystemIncludeCodeSystemComponent addCodeSystem() { //3 + ExpansionProfileCodeSystemIncludeCodeSystemComponent t = new ExpansionProfileCodeSystemIncludeCodeSystemComponent(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfileCodeSystemIncludeComponent addCodeSystem(ExpansionProfileCodeSystemIncludeCodeSystemComponent t) { //3 + if (t == null) + return this; + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("codeSystem", "", "A data group for each code system to be included.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("codeSystem")) + this.getCodeSystem().add((ExpansionProfileCodeSystemIncludeCodeSystemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("codeSystem")) { + return addCodeSystem(); + } + else + return super.addChild(name); + } + + public ExpansionProfileCodeSystemIncludeComponent copy() { + ExpansionProfileCodeSystemIncludeComponent dst = new ExpansionProfileCodeSystemIncludeComponent(); + copyValues(dst); + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (ExpansionProfileCodeSystemIncludeCodeSystemComponent i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemIncludeComponent)) + return false; + ExpansionProfileCodeSystemIncludeComponent o = (ExpansionProfileCodeSystemIncludeComponent) other; + return compareDeep(codeSystem, o.codeSystem, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemIncludeComponent)) + return false; + ExpansionProfileCodeSystemIncludeComponent o = (ExpansionProfileCodeSystemIncludeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()); + } + + public String fhirType() { + return "ExpansionProfile.codeSystem.include"; + + } + + } + + @Block() + public static class ExpansionProfileCodeSystemIncludeCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI which is the code system to be included. + */ + @Child(name = "system", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The specific code system to be included", formalDefinition="An absolute URI which is the code system to be included." ) + protected UriType system; + + /** + * The version of the code system from which codes in the expansion should be included. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific version of the code system referred to", formalDefinition="The version of the code system from which codes in the expansion should be included." ) + protected StringType version; + + private static final long serialVersionUID = 1145288774L; + + /* + * Constructor + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent() { + super(); + } + + /* + * Constructor + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent(UriType system) { + super(); + this.system = system; + } + + /** + * @return {@link #system} (An absolute URI which is the code system to be included.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemIncludeCodeSystemComponent.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (An absolute URI which is the code system to be included.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return An absolute URI which is the code system to be included. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value An absolute URI which is the code system to be included. + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent setSystem(String value) { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of the code system from which codes in the expansion should be included.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemIncludeCodeSystemComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the code system from which codes in the expansion should be included.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the code system from which codes in the expansion should be included. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the code system from which codes in the expansion should be included. + */ + public ExpansionProfileCodeSystemIncludeCodeSystemComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "An absolute URI which is the code system to be included.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be included.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.version"); + } + else + return super.addChild(name); + } + + public ExpansionProfileCodeSystemIncludeCodeSystemComponent copy() { + ExpansionProfileCodeSystemIncludeCodeSystemComponent dst = new ExpansionProfileCodeSystemIncludeCodeSystemComponent(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemIncludeCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemIncludeCodeSystemComponent o = (ExpansionProfileCodeSystemIncludeCodeSystemComponent) other; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemIncludeCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemIncludeCodeSystemComponent o = (ExpansionProfileCodeSystemIncludeCodeSystemComponent) other; + return compareValues(system, o.system, true) && compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.codeSystem.include.codeSystem"; + + } + + } + + @Block() + public static class ExpansionProfileCodeSystemExcludeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A data group for each code system to be excluded. + */ + @Child(name = "codeSystem", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The code systems to be excluded", formalDefinition="A data group for each code system to be excluded." ) + protected List codeSystem; + + private static final long serialVersionUID = 207363809L; + + /* + * Constructor + */ + public ExpansionProfileCodeSystemExcludeComponent() { + super(); + } + + /** + * @return {@link #codeSystem} (A data group for each code system to be excluded.) + */ + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (ExpansionProfileCodeSystemExcludeCodeSystemComponent item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeSystem} (A data group for each code system to be excluded.) + */ + // syntactic sugar + public ExpansionProfileCodeSystemExcludeCodeSystemComponent addCodeSystem() { //3 + ExpansionProfileCodeSystemExcludeCodeSystemComponent t = new ExpansionProfileCodeSystemExcludeCodeSystemComponent(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfileCodeSystemExcludeComponent addCodeSystem(ExpansionProfileCodeSystemExcludeCodeSystemComponent t) { //3 + if (t == null) + return this; + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("codeSystem", "", "A data group for each code system to be excluded.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("codeSystem")) + this.getCodeSystem().add((ExpansionProfileCodeSystemExcludeCodeSystemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("codeSystem")) { + return addCodeSystem(); + } + else + return super.addChild(name); + } + + public ExpansionProfileCodeSystemExcludeComponent copy() { + ExpansionProfileCodeSystemExcludeComponent dst = new ExpansionProfileCodeSystemExcludeComponent(); + copyValues(dst); + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (ExpansionProfileCodeSystemExcludeCodeSystemComponent i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemExcludeComponent)) + return false; + ExpansionProfileCodeSystemExcludeComponent o = (ExpansionProfileCodeSystemExcludeComponent) other; + return compareDeep(codeSystem, o.codeSystem, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemExcludeComponent)) + return false; + ExpansionProfileCodeSystemExcludeComponent o = (ExpansionProfileCodeSystemExcludeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()); + } + + public String fhirType() { + return "ExpansionProfile.codeSystem.exclude"; + + } + + } + + @Block() + public static class ExpansionProfileCodeSystemExcludeCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI which is the code system to be excluded. + */ + @Child(name = "system", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The specific code system to be excluded", formalDefinition="An absolute URI which is the code system to be excluded." ) + protected UriType system; + + /** + * The version of the code system from which codes in the expansion should be excluded. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific version of the code system referred to", formalDefinition="The version of the code system from which codes in the expansion should be excluded." ) + protected StringType version; + + private static final long serialVersionUID = 1145288774L; + + /* + * Constructor + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent() { + super(); + } + + /* + * Constructor + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent(UriType system) { + super(); + this.system = system; + } + + /** + * @return {@link #system} (An absolute URI which is the code system to be excluded.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemExcludeCodeSystemComponent.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (An absolute URI which is the code system to be excluded.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return An absolute URI which is the code system to be excluded. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value An absolute URI which is the code system to be excluded. + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent setSystem(String value) { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of the code system from which codes in the expansion should be excluded.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileCodeSystemExcludeCodeSystemComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the code system from which codes in the expansion should be excluded.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the code system from which codes in the expansion should be excluded. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the code system from which codes in the expansion should be excluded. + */ + public ExpansionProfileCodeSystemExcludeCodeSystemComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "An absolute URI which is the code system to be excluded.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be excluded.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.version"); + } + else + return super.addChild(name); + } + + public ExpansionProfileCodeSystemExcludeCodeSystemComponent copy() { + ExpansionProfileCodeSystemExcludeCodeSystemComponent dst = new ExpansionProfileCodeSystemExcludeCodeSystemComponent(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemExcludeCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemExcludeCodeSystemComponent o = (ExpansionProfileCodeSystemExcludeCodeSystemComponent) other; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileCodeSystemExcludeCodeSystemComponent)) + return false; + ExpansionProfileCodeSystemExcludeCodeSystemComponent o = (ExpansionProfileCodeSystemExcludeCodeSystemComponent) other; + return compareValues(system, o.system, true) && compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.codeSystem.exclude.codeSystem"; + + } + + } + + @Block() + public static class ExpansionProfileDesignationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Designations to be included. + */ + @Child(name = "include", type = {}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Designations to be included", formalDefinition="Designations to be included." ) + protected ExpansionProfileDesignationIncludeComponent include; + + /** + * Designations to be excluded. + */ + @Child(name = "exclude", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Designations to be excluded", formalDefinition="Designations to be excluded." ) + protected ExpansionProfileDesignationExcludeComponent exclude; + + private static final long serialVersionUID = -1075298816L; + + /* + * Constructor + */ + public ExpansionProfileDesignationComponent() { + super(); + } + + /** + * @return {@link #include} (Designations to be included.) + */ + public ExpansionProfileDesignationIncludeComponent getInclude() { + if (this.include == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationComponent.include"); + else if (Configuration.doAutoCreate()) + this.include = new ExpansionProfileDesignationIncludeComponent(); // cc + return this.include; + } + + public boolean hasInclude() { + return this.include != null && !this.include.isEmpty(); + } + + /** + * @param value {@link #include} (Designations to be included.) + */ + public ExpansionProfileDesignationComponent setInclude(ExpansionProfileDesignationIncludeComponent value) { + this.include = value; + return this; + } + + /** + * @return {@link #exclude} (Designations to be excluded.) + */ + public ExpansionProfileDesignationExcludeComponent getExclude() { + if (this.exclude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationComponent.exclude"); + else if (Configuration.doAutoCreate()) + this.exclude = new ExpansionProfileDesignationExcludeComponent(); // cc + return this.exclude; + } + + public boolean hasExclude() { + return this.exclude != null && !this.exclude.isEmpty(); + } + + /** + * @param value {@link #exclude} (Designations to be excluded.) + */ + public ExpansionProfileDesignationComponent setExclude(ExpansionProfileDesignationExcludeComponent value) { + this.exclude = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("include", "", "Designations to be included.", 0, java.lang.Integer.MAX_VALUE, include)); + childrenList.add(new Property("exclude", "", "Designations to be excluded.", 0, java.lang.Integer.MAX_VALUE, exclude)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("include")) + this.include = (ExpansionProfileDesignationIncludeComponent) value; // ExpansionProfileDesignationIncludeComponent + else if (name.equals("exclude")) + this.exclude = (ExpansionProfileDesignationExcludeComponent) value; // ExpansionProfileDesignationExcludeComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("include")) { + this.include = new ExpansionProfileDesignationIncludeComponent(); + return this.include; + } + else if (name.equals("exclude")) { + this.exclude = new ExpansionProfileDesignationExcludeComponent(); + return this.exclude; + } + else + return super.addChild(name); + } + + public ExpansionProfileDesignationComponent copy() { + ExpansionProfileDesignationComponent dst = new ExpansionProfileDesignationComponent(); + copyValues(dst); + dst.include = include == null ? null : include.copy(); + dst.exclude = exclude == null ? null : exclude.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationComponent)) + return false; + ExpansionProfileDesignationComponent o = (ExpansionProfileDesignationComponent) other; + return compareDeep(include, o.include, true) && compareDeep(exclude, o.exclude, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationComponent)) + return false; + ExpansionProfileDesignationComponent o = (ExpansionProfileDesignationComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.designation"; + + } + + } + + @Block() + public static class ExpansionProfileDesignationIncludeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A data group for each designation to be included. + */ + @Child(name = "designation", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The designation to be included", formalDefinition="A data group for each designation to be included." ) + protected List designation; + + private static final long serialVersionUID = 999939824L; + + /* + * Constructor + */ + public ExpansionProfileDesignationIncludeComponent() { + super(); + } + + /** + * @return {@link #designation} (A data group for each designation to be included.) + */ + public List getDesignation() { + if (this.designation == null) + this.designation = new ArrayList(); + return this.designation; + } + + public boolean hasDesignation() { + if (this.designation == null) + return false; + for (ExpansionProfileDesignationIncludeDesignationComponent item : this.designation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #designation} (A data group for each designation to be included.) + */ + // syntactic sugar + public ExpansionProfileDesignationIncludeDesignationComponent addDesignation() { //3 + ExpansionProfileDesignationIncludeDesignationComponent t = new ExpansionProfileDesignationIncludeDesignationComponent(); + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfileDesignationIncludeComponent addDesignation(ExpansionProfileDesignationIncludeDesignationComponent t) { //3 + if (t == null) + return this; + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("designation", "", "A data group for each designation to be included.", 0, java.lang.Integer.MAX_VALUE, designation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("designation")) + this.getDesignation().add((ExpansionProfileDesignationIncludeDesignationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("designation")) { + return addDesignation(); + } + else + return super.addChild(name); + } + + public ExpansionProfileDesignationIncludeComponent copy() { + ExpansionProfileDesignationIncludeComponent dst = new ExpansionProfileDesignationIncludeComponent(); + copyValues(dst); + if (designation != null) { + dst.designation = new ArrayList(); + for (ExpansionProfileDesignationIncludeDesignationComponent i : designation) + dst.designation.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationIncludeComponent)) + return false; + ExpansionProfileDesignationIncludeComponent o = (ExpansionProfileDesignationIncludeComponent) other; + return compareDeep(designation, o.designation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationIncludeComponent)) + return false; + ExpansionProfileDesignationIncludeComponent o = (ExpansionProfileDesignationIncludeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (designation == null || designation.isEmpty()); + } + + public String fhirType() { + return "ExpansionProfile.designation.include"; + + } + + } + + @Block() + public static class ExpansionProfileDesignationIncludeDesignationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The language this designation is defined for. + */ + @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language of the designation to be included", formalDefinition="The language this designation is defined for." ) + protected CodeType language; + + /** + * Designation uses for inclusion in the expansion. + */ + @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Designation use", formalDefinition="Designation uses for inclusion in the expansion." ) + protected Coding use; + + private static final long serialVersionUID = 242239292L; + + /* + * Constructor + */ + public ExpansionProfileDesignationIncludeDesignationComponent() { + super(); + } + + /** + * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationIncludeDesignationComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public ExpansionProfileDesignationIncludeDesignationComponent setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The language this designation is defined for. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The language this designation is defined for. + */ + public ExpansionProfileDesignationIncludeDesignationComponent setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (Designation uses for inclusion in the expansion.) + */ + public Coding getUse() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationIncludeDesignationComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Coding(); // cc + return this.use; + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Designation uses for inclusion in the expansion.) + */ + public ExpansionProfileDesignationIncludeDesignationComponent setUse(Coding value) { + this.use = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("language", "code", "The language this designation is defined for.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("use", "Coding", "Designation uses for inclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.language"); + } + else if (name.equals("use")) { + this.use = new Coding(); + return this.use; + } + else + return super.addChild(name); + } + + public ExpansionProfileDesignationIncludeDesignationComponent copy() { + ExpansionProfileDesignationIncludeDesignationComponent dst = new ExpansionProfileDesignationIncludeDesignationComponent(); + copyValues(dst); + dst.language = language == null ? null : language.copy(); + dst.use = use == null ? null : use.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationIncludeDesignationComponent)) + return false; + ExpansionProfileDesignationIncludeDesignationComponent o = (ExpansionProfileDesignationIncludeDesignationComponent) other; + return compareDeep(language, o.language, true) && compareDeep(use, o.use, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationIncludeDesignationComponent)) + return false; + ExpansionProfileDesignationIncludeDesignationComponent o = (ExpansionProfileDesignationIncludeDesignationComponent) other; + return compareValues(language, o.language, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.designation.include.designation"; + + } + + } + + @Block() + public static class ExpansionProfileDesignationExcludeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A data group for each designation to be excluded. + */ + @Child(name = "designation", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The designation to be excluded", formalDefinition="A data group for each designation to be excluded." ) + protected List designation; + + private static final long serialVersionUID = -259508446L; + + /* + * Constructor + */ + public ExpansionProfileDesignationExcludeComponent() { + super(); + } + + /** + * @return {@link #designation} (A data group for each designation to be excluded.) + */ + public List getDesignation() { + if (this.designation == null) + this.designation = new ArrayList(); + return this.designation; + } + + public boolean hasDesignation() { + if (this.designation == null) + return false; + for (ExpansionProfileDesignationExcludeDesignationComponent item : this.designation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #designation} (A data group for each designation to be excluded.) + */ + // syntactic sugar + public ExpansionProfileDesignationExcludeDesignationComponent addDesignation() { //3 + ExpansionProfileDesignationExcludeDesignationComponent t = new ExpansionProfileDesignationExcludeDesignationComponent(); + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfileDesignationExcludeComponent addDesignation(ExpansionProfileDesignationExcludeDesignationComponent t) { //3 + if (t == null) + return this; + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("designation", "", "A data group for each designation to be excluded.", 0, java.lang.Integer.MAX_VALUE, designation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("designation")) + this.getDesignation().add((ExpansionProfileDesignationExcludeDesignationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("designation")) { + return addDesignation(); + } + else + return super.addChild(name); + } + + public ExpansionProfileDesignationExcludeComponent copy() { + ExpansionProfileDesignationExcludeComponent dst = new ExpansionProfileDesignationExcludeComponent(); + copyValues(dst); + if (designation != null) { + dst.designation = new ArrayList(); + for (ExpansionProfileDesignationExcludeDesignationComponent i : designation) + dst.designation.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationExcludeComponent)) + return false; + ExpansionProfileDesignationExcludeComponent o = (ExpansionProfileDesignationExcludeComponent) other; + return compareDeep(designation, o.designation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationExcludeComponent)) + return false; + ExpansionProfileDesignationExcludeComponent o = (ExpansionProfileDesignationExcludeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (designation == null || designation.isEmpty()); + } + + public String fhirType() { + return "ExpansionProfile.designation.exclude"; + + } + + } + + @Block() + public static class ExpansionProfileDesignationExcludeDesignationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The language this designation is defined for. + */ + @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language of the designation to be excluded", formalDefinition="The language this designation is defined for." ) + protected CodeType language; + + /** + * Designation uses for exclusion in the expansion. + */ + @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Designation use", formalDefinition="Designation uses for exclusion in the expansion." ) + protected Coding use; + + private static final long serialVersionUID = 242239292L; + + /* + * Constructor + */ + public ExpansionProfileDesignationExcludeDesignationComponent() { + super(); + } + + /** + * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationExcludeDesignationComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public ExpansionProfileDesignationExcludeDesignationComponent setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The language this designation is defined for. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The language this designation is defined for. + */ + public ExpansionProfileDesignationExcludeDesignationComponent setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (Designation uses for exclusion in the expansion.) + */ + public Coding getUse() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfileDesignationExcludeDesignationComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Coding(); // cc + return this.use; + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Designation uses for exclusion in the expansion.) + */ + public ExpansionProfileDesignationExcludeDesignationComponent setUse(Coding value) { + this.use = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("language", "code", "The language this designation is defined for.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("use", "Coding", "Designation uses for exclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.language"); + } + else if (name.equals("use")) { + this.use = new Coding(); + return this.use; + } + else + return super.addChild(name); + } + + public ExpansionProfileDesignationExcludeDesignationComponent copy() { + ExpansionProfileDesignationExcludeDesignationComponent dst = new ExpansionProfileDesignationExcludeDesignationComponent(); + copyValues(dst); + dst.language = language == null ? null : language.copy(); + dst.use = use == null ? null : use.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationExcludeDesignationComponent)) + return false; + ExpansionProfileDesignationExcludeDesignationComponent o = (ExpansionProfileDesignationExcludeDesignationComponent) other; + return compareDeep(language, o.language, true) && compareDeep(use, o.use, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfileDesignationExcludeDesignationComponent)) + return false; + ExpansionProfileDesignationExcludeDesignationComponent o = (ExpansionProfileDesignationExcludeDesignationComponent) other; + return compareValues(language, o.language, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) + ; + } + + public String fhirType() { + return "ExpansionProfile.designation.exclude.designation"; + + } + + } + + /** + * An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Globally unique logical identifier for expansion profile", formalDefinition="An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional identifier for the expansion profile (e.g. an Object Identifier)", formalDefinition="Formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected Identifier identifier; + + /** + * Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier for this version of the expansion profile", formalDefinition="Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance." ) + protected StringType version; + + /** + * A free text natural language name for the expansion profile. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this expansion profile", formalDefinition="A free text natural language name for the expansion profile." ) + protected StringType name; + + /** + * The status of the expansion profile. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the expansion profile." ) + protected Enumeration status; + + /** + * This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the expansion profile. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the individual or organization that published the expansion profile." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for given status", formalDefinition="The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile. + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language description of the expansion profile", formalDefinition="A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile." ) + protected StringType description; + + /** + * A set of criteria that provide the constraints imposed on the value set expansion by including or excluding codes from specific code systems (or versions). + */ + @Child(name = "codeSystem", type = {}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the expansion profile imposes code system contraints", formalDefinition="A set of criteria that provide the constraints imposed on the value set expansion by including or excluding codes from specific code systems (or versions)." ) + protected ExpansionProfileCodeSystemComponent codeSystem; + + /** + * Controls whether concept designations are to be included or excluded in value set expansions. + */ + @Child(name = "includeDesignations", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether the expansion should include concept designations", formalDefinition="Controls whether concept designations are to be included or excluded in value set expansions." ) + protected BooleanType includeDesignations; + + /** + * A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations. + */ + @Child(name = "designation", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the expansion profile imposes designation contraints", formalDefinition="A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations." ) + protected ExpansionProfileDesignationComponent designation; + + /** + * Controls whether the value set definition is included or excluded in value set expansions. + */ + @Child(name = "includeDefinition", type = {BooleanType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Include or exclude the value set definition in the expansion", formalDefinition="Controls whether the value set definition is included or excluded in value set expansions." ) + protected BooleanType includeDefinition; + + /** + * Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains). + */ + @Child(name = "excludeNested", type = {BooleanType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Include or exclude nested codes in the value set expansion", formalDefinition="Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains)." ) + protected BooleanType excludeNested; + + /** + * Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. + */ + @Child(name = "excludeNotForUI", type = {BooleanType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Include or exclude codes which cannot be rendered in user interfaces in the value set expansion", formalDefinition="Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces." ) + protected BooleanType excludeNotForUI; + + /** + * Controls whether or not the value set expansion includes post coordinated codes. + */ + @Child(name = "excludePostCoordinated", type = {BooleanType.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Include or exclude codes which are post coordinated expressions in the value set expansion", formalDefinition="Controls whether or not the value set expansion includes post coordinated codes." ) + protected BooleanType excludePostCoordinated; + + /** + * Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. + */ + @Child(name = "displayLanguage", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specify the language for the display element of codes in the value set expansion", formalDefinition="Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display." ) + protected CodeType displayLanguage; + + /** + * If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. + */ + @Child(name = "limitedExpansion", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Controls behaviour of the value set expand operation when value sets are too large to be completely expanded", formalDefinition="If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete." ) + protected BooleanType limitedExpansion; + + private static final long serialVersionUID = -1199082034L; + + /* + * Constructor + */ + public ExpansionProfile() { + super(); + } + + /* + * Constructor + */ + public ExpansionProfile(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ExpansionProfile setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. + */ + public ExpansionProfile setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public ExpansionProfile setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #version} (Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ExpansionProfile setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. + */ + public ExpansionProfile setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name for the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name for the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExpansionProfile setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name for the expansion profile. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name for the expansion profile. + */ + public ExpansionProfile setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ExpansionProfile setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the expansion profile. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the expansion profile. + */ + public ExpansionProfile setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ExpansionProfile setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage. + */ + public ExpansionProfile setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public ExpansionProfile setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the expansion profile. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the expansion profile. + */ + public ExpansionProfile setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ExpansionProfileContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ExpansionProfileContactComponent addContact() { //3 + ExpansionProfileContactComponent t = new ExpansionProfileContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ExpansionProfile addContact(ExpansionProfileContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ExpansionProfile setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. + */ + public ExpansionProfile setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExpansionProfile setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile. + */ + public ExpansionProfile setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #codeSystem} (A set of criteria that provide the constraints imposed on the value set expansion by including or excluding codes from specific code systems (or versions).) + */ + public ExpansionProfileCodeSystemComponent getCodeSystem() { + if (this.codeSystem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.codeSystem"); + else if (Configuration.doAutoCreate()) + this.codeSystem = new ExpansionProfileCodeSystemComponent(); // cc + return this.codeSystem; + } + + public boolean hasCodeSystem() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + /** + * @param value {@link #codeSystem} (A set of criteria that provide the constraints imposed on the value set expansion by including or excluding codes from specific code systems (or versions).) + */ + public ExpansionProfile setCodeSystem(ExpansionProfileCodeSystemComponent value) { + this.codeSystem = value; + return this; + } + + /** + * @return {@link #includeDesignations} (Controls whether concept designations are to be included or excluded in value set expansions.). This is the underlying object with id, value and extensions. The accessor "getIncludeDesignations" gives direct access to the value + */ + public BooleanType getIncludeDesignationsElement() { + if (this.includeDesignations == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.includeDesignations"); + else if (Configuration.doAutoCreate()) + this.includeDesignations = new BooleanType(); // bb + return this.includeDesignations; + } + + public boolean hasIncludeDesignationsElement() { + return this.includeDesignations != null && !this.includeDesignations.isEmpty(); + } + + public boolean hasIncludeDesignations() { + return this.includeDesignations != null && !this.includeDesignations.isEmpty(); + } + + /** + * @param value {@link #includeDesignations} (Controls whether concept designations are to be included or excluded in value set expansions.). This is the underlying object with id, value and extensions. The accessor "getIncludeDesignations" gives direct access to the value + */ + public ExpansionProfile setIncludeDesignationsElement(BooleanType value) { + this.includeDesignations = value; + return this; + } + + /** + * @return Controls whether concept designations are to be included or excluded in value set expansions. + */ + public boolean getIncludeDesignations() { + return this.includeDesignations == null || this.includeDesignations.isEmpty() ? false : this.includeDesignations.getValue(); + } + + /** + * @param value Controls whether concept designations are to be included or excluded in value set expansions. + */ + public ExpansionProfile setIncludeDesignations(boolean value) { + if (this.includeDesignations == null) + this.includeDesignations = new BooleanType(); + this.includeDesignations.setValue(value); + return this; + } + + /** + * @return {@link #designation} (A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.) + */ + public ExpansionProfileDesignationComponent getDesignation() { + if (this.designation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.designation"); + else if (Configuration.doAutoCreate()) + this.designation = new ExpansionProfileDesignationComponent(); // cc + return this.designation; + } + + public boolean hasDesignation() { + return this.designation != null && !this.designation.isEmpty(); + } + + /** + * @param value {@link #designation} (A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.) + */ + public ExpansionProfile setDesignation(ExpansionProfileDesignationComponent value) { + this.designation = value; + return this; + } + + /** + * @return {@link #includeDefinition} (Controls whether the value set definition is included or excluded in value set expansions.). This is the underlying object with id, value and extensions. The accessor "getIncludeDefinition" gives direct access to the value + */ + public BooleanType getIncludeDefinitionElement() { + if (this.includeDefinition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.includeDefinition"); + else if (Configuration.doAutoCreate()) + this.includeDefinition = new BooleanType(); // bb + return this.includeDefinition; + } + + public boolean hasIncludeDefinitionElement() { + return this.includeDefinition != null && !this.includeDefinition.isEmpty(); + } + + public boolean hasIncludeDefinition() { + return this.includeDefinition != null && !this.includeDefinition.isEmpty(); + } + + /** + * @param value {@link #includeDefinition} (Controls whether the value set definition is included or excluded in value set expansions.). This is the underlying object with id, value and extensions. The accessor "getIncludeDefinition" gives direct access to the value + */ + public ExpansionProfile setIncludeDefinitionElement(BooleanType value) { + this.includeDefinition = value; + return this; + } + + /** + * @return Controls whether the value set definition is included or excluded in value set expansions. + */ + public boolean getIncludeDefinition() { + return this.includeDefinition == null || this.includeDefinition.isEmpty() ? false : this.includeDefinition.getValue(); + } + + /** + * @param value Controls whether the value set definition is included or excluded in value set expansions. + */ + public ExpansionProfile setIncludeDefinition(boolean value) { + if (this.includeDefinition == null) + this.includeDefinition = new BooleanType(); + this.includeDefinition.setValue(value); + return this; + } + + /** + * @return {@link #excludeNested} (Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains).). This is the underlying object with id, value and extensions. The accessor "getExcludeNested" gives direct access to the value + */ + public BooleanType getExcludeNestedElement() { + if (this.excludeNested == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.excludeNested"); + else if (Configuration.doAutoCreate()) + this.excludeNested = new BooleanType(); // bb + return this.excludeNested; + } + + public boolean hasExcludeNestedElement() { + return this.excludeNested != null && !this.excludeNested.isEmpty(); + } + + public boolean hasExcludeNested() { + return this.excludeNested != null && !this.excludeNested.isEmpty(); + } + + /** + * @param value {@link #excludeNested} (Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains).). This is the underlying object with id, value and extensions. The accessor "getExcludeNested" gives direct access to the value + */ + public ExpansionProfile setExcludeNestedElement(BooleanType value) { + this.excludeNested = value; + return this; + } + + /** + * @return Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains). + */ + public boolean getExcludeNested() { + return this.excludeNested == null || this.excludeNested.isEmpty() ? false : this.excludeNested.getValue(); + } + + /** + * @param value Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains). + */ + public ExpansionProfile setExcludeNested(boolean value) { + if (this.excludeNested == null) + this.excludeNested = new BooleanType(); + this.excludeNested.setValue(value); + return this; + } + + /** + * @return {@link #excludeNotForUI} (Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.). This is the underlying object with id, value and extensions. The accessor "getExcludeNotForUI" gives direct access to the value + */ + public BooleanType getExcludeNotForUIElement() { + if (this.excludeNotForUI == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.excludeNotForUI"); + else if (Configuration.doAutoCreate()) + this.excludeNotForUI = new BooleanType(); // bb + return this.excludeNotForUI; + } + + public boolean hasExcludeNotForUIElement() { + return this.excludeNotForUI != null && !this.excludeNotForUI.isEmpty(); + } + + public boolean hasExcludeNotForUI() { + return this.excludeNotForUI != null && !this.excludeNotForUI.isEmpty(); + } + + /** + * @param value {@link #excludeNotForUI} (Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.). This is the underlying object with id, value and extensions. The accessor "getExcludeNotForUI" gives direct access to the value + */ + public ExpansionProfile setExcludeNotForUIElement(BooleanType value) { + this.excludeNotForUI = value; + return this; + } + + /** + * @return Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. + */ + public boolean getExcludeNotForUI() { + return this.excludeNotForUI == null || this.excludeNotForUI.isEmpty() ? false : this.excludeNotForUI.getValue(); + } + + /** + * @param value Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. + */ + public ExpansionProfile setExcludeNotForUI(boolean value) { + if (this.excludeNotForUI == null) + this.excludeNotForUI = new BooleanType(); + this.excludeNotForUI.setValue(value); + return this; + } + + /** + * @return {@link #excludePostCoordinated} (Controls whether or not the value set expansion includes post coordinated codes.). This is the underlying object with id, value and extensions. The accessor "getExcludePostCoordinated" gives direct access to the value + */ + public BooleanType getExcludePostCoordinatedElement() { + if (this.excludePostCoordinated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.excludePostCoordinated"); + else if (Configuration.doAutoCreate()) + this.excludePostCoordinated = new BooleanType(); // bb + return this.excludePostCoordinated; + } + + public boolean hasExcludePostCoordinatedElement() { + return this.excludePostCoordinated != null && !this.excludePostCoordinated.isEmpty(); + } + + public boolean hasExcludePostCoordinated() { + return this.excludePostCoordinated != null && !this.excludePostCoordinated.isEmpty(); + } + + /** + * @param value {@link #excludePostCoordinated} (Controls whether or not the value set expansion includes post coordinated codes.). This is the underlying object with id, value and extensions. The accessor "getExcludePostCoordinated" gives direct access to the value + */ + public ExpansionProfile setExcludePostCoordinatedElement(BooleanType value) { + this.excludePostCoordinated = value; + return this; + } + + /** + * @return Controls whether or not the value set expansion includes post coordinated codes. + */ + public boolean getExcludePostCoordinated() { + return this.excludePostCoordinated == null || this.excludePostCoordinated.isEmpty() ? false : this.excludePostCoordinated.getValue(); + } + + /** + * @param value Controls whether or not the value set expansion includes post coordinated codes. + */ + public ExpansionProfile setExcludePostCoordinated(boolean value) { + if (this.excludePostCoordinated == null) + this.excludePostCoordinated = new BooleanType(); + this.excludePostCoordinated.setValue(value); + return this; + } + + /** + * @return {@link #displayLanguage} (Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.). This is the underlying object with id, value and extensions. The accessor "getDisplayLanguage" gives direct access to the value + */ + public CodeType getDisplayLanguageElement() { + if (this.displayLanguage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.displayLanguage"); + else if (Configuration.doAutoCreate()) + this.displayLanguage = new CodeType(); // bb + return this.displayLanguage; + } + + public boolean hasDisplayLanguageElement() { + return this.displayLanguage != null && !this.displayLanguage.isEmpty(); + } + + public boolean hasDisplayLanguage() { + return this.displayLanguage != null && !this.displayLanguage.isEmpty(); + } + + /** + * @param value {@link #displayLanguage} (Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.). This is the underlying object with id, value and extensions. The accessor "getDisplayLanguage" gives direct access to the value + */ + public ExpansionProfile setDisplayLanguageElement(CodeType value) { + this.displayLanguage = value; + return this; + } + + /** + * @return Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. + */ + public String getDisplayLanguage() { + return this.displayLanguage == null ? null : this.displayLanguage.getValue(); + } + + /** + * @param value Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. + */ + public ExpansionProfile setDisplayLanguage(String value) { + if (Utilities.noString(value)) + this.displayLanguage = null; + else { + if (this.displayLanguage == null) + this.displayLanguage = new CodeType(); + this.displayLanguage.setValue(value); + } + return this; + } + + /** + * @return {@link #limitedExpansion} (If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete.). This is the underlying object with id, value and extensions. The accessor "getLimitedExpansion" gives direct access to the value + */ + public BooleanType getLimitedExpansionElement() { + if (this.limitedExpansion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExpansionProfile.limitedExpansion"); + else if (Configuration.doAutoCreate()) + this.limitedExpansion = new BooleanType(); // bb + return this.limitedExpansion; + } + + public boolean hasLimitedExpansionElement() { + return this.limitedExpansion != null && !this.limitedExpansion.isEmpty(); + } + + public boolean hasLimitedExpansion() { + return this.limitedExpansion != null && !this.limitedExpansion.isEmpty(); + } + + /** + * @param value {@link #limitedExpansion} (If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete.). This is the underlying object with id, value and extensions. The accessor "getLimitedExpansion" gives direct access to the value + */ + public ExpansionProfile setLimitedExpansionElement(BooleanType value) { + this.limitedExpansion = value; + return this; + } + + /** + * @return If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. + */ + public boolean getLimitedExpansion() { + return this.limitedExpansion == null || this.limitedExpansion.isEmpty() ? false : this.limitedExpansion.getValue(); + } + + /** + * @param value If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. + */ + public ExpansionProfile setLimitedExpansion(boolean value) { + if (this.limitedExpansion == null) + this.limitedExpansion = new BooleanType(); + this.limitedExpansion.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "Used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name for the expansion profile.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the expansion profile.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This expansion profile was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine production usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the expansion profile.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date that the expansion profile status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the use of the expansion profile - reason for definition, conditions of use, etc. The description may include a list of expected usages for the expansion profile and can also describe the approach taken to build the expansion profile.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("codeSystem", "", "A set of criteria that provide the constraints imposed on the value set expansion by including or excluding codes from specific code systems (or versions).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("includeDesignations", "boolean", "Controls whether concept designations are to be included or excluded in value set expansions.", 0, java.lang.Integer.MAX_VALUE, includeDesignations)); + childrenList.add(new Property("designation", "", "A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.", 0, java.lang.Integer.MAX_VALUE, designation)); + childrenList.add(new Property("includeDefinition", "boolean", "Controls whether the value set definition is included or excluded in value set expansions.", 0, java.lang.Integer.MAX_VALUE, includeDefinition)); + childrenList.add(new Property("excludeNested", "boolean", "Controls whether or not the value set expansion includes nested codes (i.e. ValueSet.expansion.contains.contains).", 0, java.lang.Integer.MAX_VALUE, excludeNested)); + childrenList.add(new Property("excludeNotForUI", "boolean", "Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.", 0, java.lang.Integer.MAX_VALUE, excludeNotForUI)); + childrenList.add(new Property("excludePostCoordinated", "boolean", "Controls whether or not the value set expansion includes post coordinated codes.", 0, java.lang.Integer.MAX_VALUE, excludePostCoordinated)); + childrenList.add(new Property("displayLanguage", "code", "Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.", 0, java.lang.Integer.MAX_VALUE, displayLanguage)); + childrenList.add(new Property("limitedExpansion", "boolean", "If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete.", 0, java.lang.Integer.MAX_VALUE, limitedExpansion)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ExpansionProfileContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("codeSystem")) + this.codeSystem = (ExpansionProfileCodeSystemComponent) value; // ExpansionProfileCodeSystemComponent + else if (name.equals("includeDesignations")) + this.includeDesignations = castToBoolean(value); // BooleanType + else if (name.equals("designation")) + this.designation = (ExpansionProfileDesignationComponent) value; // ExpansionProfileDesignationComponent + else if (name.equals("includeDefinition")) + this.includeDefinition = castToBoolean(value); // BooleanType + else if (name.equals("excludeNested")) + this.excludeNested = castToBoolean(value); // BooleanType + else if (name.equals("excludeNotForUI")) + this.excludeNotForUI = castToBoolean(value); // BooleanType + else if (name.equals("excludePostCoordinated")) + this.excludePostCoordinated = castToBoolean(value); // BooleanType + else if (name.equals("displayLanguage")) + this.displayLanguage = castToCode(value); // CodeType + else if (name.equals("limitedExpansion")) + this.limitedExpansion = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.url"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.description"); + } + else if (name.equals("codeSystem")) { + this.codeSystem = new ExpansionProfileCodeSystemComponent(); + return this.codeSystem; + } + else if (name.equals("includeDesignations")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.includeDesignations"); + } + else if (name.equals("designation")) { + this.designation = new ExpansionProfileDesignationComponent(); + return this.designation; + } + else if (name.equals("includeDefinition")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.includeDefinition"); + } + else if (name.equals("excludeNested")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.excludeNested"); + } + else if (name.equals("excludeNotForUI")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.excludeNotForUI"); + } + else if (name.equals("excludePostCoordinated")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.excludePostCoordinated"); + } + else if (name.equals("displayLanguage")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.displayLanguage"); + } + else if (name.equals("limitedExpansion")) { + throw new FHIRException("Cannot call addChild on a primitive type ExpansionProfile.limitedExpansion"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ExpansionProfile"; + + } + + public ExpansionProfile copy() { + ExpansionProfile dst = new ExpansionProfile(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ExpansionProfileContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.includeDesignations = includeDesignations == null ? null : includeDesignations.copy(); + dst.designation = designation == null ? null : designation.copy(); + dst.includeDefinition = includeDefinition == null ? null : includeDefinition.copy(); + dst.excludeNested = excludeNested == null ? null : excludeNested.copy(); + dst.excludeNotForUI = excludeNotForUI == null ? null : excludeNotForUI.copy(); + dst.excludePostCoordinated = excludePostCoordinated == null ? null : excludePostCoordinated.copy(); + dst.displayLanguage = displayLanguage == null ? null : displayLanguage.copy(); + dst.limitedExpansion = limitedExpansion == null ? null : limitedExpansion.copy(); + return dst; + } + + protected ExpansionProfile typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExpansionProfile)) + return false; + ExpansionProfile o = (ExpansionProfile) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(description, o.description, true) && compareDeep(codeSystem, o.codeSystem, true) + && compareDeep(includeDesignations, o.includeDesignations, true) && compareDeep(designation, o.designation, true) + && compareDeep(includeDefinition, o.includeDefinition, true) && compareDeep(excludeNested, o.excludeNested, true) + && compareDeep(excludeNotForUI, o.excludeNotForUI, true) && compareDeep(excludePostCoordinated, o.excludePostCoordinated, true) + && compareDeep(displayLanguage, o.displayLanguage, true) && compareDeep(limitedExpansion, o.limitedExpansion, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExpansionProfile)) + return false; + ExpansionProfile o = (ExpansionProfile) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(includeDesignations, o.includeDesignations, true) + && compareValues(includeDefinition, o.includeDefinition, true) && compareValues(excludeNested, o.excludeNested, true) + && compareValues(excludeNotForUI, o.excludeNotForUI, true) && compareValues(excludePostCoordinated, o.excludePostCoordinated, true) + && compareValues(displayLanguage, o.displayLanguage, true) && compareValues(limitedExpansion, o.limitedExpansion, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) + && (codeSystem == null || codeSystem.isEmpty()) && (includeDesignations == null || includeDesignations.isEmpty()) + && (designation == null || designation.isEmpty()) && (includeDefinition == null || includeDefinition.isEmpty()) + && (excludeNested == null || excludeNested.isEmpty()) && (excludeNotForUI == null || excludeNotForUI.isEmpty()) + && (excludePostCoordinated == null || excludePostCoordinated.isEmpty()) && (displayLanguage == null || displayLanguage.isEmpty()) + && (limitedExpansion == null || limitedExpansion.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ExpansionProfile; + } + + @SearchParamDefinition(name="date", path="ExpansionProfile.date", description="The expansion profile publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="ExpansionProfile.identifier", description="The identifier for the expansion profile", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="name", path="ExpansionProfile.name", description="The name of the expansion profile", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="publisher", path="ExpansionProfile.publisher", description="Name of the publisher of the expansion profile", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="ExpansionProfile.description", description="Text search in the description of the expansion profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="version", path="ExpansionProfile.version", description="The version identifier of the expansion profile", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="ExpansionProfile.url", description="The logical URL for the expansion profile", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="ExpansionProfile.status", description="The status of the expansion profile", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExplanationOfBenefit.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExplanationOfBenefit.java new file mode 100644 index 00000000000..93390bd6d88 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExplanationOfBenefit.java @@ -0,0 +1,714 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ +@ResourceDef(name="ExplanationOfBenefit", profile="http://hl7.org/fhir/Profile/ExplanationOfBenefit") +public class ExplanationOfBenefit extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource reference. + */ + @Child(name = "request", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource reference.) + */ + protected Claim requestTarget; + + /** + * Transaction status: error, complete. + */ + @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) + protected Enumeration outcome; + + /** + * A description of the status of the adjudication. + */ + @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) + protected StringType disposition; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The Insurer who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + private static final long serialVersionUID = 205412587L; + + /* + * Constructor + */ + public ExplanationOfBenefit() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource reference.) + */ + public ExplanationOfBenefit setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public Claim getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new Claim(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public ExplanationOfBenefit setRequestTarget(Claim value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public ExplanationOfBenefit setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public ExplanationOfBenefit setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public ExplanationOfBenefit setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication. + */ + public ExplanationOfBenefit setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public ExplanationOfBenefit setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public ExplanationOfBenefit setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public ExplanationOfBenefit setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public ExplanationOfBenefit setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public ExplanationOfBenefit setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public ExplanationOfBenefit setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public ExplanationOfBenefit setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public ExplanationOfBenefit setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public ExplanationOfBenefit setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public ExplanationOfBenefit setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(Claim)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.outcome"); + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.disposition"); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.created"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ExplanationOfBenefit"; + + } + + public ExplanationOfBenefit copy() { + ExplanationOfBenefit dst = new ExplanationOfBenefit(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + return dst; + } + + protected ExplanationOfBenefit typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExplanationOfBenefit)) + return false; + ExplanationOfBenefit o = (ExplanationOfBenefit) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) + && compareDeep(requestOrganization, o.requestOrganization, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExplanationOfBenefit)) + return false; + ExplanationOfBenefit o = (ExplanationOfBenefit) other; + return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ExplanationOfBenefit; + } + + @SearchParamDefinition(name="identifier", path="ExplanationOfBenefit.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpressionNode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpressionNode.java new file mode 100644 index 00000000000..94fe0166db6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExpressionNode.java @@ -0,0 +1,455 @@ +package org.hl7.fhir.dstu21.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.hl7.fhir.utilities.Utilities; + +public class ExpressionNode { + + public enum Kind { + Name, Function, Constant, Group + } + public static class SourceLocation { + private int line; + private int column; + public SourceLocation(int line, int column) { + super(); + this.line = line; + this.column = column; + } + public int getLine() { + return line; + } + public int getColumn() { + return column; + } + public void setLine(int line) { + this.line = line; + } + public void setColumn(int column) { + this.column = column; + } + + public String toString() { + return Integer.toString(line)+", "+Integer.toString(column); + } + } + public enum Function { + Empty, Item, Where, All, Any, First, Last, Tail, Count, AsInteger, StartsWith, Length, Matches, Substring, Contains, Distinct, Not, Resolve, Extension, Log; + + + public static Function fromCode(String name) { + if (name.equals("empty")) + return Function.Empty; + if (name.equals("item")) + return Function.Item; + if (name.equals("where")) + return Function.Where; + if (name.equals("all")) + return Function.All; + if (name.equals("any")) + return Function.Any; + if (name.equals("first")) + return Function.First; + if (name.equals("last")) + return Function.Last; + if (name.equals("tail")) + return Function.Tail; + if (name.equals("count")) + return Function.Count; + if (name.equals("asInteger")) + return Function.AsInteger; + if (name.equals("startsWith")) + return Function.StartsWith; + if (name.equals("length")) + return Function.Length; + if (name.equals("matches")) + return Function.Matches; + if (name.equals("contains")) + return Function.Contains; + if (name.equals("substring")) + return Function.Substring; + if (name.equals("distinct")) + return Function.Distinct; + if (name.equals("not")) + return Function.Not; + if (name.equals("resolve")) + return Function.Resolve; + if (name.equals("extension")) + return Function.Extension; + if (name.equals("log")) + return Function.Log; + + return null; + } + public String toCode() { + switch (this) { + case Empty : return "empty"; + case Item : return "item"; + case Where : return "where"; + case All : return "all"; + case Any : return "any"; + case First : return "first"; + case Last : return "last"; + case Tail : return "tail"; + case Count : return "count"; + case AsInteger : return "asInteger"; + case StartsWith : return "startsWith"; + case Length : return "length"; + case Matches : return "matches"; + case Contains : return "contains"; + case Substring : return "substring"; + case Distinct : return "distinct"; + case Not : return "not"; + case Resolve : return "resolve"; + case Extension : return "extension"; + case Log : return "log"; + default: return "??"; + } + } + } + + public enum Operation { + Equals, Equivalent, NotEquals, NotEquivalent, LessThen, Greater, LessOrEqual, GreaterOrEqual, Union, In, Or, And, Xor, Implies, Plus, Minus, Concatenate; + + public static Operation fromCode(String name) { + if (Utilities.noString(name)) + return null; + if (name.equals("=")) + return Operation.Equals; + if (name.equals("~")) + return Operation.Equivalent; + if (name.equals("!=")) + return Operation.NotEquals; + if (name.equals("!~")) + return Operation.NotEquivalent; + if (name.equals(">")) + return Operation.Greater; + if (name.equals("<")) + return Operation.LessThen; + if (name.equals(">=")) + return Operation.GreaterOrEqual; + if (name.equals("<=")) + return Operation.LessOrEqual; + if (name.equals("|")) + return Operation.Union; + if (name.equals("in")) + return Operation.In; + if (name.equals("or")) + return Operation.Or; + if (name.equals("and")) + return Operation.And; + if (name.equals("xor")) + return Operation.Xor; + if (name.equals("+")) + return Operation.Plus; + if (name.equals("-")) + return Operation.Minus; + if (name.equals("&")) + return Operation.Concatenate; + if (name.equals("implies")) + return Operation.Implies; + return null; + + } + public String toCode() { + switch (this) { + case Equals : return "="; + case Equivalent : return "~"; + case NotEquals : return "!="; + case NotEquivalent : return "!~"; + case Greater : return ">"; + case LessThen : return "<"; + case GreaterOrEqual : return ">="; + case LessOrEqual : return "<="; + case Union : return "|"; + case In : return "in"; + case Or : return "or"; + case And : return "and"; + case Xor : return "xor"; + case Plus : return "+"; + case Minus : return "-"; + case Concatenate : return "&"; + case Implies : return "implies"; + default: return "??"; + } + } + } + + + //the expression will have one of either name or constant + private String uniqueId; + private Kind kind; + private String name; + private String constant; + private Function function; + private List parameters; // will be created if there is a function + private ExpressionNode inner; + private ExpressionNode group; + private Operation operation; + private boolean proximal; // a proximal operation is the first in the sequence of operations. This is significant when evaluating the outcomes + private ExpressionNode opNext; + private SourceLocation start; + private SourceLocation end; + private SourceLocation opStart; + private SourceLocation opEnd; + private Set types; + private Set opTypes; + + + public ExpressionNode(int uniqueId) { + super(); + this.uniqueId = Integer.toString(uniqueId); + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getConstant() { + return constant; + } + public void setConstant(String constant) { + this.constant = constant; + } + public Function getFunction() { + return function; + } + public void setFunction(Function function) { + this.function = function; + if (parameters == null) + parameters = new ArrayList(); + } + + public boolean isProximal() { + return proximal; + } + public void setProximal(boolean proximal) { + this.proximal = proximal; + } + public Operation getOperation() { + return operation; + } + public void setOperation(Operation operation) { + this.operation = operation; + } + public ExpressionNode getInner() { + return inner; + } + public void setInner(ExpressionNode value) { + this.inner = value; + } + public ExpressionNode getOpNext() { + return opNext; + } + public void setOpNext(ExpressionNode value) { + this.opNext = value; + } + public List getParameters() { + return parameters; + } + public boolean checkName(boolean mappingExtensions) { + if (!name.startsWith("$")) + return true; + else if (mappingExtensions && name.equals("$value")) + return true; + else + return name.equals("$context") || name.equals("$resource") || name.equals("$parent"); + } + + public Kind getKind() { + return kind; + } + + public void setKind(Kind kind) { + this.kind = kind; + } + + public ExpressionNode getGroup() { + return group; + } + + public void setGroup(ExpressionNode group) { + this.group = group; + } + + public SourceLocation getStart() { + return start; + } + + public void setStart(SourceLocation start) { + this.start = start; + } + + public SourceLocation getEnd() { + return end; + } + + public void setEnd(SourceLocation end) { + this.end = end; + } + + public SourceLocation getOpStart() { + return opStart; + } + + public void setOpStart(SourceLocation opStart) { + this.opStart = opStart; + } + + public SourceLocation getOpEnd() { + return opEnd; + } + + public void setOpEnd(SourceLocation opEnd) { + this.opEnd = opEnd; + } + + public String getUniqueId() { + return uniqueId; + } + + + public int parameterCount() { + if (parameters == null) + return 0; + else + return parameters.size(); + } + + public String Canonical() { + StringBuilder b = new StringBuilder(); + write(b); + return b.toString(); + } + + public String summary() { + switch (kind) { + case Name: return uniqueId+": "+name; + case Function: return uniqueId+": "+function.toString()+"()"; + case Constant: return uniqueId+": "+constant; + case Group: return uniqueId+": (Group)"; + } + return "??"; + } + + private void write(StringBuilder b) { + + switch (kind) { + case Name: + b.append(name); + break; + case Constant: + b.append(constant); + break; + case Function: + b.append(function.toCode()); + b.append('('); + boolean f = true; + for (ExpressionNode n : parameters) { + if (f) + f = false; + else + b.append(", "); + n.write(b); + } + b.append(')'); + + break; + case Group: + b.append('('); + group.write(b); + b.append(')'); + } + + if (inner != null) { + b.append('.'); + inner.write(b); + } + if (operation != null) { + b.append(' '); + b.append(operation.toCode()); + b.append(' '); + opNext.write(b); + } + } + + public String check() { + + switch (kind) { + case Name: + if (Utilities.noString(name)) + return "No Name provided @ "+location(); + break; + + case Function: + if (function == null) + return "No Function id provided @ "+location(); + for (ExpressionNode n : parameters) { + String msg = n.check(); + if (msg != null) + return msg; + } + + break; + + case Constant: + if (Utilities.noString(constant)) + return "No Constant provided @ "+location(); + break; + + case Group: + if (group == null) + return "No Group provided @ "+location(); + else { + String msg = group.check(); + if (msg != null) + return msg; + } + } + if (inner != null) { + String msg = inner.check(); + if (msg != null) + return msg; + } + if (operation == null) { + + if (opNext != null) + return "Next provided when it shouldn't be @ "+location(); + } + else { + if (opNext == null) + return "No Next provided @ "+location(); + else + opNext.check(); + } + return null; + + } + + private String location() { + return Integer.toString(start.line)+", "+Integer.toString(start.column); + } + + public Set getTypes() { + return types; + } + + public void setTypes(Set types) { + this.types = types; + } + + public Set getOpTypes() { + return opTypes; + } + + public void setOpTypes(Set opTypes) { + this.opTypes = opTypes; + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Extension.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Extension.java new file mode 100644 index 00000000000..d2cb33545da --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Extension.java @@ -0,0 +1,360 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Optional Extensions Element - found in all resources. + */ +@DatatypeDef(name="Extension") +public class Extension extends BaseExtension implements IBaseExtension, IBaseHasExtensions { + + /** + * Source of the definition for the extension code - a logical name or a URL. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="identifies the meaning of the extension", formalDefinition="Source of the definition for the extension code - a logical name or a URL." ) + protected UriType url; + + /** + * Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list). + */ + @Child(name = "value", type = {}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value of extension", formalDefinition="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)." ) + protected org.hl7.fhir.dstu21.model.Type value; + + private static final long serialVersionUID = -1764879552L; + + /** + * Constructor + */ + public Extension(String theUrl) { + setUrl(theUrl); + } + + /** + * Constructor + */ + public Extension(String theUrl, IBaseDatatype theValue) { + setUrl(theUrl); + setValue(theValue); + } + + /* + * Constructor + */ + public Extension() { + super(); + } + + /* + * Constructor + */ + public Extension(UriType url) { + super(); + this.url = url; + } + + /** + * @return {@link #url} (Source of the definition for the extension code - a logical name or a URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Extension.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (Source of the definition for the extension code - a logical name or a URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Extension setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return Source of the definition for the extension code - a logical name or a URL. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value Source of the definition for the extension code - a logical name or a URL. + */ + public Extension setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #value} (Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).) + */ + public org.hl7.fhir.dstu21.model.Type getValue() { + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).) + */ + public Extension setValue(org.hl7.fhir.dstu21.model.Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "Source of the definition for the extension code - a logical name or a URL.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("value[x]", "*", "Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("value[x]")) + this.value = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Extension.url"); + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueBase64Binary")) { + this.value = new Base64BinaryType(); + return this.value; + } + else if (name.equals("valueInstant")) { + this.value = new InstantType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueCode")) { + this.value = new CodeType(); + return this.value; + } + else if (name.equals("valueOid")) { + this.value = new OidType(); + return this.value; + } + else if (name.equals("valueId")) { + this.value = new IdType(); + return this.value; + } + else if (name.equals("valueUnsignedInt")) { + this.value = new UnsignedIntType(); + return this.value; + } + else if (name.equals("valuePositiveInt")) { + this.value = new PositiveIntType(); + return this.value; + } + else if (name.equals("valueMarkdown")) { + this.value = new MarkdownType(); + return this.value; + } + else if (name.equals("valueAnnotation")) { + this.value = new Annotation(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueIdentifier")) { + this.value = new Identifier(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueSignature")) { + this.value = new Signature(); + return this.value; + } + else if (name.equals("valueHumanName")) { + this.value = new HumanName(); + return this.value; + } + else if (name.equals("valueAddress")) { + this.value = new Address(); + return this.value; + } + else if (name.equals("valueContactPoint")) { + this.value = new ContactPoint(); + return this.value; + } + else if (name.equals("valueTiming")) { + this.value = new Timing(); + return this.value; + } + else if (name.equals("valueReference")) { + this.value = new Reference(); + return this.value; + } + else if (name.equals("valueMeta")) { + this.value = new Meta(); + return this.value; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Extension"; + + } + + public Extension copy() { + Extension dst = new Extension(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + protected Extension typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Extension)) + return false; + Extension o = (Extension) other; + return compareDeep(url, o.url, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Extension)) + return false; + Extension o = (Extension) other; + return compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExtensionHelper.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExtensionHelper.java new file mode 100644 index 00000000000..03e7de46553 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ExtensionHelper.java @@ -0,0 +1,148 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.exceptions.FHIRException; + +/** + * in a language with helper classes, this would be a helper class (at least, the base exgtension helpers would be) + * @author Grahame + * + */ +public class ExtensionHelper { + + + /** + * @param name the identity of the extension of interest + * @return true if the named extension is on this element. Will check modifier extensions too if appropriate + */ + public static boolean hasExtension(Element element, String name) { + if (element != null && element instanceof BackboneElement) + return hasExtension((BackboneElement) element, name); + + if (name == null || element == null || !element.hasExtension()) + return false; + for (Extension e : element.getExtension()) { + if (name.equals(e.getUrl())) + return true; + } + return false; + } + + /** + * @param name the identity of the extension of interest + * @return true if the named extension is on this element. Will check modifier extensions + */ + public static boolean hasExtension(BackboneElement element, String name) { + if (name == null || element == null || !(element.hasExtension() || element.hasModifierExtension())) + return false; + for (Extension e : element.getModifierExtension()) { + if (name.equals(e.getUrl())) + return true; + } + for (Extension e : element.getExtension()) { + if (name.equals(e.getUrl())) + return true; + } + return false; + } + + + /** + * @param name the identity of the extension of interest + * @return The extension, if on this element, else null. will check modifier extensions too, if appropriate + */ + public static Extension getExtension(Element element, String name) { + if (element != null && element instanceof BackboneElement) + return getExtension((BackboneElement) element, name); + + if (name == null || element == null || !element.hasExtension()) + return null; + for (Extension e : element.getExtension()) { + if (name.equals(e.getUrl())) + return e; + } + return null; + } + + /** + * @param name the identity of the extension of interest + * @return The extension, if on this element, else null. will check modifier extensions too + */ + public static Extension getExtension(BackboneElement element, String name) { + if (name == null || element == null || !element.hasExtension()) + return null; + for (Extension e : element.getModifierExtension()) { + if (name.equals(e.getUrl())) + return e; + } + for (Extension e : element.getExtension()) { + if (name.equals(e.getUrl())) + return e; + } + return null; + } + + /** + * set the value of an extension on the element. if value == null, make sure it doesn't exist + * + * @param element - the element to act on. Can also be a backbone element + * @param modifier - whether this is a modifier. Note that this is a definitional property of the extension; don't alternate + * @param uri - the identifier for the extension + * @param value - the value of the extension. Delete if this is null + * @throws Exception - if the modifier logic is incorrect + */ + public static void setExtension(Element element, boolean modifier, String uri, Type value) throws FHIRException { + if (value == null) { + // deleting the extension + if (element instanceof BackboneElement) + for (Extension e : ((BackboneElement) element).getModifierExtension()) { + if (uri.equals(e.getUrl())) + ((BackboneElement) element).getModifierExtension().remove(e); + } + for (Extension e : element.getExtension()) { + if (uri.equals(e.getUrl())) + element.getExtension().remove(e); + } + } else { + // it would probably be easier to delete and then create, but this would re-order the extensions + // not that order matters, but we'll preserve it anyway + boolean found = false; + if (element instanceof BackboneElement) + for (Extension e : ((BackboneElement) element).getModifierExtension()) { + if (uri.equals(e.getUrl())) { + if (!modifier) + throw new FHIRException("Error adding extension \""+uri+"\": found an existing modifier extension, and the extension is not marked as a modifier"); + e.setValue(value); + found = true; + } + } + for (Extension e : element.getExtension()) { + if (uri.equals(e.getUrl())) { + if (modifier) + throw new FHIRException("Error adding extension \""+uri+"\": found an existing extension, and the extension is marked as a modifier"); + e.setValue(value); + found = true; + } + } + if (!found) { + Extension ex = new Extension().setUrl(uri).setValue(value); + if (modifier) { + if (!(element instanceof BackboneElement)) + throw new FHIRException("Error adding extension \""+uri+"\": extension is marked as a modifier, but element is not a backbone element"); + ((BackboneElement) element).getModifierExtension().add(ex); + + } else { + element.getExtension().add(ex); + } + } + } + } + + public static boolean hasExtensions(Element element) { + if (element instanceof BackboneElement) + return element.hasExtension() || ((BackboneElement) element).hasModifierExtension(); + else + return element.hasExtension(); + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Factory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Factory.java new file mode 100644 index 00000000000..e9d13791585 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Factory.java @@ -0,0 +1,247 @@ +package org.hl7.fhir.dstu21.model; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.text.ParseException; +import java.util.UUID; + +import org.hl7.fhir.dstu21.model.ContactPoint.ContactPointSystem; +import org.hl7.fhir.dstu21.model.Narrative.NarrativeStatus; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xhtml.XhtmlParser; + +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + + + +public class Factory { + + public static IdType newId(String value) { + if (value == null) + return null; + IdType res = new IdType(); + res.setValue(value); + return res; + } + + public static StringType newString_(String value) { + if (value == null) + return null; + StringType res = new StringType(); + res.setValue(value); + return res; + } + + public static UriType newUri(String value) throws URISyntaxException { + if (value == null) + return null; + UriType res = new UriType(); + res.setValue(value); + return res; + } + + public static DateTimeType newDateTime(String value) throws ParseException { + if (value == null) + return null; + return new DateTimeType(value); + } + + public static DateType newDate(String value) throws ParseException { + if (value == null) + return null; + return new DateType(value); + } + + public static CodeType newCode(String value) { + if (value == null) + return null; + CodeType res = new CodeType(); + res.setValue(value); + return res; + } + + public static IntegerType newInteger(int value) { + IntegerType res = new IntegerType(); + res.setValue(value); + return res; + } + + public static IntegerType newInteger(java.lang.Integer value) { + if (value == null) + return null; + IntegerType res = new IntegerType(); + res.setValue(value); + return res; + } + + public static BooleanType newBoolean(boolean value) { + BooleanType res = new BooleanType(); + res.setValue(value); + return res; + } + + public static ContactPoint newContactPoint(ContactPointSystem system, String value) { + ContactPoint res = new ContactPoint(); + res.setSystem(system); + res.setValue(value); + return res; + } + + public static Extension newExtension(String uri, Type value, boolean evenIfNull) { + if (!evenIfNull && (value == null || value.isEmpty())) + return null; + Extension e = new Extension(); + e.setUrl(uri); + e.setValue(value); + return e; + } + + public static CodeableConcept newCodeableConcept(String code, String system, String display) { + CodeableConcept cc = new CodeableConcept(); + Coding c = new Coding(); + c.setCode(code); + c.setSystem(system); + c.setDisplay(display); + cc.getCoding().add(c); + return cc; + } + + public static Reference makeReference(String url) { + Reference rr = new Reference(); + rr.setReference(url); + return rr; + } + + public static Narrative newNarrative(NarrativeStatus status, String html) throws IOException, FHIRException { + Narrative n = new Narrative(); + n.setStatus(status); + n.setDiv(new XhtmlParser().parseFragment("
"+Utilities.escapeXml(html)+"
")); + return n; + } + + public static Coding makeCoding(String code) throws FHIRException { + String[] parts = code.split("\\|"); + Coding c = new Coding(); + if (parts.length == 2) { + c.setSystem(parts[0]); + c.setCode(parts[1]); + } else if (parts.length == 3) { + c.setSystem(parts[0]); + c.setCode(parts[1]); + c.setDisplay(parts[2]); + } else + throw new FHIRException("Unable to understand the code '"+code+"'. Use the format system|code(|display)"); + return c; + } + + public static Reference makeReference(String url, String text) { + Reference rr = new Reference(); + rr.setReference(url); + if (!Utilities.noString(text)) + rr.setDisplay(text); + return rr; + } + + public static String createUUID() { + return "urn:uuid:"+UUID.randomUUID().toString().toLowerCase(); + } + + public Type create(String name) throws FHIRException { + if (name.equals("boolean")) + return new BooleanType(); + else if (name.equals("integer")) + return new IntegerType(); + else if (name.equals("decimal")) + return new DecimalType(); + else if (name.equals("base64Binary")) + return new Base64BinaryType(); + else if (name.equals("instant")) + return new InstantType(); + else if (name.equals("string")) + return new StringType(); + else if (name.equals("uri")) + return new UriType(); + else if (name.equals("date")) + return new DateType(); + else if (name.equals("dateTime")) + return new DateTimeType(); + else if (name.equals("time")) + return new TimeType(); + else if (name.equals("code")) + return new CodeType(); + else if (name.equals("oid")) + return new OidType(); + else if (name.equals("id")) + return new IdType(); + else if (name.equals("unsignedInt")) + return new UnsignedIntType(); + else if (name.equals("positiveInt")) + return new PositiveIntType(); + else if (name.equals("markdown")) + return new MarkdownType(); + else if (name.equals("Annotation")) + return new Annotation(); + else if (name.equals("Attachment")) + return new Attachment(); + else if (name.equals("Identifier")) + return new Identifier(); + else if (name.equals("CodeableConcept")) + return new CodeableConcept(); + else if (name.equals("Coding")) + return new Coding(); + else if (name.equals("Quantity")) + return new Quantity(); + else if (name.equals("Range")) + return new Range(); + else if (name.equals("Period")) + return new Period(); + else if (name.equals("Ratio")) + return new Ratio(); + else if (name.equals("SampledData")) + return new SampledData(); + else if (name.equals("Signature")) + return new Signature(); + else if (name.equals("HumanName")) + return new HumanName(); + else if (name.equals("Address")) + return new Address(); + else if (name.equals("ContactPoint")) + return new ContactPoint(); + else if (name.equals("Timing")) + return new Timing(); + else if (name.equals("Reference")) + return new Reference(); + else if (name.equals("Meta")) + return new Meta(); + else + throw new FHIRException("Unknown data type name "+name); + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/FamilyMemberHistory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/FamilyMemberHistory.java new file mode 100644 index 00000000000..bbb7bb45f10 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/FamilyMemberHistory.java @@ -0,0 +1,1341 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. + */ +@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/Profile/FamilyMemberHistory") +public class FamilyMemberHistory extends DomainResource { + + public enum FamilyHistoryStatus { + /** + * Some health information is known and captured, but not complete - see notes for details. + */ + PARTIAL, + /** + * All relevant health information is known and captured. + */ + COMPLETED, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * Health information for this individual is unavailable/unknown. + */ + HEALTHUNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static FamilyHistoryStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("partial".equals(codeString)) + return PARTIAL; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("health-unknown".equals(codeString)) + return HEALTHUNKNOWN; + throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PARTIAL: return "partial"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case HEALTHUNKNOWN: return "health-unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PARTIAL: return "http://hl7.org/fhir/history-status"; + case COMPLETED: return "http://hl7.org/fhir/history-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/history-status"; + case HEALTHUNKNOWN: return "http://hl7.org/fhir/history-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PARTIAL: return "Some health information is known and captured, but not complete - see notes for details."; + case COMPLETED: return "All relevant health information is known and captured."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case HEALTHUNKNOWN: return "Health information for this individual is unavailable/unknown."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PARTIAL: return "Partial"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in error"; + case HEALTHUNKNOWN: return "Health unknown"; + default: return "?"; + } + } + } + + public static class FamilyHistoryStatusEnumFactory implements EnumFactory { + public FamilyHistoryStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("partial".equals(codeString)) + return FamilyHistoryStatus.PARTIAL; + if ("completed".equals(codeString)) + return FamilyHistoryStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return FamilyHistoryStatus.ENTEREDINERROR; + if ("health-unknown".equals(codeString)) + return FamilyHistoryStatus.HEALTHUNKNOWN; + throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("partial".equals(codeString)) + return new Enumeration(this, FamilyHistoryStatus.PARTIAL); + if ("completed".equals(codeString)) + return new Enumeration(this, FamilyHistoryStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, FamilyHistoryStatus.ENTEREDINERROR); + if ("health-unknown".equals(codeString)) + return new Enumeration(this, FamilyHistoryStatus.HEALTHUNKNOWN); + throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); + } + public String toCode(FamilyHistoryStatus code) { + if (code == FamilyHistoryStatus.PARTIAL) + return "partial"; + if (code == FamilyHistoryStatus.COMPLETED) + return "completed"; + if (code == FamilyHistoryStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == FamilyHistoryStatus.HEALTHUNKNOWN) + return "health-unknown"; + return "?"; + } + } + + @Block() + public static class FamilyMemberHistoryConditionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." ) + protected CodeableConcept code; + + /** + * Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation. + */ + @Child(name = "outcome", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="deceased | permanent disability | etc.", formalDefinition="Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation." ) + protected CodeableConcept outcome; + + /** + * Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence. + */ + @Child(name = "onset", type = {Age.class, Range.class, Period.class, StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence." ) + protected Type onset; + + /** + * An area where general notes can be placed about this specific condition. + */ + @Child(name = "note", type = {Annotation.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." ) + protected Annotation note; + + private static final long serialVersionUID = -1221569121L; + + /* + * Constructor + */ + public FamilyMemberHistoryConditionComponent() { + super(); + } + + /* + * Constructor + */ + public FamilyMemberHistoryConditionComponent(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) + */ + public FamilyMemberHistoryConditionComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) + */ + public CodeableConcept getOutcome() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new CodeableConcept(); // cc + return this.outcome; + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) + */ + public FamilyMemberHistoryConditionComponent setOutcome(CodeableConcept value) { + this.outcome = value; + return this; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Type getOnset() { + return this.onset; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Age getOnsetAge() throws FHIRException { + if (!(this.onset instanceof Age)) + throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Age) this.onset; + } + + public boolean hasOnsetAge() { + return this.onset instanceof Age; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Range getOnsetRange() throws FHIRException { + if (!(this.onset instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Range) this.onset; + } + + public boolean hasOnsetRange() { + return this.onset instanceof Range; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Period getOnsetPeriod() throws FHIRException { + if (!(this.onset instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Period) this.onset; + } + + public boolean hasOnsetPeriod() { + return this.onset instanceof Period; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public StringType getOnsetStringType() throws FHIRException { + if (!(this.onset instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (StringType) this.onset; + } + + public boolean hasOnsetStringType() { + return this.onset instanceof StringType; + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public FamilyMemberHistoryConditionComponent setOnset(Type value) { + this.onset = value; + return this; + } + + /** + * @return {@link #note} (An area where general notes can be placed about this specific condition.) + */ + public Annotation getNote() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.note"); + else if (Configuration.doAutoCreate()) + this.note = new Annotation(); // cc + return this.note; + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (An area where general notes can be placed about this specific condition.) + */ + public FamilyMemberHistoryConditionComponent setNote(Annotation value) { + this.note = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("outcome")) + this.outcome = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("onset[x]")) + this.onset = (Type) value; // Type + else if (name.equals("note")) + this.note = castToAnnotation(value); // Annotation + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("outcome")) { + this.outcome = new CodeableConcept(); + return this.outcome; + } + else if (name.equals("onsetAge")) { + this.onset = new Age(); + return this.onset; + } + else if (name.equals("onsetRange")) { + this.onset = new Range(); + return this.onset; + } + else if (name.equals("onsetPeriod")) { + this.onset = new Period(); + return this.onset; + } + else if (name.equals("onsetString")) { + this.onset = new StringType(); + return this.onset; + } + else if (name.equals("note")) { + this.note = new Annotation(); + return this.note; + } + else + return super.addChild(name); + } + + public FamilyMemberHistoryConditionComponent copy() { + FamilyMemberHistoryConditionComponent dst = new FamilyMemberHistoryConditionComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.onset = onset == null ? null : onset.copy(); + dst.note = note == null ? null : note.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FamilyMemberHistoryConditionComponent)) + return false; + FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other; + return compareDeep(code, o.code, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true) + && compareDeep(note, o.note, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FamilyMemberHistoryConditionComponent)) + return false; + FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (outcome == null || outcome.isEmpty()) + && (onset == null || onset.isEmpty()) && (note == null || note.isEmpty()); + } + + public String fhirType() { + return "FamilyMemberHistory.condition"; + + } + + } + + /** + * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * The person who this history concerns. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person who this history concerns.) + */ + protected Patient patientTarget; + + /** + * The date (and possibly time) when the family member history was taken. + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family member history was taken." ) + protected DateTimeType date; + + /** + * A code specifying a state of a Family Member History record. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="partial | completed | entered-in-error | health-unknown", formalDefinition="A code specifying a state of a Family Member History record." ) + protected Enumeration status; + + /** + * This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". + */ + @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\"." ) + protected StringType name; + + /** + * The type of relationship this person has to the patient (father, mother, brother etc.). + */ + @Child(name = "relationship", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." ) + protected CodeableConcept relationship; + + /** + * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + @Child(name = "gender", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * The actual or approximate date of birth of the relative. + */ + @Child(name = "born", type = {Period.class, DateType.class, StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." ) + protected Type born; + + /** + * The actual or approximate age of the relative at the time the family member history is recorded. + */ + @Child(name = "age", type = {Age.class, Range.class, StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="(approximate) age", formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded." ) + protected Type age; + + /** + * Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record. + */ + @Child(name = "deceased", type = {BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Dead? How old/when?", formalDefinition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record." ) + protected Type deceased; + + /** + * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. + */ + @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." ) + protected Annotation note; + + /** + * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition. + */ + @Child(name = "condition", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." ) + protected List condition; + + private static final long serialVersionUID = -1799103041L; + + /* + * Constructor + */ + public FamilyMemberHistory() { + super(); + } + + /* + * Constructor + */ + public FamilyMemberHistory(Reference patient, Enumeration status, CodeableConcept relationship) { + super(); + this.patient = patient; + this.status = status; + this.relationship = relationship; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public FamilyMemberHistory addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (The person who this history concerns.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person who this history concerns.) + */ + public FamilyMemberHistory setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) + */ + public FamilyMemberHistory setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public FamilyMemberHistory setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and possibly time) when the family member history was taken. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and possibly time) when the family member history was taken. + */ + public FamilyMemberHistory setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (A code specifying a state of a Family Member History record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new FamilyHistoryStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code specifying a state of a Family Member History record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public FamilyMemberHistory setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying a state of a Family Member History record. + */ + public FamilyHistoryStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying a state of a Family Member History record. + */ + public FamilyMemberHistory setStatus(FamilyHistoryStatus value) { + if (this.status == null) + this.status = new Enumeration(new FamilyHistoryStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public FamilyMemberHistory setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". + */ + public FamilyMemberHistory setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) + */ + public CodeableConcept getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new CodeableConcept(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) + */ + public FamilyMemberHistory setRelationship(CodeableConcept value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public FamilyMemberHistory setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + public FamilyMemberHistory setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public Type getBorn() { + return this.born; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public Period getBornPeriod() throws FHIRException { + if (!(this.born instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.born.getClass().getName()+" was encountered"); + return (Period) this.born; + } + + public boolean hasBornPeriod() { + return this.born instanceof Period; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public DateType getBornDateType() throws FHIRException { + if (!(this.born instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.born.getClass().getName()+" was encountered"); + return (DateType) this.born; + } + + public boolean hasBornDateType() { + return this.born instanceof DateType; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public StringType getBornStringType() throws FHIRException { + if (!(this.born instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.born.getClass().getName()+" was encountered"); + return (StringType) this.born; + } + + public boolean hasBornStringType() { + return this.born instanceof StringType; + } + + public boolean hasBorn() { + return this.born != null && !this.born.isEmpty(); + } + + /** + * @param value {@link #born} (The actual or approximate date of birth of the relative.) + */ + public FamilyMemberHistory setBorn(Type value) { + this.born = value; + return this; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Type getAge() { + return this.age; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Age getAgeAge() throws FHIRException { + if (!(this.age instanceof Age)) + throw new FHIRException("Type mismatch: the type Age was expected, but "+this.age.getClass().getName()+" was encountered"); + return (Age) this.age; + } + + public boolean hasAgeAge() { + return this.age instanceof Age; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Range getAgeRange() throws FHIRException { + if (!(this.age instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered"); + return (Range) this.age; + } + + public boolean hasAgeRange() { + return this.age instanceof Range; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public StringType getAgeStringType() throws FHIRException { + if (!(this.age instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.age.getClass().getName()+" was encountered"); + return (StringType) this.age; + } + + public boolean hasAgeStringType() { + return this.age instanceof StringType; + } + + public boolean hasAge() { + return this.age != null && !this.age.isEmpty(); + } + + /** + * @param value {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public FamilyMemberHistory setAge(Type value) { + this.age = value; + return this; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public Type getDeceased() { + return this.deceased; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public BooleanType getDeceasedBooleanType() throws FHIRException { + if (!(this.deceased instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (BooleanType) this.deceased; + } + + public boolean hasDeceasedBooleanType() { + return this.deceased instanceof BooleanType; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public Age getDeceasedAge() throws FHIRException { + if (!(this.deceased instanceof Age)) + throw new FHIRException("Type mismatch: the type Age was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (Age) this.deceased; + } + + public boolean hasDeceasedAge() { + return this.deceased instanceof Age; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public Range getDeceasedRange() throws FHIRException { + if (!(this.deceased instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (Range) this.deceased; + } + + public boolean hasDeceasedRange() { + return this.deceased instanceof Range; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public DateType getDeceasedDateType() throws FHIRException { + if (!(this.deceased instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (DateType) this.deceased; + } + + public boolean hasDeceasedDateType() { + return this.deceased instanceof DateType; + } + + /** + * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public StringType getDeceasedStringType() throws FHIRException { + if (!(this.deceased instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (StringType) this.deceased; + } + + public boolean hasDeceasedStringType() { + return this.deceased instanceof StringType; + } + + public boolean hasDeceased() { + return this.deceased != null && !this.deceased.isEmpty(); + } + + /** + * @param value {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) + */ + public FamilyMemberHistory setDeceased(Type value) { + this.deceased = value; + return this; + } + + /** + * @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.) + */ + public Annotation getNote() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.note"); + else if (Configuration.doAutoCreate()) + this.note = new Annotation(); // cc + return this.note; + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.) + */ + public FamilyMemberHistory setNote(Annotation value) { + this.note = value; + return this; + } + + /** + * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (FamilyMemberHistoryConditionComponent item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) + */ + // syntactic sugar + public FamilyMemberHistoryConditionComponent addCondition() { //3 + FamilyMemberHistoryConditionComponent t = new FamilyMemberHistoryConditionComponent(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + // syntactic sugar + public FamilyMemberHistory addCondition(FamilyMemberHistoryConditionComponent t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("date", "dateTime", "The date (and possibly time) when the family member history was taken.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("status", "code", "A code specifying a state of a Family Member History record.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("name", "string", "This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, java.lang.Integer.MAX_VALUE, born)); + childrenList.add(new Property("age[x]", "Age|Range|string", "The actual or approximate age of the relative at the time the family member history is recorded.", 0, java.lang.Integer.MAX_VALUE, age)); + childrenList.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, java.lang.Integer.MAX_VALUE, deceased)); + childrenList.add(new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("status")) + this.status = new FamilyHistoryStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("relationship")) + this.relationship = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("born[x]")) + this.born = (Type) value; // Type + else if (name.equals("age[x]")) + this.age = (Type) value; // Type + else if (name.equals("deceased[x]")) + this.deceased = (Type) value; // Type + else if (name.equals("note")) + this.note = castToAnnotation(value); // Annotation + else if (name.equals("condition")) + this.getCondition().add((FamilyMemberHistoryConditionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.date"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.status"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.name"); + } + else if (name.equals("relationship")) { + this.relationship = new CodeableConcept(); + return this.relationship; + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.gender"); + } + else if (name.equals("bornPeriod")) { + this.born = new Period(); + return this.born; + } + else if (name.equals("bornDate")) { + this.born = new DateType(); + return this.born; + } + else if (name.equals("bornString")) { + this.born = new StringType(); + return this.born; + } + else if (name.equals("ageAge")) { + this.age = new Age(); + return this.age; + } + else if (name.equals("ageRange")) { + this.age = new Range(); + return this.age; + } + else if (name.equals("ageString")) { + this.age = new StringType(); + return this.age; + } + else if (name.equals("deceasedBoolean")) { + this.deceased = new BooleanType(); + return this.deceased; + } + else if (name.equals("deceasedAge")) { + this.deceased = new Age(); + return this.deceased; + } + else if (name.equals("deceasedRange")) { + this.deceased = new Range(); + return this.deceased; + } + else if (name.equals("deceasedDate")) { + this.deceased = new DateType(); + return this.deceased; + } + else if (name.equals("deceasedString")) { + this.deceased = new StringType(); + return this.deceased; + } + else if (name.equals("note")) { + this.note = new Annotation(); + return this.note; + } + else if (name.equals("condition")) { + return addCondition(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "FamilyMemberHistory"; + + } + + public FamilyMemberHistory copy() { + FamilyMemberHistory dst = new FamilyMemberHistory(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.date = date == null ? null : date.copy(); + dst.status = status == null ? null : status.copy(); + dst.name = name == null ? null : name.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.gender = gender == null ? null : gender.copy(); + dst.born = born == null ? null : born.copy(); + dst.age = age == null ? null : age.copy(); + dst.deceased = deceased == null ? null : deceased.copy(); + dst.note = note == null ? null : note.copy(); + if (condition != null) { + dst.condition = new ArrayList(); + for (FamilyMemberHistoryConditionComponent i : condition) + dst.condition.add(i.copy()); + }; + return dst; + } + + protected FamilyMemberHistory typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FamilyMemberHistory)) + return false; + FamilyMemberHistory o = (FamilyMemberHistory) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true) + && compareDeep(status, o.status, true) && compareDeep(name, o.name, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(gender, o.gender, true) && compareDeep(born, o.born, true) && compareDeep(age, o.age, true) + && compareDeep(deceased, o.deceased, true) && compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FamilyMemberHistory)) + return false; + FamilyMemberHistory o = (FamilyMemberHistory) other; + return compareValues(date, o.date, true) && compareValues(status, o.status, true) && compareValues(name, o.name, true) + && compareValues(gender, o.gender, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (date == null || date.isEmpty()) && (status == null || status.isEmpty()) && (name == null || name.isEmpty()) + && (relationship == null || relationship.isEmpty()) && (gender == null || gender.isEmpty()) + && (born == null || born.isEmpty()) && (age == null || age.isEmpty()) && (deceased == null || deceased.isEmpty()) + && (note == null || note.isEmpty()) && (condition == null || condition.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.FamilyMemberHistory; + } + + @SearchParamDefinition(name="date", path="FamilyMemberHistory.date", description="When history was captured/updated", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="FamilyMemberHistory.identifier", description="A search by a record identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="FamilyMemberHistory.condition.code", description="A search by a condition code", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="gender", path="FamilyMemberHistory.gender", description="A search by a gender code of a family member", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="relationship", path="FamilyMemberHistory.relationship", description="A search by a relationship type", type="token" ) + public static final String SP_RELATIONSHIP = "relationship"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Flag.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Flag.java new file mode 100644 index 00000000000..00c7bfe9e81 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Flag.java @@ -0,0 +1,662 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Prospective warnings of potential issues when providing care to the patient. + */ +@ResourceDef(name="Flag", profile="http://hl7.org/fhir/Profile/Flag") +public class Flag extends DomainResource { + + public enum FlagStatus { + /** + * A current flag that should be displayed to a user. A system may use the category to determine which roles should view the flag. + */ + ACTIVE, + /** + * The flag does not need to be displayed any more. + */ + INACTIVE, + /** + * The flag was added in error, and should no longer be displayed. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static FlagStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown FlagStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/flag-status"; + case INACTIVE: return "http://hl7.org/fhir/flag-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/flag-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "A current flag that should be displayed to a user. A system may use the category to determine which roles should view the flag."; + case INACTIVE: return "The flag does not need to be displayed any more."; + case ENTEREDINERROR: return "The flag was added in error, and should no longer be displayed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class FlagStatusEnumFactory implements EnumFactory { + public FlagStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return FlagStatus.ACTIVE; + if ("inactive".equals(codeString)) + return FlagStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return FlagStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown FlagStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, FlagStatus.ACTIVE); + if ("inactive".equals(codeString)) + return new Enumeration(this, FlagStatus.INACTIVE); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, FlagStatus.ENTEREDINERROR); + throw new FHIRException("Unknown FlagStatus code '"+codeString+"'"); + } + public String toCode(FlagStatus code) { + if (code == FlagStatus.ACTIVE) + return "active"; + if (code == FlagStatus.INACTIVE) + return "inactive"; + if (code == FlagStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + /** + * Identifier assigned to the flag for external use (outside the FHIR environment). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the flag for external use (outside the FHIR environment)." ) + protected List identifier; + + /** + * Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." ) + protected CodeableConcept category; + + /** + * Supports basic workflow. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="Supports basic workflow." ) + protected Enumeration status; + + /** + * The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period when flag is active", formalDefinition="The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified." ) + protected Period period; + + /** + * The patient, location, group , organization , or practitioner this is about record this flag is associated with. + */ + @Child(name = "subject", type = {Patient.class, Location.class, Group.class, Organization.class, Practitioner.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who/What is flag about?", formalDefinition="The patient, location, group , organization , or practitioner this is about record this flag is associated with." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient, location, group , organization , or practitioner this is about record this flag is associated with.) + */ + protected Resource subjectTarget; + + /** + * This alert is only relevant during the encounter. + */ + @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Alert relevant during encounter", formalDefinition="This alert is only relevant during the encounter." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (This alert is only relevant during the encounter.) + */ + protected Encounter encounterTarget; + + /** + * The person, organization or device that created the flag. + */ + @Child(name = "author", type = {Device.class, Organization.class, Patient.class, Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Flag creator", formalDefinition="The person, organization or device that created the flag." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (The person, organization or device that created the flag.) + */ + protected Resource authorTarget; + + /** + * The coded value or textual component of the flag to display to the user. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition="The coded value or textual component of the flag to display to the user." ) + protected CodeableConcept code; + + private static final long serialVersionUID = 701147751L; + + /* + * Constructor + */ + public Flag() { + super(); + } + + /* + * Constructor + */ + public Flag(Enumeration status, Reference subject, CodeableConcept code) { + super(); + this.status = status; + this.subject = subject; + this.code = code; + } + + /** + * @return {@link #identifier} (Identifier assigned to the flag for external use (outside the FHIR environment).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier assigned to the flag for external use (outside the FHIR environment).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Flag addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.) + */ + public Flag setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #status} (Supports basic workflow.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new FlagStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Supports basic workflow.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Flag setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Supports basic workflow. + */ + public FlagStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Supports basic workflow. + */ + public Flag setStatus(FlagStatus value) { + if (this.status == null) + this.status = new Enumeration(new FlagStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #period} (The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.) + */ + public Flag setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #subject} (The patient, location, group , organization , or practitioner this is about record this flag is associated with.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient, location, group , organization , or practitioner this is about record this flag is associated with.) + */ + public Flag setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, location, group , organization , or practitioner this is about record this flag is associated with.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, location, group , organization , or practitioner this is about record this flag is associated with.) + */ + public Flag setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #encounter} (This alert is only relevant during the encounter.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (This alert is only relevant during the encounter.) + */ + public Flag setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This alert is only relevant during the encounter.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This alert is only relevant during the encounter.) + */ + public Flag setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #author} (The person, organization or device that created the flag.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (The person, organization or device that created the flag.) + */ + public Flag setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person, organization or device that created the flag.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person, organization or device that created the flag.) + */ + public Flag setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #code} (The coded value or textual component of the flag to display to the user.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Flag.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The coded value or textual component of the flag to display to the user.) + */ + public Flag setCode(CodeableConcept value) { + this.code = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the flag for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("status", "code", "Supports basic workflow.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("period", "Period", "The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("subject", "Reference(Patient|Location|Group|Organization|Practitioner)", "The patient, location, group , organization , or practitioner this is about record this flag is associated with.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "This alert is only relevant during the encounter.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("author", "Reference(Device|Organization|Patient|Practitioner)", "The person, organization or device that created the flag.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("code", "CodeableConcept", "The coded value or textual component of the flag to display to the user.", 0, java.lang.Integer.MAX_VALUE, code)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("status")) + this.status = new FlagStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Flag.status"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Flag"; + + } + + public Flag copy() { + Flag dst = new Flag(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.category = category == null ? null : category.copy(); + dst.status = status == null ? null : status.copy(); + dst.period = period == null ? null : period.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.author = author == null ? null : author.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Flag typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Flag)) + return false; + Flag o = (Flag) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(status, o.status, true) + && compareDeep(period, o.period, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(author, o.author, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Flag)) + return false; + Flag o = (Flag) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) + && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) && (subject == null || subject.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (author == null || author.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Flag; + } + + @SearchParamDefinition(name="date", path="Flag.period", description="Time period when flag is active", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="subject", path="Flag.subject", description="The identity of a subject to list flags for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Flag.subject", description="The identity of a subject to list flags for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="author", path="Flag.author", description="Flag creator", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="encounter", path="Flag.encounter", description="Alert relevant during encounter", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Goal.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Goal.java new file mode 100644 index 00000000000..0305815bd8c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Goal.java @@ -0,0 +1,1285 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ +@ResourceDef(name="Goal", profile="http://hl7.org/fhir/Profile/Goal") +public class Goal extends DomainResource { + + public enum GoalStatus { + /** + * A goal is proposed for this patient + */ + PROPOSED, + /** + * A goal is planned for this patient + */ + PLANNED, + /** + * A proposed goal was accepted + */ + ACCEPTED, + /** + * A proposed goal was rejected + */ + REJECTED, + /** + * The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again) + */ + INPROGRESS, + /** + * The goal has been met and no further action is needed + */ + ACHIEVED, + /** + * The goal has been met, but ongoing activity is needed to sustain the goal objective + */ + SUSTAINING, + /** + * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time. + */ + ONHOLD, + /** + * The goal is no longer being sought + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static GoalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("achieved".equals(codeString)) + return ACHIEVED; + if ("sustaining".equals(codeString)) + return SUSTAINING; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case ACCEPTED: return "accepted"; + case REJECTED: return "rejected"; + case INPROGRESS: return "in-progress"; + case ACHIEVED: return "achieved"; + case SUSTAINING: return "sustaining"; + case ONHOLD: return "on-hold"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/goal-status"; + case PLANNED: return "http://hl7.org/fhir/goal-status"; + case ACCEPTED: return "http://hl7.org/fhir/goal-status"; + case REJECTED: return "http://hl7.org/fhir/goal-status"; + case INPROGRESS: return "http://hl7.org/fhir/goal-status"; + case ACHIEVED: return "http://hl7.org/fhir/goal-status"; + case SUSTAINING: return "http://hl7.org/fhir/goal-status"; + case ONHOLD: return "http://hl7.org/fhir/goal-status"; + case CANCELLED: return "http://hl7.org/fhir/goal-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "A goal is proposed for this patient"; + case PLANNED: return "A goal is planned for this patient"; + case ACCEPTED: return "A proposed goal was accepted"; + case REJECTED: return "A proposed goal was rejected"; + case INPROGRESS: return "The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again)"; + case ACHIEVED: return "The goal has been met and no further action is needed"; + case SUSTAINING: return "The goal has been met, but ongoing activity is needed to sustain the goal objective"; + case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time."; + case CANCELLED: return "The goal is no longer being sought"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PLANNED: return "Planned"; + case ACCEPTED: return "Accepted"; + case REJECTED: return "Rejected"; + case INPROGRESS: return "In Progress"; + case ACHIEVED: return "Achieved"; + case SUSTAINING: return "Sustaining"; + case ONHOLD: return "On Hold"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class GoalStatusEnumFactory implements EnumFactory { + public GoalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return GoalStatus.PROPOSED; + if ("planned".equals(codeString)) + return GoalStatus.PLANNED; + if ("accepted".equals(codeString)) + return GoalStatus.ACCEPTED; + if ("rejected".equals(codeString)) + return GoalStatus.REJECTED; + if ("in-progress".equals(codeString)) + return GoalStatus.INPROGRESS; + if ("achieved".equals(codeString)) + return GoalStatus.ACHIEVED; + if ("sustaining".equals(codeString)) + return GoalStatus.SUSTAINING; + if ("on-hold".equals(codeString)) + return GoalStatus.ONHOLD; + if ("cancelled".equals(codeString)) + return GoalStatus.CANCELLED; + throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, GoalStatus.PROPOSED); + if ("planned".equals(codeString)) + return new Enumeration(this, GoalStatus.PLANNED); + if ("accepted".equals(codeString)) + return new Enumeration(this, GoalStatus.ACCEPTED); + if ("rejected".equals(codeString)) + return new Enumeration(this, GoalStatus.REJECTED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, GoalStatus.INPROGRESS); + if ("achieved".equals(codeString)) + return new Enumeration(this, GoalStatus.ACHIEVED); + if ("sustaining".equals(codeString)) + return new Enumeration(this, GoalStatus.SUSTAINING); + if ("on-hold".equals(codeString)) + return new Enumeration(this, GoalStatus.ONHOLD); + if ("cancelled".equals(codeString)) + return new Enumeration(this, GoalStatus.CANCELLED); + throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); + } + public String toCode(GoalStatus code) { + if (code == GoalStatus.PROPOSED) + return "proposed"; + if (code == GoalStatus.PLANNED) + return "planned"; + if (code == GoalStatus.ACCEPTED) + return "accepted"; + if (code == GoalStatus.REJECTED) + return "rejected"; + if (code == GoalStatus.INPROGRESS) + return "in-progress"; + if (code == GoalStatus.ACHIEVED) + return "achieved"; + if (code == GoalStatus.SUSTAINING) + return "sustaining"; + if (code == GoalStatus.ONHOLD) + return "on-hold"; + if (code == GoalStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + @Block() + public static class GoalOutcomeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Details of what's changed (or not changed). + */ + @Child(name = "result", type = {CodeableConcept.class, Observation.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code or observation that resulted from goal", formalDefinition="Details of what's changed (or not changed)." ) + protected Type result; + + private static final long serialVersionUID = 1994317639L; + + /* + * Constructor + */ + public GoalOutcomeComponent() { + super(); + } + + /** + * @return {@link #result} (Details of what's changed (or not changed).) + */ + public Type getResult() { + return this.result; + } + + /** + * @return {@link #result} (Details of what's changed (or not changed).) + */ + public CodeableConcept getResultCodeableConcept() throws FHIRException { + if (!(this.result instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.result.getClass().getName()+" was encountered"); + return (CodeableConcept) this.result; + } + + public boolean hasResultCodeableConcept() { + return this.result instanceof CodeableConcept; + } + + /** + * @return {@link #result} (Details of what's changed (or not changed).) + */ + public Reference getResultReference() throws FHIRException { + if (!(this.result instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.result.getClass().getName()+" was encountered"); + return (Reference) this.result; + } + + public boolean hasResultReference() { + return this.result instanceof Reference; + } + + public boolean hasResult() { + return this.result != null && !this.result.isEmpty(); + } + + /** + * @param value {@link #result} (Details of what's changed (or not changed).) + */ + public GoalOutcomeComponent setResult(Type value) { + this.result = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("result[x]", "CodeableConcept|Reference(Observation)", "Details of what's changed (or not changed).", 0, java.lang.Integer.MAX_VALUE, result)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("result[x]")) + this.result = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("resultCodeableConcept")) { + this.result = new CodeableConcept(); + return this.result; + } + else if (name.equals("resultReference")) { + this.result = new Reference(); + return this.result; + } + else + return super.addChild(name); + } + + public GoalOutcomeComponent copy() { + GoalOutcomeComponent dst = new GoalOutcomeComponent(); + copyValues(dst); + dst.result = result == null ? null : result.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GoalOutcomeComponent)) + return false; + GoalOutcomeComponent o = (GoalOutcomeComponent) other; + return compareDeep(result, o.result, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GoalOutcomeComponent)) + return false; + GoalOutcomeComponent o = (GoalOutcomeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (result == null || result.isEmpty()); + } + + public String fhirType() { + return "Goal.outcome"; + + } + + } + + /** + * This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="External Ids for this goal", formalDefinition="This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * Identifies the patient, group or organization for whom the goal is being established. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Identifies the patient, group or organization for whom the goal is being established.) + */ + protected Resource subjectTarget; + + /** + * The date or event after which the goal should begin being pursued. + */ + @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." ) + protected Type start; + + /** + * Indicates either the date or the duration after start by which the goal should be met. + */ + @Child(name = "target", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." ) + protected Type target; + + /** + * Indicates a category the goal falls within. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc.", formalDefinition="Indicates a category the goal falls within." ) + protected List category; + + /** + * Human-readable description of a specific desired objective of care. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What's the desired outcome?", formalDefinition="Human-readable description of a specific desired objective of care." ) + protected StringType description; + + /** + * Indicates whether the goal has been reached and is still considered relevant. + */ + @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." ) + protected Enumeration status; + + /** + * Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. + */ + @Child(name = "statusDate", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc." ) + protected DateType statusDate; + + /** + * Captures the reason for the current status. + */ + @Child(name = "statusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." ) + protected CodeableConcept statusReason; + + /** + * Indicates whose goal this is - patient goal, practitioner goal, etc. + */ + @Child(name = "author", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Indicates whose goal this is - patient goal, practitioner goal, etc.) + */ + protected Resource authorTarget; + + /** + * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal. + */ + @Child(name = "priority", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="high | medium |low", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." ) + protected CodeableConcept priority; + + /** + * The identified conditions and other health record elements that are intended to be addressed by the goal. + */ + @Child(name = "addresses", type = {Condition.class, Observation.class, MedicationStatement.class, NutritionOrder.class, ProcedureRequest.class, RiskAssessment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Issues addressed by this goal", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." ) + protected List addresses; + /** + * The actual objects that are the target of the reference (The identified conditions and other health record elements that are intended to be addressed by the goal.) + */ + protected List addressesTarget; + + + /** + * Any comments related to the goal. + */ + @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." ) + protected List note; + + /** + * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved. + */ + @Child(name = "outcome", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What was end result of goal?", formalDefinition="Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved." ) + protected List outcome; + + private static final long serialVersionUID = 2029459056L; + + /* + * Constructor + */ + public Goal() { + super(); + } + + /* + * Constructor + */ + public Goal(StringType description, Enumeration status) { + super(); + this.description = description; + this.status = status; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Goal addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) + */ + public Goal setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.) + */ + public Goal setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #start} (The date or event after which the goal should begin being pursued.) + */ + public Type getStart() { + return this.start; + } + + /** + * @return {@link #start} (The date or event after which the goal should begin being pursued.) + */ + public DateType getStartDateType() throws FHIRException { + if (!(this.start instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered"); + return (DateType) this.start; + } + + public boolean hasStartDateType() { + return this.start instanceof DateType; + } + + /** + * @return {@link #start} (The date or event after which the goal should begin being pursued.) + */ + public CodeableConcept getStartCodeableConcept() throws FHIRException { + if (!(this.start instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered"); + return (CodeableConcept) this.start; + } + + public boolean hasStartCodeableConcept() { + return this.start instanceof CodeableConcept; + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (The date or event after which the goal should begin being pursued.) + */ + public Goal setStart(Type value) { + this.start = value; + return this; + } + + /** + * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) + */ + public Type getTarget() { + return this.target; + } + + /** + * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) + */ + public DateType getTargetDateType() throws FHIRException { + if (!(this.target instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.target.getClass().getName()+" was encountered"); + return (DateType) this.target; + } + + public boolean hasTargetDateType() { + return this.target instanceof DateType; + } + + /** + * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) + */ + public Duration getTargetDuration() throws FHIRException { + if (!(this.target instanceof Duration)) + throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Duration) this.target; + } + + public boolean hasTargetDuration() { + return this.target instanceof Duration; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) + */ + public Goal setTarget(Type value) { + this.target = value; + return this; + } + + /** + * @return {@link #category} (Indicates a category the goal falls within.) + */ + public List getCategory() { + if (this.category == null) + this.category = new ArrayList(); + return this.category; + } + + public boolean hasCategory() { + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #category} (Indicates a category the goal falls within.) + */ + // syntactic sugar + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + // syntactic sugar + public Goal addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; + } + + /** + * @return {@link #description} (Human-readable description of a specific desired objective of care.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Human-readable description of a specific desired objective of care.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Goal setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Human-readable description of a specific desired objective of care. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Human-readable description of a specific desired objective of care. + */ + public Goal setDescription(String value) { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #status} (Indicates whether the goal has been reached and is still considered relevant.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new GoalStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates whether the goal has been reached and is still considered relevant.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Goal setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates whether the goal has been reached and is still considered relevant. + */ + public GoalStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates whether the goal has been reached and is still considered relevant. + */ + public Goal setStatus(GoalStatus value) { + if (this.status == null) + this.status = new Enumeration(new GoalStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value + */ + public DateType getStatusDateElement() { + if (this.statusDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.statusDate"); + else if (Configuration.doAutoCreate()) + this.statusDate = new DateType(); // bb + return this.statusDate; + } + + public boolean hasStatusDateElement() { + return this.statusDate != null && !this.statusDate.isEmpty(); + } + + public boolean hasStatusDate() { + return this.statusDate != null && !this.statusDate.isEmpty(); + } + + /** + * @param value {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value + */ + public Goal setStatusDateElement(DateType value) { + this.statusDate = value; + return this; + } + + /** + * @return Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. + */ + public Date getStatusDate() { + return this.statusDate == null ? null : this.statusDate.getValue(); + } + + /** + * @param value Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. + */ + public Goal setStatusDate(Date value) { + if (value == null) + this.statusDate = null; + else { + if (this.statusDate == null) + this.statusDate = new DateType(); + this.statusDate.setValue(value); + } + return this; + } + + /** + * @return {@link #statusReason} (Captures the reason for the current status.) + */ + public CodeableConcept getStatusReason() { + if (this.statusReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.statusReason"); + else if (Configuration.doAutoCreate()) + this.statusReason = new CodeableConcept(); // cc + return this.statusReason; + } + + public boolean hasStatusReason() { + return this.statusReason != null && !this.statusReason.isEmpty(); + } + + /** + * @param value {@link #statusReason} (Captures the reason for the current status.) + */ + public Goal setStatusReason(CodeableConcept value) { + this.statusReason = value; + return this; + } + + /** + * @return {@link #author} (Indicates whose goal this is - patient goal, practitioner goal, etc.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Indicates whose goal this is - patient goal, practitioner goal, etc.) + */ + public Goal setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.) + */ + public Goal setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Goal.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) + */ + public Goal setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + /** + * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.) + */ + public List getAddresses() { + if (this.addresses == null) + this.addresses = new ArrayList(); + return this.addresses; + } + + public boolean hasAddresses() { + if (this.addresses == null) + return false; + for (Reference item : this.addresses) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.) + */ + // syntactic sugar + public Reference addAddresses() { //3 + Reference t = new Reference(); + if (this.addresses == null) + this.addresses = new ArrayList(); + this.addresses.add(t); + return t; + } + + // syntactic sugar + public Goal addAddresses(Reference t) { //3 + if (t == null) + return this; + if (this.addresses == null) + this.addresses = new ArrayList(); + this.addresses.add(t); + return this; + } + + /** + * @return {@link #addresses} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The identified conditions and other health record elements that are intended to be addressed by the goal.) + */ + public List getAddressesTarget() { + if (this.addressesTarget == null) + this.addressesTarget = new ArrayList(); + return this.addressesTarget; + } + + /** + * @return {@link #note} (Any comments related to the goal.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Any comments related to the goal.) + */ + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public Goal addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return {@link #outcome} (Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.) + */ + public List getOutcome() { + if (this.outcome == null) + this.outcome = new ArrayList(); + return this.outcome; + } + + public boolean hasOutcome() { + if (this.outcome == null) + return false; + for (GoalOutcomeComponent item : this.outcome) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #outcome} (Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.) + */ + // syntactic sugar + public GoalOutcomeComponent addOutcome() { //3 + GoalOutcomeComponent t = new GoalOutcomeComponent(); + if (this.outcome == null) + this.outcome = new ArrayList(); + this.outcome.add(t); + return t; + } + + // syntactic sugar + public Goal addOutcome(GoalOutcomeComponent t) { //3 + if (t == null) + return this; + if (this.outcome == null) + this.outcome = new ArrayList(); + this.outcome.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("target[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("description", "string", "Human-readable description of a specific desired objective of care.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("status", "code", "Indicates whether the goal has been reached and is still considered relevant.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("statusDate", "date", "Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", 0, java.lang.Integer.MAX_VALUE, statusDate)); + childrenList.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current status.", 0, java.lang.Integer.MAX_VALUE, statusReason)); + childrenList.add(new Property("author", "Reference(Patient|Practitioner|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("addresses", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ProcedureRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses)); + childrenList.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("outcome", "", "Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.", 0, java.lang.Integer.MAX_VALUE, outcome)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("start[x]")) + this.start = (Type) value; // Type + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("category")) + this.getCategory().add(castToCodeableConcept(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("status")) + this.status = new GoalStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("statusDate")) + this.statusDate = castToDate(value); // DateType + else if (name.equals("statusReason")) + this.statusReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("priority")) + this.priority = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("addresses")) + this.getAddresses().add(castToReference(value)); + else if (name.equals("note")) + this.getNote().add(castToAnnotation(value)); + else if (name.equals("outcome")) + this.getOutcome().add((GoalOutcomeComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("startDate")) { + this.start = new DateType(); + return this.start; + } + else if (name.equals("startCodeableConcept")) { + this.start = new CodeableConcept(); + return this.start; + } + else if (name.equals("targetDate")) { + this.target = new DateType(); + return this.target; + } + else if (name.equals("targetDuration")) { + this.target = new Duration(); + return this.target; + } + else if (name.equals("category")) { + return addCategory(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Goal.description"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Goal.status"); + } + else if (name.equals("statusDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Goal.statusDate"); + } + else if (name.equals("statusReason")) { + this.statusReason = new CodeableConcept(); + return this.statusReason; + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else if (name.equals("addresses")) { + return addAddresses(); + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("outcome")) { + return addOutcome(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Goal"; + + } + + public Goal copy() { + Goal dst = new Goal(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.start = start == null ? null : start.copy(); + dst.target = target == null ? null : target.copy(); + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + dst.status = status == null ? null : status.copy(); + dst.statusDate = statusDate == null ? null : statusDate.copy(); + dst.statusReason = statusReason == null ? null : statusReason.copy(); + dst.author = author == null ? null : author.copy(); + dst.priority = priority == null ? null : priority.copy(); + if (addresses != null) { + dst.addresses = new ArrayList(); + for (Reference i : addresses) + dst.addresses.add(i.copy()); + }; + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + if (outcome != null) { + dst.outcome = new ArrayList(); + for (GoalOutcomeComponent i : outcome) + dst.outcome.add(i.copy()); + }; + return dst; + } + + protected Goal typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Goal)) + return false; + Goal o = (Goal) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true) + && compareDeep(target, o.target, true) && compareDeep(category, o.category, true) && compareDeep(description, o.description, true) + && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true) + && compareDeep(author, o.author, true) && compareDeep(priority, o.priority, true) && compareDeep(addresses, o.addresses, true) + && compareDeep(note, o.note, true) && compareDeep(outcome, o.outcome, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Goal)) + return false; + Goal o = (Goal) other; + return compareValues(description, o.description, true) && compareValues(status, o.status, true) && compareValues(statusDate, o.statusDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) + && (start == null || start.isEmpty()) && (target == null || target.isEmpty()) && (category == null || category.isEmpty()) + && (description == null || description.isEmpty()) && (status == null || status.isEmpty()) + && (statusDate == null || statusDate.isEmpty()) && (statusReason == null || statusReason.isEmpty()) + && (author == null || author.isEmpty()) && (priority == null || priority.isEmpty()) && (addresses == null || addresses.isEmpty()) + && (note == null || note.isEmpty()) && (outcome == null || outcome.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Goal; + } + + @SearchParamDefinition(name="identifier", path="Goal.identifier", description="External Ids for this goal", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="Goal.subject", description="Who this goal is intended for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="targetdate", path="Goal.targetDate", description="Reach goal on or before", type="date" ) + public static final String SP_TARGETDATE = "targetdate"; + @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="status", path="Goal.status", description="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Group.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Group.java new file mode 100644 index 00000000000..db74c30dd1d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Group.java @@ -0,0 +1,1297 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ +@ResourceDef(name="Group", profile="http://hl7.org/fhir/Profile/Group") +public class Group extends DomainResource { + + public enum GroupType { + /** + * Group contains "person" Patient resources + */ + PERSON, + /** + * Group contains "animal" Patient resources + */ + ANIMAL, + /** + * Group contains healthcare practitioner resources + */ + PRACTITIONER, + /** + * Group contains Device resources + */ + DEVICE, + /** + * Group contains Medication resources + */ + MEDICATION, + /** + * Group contains Substance resources + */ + SUBSTANCE, + /** + * added to help the parsers + */ + NULL; + public static GroupType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("animal".equals(codeString)) + return ANIMAL; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("device".equals(codeString)) + return DEVICE; + if ("medication".equals(codeString)) + return MEDICATION; + if ("substance".equals(codeString)) + return SUBSTANCE; + throw new FHIRException("Unknown GroupType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case ANIMAL: return "animal"; + case PRACTITIONER: return "practitioner"; + case DEVICE: return "device"; + case MEDICATION: return "medication"; + case SUBSTANCE: return "substance"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PERSON: return "http://hl7.org/fhir/group-type"; + case ANIMAL: return "http://hl7.org/fhir/group-type"; + case PRACTITIONER: return "http://hl7.org/fhir/group-type"; + case DEVICE: return "http://hl7.org/fhir/group-type"; + case MEDICATION: return "http://hl7.org/fhir/group-type"; + case SUBSTANCE: return "http://hl7.org/fhir/group-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PERSON: return "Group contains \"person\" Patient resources"; + case ANIMAL: return "Group contains \"animal\" Patient resources"; + case PRACTITIONER: return "Group contains healthcare practitioner resources"; + case DEVICE: return "Group contains Device resources"; + case MEDICATION: return "Group contains Medication resources"; + case SUBSTANCE: return "Group contains Substance resources"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case ANIMAL: return "Animal"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + case MEDICATION: return "Medication"; + case SUBSTANCE: return "Substance"; + default: return "?"; + } + } + } + + public static class GroupTypeEnumFactory implements EnumFactory { + public GroupType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return GroupType.PERSON; + if ("animal".equals(codeString)) + return GroupType.ANIMAL; + if ("practitioner".equals(codeString)) + return GroupType.PRACTITIONER; + if ("device".equals(codeString)) + return GroupType.DEVICE; + if ("medication".equals(codeString)) + return GroupType.MEDICATION; + if ("substance".equals(codeString)) + return GroupType.SUBSTANCE; + throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return new Enumeration(this, GroupType.PERSON); + if ("animal".equals(codeString)) + return new Enumeration(this, GroupType.ANIMAL); + if ("practitioner".equals(codeString)) + return new Enumeration(this, GroupType.PRACTITIONER); + if ("device".equals(codeString)) + return new Enumeration(this, GroupType.DEVICE); + if ("medication".equals(codeString)) + return new Enumeration(this, GroupType.MEDICATION); + if ("substance".equals(codeString)) + return new Enumeration(this, GroupType.SUBSTANCE); + throw new FHIRException("Unknown GroupType code '"+codeString+"'"); + } + public String toCode(GroupType code) { + if (code == GroupType.PERSON) + return "person"; + if (code == GroupType.ANIMAL) + return "animal"; + if (code == GroupType.PRACTITIONER) + return "practitioner"; + if (code == GroupType.DEVICE) + return "device"; + if (code == GroupType.MEDICATION) + return "medication"; + if (code == GroupType.SUBSTANCE) + return "substance"; + return "?"; + } + } + + @Block() + public static class GroupCharacteristicComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code that identifies the kind of trait being asserted. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Kind of characteristic", formalDefinition="A code that identifies the kind of trait being asserted." ) + protected CodeableConcept code; + + /** + * The value of the trait that holds (or does not hold - see 'exclude') for members of the group. + */ + @Child(name = "value", type = {CodeableConcept.class, BooleanType.class, Quantity.class, Range.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value held by characteristic", formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group." ) + protected Type value; + + /** + * If true, indicates the characteristic is one that is NOT held by members of the group. + */ + @Child(name = "exclude", type = {BooleanType.class}, order=3, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="Group includes or excludes", formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group." ) + protected BooleanType exclude; + + /** + * The period over which the characteristic is tested; e.g. the patient had an operation during the month of June. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period over which characteristic is tested", formalDefinition="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June." ) + protected Period period; + + private static final long serialVersionUID = -1000688967L; + + /* + * Constructor + */ + public GroupCharacteristicComponent() { + super(); + } + + /* + * Constructor + */ + public GroupCharacteristicComponent(CodeableConcept code, Type value, BooleanType exclude) { + super(); + this.code = code; + this.value = value; + this.exclude = exclude; + } + + /** + * @return {@link #code} (A code that identifies the kind of trait being asserted.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupCharacteristicComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code that identifies the kind of trait being asserted.) + */ + public GroupCharacteristicComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public CodeableConcept getValueCodeableConcept() throws FHIRException { + if (!(this.value instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); + return (CodeableConcept) this.value; + } + + public boolean hasValueCodeableConcept() { + return this.value instanceof CodeableConcept; + } + + /** + * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public Quantity getValueQuantity() throws FHIRException { + if (!(this.value instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Quantity) this.value; + } + + public boolean hasValueQuantity() { + return this.value instanceof Quantity; + } + + /** + * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public Range getValueRange() throws FHIRException { + if (!(this.value instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Range) this.value; + } + + public boolean hasValueRange() { + return this.value instanceof Range; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) + */ + public GroupCharacteristicComponent setValue(Type value) { + this.value = value; + return this; + } + + /** + * @return {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value + */ + public BooleanType getExcludeElement() { + if (this.exclude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupCharacteristicComponent.exclude"); + else if (Configuration.doAutoCreate()) + this.exclude = new BooleanType(); // bb + return this.exclude; + } + + public boolean hasExcludeElement() { + return this.exclude != null && !this.exclude.isEmpty(); + } + + public boolean hasExclude() { + return this.exclude != null && !this.exclude.isEmpty(); + } + + /** + * @param value {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value + */ + public GroupCharacteristicComponent setExcludeElement(BooleanType value) { + this.exclude = value; + return this; + } + + /** + * @return If true, indicates the characteristic is one that is NOT held by members of the group. + */ + public boolean getExclude() { + return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue(); + } + + /** + * @param value If true, indicates the characteristic is one that is NOT held by members of the group. + */ + public GroupCharacteristicComponent setExclude(boolean value) { + if (this.exclude == null) + this.exclude = new BooleanType(); + this.exclude.setValue(value); + return this; + } + + /** + * @return {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupCharacteristicComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.) + */ + public GroupCharacteristicComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("value[x]", "CodeableConcept|boolean|Quantity|Range", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, java.lang.Integer.MAX_VALUE, exclude)); + childrenList.add(new Property("period", "Period", "The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else if (name.equals("exclude")) + this.exclude = castToBoolean(value); // BooleanType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("exclude")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.exclude"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public GroupCharacteristicComponent copy() { + GroupCharacteristicComponent dst = new GroupCharacteristicComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.value = value == null ? null : value.copy(); + dst.exclude = exclude == null ? null : exclude.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GroupCharacteristicComponent)) + return false; + GroupCharacteristicComponent o = (GroupCharacteristicComponent) other; + return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(exclude, o.exclude, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GroupCharacteristicComponent)) + return false; + GroupCharacteristicComponent o = (GroupCharacteristicComponent) other; + return compareValues(exclude, o.exclude, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) + && (exclude == null || exclude.isEmpty()) && (period == null || period.isEmpty()); + } + + public String fhirType() { + return "Group.characteristic"; + + } + + } + + @Block() + public static class GroupMemberComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A reference to the entity that is a member of the group. Must be consistent with Group.type. + */ + @Child(name = "entity", type = {Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reference to the group member", formalDefinition="A reference to the entity that is a member of the group. Must be consistent with Group.type." ) + protected Reference entity; + + /** + * The actual object that is the target of the reference (A reference to the entity that is a member of the group. Must be consistent with Group.type.) + */ + protected Resource entityTarget; + + /** + * The period that the member was in the group, if known. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period member belonged to the group", formalDefinition="The period that the member was in the group, if known." ) + protected Period period; + + /** + * A flag to indicate that the member is no longer in the group, but previously may have been a member. + */ + @Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If member is no longer in group", formalDefinition="A flag to indicate that the member is no longer in the group, but previously may have been a member." ) + protected BooleanType inactive; + + private static final long serialVersionUID = -333869055L; + + /* + * Constructor + */ + public GroupMemberComponent() { + super(); + } + + /* + * Constructor + */ + public GroupMemberComponent(Reference entity) { + super(); + this.entity = entity; + } + + /** + * @return {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type.) + */ + public Reference getEntity() { + if (this.entity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupMemberComponent.entity"); + else if (Configuration.doAutoCreate()) + this.entity = new Reference(); // cc + return this.entity; + } + + public boolean hasEntity() { + return this.entity != null && !this.entity.isEmpty(); + } + + /** + * @param value {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type.) + */ + public GroupMemberComponent setEntity(Reference value) { + this.entity = value; + return this; + } + + /** + * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type.) + */ + public Resource getEntityTarget() { + return this.entityTarget; + } + + /** + * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type.) + */ + public GroupMemberComponent setEntityTarget(Resource value) { + this.entityTarget = value; + return this; + } + + /** + * @return {@link #period} (The period that the member was in the group, if known.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupMemberComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period that the member was in the group, if known.) + */ + public GroupMemberComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value + */ + public BooleanType getInactiveElement() { + if (this.inactive == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GroupMemberComponent.inactive"); + else if (Configuration.doAutoCreate()) + this.inactive = new BooleanType(); // bb + return this.inactive; + } + + public boolean hasInactiveElement() { + return this.inactive != null && !this.inactive.isEmpty(); + } + + public boolean hasInactive() { + return this.inactive != null && !this.inactive.isEmpty(); + } + + /** + * @param value {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value + */ + public GroupMemberComponent setInactiveElement(BooleanType value) { + this.inactive = value; + return this; + } + + /** + * @return A flag to indicate that the member is no longer in the group, but previously may have been a member. + */ + public boolean getInactive() { + return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue(); + } + + /** + * @param value A flag to indicate that the member is no longer in the group, but previously may have been a member. + */ + public GroupMemberComponent setInactive(boolean value) { + if (this.inactive == null) + this.inactive = new BooleanType(); + this.inactive.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("entity", "Reference(Patient|Practitioner|Device|Medication|Substance)", "A reference to the entity that is a member of the group. Must be consistent with Group.type.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("period", "Period", "The period that the member was in the group, if known.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, java.lang.Integer.MAX_VALUE, inactive)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("entity")) + this.entity = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("inactive")) + this.inactive = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("entity")) { + this.entity = new Reference(); + return this.entity; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("inactive")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.inactive"); + } + else + return super.addChild(name); + } + + public GroupMemberComponent copy() { + GroupMemberComponent dst = new GroupMemberComponent(); + copyValues(dst); + dst.entity = entity == null ? null : entity.copy(); + dst.period = period == null ? null : period.copy(); + dst.inactive = inactive == null ? null : inactive.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GroupMemberComponent)) + return false; + GroupMemberComponent o = (GroupMemberComponent) other; + return compareDeep(entity, o.entity, true) && compareDeep(period, o.period, true) && compareDeep(inactive, o.inactive, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GroupMemberComponent)) + return false; + GroupMemberComponent o = (GroupMemberComponent) other; + return compareValues(inactive, o.inactive, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (entity == null || entity.isEmpty()) && (period == null || period.isEmpty()) + && (inactive == null || inactive.isEmpty()); + } + + public String fhirType() { + return "Group.member"; + + } + + } + + /** + * A unique business identifier for this group. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique id", formalDefinition="A unique business identifier for this group." ) + protected List identifier; + + /** + * Identifies the broad classification of the kind of resources the group includes. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="person | animal | practitioner | device | medication | substance", formalDefinition="Identifies the broad classification of the kind of resources the group includes." ) + protected Enumeration type; + + /** + * If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. + */ + @Child(name = "actual", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Descriptive or actual", formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals." ) + protected BooleanType actual; + + /** + * Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of Group members", formalDefinition="Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc." ) + protected CodeableConcept code; + + /** + * A label assigned to the group for human identification and communication. + */ + @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Label for Group", formalDefinition="A label assigned to the group for human identification and communication." ) + protected StringType name; + + /** + * A count of the number of resource instances that are part of the group. + */ + @Child(name = "quantity", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of members", formalDefinition="A count of the number of resource instances that are part of the group." ) + protected UnsignedIntType quantity; + + /** + * Identifies the traits shared by members of the group. + */ + @Child(name = "characteristic", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Trait of group members", formalDefinition="Identifies the traits shared by members of the group." ) + protected List characteristic; + + /** + * Identifies the resource instances that are members of the group. + */ + @Child(name = "member", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Who or what is in group", formalDefinition="Identifies the resource instances that are members of the group." ) + protected List member; + + private static final long serialVersionUID = 1401345819L; + + /* + * Constructor + */ + public Group() { + super(); + } + + /* + * Constructor + */ + public Group(Enumeration type, BooleanType actual) { + super(); + this.type = type; + this.actual = actual; + } + + /** + * @return {@link #identifier} (A unique business identifier for this group.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A unique business identifier for this group.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Group addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Group.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new GroupTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Group setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Identifies the broad classification of the kind of resources the group includes. + */ + public GroupType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Identifies the broad classification of the kind of resources the group includes. + */ + public Group setType(GroupType value) { + if (this.type == null) + this.type = new Enumeration(new GroupTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #actual} (If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value + */ + public BooleanType getActualElement() { + if (this.actual == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Group.actual"); + else if (Configuration.doAutoCreate()) + this.actual = new BooleanType(); // bb + return this.actual; + } + + public boolean hasActualElement() { + return this.actual != null && !this.actual.isEmpty(); + } + + public boolean hasActual() { + return this.actual != null && !this.actual.isEmpty(); + } + + /** + * @param value {@link #actual} (If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value + */ + public Group setActualElement(BooleanType value) { + this.actual = value; + return this; + } + + /** + * @return If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. + */ + public boolean getActual() { + return this.actual == null || this.actual.isEmpty() ? false : this.actual.getValue(); + } + + /** + * @param value If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. + */ + public Group setActual(boolean value) { + if (this.actual == null) + this.actual = new BooleanType(); + this.actual.setValue(value); + return this; + } + + /** + * @return {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Group.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.) + */ + public Group setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Group.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Group setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A label assigned to the group for human identification and communication. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A label assigned to the group for human identification and communication. + */ + public Group setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value + */ + public UnsignedIntType getQuantityElement() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Group.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new UnsignedIntType(); // bb + return this.quantity; + } + + public boolean hasQuantityElement() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value + */ + public Group setQuantityElement(UnsignedIntType value) { + this.quantity = value; + return this; + } + + /** + * @return A count of the number of resource instances that are part of the group. + */ + public int getQuantity() { + return this.quantity == null || this.quantity.isEmpty() ? 0 : this.quantity.getValue(); + } + + /** + * @param value A count of the number of resource instances that are part of the group. + */ + public Group setQuantity(int value) { + if (this.quantity == null) + this.quantity = new UnsignedIntType(); + this.quantity.setValue(value); + return this; + } + + /** + * @return {@link #characteristic} (Identifies the traits shared by members of the group.) + */ + public List getCharacteristic() { + if (this.characteristic == null) + this.characteristic = new ArrayList(); + return this.characteristic; + } + + public boolean hasCharacteristic() { + if (this.characteristic == null) + return false; + for (GroupCharacteristicComponent item : this.characteristic) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #characteristic} (Identifies the traits shared by members of the group.) + */ + // syntactic sugar + public GroupCharacteristicComponent addCharacteristic() { //3 + GroupCharacteristicComponent t = new GroupCharacteristicComponent(); + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return t; + } + + // syntactic sugar + public Group addCharacteristic(GroupCharacteristicComponent t) { //3 + if (t == null) + return this; + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return this; + } + + /** + * @return {@link #member} (Identifies the resource instances that are members of the group.) + */ + public List getMember() { + if (this.member == null) + this.member = new ArrayList(); + return this.member; + } + + public boolean hasMember() { + if (this.member == null) + return false; + for (GroupMemberComponent item : this.member) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #member} (Identifies the resource instances that are members of the group.) + */ + // syntactic sugar + public GroupMemberComponent addMember() { //3 + GroupMemberComponent t = new GroupMemberComponent(); + if (this.member == null) + this.member = new ArrayList(); + this.member.add(t); + return t; + } + + // syntactic sugar + public Group addMember(GroupMemberComponent t) { //3 + if (t == null) + return this; + if (this.member == null) + this.member = new ArrayList(); + this.member.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique business identifier for this group.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "code", "Identifies the broad classification of the kind of resources the group includes.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("actual", "boolean", "If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.", 0, java.lang.Integer.MAX_VALUE, actual)); + childrenList.add(new Property("code", "CodeableConcept", "Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("characteristic", "", "Identifies the traits shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic)); + childrenList.add(new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("type")) + this.type = new GroupTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("actual")) + this.actual = castToBoolean(value); // BooleanType + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("quantity")) + this.quantity = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("characteristic")) + this.getCharacteristic().add((GroupCharacteristicComponent) value); + else if (name.equals("member")) + this.getMember().add((GroupMemberComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.type"); + } + else if (name.equals("actual")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.actual"); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.name"); + } + else if (name.equals("quantity")) { + throw new FHIRException("Cannot call addChild on a primitive type Group.quantity"); + } + else if (name.equals("characteristic")) { + return addCharacteristic(); + } + else if (name.equals("member")) { + return addMember(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Group"; + + } + + public Group copy() { + Group dst = new Group(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.actual = actual == null ? null : actual.copy(); + dst.code = code == null ? null : code.copy(); + dst.name = name == null ? null : name.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + if (characteristic != null) { + dst.characteristic = new ArrayList(); + for (GroupCharacteristicComponent i : characteristic) + dst.characteristic.add(i.copy()); + }; + if (member != null) { + dst.member = new ArrayList(); + for (GroupMemberComponent i : member) + dst.member.add(i.copy()); + }; + return dst; + } + + protected Group typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Group)) + return false; + Group o = (Group) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(actual, o.actual, true) + && compareDeep(code, o.code, true) && compareDeep(name, o.name, true) && compareDeep(quantity, o.quantity, true) + && compareDeep(characteristic, o.characteristic, true) && compareDeep(member, o.member, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Group)) + return false; + Group o = (Group) other; + return compareValues(type, o.type, true) && compareValues(actual, o.actual, true) && compareValues(name, o.name, true) + && compareValues(quantity, o.quantity, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) + && (actual == null || actual.isEmpty()) && (code == null || code.isEmpty()) && (name == null || name.isEmpty()) + && (quantity == null || quantity.isEmpty()) && (characteristic == null || characteristic.isEmpty()) + && (member == null || member.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Group; + } + + @SearchParamDefinition(name="actual", path="Group.actual", description="Descriptive or actual", type="token" ) + public static final String SP_ACTUAL = "actual"; + @SearchParamDefinition(name="identifier", path="Group.identifier", description="Unique id", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="characteristic-value", path="", description="A composite of both characteristic and value", type="composite" ) + public static final String SP_CHARACTERISTICVALUE = "characteristic-value"; + @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference" ) + public static final String SP_MEMBER = "member"; + @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" ) + public static final String SP_EXCLUDE = "exclude"; + @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="Value held by characteristic", type="token" ) + public static final String SP_VALUE = "value"; + @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" ) + public static final String SP_CHARACTERISTIC = "characteristic"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceRequest.java new file mode 100644 index 00000000000..fd1b052f38f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceRequest.java @@ -0,0 +1,912 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A guidance request is a request to evaluate a particular knowledge module focused on decision support, providing information relevant to decision support such as workflow and user context. + */ +@ResourceDef(name="GuidanceRequest", profile="http://hl7.org/fhir/Profile/GuidanceRequest") +public class GuidanceRequest extends DomainResource { + + /** + * A reference to a knowledge module involved in an interaction. + */ + @Child(name = "module", type = {DecisionSupportRule.class, DecisionSupportServiceModule.class}, order=0, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="A reference to a knowledge module", formalDefinition="A reference to a knowledge module involved in an interaction." ) + protected Reference module; + + /** + * The actual object that is the target of the reference (A reference to a knowledge module involved in an interaction.) + */ + protected Resource moduleTarget; + + /** + * The date and time of the request, with respect to the initiator. + */ + @Child(name = "dateTime", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The date and time of the request", formalDefinition="The date and time of the request, with respect to the initiator." ) + protected DateTimeType dateTime; + + /** + * Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed. + */ + @Child(name = "evaluateAtDateTime", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates that the evaluation should be performed as though it was the given date and time", formalDefinition="Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to \"Now\" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed." ) + protected DateTimeType evaluateAtDateTime; + + /** + * The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources. + */ + @Child(name = "inputParameters", type = {Parameters.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The input parameters for a request, if any", formalDefinition="The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources." ) + protected Reference inputParameters; + + /** + * The actual object that is the target of the reference (The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.) + */ + protected Parameters inputParametersTarget; + + /** + * The organization initiating the request. + */ + @Child(name = "initiatingOrganization", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The organization initiating the request." ) + protected Reference initiatingOrganization; + + /** + * The actual object that is the target of the reference (The organization initiating the request.) + */ + protected Organization initiatingOrganizationTarget; + + /** + * The person initiating the request. + */ + @Child(name = "initiatingPerson", type = {Person.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The person initiating the request." ) + protected Reference initiatingPerson; + + /** + * The actual object that is the target of the reference (The person initiating the request.) + */ + protected Resource initiatingPersonTarget; + + /** + * The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.). + */ + @Child(name = "userType", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of user initiating the request", formalDefinition="The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)." ) + protected CodeableConcept userType; + + /** + * Preferred language of the person using the system. + */ + @Child(name = "userLanguage", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Preferred language of the person using the system." ) + protected CodeableConcept userLanguage; + + /** + * The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources. + */ + @Child(name = "userTaskContext", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The task the system user is performing", formalDefinition="The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources." ) + protected CodeableConcept userTaskContext; + + /** + * The organization that will receive the response. + */ + @Child(name = "receivingOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The organization that will receive the response." ) + protected Reference receivingOrganization; + + /** + * The actual object that is the target of the reference (The organization that will receive the response.) + */ + protected Organization receivingOrganizationTarget; + + /** + * The person in the receiving organization that will receive the response. + */ + @Child(name = "receivingPerson", type = {Person.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The person in the receiving organization that will receive the response." ) + protected Reference receivingPerson; + + /** + * The actual object that is the target of the reference (The person in the receiving organization that will receive the response.) + */ + protected Resource receivingPersonTarget; + + /** + * The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.). + */ + @Child(name = "recipientType", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.)." ) + protected CodeableConcept recipientType; + + /** + * Preferred language of the person that will consume the content. + */ + @Child(name = "recipientLanguage", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Preferred language of the person that will consume the content." ) + protected CodeableConcept recipientLanguage; + + /** + * The class of encounter (inpatient, outpatient, etc). + */ + @Child(name = "encounterClass", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The class of encounter (inpatient, outpatient, etc)." ) + protected CodeableConcept encounterClass; + + /** + * The type of the encounter. + */ + @Child(name = "encounterType", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The type of the encounter." ) + protected CodeableConcept encounterType; + + private static final long serialVersionUID = -1810099048L; + + /* + * Constructor + */ + public GuidanceRequest() { + super(); + } + + /* + * Constructor + */ + public GuidanceRequest(Reference module) { + super(); + this.module = module; + } + + /** + * @return {@link #module} (A reference to a knowledge module involved in an interaction.) + */ + public Reference getModule() { + if (this.module == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.module"); + else if (Configuration.doAutoCreate()) + this.module = new Reference(); // cc + return this.module; + } + + public boolean hasModule() { + return this.module != null && !this.module.isEmpty(); + } + + /** + * @param value {@link #module} (A reference to a knowledge module involved in an interaction.) + */ + public GuidanceRequest setModule(Reference value) { + this.module = value; + return this; + } + + /** + * @return {@link #module} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + */ + public Resource getModuleTarget() { + return this.moduleTarget; + } + + /** + * @param value {@link #module} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + */ + public GuidanceRequest setModuleTarget(Resource value) { + this.moduleTarget = value; + return this; + } + + /** + * @return {@link #dateTime} (The date and time of the request, with respect to the initiator.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public DateTimeType getDateTimeElement() { + if (this.dateTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.dateTime"); + else if (Configuration.doAutoCreate()) + this.dateTime = new DateTimeType(); // bb + return this.dateTime; + } + + public boolean hasDateTimeElement() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + public boolean hasDateTime() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + /** + * @param value {@link #dateTime} (The date and time of the request, with respect to the initiator.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public GuidanceRequest setDateTimeElement(DateTimeType value) { + this.dateTime = value; + return this; + } + + /** + * @return The date and time of the request, with respect to the initiator. + */ + public Date getDateTime() { + return this.dateTime == null ? null : this.dateTime.getValue(); + } + + /** + * @param value The date and time of the request, with respect to the initiator. + */ + public GuidanceRequest setDateTime(Date value) { + if (value == null) + this.dateTime = null; + else { + if (this.dateTime == null) + this.dateTime = new DateTimeType(); + this.dateTime.setValue(value); + } + return this; + } + + /** + * @return {@link #evaluateAtDateTime} (Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed.). This is the underlying object with id, value and extensions. The accessor "getEvaluateAtDateTime" gives direct access to the value + */ + public DateTimeType getEvaluateAtDateTimeElement() { + if (this.evaluateAtDateTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.evaluateAtDateTime"); + else if (Configuration.doAutoCreate()) + this.evaluateAtDateTime = new DateTimeType(); // bb + return this.evaluateAtDateTime; + } + + public boolean hasEvaluateAtDateTimeElement() { + return this.evaluateAtDateTime != null && !this.evaluateAtDateTime.isEmpty(); + } + + public boolean hasEvaluateAtDateTime() { + return this.evaluateAtDateTime != null && !this.evaluateAtDateTime.isEmpty(); + } + + /** + * @param value {@link #evaluateAtDateTime} (Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed.). This is the underlying object with id, value and extensions. The accessor "getEvaluateAtDateTime" gives direct access to the value + */ + public GuidanceRequest setEvaluateAtDateTimeElement(DateTimeType value) { + this.evaluateAtDateTime = value; + return this; + } + + /** + * @return Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed. + */ + public Date getEvaluateAtDateTime() { + return this.evaluateAtDateTime == null ? null : this.evaluateAtDateTime.getValue(); + } + + /** + * @param value Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed. + */ + public GuidanceRequest setEvaluateAtDateTime(Date value) { + if (value == null) + this.evaluateAtDateTime = null; + else { + if (this.evaluateAtDateTime == null) + this.evaluateAtDateTime = new DateTimeType(); + this.evaluateAtDateTime.setValue(value); + } + return this; + } + + /** + * @return {@link #inputParameters} (The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.) + */ + public Reference getInputParameters() { + if (this.inputParameters == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.inputParameters"); + else if (Configuration.doAutoCreate()) + this.inputParameters = new Reference(); // cc + return this.inputParameters; + } + + public boolean hasInputParameters() { + return this.inputParameters != null && !this.inputParameters.isEmpty(); + } + + /** + * @param value {@link #inputParameters} (The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.) + */ + public GuidanceRequest setInputParameters(Reference value) { + this.inputParameters = value; + return this; + } + + /** + * @return {@link #inputParameters} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.) + */ + public Parameters getInputParametersTarget() { + if (this.inputParametersTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.inputParameters"); + else if (Configuration.doAutoCreate()) + this.inputParametersTarget = new Parameters(); // aa + return this.inputParametersTarget; + } + + /** + * @param value {@link #inputParameters} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.) + */ + public GuidanceRequest setInputParametersTarget(Parameters value) { + this.inputParametersTarget = value; + return this; + } + + /** + * @return {@link #initiatingOrganization} (The organization initiating the request.) + */ + public Reference getInitiatingOrganization() { + if (this.initiatingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.initiatingOrganization"); + else if (Configuration.doAutoCreate()) + this.initiatingOrganization = new Reference(); // cc + return this.initiatingOrganization; + } + + public boolean hasInitiatingOrganization() { + return this.initiatingOrganization != null && !this.initiatingOrganization.isEmpty(); + } + + /** + * @param value {@link #initiatingOrganization} (The organization initiating the request.) + */ + public GuidanceRequest setInitiatingOrganization(Reference value) { + this.initiatingOrganization = value; + return this; + } + + /** + * @return {@link #initiatingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization initiating the request.) + */ + public Organization getInitiatingOrganizationTarget() { + if (this.initiatingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.initiatingOrganization"); + else if (Configuration.doAutoCreate()) + this.initiatingOrganizationTarget = new Organization(); // aa + return this.initiatingOrganizationTarget; + } + + /** + * @param value {@link #initiatingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization initiating the request.) + */ + public GuidanceRequest setInitiatingOrganizationTarget(Organization value) { + this.initiatingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #initiatingPerson} (The person initiating the request.) + */ + public Reference getInitiatingPerson() { + if (this.initiatingPerson == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.initiatingPerson"); + else if (Configuration.doAutoCreate()) + this.initiatingPerson = new Reference(); // cc + return this.initiatingPerson; + } + + public boolean hasInitiatingPerson() { + return this.initiatingPerson != null && !this.initiatingPerson.isEmpty(); + } + + /** + * @param value {@link #initiatingPerson} (The person initiating the request.) + */ + public GuidanceRequest setInitiatingPerson(Reference value) { + this.initiatingPerson = value; + return this; + } + + /** + * @return {@link #initiatingPerson} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person initiating the request.) + */ + public Resource getInitiatingPersonTarget() { + return this.initiatingPersonTarget; + } + + /** + * @param value {@link #initiatingPerson} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person initiating the request.) + */ + public GuidanceRequest setInitiatingPersonTarget(Resource value) { + this.initiatingPersonTarget = value; + return this; + } + + /** + * @return {@link #userType} (The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.).) + */ + public CodeableConcept getUserType() { + if (this.userType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.userType"); + else if (Configuration.doAutoCreate()) + this.userType = new CodeableConcept(); // cc + return this.userType; + } + + public boolean hasUserType() { + return this.userType != null && !this.userType.isEmpty(); + } + + /** + * @param value {@link #userType} (The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.).) + */ + public GuidanceRequest setUserType(CodeableConcept value) { + this.userType = value; + return this; + } + + /** + * @return {@link #userLanguage} (Preferred language of the person using the system.) + */ + public CodeableConcept getUserLanguage() { + if (this.userLanguage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.userLanguage"); + else if (Configuration.doAutoCreate()) + this.userLanguage = new CodeableConcept(); // cc + return this.userLanguage; + } + + public boolean hasUserLanguage() { + return this.userLanguage != null && !this.userLanguage.isEmpty(); + } + + /** + * @param value {@link #userLanguage} (Preferred language of the person using the system.) + */ + public GuidanceRequest setUserLanguage(CodeableConcept value) { + this.userLanguage = value; + return this; + } + + /** + * @return {@link #userTaskContext} (The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources.) + */ + public CodeableConcept getUserTaskContext() { + if (this.userTaskContext == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.userTaskContext"); + else if (Configuration.doAutoCreate()) + this.userTaskContext = new CodeableConcept(); // cc + return this.userTaskContext; + } + + public boolean hasUserTaskContext() { + return this.userTaskContext != null && !this.userTaskContext.isEmpty(); + } + + /** + * @param value {@link #userTaskContext} (The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources.) + */ + public GuidanceRequest setUserTaskContext(CodeableConcept value) { + this.userTaskContext = value; + return this; + } + + /** + * @return {@link #receivingOrganization} (The organization that will receive the response.) + */ + public Reference getReceivingOrganization() { + if (this.receivingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.receivingOrganization"); + else if (Configuration.doAutoCreate()) + this.receivingOrganization = new Reference(); // cc + return this.receivingOrganization; + } + + public boolean hasReceivingOrganization() { + return this.receivingOrganization != null && !this.receivingOrganization.isEmpty(); + } + + /** + * @param value {@link #receivingOrganization} (The organization that will receive the response.) + */ + public GuidanceRequest setReceivingOrganization(Reference value) { + this.receivingOrganization = value; + return this; + } + + /** + * @return {@link #receivingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that will receive the response.) + */ + public Organization getReceivingOrganizationTarget() { + if (this.receivingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.receivingOrganization"); + else if (Configuration.doAutoCreate()) + this.receivingOrganizationTarget = new Organization(); // aa + return this.receivingOrganizationTarget; + } + + /** + * @param value {@link #receivingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that will receive the response.) + */ + public GuidanceRequest setReceivingOrganizationTarget(Organization value) { + this.receivingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #receivingPerson} (The person in the receiving organization that will receive the response.) + */ + public Reference getReceivingPerson() { + if (this.receivingPerson == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.receivingPerson"); + else if (Configuration.doAutoCreate()) + this.receivingPerson = new Reference(); // cc + return this.receivingPerson; + } + + public boolean hasReceivingPerson() { + return this.receivingPerson != null && !this.receivingPerson.isEmpty(); + } + + /** + * @param value {@link #receivingPerson} (The person in the receiving organization that will receive the response.) + */ + public GuidanceRequest setReceivingPerson(Reference value) { + this.receivingPerson = value; + return this; + } + + /** + * @return {@link #receivingPerson} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person in the receiving organization that will receive the response.) + */ + public Resource getReceivingPersonTarget() { + return this.receivingPersonTarget; + } + + /** + * @param value {@link #receivingPerson} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person in the receiving organization that will receive the response.) + */ + public GuidanceRequest setReceivingPersonTarget(Resource value) { + this.receivingPersonTarget = value; + return this; + } + + /** + * @return {@link #recipientType} (The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.).) + */ + public CodeableConcept getRecipientType() { + if (this.recipientType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.recipientType"); + else if (Configuration.doAutoCreate()) + this.recipientType = new CodeableConcept(); // cc + return this.recipientType; + } + + public boolean hasRecipientType() { + return this.recipientType != null && !this.recipientType.isEmpty(); + } + + /** + * @param value {@link #recipientType} (The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.).) + */ + public GuidanceRequest setRecipientType(CodeableConcept value) { + this.recipientType = value; + return this; + } + + /** + * @return {@link #recipientLanguage} (Preferred language of the person that will consume the content.) + */ + public CodeableConcept getRecipientLanguage() { + if (this.recipientLanguage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.recipientLanguage"); + else if (Configuration.doAutoCreate()) + this.recipientLanguage = new CodeableConcept(); // cc + return this.recipientLanguage; + } + + public boolean hasRecipientLanguage() { + return this.recipientLanguage != null && !this.recipientLanguage.isEmpty(); + } + + /** + * @param value {@link #recipientLanguage} (Preferred language of the person that will consume the content.) + */ + public GuidanceRequest setRecipientLanguage(CodeableConcept value) { + this.recipientLanguage = value; + return this; + } + + /** + * @return {@link #encounterClass} (The class of encounter (inpatient, outpatient, etc).) + */ + public CodeableConcept getEncounterClass() { + if (this.encounterClass == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.encounterClass"); + else if (Configuration.doAutoCreate()) + this.encounterClass = new CodeableConcept(); // cc + return this.encounterClass; + } + + public boolean hasEncounterClass() { + return this.encounterClass != null && !this.encounterClass.isEmpty(); + } + + /** + * @param value {@link #encounterClass} (The class of encounter (inpatient, outpatient, etc).) + */ + public GuidanceRequest setEncounterClass(CodeableConcept value) { + this.encounterClass = value; + return this; + } + + /** + * @return {@link #encounterType} (The type of the encounter.) + */ + public CodeableConcept getEncounterType() { + if (this.encounterType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceRequest.encounterType"); + else if (Configuration.doAutoCreate()) + this.encounterType = new CodeableConcept(); // cc + return this.encounterType; + } + + public boolean hasEncounterType() { + return this.encounterType != null && !this.encounterType.isEmpty(); + } + + /** + * @param value {@link #encounterType} (The type of the encounter.) + */ + public GuidanceRequest setEncounterType(CodeableConcept value) { + this.encounterType = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("module", "Reference(DecisionSupportRule|DecisionSupportServiceModule)", "A reference to a knowledge module involved in an interaction.", 0, java.lang.Integer.MAX_VALUE, module)); + childrenList.add(new Property("dateTime", "dateTime", "The date and time of the request, with respect to the initiator.", 0, java.lang.Integer.MAX_VALUE, dateTime)); + childrenList.add(new Property("evaluateAtDateTime", "dateTime", "Indicates that the evaluation should be performed as though it was the given date and time. The most direct implication of this is that references to \"Now\" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the requestDateTime is assumed.", 0, java.lang.Integer.MAX_VALUE, evaluateAtDateTime)); + childrenList.add(new Property("inputParameters", "Reference(Parameters)", "The input parameters for a request, if any. These parameters are used to provide patient-independent information to the evaluation. Patient-specific information is either accessed directly as part of the evaluation (because the evaluation engine and the patient-data are co-located) or provided as part of the operation input in the form of resources.", 0, java.lang.Integer.MAX_VALUE, inputParameters)); + childrenList.add(new Property("initiatingOrganization", "Reference(Organization)", "The organization initiating the request.", 0, java.lang.Integer.MAX_VALUE, initiatingOrganization)); + childrenList.add(new Property("initiatingPerson", "Reference(Person|Patient|Practitioner|RelatedPerson)", "The person initiating the request.", 0, java.lang.Integer.MAX_VALUE, initiatingPerson)); + childrenList.add(new Property("userType", "CodeableConcept", "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.).", 0, java.lang.Integer.MAX_VALUE, userType)); + childrenList.add(new Property("userLanguage", "CodeableConcept", "Preferred language of the person using the system.", 0, java.lang.Integer.MAX_VALUE, userLanguage)); + childrenList.add(new Property("userTaskContext", "CodeableConcept", "The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources.", 0, java.lang.Integer.MAX_VALUE, userTaskContext)); + childrenList.add(new Property("receivingOrganization", "Reference(Organization)", "The organization that will receive the response.", 0, java.lang.Integer.MAX_VALUE, receivingOrganization)); + childrenList.add(new Property("receivingPerson", "Reference(Person|Patient|Practitioner|RelatedPerson)", "The person in the receiving organization that will receive the response.", 0, java.lang.Integer.MAX_VALUE, receivingPerson)); + childrenList.add(new Property("recipientType", "CodeableConcept", "The type of individual that will consume the response content. This may be different from the requesting user type (e.g. if a clinician is getting disease management guidance for provision to a patient). E.g. patient, healthcare provider or specific type of healthcare provider (physician, nurse, etc.).", 0, java.lang.Integer.MAX_VALUE, recipientType)); + childrenList.add(new Property("recipientLanguage", "CodeableConcept", "Preferred language of the person that will consume the content.", 0, java.lang.Integer.MAX_VALUE, recipientLanguage)); + childrenList.add(new Property("encounterClass", "CodeableConcept", "The class of encounter (inpatient, outpatient, etc).", 0, java.lang.Integer.MAX_VALUE, encounterClass)); + childrenList.add(new Property("encounterType", "CodeableConcept", "The type of the encounter.", 0, java.lang.Integer.MAX_VALUE, encounterType)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("module")) + this.module = castToReference(value); // Reference + else if (name.equals("dateTime")) + this.dateTime = castToDateTime(value); // DateTimeType + else if (name.equals("evaluateAtDateTime")) + this.evaluateAtDateTime = castToDateTime(value); // DateTimeType + else if (name.equals("inputParameters")) + this.inputParameters = castToReference(value); // Reference + else if (name.equals("initiatingOrganization")) + this.initiatingOrganization = castToReference(value); // Reference + else if (name.equals("initiatingPerson")) + this.initiatingPerson = castToReference(value); // Reference + else if (name.equals("userType")) + this.userType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("userLanguage")) + this.userLanguage = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("userTaskContext")) + this.userTaskContext = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("receivingOrganization")) + this.receivingOrganization = castToReference(value); // Reference + else if (name.equals("receivingPerson")) + this.receivingPerson = castToReference(value); // Reference + else if (name.equals("recipientType")) + this.recipientType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("recipientLanguage")) + this.recipientLanguage = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("encounterClass")) + this.encounterClass = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("encounterType")) + this.encounterType = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("module")) { + this.module = new Reference(); + return this.module; + } + else if (name.equals("dateTime")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceRequest.dateTime"); + } + else if (name.equals("evaluateAtDateTime")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceRequest.evaluateAtDateTime"); + } + else if (name.equals("inputParameters")) { + this.inputParameters = new Reference(); + return this.inputParameters; + } + else if (name.equals("initiatingOrganization")) { + this.initiatingOrganization = new Reference(); + return this.initiatingOrganization; + } + else if (name.equals("initiatingPerson")) { + this.initiatingPerson = new Reference(); + return this.initiatingPerson; + } + else if (name.equals("userType")) { + this.userType = new CodeableConcept(); + return this.userType; + } + else if (name.equals("userLanguage")) { + this.userLanguage = new CodeableConcept(); + return this.userLanguage; + } + else if (name.equals("userTaskContext")) { + this.userTaskContext = new CodeableConcept(); + return this.userTaskContext; + } + else if (name.equals("receivingOrganization")) { + this.receivingOrganization = new Reference(); + return this.receivingOrganization; + } + else if (name.equals("receivingPerson")) { + this.receivingPerson = new Reference(); + return this.receivingPerson; + } + else if (name.equals("recipientType")) { + this.recipientType = new CodeableConcept(); + return this.recipientType; + } + else if (name.equals("recipientLanguage")) { + this.recipientLanguage = new CodeableConcept(); + return this.recipientLanguage; + } + else if (name.equals("encounterClass")) { + this.encounterClass = new CodeableConcept(); + return this.encounterClass; + } + else if (name.equals("encounterType")) { + this.encounterType = new CodeableConcept(); + return this.encounterType; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "GuidanceRequest"; + + } + + public GuidanceRequest copy() { + GuidanceRequest dst = new GuidanceRequest(); + copyValues(dst); + dst.module = module == null ? null : module.copy(); + dst.dateTime = dateTime == null ? null : dateTime.copy(); + dst.evaluateAtDateTime = evaluateAtDateTime == null ? null : evaluateAtDateTime.copy(); + dst.inputParameters = inputParameters == null ? null : inputParameters.copy(); + dst.initiatingOrganization = initiatingOrganization == null ? null : initiatingOrganization.copy(); + dst.initiatingPerson = initiatingPerson == null ? null : initiatingPerson.copy(); + dst.userType = userType == null ? null : userType.copy(); + dst.userLanguage = userLanguage == null ? null : userLanguage.copy(); + dst.userTaskContext = userTaskContext == null ? null : userTaskContext.copy(); + dst.receivingOrganization = receivingOrganization == null ? null : receivingOrganization.copy(); + dst.receivingPerson = receivingPerson == null ? null : receivingPerson.copy(); + dst.recipientType = recipientType == null ? null : recipientType.copy(); + dst.recipientLanguage = recipientLanguage == null ? null : recipientLanguage.copy(); + dst.encounterClass = encounterClass == null ? null : encounterClass.copy(); + dst.encounterType = encounterType == null ? null : encounterType.copy(); + return dst; + } + + protected GuidanceRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GuidanceRequest)) + return false; + GuidanceRequest o = (GuidanceRequest) other; + return compareDeep(module, o.module, true) && compareDeep(dateTime, o.dateTime, true) && compareDeep(evaluateAtDateTime, o.evaluateAtDateTime, true) + && compareDeep(inputParameters, o.inputParameters, true) && compareDeep(initiatingOrganization, o.initiatingOrganization, true) + && compareDeep(initiatingPerson, o.initiatingPerson, true) && compareDeep(userType, o.userType, true) + && compareDeep(userLanguage, o.userLanguage, true) && compareDeep(userTaskContext, o.userTaskContext, true) + && compareDeep(receivingOrganization, o.receivingOrganization, true) && compareDeep(receivingPerson, o.receivingPerson, true) + && compareDeep(recipientType, o.recipientType, true) && compareDeep(recipientLanguage, o.recipientLanguage, true) + && compareDeep(encounterClass, o.encounterClass, true) && compareDeep(encounterType, o.encounterType, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GuidanceRequest)) + return false; + GuidanceRequest o = (GuidanceRequest) other; + return compareValues(dateTime, o.dateTime, true) && compareValues(evaluateAtDateTime, o.evaluateAtDateTime, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (module == null || module.isEmpty()) && (dateTime == null || dateTime.isEmpty()) + && (evaluateAtDateTime == null || evaluateAtDateTime.isEmpty()) && (inputParameters == null || inputParameters.isEmpty()) + && (initiatingOrganization == null || initiatingOrganization.isEmpty()) && (initiatingPerson == null || initiatingPerson.isEmpty()) + && (userType == null || userType.isEmpty()) && (userLanguage == null || userLanguage.isEmpty()) + && (userTaskContext == null || userTaskContext.isEmpty()) && (receivingOrganization == null || receivingOrganization.isEmpty()) + && (receivingPerson == null || receivingPerson.isEmpty()) && (recipientType == null || recipientType.isEmpty()) + && (recipientLanguage == null || recipientLanguage.isEmpty()) && (encounterClass == null || encounterClass.isEmpty()) + && (encounterType == null || encounterType.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.GuidanceRequest; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceResponse.java new file mode 100644 index 00000000000..08ead95b16b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/GuidanceResponse.java @@ -0,0 +1,1562 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + */ +@ResourceDef(name="GuidanceResponse", profile="http://hl7.org/fhir/Profile/GuidanceResponse") +public class GuidanceResponse extends DomainResource { + + public enum GuidanceResponseStatus { + /** + * The request was processed successfully + */ + SUCCESS, + /** + * The request was processed successfully, but more data may result in a more complete evaluation + */ + DATAREQUESTED, + /** + * The request was processed, but more data is required to complete the evaluation + */ + DATAREQUIRED, + /** + * The request is currently being processed + */ + INPROGRESS, + /** + * The request was not processed successfully + */ + FAILURE, + /** + * added to help the parsers + */ + NULL; + public static GuidanceResponseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("success".equals(codeString)) + return SUCCESS; + if ("data-requested".equals(codeString)) + return DATAREQUESTED; + if ("data-required".equals(codeString)) + return DATAREQUIRED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("failure".equals(codeString)) + return FAILURE; + throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUCCESS: return "success"; + case DATAREQUESTED: return "data-requested"; + case DATAREQUIRED: return "data-required"; + case INPROGRESS: return "in-progress"; + case FAILURE: return "failure"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SUCCESS: return "http://hl7.org/fhir/guidance-response-status"; + case DATAREQUESTED: return "http://hl7.org/fhir/guidance-response-status"; + case DATAREQUIRED: return "http://hl7.org/fhir/guidance-response-status"; + case INPROGRESS: return "http://hl7.org/fhir/guidance-response-status"; + case FAILURE: return "http://hl7.org/fhir/guidance-response-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SUCCESS: return "The request was processed successfully"; + case DATAREQUESTED: return "The request was processed successfully, but more data may result in a more complete evaluation"; + case DATAREQUIRED: return "The request was processed, but more data is required to complete the evaluation"; + case INPROGRESS: return "The request is currently being processed"; + case FAILURE: return "The request was not processed successfully"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUCCESS: return "Success"; + case DATAREQUESTED: return "Data Requested"; + case DATAREQUIRED: return "Data Required"; + case INPROGRESS: return "In Progress"; + case FAILURE: return "Failure"; + default: return "?"; + } + } + } + + public static class GuidanceResponseStatusEnumFactory implements EnumFactory { + public GuidanceResponseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("success".equals(codeString)) + return GuidanceResponseStatus.SUCCESS; + if ("data-requested".equals(codeString)) + return GuidanceResponseStatus.DATAREQUESTED; + if ("data-required".equals(codeString)) + return GuidanceResponseStatus.DATAREQUIRED; + if ("in-progress".equals(codeString)) + return GuidanceResponseStatus.INPROGRESS; + if ("failure".equals(codeString)) + return GuidanceResponseStatus.FAILURE; + throw new IllegalArgumentException("Unknown GuidanceResponseStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("success".equals(codeString)) + return new Enumeration(this, GuidanceResponseStatus.SUCCESS); + if ("data-requested".equals(codeString)) + return new Enumeration(this, GuidanceResponseStatus.DATAREQUESTED); + if ("data-required".equals(codeString)) + return new Enumeration(this, GuidanceResponseStatus.DATAREQUIRED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, GuidanceResponseStatus.INPROGRESS); + if ("failure".equals(codeString)) + return new Enumeration(this, GuidanceResponseStatus.FAILURE); + throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'"); + } + public String toCode(GuidanceResponseStatus code) { + if (code == GuidanceResponseStatus.SUCCESS) + return "success"; + if (code == GuidanceResponseStatus.DATAREQUESTED) + return "data-requested"; + if (code == GuidanceResponseStatus.DATAREQUIRED) + return "data-required"; + if (code == GuidanceResponseStatus.INPROGRESS) + return "in-progress"; + if (code == GuidanceResponseStatus.FAILURE) + return "failure"; + return "?"; + } + } + + public enum GuidanceResponseActionType { + /** + * The action is to create a new resource + */ + CREATE, + /** + * The action is to update an existing resource + */ + UPDATE, + /** + * The action is to remove an existing resource + */ + REMOVE, + /** + * The action is to fire a specific event + */ + FIREEVENT, + /** + * added to help the parsers + */ + NULL; + public static GuidanceResponseActionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("remove".equals(codeString)) + return REMOVE; + if ("fire-event".equals(codeString)) + return FIREEVENT; + throw new FHIRException("Unknown GuidanceResponseActionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case REMOVE: return "remove"; + case FIREEVENT: return "fire-event"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CREATE: return "http://hl7.org/fhir/guidance-response-action-type"; + case UPDATE: return "http://hl7.org/fhir/guidance-response-action-type"; + case REMOVE: return "http://hl7.org/fhir/guidance-response-action-type"; + case FIREEVENT: return "http://hl7.org/fhir/guidance-response-action-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CREATE: return "The action is to create a new resource"; + case UPDATE: return "The action is to update an existing resource"; + case REMOVE: return "The action is to remove an existing resource"; + case FIREEVENT: return "The action is to fire a specific event"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Create"; + case UPDATE: return "Update"; + case REMOVE: return "Remove"; + case FIREEVENT: return "Fire Event"; + default: return "?"; + } + } + } + + public static class GuidanceResponseActionTypeEnumFactory implements EnumFactory { + public GuidanceResponseActionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return GuidanceResponseActionType.CREATE; + if ("update".equals(codeString)) + return GuidanceResponseActionType.UPDATE; + if ("remove".equals(codeString)) + return GuidanceResponseActionType.REMOVE; + if ("fire-event".equals(codeString)) + return GuidanceResponseActionType.FIREEVENT; + throw new IllegalArgumentException("Unknown GuidanceResponseActionType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return new Enumeration(this, GuidanceResponseActionType.CREATE); + if ("update".equals(codeString)) + return new Enumeration(this, GuidanceResponseActionType.UPDATE); + if ("remove".equals(codeString)) + return new Enumeration(this, GuidanceResponseActionType.REMOVE); + if ("fire-event".equals(codeString)) + return new Enumeration(this, GuidanceResponseActionType.FIREEVENT); + throw new FHIRException("Unknown GuidanceResponseActionType code '"+codeString+"'"); + } + public String toCode(GuidanceResponseActionType code) { + if (code == GuidanceResponseActionType.CREATE) + return "create"; + if (code == GuidanceResponseActionType.UPDATE) + return "update"; + if (code == GuidanceResponseActionType.REMOVE) + return "remove"; + if (code == GuidanceResponseActionType.FIREEVENT) + return "fire-event"; + return "?"; + } + } + + @Block() + public static class GuidanceResponseActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A unique identifier for the action. + */ + @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A unique identifier for the action." ) + protected Identifier actionIdentifier; + + /** + * A user-visible number for the action. + */ + @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A user-visible number for the action." ) + protected StringType number; + + /** + * Supporting evidence for the action. + */ + @Child(name = "supportingEvidence", type = {Attachment.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting evidence for the action." ) + protected List supportingEvidence; + + /** + * Supporting documentation for the action. + */ + @Child(name = "documentation", type = {Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting documentation for the action." ) + protected List documentation; + + /** + * The participant in the action. + */ + @Child(name = "participant", type = {Patient.class, Person.class, Practitioner.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The participant in the action." ) + protected List participant; + /** + * The actual objects that are the target of the reference (The participant in the action.) + */ + protected List participantTarget; + + + /** + * The title of the action. + */ + @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The title of the action." ) + protected StringType title; + + /** + * A short description of the action. + */ + @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A short description of the action." ) + protected StringType description; + + /** + * A text equivalent of the action to be performed. + */ + @Child(name = "textEquivalent", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A text equivalent of the action to be performed." ) + protected StringType textEquivalent; + + /** + * Concepts associated with the action. + */ + @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Concepts associated with the action." ) + protected List concept; + + /** + * The type of action to perform (create, update, remove). + */ + @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) + protected Enumeration type; + + /** + * The resource that is the target of the action (e.g. CommunicationRequest). + */ + @Child(name = "resource", type = {}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + protected Resource resourceTarget; + + /** + * Sub actions. + */ + @Child(name = "actions", type = {GuidanceResponseActionComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Sub actions." ) + protected List actions; + + private static final long serialVersionUID = 1245922408L; + + /* + * Constructor + */ + public GuidanceResponseActionComponent() { + super(); + } + + /** + * @return {@link #actionIdentifier} (A unique identifier for the action.) + */ + public Identifier getActionIdentifier() { + if (this.actionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.actionIdentifier"); + else if (Configuration.doAutoCreate()) + this.actionIdentifier = new Identifier(); // cc + return this.actionIdentifier; + } + + public boolean hasActionIdentifier() { + return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); + } + + /** + * @param value {@link #actionIdentifier} (A unique identifier for the action.) + */ + public GuidanceResponseActionComponent setActionIdentifier(Identifier value) { + this.actionIdentifier = value; + return this; + } + + /** + * @return {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public StringType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new StringType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public GuidanceResponseActionComponent setNumberElement(StringType value) { + this.number = value; + return this; + } + + /** + * @return A user-visible number for the action. + */ + public String getNumber() { + return this.number == null ? null : this.number.getValue(); + } + + /** + * @param value A user-visible number for the action. + */ + public GuidanceResponseActionComponent setNumber(String value) { + if (Utilities.noString(value)) + this.number = null; + else { + if (this.number == null) + this.number = new StringType(); + this.number.setValue(value); + } + return this; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the action.) + */ + public List getSupportingEvidence() { + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + return this.supportingEvidence; + } + + public boolean hasSupportingEvidence() { + if (this.supportingEvidence == null) + return false; + for (Attachment item : this.supportingEvidence) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the action.) + */ + // syntactic sugar + public Attachment addSupportingEvidence() { //3 + Attachment t = new Attachment(); + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addSupportingEvidence(Attachment t) { //3 + if (t == null) + return this; + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return this; + } + + /** + * @return {@link #documentation} (Supporting documentation for the action.) + */ + public List getDocumentation() { + if (this.documentation == null) + this.documentation = new ArrayList(); + return this.documentation; + } + + public boolean hasDocumentation() { + if (this.documentation == null) + return false; + for (Attachment item : this.documentation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #documentation} (Supporting documentation for the action.) + */ + // syntactic sugar + public Attachment addDocumentation() { //3 + Attachment t = new Attachment(); + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addDocumentation(Attachment t) { //3 + if (t == null) + return this; + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return this; + } + + /** + * @return {@link #participant} (The participant in the action.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (Reference item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (The participant in the action.) + */ + // syntactic sugar + public Reference addParticipant() { //3 + Reference t = new Reference(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addParticipant(Reference t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return {@link #participant} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The participant in the action.) + */ + public List getParticipantTarget() { + if (this.participantTarget == null) + this.participantTarget = new ArrayList(); + return this.participantTarget; + } + + /** + * @return {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public GuidanceResponseActionComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The title of the action. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The title of the action. + */ + public GuidanceResponseActionComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public GuidanceResponseActionComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the action. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the action. + */ + public GuidanceResponseActionComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public StringType getTextEquivalentElement() { + if (this.textEquivalent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.textEquivalent"); + else if (Configuration.doAutoCreate()) + this.textEquivalent = new StringType(); // bb + return this.textEquivalent; + } + + public boolean hasTextEquivalentElement() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + public boolean hasTextEquivalent() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + /** + * @param value {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public GuidanceResponseActionComponent setTextEquivalentElement(StringType value) { + this.textEquivalent = value; + return this; + } + + /** + * @return A text equivalent of the action to be performed. + */ + public String getTextEquivalent() { + return this.textEquivalent == null ? null : this.textEquivalent.getValue(); + } + + /** + * @param value A text equivalent of the action to be performed. + */ + public GuidanceResponseActionComponent setTextEquivalent(String value) { + if (Utilities.noString(value)) + this.textEquivalent = null; + else { + if (this.textEquivalent == null) + this.textEquivalent = new StringType(); + this.textEquivalent.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (Concepts associated with the action.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (CodeableConcept item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Concepts associated with the action.) + */ + // syntactic sugar + public CodeableConcept addConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new GuidanceResponseActionTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public GuidanceResponseActionComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of action to perform (create, update, remove). + */ + public GuidanceResponseActionType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of action to perform (create, update, remove). + */ + public GuidanceResponseActionComponent setType(GuidanceResponseActionType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new GuidanceResponseActionTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public GuidanceResponseActionComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) + */ + public GuidanceResponseActionComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #actions} (Sub actions.) + */ + public List getActions() { + if (this.actions == null) + this.actions = new ArrayList(); + return this.actions; + } + + public boolean hasActions() { + if (this.actions == null) + return false; + for (GuidanceResponseActionComponent item : this.actions) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #actions} (Sub actions.) + */ + // syntactic sugar + public GuidanceResponseActionComponent addActions() { //3 + GuidanceResponseActionComponent t = new GuidanceResponseActionComponent(); + if (this.actions == null) + this.actions = new ArrayList(); + this.actions.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addActions(GuidanceResponseActionComponent t) { //3 + if (t == null) + return this; + if (this.actions == null) + this.actions = new ArrayList(); + this.actions.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("number", "string", "A user-visible number for the action.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); + childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the action.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("participant", "Reference(Patient|Person|Practitioner|RelatedPerson)", "The participant in the action.", 0, java.lang.Integer.MAX_VALUE, participant)); + childrenList.add(new Property("title", "string", "The title of the action.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "A short description of the action.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); + childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the action.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("type", "code", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("actions", "@GuidanceResponse.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, actions)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionIdentifier")) + this.actionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("number")) + this.number = castToString(value); // StringType + else if (name.equals("supportingEvidence")) + this.getSupportingEvidence().add(castToAttachment(value)); + else if (name.equals("documentation")) + this.getDocumentation().add(castToAttachment(value)); + else if (name.equals("participant")) + this.getParticipant().add(castToReference(value)); + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("textEquivalent")) + this.textEquivalent = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add(castToCodeableConcept(value)); + else if (name.equals("type")) + this.type = new GuidanceResponseActionTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("actions")) + this.getActions().add((GuidanceResponseActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionIdentifier")) { + this.actionIdentifier = new Identifier(); + return this.actionIdentifier; + } + else if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.number"); + } + else if (name.equals("supportingEvidence")) { + return addSupportingEvidence(); + } + else if (name.equals("documentation")) { + return addDocumentation(); + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.title"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.description"); + } + else if (name.equals("textEquivalent")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.textEquivalent"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.type"); + } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("actions")) { + return addActions(); + } + else + return super.addChild(name); + } + + public GuidanceResponseActionComponent copy() { + GuidanceResponseActionComponent dst = new GuidanceResponseActionComponent(); + copyValues(dst); + dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); + dst.number = number == null ? null : number.copy(); + if (supportingEvidence != null) { + dst.supportingEvidence = new ArrayList(); + for (Attachment i : supportingEvidence) + dst.supportingEvidence.add(i.copy()); + }; + if (documentation != null) { + dst.documentation = new ArrayList(); + for (Attachment i : documentation) + dst.documentation.add(i.copy()); + }; + if (participant != null) { + dst.participant = new ArrayList(); + for (Reference i : participant) + dst.participant.add(i.copy()); + }; + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (CodeableConcept i : concept) + dst.concept.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.resource = resource == null ? null : resource.copy(); + if (actions != null) { + dst.actions = new ArrayList(); + for (GuidanceResponseActionComponent i : actions) + dst.actions.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GuidanceResponseActionComponent)) + return false; + GuidanceResponseActionComponent o = (GuidanceResponseActionComponent) other; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(number, o.number, true) + && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(participant, o.participant, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) + && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(concept, o.concept, true) + && compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(actions, o.actions, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GuidanceResponseActionComponent)) + return false; + GuidanceResponseActionComponent o = (GuidanceResponseActionComponent) other; + return compareValues(number, o.number, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (number == null || number.isEmpty()) + && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (participant == null || participant.isEmpty()) && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) + && (textEquivalent == null || textEquivalent.isEmpty()) && (concept == null || concept.isEmpty()) + && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) && (actions == null || actions.isEmpty()) + ; + } + + public String fhirType() { + return "GuidanceResponse.action"; + + } + + } + + /** + * The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + */ + @Child(name = "requestId", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The id of the request associated with this response, if any", formalDefinition="The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario." ) + protected StringType requestId; + + /** + * A reference to a knowledge module involved in an interaction. + */ + @Child(name = "module", type = {DecisionSupportServiceModule.class, DecisionSupportRule.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="A reference to a knowledge module", formalDefinition="A reference to a knowledge module involved in an interaction." ) + protected Reference module; + + /** + * The actual object that is the target of the reference (A reference to a knowledge module involved in an interaction.) + */ + protected Resource moduleTarget; + + /** + * The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="success | data-requested | data-required | in-progress | failure", formalDefinition="The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information." ) + protected Enumeration status; + + /** + * Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element. + */ + @Child(name = "evaluationMessage", type = {OperationOutcome.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Messages resulting from the evaluation of the artifact or artifacts", formalDefinition="Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element." ) + protected List evaluationMessage; + /** + * The actual objects that are the target of the reference (Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.) + */ + protected List evaluationMessageTarget; + + + /** + * The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element. + */ + @Child(name = "outputParameters", type = {Parameters.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The output parameters of the evaluation, if any", formalDefinition="The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element." ) + protected Reference outputParameters; + + /** + * The actual object that is the target of the reference (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.) + */ + protected Parameters outputParametersTarget; + + /** + * The actions, if any, produced by the evaluation of the artifact. + */ + @Child(name = "action", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The actions, if any, produced by the evaluation of the artifact." ) + protected List action; + + private static final long serialVersionUID = -2105369308L; + + /* + * Constructor + */ + public GuidanceResponse() { + super(); + } + + /* + * Constructor + */ + public GuidanceResponse(Reference module, Enumeration status) { + super(); + this.module = module; + this.status = status; + } + + /** + * @return {@link #requestId} (The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value + */ + public StringType getRequestIdElement() { + if (this.requestId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponse.requestId"); + else if (Configuration.doAutoCreate()) + this.requestId = new StringType(); // bb + return this.requestId; + } + + public boolean hasRequestIdElement() { + return this.requestId != null && !this.requestId.isEmpty(); + } + + public boolean hasRequestId() { + return this.requestId != null && !this.requestId.isEmpty(); + } + + /** + * @param value {@link #requestId} (The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value + */ + public GuidanceResponse setRequestIdElement(StringType value) { + this.requestId = value; + return this; + } + + /** + * @return The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + */ + public String getRequestId() { + return this.requestId == null ? null : this.requestId.getValue(); + } + + /** + * @param value The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + */ + public GuidanceResponse setRequestId(String value) { + if (Utilities.noString(value)) + this.requestId = null; + else { + if (this.requestId == null) + this.requestId = new StringType(); + this.requestId.setValue(value); + } + return this; + } + + /** + * @return {@link #module} (A reference to a knowledge module involved in an interaction.) + */ + public Reference getModule() { + if (this.module == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponse.module"); + else if (Configuration.doAutoCreate()) + this.module = new Reference(); // cc + return this.module; + } + + public boolean hasModule() { + return this.module != null && !this.module.isEmpty(); + } + + /** + * @param value {@link #module} (A reference to a knowledge module involved in an interaction.) + */ + public GuidanceResponse setModule(Reference value) { + this.module = value; + return this; + } + + /** + * @return {@link #module} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + */ + public Resource getModuleTarget() { + return this.moduleTarget; + } + + /** + * @param value {@link #module} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + */ + public GuidanceResponse setModuleTarget(Resource value) { + this.moduleTarget = value; + return this; + } + + /** + * @return {@link #status} (The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponse.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new GuidanceResponseStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public GuidanceResponse setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information. + */ + public GuidanceResponseStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information. + */ + public GuidanceResponse setStatus(GuidanceResponseStatus value) { + if (this.status == null) + this.status = new Enumeration(new GuidanceResponseStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #evaluationMessage} (Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.) + */ + public List getEvaluationMessage() { + if (this.evaluationMessage == null) + this.evaluationMessage = new ArrayList(); + return this.evaluationMessage; + } + + public boolean hasEvaluationMessage() { + if (this.evaluationMessage == null) + return false; + for (Reference item : this.evaluationMessage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #evaluationMessage} (Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.) + */ + // syntactic sugar + public Reference addEvaluationMessage() { //3 + Reference t = new Reference(); + if (this.evaluationMessage == null) + this.evaluationMessage = new ArrayList(); + this.evaluationMessage.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponse addEvaluationMessage(Reference t) { //3 + if (t == null) + return this; + if (this.evaluationMessage == null) + this.evaluationMessage = new ArrayList(); + this.evaluationMessage.add(t); + return this; + } + + /** + * @return {@link #evaluationMessage} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.) + */ + public List getEvaluationMessageTarget() { + if (this.evaluationMessageTarget == null) + this.evaluationMessageTarget = new ArrayList(); + return this.evaluationMessageTarget; + } + + // syntactic sugar + /** + * @return {@link #evaluationMessage} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.) + */ + public OperationOutcome addEvaluationMessageTarget() { + OperationOutcome r = new OperationOutcome(); + if (this.evaluationMessageTarget == null) + this.evaluationMessageTarget = new ArrayList(); + this.evaluationMessageTarget.add(r); + return r; + } + + /** + * @return {@link #outputParameters} (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.) + */ + public Reference getOutputParameters() { + if (this.outputParameters == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponse.outputParameters"); + else if (Configuration.doAutoCreate()) + this.outputParameters = new Reference(); // cc + return this.outputParameters; + } + + public boolean hasOutputParameters() { + return this.outputParameters != null && !this.outputParameters.isEmpty(); + } + + /** + * @param value {@link #outputParameters} (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.) + */ + public GuidanceResponse setOutputParameters(Reference value) { + this.outputParameters = value; + return this; + } + + /** + * @return {@link #outputParameters} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.) + */ + public Parameters getOutputParametersTarget() { + if (this.outputParametersTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponse.outputParameters"); + else if (Configuration.doAutoCreate()) + this.outputParametersTarget = new Parameters(); // aa + return this.outputParametersTarget; + } + + /** + * @param value {@link #outputParameters} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.) + */ + public GuidanceResponse setOutputParametersTarget(Parameters value) { + this.outputParametersTarget = value; + return this; + } + + /** + * @return {@link #action} (The actions, if any, produced by the evaluation of the artifact.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (GuidanceResponseActionComponent item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (The actions, if any, produced by the evaluation of the artifact.) + */ + // syntactic sugar + public GuidanceResponseActionComponent addAction() { //3 + GuidanceResponseActionComponent t = new GuidanceResponseActionComponent(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponse addAction(GuidanceResponseActionComponent t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("requestId", "string", "The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.", 0, java.lang.Integer.MAX_VALUE, requestId)); + childrenList.add(new Property("module", "Reference(DecisionSupportServiceModule|DecisionSupportRule)", "A reference to a knowledge module involved in an interaction.", 0, java.lang.Integer.MAX_VALUE, module)); + childrenList.add(new Property("status", "code", "The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("evaluationMessage", "Reference(OperationOutcome)", "Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.", 0, java.lang.Integer.MAX_VALUE, evaluationMessage)); + childrenList.add(new Property("outputParameters", "Reference(Parameters)", "The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.", 0, java.lang.Integer.MAX_VALUE, outputParameters)); + childrenList.add(new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("requestId")) + this.requestId = castToString(value); // StringType + else if (name.equals("module")) + this.module = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new GuidanceResponseStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("evaluationMessage")) + this.getEvaluationMessage().add(castToReference(value)); + else if (name.equals("outputParameters")) + this.outputParameters = castToReference(value); // Reference + else if (name.equals("action")) + this.getAction().add((GuidanceResponseActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("requestId")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.requestId"); + } + else if (name.equals("module")) { + this.module = new Reference(); + return this.module; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.status"); + } + else if (name.equals("evaluationMessage")) { + return addEvaluationMessage(); + } + else if (name.equals("outputParameters")) { + this.outputParameters = new Reference(); + return this.outputParameters; + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "GuidanceResponse"; + + } + + public GuidanceResponse copy() { + GuidanceResponse dst = new GuidanceResponse(); + copyValues(dst); + dst.requestId = requestId == null ? null : requestId.copy(); + dst.module = module == null ? null : module.copy(); + dst.status = status == null ? null : status.copy(); + if (evaluationMessage != null) { + dst.evaluationMessage = new ArrayList(); + for (Reference i : evaluationMessage) + dst.evaluationMessage.add(i.copy()); + }; + dst.outputParameters = outputParameters == null ? null : outputParameters.copy(); + if (action != null) { + dst.action = new ArrayList(); + for (GuidanceResponseActionComponent i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + protected GuidanceResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GuidanceResponse)) + return false; + GuidanceResponse o = (GuidanceResponse) other; + return compareDeep(requestId, o.requestId, true) && compareDeep(module, o.module, true) && compareDeep(status, o.status, true) + && compareDeep(evaluationMessage, o.evaluationMessage, true) && compareDeep(outputParameters, o.outputParameters, true) + && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GuidanceResponse)) + return false; + GuidanceResponse o = (GuidanceResponse) other; + return compareValues(requestId, o.requestId, true) && compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (requestId == null || requestId.isEmpty()) && (module == null || module.isEmpty()) + && (status == null || status.isEmpty()) && (evaluationMessage == null || evaluationMessage.isEmpty()) + && (outputParameters == null || outputParameters.isEmpty()) && (action == null || action.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.GuidanceResponse; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HealthcareService.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HealthcareService.java new file mode 100644 index 00000000000..fe7daad0093 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HealthcareService.java @@ -0,0 +1,2300 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The details of a healthcare service available at a location. + */ +@ResourceDef(name="HealthcareService", profile="http://hl7.org/fhir/Profile/HealthcareService") +public class HealthcareService extends DomainResource { + + public enum DaysOfWeek { + /** + * Monday + */ + MON, + /** + * Tuesday + */ + TUE, + /** + * Wednesday + */ + WED, + /** + * Thursday + */ + THU, + /** + * Friday + */ + FRI, + /** + * Saturday + */ + SAT, + /** + * Sunday + */ + SUN, + /** + * added to help the parsers + */ + NULL; + public static DaysOfWeek fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mon".equals(codeString)) + return MON; + if ("tue".equals(codeString)) + return TUE; + if ("wed".equals(codeString)) + return WED; + if ("thu".equals(codeString)) + return THU; + if ("fri".equals(codeString)) + return FRI; + if ("sat".equals(codeString)) + return SAT; + if ("sun".equals(codeString)) + return SUN; + throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MON: return "mon"; + case TUE: return "tue"; + case WED: return "wed"; + case THU: return "thu"; + case FRI: return "fri"; + case SAT: return "sat"; + case SUN: return "sun"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MON: return "http://hl7.org/fhir/days-of-week"; + case TUE: return "http://hl7.org/fhir/days-of-week"; + case WED: return "http://hl7.org/fhir/days-of-week"; + case THU: return "http://hl7.org/fhir/days-of-week"; + case FRI: return "http://hl7.org/fhir/days-of-week"; + case SAT: return "http://hl7.org/fhir/days-of-week"; + case SUN: return "http://hl7.org/fhir/days-of-week"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MON: return "Monday"; + case TUE: return "Tuesday"; + case WED: return "Wednesday"; + case THU: return "Thursday"; + case FRI: return "Friday"; + case SAT: return "Saturday"; + case SUN: return "Sunday"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MON: return "Monday"; + case TUE: return "Tuesday"; + case WED: return "Wednesday"; + case THU: return "Thursday"; + case FRI: return "Friday"; + case SAT: return "Saturday"; + case SUN: return "Sunday"; + default: return "?"; + } + } + } + + public static class DaysOfWeekEnumFactory implements EnumFactory { + public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("mon".equals(codeString)) + return DaysOfWeek.MON; + if ("tue".equals(codeString)) + return DaysOfWeek.TUE; + if ("wed".equals(codeString)) + return DaysOfWeek.WED; + if ("thu".equals(codeString)) + return DaysOfWeek.THU; + if ("fri".equals(codeString)) + return DaysOfWeek.FRI; + if ("sat".equals(codeString)) + return DaysOfWeek.SAT; + if ("sun".equals(codeString)) + return DaysOfWeek.SUN; + throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("mon".equals(codeString)) + return new Enumeration(this, DaysOfWeek.MON); + if ("tue".equals(codeString)) + return new Enumeration(this, DaysOfWeek.TUE); + if ("wed".equals(codeString)) + return new Enumeration(this, DaysOfWeek.WED); + if ("thu".equals(codeString)) + return new Enumeration(this, DaysOfWeek.THU); + if ("fri".equals(codeString)) + return new Enumeration(this, DaysOfWeek.FRI); + if ("sat".equals(codeString)) + return new Enumeration(this, DaysOfWeek.SAT); + if ("sun".equals(codeString)) + return new Enumeration(this, DaysOfWeek.SUN); + throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); + } + public String toCode(DaysOfWeek code) { + if (code == DaysOfWeek.MON) + return "mon"; + if (code == DaysOfWeek.TUE) + return "tue"; + if (code == DaysOfWeek.WED) + return "wed"; + if (code == DaysOfWeek.THU) + return "thu"; + if (code == DaysOfWeek.FRI) + return "fri"; + if (code == DaysOfWeek.SAT) + return "sat"; + if (code == DaysOfWeek.SUN) + return "sun"; + return "?"; + } + } + + @Block() + public static class ServiceTypeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The specific type of service being delivered or performed. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of service delivered or performed", formalDefinition="The specific type of service being delivered or performed." ) + protected CodeableConcept type; + + /** + * Collection of specialties handled by the service site. This is more of a medical term. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specialties handled by the Service Site", formalDefinition="Collection of specialties handled by the service site. This is more of a medical term." ) + protected List specialty; + + private static final long serialVersionUID = 1703986174L; + + /* + * Constructor + */ + public ServiceTypeComponent() { + super(); + } + + /* + * Constructor + */ + public ServiceTypeComponent(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The specific type of service being delivered or performed.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ServiceTypeComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The specific type of service being delivered or performed.) + */ + public ServiceTypeComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public ServiceTypeComponent addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "The specific type of service being delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("specialty")) { + return addSpecialty(); + } + else + return super.addChild(name); + } + + public ServiceTypeComponent copy() { + ServiceTypeComponent dst = new ServiceTypeComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ServiceTypeComponent)) + return false; + ServiceTypeComponent o = (ServiceTypeComponent) other; + return compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ServiceTypeComponent)) + return false; + ServiceTypeComponent o = (ServiceTypeComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (specialty == null || specialty.isEmpty()) + ; + } + + public String fhirType() { + return "HealthcareService.serviceType"; + + } + + } + + @Block() + public static class HealthcareServiceAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates which days of the week are available between the start and end Times. + */ + @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." ) + protected List> daysOfWeek; + + /** + * Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Always available? e.g. 24 hour service", formalDefinition="Is this always available? (hence times are irrelevant) e.g. 24 hour service." ) + protected BooleanType allDay; + + /** + * The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + @Child(name = "availableStartTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Opening time of day (ignored if allDay = true)", formalDefinition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." ) + protected TimeType availableStartTime; + + /** + * The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + @Child(name = "availableEndTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Closing time of day (ignored if allDay = true)", formalDefinition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." ) + protected TimeType availableEndTime; + + private static final long serialVersionUID = -2139510127L; + + /* + * Constructor + */ + public HealthcareServiceAvailableTimeComponent() { + super(); + } + + /** + * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public List> getDaysOfWeek() { + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList>(); + return this.daysOfWeek; + } + + public boolean hasDaysOfWeek() { + if (this.daysOfWeek == null) + return false; + for (Enumeration item : this.daysOfWeek) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + // syntactic sugar + public Enumeration addDaysOfWeekElement() {//2 + Enumeration t = new Enumeration(new DaysOfWeekEnumFactory()); + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList>(); + this.daysOfWeek.add(t); + return t; + } + + /** + * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public HealthcareServiceAvailableTimeComponent addDaysOfWeek(DaysOfWeek value) { //1 + Enumeration t = new Enumeration(new DaysOfWeekEnumFactory()); + t.setValue(value); + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList>(); + this.daysOfWeek.add(t); + return this; + } + + /** + * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public boolean hasDaysOfWeek(DaysOfWeek value) { + if (this.daysOfWeek == null) + return false; + for (Enumeration v : this.daysOfWeek) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value + */ + public BooleanType getAllDayElement() { + if (this.allDay == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.allDay"); + else if (Configuration.doAutoCreate()) + this.allDay = new BooleanType(); // bb + return this.allDay; + } + + public boolean hasAllDayElement() { + return this.allDay != null && !this.allDay.isEmpty(); + } + + public boolean hasAllDay() { + return this.allDay != null && !this.allDay.isEmpty(); + } + + /** + * @param value {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value + */ + public HealthcareServiceAvailableTimeComponent setAllDayElement(BooleanType value) { + this.allDay = value; + return this; + } + + /** + * @return Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + public boolean getAllDay() { + return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue(); + } + + /** + * @param value Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + public HealthcareServiceAvailableTimeComponent setAllDay(boolean value) { + if (this.allDay == null) + this.allDay = new BooleanType(); + this.allDay.setValue(value); + return this; + } + + /** + * @return {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value + */ + public TimeType getAvailableStartTimeElement() { + if (this.availableStartTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableStartTime"); + else if (Configuration.doAutoCreate()) + this.availableStartTime = new TimeType(); // bb + return this.availableStartTime; + } + + public boolean hasAvailableStartTimeElement() { + return this.availableStartTime != null && !this.availableStartTime.isEmpty(); + } + + public boolean hasAvailableStartTime() { + return this.availableStartTime != null && !this.availableStartTime.isEmpty(); + } + + /** + * @param value {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value + */ + public HealthcareServiceAvailableTimeComponent setAvailableStartTimeElement(TimeType value) { + this.availableStartTime = value; + return this; + } + + /** + * @return The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public String getAvailableStartTime() { + return this.availableStartTime == null ? null : this.availableStartTime.getValue(); + } + + /** + * @param value The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public HealthcareServiceAvailableTimeComponent setAvailableStartTime(String value) { + if (value == null) + this.availableStartTime = null; + else { + if (this.availableStartTime == null) + this.availableStartTime = new TimeType(); + this.availableStartTime.setValue(value); + } + return this; + } + + /** + * @return {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value + */ + public TimeType getAvailableEndTimeElement() { + if (this.availableEndTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableEndTime"); + else if (Configuration.doAutoCreate()) + this.availableEndTime = new TimeType(); // bb + return this.availableEndTime; + } + + public boolean hasAvailableEndTimeElement() { + return this.availableEndTime != null && !this.availableEndTime.isEmpty(); + } + + public boolean hasAvailableEndTime() { + return this.availableEndTime != null && !this.availableEndTime.isEmpty(); + } + + /** + * @param value {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value + */ + public HealthcareServiceAvailableTimeComponent setAvailableEndTimeElement(TimeType value) { + this.availableEndTime = value; + return this; + } + + /** + * @return The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public String getAvailableEndTime() { + return this.availableEndTime == null ? null : this.availableEndTime.getValue(); + } + + /** + * @param value The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public HealthcareServiceAvailableTimeComponent setAvailableEndTime(String value) { + if (value == null) + this.availableEndTime = null; + else { + if (this.availableEndTime == null) + this.availableEndTime = new TimeType(); + this.availableEndTime.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek)); + childrenList.add(new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, java.lang.Integer.MAX_VALUE, allDay)); + childrenList.add(new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, java.lang.Integer.MAX_VALUE, availableStartTime)); + childrenList.add(new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, java.lang.Integer.MAX_VALUE, availableEndTime)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("daysOfWeek")) + this.getDaysOfWeek().add(new DaysOfWeekEnumFactory().fromType(value)); + else if (name.equals("allDay")) + this.allDay = castToBoolean(value); // BooleanType + else if (name.equals("availableStartTime")) + this.availableStartTime = castToTime(value); // TimeType + else if (name.equals("availableEndTime")) + this.availableEndTime = castToTime(value); // TimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("daysOfWeek")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.daysOfWeek"); + } + else if (name.equals("allDay")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.allDay"); + } + else if (name.equals("availableStartTime")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableStartTime"); + } + else if (name.equals("availableEndTime")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableEndTime"); + } + else + return super.addChild(name); + } + + public HealthcareServiceAvailableTimeComponent copy() { + HealthcareServiceAvailableTimeComponent dst = new HealthcareServiceAvailableTimeComponent(); + copyValues(dst); + if (daysOfWeek != null) { + dst.daysOfWeek = new ArrayList>(); + for (Enumeration i : daysOfWeek) + dst.daysOfWeek.add(i.copy()); + }; + dst.allDay = allDay == null ? null : allDay.copy(); + dst.availableStartTime = availableStartTime == null ? null : availableStartTime.copy(); + dst.availableEndTime = availableEndTime == null ? null : availableEndTime.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof HealthcareServiceAvailableTimeComponent)) + return false; + HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other; + return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(availableStartTime, o.availableStartTime, true) + && compareDeep(availableEndTime, o.availableEndTime, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof HealthcareServiceAvailableTimeComponent)) + return false; + HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other; + return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(availableStartTime, o.availableStartTime, true) + && compareValues(availableEndTime, o.availableEndTime, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (daysOfWeek == null || daysOfWeek.isEmpty()) && (allDay == null || allDay.isEmpty()) + && (availableStartTime == null || availableStartTime.isEmpty()) && (availableEndTime == null || availableEndTime.isEmpty()) + ; + } + + public String fhirType() { + return "HealthcareService.availableTime"; + + } + + } + + @Block() + public static class HealthcareServiceNotAvailableComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The reason that can be presented to the user as to why this time is not available. + */ + @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reason presented to the user explaining why time not available", formalDefinition="The reason that can be presented to the user as to why this time is not available." ) + protected StringType description; + + /** + * Service is not available (seasonally or for a public holiday) from this date. + */ + @Child(name = "during", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Service not availablefrom this date", formalDefinition="Service is not available (seasonally or for a public holiday) from this date." ) + protected Period during; + + private static final long serialVersionUID = 310849929L; + + /* + * Constructor + */ + public HealthcareServiceNotAvailableComponent() { + super(); + } + + /* + * Constructor + */ + public HealthcareServiceNotAvailableComponent(StringType description) { + super(); + this.description = description; + } + + /** + * @return {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public HealthcareServiceNotAvailableComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The reason that can be presented to the user as to why this time is not available. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The reason that can be presented to the user as to why this time is not available. + */ + public HealthcareServiceNotAvailableComponent setDescription(String value) { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) + */ + public Period getDuring() { + if (this.during == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.during"); + else if (Configuration.doAutoCreate()) + this.during = new Period(); // cc + return this.during; + } + + public boolean hasDuring() { + return this.during != null && !this.during.isEmpty(); + } + + /** + * @param value {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) + */ + public HealthcareServiceNotAvailableComponent setDuring(Period value) { + this.during = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, java.lang.Integer.MAX_VALUE, during)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("during")) + this.during = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.description"); + } + else if (name.equals("during")) { + this.during = new Period(); + return this.during; + } + else + return super.addChild(name); + } + + public HealthcareServiceNotAvailableComponent copy() { + HealthcareServiceNotAvailableComponent dst = new HealthcareServiceNotAvailableComponent(); + copyValues(dst); + dst.description = description == null ? null : description.copy(); + dst.during = during == null ? null : during.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof HealthcareServiceNotAvailableComponent)) + return false; + HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other; + return compareDeep(description, o.description, true) && compareDeep(during, o.during, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof HealthcareServiceNotAvailableComponent)) + return false; + HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (description == null || description.isEmpty()) && (during == null || during.isEmpty()) + ; + } + + public String fhirType() { + return "HealthcareService.notAvailable"; + + } + + } + + /** + * External identifiers for this item. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External identifiers for this item", formalDefinition="External identifiers for this item." ) + protected List identifier; + + /** + * The organization that provides this healthcare service. + */ + @Child(name = "providedBy", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization that provides this service", formalDefinition="The organization that provides this healthcare service." ) + protected Reference providedBy; + + /** + * The actual object that is the target of the reference (The organization that provides this healthcare service.) + */ + protected Organization providedByTarget; + + /** + * Identifies the broad category of service being performed or delivered. + */ + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Broad category of service being performed or delivered", formalDefinition="Identifies the broad category of service being performed or delivered." ) + protected CodeableConcept serviceCategory; + + /** + * A specific type of service that may be delivered or performed. + */ + @Child(name = "serviceType", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific service delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." ) + protected List serviceType; + + /** + * The location where this healthcare service may be provided. + */ + @Child(name = "location", type = {Location.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Location where service may be provided", formalDefinition="The location where this healthcare service may be provided." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The location where this healthcare service may be provided.) + */ + protected Location locationTarget; + + /** + * Further description of the service as it would be presented to a consumer while searching. + */ + @Child(name = "serviceName", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of service as presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." ) + protected StringType serviceName; + + /** + * Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. + */ + @Child(name = "comment", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional description and/or any specific issues not covered elsewhere", formalDefinition="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." ) + protected StringType comment; + + /** + * Extra details about the service that can't be placed in the other fields. + */ + @Child(name = "extraDetails", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." ) + protected StringType extraDetails; + + /** + * If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list. + */ + @Child(name = "photo", type = {Attachment.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Facilitates quick identification of the service", formalDefinition="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." ) + protected Attachment photo; + + /** + * List of contacts related to this specific healthcare service. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contacts related to the healthcare service", formalDefinition="List of contacts related to this specific healthcare service." ) + protected List telecom; + + /** + * The location(s) that this service is available to (not where the service is provided). + */ + @Child(name = "coverageArea", type = {Location.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Location(s) service is inteded for/available to", formalDefinition="The location(s) that this service is available to (not where the service is provided)." ) + protected List coverageArea; + /** + * The actual objects that are the target of the reference (The location(s) that this service is available to (not where the service is provided).) + */ + protected List coverageAreaTarget; + + + /** + * The code(s) that detail the conditions under which the healthcare service is available/offered. + */ + @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Conditions under which service is available/offered", formalDefinition="The code(s) that detail the conditions under which the healthcare service is available/offered." ) + protected List serviceProvisionCode; + + /** + * Does this service have specific eligibility requirements that need to be met in order to use the service? + */ + @Child(name = "eligibility", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific eligibility requirements required to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service?" ) + protected CodeableConcept eligibility; + + /** + * Describes the eligibility conditions for the service. + */ + @Child(name = "eligibilityNote", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="Describes the eligibility conditions for the service." ) + protected StringType eligibilityNote; + + /** + * Program Names that can be used to categorize the service. + */ + @Child(name = "programName", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Program Names that categorize the service", formalDefinition="Program Names that can be used to categorize the service." ) + protected List programName; + + /** + * Collection of characteristics (attributes). + */ + @Child(name = "characteristic", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." ) + protected List characteristic; + + /** + * Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required. + */ + @Child(name = "referralMethod", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required." ) + protected List referralMethod; + + /** + * The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. + */ + @Child(name = "publicKey", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="PKI Public keys to support secure communications", formalDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available." ) + protected StringType publicKey; + + /** + * Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. + */ + @Child(name = "appointmentRequired", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If an appointment is required for access to this service", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service." ) + protected BooleanType appointmentRequired; + + /** + * A collection of times that the Service Site is available. + */ + @Child(name = "availableTime", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." ) + protected List availableTime; + + /** + * The HealthcareService is not available during this period of time due to the provided reason. + */ + @Child(name = "notAvailable", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Not available during this time due to provided reason", formalDefinition="The HealthcareService is not available during this period of time due to the provided reason." ) + protected List notAvailable; + + /** + * A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + @Child(name = "availabilityExceptions", type = {StringType.class}, order=21, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times." ) + protected StringType availabilityExceptions; + + private static final long serialVersionUID = 683771126L; + + /* + * Constructor + */ + public HealthcareService() { + super(); + } + + /* + * Constructor + */ + public HealthcareService(Reference location) { + super(); + this.location = location; + } + + /** + * @return {@link #identifier} (External identifiers for this item.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External identifiers for this item.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #providedBy} (The organization that provides this healthcare service.) + */ + public Reference getProvidedBy() { + if (this.providedBy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.providedBy"); + else if (Configuration.doAutoCreate()) + this.providedBy = new Reference(); // cc + return this.providedBy; + } + + public boolean hasProvidedBy() { + return this.providedBy != null && !this.providedBy.isEmpty(); + } + + /** + * @param value {@link #providedBy} (The organization that provides this healthcare service.) + */ + public HealthcareService setProvidedBy(Reference value) { + this.providedBy = value; + return this; + } + + /** + * @return {@link #providedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that provides this healthcare service.) + */ + public Organization getProvidedByTarget() { + if (this.providedByTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.providedBy"); + else if (Configuration.doAutoCreate()) + this.providedByTarget = new Organization(); // aa + return this.providedByTarget; + } + + /** + * @param value {@link #providedBy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that provides this healthcare service.) + */ + public HealthcareService setProvidedByTarget(Organization value) { + this.providedByTarget = value; + return this; + } + + /** + * @return {@link #serviceCategory} (Identifies the broad category of service being performed or delivered.) + */ + public CodeableConcept getServiceCategory() { + if (this.serviceCategory == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.serviceCategory"); + else if (Configuration.doAutoCreate()) + this.serviceCategory = new CodeableConcept(); // cc + return this.serviceCategory; + } + + public boolean hasServiceCategory() { + return this.serviceCategory != null && !this.serviceCategory.isEmpty(); + } + + /** + * @param value {@link #serviceCategory} (Identifies the broad category of service being performed or delivered.) + */ + public HealthcareService setServiceCategory(CodeableConcept value) { + this.serviceCategory = value; + return this; + } + + /** + * @return {@link #serviceType} (A specific type of service that may be delivered or performed.) + */ + public List getServiceType() { + if (this.serviceType == null) + this.serviceType = new ArrayList(); + return this.serviceType; + } + + public boolean hasServiceType() { + if (this.serviceType == null) + return false; + for (ServiceTypeComponent item : this.serviceType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceType} (A specific type of service that may be delivered or performed.) + */ + // syntactic sugar + public ServiceTypeComponent addServiceType() { //3 + ServiceTypeComponent t = new ServiceTypeComponent(); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addServiceType(ServiceTypeComponent t) { //3 + if (t == null) + return this; + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return {@link #location} (The location where this healthcare service may be provided.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The location where this healthcare service may be provided.) + */ + public HealthcareService setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.) + */ + public HealthcareService setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #serviceName} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getServiceName" gives direct access to the value + */ + public StringType getServiceNameElement() { + if (this.serviceName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.serviceName"); + else if (Configuration.doAutoCreate()) + this.serviceName = new StringType(); // bb + return this.serviceName; + } + + public boolean hasServiceNameElement() { + return this.serviceName != null && !this.serviceName.isEmpty(); + } + + public boolean hasServiceName() { + return this.serviceName != null && !this.serviceName.isEmpty(); + } + + /** + * @param value {@link #serviceName} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getServiceName" gives direct access to the value + */ + public HealthcareService setServiceNameElement(StringType value) { + this.serviceName = value; + return this; + } + + /** + * @return Further description of the service as it would be presented to a consumer while searching. + */ + public String getServiceName() { + return this.serviceName == null ? null : this.serviceName.getValue(); + } + + /** + * @param value Further description of the service as it would be presented to a consumer while searching. + */ + public HealthcareService setServiceName(String value) { + if (Utilities.noString(value)) + this.serviceName = null; + else { + if (this.serviceName == null) + this.serviceName = new StringType(); + this.serviceName.setValue(value); + } + return this; + } + + /** + * @return {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public HealthcareService setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. + */ + public HealthcareService setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + /** + * @return {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value + */ + public StringType getExtraDetailsElement() { + if (this.extraDetails == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.extraDetails"); + else if (Configuration.doAutoCreate()) + this.extraDetails = new StringType(); // bb + return this.extraDetails; + } + + public boolean hasExtraDetailsElement() { + return this.extraDetails != null && !this.extraDetails.isEmpty(); + } + + public boolean hasExtraDetails() { + return this.extraDetails != null && !this.extraDetails.isEmpty(); + } + + /** + * @param value {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value + */ + public HealthcareService setExtraDetailsElement(StringType value) { + this.extraDetails = value; + return this; + } + + /** + * @return Extra details about the service that can't be placed in the other fields. + */ + public String getExtraDetails() { + return this.extraDetails == null ? null : this.extraDetails.getValue(); + } + + /** + * @param value Extra details about the service that can't be placed in the other fields. + */ + public HealthcareService setExtraDetails(String value) { + if (Utilities.noString(value)) + this.extraDetails = null; + else { + if (this.extraDetails == null) + this.extraDetails = new StringType(); + this.extraDetails.setValue(value); + } + return this; + } + + /** + * @return {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.) + */ + public Attachment getPhoto() { + if (this.photo == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.photo"); + else if (Configuration.doAutoCreate()) + this.photo = new Attachment(); // cc + return this.photo; + } + + public boolean hasPhoto() { + return this.photo != null && !this.photo.isEmpty(); + } + + /** + * @param value {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.) + */ + public HealthcareService setPhoto(Attachment value) { + this.photo = value; + return this; + } + + /** + * @return {@link #telecom} (List of contacts related to this specific healthcare service.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (List of contacts related to this specific healthcare service.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #coverageArea} (The location(s) that this service is available to (not where the service is provided).) + */ + public List getCoverageArea() { + if (this.coverageArea == null) + this.coverageArea = new ArrayList(); + return this.coverageArea; + } + + public boolean hasCoverageArea() { + if (this.coverageArea == null) + return false; + for (Reference item : this.coverageArea) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #coverageArea} (The location(s) that this service is available to (not where the service is provided).) + */ + // syntactic sugar + public Reference addCoverageArea() { //3 + Reference t = new Reference(); + if (this.coverageArea == null) + this.coverageArea = new ArrayList(); + this.coverageArea.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addCoverageArea(Reference t) { //3 + if (t == null) + return this; + if (this.coverageArea == null) + this.coverageArea = new ArrayList(); + this.coverageArea.add(t); + return this; + } + + /** + * @return {@link #coverageArea} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) that this service is available to (not where the service is provided).) + */ + public List getCoverageAreaTarget() { + if (this.coverageAreaTarget == null) + this.coverageAreaTarget = new ArrayList(); + return this.coverageAreaTarget; + } + + // syntactic sugar + /** + * @return {@link #coverageArea} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) that this service is available to (not where the service is provided).) + */ + public Location addCoverageAreaTarget() { + Location r = new Location(); + if (this.coverageAreaTarget == null) + this.coverageAreaTarget = new ArrayList(); + this.coverageAreaTarget.add(r); + return r; + } + + /** + * @return {@link #serviceProvisionCode} (The code(s) that detail the conditions under which the healthcare service is available/offered.) + */ + public List getServiceProvisionCode() { + if (this.serviceProvisionCode == null) + this.serviceProvisionCode = new ArrayList(); + return this.serviceProvisionCode; + } + + public boolean hasServiceProvisionCode() { + if (this.serviceProvisionCode == null) + return false; + for (CodeableConcept item : this.serviceProvisionCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceProvisionCode} (The code(s) that detail the conditions under which the healthcare service is available/offered.) + */ + // syntactic sugar + public CodeableConcept addServiceProvisionCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.serviceProvisionCode == null) + this.serviceProvisionCode = new ArrayList(); + this.serviceProvisionCode.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addServiceProvisionCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.serviceProvisionCode == null) + this.serviceProvisionCode = new ArrayList(); + this.serviceProvisionCode.add(t); + return this; + } + + /** + * @return {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?) + */ + public CodeableConcept getEligibility() { + if (this.eligibility == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.eligibility"); + else if (Configuration.doAutoCreate()) + this.eligibility = new CodeableConcept(); // cc + return this.eligibility; + } + + public boolean hasEligibility() { + return this.eligibility != null && !this.eligibility.isEmpty(); + } + + /** + * @param value {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?) + */ + public HealthcareService setEligibility(CodeableConcept value) { + this.eligibility = value; + return this; + } + + /** + * @return {@link #eligibilityNote} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getEligibilityNote" gives direct access to the value + */ + public StringType getEligibilityNoteElement() { + if (this.eligibilityNote == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.eligibilityNote"); + else if (Configuration.doAutoCreate()) + this.eligibilityNote = new StringType(); // bb + return this.eligibilityNote; + } + + public boolean hasEligibilityNoteElement() { + return this.eligibilityNote != null && !this.eligibilityNote.isEmpty(); + } + + public boolean hasEligibilityNote() { + return this.eligibilityNote != null && !this.eligibilityNote.isEmpty(); + } + + /** + * @param value {@link #eligibilityNote} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getEligibilityNote" gives direct access to the value + */ + public HealthcareService setEligibilityNoteElement(StringType value) { + this.eligibilityNote = value; + return this; + } + + /** + * @return Describes the eligibility conditions for the service. + */ + public String getEligibilityNote() { + return this.eligibilityNote == null ? null : this.eligibilityNote.getValue(); + } + + /** + * @param value Describes the eligibility conditions for the service. + */ + public HealthcareService setEligibilityNote(String value) { + if (Utilities.noString(value)) + this.eligibilityNote = null; + else { + if (this.eligibilityNote == null) + this.eligibilityNote = new StringType(); + this.eligibilityNote.setValue(value); + } + return this; + } + + /** + * @return {@link #programName} (Program Names that can be used to categorize the service.) + */ + public List getProgramName() { + if (this.programName == null) + this.programName = new ArrayList(); + return this.programName; + } + + public boolean hasProgramName() { + if (this.programName == null) + return false; + for (StringType item : this.programName) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programName} (Program Names that can be used to categorize the service.) + */ + // syntactic sugar + public StringType addProgramNameElement() {//2 + StringType t = new StringType(); + if (this.programName == null) + this.programName = new ArrayList(); + this.programName.add(t); + return t; + } + + /** + * @param value {@link #programName} (Program Names that can be used to categorize the service.) + */ + public HealthcareService addProgramName(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.programName == null) + this.programName = new ArrayList(); + this.programName.add(t); + return this; + } + + /** + * @param value {@link #programName} (Program Names that can be used to categorize the service.) + */ + public boolean hasProgramName(String value) { + if (this.programName == null) + return false; + for (StringType v : this.programName) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #characteristic} (Collection of characteristics (attributes).) + */ + public List getCharacteristic() { + if (this.characteristic == null) + this.characteristic = new ArrayList(); + return this.characteristic; + } + + public boolean hasCharacteristic() { + if (this.characteristic == null) + return false; + for (CodeableConcept item : this.characteristic) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #characteristic} (Collection of characteristics (attributes).) + */ + // syntactic sugar + public CodeableConcept addCharacteristic() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addCharacteristic(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return this; + } + + /** + * @return {@link #referralMethod} (Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.) + */ + public List getReferralMethod() { + if (this.referralMethod == null) + this.referralMethod = new ArrayList(); + return this.referralMethod; + } + + public boolean hasReferralMethod() { + if (this.referralMethod == null) + return false; + for (CodeableConcept item : this.referralMethod) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #referralMethod} (Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.) + */ + // syntactic sugar + public CodeableConcept addReferralMethod() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.referralMethod == null) + this.referralMethod = new ArrayList(); + this.referralMethod.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addReferralMethod(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.referralMethod == null) + this.referralMethod = new ArrayList(); + this.referralMethod.add(t); + return this; + } + + /** + * @return {@link #publicKey} (The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.). This is the underlying object with id, value and extensions. The accessor "getPublicKey" gives direct access to the value + */ + public StringType getPublicKeyElement() { + if (this.publicKey == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.publicKey"); + else if (Configuration.doAutoCreate()) + this.publicKey = new StringType(); // bb + return this.publicKey; + } + + public boolean hasPublicKeyElement() { + return this.publicKey != null && !this.publicKey.isEmpty(); + } + + public boolean hasPublicKey() { + return this.publicKey != null && !this.publicKey.isEmpty(); + } + + /** + * @param value {@link #publicKey} (The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.). This is the underlying object with id, value and extensions. The accessor "getPublicKey" gives direct access to the value + */ + public HealthcareService setPublicKeyElement(StringType value) { + this.publicKey = value; + return this; + } + + /** + * @return The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. + */ + public String getPublicKey() { + return this.publicKey == null ? null : this.publicKey.getValue(); + } + + /** + * @param value The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. + */ + public HealthcareService setPublicKey(String value) { + if (Utilities.noString(value)) + this.publicKey = null; + else { + if (this.publicKey == null) + this.publicKey = new StringType(); + this.publicKey.setValue(value); + } + return this; + } + + /** + * @return {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value + */ + public BooleanType getAppointmentRequiredElement() { + if (this.appointmentRequired == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.appointmentRequired"); + else if (Configuration.doAutoCreate()) + this.appointmentRequired = new BooleanType(); // bb + return this.appointmentRequired; + } + + public boolean hasAppointmentRequiredElement() { + return this.appointmentRequired != null && !this.appointmentRequired.isEmpty(); + } + + public boolean hasAppointmentRequired() { + return this.appointmentRequired != null && !this.appointmentRequired.isEmpty(); + } + + /** + * @param value {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value + */ + public HealthcareService setAppointmentRequiredElement(BooleanType value) { + this.appointmentRequired = value; + return this; + } + + /** + * @return Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. + */ + public boolean getAppointmentRequired() { + return this.appointmentRequired == null || this.appointmentRequired.isEmpty() ? false : this.appointmentRequired.getValue(); + } + + /** + * @param value Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. + */ + public HealthcareService setAppointmentRequired(boolean value) { + if (this.appointmentRequired == null) + this.appointmentRequired = new BooleanType(); + this.appointmentRequired.setValue(value); + return this; + } + + /** + * @return {@link #availableTime} (A collection of times that the Service Site is available.) + */ + public List getAvailableTime() { + if (this.availableTime == null) + this.availableTime = new ArrayList(); + return this.availableTime; + } + + public boolean hasAvailableTime() { + if (this.availableTime == null) + return false; + for (HealthcareServiceAvailableTimeComponent item : this.availableTime) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #availableTime} (A collection of times that the Service Site is available.) + */ + // syntactic sugar + public HealthcareServiceAvailableTimeComponent addAvailableTime() { //3 + HealthcareServiceAvailableTimeComponent t = new HealthcareServiceAvailableTimeComponent(); + if (this.availableTime == null) + this.availableTime = new ArrayList(); + this.availableTime.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addAvailableTime(HealthcareServiceAvailableTimeComponent t) { //3 + if (t == null) + return this; + if (this.availableTime == null) + this.availableTime = new ArrayList(); + this.availableTime.add(t); + return this; + } + + /** + * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.) + */ + public List getNotAvailable() { + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + return this.notAvailable; + } + + public boolean hasNotAvailable() { + if (this.notAvailable == null) + return false; + for (HealthcareServiceNotAvailableComponent item : this.notAvailable) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.) + */ + // syntactic sugar + public HealthcareServiceNotAvailableComponent addNotAvailable() { //3 + HealthcareServiceNotAvailableComponent t = new HealthcareServiceNotAvailableComponent(); + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + this.notAvailable.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addNotAvailable(HealthcareServiceNotAvailableComponent t) { //3 + if (t == null) + return this; + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + this.notAvailable.add(t); + return this; + } + + /** + * @return {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value + */ + public StringType getAvailabilityExceptionsElement() { + if (this.availabilityExceptions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HealthcareService.availabilityExceptions"); + else if (Configuration.doAutoCreate()) + this.availabilityExceptions = new StringType(); // bb + return this.availabilityExceptions; + } + + public boolean hasAvailabilityExceptionsElement() { + return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); + } + + public boolean hasAvailabilityExceptions() { + return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); + } + + /** + * @param value {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value + */ + public HealthcareService setAvailabilityExceptionsElement(StringType value) { + this.availabilityExceptions = value; + return this; + } + + /** + * @return A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + public String getAvailabilityExceptions() { + return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue(); + } + + /** + * @param value A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + public HealthcareService setAvailabilityExceptions(String value) { + if (Utilities.noString(value)) + this.availabilityExceptions = null; + else { + if (this.availabilityExceptions == null) + this.availabilityExceptions = new StringType(); + this.availabilityExceptions.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, java.lang.Integer.MAX_VALUE, providedBy)); + childrenList.add(new Property("serviceCategory", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); + childrenList.add(new Property("serviceType", "", "A specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + childrenList.add(new Property("location", "Reference(Location)", "The location where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("serviceName", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, java.lang.Integer.MAX_VALUE, serviceName)); + childrenList.add(new Property("comment", "string", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, java.lang.Integer.MAX_VALUE, comment)); + childrenList.add(new Property("extraDetails", "string", "Extra details about the service that can't be placed in the other fields.", 0, java.lang.Integer.MAX_VALUE, extraDetails)); + childrenList.add(new Property("photo", "Attachment", "If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", 0, java.lang.Integer.MAX_VALUE, photo)); + childrenList.add(new Property("telecom", "ContactPoint", "List of contacts related to this specific healthcare service.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("coverageArea", "Reference(Location)", "The location(s) that this service is available to (not where the service is provided).", 0, java.lang.Integer.MAX_VALUE, coverageArea)); + childrenList.add(new Property("serviceProvisionCode", "CodeableConcept", "The code(s) that detail the conditions under which the healthcare service is available/offered.", 0, java.lang.Integer.MAX_VALUE, serviceProvisionCode)); + childrenList.add(new Property("eligibility", "CodeableConcept", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, java.lang.Integer.MAX_VALUE, eligibility)); + childrenList.add(new Property("eligibilityNote", "string", "Describes the eligibility conditions for the service.", 0, java.lang.Integer.MAX_VALUE, eligibilityNote)); + childrenList.add(new Property("programName", "string", "Program Names that can be used to categorize the service.", 0, java.lang.Integer.MAX_VALUE, programName)); + childrenList.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic)); + childrenList.add(new Property("referralMethod", "CodeableConcept", "Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", 0, java.lang.Integer.MAX_VALUE, referralMethod)); + childrenList.add(new Property("publicKey", "string", "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", 0, java.lang.Integer.MAX_VALUE, publicKey)); + childrenList.add(new Property("appointmentRequired", "boolean", "Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", 0, java.lang.Integer.MAX_VALUE, appointmentRequired)); + childrenList.add(new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime)); + childrenList.add(new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable)); + childrenList.add(new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, java.lang.Integer.MAX_VALUE, availabilityExceptions)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("providedBy")) + this.providedBy = castToReference(value); // Reference + else if (name.equals("serviceCategory")) + this.serviceCategory = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceType")) + this.getServiceType().add((ServiceTypeComponent) value); + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("serviceName")) + this.serviceName = castToString(value); // StringType + else if (name.equals("comment")) + this.comment = castToString(value); // StringType + else if (name.equals("extraDetails")) + this.extraDetails = castToString(value); // StringType + else if (name.equals("photo")) + this.photo = castToAttachment(value); // Attachment + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("coverageArea")) + this.getCoverageArea().add(castToReference(value)); + else if (name.equals("serviceProvisionCode")) + this.getServiceProvisionCode().add(castToCodeableConcept(value)); + else if (name.equals("eligibility")) + this.eligibility = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("eligibilityNote")) + this.eligibilityNote = castToString(value); // StringType + else if (name.equals("programName")) + this.getProgramName().add(castToString(value)); + else if (name.equals("characteristic")) + this.getCharacteristic().add(castToCodeableConcept(value)); + else if (name.equals("referralMethod")) + this.getReferralMethod().add(castToCodeableConcept(value)); + else if (name.equals("publicKey")) + this.publicKey = castToString(value); // StringType + else if (name.equals("appointmentRequired")) + this.appointmentRequired = castToBoolean(value); // BooleanType + else if (name.equals("availableTime")) + this.getAvailableTime().add((HealthcareServiceAvailableTimeComponent) value); + else if (name.equals("notAvailable")) + this.getNotAvailable().add((HealthcareServiceNotAvailableComponent) value); + else if (name.equals("availabilityExceptions")) + this.availabilityExceptions = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("providedBy")) { + this.providedBy = new Reference(); + return this.providedBy; + } + else if (name.equals("serviceCategory")) { + this.serviceCategory = new CodeableConcept(); + return this.serviceCategory; + } + else if (name.equals("serviceType")) { + return addServiceType(); + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("serviceName")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.serviceName"); + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.comment"); + } + else if (name.equals("extraDetails")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.extraDetails"); + } + else if (name.equals("photo")) { + this.photo = new Attachment(); + return this.photo; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("coverageArea")) { + return addCoverageArea(); + } + else if (name.equals("serviceProvisionCode")) { + return addServiceProvisionCode(); + } + else if (name.equals("eligibility")) { + this.eligibility = new CodeableConcept(); + return this.eligibility; + } + else if (name.equals("eligibilityNote")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.eligibilityNote"); + } + else if (name.equals("programName")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.programName"); + } + else if (name.equals("characteristic")) { + return addCharacteristic(); + } + else if (name.equals("referralMethod")) { + return addReferralMethod(); + } + else if (name.equals("publicKey")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.publicKey"); + } + else if (name.equals("appointmentRequired")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.appointmentRequired"); + } + else if (name.equals("availableTime")) { + return addAvailableTime(); + } + else if (name.equals("notAvailable")) { + return addNotAvailable(); + } + else if (name.equals("availabilityExceptions")) { + throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availabilityExceptions"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "HealthcareService"; + + } + + public HealthcareService copy() { + HealthcareService dst = new HealthcareService(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.providedBy = providedBy == null ? null : providedBy.copy(); + dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy(); + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (ServiceTypeComponent i : serviceType) + dst.serviceType.add(i.copy()); + }; + dst.location = location == null ? null : location.copy(); + dst.serviceName = serviceName == null ? null : serviceName.copy(); + dst.comment = comment == null ? null : comment.copy(); + dst.extraDetails = extraDetails == null ? null : extraDetails.copy(); + dst.photo = photo == null ? null : photo.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + if (coverageArea != null) { + dst.coverageArea = new ArrayList(); + for (Reference i : coverageArea) + dst.coverageArea.add(i.copy()); + }; + if (serviceProvisionCode != null) { + dst.serviceProvisionCode = new ArrayList(); + for (CodeableConcept i : serviceProvisionCode) + dst.serviceProvisionCode.add(i.copy()); + }; + dst.eligibility = eligibility == null ? null : eligibility.copy(); + dst.eligibilityNote = eligibilityNote == null ? null : eligibilityNote.copy(); + if (programName != null) { + dst.programName = new ArrayList(); + for (StringType i : programName) + dst.programName.add(i.copy()); + }; + if (characteristic != null) { + dst.characteristic = new ArrayList(); + for (CodeableConcept i : characteristic) + dst.characteristic.add(i.copy()); + }; + if (referralMethod != null) { + dst.referralMethod = new ArrayList(); + for (CodeableConcept i : referralMethod) + dst.referralMethod.add(i.copy()); + }; + dst.publicKey = publicKey == null ? null : publicKey.copy(); + dst.appointmentRequired = appointmentRequired == null ? null : appointmentRequired.copy(); + if (availableTime != null) { + dst.availableTime = new ArrayList(); + for (HealthcareServiceAvailableTimeComponent i : availableTime) + dst.availableTime.add(i.copy()); + }; + if (notAvailable != null) { + dst.notAvailable = new ArrayList(); + for (HealthcareServiceNotAvailableComponent i : notAvailable) + dst.notAvailable.add(i.copy()); + }; + dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy(); + return dst; + } + + protected HealthcareService typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof HealthcareService)) + return false; + HealthcareService o = (HealthcareService) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(providedBy, o.providedBy, true) + && compareDeep(serviceCategory, o.serviceCategory, true) && compareDeep(serviceType, o.serviceType, true) + && compareDeep(location, o.location, true) && compareDeep(serviceName, o.serviceName, true) && compareDeep(comment, o.comment, true) + && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true) + && compareDeep(eligibility, o.eligibility, true) && compareDeep(eligibilityNote, o.eligibilityNote, true) + && compareDeep(programName, o.programName, true) && compareDeep(characteristic, o.characteristic, true) + && compareDeep(referralMethod, o.referralMethod, true) && compareDeep(publicKey, o.publicKey, true) + && compareDeep(appointmentRequired, o.appointmentRequired, true) && compareDeep(availableTime, o.availableTime, true) + && compareDeep(notAvailable, o.notAvailable, true) && compareDeep(availabilityExceptions, o.availabilityExceptions, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof HealthcareService)) + return false; + HealthcareService o = (HealthcareService) other; + return compareValues(serviceName, o.serviceName, true) && compareValues(comment, o.comment, true) && compareValues(extraDetails, o.extraDetails, true) + && compareValues(eligibilityNote, o.eligibilityNote, true) && compareValues(programName, o.programName, true) + && compareValues(publicKey, o.publicKey, true) && compareValues(appointmentRequired, o.appointmentRequired, true) + && compareValues(availabilityExceptions, o.availabilityExceptions, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (providedBy == null || providedBy.isEmpty()) + && (serviceCategory == null || serviceCategory.isEmpty()) && (serviceType == null || serviceType.isEmpty()) + && (location == null || location.isEmpty()) && (serviceName == null || serviceName.isEmpty()) + && (comment == null || comment.isEmpty()) && (extraDetails == null || extraDetails.isEmpty()) + && (photo == null || photo.isEmpty()) && (telecom == null || telecom.isEmpty()) && (coverageArea == null || coverageArea.isEmpty()) + && (serviceProvisionCode == null || serviceProvisionCode.isEmpty()) && (eligibility == null || eligibility.isEmpty()) + && (eligibilityNote == null || eligibilityNote.isEmpty()) && (programName == null || programName.isEmpty()) + && (characteristic == null || characteristic.isEmpty()) && (referralMethod == null || referralMethod.isEmpty()) + && (publicKey == null || publicKey.isEmpty()) && (appointmentRequired == null || appointmentRequired.isEmpty()) + && (availableTime == null || availableTime.isEmpty()) && (notAvailable == null || notAvailable.isEmpty()) + && (availabilityExceptions == null || availabilityExceptions.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.HealthcareService; + } + + @SearchParamDefinition(name="identifier", path="HealthcareService.identifier", description="External identifiers for this item", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="servicecategory", path="HealthcareService.serviceCategory", description="Service Category of the Healthcare Service", type="token" ) + public static final String SP_SERVICECATEGORY = "servicecategory"; + @SearchParamDefinition(name="servicetype", path="HealthcareService.serviceType.type", description="The type of service provided by this healthcare service", type="token" ) + public static final String SP_SERVICETYPE = "servicetype"; + @SearchParamDefinition(name="organization", path="HealthcareService.providedBy", description="The organization that provides this Healthcare Service", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="HealthcareService.serviceName", description="A portion of the Healthcare service name", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="programname", path="HealthcareService.programName", description="One of the Program Names serviced by this HealthcareService", type="string" ) + public static final String SP_PROGRAMNAME = "programname"; + @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="characteristic", path="HealthcareService.characteristic", description="One of the HealthcareService's characteristics", type="token" ) + public static final String SP_CHARACTERISTIC = "characteristic"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HumanName.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HumanName.java new file mode 100644 index 00000000000..802f8229595 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/HumanName.java @@ -0,0 +1,738 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A human's name with the ability to identify parts and usage. + */ +@DatatypeDef(name="HumanName") +public class HumanName extends Type implements ICompositeType { + + public enum NameUse { + /** + * Known as/conventional/the one you normally use + */ + USUAL, + /** + * The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called "legal name". + */ + OFFICIAL, + /** + * A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. + */ + TEMP, + /** + * A name that is used to address the person in an informal manner, but is not part of their formal or usual name + */ + NICKNAME, + /** + * Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons) + */ + ANONYMOUS, + /** + * This name is no longer in use (or was never correct, but retained for records) + */ + OLD, + /** + * A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store "maiden" names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically. + */ + MAIDEN, + /** + * added to help the parsers + */ + NULL; + public static NameUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return USUAL; + if ("official".equals(codeString)) + return OFFICIAL; + if ("temp".equals(codeString)) + return TEMP; + if ("nickname".equals(codeString)) + return NICKNAME; + if ("anonymous".equals(codeString)) + return ANONYMOUS; + if ("old".equals(codeString)) + return OLD; + if ("maiden".equals(codeString)) + return MAIDEN; + throw new FHIRException("Unknown NameUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USUAL: return "usual"; + case OFFICIAL: return "official"; + case TEMP: return "temp"; + case NICKNAME: return "nickname"; + case ANONYMOUS: return "anonymous"; + case OLD: return "old"; + case MAIDEN: return "maiden"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case USUAL: return "http://hl7.org/fhir/name-use"; + case OFFICIAL: return "http://hl7.org/fhir/name-use"; + case TEMP: return "http://hl7.org/fhir/name-use"; + case NICKNAME: return "http://hl7.org/fhir/name-use"; + case ANONYMOUS: return "http://hl7.org/fhir/name-use"; + case OLD: return "http://hl7.org/fhir/name-use"; + case MAIDEN: return "http://hl7.org/fhir/name-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case USUAL: return "Known as/conventional/the one you normally use"; + case OFFICIAL: return "The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called \"legal name\"."; + case TEMP: return "A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations."; + case NICKNAME: return "A name that is used to address the person in an informal manner, but is not part of their formal or usual name"; + case ANONYMOUS: return "Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)"; + case OLD: return "This name is no longer in use (or was never correct, but retained for records)"; + case MAIDEN: return "A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store \"maiden\" names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USUAL: return "Usual"; + case OFFICIAL: return "Official"; + case TEMP: return "Temp"; + case NICKNAME: return "Nickname"; + case ANONYMOUS: return "Anonymous"; + case OLD: return "Old"; + case MAIDEN: return "Maiden"; + default: return "?"; + } + } + } + + public static class NameUseEnumFactory implements EnumFactory { + public NameUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return NameUse.USUAL; + if ("official".equals(codeString)) + return NameUse.OFFICIAL; + if ("temp".equals(codeString)) + return NameUse.TEMP; + if ("nickname".equals(codeString)) + return NameUse.NICKNAME; + if ("anonymous".equals(codeString)) + return NameUse.ANONYMOUS; + if ("old".equals(codeString)) + return NameUse.OLD; + if ("maiden".equals(codeString)) + return NameUse.MAIDEN; + throw new IllegalArgumentException("Unknown NameUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return new Enumeration(this, NameUse.USUAL); + if ("official".equals(codeString)) + return new Enumeration(this, NameUse.OFFICIAL); + if ("temp".equals(codeString)) + return new Enumeration(this, NameUse.TEMP); + if ("nickname".equals(codeString)) + return new Enumeration(this, NameUse.NICKNAME); + if ("anonymous".equals(codeString)) + return new Enumeration(this, NameUse.ANONYMOUS); + if ("old".equals(codeString)) + return new Enumeration(this, NameUse.OLD); + if ("maiden".equals(codeString)) + return new Enumeration(this, NameUse.MAIDEN); + throw new FHIRException("Unknown NameUse code '"+codeString+"'"); + } + public String toCode(NameUse code) { + if (code == NameUse.USUAL) + return "usual"; + if (code == NameUse.OFFICIAL) + return "official"; + if (code == NameUse.TEMP) + return "temp"; + if (code == NameUse.NICKNAME) + return "nickname"; + if (code == NameUse.ANONYMOUS) + return "anonymous"; + if (code == NameUse.OLD) + return "old"; + if (code == NameUse.MAIDEN) + return "maiden"; + return "?"; + } + } + + /** + * Identifies the purpose for this name. + */ + @Child(name = "use", type = {CodeType.class}, order=0, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="usual | official | temp | nickname | anonymous | old | maiden", formalDefinition="Identifies the purpose for this name." ) + protected Enumeration use; + + /** + * A full text representation of the name. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text representation of the full name", formalDefinition="A full text representation of the name." ) + protected StringType text; + + /** + * The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + */ + @Child(name = "family", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Family name (often called 'Surname')", formalDefinition="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." ) + protected List family; + + /** + * Given name. + */ + @Child(name = "given", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Given names (not always 'first'). Includes middle names", formalDefinition="Given name." ) + protected List given; + + /** + * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name. + */ + @Child(name = "prefix", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Parts that come before the name", formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." ) + protected List prefix; + + /** + * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name. + */ + @Child(name = "suffix", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Parts that come after the name", formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." ) + protected List suffix; + + /** + * Indicates the period of time when this name was valid for the named person. + */ + @Child(name = "period", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period when name was/is in use", formalDefinition="Indicates the period of time when this name was valid for the named person." ) + protected Period period; + + private static final long serialVersionUID = -210174642L; + + /* + * Constructor + */ + public HumanName() { + super(); + } + + /** + * @return {@link #use} (Identifies the purpose for this name.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HumanName.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new NameUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Identifies the purpose for this name.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public HumanName setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return Identifies the purpose for this name. + */ + public NameUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Identifies the purpose for this name. + */ + public HumanName setUse(NameUse value) { + if (value == null) + this.use = null; + else { + if (this.use == null) + this.use = new Enumeration(new NameUseEnumFactory()); + this.use.setValue(value); + } + return this; + } + + /** + * @return {@link #text} (A full text representation of the name.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HumanName.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (A full text representation of the name.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public HumanName setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return A full text representation of the name. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value A full text representation of the name. + */ + public HumanName setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #family} (The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.) + */ + public List getFamily() { + if (this.family == null) + this.family = new ArrayList(); + return this.family; + } + + public boolean hasFamily() { + if (this.family == null) + return false; + for (StringType item : this.family) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #family} (The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.) + */ + // syntactic sugar + public StringType addFamilyElement() {//2 + StringType t = new StringType(); + if (this.family == null) + this.family = new ArrayList(); + this.family.add(t); + return t; + } + + /** + * @param value {@link #family} (The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.) + */ + public HumanName addFamily(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.family == null) + this.family = new ArrayList(); + this.family.add(t); + return this; + } + + /** + * @param value {@link #family} (The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.) + */ + public boolean hasFamily(String value) { + if (this.family == null) + return false; + for (StringType v : this.family) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #given} (Given name.) + */ + public List getGiven() { + if (this.given == null) + this.given = new ArrayList(); + return this.given; + } + + public boolean hasGiven() { + if (this.given == null) + return false; + for (StringType item : this.given) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #given} (Given name.) + */ + // syntactic sugar + public StringType addGivenElement() {//2 + StringType t = new StringType(); + if (this.given == null) + this.given = new ArrayList(); + this.given.add(t); + return t; + } + + /** + * @param value {@link #given} (Given name.) + */ + public HumanName addGiven(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.given == null) + this.given = new ArrayList(); + this.given.add(t); + return this; + } + + /** + * @param value {@link #given} (Given name.) + */ + public boolean hasGiven(String value) { + if (this.given == null) + return false; + for (StringType v : this.given) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #prefix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.) + */ + public List getPrefix() { + if (this.prefix == null) + this.prefix = new ArrayList(); + return this.prefix; + } + + public boolean hasPrefix() { + if (this.prefix == null) + return false; + for (StringType item : this.prefix) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #prefix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.) + */ + // syntactic sugar + public StringType addPrefixElement() {//2 + StringType t = new StringType(); + if (this.prefix == null) + this.prefix = new ArrayList(); + this.prefix.add(t); + return t; + } + + /** + * @param value {@link #prefix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.) + */ + public HumanName addPrefix(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.prefix == null) + this.prefix = new ArrayList(); + this.prefix.add(t); + return this; + } + + /** + * @param value {@link #prefix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.) + */ + public boolean hasPrefix(String value) { + if (this.prefix == null) + return false; + for (StringType v : this.prefix) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #suffix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.) + */ + public List getSuffix() { + if (this.suffix == null) + this.suffix = new ArrayList(); + return this.suffix; + } + + public boolean hasSuffix() { + if (this.suffix == null) + return false; + for (StringType item : this.suffix) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #suffix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.) + */ + // syntactic sugar + public StringType addSuffixElement() {//2 + StringType t = new StringType(); + if (this.suffix == null) + this.suffix = new ArrayList(); + this.suffix.add(t); + return t; + } + + /** + * @param value {@link #suffix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.) + */ + public HumanName addSuffix(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.suffix == null) + this.suffix = new ArrayList(); + this.suffix.add(t); + return this; + } + + /** + * @param value {@link #suffix} (Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.) + */ + public boolean hasSuffix(String value) { + if (this.suffix == null) + return false; + for (StringType v : this.suffix) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #period} (Indicates the period of time when this name was valid for the named person.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create HumanName.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Indicates the period of time when this name was valid for the named person.) + */ + public HumanName setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("use", "code", "Identifies the purpose for this name.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("text", "string", "A full text representation of the name.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("family", "string", "The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.", 0, java.lang.Integer.MAX_VALUE, family)); + childrenList.add(new Property("given", "string", "Given name.", 0, java.lang.Integer.MAX_VALUE, given)); + childrenList.add(new Property("prefix", "string", "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.", 0, java.lang.Integer.MAX_VALUE, prefix)); + childrenList.add(new Property("suffix", "string", "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.", 0, java.lang.Integer.MAX_VALUE, suffix)); + childrenList.add(new Property("period", "Period", "Indicates the period of time when this name was valid for the named person.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("use")) + this.use = new NameUseEnumFactory().fromType(value); // Enumeration + else if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("family")) + this.getFamily().add(castToString(value)); + else if (name.equals("given")) + this.getGiven().add(castToString(value)); + else if (name.equals("prefix")) + this.getPrefix().add(castToString(value)); + else if (name.equals("suffix")) + this.getSuffix().add(castToString(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.use"); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.text"); + } + else if (name.equals("family")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.family"); + } + else if (name.equals("given")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.given"); + } + else if (name.equals("prefix")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.prefix"); + } + else if (name.equals("suffix")) { + throw new FHIRException("Cannot call addChild on a primitive type HumanName.suffix"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "HumanName"; + + } + + public HumanName copy() { + HumanName dst = new HumanName(); + copyValues(dst); + dst.use = use == null ? null : use.copy(); + dst.text = text == null ? null : text.copy(); + if (family != null) { + dst.family = new ArrayList(); + for (StringType i : family) + dst.family.add(i.copy()); + }; + if (given != null) { + dst.given = new ArrayList(); + for (StringType i : given) + dst.given.add(i.copy()); + }; + if (prefix != null) { + dst.prefix = new ArrayList(); + for (StringType i : prefix) + dst.prefix.add(i.copy()); + }; + if (suffix != null) { + dst.suffix = new ArrayList(); + for (StringType i : suffix) + dst.suffix.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected HumanName typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof HumanName)) + return false; + HumanName o = (HumanName) other; + return compareDeep(use, o.use, true) && compareDeep(text, o.text, true) && compareDeep(family, o.family, true) + && compareDeep(given, o.given, true) && compareDeep(prefix, o.prefix, true) && compareDeep(suffix, o.suffix, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof HumanName)) + return false; + HumanName o = (HumanName) other; + return compareValues(use, o.use, true) && compareValues(text, o.text, true) && compareValues(family, o.family, true) + && compareValues(given, o.given, true) && compareValues(prefix, o.prefix, true) && compareValues(suffix, o.suffix, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (use == null || use.isEmpty()) && (text == null || text.isEmpty()) + && (family == null || family.isEmpty()) && (given == null || given.isEmpty()) && (prefix == null || prefix.isEmpty()) + && (suffix == null || suffix.isEmpty()) && (period == null || period.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IdType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IdType.java new file mode 100644 index 00000000000..cf96177e94f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IdType.java @@ -0,0 +1,740 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +import java.math.BigDecimal; +import java.util.UUID; + +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.Validate; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * This class represents the logical identity for a resource, or as much of that + * identity is known. In FHIR, every resource must have a "logical ID" which is + * defined by the FHIR specification as: + *

+ * A whole number in the range 0 to 2^64-1 (optionally represented in hex), + * a uuid, an oid, or any other combination of lowercase letters, numerals, "-" + * and ".", with a length limit of 36 characters + *

+ *

+ * This class contains that logical ID, and can optionally also contain a + * relative or absolute URL representing the resource identity. For example, the + * following are all valid values for IdType, and all might represent the same + * resource: + *

+ *
    + *
  • 123 (just a resource's ID)
  • + *
  • Patient/123 (a relative identity)
  • + *
  • http://example.com/Patient/123 (an absolute identity)
  • + *
  • + * http://example.com/Patient/123/_history/1 (an absolute identity with a version id) + *
  • + *
  • + * Patient/123/_history/1 (a relative identity with a version id) + *
  • + *
+ *

+ * In most situations, you only need to populate the resource's ID (e.g. + * 123) in resources you are constructing and the encoder will + * infer the rest from the context in which the object is being used. On the + * other hand, the parser will always try to populate the complete absolute + * identity on objects it creates as a convenience. + *

+ *

+ * Regex for ID: [a-z0-9\-\.]{1,36} + *

+ */ +@DatatypeDef(name = "id", profileOf=StringType.class) +public final class IdType extends UriType implements IPrimitiveType, IIdType { + /** + * This is the maximum length for the ID + */ + public static final int MAX_LENGTH = 64; // maximum length + + private static final long serialVersionUID = 2L; + private String myBaseUrl; + private boolean myHaveComponentParts; + private String myResourceType; + private String myUnqualifiedId; + private String myUnqualifiedVersionId; + + /** + * Create a new empty ID + */ + public IdType() { + super(); + } + + /** + * Create a new ID, using a BigDecimal input. Uses + * {@link BigDecimal#toPlainString()} to generate the string representation. + */ + public IdType(BigDecimal thePid) { + if (thePid != null) { + setValue(toPlainStringWithNpeThrowIfNeeded(thePid)); + } else { + setValue(null); + } + } + + /** + * Create a new ID using a long + */ + public IdType(long theId) { + setValue(Long.toString(theId)); + } + + /** + * Create a new ID using a string. This String may contain a simple ID (e.g. + * "1234") or it may contain a complete URL + * (http://example.com/fhir/Patient/1234). + * + *

+ * Description: A whole number in the range 0 to 2^64-1 (optionally + * represented in hex), a uuid, an oid, or any other combination of lowercase + * letters, numerals, "-" and ".", with a length limit of 36 characters. + *

+ *

+ * regex: [a-z0-9\-\.]{1,36} + *

+ */ + public IdType(String theValue) { + setValue(theValue); + } + + /** + * Constructor + * + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theIdPart + * The ID (e.g. "123") + */ + public IdType(String theResourceType, BigDecimal theIdPart) { + this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); + } + + /** + * Constructor + * + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theIdPart + * The ID (e.g. "123") + */ + public IdType(String theResourceType, Long theIdPart) { + this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); + } + + /** + * Constructor + * + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theId + * The ID (e.g. "123") + */ + public IdType(String theResourceType, String theId) { + this(theResourceType, theId, null); + } + + /** + * Constructor + * + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theId + * The ID (e.g. "123") + * @param theVersionId + * The version ID ("e.g. "456") + */ + public IdType(String theResourceType, String theId, String theVersionId) { + this(null, theResourceType, theId, theVersionId); + } + + /** + * Constructor + * + * @param theBaseUrl + * The server base URL (e.g. "http://example.com/fhir") + * @param theResourceType + * The resource type (e.g. "Patient") + * @param theId + * The ID (e.g. "123") + * @param theVersionId + * The version ID ("e.g. "456") + */ + public IdType(String theBaseUrl, String theResourceType, String theId, String theVersionId) { + myBaseUrl = theBaseUrl; + myResourceType = theResourceType; + myUnqualifiedId = theId; + myUnqualifiedVersionId = StringUtils.defaultIfBlank(theVersionId, null); + myHaveComponentParts = true; + } + + /** + * Creates an ID based on a given URL + */ + public IdType(UriType theUrl) { + setValue(theUrl.getValueAsString()); + } + + public void applyTo(IBaseResource theResouce) { + if (theResouce == null) { + throw new NullPointerException("theResource can not be null"); + } else { + theResouce.setId(new IdType(getValue())); + } + } + + /** + * @deprecated Use {@link #getIdPartAsBigDecimal()} instead (this method was + * deprocated because its name is ambiguous) + */ + @Deprecated + public BigDecimal asBigDecimal() { + return getIdPartAsBigDecimal(); + } + + @Override + public IdType copy() { + return new IdType(getValue()); + } + + private String determineLocalPrefix(String theValue) { + if (theValue == null || theValue.isEmpty()) { + return null; + } + if (theValue.startsWith("#")) { + return "#"; + } + int lastPrefix = -1; + for (int i = 0; i < theValue.length(); i++) { + char nextChar = theValue.charAt(i); + if (nextChar == ':') { + lastPrefix = i; + } else if (!Character.isLetter(nextChar) || !Character.isLowerCase(nextChar)) { + break; + } + } + if (lastPrefix != -1) { + String candidate = theValue.substring(0, lastPrefix + 1); + if (candidate.startsWith("cid:") || candidate.startsWith("urn:")) { + return candidate; + } else { + return null; + } + } else { + return null; + } + } + + @Override + public boolean equals(Object theArg0) { + if (!(theArg0 instanceof IdType)) { + return false; + } + IdType id = (IdType) theArg0; + return StringUtils.equals(getValueAsString(), id.getValueAsString()); + } + + /** + * Returns true if this IdType matches the given IdType in terms of resource + * type and ID, but ignores the URL base + */ + @SuppressWarnings("deprecation") + public boolean equalsIgnoreBase(IdType theId) { + if (theId == null) { + return false; + } + if (theId.isEmpty()) { + return isEmpty(); + } + return ObjectUtils.equals(getResourceType(), theId.getResourceType()) + && ObjectUtils.equals(getIdPart(), theId.getIdPart()) + && ObjectUtils.equals(getVersionIdPart(), theId.getVersionIdPart()); + } + + /** + * Returns the portion of this resource ID which corresponds to the server + * base URL. For example given the resource ID + * http://example.com/fhir/Patient/123 the base URL would be + * http://example.com/fhir. + *

+ * This method may return null if the ID contains no base (e.g. "Patient/123") + *

+ */ + @Override + public String getBaseUrl() { + return myBaseUrl; + } + + /** + * Returns only the logical ID part of this ID. For example, given the ID + * "http://example,.com/fhir/Patient/123/_history/456", this method would + * return "123". + */ + @Override + public String getIdPart() { + return myUnqualifiedId; + } + + /** + * Returns the unqualified portion of this ID as a big decimal, or + * null if the value is null + * + * @throws NumberFormatException + * If the value is not a valid BigDecimal + */ + public BigDecimal getIdPartAsBigDecimal() { + String val = getIdPart(); + if (isBlank(val)) { + return null; + } + return new BigDecimal(val); + } + + /** + * Returns the unqualified portion of this ID as a {@link Long}, or + * null if the value is null + * + * @throws NumberFormatException + * If the value is not a valid Long + */ + @Override + public Long getIdPartAsLong() { + String val = getIdPart(); + if (isBlank(val)) { + return null; + } + return Long.parseLong(val); + } + + @Override + public String getResourceType() { + return myResourceType; + } + + /** + * Returns the value of this ID. Note that this value may be a fully qualified + * URL, a relative/partial URL, or a simple ID. Use {@link #getIdPart()} to + * get just the ID portion. + * + * @see #getIdPart() + */ + @Override + public String getValue() { + String retVal = super.getValue(); + if (retVal == null && myHaveComponentParts) { + + if (determineLocalPrefix(myBaseUrl) != null && myResourceType == null && myUnqualifiedVersionId == null) { + return myBaseUrl + myUnqualifiedId; + } + + StringBuilder b = new StringBuilder(); + if (isNotBlank(myBaseUrl)) { + b.append(myBaseUrl); + if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') { + b.append('/'); + } + } + + if (isNotBlank(myResourceType)) { + b.append(myResourceType); + } + + if (b.length() > 0) { + b.append('/'); + } + + b.append(myUnqualifiedId); + if (isNotBlank(myUnqualifiedVersionId)) { + b.append('/'); + b.append("_history"); + b.append('/'); + b.append(myUnqualifiedVersionId); + } + retVal = b.toString(); + super.setValue(retVal); + } + return retVal; + } + + @Override + public String getValueAsString() { + return getValue(); + } + + @Override + public String getVersionIdPart() { + return myUnqualifiedVersionId; + } + + public Long getVersionIdPartAsLong() { + if (!hasVersionIdPart()) { + return null; + } else { + return Long.parseLong(getVersionIdPart()); + } + } + + /** + * Returns true if this ID has a base url + * + * @see #getBaseUrl() + */ + public boolean hasBaseUrl() { + return isNotBlank(myBaseUrl); + } + + @Override + public int hashCode() { + HashCodeBuilder b = new HashCodeBuilder(); + b.append(getValueAsString()); + return b.toHashCode(); + } + + @Override + public boolean hasIdPart() { + return isNotBlank(getIdPart()); + } + + @Override + public boolean hasResourceType() { + return isNotBlank(myResourceType); + } + + @Override + public boolean hasVersionIdPart() { + return isNotBlank(getVersionIdPart()); + } + + /** + * Returns true if this ID contains an absolute URL (in other + * words, a URL starting with "http://" or "https://" + */ + @Override + public boolean isAbsolute() { + if (StringUtils.isBlank(getValue())) { + return false; + } + return isUrlAbsolute(getValue()); + } + + @Override + public boolean isEmpty() { + return isBlank(getValue()); + } + + @Override + public boolean isIdPartValid() { + String id = getIdPart(); + if (StringUtils.isBlank(id)) { + return false; + } + if (id.length() > 64) { + return false; + } + for (int i = 0; i < id.length(); i++) { + char nextChar = id.charAt(i); + if (nextChar >= 'a' && nextChar <= 'z') { + continue; + } + if (nextChar >= 'A' && nextChar <= 'Z') { + continue; + } + if (nextChar >= '0' && nextChar <= '9') { + continue; + } + if (nextChar == '-' || nextChar == '.') { + continue; + } + return false; + } + return true; + } + + /** + * Returns true if the unqualified ID is a valid {@link Long} + * value (in other words, it consists only of digits) + */ + @Override + public boolean isIdPartValidLong() { + return isValidLong(getIdPart()); + } + + /** + * Returns true if the ID is a local reference (in other words, + * it begins with the '#' character) + */ + @Override + public boolean isLocal() { + return "#".equals(myBaseUrl); + } + + @Override + public boolean isVersionIdPartValidLong() { + return isValidLong(getVersionIdPart()); + } + + /** + * Set the value + * + *

+ * Description: A whole number in the range 0 to 2^64-1 (optionally + * represented in hex), a uuid, an oid, or any other combination of lowercase + * letters, numerals, "-" and ".", with a length limit of 36 characters. + *

+ *

+ * regex: [a-z0-9\-\.]{1,36} + *

+ */ + @Override + public IdType setValue(String theValue) { + // TODO: add validation + super.setValue(theValue); + myHaveComponentParts = false; + + String localPrefix = determineLocalPrefix(theValue); + + if (StringUtils.isBlank(theValue)) { + myBaseUrl = null; + super.setValue(null); + myUnqualifiedId = null; + myUnqualifiedVersionId = null; + myResourceType = null; + } else if (theValue.charAt(0) == '#' && theValue.length() > 1) { + super.setValue(theValue); + myBaseUrl = "#"; + myUnqualifiedId = theValue.substring(1); + myUnqualifiedVersionId = null; + myResourceType = null; + myHaveComponentParts = true; + } else if (localPrefix != null) { + myBaseUrl = localPrefix; + myUnqualifiedId = theValue.substring(localPrefix.length()); + } else { + int vidIndex = theValue.indexOf("/_history/"); + int idIndex; + if (vidIndex != -1) { + myUnqualifiedVersionId = theValue.substring(vidIndex + "/_history/".length()); + idIndex = theValue.lastIndexOf('/', vidIndex - 1); + myUnqualifiedId = theValue.substring(idIndex + 1, vidIndex); + } else { + idIndex = theValue.lastIndexOf('/'); + myUnqualifiedId = theValue.substring(idIndex + 1); + myUnqualifiedVersionId = null; + } + + myBaseUrl = null; + if (idIndex <= 0) { + myResourceType = null; + } else { + int typeIndex = theValue.lastIndexOf('/', idIndex - 1); + if (typeIndex == -1) { + myResourceType = theValue.substring(0, idIndex); + } else { + myResourceType = theValue.substring(typeIndex + 1, idIndex); + + if (typeIndex > 4) { + myBaseUrl = theValue.substring(0, typeIndex); + } + + } + } + + } + return this; + } + + /** + * Set the value + * + *

+ * Description: A whole number in the range 0 to 2^64-1 (optionally + * represented in hex), a uuid, an oid, or any other combination of lowercase + * letters, numerals, "-" and ".", with a length limit of 36 characters. + *

+ *

+ * regex: [a-z0-9\-\.]{1,36} + *

+ */ + @Override + public void setValueAsString(String theValue) { + setValue(theValue); + } + + @Override + public String toString() { + return getValue(); + } + + /** + * Returns a new IdType containing this IdType's values but with no server + * base URL if one is present in this IdType. For example, if this IdType + * contains the ID "http://foo/Patient/1", this method will return a new + * IdType containing ID "Patient/1". + */ + @Override + public IdType toUnqualified() { + return new IdType(getResourceType(), getIdPart(), getVersionIdPart()); + } + + @Override + public IdType toUnqualifiedVersionless() { + return new IdType(getResourceType(), getIdPart()); + } + + @Override + public IdType toVersionless() { + return new IdType(getBaseUrl(), getResourceType(), getIdPart(), null); + } + + @Override + public IdType withResourceType(String theResourceName) { + return new IdType(theResourceName, getIdPart(), getVersionIdPart()); + } + + /** + * Returns a view of this ID as a fully qualified URL, given a server base and + * resource name (which will only be used if the ID does not already contain + * those respective parts). Essentially, because IdType can contain either a + * complete URL or a partial one (or even jut a simple ID), this method may be + * used to translate into a complete URL. + * + * @param theServerBase + * The server base (e.g. "http://example.com/fhir") + * @param theResourceType + * The resource name (e.g. "Patient") + * @return A fully qualified URL for this ID (e.g. + * "http://example.com/fhir/Patient/1") + */ + @Override + public IdType withServerBase(String theServerBase, String theResourceType) { + return new IdType(theServerBase, theResourceType, getIdPart(), getVersionIdPart()); + } + + /** + * Creates a new instance of this ID which is identical, but refers to the + * specific version of this resource ID noted by theVersion. + * + * @param theVersion + * The actual version string, e.g. "1" + * @return A new instance of IdType which is identical, but refers to the + * specific version of this resource ID noted by theVersion. + */ + public IdType withVersion(String theVersion) { + Validate.notBlank(theVersion, "Version may not be null or empty"); + + String existingValue = getValue(); + + int i = existingValue.indexOf("_history"); + String value; + if (i > 1) { + value = existingValue.substring(0, i - 1); + } else { + value = existingValue; + } + + return new IdType(value + '/' + "_history" + '/' + theVersion); + } + + private static boolean isUrlAbsolute(String theValue) { + String value = theValue.toLowerCase(); + return value.startsWith("http://") || value.startsWith("https://"); + } + + private static boolean isValidLong(String id) { + if (StringUtils.isBlank(id)) { + return false; + } + for (int i = 0; i < id.length(); i++) { + if (Character.isDigit(id.charAt(i)) == false) { + return false; + } + } + return true; + } + + /** + * Construct a new ID with with form "urn:uuid:[UUID]" where [UUID] is a new, + * randomly created UUID generated by {@link UUID#randomUUID()} + */ + public static IdType newRandomUuid() { + return new IdType("urn:uuid:" + UUID.randomUUID().toString()); + } + + /** + * Retrieves the ID from the given resource instance + */ + public static IdType of(IBaseResource theResouce) { + if (theResouce == null) { + throw new NullPointerException("theResource can not be null"); + } else { + IIdType retVal = theResouce.getIdElement(); + if (retVal == null) { + return null; + } else if (retVal instanceof IdType) { + return (IdType) retVal; + } else { + return new IdType(retVal.getValue()); + } + } + } + + private static String toPlainStringWithNpeThrowIfNeeded(BigDecimal theIdPart) { + if (theIdPart == null) { + throw new NullPointerException("BigDecimal ID can not be null"); + } + return theIdPart.toPlainString(); + } + + private static String toPlainStringWithNpeThrowIfNeeded(Long theIdPart) { + if (theIdPart == null) { + throw new NullPointerException("Long ID can not be null"); + } + return theIdPart.toString(); + } + + public String fhirType() { + return "id"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Identifier.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Identifier.java new file mode 100644 index 00000000000..fd738c53bf8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Identifier.java @@ -0,0 +1,568 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A technical identifier - identifies some entity uniquely and unambiguously. + */ +@DatatypeDef(name="Identifier") +public class Identifier extends Type implements ICompositeType { + + public enum IdentifierUse { + /** + * The identifier recommended for display and use in real-world interactions. + */ + USUAL, + /** + * The identifier considered to be most trusted for the identification of this item. + */ + OFFICIAL, + /** + * A temporary identifier. + */ + TEMP, + /** + * An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context. + */ + SECONDARY, + /** + * added to help the parsers + */ + NULL; + public static IdentifierUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return USUAL; + if ("official".equals(codeString)) + return OFFICIAL; + if ("temp".equals(codeString)) + return TEMP; + if ("secondary".equals(codeString)) + return SECONDARY; + throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USUAL: return "usual"; + case OFFICIAL: return "official"; + case TEMP: return "temp"; + case SECONDARY: return "secondary"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case USUAL: return "http://hl7.org/fhir/identifier-use"; + case OFFICIAL: return "http://hl7.org/fhir/identifier-use"; + case TEMP: return "http://hl7.org/fhir/identifier-use"; + case SECONDARY: return "http://hl7.org/fhir/identifier-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case USUAL: return "The identifier recommended for display and use in real-world interactions."; + case OFFICIAL: return "The identifier considered to be most trusted for the identification of this item."; + case TEMP: return "A temporary identifier."; + case SECONDARY: return "An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USUAL: return "Usual"; + case OFFICIAL: return "Official"; + case TEMP: return "Temp"; + case SECONDARY: return "Secondary"; + default: return "?"; + } + } + } + + public static class IdentifierUseEnumFactory implements EnumFactory { + public IdentifierUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return IdentifierUse.USUAL; + if ("official".equals(codeString)) + return IdentifierUse.OFFICIAL; + if ("temp".equals(codeString)) + return IdentifierUse.TEMP; + if ("secondary".equals(codeString)) + return IdentifierUse.SECONDARY; + throw new IllegalArgumentException("Unknown IdentifierUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return new Enumeration(this, IdentifierUse.USUAL); + if ("official".equals(codeString)) + return new Enumeration(this, IdentifierUse.OFFICIAL); + if ("temp".equals(codeString)) + return new Enumeration(this, IdentifierUse.TEMP); + if ("secondary".equals(codeString)) + return new Enumeration(this, IdentifierUse.SECONDARY); + throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); + } + public String toCode(IdentifierUse code) { + if (code == IdentifierUse.USUAL) + return "usual"; + if (code == IdentifierUse.OFFICIAL) + return "official"; + if (code == IdentifierUse.TEMP) + return "temp"; + if (code == IdentifierUse.SECONDARY) + return "secondary"; + return "?"; + } + } + + /** + * The purpose of this identifier. + */ + @Child(name = "use", type = {CodeType.class}, order=0, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="usual | official | temp | secondary (If known)", formalDefinition="The purpose of this identifier." ) + protected Enumeration use; + + /** + * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of identifier", formalDefinition="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." ) + protected CodeableConcept type; + + /** + * Establishes the namespace in which set of possible id values is unique. + */ + @Child(name = "system", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The namespace for the identifier", formalDefinition="Establishes the namespace in which set of possible id values is unique." ) + protected UriType system; + + /** + * The portion of the identifier typically displayed to the user and which is unique within the context of the system. + */ + @Child(name = "value", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system." ) + protected StringType value; + + /** + * Time period during which identifier is/was valid for use. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period when id is/was valid for use", formalDefinition="Time period during which identifier is/was valid for use." ) + protected Period period; + + /** + * Organization that issued/manages the identifier. + */ + @Child(name = "assigner", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization that issued id (may be just text)", formalDefinition="Organization that issued/manages the identifier." ) + protected Reference assigner; + + /** + * The actual object that is the target of the reference (Organization that issued/manages the identifier.) + */ + protected Organization assignerTarget; + + private static final long serialVersionUID = -478840981L; + + /* + * Constructor + */ + public Identifier() { + super(); + } + + /** + * @return {@link #use} (The purpose of this identifier.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new IdentifierUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (The purpose of this identifier.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Identifier setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return The purpose of this identifier. + */ + public IdentifierUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value The purpose of this identifier. + */ + public Identifier setUse(IdentifierUse value) { + if (value == null) + this.use = null; + else { + if (this.use == null) + this.use = new Enumeration(new IdentifierUseEnumFactory()); + this.use.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.) + */ + public Identifier setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #system} (Establishes the namespace in which set of possible id values is unique.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (Establishes the namespace in which set of possible id values is unique.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public Identifier setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return Establishes the namespace in which set of possible id values is unique. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value Establishes the namespace in which set of possible id values is unique. + */ + public Identifier setSystem(String value) { + if (Utilities.noString(value)) + this.system = null; + else { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #value} (The portion of the identifier typically displayed to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The portion of the identifier typically displayed to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public Identifier setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The portion of the identifier typically displayed to the user and which is unique within the context of the system. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The portion of the identifier typically displayed to the user and which is unique within the context of the system. + */ + public Identifier setValue(String value) { + if (Utilities.noString(value)) + this.value = null; + else { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + } + return this; + } + + /** + * @return {@link #period} (Time period during which identifier is/was valid for use.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Time period during which identifier is/was valid for use.) + */ + public Identifier setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #assigner} (Organization that issued/manages the identifier.) + */ + public Reference getAssigner() { + if (this.assigner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.assigner"); + else if (Configuration.doAutoCreate()) + this.assigner = new Reference(); // cc + return this.assigner; + } + + public boolean hasAssigner() { + return this.assigner != null && !this.assigner.isEmpty(); + } + + /** + * @param value {@link #assigner} (Organization that issued/manages the identifier.) + */ + public Identifier setAssigner(Reference value) { + this.assigner = value; + return this; + } + + /** + * @return {@link #assigner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Organization that issued/manages the identifier.) + */ + public Organization getAssignerTarget() { + if (this.assignerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Identifier.assigner"); + else if (Configuration.doAutoCreate()) + this.assignerTarget = new Organization(); // aa + return this.assignerTarget; + } + + /** + * @param value {@link #assigner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Organization that issued/manages the identifier.) + */ + public Identifier setAssignerTarget(Organization value) { + this.assignerTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("use", "code", "The purpose of this identifier.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("type", "CodeableConcept", "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("system", "uri", "Establishes the namespace in which set of possible id values is unique.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("value", "string", "The portion of the identifier typically displayed to the user and which is unique within the context of the system.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("period", "Period", "Time period during which identifier is/was valid for use.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, java.lang.Integer.MAX_VALUE, assigner)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("use")) + this.use = new IdentifierUseEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("assigner")) + this.assigner = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type Identifier.use"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type Identifier.system"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type Identifier.value"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("assigner")) { + this.assigner = new Reference(); + return this.assigner; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Identifier"; + + } + + public Identifier copy() { + Identifier dst = new Identifier(); + copyValues(dst); + dst.use = use == null ? null : use.copy(); + dst.type = type == null ? null : type.copy(); + dst.system = system == null ? null : system.copy(); + dst.value = value == null ? null : value.copy(); + dst.period = period == null ? null : period.copy(); + dst.assigner = assigner == null ? null : assigner.copy(); + return dst; + } + + protected Identifier typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Identifier)) + return false; + Identifier o = (Identifier) other; + return compareDeep(use, o.use, true) && compareDeep(type, o.type, true) && compareDeep(system, o.system, true) + && compareDeep(value, o.value, true) && compareDeep(period, o.period, true) && compareDeep(assigner, o.assigner, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Identifier)) + return false; + Identifier o = (Identifier) other; + return compareValues(use, o.use, true) && compareValues(system, o.system, true) && compareValues(value, o.value, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty()) + && (system == null || system.isEmpty()) && (value == null || value.isEmpty()) && (period == null || period.isEmpty()) + && (assigner == null || assigner.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingObjectSelection.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingObjectSelection.java new file mode 100644 index 00000000000..06732f59265 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingObjectSelection.java @@ -0,0 +1,1638 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ +@ResourceDef(name="ImagingObjectSelection", profile="http://hl7.org/fhir/Profile/ImagingObjectSelection") +public class ImagingObjectSelection extends DomainResource { + + @Block() + public static class StudyComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Study instance UID of the SOP instances in the selection. + */ + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Study instance UID", formalDefinition="Study instance UID of the SOP instances in the selection." ) + protected OidType uid; + + /** + * WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve study URL", formalDefinition="WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection." ) + protected UriType url; + + /** + * Reference to the Imaging Study in FHIR form. + */ + @Child(name = "imagingStudy", type = {ImagingStudy.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to ImagingStudy", formalDefinition="Reference to the Imaging Study in FHIR form." ) + protected Reference imagingStudy; + + /** + * The actual object that is the target of the reference (Reference to the Imaging Study in FHIR form.) + */ + protected ImagingStudy imagingStudyTarget; + + /** + * Series identity and locating information of the DICOM SOP instances in the selection. + */ + @Child(name = "series", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Series identity of the selected instances", formalDefinition="Series identity and locating information of the DICOM SOP instances in the selection." ) + protected List series; + + private static final long serialVersionUID = 341246743L; + + /* + * Constructor + */ + public StudyComponent() { + super(); + } + + /* + * Constructor + */ + public StudyComponent(OidType uid) { + super(); + this.uid = uid; + } + + /** + * @return {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public StudyComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Study instance UID of the SOP instances in the selection. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Study instance UID of the SOP instances in the selection. + */ + public StudyComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #url} (WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StudyComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection. + */ + public StudyComponent setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) + */ + public Reference getImagingStudy() { + if (this.imagingStudy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); + else if (Configuration.doAutoCreate()) + this.imagingStudy = new Reference(); // cc + return this.imagingStudy; + } + + public boolean hasImagingStudy() { + return this.imagingStudy != null && !this.imagingStudy.isEmpty(); + } + + /** + * @param value {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) + */ + public StudyComponent setImagingStudy(Reference value) { + this.imagingStudy = value; + return this; + } + + /** + * @return {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) + */ + public ImagingStudy getImagingStudyTarget() { + if (this.imagingStudyTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); + else if (Configuration.doAutoCreate()) + this.imagingStudyTarget = new ImagingStudy(); // aa + return this.imagingStudyTarget; + } + + /** + * @param value {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) + */ + public StudyComponent setImagingStudyTarget(ImagingStudy value) { + this.imagingStudyTarget = value; + return this; + } + + /** + * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) + */ + public List getSeries() { + if (this.series == null) + this.series = new ArrayList(); + return this.series; + } + + public boolean hasSeries() { + if (this.series == null) + return false; + for (SeriesComponent item : this.series) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) + */ + // syntactic sugar + public SeriesComponent addSeries() { //3 + SeriesComponent t = new SeriesComponent(); + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return t; + } + + // syntactic sugar + public StudyComponent addSeries(SeriesComponent t) { //3 + if (t == null) + return this; + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Study instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy)", "Reference to the Imaging Study in FHIR form.", 0, java.lang.Integer.MAX_VALUE, imagingStudy)); + childrenList.add(new Property("series", "", "Series identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, series)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("imagingStudy")) + this.imagingStudy = castToReference(value); // Reference + else if (name.equals("series")) + this.getSeries().add((SeriesComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.uid"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); + } + else if (name.equals("imagingStudy")) { + this.imagingStudy = new Reference(); + return this.imagingStudy; + } + else if (name.equals("series")) { + return addSeries(); + } + else + return super.addChild(name); + } + + public StudyComponent copy() { + StudyComponent dst = new StudyComponent(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + dst.url = url == null ? null : url.copy(); + dst.imagingStudy = imagingStudy == null ? null : imagingStudy.copy(); + if (series != null) { + dst.series = new ArrayList(); + for (SeriesComponent i : series) + dst.series.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StudyComponent)) + return false; + StudyComponent o = (StudyComponent) other; + return compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) && compareDeep(imagingStudy, o.imagingStudy, true) + && compareDeep(series, o.series, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StudyComponent)) + return false; + StudyComponent o = (StudyComponent) other; + return compareValues(uid, o.uid, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty()) + && (series == null || series.isEmpty()); + } + + public String fhirType() { + return "ImagingObjectSelection.study"; + + } + + } + + @Block() + public static class SeriesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Series instance UID of the SOP instances in the selection. + */ + @Child(name = "uid", type = {OidType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Series instance UID", formalDefinition="Series instance UID of the SOP instances in the selection." ) + protected OidType uid; + + /** + * WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve series URL", formalDefinition="WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection." ) + protected UriType url; + + /** + * Identity and locating information of the selected DICOM SOP instances. + */ + @Child(name = "instance", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The selected instance", formalDefinition="Identity and locating information of the selected DICOM SOP instances." ) + protected List instance; + + private static final long serialVersionUID = 229247770L; + + /* + * Constructor + */ + public SeriesComponent() { + super(); + } + + /** + * @return {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SeriesComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public SeriesComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Series instance UID of the SOP instances in the selection. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Series instance UID of the SOP instances in the selection. + */ + public SeriesComponent setUid(String value) { + if (Utilities.noString(value)) + this.uid = null; + else { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SeriesComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public SeriesComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection. + */ + public SeriesComponent setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) + */ + public List getInstance() { + if (this.instance == null) + this.instance = new ArrayList(); + return this.instance; + } + + public boolean hasInstance() { + if (this.instance == null) + return false; + for (InstanceComponent item : this.instance) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) + */ + // syntactic sugar + public InstanceComponent addInstance() { //3 + InstanceComponent t = new InstanceComponent(); + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return t; + } + + // syntactic sugar + public SeriesComponent addInstance(InstanceComponent t) { //3 + if (t == null) + return this; + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Series instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("instance", "", "Identity and locating information of the selected DICOM SOP instances.", 0, java.lang.Integer.MAX_VALUE, instance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("instance")) + this.getInstance().add((InstanceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.uid"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); + } + else if (name.equals("instance")) { + return addInstance(); + } + else + return super.addChild(name); + } + + public SeriesComponent copy() { + SeriesComponent dst = new SeriesComponent(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + dst.url = url == null ? null : url.copy(); + if (instance != null) { + dst.instance = new ArrayList(); + for (InstanceComponent i : instance) + dst.instance.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SeriesComponent)) + return false; + SeriesComponent o = (SeriesComponent) other; + return compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) && compareDeep(instance, o.instance, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SeriesComponent)) + return false; + SeriesComponent o = (SeriesComponent) other; + return compareValues(uid, o.uid, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (instance == null || instance.isEmpty()) + ; + } + + public String fhirType() { + return "ImagingObjectSelection.study.series"; + + } + + } + + @Block() + public static class InstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * SOP class UID of the selected instance. + */ + @Child(name = "sopClass", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="SOP class UID of instance", formalDefinition="SOP class UID of the selected instance." ) + protected OidType sopClass; + + /** + * SOP Instance UID of the selected instance. + */ + @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Selected instance UID", formalDefinition="SOP Instance UID of the selected instance." ) + protected OidType uid; + + /** + * WADO-RS URL to retrieve the DICOM SOP Instance. + */ + @Child(name = "url", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve instance URL", formalDefinition="WADO-RS URL to retrieve the DICOM SOP Instance." ) + protected UriType url; + + /** + * Identity and location information of the frames in the selected instance. + */ + @Child(name = "frames", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The frame set", formalDefinition="Identity and location information of the frames in the selected instance." ) + protected List frames; + + private static final long serialVersionUID = 1641180916L; + + /* + * Constructor + */ + public InstanceComponent() { + super(); + } + + /* + * Constructor + */ + public InstanceComponent(OidType sopClass, OidType uid, UriType url) { + super(); + this.sopClass = sopClass; + this.uid = uid; + this.url = url; + } + + /** + * @return {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public OidType getSopClassElement() { + if (this.sopClass == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceComponent.sopClass"); + else if (Configuration.doAutoCreate()) + this.sopClass = new OidType(); // bb + return this.sopClass; + } + + public boolean hasSopClassElement() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + public boolean hasSopClass() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + /** + * @param value {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public InstanceComponent setSopClassElement(OidType value) { + this.sopClass = value; + return this; + } + + /** + * @return SOP class UID of the selected instance. + */ + public String getSopClass() { + return this.sopClass == null ? null : this.sopClass.getValue(); + } + + /** + * @param value SOP class UID of the selected instance. + */ + public InstanceComponent setSopClass(String value) { + if (this.sopClass == null) + this.sopClass = new OidType(); + this.sopClass.setValue(value); + return this; + } + + /** + * @return {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public InstanceComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return SOP Instance UID of the selected instance. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value SOP Instance UID of the selected instance. + */ + public InstanceComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #url} (WADO-RS URL to retrieve the DICOM SOP Instance.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (WADO-RS URL to retrieve the DICOM SOP Instance.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public InstanceComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return WADO-RS URL to retrieve the DICOM SOP Instance. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value WADO-RS URL to retrieve the DICOM SOP Instance. + */ + public InstanceComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #frames} (Identity and location information of the frames in the selected instance.) + */ + public List getFrames() { + if (this.frames == null) + this.frames = new ArrayList(); + return this.frames; + } + + public boolean hasFrames() { + if (this.frames == null) + return false; + for (FramesComponent item : this.frames) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #frames} (Identity and location information of the frames in the selected instance.) + */ + // syntactic sugar + public FramesComponent addFrames() { //3 + FramesComponent t = new FramesComponent(); + if (this.frames == null) + this.frames = new ArrayList(); + this.frames.add(t); + return t; + } + + // syntactic sugar + public InstanceComponent addFrames(FramesComponent t) { //3 + if (t == null) + return this; + if (this.frames == null) + this.frames = new ArrayList(); + this.frames.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sopClass", "oid", "SOP class UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass)); + childrenList.add(new Property("uid", "oid", "SOP Instance UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the DICOM SOP Instance.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("frames", "", "Identity and location information of the frames in the selected instance.", 0, java.lang.Integer.MAX_VALUE, frames)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sopClass")) + this.sopClass = castToOid(value); // OidType + else if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("frames")) + this.getFrames().add((FramesComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sopClass")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.sopClass"); + } + else if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.uid"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); + } + else if (name.equals("frames")) { + return addFrames(); + } + else + return super.addChild(name); + } + + public InstanceComponent copy() { + InstanceComponent dst = new InstanceComponent(); + copyValues(dst); + dst.sopClass = sopClass == null ? null : sopClass.copy(); + dst.uid = uid == null ? null : uid.copy(); + dst.url = url == null ? null : url.copy(); + if (frames != null) { + dst.frames = new ArrayList(); + for (FramesComponent i : frames) + dst.frames.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof InstanceComponent)) + return false; + InstanceComponent o = (InstanceComponent) other; + return compareDeep(sopClass, o.sopClass, true) && compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) + && compareDeep(frames, o.frames, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof InstanceComponent)) + return false; + InstanceComponent o = (InstanceComponent) other; + return compareValues(sopClass, o.sopClass, true) && compareValues(uid, o.uid, true) && compareValues(url, o.url, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (sopClass == null || sopClass.isEmpty()) && (uid == null || uid.isEmpty()) + && (url == null || url.isEmpty()) && (frames == null || frames.isEmpty()); + } + + public String fhirType() { + return "ImagingObjectSelection.study.series.instance"; + + } + + } + + @Block() + public static class FramesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The frame numbers in the frame set. + */ + @Child(name = "frameNumbers", type = {UnsignedIntType.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Frame numbers", formalDefinition="The frame numbers in the frame set." ) + protected List frameNumbers; + + /** + * WADO-RS URL to retrieve the DICOM frames. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve frame URL", formalDefinition="WADO-RS URL to retrieve the DICOM frames." ) + protected UriType url; + + private static final long serialVersionUID = -2068206970L; + + /* + * Constructor + */ + public FramesComponent() { + super(); + } + + /* + * Constructor + */ + public FramesComponent(UriType url) { + super(); + this.url = url; + } + + /** + * @return {@link #frameNumbers} (The frame numbers in the frame set.) + */ + public List getFrameNumbers() { + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + return this.frameNumbers; + } + + public boolean hasFrameNumbers() { + if (this.frameNumbers == null) + return false; + for (UnsignedIntType item : this.frameNumbers) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #frameNumbers} (The frame numbers in the frame set.) + */ + // syntactic sugar + public UnsignedIntType addFrameNumbersElement() {//2 + UnsignedIntType t = new UnsignedIntType(); + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + this.frameNumbers.add(t); + return t; + } + + /** + * @param value {@link #frameNumbers} (The frame numbers in the frame set.) + */ + public FramesComponent addFrameNumbers(int value) { //1 + UnsignedIntType t = new UnsignedIntType(); + t.setValue(value); + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + this.frameNumbers.add(t); + return this; + } + + /** + * @param value {@link #frameNumbers} (The frame numbers in the frame set.) + */ + public boolean hasFrameNumbers(int value) { + if (this.frameNumbers == null) + return false; + for (UnsignedIntType v : this.frameNumbers) + if (v.equals(value)) // unsignedInt + return true; + return false; + } + + /** + * @return {@link #url} (WADO-RS URL to retrieve the DICOM frames.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FramesComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (WADO-RS URL to retrieve the DICOM frames.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public FramesComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return WADO-RS URL to retrieve the DICOM frames. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value WADO-RS URL to retrieve the DICOM frames. + */ + public FramesComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("frameNumbers", "unsignedInt", "The frame numbers in the frame set.", 0, java.lang.Integer.MAX_VALUE, frameNumbers)); + childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the DICOM frames.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("frameNumbers")) + this.getFrameNumbers().add(castToUnsignedInt(value)); + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("frameNumbers")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.frameNumbers"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); + } + else + return super.addChild(name); + } + + public FramesComponent copy() { + FramesComponent dst = new FramesComponent(); + copyValues(dst); + if (frameNumbers != null) { + dst.frameNumbers = new ArrayList(); + for (UnsignedIntType i : frameNumbers) + dst.frameNumbers.add(i.copy()); + }; + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FramesComponent)) + return false; + FramesComponent o = (FramesComponent) other; + return compareDeep(frameNumbers, o.frameNumbers, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FramesComponent)) + return false; + FramesComponent o = (FramesComponent) other; + return compareValues(frameNumbers, o.frameNumbers, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (frameNumbers == null || frameNumbers.isEmpty()) && (url == null || url.isEmpty()) + ; + } + + public String fhirType() { + return "ImagingObjectSelection.study.series.instance.frames"; + + } + + } + + /** + * Instance UID of the DICOM KOS SOP Instances represented in this resource. + */ + @Child(name = "uid", type = {OidType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instance UID", formalDefinition="Instance UID of the DICOM KOS SOP Instances represented in this resource." ) + protected OidType uid; + + /** + * A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.) + */ + protected Patient patientTarget; + + /** + * The reason for, or significance of, the selection of objects referenced in the resource. + */ + @Child(name = "title", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) + protected CodeableConcept title; + + /** + * Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) + protected StringType description; + + /** + * Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. + */ + @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + protected Resource authorTarget; + + /** + * Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + @Child(name = "authoringTime", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." ) + protected DateTimeType authoringTime; + + /** + * Study identity and locating information of the DICOM SOP instances in the selection. + */ + @Child(name = "study", type = {}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) + protected List study; + + private static final long serialVersionUID = -1961832713L; + + /* + * Constructor + */ + public ImagingObjectSelection() { + super(); + } + + /* + * Constructor + */ + public ImagingObjectSelection(OidType uid, Reference patient, CodeableConcept title) { + super(); + this.uid = uid; + this.patient = patient; + this.title = title; + } + + /** + * @return {@link #uid} (Instance UID of the DICOM KOS SOP Instances represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Instance UID of the DICOM KOS SOP Instances represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingObjectSelection setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Instance UID of the DICOM KOS SOP Instances represented in this resource. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Instance UID of the DICOM KOS SOP Instances represented in this resource. + */ + public ImagingObjectSelection setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.) + */ + public ImagingObjectSelection setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.) + */ + public ImagingObjectSelection setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) + */ + public CodeableConcept getTitle() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.title"); + else if (Configuration.doAutoCreate()) + this.title = new CodeableConcept(); // cc + return this.title; + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) + */ + public ImagingObjectSelection setTitle(CodeableConcept value) { + this.title = value; + return this; + } + + /** + * @return {@link #description} (Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImagingObjectSelection setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + public ImagingObjectSelection setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingObjectSelection setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingObjectSelection setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public DateTimeType getAuthoringTimeElement() { + if (this.authoringTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.authoringTime"); + else if (Configuration.doAutoCreate()) + this.authoringTime = new DateTimeType(); // bb + return this.authoringTime; + } + + public boolean hasAuthoringTimeElement() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + public boolean hasAuthoringTime() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + /** + * @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public ImagingObjectSelection setAuthoringTimeElement(DateTimeType value) { + this.authoringTime = value; + return this; + } + + /** + * @return Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public Date getAuthoringTime() { + return this.authoringTime == null ? null : this.authoringTime.getValue(); + } + + /** + * @param value Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public ImagingObjectSelection setAuthoringTime(Date value) { + if (value == null) + this.authoringTime = null; + else { + if (this.authoringTime == null) + this.authoringTime = new DateTimeType(); + this.authoringTime.setValue(value); + } + return this; + } + + /** + * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) + */ + public List getStudy() { + if (this.study == null) + this.study = new ArrayList(); + return this.study; + } + + public boolean hasStudy() { + if (this.study == null) + return false; + for (StudyComponent item : this.study) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) + */ + // syntactic sugar + public StudyComponent addStudy() { //3 + StudyComponent t = new StudyComponent(); + if (this.study == null) + this.study = new ArrayList(); + this.study.add(t); + return t; + } + + // syntactic sugar + public ImagingObjectSelection addStudy(StudyComponent t) { //3 + if (t == null) + return this; + if (this.study == null) + this.study = new ArrayList(); + this.study.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Instance UID of the DICOM KOS SOP Instances represented in this resource.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("title", "CodeableConcept", "The reason for, or significance of, the selection of objects referenced in the resource.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime)); + childrenList.add(new Property("study", "", "Study identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, study)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("title")) + this.title = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("authoringTime")) + this.authoringTime = castToDateTime(value); // DateTimeType + else if (name.equals("study")) + this.getStudy().add((StudyComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.uid"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("title")) { + this.title = new CodeableConcept(); + return this.title; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.description"); + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("authoringTime")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.authoringTime"); + } + else if (name.equals("study")) { + return addStudy(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ImagingObjectSelection"; + + } + + public ImagingObjectSelection copy() { + ImagingObjectSelection dst = new ImagingObjectSelection(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.author = author == null ? null : author.copy(); + dst.authoringTime = authoringTime == null ? null : authoringTime.copy(); + if (study != null) { + dst.study = new ArrayList(); + for (StudyComponent i : study) + dst.study.add(i.copy()); + }; + return dst; + } + + protected ImagingObjectSelection typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImagingObjectSelection)) + return false; + ImagingObjectSelection o = (ImagingObjectSelection) other; + return compareDeep(uid, o.uid, true) && compareDeep(patient, o.patient, true) && compareDeep(title, o.title, true) + && compareDeep(description, o.description, true) && compareDeep(author, o.author, true) && compareDeep(authoringTime, o.authoringTime, true) + && compareDeep(study, o.study, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImagingObjectSelection)) + return false; + ImagingObjectSelection o = (ImagingObjectSelection) other; + return compareValues(uid, o.uid, true) && compareValues(description, o.description, true) && compareValues(authoringTime, o.authoringTime, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (uid == null || uid.isEmpty()) && (patient == null || patient.isEmpty()) + && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (author == null || author.isEmpty()) + && (authoringTime == null || authoringTime.isEmpty()) && (study == null || study.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ImagingObjectSelection; + } + + @SearchParamDefinition(name="identifier", path="ImagingObjectSelection.uid", description="UID of key DICOM object selection", type="uri" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="authoring-time", path="ImagingObjectSelection.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) + public static final String SP_AUTHORINGTIME = "authoring-time"; + @SearchParamDefinition(name="selected-study", path="ImagingObjectSelection.study.uid", description="Study selected in key DICOM object selection", type="uri" ) + public static final String SP_SELECTEDSTUDY = "selected-study"; + @SearchParamDefinition(name="author", path="ImagingObjectSelection.author", description="Author of key DICOM object selection", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="patient", path="ImagingObjectSelection.patient", description="Subject of key DICOM object selection", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="title", path="ImagingObjectSelection.title", description="Title of key DICOM object selection", type="token" ) + public static final String SP_TITLE = "title"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingStudy.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingStudy.java new file mode 100644 index 00000000000..c79f159e996 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImagingStudy.java @@ -0,0 +1,2411 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ +@ResourceDef(name="ImagingStudy", profile="http://hl7.org/fhir/Profile/ImagingStudy") +public class ImagingStudy extends DomainResource { + + public enum InstanceAvailability { + /** + * null + */ + ONLINE, + /** + * null + */ + OFFLINE, + /** + * null + */ + NEARLINE, + /** + * null + */ + UNAVAILABLE, + /** + * added to help the parsers + */ + NULL; + public static InstanceAvailability fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ONLINE".equals(codeString)) + return ONLINE; + if ("OFFLINE".equals(codeString)) + return OFFLINE; + if ("NEARLINE".equals(codeString)) + return NEARLINE; + if ("UNAVAILABLE".equals(codeString)) + return UNAVAILABLE; + throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ONLINE: return "ONLINE"; + case OFFLINE: return "OFFLINE"; + case NEARLINE: return "NEARLINE"; + case UNAVAILABLE: return "UNAVAILABLE"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ONLINE: return "http://nema.org/dicom/dicm"; + case OFFLINE: return "http://nema.org/dicom/dicm"; + case NEARLINE: return "http://nema.org/dicom/dicm"; + case UNAVAILABLE: return "http://nema.org/dicom/dicm"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ONLINE: return ""; + case OFFLINE: return ""; + case NEARLINE: return ""; + case UNAVAILABLE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ONLINE: return "ONLINE"; + case OFFLINE: return "OFFLINE"; + case NEARLINE: return "NEARLINE"; + case UNAVAILABLE: return "UNAVAILABLE"; + default: return "?"; + } + } + } + + public static class InstanceAvailabilityEnumFactory implements EnumFactory { + public InstanceAvailability fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("ONLINE".equals(codeString)) + return InstanceAvailability.ONLINE; + if ("OFFLINE".equals(codeString)) + return InstanceAvailability.OFFLINE; + if ("NEARLINE".equals(codeString)) + return InstanceAvailability.NEARLINE; + if ("UNAVAILABLE".equals(codeString)) + return InstanceAvailability.UNAVAILABLE; + throw new IllegalArgumentException("Unknown InstanceAvailability code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("ONLINE".equals(codeString)) + return new Enumeration(this, InstanceAvailability.ONLINE); + if ("OFFLINE".equals(codeString)) + return new Enumeration(this, InstanceAvailability.OFFLINE); + if ("NEARLINE".equals(codeString)) + return new Enumeration(this, InstanceAvailability.NEARLINE); + if ("UNAVAILABLE".equals(codeString)) + return new Enumeration(this, InstanceAvailability.UNAVAILABLE); + throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'"); + } + public String toCode(InstanceAvailability code) { + if (code == InstanceAvailability.ONLINE) + return "ONLINE"; + if (code == InstanceAvailability.OFFLINE) + return "OFFLINE"; + if (code == InstanceAvailability.NEARLINE) + return "NEARLINE"; + if (code == InstanceAvailability.UNAVAILABLE) + return "UNAVAILABLE"; + return "?"; + } + } + + @Block() + public static class ImagingStudySeriesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The Numeric identifier of this series in the study. + */ + @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Numeric identifier of this series", formalDefinition="The Numeric identifier of this series in the study." ) + protected UnsignedIntType number; + + /** + * The modality of this series sequence. + */ + @Child(name = "modality", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The modality of the instances in the series", formalDefinition="The modality of this series sequence." ) + protected Coding modality; + + /** + * Formal identifier for this series. + */ + @Child(name = "uid", type = {OidType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal identifier for this series", formalDefinition="Formal identifier for this series." ) + protected OidType uid; + + /** + * A description of the series. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A description of the series", formalDefinition="A description of the series." ) + protected StringType description; + + /** + * Number of SOP Instances in Series. + */ + @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of Series Related Instances", formalDefinition="Number of SOP Instances in Series." ) + protected UnsignedIntType numberOfInstances; + + /** + * Availability of series (online, offline or nearline). + */ + @Child(name = "availability", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE", formalDefinition="Availability of series (online, offline or nearline)." ) + protected Enumeration availability; + + /** + * URI/URL specifying the location of the referenced series using WADO-RS. + */ + @Child(name = "url", type = {UriType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Location of the referenced instance(s)", formalDefinition="URI/URL specifying the location of the referenced series using WADO-RS." ) + protected UriType url; + + /** + * Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT. + */ + @Child(name = "bodySite", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Body part examined", formalDefinition="Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT." ) + protected Coding bodySite; + + /** + * Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code. + */ + @Child(name = "laterality", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Body part laterality", formalDefinition="Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code." ) + protected Coding laterality; + + /** + * The date and time the series was started. + */ + @Child(name = "started", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the series started", formalDefinition="The date and time the series was started." ) + protected DateTimeType started; + + /** + * A single SOP Instance within the series, e.g. an image, or presentation state. + */ + @Child(name = "instance", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A single SOP instance from the series", formalDefinition="A single SOP Instance within the series, e.g. an image, or presentation state." ) + protected List instance; + + private static final long serialVersionUID = -1798366943L; + + /* + * Constructor + */ + public ImagingStudySeriesComponent() { + super(); + } + + /* + * Constructor + */ + public ImagingStudySeriesComponent(Coding modality, OidType uid, UnsignedIntType numberOfInstances) { + super(); + this.modality = modality; + this.uid = uid; + this.numberOfInstances = numberOfInstances; + } + + /** + * @return {@link #number} (The Numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public UnsignedIntType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new UnsignedIntType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (The Numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public ImagingStudySeriesComponent setNumberElement(UnsignedIntType value) { + this.number = value; + return this; + } + + /** + * @return The Numeric identifier of this series in the study. + */ + public int getNumber() { + return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); + } + + /** + * @param value The Numeric identifier of this series in the study. + */ + public ImagingStudySeriesComponent setNumber(int value) { + if (this.number == null) + this.number = new UnsignedIntType(); + this.number.setValue(value); + return this; + } + + /** + * @return {@link #modality} (The modality of this series sequence.) + */ + public Coding getModality() { + if (this.modality == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.modality"); + else if (Configuration.doAutoCreate()) + this.modality = new Coding(); // cc + return this.modality; + } + + public boolean hasModality() { + return this.modality != null && !this.modality.isEmpty(); + } + + /** + * @param value {@link #modality} (The modality of this series sequence.) + */ + public ImagingStudySeriesComponent setModality(Coding value) { + this.modality = value; + return this; + } + + /** + * @return {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingStudySeriesComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Formal identifier for this series. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Formal identifier for this series. + */ + public ImagingStudySeriesComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImagingStudySeriesComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the series. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the series. + */ + public ImagingStudySeriesComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #numberOfInstances} (Number of SOP Instances in Series.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value + */ + public UnsignedIntType getNumberOfInstancesElement() { + if (this.numberOfInstances == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.numberOfInstances"); + else if (Configuration.doAutoCreate()) + this.numberOfInstances = new UnsignedIntType(); // bb + return this.numberOfInstances; + } + + public boolean hasNumberOfInstancesElement() { + return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); + } + + public boolean hasNumberOfInstances() { + return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); + } + + /** + * @param value {@link #numberOfInstances} (Number of SOP Instances in Series.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value + */ + public ImagingStudySeriesComponent setNumberOfInstancesElement(UnsignedIntType value) { + this.numberOfInstances = value; + return this; + } + + /** + * @return Number of SOP Instances in Series. + */ + public int getNumberOfInstances() { + return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); + } + + /** + * @param value Number of SOP Instances in Series. + */ + public ImagingStudySeriesComponent setNumberOfInstances(int value) { + if (this.numberOfInstances == null) + this.numberOfInstances = new UnsignedIntType(); + this.numberOfInstances.setValue(value); + return this; + } + + /** + * @return {@link #availability} (Availability of series (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public Enumeration getAvailabilityElement() { + if (this.availability == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.availability"); + else if (Configuration.doAutoCreate()) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); // bb + return this.availability; + } + + public boolean hasAvailabilityElement() { + return this.availability != null && !this.availability.isEmpty(); + } + + public boolean hasAvailability() { + return this.availability != null && !this.availability.isEmpty(); + } + + /** + * @param value {@link #availability} (Availability of series (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public ImagingStudySeriesComponent setAvailabilityElement(Enumeration value) { + this.availability = value; + return this; + } + + /** + * @return Availability of series (online, offline or nearline). + */ + public InstanceAvailability getAvailability() { + return this.availability == null ? null : this.availability.getValue(); + } + + /** + * @param value Availability of series (online, offline or nearline). + */ + public ImagingStudySeriesComponent setAvailability(InstanceAvailability value) { + if (value == null) + this.availability = null; + else { + if (this.availability == null) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); + this.availability.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (URI/URL specifying the location of the referenced series using WADO-RS.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (URI/URL specifying the location of the referenced series using WADO-RS.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ImagingStudySeriesComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return URI/URL specifying the location of the referenced series using WADO-RS. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value URI/URL specifying the location of the referenced series using WADO-RS. + */ + public ImagingStudySeriesComponent setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #bodySite} (Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.) + */ + public Coding getBodySite() { + if (this.bodySite == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.bodySite"); + else if (Configuration.doAutoCreate()) + this.bodySite = new Coding(); // cc + return this.bodySite; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.) + */ + public ImagingStudySeriesComponent setBodySite(Coding value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #laterality} (Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.) + */ + public Coding getLaterality() { + if (this.laterality == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.laterality"); + else if (Configuration.doAutoCreate()) + this.laterality = new Coding(); // cc + return this.laterality; + } + + public boolean hasLaterality() { + return this.laterality != null && !this.laterality.isEmpty(); + } + + /** + * @param value {@link #laterality} (Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.) + */ + public ImagingStudySeriesComponent setLaterality(Coding value) { + this.laterality = value; + return this; + } + + /** + * @return {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public DateTimeType getStartedElement() { + if (this.started == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.started"); + else if (Configuration.doAutoCreate()) + this.started = new DateTimeType(); // bb + return this.started; + } + + public boolean hasStartedElement() { + return this.started != null && !this.started.isEmpty(); + } + + public boolean hasStarted() { + return this.started != null && !this.started.isEmpty(); + } + + /** + * @param value {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public ImagingStudySeriesComponent setStartedElement(DateTimeType value) { + this.started = value; + return this; + } + + /** + * @return The date and time the series was started. + */ + public Date getStarted() { + return this.started == null ? null : this.started.getValue(); + } + + /** + * @param value The date and time the series was started. + */ + public ImagingStudySeriesComponent setStarted(Date value) { + if (value == null) + this.started = null; + else { + if (this.started == null) + this.started = new DateTimeType(); + this.started.setValue(value); + } + return this; + } + + /** + * @return {@link #instance} (A single SOP Instance within the series, e.g. an image, or presentation state.) + */ + public List getInstance() { + if (this.instance == null) + this.instance = new ArrayList(); + return this.instance; + } + + public boolean hasInstance() { + if (this.instance == null) + return false; + for (ImagingStudySeriesInstanceComponent item : this.instance) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #instance} (A single SOP Instance within the series, e.g. an image, or presentation state.) + */ + // syntactic sugar + public ImagingStudySeriesInstanceComponent addInstance() { //3 + ImagingStudySeriesInstanceComponent t = new ImagingStudySeriesInstanceComponent(); + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return t; + } + + // syntactic sugar + public ImagingStudySeriesComponent addInstance(ImagingStudySeriesInstanceComponent t) { //3 + if (t == null) + return this; + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("number", "unsignedInt", "The Numeric identifier of this series in the study.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("modality", "Coding", "The modality of this series sequence.", 0, java.lang.Integer.MAX_VALUE, modality)); + childrenList.add(new Property("uid", "oid", "Formal identifier for this series.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("description", "string", "A description of the series.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Series.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); + childrenList.add(new Property("availability", "code", "Availability of series (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); + childrenList.add(new Property("url", "uri", "URI/URL specifying the location of the referenced series using WADO-RS.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("bodySite", "Coding", "Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("laterality", "Coding", "Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.", 0, java.lang.Integer.MAX_VALUE, laterality)); + childrenList.add(new Property("started", "dateTime", "The date and time the series was started.", 0, java.lang.Integer.MAX_VALUE, started)); + childrenList.add(new Property("instance", "", "A single SOP Instance within the series, e.g. an image, or presentation state.", 0, java.lang.Integer.MAX_VALUE, instance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("number")) + this.number = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("modality")) + this.modality = castToCoding(value); // Coding + else if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("numberOfInstances")) + this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("availability")) + this.availability = new InstanceAvailabilityEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("bodySite")) + this.bodySite = castToCoding(value); // Coding + else if (name.equals("laterality")) + this.laterality = castToCoding(value); // Coding + else if (name.equals("started")) + this.started = castToDateTime(value); // DateTimeType + else if (name.equals("instance")) + this.getInstance().add((ImagingStudySeriesInstanceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); + } + else if (name.equals("modality")) { + this.modality = new Coding(); + return this.modality; + } + else if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); + } + else if (name.equals("numberOfInstances")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); + } + else if (name.equals("availability")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.url"); + } + else if (name.equals("bodySite")) { + this.bodySite = new Coding(); + return this.bodySite; + } + else if (name.equals("laterality")) { + this.laterality = new Coding(); + return this.laterality; + } + else if (name.equals("started")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); + } + else if (name.equals("instance")) { + return addInstance(); + } + else + return super.addChild(name); + } + + public ImagingStudySeriesComponent copy() { + ImagingStudySeriesComponent dst = new ImagingStudySeriesComponent(); + copyValues(dst); + dst.number = number == null ? null : number.copy(); + dst.modality = modality == null ? null : modality.copy(); + dst.uid = uid == null ? null : uid.copy(); + dst.description = description == null ? null : description.copy(); + dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); + dst.availability = availability == null ? null : availability.copy(); + dst.url = url == null ? null : url.copy(); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + dst.laterality = laterality == null ? null : laterality.copy(); + dst.started = started == null ? null : started.copy(); + if (instance != null) { + dst.instance = new ArrayList(); + for (ImagingStudySeriesInstanceComponent i : instance) + dst.instance.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImagingStudySeriesComponent)) + return false; + ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; + return compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true) && compareDeep(uid, o.uid, true) + && compareDeep(description, o.description, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) + && compareDeep(availability, o.availability, true) && compareDeep(url, o.url, true) && compareDeep(bodySite, o.bodySite, true) + && compareDeep(laterality, o.laterality, true) && compareDeep(started, o.started, true) && compareDeep(instance, o.instance, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImagingStudySeriesComponent)) + return false; + ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; + return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(description, o.description, true) + && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(availability, o.availability, true) + && compareValues(url, o.url, true) && compareValues(started, o.started, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (number == null || number.isEmpty()) && (modality == null || modality.isEmpty()) + && (uid == null || uid.isEmpty()) && (description == null || description.isEmpty()) && (numberOfInstances == null || numberOfInstances.isEmpty()) + && (availability == null || availability.isEmpty()) && (url == null || url.isEmpty()) && (bodySite == null || bodySite.isEmpty()) + && (laterality == null || laterality.isEmpty()) && (started == null || started.isEmpty()) + && (instance == null || instance.isEmpty()); + } + + public String fhirType() { + return "ImagingStudy.series"; + + } + + } + + @Block() + public static class ImagingStudySeriesInstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The number of instance in the series. + */ + @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." ) + protected UnsignedIntType number; + + /** + * Formal identifier for this image or other content. + */ + @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal identifier for this instance", formalDefinition="Formal identifier for this image or other content." ) + protected OidType uid; + + /** + * DICOM instance type. + */ + @Child(name = "sopClass", type = {OidType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="DICOM class type", formalDefinition="DICOM instance type." ) + protected OidType sopClass; + + /** + * A human-friendly SOP Class name. + */ + @Child(name = "type", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of instance (image etc.)", formalDefinition="A human-friendly SOP Class name." ) + protected StringType type; + + /** + * The description of the instance. + */ + @Child(name = "title", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of instance", formalDefinition="The description of the instance." ) + protected StringType title; + + /** + * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance. + */ + @Child(name = "content", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content of the instance", formalDefinition="Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance." ) + protected List content; + + private static final long serialVersionUID = -1450403705L; + + /* + * Constructor + */ + public ImagingStudySeriesInstanceComponent() { + super(); + } + + /* + * Constructor + */ + public ImagingStudySeriesInstanceComponent(OidType uid, OidType sopClass) { + super(); + this.uid = uid; + this.sopClass = sopClass; + } + + /** + * @return {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public UnsignedIntType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new UnsignedIntType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { + this.number = value; + return this; + } + + /** + * @return The number of instance in the series. + */ + public int getNumber() { + return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); + } + + /** + * @param value The number of instance in the series. + */ + public ImagingStudySeriesInstanceComponent setNumber(int value) { + if (this.number == null) + this.number = new UnsignedIntType(); + this.number.setValue(value); + return this; + } + + /** + * @return {@link #uid} (Formal identifier for this image or other content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Formal identifier for this image or other content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Formal identifier for this image or other content. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Formal identifier for this image or other content. + */ + public ImagingStudySeriesInstanceComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #sopClass} (DICOM instance type.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public OidType getSopClassElement() { + if (this.sopClass == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.sopClass"); + else if (Configuration.doAutoCreate()) + this.sopClass = new OidType(); // bb + return this.sopClass; + } + + public boolean hasSopClassElement() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + public boolean hasSopClass() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + /** + * @param value {@link #sopClass} (DICOM instance type.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setSopClassElement(OidType value) { + this.sopClass = value; + return this; + } + + /** + * @return DICOM instance type. + */ + public String getSopClass() { + return this.sopClass == null ? null : this.sopClass.getValue(); + } + + /** + * @param value DICOM instance type. + */ + public ImagingStudySeriesInstanceComponent setSopClass(String value) { + if (this.sopClass == null) + this.sopClass = new OidType(); + this.sopClass.setValue(value); + return this; + } + + /** + * @return {@link #type} (A human-friendly SOP Class name.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StringType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new StringType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A human-friendly SOP Class name.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setTypeElement(StringType value) { + this.type = value; + return this; + } + + /** + * @return A human-friendly SOP Class name. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value A human-friendly SOP Class name. + */ + public ImagingStudySeriesInstanceComponent setType(String value) { + if (Utilities.noString(value)) + this.type = null; + else { + if (this.type == null) + this.type = new StringType(); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The description of the instance. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The description of the instance. + */ + public ImagingStudySeriesInstanceComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #content} (Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.) + */ + public List getContent() { + if (this.content == null) + this.content = new ArrayList(); + return this.content; + } + + public boolean hasContent() { + if (this.content == null) + return false; + for (Attachment item : this.content) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #content} (Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.) + */ + // syntactic sugar + public Attachment addContent() { //3 + Attachment t = new Attachment(); + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return t; + } + + // syntactic sugar + public ImagingStudySeriesInstanceComponent addContent(Attachment t) { //3 + if (t == null) + return this; + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("uid", "oid", "Formal identifier for this image or other content.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("sopClass", "oid", "DICOM instance type.", 0, java.lang.Integer.MAX_VALUE, sopClass)); + childrenList.add(new Property("type", "string", "A human-friendly SOP Class name.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("title", "string", "The description of the instance.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("content", "Attachment", "Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("number")) + this.number = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("sopClass")) + this.sopClass = castToOid(value); // OidType + else if (name.equals("type")) + this.type = castToString(value); // StringType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("content")) + this.getContent().add(castToAttachment(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); + } + else if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); + } + else if (name.equals("sopClass")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.sopClass"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.type"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.title"); + } + else if (name.equals("content")) { + return addContent(); + } + else + return super.addChild(name); + } + + public ImagingStudySeriesInstanceComponent copy() { + ImagingStudySeriesInstanceComponent dst = new ImagingStudySeriesInstanceComponent(); + copyValues(dst); + dst.number = number == null ? null : number.copy(); + dst.uid = uid == null ? null : uid.copy(); + dst.sopClass = sopClass == null ? null : sopClass.copy(); + dst.type = type == null ? null : type.copy(); + dst.title = title == null ? null : title.copy(); + if (content != null) { + dst.content = new ArrayList(); + for (Attachment i : content) + dst.content.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImagingStudySeriesInstanceComponent)) + return false; + ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; + return compareDeep(number, o.number, true) && compareDeep(uid, o.uid, true) && compareDeep(sopClass, o.sopClass, true) + && compareDeep(type, o.type, true) && compareDeep(title, o.title, true) && compareDeep(content, o.content, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImagingStudySeriesInstanceComponent)) + return false; + ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; + return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(sopClass, o.sopClass, true) + && compareValues(type, o.type, true) && compareValues(title, o.title, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (number == null || number.isEmpty()) && (uid == null || uid.isEmpty()) + && (sopClass == null || sopClass.isEmpty()) && (type == null || type.isEmpty()) && (title == null || title.isEmpty()) + && (content == null || content.isEmpty()); + } + + public String fhirType() { + return "ImagingStudy.series.instance"; + + } + + } + + /** + * Date and Time the study started. + */ + @Child(name = "started", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the study was started", formalDefinition="Date and Time the study started." ) + protected DateTimeType started; + + /** + * The patient imaged in the study. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who the images are of", formalDefinition="The patient imaged in the study." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient imaged in the study.) + */ + protected Patient patientTarget; + + /** + * Formal identifier for the study. + */ + @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal identifier for the study", formalDefinition="Formal identifier for the study." ) + protected OidType uid; + + /** + * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf). + */ + @Child(name = "accession", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related workflow identifier (\"Accession Number\")", formalDefinition="Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)." ) + protected Identifier accession; + + /** + * Other identifiers for the study. + */ + @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the study", formalDefinition="Other identifiers for the study." ) + protected List identifier; + + /** + * A list of the diagnostic orders that resulted in this imaging study being performed. + */ + @Child(name = "order", type = {DiagnosticOrder.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Order(s) that caused this study to be performed", formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed." ) + protected List order; + /** + * The actual objects that are the target of the reference (A list of the diagnostic orders that resulted in this imaging study being performed.) + */ + protected List orderTarget; + + + /** + * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). + */ + @Child(name = "modalityList", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="All series modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) + protected List modalityList; + + /** + * The requesting/referring physician. + */ + @Child(name = "referrer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Referring physician (0008,0090)", formalDefinition="The requesting/referring physician." ) + protected Reference referrer; + + /** + * The actual object that is the target of the reference (The requesting/referring physician.) + */ + protected Practitioner referrerTarget; + + /** + * Availability of study (online, offline or nearline). + */ + @Child(name = "availability", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) + protected Enumeration availability; + + /** + * WADO-RS resource where Study is available. + */ + @Child(name = "url", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve URI", formalDefinition="WADO-RS resource where Study is available." ) + protected UriType url; + + /** + * Number of Series in Study. + */ + @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in Study." ) + protected UnsignedIntType numberOfSeries; + + /** + * Number of SOP Instances in Study. + */ + @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study." ) + protected UnsignedIntType numberOfInstances; + + /** + * Type of procedure performed. + */ + @Child(name = "procedure", type = {Procedure.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of procedure performed", formalDefinition="Type of procedure performed." ) + protected List procedure; + /** + * The actual objects that are the target of the reference (Type of procedure performed.) + */ + protected List procedureTarget; + + + /** + * Who read the study and interpreted the images or other content. + */ + @Child(name = "interpreter", type = {Practitioner.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who interpreted images", formalDefinition="Who read the study and interpreted the images or other content." ) + protected Reference interpreter; + + /** + * The actual object that is the target of the reference (Who read the study and interpreted the images or other content.) + */ + protected Practitioner interpreterTarget; + + /** + * Institution-generated description or classification of the Study performed. + */ + @Child(name = "description", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Institution-generated description", formalDefinition="Institution-generated description or classification of the Study performed." ) + protected StringType description; + + /** + * Each study has one or more series of images or other content. + */ + @Child(name = "series", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of images or other content." ) + protected List series; + + private static final long serialVersionUID = 1895046380L; + + /* + * Constructor + */ + public ImagingStudy() { + super(); + } + + /* + * Constructor + */ + public ImagingStudy(Reference patient, OidType uid, UnsignedIntType numberOfSeries, UnsignedIntType numberOfInstances) { + super(); + this.patient = patient; + this.uid = uid; + this.numberOfSeries = numberOfSeries; + this.numberOfInstances = numberOfInstances; + } + + /** + * @return {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public DateTimeType getStartedElement() { + if (this.started == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.started"); + else if (Configuration.doAutoCreate()) + this.started = new DateTimeType(); // bb + return this.started; + } + + public boolean hasStartedElement() { + return this.started != null && !this.started.isEmpty(); + } + + public boolean hasStarted() { + return this.started != null && !this.started.isEmpty(); + } + + /** + * @param value {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public ImagingStudy setStartedElement(DateTimeType value) { + this.started = value; + return this; + } + + /** + * @return Date and Time the study started. + */ + public Date getStarted() { + return this.started == null ? null : this.started.getValue(); + } + + /** + * @param value Date and Time the study started. + */ + public ImagingStudy setStarted(Date value) { + if (value == null) + this.started = null; + else { + if (this.started == null) + this.started = new DateTimeType(); + this.started.setValue(value); + } + return this; + } + + /** + * @return {@link #patient} (The patient imaged in the study.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient imaged in the study.) + */ + public ImagingStudy setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) + */ + public ImagingStudy setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #uid} (Formal identifier for the study.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Formal identifier for the study.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingStudy setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Formal identifier for the study. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Formal identifier for the study. + */ + public ImagingStudy setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #accession} (Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).) + */ + public Identifier getAccession() { + if (this.accession == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.accession"); + else if (Configuration.doAutoCreate()) + this.accession = new Identifier(); // cc + return this.accession; + } + + public boolean hasAccession() { + return this.accession != null && !this.accession.isEmpty(); + } + + /** + * @param value {@link #accession} (Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).) + */ + public ImagingStudy setAccession(Identifier value) { + this.accession = value; + return this; + } + + /** + * @return {@link #identifier} (Other identifiers for the study.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Other identifiers for the study.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #order} (A list of the diagnostic orders that resulted in this imaging study being performed.) + */ + public List getOrder() { + if (this.order == null) + this.order = new ArrayList(); + return this.order; + } + + public boolean hasOrder() { + if (this.order == null) + return false; + for (Reference item : this.order) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #order} (A list of the diagnostic orders that resulted in this imaging study being performed.) + */ + // syntactic sugar + public Reference addOrder() { //3 + Reference t = new Reference(); + if (this.order == null) + this.order = new ArrayList(); + this.order.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addOrder(Reference t) { //3 + if (t == null) + return this; + if (this.order == null) + this.order = new ArrayList(); + this.order.add(t); + return this; + } + + /** + * @return {@link #order} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of the diagnostic orders that resulted in this imaging study being performed.) + */ + public List getOrderTarget() { + if (this.orderTarget == null) + this.orderTarget = new ArrayList(); + return this.orderTarget; + } + + // syntactic sugar + /** + * @return {@link #order} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of the diagnostic orders that resulted in this imaging study being performed.) + */ + public DiagnosticOrder addOrderTarget() { + DiagnosticOrder r = new DiagnosticOrder(); + if (this.orderTarget == null) + this.orderTarget = new ArrayList(); + this.orderTarget.add(r); + return r; + } + + /** + * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) + */ + public List getModalityList() { + if (this.modalityList == null) + this.modalityList = new ArrayList(); + return this.modalityList; + } + + public boolean hasModalityList() { + if (this.modalityList == null) + return false; + for (Coding item : this.modalityList) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) + */ + // syntactic sugar + public Coding addModalityList() { //3 + Coding t = new Coding(); + if (this.modalityList == null) + this.modalityList = new ArrayList(); + this.modalityList.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addModalityList(Coding t) { //3 + if (t == null) + return this; + if (this.modalityList == null) + this.modalityList = new ArrayList(); + this.modalityList.add(t); + return this; + } + + /** + * @return {@link #referrer} (The requesting/referring physician.) + */ + public Reference getReferrer() { + if (this.referrer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.referrer"); + else if (Configuration.doAutoCreate()) + this.referrer = new Reference(); // cc + return this.referrer; + } + + public boolean hasReferrer() { + return this.referrer != null && !this.referrer.isEmpty(); + } + + /** + * @param value {@link #referrer} (The requesting/referring physician.) + */ + public ImagingStudy setReferrer(Reference value) { + this.referrer = value; + return this; + } + + /** + * @return {@link #referrer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The requesting/referring physician.) + */ + public Practitioner getReferrerTarget() { + if (this.referrerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.referrer"); + else if (Configuration.doAutoCreate()) + this.referrerTarget = new Practitioner(); // aa + return this.referrerTarget; + } + + /** + * @param value {@link #referrer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The requesting/referring physician.) + */ + public ImagingStudy setReferrerTarget(Practitioner value) { + this.referrerTarget = value; + return this; + } + + /** + * @return {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public Enumeration getAvailabilityElement() { + if (this.availability == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.availability"); + else if (Configuration.doAutoCreate()) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); // bb + return this.availability; + } + + public boolean hasAvailabilityElement() { + return this.availability != null && !this.availability.isEmpty(); + } + + public boolean hasAvailability() { + return this.availability != null && !this.availability.isEmpty(); + } + + /** + * @param value {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public ImagingStudy setAvailabilityElement(Enumeration value) { + this.availability = value; + return this; + } + + /** + * @return Availability of study (online, offline or nearline). + */ + public InstanceAvailability getAvailability() { + return this.availability == null ? null : this.availability.getValue(); + } + + /** + * @param value Availability of study (online, offline or nearline). + */ + public ImagingStudy setAvailability(InstanceAvailability value) { + if (value == null) + this.availability = null; + else { + if (this.availability == null) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); + this.availability.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (WADO-RS resource where Study is available.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (WADO-RS resource where Study is available.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ImagingStudy setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return WADO-RS resource where Study is available. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value WADO-RS resource where Study is available. + */ + public ImagingStudy setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #numberOfSeries} (Number of Series in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value + */ + public UnsignedIntType getNumberOfSeriesElement() { + if (this.numberOfSeries == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.numberOfSeries"); + else if (Configuration.doAutoCreate()) + this.numberOfSeries = new UnsignedIntType(); // bb + return this.numberOfSeries; + } + + public boolean hasNumberOfSeriesElement() { + return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); + } + + public boolean hasNumberOfSeries() { + return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); + } + + /** + * @param value {@link #numberOfSeries} (Number of Series in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value + */ + public ImagingStudy setNumberOfSeriesElement(UnsignedIntType value) { + this.numberOfSeries = value; + return this; + } + + /** + * @return Number of Series in Study. + */ + public int getNumberOfSeries() { + return this.numberOfSeries == null || this.numberOfSeries.isEmpty() ? 0 : this.numberOfSeries.getValue(); + } + + /** + * @param value Number of Series in Study. + */ + public ImagingStudy setNumberOfSeries(int value) { + if (this.numberOfSeries == null) + this.numberOfSeries = new UnsignedIntType(); + this.numberOfSeries.setValue(value); + return this; + } + + /** + * @return {@link #numberOfInstances} (Number of SOP Instances in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value + */ + public UnsignedIntType getNumberOfInstancesElement() { + if (this.numberOfInstances == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.numberOfInstances"); + else if (Configuration.doAutoCreate()) + this.numberOfInstances = new UnsignedIntType(); // bb + return this.numberOfInstances; + } + + public boolean hasNumberOfInstancesElement() { + return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); + } + + public boolean hasNumberOfInstances() { + return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); + } + + /** + * @param value {@link #numberOfInstances} (Number of SOP Instances in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value + */ + public ImagingStudy setNumberOfInstancesElement(UnsignedIntType value) { + this.numberOfInstances = value; + return this; + } + + /** + * @return Number of SOP Instances in Study. + */ + public int getNumberOfInstances() { + return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); + } + + /** + * @param value Number of SOP Instances in Study. + */ + public ImagingStudy setNumberOfInstances(int value) { + if (this.numberOfInstances == null) + this.numberOfInstances = new UnsignedIntType(); + this.numberOfInstances.setValue(value); + return this; + } + + /** + * @return {@link #procedure} (Type of procedure performed.) + */ + public List getProcedure() { + if (this.procedure == null) + this.procedure = new ArrayList(); + return this.procedure; + } + + public boolean hasProcedure() { + if (this.procedure == null) + return false; + for (Reference item : this.procedure) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #procedure} (Type of procedure performed.) + */ + // syntactic sugar + public Reference addProcedure() { //3 + Reference t = new Reference(); + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addProcedure(Reference t) { //3 + if (t == null) + return this; + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return this; + } + + /** + * @return {@link #procedure} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Type of procedure performed.) + */ + public List getProcedureTarget() { + if (this.procedureTarget == null) + this.procedureTarget = new ArrayList(); + return this.procedureTarget; + } + + // syntactic sugar + /** + * @return {@link #procedure} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Type of procedure performed.) + */ + public Procedure addProcedureTarget() { + Procedure r = new Procedure(); + if (this.procedureTarget == null) + this.procedureTarget = new ArrayList(); + this.procedureTarget.add(r); + return r; + } + + /** + * @return {@link #interpreter} (Who read the study and interpreted the images or other content.) + */ + public Reference getInterpreter() { + if (this.interpreter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.interpreter"); + else if (Configuration.doAutoCreate()) + this.interpreter = new Reference(); // cc + return this.interpreter; + } + + public boolean hasInterpreter() { + return this.interpreter != null && !this.interpreter.isEmpty(); + } + + /** + * @param value {@link #interpreter} (Who read the study and interpreted the images or other content.) + */ + public ImagingStudy setInterpreter(Reference value) { + this.interpreter = value; + return this; + } + + /** + * @return {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) + */ + public Practitioner getInterpreterTarget() { + if (this.interpreterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.interpreter"); + else if (Configuration.doAutoCreate()) + this.interpreterTarget = new Practitioner(); // aa + return this.interpreterTarget; + } + + /** + * @param value {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) + */ + public ImagingStudy setInterpreterTarget(Practitioner value) { + this.interpreterTarget = value; + return this; + } + + /** + * @return {@link #description} (Institution-generated description or classification of the Study performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Institution-generated description or classification of the Study performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImagingStudy setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Institution-generated description or classification of the Study performed. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Institution-generated description or classification of the Study performed. + */ + public ImagingStudy setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #series} (Each study has one or more series of images or other content.) + */ + public List getSeries() { + if (this.series == null) + this.series = new ArrayList(); + return this.series; + } + + public boolean hasSeries() { + if (this.series == null) + return false; + for (ImagingStudySeriesComponent item : this.series) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #series} (Each study has one or more series of images or other content.) + */ + // syntactic sugar + public ImagingStudySeriesComponent addSeries() { //3 + ImagingStudySeriesComponent t = new ImagingStudySeriesComponent(); + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addSeries(ImagingStudySeriesComponent t) { //3 + if (t == null) + return this; + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("started", "dateTime", "Date and Time the study started.", 0, java.lang.Integer.MAX_VALUE, started)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient imaged in the study.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("uid", "oid", "Formal identifier for the study.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("accession", "Identifier", "Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).", 0, java.lang.Integer.MAX_VALUE, accession)); + childrenList.add(new Property("identifier", "Identifier", "Other identifiers for the study.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("order", "Reference(DiagnosticOrder)", "A list of the diagnostic orders that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, order)); + childrenList.add(new Property("modalityList", "Coding", "A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).", 0, java.lang.Integer.MAX_VALUE, modalityList)); + childrenList.add(new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, java.lang.Integer.MAX_VALUE, referrer)); + childrenList.add(new Property("availability", "code", "Availability of study (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); + childrenList.add(new Property("url", "uri", "WADO-RS resource where Study is available.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("numberOfSeries", "unsignedInt", "Number of Series in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfSeries)); + childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); + childrenList.add(new Property("procedure", "Reference(Procedure)", "Type of procedure performed.", 0, java.lang.Integer.MAX_VALUE, procedure)); + childrenList.add(new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter)); + childrenList.add(new Property("description", "string", "Institution-generated description or classification of the Study performed.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("started")) + this.started = castToDateTime(value); // DateTimeType + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("accession")) + this.accession = castToIdentifier(value); // Identifier + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("order")) + this.getOrder().add(castToReference(value)); + else if (name.equals("modalityList")) + this.getModalityList().add(castToCoding(value)); + else if (name.equals("referrer")) + this.referrer = castToReference(value); // Reference + else if (name.equals("availability")) + this.availability = new InstanceAvailabilityEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("numberOfSeries")) + this.numberOfSeries = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("numberOfInstances")) + this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("procedure")) + this.getProcedure().add(castToReference(value)); + else if (name.equals("interpreter")) + this.interpreter = castToReference(value); // Reference + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("series")) + this.getSeries().add((ImagingStudySeriesComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("started")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); + } + else if (name.equals("accession")) { + this.accession = new Identifier(); + return this.accession; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("order")) { + return addOrder(); + } + else if (name.equals("modalityList")) { + return addModalityList(); + } + else if (name.equals("referrer")) { + this.referrer = new Reference(); + return this.referrer; + } + else if (name.equals("availability")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.url"); + } + else if (name.equals("numberOfSeries")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfSeries"); + } + else if (name.equals("numberOfInstances")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); + } + else if (name.equals("procedure")) { + return addProcedure(); + } + else if (name.equals("interpreter")) { + this.interpreter = new Reference(); + return this.interpreter; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); + } + else if (name.equals("series")) { + return addSeries(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ImagingStudy"; + + } + + public ImagingStudy copy() { + ImagingStudy dst = new ImagingStudy(); + copyValues(dst); + dst.started = started == null ? null : started.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.uid = uid == null ? null : uid.copy(); + dst.accession = accession == null ? null : accession.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (order != null) { + dst.order = new ArrayList(); + for (Reference i : order) + dst.order.add(i.copy()); + }; + if (modalityList != null) { + dst.modalityList = new ArrayList(); + for (Coding i : modalityList) + dst.modalityList.add(i.copy()); + }; + dst.referrer = referrer == null ? null : referrer.copy(); + dst.availability = availability == null ? null : availability.copy(); + dst.url = url == null ? null : url.copy(); + dst.numberOfSeries = numberOfSeries == null ? null : numberOfSeries.copy(); + dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); + if (procedure != null) { + dst.procedure = new ArrayList(); + for (Reference i : procedure) + dst.procedure.add(i.copy()); + }; + dst.interpreter = interpreter == null ? null : interpreter.copy(); + dst.description = description == null ? null : description.copy(); + if (series != null) { + dst.series = new ArrayList(); + for (ImagingStudySeriesComponent i : series) + dst.series.add(i.copy()); + }; + return dst; + } + + protected ImagingStudy typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImagingStudy)) + return false; + ImagingStudy o = (ImagingStudy) other; + return compareDeep(started, o.started, true) && compareDeep(patient, o.patient, true) && compareDeep(uid, o.uid, true) + && compareDeep(accession, o.accession, true) && compareDeep(identifier, o.identifier, true) && compareDeep(order, o.order, true) + && compareDeep(modalityList, o.modalityList, true) && compareDeep(referrer, o.referrer, true) && compareDeep(availability, o.availability, true) + && compareDeep(url, o.url, true) && compareDeep(numberOfSeries, o.numberOfSeries, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) + && compareDeep(procedure, o.procedure, true) && compareDeep(interpreter, o.interpreter, true) && compareDeep(description, o.description, true) + && compareDeep(series, o.series, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImagingStudy)) + return false; + ImagingStudy o = (ImagingStudy) other; + return compareValues(started, o.started, true) && compareValues(uid, o.uid, true) && compareValues(availability, o.availability, true) + && compareValues(url, o.url, true) && compareValues(numberOfSeries, o.numberOfSeries, true) && compareValues(numberOfInstances, o.numberOfInstances, true) + && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (started == null || started.isEmpty()) && (patient == null || patient.isEmpty()) + && (uid == null || uid.isEmpty()) && (accession == null || accession.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (order == null || order.isEmpty()) && (modalityList == null || modalityList.isEmpty()) + && (referrer == null || referrer.isEmpty()) && (availability == null || availability.isEmpty()) + && (url == null || url.isEmpty()) && (numberOfSeries == null || numberOfSeries.isEmpty()) + && (numberOfInstances == null || numberOfInstances.isEmpty()) && (procedure == null || procedure.isEmpty()) + && (interpreter == null || interpreter.isEmpty()) && (description == null || description.isEmpty()) + && (series == null || series.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ImagingStudy; + } + + @SearchParamDefinition(name="uid", path="ImagingStudy.series.instance.uid", description="The instance unique identifier", type="uri" ) + public static final String SP_UID = "uid"; + @SearchParamDefinition(name="study", path="ImagingStudy.uid", description="The study identifier for the image", type="uri" ) + public static final String SP_STUDY = "study"; + @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopClass", description="The type of the instance", type="uri" ) + public static final String SP_DICOMCLASS = "dicom-class"; + @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the series", type="token" ) + public static final String SP_MODALITY = "modality"; + @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="The body site studied", type="token" ) + public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The identifier of the series of images", type="uri" ) + public static final String SP_SERIES = "series"; + @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) + public static final String SP_STARTED = "started"; + @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession identifier for the study", type="token" ) + public static final String SP_ACCESSION = "accession"; + @SearchParamDefinition(name="order", path="ImagingStudy.order", description="The order for the image", type="reference" ) + public static final String SP_ORDER = "order"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Immunization.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Immunization.java new file mode 100644 index 00000000000..e2775c5859b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Immunization.java @@ -0,0 +1,2318 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ +@ResourceDef(name="Immunization", profile="http://hl7.org/fhir/Profile/Immunization") +public class Immunization extends DomainResource { + + @Block() + public static class ImmunizationExplanationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Reasons why a vaccine was administered. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Why immunization occurred", formalDefinition="Reasons why a vaccine was administered." ) + protected List reason; + + /** + * Reason why a vaccine was not administered. + */ + @Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Why immunization did not occur", formalDefinition="Reason why a vaccine was not administered." ) + protected List reasonNotGiven; + + private static final long serialVersionUID = -539821866L; + + /* + * Constructor + */ + public ImmunizationExplanationComponent() { + super(); + } + + /** + * @return {@link #reason} (Reasons why a vaccine was administered.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (Reasons why a vaccine was administered.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public ImmunizationExplanationComponent addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #reasonNotGiven} (Reason why a vaccine was not administered.) + */ + public List getReasonNotGiven() { + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + return this.reasonNotGiven; + } + + public boolean hasReasonNotGiven() { + if (this.reasonNotGiven == null) + return false; + for (CodeableConcept item : this.reasonNotGiven) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonNotGiven} (Reason why a vaccine was not administered.) + */ + // syntactic sugar + public CodeableConcept addReasonNotGiven() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + this.reasonNotGiven.add(t); + return t; + } + + // syntactic sugar + public ImmunizationExplanationComponent addReasonNotGiven(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + this.reasonNotGiven.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("reason", "CodeableConcept", "Reasons why a vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("reasonNotGiven", "CodeableConcept", "Reason why a vaccine was not administered.", 0, java.lang.Integer.MAX_VALUE, reasonNotGiven)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("reasonNotGiven")) + this.getReasonNotGiven().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("reasonNotGiven")) { + return addReasonNotGiven(); + } + else + return super.addChild(name); + } + + public ImmunizationExplanationComponent copy() { + ImmunizationExplanationComponent dst = new ImmunizationExplanationComponent(); + copyValues(dst); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + if (reasonNotGiven != null) { + dst.reasonNotGiven = new ArrayList(); + for (CodeableConcept i : reasonNotGiven) + dst.reasonNotGiven.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationExplanationComponent)) + return false; + ImmunizationExplanationComponent o = (ImmunizationExplanationComponent) other; + return compareDeep(reason, o.reason, true) && compareDeep(reasonNotGiven, o.reasonNotGiven, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationExplanationComponent)) + return false; + ImmunizationExplanationComponent o = (ImmunizationExplanationComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (reason == null || reason.isEmpty()) && (reasonNotGiven == null || reasonNotGiven.isEmpty()) + ; + } + + public String fhirType() { + return "Immunization.explanation"; + + } + + } + + @Block() + public static class ImmunizationReactionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Date of reaction to the immunization. + */ + @Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When reaction started", formalDefinition="Date of reaction to the immunization." ) + protected DateTimeType date; + + /** + * Details of the reaction. + */ + @Child(name = "detail", type = {Observation.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional information on reaction", formalDefinition="Details of the reaction." ) + protected Reference detail; + + /** + * The actual object that is the target of the reference (Details of the reaction.) + */ + protected Observation detailTarget; + + /** + * Self-reported indicator. + */ + @Child(name = "reported", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates self-reported reaction", formalDefinition="Self-reported indicator." ) + protected BooleanType reported; + + private static final long serialVersionUID = -1297668556L; + + /* + * Constructor + */ + public ImmunizationReactionComponent() { + super(); + } + + /** + * @return {@link #date} (Date of reaction to the immunization.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationReactionComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Date of reaction to the immunization.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ImmunizationReactionComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Date of reaction to the immunization. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Date of reaction to the immunization. + */ + public ImmunizationReactionComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #detail} (Details of the reaction.) + */ + public Reference getDetail() { + if (this.detail == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationReactionComponent.detail"); + else if (Configuration.doAutoCreate()) + this.detail = new Reference(); // cc + return this.detail; + } + + public boolean hasDetail() { + return this.detail != null && !this.detail.isEmpty(); + } + + /** + * @param value {@link #detail} (Details of the reaction.) + */ + public ImmunizationReactionComponent setDetail(Reference value) { + this.detail = value; + return this; + } + + /** + * @return {@link #detail} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Details of the reaction.) + */ + public Observation getDetailTarget() { + if (this.detailTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationReactionComponent.detail"); + else if (Configuration.doAutoCreate()) + this.detailTarget = new Observation(); // aa + return this.detailTarget; + } + + /** + * @param value {@link #detail} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Details of the reaction.) + */ + public ImmunizationReactionComponent setDetailTarget(Observation value) { + this.detailTarget = value; + return this; + } + + /** + * @return {@link #reported} (Self-reported indicator.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value + */ + public BooleanType getReportedElement() { + if (this.reported == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationReactionComponent.reported"); + else if (Configuration.doAutoCreate()) + this.reported = new BooleanType(); // bb + return this.reported; + } + + public boolean hasReportedElement() { + return this.reported != null && !this.reported.isEmpty(); + } + + public boolean hasReported() { + return this.reported != null && !this.reported.isEmpty(); + } + + /** + * @param value {@link #reported} (Self-reported indicator.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value + */ + public ImmunizationReactionComponent setReportedElement(BooleanType value) { + this.reported = value; + return this; + } + + /** + * @return Self-reported indicator. + */ + public boolean getReported() { + return this.reported == null || this.reported.isEmpty() ? false : this.reported.getValue(); + } + + /** + * @param value Self-reported indicator. + */ + public ImmunizationReactionComponent setReported(boolean value) { + if (this.reported == null) + this.reported = new BooleanType(); + this.reported.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("date", "dateTime", "Date of reaction to the immunization.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("detail", "Reference(Observation)", "Details of the reaction.", 0, java.lang.Integer.MAX_VALUE, detail)); + childrenList.add(new Property("reported", "boolean", "Self-reported indicator.", 0, java.lang.Integer.MAX_VALUE, reported)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("detail")) + this.detail = castToReference(value); // Reference + else if (name.equals("reported")) + this.reported = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.date"); + } + else if (name.equals("detail")) { + this.detail = new Reference(); + return this.detail; + } + else if (name.equals("reported")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.reported"); + } + else + return super.addChild(name); + } + + public ImmunizationReactionComponent copy() { + ImmunizationReactionComponent dst = new ImmunizationReactionComponent(); + copyValues(dst); + dst.date = date == null ? null : date.copy(); + dst.detail = detail == null ? null : detail.copy(); + dst.reported = reported == null ? null : reported.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationReactionComponent)) + return false; + ImmunizationReactionComponent o = (ImmunizationReactionComponent) other; + return compareDeep(date, o.date, true) && compareDeep(detail, o.detail, true) && compareDeep(reported, o.reported, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationReactionComponent)) + return false; + ImmunizationReactionComponent o = (ImmunizationReactionComponent) other; + return compareValues(date, o.date, true) && compareValues(reported, o.reported, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (date == null || date.isEmpty()) && (detail == null || detail.isEmpty()) + && (reported == null || reported.isEmpty()); + } + + public String fhirType() { + return "Immunization.reaction"; + + } + + } + + @Block() + public static class ImmunizationVaccinationProtocolComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Nominal position in a series. + */ + @Child(name = "doseSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Dose number within series", formalDefinition="Nominal position in a series." ) + protected PositiveIntType doseSequence; + + /** + * Contains the description about the protocol under which the vaccine was administered. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details of vaccine protocol", formalDefinition="Contains the description about the protocol under which the vaccine was administered." ) + protected StringType description; + + /** + * Indicates the authority who published the protocol. E.g. ACIP. + */ + @Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who is responsible for protocol", formalDefinition="Indicates the authority who published the protocol. E.g. ACIP." ) + protected Reference authority; + + /** + * The actual object that is the target of the reference (Indicates the authority who published the protocol. E.g. ACIP.) + */ + protected Organization authorityTarget; + + /** + * One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + @Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of vaccine series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." ) + protected StringType series; + + /** + * The recommended number of doses to achieve immunity. + */ + @Child(name = "seriesDoses", type = {PositiveIntType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recommended number of doses for immunity", formalDefinition="The recommended number of doses to achieve immunity." ) + protected PositiveIntType seriesDoses; + + /** + * The targeted disease. + */ + @Child(name = "targetDisease", type = {CodeableConcept.class}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Disease immunized against", formalDefinition="The targeted disease." ) + protected List targetDisease; + + /** + * Indicates if the immunization event should "count" against the protocol. + */ + @Child(name = "doseStatus", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates if dose counts towards immunity", formalDefinition="Indicates if the immunization event should \"count\" against the protocol." ) + protected CodeableConcept doseStatus; + + /** + * Provides an explanation as to why an immunization event should or should not count against the protocol. + */ + @Child(name = "doseStatusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why dose does (not) count", formalDefinition="Provides an explanation as to why an immunization event should or should not count against the protocol." ) + protected CodeableConcept doseStatusReason; + + private static final long serialVersionUID = 386814037L; + + /* + * Constructor + */ + public ImmunizationVaccinationProtocolComponent() { + super(); + } + + /* + * Constructor + */ + public ImmunizationVaccinationProtocolComponent(PositiveIntType doseSequence, CodeableConcept doseStatus) { + super(); + this.doseSequence = doseSequence; + this.doseStatus = doseStatus; + } + + /** + * @return {@link #doseSequence} (Nominal position in a series.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value + */ + public PositiveIntType getDoseSequenceElement() { + if (this.doseSequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.doseSequence"); + else if (Configuration.doAutoCreate()) + this.doseSequence = new PositiveIntType(); // bb + return this.doseSequence; + } + + public boolean hasDoseSequenceElement() { + return this.doseSequence != null && !this.doseSequence.isEmpty(); + } + + public boolean hasDoseSequence() { + return this.doseSequence != null && !this.doseSequence.isEmpty(); + } + + /** + * @param value {@link #doseSequence} (Nominal position in a series.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value + */ + public ImmunizationVaccinationProtocolComponent setDoseSequenceElement(PositiveIntType value) { + this.doseSequence = value; + return this; + } + + /** + * @return Nominal position in a series. + */ + public int getDoseSequence() { + return this.doseSequence == null || this.doseSequence.isEmpty() ? 0 : this.doseSequence.getValue(); + } + + /** + * @param value Nominal position in a series. + */ + public ImmunizationVaccinationProtocolComponent setDoseSequence(int value) { + if (this.doseSequence == null) + this.doseSequence = new PositiveIntType(); + this.doseSequence.setValue(value); + return this; + } + + /** + * @return {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImmunizationVaccinationProtocolComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Contains the description about the protocol under which the vaccine was administered. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Contains the description about the protocol under which the vaccine was administered. + */ + public ImmunizationVaccinationProtocolComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #authority} (Indicates the authority who published the protocol. E.g. ACIP.) + */ + public Reference getAuthority() { + if (this.authority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.authority"); + else if (Configuration.doAutoCreate()) + this.authority = new Reference(); // cc + return this.authority; + } + + public boolean hasAuthority() { + return this.authority != null && !this.authority.isEmpty(); + } + + /** + * @param value {@link #authority} (Indicates the authority who published the protocol. E.g. ACIP.) + */ + public ImmunizationVaccinationProtocolComponent setAuthority(Reference value) { + this.authority = value; + return this; + } + + /** + * @return {@link #authority} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the authority who published the protocol. E.g. ACIP.) + */ + public Organization getAuthorityTarget() { + if (this.authorityTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.authority"); + else if (Configuration.doAutoCreate()) + this.authorityTarget = new Organization(); // aa + return this.authorityTarget; + } + + /** + * @param value {@link #authority} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the authority who published the protocol. E.g. ACIP.) + */ + public ImmunizationVaccinationProtocolComponent setAuthorityTarget(Organization value) { + this.authorityTarget = value; + return this; + } + + /** + * @return {@link #series} (One possible path to achieve presumed immunity against a disease - within the context of an authority.). This is the underlying object with id, value and extensions. The accessor "getSeries" gives direct access to the value + */ + public StringType getSeriesElement() { + if (this.series == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.series"); + else if (Configuration.doAutoCreate()) + this.series = new StringType(); // bb + return this.series; + } + + public boolean hasSeriesElement() { + return this.series != null && !this.series.isEmpty(); + } + + public boolean hasSeries() { + return this.series != null && !this.series.isEmpty(); + } + + /** + * @param value {@link #series} (One possible path to achieve presumed immunity against a disease - within the context of an authority.). This is the underlying object with id, value and extensions. The accessor "getSeries" gives direct access to the value + */ + public ImmunizationVaccinationProtocolComponent setSeriesElement(StringType value) { + this.series = value; + return this; + } + + /** + * @return One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + public String getSeries() { + return this.series == null ? null : this.series.getValue(); + } + + /** + * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + public ImmunizationVaccinationProtocolComponent setSeries(String value) { + if (Utilities.noString(value)) + this.series = null; + else { + if (this.series == null) + this.series = new StringType(); + this.series.setValue(value); + } + return this; + } + + /** + * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.). This is the underlying object with id, value and extensions. The accessor "getSeriesDoses" gives direct access to the value + */ + public PositiveIntType getSeriesDosesElement() { + if (this.seriesDoses == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.seriesDoses"); + else if (Configuration.doAutoCreate()) + this.seriesDoses = new PositiveIntType(); // bb + return this.seriesDoses; + } + + public boolean hasSeriesDosesElement() { + return this.seriesDoses != null && !this.seriesDoses.isEmpty(); + } + + public boolean hasSeriesDoses() { + return this.seriesDoses != null && !this.seriesDoses.isEmpty(); + } + + /** + * @param value {@link #seriesDoses} (The recommended number of doses to achieve immunity.). This is the underlying object with id, value and extensions. The accessor "getSeriesDoses" gives direct access to the value + */ + public ImmunizationVaccinationProtocolComponent setSeriesDosesElement(PositiveIntType value) { + this.seriesDoses = value; + return this; + } + + /** + * @return The recommended number of doses to achieve immunity. + */ + public int getSeriesDoses() { + return this.seriesDoses == null || this.seriesDoses.isEmpty() ? 0 : this.seriesDoses.getValue(); + } + + /** + * @param value The recommended number of doses to achieve immunity. + */ + public ImmunizationVaccinationProtocolComponent setSeriesDoses(int value) { + if (this.seriesDoses == null) + this.seriesDoses = new PositiveIntType(); + this.seriesDoses.setValue(value); + return this; + } + + /** + * @return {@link #targetDisease} (The targeted disease.) + */ + public List getTargetDisease() { + if (this.targetDisease == null) + this.targetDisease = new ArrayList(); + return this.targetDisease; + } + + public boolean hasTargetDisease() { + if (this.targetDisease == null) + return false; + for (CodeableConcept item : this.targetDisease) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #targetDisease} (The targeted disease.) + */ + // syntactic sugar + public CodeableConcept addTargetDisease() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.targetDisease == null) + this.targetDisease = new ArrayList(); + this.targetDisease.add(t); + return t; + } + + // syntactic sugar + public ImmunizationVaccinationProtocolComponent addTargetDisease(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.targetDisease == null) + this.targetDisease = new ArrayList(); + this.targetDisease.add(t); + return this; + } + + /** + * @return {@link #doseStatus} (Indicates if the immunization event should "count" against the protocol.) + */ + public CodeableConcept getDoseStatus() { + if (this.doseStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.doseStatus"); + else if (Configuration.doAutoCreate()) + this.doseStatus = new CodeableConcept(); // cc + return this.doseStatus; + } + + public boolean hasDoseStatus() { + return this.doseStatus != null && !this.doseStatus.isEmpty(); + } + + /** + * @param value {@link #doseStatus} (Indicates if the immunization event should "count" against the protocol.) + */ + public ImmunizationVaccinationProtocolComponent setDoseStatus(CodeableConcept value) { + this.doseStatus = value; + return this; + } + + /** + * @return {@link #doseStatusReason} (Provides an explanation as to why an immunization event should or should not count against the protocol.) + */ + public CodeableConcept getDoseStatusReason() { + if (this.doseStatusReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.doseStatusReason"); + else if (Configuration.doAutoCreate()) + this.doseStatusReason = new CodeableConcept(); // cc + return this.doseStatusReason; + } + + public boolean hasDoseStatusReason() { + return this.doseStatusReason != null && !this.doseStatusReason.isEmpty(); + } + + /** + * @param value {@link #doseStatusReason} (Provides an explanation as to why an immunization event should or should not count against the protocol.) + */ + public ImmunizationVaccinationProtocolComponent setDoseStatusReason(CodeableConcept value) { + this.doseStatusReason = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("doseSequence", "positiveInt", "Nominal position in a series.", 0, java.lang.Integer.MAX_VALUE, doseSequence)); + childrenList.add(new Property("description", "string", "Contains the description about the protocol under which the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol. E.g. ACIP.", 0, java.lang.Integer.MAX_VALUE, authority)); + childrenList.add(new Property("series", "string", "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, java.lang.Integer.MAX_VALUE, series)); + childrenList.add(new Property("seriesDoses", "positiveInt", "The recommended number of doses to achieve immunity.", 0, java.lang.Integer.MAX_VALUE, seriesDoses)); + childrenList.add(new Property("targetDisease", "CodeableConcept", "The targeted disease.", 0, java.lang.Integer.MAX_VALUE, targetDisease)); + childrenList.add(new Property("doseStatus", "CodeableConcept", "Indicates if the immunization event should \"count\" against the protocol.", 0, java.lang.Integer.MAX_VALUE, doseStatus)); + childrenList.add(new Property("doseStatusReason", "CodeableConcept", "Provides an explanation as to why an immunization event should or should not count against the protocol.", 0, java.lang.Integer.MAX_VALUE, doseStatusReason)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("doseSequence")) + this.doseSequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("authority")) + this.authority = castToReference(value); // Reference + else if (name.equals("series")) + this.series = castToString(value); // StringType + else if (name.equals("seriesDoses")) + this.seriesDoses = castToPositiveInt(value); // PositiveIntType + else if (name.equals("targetDisease")) + this.getTargetDisease().add(castToCodeableConcept(value)); + else if (name.equals("doseStatus")) + this.doseStatus = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("doseStatusReason")) + this.doseStatusReason = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("doseSequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.doseSequence"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.description"); + } + else if (name.equals("authority")) { + this.authority = new Reference(); + return this.authority; + } + else if (name.equals("series")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.series"); + } + else if (name.equals("seriesDoses")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.seriesDoses"); + } + else if (name.equals("targetDisease")) { + return addTargetDisease(); + } + else if (name.equals("doseStatus")) { + this.doseStatus = new CodeableConcept(); + return this.doseStatus; + } + else if (name.equals("doseStatusReason")) { + this.doseStatusReason = new CodeableConcept(); + return this.doseStatusReason; + } + else + return super.addChild(name); + } + + public ImmunizationVaccinationProtocolComponent copy() { + ImmunizationVaccinationProtocolComponent dst = new ImmunizationVaccinationProtocolComponent(); + copyValues(dst); + dst.doseSequence = doseSequence == null ? null : doseSequence.copy(); + dst.description = description == null ? null : description.copy(); + dst.authority = authority == null ? null : authority.copy(); + dst.series = series == null ? null : series.copy(); + dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy(); + if (targetDisease != null) { + dst.targetDisease = new ArrayList(); + for (CodeableConcept i : targetDisease) + dst.targetDisease.add(i.copy()); + }; + dst.doseStatus = doseStatus == null ? null : doseStatus.copy(); + dst.doseStatusReason = doseStatusReason == null ? null : doseStatusReason.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationVaccinationProtocolComponent)) + return false; + ImmunizationVaccinationProtocolComponent o = (ImmunizationVaccinationProtocolComponent) other; + return compareDeep(doseSequence, o.doseSequence, true) && compareDeep(description, o.description, true) + && compareDeep(authority, o.authority, true) && compareDeep(series, o.series, true) && compareDeep(seriesDoses, o.seriesDoses, true) + && compareDeep(targetDisease, o.targetDisease, true) && compareDeep(doseStatus, o.doseStatus, true) + && compareDeep(doseStatusReason, o.doseStatusReason, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationVaccinationProtocolComponent)) + return false; + ImmunizationVaccinationProtocolComponent o = (ImmunizationVaccinationProtocolComponent) other; + return compareValues(doseSequence, o.doseSequence, true) && compareValues(description, o.description, true) + && compareValues(series, o.series, true) && compareValues(seriesDoses, o.seriesDoses, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty()) + && (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()) && (seriesDoses == null || seriesDoses.isEmpty()) + && (targetDisease == null || targetDisease.isEmpty()) && (doseStatus == null || doseStatus.isEmpty()) + && (doseStatusReason == null || doseStatusReason.isEmpty()); + } + + public String fhirType() { + return "Immunization.vaccinationProtocol"; + + } + + } + + /** + * A unique identifier assigned to this immunization record. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." ) + protected List identifier; + + /** + * Indicates the current status of the vaccination event. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="Indicates the current status of the vaccination event." ) + protected CodeType status; + + /** + * Date vaccine administered or was to be administered. + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Vaccination administration date", formalDefinition="Date vaccine administered or was to be administered." ) + protected DateTimeType date; + + /** + * Vaccine that was administered or was to be administered. + */ + @Child(name = "vaccineCode", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." ) + protected CodeableConcept vaccineCode; + + /** + * The patient who either received or did not receive the immunization. + */ + @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who was immunized", formalDefinition="The patient who either received or did not receive the immunization." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient who either received or did not receive the immunization.) + */ + protected Patient patientTarget; + + /** + * Indicates if the vaccination was or was not given. + */ + @Child(name = "wasNotGiven", type = {BooleanType.class}, order=5, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="Flag for whether immunization was given", formalDefinition="Indicates if the vaccination was or was not given." ) + protected BooleanType wasNotGiven; + + /** + * True if this administration was reported rather than directly administered. + */ + @Child(name = "reported", type = {BooleanType.class}, order=6, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates a self-reported record", formalDefinition="True if this administration was reported rather than directly administered." ) + protected BooleanType reported; + + /** + * Clinician who administered the vaccine. + */ + @Child(name = "performer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who administered vaccine", formalDefinition="Clinician who administered the vaccine." ) + protected Reference performer; + + /** + * The actual object that is the target of the reference (Clinician who administered the vaccine.) + */ + protected Practitioner performerTarget; + + /** + * Clinician who ordered the vaccination. + */ + @Child(name = "requester", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who ordered vaccination", formalDefinition="Clinician who ordered the vaccination." ) + protected Reference requester; + + /** + * The actual object that is the target of the reference (Clinician who ordered the vaccination.) + */ + protected Practitioner requesterTarget; + + /** + * The visit or admission or other contact between patient and health care provider the immunization was performed as part of. + */ + @Child(name = "encounter", type = {Encounter.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.) + */ + protected Encounter encounterTarget; + + /** + * Name of vaccine manufacturer. + */ + @Child(name = "manufacturer", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." ) + protected Reference manufacturer; + + /** + * The actual object that is the target of the reference (Name of vaccine manufacturer.) + */ + protected Organization manufacturerTarget; + + /** + * The service delivery location where the vaccine administration occurred. + */ + @Child(name = "location", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Where vaccination occurred", formalDefinition="The service delivery location where the vaccine administration occurred." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The service delivery location where the vaccine administration occurred.) + */ + protected Location locationTarget; + + /** + * Lot number of the vaccine product. + */ + @Child(name = "lotNumber", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the vaccine product." ) + protected StringType lotNumber; + + /** + * Date vaccine batch expires. + */ + @Child(name = "expirationDate", type = {DateType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." ) + protected DateType expirationDate; + + /** + * Body site where vaccine was administered. + */ + @Child(name = "site", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Body site vaccine was administered", formalDefinition="Body site where vaccine was administered." ) + protected CodeableConcept site; + + /** + * The path by which the vaccine product is taken into the body. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." ) + protected CodeableConcept route; + + /** + * The quantity of vaccine product that was administered. + */ + @Child(name = "doseQuantity", type = {SimpleQuantity.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." ) + protected SimpleQuantity doseQuantity; + + /** + * Extra information about the immunization that is not conveyed by the other attributes. + */ + @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Vaccination notes", formalDefinition="Extra information about the immunization that is not conveyed by the other attributes." ) + protected List note; + + /** + * Reasons why a vaccine was or was not administered. + */ + @Child(name = "explanation", type = {}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Administration/non-administration reasons", formalDefinition="Reasons why a vaccine was or was not administered." ) + protected ImmunizationExplanationComponent explanation; + + /** + * Categorical data indicating that an adverse event is associated in time to an immunization. + */ + @Child(name = "reaction", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Details of a reaction that follows immunization", formalDefinition="Categorical data indicating that an adverse event is associated in time to an immunization." ) + protected List reaction; + + /** + * Contains information about the protocol(s) under which the vaccine was administered. + */ + @Child(name = "vaccinationProtocol", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What protocol was followed", formalDefinition="Contains information about the protocol(s) under which the vaccine was administered." ) + protected List vaccinationProtocol; + + private static final long serialVersionUID = 898786200L; + + /* + * Constructor + */ + public Immunization() { + super(); + } + + /* + * Constructor + */ + public Immunization(CodeType status, CodeableConcept vaccineCode, Reference patient, BooleanType wasNotGiven, BooleanType reported) { + super(); + this.status = status; + this.vaccineCode = vaccineCode; + this.patient = patient; + this.wasNotGiven = wasNotGiven; + this.reported = reported; + } + + /** + * @return {@link #identifier} (A unique identifier assigned to this immunization record.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A unique identifier assigned to this immunization record.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Immunization addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (Indicates the current status of the vaccination event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public CodeType getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.status"); + else if (Configuration.doAutoCreate()) + this.status = new CodeType(); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates the current status of the vaccination event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Immunization setStatusElement(CodeType value) { + this.status = value; + return this; + } + + /** + * @return Indicates the current status of the vaccination event. + */ + public String getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates the current status of the vaccination event. + */ + public Immunization setStatus(String value) { + if (this.status == null) + this.status = new CodeType(); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #date} (Date vaccine administered or was to be administered.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Date vaccine administered or was to be administered.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Immunization setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Date vaccine administered or was to be administered. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Date vaccine administered or was to be administered. + */ + public Immunization setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #vaccineCode} (Vaccine that was administered or was to be administered.) + */ + public CodeableConcept getVaccineCode() { + if (this.vaccineCode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.vaccineCode"); + else if (Configuration.doAutoCreate()) + this.vaccineCode = new CodeableConcept(); // cc + return this.vaccineCode; + } + + public boolean hasVaccineCode() { + return this.vaccineCode != null && !this.vaccineCode.isEmpty(); + } + + /** + * @param value {@link #vaccineCode} (Vaccine that was administered or was to be administered.) + */ + public Immunization setVaccineCode(CodeableConcept value) { + this.vaccineCode = value; + return this; + } + + /** + * @return {@link #patient} (The patient who either received or did not receive the immunization.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient who either received or did not receive the immunization.) + */ + public Immunization setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who either received or did not receive the immunization.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who either received or did not receive the immunization.) + */ + public Immunization setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #wasNotGiven} (Indicates if the vaccination was or was not given.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value + */ + public BooleanType getWasNotGivenElement() { + if (this.wasNotGiven == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.wasNotGiven"); + else if (Configuration.doAutoCreate()) + this.wasNotGiven = new BooleanType(); // bb + return this.wasNotGiven; + } + + public boolean hasWasNotGivenElement() { + return this.wasNotGiven != null && !this.wasNotGiven.isEmpty(); + } + + public boolean hasWasNotGiven() { + return this.wasNotGiven != null && !this.wasNotGiven.isEmpty(); + } + + /** + * @param value {@link #wasNotGiven} (Indicates if the vaccination was or was not given.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value + */ + public Immunization setWasNotGivenElement(BooleanType value) { + this.wasNotGiven = value; + return this; + } + + /** + * @return Indicates if the vaccination was or was not given. + */ + public boolean getWasNotGiven() { + return this.wasNotGiven == null || this.wasNotGiven.isEmpty() ? false : this.wasNotGiven.getValue(); + } + + /** + * @param value Indicates if the vaccination was or was not given. + */ + public Immunization setWasNotGiven(boolean value) { + if (this.wasNotGiven == null) + this.wasNotGiven = new BooleanType(); + this.wasNotGiven.setValue(value); + return this; + } + + /** + * @return {@link #reported} (True if this administration was reported rather than directly administered.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value + */ + public BooleanType getReportedElement() { + if (this.reported == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.reported"); + else if (Configuration.doAutoCreate()) + this.reported = new BooleanType(); // bb + return this.reported; + } + + public boolean hasReportedElement() { + return this.reported != null && !this.reported.isEmpty(); + } + + public boolean hasReported() { + return this.reported != null && !this.reported.isEmpty(); + } + + /** + * @param value {@link #reported} (True if this administration was reported rather than directly administered.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value + */ + public Immunization setReportedElement(BooleanType value) { + this.reported = value; + return this; + } + + /** + * @return True if this administration was reported rather than directly administered. + */ + public boolean getReported() { + return this.reported == null || this.reported.isEmpty() ? false : this.reported.getValue(); + } + + /** + * @param value True if this administration was reported rather than directly administered. + */ + public Immunization setReported(boolean value) { + if (this.reported == null) + this.reported = new BooleanType(); + this.reported.setValue(value); + return this; + } + + /** + * @return {@link #performer} (Clinician who administered the vaccine.) + */ + public Reference getPerformer() { + if (this.performer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.performer"); + else if (Configuration.doAutoCreate()) + this.performer = new Reference(); // cc + return this.performer; + } + + public boolean hasPerformer() { + return this.performer != null && !this.performer.isEmpty(); + } + + /** + * @param value {@link #performer} (Clinician who administered the vaccine.) + */ + public Immunization setPerformer(Reference value) { + this.performer = value; + return this; + } + + /** + * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Clinician who administered the vaccine.) + */ + public Practitioner getPerformerTarget() { + if (this.performerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.performer"); + else if (Configuration.doAutoCreate()) + this.performerTarget = new Practitioner(); // aa + return this.performerTarget; + } + + /** + * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Clinician who administered the vaccine.) + */ + public Immunization setPerformerTarget(Practitioner value) { + this.performerTarget = value; + return this; + } + + /** + * @return {@link #requester} (Clinician who ordered the vaccination.) + */ + public Reference getRequester() { + if (this.requester == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.requester"); + else if (Configuration.doAutoCreate()) + this.requester = new Reference(); // cc + return this.requester; + } + + public boolean hasRequester() { + return this.requester != null && !this.requester.isEmpty(); + } + + /** + * @param value {@link #requester} (Clinician who ordered the vaccination.) + */ + public Immunization setRequester(Reference value) { + this.requester = value; + return this; + } + + /** + * @return {@link #requester} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Clinician who ordered the vaccination.) + */ + public Practitioner getRequesterTarget() { + if (this.requesterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.requester"); + else if (Configuration.doAutoCreate()) + this.requesterTarget = new Practitioner(); // aa + return this.requesterTarget; + } + + /** + * @param value {@link #requester} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Clinician who ordered the vaccination.) + */ + public Immunization setRequesterTarget(Practitioner value) { + this.requesterTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.) + */ + public Immunization setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.) + */ + public Immunization setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #manufacturer} (Name of vaccine manufacturer.) + */ + public Reference getManufacturer() { + if (this.manufacturer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.manufacturer"); + else if (Configuration.doAutoCreate()) + this.manufacturer = new Reference(); // cc + return this.manufacturer; + } + + public boolean hasManufacturer() { + return this.manufacturer != null && !this.manufacturer.isEmpty(); + } + + /** + * @param value {@link #manufacturer} (Name of vaccine manufacturer.) + */ + public Immunization setManufacturer(Reference value) { + this.manufacturer = value; + return this; + } + + /** + * @return {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Name of vaccine manufacturer.) + */ + public Organization getManufacturerTarget() { + if (this.manufacturerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.manufacturer"); + else if (Configuration.doAutoCreate()) + this.manufacturerTarget = new Organization(); // aa + return this.manufacturerTarget; + } + + /** + * @param value {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Name of vaccine manufacturer.) + */ + public Immunization setManufacturerTarget(Organization value) { + this.manufacturerTarget = value; + return this; + } + + /** + * @return {@link #location} (The service delivery location where the vaccine administration occurred.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The service delivery location where the vaccine administration occurred.) + */ + public Immunization setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The service delivery location where the vaccine administration occurred.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The service delivery location where the vaccine administration occurred.) + */ + public Immunization setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #lotNumber} (Lot number of the vaccine product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public StringType getLotNumberElement() { + if (this.lotNumber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.lotNumber"); + else if (Configuration.doAutoCreate()) + this.lotNumber = new StringType(); // bb + return this.lotNumber; + } + + public boolean hasLotNumberElement() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + public boolean hasLotNumber() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + /** + * @param value {@link #lotNumber} (Lot number of the vaccine product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public Immunization setLotNumberElement(StringType value) { + this.lotNumber = value; + return this; + } + + /** + * @return Lot number of the vaccine product. + */ + public String getLotNumber() { + return this.lotNumber == null ? null : this.lotNumber.getValue(); + } + + /** + * @param value Lot number of the vaccine product. + */ + public Immunization setLotNumber(String value) { + if (Utilities.noString(value)) + this.lotNumber = null; + else { + if (this.lotNumber == null) + this.lotNumber = new StringType(); + this.lotNumber.setValue(value); + } + return this; + } + + /** + * @return {@link #expirationDate} (Date vaccine batch expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public DateType getExpirationDateElement() { + if (this.expirationDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.expirationDate"); + else if (Configuration.doAutoCreate()) + this.expirationDate = new DateType(); // bb + return this.expirationDate; + } + + public boolean hasExpirationDateElement() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + public boolean hasExpirationDate() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + /** + * @param value {@link #expirationDate} (Date vaccine batch expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public Immunization setExpirationDateElement(DateType value) { + this.expirationDate = value; + return this; + } + + /** + * @return Date vaccine batch expires. + */ + public Date getExpirationDate() { + return this.expirationDate == null ? null : this.expirationDate.getValue(); + } + + /** + * @param value Date vaccine batch expires. + */ + public Immunization setExpirationDate(Date value) { + if (value == null) + this.expirationDate = null; + else { + if (this.expirationDate == null) + this.expirationDate = new DateType(); + this.expirationDate.setValue(value); + } + return this; + } + + /** + * @return {@link #site} (Body site where vaccine was administered.) + */ + public CodeableConcept getSite() { + if (this.site == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.site"); + else if (Configuration.doAutoCreate()) + this.site = new CodeableConcept(); // cc + return this.site; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (Body site where vaccine was administered.) + */ + public Immunization setSite(CodeableConcept value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (The path by which the vaccine product is taken into the body.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (The path by which the vaccine product is taken into the body.) + */ + public Immunization setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #doseQuantity} (The quantity of vaccine product that was administered.) + */ + public SimpleQuantity getDoseQuantity() { + if (this.doseQuantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.doseQuantity"); + else if (Configuration.doAutoCreate()) + this.doseQuantity = new SimpleQuantity(); // cc + return this.doseQuantity; + } + + public boolean hasDoseQuantity() { + return this.doseQuantity != null && !this.doseQuantity.isEmpty(); + } + + /** + * @param value {@link #doseQuantity} (The quantity of vaccine product that was administered.) + */ + public Immunization setDoseQuantity(SimpleQuantity value) { + this.doseQuantity = value; + return this; + } + + /** + * @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.) + */ + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public Immunization addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return {@link #explanation} (Reasons why a vaccine was or was not administered.) + */ + public ImmunizationExplanationComponent getExplanation() { + if (this.explanation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Immunization.explanation"); + else if (Configuration.doAutoCreate()) + this.explanation = new ImmunizationExplanationComponent(); // cc + return this.explanation; + } + + public boolean hasExplanation() { + return this.explanation != null && !this.explanation.isEmpty(); + } + + /** + * @param value {@link #explanation} (Reasons why a vaccine was or was not administered.) + */ + public Immunization setExplanation(ImmunizationExplanationComponent value) { + this.explanation = value; + return this; + } + + /** + * @return {@link #reaction} (Categorical data indicating that an adverse event is associated in time to an immunization.) + */ + public List getReaction() { + if (this.reaction == null) + this.reaction = new ArrayList(); + return this.reaction; + } + + public boolean hasReaction() { + if (this.reaction == null) + return false; + for (ImmunizationReactionComponent item : this.reaction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reaction} (Categorical data indicating that an adverse event is associated in time to an immunization.) + */ + // syntactic sugar + public ImmunizationReactionComponent addReaction() { //3 + ImmunizationReactionComponent t = new ImmunizationReactionComponent(); + if (this.reaction == null) + this.reaction = new ArrayList(); + this.reaction.add(t); + return t; + } + + // syntactic sugar + public Immunization addReaction(ImmunizationReactionComponent t) { //3 + if (t == null) + return this; + if (this.reaction == null) + this.reaction = new ArrayList(); + this.reaction.add(t); + return this; + } + + /** + * @return {@link #vaccinationProtocol} (Contains information about the protocol(s) under which the vaccine was administered.) + */ + public List getVaccinationProtocol() { + if (this.vaccinationProtocol == null) + this.vaccinationProtocol = new ArrayList(); + return this.vaccinationProtocol; + } + + public boolean hasVaccinationProtocol() { + if (this.vaccinationProtocol == null) + return false; + for (ImmunizationVaccinationProtocolComponent item : this.vaccinationProtocol) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #vaccinationProtocol} (Contains information about the protocol(s) under which the vaccine was administered.) + */ + // syntactic sugar + public ImmunizationVaccinationProtocolComponent addVaccinationProtocol() { //3 + ImmunizationVaccinationProtocolComponent t = new ImmunizationVaccinationProtocolComponent(); + if (this.vaccinationProtocol == null) + this.vaccinationProtocol = new ArrayList(); + this.vaccinationProtocol.add(t); + return t; + } + + // syntactic sugar + public Immunization addVaccinationProtocol(ImmunizationVaccinationProtocolComponent t) { //3 + if (t == null) + return this; + if (this.vaccinationProtocol == null) + this.vaccinationProtocol = new ArrayList(); + this.vaccinationProtocol.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "Indicates the current status of the vaccination event.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("date", "dateTime", "Date vaccine administered or was to be administered.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, java.lang.Integer.MAX_VALUE, vaccineCode)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("wasNotGiven", "boolean", "Indicates if the vaccination was or was not given.", 0, java.lang.Integer.MAX_VALUE, wasNotGiven)); + childrenList.add(new Property("reported", "boolean", "True if this administration was reported rather than directly administered.", 0, java.lang.Integer.MAX_VALUE, reported)); + childrenList.add(new Property("performer", "Reference(Practitioner)", "Clinician who administered the vaccine.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("requester", "Reference(Practitioner)", "Clinician who ordered the vaccination.", 0, java.lang.Integer.MAX_VALUE, requester)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); + childrenList.add(new Property("location", "Reference(Location)", "The service delivery location where the vaccine administration occurred.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("lotNumber", "string", "Lot number of the vaccine product.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); + childrenList.add(new Property("expirationDate", "date", "Date vaccine batch expires.", 0, java.lang.Integer.MAX_VALUE, expirationDate)); + childrenList.add(new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, java.lang.Integer.MAX_VALUE, route)); + childrenList.add(new Property("doseQuantity", "SimpleQuantity", "The quantity of vaccine product that was administered.", 0, java.lang.Integer.MAX_VALUE, doseQuantity)); + childrenList.add(new Property("note", "Annotation", "Extra information about the immunization that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("explanation", "", "Reasons why a vaccine was or was not administered.", 0, java.lang.Integer.MAX_VALUE, explanation)); + childrenList.add(new Property("reaction", "", "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, java.lang.Integer.MAX_VALUE, reaction)); + childrenList.add(new Property("vaccinationProtocol", "", "Contains information about the protocol(s) under which the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, vaccinationProtocol)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = castToCode(value); // CodeType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("vaccineCode")) + this.vaccineCode = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("wasNotGiven")) + this.wasNotGiven = castToBoolean(value); // BooleanType + else if (name.equals("reported")) + this.reported = castToBoolean(value); // BooleanType + else if (name.equals("performer")) + this.performer = castToReference(value); // Reference + else if (name.equals("requester")) + this.requester = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("manufacturer")) + this.manufacturer = castToReference(value); // Reference + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("lotNumber")) + this.lotNumber = castToString(value); // StringType + else if (name.equals("expirationDate")) + this.expirationDate = castToDate(value); // DateType + else if (name.equals("site")) + this.site = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("route")) + this.route = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("doseQuantity")) + this.doseQuantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("note")) + this.getNote().add(castToAnnotation(value)); + else if (name.equals("explanation")) + this.explanation = (ImmunizationExplanationComponent) value; // ImmunizationExplanationComponent + else if (name.equals("reaction")) + this.getReaction().add((ImmunizationReactionComponent) value); + else if (name.equals("vaccinationProtocol")) + this.getVaccinationProtocol().add((ImmunizationVaccinationProtocolComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.status"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.date"); + } + else if (name.equals("vaccineCode")) { + this.vaccineCode = new CodeableConcept(); + return this.vaccineCode; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("wasNotGiven")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.wasNotGiven"); + } + else if (name.equals("reported")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.reported"); + } + else if (name.equals("performer")) { + this.performer = new Reference(); + return this.performer; + } + else if (name.equals("requester")) { + this.requester = new Reference(); + return this.requester; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("manufacturer")) { + this.manufacturer = new Reference(); + return this.manufacturer; + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("lotNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.lotNumber"); + } + else if (name.equals("expirationDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Immunization.expirationDate"); + } + else if (name.equals("site")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("doseQuantity")) { + this.doseQuantity = new SimpleQuantity(); + return this.doseQuantity; + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("explanation")) { + this.explanation = new ImmunizationExplanationComponent(); + return this.explanation; + } + else if (name.equals("reaction")) { + return addReaction(); + } + else if (name.equals("vaccinationProtocol")) { + return addVaccinationProtocol(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Immunization"; + + } + + public Immunization copy() { + Immunization dst = new Immunization(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.date = date == null ? null : date.copy(); + dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.wasNotGiven = wasNotGiven == null ? null : wasNotGiven.copy(); + dst.reported = reported == null ? null : reported.copy(); + dst.performer = performer == null ? null : performer.copy(); + dst.requester = requester == null ? null : requester.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); + dst.location = location == null ? null : location.copy(); + dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); + dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.doseQuantity = doseQuantity == null ? null : doseQuantity.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + dst.explanation = explanation == null ? null : explanation.copy(); + if (reaction != null) { + dst.reaction = new ArrayList(); + for (ImmunizationReactionComponent i : reaction) + dst.reaction.add(i.copy()); + }; + if (vaccinationProtocol != null) { + dst.vaccinationProtocol = new ArrayList(); + for (ImmunizationVaccinationProtocolComponent i : vaccinationProtocol) + dst.vaccinationProtocol.add(i.copy()); + }; + return dst; + } + + protected Immunization typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Immunization)) + return false; + Immunization o = (Immunization) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(date, o.date, true) + && compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(patient, o.patient, true) && compareDeep(wasNotGiven, o.wasNotGiven, true) + && compareDeep(reported, o.reported, true) && compareDeep(performer, o.performer, true) && compareDeep(requester, o.requester, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(manufacturer, o.manufacturer, true) + && compareDeep(location, o.location, true) && compareDeep(lotNumber, o.lotNumber, true) && compareDeep(expirationDate, o.expirationDate, true) + && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) && compareDeep(doseQuantity, o.doseQuantity, true) + && compareDeep(note, o.note, true) && compareDeep(explanation, o.explanation, true) && compareDeep(reaction, o.reaction, true) + && compareDeep(vaccinationProtocol, o.vaccinationProtocol, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Immunization)) + return false; + Immunization o = (Immunization) other; + return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(wasNotGiven, o.wasNotGiven, true) + && compareValues(reported, o.reported, true) && compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) && (patient == null || patient.isEmpty()) + && (wasNotGiven == null || wasNotGiven.isEmpty()) && (reported == null || reported.isEmpty()) + && (performer == null || performer.isEmpty()) && (requester == null || requester.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (manufacturer == null || manufacturer.isEmpty()) + && (location == null || location.isEmpty()) && (lotNumber == null || lotNumber.isEmpty()) + && (expirationDate == null || expirationDate.isEmpty()) && (site == null || site.isEmpty()) + && (route == null || route.isEmpty()) && (doseQuantity == null || doseQuantity.isEmpty()) + && (note == null || note.isEmpty()) && (explanation == null || explanation.isEmpty()) && (reaction == null || reaction.isEmpty()) + && (vaccinationProtocol == null || vaccinationProtocol.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Immunization; + } + + @SearchParamDefinition(name="date", path="Immunization.date", description="Vaccination (non)-Administration Date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference" ) + public static final String SP_REQUESTER = "requester"; + @SearchParamDefinition(name="identifier", path="Immunization.identifier", description="Business identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="reason", path="Immunization.explanation.reason", description="Why immunization occurred", type="token" ) + public static final String SP_REASON = "reason"; + @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="reaction", path="Immunization.reaction.detail", description="Additional information on reaction", type="reference" ) + public static final String SP_REACTION = "reaction"; + @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" ) + public static final String SP_LOTNUMBER = "lot-number"; + @SearchParamDefinition(name="notgiven", path="Immunization.wasNotGiven", description="Administrations which were not given", type="token" ) + public static final String SP_NOTGIVEN = "notgiven"; + @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference" ) + public static final String SP_MANUFACTURER = "manufacturer"; + @SearchParamDefinition(name="dose-sequence", path="Immunization.vaccinationProtocol.doseSequence", description="Dose number within series", type="number" ) + public static final String SP_DOSESEQUENCE = "dose-sequence"; + @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="vaccine-code", path="Immunization.vaccineCode", description="Vaccine Product Administered", type="token" ) + public static final String SP_VACCINECODE = "vaccine-code"; + @SearchParamDefinition(name="reason-not-given", path="Immunization.explanation.reasonNotGiven", description="Explanation of reason vaccination was not administered", type="token" ) + public static final String SP_REASONNOTGIVEN = "reason-not-given"; + @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When reaction started", type="date" ) + public static final String SP_REACTIONDATE = "reaction-date"; + @SearchParamDefinition(name="status", path="Immunization.status", description="Immunization event status", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImmunizationRecommendation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImmunizationRecommendation.java new file mode 100644 index 00000000000..44b7720507c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImmunizationRecommendation.java @@ -0,0 +1,1347 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ +@ResourceDef(name="ImmunizationRecommendation", profile="http://hl7.org/fhir/Profile/ImmunizationRecommendation") +public class ImmunizationRecommendation extends DomainResource { + + @Block() + public static class ImmunizationRecommendationRecommendationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The date the immunization recommendation was created. + */ + @Child(name = "date", type = {DateTimeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date recommendation created", formalDefinition="The date the immunization recommendation was created." ) + protected DateTimeType date; + + /** + * Vaccine that pertains to the recommendation. + */ + @Child(name = "vaccineCode", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Vaccine recommendation applies to", formalDefinition="Vaccine that pertains to the recommendation." ) + protected CodeableConcept vaccineCode; + + /** + * This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose). + */ + @Child(name = "doseNumber", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Recommended dose number", formalDefinition="This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose)." ) + protected PositiveIntType doseNumber; + + /** + * Vaccine administration status. + */ + @Child(name = "forecastStatus", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Vaccine administration status", formalDefinition="Vaccine administration status." ) + protected CodeableConcept forecastStatus; + + /** + * Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc. + */ + @Child(name = "dateCriterion", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Dates governing proposed immunization", formalDefinition="Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc." ) + protected List dateCriterion; + + /** + * Contains information about the protocol under which the vaccine was administered. + */ + @Child(name = "protocol", type = {}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Protocol used by recommendation", formalDefinition="Contains information about the protocol under which the vaccine was administered." ) + protected ImmunizationRecommendationRecommendationProtocolComponent protocol; + + /** + * Immunization event history that supports the status and recommendation. + */ + @Child(name = "supportingImmunization", type = {Immunization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Past immunizations supporting recommendation", formalDefinition="Immunization event history that supports the status and recommendation." ) + protected List supportingImmunization; + /** + * The actual objects that are the target of the reference (Immunization event history that supports the status and recommendation.) + */ + protected List supportingImmunizationTarget; + + + /** + * Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information. + */ + @Child(name = "supportingPatientInformation", type = {Observation.class, AllergyIntolerance.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Patient observations supporting recommendation", formalDefinition="Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information." ) + protected List supportingPatientInformation; + /** + * The actual objects that are the target of the reference (Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) + */ + protected List supportingPatientInformationTarget; + + + private static final long serialVersionUID = 1501347482L; + + /* + * Constructor + */ + public ImmunizationRecommendationRecommendationComponent() { + super(); + } + + /* + * Constructor + */ + public ImmunizationRecommendationRecommendationComponent(DateTimeType date, CodeableConcept vaccineCode, CodeableConcept forecastStatus) { + super(); + this.date = date; + this.vaccineCode = vaccineCode; + this.forecastStatus = forecastStatus; + } + + /** + * @return {@link #date} (The date the immunization recommendation was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date the immunization recommendation was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date the immunization recommendation was created. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date the immunization recommendation was created. + */ + public ImmunizationRecommendationRecommendationComponent setDate(Date value) { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + return this; + } + + /** + * @return {@link #vaccineCode} (Vaccine that pertains to the recommendation.) + */ + public CodeableConcept getVaccineCode() { + if (this.vaccineCode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.vaccineCode"); + else if (Configuration.doAutoCreate()) + this.vaccineCode = new CodeableConcept(); // cc + return this.vaccineCode; + } + + public boolean hasVaccineCode() { + return this.vaccineCode != null && !this.vaccineCode.isEmpty(); + } + + /** + * @param value {@link #vaccineCode} (Vaccine that pertains to the recommendation.) + */ + public ImmunizationRecommendationRecommendationComponent setVaccineCode(CodeableConcept value) { + this.vaccineCode = value; + return this; + } + + /** + * @return {@link #doseNumber} (This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value + */ + public PositiveIntType getDoseNumberElement() { + if (this.doseNumber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.doseNumber"); + else if (Configuration.doAutoCreate()) + this.doseNumber = new PositiveIntType(); // bb + return this.doseNumber; + } + + public boolean hasDoseNumberElement() { + return this.doseNumber != null && !this.doseNumber.isEmpty(); + } + + public boolean hasDoseNumber() { + return this.doseNumber != null && !this.doseNumber.isEmpty(); + } + + /** + * @param value {@link #doseNumber} (This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationComponent setDoseNumberElement(PositiveIntType value) { + this.doseNumber = value; + return this; + } + + /** + * @return This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose). + */ + public int getDoseNumber() { + return this.doseNumber == null || this.doseNumber.isEmpty() ? 0 : this.doseNumber.getValue(); + } + + /** + * @param value This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose). + */ + public ImmunizationRecommendationRecommendationComponent setDoseNumber(int value) { + if (this.doseNumber == null) + this.doseNumber = new PositiveIntType(); + this.doseNumber.setValue(value); + return this; + } + + /** + * @return {@link #forecastStatus} (Vaccine administration status.) + */ + public CodeableConcept getForecastStatus() { + if (this.forecastStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.forecastStatus"); + else if (Configuration.doAutoCreate()) + this.forecastStatus = new CodeableConcept(); // cc + return this.forecastStatus; + } + + public boolean hasForecastStatus() { + return this.forecastStatus != null && !this.forecastStatus.isEmpty(); + } + + /** + * @param value {@link #forecastStatus} (Vaccine administration status.) + */ + public ImmunizationRecommendationRecommendationComponent setForecastStatus(CodeableConcept value) { + this.forecastStatus = value; + return this; + } + + /** + * @return {@link #dateCriterion} (Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.) + */ + public List getDateCriterion() { + if (this.dateCriterion == null) + this.dateCriterion = new ArrayList(); + return this.dateCriterion; + } + + public boolean hasDateCriterion() { + if (this.dateCriterion == null) + return false; + for (ImmunizationRecommendationRecommendationDateCriterionComponent item : this.dateCriterion) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dateCriterion} (Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.) + */ + // syntactic sugar + public ImmunizationRecommendationRecommendationDateCriterionComponent addDateCriterion() { //3 + ImmunizationRecommendationRecommendationDateCriterionComponent t = new ImmunizationRecommendationRecommendationDateCriterionComponent(); + if (this.dateCriterion == null) + this.dateCriterion = new ArrayList(); + this.dateCriterion.add(t); + return t; + } + + // syntactic sugar + public ImmunizationRecommendationRecommendationComponent addDateCriterion(ImmunizationRecommendationRecommendationDateCriterionComponent t) { //3 + if (t == null) + return this; + if (this.dateCriterion == null) + this.dateCriterion = new ArrayList(); + this.dateCriterion.add(t); + return this; + } + + /** + * @return {@link #protocol} (Contains information about the protocol under which the vaccine was administered.) + */ + public ImmunizationRecommendationRecommendationProtocolComponent getProtocol() { + if (this.protocol == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.protocol"); + else if (Configuration.doAutoCreate()) + this.protocol = new ImmunizationRecommendationRecommendationProtocolComponent(); // cc + return this.protocol; + } + + public boolean hasProtocol() { + return this.protocol != null && !this.protocol.isEmpty(); + } + + /** + * @param value {@link #protocol} (Contains information about the protocol under which the vaccine was administered.) + */ + public ImmunizationRecommendationRecommendationComponent setProtocol(ImmunizationRecommendationRecommendationProtocolComponent value) { + this.protocol = value; + return this; + } + + /** + * @return {@link #supportingImmunization} (Immunization event history that supports the status and recommendation.) + */ + public List getSupportingImmunization() { + if (this.supportingImmunization == null) + this.supportingImmunization = new ArrayList(); + return this.supportingImmunization; + } + + public boolean hasSupportingImmunization() { + if (this.supportingImmunization == null) + return false; + for (Reference item : this.supportingImmunization) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingImmunization} (Immunization event history that supports the status and recommendation.) + */ + // syntactic sugar + public Reference addSupportingImmunization() { //3 + Reference t = new Reference(); + if (this.supportingImmunization == null) + this.supportingImmunization = new ArrayList(); + this.supportingImmunization.add(t); + return t; + } + + // syntactic sugar + public ImmunizationRecommendationRecommendationComponent addSupportingImmunization(Reference t) { //3 + if (t == null) + return this; + if (this.supportingImmunization == null) + this.supportingImmunization = new ArrayList(); + this.supportingImmunization.add(t); + return this; + } + + /** + * @return {@link #supportingImmunization} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Immunization event history that supports the status and recommendation.) + */ + public List getSupportingImmunizationTarget() { + if (this.supportingImmunizationTarget == null) + this.supportingImmunizationTarget = new ArrayList(); + return this.supportingImmunizationTarget; + } + + // syntactic sugar + /** + * @return {@link #supportingImmunization} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Immunization event history that supports the status and recommendation.) + */ + public Immunization addSupportingImmunizationTarget() { + Immunization r = new Immunization(); + if (this.supportingImmunizationTarget == null) + this.supportingImmunizationTarget = new ArrayList(); + this.supportingImmunizationTarget.add(r); + return r; + } + + /** + * @return {@link #supportingPatientInformation} (Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) + */ + public List getSupportingPatientInformation() { + if (this.supportingPatientInformation == null) + this.supportingPatientInformation = new ArrayList(); + return this.supportingPatientInformation; + } + + public boolean hasSupportingPatientInformation() { + if (this.supportingPatientInformation == null) + return false; + for (Reference item : this.supportingPatientInformation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingPatientInformation} (Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) + */ + // syntactic sugar + public Reference addSupportingPatientInformation() { //3 + Reference t = new Reference(); + if (this.supportingPatientInformation == null) + this.supportingPatientInformation = new ArrayList(); + this.supportingPatientInformation.add(t); + return t; + } + + // syntactic sugar + public ImmunizationRecommendationRecommendationComponent addSupportingPatientInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingPatientInformation == null) + this.supportingPatientInformation = new ArrayList(); + this.supportingPatientInformation.add(t); + return this; + } + + /** + * @return {@link #supportingPatientInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) + */ + public List getSupportingPatientInformationTarget() { + if (this.supportingPatientInformationTarget == null) + this.supportingPatientInformationTarget = new ArrayList(); + return this.supportingPatientInformationTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("date", "dateTime", "The date the immunization recommendation was created.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that pertains to the recommendation.", 0, java.lang.Integer.MAX_VALUE, vaccineCode)); + childrenList.add(new Property("doseNumber", "positiveInt", "This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).", 0, java.lang.Integer.MAX_VALUE, doseNumber)); + childrenList.add(new Property("forecastStatus", "CodeableConcept", "Vaccine administration status.", 0, java.lang.Integer.MAX_VALUE, forecastStatus)); + childrenList.add(new Property("dateCriterion", "", "Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.", 0, java.lang.Integer.MAX_VALUE, dateCriterion)); + childrenList.add(new Property("protocol", "", "Contains information about the protocol under which the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, protocol)); + childrenList.add(new Property("supportingImmunization", "Reference(Immunization)", "Immunization event history that supports the status and recommendation.", 0, java.lang.Integer.MAX_VALUE, supportingImmunization)); + childrenList.add(new Property("supportingPatientInformation", "Reference(Observation|AllergyIntolerance)", "Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.", 0, java.lang.Integer.MAX_VALUE, supportingPatientInformation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("vaccineCode")) + this.vaccineCode = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("doseNumber")) + this.doseNumber = castToPositiveInt(value); // PositiveIntType + else if (name.equals("forecastStatus")) + this.forecastStatus = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dateCriterion")) + this.getDateCriterion().add((ImmunizationRecommendationRecommendationDateCriterionComponent) value); + else if (name.equals("protocol")) + this.protocol = (ImmunizationRecommendationRecommendationProtocolComponent) value; // ImmunizationRecommendationRecommendationProtocolComponent + else if (name.equals("supportingImmunization")) + this.getSupportingImmunization().add(castToReference(value)); + else if (name.equals("supportingPatientInformation")) + this.getSupportingPatientInformation().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.date"); + } + else if (name.equals("vaccineCode")) { + this.vaccineCode = new CodeableConcept(); + return this.vaccineCode; + } + else if (name.equals("doseNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.doseNumber"); + } + else if (name.equals("forecastStatus")) { + this.forecastStatus = new CodeableConcept(); + return this.forecastStatus; + } + else if (name.equals("dateCriterion")) { + return addDateCriterion(); + } + else if (name.equals("protocol")) { + this.protocol = new ImmunizationRecommendationRecommendationProtocolComponent(); + return this.protocol; + } + else if (name.equals("supportingImmunization")) { + return addSupportingImmunization(); + } + else if (name.equals("supportingPatientInformation")) { + return addSupportingPatientInformation(); + } + else + return super.addChild(name); + } + + public ImmunizationRecommendationRecommendationComponent copy() { + ImmunizationRecommendationRecommendationComponent dst = new ImmunizationRecommendationRecommendationComponent(); + copyValues(dst); + dst.date = date == null ? null : date.copy(); + dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy(); + dst.doseNumber = doseNumber == null ? null : doseNumber.copy(); + dst.forecastStatus = forecastStatus == null ? null : forecastStatus.copy(); + if (dateCriterion != null) { + dst.dateCriterion = new ArrayList(); + for (ImmunizationRecommendationRecommendationDateCriterionComponent i : dateCriterion) + dst.dateCriterion.add(i.copy()); + }; + dst.protocol = protocol == null ? null : protocol.copy(); + if (supportingImmunization != null) { + dst.supportingImmunization = new ArrayList(); + for (Reference i : supportingImmunization) + dst.supportingImmunization.add(i.copy()); + }; + if (supportingPatientInformation != null) { + dst.supportingPatientInformation = new ArrayList(); + for (Reference i : supportingPatientInformation) + dst.supportingPatientInformation.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationComponent)) + return false; + ImmunizationRecommendationRecommendationComponent o = (ImmunizationRecommendationRecommendationComponent) other; + return compareDeep(date, o.date, true) && compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(doseNumber, o.doseNumber, true) + && compareDeep(forecastStatus, o.forecastStatus, true) && compareDeep(dateCriterion, o.dateCriterion, true) + && compareDeep(protocol, o.protocol, true) && compareDeep(supportingImmunization, o.supportingImmunization, true) + && compareDeep(supportingPatientInformation, o.supportingPatientInformation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationComponent)) + return false; + ImmunizationRecommendationRecommendationComponent o = (ImmunizationRecommendationRecommendationComponent) other; + return compareValues(date, o.date, true) && compareValues(doseNumber, o.doseNumber, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) + && (doseNumber == null || doseNumber.isEmpty()) && (forecastStatus == null || forecastStatus.isEmpty()) + && (dateCriterion == null || dateCriterion.isEmpty()) && (protocol == null || protocol.isEmpty()) + && (supportingImmunization == null || supportingImmunization.isEmpty()) && (supportingPatientInformation == null || supportingPatientInformation.isEmpty()) + ; + } + + public String fhirType() { + return "ImmunizationRecommendation.recommendation"; + + } + + } + + @Block() + public static class ImmunizationRecommendationRecommendationDateCriterionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Date classification of recommendation. For example, earliest date to give, latest date to give, etc. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of date", formalDefinition="Date classification of recommendation. For example, earliest date to give, latest date to give, etc." ) + protected CodeableConcept code; + + /** + * The date whose meaning is specified by dateCriterion.code. + */ + @Child(name = "value", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recommended date", formalDefinition="The date whose meaning is specified by dateCriterion.code." ) + protected DateTimeType value; + + private static final long serialVersionUID = 1036994566L; + + /* + * Constructor + */ + public ImmunizationRecommendationRecommendationDateCriterionComponent() { + super(); + } + + /* + * Constructor + */ + public ImmunizationRecommendationRecommendationDateCriterionComponent(CodeableConcept code, DateTimeType value) { + super(); + this.code = code; + this.value = value; + } + + /** + * @return {@link #code} (Date classification of recommendation. For example, earliest date to give, latest date to give, etc.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationDateCriterionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Date classification of recommendation. For example, earliest date to give, latest date to give, etc.) + */ + public ImmunizationRecommendationRecommendationDateCriterionComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #value} (The date whose meaning is specified by dateCriterion.code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DateTimeType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationDateCriterionComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new DateTimeType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The date whose meaning is specified by dateCriterion.code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationDateCriterionComponent setValueElement(DateTimeType value) { + this.value = value; + return this; + } + + /** + * @return The date whose meaning is specified by dateCriterion.code. + */ + public Date getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The date whose meaning is specified by dateCriterion.code. + */ + public ImmunizationRecommendationRecommendationDateCriterionComponent setValue(Date value) { + if (this.value == null) + this.value = new DateTimeType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "Date classification of recommendation. For example, earliest date to give, latest date to give, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("value", "dateTime", "The date whose meaning is specified by dateCriterion.code.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("value")) + this.value = castToDateTime(value); // DateTimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.value"); + } + else + return super.addChild(name); + } + + public ImmunizationRecommendationRecommendationDateCriterionComponent copy() { + ImmunizationRecommendationRecommendationDateCriterionComponent dst = new ImmunizationRecommendationRecommendationDateCriterionComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationDateCriterionComponent)) + return false; + ImmunizationRecommendationRecommendationDateCriterionComponent o = (ImmunizationRecommendationRecommendationDateCriterionComponent) other; + return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationDateCriterionComponent)) + return false; + ImmunizationRecommendationRecommendationDateCriterionComponent o = (ImmunizationRecommendationRecommendationDateCriterionComponent) other; + return compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "ImmunizationRecommendation.recommendation.dateCriterion"; + + } + + } + + @Block() + public static class ImmunizationRecommendationRecommendationProtocolComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. + */ + @Child(name = "doseSequence", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Dose number within sequence", formalDefinition="Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol." ) + protected IntegerType doseSequence; + + /** + * Contains the description about the protocol under which the vaccine was administered. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Protocol details", formalDefinition="Contains the description about the protocol under which the vaccine was administered." ) + protected StringType description; + + /** + * Indicates the authority who published the protocol. For example, ACIP. + */ + @Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who is responsible for protocol", formalDefinition="Indicates the authority who published the protocol. For example, ACIP." ) + protected Reference authority; + + /** + * The actual object that is the target of the reference (Indicates the authority who published the protocol. For example, ACIP.) + */ + protected Organization authorityTarget; + + /** + * One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + @Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of vaccination series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." ) + protected StringType series; + + private static final long serialVersionUID = -512702014L; + + /* + * Constructor + */ + public ImmunizationRecommendationRecommendationProtocolComponent() { + super(); + } + + /** + * @return {@link #doseSequence} (Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value + */ + public IntegerType getDoseSequenceElement() { + if (this.doseSequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.doseSequence"); + else if (Configuration.doAutoCreate()) + this.doseSequence = new IntegerType(); // bb + return this.doseSequence; + } + + public boolean hasDoseSequenceElement() { + return this.doseSequence != null && !this.doseSequence.isEmpty(); + } + + public boolean hasDoseSequence() { + return this.doseSequence != null && !this.doseSequence.isEmpty(); + } + + /** + * @param value {@link #doseSequence} (Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationProtocolComponent setDoseSequenceElement(IntegerType value) { + this.doseSequence = value; + return this; + } + + /** + * @return Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. + */ + public int getDoseSequence() { + return this.doseSequence == null || this.doseSequence.isEmpty() ? 0 : this.doseSequence.getValue(); + } + + /** + * @param value Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. + */ + public ImmunizationRecommendationRecommendationProtocolComponent setDoseSequence(int value) { + if (this.doseSequence == null) + this.doseSequence = new IntegerType(); + this.doseSequence.setValue(value); + return this; + } + + /** + * @return {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationProtocolComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Contains the description about the protocol under which the vaccine was administered. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Contains the description about the protocol under which the vaccine was administered. + */ + public ImmunizationRecommendationRecommendationProtocolComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #authority} (Indicates the authority who published the protocol. For example, ACIP.) + */ + public Reference getAuthority() { + if (this.authority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.authority"); + else if (Configuration.doAutoCreate()) + this.authority = new Reference(); // cc + return this.authority; + } + + public boolean hasAuthority() { + return this.authority != null && !this.authority.isEmpty(); + } + + /** + * @param value {@link #authority} (Indicates the authority who published the protocol. For example, ACIP.) + */ + public ImmunizationRecommendationRecommendationProtocolComponent setAuthority(Reference value) { + this.authority = value; + return this; + } + + /** + * @return {@link #authority} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the authority who published the protocol. For example, ACIP.) + */ + public Organization getAuthorityTarget() { + if (this.authorityTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.authority"); + else if (Configuration.doAutoCreate()) + this.authorityTarget = new Organization(); // aa + return this.authorityTarget; + } + + /** + * @param value {@link #authority} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the authority who published the protocol. For example, ACIP.) + */ + public ImmunizationRecommendationRecommendationProtocolComponent setAuthorityTarget(Organization value) { + this.authorityTarget = value; + return this; + } + + /** + * @return {@link #series} (One possible path to achieve presumed immunity against a disease - within the context of an authority.). This is the underlying object with id, value and extensions. The accessor "getSeries" gives direct access to the value + */ + public StringType getSeriesElement() { + if (this.series == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.series"); + else if (Configuration.doAutoCreate()) + this.series = new StringType(); // bb + return this.series; + } + + public boolean hasSeriesElement() { + return this.series != null && !this.series.isEmpty(); + } + + public boolean hasSeries() { + return this.series != null && !this.series.isEmpty(); + } + + /** + * @param value {@link #series} (One possible path to achieve presumed immunity against a disease - within the context of an authority.). This is the underlying object with id, value and extensions. The accessor "getSeries" gives direct access to the value + */ + public ImmunizationRecommendationRecommendationProtocolComponent setSeriesElement(StringType value) { + this.series = value; + return this; + } + + /** + * @return One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + public String getSeries() { + return this.series == null ? null : this.series.getValue(); + } + + /** + * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority. + */ + public ImmunizationRecommendationRecommendationProtocolComponent setSeries(String value) { + if (Utilities.noString(value)) + this.series = null; + else { + if (this.series == null) + this.series = new StringType(); + this.series.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("doseSequence", "integer", "Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.", 0, java.lang.Integer.MAX_VALUE, doseSequence)); + childrenList.add(new Property("description", "string", "Contains the description about the protocol under which the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol. For example, ACIP.", 0, java.lang.Integer.MAX_VALUE, authority)); + childrenList.add(new Property("series", "string", "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, java.lang.Integer.MAX_VALUE, series)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("doseSequence")) + this.doseSequence = castToInteger(value); // IntegerType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("authority")) + this.authority = castToReference(value); // Reference + else if (name.equals("series")) + this.series = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("doseSequence")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.doseSequence"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.description"); + } + else if (name.equals("authority")) { + this.authority = new Reference(); + return this.authority; + } + else if (name.equals("series")) { + throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.series"); + } + else + return super.addChild(name); + } + + public ImmunizationRecommendationRecommendationProtocolComponent copy() { + ImmunizationRecommendationRecommendationProtocolComponent dst = new ImmunizationRecommendationRecommendationProtocolComponent(); + copyValues(dst); + dst.doseSequence = doseSequence == null ? null : doseSequence.copy(); + dst.description = description == null ? null : description.copy(); + dst.authority = authority == null ? null : authority.copy(); + dst.series = series == null ? null : series.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationProtocolComponent)) + return false; + ImmunizationRecommendationRecommendationProtocolComponent o = (ImmunizationRecommendationRecommendationProtocolComponent) other; + return compareDeep(doseSequence, o.doseSequence, true) && compareDeep(description, o.description, true) + && compareDeep(authority, o.authority, true) && compareDeep(series, o.series, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationRecommendationRecommendationProtocolComponent)) + return false; + ImmunizationRecommendationRecommendationProtocolComponent o = (ImmunizationRecommendationRecommendationProtocolComponent) other; + return compareValues(doseSequence, o.doseSequence, true) && compareValues(description, o.description, true) + && compareValues(series, o.series, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty()) + && (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()); + } + + public String fhirType() { + return "ImmunizationRecommendation.recommendation.protocol"; + + } + + } + + /** + * A unique identifier assigned to this particular recommendation record. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this particular recommendation record." ) + protected List identifier; + + /** + * The patient for whom the recommendations are for. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who this profile is for", formalDefinition="The patient for whom the recommendations are for." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient for whom the recommendations are for.) + */ + protected Patient patientTarget; + + /** + * Vaccine administration recommendations. + */ + @Child(name = "recommendation", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Vaccine administration recommendations", formalDefinition="Vaccine administration recommendations." ) + protected List recommendation; + + private static final long serialVersionUID = 641058495L; + + /* + * Constructor + */ + public ImmunizationRecommendation() { + super(); + } + + /* + * Constructor + */ + public ImmunizationRecommendation(Reference patient) { + super(); + this.patient = patient; + } + + /** + * @return {@link #identifier} (A unique identifier assigned to this particular recommendation record.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A unique identifier assigned to this particular recommendation record.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ImmunizationRecommendation addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (The patient for whom the recommendations are for.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendation.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient for whom the recommendations are for.) + */ + public ImmunizationRecommendation setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient for whom the recommendations are for.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImmunizationRecommendation.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient for whom the recommendations are for.) + */ + public ImmunizationRecommendation setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #recommendation} (Vaccine administration recommendations.) + */ + public List getRecommendation() { + if (this.recommendation == null) + this.recommendation = new ArrayList(); + return this.recommendation; + } + + public boolean hasRecommendation() { + if (this.recommendation == null) + return false; + for (ImmunizationRecommendationRecommendationComponent item : this.recommendation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #recommendation} (Vaccine administration recommendations.) + */ + // syntactic sugar + public ImmunizationRecommendationRecommendationComponent addRecommendation() { //3 + ImmunizationRecommendationRecommendationComponent t = new ImmunizationRecommendationRecommendationComponent(); + if (this.recommendation == null) + this.recommendation = new ArrayList(); + this.recommendation.add(t); + return t; + } + + // syntactic sugar + public ImmunizationRecommendation addRecommendation(ImmunizationRecommendationRecommendationComponent t) { //3 + if (t == null) + return this; + if (this.recommendation == null) + this.recommendation = new ArrayList(); + this.recommendation.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier assigned to this particular recommendation record.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient for whom the recommendations are for.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("recommendation", "", "Vaccine administration recommendations.", 0, java.lang.Integer.MAX_VALUE, recommendation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("recommendation")) + this.getRecommendation().add((ImmunizationRecommendationRecommendationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("recommendation")) { + return addRecommendation(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ImmunizationRecommendation"; + + } + + public ImmunizationRecommendation copy() { + ImmunizationRecommendation dst = new ImmunizationRecommendation(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + if (recommendation != null) { + dst.recommendation = new ArrayList(); + for (ImmunizationRecommendationRecommendationComponent i : recommendation) + dst.recommendation.add(i.copy()); + }; + return dst; + } + + protected ImmunizationRecommendation typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImmunizationRecommendation)) + return false; + ImmunizationRecommendation o = (ImmunizationRecommendation) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(recommendation, o.recommendation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImmunizationRecommendation)) + return false; + ImmunizationRecommendation o = (ImmunizationRecommendation) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (recommendation == null || recommendation.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ImmunizationRecommendation; + } + + @SearchParamDefinition(name="date", path="ImmunizationRecommendation.recommendation.date", description="Date recommendation created", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="Business identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Dose number within sequence", type="number" ) + public static final String SP_DOSESEQUENCE = "dose-sequence"; + @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineCode", description="Vaccine recommendation applies to", type="token" ) + public static final String SP_VACCINETYPE = "vaccine-type"; + @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" ) + public static final String SP_DOSENUMBER = "dose-number"; + @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="Patient observations supporting recommendation", type="reference" ) + public static final String SP_INFORMATION = "information"; + @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="Past immunizations supporting recommendation", type="reference" ) + public static final String SP_SUPPORT = "support"; + @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="Vaccine administration status", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImplementationGuide.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImplementationGuide.java new file mode 100644 index 00000000000..9d6802bb1d5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ImplementationGuide.java @@ -0,0 +1,3400 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. + */ +@ResourceDef(name="ImplementationGuide", profile="http://hl7.org/fhir/Profile/ImplementationGuide") +public class ImplementationGuide extends DomainResource { + + public enum GuideDependencyType { + /** + * The guide is referred to by URL. + */ + REFERENCE, + /** + * The guide is embedded in this guide when published. + */ + INCLUSION, + /** + * added to help the parsers + */ + NULL; + public static GuideDependencyType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("reference".equals(codeString)) + return REFERENCE; + if ("inclusion".equals(codeString)) + return INCLUSION; + throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REFERENCE: return "reference"; + case INCLUSION: return "inclusion"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REFERENCE: return "http://hl7.org/fhir/guide-dependency-type"; + case INCLUSION: return "http://hl7.org/fhir/guide-dependency-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REFERENCE: return "The guide is referred to by URL."; + case INCLUSION: return "The guide is embedded in this guide when published."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REFERENCE: return "Reference"; + case INCLUSION: return "Inclusion"; + default: return "?"; + } + } + } + + public static class GuideDependencyTypeEnumFactory implements EnumFactory { + public GuideDependencyType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("reference".equals(codeString)) + return GuideDependencyType.REFERENCE; + if ("inclusion".equals(codeString)) + return GuideDependencyType.INCLUSION; + throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("reference".equals(codeString)) + return new Enumeration(this, GuideDependencyType.REFERENCE); + if ("inclusion".equals(codeString)) + return new Enumeration(this, GuideDependencyType.INCLUSION); + throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); + } + public String toCode(GuideDependencyType code) { + if (code == GuideDependencyType.REFERENCE) + return "reference"; + if (code == GuideDependencyType.INCLUSION) + return "inclusion"; + return "?"; + } + } + + public enum GuideResourcePurpose { + /** + * The resource is intended as an example. + */ + EXAMPLE, + /** + * The resource defines a value set or concept map used in the implementation guide. + */ + TERMINOLOGY, + /** + * The resource defines a profile (StructureDefinition) that is used in the implementation guide. + */ + PROFILE, + /** + * The resource defines an extension (StructureDefinition) that is used in the implementation guide. + */ + EXTENSION, + /** + * The resource contains a dictionary that is part of the implementation guide. + */ + DICTIONARY, + /** + * The resource defines a logical model (in a StructureDefinition) that is used in the implementation guide. + */ + LOGICAL, + /** + * added to help the parsers + */ + NULL; + public static GuideResourcePurpose fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("example".equals(codeString)) + return EXAMPLE; + if ("terminology".equals(codeString)) + return TERMINOLOGY; + if ("profile".equals(codeString)) + return PROFILE; + if ("extension".equals(codeString)) + return EXTENSION; + if ("dictionary".equals(codeString)) + return DICTIONARY; + if ("logical".equals(codeString)) + return LOGICAL; + throw new FHIRException("Unknown GuideResourcePurpose code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EXAMPLE: return "example"; + case TERMINOLOGY: return "terminology"; + case PROFILE: return "profile"; + case EXTENSION: return "extension"; + case DICTIONARY: return "dictionary"; + case LOGICAL: return "logical"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case EXAMPLE: return "http://hl7.org/fhir/guide-resource-purpose"; + case TERMINOLOGY: return "http://hl7.org/fhir/guide-resource-purpose"; + case PROFILE: return "http://hl7.org/fhir/guide-resource-purpose"; + case EXTENSION: return "http://hl7.org/fhir/guide-resource-purpose"; + case DICTIONARY: return "http://hl7.org/fhir/guide-resource-purpose"; + case LOGICAL: return "http://hl7.org/fhir/guide-resource-purpose"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case EXAMPLE: return "The resource is intended as an example."; + case TERMINOLOGY: return "The resource defines a value set or concept map used in the implementation guide."; + case PROFILE: return "The resource defines a profile (StructureDefinition) that is used in the implementation guide."; + case EXTENSION: return "The resource defines an extension (StructureDefinition) that is used in the implementation guide."; + case DICTIONARY: return "The resource contains a dictionary that is part of the implementation guide."; + case LOGICAL: return "The resource defines a logical model (in a StructureDefinition) that is used in the implementation guide."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EXAMPLE: return "Example"; + case TERMINOLOGY: return "Terminology"; + case PROFILE: return "Profile"; + case EXTENSION: return "Extension"; + case DICTIONARY: return "Dictionary"; + case LOGICAL: return "Logical Model"; + default: return "?"; + } + } + } + + public static class GuideResourcePurposeEnumFactory implements EnumFactory { + public GuideResourcePurpose fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("example".equals(codeString)) + return GuideResourcePurpose.EXAMPLE; + if ("terminology".equals(codeString)) + return GuideResourcePurpose.TERMINOLOGY; + if ("profile".equals(codeString)) + return GuideResourcePurpose.PROFILE; + if ("extension".equals(codeString)) + return GuideResourcePurpose.EXTENSION; + if ("dictionary".equals(codeString)) + return GuideResourcePurpose.DICTIONARY; + if ("logical".equals(codeString)) + return GuideResourcePurpose.LOGICAL; + throw new IllegalArgumentException("Unknown GuideResourcePurpose code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("example".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.EXAMPLE); + if ("terminology".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.TERMINOLOGY); + if ("profile".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.PROFILE); + if ("extension".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.EXTENSION); + if ("dictionary".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.DICTIONARY); + if ("logical".equals(codeString)) + return new Enumeration(this, GuideResourcePurpose.LOGICAL); + throw new FHIRException("Unknown GuideResourcePurpose code '"+codeString+"'"); + } + public String toCode(GuideResourcePurpose code) { + if (code == GuideResourcePurpose.EXAMPLE) + return "example"; + if (code == GuideResourcePurpose.TERMINOLOGY) + return "terminology"; + if (code == GuideResourcePurpose.PROFILE) + return "profile"; + if (code == GuideResourcePurpose.EXTENSION) + return "extension"; + if (code == GuideResourcePurpose.DICTIONARY) + return "dictionary"; + if (code == GuideResourcePurpose.LOGICAL) + return "logical"; + return "?"; + } + } + + public enum GuidePageKind { + /** + * This is a page of content that is included in the implementation guide. It has no particular function. + */ + PAGE, + /** + * This is a page that represents a human readable rendering of an example. + */ + EXAMPLE, + /** + * This is a page that represents a list of resources of one or more types. + */ + LIST, + /** + * This is a page showing where an included guide is injected. + */ + INCLUDE, + /** + * This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section. + */ + DIRECTORY, + /** + * This is a page that creates the listed resources as a dictionary. + */ + DICTIONARY, + /** + * This is a generated page that contains the table of contents. + */ + TOC, + /** + * This is a page that represents a presented resource. This is typically used for generated conformance resource presentations. + */ + RESOURCE, + /** + * added to help the parsers + */ + NULL; + public static GuidePageKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("page".equals(codeString)) + return PAGE; + if ("example".equals(codeString)) + return EXAMPLE; + if ("list".equals(codeString)) + return LIST; + if ("include".equals(codeString)) + return INCLUDE; + if ("directory".equals(codeString)) + return DIRECTORY; + if ("dictionary".equals(codeString)) + return DICTIONARY; + if ("toc".equals(codeString)) + return TOC; + if ("resource".equals(codeString)) + return RESOURCE; + throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAGE: return "page"; + case EXAMPLE: return "example"; + case LIST: return "list"; + case INCLUDE: return "include"; + case DIRECTORY: return "directory"; + case DICTIONARY: return "dictionary"; + case TOC: return "toc"; + case RESOURCE: return "resource"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PAGE: return "http://hl7.org/fhir/guide-page-kind"; + case EXAMPLE: return "http://hl7.org/fhir/guide-page-kind"; + case LIST: return "http://hl7.org/fhir/guide-page-kind"; + case INCLUDE: return "http://hl7.org/fhir/guide-page-kind"; + case DIRECTORY: return "http://hl7.org/fhir/guide-page-kind"; + case DICTIONARY: return "http://hl7.org/fhir/guide-page-kind"; + case TOC: return "http://hl7.org/fhir/guide-page-kind"; + case RESOURCE: return "http://hl7.org/fhir/guide-page-kind"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PAGE: return "This is a page of content that is included in the implementation guide. It has no particular function."; + case EXAMPLE: return "This is a page that represents a human readable rendering of an example."; + case LIST: return "This is a page that represents a list of resources of one or more types."; + case INCLUDE: return "This is a page showing where an included guide is injected."; + case DIRECTORY: return "This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section."; + case DICTIONARY: return "This is a page that creates the listed resources as a dictionary."; + case TOC: return "This is a generated page that contains the table of contents."; + case RESOURCE: return "This is a page that represents a presented resource. This is typically used for generated conformance resource presentations."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAGE: return "Page"; + case EXAMPLE: return "Example"; + case LIST: return "List"; + case INCLUDE: return "Include"; + case DIRECTORY: return "Directory"; + case DICTIONARY: return "Dictionary"; + case TOC: return "Table Of Contents"; + case RESOURCE: return "Resource"; + default: return "?"; + } + } + } + + public static class GuidePageKindEnumFactory implements EnumFactory { + public GuidePageKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("page".equals(codeString)) + return GuidePageKind.PAGE; + if ("example".equals(codeString)) + return GuidePageKind.EXAMPLE; + if ("list".equals(codeString)) + return GuidePageKind.LIST; + if ("include".equals(codeString)) + return GuidePageKind.INCLUDE; + if ("directory".equals(codeString)) + return GuidePageKind.DIRECTORY; + if ("dictionary".equals(codeString)) + return GuidePageKind.DICTIONARY; + if ("toc".equals(codeString)) + return GuidePageKind.TOC; + if ("resource".equals(codeString)) + return GuidePageKind.RESOURCE; + throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("page".equals(codeString)) + return new Enumeration(this, GuidePageKind.PAGE); + if ("example".equals(codeString)) + return new Enumeration(this, GuidePageKind.EXAMPLE); + if ("list".equals(codeString)) + return new Enumeration(this, GuidePageKind.LIST); + if ("include".equals(codeString)) + return new Enumeration(this, GuidePageKind.INCLUDE); + if ("directory".equals(codeString)) + return new Enumeration(this, GuidePageKind.DIRECTORY); + if ("dictionary".equals(codeString)) + return new Enumeration(this, GuidePageKind.DICTIONARY); + if ("toc".equals(codeString)) + return new Enumeration(this, GuidePageKind.TOC); + if ("resource".equals(codeString)) + return new Enumeration(this, GuidePageKind.RESOURCE); + throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); + } + public String toCode(GuidePageKind code) { + if (code == GuidePageKind.PAGE) + return "page"; + if (code == GuidePageKind.EXAMPLE) + return "example"; + if (code == GuidePageKind.LIST) + return "list"; + if (code == GuidePageKind.INCLUDE) + return "include"; + if (code == GuidePageKind.DIRECTORY) + return "directory"; + if (code == GuidePageKind.DICTIONARY) + return "dictionary"; + if (code == GuidePageKind.TOC) + return "toc"; + if (code == GuidePageKind.RESOURCE) + return "resource"; + return "?"; + } + } + + @Block() + public static class ImplementationGuideContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the implementation guide. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the implementation guide." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public ImplementationGuideContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ImplementationGuideContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the implementation guide. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the implementation guide. + */ + public ImplementationGuideContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuideContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the implementation guide.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ImplementationGuideContactComponent copy() { + ImplementationGuideContactComponent dst = new ImplementationGuideContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuideContactComponent)) + return false; + ImplementationGuideContactComponent o = (ImplementationGuideContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuideContactComponent)) + return false; + ImplementationGuideContactComponent o = (ImplementationGuideContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "ImplementationGuide.contact"; + + } + + } + + @Block() + public static class ImplementationGuideDependencyComponent extends BackboneElement implements IBaseBackboneElement { + /** + * How the dependency is represented when the guide is published. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="reference | inclusion", formalDefinition="How the dependency is represented when the guide is published." ) + protected Enumeration type; + + /** + * Where the dependency is located. + */ + @Child(name = "uri", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where to find dependency", formalDefinition="Where the dependency is located." ) + protected UriType uri; + + private static final long serialVersionUID = 162447098L; + + /* + * Constructor + */ + public ImplementationGuideDependencyComponent() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuideDependencyComponent(Enumeration type, UriType uri) { + super(); + this.type = type; + this.uri = uri; + } + + /** + * @return {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new GuideDependencyTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ImplementationGuideDependencyComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return How the dependency is represented when the guide is published. + */ + public GuideDependencyType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value How the dependency is represented when the guide is published. + */ + public ImplementationGuideDependencyComponent setType(GuideDependencyType value) { + if (this.type == null) + this.type = new Enumeration(new GuideDependencyTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public UriType getUriElement() { + if (this.uri == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.uri"); + else if (Configuration.doAutoCreate()) + this.uri = new UriType(); // bb + return this.uri; + } + + public boolean hasUriElement() { + return this.uri != null && !this.uri.isEmpty(); + } + + public boolean hasUri() { + return this.uri != null && !this.uri.isEmpty(); + } + + /** + * @param value {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public ImplementationGuideDependencyComponent setUriElement(UriType value) { + this.uri = value; + return this; + } + + /** + * @return Where the dependency is located. + */ + public String getUri() { + return this.uri == null ? null : this.uri.getValue(); + } + + /** + * @param value Where the dependency is located. + */ + public ImplementationGuideDependencyComponent setUri(String value) { + if (this.uri == null) + this.uri = new UriType(); + this.uri.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "How the dependency is represented when the guide is published.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("uri", "uri", "Where the dependency is located.", 0, java.lang.Integer.MAX_VALUE, uri)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new GuideDependencyTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("uri")) + this.uri = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); + } + else if (name.equals("uri")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.uri"); + } + else + return super.addChild(name); + } + + public ImplementationGuideDependencyComponent copy() { + ImplementationGuideDependencyComponent dst = new ImplementationGuideDependencyComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.uri = uri == null ? null : uri.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuideDependencyComponent)) + return false; + ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other; + return compareDeep(type, o.type, true) && compareDeep(uri, o.uri, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuideDependencyComponent)) + return false; + ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other; + return compareValues(type, o.type, true) && compareValues(uri, o.uri, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty()) + ; + } + + public String fhirType() { + return "ImplementationGuide.dependency"; + + } + + } + + @Block() + public static class ImplementationGuidePackageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name for the group, as used in page.package. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name used .page.package", formalDefinition="The name for the group, as used in page.package." ) + protected StringType name; + + /** + * Human readable text describing the package. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human readable text describing the package", formalDefinition="Human readable text describing the package." ) + protected StringType description; + + /** + * A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource. + */ + @Child(name = "resource", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource in the implementation guide", formalDefinition="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." ) + protected List resource; + + private static final long serialVersionUID = -701846580L; + + /* + * Constructor + */ + public ImplementationGuidePackageComponent() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuidePackageComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ImplementationGuidePackageComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name for the group, as used in page.package. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name for the group, as used in page.package. + */ + public ImplementationGuidePackageComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImplementationGuidePackageComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Human readable text describing the package. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Human readable text describing the package. + */ + public ImplementationGuidePackageComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.) + */ + public List getResource() { + if (this.resource == null) + this.resource = new ArrayList(); + return this.resource; + } + + public boolean hasResource() { + if (this.resource == null) + return false; + for (ImplementationGuidePackageResourceComponent item : this.resource) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #resource} (A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.) + */ + // syntactic sugar + public ImplementationGuidePackageResourceComponent addResource() { //3 + ImplementationGuidePackageResourceComponent t = new ImplementationGuidePackageResourceComponent(); + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuidePackageComponent addResource(ImplementationGuidePackageResourceComponent t) { //3 + if (t == null) + return this; + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name for the group, as used in page.package.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "Human readable text describing the package.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("resource", "", "A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.", 0, java.lang.Integer.MAX_VALUE, resource)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("resource")) + this.getResource().add((ImplementationGuidePackageResourceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); + } + else if (name.equals("resource")) { + return addResource(); + } + else + return super.addChild(name); + } + + public ImplementationGuidePackageComponent copy() { + ImplementationGuidePackageComponent dst = new ImplementationGuidePackageComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + if (resource != null) { + dst.resource = new ArrayList(); + for (ImplementationGuidePackageResourceComponent i : resource) + dst.resource.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuidePackageComponent)) + return false; + ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other; + return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(resource, o.resource, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuidePackageComponent)) + return false; + ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other; + return compareValues(name, o.name, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) + && (resource == null || resource.isEmpty()); + } + + public String fhirType() { + return "ImplementationGuide.package"; + + } + + } + + @Block() + public static class ImplementationGuidePackageResourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Why the resource is included in the guide. + */ + @Child(name = "purpose", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="example | terminology | profile | extension | dictionary | logical", formalDefinition="Why the resource is included in the guide." ) + protected Enumeration purpose; + + /** + * A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). + */ + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human Name for the resource", formalDefinition="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name)." ) + protected StringType name; + + /** + * A description of the reason that a resource has been included in the implementation guide. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reason why included in guide", formalDefinition="A description of the reason that a resource has been included in the implementation guide." ) + protected StringType description; + + /** + * A short code that may be used to identify the resource throughout the implementation guide. + */ + @Child(name = "acronym", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Short code to identify the resource", formalDefinition="A short code that may be used to identify the resource throughout the implementation guide." ) + protected StringType acronym; + + /** + * Where this resource is found. + */ + @Child(name = "source", type = {UriType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Location of the resource", formalDefinition="Where this resource is found." ) + protected Type source; + + /** + * Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions. + */ + @Child(name = "exampleFor", type = {StructureDefinition.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Resource this is an example of (if applicable)", formalDefinition="Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions." ) + protected Reference exampleFor; + + /** + * The actual object that is the target of the reference (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) + */ + protected StructureDefinition exampleForTarget; + + private static final long serialVersionUID = 428339533L; + + /* + * Constructor + */ + public ImplementationGuidePackageResourceComponent() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuidePackageResourceComponent(Enumeration purpose, Type source) { + super(); + this.purpose = purpose; + this.source = source; + } + + /** + * @return {@link #purpose} (Why the resource is included in the guide.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public Enumeration getPurposeElement() { + if (this.purpose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.purpose"); + else if (Configuration.doAutoCreate()) + this.purpose = new Enumeration(new GuideResourcePurposeEnumFactory()); // bb + return this.purpose; + } + + public boolean hasPurposeElement() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + public boolean hasPurpose() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + /** + * @param value {@link #purpose} (Why the resource is included in the guide.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public ImplementationGuidePackageResourceComponent setPurposeElement(Enumeration value) { + this.purpose = value; + return this; + } + + /** + * @return Why the resource is included in the guide. + */ + public GuideResourcePurpose getPurpose() { + return this.purpose == null ? null : this.purpose.getValue(); + } + + /** + * @param value Why the resource is included in the guide. + */ + public ImplementationGuidePackageResourceComponent setPurpose(GuideResourcePurpose value) { + if (this.purpose == null) + this.purpose = new Enumeration(new GuideResourcePurposeEnumFactory()); + this.purpose.setValue(value); + return this; + } + + /** + * @return {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ImplementationGuidePackageResourceComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). + */ + public ImplementationGuidePackageResourceComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImplementationGuidePackageResourceComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the reason that a resource has been included in the implementation guide. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the reason that a resource has been included in the implementation guide. + */ + public ImplementationGuidePackageResourceComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value + */ + public StringType getAcronymElement() { + if (this.acronym == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.acronym"); + else if (Configuration.doAutoCreate()) + this.acronym = new StringType(); // bb + return this.acronym; + } + + public boolean hasAcronymElement() { + return this.acronym != null && !this.acronym.isEmpty(); + } + + public boolean hasAcronym() { + return this.acronym != null && !this.acronym.isEmpty(); + } + + /** + * @param value {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value + */ + public ImplementationGuidePackageResourceComponent setAcronymElement(StringType value) { + this.acronym = value; + return this; + } + + /** + * @return A short code that may be used to identify the resource throughout the implementation guide. + */ + public String getAcronym() { + return this.acronym == null ? null : this.acronym.getValue(); + } + + /** + * @param value A short code that may be used to identify the resource throughout the implementation guide. + */ + public ImplementationGuidePackageResourceComponent setAcronym(String value) { + if (Utilities.noString(value)) + this.acronym = null; + else { + if (this.acronym == null) + this.acronym = new StringType(); + this.acronym.setValue(value); + } + return this; + } + + /** + * @return {@link #source} (Where this resource is found.) + */ + public Type getSource() { + return this.source; + } + + /** + * @return {@link #source} (Where this resource is found.) + */ + public UriType getSourceUriType() throws FHIRException { + if (!(this.source instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered"); + return (UriType) this.source; + } + + public boolean hasSourceUriType() { + return this.source instanceof UriType; + } + + /** + * @return {@link #source} (Where this resource is found.) + */ + public Reference getSourceReference() throws FHIRException { + if (!(this.source instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.source.getClass().getName()+" was encountered"); + return (Reference) this.source; + } + + public boolean hasSourceReference() { + return this.source instanceof Reference; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Where this resource is found.) + */ + public ImplementationGuidePackageResourceComponent setSource(Type value) { + this.source = value; + return this; + } + + /** + * @return {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) + */ + public Reference getExampleFor() { + if (this.exampleFor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor"); + else if (Configuration.doAutoCreate()) + this.exampleFor = new Reference(); // cc + return this.exampleFor; + } + + public boolean hasExampleFor() { + return this.exampleFor != null && !this.exampleFor.isEmpty(); + } + + /** + * @param value {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) + */ + public ImplementationGuidePackageResourceComponent setExampleFor(Reference value) { + this.exampleFor = value; + return this; + } + + /** + * @return {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) + */ + public StructureDefinition getExampleForTarget() { + if (this.exampleForTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor"); + else if (Configuration.doAutoCreate()) + this.exampleForTarget = new StructureDefinition(); // aa + return this.exampleForTarget; + } + + /** + * @param value {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) + */ + public ImplementationGuidePackageResourceComponent setExampleForTarget(StructureDefinition value) { + this.exampleForTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("purpose", "code", "Why the resource is included in the guide.", 0, java.lang.Integer.MAX_VALUE, purpose)); + childrenList.add(new Property("name", "string", "A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "A description of the reason that a resource has been included in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("acronym", "string", "A short code that may be used to identify the resource throughout the implementation guide.", 0, java.lang.Integer.MAX_VALUE, acronym)); + childrenList.add(new Property("source[x]", "uri|Reference(Any)", "Where this resource is found.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("exampleFor", "Reference(StructureDefinition)", "Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.", 0, java.lang.Integer.MAX_VALUE, exampleFor)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("purpose")) + this.purpose = new GuideResourcePurposeEnumFactory().fromType(value); // Enumeration + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("acronym")) + this.acronym = castToString(value); // StringType + else if (name.equals("source[x]")) + this.source = (Type) value; // Type + else if (name.equals("exampleFor")) + this.exampleFor = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("purpose")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.purpose"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); + } + else if (name.equals("acronym")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.acronym"); + } + else if (name.equals("sourceUri")) { + this.source = new UriType(); + return this.source; + } + else if (name.equals("sourceReference")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("exampleFor")) { + this.exampleFor = new Reference(); + return this.exampleFor; + } + else + return super.addChild(name); + } + + public ImplementationGuidePackageResourceComponent copy() { + ImplementationGuidePackageResourceComponent dst = new ImplementationGuidePackageResourceComponent(); + copyValues(dst); + dst.purpose = purpose == null ? null : purpose.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + dst.acronym = acronym == null ? null : acronym.copy(); + dst.source = source == null ? null : source.copy(); + dst.exampleFor = exampleFor == null ? null : exampleFor.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuidePackageResourceComponent)) + return false; + ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; + return compareDeep(purpose, o.purpose, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) + && compareDeep(acronym, o.acronym, true) && compareDeep(source, o.source, true) && compareDeep(exampleFor, o.exampleFor, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuidePackageResourceComponent)) + return false; + ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; + return compareValues(purpose, o.purpose, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) + && compareValues(acronym, o.acronym, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (purpose == null || purpose.isEmpty()) && (name == null || name.isEmpty()) + && (description == null || description.isEmpty()) && (acronym == null || acronym.isEmpty()) + && (source == null || source.isEmpty()) && (exampleFor == null || exampleFor.isEmpty()); + } + + public String fhirType() { + return "ImplementationGuide.package.resource"; + + } + + } + + @Block() + public static class ImplementationGuideGlobalComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of resource that all instances must conform to. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type this profiles applies to", formalDefinition="The type of resource that all instances must conform to." ) + protected CodeType type; + + /** + * A reference to the profile that all instances must conform to. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Profile that all resources must conform to", formalDefinition="A reference to the profile that all instances must conform to." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (A reference to the profile that all instances must conform to.) + */ + protected StructureDefinition profileTarget; + + private static final long serialVersionUID = 2011731959L; + + /* + * Constructor + */ + public ImplementationGuideGlobalComponent() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuideGlobalComponent(CodeType type, Reference profile) { + super(); + this.type = type; + this.profile = profile; + } + + /** + * @return {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ImplementationGuideGlobalComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of resource that all instances must conform to. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of resource that all instances must conform to. + */ + public ImplementationGuideGlobalComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (A reference to the profile that all instances must conform to.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (A reference to the profile that all instances must conform to.) + */ + public ImplementationGuideGlobalComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.) + */ + public ImplementationGuideGlobalComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of resource that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A reference to the profile that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else + return super.addChild(name); + } + + public ImplementationGuideGlobalComponent copy() { + ImplementationGuideGlobalComponent dst = new ImplementationGuideGlobalComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuideGlobalComponent)) + return false; + ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other; + return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuideGlobalComponent)) + return false; + ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other; + return compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) + ; + } + + public String fhirType() { + return "ImplementationGuide.global"; + + } + + } + + @Block() + public static class ImplementationGuidePageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The source address for the page. + */ + @Child(name = "source", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where to find that page", formalDefinition="The source address for the page." ) + protected UriType source; + + /** + * A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Short name shown for navigational assistance", formalDefinition="A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc." ) + protected StringType name; + + /** + * The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. + */ + @Child(name = "kind", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="page | example | list | include | directory | dictionary | toc | resource", formalDefinition="The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest." ) + protected Enumeration kind; + + /** + * For constructed pages, what kind of resources to include in the list. + */ + @Child(name = "type", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Kind of resource to include in the list", formalDefinition="For constructed pages, what kind of resources to include in the list." ) + protected List type; + + /** + * For constructed pages, a list of packages to include in the page (or else empty for everything). + */ + @Child(name = "package", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Name of package to include", formalDefinition="For constructed pages, a list of packages to include in the page (or else empty for everything)." ) + protected List package_; + + /** + * The format of the page. + */ + @Child(name = "format", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Format of the page (e.g. html, markdown, etc.)", formalDefinition="The format of the page." ) + protected CodeType format; + + /** + * Nested Pages/Sections under this page. + */ + @Child(name = "page", type = {ImplementationGuidePageComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested Pages / Sections", formalDefinition="Nested Pages/Sections under this page." ) + protected List page; + + private static final long serialVersionUID = -1620890043L; + + /* + * Constructor + */ + public ImplementationGuidePageComponent() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuidePageComponent(UriType source, StringType name, Enumeration kind) { + super(); + this.source = source; + this.name = name; + this.kind = kind; + } + + /** + * @return {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value + */ + public UriType getSourceElement() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePageComponent.source"); + else if (Configuration.doAutoCreate()) + this.source = new UriType(); // bb + return this.source; + } + + public boolean hasSourceElement() { + return this.source != null && !this.source.isEmpty(); + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value + */ + public ImplementationGuidePageComponent setSourceElement(UriType value) { + this.source = value; + return this; + } + + /** + * @return The source address for the page. + */ + public String getSource() { + return this.source == null ? null : this.source.getValue(); + } + + /** + * @param value The source address for the page. + */ + public ImplementationGuidePageComponent setSource(String value) { + if (this.source == null) + this.source = new UriType(); + this.source.setValue(value); + return this; + } + + /** + * @return {@link #name} (A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePageComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ImplementationGuidePageComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. + */ + public ImplementationGuidePageComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Enumeration getKindElement() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePageComponent.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new Enumeration(new GuidePageKindEnumFactory()); // bb + return this.kind; + } + + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public ImplementationGuidePageComponent setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. + */ + public GuidePageKind getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. + */ + public ImplementationGuidePageComponent setKind(GuidePageKind value) { + if (this.kind == null) + this.kind = new Enumeration(new GuidePageKindEnumFactory()); + this.kind.setValue(value); + return this; + } + + /** + * @return {@link #type} (For constructed pages, what kind of resources to include in the list.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeType item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (For constructed pages, what kind of resources to include in the list.) + */ + // syntactic sugar + public CodeType addTypeElement() {//2 + CodeType t = new CodeType(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + /** + * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.) + */ + public ImplementationGuidePageComponent addType(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.) + */ + public boolean hasType(String value) { + if (this.type == null) + return false; + for (CodeType v : this.type) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) + */ + public List getPackage() { + if (this.package_ == null) + this.package_ = new ArrayList(); + return this.package_; + } + + public boolean hasPackage() { + if (this.package_ == null) + return false; + for (StringType item : this.package_) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) + */ + // syntactic sugar + public StringType addPackageElement() {//2 + StringType t = new StringType(); + if (this.package_ == null) + this.package_ = new ArrayList(); + this.package_.add(t); + return t; + } + + /** + * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) + */ + public ImplementationGuidePageComponent addPackage(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.package_ == null) + this.package_ = new ArrayList(); + this.package_.add(t); + return this; + } + + /** + * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) + */ + public boolean hasPackage(String value) { + if (this.package_ == null) + return false; + for (StringType v : this.package_) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value + */ + public CodeType getFormatElement() { + if (this.format == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuidePageComponent.format"); + else if (Configuration.doAutoCreate()) + this.format = new CodeType(); // bb + return this.format; + } + + public boolean hasFormatElement() { + return this.format != null && !this.format.isEmpty(); + } + + public boolean hasFormat() { + return this.format != null && !this.format.isEmpty(); + } + + /** + * @param value {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value + */ + public ImplementationGuidePageComponent setFormatElement(CodeType value) { + this.format = value; + return this; + } + + /** + * @return The format of the page. + */ + public String getFormat() { + return this.format == null ? null : this.format.getValue(); + } + + /** + * @param value The format of the page. + */ + public ImplementationGuidePageComponent setFormat(String value) { + if (Utilities.noString(value)) + this.format = null; + else { + if (this.format == null) + this.format = new CodeType(); + this.format.setValue(value); + } + return this; + } + + /** + * @return {@link #page} (Nested Pages/Sections under this page.) + */ + public List getPage() { + if (this.page == null) + this.page = new ArrayList(); + return this.page; + } + + public boolean hasPage() { + if (this.page == null) + return false; + for (ImplementationGuidePageComponent item : this.page) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #page} (Nested Pages/Sections under this page.) + */ + // syntactic sugar + public ImplementationGuidePageComponent addPage() { //3 + ImplementationGuidePageComponent t = new ImplementationGuidePageComponent(); + if (this.page == null) + this.page = new ArrayList(); + this.page.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuidePageComponent addPage(ImplementationGuidePageComponent t) { //3 + if (t == null) + return this; + if (this.page == null) + this.page = new ArrayList(); + this.page.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("source", "uri", "The source address for the page.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("name", "string", "A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("kind", "code", "The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("type", "code", "For constructed pages, what kind of resources to include in the list.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("package", "string", "For constructed pages, a list of packages to include in the page (or else empty for everything).", 0, java.lang.Integer.MAX_VALUE, package_)); + childrenList.add(new Property("format", "code", "The format of the page.", 0, java.lang.Integer.MAX_VALUE, format)); + childrenList.add(new Property("page", "@ImplementationGuide.page", "Nested Pages/Sections under this page.", 0, java.lang.Integer.MAX_VALUE, page)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("source")) + this.source = castToUri(value); // UriType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("kind")) + this.kind = new GuidePageKindEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.getType().add(castToCode(value)); + else if (name.equals("package")) + this.getPackage().add(castToString(value)); + else if (name.equals("format")) + this.format = castToCode(value); // CodeType + else if (name.equals("page")) + this.getPage().add((ImplementationGuidePageComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("source")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.source"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); + } + else if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.kind"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); + } + else if (name.equals("package")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.package"); + } + else if (name.equals("format")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.format"); + } + else if (name.equals("page")) { + return addPage(); + } + else + return super.addChild(name); + } + + public ImplementationGuidePageComponent copy() { + ImplementationGuidePageComponent dst = new ImplementationGuidePageComponent(); + copyValues(dst); + dst.source = source == null ? null : source.copy(); + dst.name = name == null ? null : name.copy(); + dst.kind = kind == null ? null : kind.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeType i : type) + dst.type.add(i.copy()); + }; + if (package_ != null) { + dst.package_ = new ArrayList(); + for (StringType i : package_) + dst.package_.add(i.copy()); + }; + dst.format = format == null ? null : format.copy(); + if (page != null) { + dst.page = new ArrayList(); + for (ImplementationGuidePageComponent i : page) + dst.page.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuidePageComponent)) + return false; + ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other; + return compareDeep(source, o.source, true) && compareDeep(name, o.name, true) && compareDeep(kind, o.kind, true) + && compareDeep(type, o.type, true) && compareDeep(package_, o.package_, true) && compareDeep(format, o.format, true) + && compareDeep(page, o.page, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuidePageComponent)) + return false; + ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other; + return compareValues(source, o.source, true) && compareValues(name, o.name, true) && compareValues(kind, o.kind, true) + && compareValues(type, o.type, true) && compareValues(package_, o.package_, true) && compareValues(format, o.format, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (source == null || source.isEmpty()) && (name == null || name.isEmpty()) + && (kind == null || kind.isEmpty()) && (type == null || type.isEmpty()) && (package_ == null || package_.isEmpty()) + && (format == null || format.isEmpty()) && (page == null || page.isEmpty()); + } + + public String fhirType() { + return "ImplementationGuide.page"; + + } + + } + + /** + * An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this Implementation Guide", formalDefinition="An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published." ) + protected UriType url; + + /** + * The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the Implementation Guide", formalDefinition="The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually." ) + protected StringType version; + + /** + * A free text natural language name identifying the Implementation Guide. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this Implementation Guide", formalDefinition="A free text natural language name identifying the Implementation Guide." ) + protected StringType name; + + /** + * The status of the Implementation Guide. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the Implementation Guide." ) + protected Enumeration status; + + /** + * This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the implementation guide. + */ + @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the implementation guide." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for this version of the Implementation Guide", formalDefinition="The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the Implementation Guide and its use. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Natural language description of the Implementation Guide", formalDefinition="A free text natural language description of the Implementation Guide and its use." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The implementation guide is intended to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined." ) + protected List useContext; + + /** + * A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) + protected StringType copyright; + + /** + * The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + @Child(name = "fhirVersion", type = {IdType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version." ) + protected IdType fhirVersion; + + /** + * Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides. + */ + @Child(name = "dependency", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Another Implementation guide this depends on", formalDefinition="Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides." ) + protected List dependency; + + /** + * A logical group of resources. Logical groups can be used when building pages. + */ + @Child(name = "package", type = {}, order=13, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Group of resources as used in .page.package", formalDefinition="A logical group of resources. Logical groups can be used when building pages." ) + protected List package_; + + /** + * A set of profiles that all resources covered by this implementation guide must conform to. + */ + @Child(name = "global", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Profiles that apply globally", formalDefinition="A set of profiles that all resources covered by this implementation guide must conform to." ) + protected List global; + + /** + * A binary file that is included in the implementation guide when it is published. + */ + @Child(name = "binary", type = {UriType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Image, css, script, etc.", formalDefinition="A binary file that is included in the implementation guide when it is published." ) + protected List binary; + + /** + * A page / section in the implementation guide. The root page is the implementation guide home page. + */ + @Child(name = "page", type = {}, order=16, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Page/Section in the Guide", formalDefinition="A page / section in the implementation guide. The root page is the implementation guide home page." ) + protected ImplementationGuidePageComponent page; + + private static final long serialVersionUID = 1150122415L; + + /* + * Constructor + */ + public ImplementationGuide() { + super(); + } + + /* + * Constructor + */ + public ImplementationGuide(UriType url, StringType name, Enumeration status, ImplementationGuidePageComponent page) { + super(); + this.url = url; + this.name = name; + this.status = status; + this.page = page; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ImplementationGuide setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. + */ + public ImplementationGuide setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ImplementationGuide setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. + */ + public ImplementationGuide setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ImplementationGuide setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the Implementation Guide. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the Implementation Guide. + */ + public ImplementationGuide setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ImplementationGuide setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the Implementation Guide. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the Implementation Guide. + */ + public ImplementationGuide setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ImplementationGuide setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public ImplementationGuide setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public ImplementationGuide setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the implementation guide. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the implementation guide. + */ + public ImplementationGuide setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ImplementationGuideContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ImplementationGuideContactComponent addContact() { //3 + ImplementationGuideContactComponent t = new ImplementationGuideContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuide addContact(ImplementationGuideContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ImplementationGuide setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. + */ + public ImplementationGuide setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the Implementation Guide and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the Implementation Guide and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImplementationGuide setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the Implementation Guide and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the Implementation Guide and its use. + */ + public ImplementationGuide setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuide addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public ImplementationGuide setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public ImplementationGuide setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public IdType getFhirVersionElement() { + if (this.fhirVersion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.fhirVersion"); + else if (Configuration.doAutoCreate()) + this.fhirVersion = new IdType(); // bb + return this.fhirVersion; + } + + public boolean hasFhirVersionElement() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + public boolean hasFhirVersion() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + /** + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public ImplementationGuide setFhirVersionElement(IdType value) { + this.fhirVersion = value; + return this; + } + + /** + * @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + public String getFhirVersion() { + return this.fhirVersion == null ? null : this.fhirVersion.getValue(); + } + + /** + * @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + public ImplementationGuide setFhirVersion(String value) { + if (Utilities.noString(value)) + this.fhirVersion = null; + else { + if (this.fhirVersion == null) + this.fhirVersion = new IdType(); + this.fhirVersion.setValue(value); + } + return this; + } + + /** + * @return {@link #dependency} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.) + */ + public List getDependency() { + if (this.dependency == null) + this.dependency = new ArrayList(); + return this.dependency; + } + + public boolean hasDependency() { + if (this.dependency == null) + return false; + for (ImplementationGuideDependencyComponent item : this.dependency) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dependency} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.) + */ + // syntactic sugar + public ImplementationGuideDependencyComponent addDependency() { //3 + ImplementationGuideDependencyComponent t = new ImplementationGuideDependencyComponent(); + if (this.dependency == null) + this.dependency = new ArrayList(); + this.dependency.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuide addDependency(ImplementationGuideDependencyComponent t) { //3 + if (t == null) + return this; + if (this.dependency == null) + this.dependency = new ArrayList(); + this.dependency.add(t); + return this; + } + + /** + * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.) + */ + public List getPackage() { + if (this.package_ == null) + this.package_ = new ArrayList(); + return this.package_; + } + + public boolean hasPackage() { + if (this.package_ == null) + return false; + for (ImplementationGuidePackageComponent item : this.package_) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.) + */ + // syntactic sugar + public ImplementationGuidePackageComponent addPackage() { //3 + ImplementationGuidePackageComponent t = new ImplementationGuidePackageComponent(); + if (this.package_ == null) + this.package_ = new ArrayList(); + this.package_.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuide addPackage(ImplementationGuidePackageComponent t) { //3 + if (t == null) + return this; + if (this.package_ == null) + this.package_ = new ArrayList(); + this.package_.add(t); + return this; + } + + /** + * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.) + */ + public List getGlobal() { + if (this.global == null) + this.global = new ArrayList(); + return this.global; + } + + public boolean hasGlobal() { + if (this.global == null) + return false; + for (ImplementationGuideGlobalComponent item : this.global) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.) + */ + // syntactic sugar + public ImplementationGuideGlobalComponent addGlobal() { //3 + ImplementationGuideGlobalComponent t = new ImplementationGuideGlobalComponent(); + if (this.global == null) + this.global = new ArrayList(); + this.global.add(t); + return t; + } + + // syntactic sugar + public ImplementationGuide addGlobal(ImplementationGuideGlobalComponent t) { //3 + if (t == null) + return this; + if (this.global == null) + this.global = new ArrayList(); + this.global.add(t); + return this; + } + + /** + * @return {@link #binary} (A binary file that is included in the implementation guide when it is published.) + */ + public List getBinary() { + if (this.binary == null) + this.binary = new ArrayList(); + return this.binary; + } + + public boolean hasBinary() { + if (this.binary == null) + return false; + for (UriType item : this.binary) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #binary} (A binary file that is included in the implementation guide when it is published.) + */ + // syntactic sugar + public UriType addBinaryElement() {//2 + UriType t = new UriType(); + if (this.binary == null) + this.binary = new ArrayList(); + this.binary.add(t); + return t; + } + + /** + * @param value {@link #binary} (A binary file that is included in the implementation guide when it is published.) + */ + public ImplementationGuide addBinary(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.binary == null) + this.binary = new ArrayList(); + this.binary.add(t); + return this; + } + + /** + * @param value {@link #binary} (A binary file that is included in the implementation guide when it is published.) + */ + public boolean hasBinary(String value) { + if (this.binary == null) + return false; + for (UriType v : this.binary) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) + */ + public ImplementationGuidePageComponent getPage() { + if (this.page == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImplementationGuide.page"); + else if (Configuration.doAutoCreate()) + this.page = new ImplementationGuidePageComponent(); // cc + return this.page; + } + + public boolean hasPage() { + return this.page != null && !this.page.isEmpty(); + } + + /** + * @param value {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) + */ + public ImplementationGuide setPage(ImplementationGuidePageComponent value) { + this.page = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the Implementation Guide.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the Implementation Guide.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the implementation guide.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the Implementation Guide and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("dependency", "", "Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.", 0, java.lang.Integer.MAX_VALUE, dependency)); + childrenList.add(new Property("package", "", "A logical group of resources. Logical groups can be used when building pages.", 0, java.lang.Integer.MAX_VALUE, package_)); + childrenList.add(new Property("global", "", "A set of profiles that all resources covered by this implementation guide must conform to.", 0, java.lang.Integer.MAX_VALUE, global)); + childrenList.add(new Property("binary", "uri", "A binary file that is included in the implementation guide when it is published.", 0, java.lang.Integer.MAX_VALUE, binary)); + childrenList.add(new Property("page", "", "A page / section in the implementation guide. The root page is the implementation guide home page.", 0, java.lang.Integer.MAX_VALUE, page)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ImplementationGuideContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("fhirVersion")) + this.fhirVersion = castToId(value); // IdType + else if (name.equals("dependency")) + this.getDependency().add((ImplementationGuideDependencyComponent) value); + else if (name.equals("package")) + this.getPackage().add((ImplementationGuidePackageComponent) value); + else if (name.equals("global")) + this.getGlobal().add((ImplementationGuideGlobalComponent) value); + else if (name.equals("binary")) + this.getBinary().add(castToUri(value)); + else if (name.equals("page")) + this.page = (ImplementationGuidePageComponent) value; // ImplementationGuidePageComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.url"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.copyright"); + } + else if (name.equals("fhirVersion")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.fhirVersion"); + } + else if (name.equals("dependency")) { + return addDependency(); + } + else if (name.equals("package")) { + return addPackage(); + } + else if (name.equals("global")) { + return addGlobal(); + } + else if (name.equals("binary")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.binary"); + } + else if (name.equals("page")) { + this.page = new ImplementationGuidePageComponent(); + return this.page; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ImplementationGuide"; + + } + + public ImplementationGuide copy() { + ImplementationGuide dst = new ImplementationGuide(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ImplementationGuideContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.copyright = copyright == null ? null : copyright.copy(); + dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); + if (dependency != null) { + dst.dependency = new ArrayList(); + for (ImplementationGuideDependencyComponent i : dependency) + dst.dependency.add(i.copy()); + }; + if (package_ != null) { + dst.package_ = new ArrayList(); + for (ImplementationGuidePackageComponent i : package_) + dst.package_.add(i.copy()); + }; + if (global != null) { + dst.global = new ArrayList(); + for (ImplementationGuideGlobalComponent i : global) + dst.global.add(i.copy()); + }; + if (binary != null) { + dst.binary = new ArrayList(); + for (UriType i : binary) + dst.binary.add(i.copy()); + }; + dst.page = page == null ? null : page.copy(); + return dst; + } + + protected ImplementationGuide typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImplementationGuide)) + return false; + ImplementationGuide o = (ImplementationGuide) other; + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) + && compareDeep(useContext, o.useContext, true) && compareDeep(copyright, o.copyright, true) && compareDeep(fhirVersion, o.fhirVersion, true) + && compareDeep(dependency, o.dependency, true) && compareDeep(package_, o.package_, true) && compareDeep(global, o.global, true) + && compareDeep(binary, o.binary, true) && compareDeep(page, o.page, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImplementationGuide)) + return false; + ImplementationGuide o = (ImplementationGuide) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(copyright, o.copyright, true) + && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(binary, o.binary, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) + && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) + && (dependency == null || dependency.isEmpty()) && (package_ == null || package_.isEmpty()) + && (global == null || global.isEmpty()) && (binary == null || binary.isEmpty()) && (page == null || page.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ImplementationGuide; + } + + @SearchParamDefinition(name="date", path="ImplementationGuide.date", description="The implementation guide publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="dependency", path="ImplementationGuide.dependency.uri", description="Where to find dependency", type="uri" ) + public static final String SP_DEPENDENCY = "dependency"; + @SearchParamDefinition(name="name", path="ImplementationGuide.name", description="Name of the implementation guide", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="ImplementationGuide.useContext", description="A use context assigned to the structure", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="ImplementationGuide.publisher", description="Name of the publisher of the implementation guide", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="description", path="ImplementationGuide.description", description="Text search in the description of the implementation guide", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="experimental", path="ImplementationGuide.experimental", description="If for testing purposes, not real usage", type="token" ) + public static final String SP_EXPERIMENTAL = "experimental"; + @SearchParamDefinition(name="version", path="ImplementationGuide.version", description="The version identifier of the implementation guide", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="ImplementationGuide.url", description="Absolute URL used to reference this Implementation Guide", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="ImplementationGuide.status", description="The current status of the implementation guide", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/InstantType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/InstantType.java new file mode 100644 index 00000000000..684f7a36a7f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/InstantType.java @@ -0,0 +1,223 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; +import java.util.zip.DataFormatException; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR instant datatype. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ +@DatatypeDef(name="instant") +public class InstantType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.MILLI; + + /** + * Constructor which creates an InstantDt with no timne value. Note + * that unlike the default constructor for the Java {@link Date} or + * {@link Calendar} objects, this constructor does not initialize the object + * with the current time. + * + * @see #withCurrentTime() to create a new object that has been initialized + * with the current time. + */ + public InstantType() { + super(); + } + + /** + * Create a new DateTimeDt + */ + public InstantType(Calendar theCalendar) { + super(theCalendar.getTime(), DEFAULT_PRECISION, theCalendar.getTimeZone()); + } + + /** + * Create a new instance using the given date, precision level, and time zone + * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public InstantType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { + super(theDate, thePrecision, theTimezone); + } + + + /** + * Create a new DateTimeDt using an existing value. Use this constructor with caution, + * as it may create more precision than warranted (since for example it is possible to pass in + * a DateTime with only a year, and this constructor will convert to an InstantDt with + * milliseconds precision). + */ + public InstantType(BaseDateTimeType theDateTime) { + // Do not call super(foo) here, we don't want to trigger a DataFormatException + setValue(theDateTime.getValue()); + setPrecision(DEFAULT_PRECISION); + setTimeZone(theDateTime.getTimeZone()); + } + + /** + * Create a new DateTimeDt with the given date/time and {@link TemporalPrecisionEnum#MILLI} precision + */ + public InstantType(Date theDate) { + super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); + } + + /** + * Constructor which accepts a date value and a precision value. Valid + * precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ + public InstantType(Date theDate, TemporalPrecisionEnum thePrecision) { + setValue(theDate); + setPrecision(thePrecision); + setTimeZone(TimeZone.getDefault()); + } + + /** + * Create a new InstantDt from a string value + * + * @param theString + * The string representation of the string. Must be in a valid + * format according to the FHIR specification + * @throws DataFormatException + */ + public InstantType(String theString) { + super(theString); + } + + /** + * Invokes {@link Date#after(Date)} on the contained Date against the given + * date + * + * @throws NullPointerException + * If the {@link #getValue() contained Date} is null + */ + public boolean after(Date theDate) { + return getValue().after(theDate); + } + + /** + * Invokes {@link Date#before(Date)} on the contained Date against the given + * date + * + * @throws NullPointerException + * If the {@link #getValue() contained Date} is null + */ + public boolean before(Date theDate) { + return getValue().before(theDate); + } + + /** + * Sets the value of this instant to the current time (from the system + * clock) and the local/default timezone (as retrieved using + * {@link TimeZone#getDefault()}. This TimeZone is generally obtained from + * the underlying OS. + */ + public void setToCurrentTimeInLocalTimeZone() { + setValue(new Date()); + setTimeZone(TimeZone.getDefault()); + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case SECOND: + case MILLI: + return true; + default: + return false; + } + } + + /** + * Factory method which creates a new InstantDt with millisecond precision and initializes it with the + * current time and the system local timezone. + */ + public static InstantType withCurrentTime() { + return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + + @Override + public InstantType copy() { + return new InstantType(getValue()); + } + + /** + * Returns a new instance of DateTimeType with the current system time and MILLI precision and the system local time + * zone + */ + public static InstantType now() { + return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static InstantType parseV3(String theV3String) { + InstantType retVal = new InstantType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + public String fhirType() { + return "instant"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IntegerType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IntegerType.java new file mode 100644 index 00000000000..cbbb67d81c0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/IntegerType.java @@ -0,0 +1,110 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "integer" in FHIR: A signed 32-bit integer + */ +@DatatypeDef(name = "integer") +public class IntegerType extends PrimitiveType implements IBaseIntegerDatatype { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public IntegerType() { + // nothing + } + + /** + * Constructor + */ + public IntegerType(int theInteger) { + setValue(theInteger); + } + + /** + * Constructor + * + * @param theIntegerAsString + * A string representation of an integer + * @throws IllegalArgumentException + * If the string is not a valid integer representation + */ + public IntegerType(String theIntegerAsString) { + setValueAsString(theIntegerAsString); + } + + /** + * Constructor + * + * @param theValue The value + * @throws IllegalArgumentException If the value is too large to fit in a signed integer + */ + public IntegerType(Long theValue) { + if (theValue < java.lang.Integer.MIN_VALUE || theValue > java.lang.Integer.MAX_VALUE) { + throw new IllegalArgumentException + (theValue + " cannot be cast to int without changing its value."); + } + if(theValue!=null) { + setValue((int)theValue.longValue()); + } + } + + @Override + protected Integer parse(String theValue) { + try { + return Integer.parseInt(theValue); + } catch (NumberFormatException e) { + throw new IllegalArgumentException(e); + } + } + + @Override + protected String encode(Integer theValue) { + return Integer.toString(theValue); + } + + @Override + public IntegerType copy() { + return new IntegerType(getValue()); + } + + public String fhirType() { + return "integer"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Library.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Library.java new file mode 100644 index 00000000000..c39591a022b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Library.java @@ -0,0 +1,422 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library. + */ +@ResourceDef(name="Library", profile="http://hl7.org/fhir/Profile/Library") +public class Library extends DomainResource { + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The metadata information for the library", formalDefinition="A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library." ) + protected Reference moduleMetadata; + + /** + * The actual object that is the target of the reference (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + */ + protected ModuleMetadata moduleMetadataTarget; + + /** + * A reference to a ModuleDefinition resource describing the header information for the library. + */ + @Child(name = "moduleDefinition", type = {ModuleDefinition.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The header information for the library", formalDefinition="A reference to a ModuleDefinition resource describing the header information for the library." ) + protected Reference moduleDefinition; + + /** + * The actual object that is the target of the reference (A reference to a ModuleDefinition resource describing the header information for the library.) + */ + protected ModuleDefinition moduleDefinitionTarget; + + /** + * The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document. + */ + @Child(name = "document", type = {Attachment.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The content of the library", formalDefinition="The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document." ) + protected Attachment document; + + private static final long serialVersionUID = 1670041401L; + + /* + * Constructor + */ + public Library() { + super(); + } + + /* + * Constructor + */ + public Library(Reference moduleDefinition, Attachment document) { + super(); + this.moduleDefinition = moduleDefinition; + this.document = document; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Library addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Library setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public Library setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + */ + public Reference getModuleMetadata() { + if (this.moduleMetadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadata = new Reference(); // cc + return this.moduleMetadata; + } + + public boolean hasModuleMetadata() { + return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); + } + + /** + * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + */ + public Library setModuleMetadata(Reference value) { + this.moduleMetadata = value; + return this; + } + + /** + * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + */ + public ModuleMetadata getModuleMetadataTarget() { + if (this.moduleMetadataTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadataTarget = new ModuleMetadata(); // aa + return this.moduleMetadataTarget; + } + + /** + * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + */ + public Library setModuleMetadataTarget(ModuleMetadata value) { + this.moduleMetadataTarget = value; + return this; + } + + /** + * @return {@link #moduleDefinition} (A reference to a ModuleDefinition resource describing the header information for the library.) + */ + public Reference getModuleDefinition() { + if (this.moduleDefinition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.moduleDefinition"); + else if (Configuration.doAutoCreate()) + this.moduleDefinition = new Reference(); // cc + return this.moduleDefinition; + } + + public boolean hasModuleDefinition() { + return this.moduleDefinition != null && !this.moduleDefinition.isEmpty(); + } + + /** + * @param value {@link #moduleDefinition} (A reference to a ModuleDefinition resource describing the header information for the library.) + */ + public Library setModuleDefinition(Reference value) { + this.moduleDefinition = value; + return this; + } + + /** + * @return {@link #moduleDefinition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleDefinition resource describing the header information for the library.) + */ + public ModuleDefinition getModuleDefinitionTarget() { + if (this.moduleDefinitionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.moduleDefinition"); + else if (Configuration.doAutoCreate()) + this.moduleDefinitionTarget = new ModuleDefinition(); // aa + return this.moduleDefinitionTarget; + } + + /** + * @param value {@link #moduleDefinition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleDefinition resource describing the header information for the library.) + */ + public Library setModuleDefinitionTarget(ModuleDefinition value) { + this.moduleDefinitionTarget = value; + return this; + } + + /** + * @return {@link #document} (The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public Attachment getDocument() { + if (this.document == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Library.document"); + else if (Configuration.doAutoCreate()) + this.document = new Attachment(); // cc + return this.document; + } + + public boolean hasDocument() { + return this.document != null && !this.document.isEmpty(); + } + + /** + * @param value {@link #document} (The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public Library setDocument(Attachment value) { + this.document = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("moduleDefinition", "Reference(ModuleDefinition)", "A reference to a ModuleDefinition resource describing the header information for the library.", 0, java.lang.Integer.MAX_VALUE, moduleDefinition)); + childrenList.add(new Property("document", "Attachment", "The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.", 0, java.lang.Integer.MAX_VALUE, document)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("moduleMetadata")) + this.moduleMetadata = castToReference(value); // Reference + else if (name.equals("moduleDefinition")) + this.moduleDefinition = castToReference(value); // Reference + else if (name.equals("document")) + this.document = castToAttachment(value); // Attachment + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.version"); + } + else if (name.equals("moduleMetadata")) { + this.moduleMetadata = new Reference(); + return this.moduleMetadata; + } + else if (name.equals("moduleDefinition")) { + this.moduleDefinition = new Reference(); + return this.moduleDefinition; + } + else if (name.equals("document")) { + this.document = new Attachment(); + return this.document; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Library"; + + } + + public Library copy() { + Library dst = new Library(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + dst.moduleDefinition = moduleDefinition == null ? null : moduleDefinition.copy(); + dst.document = document == null ? null : document.copy(); + return dst; + } + + protected Library typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Library)) + return false; + Library o = (Library) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) + && compareDeep(moduleDefinition, o.moduleDefinition, true) && compareDeep(document, o.document, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Library)) + return false; + Library o = (Library) other; + return compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (moduleMetadata == null || moduleMetadata.isEmpty()) && (moduleDefinition == null || moduleDefinition.isEmpty()) + && (document == null || document.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Library; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/List_.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/List_.java new file mode 100644 index 00000000000..2ac9eab4193 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/List_.java @@ -0,0 +1,1377 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A set of information summarized from a list of other resources. + */ +@ResourceDef(name="List", profile="http://hl7.org/fhir/Profile/List_") +public class List_ extends DomainResource { + + public enum ListStatus { + /** + * The list is considered to be an active part of the patient's record. + */ + CURRENT, + /** + * The list is "old" and should no longer be considered accurate or relevant. + */ + RETIRED, + /** + * The list was never accurate. It is retained for medico-legal purposes only. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ListStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return CURRENT; + if ("retired".equals(codeString)) + return RETIRED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ListStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CURRENT: return "current"; + case RETIRED: return "retired"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CURRENT: return "http://hl7.org/fhir/list-status"; + case RETIRED: return "http://hl7.org/fhir/list-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/list-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CURRENT: return "The list is considered to be an active part of the patient's record."; + case RETIRED: return "The list is \"old\" and should no longer be considered accurate or relevant."; + case ENTEREDINERROR: return "The list was never accurate. It is retained for medico-legal purposes only."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CURRENT: return "Current"; + case RETIRED: return "Retired"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + } + + public static class ListStatusEnumFactory implements EnumFactory { + public ListStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return ListStatus.CURRENT; + if ("retired".equals(codeString)) + return ListStatus.RETIRED; + if ("entered-in-error".equals(codeString)) + return ListStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ListStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return new Enumeration(this, ListStatus.CURRENT); + if ("retired".equals(codeString)) + return new Enumeration(this, ListStatus.RETIRED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ListStatus.ENTEREDINERROR); + throw new FHIRException("Unknown ListStatus code '"+codeString+"'"); + } + public String toCode(ListStatus code) { + if (code == ListStatus.CURRENT) + return "current"; + if (code == ListStatus.RETIRED) + return "retired"; + if (code == ListStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + public enum ListMode { + /** + * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes + */ + WORKING, + /** + * This list was prepared as a snapshot. It should not be assumed to be current + */ + SNAPSHOT, + /** + * A list that indicates where changes have been made or recommended + */ + CHANGES, + /** + * added to help the parsers + */ + NULL; + public static ListMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("working".equals(codeString)) + return WORKING; + if ("snapshot".equals(codeString)) + return SNAPSHOT; + if ("changes".equals(codeString)) + return CHANGES; + throw new FHIRException("Unknown ListMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case WORKING: return "working"; + case SNAPSHOT: return "snapshot"; + case CHANGES: return "changes"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case WORKING: return "http://hl7.org/fhir/list-mode"; + case SNAPSHOT: return "http://hl7.org/fhir/list-mode"; + case CHANGES: return "http://hl7.org/fhir/list-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case WORKING: return "This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes"; + case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current"; + case CHANGES: return "A list that indicates where changes have been made or recommended"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case WORKING: return "Working List"; + case SNAPSHOT: return "Snapshot List"; + case CHANGES: return "Change List"; + default: return "?"; + } + } + } + + public static class ListModeEnumFactory implements EnumFactory { + public ListMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("working".equals(codeString)) + return ListMode.WORKING; + if ("snapshot".equals(codeString)) + return ListMode.SNAPSHOT; + if ("changes".equals(codeString)) + return ListMode.CHANGES; + throw new IllegalArgumentException("Unknown ListMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("working".equals(codeString)) + return new Enumeration(this, ListMode.WORKING); + if ("snapshot".equals(codeString)) + return new Enumeration(this, ListMode.SNAPSHOT); + if ("changes".equals(codeString)) + return new Enumeration(this, ListMode.CHANGES); + throw new FHIRException("Unknown ListMode code '"+codeString+"'"); + } + public String toCode(ListMode code) { + if (code == ListMode.WORKING) + return "working"; + if (code == ListMode.SNAPSHOT) + return "snapshot"; + if (code == ListMode.CHANGES) + return "changes"; + return "?"; + } + } + + @Block() + public static class ListEntryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The flag allows the system constructing the list to indicate the role and significance of the item in the list. + */ + @Child(name = "flag", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Status/Workflow information about this item", formalDefinition="The flag allows the system constructing the list to indicate the role and significance of the item in the list." ) + protected CodeableConcept flag; + + /** + * True if this item is marked as deleted in the list. + */ + @Child(name = "deleted", type = {BooleanType.class}, order=2, min=0, max=1, modifier=true, summary=false) + @Description(shortDefinition="If this item is actually marked as deleted", formalDefinition="True if this item is marked as deleted in the list." ) + protected BooleanType deleted; + + /** + * When this item was added to the list. + */ + @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When item added to list", formalDefinition="When this item was added to the list." ) + protected DateTimeType date; + + /** + * A reference to the actual resource from which data was derived. + */ + @Child(name = "item", type = {}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Actual entry", formalDefinition="A reference to the actual resource from which data was derived." ) + protected Reference item; + + /** + * The actual object that is the target of the reference (A reference to the actual resource from which data was derived.) + */ + protected Resource itemTarget; + + private static final long serialVersionUID = -758164425L; + + /* + * Constructor + */ + public ListEntryComponent() { + super(); + } + + /* + * Constructor + */ + public ListEntryComponent(Reference item) { + super(); + this.item = item; + } + + /** + * @return {@link #flag} (The flag allows the system constructing the list to indicate the role and significance of the item in the list.) + */ + public CodeableConcept getFlag() { + if (this.flag == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ListEntryComponent.flag"); + else if (Configuration.doAutoCreate()) + this.flag = new CodeableConcept(); // cc + return this.flag; + } + + public boolean hasFlag() { + return this.flag != null && !this.flag.isEmpty(); + } + + /** + * @param value {@link #flag} (The flag allows the system constructing the list to indicate the role and significance of the item in the list.) + */ + public ListEntryComponent setFlag(CodeableConcept value) { + this.flag = value; + return this; + } + + /** + * @return {@link #deleted} (True if this item is marked as deleted in the list.). This is the underlying object with id, value and extensions. The accessor "getDeleted" gives direct access to the value + */ + public BooleanType getDeletedElement() { + if (this.deleted == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ListEntryComponent.deleted"); + else if (Configuration.doAutoCreate()) + this.deleted = new BooleanType(); // bb + return this.deleted; + } + + public boolean hasDeletedElement() { + return this.deleted != null && !this.deleted.isEmpty(); + } + + public boolean hasDeleted() { + return this.deleted != null && !this.deleted.isEmpty(); + } + + /** + * @param value {@link #deleted} (True if this item is marked as deleted in the list.). This is the underlying object with id, value and extensions. The accessor "getDeleted" gives direct access to the value + */ + public ListEntryComponent setDeletedElement(BooleanType value) { + this.deleted = value; + return this; + } + + /** + * @return True if this item is marked as deleted in the list. + */ + public boolean getDeleted() { + return this.deleted == null || this.deleted.isEmpty() ? false : this.deleted.getValue(); + } + + /** + * @param value True if this item is marked as deleted in the list. + */ + public ListEntryComponent setDeleted(boolean value) { + if (this.deleted == null) + this.deleted = new BooleanType(); + this.deleted.setValue(value); + return this; + } + + /** + * @return {@link #date} (When this item was added to the list.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ListEntryComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (When this item was added to the list.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ListEntryComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return When this item was added to the list. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value When this item was added to the list. + */ + public ListEntryComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #item} (A reference to the actual resource from which data was derived.) + */ + public Reference getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ListEntryComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new Reference(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (A reference to the actual resource from which data was derived.) + */ + public ListEntryComponent setItem(Reference value) { + this.item = value; + return this; + } + + /** + * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the actual resource from which data was derived.) + */ + public Resource getItemTarget() { + return this.itemTarget; + } + + /** + * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the actual resource from which data was derived.) + */ + public ListEntryComponent setItemTarget(Resource value) { + this.itemTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("flag", "CodeableConcept", "The flag allows the system constructing the list to indicate the role and significance of the item in the list.", 0, java.lang.Integer.MAX_VALUE, flag)); + childrenList.add(new Property("deleted", "boolean", "True if this item is marked as deleted in the list.", 0, java.lang.Integer.MAX_VALUE, deleted)); + childrenList.add(new Property("date", "dateTime", "When this item was added to the list.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("item", "Reference(Any)", "A reference to the actual resource from which data was derived.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("flag")) + this.flag = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("deleted")) + this.deleted = castToBoolean(value); // BooleanType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("item")) + this.item = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("flag")) { + this.flag = new CodeableConcept(); + return this.flag; + } + else if (name.equals("deleted")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.deleted"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.date"); + } + else if (name.equals("item")) { + this.item = new Reference(); + return this.item; + } + else + return super.addChild(name); + } + + public ListEntryComponent copy() { + ListEntryComponent dst = new ListEntryComponent(); + copyValues(dst); + dst.flag = flag == null ? null : flag.copy(); + dst.deleted = deleted == null ? null : deleted.copy(); + dst.date = date == null ? null : date.copy(); + dst.item = item == null ? null : item.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ListEntryComponent)) + return false; + ListEntryComponent o = (ListEntryComponent) other; + return compareDeep(flag, o.flag, true) && compareDeep(deleted, o.deleted, true) && compareDeep(date, o.date, true) + && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ListEntryComponent)) + return false; + ListEntryComponent o = (ListEntryComponent) other; + return compareValues(deleted, o.deleted, true) && compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (flag == null || flag.isEmpty()) && (deleted == null || deleted.isEmpty()) + && (date == null || date.isEmpty()) && (item == null || item.isEmpty()); + } + + public String fhirType() { + return "List.entry"; + + } + + } + + /** + * Identifier for the List assigned for business purposes outside the context of FHIR. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Business identifier", formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR." ) + protected List identifier; + + /** + * A label for the list assigned by the author. + */ + @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Descriptive name for the list", formalDefinition="A label for the list assigned by the author." ) + protected StringType title; + + /** + * This code defines the purpose of the list - why it was created. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="What the purpose of this list is", formalDefinition="This code defines the purpose of the list - why it was created." ) + protected CodeableConcept code; + + /** + * The common subject (or patient) of the resources that are in the list, if there is one. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If all resources have the same subject", formalDefinition="The common subject (or patient) of the resources that are in the list, if there is one." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The common subject (or patient) of the resources that are in the list, if there is one.) + */ + protected Resource subjectTarget; + + /** + * The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list. + */ + @Child(name = "source", type = {Practitioner.class, Patient.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what defined the list contents (aka Author)", formalDefinition="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.) + */ + protected Resource sourceTarget; + + /** + * The encounter that is the context in which this list was created. + */ + @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Context in which list created", formalDefinition="The encounter that is the context in which this list was created." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter that is the context in which this list was created.) + */ + protected Encounter encounterTarget; + + /** + * Indicates the current state of this list. + */ + @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="current | retired | entered-in-error", formalDefinition="Indicates the current state of this list." ) + protected Enumeration status; + + /** + * The date that the list was prepared. + */ + @Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the list was prepared", formalDefinition="The date that the list was prepared." ) + protected DateTimeType date; + + /** + * What order applies to the items in the list. + */ + @Child(name = "orderedBy", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What order the list has", formalDefinition="What order applies to the items in the list." ) + protected CodeableConcept orderedBy; + + /** + * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + @Child(name = "mode", type = {CodeType.class}, order=9, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="working | snapshot | changes", formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) + protected Enumeration mode; + + /** + * Comments that apply to the overall list. + */ + @Child(name = "note", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comments about the list", formalDefinition="Comments that apply to the overall list." ) + protected StringType note; + + /** + * Entries in this list. + */ + @Child(name = "entry", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Entries in the list", formalDefinition="Entries in this list." ) + protected List entry; + + /** + * If the list is empty, why the list is empty. + */ + @Child(name = "emptyReason", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why list is empty", formalDefinition="If the list is empty, why the list is empty." ) + protected CodeableConcept emptyReason; + + private static final long serialVersionUID = 1819128642L; + + /* + * Constructor + */ + public List_() { + super(); + } + + /* + * Constructor + */ + public List_(Enumeration status, Enumeration mode) { + super(); + this.status = status; + this.mode = mode; + } + + /** + * @return {@link #identifier} (Identifier for the List assigned for business purposes outside the context of FHIR.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier for the List assigned for business purposes outside the context of FHIR.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public List_ addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #title} (A label for the list assigned by the author.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (A label for the list assigned by the author.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public List_ setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return A label for the list assigned by the author. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value A label for the list assigned by the author. + */ + public List_ setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (This code defines the purpose of the list - why it was created.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (This code defines the purpose of the list - why it was created.) + */ + public List_ setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #subject} (The common subject (or patient) of the resources that are in the list, if there is one.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The common subject (or patient) of the resources that are in the list, if there is one.) + */ + public List_ setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The common subject (or patient) of the resources that are in the list, if there is one.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The common subject (or patient) of the resources that are in the list, if there is one.) + */ + public List_ setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #source} (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.) + */ + public List_ setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.) + */ + public Resource getSourceTarget() { + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.) + */ + public List_ setSourceTarget(Resource value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The encounter that is the context in which this list was created.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter that is the context in which this list was created.) + */ + public List_ setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter that is the context in which this list was created.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter that is the context in which this list was created.) + */ + public List_ setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #status} (Indicates the current state of this list.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ListStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates the current state of this list.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public List_ setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates the current state of this list. + */ + public ListStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates the current state of this list. + */ + public List_ setStatus(ListStatus value) { + if (this.status == null) + this.status = new Enumeration(new ListStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #date} (The date that the list was prepared.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date that the list was prepared.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public List_ setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date that the list was prepared. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date that the list was prepared. + */ + public List_ setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #orderedBy} (What order applies to the items in the list.) + */ + public CodeableConcept getOrderedBy() { + if (this.orderedBy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.orderedBy"); + else if (Configuration.doAutoCreate()) + this.orderedBy = new CodeableConcept(); // cc + return this.orderedBy; + } + + public boolean hasOrderedBy() { + return this.orderedBy != null && !this.orderedBy.isEmpty(); + } + + /** + * @param value {@link #orderedBy} (What order applies to the items in the list.) + */ + public List_ setOrderedBy(CodeableConcept value) { + this.orderedBy = value; + return this; + } + + /** + * @return {@link #mode} (How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new ListModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public List_ setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + public ListMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. + */ + public List_ setMode(ListMode value) { + if (this.mode == null) + this.mode = new Enumeration(new ListModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #note} (Comments that apply to the overall list.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Comments that apply to the overall list.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public List_ setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return Comments that apply to the overall list. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value Comments that apply to the overall list. + */ + public List_ setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #entry} (Entries in this list.) + */ + public List getEntry() { + if (this.entry == null) + this.entry = new ArrayList(); + return this.entry; + } + + public boolean hasEntry() { + if (this.entry == null) + return false; + for (ListEntryComponent item : this.entry) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #entry} (Entries in this list.) + */ + // syntactic sugar + public ListEntryComponent addEntry() { //3 + ListEntryComponent t = new ListEntryComponent(); + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return t; + } + + // syntactic sugar + public List_ addEntry(ListEntryComponent t) { //3 + if (t == null) + return this; + if (this.entry == null) + this.entry = new ArrayList(); + this.entry.add(t); + return this; + } + + /** + * @return {@link #emptyReason} (If the list is empty, why the list is empty.) + */ + public CodeableConcept getEmptyReason() { + if (this.emptyReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create List_.emptyReason"); + else if (Configuration.doAutoCreate()) + this.emptyReason = new CodeableConcept(); // cc + return this.emptyReason; + } + + public boolean hasEmptyReason() { + return this.emptyReason != null && !this.emptyReason.isEmpty(); + } + + /** + * @param value {@link #emptyReason} (If the list is empty, why the list is empty.) + */ + public List_ setEmptyReason(CodeableConcept value) { + this.emptyReason = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier for the List assigned for business purposes outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("title", "string", "A label for the list assigned by the author.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("code", "CodeableConcept", "This code defines the purpose of the list - why it was created.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The common subject (or patient) of the resources that are in the list, if there is one.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("source", "Reference(Practitioner|Patient|Device)", "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter that is the context in which this list was created.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("status", "code", "Indicates the current state of this list.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("date", "dateTime", "The date that the list was prepared.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("orderedBy", "CodeableConcept", "What order applies to the items in the list.", 0, java.lang.Integer.MAX_VALUE, orderedBy)); + childrenList.add(new Property("mode", "code", "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("note", "string", "Comments that apply to the overall list.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("entry", "", "Entries in this list.", 0, java.lang.Integer.MAX_VALUE, entry)); + childrenList.add(new Property("emptyReason", "CodeableConcept", "If the list is empty, why the list is empty.", 0, java.lang.Integer.MAX_VALUE, emptyReason)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new ListStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("orderedBy")) + this.orderedBy = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("mode")) + this.mode = new ListModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("note")) + this.note = castToString(value); // StringType + else if (name.equals("entry")) + this.getEntry().add((ListEntryComponent) value); + else if (name.equals("emptyReason")) + this.emptyReason = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.title"); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.status"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.date"); + } + else if (name.equals("orderedBy")) { + this.orderedBy = new CodeableConcept(); + return this.orderedBy; + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.mode"); + } + else if (name.equals("note")) { + throw new FHIRException("Cannot call addChild on a primitive type List_.note"); + } + else if (name.equals("entry")) { + return addEntry(); + } + else if (name.equals("emptyReason")) { + this.emptyReason = new CodeableConcept(); + return this.emptyReason; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "List"; + + } + + public List_ copy() { + List_ dst = new List_(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.title = title == null ? null : title.copy(); + dst.code = code == null ? null : code.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.source = source == null ? null : source.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.status = status == null ? null : status.copy(); + dst.date = date == null ? null : date.copy(); + dst.orderedBy = orderedBy == null ? null : orderedBy.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.note = note == null ? null : note.copy(); + if (entry != null) { + dst.entry = new ArrayList(); + for (ListEntryComponent i : entry) + dst.entry.add(i.copy()); + }; + dst.emptyReason = emptyReason == null ? null : emptyReason.copy(); + return dst; + } + + protected List_ typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof List_)) + return false; + List_ o = (List_) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(title, o.title, true) && compareDeep(code, o.code, true) + && compareDeep(subject, o.subject, true) && compareDeep(source, o.source, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(status, o.status, true) && compareDeep(date, o.date, true) && compareDeep(orderedBy, o.orderedBy, true) + && compareDeep(mode, o.mode, true) && compareDeep(note, o.note, true) && compareDeep(entry, o.entry, true) + && compareDeep(emptyReason, o.emptyReason, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof List_)) + return false; + List_ o = (List_) other; + return compareValues(title, o.title, true) && compareValues(status, o.status, true) && compareValues(date, o.date, true) + && compareValues(mode, o.mode, true) && compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (title == null || title.isEmpty()) + && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) && (source == null || source.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) + && (orderedBy == null || orderedBy.isEmpty()) && (mode == null || mode.isEmpty()) && (note == null || note.isEmpty()) + && (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.List; + } + + @SearchParamDefinition(name="date", path="List.date", description="When the list was prepared", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="item", path="List.entry.item", description="Actual entry", type="reference" ) + public static final String SP_ITEM = "item"; + @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="Why list is empty", type="token" ) + public static final String SP_EMPTYREASON = "empty-reason"; + @SearchParamDefinition(name="code", path="List.code", description="What the purpose of this list is", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="notes", path="List.note", description="Comments about the list", type="string" ) + public static final String SP_NOTES = "notes"; + @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="List.subject", description="If all resources have the same subject", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="encounter", path="List.encounter", description="Context in which list created", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="title", path="List.title", description="Descriptive name for the list", type="string" ) + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="status", path="List.status", description="current | retired | entered-in-error", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Location.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Location.java new file mode 100644 index 00000000000..8b393e9a71a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Location.java @@ -0,0 +1,1307 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ +@ResourceDef(name="Location", profile="http://hl7.org/fhir/Profile/Location") +public class Location extends DomainResource { + + public enum LocationStatus { + /** + * The location is operational. + */ + ACTIVE, + /** + * The location is temporarily closed. + */ + SUSPENDED, + /** + * The location is no longer used. + */ + INACTIVE, + /** + * added to help the parsers + */ + NULL; + public static LocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("inactive".equals(codeString)) + return INACTIVE; + throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case INACTIVE: return "inactive"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/location-status"; + case SUSPENDED: return "http://hl7.org/fhir/location-status"; + case INACTIVE: return "http://hl7.org/fhir/location-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The location is operational."; + case SUSPENDED: return "The location is temporarily closed."; + case INACTIVE: return "The location is no longer used."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case INACTIVE: return "Inactive"; + default: return "?"; + } + } + } + + public static class LocationStatusEnumFactory implements EnumFactory { + public LocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return LocationStatus.ACTIVE; + if ("suspended".equals(codeString)) + return LocationStatus.SUSPENDED; + if ("inactive".equals(codeString)) + return LocationStatus.INACTIVE; + throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, LocationStatus.ACTIVE); + if ("suspended".equals(codeString)) + return new Enumeration(this, LocationStatus.SUSPENDED); + if ("inactive".equals(codeString)) + return new Enumeration(this, LocationStatus.INACTIVE); + throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); + } + public String toCode(LocationStatus code) { + if (code == LocationStatus.ACTIVE) + return "active"; + if (code == LocationStatus.SUSPENDED) + return "suspended"; + if (code == LocationStatus.INACTIVE) + return "inactive"; + return "?"; + } + } + + public enum LocationMode { + /** + * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). + */ + INSTANCE, + /** + * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). + */ + KIND, + /** + * added to help the parsers + */ + NULL; + public static LocationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("kind".equals(codeString)) + return KIND; + throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case KIND: return "kind"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INSTANCE: return "http://hl7.org/fhir/location-mode"; + case KIND: return "http://hl7.org/fhir/location-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; + case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case KIND: return "Kind"; + default: return "?"; + } + } + } + + public static class LocationModeEnumFactory implements EnumFactory { + public LocationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return LocationMode.INSTANCE; + if ("kind".equals(codeString)) + return LocationMode.KIND; + throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return new Enumeration(this, LocationMode.INSTANCE); + if ("kind".equals(codeString)) + return new Enumeration(this, LocationMode.KIND); + throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); + } + public String toCode(LocationMode code) { + if (code == LocationMode.INSTANCE) + return "instance"; + if (code == LocationMode.KIND) + return "kind"; + return "?"; + } + } + + @Block() + public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). + */ + @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Longitude with WGS84 datum", formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)." ) + protected DecimalType longitude; + + /** + * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). + */ + @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Latitude with WGS84 datum", formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)." ) + protected DecimalType latitude; + + /** + * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). + */ + @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Altitude with WGS84 datum", formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)." ) + protected DecimalType altitude; + + private static final long serialVersionUID = -74276134L; + + /* + * Constructor + */ + public LocationPositionComponent() { + super(); + } + + /* + * Constructor + */ + public LocationPositionComponent(DecimalType longitude, DecimalType latitude) { + super(); + this.longitude = longitude; + this.latitude = latitude; + } + + /** + * @return {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value + */ + public DecimalType getLongitudeElement() { + if (this.longitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.longitude"); + else if (Configuration.doAutoCreate()) + this.longitude = new DecimalType(); // bb + return this.longitude; + } + + public boolean hasLongitudeElement() { + return this.longitude != null && !this.longitude.isEmpty(); + } + + public boolean hasLongitude() { + return this.longitude != null && !this.longitude.isEmpty(); + } + + /** + * @param value {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value + */ + public LocationPositionComponent setLongitudeElement(DecimalType value) { + this.longitude = value; + return this; + } + + /** + * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). + */ + public BigDecimal getLongitude() { + return this.longitude == null ? null : this.longitude.getValue(); + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). + */ + public LocationPositionComponent setLongitude(BigDecimal value) { + if (this.longitude == null) + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). + */ + public LocationPositionComponent setLongitude(long value) { + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). + */ + public LocationPositionComponent setLongitude(double value) { + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @return {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value + */ + public DecimalType getLatitudeElement() { + if (this.latitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.latitude"); + else if (Configuration.doAutoCreate()) + this.latitude = new DecimalType(); // bb + return this.latitude; + } + + public boolean hasLatitudeElement() { + return this.latitude != null && !this.latitude.isEmpty(); + } + + public boolean hasLatitude() { + return this.latitude != null && !this.latitude.isEmpty(); + } + + /** + * @param value {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value + */ + public LocationPositionComponent setLatitudeElement(DecimalType value) { + this.latitude = value; + return this; + } + + /** + * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). + */ + public BigDecimal getLatitude() { + return this.latitude == null ? null : this.latitude.getValue(); + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). + */ + public LocationPositionComponent setLatitude(BigDecimal value) { + if (this.latitude == null) + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). + */ + public LocationPositionComponent setLatitude(long value) { + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). + */ + public LocationPositionComponent setLatitude(double value) { + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @return {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value + */ + public DecimalType getAltitudeElement() { + if (this.altitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.altitude"); + else if (Configuration.doAutoCreate()) + this.altitude = new DecimalType(); // bb + return this.altitude; + } + + public boolean hasAltitudeElement() { + return this.altitude != null && !this.altitude.isEmpty(); + } + + public boolean hasAltitude() { + return this.altitude != null && !this.altitude.isEmpty(); + } + + /** + * @param value {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value + */ + public LocationPositionComponent setAltitudeElement(DecimalType value) { + this.altitude = value; + return this; + } + + /** + * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). + */ + public BigDecimal getAltitude() { + return this.altitude == null ? null : this.altitude.getValue(); + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). + */ + public LocationPositionComponent setAltitude(BigDecimal value) { + if (value == null) + this.altitude = null; + else { + if (this.altitude == null) + this.altitude = new DecimalType(); + this.altitude.setValue(value); + } + return this; + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). + */ + public LocationPositionComponent setAltitude(long value) { + this.altitude = new DecimalType(); + this.altitude.setValue(value); + return this; + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). + */ + public LocationPositionComponent setAltitude(double value) { + this.altitude = new DecimalType(); + this.altitude.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, longitude)); + childrenList.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, latitude)); + childrenList.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, altitude)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("longitude")) + this.longitude = castToDecimal(value); // DecimalType + else if (name.equals("latitude")) + this.latitude = castToDecimal(value); // DecimalType + else if (name.equals("altitude")) + this.altitude = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("longitude")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.longitude"); + } + else if (name.equals("latitude")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.latitude"); + } + else if (name.equals("altitude")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.altitude"); + } + else + return super.addChild(name); + } + + public LocationPositionComponent copy() { + LocationPositionComponent dst = new LocationPositionComponent(); + copyValues(dst); + dst.longitude = longitude == null ? null : longitude.copy(); + dst.latitude = latitude == null ? null : latitude.copy(); + dst.altitude = altitude == null ? null : altitude.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LocationPositionComponent)) + return false; + LocationPositionComponent o = (LocationPositionComponent) other; + return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LocationPositionComponent)) + return false; + LocationPositionComponent o = (LocationPositionComponent) other; + return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (longitude == null || longitude.isEmpty()) && (latitude == null || latitude.isEmpty()) + && (altitude == null || altitude.isEmpty()); + } + + public String fhirType() { + return "Location.position"; + + } + + } + + /** + * Unique code or number identifying the location to its users. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) + protected List identifier; + + /** + * active | suspended | inactive. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | suspended | inactive", formalDefinition="active | suspended | inactive." ) + protected Enumeration status; + + /** + * Name of the location as used by humans. Does not need to be unique. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) + protected StringType name; + + /** + * Description of the Location, which helps in finding or referencing the place. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of the location", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) + protected StringType description; + + /** + * Indicates whether a resource instance represents a specific location or a class of locations. + */ + @Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) + protected Enumeration mode; + + /** + * Indicates the type of function performed at the location. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) + protected CodeableConcept type; + + /** + * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) + protected List telecom; + + /** + * Physical location. + */ + @Child(name = "address", type = {Address.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) + protected Address address; + + /** + * Physical form of the location, e.g. building, room, vehicle, road. + */ + @Child(name = "physicalType", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) + protected CodeableConcept physicalType; + + /** + * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). + */ + @Child(name = "position", type = {}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." ) + protected LocationPositionComponent position; + + /** + * The organization responsible for the provisioning and upkeep of the location. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The organization responsible for the provisioning and upkeep of the location.) + */ + protected Organization managingOrganizationTarget; + + /** + * Another Location which this Location is physically part of. + */ + @Child(name = "partOf", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Another Location this one is physically part of", formalDefinition="Another Location which this Location is physically part of." ) + protected Reference partOf; + + /** + * The actual object that is the target of the reference (Another Location which this Location is physically part of.) + */ + protected Location partOfTarget; + + private static final long serialVersionUID = -2100435761L; + + /* + * Constructor + */ + public Location() { + super(); + } + + /** + * @return {@link #identifier} (Unique code or number identifying the location to its users.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Unique code or number identifying the location to its users.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Location addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new LocationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Location setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return active | suspended | inactive. + */ + public LocationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value active | suspended | inactive. + */ + public Location setStatus(LocationStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new LocationStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Location setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name of the location as used by humans. Does not need to be unique. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name of the location as used by humans. Does not need to be unique. + */ + public Location setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Location setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Description of the Location, which helps in finding or referencing the place. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Description of the Location, which helps in finding or referencing the place. + */ + public Location setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new LocationModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Location setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Indicates whether a resource instance represents a specific location or a class of locations. + */ + public LocationMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Indicates whether a resource instance represents a specific location or a class of locations. + */ + public Location setMode(LocationMode value) { + if (value == null) + this.mode = null; + else { + if (this.mode == null) + this.mode = new Enumeration(new LocationModeEnumFactory()); + this.mode.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Indicates the type of function performed at the location.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Indicates the type of function performed at the location.) + */ + public Location setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Location addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #address} (Physical location.) + */ + public Address getAddress() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.address"); + else if (Configuration.doAutoCreate()) + this.address = new Address(); // cc + return this.address; + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (Physical location.) + */ + public Location setAddress(Address value) { + this.address = value; + return this; + } + + /** + * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) + */ + public CodeableConcept getPhysicalType() { + if (this.physicalType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.physicalType"); + else if (Configuration.doAutoCreate()) + this.physicalType = new CodeableConcept(); // cc + return this.physicalType; + } + + public boolean hasPhysicalType() { + return this.physicalType != null && !this.physicalType.isEmpty(); + } + + /** + * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) + */ + public Location setPhysicalType(CodeableConcept value) { + this.physicalType = value; + return this; + } + + /** + * @return {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) + */ + public LocationPositionComponent getPosition() { + if (this.position == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.position"); + else if (Configuration.doAutoCreate()) + this.position = new LocationPositionComponent(); // cc + return this.position; + } + + public boolean hasPosition() { + return this.position != null && !this.position.isEmpty(); + } + + /** + * @param value {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) + */ + public Location setPosition(LocationPositionComponent value) { + this.position = value; + return this; + } + + /** + * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) + */ + public Location setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) + */ + public Location setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #partOf} (Another Location which this Location is physically part of.) + */ + public Reference getPartOf() { + if (this.partOf == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.partOf"); + else if (Configuration.doAutoCreate()) + this.partOf = new Reference(); // cc + return this.partOf; + } + + public boolean hasPartOf() { + return this.partOf != null && !this.partOf.isEmpty(); + } + + /** + * @param value {@link #partOf} (Another Location which this Location is physically part of.) + */ + public Location setPartOf(Reference value) { + this.partOf = value; + return this; + } + + /** + * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) + */ + public Location getPartOfTarget() { + if (this.partOfTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.partOf"); + else if (Configuration.doAutoCreate()) + this.partOfTarget = new Location(); // aa + return this.partOfTarget; + } + + /** + * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) + */ + public Location setPartOfTarget(Location value) { + this.partOfTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "active | suspended | inactive.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("address", "Address", "Physical location.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, java.lang.Integer.MAX_VALUE, physicalType)); + childrenList.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, java.lang.Integer.MAX_VALUE, position)); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, java.lang.Integer.MAX_VALUE, partOf)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new LocationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("mode")) + this.mode = new LocationModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("address")) + this.address = castToAddress(value); // Address + else if (name.equals("physicalType")) + this.physicalType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("position")) + this.position = (LocationPositionComponent) value; // LocationPositionComponent + else if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else if (name.equals("partOf")) + this.partOf = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.status"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.description"); + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type Location.mode"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("address")) { + this.address = new Address(); + return this.address; + } + else if (name.equals("physicalType")) { + this.physicalType = new CodeableConcept(); + return this.physicalType; + } + else if (name.equals("position")) { + this.position = new LocationPositionComponent(); + return this.position; + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("partOf")) { + this.partOf = new Reference(); + return this.partOf; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Location"; + + } + + public Location copy() { + Location dst = new Location(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.type = type == null ? null : type.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.address = address == null ? null : address.copy(); + dst.physicalType = physicalType == null ? null : physicalType.copy(); + dst.position = position == null ? null : position.copy(); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.partOf = partOf == null ? null : partOf.copy(); + return dst; + } + + protected Location typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Location)) + return false; + Location o = (Location) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(name, o.name, true) + && compareDeep(description, o.description, true) && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true) + && compareDeep(position, o.position, true) && compareDeep(managingOrganization, o.managingOrganization, true) + && compareDeep(partOf, o.partOf, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Location)) + return false; + Location o = (Location) other; + return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) + && compareValues(mode, o.mode, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (mode == null || mode.isEmpty()) + && (type == null || type.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) + && (physicalType == null || physicalType.isEmpty()) && (position == null || position.isEmpty()) + && (managingOrganization == null || managingOrganization.isEmpty()) && (partOf == null || partOf.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Location; + } + + @SearchParamDefinition(name="identifier", path="Location.identifier", description="Unique code or number identifying the location to its users", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" ) + public static final String SP_PARTOF = "partof"; + @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance", type="token" ) + public static final String SP_NEARDISTANCE = "near-distance"; + @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" ) + public static final String SP_NEAR = "near"; + @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MarkdownType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MarkdownType.java new file mode 100644 index 00000000000..8bc93301313 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MarkdownType.java @@ -0,0 +1,76 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.dstu21.model; + +import static org.apache.commons.lang3.StringUtils.defaultString; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "code" in FHIR, when not bound to an enumerated list of codes + */ +@DatatypeDef(name="markdown", profileOf=StringType.class) +public class MarkdownType extends StringType implements Comparable { + + private static final long serialVersionUID = 3L; + + public MarkdownType() { + super(); + } + + public MarkdownType(String theCode) { + setValue(theCode); + } + + public int compareTo(MarkdownType theCode) { + if (theCode == null) { + return 1; + } + return defaultString(getValue()).compareTo(defaultString(theCode.getValue())); + } + + @Override + protected String parse(String theValue) { + return theValue.trim(); + } + + @Override + protected String encode(String theValue) { + return theValue; + } + + @Override + public MarkdownType copy() { + return new MarkdownType(getValue()); + } + + public String fhirType() { + return "markdown"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Measure.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Measure.java new file mode 100644 index 00000000000..e51e4119d6b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Measure.java @@ -0,0 +1,1115 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The Measure resource provides the definition of a quality measure. + */ +@ResourceDef(name="Measure", profile="http://hl7.org/fhir/Profile/Measure") +public class Measure extends DomainResource { + + public enum MeasurePopulationType { + /** + * The initial population for the measure + */ + INITIALPOPULATION, + /** + * The numerator for the measure + */ + NUMERATOR, + /** + * The numerator exclusion for the measure + */ + NUMERATOREXCLUSION, + /** + * The denominator for the measure + */ + DENOMINATOR, + /** + * The denominator exclusion for the measure + */ + DENOMINATOREXCLUSION, + /** + * The denominator exception for the measure + */ + DENOMINATOREXCEPTION, + /** + * The measure population for the measure + */ + MEASUREPOPULATION, + /** + * The measure population exclusion for the measure + */ + MEASUREPOPULATIONEXCLUSION, + /** + * The measure score for the measure + */ + MEASURESCORE, + /** + * added to help the parsers + */ + NULL; + public static MeasurePopulationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("initial-population".equals(codeString)) + return INITIALPOPULATION; + if ("numerator".equals(codeString)) + return NUMERATOR; + if ("numerator-exclusion".equals(codeString)) + return NUMERATOREXCLUSION; + if ("denominator".equals(codeString)) + return DENOMINATOR; + if ("denominator-exclusion".equals(codeString)) + return DENOMINATOREXCLUSION; + if ("denominator-exception".equals(codeString)) + return DENOMINATOREXCEPTION; + if ("measure-population".equals(codeString)) + return MEASUREPOPULATION; + if ("measure-population-exclusion".equals(codeString)) + return MEASUREPOPULATIONEXCLUSION; + if ("measure-score".equals(codeString)) + return MEASURESCORE; + throw new FHIRException("Unknown MeasurePopulationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INITIALPOPULATION: return "initial-population"; + case NUMERATOR: return "numerator"; + case NUMERATOREXCLUSION: return "numerator-exclusion"; + case DENOMINATOR: return "denominator"; + case DENOMINATOREXCLUSION: return "denominator-exclusion"; + case DENOMINATOREXCEPTION: return "denominator-exception"; + case MEASUREPOPULATION: return "measure-population"; + case MEASUREPOPULATIONEXCLUSION: return "measure-population-exclusion"; + case MEASURESCORE: return "measure-score"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INITIALPOPULATION: return "http://hl7.org/fhir/measure-population"; + case NUMERATOR: return "http://hl7.org/fhir/measure-population"; + case NUMERATOREXCLUSION: return "http://hl7.org/fhir/measure-population"; + case DENOMINATOR: return "http://hl7.org/fhir/measure-population"; + case DENOMINATOREXCLUSION: return "http://hl7.org/fhir/measure-population"; + case DENOMINATOREXCEPTION: return "http://hl7.org/fhir/measure-population"; + case MEASUREPOPULATION: return "http://hl7.org/fhir/measure-population"; + case MEASUREPOPULATIONEXCLUSION: return "http://hl7.org/fhir/measure-population"; + case MEASURESCORE: return "http://hl7.org/fhir/measure-population"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INITIALPOPULATION: return "The initial population for the measure"; + case NUMERATOR: return "The numerator for the measure"; + case NUMERATOREXCLUSION: return "The numerator exclusion for the measure"; + case DENOMINATOR: return "The denominator for the measure"; + case DENOMINATOREXCLUSION: return "The denominator exclusion for the measure"; + case DENOMINATOREXCEPTION: return "The denominator exception for the measure"; + case MEASUREPOPULATION: return "The measure population for the measure"; + case MEASUREPOPULATIONEXCLUSION: return "The measure population exclusion for the measure"; + case MEASURESCORE: return "The measure score for the measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INITIALPOPULATION: return "Initial Population"; + case NUMERATOR: return "Numerator"; + case NUMERATOREXCLUSION: return "Numerator Exclusion"; + case DENOMINATOR: return "Denominator"; + case DENOMINATOREXCLUSION: return "Denominator Exclusion"; + case DENOMINATOREXCEPTION: return "Denominator Exception"; + case MEASUREPOPULATION: return "Measure Population"; + case MEASUREPOPULATIONEXCLUSION: return "Measure Population Exclusion"; + case MEASURESCORE: return "Measure Score"; + default: return "?"; + } + } + } + + public static class MeasurePopulationTypeEnumFactory implements EnumFactory { + public MeasurePopulationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("initial-population".equals(codeString)) + return MeasurePopulationType.INITIALPOPULATION; + if ("numerator".equals(codeString)) + return MeasurePopulationType.NUMERATOR; + if ("numerator-exclusion".equals(codeString)) + return MeasurePopulationType.NUMERATOREXCLUSION; + if ("denominator".equals(codeString)) + return MeasurePopulationType.DENOMINATOR; + if ("denominator-exclusion".equals(codeString)) + return MeasurePopulationType.DENOMINATOREXCLUSION; + if ("denominator-exception".equals(codeString)) + return MeasurePopulationType.DENOMINATOREXCEPTION; + if ("measure-population".equals(codeString)) + return MeasurePopulationType.MEASUREPOPULATION; + if ("measure-population-exclusion".equals(codeString)) + return MeasurePopulationType.MEASUREPOPULATIONEXCLUSION; + if ("measure-score".equals(codeString)) + return MeasurePopulationType.MEASURESCORE; + throw new IllegalArgumentException("Unknown MeasurePopulationType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("initial-population".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.INITIALPOPULATION); + if ("numerator".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.NUMERATOR); + if ("numerator-exclusion".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.NUMERATOREXCLUSION); + if ("denominator".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.DENOMINATOR); + if ("denominator-exclusion".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.DENOMINATOREXCLUSION); + if ("denominator-exception".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.DENOMINATOREXCEPTION); + if ("measure-population".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.MEASUREPOPULATION); + if ("measure-population-exclusion".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.MEASUREPOPULATIONEXCLUSION); + if ("measure-score".equals(codeString)) + return new Enumeration(this, MeasurePopulationType.MEASURESCORE); + throw new FHIRException("Unknown MeasurePopulationType code '"+codeString+"'"); + } + public String toCode(MeasurePopulationType code) { + if (code == MeasurePopulationType.INITIALPOPULATION) + return "initial-population"; + if (code == MeasurePopulationType.NUMERATOR) + return "numerator"; + if (code == MeasurePopulationType.NUMERATOREXCLUSION) + return "numerator-exclusion"; + if (code == MeasurePopulationType.DENOMINATOR) + return "denominator"; + if (code == MeasurePopulationType.DENOMINATOREXCLUSION) + return "denominator-exclusion"; + if (code == MeasurePopulationType.DENOMINATOREXCEPTION) + return "denominator-exception"; + if (code == MeasurePopulationType.MEASUREPOPULATION) + return "measure-population"; + if (code == MeasurePopulationType.MEASUREPOPULATIONEXCLUSION) + return "measure-population-exclusion"; + if (code == MeasurePopulationType.MEASURESCORE) + return "measure-score"; + return "?"; + } + } + + @Block() + public static class MeasurePopulationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of population criteria. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of population criteria." ) + protected Enumeration type; + + /** + * Optional name or short description of this population. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Optional name or short description of this population." ) + protected StringType name; + + /** + * The human readable description of this population criteria. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The human readable description of this population criteria." ) + protected StringType description; + + /** + * The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. + */ + @Child(name = "criteria", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria." ) + protected StringType criteria; + + private static final long serialVersionUID = 1825597517L; + + /* + * Constructor + */ + public MeasurePopulationComponent() { + super(); + } + + /* + * Constructor + */ + public MeasurePopulationComponent(Enumeration type, StringType criteria) { + super(); + this.type = type; + this.criteria = criteria; + } + + /** + * @return {@link #type} (The type of population criteria.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasurePopulationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new MeasurePopulationTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of population criteria.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public MeasurePopulationComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of population criteria. + */ + public MeasurePopulationType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of population criteria. + */ + public MeasurePopulationComponent setType(MeasurePopulationType value) { + if (this.type == null) + this.type = new Enumeration(new MeasurePopulationTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasurePopulationComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public MeasurePopulationComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Optional name or short description of this population. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Optional name or short description of this population. + */ + public MeasurePopulationComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasurePopulationComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MeasurePopulationComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The human readable description of this population criteria. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The human readable description of this population criteria. + */ + public MeasurePopulationComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #criteria} (The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public StringType getCriteriaElement() { + if (this.criteria == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasurePopulationComponent.criteria"); + else if (Configuration.doAutoCreate()) + this.criteria = new StringType(); // bb + return this.criteria; + } + + public boolean hasCriteriaElement() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + public boolean hasCriteria() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + /** + * @param value {@link #criteria} (The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public MeasurePopulationComponent setCriteriaElement(StringType value) { + this.criteria = value; + return this; + } + + /** + * @return The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. + */ + public String getCriteria() { + return this.criteria == null ? null : this.criteria.getValue(); + } + + /** + * @param value The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. + */ + public MeasurePopulationComponent setCriteria(String value) { + if (this.criteria == null) + this.criteria = new StringType(); + this.criteria.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of population criteria.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("name", "string", "Optional name or short description of this population.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "The human readable description of this population criteria.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("criteria", "string", "The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.", 0, java.lang.Integer.MAX_VALUE, criteria)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new MeasurePopulationTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("criteria")) + this.criteria = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.type"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.description"); + } + else if (name.equals("criteria")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); + } + else + return super.addChild(name); + } + + public MeasurePopulationComponent copy() { + MeasurePopulationComponent dst = new MeasurePopulationComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + dst.criteria = criteria == null ? null : criteria.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasurePopulationComponent)) + return false; + MeasurePopulationComponent o = (MeasurePopulationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) + && compareDeep(criteria, o.criteria, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasurePopulationComponent)) + return false; + MeasurePopulationComponent o = (MeasurePopulationComponent) other; + return compareValues(type, o.type, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) + && compareValues(criteria, o.criteria, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) + && (description == null || description.isEmpty()) && (criteria == null || criteria.isEmpty()) + ; + } + + public String fhirType() { + return "Measure.population"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A reference to a ModuleMetadata resource that describes the metadata for the measure. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Metadata for the measure", formalDefinition="A reference to a ModuleMetadata resource that describes the metadata for the measure." ) + protected Reference moduleMetadata; + + /** + * The actual object that is the target of the reference (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + */ + protected ModuleMetadata moduleMetadataTarget; + + /** + * A reference to a Library resource containing the formal logic used by the measure. + */ + @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Logic used by the measure", formalDefinition="A reference to a Library resource containing the formal logic used by the measure." ) + protected List library; + /** + * The actual objects that are the target of the reference (A reference to a Library resource containing the formal logic used by the measure.) + */ + protected List libraryTarget; + + + /** + * The measure populations. + */ + @Child(name = "population", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The measure populations." ) + protected List population; + + /** + * The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path. + */ + @Child(name = "stratifier", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path." ) + protected List stratifier; + + /** + * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. + */ + @Child(name = "supplementalData", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path." ) + protected List supplementalData; + + private static final long serialVersionUID = -1534387963L; + + /* + * Constructor + */ + public Measure() { + super(); + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Measure addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Measure setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public Measure setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + */ + public Reference getModuleMetadata() { + if (this.moduleMetadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadata = new Reference(); // cc + return this.moduleMetadata; + } + + public boolean hasModuleMetadata() { + return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); + } + + /** + * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + */ + public Measure setModuleMetadata(Reference value) { + this.moduleMetadata = value; + return this; + } + + /** + * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + */ + public ModuleMetadata getModuleMetadataTarget() { + if (this.moduleMetadataTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadataTarget = new ModuleMetadata(); // aa + return this.moduleMetadataTarget; + } + + /** + * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + */ + public Measure setModuleMetadataTarget(ModuleMetadata value) { + this.moduleMetadataTarget = value; + return this; + } + + /** + * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.) + */ + public List getLibrary() { + if (this.library == null) + this.library = new ArrayList(); + return this.library; + } + + public boolean hasLibrary() { + if (this.library == null) + return false; + for (Reference item : this.library) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.) + */ + // syntactic sugar + public Reference addLibrary() { //3 + Reference t = new Reference(); + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return t; + } + + // syntactic sugar + public Measure addLibrary(Reference t) { //3 + if (t == null) + return this; + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return this; + } + + /** + * @return {@link #library} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing the formal logic used by the measure.) + */ + public List getLibraryTarget() { + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + return this.libraryTarget; + } + + // syntactic sugar + /** + * @return {@link #library} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing the formal logic used by the measure.) + */ + public Library addLibraryTarget() { + Library r = new Library(); + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + this.libraryTarget.add(r); + return r; + } + + /** + * @return {@link #population} (The measure populations.) + */ + public List getPopulation() { + if (this.population == null) + this.population = new ArrayList(); + return this.population; + } + + public boolean hasPopulation() { + if (this.population == null) + return false; + for (MeasurePopulationComponent item : this.population) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #population} (The measure populations.) + */ + // syntactic sugar + public MeasurePopulationComponent addPopulation() { //3 + MeasurePopulationComponent t = new MeasurePopulationComponent(); + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return t; + } + + // syntactic sugar + public Measure addPopulation(MeasurePopulationComponent t) { //3 + if (t == null) + return this; + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return this; + } + + /** + * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) + */ + public List getStratifier() { + if (this.stratifier == null) + this.stratifier = new ArrayList(); + return this.stratifier; + } + + public boolean hasStratifier() { + if (this.stratifier == null) + return false; + for (StringType item : this.stratifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) + */ + // syntactic sugar + public StringType addStratifierElement() {//2 + StringType t = new StringType(); + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return t; + } + + /** + * @param value {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) + */ + public Measure addStratifier(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return this; + } + + /** + * @param value {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) + */ + public boolean hasStratifier(String value) { + if (this.stratifier == null) + return false; + for (StringType v : this.stratifier) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) + */ + public List getSupplementalData() { + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + return this.supplementalData; + } + + public boolean hasSupplementalData() { + if (this.supplementalData == null) + return false; + for (StringType item : this.supplementalData) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) + */ + // syntactic sugar + public StringType addSupplementalDataElement() {//2 + StringType t = new StringType(); + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + this.supplementalData.add(t); + return t; + } + + /** + * @param value {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) + */ + public Measure addSupplementalData(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + this.supplementalData.add(t); + return this; + } + + /** + * @param value {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) + */ + public boolean hasSupplementalData(String value) { + if (this.supplementalData == null) + return false; + for (StringType v : this.supplementalData) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource that describes the metadata for the measure.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing the formal logic used by the measure.", 0, java.lang.Integer.MAX_VALUE, library)); + childrenList.add(new Property("population", "", "The measure populations.", 0, java.lang.Integer.MAX_VALUE, population)); + childrenList.add(new Property("stratifier", "string", "The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier)); + childrenList.add(new Property("supplementalData", "string", "The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("moduleMetadata")) + this.moduleMetadata = castToReference(value); // Reference + else if (name.equals("library")) + this.getLibrary().add(castToReference(value)); + else if (name.equals("population")) + this.getPopulation().add((MeasurePopulationComponent) value); + else if (name.equals("stratifier")) + this.getStratifier().add(castToString(value)); + else if (name.equals("supplementalData")) + this.getSupplementalData().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.version"); + } + else if (name.equals("moduleMetadata")) { + this.moduleMetadata = new Reference(); + return this.moduleMetadata; + } + else if (name.equals("library")) { + return addLibrary(); + } + else if (name.equals("population")) { + return addPopulation(); + } + else if (name.equals("stratifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.stratifier"); + } + else if (name.equals("supplementalData")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.supplementalData"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Measure"; + + } + + public Measure copy() { + Measure dst = new Measure(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + if (library != null) { + dst.library = new ArrayList(); + for (Reference i : library) + dst.library.add(i.copy()); + }; + if (population != null) { + dst.population = new ArrayList(); + for (MeasurePopulationComponent i : population) + dst.population.add(i.copy()); + }; + if (stratifier != null) { + dst.stratifier = new ArrayList(); + for (StringType i : stratifier) + dst.stratifier.add(i.copy()); + }; + if (supplementalData != null) { + dst.supplementalData = new ArrayList(); + for (StringType i : supplementalData) + dst.supplementalData.add(i.copy()); + }; + return dst; + } + + protected Measure typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Measure)) + return false; + Measure o = (Measure) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) + && compareDeep(library, o.library, true) && compareDeep(population, o.population, true) && compareDeep(stratifier, o.stratifier, true) + && compareDeep(supplementalData, o.supplementalData, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Measure)) + return false; + Measure o = (Measure) other; + return compareValues(version, o.version, true) && compareValues(stratifier, o.stratifier, true) && compareValues(supplementalData, o.supplementalData, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) + && (population == null || population.isEmpty()) && (stratifier == null || stratifier.isEmpty()) + && (supplementalData == null || supplementalData.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Measure; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Media.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Media.java new file mode 100644 index 00000000000..3fbade4ec98 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Media.java @@ -0,0 +1,912 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ +@ResourceDef(name="Media", profile="http://hl7.org/fhir/Profile/Media") +public class Media extends DomainResource { + + public enum DigitalMediaType { + /** + * The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents + */ + PHOTO, + /** + * The media consists of a series of frames that capture a moving image + */ + VIDEO, + /** + * The media consists of a sound recording + */ + AUDIO, + /** + * added to help the parsers + */ + NULL; + public static DigitalMediaType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("photo".equals(codeString)) + return PHOTO; + if ("video".equals(codeString)) + return VIDEO; + if ("audio".equals(codeString)) + return AUDIO; + throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PHOTO: return "photo"; + case VIDEO: return "video"; + case AUDIO: return "audio"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PHOTO: return "http://hl7.org/fhir/digital-media-type"; + case VIDEO: return "http://hl7.org/fhir/digital-media-type"; + case AUDIO: return "http://hl7.org/fhir/digital-media-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PHOTO: return "The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents"; + case VIDEO: return "The media consists of a series of frames that capture a moving image"; + case AUDIO: return "The media consists of a sound recording"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PHOTO: return "Photo"; + case VIDEO: return "Video"; + case AUDIO: return "Audio"; + default: return "?"; + } + } + } + + public static class DigitalMediaTypeEnumFactory implements EnumFactory { + public DigitalMediaType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("photo".equals(codeString)) + return DigitalMediaType.PHOTO; + if ("video".equals(codeString)) + return DigitalMediaType.VIDEO; + if ("audio".equals(codeString)) + return DigitalMediaType.AUDIO; + throw new IllegalArgumentException("Unknown DigitalMediaType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("photo".equals(codeString)) + return new Enumeration(this, DigitalMediaType.PHOTO); + if ("video".equals(codeString)) + return new Enumeration(this, DigitalMediaType.VIDEO); + if ("audio".equals(codeString)) + return new Enumeration(this, DigitalMediaType.AUDIO); + throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); + } + public String toCode(DigitalMediaType code) { + if (code == DigitalMediaType.PHOTO) + return "photo"; + if (code == DigitalMediaType.VIDEO) + return "video"; + if (code == DigitalMediaType.AUDIO) + return "audio"; + return "?"; + } + } + + /** + * Whether the media is a photo (still image), an audio recording, or a video recording. + */ + @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="photo | video | audio", formalDefinition="Whether the media is a photo (still image), an audio recording, or a video recording." ) + protected Enumeration type; + + /** + * Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality. + */ + @Child(name = "subtype", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of acquisition equipment/process", formalDefinition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." ) + protected CodeableConcept subtype; + + /** + * Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifier(s) for the image", formalDefinition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." ) + protected List identifier; + + /** + * Who/What this Media is a record of. + */ + @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who/What this Media is a record of", formalDefinition="Who/What this Media is a record of." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Who/What this Media is a record of.) + */ + protected Resource subjectTarget; + + /** + * The person who administered the collection of the image. + */ + @Child(name = "operator", type = {Practitioner.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The person who generated the image", formalDefinition="The person who administered the collection of the image." ) + protected Reference operator; + + /** + * The actual object that is the target of the reference (The person who administered the collection of the image.) + */ + protected Practitioner operatorTarget; + + /** + * The name of the imaging view e.g. Lateral or Antero-posterior (AP). + */ + @Child(name = "view", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Imaging view, e.g. Lateral or Antero-posterior", formalDefinition="The name of the imaging view e.g. Lateral or Antero-posterior (AP)." ) + protected CodeableConcept view; + + /** + * The name of the device / manufacturer of the device that was used to make the recording. + */ + @Child(name = "deviceName", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the device/manufacturer", formalDefinition="The name of the device / manufacturer of the device that was used to make the recording." ) + protected StringType deviceName; + + /** + * Height of the image in pixels (photo/video). + */ + @Child(name = "height", type = {PositiveIntType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Height of the image in pixels (photo/video)", formalDefinition="Height of the image in pixels (photo/video)." ) + protected PositiveIntType height; + + /** + * Width of the image in pixels (photo/video). + */ + @Child(name = "width", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) + protected PositiveIntType width; + + /** + * The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. + */ + @Child(name = "frames", type = {PositiveIntType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." ) + protected PositiveIntType frames; + + /** + * The duration of the recording in seconds - for audio and video. + */ + @Child(name = "duration", type = {UnsignedIntType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) + protected UnsignedIntType duration; + + /** + * The actual content of the media - inline or by direct reference to the media source file. + */ + @Child(name = "content", type = {Attachment.class}, order=11, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Actual Media - reference or data", formalDefinition="The actual content of the media - inline or by direct reference to the media source file." ) + protected Attachment content; + + private static final long serialVersionUID = -280764739L; + + /* + * Constructor + */ + public Media() { + super(); + } + + /* + * Constructor + */ + public Media(Enumeration type, Attachment content) { + super(); + this.type = type; + this.content = content; + } + + /** + * @return {@link #type} (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DigitalMediaTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Media setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Whether the media is a photo (still image), an audio recording, or a video recording. + */ + public DigitalMediaType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Whether the media is a photo (still image), an audio recording, or a video recording. + */ + public Media setType(DigitalMediaType value) { + if (this.type == null) + this.type = new Enumeration(new DigitalMediaTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #subtype} (Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.) + */ + public CodeableConcept getSubtype() { + if (this.subtype == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.subtype"); + else if (Configuration.doAutoCreate()) + this.subtype = new CodeableConcept(); // cc + return this.subtype; + } + + public boolean hasSubtype() { + return this.subtype != null && !this.subtype.isEmpty(); + } + + /** + * @param value {@link #subtype} (Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.) + */ + public Media setSubtype(CodeableConcept value) { + this.subtype = value; + return this; + } + + /** + * @return {@link #identifier} (Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Media addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (Who/What this Media is a record of.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Who/What this Media is a record of.) + */ + public Media setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.) + */ + public Media setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #operator} (The person who administered the collection of the image.) + */ + public Reference getOperator() { + if (this.operator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.operator"); + else if (Configuration.doAutoCreate()) + this.operator = new Reference(); // cc + return this.operator; + } + + public boolean hasOperator() { + return this.operator != null && !this.operator.isEmpty(); + } + + /** + * @param value {@link #operator} (The person who administered the collection of the image.) + */ + public Media setOperator(Reference value) { + this.operator = value; + return this; + } + + /** + * @return {@link #operator} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.) + */ + public Practitioner getOperatorTarget() { + if (this.operatorTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.operator"); + else if (Configuration.doAutoCreate()) + this.operatorTarget = new Practitioner(); // aa + return this.operatorTarget; + } + + /** + * @param value {@link #operator} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.) + */ + public Media setOperatorTarget(Practitioner value) { + this.operatorTarget = value; + return this; + } + + /** + * @return {@link #view} (The name of the imaging view e.g. Lateral or Antero-posterior (AP).) + */ + public CodeableConcept getView() { + if (this.view == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.view"); + else if (Configuration.doAutoCreate()) + this.view = new CodeableConcept(); // cc + return this.view; + } + + public boolean hasView() { + return this.view != null && !this.view.isEmpty(); + } + + /** + * @param value {@link #view} (The name of the imaging view e.g. Lateral or Antero-posterior (AP).) + */ + public Media setView(CodeableConcept value) { + this.view = value; + return this; + } + + /** + * @return {@link #deviceName} (The name of the device / manufacturer of the device that was used to make the recording.). This is the underlying object with id, value and extensions. The accessor "getDeviceName" gives direct access to the value + */ + public StringType getDeviceNameElement() { + if (this.deviceName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.deviceName"); + else if (Configuration.doAutoCreate()) + this.deviceName = new StringType(); // bb + return this.deviceName; + } + + public boolean hasDeviceNameElement() { + return this.deviceName != null && !this.deviceName.isEmpty(); + } + + public boolean hasDeviceName() { + return this.deviceName != null && !this.deviceName.isEmpty(); + } + + /** + * @param value {@link #deviceName} (The name of the device / manufacturer of the device that was used to make the recording.). This is the underlying object with id, value and extensions. The accessor "getDeviceName" gives direct access to the value + */ + public Media setDeviceNameElement(StringType value) { + this.deviceName = value; + return this; + } + + /** + * @return The name of the device / manufacturer of the device that was used to make the recording. + */ + public String getDeviceName() { + return this.deviceName == null ? null : this.deviceName.getValue(); + } + + /** + * @param value The name of the device / manufacturer of the device that was used to make the recording. + */ + public Media setDeviceName(String value) { + if (Utilities.noString(value)) + this.deviceName = null; + else { + if (this.deviceName == null) + this.deviceName = new StringType(); + this.deviceName.setValue(value); + } + return this; + } + + /** + * @return {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value + */ + public PositiveIntType getHeightElement() { + if (this.height == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.height"); + else if (Configuration.doAutoCreate()) + this.height = new PositiveIntType(); // bb + return this.height; + } + + public boolean hasHeightElement() { + return this.height != null && !this.height.isEmpty(); + } + + public boolean hasHeight() { + return this.height != null && !this.height.isEmpty(); + } + + /** + * @param value {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value + */ + public Media setHeightElement(PositiveIntType value) { + this.height = value; + return this; + } + + /** + * @return Height of the image in pixels (photo/video). + */ + public int getHeight() { + return this.height == null || this.height.isEmpty() ? 0 : this.height.getValue(); + } + + /** + * @param value Height of the image in pixels (photo/video). + */ + public Media setHeight(int value) { + if (this.height == null) + this.height = new PositiveIntType(); + this.height.setValue(value); + return this; + } + + /** + * @return {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value + */ + public PositiveIntType getWidthElement() { + if (this.width == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.width"); + else if (Configuration.doAutoCreate()) + this.width = new PositiveIntType(); // bb + return this.width; + } + + public boolean hasWidthElement() { + return this.width != null && !this.width.isEmpty(); + } + + public boolean hasWidth() { + return this.width != null && !this.width.isEmpty(); + } + + /** + * @param value {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value + */ + public Media setWidthElement(PositiveIntType value) { + this.width = value; + return this; + } + + /** + * @return Width of the image in pixels (photo/video). + */ + public int getWidth() { + return this.width == null || this.width.isEmpty() ? 0 : this.width.getValue(); + } + + /** + * @param value Width of the image in pixels (photo/video). + */ + public Media setWidth(int value) { + if (this.width == null) + this.width = new PositiveIntType(); + this.width.setValue(value); + return this; + } + + /** + * @return {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value + */ + public PositiveIntType getFramesElement() { + if (this.frames == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.frames"); + else if (Configuration.doAutoCreate()) + this.frames = new PositiveIntType(); // bb + return this.frames; + } + + public boolean hasFramesElement() { + return this.frames != null && !this.frames.isEmpty(); + } + + public boolean hasFrames() { + return this.frames != null && !this.frames.isEmpty(); + } + + /** + * @param value {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value + */ + public Media setFramesElement(PositiveIntType value) { + this.frames = value; + return this; + } + + /** + * @return The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. + */ + public int getFrames() { + return this.frames == null || this.frames.isEmpty() ? 0 : this.frames.getValue(); + } + + /** + * @param value The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. + */ + public Media setFrames(int value) { + if (this.frames == null) + this.frames = new PositiveIntType(); + this.frames.setValue(value); + return this; + } + + /** + * @return {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public UnsignedIntType getDurationElement() { + if (this.duration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.duration"); + else if (Configuration.doAutoCreate()) + this.duration = new UnsignedIntType(); // bb + return this.duration; + } + + public boolean hasDurationElement() { + return this.duration != null && !this.duration.isEmpty(); + } + + public boolean hasDuration() { + return this.duration != null && !this.duration.isEmpty(); + } + + /** + * @param value {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public Media setDurationElement(UnsignedIntType value) { + this.duration = value; + return this; + } + + /** + * @return The duration of the recording in seconds - for audio and video. + */ + public int getDuration() { + return this.duration == null || this.duration.isEmpty() ? 0 : this.duration.getValue(); + } + + /** + * @param value The duration of the recording in seconds - for audio and video. + */ + public Media setDuration(int value) { + if (this.duration == null) + this.duration = new UnsignedIntType(); + this.duration.setValue(value); + return this; + } + + /** + * @return {@link #content} (The actual content of the media - inline or by direct reference to the media source file.) + */ + public Attachment getContent() { + if (this.content == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Media.content"); + else if (Configuration.doAutoCreate()) + this.content = new Attachment(); // cc + return this.content; + } + + public boolean hasContent() { + return this.content != null && !this.content.isEmpty(); + } + + /** + * @param value {@link #content} (The actual content of the media - inline or by direct reference to the media source file.) + */ + public Media setContent(Attachment value) { + this.content = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Whether the media is a photo (still image), an audio recording, or a video recording.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subtype", "CodeableConcept", "Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.", 0, java.lang.Integer.MAX_VALUE, subtype)); + childrenList.add(new Property("identifier", "Identifier", "Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device|Specimen)", "Who/What this Media is a record of.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("operator", "Reference(Practitioner)", "The person who administered the collection of the image.", 0, java.lang.Integer.MAX_VALUE, operator)); + childrenList.add(new Property("view", "CodeableConcept", "The name of the imaging view e.g. Lateral or Antero-posterior (AP).", 0, java.lang.Integer.MAX_VALUE, view)); + childrenList.add(new Property("deviceName", "string", "The name of the device / manufacturer of the device that was used to make the recording.", 0, java.lang.Integer.MAX_VALUE, deviceName)); + childrenList.add(new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, height)); + childrenList.add(new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, width)); + childrenList.add(new Property("frames", "positiveInt", "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.", 0, java.lang.Integer.MAX_VALUE, frames)); + childrenList.add(new Property("duration", "unsignedInt", "The duration of the recording in seconds - for audio and video.", 0, java.lang.Integer.MAX_VALUE, duration)); + childrenList.add(new Property("content", "Attachment", "The actual content of the media - inline or by direct reference to the media source file.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DigitalMediaTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("subtype")) + this.subtype = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("operator")) + this.operator = castToReference(value); // Reference + else if (name.equals("view")) + this.view = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("deviceName")) + this.deviceName = castToString(value); // StringType + else if (name.equals("height")) + this.height = castToPositiveInt(value); // PositiveIntType + else if (name.equals("width")) + this.width = castToPositiveInt(value); // PositiveIntType + else if (name.equals("frames")) + this.frames = castToPositiveInt(value); // PositiveIntType + else if (name.equals("duration")) + this.duration = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("content")) + this.content = castToAttachment(value); // Attachment + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.type"); + } + else if (name.equals("subtype")) { + this.subtype = new CodeableConcept(); + return this.subtype; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("operator")) { + this.operator = new Reference(); + return this.operator; + } + else if (name.equals("view")) { + this.view = new CodeableConcept(); + return this.view; + } + else if (name.equals("deviceName")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.deviceName"); + } + else if (name.equals("height")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.height"); + } + else if (name.equals("width")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.width"); + } + else if (name.equals("frames")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.frames"); + } + else if (name.equals("duration")) { + throw new FHIRException("Cannot call addChild on a primitive type Media.duration"); + } + else if (name.equals("content")) { + this.content = new Attachment(); + return this.content; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Media"; + + } + + public Media copy() { + Media dst = new Media(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.subtype = subtype == null ? null : subtype.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.operator = operator == null ? null : operator.copy(); + dst.view = view == null ? null : view.copy(); + dst.deviceName = deviceName == null ? null : deviceName.copy(); + dst.height = height == null ? null : height.copy(); + dst.width = width == null ? null : width.copy(); + dst.frames = frames == null ? null : frames.copy(); + dst.duration = duration == null ? null : duration.copy(); + dst.content = content == null ? null : content.copy(); + return dst; + } + + protected Media typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Media)) + return false; + Media o = (Media) other; + return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(subject, o.subject, true) && compareDeep(operator, o.operator, true) && compareDeep(view, o.view, true) + && compareDeep(deviceName, o.deviceName, true) && compareDeep(height, o.height, true) && compareDeep(width, o.width, true) + && compareDeep(frames, o.frames, true) && compareDeep(duration, o.duration, true) && compareDeep(content, o.content, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Media)) + return false; + Media o = (Media) other; + return compareValues(type, o.type, true) && compareValues(deviceName, o.deviceName, true) && compareValues(height, o.height, true) + && compareValues(width, o.width, true) && compareValues(frames, o.frames, true) && compareValues(duration, o.duration, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty()) + && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) + && (operator == null || operator.isEmpty()) && (view == null || view.isEmpty()) && (deviceName == null || deviceName.isEmpty()) + && (height == null || height.isEmpty()) && (width == null || width.isEmpty()) && (frames == null || frames.isEmpty()) + && (duration == null || duration.isEmpty()) && (content == null || content.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Media; + } + + @SearchParamDefinition(name="identifier", path="Media.identifier", description="Identifier(s) for the image", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="view", path="Media.view", description="Imaging view, e.g. Lateral or Antero-posterior", type="token" ) + public static final String SP_VIEW = "view"; + @SearchParamDefinition(name="subtype", path="Media.subtype", description="The type of acquisition equipment/process", type="token" ) + public static final String SP_SUBTYPE = "subtype"; + @SearchParamDefinition(name="created", path="Media.content.creation", description="Date attachment was first created", type="date" ) + public static final String SP_CREATED = "created"; + @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="type", path="Media.type", description="photo | video | audio", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="operator", path="Media.operator", description="The person who generated the image", type="reference" ) + public static final String SP_OPERATOR = "operator"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Medication.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Medication.java new file mode 100644 index 00000000000..29718a2c9a3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Medication.java @@ -0,0 +1,1299 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ +@ResourceDef(name="Medication", profile="http://hl7.org/fhir/Profile/Medication") +public class Medication extends DomainResource { + + @Block() + public static class MedicationProductComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes the form of the item. Powder; tablets; carton. + */ + @Child(name = "form", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="powder | tablets | carton +", formalDefinition="Describes the form of the item. Powder; tablets; carton." ) + protected CodeableConcept form; + + /** + * Identifies a particular constituent of interest in the product. + */ + @Child(name = "ingredient", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Active or inactive ingredient", formalDefinition="Identifies a particular constituent of interest in the product." ) + protected List ingredient; + + /** + * Information about a group of medication produced or packaged from one production run. + */ + @Child(name = "batch", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Information about a group of medication produced or packaged from one production run." ) + protected List batch; + + private static final long serialVersionUID = 1132853671L; + + /* + * Constructor + */ + public MedicationProductComponent() { + super(); + } + + /** + * @return {@link #form} (Describes the form of the item. Powder; tablets; carton.) + */ + public CodeableConcept getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationProductComponent.form"); + else if (Configuration.doAutoCreate()) + this.form = new CodeableConcept(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (Describes the form of the item. Powder; tablets; carton.) + */ + public MedicationProductComponent setForm(CodeableConcept value) { + this.form = value; + return this; + } + + /** + * @return {@link #ingredient} (Identifies a particular constituent of interest in the product.) + */ + public List getIngredient() { + if (this.ingredient == null) + this.ingredient = new ArrayList(); + return this.ingredient; + } + + public boolean hasIngredient() { + if (this.ingredient == null) + return false; + for (MedicationProductIngredientComponent item : this.ingredient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #ingredient} (Identifies a particular constituent of interest in the product.) + */ + // syntactic sugar + public MedicationProductIngredientComponent addIngredient() { //3 + MedicationProductIngredientComponent t = new MedicationProductIngredientComponent(); + if (this.ingredient == null) + this.ingredient = new ArrayList(); + this.ingredient.add(t); + return t; + } + + // syntactic sugar + public MedicationProductComponent addIngredient(MedicationProductIngredientComponent t) { //3 + if (t == null) + return this; + if (this.ingredient == null) + this.ingredient = new ArrayList(); + this.ingredient.add(t); + return this; + } + + /** + * @return {@link #batch} (Information about a group of medication produced or packaged from one production run.) + */ + public List getBatch() { + if (this.batch == null) + this.batch = new ArrayList(); + return this.batch; + } + + public boolean hasBatch() { + if (this.batch == null) + return false; + for (MedicationProductBatchComponent item : this.batch) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #batch} (Information about a group of medication produced or packaged from one production run.) + */ + // syntactic sugar + public MedicationProductBatchComponent addBatch() { //3 + MedicationProductBatchComponent t = new MedicationProductBatchComponent(); + if (this.batch == null) + this.batch = new ArrayList(); + this.batch.add(t); + return t; + } + + // syntactic sugar + public MedicationProductComponent addBatch(MedicationProductBatchComponent t) { //3 + if (t == null) + return this; + if (this.batch == null) + this.batch = new ArrayList(); + this.batch.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("form", "CodeableConcept", "Describes the form of the item. Powder; tablets; carton.", 0, java.lang.Integer.MAX_VALUE, form)); + childrenList.add(new Property("ingredient", "", "Identifies a particular constituent of interest in the product.", 0, java.lang.Integer.MAX_VALUE, ingredient)); + childrenList.add(new Property("batch", "", "Information about a group of medication produced or packaged from one production run.", 0, java.lang.Integer.MAX_VALUE, batch)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("form")) + this.form = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("ingredient")) + this.getIngredient().add((MedicationProductIngredientComponent) value); + else if (name.equals("batch")) + this.getBatch().add((MedicationProductBatchComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("form")) { + this.form = new CodeableConcept(); + return this.form; + } + else if (name.equals("ingredient")) { + return addIngredient(); + } + else if (name.equals("batch")) { + return addBatch(); + } + else + return super.addChild(name); + } + + public MedicationProductComponent copy() { + MedicationProductComponent dst = new MedicationProductComponent(); + copyValues(dst); + dst.form = form == null ? null : form.copy(); + if (ingredient != null) { + dst.ingredient = new ArrayList(); + for (MedicationProductIngredientComponent i : ingredient) + dst.ingredient.add(i.copy()); + }; + if (batch != null) { + dst.batch = new ArrayList(); + for (MedicationProductBatchComponent i : batch) + dst.batch.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationProductComponent)) + return false; + MedicationProductComponent o = (MedicationProductComponent) other; + return compareDeep(form, o.form, true) && compareDeep(ingredient, o.ingredient, true) && compareDeep(batch, o.batch, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationProductComponent)) + return false; + MedicationProductComponent o = (MedicationProductComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (form == null || form.isEmpty()) && (ingredient == null || ingredient.isEmpty()) + && (batch == null || batch.isEmpty()); + } + + public String fhirType() { + return "Medication.product"; + + } + + } + + @Block() + public static class MedicationProductIngredientComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The actual ingredient - either a substance (simple ingredient) or another medication. + */ + @Child(name = "item", type = {Substance.class, Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The product contained", formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication." ) + protected Reference item; + + /** + * The actual object that is the target of the reference (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + protected Resource itemTarget; + + /** + * Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. + */ + @Child(name = "amount", type = {Ratio.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Quantity of ingredient present", formalDefinition="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet." ) + protected Ratio amount; + + private static final long serialVersionUID = -1217232889L; + + /* + * Constructor + */ + public MedicationProductIngredientComponent() { + super(); + } + + /* + * Constructor + */ + public MedicationProductIngredientComponent(Reference item) { + super(); + this.item = item; + } + + /** + * @return {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public Reference getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationProductIngredientComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new Reference(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public MedicationProductIngredientComponent setItem(Reference value) { + this.item = value; + return this; + } + + /** + * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public Resource getItemTarget() { + return this.itemTarget; + } + + /** + * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public MedicationProductIngredientComponent setItemTarget(Resource value) { + this.itemTarget = value; + return this; + } + + /** + * @return {@link #amount} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.) + */ + public Ratio getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationProductIngredientComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Ratio(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.) + */ + public MedicationProductIngredientComponent setAmount(Ratio value) { + this.amount = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("item", "Reference(Substance|Medication)", "The actual ingredient - either a substance (simple ingredient) or another medication.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("amount", "Ratio", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.", 0, java.lang.Integer.MAX_VALUE, amount)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("item")) + this.item = castToReference(value); // Reference + else if (name.equals("amount")) + this.amount = castToRatio(value); // Ratio + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("item")) { + this.item = new Reference(); + return this.item; + } + else if (name.equals("amount")) { + this.amount = new Ratio(); + return this.amount; + } + else + return super.addChild(name); + } + + public MedicationProductIngredientComponent copy() { + MedicationProductIngredientComponent dst = new MedicationProductIngredientComponent(); + copyValues(dst); + dst.item = item == null ? null : item.copy(); + dst.amount = amount == null ? null : amount.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationProductIngredientComponent)) + return false; + MedicationProductIngredientComponent o = (MedicationProductIngredientComponent) other; + return compareDeep(item, o.item, true) && compareDeep(amount, o.amount, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationProductIngredientComponent)) + return false; + MedicationProductIngredientComponent o = (MedicationProductIngredientComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (item == null || item.isEmpty()) && (amount == null || amount.isEmpty()) + ; + } + + public String fhirType() { + return "Medication.product.ingredient"; + + } + + } + + @Block() + public static class MedicationProductBatchComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The assigned lot number of a batch of the specified product. + */ + @Child(name = "lotNumber", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The assigned lot number of a batch of the specified product." ) + protected StringType lotNumber; + + /** + * When this specific batch of product will expire. + */ + @Child(name = "expirationDate", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="When this specific batch of product will expire." ) + protected DateTimeType expirationDate; + + private static final long serialVersionUID = 1982738755L; + + /* + * Constructor + */ + public MedicationProductBatchComponent() { + super(); + } + + /** + * @return {@link #lotNumber} (The assigned lot number of a batch of the specified product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public StringType getLotNumberElement() { + if (this.lotNumber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationProductBatchComponent.lotNumber"); + else if (Configuration.doAutoCreate()) + this.lotNumber = new StringType(); // bb + return this.lotNumber; + } + + public boolean hasLotNumberElement() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + public boolean hasLotNumber() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + /** + * @param value {@link #lotNumber} (The assigned lot number of a batch of the specified product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public MedicationProductBatchComponent setLotNumberElement(StringType value) { + this.lotNumber = value; + return this; + } + + /** + * @return The assigned lot number of a batch of the specified product. + */ + public String getLotNumber() { + return this.lotNumber == null ? null : this.lotNumber.getValue(); + } + + /** + * @param value The assigned lot number of a batch of the specified product. + */ + public MedicationProductBatchComponent setLotNumber(String value) { + if (Utilities.noString(value)) + this.lotNumber = null; + else { + if (this.lotNumber == null) + this.lotNumber = new StringType(); + this.lotNumber.setValue(value); + } + return this; + } + + /** + * @return {@link #expirationDate} (When this specific batch of product will expire.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public DateTimeType getExpirationDateElement() { + if (this.expirationDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationProductBatchComponent.expirationDate"); + else if (Configuration.doAutoCreate()) + this.expirationDate = new DateTimeType(); // bb + return this.expirationDate; + } + + public boolean hasExpirationDateElement() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + public boolean hasExpirationDate() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + /** + * @param value {@link #expirationDate} (When this specific batch of product will expire.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public MedicationProductBatchComponent setExpirationDateElement(DateTimeType value) { + this.expirationDate = value; + return this; + } + + /** + * @return When this specific batch of product will expire. + */ + public Date getExpirationDate() { + return this.expirationDate == null ? null : this.expirationDate.getValue(); + } + + /** + * @param value When this specific batch of product will expire. + */ + public MedicationProductBatchComponent setExpirationDate(Date value) { + if (value == null) + this.expirationDate = null; + else { + if (this.expirationDate == null) + this.expirationDate = new DateTimeType(); + this.expirationDate.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("lotNumber", "string", "The assigned lot number of a batch of the specified product.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); + childrenList.add(new Property("expirationDate", "dateTime", "When this specific batch of product will expire.", 0, java.lang.Integer.MAX_VALUE, expirationDate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("lotNumber")) + this.lotNumber = castToString(value); // StringType + else if (name.equals("expirationDate")) + this.expirationDate = castToDateTime(value); // DateTimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("lotNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type Medication.lotNumber"); + } + else if (name.equals("expirationDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Medication.expirationDate"); + } + else + return super.addChild(name); + } + + public MedicationProductBatchComponent copy() { + MedicationProductBatchComponent dst = new MedicationProductBatchComponent(); + copyValues(dst); + dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); + dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationProductBatchComponent)) + return false; + MedicationProductBatchComponent o = (MedicationProductBatchComponent) other; + return compareDeep(lotNumber, o.lotNumber, true) && compareDeep(expirationDate, o.expirationDate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationProductBatchComponent)) + return false; + MedicationProductBatchComponent o = (MedicationProductBatchComponent) other; + return compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (lotNumber == null || lotNumber.isEmpty()) && (expirationDate == null || expirationDate.isEmpty()) + ; + } + + public String fhirType() { + return "Medication.product.batch"; + + } + + } + + @Block() + public static class MedicationPackageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The kind of container that this package comes as. + */ + @Child(name = "container", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="E.g. box, vial, blister-pack", formalDefinition="The kind of container that this package comes as." ) + protected CodeableConcept container; + + /** + * A set of components that go to make up the described item. + */ + @Child(name = "content", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What is in the package", formalDefinition="A set of components that go to make up the described item." ) + protected List content; + + private static final long serialVersionUID = 503772472L; + + /* + * Constructor + */ + public MedicationPackageComponent() { + super(); + } + + /** + * @return {@link #container} (The kind of container that this package comes as.) + */ + public CodeableConcept getContainer() { + if (this.container == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationPackageComponent.container"); + else if (Configuration.doAutoCreate()) + this.container = new CodeableConcept(); // cc + return this.container; + } + + public boolean hasContainer() { + return this.container != null && !this.container.isEmpty(); + } + + /** + * @param value {@link #container} (The kind of container that this package comes as.) + */ + public MedicationPackageComponent setContainer(CodeableConcept value) { + this.container = value; + return this; + } + + /** + * @return {@link #content} (A set of components that go to make up the described item.) + */ + public List getContent() { + if (this.content == null) + this.content = new ArrayList(); + return this.content; + } + + public boolean hasContent() { + if (this.content == null) + return false; + for (MedicationPackageContentComponent item : this.content) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #content} (A set of components that go to make up the described item.) + */ + // syntactic sugar + public MedicationPackageContentComponent addContent() { //3 + MedicationPackageContentComponent t = new MedicationPackageContentComponent(); + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return t; + } + + // syntactic sugar + public MedicationPackageComponent addContent(MedicationPackageContentComponent t) { //3 + if (t == null) + return this; + if (this.content == null) + this.content = new ArrayList(); + this.content.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("container", "CodeableConcept", "The kind of container that this package comes as.", 0, java.lang.Integer.MAX_VALUE, container)); + childrenList.add(new Property("content", "", "A set of components that go to make up the described item.", 0, java.lang.Integer.MAX_VALUE, content)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("container")) + this.container = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("content")) + this.getContent().add((MedicationPackageContentComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("container")) { + this.container = new CodeableConcept(); + return this.container; + } + else if (name.equals("content")) { + return addContent(); + } + else + return super.addChild(name); + } + + public MedicationPackageComponent copy() { + MedicationPackageComponent dst = new MedicationPackageComponent(); + copyValues(dst); + dst.container = container == null ? null : container.copy(); + if (content != null) { + dst.content = new ArrayList(); + for (MedicationPackageContentComponent i : content) + dst.content.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationPackageComponent)) + return false; + MedicationPackageComponent o = (MedicationPackageComponent) other; + return compareDeep(container, o.container, true) && compareDeep(content, o.content, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationPackageComponent)) + return false; + MedicationPackageComponent o = (MedicationPackageComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (container == null || container.isEmpty()) && (content == null || content.isEmpty()) + ; + } + + public String fhirType() { + return "Medication.package"; + + } + + } + + @Block() + public static class MedicationPackageContentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies one of the items in the package. + */ + @Child(name = "item", type = {Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="A product in the package", formalDefinition="Identifies one of the items in the package." ) + protected Reference item; + + /** + * The actual object that is the target of the reference (Identifies one of the items in the package.) + */ + protected Medication itemTarget; + + /** + * The amount of the product that is in the package. + */ + @Child(name = "amount", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Quantity present in the package", formalDefinition="The amount of the product that is in the package." ) + protected SimpleQuantity amount; + + private static final long serialVersionUID = -1150048030L; + + /* + * Constructor + */ + public MedicationPackageContentComponent() { + super(); + } + + /* + * Constructor + */ + public MedicationPackageContentComponent(Reference item) { + super(); + this.item = item; + } + + /** + * @return {@link #item} (Identifies one of the items in the package.) + */ + public Reference getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationPackageContentComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new Reference(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (Identifies one of the items in the package.) + */ + public MedicationPackageContentComponent setItem(Reference value) { + this.item = value; + return this; + } + + /** + * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies one of the items in the package.) + */ + public Medication getItemTarget() { + if (this.itemTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationPackageContentComponent.item"); + else if (Configuration.doAutoCreate()) + this.itemTarget = new Medication(); // aa + return this.itemTarget; + } + + /** + * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies one of the items in the package.) + */ + public MedicationPackageContentComponent setItemTarget(Medication value) { + this.itemTarget = value; + return this; + } + + /** + * @return {@link #amount} (The amount of the product that is in the package.) + */ + public SimpleQuantity getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationPackageContentComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new SimpleQuantity(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (The amount of the product that is in the package.) + */ + public MedicationPackageContentComponent setAmount(SimpleQuantity value) { + this.amount = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("item", "Reference(Medication)", "Identifies one of the items in the package.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("amount", "SimpleQuantity", "The amount of the product that is in the package.", 0, java.lang.Integer.MAX_VALUE, amount)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("item")) + this.item = castToReference(value); // Reference + else if (name.equals("amount")) + this.amount = castToSimpleQuantity(value); // SimpleQuantity + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("item")) { + this.item = new Reference(); + return this.item; + } + else if (name.equals("amount")) { + this.amount = new SimpleQuantity(); + return this.amount; + } + else + return super.addChild(name); + } + + public MedicationPackageContentComponent copy() { + MedicationPackageContentComponent dst = new MedicationPackageContentComponent(); + copyValues(dst); + dst.item = item == null ? null : item.copy(); + dst.amount = amount == null ? null : amount.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationPackageContentComponent)) + return false; + MedicationPackageContentComponent o = (MedicationPackageContentComponent) other; + return compareDeep(item, o.item, true) && compareDeep(amount, o.amount, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationPackageContentComponent)) + return false; + MedicationPackageContentComponent o = (MedicationPackageContentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (item == null || item.isEmpty()) && (amount == null || amount.isEmpty()) + ; + } + + public String fhirType() { + return "Medication.package.content"; + + } + + } + + /** + * A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Codes that identify this medication", formalDefinition="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." ) + protected CodeableConcept code; + + /** + * Set to true if the item is attributable to a specific manufacturer. + */ + @Child(name = "isBrand", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="True if a brand", formalDefinition="Set to true if the item is attributable to a specific manufacturer." ) + protected BooleanType isBrand; + + /** + * Describes the details of the manufacturer. + */ + @Child(name = "manufacturer", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Manufacturer of the item", formalDefinition="Describes the details of the manufacturer." ) + protected Reference manufacturer; + + /** + * The actual object that is the target of the reference (Describes the details of the manufacturer.) + */ + protected Organization manufacturerTarget; + + /** + * Information that only applies to products (not packages). + */ + @Child(name = "product", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Administrable medication details", formalDefinition="Information that only applies to products (not packages)." ) + protected MedicationProductComponent product; + + /** + * Information that only applies to packages (not products). + */ + @Child(name = "package", type = {}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." ) + protected MedicationPackageComponent package_; + + private static final long serialVersionUID = 859308699L; + + /* + * Constructor + */ + public Medication() { + super(); + } + + /** + * @return {@link #code} (A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.) + */ + public Medication setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #isBrand} (Set to true if the item is attributable to a specific manufacturer.). This is the underlying object with id, value and extensions. The accessor "getIsBrand" gives direct access to the value + */ + public BooleanType getIsBrandElement() { + if (this.isBrand == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.isBrand"); + else if (Configuration.doAutoCreate()) + this.isBrand = new BooleanType(); // bb + return this.isBrand; + } + + public boolean hasIsBrandElement() { + return this.isBrand != null && !this.isBrand.isEmpty(); + } + + public boolean hasIsBrand() { + return this.isBrand != null && !this.isBrand.isEmpty(); + } + + /** + * @param value {@link #isBrand} (Set to true if the item is attributable to a specific manufacturer.). This is the underlying object with id, value and extensions. The accessor "getIsBrand" gives direct access to the value + */ + public Medication setIsBrandElement(BooleanType value) { + this.isBrand = value; + return this; + } + + /** + * @return Set to true if the item is attributable to a specific manufacturer. + */ + public boolean getIsBrand() { + return this.isBrand == null || this.isBrand.isEmpty() ? false : this.isBrand.getValue(); + } + + /** + * @param value Set to true if the item is attributable to a specific manufacturer. + */ + public Medication setIsBrand(boolean value) { + if (this.isBrand == null) + this.isBrand = new BooleanType(); + this.isBrand.setValue(value); + return this; + } + + /** + * @return {@link #manufacturer} (Describes the details of the manufacturer.) + */ + public Reference getManufacturer() { + if (this.manufacturer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.manufacturer"); + else if (Configuration.doAutoCreate()) + this.manufacturer = new Reference(); // cc + return this.manufacturer; + } + + public boolean hasManufacturer() { + return this.manufacturer != null && !this.manufacturer.isEmpty(); + } + + /** + * @param value {@link #manufacturer} (Describes the details of the manufacturer.) + */ + public Medication setManufacturer(Reference value) { + this.manufacturer = value; + return this; + } + + /** + * @return {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the details of the manufacturer.) + */ + public Organization getManufacturerTarget() { + if (this.manufacturerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.manufacturer"); + else if (Configuration.doAutoCreate()) + this.manufacturerTarget = new Organization(); // aa + return this.manufacturerTarget; + } + + /** + * @param value {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the details of the manufacturer.) + */ + public Medication setManufacturerTarget(Organization value) { + this.manufacturerTarget = value; + return this; + } + + /** + * @return {@link #product} (Information that only applies to products (not packages).) + */ + public MedicationProductComponent getProduct() { + if (this.product == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.product"); + else if (Configuration.doAutoCreate()) + this.product = new MedicationProductComponent(); // cc + return this.product; + } + + public boolean hasProduct() { + return this.product != null && !this.product.isEmpty(); + } + + /** + * @param value {@link #product} (Information that only applies to products (not packages).) + */ + public Medication setProduct(MedicationProductComponent value) { + this.product = value; + return this; + } + + /** + * @return {@link #package_} (Information that only applies to packages (not products).) + */ + public MedicationPackageComponent getPackage() { + if (this.package_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Medication.package_"); + else if (Configuration.doAutoCreate()) + this.package_ = new MedicationPackageComponent(); // cc + return this.package_; + } + + public boolean hasPackage() { + return this.package_ != null && !this.package_.isEmpty(); + } + + /** + * @param value {@link #package_} (Information that only applies to packages (not products).) + */ + public Medication setPackage(MedicationPackageComponent value) { + this.package_ = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("isBrand", "boolean", "Set to true if the item is attributable to a specific manufacturer.", 0, java.lang.Integer.MAX_VALUE, isBrand)); + childrenList.add(new Property("manufacturer", "Reference(Organization)", "Describes the details of the manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); + childrenList.add(new Property("product", "", "Information that only applies to products (not packages).", 0, java.lang.Integer.MAX_VALUE, product)); + childrenList.add(new Property("package", "", "Information that only applies to packages (not products).", 0, java.lang.Integer.MAX_VALUE, package_)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("isBrand")) + this.isBrand = castToBoolean(value); // BooleanType + else if (name.equals("manufacturer")) + this.manufacturer = castToReference(value); // Reference + else if (name.equals("product")) + this.product = (MedicationProductComponent) value; // MedicationProductComponent + else if (name.equals("package")) + this.package_ = (MedicationPackageComponent) value; // MedicationPackageComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("isBrand")) { + throw new FHIRException("Cannot call addChild on a primitive type Medication.isBrand"); + } + else if (name.equals("manufacturer")) { + this.manufacturer = new Reference(); + return this.manufacturer; + } + else if (name.equals("product")) { + this.product = new MedicationProductComponent(); + return this.product; + } + else if (name.equals("package")) { + this.package_ = new MedicationPackageComponent(); + return this.package_; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Medication"; + + } + + public Medication copy() { + Medication dst = new Medication(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.isBrand = isBrand == null ? null : isBrand.copy(); + dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); + dst.product = product == null ? null : product.copy(); + dst.package_ = package_ == null ? null : package_.copy(); + return dst; + } + + protected Medication typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Medication)) + return false; + Medication o = (Medication) other; + return compareDeep(code, o.code, true) && compareDeep(isBrand, o.isBrand, true) && compareDeep(manufacturer, o.manufacturer, true) + && compareDeep(product, o.product, true) && compareDeep(package_, o.package_, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Medication)) + return false; + Medication o = (Medication) other; + return compareValues(isBrand, o.isBrand, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (isBrand == null || isBrand.isEmpty()) + && (manufacturer == null || manufacturer.isEmpty()) && (product == null || product.isEmpty()) + && (package_ == null || package_.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Medication; + } + + @SearchParamDefinition(name="container", path="Medication.package.container", description="E.g. box, vial, blister-pack", type="token" ) + public static final String SP_CONTAINER = "container"; + @SearchParamDefinition(name="code", path="Medication.code", description="Codes that identify this medication", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="The product contained", type="reference" ) + public static final String SP_INGREDIENT = "ingredient"; + @SearchParamDefinition(name="form", path="Medication.product.form", description="powder | tablets | carton +", type="token" ) + public static final String SP_FORM = "form"; + @SearchParamDefinition(name="content", path="Medication.package.content.item", description="A product in the package", type="reference" ) + public static final String SP_CONTENT = "content"; + @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="Manufacturer of the item", type="reference" ) + public static final String SP_MANUFACTURER = "manufacturer"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationAdministration.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationAdministration.java new file mode 100644 index 00000000000..50e0792d483 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationAdministration.java @@ -0,0 +1,1532 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ +@ResourceDef(name="MedicationAdministration", profile="http://hl7.org/fhir/Profile/MedicationAdministration") +public class MedicationAdministration extends DomainResource { + + public enum MedicationAdministrationStatus { + /** + * The administration has started but has not yet completed. + */ + INPROGRESS, + /** + * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * All actions that are implied by the administration have occurred. + */ + COMPLETED, + /** + * The administration was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * Actions implied by the administration have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * added to help the parsers + */ + NULL; + public static MedicationAdministrationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + throw new FHIRException("Unknown MedicationAdministrationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/medication-admin-status"; + case ONHOLD: return "http://hl7.org/fhir/medication-admin-status"; + case COMPLETED: return "http://hl7.org/fhir/medication-admin-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/medication-admin-status"; + case STOPPED: return "http://hl7.org/fhir/medication-admin-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The administration has started but has not yet completed."; + case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case COMPLETED: return "All actions that are implied by the administration have occurred."; + case ENTEREDINERROR: return "The administration was entered in error and therefore nullified."; + case STOPPED: return "Actions implied by the administration have been permanently halted, before all of them occurred."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case STOPPED: return "Stopped"; + default: return "?"; + } + } + } + + public static class MedicationAdministrationStatusEnumFactory implements EnumFactory { + public MedicationAdministrationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return MedicationAdministrationStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return MedicationAdministrationStatus.ONHOLD; + if ("completed".equals(codeString)) + return MedicationAdministrationStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationAdministrationStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationAdministrationStatus.STOPPED; + throw new IllegalArgumentException("Unknown MedicationAdministrationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatus.INPROGRESS); + if ("on-hold".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatus.ONHOLD); + if ("completed".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatus.ENTEREDINERROR); + if ("stopped".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatus.STOPPED); + throw new FHIRException("Unknown MedicationAdministrationStatus code '"+codeString+"'"); + } + public String toCode(MedicationAdministrationStatus code) { + if (code == MedicationAdministrationStatus.INPROGRESS) + return "in-progress"; + if (code == MedicationAdministrationStatus.ONHOLD) + return "on-hold"; + if (code == MedicationAdministrationStatus.COMPLETED) + return "completed"; + if (code == MedicationAdministrationStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationAdministrationStatus.STOPPED) + return "stopped"; + return "?"; + } + } + + @Block() + public static class MedicationAdministrationDosageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dosage Instructions", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication." ) + protected StringType text; + + /** + * A coded specification of the anatomic site where the medication first entered the body. For example, "left arm". + */ + @Child(name = "site", type = {CodeableConcept.class, BodySite.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Body site administered to", formalDefinition="A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\"." ) + protected Type site; + + /** + * A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Path of substance into body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc." ) + protected CodeableConcept route; + + /** + * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How drug was administered", formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." ) + protected CodeableConcept method; + + /** + * The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount administered in one dose", formalDefinition="The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection." ) + protected SimpleQuantity quantity; + + /** + * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + */ + @Child(name = "rate", type = {Ratio.class, Range.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dose quantity per unit of time", formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) + protected Type rate; + + private static final long serialVersionUID = -1772198879L; + + /* + * Constructor + */ + public MedicationAdministrationDosageComponent() { + super(); + } + + /** + * @return {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public MedicationAdministrationDosageComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + public MedicationAdministrationDosageComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public Type getSite() { + return this.site; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public CodeableConcept getSiteCodeableConcept() throws FHIRException { + if (!(this.site instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.site.getClass().getName()+" was encountered"); + return (CodeableConcept) this.site; + } + + public boolean hasSiteCodeableConcept() { + return this.site instanceof CodeableConcept; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public Reference getSiteReference() throws FHIRException { + if (!(this.site instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.site.getClass().getName()+" was encountered"); + return (Reference) this.site; + } + + public boolean hasSiteReference() { + return this.site instanceof Reference; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public MedicationAdministrationDosageComponent setSite(Type value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) + */ + public MedicationAdministrationDosageComponent setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public MedicationAdministrationDosageComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #quantity} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) + */ + public MedicationAdministrationDosageComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Type getRate() { + return this.rate; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Ratio getRateRatio() throws FHIRException { + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this.rate instanceof Ratio; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Range getRateRange() throws FHIRException { + if (!(this.rate instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Range) this.rate; + } + + public boolean hasRateRange() { + return this.rate instanceof Range; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public MedicationAdministrationDosageComponent setRate(Type value) { + this.rate = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("text", "string", "Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("site[x]", "CodeableConcept|Reference(BodySite)", "A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\".", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", 0, java.lang.Integer.MAX_VALUE, route)); + childrenList.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("rate[x]", "Ratio|Range", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("site[x]")) + this.site = (Type) value; // Type + else if (name.equals("route")) + this.route = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("rate[x]")) + this.rate = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationAdministration.text"); + } + else if (name.equals("siteCodeableConcept")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("siteReference")) { + this.site = new Reference(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else if (name.equals("rateRange")) { + this.rate = new Range(); + return this.rate; + } + else + return super.addChild(name); + } + + public MedicationAdministrationDosageComponent copy() { + MedicationAdministrationDosageComponent dst = new MedicationAdministrationDosageComponent(); + copyValues(dst); + dst.text = text == null ? null : text.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.method = method == null ? null : method.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.rate = rate == null ? null : rate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationAdministrationDosageComponent)) + return false; + MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other; + return compareDeep(text, o.text, true) && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) + && compareDeep(method, o.method, true) && compareDeep(quantity, o.quantity, true) && compareDeep(rate, o.rate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationAdministrationDosageComponent)) + return false; + MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (text == null || text.isEmpty()) && (site == null || site.isEmpty()) + && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (rate == null || rate.isEmpty()); + } + + public String fhirType() { + return "MedicationAdministration.dosage"; + + } + + } + + /** + * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) + protected List identifier; + + /** + * Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way." ) + protected Enumeration status; + + /** + * The person or animal receiving the medication. + */ + @Child(name = "patient", type = {Patient.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who received medication", formalDefinition="The person or animal receiving the medication." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person or animal receiving the medication.) + */ + protected Patient patientTarget; + + /** + * The individual who was responsible for giving the medication to the patient. + */ + @Child(name = "practitioner", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who administered substance", formalDefinition="The individual who was responsible for giving the medication to the patient." ) + protected Reference practitioner; + + /** + * The actual object that is the target of the reference (The individual who was responsible for giving the medication to the patient.) + */ + protected Resource practitionerTarget; + + /** + * The visit, admission or other contact between patient and health care provider the medication administration was performed as part of. + */ + @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit, admission or other contact between patient and health care provider the medication administration was performed as part of." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.) + */ + protected Encounter encounterTarget; + + /** + * The original request, instruction or authority to perform the administration. + */ + @Child(name = "prescription", type = {MedicationOrder.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Order administration performed against", formalDefinition="The original request, instruction or authority to perform the administration." ) + protected Reference prescription; + + /** + * The actual object that is the target of the reference (The original request, instruction or authority to perform the administration.) + */ + protected MedicationOrder prescriptionTarget; + + /** + * Set this to true if the record is saying that the medication was NOT administered. + */ + @Child(name = "wasNotGiven", type = {BooleanType.class}, order=6, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="True if medication not administered", formalDefinition="Set this to true if the record is saying that the medication was NOT administered." ) + protected BooleanType wasNotGiven; + + /** + * A code indicating why the administration was not performed. + */ + @Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason administration not performed", formalDefinition="A code indicating why the administration was not performed." ) + protected List reasonNotGiven; + + /** + * A code indicating why the medication was given. + */ + @Child(name = "reasonGiven", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason administration performed", formalDefinition="A code indicating why the medication was given." ) + protected List reasonGiven; + + /** + * A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate. + */ + @Child(name = "effectiveTime", type = {DateTimeType.class, Period.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Start and end time of administration", formalDefinition="A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." ) + protected Type effectiveTime; + + /** + * Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. + */ + @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What was administered", formalDefinition="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) + protected Type medication; + + /** + * The device used in administering the medication to the patient. For example, a particular infusion pump. + */ + @Child(name = "device", type = {Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Device used to administer", formalDefinition="The device used in administering the medication to the patient. For example, a particular infusion pump." ) + protected List device; + /** + * The actual objects that are the target of the reference (The device used in administering the medication to the patient. For example, a particular infusion pump.) + */ + protected List deviceTarget; + + + /** + * Extra information about the medication administration that is not conveyed by the other attributes. + */ + @Child(name = "note", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Information about the administration", formalDefinition="Extra information about the medication administration that is not conveyed by the other attributes." ) + protected StringType note; + + /** + * Describes the medication dosage information details e.g. dose, rate, site, route, etc. + */ + @Child(name = "dosage", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Details of how medication was taken", formalDefinition="Describes the medication dosage information details e.g. dose, rate, site, route, etc." ) + protected MedicationAdministrationDosageComponent dosage; + + private static final long serialVersionUID = -669616345L; + + /* + * Constructor + */ + public MedicationAdministration() { + super(); + } + + /* + * Constructor + */ + public MedicationAdministration(Enumeration status, Reference patient, Type effectiveTime, Type medication) { + super(); + this.status = status; + this.patient = patient; + this.effectiveTime = effectiveTime; + this.medication = medication; + } + + /** + * @return {@link #identifier} (External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public MedicationAdministration addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MedicationAdministrationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MedicationAdministration setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + public MedicationAdministrationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + public MedicationAdministration setStatus(MedicationAdministrationStatus value) { + if (this.status == null) + this.status = new Enumeration(new MedicationAdministrationStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #patient} (The person or animal receiving the medication.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person or animal receiving the medication.) + */ + public MedicationAdministration setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or animal receiving the medication.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or animal receiving the medication.) + */ + public MedicationAdministration setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #practitioner} (The individual who was responsible for giving the medication to the patient.) + */ + public Reference getPractitioner() { + if (this.practitioner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.practitioner"); + else if (Configuration.doAutoCreate()) + this.practitioner = new Reference(); // cc + return this.practitioner; + } + + public boolean hasPractitioner() { + return this.practitioner != null && !this.practitioner.isEmpty(); + } + + /** + * @param value {@link #practitioner} (The individual who was responsible for giving the medication to the patient.) + */ + public MedicationAdministration setPractitioner(Reference value) { + this.practitioner = value; + return this; + } + + /** + * @return {@link #practitioner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The individual who was responsible for giving the medication to the patient.) + */ + public Resource getPractitionerTarget() { + return this.practitionerTarget; + } + + /** + * @param value {@link #practitioner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The individual who was responsible for giving the medication to the patient.) + */ + public MedicationAdministration setPractitionerTarget(Resource value) { + this.practitionerTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.) + */ + public MedicationAdministration setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.) + */ + public MedicationAdministration setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #prescription} (The original request, instruction or authority to perform the administration.) + */ + public Reference getPrescription() { + if (this.prescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.prescription"); + else if (Configuration.doAutoCreate()) + this.prescription = new Reference(); // cc + return this.prescription; + } + + public boolean hasPrescription() { + return this.prescription != null && !this.prescription.isEmpty(); + } + + /** + * @param value {@link #prescription} (The original request, instruction or authority to perform the administration.) + */ + public MedicationAdministration setPrescription(Reference value) { + this.prescription = value; + return this; + } + + /** + * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The original request, instruction or authority to perform the administration.) + */ + public MedicationOrder getPrescriptionTarget() { + if (this.prescriptionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.prescription"); + else if (Configuration.doAutoCreate()) + this.prescriptionTarget = new MedicationOrder(); // aa + return this.prescriptionTarget; + } + + /** + * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The original request, instruction or authority to perform the administration.) + */ + public MedicationAdministration setPrescriptionTarget(MedicationOrder value) { + this.prescriptionTarget = value; + return this; + } + + /** + * @return {@link #wasNotGiven} (Set this to true if the record is saying that the medication was NOT administered.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value + */ + public BooleanType getWasNotGivenElement() { + if (this.wasNotGiven == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.wasNotGiven"); + else if (Configuration.doAutoCreate()) + this.wasNotGiven = new BooleanType(); // bb + return this.wasNotGiven; + } + + public boolean hasWasNotGivenElement() { + return this.wasNotGiven != null && !this.wasNotGiven.isEmpty(); + } + + public boolean hasWasNotGiven() { + return this.wasNotGiven != null && !this.wasNotGiven.isEmpty(); + } + + /** + * @param value {@link #wasNotGiven} (Set this to true if the record is saying that the medication was NOT administered.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value + */ + public MedicationAdministration setWasNotGivenElement(BooleanType value) { + this.wasNotGiven = value; + return this; + } + + /** + * @return Set this to true if the record is saying that the medication was NOT administered. + */ + public boolean getWasNotGiven() { + return this.wasNotGiven == null || this.wasNotGiven.isEmpty() ? false : this.wasNotGiven.getValue(); + } + + /** + * @param value Set this to true if the record is saying that the medication was NOT administered. + */ + public MedicationAdministration setWasNotGiven(boolean value) { + if (this.wasNotGiven == null) + this.wasNotGiven = new BooleanType(); + this.wasNotGiven.setValue(value); + return this; + } + + /** + * @return {@link #reasonNotGiven} (A code indicating why the administration was not performed.) + */ + public List getReasonNotGiven() { + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + return this.reasonNotGiven; + } + + public boolean hasReasonNotGiven() { + if (this.reasonNotGiven == null) + return false; + for (CodeableConcept item : this.reasonNotGiven) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonNotGiven} (A code indicating why the administration was not performed.) + */ + // syntactic sugar + public CodeableConcept addReasonNotGiven() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + this.reasonNotGiven.add(t); + return t; + } + + // syntactic sugar + public MedicationAdministration addReasonNotGiven(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonNotGiven == null) + this.reasonNotGiven = new ArrayList(); + this.reasonNotGiven.add(t); + return this; + } + + /** + * @return {@link #reasonGiven} (A code indicating why the medication was given.) + */ + public List getReasonGiven() { + if (this.reasonGiven == null) + this.reasonGiven = new ArrayList(); + return this.reasonGiven; + } + + public boolean hasReasonGiven() { + if (this.reasonGiven == null) + return false; + for (CodeableConcept item : this.reasonGiven) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonGiven} (A code indicating why the medication was given.) + */ + // syntactic sugar + public CodeableConcept addReasonGiven() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonGiven == null) + this.reasonGiven = new ArrayList(); + this.reasonGiven.add(t); + return t; + } + + // syntactic sugar + public MedicationAdministration addReasonGiven(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonGiven == null) + this.reasonGiven = new ArrayList(); + this.reasonGiven.add(t); + return this; + } + + /** + * @return {@link #effectiveTime} (A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public Type getEffectiveTime() { + return this.effectiveTime; + } + + /** + * @return {@link #effectiveTime} (A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public DateTimeType getEffectiveTimeDateTimeType() throws FHIRException { + if (!(this.effectiveTime instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effectiveTime.getClass().getName()+" was encountered"); + return (DateTimeType) this.effectiveTime; + } + + public boolean hasEffectiveTimeDateTimeType() { + return this.effectiveTime instanceof DateTimeType; + } + + /** + * @return {@link #effectiveTime} (A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public Period getEffectiveTimePeriod() throws FHIRException { + if (!(this.effectiveTime instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effectiveTime.getClass().getName()+" was encountered"); + return (Period) this.effectiveTime; + } + + public boolean hasEffectiveTimePeriod() { + return this.effectiveTime instanceof Period; + } + + public boolean hasEffectiveTime() { + return this.effectiveTime != null && !this.effectiveTime.isEmpty(); + } + + /** + * @param value {@link #effectiveTime} (A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public MedicationAdministration setEffectiveTime(Type value) { + this.effectiveTime = value; + return this; + } + + /** + * @return {@link #medication} (Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Type getMedication() { + return this.medication; + } + + /** + * @return {@link #medication} (Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public CodeableConcept getMedicationCodeableConcept() throws FHIRException { + if (!(this.medication instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (CodeableConcept) this.medication; + } + + public boolean hasMedicationCodeableConcept() { + return this.medication instanceof CodeableConcept; + } + + /** + * @return {@link #medication} (Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Reference getMedicationReference() throws FHIRException { + if (!(this.medication instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (Reference) this.medication; + } + + public boolean hasMedicationReference() { + return this.medication instanceof Reference; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public MedicationAdministration setMedication(Type value) { + this.medication = value; + return this; + } + + /** + * @return {@link #device} (The device used in administering the medication to the patient. For example, a particular infusion pump.) + */ + public List getDevice() { + if (this.device == null) + this.device = new ArrayList(); + return this.device; + } + + public boolean hasDevice() { + if (this.device == null) + return false; + for (Reference item : this.device) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #device} (The device used in administering the medication to the patient. For example, a particular infusion pump.) + */ + // syntactic sugar + public Reference addDevice() { //3 + Reference t = new Reference(); + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return t; + } + + // syntactic sugar + public MedicationAdministration addDevice(Reference t) { //3 + if (t == null) + return this; + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return this; + } + + /** + * @return {@link #device} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The device used in administering the medication to the patient. For example, a particular infusion pump.) + */ + public List getDeviceTarget() { + if (this.deviceTarget == null) + this.deviceTarget = new ArrayList(); + return this.deviceTarget; + } + + // syntactic sugar + /** + * @return {@link #device} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The device used in administering the medication to the patient. For example, a particular infusion pump.) + */ + public Device addDeviceTarget() { + Device r = new Device(); + if (this.deviceTarget == null) + this.deviceTarget = new ArrayList(); + this.deviceTarget.add(r); + return r; + } + + /** + * @return {@link #note} (Extra information about the medication administration that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Extra information about the medication administration that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public MedicationAdministration setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return Extra information about the medication administration that is not conveyed by the other attributes. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value Extra information about the medication administration that is not conveyed by the other attributes. + */ + public MedicationAdministration setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) + */ + public MedicationAdministrationDosageComponent getDosage() { + if (this.dosage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.dosage"); + else if (Configuration.doAutoCreate()) + this.dosage = new MedicationAdministrationDosageComponent(); // cc + return this.dosage; + } + + public boolean hasDosage() { + return this.dosage != null && !this.dosage.isEmpty(); + } + + /** + * @param value {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) + */ + public MedicationAdministration setDosage(MedicationAdministrationDosageComponent value) { + this.dosage = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("patient", "Reference(Patient)", "The person or animal receiving the medication.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("practitioner", "Reference(Practitioner|Patient|RelatedPerson)", "The individual who was responsible for giving the medication to the patient.", 0, java.lang.Integer.MAX_VALUE, practitioner)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("prescription", "Reference(MedicationOrder)", "The original request, instruction or authority to perform the administration.", 0, java.lang.Integer.MAX_VALUE, prescription)); + childrenList.add(new Property("wasNotGiven", "boolean", "Set this to true if the record is saying that the medication was NOT administered.", 0, java.lang.Integer.MAX_VALUE, wasNotGiven)); + childrenList.add(new Property("reasonNotGiven", "CodeableConcept", "A code indicating why the administration was not performed.", 0, java.lang.Integer.MAX_VALUE, reasonNotGiven)); + childrenList.add(new Property("reasonGiven", "CodeableConcept", "A code indicating why the medication was given.", 0, java.lang.Integer.MAX_VALUE, reasonGiven)); + childrenList.add(new Property("effectiveTime[x]", "dateTime|Period", "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, java.lang.Integer.MAX_VALUE, effectiveTime)); + childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); + childrenList.add(new Property("device", "Reference(Device)", "The device used in administering the medication to the patient. For example, a particular infusion pump.", 0, java.lang.Integer.MAX_VALUE, device)); + childrenList.add(new Property("note", "string", "Extra information about the medication administration that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("dosage", "", "Describes the medication dosage information details e.g. dose, rate, site, route, etc.", 0, java.lang.Integer.MAX_VALUE, dosage)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new MedicationAdministrationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("practitioner")) + this.practitioner = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("prescription")) + this.prescription = castToReference(value); // Reference + else if (name.equals("wasNotGiven")) + this.wasNotGiven = castToBoolean(value); // BooleanType + else if (name.equals("reasonNotGiven")) + this.getReasonNotGiven().add(castToCodeableConcept(value)); + else if (name.equals("reasonGiven")) + this.getReasonGiven().add(castToCodeableConcept(value)); + else if (name.equals("effectiveTime[x]")) + this.effectiveTime = (Type) value; // Type + else if (name.equals("medication[x]")) + this.medication = (Type) value; // Type + else if (name.equals("device")) + this.getDevice().add(castToReference(value)); + else if (name.equals("note")) + this.note = castToString(value); // StringType + else if (name.equals("dosage")) + this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationAdministration.status"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("practitioner")) { + this.practitioner = new Reference(); + return this.practitioner; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("prescription")) { + this.prescription = new Reference(); + return this.prescription; + } + else if (name.equals("wasNotGiven")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationAdministration.wasNotGiven"); + } + else if (name.equals("reasonNotGiven")) { + return addReasonNotGiven(); + } + else if (name.equals("reasonGiven")) { + return addReasonGiven(); + } + else if (name.equals("effectiveTimeDateTime")) { + this.effectiveTime = new DateTimeType(); + return this.effectiveTime; + } + else if (name.equals("effectiveTimePeriod")) { + this.effectiveTime = new Period(); + return this.effectiveTime; + } + else if (name.equals("medicationCodeableConcept")) { + this.medication = new CodeableConcept(); + return this.medication; + } + else if (name.equals("medicationReference")) { + this.medication = new Reference(); + return this.medication; + } + else if (name.equals("device")) { + return addDevice(); + } + else if (name.equals("note")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationAdministration.note"); + } + else if (name.equals("dosage")) { + this.dosage = new MedicationAdministrationDosageComponent(); + return this.dosage; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MedicationAdministration"; + + } + + public MedicationAdministration copy() { + MedicationAdministration dst = new MedicationAdministration(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.practitioner = practitioner == null ? null : practitioner.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.prescription = prescription == null ? null : prescription.copy(); + dst.wasNotGiven = wasNotGiven == null ? null : wasNotGiven.copy(); + if (reasonNotGiven != null) { + dst.reasonNotGiven = new ArrayList(); + for (CodeableConcept i : reasonNotGiven) + dst.reasonNotGiven.add(i.copy()); + }; + if (reasonGiven != null) { + dst.reasonGiven = new ArrayList(); + for (CodeableConcept i : reasonGiven) + dst.reasonGiven.add(i.copy()); + }; + dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); + dst.medication = medication == null ? null : medication.copy(); + if (device != null) { + dst.device = new ArrayList(); + for (Reference i : device) + dst.device.add(i.copy()); + }; + dst.note = note == null ? null : note.copy(); + dst.dosage = dosage == null ? null : dosage.copy(); + return dst; + } + + protected MedicationAdministration typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationAdministration)) + return false; + MedicationAdministration o = (MedicationAdministration) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) + && compareDeep(practitioner, o.practitioner, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(prescription, o.prescription, true) && compareDeep(wasNotGiven, o.wasNotGiven, true) + && compareDeep(reasonNotGiven, o.reasonNotGiven, true) && compareDeep(reasonGiven, o.reasonGiven, true) + && compareDeep(effectiveTime, o.effectiveTime, true) && compareDeep(medication, o.medication, true) + && compareDeep(device, o.device, true) && compareDeep(note, o.note, true) && compareDeep(dosage, o.dosage, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationAdministration)) + return false; + MedicationAdministration o = (MedicationAdministration) other; + return compareValues(status, o.status, true) && compareValues(wasNotGiven, o.wasNotGiven, true) && compareValues(note, o.note, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (patient == null || patient.isEmpty()) && (practitioner == null || practitioner.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (prescription == null || prescription.isEmpty()) + && (wasNotGiven == null || wasNotGiven.isEmpty()) && (reasonNotGiven == null || reasonNotGiven.isEmpty()) + && (reasonGiven == null || reasonGiven.isEmpty()) && (effectiveTime == null || effectiveTime.isEmpty()) + && (medication == null || medication.isEmpty()) && (device == null || device.isEmpty()) && (note == null || note.isEmpty()) + && (dosage == null || dosage.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MedicationAdministration; + } + + @SearchParamDefinition(name="identifier", path="MedicationAdministration.identifier", description="Return administrations with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="MedicationAdministration.medicationCodeableConcept", description="Return administrations of this medication code", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="prescription", path="MedicationAdministration.prescription", description="The identity of a prescription to list administrations from", type="reference" ) + public static final String SP_PRESCRIPTION = "prescription"; + @SearchParamDefinition(name="effectivetime", path="MedicationAdministration.effectiveTime[x]", description="Date administration happened (or did not happen)", type="date" ) + public static final String SP_EFFECTIVETIME = "effectivetime"; + @SearchParamDefinition(name="practitioner", path="MedicationAdministration.practitioner", description="Who administered substance", type="reference" ) + public static final String SP_PRACTITIONER = "practitioner"; + @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="medication", path="MedicationAdministration.medicationReference", description="Return administrations of this medication resource", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity", type="reference" ) + public static final String SP_DEVICE = "device"; + @SearchParamDefinition(name="notgiven", path="MedicationAdministration.wasNotGiven", description="Administrations that were not made", type="token" ) + public static final String SP_NOTGIVEN = "notgiven"; + @SearchParamDefinition(name="status", path="MedicationAdministration.status", description="MedicationAdministration event status (for example one of active/paused/completed/nullified)", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationDispense.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationDispense.java new file mode 100644 index 00000000000..e8684dd6bec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationDispense.java @@ -0,0 +1,2067 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ +@ResourceDef(name="MedicationDispense", profile="http://hl7.org/fhir/Profile/MedicationDispense") +public class MedicationDispense extends DomainResource { + + public enum MedicationDispenseStatus { + /** + * The dispense has started but has not yet completed. + */ + INPROGRESS, + /** + * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called "suspended" + */ + ONHOLD, + /** + * All actions that are implied by the dispense have occurred. + */ + COMPLETED, + /** + * The dispense was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * Actions implied by the dispense have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * added to help the parsers + */ + NULL; + public static MedicationDispenseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/medication-dispense-status"; + case ONHOLD: return "http://hl7.org/fhir/medication-dispense-status"; + case COMPLETED: return "http://hl7.org/fhir/medication-dispense-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/medication-dispense-status"; + case STOPPED: return "http://hl7.org/fhir/medication-dispense-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The dispense has started but has not yet completed."; + case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called \"suspended\""; + case COMPLETED: return "All actions that are implied by the dispense have occurred."; + case ENTEREDINERROR: return "The dispense was entered in error and therefore nullified."; + case STOPPED: return "Actions implied by the dispense have been permanently halted, before all of them occurred."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in-Error"; + case STOPPED: return "Stopped"; + default: return "?"; + } + } + } + + public static class MedicationDispenseStatusEnumFactory implements EnumFactory { + public MedicationDispenseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return MedicationDispenseStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return MedicationDispenseStatus.ONHOLD; + if ("completed".equals(codeString)) + return MedicationDispenseStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationDispenseStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationDispenseStatus.STOPPED; + throw new IllegalArgumentException("Unknown MedicationDispenseStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, MedicationDispenseStatus.INPROGRESS); + if ("on-hold".equals(codeString)) + return new Enumeration(this, MedicationDispenseStatus.ONHOLD); + if ("completed".equals(codeString)) + return new Enumeration(this, MedicationDispenseStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, MedicationDispenseStatus.ENTEREDINERROR); + if ("stopped".equals(codeString)) + return new Enumeration(this, MedicationDispenseStatus.STOPPED); + throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'"); + } + public String toCode(MedicationDispenseStatus code) { + if (code == MedicationDispenseStatus.INPROGRESS) + return "in-progress"; + if (code == MedicationDispenseStatus.ONHOLD) + return "on-hold"; + if (code == MedicationDispenseStatus.COMPLETED) + return "completed"; + if (code == MedicationDispenseStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationDispenseStatus.STOPPED) + return "stopped"; + return "?"; + } + } + + @Block() + public static class MedicationDispenseDosageInstructionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dosage Instructions", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication." ) + protected StringType text; + + /** + * Additional instructions such as "Swallow with plenty of water" which may or may not be coded. + */ + @Child(name = "additionalInstructions", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. \"Take with food\"", formalDefinition="Additional instructions such as \"Swallow with plenty of water\" which may or may not be coded." ) + protected CodeableConcept additionalInstructions; + + /** + * The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". + */ + @Child(name = "timing", type = {Timing.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When medication should be administered", formalDefinition="The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"." ) + protected Timing timing; + + /** + * Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule. + */ + @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Take \"as needed\" f(or x)", formalDefinition="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). \n\nSpecifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule." ) + protected Type asNeeded; + + /** + * A coded specification of the anatomic site where the medication first enters the body. + */ + @Child(name = "site", type = {CodeableConcept.class, BodySite.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Body site to administer to", formalDefinition="A coded specification of the anatomic site where the medication first enters the body." ) + protected Type site; + + /** + * A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How drug should enter body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject." ) + protected CodeableConcept route; + + /** + * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Technique for administering medication", formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body." ) + protected CodeableConcept method; + + /** + * The amount of therapeutic or other substance given at one administration event. + */ + @Child(name = "dose", type = {Range.class, SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of medication per dose", formalDefinition="The amount of therapeutic or other substance given at one administration event." ) + protected Type dose; + + /** + * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + */ + @Child(name = "rate", type = {Ratio.class, Range.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of medication per unit of time", formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) + protected Type rate; + + /** + * The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours. + */ + @Child(name = "maxDosePerPeriod", type = {Ratio.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Upper limit on medication per unit of time", formalDefinition="The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours." ) + protected Ratio maxDosePerPeriod; + + private static final long serialVersionUID = -1470136646L; + + /* + * Constructor + */ + public MedicationDispenseDosageInstructionComponent() { + super(); + } + + /** + * @return {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public MedicationDispenseDosageInstructionComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. + */ + public MedicationDispenseDosageInstructionComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #additionalInstructions} (Additional instructions such as "Swallow with plenty of water" which may or may not be coded.) + */ + public CodeableConcept getAdditionalInstructions() { + if (this.additionalInstructions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.additionalInstructions"); + else if (Configuration.doAutoCreate()) + this.additionalInstructions = new CodeableConcept(); // cc + return this.additionalInstructions; + } + + public boolean hasAdditionalInstructions() { + return this.additionalInstructions != null && !this.additionalInstructions.isEmpty(); + } + + /** + * @param value {@link #additionalInstructions} (Additional instructions such as "Swallow with plenty of water" which may or may not be coded.) + */ + public MedicationDispenseDosageInstructionComponent setAdditionalInstructions(CodeableConcept value) { + this.additionalInstructions = value; + return this; + } + + /** + * @return {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Timing getTiming() { + if (this.timing == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.timing"); + else if (Configuration.doAutoCreate()) + this.timing = new Timing(); // cc + return this.timing; + } + + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); + } + + /** + * @param value {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public MedicationDispenseDosageInstructionComponent setTiming(Timing value) { + this.timing = value; + return this; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public Type getAsNeeded() { + return this.asNeeded; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public BooleanType getAsNeededBooleanType() throws FHIRException { + if (!(this.asNeeded instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (BooleanType) this.asNeeded; + } + + public boolean hasAsNeededBooleanType() { + return this.asNeeded instanceof BooleanType; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public CodeableConcept getAsNeededCodeableConcept() throws FHIRException { + if (!(this.asNeeded instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (CodeableConcept) this.asNeeded; + } + + public boolean hasAsNeededCodeableConcept() { + return this.asNeeded instanceof CodeableConcept; + } + + public boolean hasAsNeeded() { + return this.asNeeded != null && !this.asNeeded.isEmpty(); + } + + /** + * @param value {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public MedicationDispenseDosageInstructionComponent setAsNeeded(Type value) { + this.asNeeded = value; + return this; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public Type getSite() { + return this.site; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public CodeableConcept getSiteCodeableConcept() throws FHIRException { + if (!(this.site instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.site.getClass().getName()+" was encountered"); + return (CodeableConcept) this.site; + } + + public boolean hasSiteCodeableConcept() { + return this.site instanceof CodeableConcept; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public Reference getSiteReference() throws FHIRException { + if (!(this.site instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.site.getClass().getName()+" was encountered"); + return (Reference) this.site; + } + + public boolean hasSiteReference() { + return this.site instanceof Reference; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public MedicationDispenseDosageInstructionComponent setSite(Type value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.) + */ + public MedicationDispenseDosageInstructionComponent setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.) + */ + public MedicationDispenseDosageInstructionComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public Type getDose() { + return this.dose; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public Range getDoseRange() throws FHIRException { + if (!(this.dose instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.dose.getClass().getName()+" was encountered"); + return (Range) this.dose; + } + + public boolean hasDoseRange() { + return this.dose instanceof Range; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public SimpleQuantity getDoseSimpleQuantity() throws FHIRException { + if (!(this.dose instanceof SimpleQuantity)) + throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.dose.getClass().getName()+" was encountered"); + return (SimpleQuantity) this.dose; + } + + public boolean hasDoseSimpleQuantity() { + return this.dose instanceof SimpleQuantity; + } + + public boolean hasDose() { + return this.dose != null && !this.dose.isEmpty(); + } + + /** + * @param value {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public MedicationDispenseDosageInstructionComponent setDose(Type value) { + this.dose = value; + return this; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Type getRate() { + return this.rate; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Ratio getRateRatio() throws FHIRException { + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this.rate instanceof Ratio; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Range getRateRange() throws FHIRException { + if (!(this.rate instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Range) this.rate; + } + + public boolean hasRateRange() { + return this.rate instanceof Range; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public MedicationDispenseDosageInstructionComponent setRate(Type value) { + this.rate = value; + return this; + } + + /** + * @return {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.) + */ + public Ratio getMaxDosePerPeriod() { + if (this.maxDosePerPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseDosageInstructionComponent.maxDosePerPeriod"); + else if (Configuration.doAutoCreate()) + this.maxDosePerPeriod = new Ratio(); // cc + return this.maxDosePerPeriod; + } + + public boolean hasMaxDosePerPeriod() { + return this.maxDosePerPeriod != null && !this.maxDosePerPeriod.isEmpty(); + } + + /** + * @param value {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.) + */ + public MedicationDispenseDosageInstructionComponent setMaxDosePerPeriod(Ratio value) { + this.maxDosePerPeriod = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("text", "string", "Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("additionalInstructions", "CodeableConcept", "Additional instructions such as \"Swallow with plenty of water\" which may or may not be coded.", 0, java.lang.Integer.MAX_VALUE, additionalInstructions)); + childrenList.add(new Property("timing", "Timing", "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".", 0, java.lang.Integer.MAX_VALUE, timing)); + childrenList.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). \n\nSpecifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", 0, java.lang.Integer.MAX_VALUE, asNeeded)); + childrenList.add(new Property("site[x]", "CodeableConcept|Reference(BodySite)", "A coded specification of the anatomic site where the medication first enters the body.", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.", 0, java.lang.Integer.MAX_VALUE, route)); + childrenList.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("dose[x]", "Range|SimpleQuantity", "The amount of therapeutic or other substance given at one administration event.", 0, java.lang.Integer.MAX_VALUE, dose)); + childrenList.add(new Property("rate[x]", "Ratio|Range", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); + childrenList.add(new Property("maxDosePerPeriod", "Ratio", "The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.", 0, java.lang.Integer.MAX_VALUE, maxDosePerPeriod)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("additionalInstructions")) + this.additionalInstructions = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("timing")) + this.timing = castToTiming(value); // Timing + else if (name.equals("asNeeded[x]")) + this.asNeeded = (Type) value; // Type + else if (name.equals("site[x]")) + this.site = (Type) value; // Type + else if (name.equals("route")) + this.route = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dose[x]")) + this.dose = (Type) value; // Type + else if (name.equals("rate[x]")) + this.rate = (Type) value; // Type + else if (name.equals("maxDosePerPeriod")) + this.maxDosePerPeriod = castToRatio(value); // Ratio + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.text"); + } + else if (name.equals("additionalInstructions")) { + this.additionalInstructions = new CodeableConcept(); + return this.additionalInstructions; + } + else if (name.equals("timing")) { + this.timing = new Timing(); + return this.timing; + } + else if (name.equals("asNeededBoolean")) { + this.asNeeded = new BooleanType(); + return this.asNeeded; + } + else if (name.equals("asNeededCodeableConcept")) { + this.asNeeded = new CodeableConcept(); + return this.asNeeded; + } + else if (name.equals("siteCodeableConcept")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("siteReference")) { + this.site = new Reference(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("doseRange")) { + this.dose = new Range(); + return this.dose; + } + else if (name.equals("doseSimpleQuantity")) { + this.dose = new SimpleQuantity(); + return this.dose; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else if (name.equals("rateRange")) { + this.rate = new Range(); + return this.rate; + } + else if (name.equals("maxDosePerPeriod")) { + this.maxDosePerPeriod = new Ratio(); + return this.maxDosePerPeriod; + } + else + return super.addChild(name); + } + + public MedicationDispenseDosageInstructionComponent copy() { + MedicationDispenseDosageInstructionComponent dst = new MedicationDispenseDosageInstructionComponent(); + copyValues(dst); + dst.text = text == null ? null : text.copy(); + dst.additionalInstructions = additionalInstructions == null ? null : additionalInstructions.copy(); + dst.timing = timing == null ? null : timing.copy(); + dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.method = method == null ? null : method.copy(); + dst.dose = dose == null ? null : dose.copy(); + dst.rate = rate == null ? null : rate.copy(); + dst.maxDosePerPeriod = maxDosePerPeriod == null ? null : maxDosePerPeriod.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationDispenseDosageInstructionComponent)) + return false; + MedicationDispenseDosageInstructionComponent o = (MedicationDispenseDosageInstructionComponent) other; + return compareDeep(text, o.text, true) && compareDeep(additionalInstructions, o.additionalInstructions, true) + && compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(site, o.site, true) + && compareDeep(route, o.route, true) && compareDeep(method, o.method, true) && compareDeep(dose, o.dose, true) + && compareDeep(rate, o.rate, true) && compareDeep(maxDosePerPeriod, o.maxDosePerPeriod, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationDispenseDosageInstructionComponent)) + return false; + MedicationDispenseDosageInstructionComponent o = (MedicationDispenseDosageInstructionComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (text == null || text.isEmpty()) && (additionalInstructions == null || additionalInstructions.isEmpty()) + && (timing == null || timing.isEmpty()) && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) + && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (dose == null || dose.isEmpty()) + && (rate == null || rate.isEmpty()) && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()) + ; + } + + public String fhirType() { + return "MedicationDispense.dosageInstruction"; + + } + + } + + @Block() + public static class MedicationDispenseSubstitutionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code signifying whether a different drug was dispensed from what was prescribed. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of substitution", formalDefinition="A code signifying whether a different drug was dispensed from what was prescribed." ) + protected CodeableConcept type; + + /** + * Indicates the reason for the substitution of (or lack of substitution) from what was prescribed. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Why was substitution made", formalDefinition="Indicates the reason for the substitution of (or lack of substitution) from what was prescribed." ) + protected List reason; + + /** + * The person or organization that has primary responsibility for the substitution. + */ + @Child(name = "responsibleParty", type = {Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who is responsible for the substitution", formalDefinition="The person or organization that has primary responsibility for the substitution." ) + protected List responsibleParty; + /** + * The actual objects that are the target of the reference (The person or organization that has primary responsibility for the substitution.) + */ + protected List responsiblePartyTarget; + + + private static final long serialVersionUID = 1218245830L; + + /* + * Constructor + */ + public MedicationDispenseSubstitutionComponent() { + super(); + } + + /* + * Constructor + */ + public MedicationDispenseSubstitutionComponent(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (A code signifying whether a different drug was dispensed from what was prescribed.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispenseSubstitutionComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A code signifying whether a different drug was dispensed from what was prescribed.) + */ + public MedicationDispenseSubstitutionComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #reason} (Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public MedicationDispenseSubstitutionComponent addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #responsibleParty} (The person or organization that has primary responsibility for the substitution.) + */ + public List getResponsibleParty() { + if (this.responsibleParty == null) + this.responsibleParty = new ArrayList(); + return this.responsibleParty; + } + + public boolean hasResponsibleParty() { + if (this.responsibleParty == null) + return false; + for (Reference item : this.responsibleParty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #responsibleParty} (The person or organization that has primary responsibility for the substitution.) + */ + // syntactic sugar + public Reference addResponsibleParty() { //3 + Reference t = new Reference(); + if (this.responsibleParty == null) + this.responsibleParty = new ArrayList(); + this.responsibleParty.add(t); + return t; + } + + // syntactic sugar + public MedicationDispenseSubstitutionComponent addResponsibleParty(Reference t) { //3 + if (t == null) + return this; + if (this.responsibleParty == null) + this.responsibleParty = new ArrayList(); + this.responsibleParty.add(t); + return this; + } + + /** + * @return {@link #responsibleParty} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The person or organization that has primary responsibility for the substitution.) + */ + public List getResponsiblePartyTarget() { + if (this.responsiblePartyTarget == null) + this.responsiblePartyTarget = new ArrayList(); + return this.responsiblePartyTarget; + } + + // syntactic sugar + /** + * @return {@link #responsibleParty} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The person or organization that has primary responsibility for the substitution.) + */ + public Practitioner addResponsiblePartyTarget() { + Practitioner r = new Practitioner(); + if (this.responsiblePartyTarget == null) + this.responsiblePartyTarget = new ArrayList(); + this.responsiblePartyTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "A code signifying whether a different drug was dispensed from what was prescribed.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("reason", "CodeableConcept", "Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("responsibleParty", "Reference(Practitioner)", "The person or organization that has primary responsibility for the substitution.", 0, java.lang.Integer.MAX_VALUE, responsibleParty)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("responsibleParty")) + this.getResponsibleParty().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("responsibleParty")) { + return addResponsibleParty(); + } + else + return super.addChild(name); + } + + public MedicationDispenseSubstitutionComponent copy() { + MedicationDispenseSubstitutionComponent dst = new MedicationDispenseSubstitutionComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + if (responsibleParty != null) { + dst.responsibleParty = new ArrayList(); + for (Reference i : responsibleParty) + dst.responsibleParty.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationDispenseSubstitutionComponent)) + return false; + MedicationDispenseSubstitutionComponent o = (MedicationDispenseSubstitutionComponent) other; + return compareDeep(type, o.type, true) && compareDeep(reason, o.reason, true) && compareDeep(responsibleParty, o.responsibleParty, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationDispenseSubstitutionComponent)) + return false; + MedicationDispenseSubstitutionComponent o = (MedicationDispenseSubstitutionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) + && (responsibleParty == null || responsibleParty.isEmpty()); + } + + public String fhirType() { + return "MedicationDispense.substitution"; + + } + + } + + /** + * Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR." ) + protected Identifier identifier; + + /** + * A code specifying the state of the set of dispense events. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="A code specifying the state of the set of dispense events." ) + protected Enumeration status; + + /** + * A link to a resource representing the person to whom the medication will be given. + */ + @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who the dispense is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A link to a resource representing the person to whom the medication will be given.) + */ + protected Patient patientTarget; + + /** + * The individual responsible for dispensing the medication. + */ + @Child(name = "dispenser", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Practitioner responsible for dispensing medication", formalDefinition="The individual responsible for dispensing the medication." ) + protected Reference dispenser; + + /** + * The actual object that is the target of the reference (The individual responsible for dispensing the medication.) + */ + protected Practitioner dispenserTarget; + + /** + * Indicates the medication order that is being dispensed against. + */ + @Child(name = "authorizingPrescription", type = {MedicationOrder.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Medication order that authorizes the dispense", formalDefinition="Indicates the medication order that is being dispensed against." ) + protected List authorizingPrescription; + /** + * The actual objects that are the target of the reference (Indicates the medication order that is being dispensed against.) + */ + protected List authorizingPrescriptionTarget; + + + /** + * Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Trial fill, partial fill, emergency fill, etc.", formalDefinition="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ) + protected CodeableConcept type; + + /** + * The amount of medication that has been dispensed. Includes unit of measure. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of medication that has been dispensed. Includes unit of measure." ) + protected SimpleQuantity quantity; + + /** + * The amount of medication expressed as a timing amount. + */ + @Child(name = "daysSupply", type = {SimpleQuantity.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Days Supply", formalDefinition="The amount of medication expressed as a timing amount." ) + protected SimpleQuantity daysSupply; + + /** + * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. + */ + @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What medication was supplied", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) + protected Type medication; + + /** + * The time when the dispensed product was packaged and reviewed. + */ + @Child(name = "whenPrepared", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dispense processing time", formalDefinition="The time when the dispensed product was packaged and reviewed." ) + protected DateTimeType whenPrepared; + + /** + * The time the dispensed product was provided to the patient or their representative. + */ + @Child(name = "whenHandedOver", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When product was given out", formalDefinition="The time the dispensed product was provided to the patient or their representative." ) + protected DateTimeType whenHandedOver; + + /** + * Identification of the facility/location where the medication was shipped to, as part of the dispense event. + */ + @Child(name = "destination", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the medication was sent", formalDefinition="Identification of the facility/location where the medication was shipped to, as part of the dispense event." ) + protected Reference destination; + + /** + * The actual object that is the target of the reference (Identification of the facility/location where the medication was shipped to, as part of the dispense event.) + */ + protected Location destinationTarget; + + /** + * Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional. + */ + @Child(name = "receiver", type = {Patient.class, Practitioner.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who collected the medication", formalDefinition="Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional." ) + protected List receiver; + /** + * The actual objects that are the target of the reference (Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.) + */ + protected List receiverTarget; + + + /** + * Extra information about the dispense that could not be conveyed in the other attributes. + */ + @Child(name = "note", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Information about the dispense", formalDefinition="Extra information about the dispense that could not be conveyed in the other attributes." ) + protected StringType note; + + /** + * Indicates how the medication is to be used by the patient. + */ + @Child(name = "dosageInstruction", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Medicine administration instructions to the patient/caregiver", formalDefinition="Indicates how the medication is to be used by the patient." ) + protected List dosageInstruction; + + /** + * Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. + */ + @Child(name = "substitution", type = {}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Deals with substitution of one medicine for another", formalDefinition="Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why." ) + protected MedicationDispenseSubstitutionComponent substitution; + + private static final long serialVersionUID = -2071218407L; + + /* + * Constructor + */ + public MedicationDispense() { + super(); + } + + /* + * Constructor + */ + public MedicationDispense(Type medication) { + super(); + this.medication = medication; + } + + /** + * @return {@link #identifier} (Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.) + */ + public MedicationDispense setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #status} (A code specifying the state of the set of dispense events.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MedicationDispenseStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code specifying the state of the set of dispense events.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MedicationDispense setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying the state of the set of dispense events. + */ + public MedicationDispenseStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying the state of the set of dispense events. + */ + public MedicationDispense setStatus(MedicationDispenseStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new MedicationDispenseStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #patient} (A link to a resource representing the person to whom the medication will be given.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A link to a resource representing the person to whom the medication will be given.) + */ + public MedicationDispense setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the medication will be given.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the medication will be given.) + */ + public MedicationDispense setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #dispenser} (The individual responsible for dispensing the medication.) + */ + public Reference getDispenser() { + if (this.dispenser == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.dispenser"); + else if (Configuration.doAutoCreate()) + this.dispenser = new Reference(); // cc + return this.dispenser; + } + + public boolean hasDispenser() { + return this.dispenser != null && !this.dispenser.isEmpty(); + } + + /** + * @param value {@link #dispenser} (The individual responsible for dispensing the medication.) + */ + public MedicationDispense setDispenser(Reference value) { + this.dispenser = value; + return this; + } + + /** + * @return {@link #dispenser} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The individual responsible for dispensing the medication.) + */ + public Practitioner getDispenserTarget() { + if (this.dispenserTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.dispenser"); + else if (Configuration.doAutoCreate()) + this.dispenserTarget = new Practitioner(); // aa + return this.dispenserTarget; + } + + /** + * @param value {@link #dispenser} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The individual responsible for dispensing the medication.) + */ + public MedicationDispense setDispenserTarget(Practitioner value) { + this.dispenserTarget = value; + return this; + } + + /** + * @return {@link #authorizingPrescription} (Indicates the medication order that is being dispensed against.) + */ + public List getAuthorizingPrescription() { + if (this.authorizingPrescription == null) + this.authorizingPrescription = new ArrayList(); + return this.authorizingPrescription; + } + + public boolean hasAuthorizingPrescription() { + if (this.authorizingPrescription == null) + return false; + for (Reference item : this.authorizingPrescription) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #authorizingPrescription} (Indicates the medication order that is being dispensed against.) + */ + // syntactic sugar + public Reference addAuthorizingPrescription() { //3 + Reference t = new Reference(); + if (this.authorizingPrescription == null) + this.authorizingPrescription = new ArrayList(); + this.authorizingPrescription.add(t); + return t; + } + + // syntactic sugar + public MedicationDispense addAuthorizingPrescription(Reference t) { //3 + if (t == null) + return this; + if (this.authorizingPrescription == null) + this.authorizingPrescription = new ArrayList(); + this.authorizingPrescription.add(t); + return this; + } + + /** + * @return {@link #authorizingPrescription} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the medication order that is being dispensed against.) + */ + public List getAuthorizingPrescriptionTarget() { + if (this.authorizingPrescriptionTarget == null) + this.authorizingPrescriptionTarget = new ArrayList(); + return this.authorizingPrescriptionTarget; + } + + // syntactic sugar + /** + * @return {@link #authorizingPrescription} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Indicates the medication order that is being dispensed against.) + */ + public MedicationOrder addAuthorizingPrescriptionTarget() { + MedicationOrder r = new MedicationOrder(); + if (this.authorizingPrescriptionTarget == null) + this.authorizingPrescriptionTarget = new ArrayList(); + this.authorizingPrescriptionTarget.add(r); + return r; + } + + /** + * @return {@link #type} (Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) + */ + public MedicationDispense setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #quantity} (The amount of medication that has been dispensed. Includes unit of measure.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of medication that has been dispensed. Includes unit of measure.) + */ + public MedicationDispense setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #daysSupply} (The amount of medication expressed as a timing amount.) + */ + public SimpleQuantity getDaysSupply() { + if (this.daysSupply == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.daysSupply"); + else if (Configuration.doAutoCreate()) + this.daysSupply = new SimpleQuantity(); // cc + return this.daysSupply; + } + + public boolean hasDaysSupply() { + return this.daysSupply != null && !this.daysSupply.isEmpty(); + } + + /** + * @param value {@link #daysSupply} (The amount of medication expressed as a timing amount.) + */ + public MedicationDispense setDaysSupply(SimpleQuantity value) { + this.daysSupply = value; + return this; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Type getMedication() { + return this.medication; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public CodeableConcept getMedicationCodeableConcept() throws FHIRException { + if (!(this.medication instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (CodeableConcept) this.medication; + } + + public boolean hasMedicationCodeableConcept() { + return this.medication instanceof CodeableConcept; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Reference getMedicationReference() throws FHIRException { + if (!(this.medication instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (Reference) this.medication; + } + + public boolean hasMedicationReference() { + return this.medication instanceof Reference; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public MedicationDispense setMedication(Type value) { + this.medication = value; + return this; + } + + /** + * @return {@link #whenPrepared} (The time when the dispensed product was packaged and reviewed.). This is the underlying object with id, value and extensions. The accessor "getWhenPrepared" gives direct access to the value + */ + public DateTimeType getWhenPreparedElement() { + if (this.whenPrepared == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.whenPrepared"); + else if (Configuration.doAutoCreate()) + this.whenPrepared = new DateTimeType(); // bb + return this.whenPrepared; + } + + public boolean hasWhenPreparedElement() { + return this.whenPrepared != null && !this.whenPrepared.isEmpty(); + } + + public boolean hasWhenPrepared() { + return this.whenPrepared != null && !this.whenPrepared.isEmpty(); + } + + /** + * @param value {@link #whenPrepared} (The time when the dispensed product was packaged and reviewed.). This is the underlying object with id, value and extensions. The accessor "getWhenPrepared" gives direct access to the value + */ + public MedicationDispense setWhenPreparedElement(DateTimeType value) { + this.whenPrepared = value; + return this; + } + + /** + * @return The time when the dispensed product was packaged and reviewed. + */ + public Date getWhenPrepared() { + return this.whenPrepared == null ? null : this.whenPrepared.getValue(); + } + + /** + * @param value The time when the dispensed product was packaged and reviewed. + */ + public MedicationDispense setWhenPrepared(Date value) { + if (value == null) + this.whenPrepared = null; + else { + if (this.whenPrepared == null) + this.whenPrepared = new DateTimeType(); + this.whenPrepared.setValue(value); + } + return this; + } + + /** + * @return {@link #whenHandedOver} (The time the dispensed product was provided to the patient or their representative.). This is the underlying object with id, value and extensions. The accessor "getWhenHandedOver" gives direct access to the value + */ + public DateTimeType getWhenHandedOverElement() { + if (this.whenHandedOver == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.whenHandedOver"); + else if (Configuration.doAutoCreate()) + this.whenHandedOver = new DateTimeType(); // bb + return this.whenHandedOver; + } + + public boolean hasWhenHandedOverElement() { + return this.whenHandedOver != null && !this.whenHandedOver.isEmpty(); + } + + public boolean hasWhenHandedOver() { + return this.whenHandedOver != null && !this.whenHandedOver.isEmpty(); + } + + /** + * @param value {@link #whenHandedOver} (The time the dispensed product was provided to the patient or their representative.). This is the underlying object with id, value and extensions. The accessor "getWhenHandedOver" gives direct access to the value + */ + public MedicationDispense setWhenHandedOverElement(DateTimeType value) { + this.whenHandedOver = value; + return this; + } + + /** + * @return The time the dispensed product was provided to the patient or their representative. + */ + public Date getWhenHandedOver() { + return this.whenHandedOver == null ? null : this.whenHandedOver.getValue(); + } + + /** + * @param value The time the dispensed product was provided to the patient or their representative. + */ + public MedicationDispense setWhenHandedOver(Date value) { + if (value == null) + this.whenHandedOver = null; + else { + if (this.whenHandedOver == null) + this.whenHandedOver = new DateTimeType(); + this.whenHandedOver.setValue(value); + } + return this; + } + + /** + * @return {@link #destination} (Identification of the facility/location where the medication was shipped to, as part of the dispense event.) + */ + public Reference getDestination() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new Reference(); // cc + return this.destination; + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (Identification of the facility/location where the medication was shipped to, as part of the dispense event.) + */ + public MedicationDispense setDestination(Reference value) { + this.destination = value; + return this; + } + + /** + * @return {@link #destination} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identification of the facility/location where the medication was shipped to, as part of the dispense event.) + */ + public Location getDestinationTarget() { + if (this.destinationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.destination"); + else if (Configuration.doAutoCreate()) + this.destinationTarget = new Location(); // aa + return this.destinationTarget; + } + + /** + * @param value {@link #destination} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identification of the facility/location where the medication was shipped to, as part of the dispense event.) + */ + public MedicationDispense setDestinationTarget(Location value) { + this.destinationTarget = value; + return this; + } + + /** + * @return {@link #receiver} (Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.) + */ + public List getReceiver() { + if (this.receiver == null) + this.receiver = new ArrayList(); + return this.receiver; + } + + public boolean hasReceiver() { + if (this.receiver == null) + return false; + for (Reference item : this.receiver) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #receiver} (Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.) + */ + // syntactic sugar + public Reference addReceiver() { //3 + Reference t = new Reference(); + if (this.receiver == null) + this.receiver = new ArrayList(); + this.receiver.add(t); + return t; + } + + // syntactic sugar + public MedicationDispense addReceiver(Reference t) { //3 + if (t == null) + return this; + if (this.receiver == null) + this.receiver = new ArrayList(); + this.receiver.add(t); + return this; + } + + /** + * @return {@link #receiver} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.) + */ + public List getReceiverTarget() { + if (this.receiverTarget == null) + this.receiverTarget = new ArrayList(); + return this.receiverTarget; + } + + /** + * @return {@link #note} (Extra information about the dispense that could not be conveyed in the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Extra information about the dispense that could not be conveyed in the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public MedicationDispense setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return Extra information about the dispense that could not be conveyed in the other attributes. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value Extra information about the dispense that could not be conveyed in the other attributes. + */ + public MedicationDispense setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + */ + public List getDosageInstruction() { + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + return this.dosageInstruction; + } + + public boolean hasDosageInstruction() { + if (this.dosageInstruction == null) + return false; + for (MedicationDispenseDosageInstructionComponent item : this.dosageInstruction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + */ + // syntactic sugar + public MedicationDispenseDosageInstructionComponent addDosageInstruction() { //3 + MedicationDispenseDosageInstructionComponent t = new MedicationDispenseDosageInstructionComponent(); + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + this.dosageInstruction.add(t); + return t; + } + + // syntactic sugar + public MedicationDispense addDosageInstruction(MedicationDispenseDosageInstructionComponent t) { //3 + if (t == null) + return this; + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + this.dosageInstruction.add(t); + return this; + } + + /** + * @return {@link #substitution} (Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.) + */ + public MedicationDispenseSubstitutionComponent getSubstitution() { + if (this.substitution == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationDispense.substitution"); + else if (Configuration.doAutoCreate()) + this.substitution = new MedicationDispenseSubstitutionComponent(); // cc + return this.substitution; + } + + public boolean hasSubstitution() { + return this.substitution != null && !this.substitution.isEmpty(); + } + + /** + * @param value {@link #substitution} (Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.) + */ + public MedicationDispense setSubstitution(MedicationDispenseSubstitutionComponent value) { + this.substitution = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "A code specifying the state of the set of dispense events.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person to whom the medication will be given.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("dispenser", "Reference(Practitioner)", "The individual responsible for dispensing the medication.", 0, java.lang.Integer.MAX_VALUE, dispenser)); + childrenList.add(new Property("authorizingPrescription", "Reference(MedicationOrder)", "Indicates the medication order that is being dispensed against.", 0, java.lang.Integer.MAX_VALUE, authorizingPrescription)); + childrenList.add(new Property("type", "CodeableConcept", "Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount of medication that has been dispensed. Includes unit of measure.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("daysSupply", "SimpleQuantity", "The amount of medication expressed as a timing amount.", 0, java.lang.Integer.MAX_VALUE, daysSupply)); + childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); + childrenList.add(new Property("whenPrepared", "dateTime", "The time when the dispensed product was packaged and reviewed.", 0, java.lang.Integer.MAX_VALUE, whenPrepared)); + childrenList.add(new Property("whenHandedOver", "dateTime", "The time the dispensed product was provided to the patient or their representative.", 0, java.lang.Integer.MAX_VALUE, whenHandedOver)); + childrenList.add(new Property("destination", "Reference(Location)", "Identification of the facility/location where the medication was shipped to, as part of the dispense event.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("receiver", "Reference(Patient|Practitioner)", "Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.", 0, java.lang.Integer.MAX_VALUE, receiver)); + childrenList.add(new Property("note", "string", "Extra information about the dispense that could not be conveyed in the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("dosageInstruction", "", "Indicates how the medication is to be used by the patient.", 0, java.lang.Integer.MAX_VALUE, dosageInstruction)); + childrenList.add(new Property("substitution", "", "Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.", 0, java.lang.Integer.MAX_VALUE, substitution)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("status")) + this.status = new MedicationDispenseStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("dispenser")) + this.dispenser = castToReference(value); // Reference + else if (name.equals("authorizingPrescription")) + this.getAuthorizingPrescription().add(castToReference(value)); + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("daysSupply")) + this.daysSupply = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("medication[x]")) + this.medication = (Type) value; // Type + else if (name.equals("whenPrepared")) + this.whenPrepared = castToDateTime(value); // DateTimeType + else if (name.equals("whenHandedOver")) + this.whenHandedOver = castToDateTime(value); // DateTimeType + else if (name.equals("destination")) + this.destination = castToReference(value); // Reference + else if (name.equals("receiver")) + this.getReceiver().add(castToReference(value)); + else if (name.equals("note")) + this.note = castToString(value); // StringType + else if (name.equals("dosageInstruction")) + this.getDosageInstruction().add((MedicationDispenseDosageInstructionComponent) value); + else if (name.equals("substitution")) + this.substitution = (MedicationDispenseSubstitutionComponent) value; // MedicationDispenseSubstitutionComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.status"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("dispenser")) { + this.dispenser = new Reference(); + return this.dispenser; + } + else if (name.equals("authorizingPrescription")) { + return addAuthorizingPrescription(); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("daysSupply")) { + this.daysSupply = new SimpleQuantity(); + return this.daysSupply; + } + else if (name.equals("medicationCodeableConcept")) { + this.medication = new CodeableConcept(); + return this.medication; + } + else if (name.equals("medicationReference")) { + this.medication = new Reference(); + return this.medication; + } + else if (name.equals("whenPrepared")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.whenPrepared"); + } + else if (name.equals("whenHandedOver")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.whenHandedOver"); + } + else if (name.equals("destination")) { + this.destination = new Reference(); + return this.destination; + } + else if (name.equals("receiver")) { + return addReceiver(); + } + else if (name.equals("note")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.note"); + } + else if (name.equals("dosageInstruction")) { + return addDosageInstruction(); + } + else if (name.equals("substitution")) { + this.substitution = new MedicationDispenseSubstitutionComponent(); + return this.substitution; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MedicationDispense"; + + } + + public MedicationDispense copy() { + MedicationDispense dst = new MedicationDispense(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.status = status == null ? null : status.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.dispenser = dispenser == null ? null : dispenser.copy(); + if (authorizingPrescription != null) { + dst.authorizingPrescription = new ArrayList(); + for (Reference i : authorizingPrescription) + dst.authorizingPrescription.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.daysSupply = daysSupply == null ? null : daysSupply.copy(); + dst.medication = medication == null ? null : medication.copy(); + dst.whenPrepared = whenPrepared == null ? null : whenPrepared.copy(); + dst.whenHandedOver = whenHandedOver == null ? null : whenHandedOver.copy(); + dst.destination = destination == null ? null : destination.copy(); + if (receiver != null) { + dst.receiver = new ArrayList(); + for (Reference i : receiver) + dst.receiver.add(i.copy()); + }; + dst.note = note == null ? null : note.copy(); + if (dosageInstruction != null) { + dst.dosageInstruction = new ArrayList(); + for (MedicationDispenseDosageInstructionComponent i : dosageInstruction) + dst.dosageInstruction.add(i.copy()); + }; + dst.substitution = substitution == null ? null : substitution.copy(); + return dst; + } + + protected MedicationDispense typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationDispense)) + return false; + MedicationDispense o = (MedicationDispense) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) + && compareDeep(dispenser, o.dispenser, true) && compareDeep(authorizingPrescription, o.authorizingPrescription, true) + && compareDeep(type, o.type, true) && compareDeep(quantity, o.quantity, true) && compareDeep(daysSupply, o.daysSupply, true) + && compareDeep(medication, o.medication, true) && compareDeep(whenPrepared, o.whenPrepared, true) + && compareDeep(whenHandedOver, o.whenHandedOver, true) && compareDeep(destination, o.destination, true) + && compareDeep(receiver, o.receiver, true) && compareDeep(note, o.note, true) && compareDeep(dosageInstruction, o.dosageInstruction, true) + && compareDeep(substitution, o.substitution, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationDispense)) + return false; + MedicationDispense o = (MedicationDispense) other; + return compareValues(status, o.status, true) && compareValues(whenPrepared, o.whenPrepared, true) && compareValues(whenHandedOver, o.whenHandedOver, true) + && compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (patient == null || patient.isEmpty()) && (dispenser == null || dispenser.isEmpty()) && (authorizingPrescription == null || authorizingPrescription.isEmpty()) + && (type == null || type.isEmpty()) && (quantity == null || quantity.isEmpty()) && (daysSupply == null || daysSupply.isEmpty()) + && (medication == null || medication.isEmpty()) && (whenPrepared == null || whenPrepared.isEmpty()) + && (whenHandedOver == null || whenHandedOver.isEmpty()) && (destination == null || destination.isEmpty()) + && (receiver == null || receiver.isEmpty()) && (note == null || note.isEmpty()) && (dosageInstruction == null || dosageInstruction.isEmpty()) + && (substitution == null || substitution.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MedicationDispense; + } + + @SearchParamDefinition(name="identifier", path="MedicationDispense.identifier", description="Return dispenses with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="MedicationDispense.medicationCodeableConcept", description="Return dispenses of this medicine code", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="receiver", path="MedicationDispense.receiver", description="Who collected the medication", type="reference" ) + public static final String SP_RECEIVER = "receiver"; + @SearchParamDefinition(name="destination", path="MedicationDispense.destination", description="Return dispenses that should be sent to a specific destination", type="reference" ) + public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name="medication", path="MedicationDispense.medicationReference", description="Return dispenses of this medicine resource", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference" ) + public static final String SP_RESPONSIBLEPARTY = "responsibleparty"; + @SearchParamDefinition(name="type", path="MedicationDispense.type", description="Return all dispenses of a specific type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="whenhandedover", path="MedicationDispense.whenHandedOver", description="Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)", type="date" ) + public static final String SP_WHENHANDEDOVER = "whenhandedover"; + @SearchParamDefinition(name="whenprepared", path="MedicationDispense.whenPrepared", description="Date when medication prepared", type="date" ) + public static final String SP_WHENPREPARED = "whenprepared"; + @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific individual", type="reference" ) + public static final String SP_DISPENSER = "dispenser"; + @SearchParamDefinition(name="prescription", path="MedicationDispense.authorizingPrescription", description="The identity of a prescription to list dispenses from", type="reference" ) + public static final String SP_PRESCRIPTION = "prescription"; + @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="status", path="MedicationDispense.status", description="Status of the dispense", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationOrder.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationOrder.java new file mode 100644 index 00000000000..6a790cb7682 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationOrder.java @@ -0,0 +1,2219 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc. + */ +@ResourceDef(name="MedicationOrder", profile="http://hl7.org/fhir/Profile/MedicationOrder") +public class MedicationOrder extends DomainResource { + + public enum MedicationOrderStatus { + /** + * The prescription is 'actionable', but not all actions that are implied by it have occurred yet. + */ + ACTIVE, + /** + * Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * All actions that are implied by the prescription have occurred. + */ + COMPLETED, + /** + * The prescription was entered in error. + */ + ENTEREDINERROR, + /** + * Actions implied by the prescription are to be permanently halted, before all of them occurred. + */ + STOPPED, + /** + * The prescription is not yet 'actionable', i.e. it is a work in progress, requires sign-off or verification, and needs to be run through decision support process. + */ + DRAFT, + /** + * added to help the parsers + */ + NULL; + public static MedicationOrderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + if ("draft".equals(codeString)) + return DRAFT; + throw new FHIRException("Unknown MedicationOrderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + case DRAFT: return "draft"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/medication-order-status"; + case ONHOLD: return "http://hl7.org/fhir/medication-order-status"; + case COMPLETED: return "http://hl7.org/fhir/medication-order-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/medication-order-status"; + case STOPPED: return "http://hl7.org/fhir/medication-order-status"; + case DRAFT: return "http://hl7.org/fhir/medication-order-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The prescription is 'actionable', but not all actions that are implied by it have occurred yet."; + case ONHOLD: return "Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case COMPLETED: return "All actions that are implied by the prescription have occurred."; + case ENTEREDINERROR: return "The prescription was entered in error."; + case STOPPED: return "Actions implied by the prescription are to be permanently halted, before all of them occurred."; + case DRAFT: return "The prescription is not yet 'actionable', i.e. it is a work in progress, requires sign-off or verification, and needs to be run through decision support process."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered In Error"; + case STOPPED: return "Stopped"; + case DRAFT: return "Draft"; + default: return "?"; + } + } + } + + public static class MedicationOrderStatusEnumFactory implements EnumFactory { + public MedicationOrderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return MedicationOrderStatus.ACTIVE; + if ("on-hold".equals(codeString)) + return MedicationOrderStatus.ONHOLD; + if ("completed".equals(codeString)) + return MedicationOrderStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationOrderStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationOrderStatus.STOPPED; + if ("draft".equals(codeString)) + return MedicationOrderStatus.DRAFT; + throw new IllegalArgumentException("Unknown MedicationOrderStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.ACTIVE); + if ("on-hold".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.ONHOLD); + if ("completed".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.ENTEREDINERROR); + if ("stopped".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.STOPPED); + if ("draft".equals(codeString)) + return new Enumeration(this, MedicationOrderStatus.DRAFT); + throw new FHIRException("Unknown MedicationOrderStatus code '"+codeString+"'"); + } + public String toCode(MedicationOrderStatus code) { + if (code == MedicationOrderStatus.ACTIVE) + return "active"; + if (code == MedicationOrderStatus.ONHOLD) + return "on-hold"; + if (code == MedicationOrderStatus.COMPLETED) + return "completed"; + if (code == MedicationOrderStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationOrderStatus.STOPPED) + return "stopped"; + if (code == MedicationOrderStatus.DRAFT) + return "draft"; + return "?"; + } + } + + @Block() + public static class MedicationOrderDosageInstructionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dosage instructions expressed as text", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing." ) + protected StringType text; + + /** + * Additional instructions such as "Swallow with plenty of water" which may or may not be coded. + */ + @Child(name = "additionalInstructions", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Supplemental instructions - e.g. \"with meals\"", formalDefinition="Additional instructions such as \"Swallow with plenty of water\" which may or may not be coded." ) + protected CodeableConcept additionalInstructions; + + /** + * The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". + */ + @Child(name = "timing", type = {Timing.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When medication should be administered", formalDefinition="The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"." ) + protected Timing timing; + + /** + * Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + */ + @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Take \"as needed\" (for x)", formalDefinition="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept)." ) + protected Type asNeeded; + + /** + * A coded specification of the anatomic site where the medication first enters the body. + */ + @Child(name = "site", type = {CodeableConcept.class, BodySite.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Body site to administer to", formalDefinition="A coded specification of the anatomic site where the medication first enters the body." ) + protected Type site; + + /** + * A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How drug should enter body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body." ) + protected CodeableConcept route; + + /** + * A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Technique for administering medication", formalDefinition="A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV." ) + protected CodeableConcept method; + + /** + * The amount of therapeutic or other substance given at one administration event. + */ + @Child(name = "dose", type = {Range.class, SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of medication per dose", formalDefinition="The amount of therapeutic or other substance given at one administration event." ) + protected Type dose; + + /** + * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + */ + @Child(name = "rate", type = {Ratio.class, Range.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of medication per unit of time", formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) + protected Type rate; + + /** + * The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours. + */ + @Child(name = "maxDosePerPeriod", type = {Ratio.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Upper limit on medication per unit of time", formalDefinition="The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours." ) + protected Ratio maxDosePerPeriod; + + private static final long serialVersionUID = -1470136646L; + + /* + * Constructor + */ + public MedicationOrderDosageInstructionComponent() { + super(); + } + + /** + * @return {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public MedicationOrderDosageInstructionComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing. + */ + public MedicationOrderDosageInstructionComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #additionalInstructions} (Additional instructions such as "Swallow with plenty of water" which may or may not be coded.) + */ + public CodeableConcept getAdditionalInstructions() { + if (this.additionalInstructions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.additionalInstructions"); + else if (Configuration.doAutoCreate()) + this.additionalInstructions = new CodeableConcept(); // cc + return this.additionalInstructions; + } + + public boolean hasAdditionalInstructions() { + return this.additionalInstructions != null && !this.additionalInstructions.isEmpty(); + } + + /** + * @param value {@link #additionalInstructions} (Additional instructions such as "Swallow with plenty of water" which may or may not be coded.) + */ + public MedicationOrderDosageInstructionComponent setAdditionalInstructions(CodeableConcept value) { + this.additionalInstructions = value; + return this; + } + + /** + * @return {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Timing getTiming() { + if (this.timing == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.timing"); + else if (Configuration.doAutoCreate()) + this.timing = new Timing(); // cc + return this.timing; + } + + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); + } + + /** + * @param value {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public MedicationOrderDosageInstructionComponent setTiming(Timing value) { + this.timing = value; + return this; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).) + */ + public Type getAsNeeded() { + return this.asNeeded; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).) + */ + public BooleanType getAsNeededBooleanType() throws FHIRException { + if (!(this.asNeeded instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (BooleanType) this.asNeeded; + } + + public boolean hasAsNeededBooleanType() { + return this.asNeeded instanceof BooleanType; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).) + */ + public CodeableConcept getAsNeededCodeableConcept() throws FHIRException { + if (!(this.asNeeded instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (CodeableConcept) this.asNeeded; + } + + public boolean hasAsNeededCodeableConcept() { + return this.asNeeded instanceof CodeableConcept; + } + + public boolean hasAsNeeded() { + return this.asNeeded != null && !this.asNeeded.isEmpty(); + } + + /** + * @param value {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).) + */ + public MedicationOrderDosageInstructionComponent setAsNeeded(Type value) { + this.asNeeded = value; + return this; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public Type getSite() { + return this.site; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public CodeableConcept getSiteCodeableConcept() throws FHIRException { + if (!(this.site instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.site.getClass().getName()+" was encountered"); + return (CodeableConcept) this.site; + } + + public boolean hasSiteCodeableConcept() { + return this.site instanceof CodeableConcept; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public Reference getSiteReference() throws FHIRException { + if (!(this.site instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.site.getClass().getName()+" was encountered"); + return (Reference) this.site; + } + + public boolean hasSiteReference() { + return this.site instanceof Reference; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (A coded specification of the anatomic site where the medication first enters the body.) + */ + public MedicationOrderDosageInstructionComponent setSite(Type value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.) + */ + public MedicationOrderDosageInstructionComponent setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.) + */ + public MedicationOrderDosageInstructionComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public Type getDose() { + return this.dose; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public Range getDoseRange() throws FHIRException { + if (!(this.dose instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.dose.getClass().getName()+" was encountered"); + return (Range) this.dose; + } + + public boolean hasDoseRange() { + return this.dose instanceof Range; + } + + /** + * @return {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public SimpleQuantity getDoseSimpleQuantity() throws FHIRException { + if (!(this.dose instanceof SimpleQuantity)) + throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.dose.getClass().getName()+" was encountered"); + return (SimpleQuantity) this.dose; + } + + public boolean hasDoseSimpleQuantity() { + return this.dose instanceof SimpleQuantity; + } + + public boolean hasDose() { + return this.dose != null && !this.dose.isEmpty(); + } + + /** + * @param value {@link #dose} (The amount of therapeutic or other substance given at one administration event.) + */ + public MedicationOrderDosageInstructionComponent setDose(Type value) { + this.dose = value; + return this; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Type getRate() { + return this.rate; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Ratio getRateRatio() throws FHIRException { + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this.rate instanceof Ratio; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Range getRateRange() throws FHIRException { + if (!(this.rate instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Range) this.rate; + } + + public boolean hasRateRange() { + return this.rate instanceof Range; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public MedicationOrderDosageInstructionComponent setRate(Type value) { + this.rate = value; + return this; + } + + /** + * @return {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.) + */ + public Ratio getMaxDosePerPeriod() { + if (this.maxDosePerPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDosageInstructionComponent.maxDosePerPeriod"); + else if (Configuration.doAutoCreate()) + this.maxDosePerPeriod = new Ratio(); // cc + return this.maxDosePerPeriod; + } + + public boolean hasMaxDosePerPeriod() { + return this.maxDosePerPeriod != null && !this.maxDosePerPeriod.isEmpty(); + } + + /** + * @param value {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.) + */ + public MedicationOrderDosageInstructionComponent setMaxDosePerPeriod(Ratio value) { + this.maxDosePerPeriod = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("text", "string", "Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("additionalInstructions", "CodeableConcept", "Additional instructions such as \"Swallow with plenty of water\" which may or may not be coded.", 0, java.lang.Integer.MAX_VALUE, additionalInstructions)); + childrenList.add(new Property("timing", "Timing", "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".", 0, java.lang.Integer.MAX_VALUE, timing)); + childrenList.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).", 0, java.lang.Integer.MAX_VALUE, asNeeded)); + childrenList.add(new Property("site[x]", "CodeableConcept|Reference(BodySite)", "A coded specification of the anatomic site where the medication first enters the body.", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", 0, java.lang.Integer.MAX_VALUE, route)); + childrenList.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("dose[x]", "Range|SimpleQuantity", "The amount of therapeutic or other substance given at one administration event.", 0, java.lang.Integer.MAX_VALUE, dose)); + childrenList.add(new Property("rate[x]", "Ratio|Range", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); + childrenList.add(new Property("maxDosePerPeriod", "Ratio", "The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.", 0, java.lang.Integer.MAX_VALUE, maxDosePerPeriod)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("additionalInstructions")) + this.additionalInstructions = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("timing")) + this.timing = castToTiming(value); // Timing + else if (name.equals("asNeeded[x]")) + this.asNeeded = (Type) value; // Type + else if (name.equals("site[x]")) + this.site = (Type) value; // Type + else if (name.equals("route")) + this.route = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("dose[x]")) + this.dose = (Type) value; // Type + else if (name.equals("rate[x]")) + this.rate = (Type) value; // Type + else if (name.equals("maxDosePerPeriod")) + this.maxDosePerPeriod = castToRatio(value); // Ratio + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.text"); + } + else if (name.equals("additionalInstructions")) { + this.additionalInstructions = new CodeableConcept(); + return this.additionalInstructions; + } + else if (name.equals("timing")) { + this.timing = new Timing(); + return this.timing; + } + else if (name.equals("asNeededBoolean")) { + this.asNeeded = new BooleanType(); + return this.asNeeded; + } + else if (name.equals("asNeededCodeableConcept")) { + this.asNeeded = new CodeableConcept(); + return this.asNeeded; + } + else if (name.equals("siteCodeableConcept")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("siteReference")) { + this.site = new Reference(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("doseRange")) { + this.dose = new Range(); + return this.dose; + } + else if (name.equals("doseSimpleQuantity")) { + this.dose = new SimpleQuantity(); + return this.dose; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else if (name.equals("rateRange")) { + this.rate = new Range(); + return this.rate; + } + else if (name.equals("maxDosePerPeriod")) { + this.maxDosePerPeriod = new Ratio(); + return this.maxDosePerPeriod; + } + else + return super.addChild(name); + } + + public MedicationOrderDosageInstructionComponent copy() { + MedicationOrderDosageInstructionComponent dst = new MedicationOrderDosageInstructionComponent(); + copyValues(dst); + dst.text = text == null ? null : text.copy(); + dst.additionalInstructions = additionalInstructions == null ? null : additionalInstructions.copy(); + dst.timing = timing == null ? null : timing.copy(); + dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.method = method == null ? null : method.copy(); + dst.dose = dose == null ? null : dose.copy(); + dst.rate = rate == null ? null : rate.copy(); + dst.maxDosePerPeriod = maxDosePerPeriod == null ? null : maxDosePerPeriod.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationOrderDosageInstructionComponent)) + return false; + MedicationOrderDosageInstructionComponent o = (MedicationOrderDosageInstructionComponent) other; + return compareDeep(text, o.text, true) && compareDeep(additionalInstructions, o.additionalInstructions, true) + && compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(site, o.site, true) + && compareDeep(route, o.route, true) && compareDeep(method, o.method, true) && compareDeep(dose, o.dose, true) + && compareDeep(rate, o.rate, true) && compareDeep(maxDosePerPeriod, o.maxDosePerPeriod, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationOrderDosageInstructionComponent)) + return false; + MedicationOrderDosageInstructionComponent o = (MedicationOrderDosageInstructionComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (text == null || text.isEmpty()) && (additionalInstructions == null || additionalInstructions.isEmpty()) + && (timing == null || timing.isEmpty()) && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) + && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (dose == null || dose.isEmpty()) + && (rate == null || rate.isEmpty()) && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()) + ; + } + + public String fhirType() { + return "MedicationOrder.dosageInstruction"; + + } + + } + + @Block() + public static class MedicationOrderDispenseRequestComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications. + */ + @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Product to be supplied", formalDefinition="Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." ) + protected Type medication; + + /** + * This indicates the validity period of a prescription (stale dating the Prescription). + */ + @Child(name = "validityPeriod", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period supply is authorized for", formalDefinition="This indicates the validity period of a prescription (stale dating the Prescription)." ) + protected Period validityPeriod; + + /** + * An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. + */ + @Child(name = "numberOfRepeatsAllowed", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of refills authorized", formalDefinition="An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets." ) + protected PositiveIntType numberOfRepeatsAllowed; + + /** + * The amount that is to be dispensed for one fill. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of medication to supply per dispense", formalDefinition="The amount that is to be dispensed for one fill." ) + protected SimpleQuantity quantity; + + /** + * Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last. + */ + @Child(name = "expectedSupplyDuration", type = {Duration.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of days supply per dispense", formalDefinition="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last." ) + protected Duration expectedSupplyDuration; + + private static final long serialVersionUID = -1690502728L; + + /* + * Constructor + */ + public MedicationOrderDispenseRequestComponent() { + super(); + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Type getMedication() { + return this.medication; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public CodeableConcept getMedicationCodeableConcept() throws FHIRException { + if (!(this.medication instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (CodeableConcept) this.medication; + } + + public boolean hasMedicationCodeableConcept() { + return this.medication instanceof CodeableConcept; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Reference getMedicationReference() throws FHIRException { + if (!(this.medication instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (Reference) this.medication; + } + + public boolean hasMedicationReference() { + return this.medication instanceof Reference; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public MedicationOrderDispenseRequestComponent setMedication(Type value) { + this.medication = value; + return this; + } + + /** + * @return {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).) + */ + public Period getValidityPeriod() { + if (this.validityPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDispenseRequestComponent.validityPeriod"); + else if (Configuration.doAutoCreate()) + this.validityPeriod = new Period(); // cc + return this.validityPeriod; + } + + public boolean hasValidityPeriod() { + return this.validityPeriod != null && !this.validityPeriod.isEmpty(); + } + + /** + * @param value {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).) + */ + public MedicationOrderDispenseRequestComponent setValidityPeriod(Period value) { + this.validityPeriod = value; + return this; + } + + /** + * @return {@link #numberOfRepeatsAllowed} (An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value + */ + public PositiveIntType getNumberOfRepeatsAllowedElement() { + if (this.numberOfRepeatsAllowed == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDispenseRequestComponent.numberOfRepeatsAllowed"); + else if (Configuration.doAutoCreate()) + this.numberOfRepeatsAllowed = new PositiveIntType(); // bb + return this.numberOfRepeatsAllowed; + } + + public boolean hasNumberOfRepeatsAllowedElement() { + return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty(); + } + + public boolean hasNumberOfRepeatsAllowed() { + return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty(); + } + + /** + * @param value {@link #numberOfRepeatsAllowed} (An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value + */ + public MedicationOrderDispenseRequestComponent setNumberOfRepeatsAllowedElement(PositiveIntType value) { + this.numberOfRepeatsAllowed = value; + return this; + } + + /** + * @return An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. + */ + public int getNumberOfRepeatsAllowed() { + return this.numberOfRepeatsAllowed == null || this.numberOfRepeatsAllowed.isEmpty() ? 0 : this.numberOfRepeatsAllowed.getValue(); + } + + /** + * @param value An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. + */ + public MedicationOrderDispenseRequestComponent setNumberOfRepeatsAllowed(int value) { + if (this.numberOfRepeatsAllowed == null) + this.numberOfRepeatsAllowed = new PositiveIntType(); + this.numberOfRepeatsAllowed.setValue(value); + return this; + } + + /** + * @return {@link #quantity} (The amount that is to be dispensed for one fill.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDispenseRequestComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount that is to be dispensed for one fill.) + */ + public MedicationOrderDispenseRequestComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.) + */ + public Duration getExpectedSupplyDuration() { + if (this.expectedSupplyDuration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderDispenseRequestComponent.expectedSupplyDuration"); + else if (Configuration.doAutoCreate()) + this.expectedSupplyDuration = new Duration(); // cc + return this.expectedSupplyDuration; + } + + public boolean hasExpectedSupplyDuration() { + return this.expectedSupplyDuration != null && !this.expectedSupplyDuration.isEmpty(); + } + + /** + * @param value {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.) + */ + public MedicationOrderDispenseRequestComponent setExpectedSupplyDuration(Duration value) { + this.expectedSupplyDuration = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); + childrenList.add(new Property("validityPeriod", "Period", "This indicates the validity period of a prescription (stale dating the Prescription).", 0, java.lang.Integer.MAX_VALUE, validityPeriod)); + childrenList.add(new Property("numberOfRepeatsAllowed", "positiveInt", "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", 0, java.lang.Integer.MAX_VALUE, numberOfRepeatsAllowed)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount that is to be dispensed for one fill.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("expectedSupplyDuration", "Duration", "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", 0, java.lang.Integer.MAX_VALUE, expectedSupplyDuration)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("medication[x]")) + this.medication = (Type) value; // Type + else if (name.equals("validityPeriod")) + this.validityPeriod = castToPeriod(value); // Period + else if (name.equals("numberOfRepeatsAllowed")) + this.numberOfRepeatsAllowed = castToPositiveInt(value); // PositiveIntType + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("expectedSupplyDuration")) + this.expectedSupplyDuration = castToDuration(value); // Duration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("medicationCodeableConcept")) { + this.medication = new CodeableConcept(); + return this.medication; + } + else if (name.equals("medicationReference")) { + this.medication = new Reference(); + return this.medication; + } + else if (name.equals("validityPeriod")) { + this.validityPeriod = new Period(); + return this.validityPeriod; + } + else if (name.equals("numberOfRepeatsAllowed")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.numberOfRepeatsAllowed"); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("expectedSupplyDuration")) { + this.expectedSupplyDuration = new Duration(); + return this.expectedSupplyDuration; + } + else + return super.addChild(name); + } + + public MedicationOrderDispenseRequestComponent copy() { + MedicationOrderDispenseRequestComponent dst = new MedicationOrderDispenseRequestComponent(); + copyValues(dst); + dst.medication = medication == null ? null : medication.copy(); + dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy(); + dst.numberOfRepeatsAllowed = numberOfRepeatsAllowed == null ? null : numberOfRepeatsAllowed.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.expectedSupplyDuration = expectedSupplyDuration == null ? null : expectedSupplyDuration.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationOrderDispenseRequestComponent)) + return false; + MedicationOrderDispenseRequestComponent o = (MedicationOrderDispenseRequestComponent) other; + return compareDeep(medication, o.medication, true) && compareDeep(validityPeriod, o.validityPeriod, true) + && compareDeep(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true) && compareDeep(quantity, o.quantity, true) + && compareDeep(expectedSupplyDuration, o.expectedSupplyDuration, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationOrderDispenseRequestComponent)) + return false; + MedicationOrderDispenseRequestComponent o = (MedicationOrderDispenseRequestComponent) other; + return compareValues(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (medication == null || medication.isEmpty()) && (validityPeriod == null || validityPeriod.isEmpty()) + && (numberOfRepeatsAllowed == null || numberOfRepeatsAllowed.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (expectedSupplyDuration == null || expectedSupplyDuration.isEmpty()); + } + + public String fhirType() { + return "MedicationOrder.dispenseRequest"; + + } + + } + + @Block() + public static class MedicationOrderSubstitutionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code signifying whether a different drug should be dispensed from what was prescribed. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="generic | formulary +", formalDefinition="A code signifying whether a different drug should be dispensed from what was prescribed." ) + protected CodeableConcept type; + + /** + * Indicates the reason for the substitution, or why substitution must or must not be performed. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why should (not) substitution be made", formalDefinition="Indicates the reason for the substitution, or why substitution must or must not be performed." ) + protected CodeableConcept reason; + + private static final long serialVersionUID = 1693602518L; + + /* + * Constructor + */ + public MedicationOrderSubstitutionComponent() { + super(); + } + + /* + * Constructor + */ + public MedicationOrderSubstitutionComponent(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (A code signifying whether a different drug should be dispensed from what was prescribed.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderSubstitutionComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A code signifying whether a different drug should be dispensed from what was prescribed.) + */ + public MedicationOrderSubstitutionComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.) + */ + public CodeableConcept getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrderSubstitutionComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new CodeableConcept(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.) + */ + public MedicationOrderSubstitutionComponent setReason(CodeableConcept value) { + this.reason = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "A code signifying whether a different drug should be dispensed from what was prescribed.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("reason", "CodeableConcept", "Indicates the reason for the substitution, or why substitution must or must not be performed.", 0, java.lang.Integer.MAX_VALUE, reason)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("reason")) + this.reason = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("reason")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else + return super.addChild(name); + } + + public MedicationOrderSubstitutionComponent copy() { + MedicationOrderSubstitutionComponent dst = new MedicationOrderSubstitutionComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.reason = reason == null ? null : reason.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationOrderSubstitutionComponent)) + return false; + MedicationOrderSubstitutionComponent o = (MedicationOrderSubstitutionComponent) other; + return compareDeep(type, o.type, true) && compareDeep(reason, o.reason, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationOrderSubstitutionComponent)) + return false; + MedicationOrderSubstitutionComponent o = (MedicationOrderSubstitutionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) + ; + } + + public String fhirType() { + return "MedicationOrder.substitution"; + + } + + } + + /** + * External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system." ) + protected List identifier; + + /** + * The date (and perhaps time) when the prescription was written. + */ + @Child(name = "dateWritten", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) + protected DateTimeType dateWritten; + + /** + * A code specifying the state of the order. Generally this will be active or completed state. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | on-hold | completed | entered-in-error | stopped | draft", formalDefinition="A code specifying the state of the order. Generally this will be active or completed state." ) + protected Enumeration status; + + /** + * The date (and perhaps time) when the prescription was stopped. + */ + @Child(name = "dateEnded", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When prescription was stopped", formalDefinition="The date (and perhaps time) when the prescription was stopped." ) + protected DateTimeType dateEnded; + + /** + * The reason why the prescription was stopped, if it was. + */ + @Child(name = "reasonEnded", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why prescription was stopped", formalDefinition="The reason why the prescription was stopped, if it was." ) + protected CodeableConcept reasonEnded; + + /** + * A link to a resource representing the person to whom the medication will be given. + */ + @Child(name = "patient", type = {Patient.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the medication will be given." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A link to a resource representing the person to whom the medication will be given.) + */ + protected Patient patientTarget; + + /** + * The healthcare professional responsible for authorizing the prescription. + */ + @Child(name = "prescriber", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who ordered the medication(s)", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) + protected Reference prescriber; + + /** + * The actual object that is the target of the reference (The healthcare professional responsible for authorizing the prescription.) + */ + protected Practitioner prescriberTarget; + + /** + * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. + */ + @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Created during encounter/admission/stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + protected Encounter encounterTarget; + + /** + * Can be the reason or the indication for writing the prescription. + */ + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) + protected Type reason; + + /** + * Extra information about the prescription that could not be conveyed by the other attributes. + */ + @Child(name = "note", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Information about the prescription", formalDefinition="Extra information about the prescription that could not be conveyed by the other attributes." ) + protected StringType note; + + /** + * Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications. + */ + @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Medication to be taken", formalDefinition="Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." ) + protected Type medication; + + /** + * Indicates how the medication is to be used by the patient. + */ + @Child(name = "dosageInstruction", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="How medication should be taken", formalDefinition="Indicates how the medication is to be used by the patient." ) + protected List dosageInstruction; + + /** + * Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department. + */ + @Child(name = "dispenseRequest", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Medication supply authorization", formalDefinition="Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department." ) + protected MedicationOrderDispenseRequestComponent dispenseRequest; + + /** + * Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done. + */ + @Child(name = "substitution", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Any restrictions on medication substitution", formalDefinition="Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done." ) + protected MedicationOrderSubstitutionComponent substitution; + + /** + * A link to a resource representing an earlier order or prescription that this order supersedes. + */ + @Child(name = "priorPrescription", type = {MedicationOrder.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An order/prescription that this supersedes", formalDefinition="A link to a resource representing an earlier order or prescription that this order supersedes." ) + protected Reference priorPrescription; + + /** + * The actual object that is the target of the reference (A link to a resource representing an earlier order or prescription that this order supersedes.) + */ + protected MedicationOrder priorPrescriptionTarget; + + private static final long serialVersionUID = 619326051L; + + /* + * Constructor + */ + public MedicationOrder() { + super(); + } + + /* + * Constructor + */ + public MedicationOrder(Type medication) { + super(); + this.medication = medication; + } + + /** + * @return {@link #identifier} (External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public MedicationOrder addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value + */ + public DateTimeType getDateWrittenElement() { + if (this.dateWritten == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.dateWritten"); + else if (Configuration.doAutoCreate()) + this.dateWritten = new DateTimeType(); // bb + return this.dateWritten; + } + + public boolean hasDateWrittenElement() { + return this.dateWritten != null && !this.dateWritten.isEmpty(); + } + + public boolean hasDateWritten() { + return this.dateWritten != null && !this.dateWritten.isEmpty(); + } + + /** + * @param value {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value + */ + public MedicationOrder setDateWrittenElement(DateTimeType value) { + this.dateWritten = value; + return this; + } + + /** + * @return The date (and perhaps time) when the prescription was written. + */ + public Date getDateWritten() { + return this.dateWritten == null ? null : this.dateWritten.getValue(); + } + + /** + * @param value The date (and perhaps time) when the prescription was written. + */ + public MedicationOrder setDateWritten(Date value) { + if (value == null) + this.dateWritten = null; + else { + if (this.dateWritten == null) + this.dateWritten = new DateTimeType(); + this.dateWritten.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (A code specifying the state of the order. Generally this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MedicationOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code specifying the state of the order. Generally this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MedicationOrder setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying the state of the order. Generally this will be active or completed state. + */ + public MedicationOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying the state of the order. Generally this will be active or completed state. + */ + public MedicationOrder setStatus(MedicationOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new MedicationOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #dateEnded} (The date (and perhaps time) when the prescription was stopped.). This is the underlying object with id, value and extensions. The accessor "getDateEnded" gives direct access to the value + */ + public DateTimeType getDateEndedElement() { + if (this.dateEnded == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.dateEnded"); + else if (Configuration.doAutoCreate()) + this.dateEnded = new DateTimeType(); // bb + return this.dateEnded; + } + + public boolean hasDateEndedElement() { + return this.dateEnded != null && !this.dateEnded.isEmpty(); + } + + public boolean hasDateEnded() { + return this.dateEnded != null && !this.dateEnded.isEmpty(); + } + + /** + * @param value {@link #dateEnded} (The date (and perhaps time) when the prescription was stopped.). This is the underlying object with id, value and extensions. The accessor "getDateEnded" gives direct access to the value + */ + public MedicationOrder setDateEndedElement(DateTimeType value) { + this.dateEnded = value; + return this; + } + + /** + * @return The date (and perhaps time) when the prescription was stopped. + */ + public Date getDateEnded() { + return this.dateEnded == null ? null : this.dateEnded.getValue(); + } + + /** + * @param value The date (and perhaps time) when the prescription was stopped. + */ + public MedicationOrder setDateEnded(Date value) { + if (value == null) + this.dateEnded = null; + else { + if (this.dateEnded == null) + this.dateEnded = new DateTimeType(); + this.dateEnded.setValue(value); + } + return this; + } + + /** + * @return {@link #reasonEnded} (The reason why the prescription was stopped, if it was.) + */ + public CodeableConcept getReasonEnded() { + if (this.reasonEnded == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.reasonEnded"); + else if (Configuration.doAutoCreate()) + this.reasonEnded = new CodeableConcept(); // cc + return this.reasonEnded; + } + + public boolean hasReasonEnded() { + return this.reasonEnded != null && !this.reasonEnded.isEmpty(); + } + + /** + * @param value {@link #reasonEnded} (The reason why the prescription was stopped, if it was.) + */ + public MedicationOrder setReasonEnded(CodeableConcept value) { + this.reasonEnded = value; + return this; + } + + /** + * @return {@link #patient} (A link to a resource representing the person to whom the medication will be given.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A link to a resource representing the person to whom the medication will be given.) + */ + public MedicationOrder setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the medication will be given.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the medication will be given.) + */ + public MedicationOrder setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) + */ + public Reference getPrescriber() { + if (this.prescriber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.prescriber"); + else if (Configuration.doAutoCreate()) + this.prescriber = new Reference(); // cc + return this.prescriber; + } + + public boolean hasPrescriber() { + return this.prescriber != null && !this.prescriber.isEmpty(); + } + + /** + * @param value {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) + */ + public MedicationOrder setPrescriber(Reference value) { + this.prescriber = value; + return this; + } + + /** + * @return {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) + */ + public Practitioner getPrescriberTarget() { + if (this.prescriberTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.prescriber"); + else if (Configuration.doAutoCreate()) + this.prescriberTarget = new Practitioner(); // aa + return this.prescriberTarget; + } + + /** + * @param value {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) + */ + public MedicationOrder setPrescriberTarget(Practitioner value) { + this.prescriberTarget = value; + return this; + } + + /** + * @return {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public MedicationOrder setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public MedicationOrder setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public MedicationOrder setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #note} (Extra information about the prescription that could not be conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Extra information about the prescription that could not be conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public MedicationOrder setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return Extra information about the prescription that could not be conveyed by the other attributes. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value Extra information about the prescription that could not be conveyed by the other attributes. + */ + public MedicationOrder setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Type getMedication() { + return this.medication; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public CodeableConcept getMedicationCodeableConcept() throws FHIRException { + if (!(this.medication instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (CodeableConcept) this.medication; + } + + public boolean hasMedicationCodeableConcept() { + return this.medication instanceof CodeableConcept; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Reference getMedicationReference() throws FHIRException { + if (!(this.medication instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (Reference) this.medication; + } + + public boolean hasMedicationReference() { + return this.medication instanceof Reference; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.) + */ + public MedicationOrder setMedication(Type value) { + this.medication = value; + return this; + } + + /** + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + */ + public List getDosageInstruction() { + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + return this.dosageInstruction; + } + + public boolean hasDosageInstruction() { + if (this.dosageInstruction == null) + return false; + for (MedicationOrderDosageInstructionComponent item : this.dosageInstruction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + */ + // syntactic sugar + public MedicationOrderDosageInstructionComponent addDosageInstruction() { //3 + MedicationOrderDosageInstructionComponent t = new MedicationOrderDosageInstructionComponent(); + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + this.dosageInstruction.add(t); + return t; + } + + // syntactic sugar + public MedicationOrder addDosageInstruction(MedicationOrderDosageInstructionComponent t) { //3 + if (t == null) + return this; + if (this.dosageInstruction == null) + this.dosageInstruction = new ArrayList(); + this.dosageInstruction.add(t); + return this; + } + + /** + * @return {@link #dispenseRequest} (Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.) + */ + public MedicationOrderDispenseRequestComponent getDispenseRequest() { + if (this.dispenseRequest == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.dispenseRequest"); + else if (Configuration.doAutoCreate()) + this.dispenseRequest = new MedicationOrderDispenseRequestComponent(); // cc + return this.dispenseRequest; + } + + public boolean hasDispenseRequest() { + return this.dispenseRequest != null && !this.dispenseRequest.isEmpty(); + } + + /** + * @param value {@link #dispenseRequest} (Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.) + */ + public MedicationOrder setDispenseRequest(MedicationOrderDispenseRequestComponent value) { + this.dispenseRequest = value; + return this; + } + + /** + * @return {@link #substitution} (Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.) + */ + public MedicationOrderSubstitutionComponent getSubstitution() { + if (this.substitution == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.substitution"); + else if (Configuration.doAutoCreate()) + this.substitution = new MedicationOrderSubstitutionComponent(); // cc + return this.substitution; + } + + public boolean hasSubstitution() { + return this.substitution != null && !this.substitution.isEmpty(); + } + + /** + * @param value {@link #substitution} (Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.) + */ + public MedicationOrder setSubstitution(MedicationOrderSubstitutionComponent value) { + this.substitution = value; + return this; + } + + /** + * @return {@link #priorPrescription} (A link to a resource representing an earlier order or prescription that this order supersedes.) + */ + public Reference getPriorPrescription() { + if (this.priorPrescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.priorPrescription"); + else if (Configuration.doAutoCreate()) + this.priorPrescription = new Reference(); // cc + return this.priorPrescription; + } + + public boolean hasPriorPrescription() { + return this.priorPrescription != null && !this.priorPrescription.isEmpty(); + } + + /** + * @param value {@link #priorPrescription} (A link to a resource representing an earlier order or prescription that this order supersedes.) + */ + public MedicationOrder setPriorPrescription(Reference value) { + this.priorPrescription = value; + return this; + } + + /** + * @return {@link #priorPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing an earlier order or prescription that this order supersedes.) + */ + public MedicationOrder getPriorPrescriptionTarget() { + if (this.priorPrescriptionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationOrder.priorPrescription"); + else if (Configuration.doAutoCreate()) + this.priorPrescriptionTarget = new MedicationOrder(); // aa + return this.priorPrescriptionTarget; + } + + /** + * @param value {@link #priorPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing an earlier order or prescription that this order supersedes.) + */ + public MedicationOrder setPriorPrescriptionTarget(MedicationOrder value) { + this.priorPrescriptionTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, java.lang.Integer.MAX_VALUE, dateWritten)); + childrenList.add(new Property("status", "code", "A code specifying the state of the order. Generally this will be active or completed state.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("dateEnded", "dateTime", "The date (and perhaps time) when the prescription was stopped.", 0, java.lang.Integer.MAX_VALUE, dateEnded)); + childrenList.add(new Property("reasonEnded", "CodeableConcept", "The reason why the prescription was stopped, if it was.", 0, java.lang.Integer.MAX_VALUE, reasonEnded)); + childrenList.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person to whom the medication will be given.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("prescriber", "Reference(Practitioner)", "The healthcare professional responsible for authorizing the prescription.", 0, java.lang.Integer.MAX_VALUE, prescriber)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "A link to a resource that identifies the particular occurrence of contact between patient and health care provider.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("note", "string", "Extra information about the prescription that could not be conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); + childrenList.add(new Property("dosageInstruction", "", "Indicates how the medication is to be used by the patient.", 0, java.lang.Integer.MAX_VALUE, dosageInstruction)); + childrenList.add(new Property("dispenseRequest", "", "Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.", 0, java.lang.Integer.MAX_VALUE, dispenseRequest)); + childrenList.add(new Property("substitution", "", "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", 0, java.lang.Integer.MAX_VALUE, substitution)); + childrenList.add(new Property("priorPrescription", "Reference(MedicationOrder)", "A link to a resource representing an earlier order or prescription that this order supersedes.", 0, java.lang.Integer.MAX_VALUE, priorPrescription)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("dateWritten")) + this.dateWritten = castToDateTime(value); // DateTimeType + else if (name.equals("status")) + this.status = new MedicationOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("dateEnded")) + this.dateEnded = castToDateTime(value); // DateTimeType + else if (name.equals("reasonEnded")) + this.reasonEnded = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("prescriber")) + this.prescriber = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("note")) + this.note = castToString(value); // StringType + else if (name.equals("medication[x]")) + this.medication = (Type) value; // Type + else if (name.equals("dosageInstruction")) + this.getDosageInstruction().add((MedicationOrderDosageInstructionComponent) value); + else if (name.equals("dispenseRequest")) + this.dispenseRequest = (MedicationOrderDispenseRequestComponent) value; // MedicationOrderDispenseRequestComponent + else if (name.equals("substitution")) + this.substitution = (MedicationOrderSubstitutionComponent) value; // MedicationOrderSubstitutionComponent + else if (name.equals("priorPrescription")) + this.priorPrescription = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("dateWritten")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.dateWritten"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.status"); + } + else if (name.equals("dateEnded")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.dateEnded"); + } + else if (name.equals("reasonEnded")) { + this.reasonEnded = new CodeableConcept(); + return this.reasonEnded; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("prescriber")) { + this.prescriber = new Reference(); + return this.prescriber; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("note")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.note"); + } + else if (name.equals("medicationCodeableConcept")) { + this.medication = new CodeableConcept(); + return this.medication; + } + else if (name.equals("medicationReference")) { + this.medication = new Reference(); + return this.medication; + } + else if (name.equals("dosageInstruction")) { + return addDosageInstruction(); + } + else if (name.equals("dispenseRequest")) { + this.dispenseRequest = new MedicationOrderDispenseRequestComponent(); + return this.dispenseRequest; + } + else if (name.equals("substitution")) { + this.substitution = new MedicationOrderSubstitutionComponent(); + return this.substitution; + } + else if (name.equals("priorPrescription")) { + this.priorPrescription = new Reference(); + return this.priorPrescription; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MedicationOrder"; + + } + + public MedicationOrder copy() { + MedicationOrder dst = new MedicationOrder(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.dateWritten = dateWritten == null ? null : dateWritten.copy(); + dst.status = status == null ? null : status.copy(); + dst.dateEnded = dateEnded == null ? null : dateEnded.copy(); + dst.reasonEnded = reasonEnded == null ? null : reasonEnded.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.prescriber = prescriber == null ? null : prescriber.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.note = note == null ? null : note.copy(); + dst.medication = medication == null ? null : medication.copy(); + if (dosageInstruction != null) { + dst.dosageInstruction = new ArrayList(); + for (MedicationOrderDosageInstructionComponent i : dosageInstruction) + dst.dosageInstruction.add(i.copy()); + }; + dst.dispenseRequest = dispenseRequest == null ? null : dispenseRequest.copy(); + dst.substitution = substitution == null ? null : substitution.copy(); + dst.priorPrescription = priorPrescription == null ? null : priorPrescription.copy(); + return dst; + } + + protected MedicationOrder typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationOrder)) + return false; + MedicationOrder o = (MedicationOrder) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(dateWritten, o.dateWritten, true) + && compareDeep(status, o.status, true) && compareDeep(dateEnded, o.dateEnded, true) && compareDeep(reasonEnded, o.reasonEnded, true) + && compareDeep(patient, o.patient, true) && compareDeep(prescriber, o.prescriber, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true) && compareDeep(medication, o.medication, true) + && compareDeep(dosageInstruction, o.dosageInstruction, true) && compareDeep(dispenseRequest, o.dispenseRequest, true) + && compareDeep(substitution, o.substitution, true) && compareDeep(priorPrescription, o.priorPrescription, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationOrder)) + return false; + MedicationOrder o = (MedicationOrder) other; + return compareValues(dateWritten, o.dateWritten, true) && compareValues(status, o.status, true) && compareValues(dateEnded, o.dateEnded, true) + && compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (dateWritten == null || dateWritten.isEmpty()) + && (status == null || status.isEmpty()) && (dateEnded == null || dateEnded.isEmpty()) && (reasonEnded == null || reasonEnded.isEmpty()) + && (patient == null || patient.isEmpty()) && (prescriber == null || prescriber.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (reason == null || reason.isEmpty()) && (note == null || note.isEmpty()) + && (medication == null || medication.isEmpty()) && (dosageInstruction == null || dosageInstruction.isEmpty()) + && (dispenseRequest == null || dispenseRequest.isEmpty()) && (substitution == null || substitution.isEmpty()) + && (priorPrescription == null || priorPrescription.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MedicationOrder; + } + + @SearchParamDefinition(name="prescriber", path="MedicationOrder.prescriber", description="Who ordered the medication(s)", type="reference" ) + public static final String SP_PRESCRIBER = "prescriber"; + @SearchParamDefinition(name="identifier", path="MedicationOrder.identifier", description="Return prescriptions with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="MedicationOrder.medicationCodeableConcept", description="Return administrations of this medication code", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="patient", path="MedicationOrder.patient", description="The identity of a patient to list orders for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="datewritten", path="MedicationOrder.dateWritten", description="Return prescriptions written on this date", type="date" ) + public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name="medication", path="MedicationOrder.medicationReference", description="Return administrations of this medication reference", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="encounter", path="MedicationOrder.encounter", description="Return prescriptions with this encounter identifier", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="status", path="MedicationOrder.status", description="Status of the prescription", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationStatement.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationStatement.java new file mode 100644 index 00000000000..d24dd9455d3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MedicationStatement.java @@ -0,0 +1,1631 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ +@ResourceDef(name="MedicationStatement", profile="http://hl7.org/fhir/Profile/MedicationStatement") +public class MedicationStatement extends DomainResource { + + public enum MedicationStatementStatus { + /** + * The medication is still being taken. + */ + ACTIVE, + /** + * The medication is no longer being taken. + */ + COMPLETED, + /** + * The statement was entered in error. + */ + ENTEREDINERROR, + /** + * The medication may be taken at some time in the future. + */ + INTENDED, + /** + * added to help the parsers + */ + NULL; + public static MedicationStatementStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("intended".equals(codeString)) + return INTENDED; + throw new FHIRException("Unknown MedicationStatementStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case INTENDED: return "intended"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/medication-statement-status"; + case COMPLETED: return "http://hl7.org/fhir/medication-statement-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/medication-statement-status"; + case INTENDED: return "http://hl7.org/fhir/medication-statement-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The medication is still being taken."; + case COMPLETED: return "The medication is no longer being taken."; + case ENTEREDINERROR: return "The statement was entered in error."; + case INTENDED: return "The medication may be taken at some time in the future."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case INTENDED: return "Intended"; + default: return "?"; + } + } + } + + public static class MedicationStatementStatusEnumFactory implements EnumFactory { + public MedicationStatementStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return MedicationStatementStatus.ACTIVE; + if ("completed".equals(codeString)) + return MedicationStatementStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationStatementStatus.ENTEREDINERROR; + if ("intended".equals(codeString)) + return MedicationStatementStatus.INTENDED; + throw new IllegalArgumentException("Unknown MedicationStatementStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return new Enumeration(this, MedicationStatementStatus.ACTIVE); + if ("completed".equals(codeString)) + return new Enumeration(this, MedicationStatementStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, MedicationStatementStatus.ENTEREDINERROR); + if ("intended".equals(codeString)) + return new Enumeration(this, MedicationStatementStatus.INTENDED); + throw new FHIRException("Unknown MedicationStatementStatus code '"+codeString+"'"); + } + public String toCode(MedicationStatementStatus code) { + if (code == MedicationStatementStatus.ACTIVE) + return "active"; + if (code == MedicationStatementStatus.COMPLETED) + return "completed"; + if (code == MedicationStatementStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationStatementStatus.INTENDED) + return "intended"; + return "?"; + } + } + + @Block() + public static class MedicationStatementDosageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reported dosage information", formalDefinition="Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans." ) + protected StringType text; + + /** + * The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". + */ + @Child(name = "timing", type = {Timing.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When/how often was medication taken", formalDefinition="The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"." ) + protected Timing timing; + + /** + * Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule. + */ + @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Take \"as needed\" (for x)", formalDefinition="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). \n\nSpecifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule." ) + protected Type asNeeded; + + /** + * A coded specification of or a reference to the anatomic site where the medication first enters the body. + */ + @Child(name = "site", type = {CodeableConcept.class, BodySite.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where (on body) medication is/was administered", formalDefinition="A coded specification of or a reference to the anatomic site where the medication first enters the body." ) + protected Type site; + + /** + * A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How the medication entered the body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject." ) + protected CodeableConcept route; + + /** + * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Technique used to administer medication", formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." ) + protected CodeableConcept method; + + /** + * The amount of therapeutic or other substance given at one administration event. + */ + @Child(name = "quantity", type = {SimpleQuantity.class, Range.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount administered in one dose", formalDefinition="The amount of therapeutic or other substance given at one administration event." ) + protected Type quantity; + + /** + * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + */ + @Child(name = "rate", type = {Ratio.class, Range.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dose quantity per unit of time", formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) + protected Type rate; + + /** + * The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours. + */ + @Child(name = "maxDosePerPeriod", type = {Ratio.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Maximum dose that was consumed per unit of time", formalDefinition="The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours." ) + protected Ratio maxDosePerPeriod; + + private static final long serialVersionUID = 246880733L; + + /* + * Constructor + */ + public MedicationStatementDosageComponent() { + super(); + } + + /** + * @return {@link #text} (Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatementDosageComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public MedicationStatementDosageComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. + */ + public MedicationStatementDosageComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Timing getTiming() { + if (this.timing == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatementDosageComponent.timing"); + else if (Configuration.doAutoCreate()) + this.timing = new Timing(); // cc + return this.timing; + } + + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); + } + + /** + * @param value {@link #timing} (The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public MedicationStatementDosageComponent setTiming(Timing value) { + this.timing = value; + return this; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public Type getAsNeeded() { + return this.asNeeded; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public BooleanType getAsNeededBooleanType() throws FHIRException { + if (!(this.asNeeded instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (BooleanType) this.asNeeded; + } + + public boolean hasAsNeededBooleanType() { + return this.asNeeded instanceof BooleanType; + } + + /** + * @return {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public CodeableConcept getAsNeededCodeableConcept() throws FHIRException { + if (!(this.asNeeded instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (CodeableConcept) this.asNeeded; + } + + public boolean hasAsNeededCodeableConcept() { + return this.asNeeded instanceof CodeableConcept; + } + + public boolean hasAsNeeded() { + return this.asNeeded != null && !this.asNeeded.isEmpty(); + } + + /** + * @param value {@link #asNeeded} (Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). + +Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.) + */ + public MedicationStatementDosageComponent setAsNeeded(Type value) { + this.asNeeded = value; + return this; + } + + /** + * @return {@link #site} (A coded specification of or a reference to the anatomic site where the medication first enters the body.) + */ + public Type getSite() { + return this.site; + } + + /** + * @return {@link #site} (A coded specification of or a reference to the anatomic site where the medication first enters the body.) + */ + public CodeableConcept getSiteCodeableConcept() throws FHIRException { + if (!(this.site instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.site.getClass().getName()+" was encountered"); + return (CodeableConcept) this.site; + } + + public boolean hasSiteCodeableConcept() { + return this.site instanceof CodeableConcept; + } + + /** + * @return {@link #site} (A coded specification of or a reference to the anatomic site where the medication first enters the body.) + */ + public Reference getSiteReference() throws FHIRException { + if (!(this.site instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.site.getClass().getName()+" was encountered"); + return (Reference) this.site; + } + + public boolean hasSiteReference() { + return this.site instanceof Reference; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (A coded specification of or a reference to the anatomic site where the medication first enters the body.) + */ + public MedicationStatementDosageComponent setSite(Type value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatementDosageComponent.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.) + */ + public MedicationStatementDosageComponent setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatementDosageComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public MedicationStatementDosageComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #quantity} (The amount of therapeutic or other substance given at one administration event.) + */ + public Type getQuantity() { + return this.quantity; + } + + /** + * @return {@link #quantity} (The amount of therapeutic or other substance given at one administration event.) + */ + public SimpleQuantity getQuantitySimpleQuantity() throws FHIRException { + if (!(this.quantity instanceof SimpleQuantity)) + throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.quantity.getClass().getName()+" was encountered"); + return (SimpleQuantity) this.quantity; + } + + public boolean hasQuantitySimpleQuantity() { + return this.quantity instanceof SimpleQuantity; + } + + /** + * @return {@link #quantity} (The amount of therapeutic or other substance given at one administration event.) + */ + public Range getQuantityRange() throws FHIRException { + if (!(this.quantity instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.quantity.getClass().getName()+" was encountered"); + return (Range) this.quantity; + } + + public boolean hasQuantityRange() { + return this.quantity instanceof Range; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of therapeutic or other substance given at one administration event.) + */ + public MedicationStatementDosageComponent setQuantity(Type value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Type getRate() { + return this.rate; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Ratio getRateRatio() throws FHIRException { + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this.rate instanceof Ratio; + } + + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Range getRateRange() throws FHIRException { + if (!(this.rate instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Range) this.rate; + } + + public boolean hasRateRange() { + return this.rate instanceof Range; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public MedicationStatementDosageComponent setRate(Type value) { + this.rate = value; + return this; + } + + /** + * @return {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.) + */ + public Ratio getMaxDosePerPeriod() { + if (this.maxDosePerPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatementDosageComponent.maxDosePerPeriod"); + else if (Configuration.doAutoCreate()) + this.maxDosePerPeriod = new Ratio(); // cc + return this.maxDosePerPeriod; + } + + public boolean hasMaxDosePerPeriod() { + return this.maxDosePerPeriod != null && !this.maxDosePerPeriod.isEmpty(); + } + + /** + * @param value {@link #maxDosePerPeriod} (The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.) + */ + public MedicationStatementDosageComponent setMaxDosePerPeriod(Ratio value) { + this.maxDosePerPeriod = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("text", "string", "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("timing", "Timing", "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".", 0, java.lang.Integer.MAX_VALUE, timing)); + childrenList.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). \n\nSpecifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", 0, java.lang.Integer.MAX_VALUE, asNeeded)); + childrenList.add(new Property("site[x]", "CodeableConcept|Reference(BodySite)", "A coded specification of or a reference to the anatomic site where the medication first enters the body.", 0, java.lang.Integer.MAX_VALUE, site)); + childrenList.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.", 0, java.lang.Integer.MAX_VALUE, route)); + childrenList.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("quantity[x]", "SimpleQuantity|Range", "The amount of therapeutic or other substance given at one administration event.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("rate[x]", "Ratio|Range", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); + childrenList.add(new Property("maxDosePerPeriod", "Ratio", "The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.", 0, java.lang.Integer.MAX_VALUE, maxDosePerPeriod)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("timing")) + this.timing = castToTiming(value); // Timing + else if (name.equals("asNeeded[x]")) + this.asNeeded = (Type) value; // Type + else if (name.equals("site[x]")) + this.site = (Type) value; // Type + else if (name.equals("route")) + this.route = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("quantity[x]")) + this.quantity = (Type) value; // Type + else if (name.equals("rate[x]")) + this.rate = (Type) value; // Type + else if (name.equals("maxDosePerPeriod")) + this.maxDosePerPeriod = castToRatio(value); // Ratio + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.text"); + } + else if (name.equals("timing")) { + this.timing = new Timing(); + return this.timing; + } + else if (name.equals("asNeededBoolean")) { + this.asNeeded = new BooleanType(); + return this.asNeeded; + } + else if (name.equals("asNeededCodeableConcept")) { + this.asNeeded = new CodeableConcept(); + return this.asNeeded; + } + else if (name.equals("siteCodeableConcept")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("siteReference")) { + this.site = new Reference(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("quantitySimpleQuantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("quantityRange")) { + this.quantity = new Range(); + return this.quantity; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else if (name.equals("rateRange")) { + this.rate = new Range(); + return this.rate; + } + else if (name.equals("maxDosePerPeriod")) { + this.maxDosePerPeriod = new Ratio(); + return this.maxDosePerPeriod; + } + else + return super.addChild(name); + } + + public MedicationStatementDosageComponent copy() { + MedicationStatementDosageComponent dst = new MedicationStatementDosageComponent(); + copyValues(dst); + dst.text = text == null ? null : text.copy(); + dst.timing = timing == null ? null : timing.copy(); + dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.method = method == null ? null : method.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.rate = rate == null ? null : rate.copy(); + dst.maxDosePerPeriod = maxDosePerPeriod == null ? null : maxDosePerPeriod.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationStatementDosageComponent)) + return false; + MedicationStatementDosageComponent o = (MedicationStatementDosageComponent) other; + return compareDeep(text, o.text, true) && compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) + && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) && compareDeep(method, o.method, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(rate, o.rate, true) && compareDeep(maxDosePerPeriod, o.maxDosePerPeriod, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationStatementDosageComponent)) + return false; + MedicationStatementDosageComponent o = (MedicationStatementDosageComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (text == null || text.isEmpty()) && (timing == null || timing.isEmpty()) + && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) && (route == null || route.isEmpty()) + && (method == null || method.isEmpty()) && (quantity == null || quantity.isEmpty()) && (rate == null || rate.isEmpty()) + && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()); + } + + public String fhirType() { + return "MedicationStatement.dosage"; + + } + + } + + /** + * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." ) + protected List identifier; + + /** + * The person or animal who is/was taking the medication. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who is/was taking the medication", formalDefinition="The person or animal who is/was taking the medication." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person or animal who is/was taking the medication.) + */ + protected Patient patientTarget; + + /** + * The person who provided the information about the taking of this medication. + */ + @Child(name = "informationSource", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The person who provided the information about the taking of this medication." ) + protected Reference informationSource; + + /** + * The actual object that is the target of the reference (The person who provided the information about the taking of this medication.) + */ + protected Resource informationSourceTarget; + + /** + * The date when the medication statement was asserted by the information source. + */ + @Child(name = "dateAsserted", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the statement was asserted?", formalDefinition="The date when the medication statement was asserted by the information source." ) + protected DateTimeType dateAsserted; + + /** + * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | completed | entered-in-error | intended", formalDefinition="A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed." ) + protected Enumeration status; + + /** + * Set this to true if the record is saying that the medication was NOT taken. + */ + @Child(name = "wasNotTaken", type = {BooleanType.class}, order=5, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="True if medication is/was not being taken", formalDefinition="Set this to true if the record is saying that the medication was NOT taken." ) + protected BooleanType wasNotTaken; + + /** + * A code indicating why the medication was not taken. + */ + @Child(name = "reasonNotTaken", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="True if asserting medication was not given", formalDefinition="A code indicating why the medication was not taken." ) + protected List reasonNotTaken; + + /** + * A reason for why the medication is being/was taken. + */ + @Child(name = "reasonForUse", type = {CodeableConcept.class, Condition.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="A reason for why the medication is being/was taken." ) + protected Type reasonForUse; + + /** + * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true). + */ + @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Over what period was medication consumed?", formalDefinition="The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true)." ) + protected Type effective; + + /** + * Provides extra information about the medication statement that is not conveyed by the other attributes. + */ + @Child(name = "note", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Further information about the statement", formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." ) + protected StringType note; + + /** + * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement. + */ + @Child(name = "supportingInformation", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional supporting information", formalDefinition="Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement." ) + protected List supportingInformation; + /** + * The actual objects that are the target of the reference (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) + */ + protected List supportingInformationTarget; + + + /** + * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. + */ + @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What medication was taken", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) + protected Type medication; + + /** + * Indicates how the medication is/was used by the patient. + */ + @Child(name = "dosage", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) + protected List dosage; + + private static final long serialVersionUID = 55795672L; + + /* + * Constructor + */ + public MedicationStatement() { + super(); + } + + /* + * Constructor + */ + public MedicationStatement(Reference patient, Enumeration status, Type medication) { + super(); + this.patient = patient; + this.status = status; + this.medication = medication; + } + + /** + * @return {@link #identifier} (External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public MedicationStatement addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (The person or animal who is/was taking the medication.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person or animal who is/was taking the medication.) + */ + public MedicationStatement setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or animal who is/was taking the medication.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or animal who is/was taking the medication.) + */ + public MedicationStatement setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #informationSource} (The person who provided the information about the taking of this medication.) + */ + public Reference getInformationSource() { + if (this.informationSource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.informationSource"); + else if (Configuration.doAutoCreate()) + this.informationSource = new Reference(); // cc + return this.informationSource; + } + + public boolean hasInformationSource() { + return this.informationSource != null && !this.informationSource.isEmpty(); + } + + /** + * @param value {@link #informationSource} (The person who provided the information about the taking of this medication.) + */ + public MedicationStatement setInformationSource(Reference value) { + this.informationSource = value; + return this; + } + + /** + * @return {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication.) + */ + public Resource getInformationSourceTarget() { + return this.informationSourceTarget; + } + + /** + * @param value {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication.) + */ + public MedicationStatement setInformationSourceTarget(Resource value) { + this.informationSourceTarget = value; + return this; + } + + /** + * @return {@link #dateAsserted} (The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value + */ + public DateTimeType getDateAssertedElement() { + if (this.dateAsserted == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.dateAsserted"); + else if (Configuration.doAutoCreate()) + this.dateAsserted = new DateTimeType(); // bb + return this.dateAsserted; + } + + public boolean hasDateAssertedElement() { + return this.dateAsserted != null && !this.dateAsserted.isEmpty(); + } + + public boolean hasDateAsserted() { + return this.dateAsserted != null && !this.dateAsserted.isEmpty(); + } + + /** + * @param value {@link #dateAsserted} (The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value + */ + public MedicationStatement setDateAssertedElement(DateTimeType value) { + this.dateAsserted = value; + return this; + } + + /** + * @return The date when the medication statement was asserted by the information source. + */ + public Date getDateAsserted() { + return this.dateAsserted == null ? null : this.dateAsserted.getValue(); + } + + /** + * @param value The date when the medication statement was asserted by the information source. + */ + public MedicationStatement setDateAsserted(Date value) { + if (value == null) + this.dateAsserted = null; + else { + if (this.dateAsserted == null) + this.dateAsserted = new DateTimeType(); + this.dateAsserted.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MedicationStatementStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MedicationStatement setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. + */ + public MedicationStatementStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. + */ + public MedicationStatement setStatus(MedicationStatementStatus value) { + if (this.status == null) + this.status = new Enumeration(new MedicationStatementStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #wasNotTaken} (Set this to true if the record is saying that the medication was NOT taken.). This is the underlying object with id, value and extensions. The accessor "getWasNotTaken" gives direct access to the value + */ + public BooleanType getWasNotTakenElement() { + if (this.wasNotTaken == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.wasNotTaken"); + else if (Configuration.doAutoCreate()) + this.wasNotTaken = new BooleanType(); // bb + return this.wasNotTaken; + } + + public boolean hasWasNotTakenElement() { + return this.wasNotTaken != null && !this.wasNotTaken.isEmpty(); + } + + public boolean hasWasNotTaken() { + return this.wasNotTaken != null && !this.wasNotTaken.isEmpty(); + } + + /** + * @param value {@link #wasNotTaken} (Set this to true if the record is saying that the medication was NOT taken.). This is the underlying object with id, value and extensions. The accessor "getWasNotTaken" gives direct access to the value + */ + public MedicationStatement setWasNotTakenElement(BooleanType value) { + this.wasNotTaken = value; + return this; + } + + /** + * @return Set this to true if the record is saying that the medication was NOT taken. + */ + public boolean getWasNotTaken() { + return this.wasNotTaken == null || this.wasNotTaken.isEmpty() ? false : this.wasNotTaken.getValue(); + } + + /** + * @param value Set this to true if the record is saying that the medication was NOT taken. + */ + public MedicationStatement setWasNotTaken(boolean value) { + if (this.wasNotTaken == null) + this.wasNotTaken = new BooleanType(); + this.wasNotTaken.setValue(value); + return this; + } + + /** + * @return {@link #reasonNotTaken} (A code indicating why the medication was not taken.) + */ + public List getReasonNotTaken() { + if (this.reasonNotTaken == null) + this.reasonNotTaken = new ArrayList(); + return this.reasonNotTaken; + } + + public boolean hasReasonNotTaken() { + if (this.reasonNotTaken == null) + return false; + for (CodeableConcept item : this.reasonNotTaken) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonNotTaken} (A code indicating why the medication was not taken.) + */ + // syntactic sugar + public CodeableConcept addReasonNotTaken() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonNotTaken == null) + this.reasonNotTaken = new ArrayList(); + this.reasonNotTaken.add(t); + return t; + } + + // syntactic sugar + public MedicationStatement addReasonNotTaken(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonNotTaken == null) + this.reasonNotTaken = new ArrayList(); + this.reasonNotTaken.add(t); + return this; + } + + /** + * @return {@link #reasonForUse} (A reason for why the medication is being/was taken.) + */ + public Type getReasonForUse() { + return this.reasonForUse; + } + + /** + * @return {@link #reasonForUse} (A reason for why the medication is being/was taken.) + */ + public CodeableConcept getReasonForUseCodeableConcept() throws FHIRException { + if (!(this.reasonForUse instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reasonForUse.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reasonForUse; + } + + public boolean hasReasonForUseCodeableConcept() { + return this.reasonForUse instanceof CodeableConcept; + } + + /** + * @return {@link #reasonForUse} (A reason for why the medication is being/was taken.) + */ + public Reference getReasonForUseReference() throws FHIRException { + if (!(this.reasonForUse instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reasonForUse.getClass().getName()+" was encountered"); + return (Reference) this.reasonForUse; + } + + public boolean hasReasonForUseReference() { + return this.reasonForUse instanceof Reference; + } + + public boolean hasReasonForUse() { + return this.reasonForUse != null && !this.reasonForUse.isEmpty(); + } + + /** + * @param value {@link #reasonForUse} (A reason for why the medication is being/was taken.) + */ + public MedicationStatement setReasonForUse(Type value) { + this.reasonForUse = value; + return this; + } + + /** + * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + */ + public Type getEffective() { + return this.effective; + } + + /** + * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + */ + public DateTimeType getEffectiveDateTimeType() throws FHIRException { + if (!(this.effective instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (DateTimeType) this.effective; + } + + public boolean hasEffectiveDateTimeType() { + return this.effective instanceof DateTimeType; + } + + /** + * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + */ + public Period getEffectivePeriod() throws FHIRException { + if (!(this.effective instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (Period) this.effective; + } + + public boolean hasEffectivePeriod() { + return this.effective instanceof Period; + } + + public boolean hasEffective() { + return this.effective != null && !this.effective.isEmpty(); + } + + /** + * @param value {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + */ + public MedicationStatement setEffective(Type value) { + this.effective = value; + return this; + } + + /** + * @return {@link #note} (Provides extra information about the medication statement that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationStatement.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (Provides extra information about the medication statement that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public MedicationStatement setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return Provides extra information about the medication statement that is not conveyed by the other attributes. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value Provides extra information about the medication statement that is not conveyed by the other attributes. + */ + public MedicationStatement setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) + */ + // syntactic sugar + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + // syntactic sugar + public MedicationStatement addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) + */ + public List getSupportingInformationTarget() { + if (this.supportingInformationTarget == null) + this.supportingInformationTarget = new ArrayList(); + return this.supportingInformationTarget; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Type getMedication() { + return this.medication; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public CodeableConcept getMedicationCodeableConcept() throws FHIRException { + if (!(this.medication instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (CodeableConcept) this.medication; + } + + public boolean hasMedicationCodeableConcept() { + return this.medication instanceof CodeableConcept; + } + + /** + * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public Reference getMedicationReference() throws FHIRException { + if (!(this.medication instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); + return (Reference) this.medication; + } + + public boolean hasMedicationReference() { + return this.medication instanceof Reference; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) + */ + public MedicationStatement setMedication(Type value) { + this.medication = value; + return this; + } + + /** + * @return {@link #dosage} (Indicates how the medication is/was used by the patient.) + */ + public List getDosage() { + if (this.dosage == null) + this.dosage = new ArrayList(); + return this.dosage; + } + + public boolean hasDosage() { + if (this.dosage == null) + return false; + for (MedicationStatementDosageComponent item : this.dosage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dosage} (Indicates how the medication is/was used by the patient.) + */ + // syntactic sugar + public MedicationStatementDosageComponent addDosage() { //3 + MedicationStatementDosageComponent t = new MedicationStatementDosageComponent(); + if (this.dosage == null) + this.dosage = new ArrayList(); + this.dosage.add(t); + return t; + } + + // syntactic sugar + public MedicationStatement addDosage(MedicationStatementDosageComponent t) { //3 + if (t == null) + return this; + if (this.dosage == null) + this.dosage = new ArrayList(); + this.dosage.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "The person or animal who is/was taking the medication.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("informationSource", "Reference(Patient|Practitioner|RelatedPerson)", "The person who provided the information about the taking of this medication.", 0, java.lang.Integer.MAX_VALUE, informationSource)); + childrenList.add(new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, java.lang.Integer.MAX_VALUE, dateAsserted)); + childrenList.add(new Property("status", "code", "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("wasNotTaken", "boolean", "Set this to true if the record is saying that the medication was NOT taken.", 0, java.lang.Integer.MAX_VALUE, wasNotTaken)); + childrenList.add(new Property("reasonNotTaken", "CodeableConcept", "A code indicating why the medication was not taken.", 0, java.lang.Integer.MAX_VALUE, reasonNotTaken)); + childrenList.add(new Property("reasonForUse[x]", "CodeableConcept|Reference(Condition)", "A reason for why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonForUse)); + childrenList.add(new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, java.lang.Integer.MAX_VALUE, effective)); + childrenList.add(new Property("note", "string", "Provides extra information about the medication statement that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("supportingInformation", "Reference(Any)", "Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); + childrenList.add(new Property("dosage", "", "Indicates how the medication is/was used by the patient.", 0, java.lang.Integer.MAX_VALUE, dosage)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("informationSource")) + this.informationSource = castToReference(value); // Reference + else if (name.equals("dateAsserted")) + this.dateAsserted = castToDateTime(value); // DateTimeType + else if (name.equals("status")) + this.status = new MedicationStatementStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("wasNotTaken")) + this.wasNotTaken = castToBoolean(value); // BooleanType + else if (name.equals("reasonNotTaken")) + this.getReasonNotTaken().add(castToCodeableConcept(value)); + else if (name.equals("reasonForUse[x]")) + this.reasonForUse = (Type) value; // Type + else if (name.equals("effective[x]")) + this.effective = (Type) value; // Type + else if (name.equals("note")) + this.note = castToString(value); // StringType + else if (name.equals("supportingInformation")) + this.getSupportingInformation().add(castToReference(value)); + else if (name.equals("medication[x]")) + this.medication = (Type) value; // Type + else if (name.equals("dosage")) + this.getDosage().add((MedicationStatementDosageComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("informationSource")) { + this.informationSource = new Reference(); + return this.informationSource; + } + else if (name.equals("dateAsserted")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.dateAsserted"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.status"); + } + else if (name.equals("wasNotTaken")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.wasNotTaken"); + } + else if (name.equals("reasonNotTaken")) { + return addReasonNotTaken(); + } + else if (name.equals("reasonForUseCodeableConcept")) { + this.reasonForUse = new CodeableConcept(); + return this.reasonForUse; + } + else if (name.equals("reasonForUseReference")) { + this.reasonForUse = new Reference(); + return this.reasonForUse; + } + else if (name.equals("effectiveDateTime")) { + this.effective = new DateTimeType(); + return this.effective; + } + else if (name.equals("effectivePeriod")) { + this.effective = new Period(); + return this.effective; + } + else if (name.equals("note")) { + throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.note"); + } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } + else if (name.equals("medicationCodeableConcept")) { + this.medication = new CodeableConcept(); + return this.medication; + } + else if (name.equals("medicationReference")) { + this.medication = new Reference(); + return this.medication; + } + else if (name.equals("dosage")) { + return addDosage(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MedicationStatement"; + + } + + public MedicationStatement copy() { + MedicationStatement dst = new MedicationStatement(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.informationSource = informationSource == null ? null : informationSource.copy(); + dst.dateAsserted = dateAsserted == null ? null : dateAsserted.copy(); + dst.status = status == null ? null : status.copy(); + dst.wasNotTaken = wasNotTaken == null ? null : wasNotTaken.copy(); + if (reasonNotTaken != null) { + dst.reasonNotTaken = new ArrayList(); + for (CodeableConcept i : reasonNotTaken) + dst.reasonNotTaken.add(i.copy()); + }; + dst.reasonForUse = reasonForUse == null ? null : reasonForUse.copy(); + dst.effective = effective == null ? null : effective.copy(); + dst.note = note == null ? null : note.copy(); + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; + dst.medication = medication == null ? null : medication.copy(); + if (dosage != null) { + dst.dosage = new ArrayList(); + for (MedicationStatementDosageComponent i : dosage) + dst.dosage.add(i.copy()); + }; + return dst; + } + + protected MedicationStatement typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MedicationStatement)) + return false; + MedicationStatement o = (MedicationStatement) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(informationSource, o.informationSource, true) + && compareDeep(dateAsserted, o.dateAsserted, true) && compareDeep(status, o.status, true) && compareDeep(wasNotTaken, o.wasNotTaken, true) + && compareDeep(reasonNotTaken, o.reasonNotTaken, true) && compareDeep(reasonForUse, o.reasonForUse, true) + && compareDeep(effective, o.effective, true) && compareDeep(note, o.note, true) && compareDeep(supportingInformation, o.supportingInformation, true) + && compareDeep(medication, o.medication, true) && compareDeep(dosage, o.dosage, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MedicationStatement)) + return false; + MedicationStatement o = (MedicationStatement) other; + return compareValues(dateAsserted, o.dateAsserted, true) && compareValues(status, o.status, true) && compareValues(wasNotTaken, o.wasNotTaken, true) + && compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (informationSource == null || informationSource.isEmpty()) && (dateAsserted == null || dateAsserted.isEmpty()) + && (status == null || status.isEmpty()) && (wasNotTaken == null || wasNotTaken.isEmpty()) + && (reasonNotTaken == null || reasonNotTaken.isEmpty()) && (reasonForUse == null || reasonForUse.isEmpty()) + && (effective == null || effective.isEmpty()) && (note == null || note.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) + && (medication == null || medication.isEmpty()) && (dosage == null || dosage.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MedicationStatement; + } + + @SearchParamDefinition(name="identifier", path="MedicationStatement.identifier", description="Return statements with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="MedicationStatement.medicationCodeableConcept", description="Return administrations of this medication code", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list statements for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="medication", path="MedicationStatement.medicationReference", description="Return administrations of this medication reference", type="reference" ) + public static final String SP_MEDICATION = "medication"; + @SearchParamDefinition(name="source", path="MedicationStatement.informationSource", description="Who the information in the statement came from", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="effectivedate", path="MedicationStatement.effective[x]", description="Date when patient was taking (or not taking) the medication", type="date" ) + public static final String SP_EFFECTIVEDATE = "effectivedate"; + @SearchParamDefinition(name="status", path="MedicationStatement.status", description="Return statements that match the given status", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MessageHeader.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MessageHeader.java new file mode 100644 index 00000000000..925e73f643c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/MessageHeader.java @@ -0,0 +1,1738 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ +@ResourceDef(name="MessageHeader", profile="http://hl7.org/fhir/Profile/MessageHeader") +public class MessageHeader extends DomainResource { + + public enum ResponseType { + /** + * The message was accepted and processed without error. + */ + OK, + /** + * Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required. + */ + TRANSIENTERROR, + /** + * The message was rejected because of some content in it. There is no point in re-sending without change. The response narrative SHALL describe the issue. + */ + FATALERROR, + /** + * added to help the parsers + */ + NULL; + public static ResponseType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ok".equals(codeString)) + return OK; + if ("transient-error".equals(codeString)) + return TRANSIENTERROR; + if ("fatal-error".equals(codeString)) + return FATALERROR; + throw new FHIRException("Unknown ResponseType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OK: return "ok"; + case TRANSIENTERROR: return "transient-error"; + case FATALERROR: return "fatal-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case OK: return "http://hl7.org/fhir/response-code"; + case TRANSIENTERROR: return "http://hl7.org/fhir/response-code"; + case FATALERROR: return "http://hl7.org/fhir/response-code"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case OK: return "The message was accepted and processed without error."; + case TRANSIENTERROR: return "Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required."; + case FATALERROR: return "The message was rejected because of some content in it. There is no point in re-sending without change. The response narrative SHALL describe the issue."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OK: return "OK"; + case TRANSIENTERROR: return "Transient Error"; + case FATALERROR: return "Fatal Error"; + default: return "?"; + } + } + } + + public static class ResponseTypeEnumFactory implements EnumFactory { + public ResponseType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("ok".equals(codeString)) + return ResponseType.OK; + if ("transient-error".equals(codeString)) + return ResponseType.TRANSIENTERROR; + if ("fatal-error".equals(codeString)) + return ResponseType.FATALERROR; + throw new IllegalArgumentException("Unknown ResponseType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("ok".equals(codeString)) + return new Enumeration(this, ResponseType.OK); + if ("transient-error".equals(codeString)) + return new Enumeration(this, ResponseType.TRANSIENTERROR); + if ("fatal-error".equals(codeString)) + return new Enumeration(this, ResponseType.FATALERROR); + throw new FHIRException("Unknown ResponseType code '"+codeString+"'"); + } + public String toCode(ResponseType code) { + if (code == ResponseType.OK) + return "ok"; + if (code == ResponseType.TRANSIENTERROR) + return "transient-error"; + if (code == ResponseType.FATALERROR) + return "fatal-error"; + return "?"; + } + } + + @Block() + public static class MessageHeaderResponseComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The id of the message that this message is a response to. + */ + @Child(name = "identifier", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Id of original message", formalDefinition="The id of the message that this message is a response to." ) + protected IdType identifier; + + /** + * Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. + */ + @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="ok | transient-error | fatal-error", formalDefinition="Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not." ) + protected Enumeration code; + + /** + * Full details of any issues found in the message. + */ + @Child(name = "details", type = {OperationOutcome.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific list of hints/warnings/errors", formalDefinition="Full details of any issues found in the message." ) + protected Reference details; + + /** + * The actual object that is the target of the reference (Full details of any issues found in the message.) + */ + protected OperationOutcome detailsTarget; + + private static final long serialVersionUID = -1008716838L; + + /* + * Constructor + */ + public MessageHeaderResponseComponent() { + super(); + } + + /* + * Constructor + */ + public MessageHeaderResponseComponent(IdType identifier, Enumeration code) { + super(); + this.identifier = identifier; + this.code = code; + } + + /** + * @return {@link #identifier} (The id of the message that this message is a response to.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public IdType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeaderResponseComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new IdType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The id of the message that this message is a response to.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public MessageHeaderResponseComponent setIdentifierElement(IdType value) { + this.identifier = value; + return this; + } + + /** + * @return The id of the message that this message is a response to. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The id of the message that this message is a response to. + */ + public MessageHeaderResponseComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new IdType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #code} (Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeaderResponseComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new ResponseTypeEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public MessageHeaderResponseComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. + */ + public ResponseType getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. + */ + public MessageHeaderResponseComponent setCode(ResponseType value) { + if (this.code == null) + this.code = new Enumeration(new ResponseTypeEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #details} (Full details of any issues found in the message.) + */ + public Reference getDetails() { + if (this.details == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeaderResponseComponent.details"); + else if (Configuration.doAutoCreate()) + this.details = new Reference(); // cc + return this.details; + } + + public boolean hasDetails() { + return this.details != null && !this.details.isEmpty(); + } + + /** + * @param value {@link #details} (Full details of any issues found in the message.) + */ + public MessageHeaderResponseComponent setDetails(Reference value) { + this.details = value; + return this; + } + + /** + * @return {@link #details} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Full details of any issues found in the message.) + */ + public OperationOutcome getDetailsTarget() { + if (this.detailsTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeaderResponseComponent.details"); + else if (Configuration.doAutoCreate()) + this.detailsTarget = new OperationOutcome(); // aa + return this.detailsTarget; + } + + /** + * @param value {@link #details} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Full details of any issues found in the message.) + */ + public MessageHeaderResponseComponent setDetailsTarget(OperationOutcome value) { + this.detailsTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "id", "The id of the message that this message is a response to.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("code", "code", "Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("details", "Reference(OperationOutcome)", "Full details of any issues found in the message.", 0, java.lang.Integer.MAX_VALUE, details)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToId(value); // IdType + else if (name.equals("code")) + this.code = new ResponseTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("details")) + this.details = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.identifier"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.code"); + } + else if (name.equals("details")) { + this.details = new Reference(); + return this.details; + } + else + return super.addChild(name); + } + + public MessageHeaderResponseComponent copy() { + MessageHeaderResponseComponent dst = new MessageHeaderResponseComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.code = code == null ? null : code.copy(); + dst.details = details == null ? null : details.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MessageHeaderResponseComponent)) + return false; + MessageHeaderResponseComponent o = (MessageHeaderResponseComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MessageHeaderResponseComponent)) + return false; + MessageHeaderResponseComponent o = (MessageHeaderResponseComponent) other; + return compareValues(identifier, o.identifier, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) + && (details == null || details.isEmpty()); + } + + public String fhirType() { + return "MessageHeader.response"; + + } + + } + + @Block() + public static class MessageSourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Human-readable name for the source system. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of system", formalDefinition="Human-readable name for the source system." ) + protected StringType name; + + /** + * May include configuration or other information useful in debugging. + */ + @Child(name = "software", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of software running the system", formalDefinition="May include configuration or other information useful in debugging." ) + protected StringType software; + + /** + * Can convey versions of multiple systems in situations where a message passes through multiple hands. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Version of software running", formalDefinition="Can convey versions of multiple systems in situations where a message passes through multiple hands." ) + protected StringType version; + + /** + * An e-mail, phone, website or other contact point to use to resolve issues with message communications. + */ + @Child(name = "contact", type = {ContactPoint.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human contact for problems", formalDefinition="An e-mail, phone, website or other contact point to use to resolve issues with message communications." ) + protected ContactPoint contact; + + /** + * Identifies the routing target to send acknowledgements to. + */ + @Child(name = "endpoint", type = {UriType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Actual message source address or id", formalDefinition="Identifies the routing target to send acknowledgements to." ) + protected UriType endpoint; + + private static final long serialVersionUID = -115878196L; + + /* + * Constructor + */ + public MessageSourceComponent() { + super(); + } + + /* + * Constructor + */ + public MessageSourceComponent(UriType endpoint) { + super(); + this.endpoint = endpoint; + } + + /** + * @return {@link #name} (Human-readable name for the source system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageSourceComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Human-readable name for the source system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public MessageSourceComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Human-readable name for the source system. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Human-readable name for the source system. + */ + public MessageSourceComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #software} (May include configuration or other information useful in debugging.). This is the underlying object with id, value and extensions. The accessor "getSoftware" gives direct access to the value + */ + public StringType getSoftwareElement() { + if (this.software == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageSourceComponent.software"); + else if (Configuration.doAutoCreate()) + this.software = new StringType(); // bb + return this.software; + } + + public boolean hasSoftwareElement() { + return this.software != null && !this.software.isEmpty(); + } + + public boolean hasSoftware() { + return this.software != null && !this.software.isEmpty(); + } + + /** + * @param value {@link #software} (May include configuration or other information useful in debugging.). This is the underlying object with id, value and extensions. The accessor "getSoftware" gives direct access to the value + */ + public MessageSourceComponent setSoftwareElement(StringType value) { + this.software = value; + return this; + } + + /** + * @return May include configuration or other information useful in debugging. + */ + public String getSoftware() { + return this.software == null ? null : this.software.getValue(); + } + + /** + * @param value May include configuration or other information useful in debugging. + */ + public MessageSourceComponent setSoftware(String value) { + if (Utilities.noString(value)) + this.software = null; + else { + if (this.software == null) + this.software = new StringType(); + this.software.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (Can convey versions of multiple systems in situations where a message passes through multiple hands.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageSourceComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (Can convey versions of multiple systems in situations where a message passes through multiple hands.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public MessageSourceComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return Can convey versions of multiple systems in situations where a message passes through multiple hands. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value Can convey versions of multiple systems in situations where a message passes through multiple hands. + */ + public MessageSourceComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (An e-mail, phone, website or other contact point to use to resolve issues with message communications.) + */ + public ContactPoint getContact() { + if (this.contact == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageSourceComponent.contact"); + else if (Configuration.doAutoCreate()) + this.contact = new ContactPoint(); // cc + return this.contact; + } + + public boolean hasContact() { + return this.contact != null && !this.contact.isEmpty(); + } + + /** + * @param value {@link #contact} (An e-mail, phone, website or other contact point to use to resolve issues with message communications.) + */ + public MessageSourceComponent setContact(ContactPoint value) { + this.contact = value; + return this; + } + + /** + * @return {@link #endpoint} (Identifies the routing target to send acknowledgements to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public UriType getEndpointElement() { + if (this.endpoint == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageSourceComponent.endpoint"); + else if (Configuration.doAutoCreate()) + this.endpoint = new UriType(); // bb + return this.endpoint; + } + + public boolean hasEndpointElement() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + public boolean hasEndpoint() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + /** + * @param value {@link #endpoint} (Identifies the routing target to send acknowledgements to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public MessageSourceComponent setEndpointElement(UriType value) { + this.endpoint = value; + return this; + } + + /** + * @return Identifies the routing target to send acknowledgements to. + */ + public String getEndpoint() { + return this.endpoint == null ? null : this.endpoint.getValue(); + } + + /** + * @param value Identifies the routing target to send acknowledgements to. + */ + public MessageSourceComponent setEndpoint(String value) { + if (this.endpoint == null) + this.endpoint = new UriType(); + this.endpoint.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Human-readable name for the source system.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("software", "string", "May include configuration or other information useful in debugging.", 0, java.lang.Integer.MAX_VALUE, software)); + childrenList.add(new Property("version", "string", "Can convey versions of multiple systems in situations where a message passes through multiple hands.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("contact", "ContactPoint", "An e-mail, phone, website or other contact point to use to resolve issues with message communications.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("endpoint", "uri", "Identifies the routing target to send acknowledgements to.", 0, java.lang.Integer.MAX_VALUE, endpoint)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("software")) + this.software = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("contact")) + this.contact = castToContactPoint(value); // ContactPoint + else if (name.equals("endpoint")) + this.endpoint = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.name"); + } + else if (name.equals("software")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.software"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.version"); + } + else if (name.equals("contact")) { + this.contact = new ContactPoint(); + return this.contact; + } + else if (name.equals("endpoint")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.endpoint"); + } + else + return super.addChild(name); + } + + public MessageSourceComponent copy() { + MessageSourceComponent dst = new MessageSourceComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.software = software == null ? null : software.copy(); + dst.version = version == null ? null : version.copy(); + dst.contact = contact == null ? null : contact.copy(); + dst.endpoint = endpoint == null ? null : endpoint.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MessageSourceComponent)) + return false; + MessageSourceComponent o = (MessageSourceComponent) other; + return compareDeep(name, o.name, true) && compareDeep(software, o.software, true) && compareDeep(version, o.version, true) + && compareDeep(contact, o.contact, true) && compareDeep(endpoint, o.endpoint, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MessageSourceComponent)) + return false; + MessageSourceComponent o = (MessageSourceComponent) other; + return compareValues(name, o.name, true) && compareValues(software, o.software, true) && compareValues(version, o.version, true) + && compareValues(endpoint, o.endpoint, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (software == null || software.isEmpty()) + && (version == null || version.isEmpty()) && (contact == null || contact.isEmpty()) && (endpoint == null || endpoint.isEmpty()) + ; + } + + public String fhirType() { + return "MessageHeader.source"; + + } + + } + + @Block() + public static class MessageDestinationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Human-readable name for the target system. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of system", formalDefinition="Human-readable name for the target system." ) + protected StringType name; + + /** + * Identifies the target end system in situations where the initial message transmission is to an intermediary system. + */ + @Child(name = "target", type = {Device.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Particular delivery destination within the destination", formalDefinition="Identifies the target end system in situations where the initial message transmission is to an intermediary system." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) + */ + protected Device targetTarget; + + /** + * Indicates where the message should be routed to. + */ + @Child(name = "endpoint", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Actual destination address or id", formalDefinition="Indicates where the message should be routed to." ) + protected UriType endpoint; + + private static final long serialVersionUID = -2097633309L; + + /* + * Constructor + */ + public MessageDestinationComponent() { + super(); + } + + /* + * Constructor + */ + public MessageDestinationComponent(UriType endpoint) { + super(); + this.endpoint = endpoint; + } + + /** + * @return {@link #name} (Human-readable name for the target system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageDestinationComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Human-readable name for the target system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public MessageDestinationComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Human-readable name for the target system. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Human-readable name for the target system. + */ + public MessageDestinationComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageDestinationComponent.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) + */ + public MessageDestinationComponent setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) + */ + public Device getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageDestinationComponent.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Device(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) + */ + public MessageDestinationComponent setTargetTarget(Device value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #endpoint} (Indicates where the message should be routed to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public UriType getEndpointElement() { + if (this.endpoint == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageDestinationComponent.endpoint"); + else if (Configuration.doAutoCreate()) + this.endpoint = new UriType(); // bb + return this.endpoint; + } + + public boolean hasEndpointElement() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + public boolean hasEndpoint() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + /** + * @param value {@link #endpoint} (Indicates where the message should be routed to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public MessageDestinationComponent setEndpointElement(UriType value) { + this.endpoint = value; + return this; + } + + /** + * @return Indicates where the message should be routed to. + */ + public String getEndpoint() { + return this.endpoint == null ? null : this.endpoint.getValue(); + } + + /** + * @param value Indicates where the message should be routed to. + */ + public MessageDestinationComponent setEndpoint(String value) { + if (this.endpoint == null) + this.endpoint = new UriType(); + this.endpoint.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Human-readable name for the target system.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("target", "Reference(Device)", "Identifies the target end system in situations where the initial message transmission is to an intermediary system.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("endpoint", "uri", "Indicates where the message should be routed to.", 0, java.lang.Integer.MAX_VALUE, endpoint)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("endpoint")) + this.endpoint = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.name"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("endpoint")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.endpoint"); + } + else + return super.addChild(name); + } + + public MessageDestinationComponent copy() { + MessageDestinationComponent dst = new MessageDestinationComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.target = target == null ? null : target.copy(); + dst.endpoint = endpoint == null ? null : endpoint.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MessageDestinationComponent)) + return false; + MessageDestinationComponent o = (MessageDestinationComponent) other; + return compareDeep(name, o.name, true) && compareDeep(target, o.target, true) && compareDeep(endpoint, o.endpoint, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MessageDestinationComponent)) + return false; + MessageDestinationComponent o = (MessageDestinationComponent) other; + return compareValues(name, o.name, true) && compareValues(endpoint, o.endpoint, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (target == null || target.isEmpty()) + && (endpoint == null || endpoint.isEmpty()); + } + + public String fhirType() { + return "MessageHeader.destination"; + + } + + } + + /** + * The time that the message was sent. + */ + @Child(name = "timestamp", type = {InstantType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time that the message was sent", formalDefinition="The time that the message was sent." ) + protected InstantType timestamp; + + /** + * Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events". + */ + @Child(name = "event", type = {Coding.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="Code for the event this message represents", formalDefinition="Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\"." ) + protected Coding event; + + /** + * Information about the message that this message is a response to. Only present if this message is a response. + */ + @Child(name = "response", type = {}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="If this is a reply to prior message", formalDefinition="Information about the message that this message is a response to. Only present if this message is a response." ) + protected MessageHeaderResponseComponent response; + + /** + * The source application from which this message originated. + */ + @Child(name = "source", type = {}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Message Source Application", formalDefinition="The source application from which this message originated." ) + protected MessageSourceComponent source; + + /** + * The destination application which the message is intended for. + */ + @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Message Destination Application(s)", formalDefinition="The destination application which the message is intended for." ) + protected List destination; + + /** + * The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions. + */ + @Child(name = "enterer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The source of the data entry", formalDefinition="The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." ) + protected Reference enterer; + + /** + * The actual object that is the target of the reference (The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) + */ + protected Practitioner entererTarget; + + /** + * The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions. + */ + @Child(name = "author", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The source of the decision", formalDefinition="The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) + */ + protected Practitioner authorTarget; + + /** + * Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient. + */ + @Child(name = "receiver", type = {Practitioner.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Intended \"real-world\" recipient for the data", formalDefinition="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." ) + protected Reference receiver; + + /** + * The actual object that is the target of the reference (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) + */ + protected Resource receiverTarget; + + /** + * The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party. + */ + @Child(name = "responsible", type = {Practitioner.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Final responsibility for event", formalDefinition="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." ) + protected Reference responsible; + + /** + * The actual object that is the target of the reference (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) + */ + protected Resource responsibleTarget; + + /** + * Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Cause of event", formalDefinition="Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message." ) + protected CodeableConcept reason; + + /** + * The actual data of the message - a reference to the root/focus class of the event. + */ + @Child(name = "data", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The actual content of the message", formalDefinition="The actual data of the message - a reference to the root/focus class of the event." ) + protected List data; + /** + * The actual objects that are the target of the reference (The actual data of the message - a reference to the root/focus class of the event.) + */ + protected List dataTarget; + + + private static final long serialVersionUID = 1429728517L; + + /* + * Constructor + */ + public MessageHeader() { + super(); + } + + /* + * Constructor + */ + public MessageHeader(InstantType timestamp, Coding event, MessageSourceComponent source) { + super(); + this.timestamp = timestamp; + this.event = event; + this.source = source; + } + + /** + * @return {@link #timestamp} (The time that the message was sent.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value + */ + public InstantType getTimestampElement() { + if (this.timestamp == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.timestamp"); + else if (Configuration.doAutoCreate()) + this.timestamp = new InstantType(); // bb + return this.timestamp; + } + + public boolean hasTimestampElement() { + return this.timestamp != null && !this.timestamp.isEmpty(); + } + + public boolean hasTimestamp() { + return this.timestamp != null && !this.timestamp.isEmpty(); + } + + /** + * @param value {@link #timestamp} (The time that the message was sent.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value + */ + public MessageHeader setTimestampElement(InstantType value) { + this.timestamp = value; + return this; + } + + /** + * @return The time that the message was sent. + */ + public Date getTimestamp() { + return this.timestamp == null ? null : this.timestamp.getValue(); + } + + /** + * @param value The time that the message was sent. + */ + public MessageHeader setTimestamp(Date value) { + if (this.timestamp == null) + this.timestamp = new InstantType(); + this.timestamp.setValue(value); + return this; + } + + /** + * @return {@link #event} (Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events".) + */ + public Coding getEvent() { + if (this.event == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.event"); + else if (Configuration.doAutoCreate()) + this.event = new Coding(); // cc + return this.event; + } + + public boolean hasEvent() { + return this.event != null && !this.event.isEmpty(); + } + + /** + * @param value {@link #event} (Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events".) + */ + public MessageHeader setEvent(Coding value) { + this.event = value; + return this; + } + + /** + * @return {@link #response} (Information about the message that this message is a response to. Only present if this message is a response.) + */ + public MessageHeaderResponseComponent getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.response"); + else if (Configuration.doAutoCreate()) + this.response = new MessageHeaderResponseComponent(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Information about the message that this message is a response to. Only present if this message is a response.) + */ + public MessageHeader setResponse(MessageHeaderResponseComponent value) { + this.response = value; + return this; + } + + /** + * @return {@link #source} (The source application from which this message originated.) + */ + public MessageSourceComponent getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.source"); + else if (Configuration.doAutoCreate()) + this.source = new MessageSourceComponent(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The source application from which this message originated.) + */ + public MessageHeader setSource(MessageSourceComponent value) { + this.source = value; + return this; + } + + /** + * @return {@link #destination} (The destination application which the message is intended for.) + */ + public List getDestination() { + if (this.destination == null) + this.destination = new ArrayList(); + return this.destination; + } + + public boolean hasDestination() { + if (this.destination == null) + return false; + for (MessageDestinationComponent item : this.destination) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #destination} (The destination application which the message is intended for.) + */ + // syntactic sugar + public MessageDestinationComponent addDestination() { //3 + MessageDestinationComponent t = new MessageDestinationComponent(); + if (this.destination == null) + this.destination = new ArrayList(); + this.destination.add(t); + return t; + } + + // syntactic sugar + public MessageHeader addDestination(MessageDestinationComponent t) { //3 + if (t == null) + return this; + if (this.destination == null) + this.destination = new ArrayList(); + this.destination.add(t); + return this; + } + + /** + * @return {@link #enterer} (The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) + */ + public Reference getEnterer() { + if (this.enterer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.enterer"); + else if (Configuration.doAutoCreate()) + this.enterer = new Reference(); // cc + return this.enterer; + } + + public boolean hasEnterer() { + return this.enterer != null && !this.enterer.isEmpty(); + } + + /** + * @param value {@link #enterer} (The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) + */ + public MessageHeader setEnterer(Reference value) { + this.enterer = value; + return this; + } + + /** + * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) + */ + public Practitioner getEntererTarget() { + if (this.entererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.enterer"); + else if (Configuration.doAutoCreate()) + this.entererTarget = new Practitioner(); // aa + return this.entererTarget; + } + + /** + * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) + */ + public MessageHeader setEntererTarget(Practitioner value) { + this.entererTarget = value; + return this; + } + + /** + * @return {@link #author} (The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) + */ + public MessageHeader setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) + */ + public Practitioner getAuthorTarget() { + if (this.authorTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.author"); + else if (Configuration.doAutoCreate()) + this.authorTarget = new Practitioner(); // aa + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) + */ + public MessageHeader setAuthorTarget(Practitioner value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #receiver} (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) + */ + public Reference getReceiver() { + if (this.receiver == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.receiver"); + else if (Configuration.doAutoCreate()) + this.receiver = new Reference(); // cc + return this.receiver; + } + + public boolean hasReceiver() { + return this.receiver != null && !this.receiver.isEmpty(); + } + + /** + * @param value {@link #receiver} (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) + */ + public MessageHeader setReceiver(Reference value) { + this.receiver = value; + return this; + } + + /** + * @return {@link #receiver} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) + */ + public Resource getReceiverTarget() { + return this.receiverTarget; + } + + /** + * @param value {@link #receiver} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) + */ + public MessageHeader setReceiverTarget(Resource value) { + this.receiverTarget = value; + return this; + } + + /** + * @return {@link #responsible} (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) + */ + public Reference getResponsible() { + if (this.responsible == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.responsible"); + else if (Configuration.doAutoCreate()) + this.responsible = new Reference(); // cc + return this.responsible; + } + + public boolean hasResponsible() { + return this.responsible != null && !this.responsible.isEmpty(); + } + + /** + * @param value {@link #responsible} (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) + */ + public MessageHeader setResponsible(Reference value) { + this.responsible = value; + return this; + } + + /** + * @return {@link #responsible} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) + */ + public Resource getResponsibleTarget() { + return this.responsibleTarget; + } + + /** + * @param value {@link #responsible} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) + */ + public MessageHeader setResponsibleTarget(Resource value) { + this.responsibleTarget = value; + return this; + } + + /** + * @return {@link #reason} (Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.) + */ + public CodeableConcept getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new CodeableConcept(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.) + */ + public MessageHeader setReason(CodeableConcept value) { + this.reason = value; + return this; + } + + /** + * @return {@link #data} (The actual data of the message - a reference to the root/focus class of the event.) + */ + public List getData() { + if (this.data == null) + this.data = new ArrayList(); + return this.data; + } + + public boolean hasData() { + if (this.data == null) + return false; + for (Reference item : this.data) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #data} (The actual data of the message - a reference to the root/focus class of the event.) + */ + // syntactic sugar + public Reference addData() { //3 + Reference t = new Reference(); + if (this.data == null) + this.data = new ArrayList(); + this.data.add(t); + return t; + } + + // syntactic sugar + public MessageHeader addData(Reference t) { //3 + if (t == null) + return this; + if (this.data == null) + this.data = new ArrayList(); + this.data.add(t); + return this; + } + + /** + * @return {@link #data} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The actual data of the message - a reference to the root/focus class of the event.) + */ + public List getDataTarget() { + if (this.dataTarget == null) + this.dataTarget = new ArrayList(); + return this.dataTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("timestamp", "instant", "The time that the message was sent.", 0, java.lang.Integer.MAX_VALUE, timestamp)); + childrenList.add(new Property("event", "Coding", "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\".", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("response", "", "Information about the message that this message is a response to. Only present if this message is a response.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("source", "", "The source application from which this message originated.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("destination", "", "The destination application which the message is intended for.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("enterer", "Reference(Practitioner)", "The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.", 0, java.lang.Integer.MAX_VALUE, enterer)); + childrenList.add(new Property("author", "Reference(Practitioner)", "The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("receiver", "Reference(Practitioner|Organization)", "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", 0, java.lang.Integer.MAX_VALUE, receiver)); + childrenList.add(new Property("responsible", "Reference(Practitioner|Organization)", "The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.", 0, java.lang.Integer.MAX_VALUE, responsible)); + childrenList.add(new Property("reason", "CodeableConcept", "Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("data", "Reference(Any)", "The actual data of the message - a reference to the root/focus class of the event.", 0, java.lang.Integer.MAX_VALUE, data)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("timestamp")) + this.timestamp = castToInstant(value); // InstantType + else if (name.equals("event")) + this.event = castToCoding(value); // Coding + else if (name.equals("response")) + this.response = (MessageHeaderResponseComponent) value; // MessageHeaderResponseComponent + else if (name.equals("source")) + this.source = (MessageSourceComponent) value; // MessageSourceComponent + else if (name.equals("destination")) + this.getDestination().add((MessageDestinationComponent) value); + else if (name.equals("enterer")) + this.enterer = castToReference(value); // Reference + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("receiver")) + this.receiver = castToReference(value); // Reference + else if (name.equals("responsible")) + this.responsible = castToReference(value); // Reference + else if (name.equals("reason")) + this.reason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("data")) + this.getData().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("timestamp")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.timestamp"); + } + else if (name.equals("event")) { + this.event = new Coding(); + return this.event; + } + else if (name.equals("response")) { + this.response = new MessageHeaderResponseComponent(); + return this.response; + } + else if (name.equals("source")) { + this.source = new MessageSourceComponent(); + return this.source; + } + else if (name.equals("destination")) { + return addDestination(); + } + else if (name.equals("enterer")) { + this.enterer = new Reference(); + return this.enterer; + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("receiver")) { + this.receiver = new Reference(); + return this.receiver; + } + else if (name.equals("responsible")) { + this.responsible = new Reference(); + return this.responsible; + } + else if (name.equals("reason")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("data")) { + return addData(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MessageHeader"; + + } + + public MessageHeader copy() { + MessageHeader dst = new MessageHeader(); + copyValues(dst); + dst.timestamp = timestamp == null ? null : timestamp.copy(); + dst.event = event == null ? null : event.copy(); + dst.response = response == null ? null : response.copy(); + dst.source = source == null ? null : source.copy(); + if (destination != null) { + dst.destination = new ArrayList(); + for (MessageDestinationComponent i : destination) + dst.destination.add(i.copy()); + }; + dst.enterer = enterer == null ? null : enterer.copy(); + dst.author = author == null ? null : author.copy(); + dst.receiver = receiver == null ? null : receiver.copy(); + dst.responsible = responsible == null ? null : responsible.copy(); + dst.reason = reason == null ? null : reason.copy(); + if (data != null) { + dst.data = new ArrayList(); + for (Reference i : data) + dst.data.add(i.copy()); + }; + return dst; + } + + protected MessageHeader typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MessageHeader)) + return false; + MessageHeader o = (MessageHeader) other; + return compareDeep(timestamp, o.timestamp, true) && compareDeep(event, o.event, true) && compareDeep(response, o.response, true) + && compareDeep(source, o.source, true) && compareDeep(destination, o.destination, true) && compareDeep(enterer, o.enterer, true) + && compareDeep(author, o.author, true) && compareDeep(receiver, o.receiver, true) && compareDeep(responsible, o.responsible, true) + && compareDeep(reason, o.reason, true) && compareDeep(data, o.data, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MessageHeader)) + return false; + MessageHeader o = (MessageHeader) other; + return compareValues(timestamp, o.timestamp, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (timestamp == null || timestamp.isEmpty()) && (event == null || event.isEmpty()) + && (response == null || response.isEmpty()) && (source == null || source.isEmpty()) && (destination == null || destination.isEmpty()) + && (enterer == null || enterer.isEmpty()) && (author == null || author.isEmpty()) && (receiver == null || receiver.isEmpty()) + && (responsible == null || responsible.isEmpty()) && (reason == null || reason.isEmpty()) + && (data == null || data.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MessageHeader; + } + + @SearchParamDefinition(name="code", path="MessageHeader.response.code", description="ok | transient-error | fatal-error", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="data", path="MessageHeader.data", description="The actual content of the message", type="reference" ) + public static final String SP_DATA = "data"; + @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended \"real-world\" recipient for the data", type="reference" ) + public static final String SP_RECEIVER = "receiver"; + @SearchParamDefinition(name="author", path="MessageHeader.author", description="The source of the decision", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="destination", path="MessageHeader.destination.name", description="Name of system", type="string" ) + public static final String SP_DESTINATION = "destination"; + @SearchParamDefinition(name="source", path="MessageHeader.source.name", description="Name of system", type="string" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="target", path="MessageHeader.destination.target", description="Particular delivery destination within the destination", type="reference" ) + public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="destination-uri", path="MessageHeader.destination.endpoint", description="Actual destination address or id", type="uri" ) + public static final String SP_DESTINATIONURI = "destination-uri"; + @SearchParamDefinition(name="source-uri", path="MessageHeader.source.endpoint", description="Actual message source address or id", type="uri" ) + public static final String SP_SOURCEURI = "source-uri"; + @SearchParamDefinition(name="responsible", path="MessageHeader.responsible", description="Final responsibility for event", type="reference" ) + public static final String SP_RESPONSIBLE = "responsible"; + @SearchParamDefinition(name="response-id", path="MessageHeader.response.identifier", description="Id of original message", type="token" ) + public static final String SP_RESPONSEID = "response-id"; + @SearchParamDefinition(name="enterer", path="MessageHeader.enterer", description="The source of the data entry", type="reference" ) + public static final String SP_ENTERER = "enterer"; + @SearchParamDefinition(name="event", path="MessageHeader.event", description="Code for the event this message represents", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="timestamp", path="MessageHeader.timestamp", description="Time that the message was sent", type="date" ) + public static final String SP_TIMESTAMP = "timestamp"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Meta.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Meta.java new file mode 100644 index 00000000000..02505af18ef --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Meta.java @@ -0,0 +1,435 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ +@DatatypeDef(name="Meta") +public class Meta extends Type implements IBaseMetaType { + + /** + * The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted. + */ + @Child(name = "versionId", type = {IdType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Version specific identifier", formalDefinition="The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted." ) + protected IdType versionId; + + /** + * When the resource last changed - e.g. when the version changed. + */ + @Child(name = "lastUpdated", type = {InstantType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the resource version last changed", formalDefinition="When the resource last changed - e.g. when the version changed." ) + protected InstantType lastUpdated; + + /** + * A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]]. + */ + @Child(name = "profile", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Profiles this resource claims to conform to", formalDefinition="A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]]." ) + protected List profile; + + /** + * Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. + */ + @Child(name = "security", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Security Labels applied to this resource", formalDefinition="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." ) + protected List security; + + /** + * Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource. + */ + @Child(name = "tag", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Tags applied to this resource", formalDefinition="Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource." ) + protected List tag; + + private static final long serialVersionUID = 867134915L; + + /* + * Constructor + */ + public Meta() { + super(); + } + + /** + * @return {@link #versionId} (The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public IdType getVersionIdElement() { + if (this.versionId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Meta.versionId"); + else if (Configuration.doAutoCreate()) + this.versionId = new IdType(); // bb + return this.versionId; + } + + public boolean hasVersionIdElement() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + public boolean hasVersionId() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + /** + * @param value {@link #versionId} (The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public Meta setVersionIdElement(IdType value) { + this.versionId = value; + return this; + } + + /** + * @return The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted. + */ + public String getVersionId() { + return this.versionId == null ? null : this.versionId.getValue(); + } + + /** + * @param value The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted. + */ + public Meta setVersionId(String value) { + if (Utilities.noString(value)) + this.versionId = null; + else { + if (this.versionId == null) + this.versionId = new IdType(); + this.versionId.setValue(value); + } + return this; + } + + /** + * @return {@link #lastUpdated} (When the resource last changed - e.g. when the version changed.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value + */ + public InstantType getLastUpdatedElement() { + if (this.lastUpdated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Meta.lastUpdated"); + else if (Configuration.doAutoCreate()) + this.lastUpdated = new InstantType(); // bb + return this.lastUpdated; + } + + public boolean hasLastUpdatedElement() { + return this.lastUpdated != null && !this.lastUpdated.isEmpty(); + } + + public boolean hasLastUpdated() { + return this.lastUpdated != null && !this.lastUpdated.isEmpty(); + } + + /** + * @param value {@link #lastUpdated} (When the resource last changed - e.g. when the version changed.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value + */ + public Meta setLastUpdatedElement(InstantType value) { + this.lastUpdated = value; + return this; + } + + /** + * @return When the resource last changed - e.g. when the version changed. + */ + public Date getLastUpdated() { + return this.lastUpdated == null ? null : this.lastUpdated.getValue(); + } + + /** + * @param value When the resource last changed - e.g. when the version changed. + */ + public Meta setLastUpdated(Date value) { + if (value == null) + this.lastUpdated = null; + else { + if (this.lastUpdated == null) + this.lastUpdated = new InstantType(); + this.lastUpdated.setValue(value); + } + return this; + } + + /** + * @return {@link #profile} (A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].) + */ + public List getProfile() { + if (this.profile == null) + this.profile = new ArrayList(); + return this.profile; + } + + public boolean hasProfile() { + if (this.profile == null) + return false; + for (UriType item : this.profile) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #profile} (A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].) + */ + // syntactic sugar + public UriType addProfileElement() {//2 + UriType t = new UriType(); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return t; + } + + /** + * @param value {@link #profile} (A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].) + */ + public Meta addProfile(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return this; + } + + /** + * @param value {@link #profile} (A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].) + */ + public boolean hasProfile(String value) { + if (this.profile == null) + return false; + for (UriType v : this.profile) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #security} (Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.) + */ + public List getSecurity() { + if (this.security == null) + this.security = new ArrayList(); + return this.security; + } + + public boolean hasSecurity() { + if (this.security == null) + return false; + for (Coding item : this.security) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #security} (Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.) + */ + // syntactic sugar + public Coding addSecurity() { //3 + Coding t = new Coding(); + if (this.security == null) + this.security = new ArrayList(); + this.security.add(t); + return t; + } + + // syntactic sugar + public Meta addSecurity(Coding t) { //3 + if (t == null) + return this; + if (this.security == null) + this.security = new ArrayList(); + this.security.add(t); + return this; + } + + /** + * @return {@link #tag} (Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.) + */ + public List getTag() { + if (this.tag == null) + this.tag = new ArrayList(); + return this.tag; + } + + public boolean hasTag() { + if (this.tag == null) + return false; + for (Coding item : this.tag) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #tag} (Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.) + */ + // syntactic sugar + public Coding addTag() { //3 + Coding t = new Coding(); + if (this.tag == null) + this.tag = new ArrayList(); + this.tag.add(t); + return t; + } + + // syntactic sugar + public Meta addTag(Coding t) { //3 + if (t == null) + return this; + if (this.tag == null) + this.tag = new ArrayList(); + this.tag.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("versionId", "id", "The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.", 0, java.lang.Integer.MAX_VALUE, versionId)); + childrenList.add(new Property("lastUpdated", "instant", "When the resource last changed - e.g. when the version changed.", 0, java.lang.Integer.MAX_VALUE, lastUpdated)); + childrenList.add(new Property("profile", "uri", "A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("security", "Coding", "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.", 0, java.lang.Integer.MAX_VALUE, security)); + childrenList.add(new Property("tag", "Coding", "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.", 0, java.lang.Integer.MAX_VALUE, tag)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("versionId")) + this.versionId = castToId(value); // IdType + else if (name.equals("lastUpdated")) + this.lastUpdated = castToInstant(value); // InstantType + else if (name.equals("profile")) + this.getProfile().add(castToUri(value)); + else if (name.equals("security")) + this.getSecurity().add(castToCoding(value)); + else if (name.equals("tag")) + this.getTag().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("versionId")) { + throw new FHIRException("Cannot call addChild on a primitive type Meta.versionId"); + } + else if (name.equals("lastUpdated")) { + throw new FHIRException("Cannot call addChild on a primitive type Meta.lastUpdated"); + } + else if (name.equals("profile")) { + throw new FHIRException("Cannot call addChild on a primitive type Meta.profile"); + } + else if (name.equals("security")) { + return addSecurity(); + } + else if (name.equals("tag")) { + return addTag(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Meta"; + + } + + public Meta copy() { + Meta dst = new Meta(); + copyValues(dst); + dst.versionId = versionId == null ? null : versionId.copy(); + dst.lastUpdated = lastUpdated == null ? null : lastUpdated.copy(); + if (profile != null) { + dst.profile = new ArrayList(); + for (UriType i : profile) + dst.profile.add(i.copy()); + }; + if (security != null) { + dst.security = new ArrayList(); + for (Coding i : security) + dst.security.add(i.copy()); + }; + if (tag != null) { + dst.tag = new ArrayList(); + for (Coding i : tag) + dst.tag.add(i.copy()); + }; + return dst; + } + + protected Meta typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Meta)) + return false; + Meta o = (Meta) other; + return compareDeep(versionId, o.versionId, true) && compareDeep(lastUpdated, o.lastUpdated, true) + && compareDeep(profile, o.profile, true) && compareDeep(security, o.security, true) && compareDeep(tag, o.tag, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Meta)) + return false; + Meta o = (Meta) other; + return compareValues(versionId, o.versionId, true) && compareValues(lastUpdated, o.lastUpdated, true) + && compareValues(profile, o.profile, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (versionId == null || versionId.isEmpty()) && (lastUpdated == null || lastUpdated.isEmpty()) + && (profile == null || profile.isEmpty()) && (security == null || security.isEmpty()) && (tag == null || tag.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleDefinition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleDefinition.java new file mode 100644 index 00000000000..429b1e4c59d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleDefinition.java @@ -0,0 +1,2981 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The ModuleDefinition resource defines the data requirements for a quality artifact. + */ +@ResourceDef(name="ModuleDefinition", profile="http://hl7.org/fhir/Profile/ModuleDefinition") +public class ModuleDefinition extends DomainResource { + + @Block() + public static class ModuleDefinitionModelComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the model. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The name of the model." ) + protected StringType name; + + /** + * The identifier of the model. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The identifier of the model." ) + protected StringType identifier; + + /** + * The version of the model. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The version of the model." ) + protected StringType version; + + private static final long serialVersionUID = -862601139L; + + /* + * Constructor + */ + public ModuleDefinitionModelComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionModelComponent(StringType identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #name} (The name of the model.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionModelComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the model.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleDefinitionModelComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the model. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the model. + */ + public ModuleDefinitionModelComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier of the model.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionModelComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier of the model.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public ModuleDefinitionModelComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier of the model. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier of the model. + */ + public ModuleDefinitionModelComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of the model.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionModelComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the model.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleDefinitionModelComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the model. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the model. + */ + public ModuleDefinitionModelComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the model.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier of the model.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the model.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.version"); + } + else + return super.addChild(name); + } + + public ModuleDefinitionModelComponent copy() { + ModuleDefinitionModelComponent dst = new ModuleDefinitionModelComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionModelComponent)) + return false; + ModuleDefinitionModelComponent o = (ModuleDefinitionModelComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionModelComponent)) + return false; + ModuleDefinitionModelComponent o = (ModuleDefinitionModelComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.model"; + + } + + } + + @Block() + public static class ModuleDefinitionLibraryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The local name for the library reference. If no local name is provided, the name of the referenced library is assumed. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The local name for the library", formalDefinition="The local name for the library reference. If no local name is provided, the name of the referenced library is assumed." ) + protected StringType name; + + /** + * The identifier of the library. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The identifier of the library." ) + protected StringType identifier; + + /** + * The version of the library. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The version of the library." ) + protected StringType version; + + /** + * A reference to the library. + */ + @Child(name = "document", type = {Attachment.class, ModuleDefinition.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A reference to the library." ) + protected Type document; + + private static final long serialVersionUID = 1633488790L; + + /* + * Constructor + */ + public ModuleDefinitionLibraryComponent() { + super(); + } + + /** + * @return {@link #name} (The local name for the library reference. If no local name is provided, the name of the referenced library is assumed.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionLibraryComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The local name for the library reference. If no local name is provided, the name of the referenced library is assumed.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleDefinitionLibraryComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The local name for the library reference. If no local name is provided, the name of the referenced library is assumed. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The local name for the library reference. If no local name is provided, the name of the referenced library is assumed. + */ + public ModuleDefinitionLibraryComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier of the library.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionLibraryComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier of the library.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public ModuleDefinitionLibraryComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier of the library. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier of the library. + */ + public ModuleDefinitionLibraryComponent setIdentifier(String value) { + if (Utilities.noString(value)) + this.identifier = null; + else { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The version of the library.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionLibraryComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the library.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleDefinitionLibraryComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the library. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the library. + */ + public ModuleDefinitionLibraryComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #document} (A reference to the library.) + */ + public Type getDocument() { + return this.document; + } + + /** + * @return {@link #document} (A reference to the library.) + */ + public Attachment getDocumentAttachment() throws FHIRException { + if (!(this.document instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.document.getClass().getName()+" was encountered"); + return (Attachment) this.document; + } + + public boolean hasDocumentAttachment() { + return this.document instanceof Attachment; + } + + /** + * @return {@link #document} (A reference to the library.) + */ + public Reference getDocumentReference() throws FHIRException { + if (!(this.document instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.document.getClass().getName()+" was encountered"); + return (Reference) this.document; + } + + public boolean hasDocumentReference() { + return this.document instanceof Reference; + } + + public boolean hasDocument() { + return this.document != null && !this.document.isEmpty(); + } + + /** + * @param value {@link #document} (A reference to the library.) + */ + public ModuleDefinitionLibraryComponent setDocument(Type value) { + this.document = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The local name for the library reference. If no local name is provided, the name of the referenced library is assumed.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier of the library.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the library.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("document[x]", "Attachment|Reference(ModuleDefinition)", "A reference to the library.", 0, java.lang.Integer.MAX_VALUE, document)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("document[x]")) + this.document = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.version"); + } + else if (name.equals("documentAttachment")) { + this.document = new Attachment(); + return this.document; + } + else if (name.equals("documentReference")) { + this.document = new Reference(); + return this.document; + } + else + return super.addChild(name); + } + + public ModuleDefinitionLibraryComponent copy() { + ModuleDefinitionLibraryComponent dst = new ModuleDefinitionLibraryComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + dst.document = document == null ? null : document.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionLibraryComponent)) + return false; + ModuleDefinitionLibraryComponent o = (ModuleDefinitionLibraryComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(document, o.document, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionLibraryComponent)) + return false; + ModuleDefinitionLibraryComponent o = (ModuleDefinitionLibraryComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (document == null || document.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.library"; + + } + + } + + @Block() + public static class ModuleDefinitionCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The local name for the code system. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The local name for the code system." ) + protected StringType name; + + /** + * The code system uri. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The code system uri." ) + protected StringType identifier; + + /** + * The code system version, if any. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The code system version, if any." ) + protected StringType version; + + private static final long serialVersionUID = -862601139L; + + /* + * Constructor + */ + public ModuleDefinitionCodeSystemComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionCodeSystemComponent(StringType name, StringType identifier) { + super(); + this.name = name; + this.identifier = identifier; + } + + /** + * @return {@link #name} (The local name for the code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionCodeSystemComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The local name for the code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleDefinitionCodeSystemComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The local name for the code system. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The local name for the code system. + */ + public ModuleDefinitionCodeSystemComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (The code system uri.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionCodeSystemComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The code system uri.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public ModuleDefinitionCodeSystemComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The code system uri. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The code system uri. + */ + public ModuleDefinitionCodeSystemComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The code system version, if any.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionCodeSystemComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The code system version, if any.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleDefinitionCodeSystemComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The code system version, if any. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The code system version, if any. + */ + public ModuleDefinitionCodeSystemComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The local name for the code system.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The code system uri.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The code system version, if any.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.version"); + } + else + return super.addChild(name); + } + + public ModuleDefinitionCodeSystemComponent copy() { + ModuleDefinitionCodeSystemComponent dst = new ModuleDefinitionCodeSystemComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionCodeSystemComponent)) + return false; + ModuleDefinitionCodeSystemComponent o = (ModuleDefinitionCodeSystemComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionCodeSystemComponent)) + return false; + ModuleDefinitionCodeSystemComponent o = (ModuleDefinitionCodeSystemComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.codeSystem"; + + } + + } + + @Block() + public static class ModuleDefinitionValueSetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The local name for the value set. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The local name for the value set." ) + protected StringType name; + + /** + * The value set uri. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The value set uri." ) + protected StringType identifier; + + /** + * The version of the value set, if any. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The version of the value set, if any." ) + protected StringType version; + + /** + * The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library. + */ + @Child(name = "codeSystem", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library." ) + protected List codeSystem; + + private static final long serialVersionUID = 338950096L; + + /* + * Constructor + */ + public ModuleDefinitionValueSetComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionValueSetComponent(StringType name, StringType identifier) { + super(); + this.name = name; + this.identifier = identifier; + } + + /** + * @return {@link #name} (The local name for the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionValueSetComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The local name for the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleDefinitionValueSetComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The local name for the value set. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The local name for the value set. + */ + public ModuleDefinitionValueSetComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (The value set uri.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionValueSetComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The value set uri.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public ModuleDefinitionValueSetComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The value set uri. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The value set uri. + */ + public ModuleDefinitionValueSetComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of the value set, if any.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionValueSetComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the value set, if any.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleDefinitionValueSetComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the value set, if any. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the value set, if any. + */ + public ModuleDefinitionValueSetComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #codeSystem} (The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library.) + */ + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (StringType item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeSystem} (The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library.) + */ + // syntactic sugar + public StringType addCodeSystemElement() {//2 + StringType t = new StringType(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + /** + * @param value {@link #codeSystem} (The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library.) + */ + public ModuleDefinitionValueSetComponent addCodeSystem(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + /** + * @param value {@link #codeSystem} (The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library.) + */ + public boolean hasCodeSystem(String value) { + if (this.codeSystem == null) + return false; + for (StringType v : this.codeSystem) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The local name for the value set.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The value set uri.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the value set, if any.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("codeSystem", "string", "The code systems in use within the value set. These must refer to previously defined code systems within this knowledge module or a referenced library.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("codeSystem")) + this.getCodeSystem().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.version"); + } + else if (name.equals("codeSystem")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.codeSystem"); + } + else + return super.addChild(name); + } + + public ModuleDefinitionValueSetComponent copy() { + ModuleDefinitionValueSetComponent dst = new ModuleDefinitionValueSetComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (StringType i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionValueSetComponent)) + return false; + ModuleDefinitionValueSetComponent o = (ModuleDefinitionValueSetComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(codeSystem, o.codeSystem, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionValueSetComponent)) + return false; + ModuleDefinitionValueSetComponent o = (ModuleDefinitionValueSetComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + && compareValues(codeSystem, o.codeSystem, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) + ; + } + + public String fhirType() { + return "ModuleDefinition.valueSet"; + + } + + } + + @Block() + public static class ModuleDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the parameter. + */ + @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The name of the parameter." ) + protected CodeType name; + + /** + * Whether the parameter is input or output for the module. + */ + @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Whether the parameter is input or output for the module." ) + protected CodeType use; + + /** + * A brief description of the parameter. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A brief description of the parameter." ) + protected StringType documentation; + + /** + * The type of the parameter. + */ + @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The type of the parameter." ) + protected CodeType type; + + /** + * The profile of the parameter, if any. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The profile of the parameter, if any." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (The profile of the parameter, if any.) + */ + protected StructureDefinition profileTarget; + + private static final long serialVersionUID = 1572548838L; + + /* + * Constructor + */ + public ModuleDefinitionParameterComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionParameterComponent(CodeType name, CodeType use, CodeType type) { + super(); + this.name = name; + this.use = use; + this.type = type; + } + + /** + * @return {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CodeType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new CodeType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleDefinitionParameterComponent setNameElement(CodeType value) { + this.name = value; + return this; + } + + /** + * @return The name of the parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the parameter. + */ + public ModuleDefinitionParameterComponent setName(String value) { + if (this.name == null) + this.name = new CodeType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public CodeType getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new CodeType(); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public ModuleDefinitionParameterComponent setUseElement(CodeType value) { + this.use = value; + return this; + } + + /** + * @return Whether the parameter is input or output for the module. + */ + public String getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Whether the parameter is input or output for the module. + */ + public ModuleDefinitionParameterComponent setUse(String value) { + if (this.use == null) + this.use = new CodeType(); + this.use.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (A brief description of the parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (A brief description of the parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ModuleDefinitionParameterComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return A brief description of the parameter. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value A brief description of the parameter. + */ + public ModuleDefinitionParameterComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ModuleDefinitionParameterComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the parameter. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the parameter. + */ + public ModuleDefinitionParameterComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The profile of the parameter, if any.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The profile of the parameter, if any.) + */ + public ModuleDefinitionParameterComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The profile of the parameter, if any.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The profile of the parameter, if any.) + */ + public ModuleDefinitionParameterComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "code", "The name of the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("use", "code", "Whether the parameter is input or output for the module.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("documentation", "string", "A brief description of the parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("type", "code", "The type of the parameter.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "The profile of the parameter, if any.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCode(value); // CodeType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.name"); + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.use"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.documentation"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else + return super.addChild(name); + } + + public ModuleDefinitionParameterComponent copy() { + ModuleDefinitionParameterComponent dst = new ModuleDefinitionParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.use = use == null ? null : use.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionParameterComponent)) + return false; + ModuleDefinitionParameterComponent o = (ModuleDefinitionParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionParameterComponent)) + return false; + ModuleDefinitionParameterComponent o = (ModuleDefinitionParameterComponent) other; + return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(documentation, o.documentation, true) + && compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) + && (documentation == null || documentation.isEmpty()) && (type == null || type.isEmpty()) + && (profile == null || profile.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.parameter"; + + } + + } + + @Block() + public static class ModuleDefinitionDataComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of the required data", formalDefinition="The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile." ) + protected CodeType type; + + /** + * The profile of the required data, specified as the uri of the profile definition. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The profile of the required data", formalDefinition="The profile of the required data, specified as the uri of the profile definition." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (The profile of the required data, specified as the uri of the profile definition.) + */ + protected StructureDefinition profileTarget; + + /** + * Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. + */ + @Child(name = "mustSupport", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Indicates that specific structure elements are referenced by the knowledge module", formalDefinition="Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available." ) + protected List mustSupport; + + /** + * Code filters for the required data, if any. + */ + @Child(name = "codeFilter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Code filters for the required data, if any." ) + protected List codeFilter; + + /** + * Date filters for the required data, if any. + */ + @Child(name = "dateFilter", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Date filters for the required data, if any." ) + protected List dateFilter; + + private static final long serialVersionUID = -777236908L; + + /* + * Constructor + */ + public ModuleDefinitionDataComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionDataComponent(CodeType type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionDataComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ModuleDefinitionDataComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + public ModuleDefinitionDataComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The profile of the required data, specified as the uri of the profile definition.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionDataComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The profile of the required data, specified as the uri of the profile definition.) + */ + public ModuleDefinitionDataComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The profile of the required data, specified as the uri of the profile definition.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionDataComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The profile of the required data, specified as the uri of the profile definition.) + */ + public ModuleDefinitionDataComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public List getMustSupport() { + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + return this.mustSupport; + } + + public boolean hasMustSupport() { + if (this.mustSupport == null) + return false; + for (StringType item : this.mustSupport) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + // syntactic sugar + public StringType addMustSupportElement() {//2 + StringType t = new StringType(); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return t; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public ModuleDefinitionDataComponent addMustSupport(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return this; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public boolean hasMustSupport(String value) { + if (this.mustSupport == null) + return false; + for (StringType v : this.mustSupport) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters for the required data, if any.) + */ + public List getCodeFilter() { + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + return this.codeFilter; + } + + public boolean hasCodeFilter() { + if (this.codeFilter == null) + return false; + for (ModuleDefinitionDataCodeFilterComponent item : this.codeFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters for the required data, if any.) + */ + // syntactic sugar + public ModuleDefinitionDataCodeFilterComponent addCodeFilter() { //3 + ModuleDefinitionDataCodeFilterComponent t = new ModuleDefinitionDataCodeFilterComponent(); + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinitionDataComponent addCodeFilter(ModuleDefinitionDataCodeFilterComponent t) { //3 + if (t == null) + return this; + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return this; + } + + /** + * @return {@link #dateFilter} (Date filters for the required data, if any.) + */ + public List getDateFilter() { + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + return this.dateFilter; + } + + public boolean hasDateFilter() { + if (this.dateFilter == null) + return false; + for (ModuleDefinitionDataDateFilterComponent item : this.dateFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dateFilter} (Date filters for the required data, if any.) + */ + // syntactic sugar + public ModuleDefinitionDataDateFilterComponent addDateFilter() { //3 + ModuleDefinitionDataDateFilterComponent t = new ModuleDefinitionDataDateFilterComponent(); + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinitionDataComponent addDateFilter(ModuleDefinitionDataDateFilterComponent t) { //3 + if (t == null) + return this; + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "The profile of the required data, specified as the uri of the profile definition.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); + childrenList.add(new Property("codeFilter", "", "Code filters for the required data, if any.", 0, java.lang.Integer.MAX_VALUE, codeFilter)); + childrenList.add(new Property("dateFilter", "", "Date filters for the required data, if any.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else if (name.equals("mustSupport")) + this.getMustSupport().add(castToString(value)); + else if (name.equals("codeFilter")) + this.getCodeFilter().add((ModuleDefinitionDataCodeFilterComponent) value); + else if (name.equals("dateFilter")) + this.getDateFilter().add((ModuleDefinitionDataDateFilterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else if (name.equals("mustSupport")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.mustSupport"); + } + else if (name.equals("codeFilter")) { + return addCodeFilter(); + } + else if (name.equals("dateFilter")) { + return addDateFilter(); + } + else + return super.addChild(name); + } + + public ModuleDefinitionDataComponent copy() { + ModuleDefinitionDataComponent dst = new ModuleDefinitionDataComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + if (mustSupport != null) { + dst.mustSupport = new ArrayList(); + for (StringType i : mustSupport) + dst.mustSupport.add(i.copy()); + }; + if (codeFilter != null) { + dst.codeFilter = new ArrayList(); + for (ModuleDefinitionDataCodeFilterComponent i : codeFilter) + dst.codeFilter.add(i.copy()); + }; + if (dateFilter != null) { + dst.dateFilter = new ArrayList(); + for (ModuleDefinitionDataDateFilterComponent i : dateFilter) + dst.dateFilter.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionDataComponent)) + return false; + ModuleDefinitionDataComponent o = (ModuleDefinitionDataComponent) other; + return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(mustSupport, o.mustSupport, true) + && compareDeep(codeFilter, o.codeFilter, true) && compareDeep(dateFilter, o.dateFilter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionDataComponent)) + return false; + ModuleDefinitionDataComponent o = (ModuleDefinitionDataComponent) other; + return compareValues(type, o.type, true) && compareValues(mustSupport, o.mustSupport, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) + && (mustSupport == null || mustSupport.isEmpty()) && (codeFilter == null || codeFilter.isEmpty()) + && (dateFilter == null || dateFilter.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.data"; + + } + + } + + @Block() + public static class ModuleDefinitionDataCodeFilterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The code-valued attribute of the filter", formalDefinition="The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept." ) + protected StringType path; + + /** + * The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + */ + @Child(name = "valueSet", type = {StringType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The valueset for the code filter", formalDefinition="The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) + protected Type valueSet; + + /** + * The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts. + */ + @Child(name = "codeableConcept", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The codeableConcepts for the filter", formalDefinition="The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts." ) + protected List codeableConcept; + + private static final long serialVersionUID = -666343535L; + + /* + * Constructor + */ + public ModuleDefinitionDataCodeFilterComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionDataCodeFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionDataCodeFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public ModuleDefinitionDataCodeFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public ModuleDefinitionDataCodeFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Type getValueSet() { + return this.valueSet; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public StringType getValueSetStringType() throws FHIRException { + if (!(this.valueSet instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (StringType) this.valueSet; + } + + public boolean hasValueSetStringType() { + return this.valueSet instanceof StringType; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Reference getValueSetReference() throws FHIRException { + if (!(this.valueSet instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (Reference) this.valueSet; + } + + public boolean hasValueSetReference() { + return this.valueSet instanceof Reference; + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public ModuleDefinitionDataCodeFilterComponent setValueSet(Type value) { + this.valueSet = value; + return this; + } + + /** + * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) + */ + public List getCodeableConcept() { + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + return this.codeableConcept; + } + + public boolean hasCodeableConcept() { + if (this.codeableConcept == null) + return false; + for (CodeableConcept item : this.codeableConcept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) + */ + // syntactic sugar + public CodeableConcept addCodeableConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + this.codeableConcept.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinitionDataCodeFilterComponent addCodeableConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.codeableConcept == null) + this.codeableConcept = new ArrayList(); + this.codeableConcept.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + childrenList.add(new Property("codeableConcept", "CodeableConcept", "The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.", 0, java.lang.Integer.MAX_VALUE, codeableConcept)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("valueSet[x]")) + this.valueSet = (Type) value; // Type + else if (name.equals("codeableConcept")) + this.getCodeableConcept().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.path"); + } + else if (name.equals("valueSetString")) { + this.valueSet = new StringType(); + return this.valueSet; + } + else if (name.equals("valueSetReference")) { + this.valueSet = new Reference(); + return this.valueSet; + } + else if (name.equals("codeableConcept")) { + return addCodeableConcept(); + } + else + return super.addChild(name); + } + + public ModuleDefinitionDataCodeFilterComponent copy() { + ModuleDefinitionDataCodeFilterComponent dst = new ModuleDefinitionDataCodeFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); + if (codeableConcept != null) { + dst.codeableConcept = new ArrayList(); + for (CodeableConcept i : codeableConcept) + dst.codeableConcept.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionDataCodeFilterComponent)) + return false; + ModuleDefinitionDataCodeFilterComponent o = (ModuleDefinitionDataCodeFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(codeableConcept, o.codeableConcept, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionDataCodeFilterComponent)) + return false; + ModuleDefinitionDataCodeFilterComponent o = (ModuleDefinitionDataCodeFilterComponent) other; + return compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty()) + && (codeableConcept == null || codeableConcept.isEmpty()); + } + + public String fhirType() { + return "ModuleDefinition.data.codeFilter"; + + } + + } + + @Block() + public static class ModuleDefinitionDataDateFilterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The date-valued attribute of the filter", formalDefinition="The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing." ) + protected StringType path; + + /** + * The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. + */ + @Child(name = "value", type = {DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The value of the filter, as a Period or dateTime value", formalDefinition="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime." ) + protected Type value; + + private static final long serialVersionUID = 1791957163L; + + /* + * Constructor + */ + public ModuleDefinitionDataDateFilterComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleDefinitionDataDateFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinitionDataDateFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public ModuleDefinitionDataDateFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public ModuleDefinitionDataDateFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Period getValuePeriod() throws FHIRException { + if (!(this.value instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Period) this.value; + } + + public boolean hasValuePeriod() { + return this.value instanceof Period; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public ModuleDefinitionDataDateFilterComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.path"); + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else + return super.addChild(name); + } + + public ModuleDefinitionDataDateFilterComponent copy() { + ModuleDefinitionDataDateFilterComponent dst = new ModuleDefinitionDataDateFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinitionDataDateFilterComponent)) + return false; + ModuleDefinitionDataDateFilterComponent o = (ModuleDefinitionDataDateFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinitionDataDateFilterComponent)) + return false; + ModuleDefinitionDataDateFilterComponent o = (ModuleDefinitionDataDateFilterComponent) other; + return compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "ModuleDefinition.data.dateFilter"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A model reference used by the content. + */ + @Child(name = "model", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A model reference used by the content." ) + protected List model; + + /** + * A library referenced by the module. The reference must consist of either an id, or a document reference. + */ + @Child(name = "library", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A library referenced by the module", formalDefinition="A library referenced by the module. The reference must consist of either an id, or a document reference." ) + protected List library; + + /** + * A code system definition used within the knowledge module. + */ + @Child(name = "codeSystem", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A code system definition used within the knowledge module." ) + protected List codeSystem; + + /** + * A value set definition used by the knowledge module. + */ + @Child(name = "valueSet", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A value set definition used by the knowledge module." ) + protected List valueSet; + + /** + * Parameters to the module. + */ + @Child(name = "parameter", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Parameters to the module." ) + protected List parameter; + + /** + * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data. + */ + @Child(name = "data", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Describes a required data item", formalDefinition="Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data." ) + protected List data; + + private static final long serialVersionUID = -1288058693L; + + /* + * Constructor + */ + public ModuleDefinition() { + super(); + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleDefinition.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleDefinition setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public ModuleDefinition setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #model} (A model reference used by the content.) + */ + public List getModel() { + if (this.model == null) + this.model = new ArrayList(); + return this.model; + } + + public boolean hasModel() { + if (this.model == null) + return false; + for (ModuleDefinitionModelComponent item : this.model) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #model} (A model reference used by the content.) + */ + // syntactic sugar + public ModuleDefinitionModelComponent addModel() { //3 + ModuleDefinitionModelComponent t = new ModuleDefinitionModelComponent(); + if (this.model == null) + this.model = new ArrayList(); + this.model.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addModel(ModuleDefinitionModelComponent t) { //3 + if (t == null) + return this; + if (this.model == null) + this.model = new ArrayList(); + this.model.add(t); + return this; + } + + /** + * @return {@link #library} (A library referenced by the module. The reference must consist of either an id, or a document reference.) + */ + public List getLibrary() { + if (this.library == null) + this.library = new ArrayList(); + return this.library; + } + + public boolean hasLibrary() { + if (this.library == null) + return false; + for (ModuleDefinitionLibraryComponent item : this.library) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #library} (A library referenced by the module. The reference must consist of either an id, or a document reference.) + */ + // syntactic sugar + public ModuleDefinitionLibraryComponent addLibrary() { //3 + ModuleDefinitionLibraryComponent t = new ModuleDefinitionLibraryComponent(); + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addLibrary(ModuleDefinitionLibraryComponent t) { //3 + if (t == null) + return this; + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return this; + } + + /** + * @return {@link #codeSystem} (A code system definition used within the knowledge module.) + */ + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (ModuleDefinitionCodeSystemComponent item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeSystem} (A code system definition used within the knowledge module.) + */ + // syntactic sugar + public ModuleDefinitionCodeSystemComponent addCodeSystem() { //3 + ModuleDefinitionCodeSystemComponent t = new ModuleDefinitionCodeSystemComponent(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addCodeSystem(ModuleDefinitionCodeSystemComponent t) { //3 + if (t == null) + return this; + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + /** + * @return {@link #valueSet} (A value set definition used by the knowledge module.) + */ + public List getValueSet() { + if (this.valueSet == null) + this.valueSet = new ArrayList(); + return this.valueSet; + } + + public boolean hasValueSet() { + if (this.valueSet == null) + return false; + for (ModuleDefinitionValueSetComponent item : this.valueSet) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueSet} (A value set definition used by the knowledge module.) + */ + // syntactic sugar + public ModuleDefinitionValueSetComponent addValueSet() { //3 + ModuleDefinitionValueSetComponent t = new ModuleDefinitionValueSetComponent(); + if (this.valueSet == null) + this.valueSet = new ArrayList(); + this.valueSet.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addValueSet(ModuleDefinitionValueSetComponent t) { //3 + if (t == null) + return this; + if (this.valueSet == null) + this.valueSet = new ArrayList(); + this.valueSet.add(t); + return this; + } + + /** + * @return {@link #parameter} (Parameters to the module.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (ModuleDefinitionParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (Parameters to the module.) + */ + // syntactic sugar + public ModuleDefinitionParameterComponent addParameter() { //3 + ModuleDefinitionParameterComponent t = new ModuleDefinitionParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addParameter(ModuleDefinitionParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + /** + * @return {@link #data} (Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.) + */ + public List getData() { + if (this.data == null) + this.data = new ArrayList(); + return this.data; + } + + public boolean hasData() { + if (this.data == null) + return false; + for (ModuleDefinitionDataComponent item : this.data) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #data} (Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.) + */ + // syntactic sugar + public ModuleDefinitionDataComponent addData() { //3 + ModuleDefinitionDataComponent t = new ModuleDefinitionDataComponent(); + if (this.data == null) + this.data = new ArrayList(); + this.data.add(t); + return t; + } + + // syntactic sugar + public ModuleDefinition addData(ModuleDefinitionDataComponent t) { //3 + if (t == null) + return this; + if (this.data == null) + this.data = new ArrayList(); + this.data.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("model", "", "A model reference used by the content.", 0, java.lang.Integer.MAX_VALUE, model)); + childrenList.add(new Property("library", "", "A library referenced by the module. The reference must consist of either an id, or a document reference.", 0, java.lang.Integer.MAX_VALUE, library)); + childrenList.add(new Property("codeSystem", "", "A code system definition used within the knowledge module.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("valueSet", "", "A value set definition used by the knowledge module.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + childrenList.add(new Property("parameter", "", "Parameters to the module.", 0, java.lang.Integer.MAX_VALUE, parameter)); + childrenList.add(new Property("data", "", "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.", 0, java.lang.Integer.MAX_VALUE, data)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("model")) + this.getModel().add((ModuleDefinitionModelComponent) value); + else if (name.equals("library")) + this.getLibrary().add((ModuleDefinitionLibraryComponent) value); + else if (name.equals("codeSystem")) + this.getCodeSystem().add((ModuleDefinitionCodeSystemComponent) value); + else if (name.equals("valueSet")) + this.getValueSet().add((ModuleDefinitionValueSetComponent) value); + else if (name.equals("parameter")) + this.getParameter().add((ModuleDefinitionParameterComponent) value); + else if (name.equals("data")) + this.getData().add((ModuleDefinitionDataComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleDefinition.version"); + } + else if (name.equals("model")) { + return addModel(); + } + else if (name.equals("library")) { + return addLibrary(); + } + else if (name.equals("codeSystem")) { + return addCodeSystem(); + } + else if (name.equals("valueSet")) { + return addValueSet(); + } + else if (name.equals("parameter")) { + return addParameter(); + } + else if (name.equals("data")) { + return addData(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ModuleDefinition"; + + } + + public ModuleDefinition copy() { + ModuleDefinition dst = new ModuleDefinition(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + if (model != null) { + dst.model = new ArrayList(); + for (ModuleDefinitionModelComponent i : model) + dst.model.add(i.copy()); + }; + if (library != null) { + dst.library = new ArrayList(); + for (ModuleDefinitionLibraryComponent i : library) + dst.library.add(i.copy()); + }; + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (ModuleDefinitionCodeSystemComponent i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + if (valueSet != null) { + dst.valueSet = new ArrayList(); + for (ModuleDefinitionValueSetComponent i : valueSet) + dst.valueSet.add(i.copy()); + }; + if (parameter != null) { + dst.parameter = new ArrayList(); + for (ModuleDefinitionParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + if (data != null) { + dst.data = new ArrayList(); + for (ModuleDefinitionDataComponent i : data) + dst.data.add(i.copy()); + }; + return dst; + } + + protected ModuleDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleDefinition)) + return false; + ModuleDefinition o = (ModuleDefinition) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(model, o.model, true) + && compareDeep(library, o.library, true) && compareDeep(codeSystem, o.codeSystem, true) && compareDeep(valueSet, o.valueSet, true) + && compareDeep(parameter, o.parameter, true) && compareDeep(data, o.data, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleDefinition)) + return false; + ModuleDefinition o = (ModuleDefinition) other; + return compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (model == null || model.isEmpty()) && (library == null || library.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) + && (valueSet == null || valueSet.isEmpty()) && (parameter == null || parameter.isEmpty()) + && (data == null || data.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ModuleDefinition; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleMetadata.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleMetadata.java new file mode 100644 index 00000000000..d8b303111cd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ModuleMetadata.java @@ -0,0 +1,2703 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ +@ResourceDef(name="ModuleMetadata", profile="http://hl7.org/fhir/Profile/ModuleMetadata") +public class ModuleMetadata extends DomainResource { + + public enum ModuleMetadataType { + /** + * The resource is a description of a knowledge module + */ + MODULE, + /** + * The resource is a shareable library of formalized knowledge + */ + LIBRARY, + /** + * An Event-Condition-Action Rule Artifact + */ + DECISIONSUPPORTRULE, + /** + * A Documentation Template Artifact + */ + DOCUMENTATIONTEMPLATE, + /** + * An Order Set Artifact + */ + ORDERSET, + /** + * added to help the parsers + */ + NULL; + public static ModuleMetadataType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("module".equals(codeString)) + return MODULE; + if ("library".equals(codeString)) + return LIBRARY; + if ("decision-support-rule".equals(codeString)) + return DECISIONSUPPORTRULE; + if ("documentation-template".equals(codeString)) + return DOCUMENTATIONTEMPLATE; + if ("order-set".equals(codeString)) + return ORDERSET; + throw new FHIRException("Unknown ModuleMetadataType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MODULE: return "module"; + case LIBRARY: return "library"; + case DECISIONSUPPORTRULE: return "decision-support-rule"; + case DOCUMENTATIONTEMPLATE: return "documentation-template"; + case ORDERSET: return "order-set"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MODULE: return "http://hl7.org/fhir/module-metadata-type"; + case LIBRARY: return "http://hl7.org/fhir/module-metadata-type"; + case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/module-metadata-type"; + case DOCUMENTATIONTEMPLATE: return "http://hl7.org/fhir/module-metadata-type"; + case ORDERSET: return "http://hl7.org/fhir/module-metadata-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MODULE: return "The resource is a description of a knowledge module"; + case LIBRARY: return "The resource is a shareable library of formalized knowledge"; + case DECISIONSUPPORTRULE: return "An Event-Condition-Action Rule Artifact"; + case DOCUMENTATIONTEMPLATE: return "A Documentation Template Artifact"; + case ORDERSET: return "An Order Set Artifact"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MODULE: return "Module"; + case LIBRARY: return "Library"; + case DECISIONSUPPORTRULE: return "Decision Support Rule"; + case DOCUMENTATIONTEMPLATE: return "Documentation Template"; + case ORDERSET: return "Order Set"; + default: return "?"; + } + } + } + + public static class ModuleMetadataTypeEnumFactory implements EnumFactory { + public ModuleMetadataType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("module".equals(codeString)) + return ModuleMetadataType.MODULE; + if ("library".equals(codeString)) + return ModuleMetadataType.LIBRARY; + if ("decision-support-rule".equals(codeString)) + return ModuleMetadataType.DECISIONSUPPORTRULE; + if ("documentation-template".equals(codeString)) + return ModuleMetadataType.DOCUMENTATIONTEMPLATE; + if ("order-set".equals(codeString)) + return ModuleMetadataType.ORDERSET; + throw new IllegalArgumentException("Unknown ModuleMetadataType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("module".equals(codeString)) + return new Enumeration(this, ModuleMetadataType.MODULE); + if ("library".equals(codeString)) + return new Enumeration(this, ModuleMetadataType.LIBRARY); + if ("decision-support-rule".equals(codeString)) + return new Enumeration(this, ModuleMetadataType.DECISIONSUPPORTRULE); + if ("documentation-template".equals(codeString)) + return new Enumeration(this, ModuleMetadataType.DOCUMENTATIONTEMPLATE); + if ("order-set".equals(codeString)) + return new Enumeration(this, ModuleMetadataType.ORDERSET); + throw new FHIRException("Unknown ModuleMetadataType code '"+codeString+"'"); + } + public String toCode(ModuleMetadataType code) { + if (code == ModuleMetadataType.MODULE) + return "module"; + if (code == ModuleMetadataType.LIBRARY) + return "library"; + if (code == ModuleMetadataType.DECISIONSUPPORTRULE) + return "decision-support-rule"; + if (code == ModuleMetadataType.DOCUMENTATIONTEMPLATE) + return "documentation-template"; + if (code == ModuleMetadataType.ORDERSET) + return "order-set"; + return "?"; + } + } + + public enum ModuleMetadataStatus { + /** + * The module is in draft state + */ + DRAFT, + /** + * The module is in test state + */ + TEST, + /** + * The module is active + */ + ACTIVE, + /** + * The module is inactive, either rejected before publication, or retired after publication + */ + INACTIVE, + /** + * added to help the parsers + */ + NULL; + public static ModuleMetadataStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("test".equals(codeString)) + return TEST; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + throw new FHIRException("Unknown ModuleMetadataStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case TEST: return "test"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/module-metadata-status"; + case TEST: return "http://hl7.org/fhir/module-metadata-status"; + case ACTIVE: return "http://hl7.org/fhir/module-metadata-status"; + case INACTIVE: return "http://hl7.org/fhir/module-metadata-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The module is in draft state"; + case TEST: return "The module is in test state"; + case ACTIVE: return "The module is active"; + case INACTIVE: return "The module is inactive, either rejected before publication, or retired after publication"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case TEST: return "Test"; + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + default: return "?"; + } + } + } + + public static class ModuleMetadataStatusEnumFactory implements EnumFactory { + public ModuleMetadataStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ModuleMetadataStatus.DRAFT; + if ("test".equals(codeString)) + return ModuleMetadataStatus.TEST; + if ("active".equals(codeString)) + return ModuleMetadataStatus.ACTIVE; + if ("inactive".equals(codeString)) + return ModuleMetadataStatus.INACTIVE; + throw new IllegalArgumentException("Unknown ModuleMetadataStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, ModuleMetadataStatus.DRAFT); + if ("test".equals(codeString)) + return new Enumeration(this, ModuleMetadataStatus.TEST); + if ("active".equals(codeString)) + return new Enumeration(this, ModuleMetadataStatus.ACTIVE); + if ("inactive".equals(codeString)) + return new Enumeration(this, ModuleMetadataStatus.INACTIVE); + throw new FHIRException("Unknown ModuleMetadataStatus code '"+codeString+"'"); + } + public String toCode(ModuleMetadataStatus code) { + if (code == ModuleMetadataStatus.DRAFT) + return "draft"; + if (code == ModuleMetadataStatus.TEST) + return "test"; + if (code == ModuleMetadataStatus.ACTIVE) + return "active"; + if (code == ModuleMetadataStatus.INACTIVE) + return "inactive"; + return "?"; + } + } + + public enum ModuleMetadataFocusType { + /** + * The gender of the patient. For this item type, use HL7 administrative gender codes (OID: 2.16.840.1.113883.1.11.1) + */ + PATIENTGENDER, + /** + * A patient demographic category for which this artifact is applicable. Allows specification of age groups using coded values originating from the MeSH Code system (OID: 2.16.840.1.113883.6.177). More specifically, only codes from the AgeGroupObservationValue value set are valid for this field [2.16.840.1.113883.11.75] + */ + PATIENTAGEGROUP, + /** + * The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering. Please refer to the implementation guide on which code system and codes to use + */ + CLINICALFOCUS, + /** + * The user types to which an artifact is targeted. For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomyCode system (OID: 2.16.840.1.113883.6.101) + */ + TARGETUSER, + /** + * The settings in which the artifact is intended for use. For example, admission, pre-op, etc + */ + WORKFLOWSETTING, + /** + * The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set (OID: 2.16.840.1.113883.1.11.19846). General categories include: order entry, patient documentation and patient information review + */ + WORKFLOWTASK, + /** + * The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounter (OID: 2.16.840.1.113883.1.11.13955) or NUCC non-individual provider codes OID: 2.16.840.1.113883.1.11.19465 + */ + CLINICALVENUE, + /** + * added to help the parsers + */ + NULL; + public static ModuleMetadataFocusType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-gender".equals(codeString)) + return PATIENTGENDER; + if ("patient-age-group".equals(codeString)) + return PATIENTAGEGROUP; + if ("clinical-focus".equals(codeString)) + return CLINICALFOCUS; + if ("target-user".equals(codeString)) + return TARGETUSER; + if ("workflow-setting".equals(codeString)) + return WORKFLOWSETTING; + if ("workflow-task".equals(codeString)) + return WORKFLOWTASK; + if ("clinical-venue".equals(codeString)) + return CLINICALVENUE; + throw new FHIRException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENTGENDER: return "patient-gender"; + case PATIENTAGEGROUP: return "patient-age-group"; + case CLINICALFOCUS: return "clinical-focus"; + case TARGETUSER: return "target-user"; + case WORKFLOWSETTING: return "workflow-setting"; + case WORKFLOWTASK: return "workflow-task"; + case CLINICALVENUE: return "clinical-venue"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PATIENTGENDER: return "http://hl7.org/fhir/module-metadata-focus-type"; + case PATIENTAGEGROUP: return "http://hl7.org/fhir/module-metadata-focus-type"; + case CLINICALFOCUS: return "http://hl7.org/fhir/module-metadata-focus-type"; + case TARGETUSER: return "http://hl7.org/fhir/module-metadata-focus-type"; + case WORKFLOWSETTING: return "http://hl7.org/fhir/module-metadata-focus-type"; + case WORKFLOWTASK: return "http://hl7.org/fhir/module-metadata-focus-type"; + case CLINICALVENUE: return "http://hl7.org/fhir/module-metadata-focus-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PATIENTGENDER: return "The gender of the patient. For this item type, use HL7 administrative gender codes (OID: 2.16.840.1.113883.1.11.1)"; + case PATIENTAGEGROUP: return "A patient demographic category for which this artifact is applicable. Allows specification of age groups using coded values originating from the MeSH Code system (OID: 2.16.840.1.113883.6.177). More specifically, only codes from the AgeGroupObservationValue value set are valid for this field [2.16.840.1.113883.11.75]"; + case CLINICALFOCUS: return "The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering. Please refer to the implementation guide on which code system and codes to use"; + case TARGETUSER: return "The user types to which an artifact is targeted. For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomyCode system (OID: 2.16.840.1.113883.6.101)"; + case WORKFLOWSETTING: return "The settings in which the artifact is intended for use. For example, admission, pre-op, etc"; + case WORKFLOWTASK: return "The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set (OID: 2.16.840.1.113883.1.11.19846). General categories include: order entry, patient documentation and patient information review"; + case CLINICALVENUE: return "The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounter (OID: 2.16.840.1.113883.1.11.13955) or NUCC non-individual provider codes OID: 2.16.840.1.113883.1.11.19465"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENTGENDER: return "Patient Gender"; + case PATIENTAGEGROUP: return "Patient Age Group"; + case CLINICALFOCUS: return "Clinical Focus"; + case TARGETUSER: return "Target User"; + case WORKFLOWSETTING: return "Workflow Setting"; + case WORKFLOWTASK: return "Workflow Task"; + case CLINICALVENUE: return "Clinical Venue"; + default: return "?"; + } + } + } + + public static class ModuleMetadataFocusTypeEnumFactory implements EnumFactory { + public ModuleMetadataFocusType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-gender".equals(codeString)) + return ModuleMetadataFocusType.PATIENTGENDER; + if ("patient-age-group".equals(codeString)) + return ModuleMetadataFocusType.PATIENTAGEGROUP; + if ("clinical-focus".equals(codeString)) + return ModuleMetadataFocusType.CLINICALFOCUS; + if ("target-user".equals(codeString)) + return ModuleMetadataFocusType.TARGETUSER; + if ("workflow-setting".equals(codeString)) + return ModuleMetadataFocusType.WORKFLOWSETTING; + if ("workflow-task".equals(codeString)) + return ModuleMetadataFocusType.WORKFLOWTASK; + if ("clinical-venue".equals(codeString)) + return ModuleMetadataFocusType.CLINICALVENUE; + throw new IllegalArgumentException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-gender".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.PATIENTGENDER); + if ("patient-age-group".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.PATIENTAGEGROUP); + if ("clinical-focus".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.CLINICALFOCUS); + if ("target-user".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.TARGETUSER); + if ("workflow-setting".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.WORKFLOWSETTING); + if ("workflow-task".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.WORKFLOWTASK); + if ("clinical-venue".equals(codeString)) + return new Enumeration(this, ModuleMetadataFocusType.CLINICALVENUE); + throw new FHIRException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); + } + public String toCode(ModuleMetadataFocusType code) { + if (code == ModuleMetadataFocusType.PATIENTGENDER) + return "patient-gender"; + if (code == ModuleMetadataFocusType.PATIENTAGEGROUP) + return "patient-age-group"; + if (code == ModuleMetadataFocusType.CLINICALFOCUS) + return "clinical-focus"; + if (code == ModuleMetadataFocusType.TARGETUSER) + return "target-user"; + if (code == ModuleMetadataFocusType.WORKFLOWSETTING) + return "workflow-setting"; + if (code == ModuleMetadataFocusType.WORKFLOWTASK) + return "workflow-task"; + if (code == ModuleMetadataFocusType.CLINICALVENUE) + return "clinical-venue"; + return "?"; + } + } + + public enum ModuleMetadataContributorType { + /** + * An author of the content of the module + */ + AUTHOR, + /** + * An editor of the content of the module + */ + EDITOR, + /** + * A reviewer of the content of the module + */ + REVIEWER, + /** + * An endorser of the content of the module + */ + ENDORSER, + /** + * added to help the parsers + */ + NULL; + public static ModuleMetadataContributorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("author".equals(codeString)) + return AUTHOR; + if ("editor".equals(codeString)) + return EDITOR; + if ("reviewer".equals(codeString)) + return REVIEWER; + if ("endorser".equals(codeString)) + return ENDORSER; + throw new FHIRException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AUTHOR: return "author"; + case EDITOR: return "editor"; + case REVIEWER: return "reviewer"; + case ENDORSER: return "endorser"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case AUTHOR: return "http://hl7.org/fhir/module-metadata-contributor"; + case EDITOR: return "http://hl7.org/fhir/module-metadata-contributor"; + case REVIEWER: return "http://hl7.org/fhir/module-metadata-contributor"; + case ENDORSER: return "http://hl7.org/fhir/module-metadata-contributor"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case AUTHOR: return "An author of the content of the module"; + case EDITOR: return "An editor of the content of the module"; + case REVIEWER: return "A reviewer of the content of the module"; + case ENDORSER: return "An endorser of the content of the module"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AUTHOR: return "Author"; + case EDITOR: return "Editor"; + case REVIEWER: return "Reviewer"; + case ENDORSER: return "Endorser"; + default: return "?"; + } + } + } + + public static class ModuleMetadataContributorTypeEnumFactory implements EnumFactory { + public ModuleMetadataContributorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("author".equals(codeString)) + return ModuleMetadataContributorType.AUTHOR; + if ("editor".equals(codeString)) + return ModuleMetadataContributorType.EDITOR; + if ("reviewer".equals(codeString)) + return ModuleMetadataContributorType.REVIEWER; + if ("endorser".equals(codeString)) + return ModuleMetadataContributorType.ENDORSER; + throw new IllegalArgumentException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("author".equals(codeString)) + return new Enumeration(this, ModuleMetadataContributorType.AUTHOR); + if ("editor".equals(codeString)) + return new Enumeration(this, ModuleMetadataContributorType.EDITOR); + if ("reviewer".equals(codeString)) + return new Enumeration(this, ModuleMetadataContributorType.REVIEWER); + if ("endorser".equals(codeString)) + return new Enumeration(this, ModuleMetadataContributorType.ENDORSER); + throw new FHIRException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); + } + public String toCode(ModuleMetadataContributorType code) { + if (code == ModuleMetadataContributorType.AUTHOR) + return "author"; + if (code == ModuleMetadataContributorType.EDITOR) + return "editor"; + if (code == ModuleMetadataContributorType.REVIEWER) + return "reviewer"; + if (code == ModuleMetadataContributorType.ENDORSER) + return "endorser"; + return "?"; + } + } + + public enum ModuleMetadataResourceType { + /** + * Additional documentation for the module + */ + DOCUMENTATION, + /** + * Supporting evidence for the module + */ + EVIDENCE, + /** + * Bibliographic citation for the module + */ + CITATION, + /** + * The previous version of the module + */ + PREDECESSOR, + /** + * The next version of the module + */ + SUCCESSOR, + /** + * The module is derived from the resource + */ + DERIVEDFROM, + /** + * added to help the parsers + */ + NULL; + public static ModuleMetadataResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("documentation".equals(codeString)) + return DOCUMENTATION; + if ("evidence".equals(codeString)) + return EVIDENCE; + if ("citation".equals(codeString)) + return CITATION; + if ("predecessor".equals(codeString)) + return PREDECESSOR; + if ("successor".equals(codeString)) + return SUCCESSOR; + if ("derived-from".equals(codeString)) + return DERIVEDFROM; + throw new FHIRException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCUMENTATION: return "documentation"; + case EVIDENCE: return "evidence"; + case CITATION: return "citation"; + case PREDECESSOR: return "predecessor"; + case SUCCESSOR: return "successor"; + case DERIVEDFROM: return "derived-from"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DOCUMENTATION: return "http://hl7.org/fhir/module-metadata-resource-type"; + case EVIDENCE: return "http://hl7.org/fhir/module-metadata-resource-type"; + case CITATION: return "http://hl7.org/fhir/module-metadata-resource-type"; + case PREDECESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; + case SUCCESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; + case DERIVEDFROM: return "http://hl7.org/fhir/module-metadata-resource-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DOCUMENTATION: return "Additional documentation for the module"; + case EVIDENCE: return "Supporting evidence for the module"; + case CITATION: return "Bibliographic citation for the module"; + case PREDECESSOR: return "The previous version of the module"; + case SUCCESSOR: return "The next version of the module"; + case DERIVEDFROM: return "The module is derived from the resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCUMENTATION: return "Documentation"; + case EVIDENCE: return "Evidence"; + case CITATION: return "Citation"; + case PREDECESSOR: return "Predecessor"; + case SUCCESSOR: return "Successor"; + case DERIVEDFROM: return "Derived From"; + default: return "?"; + } + } + } + + public static class ModuleMetadataResourceTypeEnumFactory implements EnumFactory { + public ModuleMetadataResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("documentation".equals(codeString)) + return ModuleMetadataResourceType.DOCUMENTATION; + if ("evidence".equals(codeString)) + return ModuleMetadataResourceType.EVIDENCE; + if ("citation".equals(codeString)) + return ModuleMetadataResourceType.CITATION; + if ("predecessor".equals(codeString)) + return ModuleMetadataResourceType.PREDECESSOR; + if ("successor".equals(codeString)) + return ModuleMetadataResourceType.SUCCESSOR; + if ("derived-from".equals(codeString)) + return ModuleMetadataResourceType.DERIVEDFROM; + throw new IllegalArgumentException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("documentation".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.DOCUMENTATION); + if ("evidence".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.EVIDENCE); + if ("citation".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.CITATION); + if ("predecessor".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.PREDECESSOR); + if ("successor".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.SUCCESSOR); + if ("derived-from".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.DERIVEDFROM); + throw new FHIRException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); + } + public String toCode(ModuleMetadataResourceType code) { + if (code == ModuleMetadataResourceType.DOCUMENTATION) + return "documentation"; + if (code == ModuleMetadataResourceType.EVIDENCE) + return "evidence"; + if (code == ModuleMetadataResourceType.CITATION) + return "citation"; + if (code == ModuleMetadataResourceType.PREDECESSOR) + return "predecessor"; + if (code == ModuleMetadataResourceType.SUCCESSOR) + return "successor"; + if (code == ModuleMetadataResourceType.DERIVEDFROM) + return "derived-from"; + return "?"; + } + } + + @Block() + public static class ModuleMetadataCoverageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specifies the focus of the coverage attribute. + */ + @Child(name = "focus", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="patient-gender | patient-age-group | clinical-focus | target-user | workflow-setting | workflow-task | clinical-venue", formalDefinition="Specifies the focus of the coverage attribute." ) + protected Enumeration focus; + + /** + * Provides an optional description of the coverage attribute. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Provides an optional description of the coverage attribute." ) + protected StringType description; + + /** + * Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus. + */ + @Child(name = "value", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus." ) + protected CodeableConcept value; + + private static final long serialVersionUID = 701599845L; + + /* + * Constructor + */ + public ModuleMetadataCoverageComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleMetadataCoverageComponent(Enumeration focus) { + super(); + this.focus = focus; + } + + /** + * @return {@link #focus} (Specifies the focus of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + */ + public Enumeration getFocusElement() { + if (this.focus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.focus"); + else if (Configuration.doAutoCreate()) + this.focus = new Enumeration(new ModuleMetadataFocusTypeEnumFactory()); // bb + return this.focus; + } + + public boolean hasFocusElement() { + return this.focus != null && !this.focus.isEmpty(); + } + + public boolean hasFocus() { + return this.focus != null && !this.focus.isEmpty(); + } + + /** + * @param value {@link #focus} (Specifies the focus of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + */ + public ModuleMetadataCoverageComponent setFocusElement(Enumeration value) { + this.focus = value; + return this; + } + + /** + * @return Specifies the focus of the coverage attribute. + */ + public ModuleMetadataFocusType getFocus() { + return this.focus == null ? null : this.focus.getValue(); + } + + /** + * @param value Specifies the focus of the coverage attribute. + */ + public ModuleMetadataCoverageComponent setFocus(ModuleMetadataFocusType value) { + if (this.focus == null) + this.focus = new Enumeration(new ModuleMetadataFocusTypeEnumFactory()); + this.focus.setValue(value); + return this; + } + + /** + * @return {@link #description} (Provides an optional description of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Provides an optional description of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ModuleMetadataCoverageComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Provides an optional description of the coverage attribute. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Provides an optional description of the coverage attribute. + */ + public ModuleMetadataCoverageComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #value} (Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.) + */ + public CodeableConcept getValue() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new CodeableConcept(); // cc + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.) + */ + public ModuleMetadataCoverageComponent setValue(CodeableConcept value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("focus", "code", "Specifies the focus of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, focus)); + childrenList.add(new Property("description", "string", "Provides an optional description of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("value", "CodeableConcept", "Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("focus")) + this.focus = new ModuleMetadataFocusTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("focus")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.focus"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); + } + else if (name.equals("value")) { + this.value = new CodeableConcept(); + return this.value; + } + else + return super.addChild(name); + } + + public ModuleMetadataCoverageComponent copy() { + ModuleMetadataCoverageComponent dst = new ModuleMetadataCoverageComponent(); + copyValues(dst); + dst.focus = focus == null ? null : focus.copy(); + dst.description = description == null ? null : description.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadataCoverageComponent)) + return false; + ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; + return compareDeep(focus, o.focus, true) && compareDeep(description, o.description, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadataCoverageComponent)) + return false; + ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; + return compareValues(focus, o.focus, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (focus == null || focus.isEmpty()) && (description == null || description.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ModuleMetadata.coverage"; + + } + + } + + @Block() + public static class ModuleMetadataContributorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of contributor. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="author | editor | reviewer | endorser", formalDefinition="The type of contributor." ) + protected Enumeration type; + + /** + * The contributor. + */ + @Child(name = "party", type = {Person.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The contributor." ) + protected Reference party; + + /** + * The actual object that is the target of the reference (The contributor.) + */ + protected Resource partyTarget; + + private static final long serialVersionUID = -652221921L; + + /* + * Constructor + */ + public ModuleMetadataContributorComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleMetadataContributorComponent(Enumeration type, Reference party) { + super(); + this.type = type; + this.party = party; + } + + /** + * @return {@link #type} (The type of contributor.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ModuleMetadataContributorTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of contributor.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ModuleMetadataContributorComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of contributor. + */ + public ModuleMetadataContributorType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of contributor. + */ + public ModuleMetadataContributorComponent setType(ModuleMetadataContributorType value) { + if (this.type == null) + this.type = new Enumeration(new ModuleMetadataContributorTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #party} (The contributor.) + */ + public Reference getParty() { + if (this.party == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.party"); + else if (Configuration.doAutoCreate()) + this.party = new Reference(); // cc + return this.party; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); + } + + /** + * @param value {@link #party} (The contributor.) + */ + public ModuleMetadataContributorComponent setParty(Reference value) { + this.party = value; + return this; + } + + /** + * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The contributor.) + */ + public Resource getPartyTarget() { + return this.partyTarget; + } + + /** + * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The contributor.) + */ + public ModuleMetadataContributorComponent setPartyTarget(Resource value) { + this.partyTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of contributor.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("party", "Reference(Person|Organization)", "The contributor.", 0, java.lang.Integer.MAX_VALUE, party)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new ModuleMetadataContributorTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("party")) + this.party = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); + } + else if (name.equals("party")) { + this.party = new Reference(); + return this.party; + } + else + return super.addChild(name); + } + + public ModuleMetadataContributorComponent copy() { + ModuleMetadataContributorComponent dst = new ModuleMetadataContributorComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.party = party == null ? null : party.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadataContributorComponent)) + return false; + ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; + return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadataContributorComponent)) + return false; + ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; + return compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) + ; + } + + public String fhirType() { + return "ModuleMetadata.contributor"; + + } + + } + + @Block() + public static class ModuleMetadataRelatedResourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of related resource. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="documentation | evidence | citation | predecessor | successor | derived-from", formalDefinition="The type of related resource." ) + protected Enumeration type; + + /** + * The uri of the related resource. + */ + @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The uri of the related resource." ) + protected UriType uri; + + /** + * A brief description of the related resource. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A brief description of the related resource." ) + protected StringType description; + + /** + * The document being referenced. + */ + @Child(name = "document", type = {Attachment.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The document being referenced." ) + protected Attachment document; + + private static final long serialVersionUID = -1094264249L; + + /* + * Constructor + */ + public ModuleMetadataRelatedResourceComponent() { + super(); + } + + /* + * Constructor + */ + public ModuleMetadataRelatedResourceComponent(Enumeration type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of related resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ModuleMetadataResourceTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of related resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ModuleMetadataRelatedResourceComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of related resource. + */ + public ModuleMetadataResourceType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of related resource. + */ + public ModuleMetadataRelatedResourceComponent setType(ModuleMetadataResourceType value) { + if (this.type == null) + this.type = new Enumeration(new ModuleMetadataResourceTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #uri} (The uri of the related resource.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public UriType getUriElement() { + if (this.uri == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.uri"); + else if (Configuration.doAutoCreate()) + this.uri = new UriType(); // bb + return this.uri; + } + + public boolean hasUriElement() { + return this.uri != null && !this.uri.isEmpty(); + } + + public boolean hasUri() { + return this.uri != null && !this.uri.isEmpty(); + } + + /** + * @param value {@link #uri} (The uri of the related resource.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public ModuleMetadataRelatedResourceComponent setUriElement(UriType value) { + this.uri = value; + return this; + } + + /** + * @return The uri of the related resource. + */ + public String getUri() { + return this.uri == null ? null : this.uri.getValue(); + } + + /** + * @param value The uri of the related resource. + */ + public ModuleMetadataRelatedResourceComponent setUri(String value) { + if (Utilities.noString(value)) + this.uri = null; + else { + if (this.uri == null) + this.uri = new UriType(); + this.uri.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A brief description of the related resource.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A brief description of the related resource.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ModuleMetadataRelatedResourceComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A brief description of the related resource. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A brief description of the related resource. + */ + public ModuleMetadataRelatedResourceComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #document} (The document being referenced.) + */ + public Attachment getDocument() { + if (this.document == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.document"); + else if (Configuration.doAutoCreate()) + this.document = new Attachment(); // cc + return this.document; + } + + public boolean hasDocument() { + return this.document != null && !this.document.isEmpty(); + } + + /** + * @param value {@link #document} (The document being referenced.) + */ + public ModuleMetadataRelatedResourceComponent setDocument(Attachment value) { + this.document = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of related resource.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("uri", "uri", "The uri of the related resource.", 0, java.lang.Integer.MAX_VALUE, uri)); + childrenList.add(new Property("description", "string", "A brief description of the related resource.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("document", "Attachment", "The document being referenced.", 0, java.lang.Integer.MAX_VALUE, document)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new ModuleMetadataResourceTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("uri")) + this.uri = castToUri(value); // UriType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("document")) + this.document = castToAttachment(value); // Attachment + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); + } + else if (name.equals("uri")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.uri"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); + } + else if (name.equals("document")) { + this.document = new Attachment(); + return this.document; + } + else + return super.addChild(name); + } + + public ModuleMetadataRelatedResourceComponent copy() { + ModuleMetadataRelatedResourceComponent dst = new ModuleMetadataRelatedResourceComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.uri = uri == null ? null : uri.copy(); + dst.description = description == null ? null : description.copy(); + dst.document = document == null ? null : document.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadataRelatedResourceComponent)) + return false; + ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; + return compareDeep(type, o.type, true) && compareDeep(uri, o.uri, true) && compareDeep(description, o.description, true) + && compareDeep(document, o.document, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadataRelatedResourceComponent)) + return false; + ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; + return compareValues(type, o.type, true) && compareValues(uri, o.uri, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty()) + && (description == null || description.isEmpty()) && (document == null || document.isEmpty()) + ; + } + + public String fhirType() { + return "ModuleMetadata.relatedResource"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A short, descriptive title for the module. + */ + @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="A short, descriptive title for the module." ) + protected StringType title; + + /** + * Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. + */ + @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="module | library | decision-support-rule | documentation-template | order-set", formalDefinition="Identifies the type of knowledge module, such as a rule, library, documentation template, or measure." ) + protected Enumeration type; + + /** + * The status of the module. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | test | active | inactive", formalDefinition="The status of the module." ) + protected Enumeration status; + + /** + * A description of the module from the consumer perspective. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A description of the module from the consumer perspective." ) + protected StringType description; + + /** + * A brief description of the purpose of the module. + */ + @Child(name = "purpose", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A brief description of the purpose of the module." ) + protected StringType purpose; + + /** + * Notes about usage of the module. + */ + @Child(name = "usage", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Notes about usage of the module." ) + protected StringType usage; + + /** + * The date on which the module was published. + */ + @Child(name = "publicationDate", type = {DateType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The date on which the module was published." ) + protected DateType publicationDate; + + /** + * The date on which the module content was last reviewed. + */ + @Child(name = "lastReviewDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The date on which the module content was last reviewed." ) + protected DateType lastReviewDate; + + /** + * The period during which the module content is effective. + */ + @Child(name = "effectivePeriod", type = {Period.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The period during which the module content is effective." ) + protected Period effectivePeriod; + + /** + * Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable. + */ + @Child(name = "coverage", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable." ) + protected List coverage; + + /** + * Clinical topics related to the content of the module. + */ + @Child(name = "topic", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Clinical topics related to the content of the module." ) + protected List topic; + + /** + * Keywords associated with the module. + */ + @Child(name = "keyword", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Keywords associated with the module." ) + protected List keyword; + + /** + * A contributor to the content of the module. + */ + @Child(name = "contributor", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A contributor to the content of the module." ) + protected List contributor; + + /** + * The organization responsible for publishing the module. + */ + @Child(name = "publisher", type = {Organization.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The organization responsible for publishing the module." ) + protected Reference publisher; + + /** + * The actual object that is the target of the reference (The organization responsible for publishing the module.) + */ + protected Organization publisherTarget; + + /** + * The organization responsible for stewardship of the module content. + */ + @Child(name = "steward", type = {Organization.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The organization responsible for stewardship of the module content." ) + protected Reference steward; + + /** + * The actual object that is the target of the reference (The organization responsible for stewardship of the module content.) + */ + protected Organization stewardTarget; + + /** + * The legal rights declaration for the module. + */ + @Child(name = "rightsDeclaration", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The legal rights declaration for the module." ) + protected StringType rightsDeclaration; + + /** + * Related resources such as additional documentation, supporting evidence, or bibliographic references. + */ + @Child(name = "relatedResource", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Related resources such as additional documentation, supporting evidence, or bibliographic references." ) + protected List relatedResource; + + private static final long serialVersionUID = -1125568771L; + + /* + * Constructor + */ + public ModuleMetadata() { + super(); + } + + /* + * Constructor + */ + public ModuleMetadata(Enumeration type, Enumeration status) { + super(); + this.type = type; + this.status = status; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ModuleMetadata setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public ModuleMetadata setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (A short, descriptive title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (A short, descriptive title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public ModuleMetadata setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return A short, descriptive title for the module. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value A short, descriptive title for the module. + */ + public ModuleMetadata setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ModuleMetadataTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ModuleMetadata setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. + */ + public ModuleMetadataType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. + */ + public ModuleMetadata setType(ModuleMetadataType value) { + if (this.type == null) + this.type = new Enumeration(new ModuleMetadataTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the module.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ModuleMetadataStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the module.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ModuleMetadata setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the module. + */ + public ModuleMetadataStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the module. + */ + public ModuleMetadata setStatus(ModuleMetadataStatus value) { + if (this.status == null) + this.status = new Enumeration(new ModuleMetadataStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #description} (A description of the module from the consumer perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the module from the consumer perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ModuleMetadata setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the module from the consumer perspective. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the module from the consumer perspective. + */ + public ModuleMetadata setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #purpose} (A brief description of the purpose of the module.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public StringType getPurposeElement() { + if (this.purpose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.purpose"); + else if (Configuration.doAutoCreate()) + this.purpose = new StringType(); // bb + return this.purpose; + } + + public boolean hasPurposeElement() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + public boolean hasPurpose() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + /** + * @param value {@link #purpose} (A brief description of the purpose of the module.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public ModuleMetadata setPurposeElement(StringType value) { + this.purpose = value; + return this; + } + + /** + * @return A brief description of the purpose of the module. + */ + public String getPurpose() { + return this.purpose == null ? null : this.purpose.getValue(); + } + + /** + * @param value A brief description of the purpose of the module. + */ + public ModuleMetadata setPurpose(String value) { + if (Utilities.noString(value)) + this.purpose = null; + else { + if (this.purpose == null) + this.purpose = new StringType(); + this.purpose.setValue(value); + } + return this; + } + + /** + * @return {@link #usage} (Notes about usage of the module.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + */ + public StringType getUsageElement() { + if (this.usage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.usage"); + else if (Configuration.doAutoCreate()) + this.usage = new StringType(); // bb + return this.usage; + } + + public boolean hasUsageElement() { + return this.usage != null && !this.usage.isEmpty(); + } + + public boolean hasUsage() { + return this.usage != null && !this.usage.isEmpty(); + } + + /** + * @param value {@link #usage} (Notes about usage of the module.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + */ + public ModuleMetadata setUsageElement(StringType value) { + this.usage = value; + return this; + } + + /** + * @return Notes about usage of the module. + */ + public String getUsage() { + return this.usage == null ? null : this.usage.getValue(); + } + + /** + * @param value Notes about usage of the module. + */ + public ModuleMetadata setUsage(String value) { + if (Utilities.noString(value)) + this.usage = null; + else { + if (this.usage == null) + this.usage = new StringType(); + this.usage.setValue(value); + } + return this; + } + + /** + * @return {@link #publicationDate} (The date on which the module was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value + */ + public DateType getPublicationDateElement() { + if (this.publicationDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.publicationDate"); + else if (Configuration.doAutoCreate()) + this.publicationDate = new DateType(); // bb + return this.publicationDate; + } + + public boolean hasPublicationDateElement() { + return this.publicationDate != null && !this.publicationDate.isEmpty(); + } + + public boolean hasPublicationDate() { + return this.publicationDate != null && !this.publicationDate.isEmpty(); + } + + /** + * @param value {@link #publicationDate} (The date on which the module was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value + */ + public ModuleMetadata setPublicationDateElement(DateType value) { + this.publicationDate = value; + return this; + } + + /** + * @return The date on which the module was published. + */ + public Date getPublicationDate() { + return this.publicationDate == null ? null : this.publicationDate.getValue(); + } + + /** + * @param value The date on which the module was published. + */ + public ModuleMetadata setPublicationDate(Date value) { + if (value == null) + this.publicationDate = null; + else { + if (this.publicationDate == null) + this.publicationDate = new DateType(); + this.publicationDate.setValue(value); + } + return this; + } + + /** + * @return {@link #lastReviewDate} (The date on which the module content was last reviewed.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value + */ + public DateType getLastReviewDateElement() { + if (this.lastReviewDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.lastReviewDate"); + else if (Configuration.doAutoCreate()) + this.lastReviewDate = new DateType(); // bb + return this.lastReviewDate; + } + + public boolean hasLastReviewDateElement() { + return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); + } + + public boolean hasLastReviewDate() { + return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); + } + + /** + * @param value {@link #lastReviewDate} (The date on which the module content was last reviewed.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value + */ + public ModuleMetadata setLastReviewDateElement(DateType value) { + this.lastReviewDate = value; + return this; + } + + /** + * @return The date on which the module content was last reviewed. + */ + public Date getLastReviewDate() { + return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); + } + + /** + * @param value The date on which the module content was last reviewed. + */ + public ModuleMetadata setLastReviewDate(Date value) { + if (value == null) + this.lastReviewDate = null; + else { + if (this.lastReviewDate == null) + this.lastReviewDate = new DateType(); + this.lastReviewDate.setValue(value); + } + return this; + } + + /** + * @return {@link #effectivePeriod} (The period during which the module content is effective.) + */ + public Period getEffectivePeriod() { + if (this.effectivePeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.effectivePeriod"); + else if (Configuration.doAutoCreate()) + this.effectivePeriod = new Period(); // cc + return this.effectivePeriod; + } + + public boolean hasEffectivePeriod() { + return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); + } + + /** + * @param value {@link #effectivePeriod} (The period during which the module content is effective.) + */ + public ModuleMetadata setEffectivePeriod(Period value) { + this.effectivePeriod = value; + return this; + } + + /** + * @return {@link #coverage} (Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.) + */ + public List getCoverage() { + if (this.coverage == null) + this.coverage = new ArrayList(); + return this.coverage; + } + + public boolean hasCoverage() { + if (this.coverage == null) + return false; + for (ModuleMetadataCoverageComponent item : this.coverage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #coverage} (Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.) + */ + // syntactic sugar + public ModuleMetadataCoverageComponent addCoverage() { //3 + ModuleMetadataCoverageComponent t = new ModuleMetadataCoverageComponent(); + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addCoverage(ModuleMetadataCoverageComponent t) { //3 + if (t == null) + return this; + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return this; + } + + /** + * @return {@link #topic} (Clinical topics related to the content of the module.) + */ + public List getTopic() { + if (this.topic == null) + this.topic = new ArrayList(); + return this.topic; + } + + public boolean hasTopic() { + if (this.topic == null) + return false; + for (CodeableConcept item : this.topic) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #topic} (Clinical topics related to the content of the module.) + */ + // syntactic sugar + public CodeableConcept addTopic() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addTopic(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); + return this; + } + + /** + * @return {@link #keyword} (Keywords associated with the module.) + */ + public List getKeyword() { + if (this.keyword == null) + this.keyword = new ArrayList(); + return this.keyword; + } + + public boolean hasKeyword() { + if (this.keyword == null) + return false; + for (StringType item : this.keyword) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #keyword} (Keywords associated with the module.) + */ + // syntactic sugar + public StringType addKeywordElement() {//2 + StringType t = new StringType(); + if (this.keyword == null) + this.keyword = new ArrayList(); + this.keyword.add(t); + return t; + } + + /** + * @param value {@link #keyword} (Keywords associated with the module.) + */ + public ModuleMetadata addKeyword(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.keyword == null) + this.keyword = new ArrayList(); + this.keyword.add(t); + return this; + } + + /** + * @param value {@link #keyword} (Keywords associated with the module.) + */ + public boolean hasKeyword(String value) { + if (this.keyword == null) + return false; + for (StringType v : this.keyword) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #contributor} (A contributor to the content of the module.) + */ + public List getContributor() { + if (this.contributor == null) + this.contributor = new ArrayList(); + return this.contributor; + } + + public boolean hasContributor() { + if (this.contributor == null) + return false; + for (ModuleMetadataContributorComponent item : this.contributor) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contributor} (A contributor to the content of the module.) + */ + // syntactic sugar + public ModuleMetadataContributorComponent addContributor() { //3 + ModuleMetadataContributorComponent t = new ModuleMetadataContributorComponent(); + if (this.contributor == null) + this.contributor = new ArrayList(); + this.contributor.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addContributor(ModuleMetadataContributorComponent t) { //3 + if (t == null) + return this; + if (this.contributor == null) + this.contributor = new ArrayList(); + this.contributor.add(t); + return this; + } + + /** + * @return {@link #publisher} (The organization responsible for publishing the module.) + */ + public Reference getPublisher() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new Reference(); // cc + return this.publisher; + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The organization responsible for publishing the module.) + */ + public ModuleMetadata setPublisher(Reference value) { + this.publisher = value; + return this; + } + + /** + * @return {@link #publisher} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for publishing the module.) + */ + public Organization getPublisherTarget() { + if (this.publisherTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.publisher"); + else if (Configuration.doAutoCreate()) + this.publisherTarget = new Organization(); // aa + return this.publisherTarget; + } + + /** + * @param value {@link #publisher} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for publishing the module.) + */ + public ModuleMetadata setPublisherTarget(Organization value) { + this.publisherTarget = value; + return this; + } + + /** + * @return {@link #steward} (The organization responsible for stewardship of the module content.) + */ + public Reference getSteward() { + if (this.steward == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.steward"); + else if (Configuration.doAutoCreate()) + this.steward = new Reference(); // cc + return this.steward; + } + + public boolean hasSteward() { + return this.steward != null && !this.steward.isEmpty(); + } + + /** + * @param value {@link #steward} (The organization responsible for stewardship of the module content.) + */ + public ModuleMetadata setSteward(Reference value) { + this.steward = value; + return this; + } + + /** + * @return {@link #steward} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for stewardship of the module content.) + */ + public Organization getStewardTarget() { + if (this.stewardTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.steward"); + else if (Configuration.doAutoCreate()) + this.stewardTarget = new Organization(); // aa + return this.stewardTarget; + } + + /** + * @param value {@link #steward} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for stewardship of the module content.) + */ + public ModuleMetadata setStewardTarget(Organization value) { + this.stewardTarget = value; + return this; + } + + /** + * @return {@link #rightsDeclaration} (The legal rights declaration for the module.). This is the underlying object with id, value and extensions. The accessor "getRightsDeclaration" gives direct access to the value + */ + public StringType getRightsDeclarationElement() { + if (this.rightsDeclaration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.rightsDeclaration"); + else if (Configuration.doAutoCreate()) + this.rightsDeclaration = new StringType(); // bb + return this.rightsDeclaration; + } + + public boolean hasRightsDeclarationElement() { + return this.rightsDeclaration != null && !this.rightsDeclaration.isEmpty(); + } + + public boolean hasRightsDeclaration() { + return this.rightsDeclaration != null && !this.rightsDeclaration.isEmpty(); + } + + /** + * @param value {@link #rightsDeclaration} (The legal rights declaration for the module.). This is the underlying object with id, value and extensions. The accessor "getRightsDeclaration" gives direct access to the value + */ + public ModuleMetadata setRightsDeclarationElement(StringType value) { + this.rightsDeclaration = value; + return this; + } + + /** + * @return The legal rights declaration for the module. + */ + public String getRightsDeclaration() { + return this.rightsDeclaration == null ? null : this.rightsDeclaration.getValue(); + } + + /** + * @param value The legal rights declaration for the module. + */ + public ModuleMetadata setRightsDeclaration(String value) { + if (Utilities.noString(value)) + this.rightsDeclaration = null; + else { + if (this.rightsDeclaration == null) + this.rightsDeclaration = new StringType(); + this.rightsDeclaration.setValue(value); + } + return this; + } + + /** + * @return {@link #relatedResource} (Related resources such as additional documentation, supporting evidence, or bibliographic references.) + */ + public List getRelatedResource() { + if (this.relatedResource == null) + this.relatedResource = new ArrayList(); + return this.relatedResource; + } + + public boolean hasRelatedResource() { + if (this.relatedResource == null) + return false; + for (ModuleMetadataRelatedResourceComponent item : this.relatedResource) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #relatedResource} (Related resources such as additional documentation, supporting evidence, or bibliographic references.) + */ + // syntactic sugar + public ModuleMetadataRelatedResourceComponent addRelatedResource() { //3 + ModuleMetadataRelatedResourceComponent t = new ModuleMetadataRelatedResourceComponent(); + if (this.relatedResource == null) + this.relatedResource = new ArrayList(); + this.relatedResource.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addRelatedResource(ModuleMetadataRelatedResourceComponent t) { //3 + if (t == null) + return this; + if (this.relatedResource == null) + this.relatedResource = new ArrayList(); + this.relatedResource.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("title", "string", "A short, descriptive title for the module.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("type", "code", "Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("status", "code", "The status of the module.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("description", "string", "A description of the module from the consumer perspective.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("purpose", "string", "A brief description of the purpose of the module.", 0, java.lang.Integer.MAX_VALUE, purpose)); + childrenList.add(new Property("usage", "string", "Notes about usage of the module.", 0, java.lang.Integer.MAX_VALUE, usage)); + childrenList.add(new Property("publicationDate", "date", "The date on which the module was published.", 0, java.lang.Integer.MAX_VALUE, publicationDate)); + childrenList.add(new Property("lastReviewDate", "date", "The date on which the module content was last reviewed.", 0, java.lang.Integer.MAX_VALUE, lastReviewDate)); + childrenList.add(new Property("effectivePeriod", "Period", "The period during which the module content is effective.", 0, java.lang.Integer.MAX_VALUE, effectivePeriod)); + childrenList.add(new Property("coverage", "", "Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("topic", "CodeableConcept", "Clinical topics related to the content of the module.", 0, java.lang.Integer.MAX_VALUE, topic)); + childrenList.add(new Property("keyword", "string", "Keywords associated with the module.", 0, java.lang.Integer.MAX_VALUE, keyword)); + childrenList.add(new Property("contributor", "", "A contributor to the content of the module.", 0, java.lang.Integer.MAX_VALUE, contributor)); + childrenList.add(new Property("publisher", "Reference(Organization)", "The organization responsible for publishing the module.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("steward", "Reference(Organization)", "The organization responsible for stewardship of the module content.", 0, java.lang.Integer.MAX_VALUE, steward)); + childrenList.add(new Property("rightsDeclaration", "string", "The legal rights declaration for the module.", 0, java.lang.Integer.MAX_VALUE, rightsDeclaration)); + childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, supporting evidence, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("type")) + this.type = new ModuleMetadataTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("status")) + this.status = new ModuleMetadataStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("purpose")) + this.purpose = castToString(value); // StringType + else if (name.equals("usage")) + this.usage = castToString(value); // StringType + else if (name.equals("publicationDate")) + this.publicationDate = castToDate(value); // DateType + else if (name.equals("lastReviewDate")) + this.lastReviewDate = castToDate(value); // DateType + else if (name.equals("effectivePeriod")) + this.effectivePeriod = castToPeriod(value); // Period + else if (name.equals("coverage")) + this.getCoverage().add((ModuleMetadataCoverageComponent) value); + else if (name.equals("topic")) + this.getTopic().add(castToCodeableConcept(value)); + else if (name.equals("keyword")) + this.getKeyword().add(castToString(value)); + else if (name.equals("contributor")) + this.getContributor().add((ModuleMetadataContributorComponent) value); + else if (name.equals("publisher")) + this.publisher = castToReference(value); // Reference + else if (name.equals("steward")) + this.steward = castToReference(value); // Reference + else if (name.equals("rightsDeclaration")) + this.rightsDeclaration = castToString(value); // StringType + else if (name.equals("relatedResource")) + this.getRelatedResource().add((ModuleMetadataRelatedResourceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.version"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.title"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.status"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); + } + else if (name.equals("purpose")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.purpose"); + } + else if (name.equals("usage")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.usage"); + } + else if (name.equals("publicationDate")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.publicationDate"); + } + else if (name.equals("lastReviewDate")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.lastReviewDate"); + } + else if (name.equals("effectivePeriod")) { + this.effectivePeriod = new Period(); + return this.effectivePeriod; + } + else if (name.equals("coverage")) { + return addCoverage(); + } + else if (name.equals("topic")) { + return addTopic(); + } + else if (name.equals("keyword")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.keyword"); + } + else if (name.equals("contributor")) { + return addContributor(); + } + else if (name.equals("publisher")) { + this.publisher = new Reference(); + return this.publisher; + } + else if (name.equals("steward")) { + this.steward = new Reference(); + return this.steward; + } + else if (name.equals("rightsDeclaration")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.rightsDeclaration"); + } + else if (name.equals("relatedResource")) { + return addRelatedResource(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ModuleMetadata"; + + } + + public ModuleMetadata copy() { + ModuleMetadata dst = new ModuleMetadata(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.title = title == null ? null : title.copy(); + dst.type = type == null ? null : type.copy(); + dst.status = status == null ? null : status.copy(); + dst.description = description == null ? null : description.copy(); + dst.purpose = purpose == null ? null : purpose.copy(); + dst.usage = usage == null ? null : usage.copy(); + dst.publicationDate = publicationDate == null ? null : publicationDate.copy(); + dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); + dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); + if (coverage != null) { + dst.coverage = new ArrayList(); + for (ModuleMetadataCoverageComponent i : coverage) + dst.coverage.add(i.copy()); + }; + if (topic != null) { + dst.topic = new ArrayList(); + for (CodeableConcept i : topic) + dst.topic.add(i.copy()); + }; + if (keyword != null) { + dst.keyword = new ArrayList(); + for (StringType i : keyword) + dst.keyword.add(i.copy()); + }; + if (contributor != null) { + dst.contributor = new ArrayList(); + for (ModuleMetadataContributorComponent i : contributor) + dst.contributor.add(i.copy()); + }; + dst.publisher = publisher == null ? null : publisher.copy(); + dst.steward = steward == null ? null : steward.copy(); + dst.rightsDeclaration = rightsDeclaration == null ? null : rightsDeclaration.copy(); + if (relatedResource != null) { + dst.relatedResource = new ArrayList(); + for (ModuleMetadataRelatedResourceComponent i : relatedResource) + dst.relatedResource.add(i.copy()); + }; + return dst; + } + + protected ModuleMetadata typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadata)) + return false; + ModuleMetadata o = (ModuleMetadata) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(title, o.title, true) + && compareDeep(type, o.type, true) && compareDeep(status, o.status, true) && compareDeep(description, o.description, true) + && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) && compareDeep(publicationDate, o.publicationDate, true) + && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true) + && compareDeep(coverage, o.coverage, true) && compareDeep(topic, o.topic, true) && compareDeep(keyword, o.keyword, true) + && compareDeep(contributor, o.contributor, true) && compareDeep(publisher, o.publisher, true) && compareDeep(steward, o.steward, true) + && compareDeep(rightsDeclaration, o.rightsDeclaration, true) && compareDeep(relatedResource, o.relatedResource, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadata)) + return false; + ModuleMetadata o = (ModuleMetadata) other; + return compareValues(version, o.version, true) && compareValues(title, o.title, true) && compareValues(type, o.type, true) + && compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(purpose, o.purpose, true) + && compareValues(usage, o.usage, true) && compareValues(publicationDate, o.publicationDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true) + && compareValues(keyword, o.keyword, true) && compareValues(rightsDeclaration, o.rightsDeclaration, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (title == null || title.isEmpty()) && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) + && (description == null || description.isEmpty()) && (purpose == null || purpose.isEmpty()) + && (usage == null || usage.isEmpty()) && (publicationDate == null || publicationDate.isEmpty()) + && (lastReviewDate == null || lastReviewDate.isEmpty()) && (effectivePeriod == null || effectivePeriod.isEmpty()) + && (coverage == null || coverage.isEmpty()) && (topic == null || topic.isEmpty()) && (keyword == null || keyword.isEmpty()) + && (contributor == null || contributor.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (steward == null || steward.isEmpty()) && (rightsDeclaration == null || rightsDeclaration.isEmpty()) + && (relatedResource == null || relatedResource.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ModuleMetadata; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Money.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Money.java new file mode 100644 index 00000000000..f6996f22462 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Money.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Money", profileOf=Quantity.class) +public class Money extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public Money copy() { + Money dst = new Money(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Money typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Money)) + return false; + Money o = (Money) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Money)) + return false; + Money o = (Money) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NamingSystem.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NamingSystem.java new file mode 100644 index 00000000000..edfba0f4d68 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NamingSystem.java @@ -0,0 +1,1631 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ +@ResourceDef(name="NamingSystem", profile="http://hl7.org/fhir/Profile/NamingSystem") +public class NamingSystem extends DomainResource { + + public enum NamingSystemType { + /** + * The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc. + */ + CODESYSTEM, + /** + * The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.). + */ + IDENTIFIER, + /** + * The naming system is used as the root for other identifiers and naming systems. + */ + ROOT, + /** + * added to help the parsers + */ + NULL; + public static NamingSystemType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("codesystem".equals(codeString)) + return CODESYSTEM; + if ("identifier".equals(codeString)) + return IDENTIFIER; + if ("root".equals(codeString)) + return ROOT; + throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CODESYSTEM: return "codesystem"; + case IDENTIFIER: return "identifier"; + case ROOT: return "root"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CODESYSTEM: return "http://hl7.org/fhir/namingsystem-type"; + case IDENTIFIER: return "http://hl7.org/fhir/namingsystem-type"; + case ROOT: return "http://hl7.org/fhir/namingsystem-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CODESYSTEM: return "The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc."; + case IDENTIFIER: return "The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.)."; + case ROOT: return "The naming system is used as the root for other identifiers and naming systems."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CODESYSTEM: return "Code System"; + case IDENTIFIER: return "Identifier"; + case ROOT: return "Root"; + default: return "?"; + } + } + } + + public static class NamingSystemTypeEnumFactory implements EnumFactory { + public NamingSystemType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("codesystem".equals(codeString)) + return NamingSystemType.CODESYSTEM; + if ("identifier".equals(codeString)) + return NamingSystemType.IDENTIFIER; + if ("root".equals(codeString)) + return NamingSystemType.ROOT; + throw new IllegalArgumentException("Unknown NamingSystemType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("codesystem".equals(codeString)) + return new Enumeration(this, NamingSystemType.CODESYSTEM); + if ("identifier".equals(codeString)) + return new Enumeration(this, NamingSystemType.IDENTIFIER); + if ("root".equals(codeString)) + return new Enumeration(this, NamingSystemType.ROOT); + throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); + } + public String toCode(NamingSystemType code) { + if (code == NamingSystemType.CODESYSTEM) + return "codesystem"; + if (code == NamingSystemType.IDENTIFIER) + return "identifier"; + if (code == NamingSystemType.ROOT) + return "root"; + return "?"; + } + } + + public enum NamingSystemIdentifierType { + /** + * An ISO object identifier; e.g. 1.2.3.4.5. + */ + OID, + /** + * A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11. + */ + UUID, + /** + * A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org. + */ + URI, + /** + * Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static NamingSystemIdentifierType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("oid".equals(codeString)) + return OID; + if ("uuid".equals(codeString)) + return UUID; + if ("uri".equals(codeString)) + return URI; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OID: return "oid"; + case UUID: return "uuid"; + case URI: return "uri"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case OID: return "http://hl7.org/fhir/namingsystem-identifier-type"; + case UUID: return "http://hl7.org/fhir/namingsystem-identifier-type"; + case URI: return "http://hl7.org/fhir/namingsystem-identifier-type"; + case OTHER: return "http://hl7.org/fhir/namingsystem-identifier-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case OID: return "An ISO object identifier; e.g. 1.2.3.4.5."; + case UUID: return "A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11."; + case URI: return "A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org."; + case OTHER: return "Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OID: return "OID"; + case UUID: return "UUID"; + case URI: return "URI"; + case OTHER: return "Other"; + default: return "?"; + } + } + } + + public static class NamingSystemIdentifierTypeEnumFactory implements EnumFactory { + public NamingSystemIdentifierType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("oid".equals(codeString)) + return NamingSystemIdentifierType.OID; + if ("uuid".equals(codeString)) + return NamingSystemIdentifierType.UUID; + if ("uri".equals(codeString)) + return NamingSystemIdentifierType.URI; + if ("other".equals(codeString)) + return NamingSystemIdentifierType.OTHER; + throw new IllegalArgumentException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("oid".equals(codeString)) + return new Enumeration(this, NamingSystemIdentifierType.OID); + if ("uuid".equals(codeString)) + return new Enumeration(this, NamingSystemIdentifierType.UUID); + if ("uri".equals(codeString)) + return new Enumeration(this, NamingSystemIdentifierType.URI); + if ("other".equals(codeString)) + return new Enumeration(this, NamingSystemIdentifierType.OTHER); + throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); + } + public String toCode(NamingSystemIdentifierType code) { + if (code == NamingSystemIdentifierType.OID) + return "oid"; + if (code == NamingSystemIdentifierType.UUID) + return "uuid"; + if (code == NamingSystemIdentifierType.URI) + return "uri"; + if (code == NamingSystemIdentifierType.OTHER) + return "other"; + return "?"; + } + } + + @Block() + public static class NamingSystemContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the naming system. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the naming system." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public NamingSystemContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the naming system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystemContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the naming system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public NamingSystemContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the naming system. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the naming system. + */ + public NamingSystemContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public NamingSystemContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the naming system.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public NamingSystemContactComponent copy() { + NamingSystemContactComponent dst = new NamingSystemContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NamingSystemContactComponent)) + return false; + NamingSystemContactComponent o = (NamingSystemContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NamingSystemContactComponent)) + return false; + NamingSystemContactComponent o = (NamingSystemContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "NamingSystem.contact"; + + } + + } + + @Block() + public static class NamingSystemUniqueIdComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the unique identifier scheme used for this particular identifier. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="oid | uuid | uri | other", formalDefinition="Identifies the unique identifier scheme used for this particular identifier." ) + protected Enumeration type; + + /** + * The string that should be sent over the wire to identify the code system or identifier system. + */ + @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The unique identifier", formalDefinition="The string that should be sent over the wire to identify the code system or identifier system." ) + protected StringType value; + + /** + * Indicates whether this identifier is the "preferred" identifier of this type. + */ + @Child(name = "preferred", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Is this the id that should be used for this type", formalDefinition="Indicates whether this identifier is the \"preferred\" identifier of this type." ) + protected BooleanType preferred; + + /** + * Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When is identifier valid?", formalDefinition="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic." ) + protected Period period; + + private static final long serialVersionUID = -193711840L; + + /* + * Constructor + */ + public NamingSystemUniqueIdComponent() { + super(); + } + + /* + * Constructor + */ + public NamingSystemUniqueIdComponent(Enumeration type, StringType value) { + super(); + this.type = type; + this.value = value; + } + + /** + * @return {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new NamingSystemIdentifierTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public NamingSystemUniqueIdComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Identifies the unique identifier scheme used for this particular identifier. + */ + public NamingSystemIdentifierType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Identifies the unique identifier scheme used for this particular identifier. + */ + public NamingSystemUniqueIdComponent setType(NamingSystemIdentifierType value) { + if (this.type == null) + this.type = new Enumeration(new NamingSystemIdentifierTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public NamingSystemUniqueIdComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The string that should be sent over the wire to identify the code system or identifier system. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The string that should be sent over the wire to identify the code system or identifier system. + */ + public NamingSystemUniqueIdComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + /** + * @return {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value + */ + public BooleanType getPreferredElement() { + if (this.preferred == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.preferred"); + else if (Configuration.doAutoCreate()) + this.preferred = new BooleanType(); // bb + return this.preferred; + } + + public boolean hasPreferredElement() { + return this.preferred != null && !this.preferred.isEmpty(); + } + + public boolean hasPreferred() { + return this.preferred != null && !this.preferred.isEmpty(); + } + + /** + * @param value {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value + */ + public NamingSystemUniqueIdComponent setPreferredElement(BooleanType value) { + this.preferred = value; + return this; + } + + /** + * @return Indicates whether this identifier is the "preferred" identifier of this type. + */ + public boolean getPreferred() { + return this.preferred == null || this.preferred.isEmpty() ? false : this.preferred.getValue(); + } + + /** + * @param value Indicates whether this identifier is the "preferred" identifier of this type. + */ + public NamingSystemUniqueIdComponent setPreferred(boolean value) { + if (this.preferred == null) + this.preferred = new BooleanType(); + this.preferred.setValue(value); + return this; + } + + /** + * @return {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.) + */ + public NamingSystemUniqueIdComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Identifies the unique identifier scheme used for this particular identifier.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("value", "string", "The string that should be sent over the wire to identify the code system or identifier system.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("preferred", "boolean", "Indicates whether this identifier is the \"preferred\" identifier of this type.", 0, java.lang.Integer.MAX_VALUE, preferred)); + childrenList.add(new Property("period", "Period", "Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new NamingSystemIdentifierTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("preferred")) + this.preferred = castToBoolean(value); // BooleanType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.type"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.value"); + } + else if (name.equals("preferred")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.preferred"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public NamingSystemUniqueIdComponent copy() { + NamingSystemUniqueIdComponent dst = new NamingSystemUniqueIdComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.value = value == null ? null : value.copy(); + dst.preferred = preferred == null ? null : preferred.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NamingSystemUniqueIdComponent)) + return false; + NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other; + return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(preferred, o.preferred, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NamingSystemUniqueIdComponent)) + return false; + NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other; + return compareValues(type, o.type, true) && compareValues(value, o.value, true) && compareValues(preferred, o.preferred, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) + && (preferred == null || preferred.isEmpty()) && (period == null || period.isEmpty()); + } + + public String fhirType() { + return "NamingSystem.uniqueId"; + + } + + } + + /** + * The descriptive name of this particular identifier type or code system. + */ + @Child(name = "name", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human-readable label", formalDefinition="The descriptive name of this particular identifier type or code system." ) + protected StringType name; + + /** + * Indicates whether the naming system is "ready for use" or not. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="draft | active | retired", formalDefinition="Indicates whether the naming system is \"ready for use\" or not." ) + protected Enumeration status; + + /** + * Indicates the purpose for the naming system - what kinds of things does it make unique? + */ + @Child(name = "kind", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the naming system - what kinds of things does it make unique?" ) + protected Enumeration kind; + + /** + * The name of the individual or organization that published the naming system. + */ + @Child(name = "publisher", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the naming system." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. + */ + @Child(name = "responsible", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." ) + protected StringType responsible; + + /** + * The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes." ) + protected DateTimeType date; + + /** + * Categorizes a naming system for easier search by grouping related naming systems. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="e.g. driver, provider, patient, bank etc.", formalDefinition="Categorizes a naming system for easier search by grouping related naming systems." ) + protected CodeableConcept type; + + /** + * Details about what the namespace identifies including scope, granularity, version labeling, etc. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What does naming system identify?", formalDefinition="Details about what the namespace identifies including scope, granularity, version labeling, etc." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems." ) + protected List useContext; + + /** + * Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. + */ + @Child(name = "usage", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How/where is it used", formalDefinition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." ) + protected StringType usage; + + /** + * Indicates how the system may be identified when referenced in electronic exchange. + */ + @Child(name = "uniqueId", type = {}, order=11, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Unique identifiers used for system", formalDefinition="Indicates how the system may be identified when referenced in electronic exchange." ) + protected List uniqueId; + + /** + * For naming systems that are retired, indicates the naming system that should be used in their place (if any). + */ + @Child(name = "replacedBy", type = {NamingSystem.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use this instead", formalDefinition="For naming systems that are retired, indicates the naming system that should be used in their place (if any)." ) + protected Reference replacedBy; + + /** + * The actual object that is the target of the reference (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) + */ + protected NamingSystem replacedByTarget; + + private static final long serialVersionUID = -1337110053L; + + /* + * Constructor + */ + public NamingSystem() { + super(); + } + + /* + * Constructor + */ + public NamingSystem(StringType name, Enumeration status, Enumeration kind, DateTimeType date) { + super(); + this.name = name; + this.status = status; + this.kind = kind; + this.date = date; + } + + /** + * @return {@link #name} (The descriptive name of this particular identifier type or code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The descriptive name of this particular identifier type or code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public NamingSystem setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The descriptive name of this particular identifier type or code system. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The descriptive name of this particular identifier type or code system. + */ + public NamingSystem setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (Indicates whether the naming system is "ready for use" or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates whether the naming system is "ready for use" or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public NamingSystem setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates whether the naming system is "ready for use" or not. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates whether the naming system is "ready for use" or not. + */ + public NamingSystem setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Enumeration getKindElement() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new Enumeration(new NamingSystemTypeEnumFactory()); // bb + return this.kind; + } + + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public NamingSystem setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return Indicates the purpose for the naming system - what kinds of things does it make unique? + */ + public NamingSystemType getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value Indicates the purpose for the naming system - what kinds of things does it make unique? + */ + public NamingSystem setKind(NamingSystemType value) { + if (this.kind == null) + this.kind = new Enumeration(new NamingSystemTypeEnumFactory()); + this.kind.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public NamingSystem setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the naming system. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the naming system. + */ + public NamingSystem setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (NamingSystemContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public NamingSystemContactComponent addContact() { //3 + NamingSystemContactComponent t = new NamingSystemContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public NamingSystem addContact(NamingSystemContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value + */ + public StringType getResponsibleElement() { + if (this.responsible == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.responsible"); + else if (Configuration.doAutoCreate()) + this.responsible = new StringType(); // bb + return this.responsible; + } + + public boolean hasResponsibleElement() { + return this.responsible != null && !this.responsible.isEmpty(); + } + + public boolean hasResponsible() { + return this.responsible != null && !this.responsible.isEmpty(); + } + + /** + * @param value {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value + */ + public NamingSystem setResponsibleElement(StringType value) { + this.responsible = value; + return this; + } + + /** + * @return The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. + */ + public String getResponsible() { + return this.responsible == null ? null : this.responsible.getValue(); + } + + /** + * @param value The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. + */ + public NamingSystem setResponsible(String value) { + if (Utilities.noString(value)) + this.responsible = null; + else { + if (this.responsible == null) + this.responsible = new StringType(); + this.responsible.setValue(value); + } + return this; + } + + /** + * @return {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public NamingSystem setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + public NamingSystem setDate(Date value) { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + return this; + } + + /** + * @return {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.) + */ + public NamingSystem setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #description} (Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public NamingSystem setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Details about what the namespace identifies including scope, granularity, version labeling, etc. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Details about what the namespace identifies including scope, granularity, version labeling, etc. + */ + public NamingSystem setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public NamingSystem addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + */ + public StringType getUsageElement() { + if (this.usage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.usage"); + else if (Configuration.doAutoCreate()) + this.usage = new StringType(); // bb + return this.usage; + } + + public boolean hasUsageElement() { + return this.usage != null && !this.usage.isEmpty(); + } + + public boolean hasUsage() { + return this.usage != null && !this.usage.isEmpty(); + } + + /** + * @param value {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + */ + public NamingSystem setUsageElement(StringType value) { + this.usage = value; + return this; + } + + /** + * @return Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. + */ + public String getUsage() { + return this.usage == null ? null : this.usage.getValue(); + } + + /** + * @param value Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. + */ + public NamingSystem setUsage(String value) { + if (Utilities.noString(value)) + this.usage = null; + else { + if (this.usage == null) + this.usage = new StringType(); + this.usage.setValue(value); + } + return this; + } + + /** + * @return {@link #uniqueId} (Indicates how the system may be identified when referenced in electronic exchange.) + */ + public List getUniqueId() { + if (this.uniqueId == null) + this.uniqueId = new ArrayList(); + return this.uniqueId; + } + + public boolean hasUniqueId() { + if (this.uniqueId == null) + return false; + for (NamingSystemUniqueIdComponent item : this.uniqueId) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #uniqueId} (Indicates how the system may be identified when referenced in electronic exchange.) + */ + // syntactic sugar + public NamingSystemUniqueIdComponent addUniqueId() { //3 + NamingSystemUniqueIdComponent t = new NamingSystemUniqueIdComponent(); + if (this.uniqueId == null) + this.uniqueId = new ArrayList(); + this.uniqueId.add(t); + return t; + } + + // syntactic sugar + public NamingSystem addUniqueId(NamingSystemUniqueIdComponent t) { //3 + if (t == null) + return this; + if (this.uniqueId == null) + this.uniqueId = new ArrayList(); + this.uniqueId.add(t); + return this; + } + + /** + * @return {@link #replacedBy} (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) + */ + public Reference getReplacedBy() { + if (this.replacedBy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.replacedBy"); + else if (Configuration.doAutoCreate()) + this.replacedBy = new Reference(); // cc + return this.replacedBy; + } + + public boolean hasReplacedBy() { + return this.replacedBy != null && !this.replacedBy.isEmpty(); + } + + /** + * @param value {@link #replacedBy} (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) + */ + public NamingSystem setReplacedBy(Reference value) { + this.replacedBy = value; + return this; + } + + /** + * @return {@link #replacedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) + */ + public NamingSystem getReplacedByTarget() { + if (this.replacedByTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.replacedBy"); + else if (Configuration.doAutoCreate()) + this.replacedByTarget = new NamingSystem(); // aa + return this.replacedByTarget; + } + + /** + * @param value {@link #replacedBy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) + */ + public NamingSystem setReplacedByTarget(NamingSystem value) { + this.replacedByTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The descriptive name of this particular identifier type or code system.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "Indicates whether the naming system is \"ready for use\" or not.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("kind", "code", "Indicates the purpose for the naming system - what kinds of things does it make unique?", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the naming system.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("responsible", "string", "The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", 0, java.lang.Integer.MAX_VALUE, responsible)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("type", "CodeableConcept", "Categorizes a naming system for easier search by grouping related naming systems.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("description", "string", "Details about what the namespace identifies including scope, granularity, version labeling, etc.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("usage", "string", "Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.", 0, java.lang.Integer.MAX_VALUE, usage)); + childrenList.add(new Property("uniqueId", "", "Indicates how the system may be identified when referenced in electronic exchange.", 0, java.lang.Integer.MAX_VALUE, uniqueId)); + childrenList.add(new Property("replacedBy", "Reference(NamingSystem)", "For naming systems that are retired, indicates the naming system that should be used in their place (if any).", 0, java.lang.Integer.MAX_VALUE, replacedBy)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("kind")) + this.kind = new NamingSystemTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((NamingSystemContactComponent) value); + else if (name.equals("responsible")) + this.responsible = castToString(value); // StringType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("usage")) + this.usage = castToString(value); // StringType + else if (name.equals("uniqueId")) + this.getUniqueId().add((NamingSystemUniqueIdComponent) value); + else if (name.equals("replacedBy")) + this.replacedBy = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.status"); + } + else if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.kind"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("responsible")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.responsible"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.date"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("usage")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.usage"); + } + else if (name.equals("uniqueId")) { + return addUniqueId(); + } + else if (name.equals("replacedBy")) { + this.replacedBy = new Reference(); + return this.replacedBy; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "NamingSystem"; + + } + + public NamingSystem copy() { + NamingSystem dst = new NamingSystem(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.kind = kind == null ? null : kind.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (NamingSystemContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.responsible = responsible == null ? null : responsible.copy(); + dst.date = date == null ? null : date.copy(); + dst.type = type == null ? null : type.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.usage = usage == null ? null : usage.copy(); + if (uniqueId != null) { + dst.uniqueId = new ArrayList(); + for (NamingSystemUniqueIdComponent i : uniqueId) + dst.uniqueId.add(i.copy()); + }; + dst.replacedBy = replacedBy == null ? null : replacedBy.copy(); + return dst; + } + + protected NamingSystem typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NamingSystem)) + return false; + NamingSystem o = (NamingSystem) other; + return compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(responsible, o.responsible, true) + && compareDeep(date, o.date, true) && compareDeep(type, o.type, true) && compareDeep(description, o.description, true) + && compareDeep(useContext, o.useContext, true) && compareDeep(usage, o.usage, true) && compareDeep(uniqueId, o.uniqueId, true) + && compareDeep(replacedBy, o.replacedBy, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NamingSystem)) + return false; + NamingSystem o = (NamingSystem) other; + return compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(kind, o.kind, true) + && compareValues(publisher, o.publisher, true) && compareValues(responsible, o.responsible, true) && compareValues(date, o.date, true) + && compareValues(description, o.description, true) && compareValues(usage, o.usage, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) + && (kind == null || kind.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) + && (responsible == null || responsible.isEmpty()) && (date == null || date.isEmpty()) && (type == null || type.isEmpty()) + && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (usage == null || usage.isEmpty()) && (uniqueId == null || uniqueId.isEmpty()) && (replacedBy == null || replacedBy.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.NamingSystem; + } + + @SearchParamDefinition(name="date", path="NamingSystem.date", description="Publication Date(/time)", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="period", path="NamingSystem.uniqueId.period", description="When is identifier valid?", type="date" ) + public static final String SP_PERIOD = "period"; + @SearchParamDefinition(name="kind", path="NamingSystem.kind", description="codesystem | identifier | root", type="token" ) + public static final String SP_KIND = "kind"; + @SearchParamDefinition(name="type", path="NamingSystem.type", description="e.g. driver, provider, patient, bank etc.", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="id-type", path="NamingSystem.uniqueId.type", description="oid | uuid | uri | other", type="token" ) + public static final String SP_IDTYPE = "id-type"; + @SearchParamDefinition(name="responsible", path="NamingSystem.responsible", description="Who maintains system namespace?", type="string" ) + public static final String SP_RESPONSIBLE = "responsible"; + @SearchParamDefinition(name="contact", path="NamingSystem.contact.name", description="Name of a individual to contact", type="string" ) + public static final String SP_CONTACT = "contact"; + @SearchParamDefinition(name="name", path="NamingSystem.name", description="Human-readable label", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="NamingSystem.useContext", description="Content intends to support these contexts", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="NamingSystem.publisher", description="Name of the publisher (Organization or individual)", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="telecom", path="NamingSystem.contact.telecom", description="Contact details for individual or publisher", type="token" ) + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name="value", path="NamingSystem.uniqueId.value", description="The unique identifier", type="string" ) + public static final String SP_VALUE = "value"; + @SearchParamDefinition(name="replaced-by", path="NamingSystem.replacedBy", description="Use this instead", type="reference" ) + public static final String SP_REPLACEDBY = "replaced-by"; + @SearchParamDefinition(name="status", path="NamingSystem.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Narrative.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Narrative.java new file mode 100644 index 00000000000..cb13ed722b7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Narrative.java @@ -0,0 +1,333 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A human-readable formatted text, including images. + */ +@DatatypeDef(name="Narrative") +public class Narrative extends BaseNarrative implements INarrative { + + public enum NarrativeStatus { + /** + * The contents of the narrative are entirely generated from the structured data in the content. + */ + GENERATED, + /** + * The contents of the narrative are entirely generated from the structured data in the content and some of the content is generated from extensions + */ + EXTENSIONS, + /** + * The contents of the narrative contain additional information not found in the structured data + */ + ADDITIONAL, + /** + * The contents of the narrative are some equivalent of "No human-readable text provided in this case" + */ + EMPTY, + /** + * added to help the parsers + */ + NULL; + public static NarrativeStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("generated".equals(codeString)) + return GENERATED; + if ("extensions".equals(codeString)) + return EXTENSIONS; + if ("additional".equals(codeString)) + return ADDITIONAL; + if ("empty".equals(codeString)) + return EMPTY; + throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GENERATED: return "generated"; + case EXTENSIONS: return "extensions"; + case ADDITIONAL: return "additional"; + case EMPTY: return "empty"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case GENERATED: return "http://hl7.org/fhir/narrative-status"; + case EXTENSIONS: return "http://hl7.org/fhir/narrative-status"; + case ADDITIONAL: return "http://hl7.org/fhir/narrative-status"; + case EMPTY: return "http://hl7.org/fhir/narrative-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case GENERATED: return "The contents of the narrative are entirely generated from the structured data in the content."; + case EXTENSIONS: return "The contents of the narrative are entirely generated from the structured data in the content and some of the content is generated from extensions"; + case ADDITIONAL: return "The contents of the narrative contain additional information not found in the structured data"; + case EMPTY: return "The contents of the narrative are some equivalent of \"No human-readable text provided in this case\""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GENERATED: return "Generated"; + case EXTENSIONS: return "Extensions"; + case ADDITIONAL: return "Additional"; + case EMPTY: return "Empty"; + default: return "?"; + } + } + } + + public static class NarrativeStatusEnumFactory implements EnumFactory { + public NarrativeStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("generated".equals(codeString)) + return NarrativeStatus.GENERATED; + if ("extensions".equals(codeString)) + return NarrativeStatus.EXTENSIONS; + if ("additional".equals(codeString)) + return NarrativeStatus.ADDITIONAL; + if ("empty".equals(codeString)) + return NarrativeStatus.EMPTY; + throw new IllegalArgumentException("Unknown NarrativeStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("generated".equals(codeString)) + return new Enumeration(this, NarrativeStatus.GENERATED); + if ("extensions".equals(codeString)) + return new Enumeration(this, NarrativeStatus.EXTENSIONS); + if ("additional".equals(codeString)) + return new Enumeration(this, NarrativeStatus.ADDITIONAL); + if ("empty".equals(codeString)) + return new Enumeration(this, NarrativeStatus.EMPTY); + throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'"); + } + public String toCode(NarrativeStatus code) { + if (code == NarrativeStatus.GENERATED) + return "generated"; + if (code == NarrativeStatus.EXTENSIONS) + return "extensions"; + if (code == NarrativeStatus.ADDITIONAL) + return "additional"; + if (code == NarrativeStatus.EMPTY) + return "empty"; + return "?"; + } + } + + /** + * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data. + */ + @Child(name = "status", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="generated | extensions | additional | empty", formalDefinition="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." ) + protected Enumeration status; + + /** + * The actual narrative content, a stripped down version of XHTML. + */ + @Child(name = "div", type = {}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Limited xhtml content", formalDefinition="The actual narrative content, a stripped down version of XHTML." ) + protected XhtmlNode div; + + private static final long serialVersionUID = 1463852859L; + + /* + * Constructor + */ + public Narrative() { + super(); + } + + /* + * Constructor + */ + public Narrative(Enumeration status, XhtmlNode div) { + super(); + this.status = status; + this.div = div; + } + + /** + * @return {@link #status} (The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Narrative.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new NarrativeStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Narrative setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data. + */ + public NarrativeStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data. + */ + public Narrative setStatus(NarrativeStatus value) { + if (this.status == null) + this.status = new Enumeration(new NarrativeStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #div} (The actual narrative content, a stripped down version of XHTML.) + */ + public XhtmlNode getDiv() { + if (this.div == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Narrative.div"); + else if (Configuration.doAutoCreate()) + this.div = new XhtmlNode(); // cc + return this.div; + } + + public boolean hasDiv() { + return this.div != null && !this.div.isEmpty(); + } + + /** + * @param value {@link #div} (The actual narrative content, a stripped down version of XHTML.) + */ + public Narrative setDiv(XhtmlNode value) { + this.div = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "code", "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", 0, java.lang.Integer.MAX_VALUE, status)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = new NarrativeStatusEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Narrative.status"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Narrative"; + + } + + public Narrative copy() { + Narrative dst = new Narrative(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + dst.div = div == null ? null : div.copy(); + return dst; + } + + protected Narrative typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Narrative)) + return false; + Narrative o = (Narrative) other; + return compareDeep(status, o.status, true) && compareDeep(div, o.div, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Narrative)) + return false; + Narrative o = (Narrative) other; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (div == null || div.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NutritionOrder.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NutritionOrder.java new file mode 100644 index 00000000000..ab49b8b3187 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/NutritionOrder.java @@ -0,0 +1,2808 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ +@ResourceDef(name="NutritionOrder", profile="http://hl7.org/fhir/Profile/NutritionOrder") +public class NutritionOrder extends DomainResource { + + public enum NutritionOrderStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request is in preliminary form prior to being sent. + */ + DRAFT, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The request is 'actionable', but not all actions that are implied by it have occurred yet. + */ + ACTIVE, + /** + * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit). + */ + COMPLETED, + /** + * The request has been withdrawn and is no longer actionable. + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static NutritionOrderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("draft".equals(codeString)) + return DRAFT; + if ("planned".equals(codeString)) + return PLANNED; + if ("requested".equals(codeString)) + return REQUESTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case DRAFT: return "draft"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/nutrition-order-status"; + case DRAFT: return "http://hl7.org/fhir/nutrition-order-status"; + case PLANNED: return "http://hl7.org/fhir/nutrition-order-status"; + case REQUESTED: return "http://hl7.org/fhir/nutrition-order-status"; + case ACTIVE: return "http://hl7.org/fhir/nutrition-order-status"; + case ONHOLD: return "http://hl7.org/fhir/nutrition-order-status"; + case COMPLETED: return "http://hl7.org/fhir/nutrition-order-status"; + case CANCELLED: return "http://hl7.org/fhir/nutrition-order-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case DRAFT: return "The request is in preliminary form prior to being sent."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case ACTIVE: return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; + case ONHOLD: return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case COMPLETED: return "All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit)."; + case CANCELLED: return "The request has been withdrawn and is no longer actionable."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case DRAFT: return "Draft"; + case PLANNED: return "Planned"; + case REQUESTED: return "Requested"; + case ACTIVE: return "Active"; + case ONHOLD: return "On-Hold"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class NutritionOrderStatusEnumFactory implements EnumFactory { + public NutritionOrderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return NutritionOrderStatus.PROPOSED; + if ("draft".equals(codeString)) + return NutritionOrderStatus.DRAFT; + if ("planned".equals(codeString)) + return NutritionOrderStatus.PLANNED; + if ("requested".equals(codeString)) + return NutritionOrderStatus.REQUESTED; + if ("active".equals(codeString)) + return NutritionOrderStatus.ACTIVE; + if ("on-hold".equals(codeString)) + return NutritionOrderStatus.ONHOLD; + if ("completed".equals(codeString)) + return NutritionOrderStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return NutritionOrderStatus.CANCELLED; + throw new IllegalArgumentException("Unknown NutritionOrderStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.PROPOSED); + if ("draft".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.DRAFT); + if ("planned".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.PLANNED); + if ("requested".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.REQUESTED); + if ("active".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.ACTIVE); + if ("on-hold".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.ONHOLD); + if ("completed".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.COMPLETED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, NutritionOrderStatus.CANCELLED); + throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'"); + } + public String toCode(NutritionOrderStatus code) { + if (code == NutritionOrderStatus.PROPOSED) + return "proposed"; + if (code == NutritionOrderStatus.DRAFT) + return "draft"; + if (code == NutritionOrderStatus.PLANNED) + return "planned"; + if (code == NutritionOrderStatus.REQUESTED) + return "requested"; + if (code == NutritionOrderStatus.ACTIVE) + return "active"; + if (code == NutritionOrderStatus.ONHOLD) + return "on-hold"; + if (code == NutritionOrderStatus.COMPLETED) + return "completed"; + if (code == NutritionOrderStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + @Block() + public static class NutritionOrderOralDietComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of oral diet or diet restrictions that describe what can be consumed orally", formalDefinition="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet." ) + protected List type; + + /** + * The time period and frequency at which the diet should be given. + */ + @Child(name = "schedule", type = {Timing.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Scheduled frequency of diet", formalDefinition="The time period and frequency at which the diet should be given." ) + protected List schedule; + + /** + * Class that defines the quantity and type of nutrient modifications required for the oral diet. + */ + @Child(name = "nutrient", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Required nutrient modifications", formalDefinition="Class that defines the quantity and type of nutrient modifications required for the oral diet." ) + protected List nutrient; + + /** + * Class that describes any texture modifications required for the patient to safely consume various types of solid foods. + */ + @Child(name = "texture", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Required texture modifications", formalDefinition="Class that describes any texture modifications required for the patient to safely consume various types of solid foods." ) + protected List texture; + + /** + * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient. + */ + @Child(name = "fluidConsistencyType", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The required consistency of fluids and liquids provided to the patient", formalDefinition="The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient." ) + protected List fluidConsistencyType; + + /** + * Free text or additional instructions or information pertaining to the oral diet. + */ + @Child(name = "instruction", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instructions or additional information about the oral diet", formalDefinition="Free text or additional instructions or information pertaining to the oral diet." ) + protected StringType instruction; + + private static final long serialVersionUID = 973058412L; + + /* + * Constructor + */ + public NutritionOrderOralDietComponent() { + super(); + } + + /** + * @return {@link #type} (The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderOralDietComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #schedule} (The time period and frequency at which the diet should be given.) + */ + public List getSchedule() { + if (this.schedule == null) + this.schedule = new ArrayList(); + return this.schedule; + } + + public boolean hasSchedule() { + if (this.schedule == null) + return false; + for (Timing item : this.schedule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #schedule} (The time period and frequency at which the diet should be given.) + */ + // syntactic sugar + public Timing addSchedule() { //3 + Timing t = new Timing(); + if (this.schedule == null) + this.schedule = new ArrayList(); + this.schedule.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderOralDietComponent addSchedule(Timing t) { //3 + if (t == null) + return this; + if (this.schedule == null) + this.schedule = new ArrayList(); + this.schedule.add(t); + return this; + } + + /** + * @return {@link #nutrient} (Class that defines the quantity and type of nutrient modifications required for the oral diet.) + */ + public List getNutrient() { + if (this.nutrient == null) + this.nutrient = new ArrayList(); + return this.nutrient; + } + + public boolean hasNutrient() { + if (this.nutrient == null) + return false; + for (NutritionOrderOralDietNutrientComponent item : this.nutrient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #nutrient} (Class that defines the quantity and type of nutrient modifications required for the oral diet.) + */ + // syntactic sugar + public NutritionOrderOralDietNutrientComponent addNutrient() { //3 + NutritionOrderOralDietNutrientComponent t = new NutritionOrderOralDietNutrientComponent(); + if (this.nutrient == null) + this.nutrient = new ArrayList(); + this.nutrient.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderOralDietComponent addNutrient(NutritionOrderOralDietNutrientComponent t) { //3 + if (t == null) + return this; + if (this.nutrient == null) + this.nutrient = new ArrayList(); + this.nutrient.add(t); + return this; + } + + /** + * @return {@link #texture} (Class that describes any texture modifications required for the patient to safely consume various types of solid foods.) + */ + public List getTexture() { + if (this.texture == null) + this.texture = new ArrayList(); + return this.texture; + } + + public boolean hasTexture() { + if (this.texture == null) + return false; + for (NutritionOrderOralDietTextureComponent item : this.texture) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #texture} (Class that describes any texture modifications required for the patient to safely consume various types of solid foods.) + */ + // syntactic sugar + public NutritionOrderOralDietTextureComponent addTexture() { //3 + NutritionOrderOralDietTextureComponent t = new NutritionOrderOralDietTextureComponent(); + if (this.texture == null) + this.texture = new ArrayList(); + this.texture.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderOralDietComponent addTexture(NutritionOrderOralDietTextureComponent t) { //3 + if (t == null) + return this; + if (this.texture == null) + this.texture = new ArrayList(); + this.texture.add(t); + return this; + } + + /** + * @return {@link #fluidConsistencyType} (The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.) + */ + public List getFluidConsistencyType() { + if (this.fluidConsistencyType == null) + this.fluidConsistencyType = new ArrayList(); + return this.fluidConsistencyType; + } + + public boolean hasFluidConsistencyType() { + if (this.fluidConsistencyType == null) + return false; + for (CodeableConcept item : this.fluidConsistencyType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #fluidConsistencyType} (The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.) + */ + // syntactic sugar + public CodeableConcept addFluidConsistencyType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.fluidConsistencyType == null) + this.fluidConsistencyType = new ArrayList(); + this.fluidConsistencyType.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderOralDietComponent addFluidConsistencyType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.fluidConsistencyType == null) + this.fluidConsistencyType = new ArrayList(); + this.fluidConsistencyType.add(t); + return this; + } + + /** + * @return {@link #instruction} (Free text or additional instructions or information pertaining to the oral diet.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public StringType getInstructionElement() { + if (this.instruction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderOralDietComponent.instruction"); + else if (Configuration.doAutoCreate()) + this.instruction = new StringType(); // bb + return this.instruction; + } + + public boolean hasInstructionElement() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + public boolean hasInstruction() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + /** + * @param value {@link #instruction} (Free text or additional instructions or information pertaining to the oral diet.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public NutritionOrderOralDietComponent setInstructionElement(StringType value) { + this.instruction = value; + return this; + } + + /** + * @return Free text or additional instructions or information pertaining to the oral diet. + */ + public String getInstruction() { + return this.instruction == null ? null : this.instruction.getValue(); + } + + /** + * @param value Free text or additional instructions or information pertaining to the oral diet. + */ + public NutritionOrderOralDietComponent setInstruction(String value) { + if (Utilities.noString(value)) + this.instruction = null; + else { + if (this.instruction == null) + this.instruction = new StringType(); + this.instruction.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("schedule", "Timing", "The time period and frequency at which the diet should be given.", 0, java.lang.Integer.MAX_VALUE, schedule)); + childrenList.add(new Property("nutrient", "", "Class that defines the quantity and type of nutrient modifications required for the oral diet.", 0, java.lang.Integer.MAX_VALUE, nutrient)); + childrenList.add(new Property("texture", "", "Class that describes any texture modifications required for the patient to safely consume various types of solid foods.", 0, java.lang.Integer.MAX_VALUE, texture)); + childrenList.add(new Property("fluidConsistencyType", "CodeableConcept", "The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.", 0, java.lang.Integer.MAX_VALUE, fluidConsistencyType)); + childrenList.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral diet.", 0, java.lang.Integer.MAX_VALUE, instruction)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("schedule")) + this.getSchedule().add(castToTiming(value)); + else if (name.equals("nutrient")) + this.getNutrient().add((NutritionOrderOralDietNutrientComponent) value); + else if (name.equals("texture")) + this.getTexture().add((NutritionOrderOralDietTextureComponent) value); + else if (name.equals("fluidConsistencyType")) + this.getFluidConsistencyType().add(castToCodeableConcept(value)); + else if (name.equals("instruction")) + this.instruction = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("schedule")) { + return addSchedule(); + } + else if (name.equals("nutrient")) { + return addNutrient(); + } + else if (name.equals("texture")) { + return addTexture(); + } + else if (name.equals("fluidConsistencyType")) { + return addFluidConsistencyType(); + } + else if (name.equals("instruction")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instruction"); + } + else + return super.addChild(name); + } + + public NutritionOrderOralDietComponent copy() { + NutritionOrderOralDietComponent dst = new NutritionOrderOralDietComponent(); + copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + if (schedule != null) { + dst.schedule = new ArrayList(); + for (Timing i : schedule) + dst.schedule.add(i.copy()); + }; + if (nutrient != null) { + dst.nutrient = new ArrayList(); + for (NutritionOrderOralDietNutrientComponent i : nutrient) + dst.nutrient.add(i.copy()); + }; + if (texture != null) { + dst.texture = new ArrayList(); + for (NutritionOrderOralDietTextureComponent i : texture) + dst.texture.add(i.copy()); + }; + if (fluidConsistencyType != null) { + dst.fluidConsistencyType = new ArrayList(); + for (CodeableConcept i : fluidConsistencyType) + dst.fluidConsistencyType.add(i.copy()); + }; + dst.instruction = instruction == null ? null : instruction.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderOralDietComponent)) + return false; + NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other; + return compareDeep(type, o.type, true) && compareDeep(schedule, o.schedule, true) && compareDeep(nutrient, o.nutrient, true) + && compareDeep(texture, o.texture, true) && compareDeep(fluidConsistencyType, o.fluidConsistencyType, true) + && compareDeep(instruction, o.instruction, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderOralDietComponent)) + return false; + NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other; + return compareValues(instruction, o.instruction, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (schedule == null || schedule.isEmpty()) + && (nutrient == null || nutrient.isEmpty()) && (texture == null || texture.isEmpty()) && (fluidConsistencyType == null || fluidConsistencyType.isEmpty()) + && (instruction == null || instruction.isEmpty()); + } + + public String fhirType() { + return "NutritionOrder.oralDiet"; + + } + + } + + @Block() + public static class NutritionOrderOralDietNutrientComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The nutrient that is being modified such as carbohydrate or sodium. + */ + @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of nutrient that is being modified", formalDefinition="The nutrient that is being modified such as carbohydrate or sodium." ) + protected CodeableConcept modifier; + + /** + * The quantity of the specified nutrient to include in diet. + */ + @Child(name = "amount", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Quantity of the specified nutrient", formalDefinition="The quantity of the specified nutrient to include in diet." ) + protected SimpleQuantity amount; + + private static final long serialVersionUID = 465107295L; + + /* + * Constructor + */ + public NutritionOrderOralDietNutrientComponent() { + super(); + } + + /** + * @return {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) + */ + public CodeableConcept getModifier() { + if (this.modifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.modifier"); + else if (Configuration.doAutoCreate()) + this.modifier = new CodeableConcept(); // cc + return this.modifier; + } + + public boolean hasModifier() { + return this.modifier != null && !this.modifier.isEmpty(); + } + + /** + * @param value {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) + */ + public NutritionOrderOralDietNutrientComponent setModifier(CodeableConcept value) { + this.modifier = value; + return this; + } + + /** + * @return {@link #amount} (The quantity of the specified nutrient to include in diet.) + */ + public SimpleQuantity getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new SimpleQuantity(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (The quantity of the specified nutrient to include in diet.) + */ + public NutritionOrderOralDietNutrientComponent setAmount(SimpleQuantity value) { + this.amount = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("modifier", "CodeableConcept", "The nutrient that is being modified such as carbohydrate or sodium.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("amount", "SimpleQuantity", "The quantity of the specified nutrient to include in diet.", 0, java.lang.Integer.MAX_VALUE, amount)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("modifier")) + this.modifier = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("amount")) + this.amount = castToSimpleQuantity(value); // SimpleQuantity + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("modifier")) { + this.modifier = new CodeableConcept(); + return this.modifier; + } + else if (name.equals("amount")) { + this.amount = new SimpleQuantity(); + return this.amount; + } + else + return super.addChild(name); + } + + public NutritionOrderOralDietNutrientComponent copy() { + NutritionOrderOralDietNutrientComponent dst = new NutritionOrderOralDietNutrientComponent(); + copyValues(dst); + dst.modifier = modifier == null ? null : modifier.copy(); + dst.amount = amount == null ? null : amount.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderOralDietNutrientComponent)) + return false; + NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other; + return compareDeep(modifier, o.modifier, true) && compareDeep(amount, o.amount, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderOralDietNutrientComponent)) + return false; + NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (modifier == null || modifier.isEmpty()) && (amount == null || amount.isEmpty()) + ; + } + + public String fhirType() { + return "NutritionOrder.oralDiet.nutrient"; + + } + + } + + @Block() + public static class NutritionOrderOralDietTextureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed. + */ + @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code to indicate how to alter the texture of the foods, e.g. pureed", formalDefinition="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed." ) + protected CodeableConcept modifier; + + /** + * The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types. + */ + @Child(name = "foodType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Concepts that are used to identify an entity that is ingested for nutritional purposes", formalDefinition="The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types." ) + protected CodeableConcept foodType; + + private static final long serialVersionUID = -56402817L; + + /* + * Constructor + */ + public NutritionOrderOralDietTextureComponent() { + super(); + } + + /** + * @return {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) + */ + public CodeableConcept getModifier() { + if (this.modifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.modifier"); + else if (Configuration.doAutoCreate()) + this.modifier = new CodeableConcept(); // cc + return this.modifier; + } + + public boolean hasModifier() { + return this.modifier != null && !this.modifier.isEmpty(); + } + + /** + * @param value {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) + */ + public NutritionOrderOralDietTextureComponent setModifier(CodeableConcept value) { + this.modifier = value; + return this; + } + + /** + * @return {@link #foodType} (The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.) + */ + public CodeableConcept getFoodType() { + if (this.foodType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.foodType"); + else if (Configuration.doAutoCreate()) + this.foodType = new CodeableConcept(); // cc + return this.foodType; + } + + public boolean hasFoodType() { + return this.foodType != null && !this.foodType.isEmpty(); + } + + /** + * @param value {@link #foodType} (The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.) + */ + public NutritionOrderOralDietTextureComponent setFoodType(CodeableConcept value) { + this.foodType = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("modifier", "CodeableConcept", "Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("foodType", "CodeableConcept", "The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.", 0, java.lang.Integer.MAX_VALUE, foodType)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("modifier")) + this.modifier = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("foodType")) + this.foodType = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("modifier")) { + this.modifier = new CodeableConcept(); + return this.modifier; + } + else if (name.equals("foodType")) { + this.foodType = new CodeableConcept(); + return this.foodType; + } + else + return super.addChild(name); + } + + public NutritionOrderOralDietTextureComponent copy() { + NutritionOrderOralDietTextureComponent dst = new NutritionOrderOralDietTextureComponent(); + copyValues(dst); + dst.modifier = modifier == null ? null : modifier.copy(); + dst.foodType = foodType == null ? null : foodType.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderOralDietTextureComponent)) + return false; + NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other; + return compareDeep(modifier, o.modifier, true) && compareDeep(foodType, o.foodType, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderOralDietTextureComponent)) + return false; + NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (modifier == null || modifier.isEmpty()) && (foodType == null || foodType.isEmpty()) + ; + } + + public String fhirType() { + return "NutritionOrder.oralDiet.texture"; + + } + + } + + @Block() + public static class NutritionOrderSupplementComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of supplement product requested", formalDefinition="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement." ) + protected CodeableConcept type; + + /** + * The product or brand name of the nutritional supplement such as "Acme Protein Shake". + */ + @Child(name = "productName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Product or brand name of the nutritional supplement", formalDefinition="The product or brand name of the nutritional supplement such as \"Acme Protein Shake\"." ) + protected StringType productName; + + /** + * The time period and frequency at which the supplement(s) should be given. + */ + @Child(name = "schedule", type = {Timing.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Scheduled frequency of supplement", formalDefinition="The time period and frequency at which the supplement(s) should be given." ) + protected List schedule; + + /** + * The amount of the nutritional supplement to be given. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Amount of the nutritional supplement", formalDefinition="The amount of the nutritional supplement to be given." ) + protected SimpleQuantity quantity; + + /** + * Free text or additional instructions or information pertaining to the oral supplement. + */ + @Child(name = "instruction", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instructions or additional information about the oral supplement", formalDefinition="Free text or additional instructions or information pertaining to the oral supplement." ) + protected StringType instruction; + + private static final long serialVersionUID = 297545236L; + + /* + * Constructor + */ + public NutritionOrderSupplementComponent() { + super(); + } + + /** + * @return {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) + */ + public NutritionOrderSupplementComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #productName} (The product or brand name of the nutritional supplement such as "Acme Protein Shake".). This is the underlying object with id, value and extensions. The accessor "getProductName" gives direct access to the value + */ + public StringType getProductNameElement() { + if (this.productName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.productName"); + else if (Configuration.doAutoCreate()) + this.productName = new StringType(); // bb + return this.productName; + } + + public boolean hasProductNameElement() { + return this.productName != null && !this.productName.isEmpty(); + } + + public boolean hasProductName() { + return this.productName != null && !this.productName.isEmpty(); + } + + /** + * @param value {@link #productName} (The product or brand name of the nutritional supplement such as "Acme Protein Shake".). This is the underlying object with id, value and extensions. The accessor "getProductName" gives direct access to the value + */ + public NutritionOrderSupplementComponent setProductNameElement(StringType value) { + this.productName = value; + return this; + } + + /** + * @return The product or brand name of the nutritional supplement such as "Acme Protein Shake". + */ + public String getProductName() { + return this.productName == null ? null : this.productName.getValue(); + } + + /** + * @param value The product or brand name of the nutritional supplement such as "Acme Protein Shake". + */ + public NutritionOrderSupplementComponent setProductName(String value) { + if (Utilities.noString(value)) + this.productName = null; + else { + if (this.productName == null) + this.productName = new StringType(); + this.productName.setValue(value); + } + return this; + } + + /** + * @return {@link #schedule} (The time period and frequency at which the supplement(s) should be given.) + */ + public List getSchedule() { + if (this.schedule == null) + this.schedule = new ArrayList(); + return this.schedule; + } + + public boolean hasSchedule() { + if (this.schedule == null) + return false; + for (Timing item : this.schedule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #schedule} (The time period and frequency at which the supplement(s) should be given.) + */ + // syntactic sugar + public Timing addSchedule() { //3 + Timing t = new Timing(); + if (this.schedule == null) + this.schedule = new ArrayList(); + this.schedule.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderSupplementComponent addSchedule(Timing t) { //3 + if (t == null) + return this; + if (this.schedule == null) + this.schedule = new ArrayList(); + this.schedule.add(t); + return this; + } + + /** + * @return {@link #quantity} (The amount of the nutritional supplement to be given.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of the nutritional supplement to be given.) + */ + public NutritionOrderSupplementComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #instruction} (Free text or additional instructions or information pertaining to the oral supplement.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public StringType getInstructionElement() { + if (this.instruction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.instruction"); + else if (Configuration.doAutoCreate()) + this.instruction = new StringType(); // bb + return this.instruction; + } + + public boolean hasInstructionElement() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + public boolean hasInstruction() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + /** + * @param value {@link #instruction} (Free text or additional instructions or information pertaining to the oral supplement.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public NutritionOrderSupplementComponent setInstructionElement(StringType value) { + this.instruction = value; + return this; + } + + /** + * @return Free text or additional instructions or information pertaining to the oral supplement. + */ + public String getInstruction() { + return this.instruction == null ? null : this.instruction.getValue(); + } + + /** + * @param value Free text or additional instructions or information pertaining to the oral supplement. + */ + public NutritionOrderSupplementComponent setInstruction(String value) { + if (Utilities.noString(value)) + this.instruction = null; + else { + if (this.instruction == null) + this.instruction = new StringType(); + this.instruction.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("productName", "string", "The product or brand name of the nutritional supplement such as \"Acme Protein Shake\".", 0, java.lang.Integer.MAX_VALUE, productName)); + childrenList.add(new Property("schedule", "Timing", "The time period and frequency at which the supplement(s) should be given.", 0, java.lang.Integer.MAX_VALUE, schedule)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount of the nutritional supplement to be given.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral supplement.", 0, java.lang.Integer.MAX_VALUE, instruction)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("productName")) + this.productName = castToString(value); // StringType + else if (name.equals("schedule")) + this.getSchedule().add(castToTiming(value)); + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("instruction")) + this.instruction = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("productName")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.productName"); + } + else if (name.equals("schedule")) { + return addSchedule(); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("instruction")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instruction"); + } + else + return super.addChild(name); + } + + public NutritionOrderSupplementComponent copy() { + NutritionOrderSupplementComponent dst = new NutritionOrderSupplementComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.productName = productName == null ? null : productName.copy(); + if (schedule != null) { + dst.schedule = new ArrayList(); + for (Timing i : schedule) + dst.schedule.add(i.copy()); + }; + dst.quantity = quantity == null ? null : quantity.copy(); + dst.instruction = instruction == null ? null : instruction.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderSupplementComponent)) + return false; + NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other; + return compareDeep(type, o.type, true) && compareDeep(productName, o.productName, true) && compareDeep(schedule, o.schedule, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(instruction, o.instruction, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderSupplementComponent)) + return false; + NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other; + return compareValues(productName, o.productName, true) && compareValues(instruction, o.instruction, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (productName == null || productName.isEmpty()) + && (schedule == null || schedule.isEmpty()) && (quantity == null || quantity.isEmpty()) && (instruction == null || instruction.isEmpty()) + ; + } + + public String fhirType() { + return "NutritionOrder.supplement"; + + } + + } + + @Block() + public static class NutritionOrderEnteralFormulaComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula. + */ + @Child(name = "baseFormulaType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of enteral or infant formula", formalDefinition="The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula." ) + protected CodeableConcept baseFormulaType; + + /** + * The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". + */ + @Child(name = "baseFormulaProductName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Product or brand name of the enteral or infant formula", formalDefinition="The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\"." ) + protected StringType baseFormulaProductName; + + /** + * Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula. + */ + @Child(name = "additiveType", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of modular component to add to the feeding", formalDefinition="Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula." ) + protected CodeableConcept additiveType; + + /** + * The product or brand name of the type of modular component to be added to the formula. + */ + @Child(name = "additiveProductName", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Product or brand name of the modular additive", formalDefinition="The product or brand name of the type of modular component to be added to the formula." ) + protected StringType additiveProductName; + + /** + * The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL. + */ + @Child(name = "caloricDensity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Amount of energy per specified volume that is required", formalDefinition="The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL." ) + protected SimpleQuantity caloricDensity; + + /** + * The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube. + */ + @Child(name = "routeofAdministration", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How the formula should enter the patient's gastrointestinal tract", formalDefinition="The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube." ) + protected CodeableConcept routeofAdministration; + + /** + * Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours. + */ + @Child(name = "administration", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Formula feeding instruction as structured data", formalDefinition="Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours." ) + protected List administration; + + /** + * The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours. + */ + @Child(name = "maxVolumeToDeliver", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Upper limit on formula volume per unit of time", formalDefinition="The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours." ) + protected SimpleQuantity maxVolumeToDeliver; + + /** + * Free text formula administration, feeding instructions or additional instructions or information. + */ + @Child(name = "administrationInstruction", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formula feeding instructions expressed as text", formalDefinition="Free text formula administration, feeding instructions or additional instructions or information." ) + protected StringType administrationInstruction; + + private static final long serialVersionUID = 292116061L; + + /* + * Constructor + */ + public NutritionOrderEnteralFormulaComponent() { + super(); + } + + /** + * @return {@link #baseFormulaType} (The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.) + */ + public CodeableConcept getBaseFormulaType() { + if (this.baseFormulaType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaType"); + else if (Configuration.doAutoCreate()) + this.baseFormulaType = new CodeableConcept(); // cc + return this.baseFormulaType; + } + + public boolean hasBaseFormulaType() { + return this.baseFormulaType != null && !this.baseFormulaType.isEmpty(); + } + + /** + * @param value {@link #baseFormulaType} (The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.) + */ + public NutritionOrderEnteralFormulaComponent setBaseFormulaType(CodeableConcept value) { + this.baseFormulaType = value; + return this; + } + + /** + * @return {@link #baseFormulaProductName} (The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".). This is the underlying object with id, value and extensions. The accessor "getBaseFormulaProductName" gives direct access to the value + */ + public StringType getBaseFormulaProductNameElement() { + if (this.baseFormulaProductName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaProductName"); + else if (Configuration.doAutoCreate()) + this.baseFormulaProductName = new StringType(); // bb + return this.baseFormulaProductName; + } + + public boolean hasBaseFormulaProductNameElement() { + return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); + } + + public boolean hasBaseFormulaProductName() { + return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); + } + + /** + * @param value {@link #baseFormulaProductName} (The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".). This is the underlying object with id, value and extensions. The accessor "getBaseFormulaProductName" gives direct access to the value + */ + public NutritionOrderEnteralFormulaComponent setBaseFormulaProductNameElement(StringType value) { + this.baseFormulaProductName = value; + return this; + } + + /** + * @return The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". + */ + public String getBaseFormulaProductName() { + return this.baseFormulaProductName == null ? null : this.baseFormulaProductName.getValue(); + } + + /** + * @param value The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". + */ + public NutritionOrderEnteralFormulaComponent setBaseFormulaProductName(String value) { + if (Utilities.noString(value)) + this.baseFormulaProductName = null; + else { + if (this.baseFormulaProductName == null) + this.baseFormulaProductName = new StringType(); + this.baseFormulaProductName.setValue(value); + } + return this; + } + + /** + * @return {@link #additiveType} (Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.) + */ + public CodeableConcept getAdditiveType() { + if (this.additiveType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.additiveType"); + else if (Configuration.doAutoCreate()) + this.additiveType = new CodeableConcept(); // cc + return this.additiveType; + } + + public boolean hasAdditiveType() { + return this.additiveType != null && !this.additiveType.isEmpty(); + } + + /** + * @param value {@link #additiveType} (Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.) + */ + public NutritionOrderEnteralFormulaComponent setAdditiveType(CodeableConcept value) { + this.additiveType = value; + return this; + } + + /** + * @return {@link #additiveProductName} (The product or brand name of the type of modular component to be added to the formula.). This is the underlying object with id, value and extensions. The accessor "getAdditiveProductName" gives direct access to the value + */ + public StringType getAdditiveProductNameElement() { + if (this.additiveProductName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.additiveProductName"); + else if (Configuration.doAutoCreate()) + this.additiveProductName = new StringType(); // bb + return this.additiveProductName; + } + + public boolean hasAdditiveProductNameElement() { + return this.additiveProductName != null && !this.additiveProductName.isEmpty(); + } + + public boolean hasAdditiveProductName() { + return this.additiveProductName != null && !this.additiveProductName.isEmpty(); + } + + /** + * @param value {@link #additiveProductName} (The product or brand name of the type of modular component to be added to the formula.). This is the underlying object with id, value and extensions. The accessor "getAdditiveProductName" gives direct access to the value + */ + public NutritionOrderEnteralFormulaComponent setAdditiveProductNameElement(StringType value) { + this.additiveProductName = value; + return this; + } + + /** + * @return The product or brand name of the type of modular component to be added to the formula. + */ + public String getAdditiveProductName() { + return this.additiveProductName == null ? null : this.additiveProductName.getValue(); + } + + /** + * @param value The product or brand name of the type of modular component to be added to the formula. + */ + public NutritionOrderEnteralFormulaComponent setAdditiveProductName(String value) { + if (Utilities.noString(value)) + this.additiveProductName = null; + else { + if (this.additiveProductName == null) + this.additiveProductName = new StringType(); + this.additiveProductName.setValue(value); + } + return this; + } + + /** + * @return {@link #caloricDensity} (The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.) + */ + public SimpleQuantity getCaloricDensity() { + if (this.caloricDensity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.caloricDensity"); + else if (Configuration.doAutoCreate()) + this.caloricDensity = new SimpleQuantity(); // cc + return this.caloricDensity; + } + + public boolean hasCaloricDensity() { + return this.caloricDensity != null && !this.caloricDensity.isEmpty(); + } + + /** + * @param value {@link #caloricDensity} (The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.) + */ + public NutritionOrderEnteralFormulaComponent setCaloricDensity(SimpleQuantity value) { + this.caloricDensity = value; + return this; + } + + /** + * @return {@link #routeofAdministration} (The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.) + */ + public CodeableConcept getRouteofAdministration() { + if (this.routeofAdministration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.routeofAdministration"); + else if (Configuration.doAutoCreate()) + this.routeofAdministration = new CodeableConcept(); // cc + return this.routeofAdministration; + } + + public boolean hasRouteofAdministration() { + return this.routeofAdministration != null && !this.routeofAdministration.isEmpty(); + } + + /** + * @param value {@link #routeofAdministration} (The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.) + */ + public NutritionOrderEnteralFormulaComponent setRouteofAdministration(CodeableConcept value) { + this.routeofAdministration = value; + return this; + } + + /** + * @return {@link #administration} (Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.) + */ + public List getAdministration() { + if (this.administration == null) + this.administration = new ArrayList(); + return this.administration; + } + + public boolean hasAdministration() { + if (this.administration == null) + return false; + for (NutritionOrderEnteralFormulaAdministrationComponent item : this.administration) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #administration} (Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.) + */ + // syntactic sugar + public NutritionOrderEnteralFormulaAdministrationComponent addAdministration() { //3 + NutritionOrderEnteralFormulaAdministrationComponent t = new NutritionOrderEnteralFormulaAdministrationComponent(); + if (this.administration == null) + this.administration = new ArrayList(); + this.administration.add(t); + return t; + } + + // syntactic sugar + public NutritionOrderEnteralFormulaComponent addAdministration(NutritionOrderEnteralFormulaAdministrationComponent t) { //3 + if (t == null) + return this; + if (this.administration == null) + this.administration = new ArrayList(); + this.administration.add(t); + return this; + } + + /** + * @return {@link #maxVolumeToDeliver} (The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.) + */ + public SimpleQuantity getMaxVolumeToDeliver() { + if (this.maxVolumeToDeliver == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.maxVolumeToDeliver"); + else if (Configuration.doAutoCreate()) + this.maxVolumeToDeliver = new SimpleQuantity(); // cc + return this.maxVolumeToDeliver; + } + + public boolean hasMaxVolumeToDeliver() { + return this.maxVolumeToDeliver != null && !this.maxVolumeToDeliver.isEmpty(); + } + + /** + * @param value {@link #maxVolumeToDeliver} (The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.) + */ + public NutritionOrderEnteralFormulaComponent setMaxVolumeToDeliver(SimpleQuantity value) { + this.maxVolumeToDeliver = value; + return this; + } + + /** + * @return {@link #administrationInstruction} (Free text formula administration, feeding instructions or additional instructions or information.). This is the underlying object with id, value and extensions. The accessor "getAdministrationInstruction" gives direct access to the value + */ + public StringType getAdministrationInstructionElement() { + if (this.administrationInstruction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.administrationInstruction"); + else if (Configuration.doAutoCreate()) + this.administrationInstruction = new StringType(); // bb + return this.administrationInstruction; + } + + public boolean hasAdministrationInstructionElement() { + return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); + } + + public boolean hasAdministrationInstruction() { + return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); + } + + /** + * @param value {@link #administrationInstruction} (Free text formula administration, feeding instructions or additional instructions or information.). This is the underlying object with id, value and extensions. The accessor "getAdministrationInstruction" gives direct access to the value + */ + public NutritionOrderEnteralFormulaComponent setAdministrationInstructionElement(StringType value) { + this.administrationInstruction = value; + return this; + } + + /** + * @return Free text formula administration, feeding instructions or additional instructions or information. + */ + public String getAdministrationInstruction() { + return this.administrationInstruction == null ? null : this.administrationInstruction.getValue(); + } + + /** + * @param value Free text formula administration, feeding instructions or additional instructions or information. + */ + public NutritionOrderEnteralFormulaComponent setAdministrationInstruction(String value) { + if (Utilities.noString(value)) + this.administrationInstruction = null; + else { + if (this.administrationInstruction == null) + this.administrationInstruction = new StringType(); + this.administrationInstruction.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("baseFormulaType", "CodeableConcept", "The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", 0, java.lang.Integer.MAX_VALUE, baseFormulaType)); + childrenList.add(new Property("baseFormulaProductName", "string", "The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\".", 0, java.lang.Integer.MAX_VALUE, baseFormulaProductName)); + childrenList.add(new Property("additiveType", "CodeableConcept", "Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.", 0, java.lang.Integer.MAX_VALUE, additiveType)); + childrenList.add(new Property("additiveProductName", "string", "The product or brand name of the type of modular component to be added to the formula.", 0, java.lang.Integer.MAX_VALUE, additiveProductName)); + childrenList.add(new Property("caloricDensity", "SimpleQuantity", "The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.", 0, java.lang.Integer.MAX_VALUE, caloricDensity)); + childrenList.add(new Property("routeofAdministration", "CodeableConcept", "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", 0, java.lang.Integer.MAX_VALUE, routeofAdministration)); + childrenList.add(new Property("administration", "", "Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.", 0, java.lang.Integer.MAX_VALUE, administration)); + childrenList.add(new Property("maxVolumeToDeliver", "SimpleQuantity", "The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.", 0, java.lang.Integer.MAX_VALUE, maxVolumeToDeliver)); + childrenList.add(new Property("administrationInstruction", "string", "Free text formula administration, feeding instructions or additional instructions or information.", 0, java.lang.Integer.MAX_VALUE, administrationInstruction)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("baseFormulaType")) + this.baseFormulaType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("baseFormulaProductName")) + this.baseFormulaProductName = castToString(value); // StringType + else if (name.equals("additiveType")) + this.additiveType = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("additiveProductName")) + this.additiveProductName = castToString(value); // StringType + else if (name.equals("caloricDensity")) + this.caloricDensity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("routeofAdministration")) + this.routeofAdministration = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("administration")) + this.getAdministration().add((NutritionOrderEnteralFormulaAdministrationComponent) value); + else if (name.equals("maxVolumeToDeliver")) + this.maxVolumeToDeliver = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("administrationInstruction")) + this.administrationInstruction = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("baseFormulaType")) { + this.baseFormulaType = new CodeableConcept(); + return this.baseFormulaType; + } + else if (name.equals("baseFormulaProductName")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.baseFormulaProductName"); + } + else if (name.equals("additiveType")) { + this.additiveType = new CodeableConcept(); + return this.additiveType; + } + else if (name.equals("additiveProductName")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.additiveProductName"); + } + else if (name.equals("caloricDensity")) { + this.caloricDensity = new SimpleQuantity(); + return this.caloricDensity; + } + else if (name.equals("routeofAdministration")) { + this.routeofAdministration = new CodeableConcept(); + return this.routeofAdministration; + } + else if (name.equals("administration")) { + return addAdministration(); + } + else if (name.equals("maxVolumeToDeliver")) { + this.maxVolumeToDeliver = new SimpleQuantity(); + return this.maxVolumeToDeliver; + } + else if (name.equals("administrationInstruction")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.administrationInstruction"); + } + else + return super.addChild(name); + } + + public NutritionOrderEnteralFormulaComponent copy() { + NutritionOrderEnteralFormulaComponent dst = new NutritionOrderEnteralFormulaComponent(); + copyValues(dst); + dst.baseFormulaType = baseFormulaType == null ? null : baseFormulaType.copy(); + dst.baseFormulaProductName = baseFormulaProductName == null ? null : baseFormulaProductName.copy(); + dst.additiveType = additiveType == null ? null : additiveType.copy(); + dst.additiveProductName = additiveProductName == null ? null : additiveProductName.copy(); + dst.caloricDensity = caloricDensity == null ? null : caloricDensity.copy(); + dst.routeofAdministration = routeofAdministration == null ? null : routeofAdministration.copy(); + if (administration != null) { + dst.administration = new ArrayList(); + for (NutritionOrderEnteralFormulaAdministrationComponent i : administration) + dst.administration.add(i.copy()); + }; + dst.maxVolumeToDeliver = maxVolumeToDeliver == null ? null : maxVolumeToDeliver.copy(); + dst.administrationInstruction = administrationInstruction == null ? null : administrationInstruction.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderEnteralFormulaComponent)) + return false; + NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other; + return compareDeep(baseFormulaType, o.baseFormulaType, true) && compareDeep(baseFormulaProductName, o.baseFormulaProductName, true) + && compareDeep(additiveType, o.additiveType, true) && compareDeep(additiveProductName, o.additiveProductName, true) + && compareDeep(caloricDensity, o.caloricDensity, true) && compareDeep(routeofAdministration, o.routeofAdministration, true) + && compareDeep(administration, o.administration, true) && compareDeep(maxVolumeToDeliver, o.maxVolumeToDeliver, true) + && compareDeep(administrationInstruction, o.administrationInstruction, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderEnteralFormulaComponent)) + return false; + NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other; + return compareValues(baseFormulaProductName, o.baseFormulaProductName, true) && compareValues(additiveProductName, o.additiveProductName, true) + && compareValues(administrationInstruction, o.administrationInstruction, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (baseFormulaType == null || baseFormulaType.isEmpty()) && (baseFormulaProductName == null || baseFormulaProductName.isEmpty()) + && (additiveType == null || additiveType.isEmpty()) && (additiveProductName == null || additiveProductName.isEmpty()) + && (caloricDensity == null || caloricDensity.isEmpty()) && (routeofAdministration == null || routeofAdministration.isEmpty()) + && (administration == null || administration.isEmpty()) && (maxVolumeToDeliver == null || maxVolumeToDeliver.isEmpty()) + && (administrationInstruction == null || administrationInstruction.isEmpty()); + } + + public String fhirType() { + return "NutritionOrder.enteralFormula"; + + } + + } + + @Block() + public static class NutritionOrderEnteralFormulaAdministrationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The time period and frequency at which the enteral formula should be delivered to the patient. + */ + @Child(name = "schedule", type = {Timing.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Scheduled frequency of enteral feeding", formalDefinition="The time period and frequency at which the enteral formula should be delivered to the patient." ) + protected Timing schedule; + + /** + * The volume of formula to provide to the patient per the specified administration schedule. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The volume of formula to provide", formalDefinition="The volume of formula to provide to the patient per the specified administration schedule." ) + protected SimpleQuantity quantity; + + /** + * The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. + */ + @Child(name = "rate", type = {SimpleQuantity.class, Ratio.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Speed with which the formula is provided per period of time", formalDefinition="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule." ) + protected Type rate; + + private static final long serialVersionUID = 1895031997L; + + /* + * Constructor + */ + public NutritionOrderEnteralFormulaAdministrationComponent() { + super(); + } + + /** + * @return {@link #schedule} (The time period and frequency at which the enteral formula should be delivered to the patient.) + */ + public Timing getSchedule() { + if (this.schedule == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.schedule"); + else if (Configuration.doAutoCreate()) + this.schedule = new Timing(); // cc + return this.schedule; + } + + public boolean hasSchedule() { + return this.schedule != null && !this.schedule.isEmpty(); + } + + /** + * @param value {@link #schedule} (The time period and frequency at which the enteral formula should be delivered to the patient.) + */ + public NutritionOrderEnteralFormulaAdministrationComponent setSchedule(Timing value) { + this.schedule = value; + return this; + } + + /** + * @return {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) + */ + public NutritionOrderEnteralFormulaAdministrationComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) + */ + public Type getRate() { + return this.rate; + } + + /** + * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) + */ + public SimpleQuantity getRateSimpleQuantity() throws FHIRException { + if (!(this.rate instanceof SimpleQuantity)) + throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (SimpleQuantity) this.rate; + } + + public boolean hasRateSimpleQuantity() { + return this.rate instanceof SimpleQuantity; + } + + /** + * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) + */ + public Ratio getRateRatio() throws FHIRException { + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this.rate instanceof Ratio; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) + */ + public NutritionOrderEnteralFormulaAdministrationComponent setRate(Type value) { + this.rate = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("schedule", "Timing", "The time period and frequency at which the enteral formula should be delivered to the patient.", 0, java.lang.Integer.MAX_VALUE, schedule)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The volume of formula to provide to the patient per the specified administration schedule.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, java.lang.Integer.MAX_VALUE, rate)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("schedule")) + this.schedule = castToTiming(value); // Timing + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("rate[x]")) + this.rate = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("schedule")) { + this.schedule = new Timing(); + return this.schedule; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("rateSimpleQuantity")) { + this.rate = new SimpleQuantity(); + return this.rate; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else + return super.addChild(name); + } + + public NutritionOrderEnteralFormulaAdministrationComponent copy() { + NutritionOrderEnteralFormulaAdministrationComponent dst = new NutritionOrderEnteralFormulaAdministrationComponent(); + copyValues(dst); + dst.schedule = schedule == null ? null : schedule.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.rate = rate == null ? null : rate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrderEnteralFormulaAdministrationComponent)) + return false; + NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other; + return compareDeep(schedule, o.schedule, true) && compareDeep(quantity, o.quantity, true) && compareDeep(rate, o.rate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrderEnteralFormulaAdministrationComponent)) + return false; + NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (schedule == null || schedule.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (rate == null || rate.isEmpty()); + } + + public String fhirType() { + return "NutritionOrder.enteralFormula.administration"; + + } + + } + + /** + * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. + */ + @Child(name = "patient", type = {Patient.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The person who requires the diet, formula or nutritional supplement", formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) + */ + protected Patient patientTarget; + + /** + * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. + */ + @Child(name = "orderer", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) + protected Reference orderer; + + /** + * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + protected Practitioner ordererTarget; + + /** + * Identifiers assigned to this order by the order sender or by the order receiver. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) + protected List identifier; + + /** + * An encounter that provides additional information about the healthcare context in which this request is made. + */ + @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The encounter associated with this nutrition order", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + protected Encounter encounterTarget; + + /** + * The date and time that this nutrition order was requested. + */ + @Child(name = "dateTime", type = {DateTimeType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date and time the nutrition order was requested", formalDefinition="The date and time that this nutrition order was requested." ) + protected DateTimeType dateTime; + + /** + * The workflow status of the nutrition order/request. + */ + @Child(name = "status", type = {CodeType.class}, order=5, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | active | on-hold | completed | cancelled", formalDefinition="The workflow status of the nutrition order/request." ) + protected Enumeration status; + + /** + * A link to a record of allergies or intolerances which should be included in the nutrition order. + */ + @Child(name = "allergyIntolerance", type = {AllergyIntolerance.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="List of the patient's food and nutrition-related allergies and intolerances", formalDefinition="A link to a record of allergies or intolerances which should be included in the nutrition order." ) + protected List allergyIntolerance; + /** + * The actual objects that are the target of the reference (A link to a record of allergies or intolerances which should be included in the nutrition order.) + */ + protected List allergyIntoleranceTarget; + + + /** + * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. + */ + @Child(name = "foodPreferenceModifier", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Order-specific modifier about the type of food that should be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) + protected List foodPreferenceModifier; + + /** + * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. + */ + @Child(name = "excludeFoodModifier", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Order-specific modifier about the type of food that should not be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) + protected List excludeFoodModifier; + + /** + * Diet given orally in contrast to enteral (tube) feeding. + */ + @Child(name = "oralDiet", type = {}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Oral diet components", formalDefinition="Diet given orally in contrast to enteral (tube) feeding." ) + protected NutritionOrderOralDietComponent oralDiet; + + /** + * Oral nutritional products given in order to add further nutritional value to the patient's diet. + */ + @Child(name = "supplement", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Supplement components", formalDefinition="Oral nutritional products given in order to add further nutritional value to the patient's diet." ) + protected List supplement; + + /** + * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity. + */ + @Child(name = "enteralFormula", type = {}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Enteral formula components", formalDefinition="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity." ) + protected NutritionOrderEnteralFormulaComponent enteralFormula; + + private static final long serialVersionUID = 1139624085L; + + /* + * Constructor + */ + public NutritionOrder() { + super(); + } + + /* + * Constructor + */ + public NutritionOrder(Reference patient, DateTimeType dateTime) { + super(); + this.patient = patient; + this.dateTime = dateTime; + } + + /** + * @return {@link #patient} (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) + */ + public NutritionOrder setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) + */ + public NutritionOrder setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + public Reference getOrderer() { + if (this.orderer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.orderer = new Reference(); // cc + return this.orderer; + } + + public boolean hasOrderer() { + return this.orderer != null && !this.orderer.isEmpty(); + } + + /** + * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + public NutritionOrder setOrderer(Reference value) { + this.orderer = value; + return this; + } + + /** + * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + public Practitioner getOrdererTarget() { + if (this.ordererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.ordererTarget = new Practitioner(); // aa + return this.ordererTarget; + } + + /** + * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + public NutritionOrder setOrdererTarget(Practitioner value) { + this.ordererTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public NutritionOrder setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) + */ + public NutritionOrder setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #dateTime} (The date and time that this nutrition order was requested.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public DateTimeType getDateTimeElement() { + if (this.dateTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.dateTime"); + else if (Configuration.doAutoCreate()) + this.dateTime = new DateTimeType(); // bb + return this.dateTime; + } + + public boolean hasDateTimeElement() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + public boolean hasDateTime() { + return this.dateTime != null && !this.dateTime.isEmpty(); + } + + /** + * @param value {@link #dateTime} (The date and time that this nutrition order was requested.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value + */ + public NutritionOrder setDateTimeElement(DateTimeType value) { + this.dateTime = value; + return this; + } + + /** + * @return The date and time that this nutrition order was requested. + */ + public Date getDateTime() { + return this.dateTime == null ? null : this.dateTime.getValue(); + } + + /** + * @param value The date and time that this nutrition order was requested. + */ + public NutritionOrder setDateTime(Date value) { + if (this.dateTime == null) + this.dateTime = new DateTimeType(); + this.dateTime.setValue(value); + return this; + } + + /** + * @return {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public NutritionOrder setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The workflow status of the nutrition order/request. + */ + public NutritionOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The workflow status of the nutrition order/request. + */ + public NutritionOrder setStatus(NutritionOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #allergyIntolerance} (A link to a record of allergies or intolerances which should be included in the nutrition order.) + */ + public List getAllergyIntolerance() { + if (this.allergyIntolerance == null) + this.allergyIntolerance = new ArrayList(); + return this.allergyIntolerance; + } + + public boolean hasAllergyIntolerance() { + if (this.allergyIntolerance == null) + return false; + for (Reference item : this.allergyIntolerance) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #allergyIntolerance} (A link to a record of allergies or intolerances which should be included in the nutrition order.) + */ + // syntactic sugar + public Reference addAllergyIntolerance() { //3 + Reference t = new Reference(); + if (this.allergyIntolerance == null) + this.allergyIntolerance = new ArrayList(); + this.allergyIntolerance.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addAllergyIntolerance(Reference t) { //3 + if (t == null) + return this; + if (this.allergyIntolerance == null) + this.allergyIntolerance = new ArrayList(); + this.allergyIntolerance.add(t); + return this; + } + + /** + * @return {@link #allergyIntolerance} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A link to a record of allergies or intolerances which should be included in the nutrition order.) + */ + public List getAllergyIntoleranceTarget() { + if (this.allergyIntoleranceTarget == null) + this.allergyIntoleranceTarget = new ArrayList(); + return this.allergyIntoleranceTarget; + } + + // syntactic sugar + /** + * @return {@link #allergyIntolerance} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A link to a record of allergies or intolerances which should be included in the nutrition order.) + */ + public AllergyIntolerance addAllergyIntoleranceTarget() { + AllergyIntolerance r = new AllergyIntolerance(); + if (this.allergyIntoleranceTarget == null) + this.allergyIntoleranceTarget = new ArrayList(); + this.allergyIntoleranceTarget.add(r); + return r; + } + + /** + * @return {@link #foodPreferenceModifier} (This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) + */ + public List getFoodPreferenceModifier() { + if (this.foodPreferenceModifier == null) + this.foodPreferenceModifier = new ArrayList(); + return this.foodPreferenceModifier; + } + + public boolean hasFoodPreferenceModifier() { + if (this.foodPreferenceModifier == null) + return false; + for (CodeableConcept item : this.foodPreferenceModifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #foodPreferenceModifier} (This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) + */ + // syntactic sugar + public CodeableConcept addFoodPreferenceModifier() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.foodPreferenceModifier == null) + this.foodPreferenceModifier = new ArrayList(); + this.foodPreferenceModifier.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addFoodPreferenceModifier(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.foodPreferenceModifier == null) + this.foodPreferenceModifier = new ArrayList(); + this.foodPreferenceModifier.add(t); + return this; + } + + /** + * @return {@link #excludeFoodModifier} (This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) + */ + public List getExcludeFoodModifier() { + if (this.excludeFoodModifier == null) + this.excludeFoodModifier = new ArrayList(); + return this.excludeFoodModifier; + } + + public boolean hasExcludeFoodModifier() { + if (this.excludeFoodModifier == null) + return false; + for (CodeableConcept item : this.excludeFoodModifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #excludeFoodModifier} (This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) + */ + // syntactic sugar + public CodeableConcept addExcludeFoodModifier() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.excludeFoodModifier == null) + this.excludeFoodModifier = new ArrayList(); + this.excludeFoodModifier.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addExcludeFoodModifier(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.excludeFoodModifier == null) + this.excludeFoodModifier = new ArrayList(); + this.excludeFoodModifier.add(t); + return this; + } + + /** + * @return {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) + */ + public NutritionOrderOralDietComponent getOralDiet() { + if (this.oralDiet == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.oralDiet"); + else if (Configuration.doAutoCreate()) + this.oralDiet = new NutritionOrderOralDietComponent(); // cc + return this.oralDiet; + } + + public boolean hasOralDiet() { + return this.oralDiet != null && !this.oralDiet.isEmpty(); + } + + /** + * @param value {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) + */ + public NutritionOrder setOralDiet(NutritionOrderOralDietComponent value) { + this.oralDiet = value; + return this; + } + + /** + * @return {@link #supplement} (Oral nutritional products given in order to add further nutritional value to the patient's diet.) + */ + public List getSupplement() { + if (this.supplement == null) + this.supplement = new ArrayList(); + return this.supplement; + } + + public boolean hasSupplement() { + if (this.supplement == null) + return false; + for (NutritionOrderSupplementComponent item : this.supplement) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supplement} (Oral nutritional products given in order to add further nutritional value to the patient's diet.) + */ + // syntactic sugar + public NutritionOrderSupplementComponent addSupplement() { //3 + NutritionOrderSupplementComponent t = new NutritionOrderSupplementComponent(); + if (this.supplement == null) + this.supplement = new ArrayList(); + this.supplement.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addSupplement(NutritionOrderSupplementComponent t) { //3 + if (t == null) + return this; + if (this.supplement == null) + this.supplement = new ArrayList(); + this.supplement.add(t); + return this; + } + + /** + * @return {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) + */ + public NutritionOrderEnteralFormulaComponent getEnteralFormula() { + if (this.enteralFormula == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.enteralFormula"); + else if (Configuration.doAutoCreate()) + this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); // cc + return this.enteralFormula; + } + + public boolean hasEnteralFormula() { + return this.enteralFormula != null && !this.enteralFormula.isEmpty(); + } + + /** + * @param value {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) + */ + public NutritionOrder setEnteralFormula(NutritionOrderEnteralFormulaComponent value) { + this.enteralFormula = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("patient", "Reference(Patient)", "The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", 0, java.lang.Integer.MAX_VALUE, orderer)); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order sender or by the order receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, java.lang.Integer.MAX_VALUE, dateTime)); + childrenList.add(new Property("status", "code", "The workflow status of the nutrition order/request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("allergyIntolerance", "Reference(AllergyIntolerance)", "A link to a record of allergies or intolerances which should be included in the nutrition order.", 0, java.lang.Integer.MAX_VALUE, allergyIntolerance)); + childrenList.add(new Property("foodPreferenceModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, foodPreferenceModifier)); + childrenList.add(new Property("excludeFoodModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, excludeFoodModifier)); + childrenList.add(new Property("oralDiet", "", "Diet given orally in contrast to enteral (tube) feeding.", 0, java.lang.Integer.MAX_VALUE, oralDiet)); + childrenList.add(new Property("supplement", "", "Oral nutritional products given in order to add further nutritional value to the patient's diet.", 0, java.lang.Integer.MAX_VALUE, supplement)); + childrenList.add(new Property("enteralFormula", "", "Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.", 0, java.lang.Integer.MAX_VALUE, enteralFormula)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("orderer")) + this.orderer = castToReference(value); // Reference + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("dateTime")) + this.dateTime = castToDateTime(value); // DateTimeType + else if (name.equals("status")) + this.status = new NutritionOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("allergyIntolerance")) + this.getAllergyIntolerance().add(castToReference(value)); + else if (name.equals("foodPreferenceModifier")) + this.getFoodPreferenceModifier().add(castToCodeableConcept(value)); + else if (name.equals("excludeFoodModifier")) + this.getExcludeFoodModifier().add(castToCodeableConcept(value)); + else if (name.equals("oralDiet")) + this.oralDiet = (NutritionOrderOralDietComponent) value; // NutritionOrderOralDietComponent + else if (name.equals("supplement")) + this.getSupplement().add((NutritionOrderSupplementComponent) value); + else if (name.equals("enteralFormula")) + this.enteralFormula = (NutritionOrderEnteralFormulaComponent) value; // NutritionOrderEnteralFormulaComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("orderer")) { + this.orderer = new Reference(); + return this.orderer; + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("dateTime")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.dateTime"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.status"); + } + else if (name.equals("allergyIntolerance")) { + return addAllergyIntolerance(); + } + else if (name.equals("foodPreferenceModifier")) { + return addFoodPreferenceModifier(); + } + else if (name.equals("excludeFoodModifier")) { + return addExcludeFoodModifier(); + } + else if (name.equals("oralDiet")) { + this.oralDiet = new NutritionOrderOralDietComponent(); + return this.oralDiet; + } + else if (name.equals("supplement")) { + return addSupplement(); + } + else if (name.equals("enteralFormula")) { + this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); + return this.enteralFormula; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "NutritionOrder"; + + } + + public NutritionOrder copy() { + NutritionOrder dst = new NutritionOrder(); + copyValues(dst); + dst.patient = patient == null ? null : patient.copy(); + dst.orderer = orderer == null ? null : orderer.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.encounter = encounter == null ? null : encounter.copy(); + dst.dateTime = dateTime == null ? null : dateTime.copy(); + dst.status = status == null ? null : status.copy(); + if (allergyIntolerance != null) { + dst.allergyIntolerance = new ArrayList(); + for (Reference i : allergyIntolerance) + dst.allergyIntolerance.add(i.copy()); + }; + if (foodPreferenceModifier != null) { + dst.foodPreferenceModifier = new ArrayList(); + for (CodeableConcept i : foodPreferenceModifier) + dst.foodPreferenceModifier.add(i.copy()); + }; + if (excludeFoodModifier != null) { + dst.excludeFoodModifier = new ArrayList(); + for (CodeableConcept i : excludeFoodModifier) + dst.excludeFoodModifier.add(i.copy()); + }; + dst.oralDiet = oralDiet == null ? null : oralDiet.copy(); + if (supplement != null) { + dst.supplement = new ArrayList(); + for (NutritionOrderSupplementComponent i : supplement) + dst.supplement.add(i.copy()); + }; + dst.enteralFormula = enteralFormula == null ? null : enteralFormula.copy(); + return dst; + } + + protected NutritionOrder typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NutritionOrder)) + return false; + NutritionOrder o = (NutritionOrder) other; + return compareDeep(patient, o.patient, true) && compareDeep(orderer, o.orderer, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(dateTime, o.dateTime, true) && compareDeep(status, o.status, true) + && compareDeep(allergyIntolerance, o.allergyIntolerance, true) && compareDeep(foodPreferenceModifier, o.foodPreferenceModifier, true) + && compareDeep(excludeFoodModifier, o.excludeFoodModifier, true) && compareDeep(oralDiet, o.oralDiet, true) + && compareDeep(supplement, o.supplement, true) && compareDeep(enteralFormula, o.enteralFormula, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NutritionOrder)) + return false; + NutritionOrder o = (NutritionOrder) other; + return compareValues(dateTime, o.dateTime, true) && compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (patient == null || patient.isEmpty()) && (orderer == null || orderer.isEmpty()) + && (identifier == null || identifier.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (dateTime == null || dateTime.isEmpty()) && (status == null || status.isEmpty()) && (allergyIntolerance == null || allergyIntolerance.isEmpty()) + && (foodPreferenceModifier == null || foodPreferenceModifier.isEmpty()) && (excludeFoodModifier == null || excludeFoodModifier.isEmpty()) + && (oralDiet == null || oralDiet.isEmpty()) && (supplement == null || supplement.isEmpty()) + && (enteralFormula == null || enteralFormula.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.NutritionOrder; + } + + @SearchParamDefinition(name="identifier", path="NutritionOrder.identifier", description="Return nutrition orders with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) + public static final String SP_DATETIME = "datetime"; + @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token" ) + public static final String SP_SUPPLEMENT = "supplement"; + @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType", description="Type of enteral or infant formula", type="token" ) + public static final String SP_FORMULA = "formula"; + @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identifier", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) + public static final String SP_ORALDIET = "oraldiet"; + @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token" ) + public static final String SP_ADDITIVE = "additive"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Observation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Observation.java new file mode 100644 index 00000000000..1fa26d58f05 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Observation.java @@ -0,0 +1,2634 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Measurements and simple assertions made about a patient, device or other subject. + */ +@ResourceDef(name="Observation", profile="http://hl7.org/fhir/Profile/Observation") +public class Observation extends DomainResource { + + public enum ObservationStatus { + /** + * The existence of the observation is registered, but there is no result yet available. + */ + REGISTERED, + /** + * This is an initial or interim observation: data may be incomplete or unverified. + */ + PRELIMINARY, + /** + * The observation is complete and verified by an authorized person. + */ + FINAL, + /** + * The observation has been modified subsequent to being Final, and is complete and verified by an authorized person. + */ + AMENDED, + /** + * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). + */ + CANCELLED, + /** + * The observation has been withdrawn following previous final release. + */ + ENTEREDINERROR, + /** + * The observation status is unknown. Note that "unknown" is a value of last resort and every attempt should be made to provide a meaningful value other than "unknown". + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ObservationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return REGISTERED; + if ("preliminary".equals(codeString)) + return PRELIMINARY; + if ("final".equals(codeString)) + return FINAL; + if ("amended".equals(codeString)) + return AMENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REGISTERED: return "registered"; + case PRELIMINARY: return "preliminary"; + case FINAL: return "final"; + case AMENDED: return "amended"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REGISTERED: return "http://hl7.org/fhir/observation-status"; + case PRELIMINARY: return "http://hl7.org/fhir/observation-status"; + case FINAL: return "http://hl7.org/fhir/observation-status"; + case AMENDED: return "http://hl7.org/fhir/observation-status"; + case CANCELLED: return "http://hl7.org/fhir/observation-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status"; + case UNKNOWN: return "http://hl7.org/fhir/observation-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REGISTERED: return "The existence of the observation is registered, but there is no result yet available."; + case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified."; + case FINAL: return "The observation is complete and verified by an authorized person."; + case AMENDED: return "The observation has been modified subsequent to being Final, and is complete and verified by an authorized person."; + case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; + case ENTEREDINERROR: return "The observation has been withdrawn following previous final release."; + case UNKNOWN: return "The observation status is unknown. Note that \"unknown\" is a value of last resort and every attempt should be made to provide a meaningful value other than \"unknown\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REGISTERED: return "Registered"; + case PRELIMINARY: return "Preliminary"; + case FINAL: return "Final"; + case AMENDED: return "Amended"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown Status"; + default: return "?"; + } + } + } + + public static class ObservationStatusEnumFactory implements EnumFactory { + public ObservationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return ObservationStatus.REGISTERED; + if ("preliminary".equals(codeString)) + return ObservationStatus.PRELIMINARY; + if ("final".equals(codeString)) + return ObservationStatus.FINAL; + if ("amended".equals(codeString)) + return ObservationStatus.AMENDED; + if ("cancelled".equals(codeString)) + return ObservationStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return ObservationStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return ObservationStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return new Enumeration(this, ObservationStatus.REGISTERED); + if ("preliminary".equals(codeString)) + return new Enumeration(this, ObservationStatus.PRELIMINARY); + if ("final".equals(codeString)) + return new Enumeration(this, ObservationStatus.FINAL); + if ("amended".equals(codeString)) + return new Enumeration(this, ObservationStatus.AMENDED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, ObservationStatus.CANCELLED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ObservationStatus.ENTEREDINERROR); + if ("unknown".equals(codeString)) + return new Enumeration(this, ObservationStatus.UNKNOWN); + throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); + } + public String toCode(ObservationStatus code) { + if (code == ObservationStatus.REGISTERED) + return "registered"; + if (code == ObservationStatus.PRELIMINARY) + return "preliminary"; + if (code == ObservationStatus.FINAL) + return "final"; + if (code == ObservationStatus.AMENDED) + return "amended"; + if (code == ObservationStatus.CANCELLED) + return "cancelled"; + if (code == ObservationStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ObservationStatus.UNKNOWN) + return "unknown"; + return "?"; + } + } + + public enum ObservationRelationshipType { + /** + * This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group. + */ + HASMEMBER, + /** + * The target resource (Observation or QuestionnaireResponse) is part of the information from which this observation value is derived. (e.g. calculated anion gap, Apgar score) NOTE: "derived-from" is only logical choice when referencing QuestionnaireResponse. + */ + DERIVEDFROM, + /** + * This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test). + */ + SEQUELTO, + /** + * This observation replaces a previous observation (i.e. a revised value). The target observation is now obsolete. + */ + REPLACES, + /** + * The value of the target observation qualifies (refines) the semantics of the source observation (e.g. a lipemia measure target from a plasma measure). + */ + QUALIFIEDBY, + /** + * The value of the target observation interferes (degrades quality, or prevents valid observation) with the semantics of the source observation (e.g. a hemolysis measure target from a plasma potassium measure which has no value). + */ + INTERFEREDBY, + /** + * added to help the parsers + */ + NULL; + public static ObservationRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("has-member".equals(codeString)) + return HASMEMBER; + if ("derived-from".equals(codeString)) + return DERIVEDFROM; + if ("sequel-to".equals(codeString)) + return SEQUELTO; + if ("replaces".equals(codeString)) + return REPLACES; + if ("qualified-by".equals(codeString)) + return QUALIFIEDBY; + if ("interfered-by".equals(codeString)) + return INTERFEREDBY; + throw new FHIRException("Unknown ObservationRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HASMEMBER: return "has-member"; + case DERIVEDFROM: return "derived-from"; + case SEQUELTO: return "sequel-to"; + case REPLACES: return "replaces"; + case QUALIFIEDBY: return "qualified-by"; + case INTERFEREDBY: return "interfered-by"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case HASMEMBER: return "http://hl7.org/fhir/observation-relationshiptypes"; + case DERIVEDFROM: return "http://hl7.org/fhir/observation-relationshiptypes"; + case SEQUELTO: return "http://hl7.org/fhir/observation-relationshiptypes"; + case REPLACES: return "http://hl7.org/fhir/observation-relationshiptypes"; + case QUALIFIEDBY: return "http://hl7.org/fhir/observation-relationshiptypes"; + case INTERFEREDBY: return "http://hl7.org/fhir/observation-relationshiptypes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case HASMEMBER: return "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group."; + case DERIVEDFROM: return "The target resource (Observation or QuestionnaireResponse) is part of the information from which this observation value is derived. (e.g. calculated anion gap, Apgar score) NOTE: \"derived-from\" is only logical choice when referencing QuestionnaireResponse."; + case SEQUELTO: return "This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test)."; + case REPLACES: return "This observation replaces a previous observation (i.e. a revised value). The target observation is now obsolete."; + case QUALIFIEDBY: return "The value of the target observation qualifies (refines) the semantics of the source observation (e.g. a lipemia measure target from a plasma measure)."; + case INTERFEREDBY: return "The value of the target observation interferes (degrades quality, or prevents valid observation) with the semantics of the source observation (e.g. a hemolysis measure target from a plasma potassium measure which has no value)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HASMEMBER: return "Has Member"; + case DERIVEDFROM: return "Derived From"; + case SEQUELTO: return "Sequel To"; + case REPLACES: return "Replaces"; + case QUALIFIEDBY: return "Qualified By"; + case INTERFEREDBY: return "Interfered By"; + default: return "?"; + } + } + } + + public static class ObservationRelationshipTypeEnumFactory implements EnumFactory { + public ObservationRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("has-member".equals(codeString)) + return ObservationRelationshipType.HASMEMBER; + if ("derived-from".equals(codeString)) + return ObservationRelationshipType.DERIVEDFROM; + if ("sequel-to".equals(codeString)) + return ObservationRelationshipType.SEQUELTO; + if ("replaces".equals(codeString)) + return ObservationRelationshipType.REPLACES; + if ("qualified-by".equals(codeString)) + return ObservationRelationshipType.QUALIFIEDBY; + if ("interfered-by".equals(codeString)) + return ObservationRelationshipType.INTERFEREDBY; + throw new IllegalArgumentException("Unknown ObservationRelationshipType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("has-member".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.HASMEMBER); + if ("derived-from".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.DERIVEDFROM); + if ("sequel-to".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.SEQUELTO); + if ("replaces".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.REPLACES); + if ("qualified-by".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.QUALIFIEDBY); + if ("interfered-by".equals(codeString)) + return new Enumeration(this, ObservationRelationshipType.INTERFEREDBY); + throw new FHIRException("Unknown ObservationRelationshipType code '"+codeString+"'"); + } + public String toCode(ObservationRelationshipType code) { + if (code == ObservationRelationshipType.HASMEMBER) + return "has-member"; + if (code == ObservationRelationshipType.DERIVEDFROM) + return "derived-from"; + if (code == ObservationRelationshipType.SEQUELTO) + return "sequel-to"; + if (code == ObservationRelationshipType.REPLACES) + return "replaces"; + if (code == ObservationRelationshipType.QUALIFIEDBY) + return "qualified-by"; + if (code == ObservationRelationshipType.INTERFEREDBY) + return "interfered-by"; + return "?"; + } + } + + @Block() + public static class ObservationReferenceRangeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3). + */ + @Child(name = "low", type = {SimpleQuantity.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." ) + protected SimpleQuantity low; + + /** + * The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3). + */ + @Child(name = "high", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." ) + protected SimpleQuantity high; + + /** + * Code for the meaning of the reference range. + */ + @Child(name = "meaning", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates the meaning/use of this range of this range", formalDefinition="Code for the meaning of the reference range." ) + protected CodeableConcept meaning; + + /** + * The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so. + */ + @Child(name = "age", type = {Range.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Applicable age range, if relevant", formalDefinition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." ) + protected Range age; + + /** + * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of 'normals'. + */ + @Child(name = "text", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Text based reference range in an observation", formalDefinition="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of 'normals'." ) + protected StringType text; + + private static final long serialVersionUID = -238694788L; + + /* + * Constructor + */ + public ObservationReferenceRangeComponent() { + super(); + } + + /** + * @return {@link #low} (The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).) + */ + public SimpleQuantity getLow() { + if (this.low == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.low"); + else if (Configuration.doAutoCreate()) + this.low = new SimpleQuantity(); // cc + return this.low; + } + + public boolean hasLow() { + return this.low != null && !this.low.isEmpty(); + } + + /** + * @param value {@link #low} (The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).) + */ + public ObservationReferenceRangeComponent setLow(SimpleQuantity value) { + this.low = value; + return this; + } + + /** + * @return {@link #high} (The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).) + */ + public SimpleQuantity getHigh() { + if (this.high == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.high"); + else if (Configuration.doAutoCreate()) + this.high = new SimpleQuantity(); // cc + return this.high; + } + + public boolean hasHigh() { + return this.high != null && !this.high.isEmpty(); + } + + /** + * @param value {@link #high} (The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).) + */ + public ObservationReferenceRangeComponent setHigh(SimpleQuantity value) { + this.high = value; + return this; + } + + /** + * @return {@link #meaning} (Code for the meaning of the reference range.) + */ + public CodeableConcept getMeaning() { + if (this.meaning == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.meaning"); + else if (Configuration.doAutoCreate()) + this.meaning = new CodeableConcept(); // cc + return this.meaning; + } + + public boolean hasMeaning() { + return this.meaning != null && !this.meaning.isEmpty(); + } + + /** + * @param value {@link #meaning} (Code for the meaning of the reference range.) + */ + public ObservationReferenceRangeComponent setMeaning(CodeableConcept value) { + this.meaning = value; + return this; + } + + /** + * @return {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.) + */ + public Range getAge() { + if (this.age == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.age"); + else if (Configuration.doAutoCreate()) + this.age = new Range(); // cc + return this.age; + } + + public boolean hasAge() { + return this.age != null && !this.age.isEmpty(); + } + + /** + * @param value {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.) + */ + public ObservationReferenceRangeComponent setAge(Range value) { + this.age = value; + return this; + } + + /** + * @return {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of 'normals'.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of 'normals'.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public ObservationReferenceRangeComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of 'normals'. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of 'normals'. + */ + public ObservationReferenceRangeComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("low", "SimpleQuantity", "The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).", 0, java.lang.Integer.MAX_VALUE, low)); + childrenList.add(new Property("high", "SimpleQuantity", "The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).", 0, java.lang.Integer.MAX_VALUE, high)); + childrenList.add(new Property("meaning", "CodeableConcept", "Code for the meaning of the reference range.", 0, java.lang.Integer.MAX_VALUE, meaning)); + childrenList.add(new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, java.lang.Integer.MAX_VALUE, age)); + childrenList.add(new Property("text", "string", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of 'normals'.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("low")) + this.low = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("high")) + this.high = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("meaning")) + this.meaning = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("age")) + this.age = castToRange(value); // Range + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("low")) { + this.low = new SimpleQuantity(); + return this.low; + } + else if (name.equals("high")) { + this.high = new SimpleQuantity(); + return this.high; + } + else if (name.equals("meaning")) { + this.meaning = new CodeableConcept(); + return this.meaning; + } + else if (name.equals("age")) { + this.age = new Range(); + return this.age; + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.text"); + } + else + return super.addChild(name); + } + + public ObservationReferenceRangeComponent copy() { + ObservationReferenceRangeComponent dst = new ObservationReferenceRangeComponent(); + copyValues(dst); + dst.low = low == null ? null : low.copy(); + dst.high = high == null ? null : high.copy(); + dst.meaning = meaning == null ? null : meaning.copy(); + dst.age = age == null ? null : age.copy(); + dst.text = text == null ? null : text.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ObservationReferenceRangeComponent)) + return false; + ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other; + return compareDeep(low, o.low, true) && compareDeep(high, o.high, true) && compareDeep(meaning, o.meaning, true) + && compareDeep(age, o.age, true) && compareDeep(text, o.text, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ObservationReferenceRangeComponent)) + return false; + ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (low == null || low.isEmpty()) && (high == null || high.isEmpty()) + && (meaning == null || meaning.isEmpty()) && (age == null || age.isEmpty()) && (text == null || text.isEmpty()) + ; + } + + public String fhirType() { + return "Observation.referenceRange"; + + } + + } + + @Block() + public static class ObservationRelatedComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code specifying the kind of relationship that exists with the target resource. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", formalDefinition="A code specifying the kind of relationship that exists with the target resource." ) + protected Enumeration type; + + /** + * A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation. + */ + @Child(name = "target", type = {Observation.class, QuestionnaireResponse.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Resource that is related to this one", formalDefinition="A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.) + */ + protected Resource targetTarget; + + private static final long serialVersionUID = 1541802577L; + + /* + * Constructor + */ + public ObservationRelatedComponent() { + super(); + } + + /* + * Constructor + */ + public ObservationRelatedComponent(Reference target) { + super(); + this.target = target; + } + + /** + * @return {@link #type} (A code specifying the kind of relationship that exists with the target resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationRelatedComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ObservationRelationshipTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A code specifying the kind of relationship that exists with the target resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ObservationRelatedComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return A code specifying the kind of relationship that exists with the target resource. + */ + public ObservationRelationshipType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value A code specifying the kind of relationship that exists with the target resource. + */ + public ObservationRelatedComponent setType(ObservationRelationshipType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new ObservationRelationshipTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationRelatedComponent.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.) + */ + public ObservationRelatedComponent setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.) + */ + public Resource getTargetTarget() { + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.) + */ + public ObservationRelatedComponent setTargetTarget(Resource value) { + this.targetTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "A code specifying the kind of relationship that exists with the target resource.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("target", "Reference(Observation|QuestionnaireResponse)", "A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.", 0, java.lang.Integer.MAX_VALUE, target)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new ObservationRelationshipTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.type"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else + return super.addChild(name); + } + + public ObservationRelatedComponent copy() { + ObservationRelatedComponent dst = new ObservationRelatedComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.target = target == null ? null : target.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ObservationRelatedComponent)) + return false; + ObservationRelatedComponent o = (ObservationRelatedComponent) other; + return compareDeep(type, o.type, true) && compareDeep(target, o.target, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ObservationRelatedComponent)) + return false; + ObservationRelatedComponent o = (ObservationRelatedComponent) other; + return compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (target == null || target.isEmpty()) + ; + } + + public String fhirType() { + return "Observation.related"; + + } + + } + + @Block() + public static class ObservationComponentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Describes what was observed. Sometimes this is called the observation "code". + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of component observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"code\"." ) + protected CodeableConcept code; + + /** + * The information determined as a result of making the observation, if the information has a simple value. + */ + @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Actual component result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) + protected Type value; + + /** + * Provides a reason why the expected value in the element Observation.value[x] is missing. + */ + @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why the component result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." ) + protected CodeableConcept dataAbsentReason; + + /** + * Guidance on how to interpret the value by comparison to a normal or recommended range. + */ + @Child(name = "referenceRange", type = {ObservationReferenceRangeComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Provides guide for interpretation of component result", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) + protected List referenceRange; + + private static final long serialVersionUID = 946602904L; + + /* + * Constructor + */ + public ObservationComponentComponent() { + super(); + } + + /* + * Constructor + */ + public ObservationComponentComponent(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationComponentComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) + */ + public ObservationComponentComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Quantity getValueQuantity() throws FHIRException { + if (!(this.value instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Quantity) this.value; + } + + public boolean hasValueQuantity() { + return this.value instanceof Quantity; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public CodeableConcept getValueCodeableConcept() throws FHIRException { + if (!(this.value instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); + return (CodeableConcept) this.value; + } + + public boolean hasValueCodeableConcept() { + return this.value instanceof CodeableConcept; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Range getValueRange() throws FHIRException { + if (!(this.value instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Range) this.value; + } + + public boolean hasValueRange() { + return this.value instanceof Range; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Ratio getValueRatio() throws FHIRException { + if (!(this.value instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Ratio) this.value; + } + + public boolean hasValueRatio() { + return this.value instanceof Ratio; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public SampledData getValueSampledData() throws FHIRException { + if (!(this.value instanceof SampledData)) + throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); + return (SampledData) this.value; + } + + public boolean hasValueSampledData() { + return this.value instanceof SampledData; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Attachment getValueAttachment() throws FHIRException { + if (!(this.value instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Attachment) this.value; + } + + public boolean hasValueAttachment() { + return this.value instanceof Attachment; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public TimeType getValueTimeType() throws FHIRException { + if (!(this.value instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (TimeType) this.value; + } + + public boolean hasValueTimeType() { + return this.value instanceof TimeType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Period getValuePeriod() throws FHIRException { + if (!(this.value instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Period) this.value; + } + + public boolean hasValuePeriod() { + return this.value instanceof Period; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public ObservationComponentComponent setValue(Type value) { + this.value = value; + return this; + } + + /** + * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) + */ + public CodeableConcept getDataAbsentReason() { + if (this.dataAbsentReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ObservationComponentComponent.dataAbsentReason"); + else if (Configuration.doAutoCreate()) + this.dataAbsentReason = new CodeableConcept(); // cc + return this.dataAbsentReason; + } + + public boolean hasDataAbsentReason() { + return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty(); + } + + /** + * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) + */ + public ObservationComponentComponent setDataAbsentReason(CodeableConcept value) { + this.dataAbsentReason = value; + return this; + } + + /** + * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) + */ + public List getReferenceRange() { + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + return this.referenceRange; + } + + public boolean hasReferenceRange() { + if (this.referenceRange == null) + return false; + for (ObservationReferenceRangeComponent item : this.referenceRange) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) + */ + // syntactic sugar + public ObservationReferenceRangeComponent addReferenceRange() { //3 + ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent(); + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + this.referenceRange.add(t); + return t; + } + + // syntactic sugar + public ObservationComponentComponent addReferenceRange(ObservationReferenceRangeComponent t) { //3 + if (t == null) + return this; + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + this.referenceRange.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, java.lang.Integer.MAX_VALUE, dataAbsentReason)); + childrenList.add(new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else if (name.equals("dataAbsentReason")) + this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("referenceRange")) + this.getReferenceRange().add((ObservationReferenceRangeComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("dataAbsentReason")) { + this.dataAbsentReason = new CodeableConcept(); + return this.dataAbsentReason; + } + else if (name.equals("referenceRange")) { + return addReferenceRange(); + } + else + return super.addChild(name); + } + + public ObservationComponentComponent copy() { + ObservationComponentComponent dst = new ObservationComponentComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.value = value == null ? null : value.copy(); + dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); + if (referenceRange != null) { + dst.referenceRange = new ArrayList(); + for (ObservationReferenceRangeComponent i : referenceRange) + dst.referenceRange.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ObservationComponentComponent)) + return false; + ObservationComponentComponent o = (ObservationComponentComponent) other; + return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) + && compareDeep(referenceRange, o.referenceRange, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ObservationComponentComponent)) + return false; + ObservationComponentComponent o = (ObservationComponentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) + && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (referenceRange == null || referenceRange.isEmpty()) + ; + } + + public String fhirType() { + return "Observation.component"; + + } + + } + + /** + * A unique identifier for the simple observation instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Unique Id for this particular observation", formalDefinition="A unique identifier for the simple observation instance." ) + protected List identifier; + + /** + * The status of the result value. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the result value." ) + protected Enumeration status; + + /** + * A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Classification of type of observation", formalDefinition="A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes." ) + protected CodeableConcept category; + + /** + * Describes what was observed. Sometimes this is called the observation "name". + */ + @Child(name = "code", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"name\"." ) + protected CodeableConcept code; + + /** + * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.) + */ + protected Resource subjectTarget; + + /** + * The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made. + */ + @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Healthcare event during which this observation is made", formalDefinition="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) + */ + protected Encounter encounterTarget; + + /** + * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself. + */ + @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Clinically relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." ) + protected Type effective; + + /** + * The date and time this observation was made available to providers, typically after the results have been reviewed and verified. + */ + @Child(name = "issued", type = {InstantType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date/Time this was made available", formalDefinition="The date and time this observation was made available to providers, typically after the results have been reviewed and verified." ) + protected InstantType issued; + + /** + * Who was responsible for asserting the observed value as "true". + */ + @Child(name = "performer", type = {Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who is responsible for the observation", formalDefinition="Who was responsible for asserting the observed value as \"true\"." ) + protected List performer; + /** + * The actual objects that are the target of the reference (Who was responsible for asserting the observed value as "true".) + */ + protected List performerTarget; + + + /** + * The information determined as a result of making the observation, if the information has a simple value. + */ + @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) + protected Type value; + + /** + * Provides a reason why the expected value in the element Observation.value[x] is missing. + */ + @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why the result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." ) + protected CodeableConcept dataAbsentReason; + + /** + * The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag. + */ + @Child(name = "interpretation", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="High, low, normal, etc.", formalDefinition="The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag." ) + protected CodeableConcept interpretation; + + /** + * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. + */ + @Child(name = "comments", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comments about result", formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result." ) + protected StringType comments; + + /** + * Indicates the site on the subject's body where the observation was made (i.e. the target site). + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Observed body part", formalDefinition="Indicates the site on the subject's body where the observation was made (i.e. the target site)." ) + protected CodeableConcept bodySite; + + /** + * Indicates the mechanism used to perform the observation. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How it was done", formalDefinition="Indicates the mechanism used to perform the observation." ) + protected CodeableConcept method; + + /** + * The specimen that was used when this observation was made. + */ + @Child(name = "specimen", type = {Specimen.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specimen used for this observation", formalDefinition="The specimen that was used when this observation was made." ) + protected Reference specimen; + + /** + * The actual object that is the target of the reference (The specimen that was used when this observation was made.) + */ + protected Specimen specimenTarget; + + /** + * The device used to generate the observation data. + */ + @Child(name = "device", type = {Device.class, DeviceMetric.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="(Measurement) Device", formalDefinition="The device used to generate the observation data." ) + protected Reference device; + + /** + * The actual object that is the target of the reference (The device used to generate the observation data.) + */ + protected Resource deviceTarget; + + /** + * Guidance on how to interpret the value by comparison to a normal or recommended range. + */ + @Child(name = "referenceRange", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Provides guide for interpretation", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) + protected List referenceRange; + + /** + * A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code. + */ + @Child(name = "related", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource related to this observation", formalDefinition="A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code." ) + protected List related; + + /** + * Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations. + */ + @Child(name = "component", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Component results", formalDefinition="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." ) + protected List component; + + private static final long serialVersionUID = -931593572L; + + /* + * Constructor + */ + public Observation() { + super(); + } + + /* + * Constructor + */ + public Observation(Enumeration status, CodeableConcept code) { + super(); + this.status = status; + this.code = code; + } + + /** + * @return {@link #identifier} (A unique identifier for the simple observation instance.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A unique identifier for the simple observation instance.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Observation addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ObservationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Observation setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the result value. + */ + public ObservationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the result value. + */ + public Observation setStatus(ObservationStatus value) { + if (this.status == null) + this.status = new Enumeration(new ObservationStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #category} (A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.) + */ + public Observation setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "name".) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "name".) + */ + public Observation setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.) + */ + public Observation setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.) + */ + public Observation setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) + */ + public Observation setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) + */ + public Observation setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) + */ + public Type getEffective() { + return this.effective; + } + + /** + * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) + */ + public DateTimeType getEffectiveDateTimeType() throws FHIRException { + if (!(this.effective instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (DateTimeType) this.effective; + } + + public boolean hasEffectiveDateTimeType() { + return this.effective instanceof DateTimeType; + } + + /** + * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) + */ + public Period getEffectivePeriod() throws FHIRException { + if (!(this.effective instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (Period) this.effective; + } + + public boolean hasEffectivePeriod() { + return this.effective instanceof Period; + } + + public boolean hasEffective() { + return this.effective != null && !this.effective.isEmpty(); + } + + /** + * @param value {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) + */ + public Observation setEffective(Type value) { + this.effective = value; + return this; + } + + /** + * @return {@link #issued} (The date and time this observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public InstantType getIssuedElement() { + if (this.issued == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.issued"); + else if (Configuration.doAutoCreate()) + this.issued = new InstantType(); // bb + return this.issued; + } + + public boolean hasIssuedElement() { + return this.issued != null && !this.issued.isEmpty(); + } + + public boolean hasIssued() { + return this.issued != null && !this.issued.isEmpty(); + } + + /** + * @param value {@link #issued} (The date and time this observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value + */ + public Observation setIssuedElement(InstantType value) { + this.issued = value; + return this; + } + + /** + * @return The date and time this observation was made available to providers, typically after the results have been reviewed and verified. + */ + public Date getIssued() { + return this.issued == null ? null : this.issued.getValue(); + } + + /** + * @param value The date and time this observation was made available to providers, typically after the results have been reviewed and verified. + */ + public Observation setIssued(Date value) { + if (value == null) + this.issued = null; + else { + if (this.issued == null) + this.issued = new InstantType(); + this.issued.setValue(value); + } + return this; + } + + /** + * @return {@link #performer} (Who was responsible for asserting the observed value as "true".) + */ + public List getPerformer() { + if (this.performer == null) + this.performer = new ArrayList(); + return this.performer; + } + + public boolean hasPerformer() { + if (this.performer == null) + return false; + for (Reference item : this.performer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #performer} (Who was responsible for asserting the observed value as "true".) + */ + // syntactic sugar + public Reference addPerformer() { //3 + Reference t = new Reference(); + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return t; + } + + // syntactic sugar + public Observation addPerformer(Reference t) { //3 + if (t == null) + return this; + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return this; + } + + /** + * @return {@link #performer} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Who was responsible for asserting the observed value as "true".) + */ + public List getPerformerTarget() { + if (this.performerTarget == null) + this.performerTarget = new ArrayList(); + return this.performerTarget; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Quantity getValueQuantity() throws FHIRException { + if (!(this.value instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Quantity) this.value; + } + + public boolean hasValueQuantity() { + return this.value instanceof Quantity; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public CodeableConcept getValueCodeableConcept() throws FHIRException { + if (!(this.value instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); + return (CodeableConcept) this.value; + } + + public boolean hasValueCodeableConcept() { + return this.value instanceof CodeableConcept; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Range getValueRange() throws FHIRException { + if (!(this.value instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Range) this.value; + } + + public boolean hasValueRange() { + return this.value instanceof Range; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Ratio getValueRatio() throws FHIRException { + if (!(this.value instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Ratio) this.value; + } + + public boolean hasValueRatio() { + return this.value instanceof Ratio; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public SampledData getValueSampledData() throws FHIRException { + if (!(this.value instanceof SampledData)) + throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); + return (SampledData) this.value; + } + + public boolean hasValueSampledData() { + return this.value instanceof SampledData; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Attachment getValueAttachment() throws FHIRException { + if (!(this.value instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Attachment) this.value; + } + + public boolean hasValueAttachment() { + return this.value instanceof Attachment; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public TimeType getValueTimeType() throws FHIRException { + if (!(this.value instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (TimeType) this.value; + } + + public boolean hasValueTimeType() { + return this.value instanceof TimeType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Period getValuePeriod() throws FHIRException { + if (!(this.value instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Period) this.value; + } + + public boolean hasValuePeriod() { + return this.value instanceof Period; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public Observation setValue(Type value) { + this.value = value; + return this; + } + + /** + * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) + */ + public CodeableConcept getDataAbsentReason() { + if (this.dataAbsentReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.dataAbsentReason"); + else if (Configuration.doAutoCreate()) + this.dataAbsentReason = new CodeableConcept(); // cc + return this.dataAbsentReason; + } + + public boolean hasDataAbsentReason() { + return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty(); + } + + /** + * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) + */ + public Observation setDataAbsentReason(CodeableConcept value) { + this.dataAbsentReason = value; + return this; + } + + /** + * @return {@link #interpretation} (The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.) + */ + public CodeableConcept getInterpretation() { + if (this.interpretation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.interpretation"); + else if (Configuration.doAutoCreate()) + this.interpretation = new CodeableConcept(); // cc + return this.interpretation; + } + + public boolean hasInterpretation() { + return this.interpretation != null && !this.interpretation.isEmpty(); + } + + /** + * @param value {@link #interpretation} (The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.) + */ + public Observation setInterpretation(CodeableConcept value) { + this.interpretation = value; + return this; + } + + /** + * @return {@link #comments} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public StringType getCommentsElement() { + if (this.comments == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.comments"); + else if (Configuration.doAutoCreate()) + this.comments = new StringType(); // bb + return this.comments; + } + + public boolean hasCommentsElement() { + return this.comments != null && !this.comments.isEmpty(); + } + + public boolean hasComments() { + return this.comments != null && !this.comments.isEmpty(); + } + + /** + * @param value {@link #comments} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public Observation setCommentsElement(StringType value) { + this.comments = value; + return this; + } + + /** + * @return May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. + */ + public String getComments() { + return this.comments == null ? null : this.comments.getValue(); + } + + /** + * @param value May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. + */ + public Observation setComments(String value) { + if (Utilities.noString(value)) + this.comments = null; + else { + if (this.comments == null) + this.comments = new StringType(); + this.comments.setValue(value); + } + return this; + } + + /** + * @return {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).) + */ + public CodeableConcept getBodySite() { + if (this.bodySite == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.bodySite"); + else if (Configuration.doAutoCreate()) + this.bodySite = new CodeableConcept(); // cc + return this.bodySite; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).) + */ + public Observation setBodySite(CodeableConcept value) { + this.bodySite = value; + return this; + } + + /** + * @return {@link #method} (Indicates the mechanism used to perform the observation.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (Indicates the mechanism used to perform the observation.) + */ + public Observation setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #specimen} (The specimen that was used when this observation was made.) + */ + public Reference getSpecimen() { + if (this.specimen == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.specimen"); + else if (Configuration.doAutoCreate()) + this.specimen = new Reference(); // cc + return this.specimen; + } + + public boolean hasSpecimen() { + return this.specimen != null && !this.specimen.isEmpty(); + } + + /** + * @param value {@link #specimen} (The specimen that was used when this observation was made.) + */ + public Observation setSpecimen(Reference value) { + this.specimen = value; + return this; + } + + /** + * @return {@link #specimen} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The specimen that was used when this observation was made.) + */ + public Specimen getSpecimenTarget() { + if (this.specimenTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.specimen"); + else if (Configuration.doAutoCreate()) + this.specimenTarget = new Specimen(); // aa + return this.specimenTarget; + } + + /** + * @param value {@link #specimen} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The specimen that was used when this observation was made.) + */ + public Observation setSpecimenTarget(Specimen value) { + this.specimenTarget = value; + return this; + } + + /** + * @return {@link #device} (The device used to generate the observation data.) + */ + public Reference getDevice() { + if (this.device == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Observation.device"); + else if (Configuration.doAutoCreate()) + this.device = new Reference(); // cc + return this.device; + } + + public boolean hasDevice() { + return this.device != null && !this.device.isEmpty(); + } + + /** + * @param value {@link #device} (The device used to generate the observation data.) + */ + public Observation setDevice(Reference value) { + this.device = value; + return this; + } + + /** + * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device used to generate the observation data.) + */ + public Resource getDeviceTarget() { + return this.deviceTarget; + } + + /** + * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device used to generate the observation data.) + */ + public Observation setDeviceTarget(Resource value) { + this.deviceTarget = value; + return this; + } + + /** + * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) + */ + public List getReferenceRange() { + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + return this.referenceRange; + } + + public boolean hasReferenceRange() { + if (this.referenceRange == null) + return false; + for (ObservationReferenceRangeComponent item : this.referenceRange) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) + */ + // syntactic sugar + public ObservationReferenceRangeComponent addReferenceRange() { //3 + ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent(); + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + this.referenceRange.add(t); + return t; + } + + // syntactic sugar + public Observation addReferenceRange(ObservationReferenceRangeComponent t) { //3 + if (t == null) + return this; + if (this.referenceRange == null) + this.referenceRange = new ArrayList(); + this.referenceRange.add(t); + return this; + } + + /** + * @return {@link #related} (A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.) + */ + public List getRelated() { + if (this.related == null) + this.related = new ArrayList(); + return this.related; + } + + public boolean hasRelated() { + if (this.related == null) + return false; + for (ObservationRelatedComponent item : this.related) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #related} (A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.) + */ + // syntactic sugar + public ObservationRelatedComponent addRelated() { //3 + ObservationRelatedComponent t = new ObservationRelatedComponent(); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return t; + } + + // syntactic sugar + public Observation addRelated(ObservationRelatedComponent t) { //3 + if (t == null) + return this; + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); + return this; + } + + /** + * @return {@link #component} (Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.) + */ + public List getComponent() { + if (this.component == null) + this.component = new ArrayList(); + return this.component; + } + + public boolean hasComponent() { + if (this.component == null) + return false; + for (ObservationComponentComponent item : this.component) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #component} (Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.) + */ + // syntactic sugar + public ObservationComponentComponent addComponent() { //3 + ObservationComponentComponent t = new ObservationComponentComponent(); + if (this.component == null) + this.component = new ArrayList(); + this.component.add(t); + return t; + } + + // syntactic sugar + public Observation addComponent(ObservationComponentComponent t) { //3 + if (t == null) + return this; + if (this.component == null) + this.component = new ArrayList(); + this.component.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the simple observation instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The status of the result value.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, java.lang.Integer.MAX_VALUE, effective)); + childrenList.add(new Property("issued", "instant", "The date and time this observation was made available to providers, typically after the results have been reviewed and verified.", 0, java.lang.Integer.MAX_VALUE, issued)); + childrenList.add(new Property("performer", "Reference(Practitioner|Organization|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, java.lang.Integer.MAX_VALUE, dataAbsentReason)); + childrenList.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, java.lang.Integer.MAX_VALUE, interpretation)); + childrenList.add(new Property("comments", "string", "May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.", 0, java.lang.Integer.MAX_VALUE, comments)); + childrenList.add(new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("specimen", "Reference(Specimen)", "The specimen that was used when this observation was made.", 0, java.lang.Integer.MAX_VALUE, specimen)); + childrenList.add(new Property("device", "Reference(Device|DeviceMetric)", "The device used to generate the observation data.", 0, java.lang.Integer.MAX_VALUE, device)); + childrenList.add(new Property("referenceRange", "", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange)); + childrenList.add(new Property("related", "", "A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.", 0, java.lang.Integer.MAX_VALUE, related)); + childrenList.add(new Property("component", "", "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", 0, java.lang.Integer.MAX_VALUE, component)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new ObservationStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("effective[x]")) + this.effective = (Type) value; // Type + else if (name.equals("issued")) + this.issued = castToInstant(value); // InstantType + else if (name.equals("performer")) + this.getPerformer().add(castToReference(value)); + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else if (name.equals("dataAbsentReason")) + this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("interpretation")) + this.interpretation = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("comments")) + this.comments = castToString(value); // StringType + else if (name.equals("bodySite")) + this.bodySite = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("specimen")) + this.specimen = castToReference(value); // Reference + else if (name.equals("device")) + this.device = castToReference(value); // Reference + else if (name.equals("referenceRange")) + this.getReferenceRange().add((ObservationReferenceRangeComponent) value); + else if (name.equals("related")) + this.getRelated().add((ObservationRelatedComponent) value); + else if (name.equals("component")) + this.getComponent().add((ObservationComponentComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.status"); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("effectiveDateTime")) { + this.effective = new DateTimeType(); + return this.effective; + } + else if (name.equals("effectivePeriod")) { + this.effective = new Period(); + return this.effective; + } + else if (name.equals("issued")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.issued"); + } + else if (name.equals("performer")) { + return addPerformer(); + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("dataAbsentReason")) { + this.dataAbsentReason = new CodeableConcept(); + return this.dataAbsentReason; + } + else if (name.equals("interpretation")) { + this.interpretation = new CodeableConcept(); + return this.interpretation; + } + else if (name.equals("comments")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.comments"); + } + else if (name.equals("bodySite")) { + this.bodySite = new CodeableConcept(); + return this.bodySite; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("specimen")) { + this.specimen = new Reference(); + return this.specimen; + } + else if (name.equals("device")) { + this.device = new Reference(); + return this.device; + } + else if (name.equals("referenceRange")) { + return addReferenceRange(); + } + else if (name.equals("related")) { + return addRelated(); + } + else if (name.equals("component")) { + return addComponent(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Observation"; + + } + + public Observation copy() { + Observation dst = new Observation(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.category = category == null ? null : category.copy(); + dst.code = code == null ? null : code.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.effective = effective == null ? null : effective.copy(); + dst.issued = issued == null ? null : issued.copy(); + if (performer != null) { + dst.performer = new ArrayList(); + for (Reference i : performer) + dst.performer.add(i.copy()); + }; + dst.value = value == null ? null : value.copy(); + dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); + dst.interpretation = interpretation == null ? null : interpretation.copy(); + dst.comments = comments == null ? null : comments.copy(); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + dst.method = method == null ? null : method.copy(); + dst.specimen = specimen == null ? null : specimen.copy(); + dst.device = device == null ? null : device.copy(); + if (referenceRange != null) { + dst.referenceRange = new ArrayList(); + for (ObservationReferenceRangeComponent i : referenceRange) + dst.referenceRange.add(i.copy()); + }; + if (related != null) { + dst.related = new ArrayList(); + for (ObservationRelatedComponent i : related) + dst.related.add(i.copy()); + }; + if (component != null) { + dst.component = new ArrayList(); + for (ObservationComponentComponent i : component) + dst.component.add(i.copy()); + }; + return dst; + } + + protected Observation typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Observation)) + return false; + Observation o = (Observation) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) + && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true) + && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) + && compareDeep(interpretation, o.interpretation, true) && compareDeep(comments, o.comments, true) + && compareDeep(bodySite, o.bodySite, true) && compareDeep(method, o.method, true) && compareDeep(specimen, o.specimen, true) + && compareDeep(device, o.device, true) && compareDeep(referenceRange, o.referenceRange, true) && compareDeep(related, o.related, true) + && compareDeep(component, o.component, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Observation)) + return false; + Observation o = (Observation) other; + return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(comments, o.comments, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty()) + && (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (value == null || value.isEmpty()) + && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (interpretation == null || interpretation.isEmpty()) + && (comments == null || comments.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (method == null || method.isEmpty()) + && (specimen == null || specimen.isEmpty()) && (device == null || device.isEmpty()) && (referenceRange == null || referenceRange.isEmpty()) + && (related == null || related.isEmpty()) && (component == null || component.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Observation; + } + + @SearchParamDefinition(name="date", path="Observation.effective[x]", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="code", path="Observation.code", description="The code of the observation type", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="component-data-absent-reason", path="Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.component.value[x] is missing.", type="token" ) + public static final String SP_COMPONENTDATAABSENTREASON = "component-data-absent-reason"; + @SearchParamDefinition(name="value-concept", path="Observation.valueCodeableConcept", description="The value of the observation, if the value is a CodeableConcept", type="token" ) + public static final String SP_VALUECONCEPT = "value-concept"; + @SearchParamDefinition(name="value-date", path="Observation.valueDateTime|Observation.valuePeriod", description="The value of the observation, if the value is a date or period of time", type="date" ) + public static final String SP_VALUEDATE = "value-date"; + @SearchParamDefinition(name="related", path="", description="Related Observations - search on related-type and related-target together", type="composite" ) + public static final String SP_RELATED = "related"; + @SearchParamDefinition(name="patient", path="Observation.subject", description="The subject that the observation is about (if patient)", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="specimen", path="Observation.specimen", description="Specimen used for this observation", type="reference" ) + public static final String SP_SPECIMEN = "specimen"; + @SearchParamDefinition(name="component-code", path="Observation.component.code", description="The component code of the observation type", type="token" ) + public static final String SP_COMPONENTCODE = "component-code"; + @SearchParamDefinition(name="value-string", path="Observation.valueString", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) + public static final String SP_VALUESTRING = "value-string"; + @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique id for a particular observation", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="component-code-value-[x]", path="", description="Both component code and one of the component value parameters", type="composite" ) + public static final String SP_COMPONENTCODEVALUEX = "component-code-value-[x]"; + @SearchParamDefinition(name="code-value-[x]", path="", description="Both code and one of the value parameters", type="composite" ) + public static final String SP_CODEVALUEX = "code-value-[x]"; + @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="value-quantity", path="Observation.valueQuantity", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) + public static final String SP_VALUEQUANTITY = "value-quantity"; + @SearchParamDefinition(name="component-value-quantity", path="Observation.component.valueQuantity", description="The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) + public static final String SP_COMPONENTVALUEQUANTITY = "component-value-quantity"; + @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token" ) + public static final String SP_DATAABSENTREASON = "data-absent-reason"; + @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="related-type", path="Observation.related.type", description="has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", type="token" ) + public static final String SP_RELATEDTYPE = "related-type"; + @SearchParamDefinition(name="related-target", path="Observation.related.target", description="Resource that is related to this one", type="reference" ) + public static final String SP_RELATEDTARGET = "related-target"; + @SearchParamDefinition(name="component-value-string", path="Observation.component.valueString", description="The value of the component observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) + public static final String SP_COMPONENTVALUESTRING = "component-value-string"; + @SearchParamDefinition(name="component-value-concept", path="Observation.component.valueCodeableConcept", description="The value of the component observation, if the value is a CodeableConcept", type="token" ) + public static final String SP_COMPONENTVALUECONCEPT = "component-value-concept"; + @SearchParamDefinition(name="category", path="Observation.category", description="The classification of the type of observation", type="token" ) + public static final String SP_CATEGORY = "category"; + @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference" ) + public static final String SP_DEVICE = "device"; + @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OidType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OidType.java new file mode 100644 index 00000000000..8f3e9d7fbc6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OidType.java @@ -0,0 +1,75 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.dstu21.model; + +import java.net.URI; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "oid" in FHIR: an OID represented as urn:oid:0.1.2.3.4... + */ +@DatatypeDef(name="oid", profileOf=UriType.class) +public class OidType extends UriType { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public OidType() { + super(); + } + + /** + * Constructor + */ + public OidType(String theValue) { + super(theValue); + } + + /** + * Constructor + */ + public OidType(URI theValue) { + super(theValue); + } + + /** + * Constructor + */ + @Override + public OidType copy() { + return new OidType(getValue()); + } + + public String fhirType() { + return "oid"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationDefinition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationDefinition.java new file mode 100644 index 00000000000..a5a53d602a5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationDefinition.java @@ -0,0 +1,2501 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ +@ResourceDef(name="OperationDefinition", profile="http://hl7.org/fhir/Profile/OperationDefinition") +public class OperationDefinition extends DomainResource { + + public enum OperationKind { + /** + * This operation is invoked as an operation. + */ + OPERATION, + /** + * This operation is a named query, invoked using the search mechanism. + */ + QUERY, + /** + * added to help the parsers + */ + NULL; + public static OperationKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("operation".equals(codeString)) + return OPERATION; + if ("query".equals(codeString)) + return QUERY; + throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OPERATION: return "operation"; + case QUERY: return "query"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case OPERATION: return "http://hl7.org/fhir/operation-kind"; + case QUERY: return "http://hl7.org/fhir/operation-kind"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case OPERATION: return "This operation is invoked as an operation."; + case QUERY: return "This operation is a named query, invoked using the search mechanism."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OPERATION: return "Operation"; + case QUERY: return "Query"; + default: return "?"; + } + } + } + + public static class OperationKindEnumFactory implements EnumFactory { + public OperationKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("operation".equals(codeString)) + return OperationKind.OPERATION; + if ("query".equals(codeString)) + return OperationKind.QUERY; + throw new IllegalArgumentException("Unknown OperationKind code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("operation".equals(codeString)) + return new Enumeration(this, OperationKind.OPERATION); + if ("query".equals(codeString)) + return new Enumeration(this, OperationKind.QUERY); + throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); + } + public String toCode(OperationKind code) { + if (code == OperationKind.OPERATION) + return "operation"; + if (code == OperationKind.QUERY) + return "query"; + return "?"; + } + } + + public enum OperationParameterUse { + /** + * This is an input parameter. + */ + IN, + /** + * This is an output parameter. + */ + OUT, + /** + * added to help the parsers + */ + NULL; + public static OperationParameterUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return IN; + if ("out".equals(codeString)) + return OUT; + throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IN: return "in"; + case OUT: return "out"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case IN: return "http://hl7.org/fhir/operation-parameter-use"; + case OUT: return "http://hl7.org/fhir/operation-parameter-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case IN: return "This is an input parameter."; + case OUT: return "This is an output parameter."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IN: return "In"; + case OUT: return "Out"; + default: return "?"; + } + } + } + + public static class OperationParameterUseEnumFactory implements EnumFactory { + public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return OperationParameterUse.IN; + if ("out".equals(codeString)) + return OperationParameterUse.OUT; + throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return new Enumeration(this, OperationParameterUse.IN); + if ("out".equals(codeString)) + return new Enumeration(this, OperationParameterUse.OUT); + throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); + } + public String toCode(OperationParameterUse code) { + if (code == OperationParameterUse.IN) + return "in"; + if (code == OperationParameterUse.OUT) + return "out"; + return "?"; + } + } + + @Block() + public static class OperationDefinitionContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the operation definition. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the operation definition." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public OperationDefinitionContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public OperationDefinitionContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the operation definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the operation definition. + */ + public OperationDefinitionContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public OperationDefinitionContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the operation definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public OperationDefinitionContactComponent copy() { + OperationDefinitionContactComponent dst = new OperationDefinitionContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationDefinitionContactComponent)) + return false; + OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationDefinitionContactComponent)) + return false; + OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "OperationDefinition.contact"; + + } + + } + + @Block() + public static class OperationDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of used to identify the parameter. + */ + @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name in Parameters.parameter.name or in URL", formalDefinition="The name of used to identify the parameter." ) + protected CodeType name; + + /** + * Whether this is an input or an output parameter. + */ + @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="in | out", formalDefinition="Whether this is an input or an output parameter." ) + protected Enumeration use; + + /** + * The minimum number of times this parameter SHALL appear in the request or response. + */ + @Child(name = "min", type = {IntegerType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." ) + protected IntegerType min; + + /** + * The maximum number of times this element is permitted to appear in the request or response. + */ + @Child(name = "max", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." ) + protected StringType max; + + /** + * Describes the meaning or use of this parameter. + */ + @Child(name = "documentation", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." ) + protected StringType documentation; + + /** + * The type for this parameter. + */ + @Child(name = "type", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What type this parameter has", formalDefinition="The type for this parameter." ) + protected CodeType type; + + /** + * A profile the specifies the rules that this parameter must conform to. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Profile on the type", formalDefinition="A profile the specifies the rules that this parameter must conform to." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (A profile the specifies the rules that this parameter must conform to.) + */ + protected StructureDefinition profileTarget; + + /** + * Binds to a value set if this parameter is coded (code, Coding, CodeableConcept). + */ + @Child(name = "binding", type = {}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." ) + protected OperationDefinitionParameterBindingComponent binding; + + /** + * The parts of a Tuple Parameter. + */ + @Child(name = "part", type = {OperationDefinitionParameterComponent.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Parts of a Tuple Parameter", formalDefinition="The parts of a Tuple Parameter." ) + protected List part; + + private static final long serialVersionUID = -1514145741L; + + /* + * Constructor + */ + public OperationDefinitionParameterComponent() { + super(); + } + + /* + * Constructor + */ + public OperationDefinitionParameterComponent(CodeType name, Enumeration use, IntegerType min, StringType max) { + super(); + this.name = name; + this.use = use; + this.min = min; + this.max = max; + } + + /** + * @return {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CodeType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new CodeType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public OperationDefinitionParameterComponent setNameElement(CodeType value) { + this.name = value; + return this; + } + + /** + * @return The name of used to identify the parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of used to identify the parameter. + */ + public OperationDefinitionParameterComponent setName(String value) { + if (this.name == null) + this.name = new CodeType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new OperationParameterUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public OperationDefinitionParameterComponent setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return Whether this is an input or an output parameter. + */ + public OperationParameterUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Whether this is an input or an output parameter. + */ + public OperationDefinitionParameterComponent setUse(OperationParameterUse value) { + if (this.use == null) + this.use = new Enumeration(new OperationParameterUseEnumFactory()); + this.use.setValue(value); + return this; + } + + /** + * @return {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public IntegerType getMinElement() { + if (this.min == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.min"); + else if (Configuration.doAutoCreate()) + this.min = new IntegerType(); // bb + return this.min; + } + + public boolean hasMinElement() { + return this.min != null && !this.min.isEmpty(); + } + + public boolean hasMin() { + return this.min != null && !this.min.isEmpty(); + } + + /** + * @param value {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public OperationDefinitionParameterComponent setMinElement(IntegerType value) { + this.min = value; + return this; + } + + /** + * @return The minimum number of times this parameter SHALL appear in the request or response. + */ + public int getMin() { + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); + } + + /** + * @param value The minimum number of times this parameter SHALL appear in the request or response. + */ + public OperationDefinitionParameterComponent setMin(int value) { + if (this.min == null) + this.min = new IntegerType(); + this.min.setValue(value); + return this; + } + + /** + * @return {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public StringType getMaxElement() { + if (this.max == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.max"); + else if (Configuration.doAutoCreate()) + this.max = new StringType(); // bb + return this.max; + } + + public boolean hasMaxElement() { + return this.max != null && !this.max.isEmpty(); + } + + public boolean hasMax() { + return this.max != null && !this.max.isEmpty(); + } + + /** + * @param value {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public OperationDefinitionParameterComponent setMaxElement(StringType value) { + this.max = value; + return this; + } + + /** + * @return The maximum number of times this element is permitted to appear in the request or response. + */ + public String getMax() { + return this.max == null ? null : this.max.getValue(); + } + + /** + * @param value The maximum number of times this element is permitted to appear in the request or response. + */ + public OperationDefinitionParameterComponent setMax(String value) { + if (this.max == null) + this.max = new StringType(); + this.max.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public OperationDefinitionParameterComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Describes the meaning or use of this parameter. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Describes the meaning or use of this parameter. + */ + public OperationDefinitionParameterComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public OperationDefinitionParameterComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type for this parameter. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type for this parameter. + */ + public OperationDefinitionParameterComponent setType(String value) { + if (Utilities.noString(value)) + this.type = null; + else { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #profile} (A profile the specifies the rules that this parameter must conform to.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (A profile the specifies the rules that this parameter must conform to.) + */ + public OperationDefinitionParameterComponent setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) + */ + public OperationDefinitionParameterComponent setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + /** + * @return {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).) + */ + public OperationDefinitionParameterBindingComponent getBinding() { + if (this.binding == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.binding"); + else if (Configuration.doAutoCreate()) + this.binding = new OperationDefinitionParameterBindingComponent(); // cc + return this.binding; + } + + public boolean hasBinding() { + return this.binding != null && !this.binding.isEmpty(); + } + + /** + * @param value {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).) + */ + public OperationDefinitionParameterComponent setBinding(OperationDefinitionParameterBindingComponent value) { + this.binding = value; + return this; + } + + /** + * @return {@link #part} (The parts of a Tuple Parameter.) + */ + public List getPart() { + if (this.part == null) + this.part = new ArrayList(); + return this.part; + } + + public boolean hasPart() { + if (this.part == null) + return false; + for (OperationDefinitionParameterComponent item : this.part) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #part} (The parts of a Tuple Parameter.) + */ + // syntactic sugar + public OperationDefinitionParameterComponent addPart() { //3 + OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent(); + if (this.part == null) + this.part = new ArrayList(); + this.part.add(t); + return t; + } + + // syntactic sugar + public OperationDefinitionParameterComponent addPart(OperationDefinitionParameterComponent t) { //3 + if (t == null) + return this; + if (this.part == null) + this.part = new ArrayList(); + this.part.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "code", "The name of used to identify the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("use", "code", "Whether this is an input or an output parameter.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, min)); + childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, max)); + childrenList.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("type", "code", "The type for this parameter.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, java.lang.Integer.MAX_VALUE, binding)); + childrenList.add(new Property("part", "@OperationDefinition.parameter", "The parts of a Tuple Parameter.", 0, java.lang.Integer.MAX_VALUE, part)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = new OperationParameterUseEnumFactory().fromType(value); // Enumeration + else if (name.equals("min")) + this.min = castToInteger(value); // IntegerType + else if (name.equals("max")) + this.max = castToString(value); // StringType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else if (name.equals("binding")) + this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent + else if (name.equals("part")) + this.getPart().add((OperationDefinitionParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.use"); + } + else if (name.equals("min")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.min"); + } + else if (name.equals("max")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.max"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.documentation"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else if (name.equals("binding")) { + this.binding = new OperationDefinitionParameterBindingComponent(); + return this.binding; + } + else if (name.equals("part")) { + return addPart(); + } + else + return super.addChild(name); + } + + public OperationDefinitionParameterComponent copy() { + OperationDefinitionParameterComponent dst = new OperationDefinitionParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.use = use == null ? null : use.copy(); + dst.min = min == null ? null : min.copy(); + dst.max = max == null ? null : max.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + dst.binding = binding == null ? null : binding.copy(); + if (part != null) { + dst.part = new ArrayList(); + for (OperationDefinitionParameterComponent i : part) + dst.part.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationDefinitionParameterComponent)) + return false; + OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(min, o.min, true) + && compareDeep(max, o.max, true) && compareDeep(documentation, o.documentation, true) && compareDeep(type, o.type, true) + && compareDeep(profile, o.profile, true) && compareDeep(binding, o.binding, true) && compareDeep(part, o.part, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationDefinitionParameterComponent)) + return false; + OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other; + return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(min, o.min, true) + && compareValues(max, o.max, true) && compareValues(documentation, o.documentation, true) && compareValues(type, o.type, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) + && (min == null || min.isEmpty()) && (max == null || max.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) && (binding == null || binding.isEmpty()) + && (part == null || part.isEmpty()); + } + + public String fhirType() { + return "OperationDefinition.parameter"; + + } + + } + + @Block() + public static class OperationDefinitionParameterBindingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." ) + protected Enumeration strength; + + /** + * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. + */ + @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Source of value set", formalDefinition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used." ) + protected Type valueSet; + + private static final long serialVersionUID = 857140521L; + + /* + * Constructor + */ + public OperationDefinitionParameterBindingComponent() { + super(); + } + + /* + * Constructor + */ + public OperationDefinitionParameterBindingComponent(Enumeration strength, Type valueSet) { + super(); + this.strength = strength; + this.valueSet = valueSet; + } + + /** + * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value + */ + public Enumeration getStrengthElement() { + if (this.strength == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionParameterBindingComponent.strength"); + else if (Configuration.doAutoCreate()) + this.strength = new Enumeration(new BindingStrengthEnumFactory()); // bb + return this.strength; + } + + public boolean hasStrengthElement() { + return this.strength != null && !this.strength.isEmpty(); + } + + public boolean hasStrength() { + return this.strength != null && !this.strength.isEmpty(); + } + + /** + * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value + */ + public OperationDefinitionParameterBindingComponent setStrengthElement(Enumeration value) { + this.strength = value; + return this; + } + + /** + * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + public BindingStrength getStrength() { + return this.strength == null ? null : this.strength.getValue(); + } + + /** + * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. + */ + public OperationDefinitionParameterBindingComponent setStrength(BindingStrength value) { + if (this.strength == null) + this.strength = new Enumeration(new BindingStrengthEnumFactory()); + this.strength.setValue(value); + return this; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public Type getValueSet() { + return this.valueSet; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public UriType getValueSetUriType() throws FHIRException { + if (!(this.valueSet instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (UriType) this.valueSet; + } + + public boolean hasValueSetUriType() { + return this.valueSet instanceof UriType; + } + + /** + * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public Reference getValueSetReference() throws FHIRException { + if (!(this.valueSet instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (Reference) this.valueSet; + } + + public boolean hasValueSetReference() { + return this.valueSet instanceof Reference; + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) + */ + public OperationDefinitionParameterBindingComponent setValueSet(Type value) { + this.valueSet = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, java.lang.Integer.MAX_VALUE, strength)); + childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("strength")) + this.strength = new BindingStrengthEnumFactory().fromType(value); // Enumeration + else if (name.equals("valueSet[x]")) + this.valueSet = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("strength")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.strength"); + } + else if (name.equals("valueSetUri")) { + this.valueSet = new UriType(); + return this.valueSet; + } + else if (name.equals("valueSetReference")) { + this.valueSet = new Reference(); + return this.valueSet; + } + else + return super.addChild(name); + } + + public OperationDefinitionParameterBindingComponent copy() { + OperationDefinitionParameterBindingComponent dst = new OperationDefinitionParameterBindingComponent(); + copyValues(dst); + dst.strength = strength == null ? null : strength.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationDefinitionParameterBindingComponent)) + return false; + OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other; + return compareDeep(strength, o.strength, true) && compareDeep(valueSet, o.valueSet, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationDefinitionParameterBindingComponent)) + return false; + OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other; + return compareValues(strength, o.strength, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (strength == null || strength.isEmpty()) && (valueSet == null || valueSet.isEmpty()) + ; + } + + public String fhirType() { + return "OperationDefinition.parameter.binding"; + + } + + } + + /** + * An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Logical URL to reference this operation definition", formalDefinition="An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published." ) + protected UriType url; + + /** + * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Logical id for this version of the operation definition", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) + protected StringType version; + + /** + * A free text natural language name identifying the operation. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Informal name for this operation", formalDefinition="A free text natural language name identifying the operation." ) + protected StringType name; + + /** + * The status of the profile. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) + protected Enumeration status; + + /** + * Whether this is an operation or a named query. + */ + @Child(name = "kind", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="operation | query", formalDefinition="Whether this is an operation or a named query." ) + protected Enumeration kind; + + /** + * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the operation definition. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the operation definition." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Date for this version of the operation definition", formalDefinition="The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the profile and its use. + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Natural language description of the operation", formalDefinition="A free text natural language description of the profile and its use." ) + protected StringType description; + + /** + * Explains why this operation definition is needed and why it's been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this operation definition is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + @Child(name = "idempotent", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether content is unchanged by operation", formalDefinition="Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST." ) + protected BooleanType idempotent; + + /** + * The name used to invoke the operation. + */ + @Child(name = "code", type = {CodeType.class}, order=12, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." ) + protected CodeType code; + + /** + * Additional information about how to use this operation or named query. + */ + @Child(name = "notes", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." ) + protected StringType notes; + + /** + * Indicates that this operation definition is a constraining profile on the base. + */ + @Child(name = "base", type = {OperationDefinition.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." ) + protected Reference base; + + /** + * The actual object that is the target of the reference (Indicates that this operation definition is a constraining profile on the base.) + */ + protected OperationDefinition baseTarget; + + /** + * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). + */ + @Child(name = "system", type = {BooleanType.class}, order=15, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." ) + protected BooleanType system; + + /** + * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context). + */ + @Child(name = "type", type = {CodeType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Invoke at resource level for these type", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context)." ) + protected List type; + + /** + * Indicates whether this operation can be invoked on a particular instance of one of the given types. + */ + @Child(name = "instance", type = {BooleanType.class}, order=17, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." ) + protected BooleanType instance; + + /** + * The parameters for the operation/query. + */ + @Child(name = "parameter", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." ) + protected List parameter; + + private static final long serialVersionUID = 148203484L; + + /* + * Constructor + */ + public OperationDefinition() { + super(); + } + + /* + * Constructor + */ + public OperationDefinition(StringType name, Enumeration status, Enumeration kind, CodeType code, BooleanType system, BooleanType instance) { + super(); + this.name = name; + this.status = status; + this.kind = kind; + this.code = code; + this.system = system; + this.instance = instance; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public OperationDefinition setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. + */ + public OperationDefinition setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public OperationDefinition setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public OperationDefinition setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public OperationDefinition setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the operation. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the operation. + */ + public OperationDefinition setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public OperationDefinition setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the profile. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the profile. + */ + public OperationDefinition setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Enumeration getKindElement() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new Enumeration(new OperationKindEnumFactory()); // bb + return this.kind; + } + + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public OperationDefinition setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return Whether this is an operation or a named query. + */ + public OperationKind getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value Whether this is an operation or a named query. + */ + public OperationDefinition setKind(OperationKind value) { + if (this.kind == null) + this.kind = new Enumeration(new OperationKindEnumFactory()); + this.kind.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public OperationDefinition setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public OperationDefinition setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public OperationDefinition setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the operation definition. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the operation definition. + */ + public OperationDefinition setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (OperationDefinitionContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public OperationDefinitionContactComponent addContact() { //3 + OperationDefinitionContactComponent t = new OperationDefinitionContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public OperationDefinition addContact(OperationDefinitionContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public OperationDefinition setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes. + */ + public OperationDefinition setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public OperationDefinition setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the profile and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the profile and its use. + */ + public OperationDefinition setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #requirements} (Explains why this operation definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this operation definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public OperationDefinition setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this operation definition is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this operation definition is needed and why it's been constrained as it has. + */ + public OperationDefinition setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value + */ + public BooleanType getIdempotentElement() { + if (this.idempotent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.idempotent"); + else if (Configuration.doAutoCreate()) + this.idempotent = new BooleanType(); // bb + return this.idempotent; + } + + public boolean hasIdempotentElement() { + return this.idempotent != null && !this.idempotent.isEmpty(); + } + + public boolean hasIdempotent() { + return this.idempotent != null && !this.idempotent.isEmpty(); + } + + /** + * @param value {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value + */ + public OperationDefinition setIdempotentElement(BooleanType value) { + this.idempotent = value; + return this; + } + + /** + * @return Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + public boolean getIdempotent() { + return this.idempotent == null || this.idempotent.isEmpty() ? false : this.idempotent.getValue(); + } + + /** + * @param value Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + public OperationDefinition setIdempotent(boolean value) { + if (this.idempotent == null) + this.idempotent = new BooleanType(); + this.idempotent.setValue(value); + return this; + } + + /** + * @return {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public OperationDefinition setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return The name used to invoke the operation. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value The name used to invoke the operation. + */ + public OperationDefinition setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #notes} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public StringType getNotesElement() { + if (this.notes == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.notes"); + else if (Configuration.doAutoCreate()) + this.notes = new StringType(); // bb + return this.notes; + } + + public boolean hasNotesElement() { + return this.notes != null && !this.notes.isEmpty(); + } + + public boolean hasNotes() { + return this.notes != null && !this.notes.isEmpty(); + } + + /** + * @param value {@link #notes} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public OperationDefinition setNotesElement(StringType value) { + this.notes = value; + return this; + } + + /** + * @return Additional information about how to use this operation or named query. + */ + public String getNotes() { + return this.notes == null ? null : this.notes.getValue(); + } + + /** + * @param value Additional information about how to use this operation or named query. + */ + public OperationDefinition setNotes(String value) { + if (Utilities.noString(value)) + this.notes = null; + else { + if (this.notes == null) + this.notes = new StringType(); + this.notes.setValue(value); + } + return this; + } + + /** + * @return {@link #base} (Indicates that this operation definition is a constraining profile on the base.) + */ + public Reference getBase() { + if (this.base == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.base"); + else if (Configuration.doAutoCreate()) + this.base = new Reference(); // cc + return this.base; + } + + public boolean hasBase() { + return this.base != null && !this.base.isEmpty(); + } + + /** + * @param value {@link #base} (Indicates that this operation definition is a constraining profile on the base.) + */ + public OperationDefinition setBase(Reference value) { + this.base = value; + return this; + } + + /** + * @return {@link #base} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates that this operation definition is a constraining profile on the base.) + */ + public OperationDefinition getBaseTarget() { + if (this.baseTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.base"); + else if (Configuration.doAutoCreate()) + this.baseTarget = new OperationDefinition(); // aa + return this.baseTarget; + } + + /** + * @param value {@link #base} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates that this operation definition is a constraining profile on the base.) + */ + public OperationDefinition setBaseTarget(OperationDefinition value) { + this.baseTarget = value; + return this; + } + + /** + * @return {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public BooleanType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.system"); + else if (Configuration.doAutoCreate()) + this.system = new BooleanType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public OperationDefinition setSystemElement(BooleanType value) { + this.system = value; + return this; + } + + /** + * @return Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). + */ + public boolean getSystem() { + return this.system == null || this.system.isEmpty() ? false : this.system.getValue(); + } + + /** + * @param value Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). + */ + public OperationDefinition setSystem(boolean value) { + if (this.system == null) + this.system = new BooleanType(); + this.system.setValue(value); + return this; + } + + /** + * @return {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeType item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) + */ + // syntactic sugar + public CodeType addTypeElement() {//2 + CodeType t = new CodeType(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + /** + * @param value {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) + */ + public OperationDefinition addType(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @param value {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) + */ + public boolean hasType(String value) { + if (this.type == null) + return false; + for (CodeType v : this.type) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value + */ + public BooleanType getInstanceElement() { + if (this.instance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.instance"); + else if (Configuration.doAutoCreate()) + this.instance = new BooleanType(); // bb + return this.instance; + } + + public boolean hasInstanceElement() { + return this.instance != null && !this.instance.isEmpty(); + } + + public boolean hasInstance() { + return this.instance != null && !this.instance.isEmpty(); + } + + /** + * @param value {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value + */ + public OperationDefinition setInstanceElement(BooleanType value) { + this.instance = value; + return this; + } + + /** + * @return Indicates whether this operation can be invoked on a particular instance of one of the given types. + */ + public boolean getInstance() { + return this.instance == null || this.instance.isEmpty() ? false : this.instance.getValue(); + } + + /** + * @param value Indicates whether this operation can be invoked on a particular instance of one of the given types. + */ + public OperationDefinition setInstance(boolean value) { + if (this.instance == null) + this.instance = new BooleanType(); + this.instance.setValue(value); + return this; + } + + /** + * @return {@link #parameter} (The parameters for the operation/query.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (OperationDefinitionParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (The parameters for the operation/query.) + */ + // syntactic sugar + public OperationDefinitionParameterComponent addParameter() { //3 + OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public OperationDefinition addParameter(OperationDefinitionParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the operation.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the profile.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("kind", "code", "Whether this is an operation or a named query.", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("experimental", "boolean", "This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the operation definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the profile and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "Explains why this operation definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("idempotent", "boolean", "Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.", 0, java.lang.Integer.MAX_VALUE, idempotent)); + childrenList.add(new Property("code", "code", "The name used to invoke the operation.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("notes", "string", "Additional information about how to use this operation or named query.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("base", "Reference(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("system", "boolean", "Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("type", "code", "Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("instance", "boolean", "Indicates whether this operation can be invoked on a particular instance of one of the given types.", 0, java.lang.Integer.MAX_VALUE, instance)); + childrenList.add(new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("kind")) + this.kind = new OperationKindEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((OperationDefinitionContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("idempotent")) + this.idempotent = castToBoolean(value); // BooleanType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("notes")) + this.notes = castToString(value); // StringType + else if (name.equals("base")) + this.base = castToReference(value); // Reference + else if (name.equals("system")) + this.system = castToBoolean(value); // BooleanType + else if (name.equals("type")) + this.getType().add(castToCode(value)); + else if (name.equals("instance")) + this.instance = castToBoolean(value); // BooleanType + else if (name.equals("parameter")) + this.getParameter().add((OperationDefinitionParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.url"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.status"); + } + else if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.kind"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.description"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.requirements"); + } + else if (name.equals("idempotent")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.idempotent"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.code"); + } + else if (name.equals("notes")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.notes"); + } + else if (name.equals("base")) { + this.base = new Reference(); + return this.base; + } + else if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.system"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type"); + } + else if (name.equals("instance")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.instance"); + } + else if (name.equals("parameter")) { + return addParameter(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "OperationDefinition"; + + } + + public OperationDefinition copy() { + OperationDefinition dst = new OperationDefinition(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.kind = kind == null ? null : kind.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (OperationDefinitionContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.idempotent = idempotent == null ? null : idempotent.copy(); + dst.code = code == null ? null : code.copy(); + dst.notes = notes == null ? null : notes.copy(); + dst.base = base == null ? null : base.copy(); + dst.system = system == null ? null : system.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeType i : type) + dst.type.add(i.copy()); + }; + dst.instance = instance == null ? null : instance.copy(); + if (parameter != null) { + dst.parameter = new ArrayList(); + for (OperationDefinitionParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + return dst; + } + + protected OperationDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationDefinition)) + return false; + OperationDefinition o = (OperationDefinition) other; + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(description, o.description, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(idempotent, o.idempotent, true) && compareDeep(code, o.code, true) && compareDeep(notes, o.notes, true) + && compareDeep(base, o.base, true) && compareDeep(system, o.system, true) && compareDeep(type, o.type, true) + && compareDeep(instance, o.instance, true) && compareDeep(parameter, o.parameter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationDefinition)) + return false; + OperationDefinition o = (OperationDefinition) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(kind, o.kind, true) && compareValues(experimental, o.experimental, true) + && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) + && compareValues(requirements, o.requirements, true) && compareValues(idempotent, o.idempotent, true) + && compareValues(code, o.code, true) && compareValues(notes, o.notes, true) && compareValues(system, o.system, true) + && compareValues(type, o.type, true) && compareValues(instance, o.instance, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (kind == null || kind.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) + && (requirements == null || requirements.isEmpty()) && (idempotent == null || idempotent.isEmpty()) + && (code == null || code.isEmpty()) && (notes == null || notes.isEmpty()) && (base == null || base.isEmpty()) + && (system == null || system.isEmpty()) && (type == null || type.isEmpty()) && (instance == null || instance.isEmpty()) + && (parameter == null || parameter.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.OperationDefinition; + } + + @SearchParamDefinition(name="date", path="OperationDefinition.date", description="Date for this version of the operation definition", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Name used to invoke the operation", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) + public static final String SP_INSTANCE = "instance"; + @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" ) + public static final String SP_KIND = "kind"; + @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) + public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="OperationDefinition.url", description="Logical URL to reference this operation definition", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" ) + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Informal name for this operation", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference" ) + public static final String SP_BASE = "base"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationOutcome.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationOutcome.java new file mode 100644 index 00000000000..b3017223f9b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OperationOutcome.java @@ -0,0 +1,1180 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A collection of error, warning or information messages that result from a system action. + */ +@ResourceDef(name="OperationOutcome", profile="http://hl7.org/fhir/Profile/OperationOutcome") +public class OperationOutcome extends DomainResource implements IBaseOperationOutcome { + + public enum IssueSeverity { + /** + * The issue caused the action to fail, and no further checking could be performed. + */ + FATAL, + /** + * The issue is sufficiently important to cause the action to fail. + */ + ERROR, + /** + * The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired. + */ + WARNING, + /** + * The issue has no relation to the degree of success of the action. + */ + INFORMATION, + /** + * added to help the parsers + */ + NULL; + public static IssueSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fatal".equals(codeString)) + return FATAL; + if ("error".equals(codeString)) + return ERROR; + if ("warning".equals(codeString)) + return WARNING; + if ("information".equals(codeString)) + return INFORMATION; + throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FATAL: return "fatal"; + case ERROR: return "error"; + case WARNING: return "warning"; + case INFORMATION: return "information"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case FATAL: return "http://hl7.org/fhir/issue-severity"; + case ERROR: return "http://hl7.org/fhir/issue-severity"; + case WARNING: return "http://hl7.org/fhir/issue-severity"; + case INFORMATION: return "http://hl7.org/fhir/issue-severity"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case FATAL: return "The issue caused the action to fail, and no further checking could be performed."; + case ERROR: return "The issue is sufficiently important to cause the action to fail."; + case WARNING: return "The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired."; + case INFORMATION: return "The issue has no relation to the degree of success of the action."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FATAL: return "Fatal"; + case ERROR: return "Error"; + case WARNING: return "Warning"; + case INFORMATION: return "Information"; + default: return "?"; + } + } + } + + public static class IssueSeverityEnumFactory implements EnumFactory { + public IssueSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("fatal".equals(codeString)) + return IssueSeverity.FATAL; + if ("error".equals(codeString)) + return IssueSeverity.ERROR; + if ("warning".equals(codeString)) + return IssueSeverity.WARNING; + if ("information".equals(codeString)) + return IssueSeverity.INFORMATION; + throw new IllegalArgumentException("Unknown IssueSeverity code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("fatal".equals(codeString)) + return new Enumeration(this, IssueSeverity.FATAL); + if ("error".equals(codeString)) + return new Enumeration(this, IssueSeverity.ERROR); + if ("warning".equals(codeString)) + return new Enumeration(this, IssueSeverity.WARNING); + if ("information".equals(codeString)) + return new Enumeration(this, IssueSeverity.INFORMATION); + throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); + } + public String toCode(IssueSeverity code) { + if (code == IssueSeverity.FATAL) + return "fatal"; + if (code == IssueSeverity.ERROR) + return "error"; + if (code == IssueSeverity.WARNING) + return "warning"; + if (code == IssueSeverity.INFORMATION) + return "information"; + return "?"; + } + } + + public enum IssueType { + /** + * Content invalid against the specification or a profile. + */ + INVALID, + /** + * A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax. + */ + STRUCTURE, + /** + * A required element is missing. + */ + REQUIRED, + /** + * An element value is invalid. + */ + VALUE, + /** + * A content validation rule failed - e.g. a schematron rule. + */ + INVARIANT, + /** + * An authentication/authorization/permissions issue of some kind. + */ + SECURITY, + /** + * The client needs to initiate an authentication process. + */ + LOGIN, + /** + * The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable). + */ + UNKNOWN, + /** + * User session expired; a login may be required. + */ + EXPIRED, + /** + * The user does not have the rights to perform this action. + */ + FORBIDDEN, + /** + * Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes. + */ + SUPPRESSED, + /** + * Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged. + */ + PROCESSING, + /** + * The resource or profile is not supported. + */ + NOTSUPPORTED, + /** + * An attempt was made to create a duplicate record. + */ + DUPLICATE, + /** + * The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture. + */ + NOTFOUND, + /** + * Provided content is too long (typically, this is a denial of service protection type of error). + */ + TOOLONG, + /** + * The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code. + */ + CODEINVALID, + /** + * An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized. + */ + EXTENSION, + /** + * The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT. + */ + TOOCOSTLY, + /** + * The content/operation failed to pass some business rule, and so could not proceed. + */ + BUSINESSRULE, + /** + * Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.) + */ + CONFLICT, + /** + * Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete. + */ + INCOMPLETE, + /** + * Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved. + */ + TRANSIENT, + /** + * A resource/record locking failure (usually in an underlying database). + */ + LOCKERROR, + /** + * The persistent store is unavailable; e.g. the database is down for maintenance or similar action. + */ + NOSTORE, + /** + * An unexpected internal error has occurred. + */ + EXCEPTION, + /** + * An internal timeout has occurred. + */ + TIMEOUT, + /** + * The system is not prepared to handle this request due to load management. + */ + THROTTLED, + /** + * A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.). + */ + INFORMATIONAL, + /** + * added to help the parsers + */ + NULL; + public static IssueType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("invalid".equals(codeString)) + return INVALID; + if ("structure".equals(codeString)) + return STRUCTURE; + if ("required".equals(codeString)) + return REQUIRED; + if ("value".equals(codeString)) + return VALUE; + if ("invariant".equals(codeString)) + return INVARIANT; + if ("security".equals(codeString)) + return SECURITY; + if ("login".equals(codeString)) + return LOGIN; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("expired".equals(codeString)) + return EXPIRED; + if ("forbidden".equals(codeString)) + return FORBIDDEN; + if ("suppressed".equals(codeString)) + return SUPPRESSED; + if ("processing".equals(codeString)) + return PROCESSING; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("duplicate".equals(codeString)) + return DUPLICATE; + if ("not-found".equals(codeString)) + return NOTFOUND; + if ("too-long".equals(codeString)) + return TOOLONG; + if ("code-invalid".equals(codeString)) + return CODEINVALID; + if ("extension".equals(codeString)) + return EXTENSION; + if ("too-costly".equals(codeString)) + return TOOCOSTLY; + if ("business-rule".equals(codeString)) + return BUSINESSRULE; + if ("conflict".equals(codeString)) + return CONFLICT; + if ("incomplete".equals(codeString)) + return INCOMPLETE; + if ("transient".equals(codeString)) + return TRANSIENT; + if ("lock-error".equals(codeString)) + return LOCKERROR; + if ("no-store".equals(codeString)) + return NOSTORE; + if ("exception".equals(codeString)) + return EXCEPTION; + if ("timeout".equals(codeString)) + return TIMEOUT; + if ("throttled".equals(codeString)) + return THROTTLED; + if ("informational".equals(codeString)) + return INFORMATIONAL; + throw new FHIRException("Unknown IssueType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INVALID: return "invalid"; + case STRUCTURE: return "structure"; + case REQUIRED: return "required"; + case VALUE: return "value"; + case INVARIANT: return "invariant"; + case SECURITY: return "security"; + case LOGIN: return "login"; + case UNKNOWN: return "unknown"; + case EXPIRED: return "expired"; + case FORBIDDEN: return "forbidden"; + case SUPPRESSED: return "suppressed"; + case PROCESSING: return "processing"; + case NOTSUPPORTED: return "not-supported"; + case DUPLICATE: return "duplicate"; + case NOTFOUND: return "not-found"; + case TOOLONG: return "too-long"; + case CODEINVALID: return "code-invalid"; + case EXTENSION: return "extension"; + case TOOCOSTLY: return "too-costly"; + case BUSINESSRULE: return "business-rule"; + case CONFLICT: return "conflict"; + case INCOMPLETE: return "incomplete"; + case TRANSIENT: return "transient"; + case LOCKERROR: return "lock-error"; + case NOSTORE: return "no-store"; + case EXCEPTION: return "exception"; + case TIMEOUT: return "timeout"; + case THROTTLED: return "throttled"; + case INFORMATIONAL: return "informational"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INVALID: return "http://hl7.org/fhir/issue-type"; + case STRUCTURE: return "http://hl7.org/fhir/issue-type"; + case REQUIRED: return "http://hl7.org/fhir/issue-type"; + case VALUE: return "http://hl7.org/fhir/issue-type"; + case INVARIANT: return "http://hl7.org/fhir/issue-type"; + case SECURITY: return "http://hl7.org/fhir/issue-type"; + case LOGIN: return "http://hl7.org/fhir/issue-type"; + case UNKNOWN: return "http://hl7.org/fhir/issue-type"; + case EXPIRED: return "http://hl7.org/fhir/issue-type"; + case FORBIDDEN: return "http://hl7.org/fhir/issue-type"; + case SUPPRESSED: return "http://hl7.org/fhir/issue-type"; + case PROCESSING: return "http://hl7.org/fhir/issue-type"; + case NOTSUPPORTED: return "http://hl7.org/fhir/issue-type"; + case DUPLICATE: return "http://hl7.org/fhir/issue-type"; + case NOTFOUND: return "http://hl7.org/fhir/issue-type"; + case TOOLONG: return "http://hl7.org/fhir/issue-type"; + case CODEINVALID: return "http://hl7.org/fhir/issue-type"; + case EXTENSION: return "http://hl7.org/fhir/issue-type"; + case TOOCOSTLY: return "http://hl7.org/fhir/issue-type"; + case BUSINESSRULE: return "http://hl7.org/fhir/issue-type"; + case CONFLICT: return "http://hl7.org/fhir/issue-type"; + case INCOMPLETE: return "http://hl7.org/fhir/issue-type"; + case TRANSIENT: return "http://hl7.org/fhir/issue-type"; + case LOCKERROR: return "http://hl7.org/fhir/issue-type"; + case NOSTORE: return "http://hl7.org/fhir/issue-type"; + case EXCEPTION: return "http://hl7.org/fhir/issue-type"; + case TIMEOUT: return "http://hl7.org/fhir/issue-type"; + case THROTTLED: return "http://hl7.org/fhir/issue-type"; + case INFORMATIONAL: return "http://hl7.org/fhir/issue-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INVALID: return "Content invalid against the specification or a profile."; + case STRUCTURE: return "A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax."; + case REQUIRED: return "A required element is missing."; + case VALUE: return "An element value is invalid."; + case INVARIANT: return "A content validation rule failed - e.g. a schematron rule."; + case SECURITY: return "An authentication/authorization/permissions issue of some kind."; + case LOGIN: return "The client needs to initiate an authentication process."; + case UNKNOWN: return "The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable)."; + case EXPIRED: return "User session expired; a login may be required."; + case FORBIDDEN: return "The user does not have the rights to perform this action."; + case SUPPRESSED: return "Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes."; + case PROCESSING: return "Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged."; + case NOTSUPPORTED: return "The resource or profile is not supported."; + case DUPLICATE: return "An attempt was made to create a duplicate record."; + case NOTFOUND: return "The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture."; + case TOOLONG: return "Provided content is too long (typically, this is a denial of service protection type of error)."; + case CODEINVALID: return "The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code."; + case EXTENSION: return "An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized."; + case TOOCOSTLY: return "The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT."; + case BUSINESSRULE: return "The content/operation failed to pass some business rule, and so could not proceed."; + case CONFLICT: return "Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.)"; + case INCOMPLETE: return "Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete."; + case TRANSIENT: return "Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved."; + case LOCKERROR: return "A resource/record locking failure (usually in an underlying database)."; + case NOSTORE: return "The persistent store is unavailable; e.g. the database is down for maintenance or similar action."; + case EXCEPTION: return "An unexpected internal error has occurred."; + case TIMEOUT: return "An internal timeout has occurred."; + case THROTTLED: return "The system is not prepared to handle this request due to load management."; + case INFORMATIONAL: return "A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INVALID: return "Invalid Content"; + case STRUCTURE: return "Structural Issue"; + case REQUIRED: return "Required element missing"; + case VALUE: return "Element value invalid"; + case INVARIANT: return "Validation rule failed"; + case SECURITY: return "Security Problem"; + case LOGIN: return "Login Required"; + case UNKNOWN: return "Unknown User"; + case EXPIRED: return "Session Expired"; + case FORBIDDEN: return "Forbidden"; + case SUPPRESSED: return "Information Suppressed"; + case PROCESSING: return "Processing Failure"; + case NOTSUPPORTED: return "Content not supported"; + case DUPLICATE: return "Duplicate"; + case NOTFOUND: return "Not Found"; + case TOOLONG: return "Content Too Long"; + case CODEINVALID: return "Invalid Code"; + case EXTENSION: return "Unacceptable Extension"; + case TOOCOSTLY: return "Operation Too Costly"; + case BUSINESSRULE: return "Business Rule Violation"; + case CONFLICT: return "Edit Version Conflict"; + case INCOMPLETE: return "Incomplete Results"; + case TRANSIENT: return "Transient Issue"; + case LOCKERROR: return "Lock Error"; + case NOSTORE: return "No Store Available"; + case EXCEPTION: return "Exception"; + case TIMEOUT: return "Timeout"; + case THROTTLED: return "Throttled"; + case INFORMATIONAL: return "Informational Note"; + default: return "?"; + } + } + } + + public static class IssueTypeEnumFactory implements EnumFactory { + public IssueType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("invalid".equals(codeString)) + return IssueType.INVALID; + if ("structure".equals(codeString)) + return IssueType.STRUCTURE; + if ("required".equals(codeString)) + return IssueType.REQUIRED; + if ("value".equals(codeString)) + return IssueType.VALUE; + if ("invariant".equals(codeString)) + return IssueType.INVARIANT; + if ("security".equals(codeString)) + return IssueType.SECURITY; + if ("login".equals(codeString)) + return IssueType.LOGIN; + if ("unknown".equals(codeString)) + return IssueType.UNKNOWN; + if ("expired".equals(codeString)) + return IssueType.EXPIRED; + if ("forbidden".equals(codeString)) + return IssueType.FORBIDDEN; + if ("suppressed".equals(codeString)) + return IssueType.SUPPRESSED; + if ("processing".equals(codeString)) + return IssueType.PROCESSING; + if ("not-supported".equals(codeString)) + return IssueType.NOTSUPPORTED; + if ("duplicate".equals(codeString)) + return IssueType.DUPLICATE; + if ("not-found".equals(codeString)) + return IssueType.NOTFOUND; + if ("too-long".equals(codeString)) + return IssueType.TOOLONG; + if ("code-invalid".equals(codeString)) + return IssueType.CODEINVALID; + if ("extension".equals(codeString)) + return IssueType.EXTENSION; + if ("too-costly".equals(codeString)) + return IssueType.TOOCOSTLY; + if ("business-rule".equals(codeString)) + return IssueType.BUSINESSRULE; + if ("conflict".equals(codeString)) + return IssueType.CONFLICT; + if ("incomplete".equals(codeString)) + return IssueType.INCOMPLETE; + if ("transient".equals(codeString)) + return IssueType.TRANSIENT; + if ("lock-error".equals(codeString)) + return IssueType.LOCKERROR; + if ("no-store".equals(codeString)) + return IssueType.NOSTORE; + if ("exception".equals(codeString)) + return IssueType.EXCEPTION; + if ("timeout".equals(codeString)) + return IssueType.TIMEOUT; + if ("throttled".equals(codeString)) + return IssueType.THROTTLED; + if ("informational".equals(codeString)) + return IssueType.INFORMATIONAL; + throw new IllegalArgumentException("Unknown IssueType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("invalid".equals(codeString)) + return new Enumeration(this, IssueType.INVALID); + if ("structure".equals(codeString)) + return new Enumeration(this, IssueType.STRUCTURE); + if ("required".equals(codeString)) + return new Enumeration(this, IssueType.REQUIRED); + if ("value".equals(codeString)) + return new Enumeration(this, IssueType.VALUE); + if ("invariant".equals(codeString)) + return new Enumeration(this, IssueType.INVARIANT); + if ("security".equals(codeString)) + return new Enumeration(this, IssueType.SECURITY); + if ("login".equals(codeString)) + return new Enumeration(this, IssueType.LOGIN); + if ("unknown".equals(codeString)) + return new Enumeration(this, IssueType.UNKNOWN); + if ("expired".equals(codeString)) + return new Enumeration(this, IssueType.EXPIRED); + if ("forbidden".equals(codeString)) + return new Enumeration(this, IssueType.FORBIDDEN); + if ("suppressed".equals(codeString)) + return new Enumeration(this, IssueType.SUPPRESSED); + if ("processing".equals(codeString)) + return new Enumeration(this, IssueType.PROCESSING); + if ("not-supported".equals(codeString)) + return new Enumeration(this, IssueType.NOTSUPPORTED); + if ("duplicate".equals(codeString)) + return new Enumeration(this, IssueType.DUPLICATE); + if ("not-found".equals(codeString)) + return new Enumeration(this, IssueType.NOTFOUND); + if ("too-long".equals(codeString)) + return new Enumeration(this, IssueType.TOOLONG); + if ("code-invalid".equals(codeString)) + return new Enumeration(this, IssueType.CODEINVALID); + if ("extension".equals(codeString)) + return new Enumeration(this, IssueType.EXTENSION); + if ("too-costly".equals(codeString)) + return new Enumeration(this, IssueType.TOOCOSTLY); + if ("business-rule".equals(codeString)) + return new Enumeration(this, IssueType.BUSINESSRULE); + if ("conflict".equals(codeString)) + return new Enumeration(this, IssueType.CONFLICT); + if ("incomplete".equals(codeString)) + return new Enumeration(this, IssueType.INCOMPLETE); + if ("transient".equals(codeString)) + return new Enumeration(this, IssueType.TRANSIENT); + if ("lock-error".equals(codeString)) + return new Enumeration(this, IssueType.LOCKERROR); + if ("no-store".equals(codeString)) + return new Enumeration(this, IssueType.NOSTORE); + if ("exception".equals(codeString)) + return new Enumeration(this, IssueType.EXCEPTION); + if ("timeout".equals(codeString)) + return new Enumeration(this, IssueType.TIMEOUT); + if ("throttled".equals(codeString)) + return new Enumeration(this, IssueType.THROTTLED); + if ("informational".equals(codeString)) + return new Enumeration(this, IssueType.INFORMATIONAL); + throw new FHIRException("Unknown IssueType code '"+codeString+"'"); + } + public String toCode(IssueType code) { + if (code == IssueType.INVALID) + return "invalid"; + if (code == IssueType.STRUCTURE) + return "structure"; + if (code == IssueType.REQUIRED) + return "required"; + if (code == IssueType.VALUE) + return "value"; + if (code == IssueType.INVARIANT) + return "invariant"; + if (code == IssueType.SECURITY) + return "security"; + if (code == IssueType.LOGIN) + return "login"; + if (code == IssueType.UNKNOWN) + return "unknown"; + if (code == IssueType.EXPIRED) + return "expired"; + if (code == IssueType.FORBIDDEN) + return "forbidden"; + if (code == IssueType.SUPPRESSED) + return "suppressed"; + if (code == IssueType.PROCESSING) + return "processing"; + if (code == IssueType.NOTSUPPORTED) + return "not-supported"; + if (code == IssueType.DUPLICATE) + return "duplicate"; + if (code == IssueType.NOTFOUND) + return "not-found"; + if (code == IssueType.TOOLONG) + return "too-long"; + if (code == IssueType.CODEINVALID) + return "code-invalid"; + if (code == IssueType.EXTENSION) + return "extension"; + if (code == IssueType.TOOCOSTLY) + return "too-costly"; + if (code == IssueType.BUSINESSRULE) + return "business-rule"; + if (code == IssueType.CONFLICT) + return "conflict"; + if (code == IssueType.INCOMPLETE) + return "incomplete"; + if (code == IssueType.TRANSIENT) + return "transient"; + if (code == IssueType.LOCKERROR) + return "lock-error"; + if (code == IssueType.NOSTORE) + return "no-store"; + if (code == IssueType.EXCEPTION) + return "exception"; + if (code == IssueType.TIMEOUT) + return "timeout"; + if (code == IssueType.THROTTLED) + return "throttled"; + if (code == IssueType.INFORMATIONAL) + return "informational"; + return "?"; + } + } + + @Block() + public static class OperationOutcomeIssueComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates whether the issue indicates a variation from successful processing. + */ + @Child(name = "severity", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="fatal | error | warning | information", formalDefinition="Indicates whether the issue indicates a variation from successful processing." ) + protected Enumeration severity; + + /** + * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. + */ + @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Error or warning code", formalDefinition="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element." ) + protected Enumeration code; + + /** + * Additional details about the error. This may be a text description of the error, or a system code that identifies the error. + */ + @Child(name = "details", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional details about the error", formalDefinition="Additional details about the error. This may be a text description of the error, or a system code that identifies the error." ) + protected CodeableConcept details; + + /** + * Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. + */ + @Child(name = "diagnostics", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional diagnostic information about the issue", formalDefinition="Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue." ) + protected StringType diagnostics; + + /** + * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. + */ + @Child(name = "location", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="XPath of element(s) related to issue", formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised." ) + protected List location; + + private static final long serialVersionUID = 930165515L; + + /* + * Constructor + */ + public OperationOutcomeIssueComponent() { + super(); + } + + /* + * Constructor + */ + public OperationOutcomeIssueComponent(Enumeration severity, Enumeration code) { + super(); + this.severity = severity; + this.code = code; + } + + /** + * @return {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public Enumeration getSeverityElement() { + if (this.severity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.severity"); + else if (Configuration.doAutoCreate()) + this.severity = new Enumeration(new IssueSeverityEnumFactory()); // bb + return this.severity; + } + + public boolean hasSeverityElement() { + return this.severity != null && !this.severity.isEmpty(); + } + + public boolean hasSeverity() { + return this.severity != null && !this.severity.isEmpty(); + } + + /** + * @param value {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value + */ + public OperationOutcomeIssueComponent setSeverityElement(Enumeration value) { + this.severity = value; + return this; + } + + /** + * @return Indicates whether the issue indicates a variation from successful processing. + */ + public IssueSeverity getSeverity() { + return this.severity == null ? null : this.severity.getValue(); + } + + /** + * @param value Indicates whether the issue indicates a variation from successful processing. + */ + public OperationOutcomeIssueComponent setSeverity(IssueSeverity value) { + if (this.severity == null) + this.severity = new Enumeration(new IssueSeverityEnumFactory()); + this.severity.setValue(value); + return this; + } + + /** + * @return {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new IssueTypeEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public OperationOutcomeIssueComponent setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. + */ + public IssueType getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. + */ + public OperationOutcomeIssueComponent setCode(IssueType value) { + if (this.code == null) + this.code = new Enumeration(new IssueTypeEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.) + */ + public CodeableConcept getDetails() { + if (this.details == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.details"); + else if (Configuration.doAutoCreate()) + this.details = new CodeableConcept(); // cc + return this.details; + } + + public boolean hasDetails() { + return this.details != null && !this.details.isEmpty(); + } + + /** + * @param value {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.) + */ + public OperationOutcomeIssueComponent setDetails(CodeableConcept value) { + this.details = value; + return this; + } + + /** + * @return {@link #diagnostics} (Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value + */ + public StringType getDiagnosticsElement() { + if (this.diagnostics == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.diagnostics"); + else if (Configuration.doAutoCreate()) + this.diagnostics = new StringType(); // bb + return this.diagnostics; + } + + public boolean hasDiagnosticsElement() { + return this.diagnostics != null && !this.diagnostics.isEmpty(); + } + + public boolean hasDiagnostics() { + return this.diagnostics != null && !this.diagnostics.isEmpty(); + } + + /** + * @param value {@link #diagnostics} (Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value + */ + public OperationOutcomeIssueComponent setDiagnosticsElement(StringType value) { + this.diagnostics = value; + return this; + } + + /** + * @return Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. + */ + public String getDiagnostics() { + return this.diagnostics == null ? null : this.diagnostics.getValue(); + } + + /** + * @param value Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. + */ + public OperationOutcomeIssueComponent setDiagnostics(String value) { + if (Utilities.noString(value)) + this.diagnostics = null; + else { + if (this.diagnostics == null) + this.diagnostics = new StringType(); + this.diagnostics.setValue(value); + } + return this; + } + + /** + * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (StringType item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + // syntactic sugar + public StringType addLocationElement() {//2 + StringType t = new StringType(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + /** + * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public OperationOutcomeIssueComponent addLocation(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return this; + } + + /** + * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public boolean hasLocation(String value) { + if (this.location == null) + return false; + for (StringType v : this.location) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("severity", "code", "Indicates whether the issue indicates a variation from successful processing.", 0, java.lang.Integer.MAX_VALUE, severity)); + childrenList.add(new Property("code", "code", "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("details", "CodeableConcept", "Additional details about the error. This may be a text description of the error, or a system code that identifies the error.", 0, java.lang.Integer.MAX_VALUE, details)); + childrenList.add(new Property("diagnostics", "string", "Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.", 0, java.lang.Integer.MAX_VALUE, diagnostics)); + childrenList.add(new Property("location", "string", "A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, location)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("severity")) + this.severity = new IssueSeverityEnumFactory().fromType(value); // Enumeration + else if (name.equals("code")) + this.code = new IssueTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("details")) + this.details = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("diagnostics")) + this.diagnostics = castToString(value); // StringType + else if (name.equals("location")) + this.getLocation().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("severity")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.severity"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.code"); + } + else if (name.equals("details")) { + this.details = new CodeableConcept(); + return this.details; + } + else if (name.equals("diagnostics")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.diagnostics"); + } + else if (name.equals("location")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.location"); + } + else + return super.addChild(name); + } + + public OperationOutcomeIssueComponent copy() { + OperationOutcomeIssueComponent dst = new OperationOutcomeIssueComponent(); + copyValues(dst); + dst.severity = severity == null ? null : severity.copy(); + dst.code = code == null ? null : code.copy(); + dst.details = details == null ? null : details.copy(); + dst.diagnostics = diagnostics == null ? null : diagnostics.copy(); + if (location != null) { + dst.location = new ArrayList(); + for (StringType i : location) + dst.location.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationOutcomeIssueComponent)) + return false; + OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; + return compareDeep(severity, o.severity, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true) + && compareDeep(diagnostics, o.diagnostics, true) && compareDeep(location, o.location, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationOutcomeIssueComponent)) + return false; + OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; + return compareValues(severity, o.severity, true) && compareValues(code, o.code, true) && compareValues(diagnostics, o.diagnostics, true) + && compareValues(location, o.location, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (severity == null || severity.isEmpty()) && (code == null || code.isEmpty()) + && (details == null || details.isEmpty()) && (diagnostics == null || diagnostics.isEmpty()) + && (location == null || location.isEmpty()); + } + + public String fhirType() { + return "OperationOutcome.issue"; + + } + + } + + /** + * An error, warning or information message that results from a system action. + */ + @Child(name = "issue", type = {}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A single issue associated with the action", formalDefinition="An error, warning or information message that results from a system action." ) + protected List issue; + + private static final long serialVersionUID = -152150052L; + + /* + * Constructor + */ + public OperationOutcome() { + super(); + } + + /** + * @return {@link #issue} (An error, warning or information message that results from a system action.) + */ + public List getIssue() { + if (this.issue == null) + this.issue = new ArrayList(); + return this.issue; + } + + public boolean hasIssue() { + if (this.issue == null) + return false; + for (OperationOutcomeIssueComponent item : this.issue) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #issue} (An error, warning or information message that results from a system action.) + */ + // syntactic sugar + public OperationOutcomeIssueComponent addIssue() { //3 + OperationOutcomeIssueComponent t = new OperationOutcomeIssueComponent(); + if (this.issue == null) + this.issue = new ArrayList(); + this.issue.add(t); + return t; + } + + // syntactic sugar + public OperationOutcome addIssue(OperationOutcomeIssueComponent t) { //3 + if (t == null) + return this; + if (this.issue == null) + this.issue = new ArrayList(); + this.issue.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("issue", "", "An error, warning or information message that results from a system action.", 0, java.lang.Integer.MAX_VALUE, issue)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("issue")) + this.getIssue().add((OperationOutcomeIssueComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("issue")) { + return addIssue(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "OperationOutcome"; + + } + + public OperationOutcome copy() { + OperationOutcome dst = new OperationOutcome(); + copyValues(dst); + if (issue != null) { + dst.issue = new ArrayList(); + for (OperationOutcomeIssueComponent i : issue) + dst.issue.add(i.copy()); + }; + return dst; + } + + protected OperationOutcome typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationOutcome)) + return false; + OperationOutcome o = (OperationOutcome) other; + return compareDeep(issue, o.issue, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationOutcome)) + return false; + OperationOutcome o = (OperationOutcome) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (issue == null || issue.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.OperationOutcome; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Order.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Order.java new file mode 100644 index 00000000000..7db30b6be98 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Order.java @@ -0,0 +1,759 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A request to perform an action. + */ +@ResourceDef(name="Order", profile="http://hl7.org/fhir/Profile/Order") +public class Order extends DomainResource { + + @Block() + public static class OrderWhenComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code specifies when request should be done. The code may simply be a priority code. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code specifies when request should be done. The code may simply be a priority code", formalDefinition="Code specifies when request should be done. The code may simply be a priority code." ) + protected CodeableConcept code; + + /** + * A formal schedule. + */ + @Child(name = "schedule", type = {Timing.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A formal schedule", formalDefinition="A formal schedule." ) + protected Timing schedule; + + private static final long serialVersionUID = 307115287L; + + /* + * Constructor + */ + public OrderWhenComponent() { + super(); + } + + /** + * @return {@link #code} (Code specifies when request should be done. The code may simply be a priority code.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderWhenComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code specifies when request should be done. The code may simply be a priority code.) + */ + public OrderWhenComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #schedule} (A formal schedule.) + */ + public Timing getSchedule() { + if (this.schedule == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderWhenComponent.schedule"); + else if (Configuration.doAutoCreate()) + this.schedule = new Timing(); // cc + return this.schedule; + } + + public boolean hasSchedule() { + return this.schedule != null && !this.schedule.isEmpty(); + } + + /** + * @param value {@link #schedule} (A formal schedule.) + */ + public OrderWhenComponent setSchedule(Timing value) { + this.schedule = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "Code specifies when request should be done. The code may simply be a priority code.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("schedule", "Timing", "A formal schedule.", 0, java.lang.Integer.MAX_VALUE, schedule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("schedule")) + this.schedule = castToTiming(value); // Timing + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("schedule")) { + this.schedule = new Timing(); + return this.schedule; + } + else + return super.addChild(name); + } + + public OrderWhenComponent copy() { + OrderWhenComponent dst = new OrderWhenComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.schedule = schedule == null ? null : schedule.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrderWhenComponent)) + return false; + OrderWhenComponent o = (OrderWhenComponent) other; + return compareDeep(code, o.code, true) && compareDeep(schedule, o.schedule, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrderWhenComponent)) + return false; + OrderWhenComponent o = (OrderWhenComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (schedule == null || schedule.isEmpty()) + ; + } + + public String fhirType() { + return "Order.when"; + + } + + } + + /** + * Identifiers assigned to this order by the orderer or by the receiver. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order by the orderer or by the receiver." ) + protected List identifier; + + /** + * When the order was made. + */ + @Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the order was made", formalDefinition="When the order was made." ) + protected DateTimeType date; + + /** + * Patient this order is about. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Substance.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient this order is about", formalDefinition="Patient this order is about." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Patient this order is about.) + */ + protected Resource subjectTarget; + + /** + * Who initiated the order. + */ + @Child(name = "source", type = {Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who initiated the order", formalDefinition="Who initiated the order." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (Who initiated the order.) + */ + protected Resource sourceTarget; + + /** + * Who is intended to fulfill the order. + */ + @Child(name = "target", type = {Organization.class, Device.class, Practitioner.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who is intended to fulfill the order", formalDefinition="Who is intended to fulfill the order." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (Who is intended to fulfill the order.) + */ + protected Resource targetTarget; + + /** + * Text - why the order was made. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text - why the order was made", formalDefinition="Text - why the order was made." ) + protected Type reason; + + /** + * When order should be fulfilled. + */ + @Child(name = "when", type = {}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When order should be fulfilled", formalDefinition="When order should be fulfilled." ) + protected OrderWhenComponent when; + + /** + * What action is being ordered. + */ + @Child(name = "detail", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="What action is being ordered", formalDefinition="What action is being ordered." ) + protected List detail; + /** + * The actual objects that are the target of the reference (What action is being ordered.) + */ + protected List detailTarget; + + + private static final long serialVersionUID = -1392311096L; + + /* + * Constructor + */ + public Order() { + super(); + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the orderer or by the receiver.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the orderer or by the receiver.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Order addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #date} (When the order was made.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Order.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (When the order was made.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Order setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return When the order was made. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value When the order was made. + */ + public Order setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (Patient this order is about.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Order.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Patient this order is about.) + */ + public Order setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient this order is about.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient this order is about.) + */ + public Order setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #source} (Who initiated the order.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Order.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (Who initiated the order.) + */ + public Order setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who initiated the order.) + */ + public Resource getSourceTarget() { + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who initiated the order.) + */ + public Order setSourceTarget(Resource value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #target} (Who is intended to fulfill the order.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Order.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (Who is intended to fulfill the order.) + */ + public Order setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who is intended to fulfill the order.) + */ + public Resource getTargetTarget() { + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who is intended to fulfill the order.) + */ + public Order setTargetTarget(Resource value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #reason} (Text - why the order was made.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (Text - why the order was made.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (Text - why the order was made.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Text - why the order was made.) + */ + public Order setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #when} (When order should be fulfilled.) + */ + public OrderWhenComponent getWhen() { + if (this.when == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Order.when"); + else if (Configuration.doAutoCreate()) + this.when = new OrderWhenComponent(); // cc + return this.when; + } + + public boolean hasWhen() { + return this.when != null && !this.when.isEmpty(); + } + + /** + * @param value {@link #when} (When order should be fulfilled.) + */ + public Order setWhen(OrderWhenComponent value) { + this.when = value; + return this; + } + + /** + * @return {@link #detail} (What action is being ordered.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (Reference item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (What action is being ordered.) + */ + // syntactic sugar + public Reference addDetail() { //3 + Reference t = new Reference(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public Order addDetail(Reference t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + /** + * @return {@link #detail} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. What action is being ordered.) + */ + public List getDetailTarget() { + if (this.detailTarget == null) + this.detailTarget = new ArrayList(); + return this.detailTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the orderer or by the receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("date", "dateTime", "When the order was made.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Substance)", "Patient this order is about.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("source", "Reference(Practitioner|Organization)", "Who initiated the order.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("target", "Reference(Organization|Device|Practitioner)", "Who is intended to fulfill the order.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Any)", "Text - why the order was made.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("when", "", "When order should be fulfilled.", 0, java.lang.Integer.MAX_VALUE, when)); + childrenList.add(new Property("detail", "Reference(Any)", "What action is being ordered.", 0, java.lang.Integer.MAX_VALUE, detail)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("when")) + this.when = (OrderWhenComponent) value; // OrderWhenComponent + else if (name.equals("detail")) + this.getDetail().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Order.date"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("when")) { + this.when = new OrderWhenComponent(); + return this.when; + } + else if (name.equals("detail")) { + return addDetail(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Order"; + + } + + public Order copy() { + Order dst = new Order(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.source = source == null ? null : source.copy(); + dst.target = target == null ? null : target.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.when = when == null ? null : when.copy(); + if (detail != null) { + dst.detail = new ArrayList(); + for (Reference i : detail) + dst.detail.add(i.copy()); + }; + return dst; + } + + protected Order typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Order)) + return false; + Order o = (Order) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(date, o.date, true) && compareDeep(subject, o.subject, true) + && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(reason, o.reason, true) + && compareDeep(when, o.when, true) && compareDeep(detail, o.detail, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Order)) + return false; + Order o = (Order) other; + return compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty()) + && (subject == null || subject.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty()) + && (reason == null || reason.isEmpty()) && (when == null || when.isEmpty()) && (detail == null || detail.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Order; + } + + @SearchParamDefinition(name="date", path="Order.date", description="When the order was made", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Order.identifier", description="Instance id from source, target, and/or others", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="subject", path="Order.subject", description="Patient this order is about", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Order.subject", description="Patient this order is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="detail", path="Order.detail", description="What action is being ordered", type="reference" ) + public static final String SP_DETAIL = "detail"; + @SearchParamDefinition(name="when", path="Order.when.schedule", description="A formal schedule", type="date" ) + public static final String SP_WHEN = "when"; + @SearchParamDefinition(name="target", path="Order.target", description="Who is intended to fulfill the order", type="reference" ) + public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="when_code", path="Order.when.code", description="Code specifies when request should be done. The code may simply be a priority code", type="token" ) + public static final String SP_WHENCODE = "when_code"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderResponse.java new file mode 100644 index 00000000000..8b469a43de5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderResponse.java @@ -0,0 +1,782 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A response to an order. + */ +@ResourceDef(name="OrderResponse", profile="http://hl7.org/fhir/Profile/OrderResponse") +public class OrderResponse extends DomainResource { + + public enum OrderStatus { + /** + * The order is known, but no processing has occurred at this time + */ + PENDING, + /** + * The order is undergoing initial processing to determine whether it will be accepted (usually this involves human review) + */ + REVIEW, + /** + * The order was rejected because of a workflow/business logic reason + */ + REJECTED, + /** + * The order was unable to be processed because of a technical error (i.e. unexpected error) + */ + ERROR, + /** + * The order has been accepted, and work is in progress. + */ + ACCEPTED, + /** + * Processing the order was halted at the initiators request. + */ + CANCELLED, + /** + * The order has been cancelled and replaced by another. + */ + REPLACED, + /** + * Processing the order was stopped because of some workflow/business logic reason. + */ + ABORTED, + /** + * The order has been completed. + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static OrderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pending".equals(codeString)) + return PENDING; + if ("review".equals(codeString)) + return REVIEW; + if ("rejected".equals(codeString)) + return REJECTED; + if ("error".equals(codeString)) + return ERROR; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("replaced".equals(codeString)) + return REPLACED; + if ("aborted".equals(codeString)) + return ABORTED; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown OrderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PENDING: return "pending"; + case REVIEW: return "review"; + case REJECTED: return "rejected"; + case ERROR: return "error"; + case ACCEPTED: return "accepted"; + case CANCELLED: return "cancelled"; + case REPLACED: return "replaced"; + case ABORTED: return "aborted"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PENDING: return "http://hl7.org/fhir/order-status"; + case REVIEW: return "http://hl7.org/fhir/order-status"; + case REJECTED: return "http://hl7.org/fhir/order-status"; + case ERROR: return "http://hl7.org/fhir/order-status"; + case ACCEPTED: return "http://hl7.org/fhir/order-status"; + case CANCELLED: return "http://hl7.org/fhir/order-status"; + case REPLACED: return "http://hl7.org/fhir/order-status"; + case ABORTED: return "http://hl7.org/fhir/order-status"; + case COMPLETED: return "http://hl7.org/fhir/order-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PENDING: return "The order is known, but no processing has occurred at this time"; + case REVIEW: return "The order is undergoing initial processing to determine whether it will be accepted (usually this involves human review)"; + case REJECTED: return "The order was rejected because of a workflow/business logic reason"; + case ERROR: return "The order was unable to be processed because of a technical error (i.e. unexpected error)"; + case ACCEPTED: return "The order has been accepted, and work is in progress."; + case CANCELLED: return "Processing the order was halted at the initiators request."; + case REPLACED: return "The order has been cancelled and replaced by another."; + case ABORTED: return "Processing the order was stopped because of some workflow/business logic reason."; + case COMPLETED: return "The order has been completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PENDING: return "Pending"; + case REVIEW: return "Review"; + case REJECTED: return "Rejected"; + case ERROR: return "Error"; + case ACCEPTED: return "Accepted"; + case CANCELLED: return "Cancelled"; + case REPLACED: return "Replaced"; + case ABORTED: return "Aborted"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + } + + public static class OrderStatusEnumFactory implements EnumFactory { + public OrderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("pending".equals(codeString)) + return OrderStatus.PENDING; + if ("review".equals(codeString)) + return OrderStatus.REVIEW; + if ("rejected".equals(codeString)) + return OrderStatus.REJECTED; + if ("error".equals(codeString)) + return OrderStatus.ERROR; + if ("accepted".equals(codeString)) + return OrderStatus.ACCEPTED; + if ("cancelled".equals(codeString)) + return OrderStatus.CANCELLED; + if ("replaced".equals(codeString)) + return OrderStatus.REPLACED; + if ("aborted".equals(codeString)) + return OrderStatus.ABORTED; + if ("completed".equals(codeString)) + return OrderStatus.COMPLETED; + throw new IllegalArgumentException("Unknown OrderStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("pending".equals(codeString)) + return new Enumeration(this, OrderStatus.PENDING); + if ("review".equals(codeString)) + return new Enumeration(this, OrderStatus.REVIEW); + if ("rejected".equals(codeString)) + return new Enumeration(this, OrderStatus.REJECTED); + if ("error".equals(codeString)) + return new Enumeration(this, OrderStatus.ERROR); + if ("accepted".equals(codeString)) + return new Enumeration(this, OrderStatus.ACCEPTED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, OrderStatus.CANCELLED); + if ("replaced".equals(codeString)) + return new Enumeration(this, OrderStatus.REPLACED); + if ("aborted".equals(codeString)) + return new Enumeration(this, OrderStatus.ABORTED); + if ("completed".equals(codeString)) + return new Enumeration(this, OrderStatus.COMPLETED); + throw new FHIRException("Unknown OrderStatus code '"+codeString+"'"); + } + public String toCode(OrderStatus code) { + if (code == OrderStatus.PENDING) + return "pending"; + if (code == OrderStatus.REVIEW) + return "review"; + if (code == OrderStatus.REJECTED) + return "rejected"; + if (code == OrderStatus.ERROR) + return "error"; + if (code == OrderStatus.ACCEPTED) + return "accepted"; + if (code == OrderStatus.CANCELLED) + return "cancelled"; + if (code == OrderStatus.REPLACED) + return "replaced"; + if (code == OrderStatus.ABORTED) + return "aborted"; + if (code == OrderStatus.COMPLETED) + return "completed"; + return "?"; + } + } + + /** + * Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifiers assigned to this order by the orderer or by the receiver", formalDefinition="Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems." ) + protected List identifier; + + /** + * A reference to the order that this is in response to. + */ + @Child(name = "request", type = {Order.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The order that this is a response to", formalDefinition="A reference to the order that this is in response to." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (A reference to the order that this is in response to.) + */ + protected Order requestTarget; + + /** + * The date and time at which this order response was made (created/posted). + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the response was made", formalDefinition="The date and time at which this order response was made (created/posted)." ) + protected DateTimeType date; + + /** + * The person, organization, or device credited with making the response. + */ + @Child(name = "who", type = {Practitioner.class, Organization.class, Device.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who made the response", formalDefinition="The person, organization, or device credited with making the response." ) + protected Reference who; + + /** + * The actual object that is the target of the reference (The person, organization, or device credited with making the response.) + */ + protected Resource whoTarget; + + /** + * What this response says about the status of the original order. + */ + @Child(name = "orderStatus", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="pending | review | rejected | error | accepted | cancelled | replaced | aborted | completed", formalDefinition="What this response says about the status of the original order." ) + protected Enumeration orderStatus; + + /** + * Additional description about the response - e.g. a text description provided by a human user when making decisions about the order. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional description of the response", formalDefinition="Additional description about the response - e.g. a text description provided by a human user when making decisions about the order." ) + protected StringType description; + + /** + * Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order. + */ + @Child(name = "fulfillment", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Details of the outcome of performing the order", formalDefinition="Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order." ) + protected List fulfillment; + /** + * The actual objects that are the target of the reference (Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.) + */ + protected List fulfillmentTarget; + + + private static final long serialVersionUID = -856633109L; + + /* + * Constructor + */ + public OrderResponse() { + super(); + } + + /* + * Constructor + */ + public OrderResponse(Reference request, Enumeration orderStatus) { + super(); + this.request = request; + this.orderStatus = orderStatus; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public OrderResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (A reference to the order that this is in response to.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (A reference to the order that this is in response to.) + */ + public OrderResponse setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the order that this is in response to.) + */ + public Order getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new Order(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the order that this is in response to.) + */ + public OrderResponse setRequestTarget(Order value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #date} (The date and time at which this order response was made (created/posted).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date and time at which this order response was made (created/posted).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public OrderResponse setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date and time at which this order response was made (created/posted). + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date and time at which this order response was made (created/posted). + */ + public OrderResponse setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #who} (The person, organization, or device credited with making the response.) + */ + public Reference getWho() { + if (this.who == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.who"); + else if (Configuration.doAutoCreate()) + this.who = new Reference(); // cc + return this.who; + } + + public boolean hasWho() { + return this.who != null && !this.who.isEmpty(); + } + + /** + * @param value {@link #who} (The person, organization, or device credited with making the response.) + */ + public OrderResponse setWho(Reference value) { + this.who = value; + return this; + } + + /** + * @return {@link #who} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person, organization, or device credited with making the response.) + */ + public Resource getWhoTarget() { + return this.whoTarget; + } + + /** + * @param value {@link #who} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person, organization, or device credited with making the response.) + */ + public OrderResponse setWhoTarget(Resource value) { + this.whoTarget = value; + return this; + } + + /** + * @return {@link #orderStatus} (What this response says about the status of the original order.). This is the underlying object with id, value and extensions. The accessor "getOrderStatus" gives direct access to the value + */ + public Enumeration getOrderStatusElement() { + if (this.orderStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.orderStatus"); + else if (Configuration.doAutoCreate()) + this.orderStatus = new Enumeration(new OrderStatusEnumFactory()); // bb + return this.orderStatus; + } + + public boolean hasOrderStatusElement() { + return this.orderStatus != null && !this.orderStatus.isEmpty(); + } + + public boolean hasOrderStatus() { + return this.orderStatus != null && !this.orderStatus.isEmpty(); + } + + /** + * @param value {@link #orderStatus} (What this response says about the status of the original order.). This is the underlying object with id, value and extensions. The accessor "getOrderStatus" gives direct access to the value + */ + public OrderResponse setOrderStatusElement(Enumeration value) { + this.orderStatus = value; + return this; + } + + /** + * @return What this response says about the status of the original order. + */ + public OrderStatus getOrderStatus() { + return this.orderStatus == null ? null : this.orderStatus.getValue(); + } + + /** + * @param value What this response says about the status of the original order. + */ + public OrderResponse setOrderStatus(OrderStatus value) { + if (this.orderStatus == null) + this.orderStatus = new Enumeration(new OrderStatusEnumFactory()); + this.orderStatus.setValue(value); + return this; + } + + /** + * @return {@link #description} (Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderResponse.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public OrderResponse setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Additional description about the response - e.g. a text description provided by a human user when making decisions about the order. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Additional description about the response - e.g. a text description provided by a human user when making decisions about the order. + */ + public OrderResponse setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #fulfillment} (Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.) + */ + public List getFulfillment() { + if (this.fulfillment == null) + this.fulfillment = new ArrayList(); + return this.fulfillment; + } + + public boolean hasFulfillment() { + if (this.fulfillment == null) + return false; + for (Reference item : this.fulfillment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #fulfillment} (Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.) + */ + // syntactic sugar + public Reference addFulfillment() { //3 + Reference t = new Reference(); + if (this.fulfillment == null) + this.fulfillment = new ArrayList(); + this.fulfillment.add(t); + return t; + } + + // syntactic sugar + public OrderResponse addFulfillment(Reference t) { //3 + if (t == null) + return this; + if (this.fulfillment == null) + this.fulfillment = new ArrayList(); + this.fulfillment.add(t); + return this; + } + + /** + * @return {@link #fulfillment} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.) + */ + public List getFulfillmentTarget() { + if (this.fulfillmentTarget == null) + this.fulfillmentTarget = new ArrayList(); + return this.fulfillmentTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(Order)", "A reference to the order that this is in response to.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("date", "dateTime", "The date and time at which this order response was made (created/posted).", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("who", "Reference(Practitioner|Organization|Device)", "The person, organization, or device credited with making the response.", 0, java.lang.Integer.MAX_VALUE, who)); + childrenList.add(new Property("orderStatus", "code", "What this response says about the status of the original order.", 0, java.lang.Integer.MAX_VALUE, orderStatus)); + childrenList.add(new Property("description", "string", "Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("fulfillment", "Reference(Any)", "Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.", 0, java.lang.Integer.MAX_VALUE, fulfillment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("who")) + this.who = castToReference(value); // Reference + else if (name.equals("orderStatus")) + this.orderStatus = new OrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("fulfillment")) + this.getFulfillment().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderResponse.date"); + } + else if (name.equals("who")) { + this.who = new Reference(); + return this.who; + } + else if (name.equals("orderStatus")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderResponse.orderStatus"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderResponse.description"); + } + else if (name.equals("fulfillment")) { + return addFulfillment(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "OrderResponse"; + + } + + public OrderResponse copy() { + OrderResponse dst = new OrderResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.date = date == null ? null : date.copy(); + dst.who = who == null ? null : who.copy(); + dst.orderStatus = orderStatus == null ? null : orderStatus.copy(); + dst.description = description == null ? null : description.copy(); + if (fulfillment != null) { + dst.fulfillment = new ArrayList(); + for (Reference i : fulfillment) + dst.fulfillment.add(i.copy()); + }; + return dst; + } + + protected OrderResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrderResponse)) + return false; + OrderResponse o = (OrderResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(date, o.date, true) + && compareDeep(who, o.who, true) && compareDeep(orderStatus, o.orderStatus, true) && compareDeep(description, o.description, true) + && compareDeep(fulfillment, o.fulfillment, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrderResponse)) + return false; + OrderResponse o = (OrderResponse) other; + return compareValues(date, o.date, true) && compareValues(orderStatus, o.orderStatus, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (date == null || date.isEmpty()) && (who == null || who.isEmpty()) && (orderStatus == null || orderStatus.isEmpty()) + && (description == null || description.isEmpty()) && (fulfillment == null || fulfillment.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.OrderResponse; + } + + @SearchParamDefinition(name="date", path="OrderResponse.date", description="When the response was made", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="request", path="OrderResponse.request", description="The order that this is a response to", type="reference" ) + public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="identifier", path="OrderResponse.identifier", description="Identifiers assigned to this order by the orderer or by the receiver", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="OrderResponse.orderStatus", description="pending | review | rejected | error | accepted | cancelled | replaced | aborted | completed", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="Details of the outcome of performing the order", type="reference" ) + public static final String SP_FULFILLMENT = "fulfillment"; + @SearchParamDefinition(name="who", path="OrderResponse.who", description="Who made the response", type="reference" ) + public static final String SP_WHO = "who"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderSet.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderSet.java new file mode 100644 index 00000000000..21be0ff093c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/OrderSet.java @@ -0,0 +1,2564 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support. + */ +@ResourceDef(name="OrderSet", profile="http://hl7.org/fhir/Profile/OrderSet") +public class OrderSet extends DomainResource { + + public enum OrderSetParticipantType { + /** + * The participant is the patient under evaluation + */ + PATIENT, + /** + * The participant is a person + */ + PERSON, + /** + * The participant is a practitioner involved in the patient's care + */ + PRACTITIONER, + /** + * The participant is a person related to the patient + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static OrderSetParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("person".equals(codeString)) + return PERSON; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("related-person".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown OrderSetParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PERSON: return "person"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "related-person"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PATIENT: return "http://hl7.org/fhir/order-set-participant"; + case PERSON: return "http://hl7.org/fhir/order-set-participant"; + case PRACTITIONER: return "http://hl7.org/fhir/order-set-participant"; + case RELATEDPERSON: return "http://hl7.org/fhir/order-set-participant"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The participant is the patient under evaluation"; + case PERSON: return "The participant is a person"; + case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; + case RELATEDPERSON: return "The participant is a person related to the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "Related Person"; + default: return "?"; + } + } + } + + public static class OrderSetParticipantTypeEnumFactory implements EnumFactory { + public OrderSetParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return OrderSetParticipantType.PATIENT; + if ("person".equals(codeString)) + return OrderSetParticipantType.PERSON; + if ("practitioner".equals(codeString)) + return OrderSetParticipantType.PRACTITIONER; + if ("related-person".equals(codeString)) + return OrderSetParticipantType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown OrderSetParticipantType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return new Enumeration(this, OrderSetParticipantType.PATIENT); + if ("person".equals(codeString)) + return new Enumeration(this, OrderSetParticipantType.PERSON); + if ("practitioner".equals(codeString)) + return new Enumeration(this, OrderSetParticipantType.PRACTITIONER); + if ("related-person".equals(codeString)) + return new Enumeration(this, OrderSetParticipantType.RELATEDPERSON); + throw new FHIRException("Unknown OrderSetParticipantType code '"+codeString+"'"); + } + public String toCode(OrderSetParticipantType code) { + if (code == OrderSetParticipantType.PATIENT) + return "patient"; + if (code == OrderSetParticipantType.PERSON) + return "person"; + if (code == OrderSetParticipantType.PRACTITIONER) + return "practitioner"; + if (code == OrderSetParticipantType.RELATEDPERSON) + return "related-person"; + return "?"; + } + } + + public enum OrderSetItemType { + /** + * The action is to create a new resource + */ + CREATE, + /** + * The action is to update an existing resource + */ + UPDATE, + /** + * The action is to remove an existing resource + */ + REMOVE, + /** + * The action is to fire a specific event + */ + FIREEVENT, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("remove".equals(codeString)) + return REMOVE; + if ("fire-event".equals(codeString)) + return FIREEVENT; + throw new FHIRException("Unknown OrderSetItemType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case REMOVE: return "remove"; + case FIREEVENT: return "fire-event"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CREATE: return "http://hl7.org/fhir/order-set-item-type"; + case UPDATE: return "http://hl7.org/fhir/order-set-item-type"; + case REMOVE: return "http://hl7.org/fhir/order-set-item-type"; + case FIREEVENT: return "http://hl7.org/fhir/order-set-item-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CREATE: return "The action is to create a new resource"; + case UPDATE: return "The action is to update an existing resource"; + case REMOVE: return "The action is to remove an existing resource"; + case FIREEVENT: return "The action is to fire a specific event"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Create"; + case UPDATE: return "Update"; + case REMOVE: return "Remove"; + case FIREEVENT: return "Fire Event"; + default: return "?"; + } + } + } + + public static class OrderSetItemTypeEnumFactory implements EnumFactory { + public OrderSetItemType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return OrderSetItemType.CREATE; + if ("update".equals(codeString)) + return OrderSetItemType.UPDATE; + if ("remove".equals(codeString)) + return OrderSetItemType.REMOVE; + if ("fire-event".equals(codeString)) + return OrderSetItemType.FIREEVENT; + throw new IllegalArgumentException("Unknown OrderSetItemType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return new Enumeration(this, OrderSetItemType.CREATE); + if ("update".equals(codeString)) + return new Enumeration(this, OrderSetItemType.UPDATE); + if ("remove".equals(codeString)) + return new Enumeration(this, OrderSetItemType.REMOVE); + if ("fire-event".equals(codeString)) + return new Enumeration(this, OrderSetItemType.FIREEVENT); + throw new FHIRException("Unknown OrderSetItemType code '"+codeString+"'"); + } + public String toCode(OrderSetItemType code) { + if (code == OrderSetItemType.CREATE) + return "create"; + if (code == OrderSetItemType.UPDATE) + return "update"; + if (code == OrderSetItemType.REMOVE) + return "remove"; + if (code == OrderSetItemType.FIREEVENT) + return "fire-event"; + return "?"; + } + } + + public enum OrderSetItemGroupingBehavior { + /** + * Any group marked with this behavior should be displayed as a visual group to the end user + */ + VISUALGROUP, + /** + * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so + */ + LOGICALGROUP, + /** + * A group of related alternative items is a sentence group if the target referenced by the item is the same in all the items, and each item simply constitutes a different variation on how to specify the details for the target. For example, two items that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the item, and the two items represent two different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required item, in which case, it would be "ExactlyOne" + */ + SENTENCEGROUP, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemGroupingBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("visual-group".equals(codeString)) + return VISUALGROUP; + if ("logical-group".equals(codeString)) + return LOGICALGROUP; + if ("sentence-group".equals(codeString)) + return SENTENCEGROUP; + throw new FHIRException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case VISUALGROUP: return "visual-group"; + case LOGICALGROUP: return "logical-group"; + case SENTENCEGROUP: return "sentence-group"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case VISUALGROUP: return "http://hl7.org/fhir/grouping-behavior"; + case LOGICALGROUP: return "http://hl7.org/fhir/grouping-behavior"; + case SENTENCEGROUP: return "http://hl7.org/fhir/grouping-behavior"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user"; + case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so"; + case SENTENCEGROUP: return "A group of related alternative items is a sentence group if the target referenced by the item is the same in all the items, and each item simply constitutes a different variation on how to specify the details for the target. For example, two items that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the item, and the two items represent two different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required item, in which case, it would be \"ExactlyOne\""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case VISUALGROUP: return "Visual Group"; + case LOGICALGROUP: return "Logical Group"; + case SENTENCEGROUP: return "Sentence Group"; + default: return "?"; + } + } + } + + public static class OrderSetItemGroupingBehaviorEnumFactory implements EnumFactory { + public OrderSetItemGroupingBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("visual-group".equals(codeString)) + return OrderSetItemGroupingBehavior.VISUALGROUP; + if ("logical-group".equals(codeString)) + return OrderSetItemGroupingBehavior.LOGICALGROUP; + if ("sentence-group".equals(codeString)) + return OrderSetItemGroupingBehavior.SENTENCEGROUP; + throw new IllegalArgumentException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("visual-group".equals(codeString)) + return new Enumeration(this, OrderSetItemGroupingBehavior.VISUALGROUP); + if ("logical-group".equals(codeString)) + return new Enumeration(this, OrderSetItemGroupingBehavior.LOGICALGROUP); + if ("sentence-group".equals(codeString)) + return new Enumeration(this, OrderSetItemGroupingBehavior.SENTENCEGROUP); + throw new FHIRException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); + } + public String toCode(OrderSetItemGroupingBehavior code) { + if (code == OrderSetItemGroupingBehavior.VISUALGROUP) + return "visual-group"; + if (code == OrderSetItemGroupingBehavior.LOGICALGROUP) + return "logical-group"; + if (code == OrderSetItemGroupingBehavior.SENTENCEGROUP) + return "sentence-group"; + return "?"; + } + } + + public enum OrderSetItemSelectionBehavior { + /** + * Any number of the items in the group may be chosen, from zero to all + */ + ANY, + /** + * All the items in the group must be selected as a single unit + */ + ALL, + /** + * All the items in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected + */ + ALLORNONE, + /** + * The end user must choose one and only one of the selectable items in the group. The user may not choose none of the items in the group + */ + EXACTLYONE, + /** + * The end user may choose zero or at most one of the items in the group + */ + ATMOSTONE, + /** + * The end user must choose a minimum of one, and as many additional as desired + */ + ONEORMORE, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemSelectionBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return ANY; + if ("all".equals(codeString)) + return ALL; + if ("all-or-none".equals(codeString)) + return ALLORNONE; + if ("exactly-one".equals(codeString)) + return EXACTLYONE; + if ("at-most-one".equals(codeString)) + return ATMOSTONE; + if ("one-or-more".equals(codeString)) + return ONEORMORE; + throw new FHIRException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ANY: return "any"; + case ALL: return "all"; + case ALLORNONE: return "all-or-none"; + case EXACTLYONE: return "exactly-one"; + case ATMOSTONE: return "at-most-one"; + case ONEORMORE: return "one-or-more"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ANY: return "http://hl7.org/fhir/selection-behavior"; + case ALL: return "http://hl7.org/fhir/selection-behavior"; + case ALLORNONE: return "http://hl7.org/fhir/selection-behavior"; + case EXACTLYONE: return "http://hl7.org/fhir/selection-behavior"; + case ATMOSTONE: return "http://hl7.org/fhir/selection-behavior"; + case ONEORMORE: return "http://hl7.org/fhir/selection-behavior"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ANY: return "Any number of the items in the group may be chosen, from zero to all"; + case ALL: return "All the items in the group must be selected as a single unit"; + case ALLORNONE: return "All the items in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected"; + case EXACTLYONE: return "The end user must choose one and only one of the selectable items in the group. The user may not choose none of the items in the group"; + case ATMOSTONE: return "The end user may choose zero or at most one of the items in the group"; + case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ANY: return "Any"; + case ALL: return "All"; + case ALLORNONE: return "All Or None"; + case EXACTLYONE: return "Exactly One"; + case ATMOSTONE: return "At Most One"; + case ONEORMORE: return "One Or More"; + default: return "?"; + } + } + } + + public static class OrderSetItemSelectionBehaviorEnumFactory implements EnumFactory { + public OrderSetItemSelectionBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return OrderSetItemSelectionBehavior.ANY; + if ("all".equals(codeString)) + return OrderSetItemSelectionBehavior.ALL; + if ("all-or-none".equals(codeString)) + return OrderSetItemSelectionBehavior.ALLORNONE; + if ("exactly-one".equals(codeString)) + return OrderSetItemSelectionBehavior.EXACTLYONE; + if ("at-most-one".equals(codeString)) + return OrderSetItemSelectionBehavior.ATMOSTONE; + if ("one-or-more".equals(codeString)) + return OrderSetItemSelectionBehavior.ONEORMORE; + throw new IllegalArgumentException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.ANY); + if ("all".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.ALL); + if ("all-or-none".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.ALLORNONE); + if ("exactly-one".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.EXACTLYONE); + if ("at-most-one".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.ATMOSTONE); + if ("one-or-more".equals(codeString)) + return new Enumeration(this, OrderSetItemSelectionBehavior.ONEORMORE); + throw new FHIRException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); + } + public String toCode(OrderSetItemSelectionBehavior code) { + if (code == OrderSetItemSelectionBehavior.ANY) + return "any"; + if (code == OrderSetItemSelectionBehavior.ALL) + return "all"; + if (code == OrderSetItemSelectionBehavior.ALLORNONE) + return "all-or-none"; + if (code == OrderSetItemSelectionBehavior.EXACTLYONE) + return "exactly-one"; + if (code == OrderSetItemSelectionBehavior.ATMOSTONE) + return "at-most-one"; + if (code == OrderSetItemSelectionBehavior.ONEORMORE) + return "one-or-more"; + return "?"; + } + } + + public enum OrderSetItemRequiredBehavior { + /** + * An item with this behavior must be included in the items processed by the end user; the end user may not choose not to include this item + */ + MUST, + /** + * An item with this behavior may be included in the set of items processed by the end user + */ + COULD, + /** + * An item with this behavior must be included in the set of items processed by the end user, unless the end user provides documentation as to why the item was not included + */ + MUSTUNLESSDOCUMENTED, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemRequiredBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("must".equals(codeString)) + return MUST; + if ("could".equals(codeString)) + return COULD; + if ("must-unless-documented".equals(codeString)) + return MUSTUNLESSDOCUMENTED; + throw new FHIRException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MUST: return "must"; + case COULD: return "could"; + case MUSTUNLESSDOCUMENTED: return "must-unless-documented"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MUST: return "http://hl7.org/fhir/required-behavior"; + case COULD: return "http://hl7.org/fhir/required-behavior"; + case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/required-behavior"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MUST: return "An item with this behavior must be included in the items processed by the end user; the end user may not choose not to include this item"; + case COULD: return "An item with this behavior may be included in the set of items processed by the end user"; + case MUSTUNLESSDOCUMENTED: return "An item with this behavior must be included in the set of items processed by the end user, unless the end user provides documentation as to why the item was not included"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MUST: return "Must"; + case COULD: return "Could"; + case MUSTUNLESSDOCUMENTED: return "Must Unless Documented"; + default: return "?"; + } + } + } + + public static class OrderSetItemRequiredBehaviorEnumFactory implements EnumFactory { + public OrderSetItemRequiredBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("must".equals(codeString)) + return OrderSetItemRequiredBehavior.MUST; + if ("could".equals(codeString)) + return OrderSetItemRequiredBehavior.COULD; + if ("must-unless-documented".equals(codeString)) + return OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED; + throw new IllegalArgumentException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("must".equals(codeString)) + return new Enumeration(this, OrderSetItemRequiredBehavior.MUST); + if ("could".equals(codeString)) + return new Enumeration(this, OrderSetItemRequiredBehavior.COULD); + if ("must-unless-documented".equals(codeString)) + return new Enumeration(this, OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED); + throw new FHIRException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); + } + public String toCode(OrderSetItemRequiredBehavior code) { + if (code == OrderSetItemRequiredBehavior.MUST) + return "must"; + if (code == OrderSetItemRequiredBehavior.COULD) + return "could"; + if (code == OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED) + return "must-unless-documented"; + return "?"; + } + } + + public enum OrderSetItemPrecheckBehavior { + /** + * An item with this behavior is one of the most frequent items that is, or should be, included by an end user, for the particular context in which the item occurs. The system displaying the item to the end user should consider "pre-checking" such an item as a convenience for the user + */ + YES, + /** + * An item with this behavior is one of the less frequent items included by the end user, for the particular context in which the item occurs. The system displaying the items to the end user would typically not "pre-check" such an item + */ + NO, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemPrecheckBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("yes".equals(codeString)) + return YES; + if ("no".equals(codeString)) + return NO; + throw new FHIRException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case YES: return "yes"; + case NO: return "no"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case YES: return "http://hl7.org/fhir/precheck-behavior"; + case NO: return "http://hl7.org/fhir/precheck-behavior"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case YES: return "An item with this behavior is one of the most frequent items that is, or should be, included by an end user, for the particular context in which the item occurs. The system displaying the item to the end user should consider \"pre-checking\" such an item as a convenience for the user"; + case NO: return "An item with this behavior is one of the less frequent items included by the end user, for the particular context in which the item occurs. The system displaying the items to the end user would typically not \"pre-check\" such an item"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case YES: return "Yes"; + case NO: return "No"; + default: return "?"; + } + } + } + + public static class OrderSetItemPrecheckBehaviorEnumFactory implements EnumFactory { + public OrderSetItemPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("yes".equals(codeString)) + return OrderSetItemPrecheckBehavior.YES; + if ("no".equals(codeString)) + return OrderSetItemPrecheckBehavior.NO; + throw new IllegalArgumentException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("yes".equals(codeString)) + return new Enumeration(this, OrderSetItemPrecheckBehavior.YES); + if ("no".equals(codeString)) + return new Enumeration(this, OrderSetItemPrecheckBehavior.NO); + throw new FHIRException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); + } + public String toCode(OrderSetItemPrecheckBehavior code) { + if (code == OrderSetItemPrecheckBehavior.YES) + return "yes"; + if (code == OrderSetItemPrecheckBehavior.NO) + return "no"; + return "?"; + } + } + + public enum OrderSetItemCardinalityBehavior { + /** + * The item may only be selected one time + */ + SINGLE, + /** + * The item may be selected multiple times + */ + MULTIPLE, + /** + * added to help the parsers + */ + NULL; + public static OrderSetItemCardinalityBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("single".equals(codeString)) + return SINGLE; + if ("multiple".equals(codeString)) + return MULTIPLE; + throw new FHIRException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SINGLE: return "single"; + case MULTIPLE: return "multiple"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SINGLE: return "http://hl7.org/fhir/cardinality-behavior"; + case MULTIPLE: return "http://hl7.org/fhir/cardinality-behavior"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SINGLE: return "The item may only be selected one time"; + case MULTIPLE: return "The item may be selected multiple times"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SINGLE: return "Single"; + case MULTIPLE: return "Multiple"; + default: return "?"; + } + } + } + + public static class OrderSetItemCardinalityBehaviorEnumFactory implements EnumFactory { + public OrderSetItemCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("single".equals(codeString)) + return OrderSetItemCardinalityBehavior.SINGLE; + if ("multiple".equals(codeString)) + return OrderSetItemCardinalityBehavior.MULTIPLE; + throw new IllegalArgumentException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("single".equals(codeString)) + return new Enumeration(this, OrderSetItemCardinalityBehavior.SINGLE); + if ("multiple".equals(codeString)) + return new Enumeration(this, OrderSetItemCardinalityBehavior.MULTIPLE); + throw new FHIRException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); + } + public String toCode(OrderSetItemCardinalityBehavior code) { + if (code == OrderSetItemCardinalityBehavior.SINGLE) + return "single"; + if (code == OrderSetItemCardinalityBehavior.MULTIPLE) + return "multiple"; + return "?"; + } + } + + @Block() + public static class OrderSetItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A unique identifier for the item. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A unique identifier for the item." ) + protected Identifier identifier; + + /** + * A user-visible number for the item. + */ + @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A user-visible number for the item." ) + protected StringType number; + + /** + * The title of the item. + */ + @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The title of the item." ) + protected StringType title; + + /** + * A short description of the item. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A short description of the item." ) + protected StringType description; + + /** + * A text equivalent of the item in the orderset. + */ + @Child(name = "textEquivalent", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="A text equivalent of the item in the orderset." ) + protected StringType textEquivalent; + + /** + * Supporting evidence for the item. + */ + @Child(name = "supportingEvidence", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting evidence for the item." ) + protected List supportingEvidence; + + /** + * Supporting documentation for the item. + */ + @Child(name = "documentation", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Supporting documentation for the item." ) + protected List documentation; + + /** + * The type of participant in the item. + */ + @Child(name = "participantType", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="patient | person | practitioner | related-person", formalDefinition="The type of participant in the item." ) + protected List> participantType; + + /** + * Concepts associated with the item. + */ + @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Concepts associated with the item." ) + protected List concept; + + /** + * The type of item (create, update, remove). + */ + @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of item (create, update, remove)." ) + protected Enumeration type; + + /** + * Defines organization behavior of a group: gives the reason why the items are grouped together. + */ + @Child(name = "groupingBehavior", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines organization behavior of a group: gives the reason why the items are grouped together." ) + protected Enumeration groupingBehavior; + + /** + * Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. + */ + @Child(name = "selectionBehavior", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed." ) + protected Enumeration selectionBehavior; + + /** + * Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. + */ + @Child(name = "requiredBehavior", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional." ) + protected Enumeration requiredBehavior; + + /** + * Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. + */ + @Child(name = "precheckBehavior", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="yes | no", formalDefinition="Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time." ) + protected Enumeration precheckBehavior; + + /** + * Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. + */ + @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="single | multiple", formalDefinition="Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image." ) + protected Enumeration cardinalityBehavior; + + /** + * The resource that is the target of the item (e.g. CommunicationRequest). + */ + @Child(name = "resource", type = {}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The resource that is the target of the item (e.g. CommunicationRequest)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (The resource that is the target of the item (e.g. CommunicationRequest).) + */ + protected Resource resourceTarget; + + /** + * Customizations that should be applied to the statically defined resource. + */ + @Child(name = "customization", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Customizations that should be applied to the statically defined resource." ) + protected List customization; + + /** + * Sub items for the orderable. + */ + @Child(name = "items", type = {OrderSetItemComponent.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="Sub items for the orderable." ) + protected List items; + + private static final long serialVersionUID = -357042086L; + + /* + * Constructor + */ + public OrderSetItemComponent() { + super(); + } + + /** + * @return {@link #identifier} (A unique identifier for the item.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (A unique identifier for the item.) + */ + public OrderSetItemComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #number} (A user-visible number for the item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public StringType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new StringType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (A user-visible number for the item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public OrderSetItemComponent setNumberElement(StringType value) { + this.number = value; + return this; + } + + /** + * @return A user-visible number for the item. + */ + public String getNumber() { + return this.number == null ? null : this.number.getValue(); + } + + /** + * @param value A user-visible number for the item. + */ + public OrderSetItemComponent setNumber(String value) { + if (Utilities.noString(value)) + this.number = null; + else { + if (this.number == null) + this.number = new StringType(); + this.number.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (The title of the item.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The title of the item.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public OrderSetItemComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The title of the item. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The title of the item. + */ + public OrderSetItemComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the item.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the item.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public OrderSetItemComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the item. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the item. + */ + public OrderSetItemComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #textEquivalent} (A text equivalent of the item in the orderset.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public StringType getTextEquivalentElement() { + if (this.textEquivalent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.textEquivalent"); + else if (Configuration.doAutoCreate()) + this.textEquivalent = new StringType(); // bb + return this.textEquivalent; + } + + public boolean hasTextEquivalentElement() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + public boolean hasTextEquivalent() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + /** + * @param value {@link #textEquivalent} (A text equivalent of the item in the orderset.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public OrderSetItemComponent setTextEquivalentElement(StringType value) { + this.textEquivalent = value; + return this; + } + + /** + * @return A text equivalent of the item in the orderset. + */ + public String getTextEquivalent() { + return this.textEquivalent == null ? null : this.textEquivalent.getValue(); + } + + /** + * @param value A text equivalent of the item in the orderset. + */ + public OrderSetItemComponent setTextEquivalent(String value) { + if (Utilities.noString(value)) + this.textEquivalent = null; + else { + if (this.textEquivalent == null) + this.textEquivalent = new StringType(); + this.textEquivalent.setValue(value); + } + return this; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the item.) + */ + public List getSupportingEvidence() { + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + return this.supportingEvidence; + } + + public boolean hasSupportingEvidence() { + if (this.supportingEvidence == null) + return false; + for (Attachment item : this.supportingEvidence) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingEvidence} (Supporting evidence for the item.) + */ + // syntactic sugar + public Attachment addSupportingEvidence() { //3 + Attachment t = new Attachment(); + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return t; + } + + // syntactic sugar + public OrderSetItemComponent addSupportingEvidence(Attachment t) { //3 + if (t == null) + return this; + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return this; + } + + /** + * @return {@link #documentation} (Supporting documentation for the item.) + */ + public List getDocumentation() { + if (this.documentation == null) + this.documentation = new ArrayList(); + return this.documentation; + } + + public boolean hasDocumentation() { + if (this.documentation == null) + return false; + for (Attachment item : this.documentation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #documentation} (Supporting documentation for the item.) + */ + // syntactic sugar + public Attachment addDocumentation() { //3 + Attachment t = new Attachment(); + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return t; + } + + // syntactic sugar + public OrderSetItemComponent addDocumentation(Attachment t) { //3 + if (t == null) + return this; + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return this; + } + + /** + * @return {@link #participantType} (The type of participant in the item.) + */ + public List> getParticipantType() { + if (this.participantType == null) + this.participantType = new ArrayList>(); + return this.participantType; + } + + public boolean hasParticipantType() { + if (this.participantType == null) + return false; + for (Enumeration item : this.participantType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participantType} (The type of participant in the item.) + */ + // syntactic sugar + public Enumeration addParticipantTypeElement() {//2 + Enumeration t = new Enumeration(new OrderSetParticipantTypeEnumFactory()); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return t; + } + + /** + * @param value {@link #participantType} (The type of participant in the item.) + */ + public OrderSetItemComponent addParticipantType(OrderSetParticipantType value) { //1 + Enumeration t = new Enumeration(new OrderSetParticipantTypeEnumFactory()); + t.setValue(value); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return this; + } + + /** + * @param value {@link #participantType} (The type of participant in the item.) + */ + public boolean hasParticipantType(OrderSetParticipantType value) { + if (this.participantType == null) + return false; + for (Enumeration v : this.participantType) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #concept} (Concepts associated with the item.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (CodeableConcept item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Concepts associated with the item.) + */ + // syntactic sugar + public CodeableConcept addConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public OrderSetItemComponent addConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #type} (The type of item (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new OrderSetItemTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of item (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public OrderSetItemComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of item (create, update, remove). + */ + public OrderSetItemType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of item (create, update, remove). + */ + public OrderSetItemComponent setType(OrderSetItemType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new OrderSetItemTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #groupingBehavior} (Defines organization behavior of a group: gives the reason why the items are grouped together.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value + */ + public Enumeration getGroupingBehaviorElement() { + if (this.groupingBehavior == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.groupingBehavior"); + else if (Configuration.doAutoCreate()) + this.groupingBehavior = new Enumeration(new OrderSetItemGroupingBehaviorEnumFactory()); // bb + return this.groupingBehavior; + } + + public boolean hasGroupingBehaviorElement() { + return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); + } + + public boolean hasGroupingBehavior() { + return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); + } + + /** + * @param value {@link #groupingBehavior} (Defines organization behavior of a group: gives the reason why the items are grouped together.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value + */ + public OrderSetItemComponent setGroupingBehaviorElement(Enumeration value) { + this.groupingBehavior = value; + return this; + } + + /** + * @return Defines organization behavior of a group: gives the reason why the items are grouped together. + */ + public OrderSetItemGroupingBehavior getGroupingBehavior() { + return this.groupingBehavior == null ? null : this.groupingBehavior.getValue(); + } + + /** + * @param value Defines organization behavior of a group: gives the reason why the items are grouped together. + */ + public OrderSetItemComponent setGroupingBehavior(OrderSetItemGroupingBehavior value) { + if (value == null) + this.groupingBehavior = null; + else { + if (this.groupingBehavior == null) + this.groupingBehavior = new Enumeration(new OrderSetItemGroupingBehaviorEnumFactory()); + this.groupingBehavior.setValue(value); + } + return this; + } + + /** + * @return {@link #selectionBehavior} (Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value + */ + public Enumeration getSelectionBehaviorElement() { + if (this.selectionBehavior == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.selectionBehavior"); + else if (Configuration.doAutoCreate()) + this.selectionBehavior = new Enumeration(new OrderSetItemSelectionBehaviorEnumFactory()); // bb + return this.selectionBehavior; + } + + public boolean hasSelectionBehaviorElement() { + return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); + } + + public boolean hasSelectionBehavior() { + return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); + } + + /** + * @param value {@link #selectionBehavior} (Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value + */ + public OrderSetItemComponent setSelectionBehaviorElement(Enumeration value) { + this.selectionBehavior = value; + return this; + } + + /** + * @return Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. + */ + public OrderSetItemSelectionBehavior getSelectionBehavior() { + return this.selectionBehavior == null ? null : this.selectionBehavior.getValue(); + } + + /** + * @param value Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. + */ + public OrderSetItemComponent setSelectionBehavior(OrderSetItemSelectionBehavior value) { + if (value == null) + this.selectionBehavior = null; + else { + if (this.selectionBehavior == null) + this.selectionBehavior = new Enumeration(new OrderSetItemSelectionBehaviorEnumFactory()); + this.selectionBehavior.setValue(value); + } + return this; + } + + /** + * @return {@link #requiredBehavior} (Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value + */ + public Enumeration getRequiredBehaviorElement() { + if (this.requiredBehavior == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.requiredBehavior"); + else if (Configuration.doAutoCreate()) + this.requiredBehavior = new Enumeration(new OrderSetItemRequiredBehaviorEnumFactory()); // bb + return this.requiredBehavior; + } + + public boolean hasRequiredBehaviorElement() { + return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); + } + + public boolean hasRequiredBehavior() { + return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); + } + + /** + * @param value {@link #requiredBehavior} (Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value + */ + public OrderSetItemComponent setRequiredBehaviorElement(Enumeration value) { + this.requiredBehavior = value; + return this; + } + + /** + * @return Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. + */ + public OrderSetItemRequiredBehavior getRequiredBehavior() { + return this.requiredBehavior == null ? null : this.requiredBehavior.getValue(); + } + + /** + * @param value Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. + */ + public OrderSetItemComponent setRequiredBehavior(OrderSetItemRequiredBehavior value) { + if (value == null) + this.requiredBehavior = null; + else { + if (this.requiredBehavior == null) + this.requiredBehavior = new Enumeration(new OrderSetItemRequiredBehaviorEnumFactory()); + this.requiredBehavior.setValue(value); + } + return this; + } + + /** + * @return {@link #precheckBehavior} (Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value + */ + public Enumeration getPrecheckBehaviorElement() { + if (this.precheckBehavior == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.precheckBehavior"); + else if (Configuration.doAutoCreate()) + this.precheckBehavior = new Enumeration(new OrderSetItemPrecheckBehaviorEnumFactory()); // bb + return this.precheckBehavior; + } + + public boolean hasPrecheckBehaviorElement() { + return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); + } + + public boolean hasPrecheckBehavior() { + return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); + } + + /** + * @param value {@link #precheckBehavior} (Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value + */ + public OrderSetItemComponent setPrecheckBehaviorElement(Enumeration value) { + this.precheckBehavior = value; + return this; + } + + /** + * @return Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. + */ + public OrderSetItemPrecheckBehavior getPrecheckBehavior() { + return this.precheckBehavior == null ? null : this.precheckBehavior.getValue(); + } + + /** + * @param value Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. + */ + public OrderSetItemComponent setPrecheckBehavior(OrderSetItemPrecheckBehavior value) { + if (value == null) + this.precheckBehavior = null; + else { + if (this.precheckBehavior == null) + this.precheckBehavior = new Enumeration(new OrderSetItemPrecheckBehaviorEnumFactory()); + this.precheckBehavior.setValue(value); + } + return this; + } + + /** + * @return {@link #cardinalityBehavior} (Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value + */ + public Enumeration getCardinalityBehaviorElement() { + if (this.cardinalityBehavior == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.cardinalityBehavior"); + else if (Configuration.doAutoCreate()) + this.cardinalityBehavior = new Enumeration(new OrderSetItemCardinalityBehaviorEnumFactory()); // bb + return this.cardinalityBehavior; + } + + public boolean hasCardinalityBehaviorElement() { + return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); + } + + public boolean hasCardinalityBehavior() { + return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); + } + + /** + * @param value {@link #cardinalityBehavior} (Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value + */ + public OrderSetItemComponent setCardinalityBehaviorElement(Enumeration value) { + this.cardinalityBehavior = value; + return this; + } + + /** + * @return Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. + */ + public OrderSetItemCardinalityBehavior getCardinalityBehavior() { + return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue(); + } + + /** + * @param value Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. + */ + public OrderSetItemComponent setCardinalityBehavior(OrderSetItemCardinalityBehavior value) { + if (value == null) + this.cardinalityBehavior = null; + else { + if (this.cardinalityBehavior == null) + this.cardinalityBehavior = new Enumeration(new OrderSetItemCardinalityBehaviorEnumFactory()); + this.cardinalityBehavior.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (The resource that is the target of the item (e.g. CommunicationRequest).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The resource that is the target of the item (e.g. CommunicationRequest).) + */ + public OrderSetItemComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the item (e.g. CommunicationRequest).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the item (e.g. CommunicationRequest).) + */ + public OrderSetItemComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) + */ + public List getCustomization() { + if (this.customization == null) + this.customization = new ArrayList(); + return this.customization; + } + + public boolean hasCustomization() { + if (this.customization == null) + return false; + for (OrderSetItemCustomizationComponent item : this.customization) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) + */ + // syntactic sugar + public OrderSetItemCustomizationComponent addCustomization() { //3 + OrderSetItemCustomizationComponent t = new OrderSetItemCustomizationComponent(); + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return t; + } + + // syntactic sugar + public OrderSetItemComponent addCustomization(OrderSetItemCustomizationComponent t) { //3 + if (t == null) + return this; + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return this; + } + + /** + * @return {@link #items} (Sub items for the orderable.) + */ + public List getItems() { + if (this.items == null) + this.items = new ArrayList(); + return this.items; + } + + public boolean hasItems() { + if (this.items == null) + return false; + for (OrderSetItemComponent item : this.items) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #items} (Sub items for the orderable.) + */ + // syntactic sugar + public OrderSetItemComponent addItems() { //3 + OrderSetItemComponent t = new OrderSetItemComponent(); + if (this.items == null) + this.items = new ArrayList(); + this.items.add(t); + return t; + } + + // syntactic sugar + public OrderSetItemComponent addItems(OrderSetItemComponent t) { //3 + if (t == null) + return this; + if (this.items == null) + this.items = new ArrayList(); + this.items.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the item.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("number", "string", "A user-visible number for the item.", 0, java.lang.Integer.MAX_VALUE, number)); + childrenList.add(new Property("title", "string", "The title of the item.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "A short description of the item.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the item in the orderset.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); + childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the item.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); + childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the item.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("participantType", "code", "The type of participant in the item.", 0, java.lang.Integer.MAX_VALUE, participantType)); + childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the item.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("type", "code", "The type of item (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("groupingBehavior", "code", "Defines organization behavior of a group: gives the reason why the items are grouped together.", 0, java.lang.Integer.MAX_VALUE, groupingBehavior)); + childrenList.add(new Property("selectionBehavior", "code", "Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.", 0, java.lang.Integer.MAX_VALUE, selectionBehavior)); + childrenList.add(new Property("requiredBehavior", "code", "Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.", 0, java.lang.Integer.MAX_VALUE, requiredBehavior)); + childrenList.add(new Property("precheckBehavior", "code", "Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.", 0, java.lang.Integer.MAX_VALUE, precheckBehavior)); + childrenList.add(new Property("cardinalityBehavior", "code", "Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.", 0, java.lang.Integer.MAX_VALUE, cardinalityBehavior)); + childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the item (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("customization", "", "Customizations that should be applied to the statically defined resource.", 0, java.lang.Integer.MAX_VALUE, customization)); + childrenList.add(new Property("items", "@OrderSet.item", "Sub items for the orderable.", 0, java.lang.Integer.MAX_VALUE, items)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("number")) + this.number = castToString(value); // StringType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("textEquivalent")) + this.textEquivalent = castToString(value); // StringType + else if (name.equals("supportingEvidence")) + this.getSupportingEvidence().add(castToAttachment(value)); + else if (name.equals("documentation")) + this.getDocumentation().add(castToAttachment(value)); + else if (name.equals("participantType")) + this.getParticipantType().add(new OrderSetParticipantTypeEnumFactory().fromType(value)); + else if (name.equals("concept")) + this.getConcept().add(castToCodeableConcept(value)); + else if (name.equals("type")) + this.type = new OrderSetItemTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("groupingBehavior")) + this.groupingBehavior = new OrderSetItemGroupingBehaviorEnumFactory().fromType(value); // Enumeration + else if (name.equals("selectionBehavior")) + this.selectionBehavior = new OrderSetItemSelectionBehaviorEnumFactory().fromType(value); // Enumeration + else if (name.equals("requiredBehavior")) + this.requiredBehavior = new OrderSetItemRequiredBehaviorEnumFactory().fromType(value); // Enumeration + else if (name.equals("precheckBehavior")) + this.precheckBehavior = new OrderSetItemPrecheckBehaviorEnumFactory().fromType(value); // Enumeration + else if (name.equals("cardinalityBehavior")) + this.cardinalityBehavior = new OrderSetItemCardinalityBehaviorEnumFactory().fromType(value); // Enumeration + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("customization")) + this.getCustomization().add((OrderSetItemCustomizationComponent) value); + else if (name.equals("items")) + this.getItems().add((OrderSetItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.number"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.title"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.description"); + } + else if (name.equals("textEquivalent")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.textEquivalent"); + } + else if (name.equals("supportingEvidence")) { + return addSupportingEvidence(); + } + else if (name.equals("documentation")) { + return addDocumentation(); + } + else if (name.equals("participantType")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.participantType"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.type"); + } + else if (name.equals("groupingBehavior")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.groupingBehavior"); + } + else if (name.equals("selectionBehavior")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.selectionBehavior"); + } + else if (name.equals("requiredBehavior")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.requiredBehavior"); + } + else if (name.equals("precheckBehavior")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.precheckBehavior"); + } + else if (name.equals("cardinalityBehavior")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.cardinalityBehavior"); + } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("customization")) { + return addCustomization(); + } + else if (name.equals("items")) { + return addItems(); + } + else + return super.addChild(name); + } + + public OrderSetItemComponent copy() { + OrderSetItemComponent dst = new OrderSetItemComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.number = number == null ? null : number.copy(); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); + if (supportingEvidence != null) { + dst.supportingEvidence = new ArrayList(); + for (Attachment i : supportingEvidence) + dst.supportingEvidence.add(i.copy()); + }; + if (documentation != null) { + dst.documentation = new ArrayList(); + for (Attachment i : documentation) + dst.documentation.add(i.copy()); + }; + if (participantType != null) { + dst.participantType = new ArrayList>(); + for (Enumeration i : participantType) + dst.participantType.add(i.copy()); + }; + if (concept != null) { + dst.concept = new ArrayList(); + for (CodeableConcept i : concept) + dst.concept.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy(); + dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy(); + dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy(); + dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy(); + dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy(); + dst.resource = resource == null ? null : resource.copy(); + if (customization != null) { + dst.customization = new ArrayList(); + for (OrderSetItemCustomizationComponent i : customization) + dst.customization.add(i.copy()); + }; + if (items != null) { + dst.items = new ArrayList(); + for (OrderSetItemComponent i : items) + dst.items.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrderSetItemComponent)) + return false; + OrderSetItemComponent o = (OrderSetItemComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(number, o.number, true) && compareDeep(title, o.title, true) + && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) + && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(participantType, o.participantType, true) && compareDeep(concept, o.concept, true) + && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true) + && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true) + && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(resource, o.resource, true) + && compareDeep(customization, o.customization, true) && compareDeep(items, o.items, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrderSetItemComponent)) + return false; + OrderSetItemComponent o = (OrderSetItemComponent) other; + return compareValues(number, o.number, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(participantType, o.participantType, true) + && compareValues(type, o.type, true) && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true) + && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true) + && compareValues(cardinalityBehavior, o.cardinalityBehavior, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (number == null || number.isEmpty()) + && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty()) + && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) + && (participantType == null || participantType.isEmpty()) && (concept == null || concept.isEmpty()) + && (type == null || type.isEmpty()) && (groupingBehavior == null || groupingBehavior.isEmpty()) + && (selectionBehavior == null || selectionBehavior.isEmpty()) && (requiredBehavior == null || requiredBehavior.isEmpty()) + && (precheckBehavior == null || precheckBehavior.isEmpty()) && (cardinalityBehavior == null || cardinalityBehavior.isEmpty()) + && (resource == null || resource.isEmpty()) && (customization == null || customization.isEmpty()) + && (items == null || items.isEmpty()); + } + + public String fhirType() { + return "OrderSet.item"; + + } + + } + + @Block() + public static class OrderSetItemCustomizationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The path to the element to be customized. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The path to the element to be customized." ) + protected StringType path; + + /** + * An expression specifying the value of the customized element. + */ + @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="An expression specifying the value of the customized element." ) + protected StringType expression; + + private static final long serialVersionUID = -252690483L; + + /* + * Constructor + */ + public OrderSetItemCustomizationComponent() { + super(); + } + + /* + * Constructor + */ + public OrderSetItemCustomizationComponent(StringType path, StringType expression) { + super(); + this.path = path; + this.expression = expression; + } + + /** + * @return {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemCustomizationComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public OrderSetItemCustomizationComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The path to the element to be customized. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The path to the element to be customized. + */ + public OrderSetItemCustomizationComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public StringType getExpressionElement() { + if (this.expression == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSetItemCustomizationComponent.expression"); + else if (Configuration.doAutoCreate()) + this.expression = new StringType(); // bb + return this.expression; + } + + public boolean hasExpressionElement() { + return this.expression != null && !this.expression.isEmpty(); + } + + public boolean hasExpression() { + return this.expression != null && !this.expression.isEmpty(); + } + + /** + * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public OrderSetItemCustomizationComponent setExpressionElement(StringType value) { + this.expression = value; + return this; + } + + /** + * @return An expression specifying the value of the customized element. + */ + public String getExpression() { + return this.expression == null ? null : this.expression.getValue(); + } + + /** + * @param value An expression specifying the value of the customized element. + */ + public OrderSetItemCustomizationComponent setExpression(String value) { + if (this.expression == null) + this.expression = new StringType(); + this.expression.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The path to the element to be customized.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("expression")) + this.expression = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.path"); + } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.expression"); + } + else + return super.addChild(name); + } + + public OrderSetItemCustomizationComponent copy() { + OrderSetItemCustomizationComponent dst = new OrderSetItemCustomizationComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.expression = expression == null ? null : expression.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrderSetItemCustomizationComponent)) + return false; + OrderSetItemCustomizationComponent o = (OrderSetItemCustomizationComponent) other; + return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrderSetItemCustomizationComponent)) + return false; + OrderSetItemCustomizationComponent o = (OrderSetItemCustomizationComponent) other; + return compareValues(path, o.path, true) && compareValues(expression, o.expression, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty()) + ; + } + + public String fhirType() { + return "OrderSet.item.customization"; + + } + + } + + /** + * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + protected List identifier; + + /** + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + protected StringType version; + + /** + * A reference to a ModuleMetadata resource containing metadata for the orderset. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The metadata for the orderset", formalDefinition="A reference to a ModuleMetadata resource containing metadata for the orderset." ) + protected Reference moduleMetadata; + + /** + * The actual object that is the target of the reference (A reference to a ModuleMetadata resource containing metadata for the orderset.) + */ + protected ModuleMetadata moduleMetadataTarget; + + /** + * A reference to a Library resource containing any formal logic used by the orderset. + */ + @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Logic used by the orderset", formalDefinition="A reference to a Library resource containing any formal logic used by the orderset." ) + protected List library; + /** + * The actual objects that are the target of the reference (A reference to a Library resource containing any formal logic used by the orderset.) + */ + protected List libraryTarget; + + + /** + * The definition of the items that make up the orderset. + */ + @Child(name = "item", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="", formalDefinition="The definition of the items that make up the orderset." ) + protected List item; + + private static final long serialVersionUID = -1392358630L; + + /* + * Constructor + */ + public OrderSet() { + super(); + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public OrderSet addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSet.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public OrderSet setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + */ + public OrderSet setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing metadata for the orderset.) + */ + public Reference getModuleMetadata() { + if (this.moduleMetadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSet.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadata = new Reference(); // cc + return this.moduleMetadata; + } + + public boolean hasModuleMetadata() { + return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); + } + + /** + * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing metadata for the orderset.) + */ + public OrderSet setModuleMetadata(Reference value) { + this.moduleMetadata = value; + return this; + } + + /** + * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing metadata for the orderset.) + */ + public ModuleMetadata getModuleMetadataTarget() { + if (this.moduleMetadataTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrderSet.moduleMetadata"); + else if (Configuration.doAutoCreate()) + this.moduleMetadataTarget = new ModuleMetadata(); // aa + return this.moduleMetadataTarget; + } + + /** + * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing metadata for the orderset.) + */ + public OrderSet setModuleMetadataTarget(ModuleMetadata value) { + this.moduleMetadataTarget = value; + return this; + } + + /** + * @return {@link #library} (A reference to a Library resource containing any formal logic used by the orderset.) + */ + public List getLibrary() { + if (this.library == null) + this.library = new ArrayList(); + return this.library; + } + + public boolean hasLibrary() { + if (this.library == null) + return false; + for (Reference item : this.library) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #library} (A reference to a Library resource containing any formal logic used by the orderset.) + */ + // syntactic sugar + public Reference addLibrary() { //3 + Reference t = new Reference(); + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return t; + } + + // syntactic sugar + public OrderSet addLibrary(Reference t) { //3 + if (t == null) + return this; + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return this; + } + + /** + * @return {@link #library} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing any formal logic used by the orderset.) + */ + public List getLibraryTarget() { + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + return this.libraryTarget; + } + + // syntactic sugar + /** + * @return {@link #library} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing any formal logic used by the orderset.) + */ + public Library addLibraryTarget() { + Library r = new Library(); + if (this.libraryTarget == null) + this.libraryTarget = new ArrayList(); + this.libraryTarget.add(r); + return r; + } + + /** + * @return {@link #item} (The definition of the items that make up the orderset.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (OrderSetItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (The definition of the items that make up the orderset.) + */ + // syntactic sugar + public OrderSetItemComponent addItem() { //3 + OrderSetItemComponent t = new OrderSetItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public OrderSet addItem(OrderSetItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource containing metadata for the orderset.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing any formal logic used by the orderset.", 0, java.lang.Integer.MAX_VALUE, library)); + childrenList.add(new Property("item", "", "The definition of the items that make up the orderset.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("moduleMetadata")) + this.moduleMetadata = castToReference(value); // Reference + else if (name.equals("library")) + this.getLibrary().add(castToReference(value)); + else if (name.equals("item")) + this.getItem().add((OrderSetItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type OrderSet.version"); + } + else if (name.equals("moduleMetadata")) { + this.moduleMetadata = new Reference(); + return this.moduleMetadata; + } + else if (name.equals("library")) { + return addLibrary(); + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "OrderSet"; + + } + + public OrderSet copy() { + OrderSet dst = new OrderSet(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + if (library != null) { + dst.library = new ArrayList(); + for (Reference i : library) + dst.library.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (OrderSetItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + protected OrderSet typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrderSet)) + return false; + OrderSet o = (OrderSet) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) + && compareDeep(library, o.library, true) && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrderSet)) + return false; + OrderSet o = (OrderSet) other; + return compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) + && (item == null || item.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.OrderSet; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Organization.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Organization.java new file mode 100644 index 00000000000..add978db49e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Organization.java @@ -0,0 +1,848 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ +@ResourceDef(name="Organization", profile="http://hl7.org/fhir/Profile/Organization") +public class Organization extends DomainResource { + + @Block() + public static class OrganizationContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates a purpose for which the contact can be reached. + */ + @Child(name = "purpose", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of contact", formalDefinition="Indicates a purpose for which the contact can be reached." ) + protected CodeableConcept purpose; + + /** + * A name associated with the contact. + */ + @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A name associated with the contact", formalDefinition="A name associated with the contact." ) + protected HumanName name; + + /** + * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details (telephone, email, etc.) for a contact", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." ) + protected List telecom; + + /** + * Visiting or postal addresses for the contact. + */ + @Child(name = "address", type = {Address.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Visiting or postal addresses for the contact", formalDefinition="Visiting or postal addresses for the contact." ) + protected Address address; + + private static final long serialVersionUID = 1831121305L; + + /* + * Constructor + */ + public OrganizationContactComponent() { + super(); + } + + /** + * @return {@link #purpose} (Indicates a purpose for which the contact can be reached.) + */ + public CodeableConcept getPurpose() { + if (this.purpose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrganizationContactComponent.purpose"); + else if (Configuration.doAutoCreate()) + this.purpose = new CodeableConcept(); // cc + return this.purpose; + } + + public boolean hasPurpose() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + /** + * @param value {@link #purpose} (Indicates a purpose for which the contact can be reached.) + */ + public OrganizationContactComponent setPurpose(CodeableConcept value) { + this.purpose = value; + return this; + } + + /** + * @return {@link #name} (A name associated with the contact.) + */ + public HumanName getName() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrganizationContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new HumanName(); // cc + return this.name; + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name associated with the contact.) + */ + public OrganizationContactComponent setName(HumanName value) { + this.name = value; + return this; + } + + /** + * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public OrganizationContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #address} (Visiting or postal addresses for the contact.) + */ + public Address getAddress() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OrganizationContactComponent.address"); + else if (Configuration.doAutoCreate()) + this.address = new Address(); // cc + return this.address; + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (Visiting or postal addresses for the contact.) + */ + public OrganizationContactComponent setAddress(Address value) { + this.address = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("purpose", "CodeableConcept", "Indicates a purpose for which the contact can be reached.", 0, java.lang.Integer.MAX_VALUE, purpose)); + childrenList.add(new Property("name", "HumanName", "A name associated with the contact.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("address", "Address", "Visiting or postal addresses for the contact.", 0, java.lang.Integer.MAX_VALUE, address)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("purpose")) + this.purpose = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("name")) + this.name = castToHumanName(value); // HumanName + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("address")) + this.address = castToAddress(value); // Address + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("purpose")) { + this.purpose = new CodeableConcept(); + return this.purpose; + } + else if (name.equals("name")) { + this.name = new HumanName(); + return this.name; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("address")) { + this.address = new Address(); + return this.address; + } + else + return super.addChild(name); + } + + public OrganizationContactComponent copy() { + OrganizationContactComponent dst = new OrganizationContactComponent(); + copyValues(dst); + dst.purpose = purpose == null ? null : purpose.copy(); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.address = address == null ? null : address.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OrganizationContactComponent)) + return false; + OrganizationContactComponent o = (OrganizationContactComponent) other; + return compareDeep(purpose, o.purpose, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(address, o.address, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OrganizationContactComponent)) + return false; + OrganizationContactComponent o = (OrganizationContactComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (purpose == null || purpose.isEmpty()) && (name == null || name.isEmpty()) + && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()); + } + + public String fhirType() { + return "Organization.contact"; + + } + + } + + /** + * Identifier for the organization that is used to identify the organization across multiple disparate systems. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifies this organization across multiple systems", formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems." ) + protected List identifier; + + /** + * Whether the organization's record is still in active use. + */ + @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="Whether the organization's record is still in active use", formalDefinition="Whether the organization's record is still in active use." ) + protected BooleanType active; + + /** + * The kind of organization that this is. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of organization", formalDefinition="The kind of organization that this is." ) + protected CodeableConcept type; + + /** + * A name associated with the organization. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name used for the organization", formalDefinition="A name associated with the organization." ) + protected StringType name; + + /** + * A contact detail for the organization. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A contact detail for the organization", formalDefinition="A contact detail for the organization." ) + protected List telecom; + + /** + * An address for the organization. + */ + @Child(name = "address", type = {Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="An address for the organization", formalDefinition="An address for the organization." ) + protected List
address; + + /** + * The organization of which this organization forms a part. + */ + @Child(name = "partOf", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The organization of which this organization forms a part", formalDefinition="The organization of which this organization forms a part." ) + protected Reference partOf; + + /** + * The actual object that is the target of the reference (The organization of which this organization forms a part.) + */ + protected Organization partOfTarget; + + /** + * Contact for the organization for a certain purpose. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact for the organization for a certain purpose", formalDefinition="Contact for the organization for a certain purpose." ) + protected List contact; + + private static final long serialVersionUID = -749567123L; + + /* + * Constructor + */ + public Organization() { + super(); + } + + /** + * @return {@link #identifier} (Identifier for the organization that is used to identify the organization across multiple disparate systems.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier for the organization that is used to identify the organization across multiple disparate systems.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Organization addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #active} (Whether the organization's record is still in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public BooleanType getActiveElement() { + if (this.active == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Organization.active"); + else if (Configuration.doAutoCreate()) + this.active = new BooleanType(); // bb + return this.active; + } + + public boolean hasActiveElement() { + return this.active != null && !this.active.isEmpty(); + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); + } + + /** + * @param value {@link #active} (Whether the organization's record is still in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public Organization setActiveElement(BooleanType value) { + this.active = value; + return this; + } + + /** + * @return Whether the organization's record is still in active use. + */ + public boolean getActive() { + return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); + } + + /** + * @param value Whether the organization's record is still in active use. + */ + public Organization setActive(boolean value) { + if (this.active == null) + this.active = new BooleanType(); + this.active.setValue(value); + return this; + } + + /** + * @return {@link #type} (The kind of organization that this is.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Organization.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The kind of organization that this is.) + */ + public Organization setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #name} (A name associated with the organization.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Organization.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name associated with the organization.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Organization setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A name associated with the organization. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A name associated with the organization. + */ + public Organization setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (A contact detail for the organization.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail for the organization.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Organization addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #address} (An address for the organization.) + */ + public List
getAddress() { + if (this.address == null) + this.address = new ArrayList
(); + return this.address; + } + + public boolean hasAddress() { + if (this.address == null) + return false; + for (Address item : this.address) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #address} (An address for the organization.) + */ + // syntactic sugar + public Address addAddress() { //3 + Address t = new Address(); + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return t; + } + + // syntactic sugar + public Organization addAddress(Address t) { //3 + if (t == null) + return this; + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return this; + } + + /** + * @return {@link #partOf} (The organization of which this organization forms a part.) + */ + public Reference getPartOf() { + if (this.partOf == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Organization.partOf"); + else if (Configuration.doAutoCreate()) + this.partOf = new Reference(); // cc + return this.partOf; + } + + public boolean hasPartOf() { + return this.partOf != null && !this.partOf.isEmpty(); + } + + /** + * @param value {@link #partOf} (The organization of which this organization forms a part.) + */ + public Organization setPartOf(Reference value) { + this.partOf = value; + return this; + } + + /** + * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization of which this organization forms a part.) + */ + public Organization getPartOfTarget() { + if (this.partOfTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Organization.partOf"); + else if (Configuration.doAutoCreate()) + this.partOfTarget = new Organization(); // aa + return this.partOfTarget; + } + + /** + * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization of which this organization forms a part.) + */ + public Organization setPartOfTarget(Organization value) { + this.partOfTarget = value; + return this; + } + + /** + * @return {@link #contact} (Contact for the organization for a certain purpose.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (OrganizationContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contact for the organization for a certain purpose.) + */ + // syntactic sugar + public OrganizationContactComponent addContact() { //3 + OrganizationContactComponent t = new OrganizationContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Organization addContact(OrganizationContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier for the organization that is used to identify the organization across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("active", "boolean", "Whether the organization's record is still in active use.", 0, java.lang.Integer.MAX_VALUE, active)); + childrenList.add(new Property("type", "CodeableConcept", "The kind of organization that this is.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("name", "string", "A name associated with the organization.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the organization.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("address", "Address", "An address for the organization.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("partOf", "Reference(Organization)", "The organization of which this organization forms a part.", 0, java.lang.Integer.MAX_VALUE, partOf)); + childrenList.add(new Property("contact", "", "Contact for the organization for a certain purpose.", 0, java.lang.Integer.MAX_VALUE, contact)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("active")) + this.active = castToBoolean(value); // BooleanType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("address")) + this.getAddress().add(castToAddress(value)); + else if (name.equals("partOf")) + this.partOf = castToReference(value); // Reference + else if (name.equals("contact")) + this.getContact().add((OrganizationContactComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("active")) { + throw new FHIRException("Cannot call addChild on a primitive type Organization.active"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Organization.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("address")) { + return addAddress(); + } + else if (name.equals("partOf")) { + this.partOf = new Reference(); + return this.partOf; + } + else if (name.equals("contact")) { + return addContact(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Organization"; + + } + + public Organization copy() { + Organization dst = new Organization(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.active = active == null ? null : active.copy(); + dst.type = type == null ? null : type.copy(); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + if (address != null) { + dst.address = new ArrayList
(); + for (Address i : address) + dst.address.add(i.copy()); + }; + dst.partOf = partOf == null ? null : partOf.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (OrganizationContactComponent i : contact) + dst.contact.add(i.copy()); + }; + return dst; + } + + protected Organization typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Organization)) + return false; + Organization o = (Organization) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(type, o.type, true) + && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) + && compareDeep(partOf, o.partOf, true) && compareDeep(contact, o.contact, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Organization)) + return false; + Organization o = (Organization) other; + return compareValues(active, o.active, true) && compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) + && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + && (address == null || address.isEmpty()) && (partOf == null || partOf.isEmpty()) && (contact == null || contact.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Organization; + } + + @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="partof", path="Organization.partOf", description="Search all organizations that are part of the given organization", type="reference" ) + public static final String SP_PARTOF = "partof"; + @SearchParamDefinition(name="phonetic", path="Organization.name", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="address", path="Organization.address", description="A (part of the) address of the Organization", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="address-state", path="Organization.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="name", path="Organization.name", description="A portion of the organization's name", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="Organization.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="active", path="Organization.active", description="Whether the organization's record is active", type="token" ) + public static final String SP_ACTIVE = "active"; + @SearchParamDefinition(name="type", path="Organization.type", description="A code for the type of organization", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="address-city", path="Organization.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="address-postalcode", path="Organization.address.postalCode", description="A postal code specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="address-country", path="Organization.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Parameters.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Parameters.java new file mode 100644 index 00000000000..77af21e7c6e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Parameters.java @@ -0,0 +1,565 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ +@ResourceDef(name="Parameters", profile="http://hl7.org/fhir/Profile/Parameters") +public class Parameters extends Resource implements IBaseParameters { + + @Block() + public static class ParametersParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the parameter (reference to the operation definition). + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name from the definition", formalDefinition="The name of the parameter (reference to the operation definition)." ) + protected StringType name; + + /** + * If the parameter is a data type. + */ + @Child(name = "value", type = {}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If parameter is a data type", formalDefinition="If the parameter is a data type." ) + protected org.hl7.fhir.dstu21.model.Type value; + + /** + * If the parameter is a whole resource. + */ + @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If parameter is a whole resource", formalDefinition="If the parameter is a whole resource." ) + protected Resource resource; + + /** + * A named part of a parameter. In many implementation context, a set of named parts is known as a "Tuple". + */ + @Child(name = "part", type = {ParametersParameterComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Named part of a parameter (e.g. Tuple)", formalDefinition="A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\"." ) + protected List part; + + private static final long serialVersionUID = -1484269842L; + + /* + * Constructor + */ + public ParametersParameterComponent() { + super(); + } + + /* + * Constructor + */ + public ParametersParameterComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParametersParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ParametersParameterComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the parameter (reference to the operation definition). + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the parameter (reference to the operation definition). + */ + public ParametersParameterComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (If the parameter is a data type.) + */ + public org.hl7.fhir.dstu21.model.Type getValue() { + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (If the parameter is a data type.) + */ + public ParametersParameterComponent setValue(org.hl7.fhir.dstu21.model.Type value) { + this.value = value; + return this; + } + + /** + * @return {@link #resource} (If the parameter is a whole resource.) + */ + public Resource getResource() { + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (If the parameter is a whole resource.) + */ + public ParametersParameterComponent setResource(Resource value) { + this.resource = value; + return this; + } + + /** + * @return {@link #part} (A named part of a parameter. In many implementation context, a set of named parts is known as a "Tuple".) + */ + public List getPart() { + if (this.part == null) + this.part = new ArrayList(); + return this.part; + } + + public boolean hasPart() { + if (this.part == null) + return false; + for (ParametersParameterComponent item : this.part) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #part} (A named part of a parameter. In many implementation context, a set of named parts is known as a "Tuple".) + */ + // syntactic sugar + public ParametersParameterComponent addPart() { //3 + ParametersParameterComponent t = new ParametersParameterComponent(); + if (this.part == null) + this.part = new ArrayList(); + this.part.add(t); + return t; + } + + // syntactic sugar + public ParametersParameterComponent addPart(ParametersParameterComponent t) { //3 + if (t == null) + return this; + if (this.part == null) + this.part = new ArrayList(); + this.part.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the parameter (reference to the operation definition).", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value[x]", "*", "If the parameter is a data type.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("resource", "Resource", "If the parameter is a whole resource.", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("part", "@Parameters.parameter", "A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\".", 0, java.lang.Integer.MAX_VALUE, part)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (org.hl7.fhir.dstu21.model.Type) value; // org.hl7.fhir.dstu21.model.Type + else if (name.equals("resource")) + this.resource = castToResource(value); // Resource + else if (name.equals("part")) + this.getPart().add((ParametersParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Parameters.name"); + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueBase64Binary")) { + this.value = new Base64BinaryType(); + return this.value; + } + else if (name.equals("valueInstant")) { + this.value = new InstantType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueCode")) { + this.value = new CodeType(); + return this.value; + } + else if (name.equals("valueOid")) { + this.value = new OidType(); + return this.value; + } + else if (name.equals("valueId")) { + this.value = new IdType(); + return this.value; + } + else if (name.equals("valueUnsignedInt")) { + this.value = new UnsignedIntType(); + return this.value; + } + else if (name.equals("valuePositiveInt")) { + this.value = new PositiveIntType(); + return this.value; + } + else if (name.equals("valueMarkdown")) { + this.value = new MarkdownType(); + return this.value; + } + else if (name.equals("valueAnnotation")) { + this.value = new Annotation(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueIdentifier")) { + this.value = new Identifier(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueSignature")) { + this.value = new Signature(); + return this.value; + } + else if (name.equals("valueHumanName")) { + this.value = new HumanName(); + return this.value; + } + else if (name.equals("valueAddress")) { + this.value = new Address(); + return this.value; + } + else if (name.equals("valueContactPoint")) { + this.value = new ContactPoint(); + return this.value; + } + else if (name.equals("valueTiming")) { + this.value = new Timing(); + return this.value; + } + else if (name.equals("valueReference")) { + this.value = new Reference(); + return this.value; + } + else if (name.equals("valueMeta")) { + this.value = new Meta(); + return this.value; + } + else if (name.equals("resource")) { + throw new FHIRException("Cannot call addChild on an abstract type Parameters.resource"); + } + else if (name.equals("part")) { + return addPart(); + } + else + return super.addChild(name); + } + + public ParametersParameterComponent copy() { + ParametersParameterComponent dst = new ParametersParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + dst.resource = resource == null ? null : resource.copy(); + if (part != null) { + dst.part = new ArrayList(); + for (ParametersParameterComponent i : part) + dst.part.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ParametersParameterComponent)) + return false; + ParametersParameterComponent o = (ParametersParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true) && compareDeep(resource, o.resource, true) + && compareDeep(part, o.part, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ParametersParameterComponent)) + return false; + ParametersParameterComponent o = (ParametersParameterComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) + && (resource == null || resource.isEmpty()) && (part == null || part.isEmpty()); + } + + public String fhirType() { + return "null"; + + } + + } + + /** + * A parameter passed to or received from the operation. + */ + @Child(name = "parameter", type = {}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Operation Parameter", formalDefinition="A parameter passed to or received from the operation." ) + protected List parameter; + + private static final long serialVersionUID = -1495940293L; + + /* + * Constructor + */ + public Parameters() { + super(); + } + + /** + * @return {@link #parameter} (A parameter passed to or received from the operation.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (ParametersParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (A parameter passed to or received from the operation.) + */ + // syntactic sugar + public ParametersParameterComponent addParameter() { //3 + ParametersParameterComponent t = new ParametersParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public Parameters addParameter(ParametersParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("parameter", "", "A parameter passed to or received from the operation.", 0, java.lang.Integer.MAX_VALUE, parameter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("parameter")) + this.getParameter().add((ParametersParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("parameter")) { + return addParameter(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Parameters"; + + } + + public Parameters copy() { + Parameters dst = new Parameters(); + copyValues(dst); + if (parameter != null) { + dst.parameter = new ArrayList(); + for (ParametersParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + return dst; + } + + protected Parameters typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Parameters)) + return false; + Parameters o = (Parameters) other; + return compareDeep(parameter, o.parameter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Parameters)) + return false; + Parameters o = (Parameters) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (parameter == null || parameter.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Parameters; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Patient.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Patient.java new file mode 100644 index 00000000000..946f49fb53b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Patient.java @@ -0,0 +1,2265 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ +@ResourceDef(name="Patient", profile="http://hl7.org/fhir/Profile/Patient") +public class Patient extends DomainResource { + + public enum LinkType { + /** + * The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link. + */ + REPLACE, + /** + * The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information. + */ + REFER, + /** + * The patient resource containing this link is in use and valid, but points to another patient resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other patient resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid. + */ + SEEALSO, + /** + * added to help the parsers + */ + NULL; + public static LinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replace".equals(codeString)) + return REPLACE; + if ("refer".equals(codeString)) + return REFER; + if ("seealso".equals(codeString)) + return SEEALSO; + throw new FHIRException("Unknown LinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REPLACE: return "replace"; + case REFER: return "refer"; + case SEEALSO: return "seealso"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REPLACE: return "http://hl7.org/fhir/link-type"; + case REFER: return "http://hl7.org/fhir/link-type"; + case SEEALSO: return "http://hl7.org/fhir/link-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REPLACE: return "The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link."; + case REFER: return "The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information."; + case SEEALSO: return "The patient resource containing this link is in use and valid, but points to another patient resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other patient resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REPLACE: return "Replace"; + case REFER: return "Refer"; + case SEEALSO: return "See also"; + default: return "?"; + } + } + } + + public static class LinkTypeEnumFactory implements EnumFactory { + public LinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("replace".equals(codeString)) + return LinkType.REPLACE; + if ("refer".equals(codeString)) + return LinkType.REFER; + if ("seealso".equals(codeString)) + return LinkType.SEEALSO; + throw new IllegalArgumentException("Unknown LinkType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("replace".equals(codeString)) + return new Enumeration(this, LinkType.REPLACE); + if ("refer".equals(codeString)) + return new Enumeration(this, LinkType.REFER); + if ("seealso".equals(codeString)) + return new Enumeration(this, LinkType.SEEALSO); + throw new FHIRException("Unknown LinkType code '"+codeString+"'"); + } + public String toCode(LinkType code) { + if (code == LinkType.REPLACE) + return "replace"; + if (code == LinkType.REFER) + return "refer"; + if (code == LinkType.SEEALSO) + return "seealso"; + return "?"; + } + } + + @Block() + public static class ContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The nature of the relationship between the patient and the contact person. + */ + @Child(name = "relationship", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The kind of relationship", formalDefinition="The nature of the relationship between the patient and the contact person." ) + protected List relationship; + + /** + * A name associated with the contact person. + */ + @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A name associated with the contact person", formalDefinition="A name associated with the contact person." ) + protected HumanName name; + + /** + * A contact detail for the person, e.g. a telephone number or an email address. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) + protected List telecom; + + /** + * Address for the contact person. + */ + @Child(name = "address", type = {Address.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Address for the contact person", formalDefinition="Address for the contact person." ) + protected Address address; + + /** + * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes. + */ + @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * Organization on behalf of which the contact is acting or for which the contact is working. + */ + @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Organization that is associated with the contact", formalDefinition="Organization on behalf of which the contact is acting or for which the contact is working." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (Organization on behalf of which the contact is acting or for which the contact is working.) + */ + protected Organization organizationTarget; + + /** + * The period during which this contact person or organization is valid to be contacted relating to this patient. + */ + @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The period during which this contact person or organization is valid to be contacted relating to this patient", formalDefinition="The period during which this contact person or organization is valid to be contacted relating to this patient." ) + protected Period period; + + private static final long serialVersionUID = 364269017L; + + /* + * Constructor + */ + public ContactComponent() { + super(); + } + + /** + * @return {@link #relationship} (The nature of the relationship between the patient and the contact person.) + */ + public List getRelationship() { + if (this.relationship == null) + this.relationship = new ArrayList(); + return this.relationship; + } + + public boolean hasRelationship() { + if (this.relationship == null) + return false; + for (CodeableConcept item : this.relationship) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #relationship} (The nature of the relationship between the patient and the contact person.) + */ + // syntactic sugar + public CodeableConcept addRelationship() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.relationship == null) + this.relationship = new ArrayList(); + this.relationship.add(t); + return t; + } + + // syntactic sugar + public ContactComponent addRelationship(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.relationship == null) + this.relationship = new ArrayList(); + this.relationship.add(t); + return this; + } + + /** + * @return {@link #name} (A name associated with the contact person.) + */ + public HumanName getName() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new HumanName(); // cc + return this.name; + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name associated with the contact person.) + */ + public ContactComponent setName(HumanName value) { + this.name = value; + return this; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #address} (Address for the contact person.) + */ + public Address getAddress() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.address"); + else if (Configuration.doAutoCreate()) + this.address = new Address(); // cc + return this.address; + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (Address for the contact person.) + */ + public ContactComponent setAddress(Address value) { + this.address = value; + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public ContactComponent setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes. + */ + public ContactComponent setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (Organization on behalf of which the contact is acting or for which the contact is working.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (Organization on behalf of which the contact is acting or for which the contact is working.) + */ + public ContactComponent setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Organization on behalf of which the contact is acting or for which the contact is working.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Organization on behalf of which the contact is acting or for which the contact is working.) + */ + public ContactComponent setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #period} (The period during which this contact person or organization is valid to be contacted relating to this patient.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ContactComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which this contact person or organization is valid to be contacted relating to this patient.) + */ + public ContactComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("relationship", "CodeableConcept", "The nature of the relationship between the patient and the contact person.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("name", "HumanName", "A name associated with the contact person.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the person, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("address", "Address", "Address for the contact person.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("organization", "Reference(Organization)", "Organization on behalf of which the contact is acting or for which the contact is working.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("period", "Period", "The period during which this contact person or organization is valid to be contacted relating to this patient.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("relationship")) + this.getRelationship().add(castToCodeableConcept(value)); + else if (name.equals("name")) + this.name = castToHumanName(value); // HumanName + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("address")) + this.address = castToAddress(value); // Address + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("relationship")) { + return addRelationship(); + } + else if (name.equals("name")) { + this.name = new HumanName(); + return this.name; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("address")) { + this.address = new Address(); + return this.address; + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.gender"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public ContactComponent copy() { + ContactComponent dst = new ContactComponent(); + copyValues(dst); + if (relationship != null) { + dst.relationship = new ArrayList(); + for (CodeableConcept i : relationship) + dst.relationship.add(i.copy()); + }; + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.address = address == null ? null : address.copy(); + dst.gender = gender == null ? null : gender.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ContactComponent)) + return false; + ContactComponent o = (ContactComponent) other; + return compareDeep(relationship, o.relationship, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) && compareDeep(organization, o.organization, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ContactComponent)) + return false; + ContactComponent o = (ContactComponent) other; + return compareValues(gender, o.gender, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (relationship == null || relationship.isEmpty()) && (name == null || name.isEmpty()) + && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) && (gender == null || gender.isEmpty()) + && (organization == null || organization.isEmpty()) && (period == null || period.isEmpty()) + ; + } + + public String fhirType() { + return "Patient.contact"; + + } + + } + + @Block() + public static class AnimalComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the high level taxonomic categorization of the kind of animal. + */ + @Child(name = "species", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. Dog, Cow", formalDefinition="Identifies the high level taxonomic categorization of the kind of animal." ) + protected CodeableConcept species; + + /** + * Identifies the detailed categorization of the kind of animal. + */ + @Child(name = "breed", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. Poodle, Angus", formalDefinition="Identifies the detailed categorization of the kind of animal." ) + protected CodeableConcept breed; + + /** + * Indicates the current state of the animal's reproductive organs. + */ + @Child(name = "genderStatus", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. Neutered, Intact", formalDefinition="Indicates the current state of the animal's reproductive organs." ) + protected CodeableConcept genderStatus; + + private static final long serialVersionUID = -549738382L; + + /* + * Constructor + */ + public AnimalComponent() { + super(); + } + + /* + * Constructor + */ + public AnimalComponent(CodeableConcept species) { + super(); + this.species = species; + } + + /** + * @return {@link #species} (Identifies the high level taxonomic categorization of the kind of animal.) + */ + public CodeableConcept getSpecies() { + if (this.species == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AnimalComponent.species"); + else if (Configuration.doAutoCreate()) + this.species = new CodeableConcept(); // cc + return this.species; + } + + public boolean hasSpecies() { + return this.species != null && !this.species.isEmpty(); + } + + /** + * @param value {@link #species} (Identifies the high level taxonomic categorization of the kind of animal.) + */ + public AnimalComponent setSpecies(CodeableConcept value) { + this.species = value; + return this; + } + + /** + * @return {@link #breed} (Identifies the detailed categorization of the kind of animal.) + */ + public CodeableConcept getBreed() { + if (this.breed == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AnimalComponent.breed"); + else if (Configuration.doAutoCreate()) + this.breed = new CodeableConcept(); // cc + return this.breed; + } + + public boolean hasBreed() { + return this.breed != null && !this.breed.isEmpty(); + } + + /** + * @param value {@link #breed} (Identifies the detailed categorization of the kind of animal.) + */ + public AnimalComponent setBreed(CodeableConcept value) { + this.breed = value; + return this; + } + + /** + * @return {@link #genderStatus} (Indicates the current state of the animal's reproductive organs.) + */ + public CodeableConcept getGenderStatus() { + if (this.genderStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AnimalComponent.genderStatus"); + else if (Configuration.doAutoCreate()) + this.genderStatus = new CodeableConcept(); // cc + return this.genderStatus; + } + + public boolean hasGenderStatus() { + return this.genderStatus != null && !this.genderStatus.isEmpty(); + } + + /** + * @param value {@link #genderStatus} (Indicates the current state of the animal's reproductive organs.) + */ + public AnimalComponent setGenderStatus(CodeableConcept value) { + this.genderStatus = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("species", "CodeableConcept", "Identifies the high level taxonomic categorization of the kind of animal.", 0, java.lang.Integer.MAX_VALUE, species)); + childrenList.add(new Property("breed", "CodeableConcept", "Identifies the detailed categorization of the kind of animal.", 0, java.lang.Integer.MAX_VALUE, breed)); + childrenList.add(new Property("genderStatus", "CodeableConcept", "Indicates the current state of the animal's reproductive organs.", 0, java.lang.Integer.MAX_VALUE, genderStatus)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("species")) + this.species = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("breed")) + this.breed = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("genderStatus")) + this.genderStatus = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("species")) { + this.species = new CodeableConcept(); + return this.species; + } + else if (name.equals("breed")) { + this.breed = new CodeableConcept(); + return this.breed; + } + else if (name.equals("genderStatus")) { + this.genderStatus = new CodeableConcept(); + return this.genderStatus; + } + else + return super.addChild(name); + } + + public AnimalComponent copy() { + AnimalComponent dst = new AnimalComponent(); + copyValues(dst); + dst.species = species == null ? null : species.copy(); + dst.breed = breed == null ? null : breed.copy(); + dst.genderStatus = genderStatus == null ? null : genderStatus.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof AnimalComponent)) + return false; + AnimalComponent o = (AnimalComponent) other; + return compareDeep(species, o.species, true) && compareDeep(breed, o.breed, true) && compareDeep(genderStatus, o.genderStatus, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof AnimalComponent)) + return false; + AnimalComponent o = (AnimalComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (species == null || species.isEmpty()) && (breed == null || breed.isEmpty()) + && (genderStatus == null || genderStatus.isEmpty()); + } + + public String fhirType() { + return "Patient.animal"; + + } + + } + + @Block() + public static class PatientCommunicationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English. + */ + @Child(name = "language", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The language which can be used to communicate with the patient about his or her health", formalDefinition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English." ) + protected CodeableConcept language; + + /** + * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level). + */ + @Child(name = "preferred", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Language preference indicator", formalDefinition="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." ) + protected BooleanType preferred; + + private static final long serialVersionUID = 633792918L; + + /* + * Constructor + */ + public PatientCommunicationComponent() { + super(); + } + + /* + * Constructor + */ + public PatientCommunicationComponent(CodeableConcept language) { + super(); + this.language = language; + } + + /** + * @return {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.) + */ + public CodeableConcept getLanguage() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PatientCommunicationComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeableConcept(); // cc + return this.language; + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.) + */ + public PatientCommunicationComponent setLanguage(CodeableConcept value) { + this.language = value; + return this; + } + + /** + * @return {@link #preferred} (Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value + */ + public BooleanType getPreferredElement() { + if (this.preferred == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PatientCommunicationComponent.preferred"); + else if (Configuration.doAutoCreate()) + this.preferred = new BooleanType(); // bb + return this.preferred; + } + + public boolean hasPreferredElement() { + return this.preferred != null && !this.preferred.isEmpty(); + } + + public boolean hasPreferred() { + return this.preferred != null && !this.preferred.isEmpty(); + } + + /** + * @param value {@link #preferred} (Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value + */ + public PatientCommunicationComponent setPreferredElement(BooleanType value) { + this.preferred = value; + return this; + } + + /** + * @return Indicates whether or not the patient prefers this language (over other languages he masters up a certain level). + */ + public boolean getPreferred() { + return this.preferred == null || this.preferred.isEmpty() ? false : this.preferred.getValue(); + } + + /** + * @param value Indicates whether or not the patient prefers this language (over other languages he masters up a certain level). + */ + public PatientCommunicationComponent setPreferred(boolean value) { + if (this.preferred == null) + this.preferred = new BooleanType(); + this.preferred.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("preferred", "boolean", "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", 0, java.lang.Integer.MAX_VALUE, preferred)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("language")) + this.language = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("preferred")) + this.preferred = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("language")) { + this.language = new CodeableConcept(); + return this.language; + } + else if (name.equals("preferred")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.preferred"); + } + else + return super.addChild(name); + } + + public PatientCommunicationComponent copy() { + PatientCommunicationComponent dst = new PatientCommunicationComponent(); + copyValues(dst); + dst.language = language == null ? null : language.copy(); + dst.preferred = preferred == null ? null : preferred.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PatientCommunicationComponent)) + return false; + PatientCommunicationComponent o = (PatientCommunicationComponent) other; + return compareDeep(language, o.language, true) && compareDeep(preferred, o.preferred, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PatientCommunicationComponent)) + return false; + PatientCommunicationComponent o = (PatientCommunicationComponent) other; + return compareValues(preferred, o.preferred, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (language == null || language.isEmpty()) && (preferred == null || preferred.isEmpty()) + ; + } + + public String fhirType() { + return "Patient.communication"; + + } + + } + + @Block() + public static class PatientLinkComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The other patient resource that the link refers to. + */ + @Child(name = "other", type = {Patient.class}, order=1, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="The other patient resource that the link refers to", formalDefinition="The other patient resource that the link refers to." ) + protected Reference other; + + /** + * The actual object that is the target of the reference (The other patient resource that the link refers to.) + */ + protected Patient otherTarget; + + /** + * The type of link between this patient resource and another patient resource. + */ + @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="replace | refer | seealso - type of link", formalDefinition="The type of link between this patient resource and another patient resource." ) + protected Enumeration type; + + private static final long serialVersionUID = -1942104050L; + + /* + * Constructor + */ + public PatientLinkComponent() { + super(); + } + + /* + * Constructor + */ + public PatientLinkComponent(Reference other, Enumeration type) { + super(); + this.other = other; + this.type = type; + } + + /** + * @return {@link #other} (The other patient resource that the link refers to.) + */ + public Reference getOther() { + if (this.other == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PatientLinkComponent.other"); + else if (Configuration.doAutoCreate()) + this.other = new Reference(); // cc + return this.other; + } + + public boolean hasOther() { + return this.other != null && !this.other.isEmpty(); + } + + /** + * @param value {@link #other} (The other patient resource that the link refers to.) + */ + public PatientLinkComponent setOther(Reference value) { + this.other = value; + return this; + } + + /** + * @return {@link #other} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The other patient resource that the link refers to.) + */ + public Patient getOtherTarget() { + if (this.otherTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PatientLinkComponent.other"); + else if (Configuration.doAutoCreate()) + this.otherTarget = new Patient(); // aa + return this.otherTarget; + } + + /** + * @param value {@link #other} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The other patient resource that the link refers to.) + */ + public PatientLinkComponent setOtherTarget(Patient value) { + this.otherTarget = value; + return this; + } + + /** + * @return {@link #type} (The type of link between this patient resource and another patient resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PatientLinkComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new LinkTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of link between this patient resource and another patient resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public PatientLinkComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of link between this patient resource and another patient resource. + */ + public LinkType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of link between this patient resource and another patient resource. + */ + public PatientLinkComponent setType(LinkType value) { + if (this.type == null) + this.type = new Enumeration(new LinkTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("other", "Reference(Patient)", "The other patient resource that the link refers to.", 0, java.lang.Integer.MAX_VALUE, other)); + childrenList.add(new Property("type", "code", "The type of link between this patient resource and another patient resource.", 0, java.lang.Integer.MAX_VALUE, type)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("other")) + this.other = castToReference(value); // Reference + else if (name.equals("type")) + this.type = new LinkTypeEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("other")) { + this.other = new Reference(); + return this.other; + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.type"); + } + else + return super.addChild(name); + } + + public PatientLinkComponent copy() { + PatientLinkComponent dst = new PatientLinkComponent(); + copyValues(dst); + dst.other = other == null ? null : other.copy(); + dst.type = type == null ? null : type.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PatientLinkComponent)) + return false; + PatientLinkComponent o = (PatientLinkComponent) other; + return compareDeep(other, o.other, true) && compareDeep(type, o.type, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PatientLinkComponent)) + return false; + PatientLinkComponent o = (PatientLinkComponent) other; + return compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (other == null || other.isEmpty()) && (type == null || type.isEmpty()) + ; + } + + public String fhirType() { + return "Patient.link"; + + } + + } + + /** + * An identifier for this patient. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="An identifier for this patient", formalDefinition="An identifier for this patient." ) + protected List identifier; + + /** + * Whether this patient record is in active use. + */ + @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="Whether this patient's record is in active use", formalDefinition="Whether this patient record is in active use." ) + protected BooleanType active; + + /** + * A name associated with the individual. + */ + @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A name associated with the patient", formalDefinition="A name associated with the individual." ) + protected List name; + + /** + * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A contact detail for the individual", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." ) + protected List telecom; + + /** + * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. + */ + @Child(name = "gender", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * The date of birth for the individual. + */ + @Child(name = "birthDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date of birth for the individual", formalDefinition="The date of birth for the individual." ) + protected DateType birthDate; + + /** + * Indicates if the individual is deceased or not. + */ + @Child(name = "deceased", type = {BooleanType.class, DateTimeType.class}, order=6, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="Indicates if the individual is deceased or not", formalDefinition="Indicates if the individual is deceased or not." ) + protected Type deceased; + + /** + * Addresses for the individual. + */ + @Child(name = "address", type = {Address.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Addresses for the individual", formalDefinition="Addresses for the individual." ) + protected List
address; + + /** + * This field contains a patient's most recent marital (civil) status. + */ + @Child(name = "maritalStatus", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Marital (civil) status of a patient", formalDefinition="This field contains a patient's most recent marital (civil) status." ) + protected CodeableConcept maritalStatus; + + /** + * Indicates whether the patient is part of a multiple or indicates the actual birth order. + */ + @Child(name = "multipleBirth", type = {BooleanType.class, IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order." ) + protected Type multipleBirth; + + /** + * Image of the patient. + */ + @Child(name = "photo", type = {Attachment.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Image of the patient", formalDefinition="Image of the patient." ) + protected List photo; + + /** + * A contact party (e.g. guardian, partner, friend) for the patient. + */ + @Child(name = "contact", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A contact party (e.g. guardian, partner, friend) for the patient", formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient." ) + protected List contact; + + /** + * This patient is known to be an animal. + */ + @Child(name = "animal", type = {}, order=12, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="This patient is known to be an animal (non-human)", formalDefinition="This patient is known to be an animal." ) + protected AnimalComponent animal; + + /** + * Languages which may be used to communicate with the patient about his or her health. + */ + @Child(name = "communication", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A list of Languages which may be used to communicate with the patient about his or her health", formalDefinition="Languages which may be used to communicate with the patient about his or her health." ) + protected List communication; + + /** + * Patient's nominated care provider. + */ + @Child(name = "careProvider", type = {Organization.class, Practitioner.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Patient's nominated primary care provider", formalDefinition="Patient's nominated care provider." ) + protected List careProvider; + /** + * The actual objects that are the target of the reference (Patient's nominated care provider.) + */ + protected List careProviderTarget; + + + /** + * Organization that is the custodian of the patient record. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization that is the custodian of the patient record", formalDefinition="Organization that is the custodian of the patient record." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (Organization that is the custodian of the patient record.) + */ + protected Organization managingOrganizationTarget; + + /** + * Link to another patient resource that concerns the same actual patient. + */ + @Child(name = "link", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=false) + @Description(shortDefinition="Link to another patient resource that concerns the same actual person", formalDefinition="Link to another patient resource that concerns the same actual patient." ) + protected List link; + + private static final long serialVersionUID = 2019992554L; + + /* + * Constructor + */ + public Patient() { + super(); + } + + /** + * @return {@link #identifier} (An identifier for this patient.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (An identifier for this patient.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Patient addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #active} (Whether this patient record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public BooleanType getActiveElement() { + if (this.active == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.active"); + else if (Configuration.doAutoCreate()) + this.active = new BooleanType(); // bb + return this.active; + } + + public boolean hasActiveElement() { + return this.active != null && !this.active.isEmpty(); + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); + } + + /** + * @param value {@link #active} (Whether this patient record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public Patient setActiveElement(BooleanType value) { + this.active = value; + return this; + } + + /** + * @return Whether this patient record is in active use. + */ + public boolean getActive() { + return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); + } + + /** + * @param value Whether this patient record is in active use. + */ + public Patient setActive(boolean value) { + if (this.active == null) + this.active = new BooleanType(); + this.active.setValue(value); + return this; + } + + /** + * @return {@link #name} (A name associated with the individual.) + */ + public List getName() { + if (this.name == null) + this.name = new ArrayList(); + return this.name; + } + + public boolean hasName() { + if (this.name == null) + return false; + for (HumanName item : this.name) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #name} (A name associated with the individual.) + */ + // syntactic sugar + public HumanName addName() { //3 + HumanName t = new HumanName(); + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); + return t; + } + + // syntactic sugar + public Patient addName(HumanName t) { //3 + if (t == null) + return this; + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); + return this; + } + + /** + * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Patient addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Patient setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. + */ + public Patient setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #birthDate} (The date of birth for the individual.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public DateType getBirthDateElement() { + if (this.birthDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.birthDate"); + else if (Configuration.doAutoCreate()) + this.birthDate = new DateType(); // bb + return this.birthDate; + } + + public boolean hasBirthDateElement() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + public boolean hasBirthDate() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + /** + * @param value {@link #birthDate} (The date of birth for the individual.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public Patient setBirthDateElement(DateType value) { + this.birthDate = value; + return this; + } + + /** + * @return The date of birth for the individual. + */ + public Date getBirthDate() { + return this.birthDate == null ? null : this.birthDate.getValue(); + } + + /** + * @param value The date of birth for the individual. + */ + public Patient setBirthDate(Date value) { + if (value == null) + this.birthDate = null; + else { + if (this.birthDate == null) + this.birthDate = new DateType(); + this.birthDate.setValue(value); + } + return this; + } + + /** + * @return {@link #deceased} (Indicates if the individual is deceased or not.) + */ + public Type getDeceased() { + return this.deceased; + } + + /** + * @return {@link #deceased} (Indicates if the individual is deceased or not.) + */ + public BooleanType getDeceasedBooleanType() throws FHIRException { + if (!(this.deceased instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (BooleanType) this.deceased; + } + + public boolean hasDeceasedBooleanType() { + return this.deceased instanceof BooleanType; + } + + /** + * @return {@link #deceased} (Indicates if the individual is deceased or not.) + */ + public DateTimeType getDeceasedDateTimeType() throws FHIRException { + if (!(this.deceased instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (DateTimeType) this.deceased; + } + + public boolean hasDeceasedDateTimeType() { + return this.deceased instanceof DateTimeType; + } + + public boolean hasDeceased() { + return this.deceased != null && !this.deceased.isEmpty(); + } + + /** + * @param value {@link #deceased} (Indicates if the individual is deceased or not.) + */ + public Patient setDeceased(Type value) { + this.deceased = value; + return this; + } + + /** + * @return {@link #address} (Addresses for the individual.) + */ + public List
getAddress() { + if (this.address == null) + this.address = new ArrayList
(); + return this.address; + } + + public boolean hasAddress() { + if (this.address == null) + return false; + for (Address item : this.address) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #address} (Addresses for the individual.) + */ + // syntactic sugar + public Address addAddress() { //3 + Address t = new Address(); + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return t; + } + + // syntactic sugar + public Patient addAddress(Address t) { //3 + if (t == null) + return this; + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return this; + } + + /** + * @return {@link #maritalStatus} (This field contains a patient's most recent marital (civil) status.) + */ + public CodeableConcept getMaritalStatus() { + if (this.maritalStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.maritalStatus"); + else if (Configuration.doAutoCreate()) + this.maritalStatus = new CodeableConcept(); // cc + return this.maritalStatus; + } + + public boolean hasMaritalStatus() { + return this.maritalStatus != null && !this.maritalStatus.isEmpty(); + } + + /** + * @param value {@link #maritalStatus} (This field contains a patient's most recent marital (civil) status.) + */ + public Patient setMaritalStatus(CodeableConcept value) { + this.maritalStatus = value; + return this; + } + + /** + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + */ + public Type getMultipleBirth() { + return this.multipleBirth; + } + + /** + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + */ + public BooleanType getMultipleBirthBooleanType() throws FHIRException { + if (!(this.multipleBirth instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.multipleBirth.getClass().getName()+" was encountered"); + return (BooleanType) this.multipleBirth; + } + + public boolean hasMultipleBirthBooleanType() { + return this.multipleBirth instanceof BooleanType; + } + + /** + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + */ + public IntegerType getMultipleBirthIntegerType() throws FHIRException { + if (!(this.multipleBirth instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.multipleBirth.getClass().getName()+" was encountered"); + return (IntegerType) this.multipleBirth; + } + + public boolean hasMultipleBirthIntegerType() { + return this.multipleBirth instanceof IntegerType; + } + + public boolean hasMultipleBirth() { + return this.multipleBirth != null && !this.multipleBirth.isEmpty(); + } + + /** + * @param value {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + */ + public Patient setMultipleBirth(Type value) { + this.multipleBirth = value; + return this; + } + + /** + * @return {@link #photo} (Image of the patient.) + */ + public List getPhoto() { + if (this.photo == null) + this.photo = new ArrayList(); + return this.photo; + } + + public boolean hasPhoto() { + if (this.photo == null) + return false; + for (Attachment item : this.photo) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #photo} (Image of the patient.) + */ + // syntactic sugar + public Attachment addPhoto() { //3 + Attachment t = new Attachment(); + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return t; + } + + // syntactic sugar + public Patient addPhoto(Attachment t) { //3 + if (t == null) + return this; + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return this; + } + + /** + * @return {@link #contact} (A contact party (e.g. guardian, partner, friend) for the patient.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (A contact party (e.g. guardian, partner, friend) for the patient.) + */ + // syntactic sugar + public ContactComponent addContact() { //3 + ContactComponent t = new ContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Patient addContact(ContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #animal} (This patient is known to be an animal.) + */ + public AnimalComponent getAnimal() { + if (this.animal == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.animal"); + else if (Configuration.doAutoCreate()) + this.animal = new AnimalComponent(); // cc + return this.animal; + } + + public boolean hasAnimal() { + return this.animal != null && !this.animal.isEmpty(); + } + + /** + * @param value {@link #animal} (This patient is known to be an animal.) + */ + public Patient setAnimal(AnimalComponent value) { + this.animal = value; + return this; + } + + /** + * @return {@link #communication} (Languages which may be used to communicate with the patient about his or her health.) + */ + public List getCommunication() { + if (this.communication == null) + this.communication = new ArrayList(); + return this.communication; + } + + public boolean hasCommunication() { + if (this.communication == null) + return false; + for (PatientCommunicationComponent item : this.communication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #communication} (Languages which may be used to communicate with the patient about his or her health.) + */ + // syntactic sugar + public PatientCommunicationComponent addCommunication() { //3 + PatientCommunicationComponent t = new PatientCommunicationComponent(); + if (this.communication == null) + this.communication = new ArrayList(); + this.communication.add(t); + return t; + } + + // syntactic sugar + public Patient addCommunication(PatientCommunicationComponent t) { //3 + if (t == null) + return this; + if (this.communication == null) + this.communication = new ArrayList(); + this.communication.add(t); + return this; + } + + /** + * @return {@link #careProvider} (Patient's nominated care provider.) + */ + public List getCareProvider() { + if (this.careProvider == null) + this.careProvider = new ArrayList(); + return this.careProvider; + } + + public boolean hasCareProvider() { + if (this.careProvider == null) + return false; + for (Reference item : this.careProvider) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #careProvider} (Patient's nominated care provider.) + */ + // syntactic sugar + public Reference addCareProvider() { //3 + Reference t = new Reference(); + if (this.careProvider == null) + this.careProvider = new ArrayList(); + this.careProvider.add(t); + return t; + } + + // syntactic sugar + public Patient addCareProvider(Reference t) { //3 + if (t == null) + return this; + if (this.careProvider == null) + this.careProvider = new ArrayList(); + this.careProvider.add(t); + return this; + } + + /** + * @return {@link #careProvider} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Patient's nominated care provider.) + */ + public List getCareProviderTarget() { + if (this.careProviderTarget == null) + this.careProviderTarget = new ArrayList(); + return this.careProviderTarget; + } + + /** + * @return {@link #managingOrganization} (Organization that is the custodian of the patient record.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (Organization that is the custodian of the patient record.) + */ + public Patient setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Organization that is the custodian of the patient record.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Patient.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Organization that is the custodian of the patient record.) + */ + public Patient setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #link} (Link to another patient resource that concerns the same actual patient.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (PatientLinkComponent item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (Link to another patient resource that concerns the same actual patient.) + */ + // syntactic sugar + public PatientLinkComponent addLink() { //3 + PatientLinkComponent t = new PatientLinkComponent(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + // syntactic sugar + public Patient addLink(PatientLinkComponent t) { //3 + if (t == null) + return this; + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "An identifier for this patient.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("active", "boolean", "Whether this patient record is in active use.", 0, java.lang.Integer.MAX_VALUE, active)); + childrenList.add(new Property("name", "HumanName", "A name associated with the individual.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("birthDate", "date", "The date of birth for the individual.", 0, java.lang.Integer.MAX_VALUE, birthDate)); + childrenList.add(new Property("deceased[x]", "boolean|dateTime", "Indicates if the individual is deceased or not.", 0, java.lang.Integer.MAX_VALUE, deceased)); + childrenList.add(new Property("address", "Address", "Addresses for the individual.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("maritalStatus", "CodeableConcept", "This field contains a patient's most recent marital (civil) status.", 0, java.lang.Integer.MAX_VALUE, maritalStatus)); + childrenList.add(new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple or indicates the actual birth order.", 0, java.lang.Integer.MAX_VALUE, multipleBirth)); + childrenList.add(new Property("photo", "Attachment", "Image of the patient.", 0, java.lang.Integer.MAX_VALUE, photo)); + childrenList.add(new Property("contact", "", "A contact party (e.g. guardian, partner, friend) for the patient.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("animal", "", "This patient is known to be an animal.", 0, java.lang.Integer.MAX_VALUE, animal)); + childrenList.add(new Property("communication", "", "Languages which may be used to communicate with the patient about his or her health.", 0, java.lang.Integer.MAX_VALUE, communication)); + childrenList.add(new Property("careProvider", "Reference(Organization|Practitioner)", "Patient's nominated care provider.", 0, java.lang.Integer.MAX_VALUE, careProvider)); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "Organization that is the custodian of the patient record.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("link", "", "Link to another patient resource that concerns the same actual patient.", 0, java.lang.Integer.MAX_VALUE, link)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("active")) + this.active = castToBoolean(value); // BooleanType + else if (name.equals("name")) + this.getName().add(castToHumanName(value)); + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("birthDate")) + this.birthDate = castToDate(value); // DateType + else if (name.equals("deceased[x]")) + this.deceased = (Type) value; // Type + else if (name.equals("address")) + this.getAddress().add(castToAddress(value)); + else if (name.equals("maritalStatus")) + this.maritalStatus = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("multipleBirth[x]")) + this.multipleBirth = (Type) value; // Type + else if (name.equals("photo")) + this.getPhoto().add(castToAttachment(value)); + else if (name.equals("contact")) + this.getContact().add((ContactComponent) value); + else if (name.equals("animal")) + this.animal = (AnimalComponent) value; // AnimalComponent + else if (name.equals("communication")) + this.getCommunication().add((PatientCommunicationComponent) value); + else if (name.equals("careProvider")) + this.getCareProvider().add(castToReference(value)); + else if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else if (name.equals("link")) + this.getLink().add((PatientLinkComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("active")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.active"); + } + else if (name.equals("name")) { + return addName(); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.gender"); + } + else if (name.equals("birthDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Patient.birthDate"); + } + else if (name.equals("deceasedBoolean")) { + this.deceased = new BooleanType(); + return this.deceased; + } + else if (name.equals("deceasedDateTime")) { + this.deceased = new DateTimeType(); + return this.deceased; + } + else if (name.equals("address")) { + return addAddress(); + } + else if (name.equals("maritalStatus")) { + this.maritalStatus = new CodeableConcept(); + return this.maritalStatus; + } + else if (name.equals("multipleBirthBoolean")) { + this.multipleBirth = new BooleanType(); + return this.multipleBirth; + } + else if (name.equals("multipleBirthInteger")) { + this.multipleBirth = new IntegerType(); + return this.multipleBirth; + } + else if (name.equals("photo")) { + return addPhoto(); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("animal")) { + this.animal = new AnimalComponent(); + return this.animal; + } + else if (name.equals("communication")) { + return addCommunication(); + } + else if (name.equals("careProvider")) { + return addCareProvider(); + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("link")) { + return addLink(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Patient"; + + } + + public Patient copy() { + Patient dst = new Patient(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.active = active == null ? null : active.copy(); + if (name != null) { + dst.name = new ArrayList(); + for (HumanName i : name) + dst.name.add(i.copy()); + }; + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.gender = gender == null ? null : gender.copy(); + dst.birthDate = birthDate == null ? null : birthDate.copy(); + dst.deceased = deceased == null ? null : deceased.copy(); + if (address != null) { + dst.address = new ArrayList
(); + for (Address i : address) + dst.address.add(i.copy()); + }; + dst.maritalStatus = maritalStatus == null ? null : maritalStatus.copy(); + dst.multipleBirth = multipleBirth == null ? null : multipleBirth.copy(); + if (photo != null) { + dst.photo = new ArrayList(); + for (Attachment i : photo) + dst.photo.add(i.copy()); + }; + if (contact != null) { + dst.contact = new ArrayList(); + for (ContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.animal = animal == null ? null : animal.copy(); + if (communication != null) { + dst.communication = new ArrayList(); + for (PatientCommunicationComponent i : communication) + dst.communication.add(i.copy()); + }; + if (careProvider != null) { + dst.careProvider = new ArrayList(); + for (Reference i : careProvider) + dst.careProvider.add(i.copy()); + }; + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + if (link != null) { + dst.link = new ArrayList(); + for (PatientLinkComponent i : link) + dst.link.add(i.copy()); + }; + return dst; + } + + protected Patient typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Patient)) + return false; + Patient o = (Patient) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(name, o.name, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) + && compareDeep(deceased, o.deceased, true) && compareDeep(address, o.address, true) && compareDeep(maritalStatus, o.maritalStatus, true) + && compareDeep(multipleBirth, o.multipleBirth, true) && compareDeep(photo, o.photo, true) && compareDeep(contact, o.contact, true) + && compareDeep(animal, o.animal, true) && compareDeep(communication, o.communication, true) && compareDeep(careProvider, o.careProvider, true) + && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(link, o.link, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Patient)) + return false; + Patient o = (Patient) other; + return compareValues(active, o.active, true) && compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) + && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (gender == null || gender.isEmpty()) + && (birthDate == null || birthDate.isEmpty()) && (deceased == null || deceased.isEmpty()) + && (address == null || address.isEmpty()) && (maritalStatus == null || maritalStatus.isEmpty()) + && (multipleBirth == null || multipleBirth.isEmpty()) && (photo == null || photo.isEmpty()) + && (contact == null || contact.isEmpty()) && (animal == null || animal.isEmpty()) && (communication == null || communication.isEmpty()) + && (careProvider == null || careProvider.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) + && (link == null || link.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Patient; + } + + @SearchParamDefinition(name="birthdate", path="Patient.birthDate", description="The patient's date of birth", type="date" ) + public static final String SP_BIRTHDATE = "birthdate"; + @SearchParamDefinition(name="deceased", path="Patient.deceased[x]", description="This patient has been marked as deceased, or as a death date entered", type="token" ) + public static final String SP_DECEASED = "deceased"; + @SearchParamDefinition(name="address-state", path="Patient.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients", type="token" ) + public static final String SP_ANIMALSPECIES = "animal-species"; + @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" ) + public static final String SP_LINK = "link"; + @SearchParamDefinition(name="language", path="Patient.communication.language", description="Language code (irrespective of use value)", type="token" ) + public static final String SP_LANGUAGE = "language"; + @SearchParamDefinition(name="deathdate", path="Patient.deceasedDateTime", description="The date of death has been provided and satisfies this search value", type="date" ) + public static final String SP_DEATHDATE = "deathdate"; + @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients", type="token" ) + public static final String SP_ANIMALBREED = "animal-breed"; + @SearchParamDefinition(name="address-country", path="Patient.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + @SearchParamDefinition(name="phonetic", path="Patient.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="telecom", path="Patient.telecom", description="The value in any kind of telecom details of the patient", type="token" ) + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name="address-city", path="Patient.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="email", path="Patient.telecom.where(system='email')", description="A value in an email contact", type="token" ) + public static final String SP_EMAIL = "email"; + @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="given", path="Patient.name.given", description="A portion of the given name of the patient", type="string" ) + public static final String SP_GIVEN = "given"; + @SearchParamDefinition(name="address", path="Patient.address", description="An address in any kind of address/part of the patient", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" ) + public static final String SP_ACTIVE = "active"; + @SearchParamDefinition(name="address-postalcode", path="Patient.address.postalCode", description="A postalCode specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" ) + public static final String SP_CAREPROVIDER = "careprovider"; + @SearchParamDefinition(name="phone", path="Patient.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + public static final String SP_PHONE = "phone"; + @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization at which this person is a patient", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Patient.name", description="A portion of either family or given name of the patient", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="Patient.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient", type="string" ) + public static final String SP_FAMILY = "family"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentNotice.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentNotice.java new file mode 100644 index 00000000000..19c52a9ead0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentNotice.java @@ -0,0 +1,686 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ +@ResourceDef(name="PaymentNotice", profile="http://hl7.org/fhir/Profile/PaymentNotice") +public class PaymentNotice extends DomainResource { + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when this resource was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) + protected DateTimeType created; + + /** + * The Insurer who is target of the request. + */ + @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The Insurer who is target of the request.) + */ + protected Organization targetTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization organizationTarget; + + /** + * Reference of resource to reverse. + */ + @Child(name = "request", type = {}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Reference of resource to reverse.) + */ + protected Resource requestTarget; + + /** + * Reference of response to resource to reverse. + */ + @Child(name = "response", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) + protected Reference response; + + /** + * The actual object that is the target of the reference (Reference of response to resource to reverse.) + */ + protected Resource responseTarget; + + /** + * The payment status, typically paid: payment sent, cleared: payment received. + */ + @Child(name = "paymentStatus", type = {Coding.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." ) + protected Coding paymentStatus; + + private static final long serialVersionUID = -394826458L; + + /* + * Constructor + */ + public PaymentNotice() { + super(); + } + + /* + * Constructor + */ + public PaymentNotice(Coding paymentStatus) { + super(); + this.paymentStatus = paymentStatus; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public PaymentNotice addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public PaymentNotice setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public PaymentNotice setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public PaymentNotice setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when this resource was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when this resource was created. + */ + public PaymentNotice setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The Insurer who is target of the request.) + */ + public PaymentNotice setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) + */ + public PaymentNotice setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public PaymentNotice setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public PaymentNotice setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public PaymentNotice setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public PaymentNotice setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #request} (Reference of resource to reverse.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Reference of resource to reverse.) + */ + public PaymentNotice setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) + */ + public PaymentNotice setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #response} (Reference of response to resource to reverse.) + */ + public Reference getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.response"); + else if (Configuration.doAutoCreate()) + this.response = new Reference(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Reference of response to resource to reverse.) + */ + public PaymentNotice setResponse(Reference value) { + this.response = value; + return this; + } + + /** + * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) + */ + public Resource getResponseTarget() { + return this.responseTarget; + } + + /** + * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) + */ + public PaymentNotice setResponseTarget(Resource value) { + this.responseTarget = value; + return this; + } + + /** + * @return {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) + */ + public Coding getPaymentStatus() { + if (this.paymentStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentNotice.paymentStatus"); + else if (Configuration.doAutoCreate()) + this.paymentStatus = new Coding(); // cc + return this.paymentStatus; + } + + public boolean hasPaymentStatus() { + return this.paymentStatus != null && !this.paymentStatus.isEmpty(); + } + + /** + * @param value {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) + */ + public PaymentNotice setPaymentStatus(Coding value) { + this.paymentStatus = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("paymentStatus", "Coding", "The payment status, typically paid: payment sent, cleared: payment received.", 0, java.lang.Integer.MAX_VALUE, paymentStatus)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("response")) + this.response = castToReference(value); // Reference + else if (name.equals("paymentStatus")) + this.paymentStatus = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.created"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("response")) { + this.response = new Reference(); + return this.response; + } + else if (name.equals("paymentStatus")) { + this.paymentStatus = new Coding(); + return this.paymentStatus; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "PaymentNotice"; + + } + + public PaymentNotice copy() { + PaymentNotice dst = new PaymentNotice(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + dst.paymentStatus = paymentStatus == null ? null : paymentStatus.copy(); + return dst; + } + + protected PaymentNotice typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PaymentNotice)) + return false; + PaymentNotice o = (PaymentNotice) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) + && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) + && compareDeep(paymentStatus, o.paymentStatus, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PaymentNotice)) + return false; + PaymentNotice o = (PaymentNotice) other; + return compareValues(created, o.created, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) + && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) + && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) + && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (paymentStatus == null || paymentStatus.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.PaymentNotice; + } + + @SearchParamDefinition(name="identifier", path="PaymentNotice.identifier", description="The business identifier of the Eligibility", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentReconciliation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentReconciliation.java new file mode 100644 index 00000000000..00fa9040cb1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PaymentReconciliation.java @@ -0,0 +1,1589 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides payment details and claim references supporting a bulk payment. + */ +@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/Profile/PaymentReconciliation") +public class PaymentReconciliation extends DomainResource { + + @Block() + public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code to indicate the nature of the payment, adjustment, funds advance, etc. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type code", formalDefinition="Code to indicate the nature of the payment, adjustment, funds advance, etc." ) + protected Coding type; + + /** + * The claim or financial resource. + */ + @Child(name = "request", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim", formalDefinition="The claim or financial resource." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (The claim or financial resource.) + */ + protected Resource requestTarget; + + /** + * The claim response resource. + */ + @Child(name = "responce", type = {}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim Response", formalDefinition="The claim response resource." ) + protected Reference responce; + + /** + * The actual object that is the target of the reference (The claim response resource.) + */ + protected Resource responceTarget; + + /** + * The Organization which submitted the invoice or financial transaction. + */ + @Child(name = "submitter", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Submitter", formalDefinition="The Organization which submitted the invoice or financial transaction." ) + protected Reference submitter; + + /** + * The actual object that is the target of the reference (The Organization which submitted the invoice or financial transaction.) + */ + protected Organization submitterTarget; + + /** + * The organization which is receiving the payment. + */ + @Child(name = "payee", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Payee", formalDefinition="The organization which is receiving the payment." ) + protected Reference payee; + + /** + * The actual object that is the target of the reference (The organization which is receiving the payment.) + */ + protected Organization payeeTarget; + + /** + * The date of the invoice or financial resource. + */ + @Child(name = "date", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Invoice date", formalDefinition="The date of the invoice or financial resource." ) + protected DateType date; + + /** + * Amount paid for this detail. + */ + @Child(name = "amount", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Detail amount", formalDefinition="Amount paid for this detail." ) + protected Money amount; + + private static final long serialVersionUID = -1644048062L; + + /* + * Constructor + */ + public DetailsComponent() { + super(); + } + + /* + * Constructor + */ + public DetailsComponent(Coding type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.) + */ + public DetailsComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #request} (The claim or financial resource.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (The claim or financial resource.) + */ + public DetailsComponent setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) + */ + public DetailsComponent setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #responce} (The claim response resource.) + */ + public Reference getResponce() { + if (this.responce == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.responce"); + else if (Configuration.doAutoCreate()) + this.responce = new Reference(); // cc + return this.responce; + } + + public boolean hasResponce() { + return this.responce != null && !this.responce.isEmpty(); + } + + /** + * @param value {@link #responce} (The claim response resource.) + */ + public DetailsComponent setResponce(Reference value) { + this.responce = value; + return this; + } + + /** + * @return {@link #responce} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The claim response resource.) + */ + public Resource getResponceTarget() { + return this.responceTarget; + } + + /** + * @param value {@link #responce} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The claim response resource.) + */ + public DetailsComponent setResponceTarget(Resource value) { + this.responceTarget = value; + return this; + } + + /** + * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.) + */ + public Reference getSubmitter() { + if (this.submitter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.submitter"); + else if (Configuration.doAutoCreate()) + this.submitter = new Reference(); // cc + return this.submitter; + } + + public boolean hasSubmitter() { + return this.submitter != null && !this.submitter.isEmpty(); + } + + /** + * @param value {@link #submitter} (The Organization which submitted the invoice or financial transaction.) + */ + public DetailsComponent setSubmitter(Reference value) { + this.submitter = value; + return this; + } + + /** + * @return {@link #submitter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) + */ + public Organization getSubmitterTarget() { + if (this.submitterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.submitter"); + else if (Configuration.doAutoCreate()) + this.submitterTarget = new Organization(); // aa + return this.submitterTarget; + } + + /** + * @param value {@link #submitter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) + */ + public DetailsComponent setSubmitterTarget(Organization value) { + this.submitterTarget = value; + return this; + } + + /** + * @return {@link #payee} (The organization which is receiving the payment.) + */ + public Reference getPayee() { + if (this.payee == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.payee"); + else if (Configuration.doAutoCreate()) + this.payee = new Reference(); // cc + return this.payee; + } + + public boolean hasPayee() { + return this.payee != null && !this.payee.isEmpty(); + } + + /** + * @param value {@link #payee} (The organization which is receiving the payment.) + */ + public DetailsComponent setPayee(Reference value) { + this.payee = value; + return this; + } + + /** + * @return {@link #payee} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) + */ + public Organization getPayeeTarget() { + if (this.payeeTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.payee"); + else if (Configuration.doAutoCreate()) + this.payeeTarget = new Organization(); // aa + return this.payeeTarget; + } + + /** + * @param value {@link #payee} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) + */ + public DetailsComponent setPayeeTarget(Organization value) { + this.payeeTarget = value; + return this; + } + + /** + * @return {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DetailsComponent setDateElement(DateType value) { + this.date = value; + return this; + } + + /** + * @return The date of the invoice or financial resource. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date of the invoice or financial resource. + */ + public DetailsComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #amount} (Amount paid for this detail.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailsComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (Amount paid for this detail.) + */ + public DetailsComponent setAmount(Money value) { + this.amount = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Code to indicate the nature of the payment, adjustment, funds advance, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("request", "Reference(Any)", "The claim or financial resource.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("responce", "Reference(Any)", "The claim response resource.", 0, java.lang.Integer.MAX_VALUE, responce)); + childrenList.add(new Property("submitter", "Reference(Organization)", "The Organization which submitted the invoice or financial transaction.", 0, java.lang.Integer.MAX_VALUE, submitter)); + childrenList.add(new Property("payee", "Reference(Organization)", "The organization which is receiving the payment.", 0, java.lang.Integer.MAX_VALUE, payee)); + childrenList.add(new Property("date", "date", "The date of the invoice or financial resource.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("amount", "Money", "Amount paid for this detail.", 0, java.lang.Integer.MAX_VALUE, amount)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("responce")) + this.responce = castToReference(value); // Reference + else if (name.equals("submitter")) + this.submitter = castToReference(value); // Reference + else if (name.equals("payee")) + this.payee = castToReference(value); // Reference + else if (name.equals("date")) + this.date = castToDate(value); // DateType + else if (name.equals("amount")) + this.amount = castToMoney(value); // Money + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("responce")) { + this.responce = new Reference(); + return this.responce; + } + else if (name.equals("submitter")) { + this.submitter = new Reference(); + return this.submitter; + } + else if (name.equals("payee")) { + this.payee = new Reference(); + return this.payee; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.date"); + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else + return super.addChild(name); + } + + public DetailsComponent copy() { + DetailsComponent dst = new DetailsComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.request = request == null ? null : request.copy(); + dst.responce = responce == null ? null : responce.copy(); + dst.submitter = submitter == null ? null : submitter.copy(); + dst.payee = payee == null ? null : payee.copy(); + dst.date = date == null ? null : date.copy(); + dst.amount = amount == null ? null : amount.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DetailsComponent)) + return false; + DetailsComponent o = (DetailsComponent) other; + return compareDeep(type, o.type, true) && compareDeep(request, o.request, true) && compareDeep(responce, o.responce, true) + && compareDeep(submitter, o.submitter, true) && compareDeep(payee, o.payee, true) && compareDeep(date, o.date, true) + && compareDeep(amount, o.amount, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DetailsComponent)) + return false; + DetailsComponent o = (DetailsComponent) other; + return compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (request == null || request.isEmpty()) + && (responce == null || responce.isEmpty()) && (submitter == null || submitter.isEmpty()) + && (payee == null || payee.isEmpty()) && (date == null || date.isEmpty()) && (amount == null || amount.isEmpty()) + ; + } + + public String fhirType() { + return "PaymentReconciliation.detail"; + + } + + } + + @Block() + public static class NotesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The note purpose: Print/Display. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) + protected Coding type; + + /** + * The note text. + */ + @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Notes text", formalDefinition="The note text." ) + protected StringType text; + + private static final long serialVersionUID = 129959202L; + + /* + * Constructor + */ + public NotesComponent() { + super(); + } + + /** + * @return {@link #type} (The note purpose: Print/Display.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NotesComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The note purpose: Print/Display.) + */ + public NotesComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NotesComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public NotesComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return The note text. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value The note text. + */ + public NotesComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.text"); + } + else + return super.addChild(name); + } + + public NotesComponent copy() { + NotesComponent dst = new NotesComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.text = text == null ? null : text.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof NotesComponent)) + return false; + NotesComponent o = (NotesComponent) other; + return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof NotesComponent)) + return false; + NotesComponent o = (NotesComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) + ; + } + + public String fhirType() { + return "PaymentReconciliation.note"; + + } + + } + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource reference. + */ + @Child(name = "request", type = {ProcessRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource reference.) + */ + protected ProcessRequest requestTarget; + + /** + * Transaction status: error, complete. + */ + @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) + protected Enumeration outcome; + + /** + * A description of the status of the adjudication. + */ + @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) + protected StringType disposition; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The period of time for which payments have been gathered into this bulk payment for settlement. + */ + @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) + protected Period period; + + /** + * The Insurer who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + /** + * List of individual settlement amounts and the corresponding transaction. + */ + @Child(name = "detail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." ) + protected List detail; + + /** + * The form to be used for printing the content. + */ + @Child(name = "form", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) + protected Coding form; + + /** + * Total payment amount. + */ + @Child(name = "total", type = {Money.class}, order=13, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." ) + protected Money total; + + /** + * Suite of notes. + */ + @Child(name = "note", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) + protected List note; + + private static final long serialVersionUID = 454328025L; + + /* + * Constructor + */ + public PaymentReconciliation() { + super(); + } + + /* + * Constructor + */ + public PaymentReconciliation(Money total) { + super(); + this.total = total; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public PaymentReconciliation addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource reference.) + */ + public PaymentReconciliation setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public ProcessRequest getRequestTarget() { + if (this.requestTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.request"); + else if (Configuration.doAutoCreate()) + this.requestTarget = new ProcessRequest(); // aa + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public PaymentReconciliation setRequestTarget(ProcessRequest value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public Enumeration getOutcomeElement() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb + return this.outcome; + } + + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + */ + public PaymentReconciliation setOutcomeElement(Enumeration value) { + this.outcome = value; + return this; + } + + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public PaymentReconciliation setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public PaymentReconciliation setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication. + */ + public PaymentReconciliation setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public PaymentReconciliation setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public PaymentReconciliation setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public PaymentReconciliation setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public PaymentReconciliation setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) + */ + public PaymentReconciliation setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public PaymentReconciliation setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) + */ + public PaymentReconciliation setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public PaymentReconciliation setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public PaymentReconciliation setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public PaymentReconciliation setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public PaymentReconciliation setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + /** + * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.) + */ + public List getDetail() { + if (this.detail == null) + this.detail = new ArrayList(); + return this.detail; + } + + public boolean hasDetail() { + if (this.detail == null) + return false; + for (DetailsComponent item : this.detail) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.) + */ + // syntactic sugar + public DetailsComponent addDetail() { //3 + DetailsComponent t = new DetailsComponent(); + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return t; + } + + // syntactic sugar + public PaymentReconciliation addDetail(DetailsComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + + /** + * @return {@link #form} (The form to be used for printing the content.) + */ + public Coding getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.form"); + else if (Configuration.doAutoCreate()) + this.form = new Coding(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (The form to be used for printing the content.) + */ + public PaymentReconciliation setForm(Coding value) { + this.form = value; + return this; + } + + /** + * @return {@link #total} (Total payment amount.) + */ + public Money getTotal() { + if (this.total == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PaymentReconciliation.total"); + else if (Configuration.doAutoCreate()) + this.total = new Money(); // cc + return this.total; + } + + public boolean hasTotal() { + return this.total != null && !this.total.isEmpty(); + } + + /** + * @param value {@link #total} (Total payment amount.) + */ + public PaymentReconciliation setTotal(Money value) { + this.total = value; + return this; + } + + /** + * @return {@link #note} (Suite of notes.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (NotesComponent item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Suite of notes.) + */ + // syntactic sugar + public NotesComponent addNote() { //3 + NotesComponent t = new NotesComponent(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public PaymentReconciliation addNote(NotesComponent t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("detail", "", "List of individual settlement amounts and the corresponding transaction.", 0, java.lang.Integer.MAX_VALUE, detail)); + childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); + childrenList.add(new Property("total", "Money", "Total payment amount.", 0, java.lang.Integer.MAX_VALUE, total)); + childrenList.add(new Property("note", "", "Suite of notes.", 0, java.lang.Integer.MAX_VALUE, note)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else if (name.equals("detail")) + this.getDetail().add((DetailsComponent) value); + else if (name.equals("form")) + this.form = castToCoding(value); // Coding + else if (name.equals("total")) + this.total = castToMoney(value); // Money + else if (name.equals("note")) + this.getNote().add((NotesComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("outcome")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome"); + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition"); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else if (name.equals("detail")) { + return addDetail(); + } + else if (name.equals("form")) { + this.form = new Coding(); + return this.form; + } + else if (name.equals("total")) { + this.total = new Money(); + return this.total; + } + else if (name.equals("note")) { + return addNote(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "PaymentReconciliation"; + + } + + public PaymentReconciliation copy() { + PaymentReconciliation dst = new PaymentReconciliation(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.period = period == null ? null : period.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + if (detail != null) { + dst.detail = new ArrayList(); + for (DetailsComponent i : detail) + dst.detail.add(i.copy()); + }; + dst.form = form == null ? null : form.copy(); + dst.total = total == null ? null : total.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (NotesComponent i : note) + dst.note.add(i.copy()); + }; + return dst; + } + + protected PaymentReconciliation typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PaymentReconciliation)) + return false; + PaymentReconciliation o = (PaymentReconciliation) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(period, o.period, true) && compareDeep(organization, o.organization, true) + && compareDeep(requestProvider, o.requestProvider, true) && compareDeep(requestOrganization, o.requestOrganization, true) + && compareDeep(detail, o.detail, true) && compareDeep(form, o.form, true) && compareDeep(total, o.total, true) + && compareDeep(note, o.note, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PaymentReconciliation)) + return false; + PaymentReconciliation o = (PaymentReconciliation) other; + return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (period == null || period.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + && (detail == null || detail.isEmpty()) && (form == null || form.isEmpty()) && (total == null || total.isEmpty()) + && (note == null || note.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.PaymentReconciliation; + } + + @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Period.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Period.java new file mode 100644 index 00000000000..3b271faf4ce --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Period.java @@ -0,0 +1,241 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A time period defined by a start and end date and optionally time. + */ +@DatatypeDef(name="Period") +public class Period extends Type implements ICompositeType { + + /** + * The start of the period. The boundary is inclusive. + */ + @Child(name = "start", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Starting time with inclusive boundary", formalDefinition="The start of the period. The boundary is inclusive." ) + protected DateTimeType start; + + /** + * The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + @Child(name = "end", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="End time with inclusive boundary, if not ongoing", formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." ) + protected DateTimeType end; + + private static final long serialVersionUID = 649791751L; + + /* + * Constructor + */ + public Period() { + super(); + } + + /** + * @return {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public DateTimeType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Period.start"); + else if (Configuration.doAutoCreate()) + this.start = new DateTimeType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public Period setStartElement(DateTimeType value) { + this.start = value; + return this; + } + + /** + * @return The start of the period. The boundary is inclusive. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value The start of the period. The boundary is inclusive. + */ + public Period setStart(Date value) { + if (value == null) + this.start = null; + else { + if (this.start == null) + this.start = new DateTimeType(); + this.start.setValue(value); + } + return this; + } + + /** + * @return {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public DateTimeType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Period.end"); + else if (Configuration.doAutoCreate()) + this.end = new DateTimeType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Period setEndElement(DateTimeType value) { + this.end = value; + return this; + } + + /** + * @return The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + public Period setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new DateTimeType(); + this.end.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("start", "dateTime", "The start of the period. The boundary is inclusive.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, java.lang.Integer.MAX_VALUE, end)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) + this.start = castToDateTime(value); // DateTimeType + else if (name.equals("end")) + this.end = castToDateTime(value); // DateTimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Period.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Period.end"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Period"; + + } + + public Period copy() { + Period dst = new Period(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + protected Period typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Period)) + return false; + Period o = (Period) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Period)) + return false; + Period o = (Period) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Person.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Person.java new file mode 100644 index 00000000000..0e466faf2ff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Person.java @@ -0,0 +1,1056 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Demographics and administrative information about a person independent of a specific health-related context. + */ +@ResourceDef(name="Person", profile="http://hl7.org/fhir/Profile/Person") +public class Person extends DomainResource { + + public enum IdentityAssuranceLevel { + /** + * Little or no confidence in the asserted identity's accuracy. + */ + LEVEL1, + /** + * Some confidence in the asserted identity's accuracy. + */ + LEVEL2, + /** + * High confidence in the asserted identity's accuracy. + */ + LEVEL3, + /** + * Very high confidence in the asserted identity's accuracy. + */ + LEVEL4, + /** + * added to help the parsers + */ + NULL; + public static IdentityAssuranceLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("level1".equals(codeString)) + return LEVEL1; + if ("level2".equals(codeString)) + return LEVEL2; + if ("level3".equals(codeString)) + return LEVEL3; + if ("level4".equals(codeString)) + return LEVEL4; + throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LEVEL1: return "level1"; + case LEVEL2: return "level2"; + case LEVEL3: return "level3"; + case LEVEL4: return "level4"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case LEVEL1: return "http://hl7.org/fhir/identity-assuranceLevel"; + case LEVEL2: return "http://hl7.org/fhir/identity-assuranceLevel"; + case LEVEL3: return "http://hl7.org/fhir/identity-assuranceLevel"; + case LEVEL4: return "http://hl7.org/fhir/identity-assuranceLevel"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case LEVEL1: return "Little or no confidence in the asserted identity's accuracy."; + case LEVEL2: return "Some confidence in the asserted identity's accuracy."; + case LEVEL3: return "High confidence in the asserted identity's accuracy."; + case LEVEL4: return "Very high confidence in the asserted identity's accuracy."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LEVEL1: return "Level 1"; + case LEVEL2: return "Level 2"; + case LEVEL3: return "Level 3"; + case LEVEL4: return "Level 4"; + default: return "?"; + } + } + } + + public static class IdentityAssuranceLevelEnumFactory implements EnumFactory { + public IdentityAssuranceLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("level1".equals(codeString)) + return IdentityAssuranceLevel.LEVEL1; + if ("level2".equals(codeString)) + return IdentityAssuranceLevel.LEVEL2; + if ("level3".equals(codeString)) + return IdentityAssuranceLevel.LEVEL3; + if ("level4".equals(codeString)) + return IdentityAssuranceLevel.LEVEL4; + throw new IllegalArgumentException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("level1".equals(codeString)) + return new Enumeration(this, IdentityAssuranceLevel.LEVEL1); + if ("level2".equals(codeString)) + return new Enumeration(this, IdentityAssuranceLevel.LEVEL2); + if ("level3".equals(codeString)) + return new Enumeration(this, IdentityAssuranceLevel.LEVEL3); + if ("level4".equals(codeString)) + return new Enumeration(this, IdentityAssuranceLevel.LEVEL4); + throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); + } + public String toCode(IdentityAssuranceLevel code) { + if (code == IdentityAssuranceLevel.LEVEL1) + return "level1"; + if (code == IdentityAssuranceLevel.LEVEL2) + return "level2"; + if (code == IdentityAssuranceLevel.LEVEL3) + return "level3"; + if (code == IdentityAssuranceLevel.LEVEL4) + return "level4"; + return "?"; + } + } + + @Block() + public static class PersonLinkComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The resource to which this actual person is associated. + */ + @Child(name = "target", type = {Patient.class, Practitioner.class, RelatedPerson.class, Person.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The resource to which this actual person is associated", formalDefinition="The resource to which this actual person is associated." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The resource to which this actual person is associated.) + */ + protected Resource targetTarget; + + /** + * Level of assurance that this link is actually associated with the target resource. + */ + @Child(name = "assurance", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="level1 | level2 | level3 | level4", formalDefinition="Level of assurance that this link is actually associated with the target resource." ) + protected Enumeration assurance; + + private static final long serialVersionUID = 508763647L; + + /* + * Constructor + */ + public PersonLinkComponent() { + super(); + } + + /* + * Constructor + */ + public PersonLinkComponent(Reference target) { + super(); + this.target = target; + } + + /** + * @return {@link #target} (The resource to which this actual person is associated.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PersonLinkComponent.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The resource to which this actual person is associated.) + */ + public PersonLinkComponent setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource to which this actual person is associated.) + */ + public Resource getTargetTarget() { + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource to which this actual person is associated.) + */ + public PersonLinkComponent setTargetTarget(Resource value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #assurance} (Level of assurance that this link is actually associated with the target resource.). This is the underlying object with id, value and extensions. The accessor "getAssurance" gives direct access to the value + */ + public Enumeration getAssuranceElement() { + if (this.assurance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PersonLinkComponent.assurance"); + else if (Configuration.doAutoCreate()) + this.assurance = new Enumeration(new IdentityAssuranceLevelEnumFactory()); // bb + return this.assurance; + } + + public boolean hasAssuranceElement() { + return this.assurance != null && !this.assurance.isEmpty(); + } + + public boolean hasAssurance() { + return this.assurance != null && !this.assurance.isEmpty(); + } + + /** + * @param value {@link #assurance} (Level of assurance that this link is actually associated with the target resource.). This is the underlying object with id, value and extensions. The accessor "getAssurance" gives direct access to the value + */ + public PersonLinkComponent setAssuranceElement(Enumeration value) { + this.assurance = value; + return this; + } + + /** + * @return Level of assurance that this link is actually associated with the target resource. + */ + public IdentityAssuranceLevel getAssurance() { + return this.assurance == null ? null : this.assurance.getValue(); + } + + /** + * @param value Level of assurance that this link is actually associated with the target resource. + */ + public PersonLinkComponent setAssurance(IdentityAssuranceLevel value) { + if (value == null) + this.assurance = null; + else { + if (this.assurance == null) + this.assurance = new Enumeration(new IdentityAssuranceLevelEnumFactory()); + this.assurance.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("target", "Reference(Patient|Practitioner|RelatedPerson|Person)", "The resource to which this actual person is associated.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("assurance", "code", "Level of assurance that this link is actually associated with the target resource.", 0, java.lang.Integer.MAX_VALUE, assurance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("assurance")) + this.assurance = new IdentityAssuranceLevelEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("assurance")) { + throw new FHIRException("Cannot call addChild on a primitive type Person.assurance"); + } + else + return super.addChild(name); + } + + public PersonLinkComponent copy() { + PersonLinkComponent dst = new PersonLinkComponent(); + copyValues(dst); + dst.target = target == null ? null : target.copy(); + dst.assurance = assurance == null ? null : assurance.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PersonLinkComponent)) + return false; + PersonLinkComponent o = (PersonLinkComponent) other; + return compareDeep(target, o.target, true) && compareDeep(assurance, o.assurance, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PersonLinkComponent)) + return false; + PersonLinkComponent o = (PersonLinkComponent) other; + return compareValues(assurance, o.assurance, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (target == null || target.isEmpty()) && (assurance == null || assurance.isEmpty()) + ; + } + + public String fhirType() { + return "Person.link"; + + } + + } + + /** + * Identifier for a person within a particular scope. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) + protected List identifier; + + /** + * A name associated with the person. + */ + @Child(name = "name", type = {HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) + protected List name; + + /** + * A contact detail for the person, e.g. a telephone number or an email address. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) + protected List telecom; + + /** + * Administrative Gender. + */ + @Child(name = "gender", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender." ) + protected Enumeration gender; + + /** + * The birth date for the person. + */ + @Child(name = "birthDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date on which the person was born", formalDefinition="The birth date for the person." ) + protected DateType birthDate; + + /** + * One or more addresses for the person. + */ + @Child(name = "address", type = {Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="One or more addresses for the person", formalDefinition="One or more addresses for the person." ) + protected List
address; + + /** + * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual. + */ + @Child(name = "photo", type = {Attachment.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Image of the person", formalDefinition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual." ) + protected Attachment photo; + + /** + * The organization that is the custodian of the person record. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The organization that is the custodian of the person record", formalDefinition="The organization that is the custodian of the person record." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The organization that is the custodian of the person record.) + */ + protected Organization managingOrganizationTarget; + + /** + * Whether this person's record is in active use. + */ + @Child(name = "active", type = {BooleanType.class}, order=8, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="This person's record is in active use", formalDefinition="Whether this person's record is in active use." ) + protected BooleanType active; + + /** + * Link to a resource that concerns the same actual person. + */ + @Child(name = "link", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Link to a resource that concerns the same actual person", formalDefinition="Link to a resource that concerns the same actual person." ) + protected List link; + + private static final long serialVersionUID = -117464654L; + + /* + * Constructor + */ + public Person() { + super(); + } + + /** + * @return {@link #identifier} (Identifier for a person within a particular scope.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier for a person within a particular scope.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Person addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #name} (A name associated with the person.) + */ + public List getName() { + if (this.name == null) + this.name = new ArrayList(); + return this.name; + } + + public boolean hasName() { + if (this.name == null) + return false; + for (HumanName item : this.name) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #name} (A name associated with the person.) + */ + // syntactic sugar + public HumanName addName() { //3 + HumanName t = new HumanName(); + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); + return t; + } + + // syntactic sugar + public Person addName(HumanName t) { //3 + if (t == null) + return this; + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); + return this; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Person addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #gender} (Administrative Gender.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Person setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender. + */ + public Person setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #birthDate} (The birth date for the person.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public DateType getBirthDateElement() { + if (this.birthDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.birthDate"); + else if (Configuration.doAutoCreate()) + this.birthDate = new DateType(); // bb + return this.birthDate; + } + + public boolean hasBirthDateElement() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + public boolean hasBirthDate() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + /** + * @param value {@link #birthDate} (The birth date for the person.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public Person setBirthDateElement(DateType value) { + this.birthDate = value; + return this; + } + + /** + * @return The birth date for the person. + */ + public Date getBirthDate() { + return this.birthDate == null ? null : this.birthDate.getValue(); + } + + /** + * @param value The birth date for the person. + */ + public Person setBirthDate(Date value) { + if (value == null) + this.birthDate = null; + else { + if (this.birthDate == null) + this.birthDate = new DateType(); + this.birthDate.setValue(value); + } + return this; + } + + /** + * @return {@link #address} (One or more addresses for the person.) + */ + public List
getAddress() { + if (this.address == null) + this.address = new ArrayList
(); + return this.address; + } + + public boolean hasAddress() { + if (this.address == null) + return false; + for (Address item : this.address) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #address} (One or more addresses for the person.) + */ + // syntactic sugar + public Address addAddress() { //3 + Address t = new Address(); + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return t; + } + + // syntactic sugar + public Person addAddress(Address t) { //3 + if (t == null) + return this; + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return this; + } + + /** + * @return {@link #photo} (An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.) + */ + public Attachment getPhoto() { + if (this.photo == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.photo"); + else if (Configuration.doAutoCreate()) + this.photo = new Attachment(); // cc + return this.photo; + } + + public boolean hasPhoto() { + return this.photo != null && !this.photo.isEmpty(); + } + + /** + * @param value {@link #photo} (An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.) + */ + public Person setPhoto(Attachment value) { + this.photo = value; + return this; + } + + /** + * @return {@link #managingOrganization} (The organization that is the custodian of the person record.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The organization that is the custodian of the person record.) + */ + public Person setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that is the custodian of the person record.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that is the custodian of the person record.) + */ + public Person setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #active} (Whether this person's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public BooleanType getActiveElement() { + if (this.active == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Person.active"); + else if (Configuration.doAutoCreate()) + this.active = new BooleanType(); // bb + return this.active; + } + + public boolean hasActiveElement() { + return this.active != null && !this.active.isEmpty(); + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); + } + + /** + * @param value {@link #active} (Whether this person's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public Person setActiveElement(BooleanType value) { + this.active = value; + return this; + } + + /** + * @return Whether this person's record is in active use. + */ + public boolean getActive() { + return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); + } + + /** + * @param value Whether this person's record is in active use. + */ + public Person setActive(boolean value) { + if (this.active == null) + this.active = new BooleanType(); + this.active.setValue(value); + return this; + } + + /** + * @return {@link #link} (Link to a resource that concerns the same actual person.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (PersonLinkComponent item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (Link to a resource that concerns the same actual person.) + */ + // syntactic sugar + public PersonLinkComponent addLink() { //3 + PersonLinkComponent t = new PersonLinkComponent(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + // syntactic sugar + public Person addLink(PersonLinkComponent t) { //3 + if (t == null) + return this; + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier for a person within a particular scope.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("name", "HumanName", "A name associated with the person.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the person, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("gender", "code", "Administrative Gender.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("birthDate", "date", "The birth date for the person.", 0, java.lang.Integer.MAX_VALUE, birthDate)); + childrenList.add(new Property("address", "Address", "One or more addresses for the person.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("photo", "Attachment", "An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.", 0, java.lang.Integer.MAX_VALUE, photo)); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization that is the custodian of the person record.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("active", "boolean", "Whether this person's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active)); + childrenList.add(new Property("link", "", "Link to a resource that concerns the same actual person.", 0, java.lang.Integer.MAX_VALUE, link)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("name")) + this.getName().add(castToHumanName(value)); + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("birthDate")) + this.birthDate = castToDate(value); // DateType + else if (name.equals("address")) + this.getAddress().add(castToAddress(value)); + else if (name.equals("photo")) + this.photo = castToAttachment(value); // Attachment + else if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else if (name.equals("active")) + this.active = castToBoolean(value); // BooleanType + else if (name.equals("link")) + this.getLink().add((PersonLinkComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("name")) { + return addName(); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type Person.gender"); + } + else if (name.equals("birthDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Person.birthDate"); + } + else if (name.equals("address")) { + return addAddress(); + } + else if (name.equals("photo")) { + this.photo = new Attachment(); + return this.photo; + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("active")) { + throw new FHIRException("Cannot call addChild on a primitive type Person.active"); + } + else if (name.equals("link")) { + return addLink(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Person"; + + } + + public Person copy() { + Person dst = new Person(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (name != null) { + dst.name = new ArrayList(); + for (HumanName i : name) + dst.name.add(i.copy()); + }; + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.gender = gender == null ? null : gender.copy(); + dst.birthDate = birthDate == null ? null : birthDate.copy(); + if (address != null) { + dst.address = new ArrayList
(); + for (Address i : address) + dst.address.add(i.copy()); + }; + dst.photo = photo == null ? null : photo.copy(); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.active = active == null ? null : active.copy(); + if (link != null) { + dst.link = new ArrayList(); + for (PersonLinkComponent i : link) + dst.link.add(i.copy()); + }; + return dst; + } + + protected Person typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Person)) + return false; + Person o = (Person) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) && compareDeep(address, o.address, true) + && compareDeep(photo, o.photo, true) && compareDeep(managingOrganization, o.managingOrganization, true) + && compareDeep(active, o.active, true) && compareDeep(link, o.link, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Person)) + return false; + Person o = (Person) other; + return compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true) && compareValues(active, o.active, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) + && (telecom == null || telecom.isEmpty()) && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) + && (address == null || address.isEmpty()) && (photo == null || photo.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) + && (active == null || active.isEmpty()) && (link == null || link.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Person; + } + + @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="address", path="Person.address", description="An address in any kind of address/part", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="birthdate", path="Person.birthDate", description="The person's date of birth", type="date" ) + public static final String SP_BIRTHDATE = "birthdate"; + @SearchParamDefinition(name="address-state", path="Person.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="gender", path="Person.gender", description="The gender of the person", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="practitioner", path="Person.link.target", description="The Person links to this Practitioner", type="reference" ) + public static final String SP_PRACTITIONER = "practitioner"; + @SearchParamDefinition(name="link", path="Person.link.target", description="Any link has this Patient, Person, RelatedPerson or Practitioner reference", type="reference" ) + public static final String SP_LINK = "link"; + @SearchParamDefinition(name="relatedperson", path="Person.link.target", description="The Person links to this RelatedPerson", type="reference" ) + public static final String SP_RELATEDPERSON = "relatedperson"; + @SearchParamDefinition(name="address-postalcode", path="Person.address.postalCode", description="A postal code specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="address-country", path="Person.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + @SearchParamDefinition(name="phonetic", path="Person.name", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="phone", path="Person.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + public static final String SP_PHONE = "phone"; + @SearchParamDefinition(name="patient", path="Person.link.target", description="The Person links to this Patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="Person.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="token" ) + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name="address-city", path="Person.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="email", path="Person.telecom.where(system='email')", description="A value in an email contact", type="token" ) + public static final String SP_EMAIL = "email"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PositiveIntType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PositiveIntType.java new file mode 100644 index 00000000000..443e2ef28cc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PositiveIntType.java @@ -0,0 +1,97 @@ +/* +(c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "integer" in FHIR: A signed 32-bit integer + */ +@DatatypeDef(name = "positiveInt", profileOf=IntegerType.class) +public class PositiveIntType extends IntegerType { + + /** + * + */ + private static final long serialVersionUID = 1686497884249402429L; + + /** + * Constructor + */ + public PositiveIntType() { + // nothing + } + + /** + * Constructor + */ + public PositiveIntType(int theInteger) { + setValue(theInteger); + } + + /** + * Constructor + * + * @param theIntegerAsString + * A string representation of an integer + * @throws IllegalArgumentException + * If the string is not a valid integer representation + */ + public PositiveIntType(String theIntegerAsString) { + setValueAsString(theIntegerAsString); + } + + /** + * Constructor + * + * @param theValue The value + * @throws IllegalArgumentException If the value is too large to fit in a signed integer + */ + public PositiveIntType(Long theValue) { + if (theValue < 1 || theValue > java.lang.Integer.MAX_VALUE) { + throw new IllegalArgumentException + (theValue + " cannot be cast to int without changing its value."); + } + if(theValue!=null) { + setValue((int)theValue.longValue()); + } + } + + @Override + public PositiveIntType copy() { + return new PositiveIntType(getValue()); + } + + public String fhirType() { + return "positiveInt"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Practitioner.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Practitioner.java new file mode 100644 index 00000000000..a79fb79b1e5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Practitioner.java @@ -0,0 +1,1511 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ +@ResourceDef(name="Practitioner", profile="http://hl7.org/fhir/Profile/Practitioner") +public class Practitioner extends DomainResource { + + @Block() + public static class PractitionerPractitionerRoleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The organization where the Practitioner performs the roles associated. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Organization where the roles are performed", formalDefinition="The organization where the Practitioner performs the roles associated." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The organization where the Practitioner performs the roles associated.) + */ + protected Organization managingOrganizationTarget; + + /** + * Roles which this practitioner is authorized to perform for the organization. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." ) + protected CodeableConcept role; + + /** + * Specific specialty of the practitioner. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) + protected List specialty; + + /** + * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) + protected Period period; + + /** + * The location(s) at which this practitioner provides care. + */ + @Child(name = "location", type = {Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) + protected List location; + /** + * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) + */ + protected List locationTarget; + + + /** + * The list of healthcare services that this worker provides for this role's Organization/Location(s). + */ + @Child(name = "healthcareService", type = {HealthcareService.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)", formalDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)." ) + protected List healthcareService; + /** + * The actual objects that are the target of the reference (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + protected List healthcareServiceTarget; + + + private static final long serialVersionUID = -2146177018L; + + /* + * Constructor + */ + public PractitionerPractitionerRoleComponent() { + super(); + } + + /** + * @return {@link #managingOrganization} (The organization where the Practitioner performs the roles associated.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + */ + public PractitionerPractitionerRoleComponent setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public PractitionerPractitionerRoleComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public PractitionerPractitionerRoleComponent addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + /** + * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public PractitionerPractitionerRoleComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (Reference item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + // syntactic sugar + public Reference addLocation() { //3 + Reference t = new Reference(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + // syntactic sugar + public PractitionerPractitionerRoleComponent addLocation(Reference t) { //3 + if (t == null) + return this; + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return this; + } + + /** + * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public List getLocationTarget() { + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + return this.locationTarget; + } + + // syntactic sugar + /** + * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public Location addLocationTarget() { + Location r = new Location(); + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + this.locationTarget.add(r); + return r; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public List getHealthcareService() { + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + return this.healthcareService; + } + + public boolean hasHealthcareService() { + if (this.healthcareService == null) + return false; + for (Reference item : this.healthcareService) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + // syntactic sugar + public Reference addHealthcareService() { //3 + Reference t = new Reference(); + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return t; + } + + // syntactic sugar + public PractitionerPractitionerRoleComponent addHealthcareService(Reference t) { //3 + if (t == null) + return this; + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return this; + } + + /** + * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public List getHealthcareServiceTarget() { + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + return this.healthcareServiceTarget; + } + + // syntactic sugar + /** + * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public HealthcareService addHealthcareServiceTarget() { + HealthcareService r = new HealthcareService(); + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + this.healthcareServiceTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker provides for this role's Organization/Location(s).", 0, java.lang.Integer.MAX_VALUE, healthcareService)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else if (name.equals("role")) + this.role = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("location")) + this.getLocation().add(castToReference(value)); + else if (name.equals("healthcareService")) + this.getHealthcareService().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("role")) { + this.role = new CodeableConcept(); + return this.role; + } + else if (name.equals("specialty")) { + return addSpecialty(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("location")) { + return addLocation(); + } + else if (name.equals("healthcareService")) { + return addHealthcareService(); + } + else + return super.addChild(name); + } + + public PractitionerPractitionerRoleComponent copy() { + PractitionerPractitionerRoleComponent dst = new PractitionerPractitionerRoleComponent(); + copyValues(dst); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.role = role == null ? null : role.copy(); + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + if (location != null) { + dst.location = new ArrayList(); + for (Reference i : location) + dst.location.add(i.copy()); + }; + if (healthcareService != null) { + dst.healthcareService = new ArrayList(); + for (Reference i : healthcareService) + dst.healthcareService.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerPractitionerRoleComponent)) + return false; + PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; + return compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(role, o.role, true) + && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) + && compareDeep(healthcareService, o.healthcareService, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerPractitionerRoleComponent)) + return false; + PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (managingOrganization == null || managingOrganization.isEmpty()) && (role == null || role.isEmpty()) + && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty()) + && (healthcareService == null || healthcareService.isEmpty()); + } + + public String fhirType() { + return "Practitioner.practitionerRole"; + + } + + } + + @Block() + public static class PractitionerQualificationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An identifier that applies to this person's qualification in this role. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="An identifier for this qualification for the practitioner", formalDefinition="An identifier that applies to this person's qualification in this role." ) + protected List identifier; + + /** + * Coded representation of the qualification. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Coded representation of the qualification", formalDefinition="Coded representation of the qualification." ) + protected CodeableConcept code; + + /** + * Period during which the qualification is valid. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period during which the qualification is valid", formalDefinition="Period during which the qualification is valid." ) + protected Period period; + + /** + * Organization that regulates and issues the qualification. + */ + @Child(name = "issuer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Organization that regulates and issues the qualification", formalDefinition="Organization that regulates and issues the qualification." ) + protected Reference issuer; + + /** + * The actual object that is the target of the reference (Organization that regulates and issues the qualification.) + */ + protected Organization issuerTarget; + + private static final long serialVersionUID = 1095219071L; + + /* + * Constructor + */ + public PractitionerQualificationComponent() { + super(); + } + + /* + * Constructor + */ + public PractitionerQualificationComponent(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #identifier} (An identifier that applies to this person's qualification in this role.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (An identifier that applies to this person's qualification in this role.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public PractitionerQualificationComponent addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #code} (Coded representation of the qualification.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerQualificationComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Coded representation of the qualification.) + */ + public PractitionerQualificationComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #period} (Period during which the qualification is valid.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerQualificationComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Period during which the qualification is valid.) + */ + public PractitionerQualificationComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #issuer} (Organization that regulates and issues the qualification.) + */ + public Reference getIssuer() { + if (this.issuer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerQualificationComponent.issuer"); + else if (Configuration.doAutoCreate()) + this.issuer = new Reference(); // cc + return this.issuer; + } + + public boolean hasIssuer() { + return this.issuer != null && !this.issuer.isEmpty(); + } + + /** + * @param value {@link #issuer} (Organization that regulates and issues the qualification.) + */ + public PractitionerQualificationComponent setIssuer(Reference value) { + this.issuer = value; + return this; + } + + /** + * @return {@link #issuer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Organization that regulates and issues the qualification.) + */ + public Organization getIssuerTarget() { + if (this.issuerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerQualificationComponent.issuer"); + else if (Configuration.doAutoCreate()) + this.issuerTarget = new Organization(); // aa + return this.issuerTarget; + } + + /** + * @param value {@link #issuer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Organization that regulates and issues the qualification.) + */ + public PractitionerQualificationComponent setIssuerTarget(Organization value) { + this.issuerTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "An identifier that applies to this person's qualification in this role.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("code", "CodeableConcept", "Coded representation of the qualification.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("period", "Period", "Period during which the qualification is valid.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("issuer", "Reference(Organization)", "Organization that regulates and issues the qualification.", 0, java.lang.Integer.MAX_VALUE, issuer)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("issuer")) + this.issuer = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("issuer")) { + this.issuer = new Reference(); + return this.issuer; + } + else + return super.addChild(name); + } + + public PractitionerQualificationComponent copy() { + PractitionerQualificationComponent dst = new PractitionerQualificationComponent(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.code = code == null ? null : code.copy(); + dst.period = period == null ? null : period.copy(); + dst.issuer = issuer == null ? null : issuer.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerQualificationComponent)) + return false; + PractitionerQualificationComponent o = (PractitionerQualificationComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(period, o.period, true) + && compareDeep(issuer, o.issuer, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerQualificationComponent)) + return false; + PractitionerQualificationComponent o = (PractitionerQualificationComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) + && (period == null || period.isEmpty()) && (issuer == null || issuer.isEmpty()); + } + + public String fhirType() { + return "Practitioner.qualification"; + + } + + } + + /** + * An identifier that applies to this person in this role. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A identifier for the person as this agent", formalDefinition="An identifier that applies to this person in this role." ) + protected List identifier; + + /** + * Whether this practitioner's record is in active use. + */ + @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether this practitioner's record is in active use", formalDefinition="Whether this practitioner's record is in active use." ) + protected BooleanType active; + + /** + * A name associated with the person. + */ + @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) + protected HumanName name; + + /** + * A contact detail for the practitioner, e.g. a telephone number or an email address. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A contact detail for the practitioner", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." ) + protected List telecom; + + /** + * The postal address where the practitioner can be found or visited or to which mail can be delivered. + */ + @Child(name = "address", type = {Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Where practitioner can be found/visited", formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered." ) + protected List
address; + + /** + * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * The date of birth for the practitioner. + */ + @Child(name = "birthDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date on which the practitioner was born", formalDefinition="The date of birth for the practitioner." ) + protected DateType birthDate; + + /** + * Image of the person. + */ + @Child(name = "photo", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) + protected List photo; + + /** + * The list of roles/organizations that the practitioner is associated with. + */ + @Child(name = "practitionerRole", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Roles/organizations the practitioner is associated with", formalDefinition="The list of roles/organizations that the practitioner is associated with." ) + protected List practitionerRole; + + /** + * Qualifications obtained by training and certification. + */ + @Child(name = "qualification", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Qualifications obtained by training and certification", formalDefinition="Qualifications obtained by training and certification." ) + protected List qualification; + + /** + * A language the practitioner is able to use in patient communication. + */ + @Child(name = "communication", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A language the practitioner is able to use in patient communication", formalDefinition="A language the practitioner is able to use in patient communication." ) + protected List communication; + + private static final long serialVersionUID = 1066276346L; + + /* + * Constructor + */ + public Practitioner() { + super(); + } + + /** + * @return {@link #identifier} (An identifier that applies to this person in this role.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (An identifier that applies to this person in this role.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Practitioner addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public BooleanType getActiveElement() { + if (this.active == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Practitioner.active"); + else if (Configuration.doAutoCreate()) + this.active = new BooleanType(); // bb + return this.active; + } + + public boolean hasActiveElement() { + return this.active != null && !this.active.isEmpty(); + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); + } + + /** + * @param value {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public Practitioner setActiveElement(BooleanType value) { + this.active = value; + return this; + } + + /** + * @return Whether this practitioner's record is in active use. + */ + public boolean getActive() { + return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); + } + + /** + * @param value Whether this practitioner's record is in active use. + */ + public Practitioner setActive(boolean value) { + if (this.active == null) + this.active = new BooleanType(); + this.active.setValue(value); + return this; + } + + /** + * @return {@link #name} (A name associated with the person.) + */ + public HumanName getName() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Practitioner.name"); + else if (Configuration.doAutoCreate()) + this.name = new HumanName(); // cc + return this.name; + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name associated with the person.) + */ + public Practitioner setName(HumanName value) { + this.name = value; + return this; + } + + /** + * @return {@link #telecom} (A contact detail for the practitioner, e.g. a telephone number or an email address.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail for the practitioner, e.g. a telephone number or an email address.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Practitioner addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #address} (The postal address where the practitioner can be found or visited or to which mail can be delivered.) + */ + public List
getAddress() { + if (this.address == null) + this.address = new ArrayList
(); + return this.address; + } + + public boolean hasAddress() { + if (this.address == null) + return false; + for (Address item : this.address) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #address} (The postal address where the practitioner can be found or visited or to which mail can be delivered.) + */ + // syntactic sugar + public Address addAddress() { //3 + Address t = new Address(); + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return t; + } + + // syntactic sugar + public Practitioner addAddress(Address t) { //3 + if (t == null) + return this; + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Practitioner.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Practitioner setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + public Practitioner setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #birthDate} (The date of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public DateType getBirthDateElement() { + if (this.birthDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Practitioner.birthDate"); + else if (Configuration.doAutoCreate()) + this.birthDate = new DateType(); // bb + return this.birthDate; + } + + public boolean hasBirthDateElement() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + public boolean hasBirthDate() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + /** + * @param value {@link #birthDate} (The date of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public Practitioner setBirthDateElement(DateType value) { + this.birthDate = value; + return this; + } + + /** + * @return The date of birth for the practitioner. + */ + public Date getBirthDate() { + return this.birthDate == null ? null : this.birthDate.getValue(); + } + + /** + * @param value The date of birth for the practitioner. + */ + public Practitioner setBirthDate(Date value) { + if (value == null) + this.birthDate = null; + else { + if (this.birthDate == null) + this.birthDate = new DateType(); + this.birthDate.setValue(value); + } + return this; + } + + /** + * @return {@link #photo} (Image of the person.) + */ + public List getPhoto() { + if (this.photo == null) + this.photo = new ArrayList(); + return this.photo; + } + + public boolean hasPhoto() { + if (this.photo == null) + return false; + for (Attachment item : this.photo) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #photo} (Image of the person.) + */ + // syntactic sugar + public Attachment addPhoto() { //3 + Attachment t = new Attachment(); + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return t; + } + + // syntactic sugar + public Practitioner addPhoto(Attachment t) { //3 + if (t == null) + return this; + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return this; + } + + /** + * @return {@link #practitionerRole} (The list of roles/organizations that the practitioner is associated with.) + */ + public List getPractitionerRole() { + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + return this.practitionerRole; + } + + public boolean hasPractitionerRole() { + if (this.practitionerRole == null) + return false; + for (PractitionerPractitionerRoleComponent item : this.practitionerRole) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #practitionerRole} (The list of roles/organizations that the practitioner is associated with.) + */ + // syntactic sugar + public PractitionerPractitionerRoleComponent addPractitionerRole() { //3 + PractitionerPractitionerRoleComponent t = new PractitionerPractitionerRoleComponent(); + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + this.practitionerRole.add(t); + return t; + } + + // syntactic sugar + public Practitioner addPractitionerRole(PractitionerPractitionerRoleComponent t) { //3 + if (t == null) + return this; + if (this.practitionerRole == null) + this.practitionerRole = new ArrayList(); + this.practitionerRole.add(t); + return this; + } + + /** + * @return {@link #qualification} (Qualifications obtained by training and certification.) + */ + public List getQualification() { + if (this.qualification == null) + this.qualification = new ArrayList(); + return this.qualification; + } + + public boolean hasQualification() { + if (this.qualification == null) + return false; + for (PractitionerQualificationComponent item : this.qualification) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #qualification} (Qualifications obtained by training and certification.) + */ + // syntactic sugar + public PractitionerQualificationComponent addQualification() { //3 + PractitionerQualificationComponent t = new PractitionerQualificationComponent(); + if (this.qualification == null) + this.qualification = new ArrayList(); + this.qualification.add(t); + return t; + } + + // syntactic sugar + public Practitioner addQualification(PractitionerQualificationComponent t) { //3 + if (t == null) + return this; + if (this.qualification == null) + this.qualification = new ArrayList(); + this.qualification.add(t); + return this; + } + + /** + * @return {@link #communication} (A language the practitioner is able to use in patient communication.) + */ + public List getCommunication() { + if (this.communication == null) + this.communication = new ArrayList(); + return this.communication; + } + + public boolean hasCommunication() { + if (this.communication == null) + return false; + for (CodeableConcept item : this.communication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #communication} (A language the practitioner is able to use in patient communication.) + */ + // syntactic sugar + public CodeableConcept addCommunication() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.communication == null) + this.communication = new ArrayList(); + this.communication.add(t); + return t; + } + + // syntactic sugar + public Practitioner addCommunication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.communication == null) + this.communication = new ArrayList(); + this.communication.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "An identifier that applies to this person in this role.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active)); + childrenList.add(new Property("name", "HumanName", "A name associated with the person.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the practitioner, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("address", "Address", "The postal address where the practitioner can be found or visited or to which mail can be delivered.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("birthDate", "date", "The date of birth for the practitioner.", 0, java.lang.Integer.MAX_VALUE, birthDate)); + childrenList.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo)); + childrenList.add(new Property("practitionerRole", "", "The list of roles/organizations that the practitioner is associated with.", 0, java.lang.Integer.MAX_VALUE, practitionerRole)); + childrenList.add(new Property("qualification", "", "Qualifications obtained by training and certification.", 0, java.lang.Integer.MAX_VALUE, qualification)); + childrenList.add(new Property("communication", "CodeableConcept", "A language the practitioner is able to use in patient communication.", 0, java.lang.Integer.MAX_VALUE, communication)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("active")) + this.active = castToBoolean(value); // BooleanType + else if (name.equals("name")) + this.name = castToHumanName(value); // HumanName + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("address")) + this.getAddress().add(castToAddress(value)); + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("birthDate")) + this.birthDate = castToDate(value); // DateType + else if (name.equals("photo")) + this.getPhoto().add(castToAttachment(value)); + else if (name.equals("practitionerRole")) + this.getPractitionerRole().add((PractitionerPractitionerRoleComponent) value); + else if (name.equals("qualification")) + this.getQualification().add((PractitionerQualificationComponent) value); + else if (name.equals("communication")) + this.getCommunication().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("active")) { + throw new FHIRException("Cannot call addChild on a primitive type Practitioner.active"); + } + else if (name.equals("name")) { + this.name = new HumanName(); + return this.name; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("address")) { + return addAddress(); + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type Practitioner.gender"); + } + else if (name.equals("birthDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Practitioner.birthDate"); + } + else if (name.equals("photo")) { + return addPhoto(); + } + else if (name.equals("practitionerRole")) { + return addPractitionerRole(); + } + else if (name.equals("qualification")) { + return addQualification(); + } + else if (name.equals("communication")) { + return addCommunication(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Practitioner"; + + } + + public Practitioner copy() { + Practitioner dst = new Practitioner(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.active = active == null ? null : active.copy(); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + if (address != null) { + dst.address = new ArrayList
(); + for (Address i : address) + dst.address.add(i.copy()); + }; + dst.gender = gender == null ? null : gender.copy(); + dst.birthDate = birthDate == null ? null : birthDate.copy(); + if (photo != null) { + dst.photo = new ArrayList(); + for (Attachment i : photo) + dst.photo.add(i.copy()); + }; + if (practitionerRole != null) { + dst.practitionerRole = new ArrayList(); + for (PractitionerPractitionerRoleComponent i : practitionerRole) + dst.practitionerRole.add(i.copy()); + }; + if (qualification != null) { + dst.qualification = new ArrayList(); + for (PractitionerQualificationComponent i : qualification) + dst.qualification.add(i.copy()); + }; + if (communication != null) { + dst.communication = new ArrayList(); + for (CodeableConcept i : communication) + dst.communication.add(i.copy()); + }; + return dst; + } + + protected Practitioner typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Practitioner)) + return false; + Practitioner o = (Practitioner) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(name, o.name, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) + && compareDeep(birthDate, o.birthDate, true) && compareDeep(photo, o.photo, true) && compareDeep(practitionerRole, o.practitionerRole, true) + && compareDeep(qualification, o.qualification, true) && compareDeep(communication, o.communication, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Practitioner)) + return false; + Practitioner o = (Practitioner) other; + return compareValues(active, o.active, true) && compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) + && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) + && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) + && (practitionerRole == null || practitionerRole.isEmpty()) && (qualification == null || qualification.isEmpty()) + && (communication == null || communication.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Practitioner; + } + + @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="given", path="Practitioner.name.given", description="A portion of the given name", type="string" ) + public static final String SP_GIVEN = "given"; + @SearchParamDefinition(name="specialty", path="Practitioner.practitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token" ) + public static final String SP_SPECIALTY = "specialty"; + @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="role", path="Practitioner.practitionerRole.role", description="The practitioner can perform this role at for the organization", type="token" ) + public static final String SP_ROLE = "role"; + @SearchParamDefinition(name="address-state", path="Practitioner.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="address-postalcode", path="Practitioner.address.postalCode", description="A postalCode specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="address-country", path="Practitioner.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="phone", path="Practitioner.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + public static final String SP_PHONE = "phone"; + @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.managingOrganization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="Practitioner.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="token" ) + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name="location", path="Practitioner.practitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="family", path="Practitioner.name.family", description="A portion of the family name", type="string" ) + public static final String SP_FAMILY = "family"; + @SearchParamDefinition(name="address-city", path="Practitioner.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" ) + public static final String SP_COMMUNICATION = "communication"; + @SearchParamDefinition(name="email", path="Practitioner.telecom.where(system='email')", description="A value in an email contact", type="token" ) + public static final String SP_EMAIL = "email"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PrimitiveType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PrimitiveType.java new file mode 100644 index 00000000000..7ce3cb1630e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/PrimitiveType.java @@ -0,0 +1,144 @@ +package org.hl7.fhir.dstu21.model; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IPrimitiveType; + +import ca.uhn.fhir.model.api.IElement; + +public abstract class PrimitiveType extends Type implements IPrimitiveType, IBaseHasExtensions, IElement { + + private static final long serialVersionUID = 3L; + + private T myCoercedValue; + private String myStringValue; + + public T getValue() { + return myCoercedValue; + } + + public String asStringValue() { + return myStringValue; + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(getValue()).toHashCode(); + } + + public PrimitiveType setValue(T theValue) { + myCoercedValue = theValue; + updateStringValue(); + return this; + } + + protected void updateStringValue() { + if (myCoercedValue == null) { + myStringValue = null; + } else { + // NB this might be null + myStringValue = encode(myCoercedValue); + } + } + + @Override + public boolean isEmpty() { + return super.isEmpty() && StringUtils.isBlank(getValueAsString()); + } + + public void fromStringValue(String theValue) { + if (theValue == null) { + myCoercedValue = null; + } else { + // NB this might be null + myCoercedValue = parse(theValue); + } + myStringValue = theValue; + } + + /** + * Subclasses must override to convert an encoded representation of this datatype into a "coerced" one + * + * @param theValue + * Will not be null + * @return May return null if the value does not correspond to anything + */ + protected abstract T parse(String theValue); + + /** + * Subclasses must override to convert a "coerced" value into an encoded one. + * + * @param theValue + * Will not be null + * @return May return null if the value does not correspond to anything + */ + protected abstract String encode(T theValue); + + public boolean isPrimitive() { + return true; + } + + public String primitiveValue() { + return asStringValue(); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "[" + asStringValue() + "]"; + } + + public boolean hasValue() { + return !StringUtils.isBlank(getValueAsString()); + } + + public String getValueAsString() { + return asStringValue(); + } + + public void setValueAsString(String theValue) { + fromStringValue(theValue); + } + + protected Type typedCopy() { + return copy(); + } + + public abstract Type copy(); + + @Override + public boolean equalsDeep(Base obj) { + if (!super.equalsDeep(obj)) + return false; + if (obj == null) { + return false; + } + if (!(obj.getClass() == getClass())) { + return false; + } + + PrimitiveType o = (PrimitiveType) obj; + + EqualsBuilder b = new EqualsBuilder(); + b.append(getValue(), o.getValue()); + return b.isEquals(); + } + + @Override + public boolean equalsShallow(Base obj) { + if (obj == null) { + return false; + } + if (!(obj.getClass() == getClass())) { + return false; + } + + PrimitiveType o = (PrimitiveType) obj; + + EqualsBuilder b = new EqualsBuilder(); + b.append(getValue(), o.getValue()); + return b.isEquals(); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Procedure.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Procedure.java new file mode 100644 index 00000000000..e82e6b10b58 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Procedure.java @@ -0,0 +1,1846 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ +@ResourceDef(name="Procedure", profile="http://hl7.org/fhir/Profile/Procedure") +public class Procedure extends DomainResource { + + public enum ProcedureStatus { + /** + * The procedure is still occurring. + */ + INPROGRESS, + /** + * The procedure was terminated without completing successfully. + */ + ABORTED, + /** + * All actions involved in the procedure have taken place. + */ + COMPLETED, + /** + * The statement was entered in error and Is not valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ProcedureStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("aborted".equals(codeString)) + return ABORTED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ProcedureStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case ABORTED: return "aborted"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/procedure-status"; + case ABORTED: return "http://hl7.org/fhir/procedure-status"; + case COMPLETED: return "http://hl7.org/fhir/procedure-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/procedure-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The procedure is still occurring."; + case ABORTED: return "The procedure was terminated without completing successfully."; + case COMPLETED: return "All actions involved in the procedure have taken place."; + case ENTEREDINERROR: return "The statement was entered in error and Is not valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case ABORTED: return "Aboted"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + } + + public static class ProcedureStatusEnumFactory implements EnumFactory { + public ProcedureStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return ProcedureStatus.INPROGRESS; + if ("aborted".equals(codeString)) + return ProcedureStatus.ABORTED; + if ("completed".equals(codeString)) + return ProcedureStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ProcedureStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ProcedureStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, ProcedureStatus.INPROGRESS); + if ("aborted".equals(codeString)) + return new Enumeration(this, ProcedureStatus.ABORTED); + if ("completed".equals(codeString)) + return new Enumeration(this, ProcedureStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ProcedureStatus.ENTEREDINERROR); + throw new FHIRException("Unknown ProcedureStatus code '"+codeString+"'"); + } + public String toCode(ProcedureStatus code) { + if (code == ProcedureStatus.INPROGRESS) + return "in-progress"; + if (code == ProcedureStatus.ABORTED) + return "aborted"; + if (code == ProcedureStatus.COMPLETED) + return "completed"; + if (code == ProcedureStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + @Block() + public static class ProcedurePerformerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The practitioner who was involved in the procedure. + */ + @Child(name = "actor", type = {Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The reference to the practitioner", formalDefinition="The practitioner who was involved in the procedure." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (The practitioner who was involved in the procedure.) + */ + protected Resource actorTarget; + + /** + * For example: surgeon, anaethetist, endoscopist. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The role the actor was in", formalDefinition="For example: surgeon, anaethetist, endoscopist." ) + protected CodeableConcept role; + + private static final long serialVersionUID = -843698327L; + + /* + * Constructor + */ + public ProcedurePerformerComponent() { + super(); + } + + /** + * @return {@link #actor} (The practitioner who was involved in the procedure.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedurePerformerComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (The practitioner who was involved in the procedure.) + */ + public ProcedurePerformerComponent setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who was involved in the procedure.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who was involved in the procedure.) + */ + public ProcedurePerformerComponent setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + /** + * @return {@link #role} (For example: surgeon, anaethetist, endoscopist.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedurePerformerComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (For example: surgeon, anaethetist, endoscopist.) + */ + public ProcedurePerformerComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actor", "Reference(Practitioner|Organization|Patient|RelatedPerson)", "The practitioner who was involved in the procedure.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("role", "CodeableConcept", "For example: surgeon, anaethetist, endoscopist.", 0, java.lang.Integer.MAX_VALUE, role)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else if (name.equals("role")) + this.role = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("role")) { + this.role = new CodeableConcept(); + return this.role; + } + else + return super.addChild(name); + } + + public ProcedurePerformerComponent copy() { + ProcedurePerformerComponent dst = new ProcedurePerformerComponent(); + copyValues(dst); + dst.actor = actor == null ? null : actor.copy(); + dst.role = role == null ? null : role.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedurePerformerComponent)) + return false; + ProcedurePerformerComponent o = (ProcedurePerformerComponent) other; + return compareDeep(actor, o.actor, true) && compareDeep(role, o.role, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedurePerformerComponent)) + return false; + ProcedurePerformerComponent o = (ProcedurePerformerComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty()) + ; + } + + public String fhirType() { + return "Procedure.performer"; + + } + + } + + @Block() + public static class ProcedureFocalDeviceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The kind of change that happened to the device during the procedure. + */ + @Child(name = "action", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Kind of change to device", formalDefinition="The kind of change that happened to the device during the procedure." ) + protected CodeableConcept action; + + /** + * The device that was manipulated (changed) during the procedure. + */ + @Child(name = "manipulated", type = {Device.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Device that was changed", formalDefinition="The device that was manipulated (changed) during the procedure." ) + protected Reference manipulated; + + /** + * The actual object that is the target of the reference (The device that was manipulated (changed) during the procedure.) + */ + protected Device manipulatedTarget; + + private static final long serialVersionUID = 1779937807L; + + /* + * Constructor + */ + public ProcedureFocalDeviceComponent() { + super(); + } + + /* + * Constructor + */ + public ProcedureFocalDeviceComponent(Reference manipulated) { + super(); + this.manipulated = manipulated; + } + + /** + * @return {@link #action} (The kind of change that happened to the device during the procedure.) + */ + public CodeableConcept getAction() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureFocalDeviceComponent.action"); + else if (Configuration.doAutoCreate()) + this.action = new CodeableConcept(); // cc + return this.action; + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (The kind of change that happened to the device during the procedure.) + */ + public ProcedureFocalDeviceComponent setAction(CodeableConcept value) { + this.action = value; + return this; + } + + /** + * @return {@link #manipulated} (The device that was manipulated (changed) during the procedure.) + */ + public Reference getManipulated() { + if (this.manipulated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureFocalDeviceComponent.manipulated"); + else if (Configuration.doAutoCreate()) + this.manipulated = new Reference(); // cc + return this.manipulated; + } + + public boolean hasManipulated() { + return this.manipulated != null && !this.manipulated.isEmpty(); + } + + /** + * @param value {@link #manipulated} (The device that was manipulated (changed) during the procedure.) + */ + public ProcedureFocalDeviceComponent setManipulated(Reference value) { + this.manipulated = value; + return this; + } + + /** + * @return {@link #manipulated} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device that was manipulated (changed) during the procedure.) + */ + public Device getManipulatedTarget() { + if (this.manipulatedTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureFocalDeviceComponent.manipulated"); + else if (Configuration.doAutoCreate()) + this.manipulatedTarget = new Device(); // aa + return this.manipulatedTarget; + } + + /** + * @param value {@link #manipulated} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device that was manipulated (changed) during the procedure.) + */ + public ProcedureFocalDeviceComponent setManipulatedTarget(Device value) { + this.manipulatedTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "CodeableConcept", "The kind of change that happened to the device during the procedure.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("manipulated", "Reference(Device)", "The device that was manipulated (changed) during the procedure.", 0, java.lang.Integer.MAX_VALUE, manipulated)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("action")) + this.action = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("manipulated")) + this.manipulated = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("action")) { + this.action = new CodeableConcept(); + return this.action; + } + else if (name.equals("manipulated")) { + this.manipulated = new Reference(); + return this.manipulated; + } + else + return super.addChild(name); + } + + public ProcedureFocalDeviceComponent copy() { + ProcedureFocalDeviceComponent dst = new ProcedureFocalDeviceComponent(); + copyValues(dst); + dst.action = action == null ? null : action.copy(); + dst.manipulated = manipulated == null ? null : manipulated.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureFocalDeviceComponent)) + return false; + ProcedureFocalDeviceComponent o = (ProcedureFocalDeviceComponent) other; + return compareDeep(action, o.action, true) && compareDeep(manipulated, o.manipulated, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureFocalDeviceComponent)) + return false; + ProcedureFocalDeviceComponent o = (ProcedureFocalDeviceComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()) && (manipulated == null || manipulated.isEmpty()) + ; + } + + public String fhirType() { + return "Procedure.focalDevice"; + + } + + } + + /** + * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Identifiers for this procedure", formalDefinition="This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * The person, animal or group on which the procedure was performed. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who the procedure was performed on", formalDefinition="The person, animal or group on which the procedure was performed." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The person, animal or group on which the procedure was performed.) + */ + protected Resource subjectTarget; + + /** + * A code specifying the state of the procedure. Generally this will be in-progress or completed state. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | aborted | completed | entered-in-error", formalDefinition="A code specifying the state of the procedure. Generally this will be in-progress or completed state." ) + protected Enumeration status; + + /** + * A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure"). + */ + @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Classification of the procedure", formalDefinition="A code that classifies the procedure for searching, sorting and display purposes (e.g. \"Surgical Procedure\")." ) + protected CodeableConcept category; + + /** + * The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy"). + */ + @Child(name = "code", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identification of the procedure", formalDefinition="The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \"Laparoscopic Appendectomy\")." ) + protected CodeableConcept code; + + /** + * Set this to true if the record is saying that the procedure was NOT performed. + */ + @Child(name = "notPerformed", type = {BooleanType.class}, order=5, min=0, max=1, modifier=true, summary=false) + @Description(shortDefinition="True if procedure was not performed as scheduled", formalDefinition="Set this to true if the record is saying that the procedure was NOT performed." ) + protected BooleanType notPerformed; + + /** + * A code indicating why the procedure was not performed. + */ + @Child(name = "reasonNotPerformed", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reason procedure was not performed", formalDefinition="A code indicating why the procedure was not performed." ) + protected List reasonNotPerformed; + + /** + * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion. + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Target body sites", formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion." ) + protected List bodySite; + + /** + * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text. + */ + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason procedure performed", formalDefinition="The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text." ) + protected Type reason; + + /** + * Limited to 'real' people rather than equipment. + */ + @Child(name = "performer", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The people who performed the procedure", formalDefinition="Limited to 'real' people rather than equipment." ) + protected List performer; + + /** + * The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured. + */ + @Child(name = "performed", type = {DateTimeType.class, Period.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date/Period the procedure was performed", formalDefinition="The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." ) + protected Type performed; + + /** + * The encounter during which the procedure was performed. + */ + @Child(name = "encounter", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The encounter associated with the procedure", formalDefinition="The encounter during which the procedure was performed." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter during which the procedure was performed.) + */ + protected Encounter encounterTarget; + + /** + * The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant. + */ + @Child(name = "location", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the procedure happened", formalDefinition="The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.) + */ + protected Location locationTarget; + + /** + * The outcome of the procedure - did it resolve reasons for the procedure being performed? + */ + @Child(name = "outcome", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The result of procedure", formalDefinition="The outcome of the procedure - did it resolve reasons for the procedure being performed?" ) + protected CodeableConcept outcome; + + /** + * This could be a histology result, pathology report, surgical report, etc.. + */ + @Child(name = "report", type = {DiagnosticReport.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Any report resulting from the procedure", formalDefinition="This could be a histology result, pathology report, surgical report, etc.." ) + protected List report; + /** + * The actual objects that are the target of the reference (This could be a histology result, pathology report, surgical report, etc..) + */ + protected List reportTarget; + + + /** + * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues. + */ + @Child(name = "complication", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Complication following the procedure", formalDefinition="Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues." ) + protected List complication; + + /** + * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used. + */ + @Child(name = "followUp", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Instructions for follow up", formalDefinition="If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used." ) + protected List followUp; + + /** + * A reference to a resource that contains details of the request for this procedure. + */ + @Child(name = "request", type = {CarePlan.class, DiagnosticOrder.class, ProcedureRequest.class, ReferralRequest.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A request for this procedure", formalDefinition="A reference to a resource that contains details of the request for this procedure." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (A reference to a resource that contains details of the request for this procedure.) + */ + protected Resource requestTarget; + + /** + * Any other notes about the procedure. E.g. the operative notes. + */ + @Child(name = "notes", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional information about the procedure", formalDefinition="Any other notes about the procedure. E.g. the operative notes." ) + protected List notes; + + /** + * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure. + */ + @Child(name = "focalDevice", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Device changed in procedure", formalDefinition="A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure." ) + protected List focalDevice; + + /** + * Identifies medications, devices and any other substance used as part of the procedure. + */ + @Child(name = "used", type = {Device.class, Medication.class, Substance.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Items used during procedure", formalDefinition="Identifies medications, devices and any other substance used as part of the procedure." ) + protected List used; + /** + * The actual objects that are the target of the reference (Identifies medications, devices and any other substance used as part of the procedure.) + */ + protected List usedTarget; + + + private static final long serialVersionUID = -489125036L; + + /* + * Constructor + */ + public Procedure() { + super(); + } + + /* + * Constructor + */ + public Procedure(Reference subject, Enumeration status, CodeableConcept code) { + super(); + this.subject = subject; + this.status = status; + this.code = code; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Procedure addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (The person, animal or group on which the procedure was performed.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The person, animal or group on which the procedure was performed.) + */ + public Procedure setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person, animal or group on which the procedure was performed.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person, animal or group on which the procedure was performed.) + */ + public Procedure setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #status} (A code specifying the state of the procedure. Generally this will be in-progress or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ProcedureStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code specifying the state of the procedure. Generally this will be in-progress or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Procedure setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying the state of the procedure. Generally this will be in-progress or completed state. + */ + public ProcedureStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying the state of the procedure. Generally this will be in-progress or completed state. + */ + public Procedure setStatus(ProcedureStatus value) { + if (this.status == null) + this.status = new Enumeration(new ProcedureStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #category} (A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure").) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure").) + */ + public Procedure setCategory(CodeableConcept value) { + this.category = value; + return this; + } + + /** + * @return {@link #code} (The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy").) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy").) + */ + public Procedure setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #notPerformed} (Set this to true if the record is saying that the procedure was NOT performed.). This is the underlying object with id, value and extensions. The accessor "getNotPerformed" gives direct access to the value + */ + public BooleanType getNotPerformedElement() { + if (this.notPerformed == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.notPerformed"); + else if (Configuration.doAutoCreate()) + this.notPerformed = new BooleanType(); // bb + return this.notPerformed; + } + + public boolean hasNotPerformedElement() { + return this.notPerformed != null && !this.notPerformed.isEmpty(); + } + + public boolean hasNotPerformed() { + return this.notPerformed != null && !this.notPerformed.isEmpty(); + } + + /** + * @param value {@link #notPerformed} (Set this to true if the record is saying that the procedure was NOT performed.). This is the underlying object with id, value and extensions. The accessor "getNotPerformed" gives direct access to the value + */ + public Procedure setNotPerformedElement(BooleanType value) { + this.notPerformed = value; + return this; + } + + /** + * @return Set this to true if the record is saying that the procedure was NOT performed. + */ + public boolean getNotPerformed() { + return this.notPerformed == null || this.notPerformed.isEmpty() ? false : this.notPerformed.getValue(); + } + + /** + * @param value Set this to true if the record is saying that the procedure was NOT performed. + */ + public Procedure setNotPerformed(boolean value) { + if (this.notPerformed == null) + this.notPerformed = new BooleanType(); + this.notPerformed.setValue(value); + return this; + } + + /** + * @return {@link #reasonNotPerformed} (A code indicating why the procedure was not performed.) + */ + public List getReasonNotPerformed() { + if (this.reasonNotPerformed == null) + this.reasonNotPerformed = new ArrayList(); + return this.reasonNotPerformed; + } + + public boolean hasReasonNotPerformed() { + if (this.reasonNotPerformed == null) + return false; + for (CodeableConcept item : this.reasonNotPerformed) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reasonNotPerformed} (A code indicating why the procedure was not performed.) + */ + // syntactic sugar + public CodeableConcept addReasonNotPerformed() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonNotPerformed == null) + this.reasonNotPerformed = new ArrayList(); + this.reasonNotPerformed.add(t); + return t; + } + + // syntactic sugar + public Procedure addReasonNotPerformed(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonNotPerformed == null) + this.reasonNotPerformed = new ArrayList(); + this.reasonNotPerformed.add(t); + return this; + } + + /** + * @return {@link #bodySite} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + public List getBodySite() { + if (this.bodySite == null) + this.bodySite = new ArrayList(); + return this.bodySite; + } + + public boolean hasBodySite() { + if (this.bodySite == null) + return false; + for (CodeableConcept item : this.bodySite) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #bodySite} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + // syntactic sugar + public CodeableConcept addBodySite() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return t; + } + + // syntactic sugar + public Procedure addBodySite(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return this; + } + + /** + * @return {@link #reason} (The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.) + */ + public Procedure setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #performer} (Limited to 'real' people rather than equipment.) + */ + public List getPerformer() { + if (this.performer == null) + this.performer = new ArrayList(); + return this.performer; + } + + public boolean hasPerformer() { + if (this.performer == null) + return false; + for (ProcedurePerformerComponent item : this.performer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #performer} (Limited to 'real' people rather than equipment.) + */ + // syntactic sugar + public ProcedurePerformerComponent addPerformer() { //3 + ProcedurePerformerComponent t = new ProcedurePerformerComponent(); + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return t; + } + + // syntactic sugar + public Procedure addPerformer(ProcedurePerformerComponent t) { //3 + if (t == null) + return this; + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return this; + } + + /** + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public Type getPerformed() { + return this.performed; + } + + /** + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public DateTimeType getPerformedDateTimeType() throws FHIRException { + if (!(this.performed instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.performed.getClass().getName()+" was encountered"); + return (DateTimeType) this.performed; + } + + public boolean hasPerformedDateTimeType() { + return this.performed instanceof DateTimeType; + } + + /** + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public Period getPerformedPeriod() throws FHIRException { + if (!(this.performed instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.performed.getClass().getName()+" was encountered"); + return (Period) this.performed; + } + + public boolean hasPerformedPeriod() { + return this.performed instanceof Period; + } + + public boolean hasPerformed() { + return this.performed != null && !this.performed.isEmpty(); + } + + /** + * @param value {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public Procedure setPerformed(Type value) { + this.performed = value; + return this; + } + + /** + * @return {@link #encounter} (The encounter during which the procedure was performed.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter during which the procedure was performed.) + */ + public Procedure setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter during which the procedure was performed.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter during which the procedure was performed.) + */ + public Procedure setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #location} (The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Procedure setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Procedure setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #outcome} (The outcome of the procedure - did it resolve reasons for the procedure being performed?) + */ + public CodeableConcept getOutcome() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new CodeableConcept(); // cc + return this.outcome; + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (The outcome of the procedure - did it resolve reasons for the procedure being performed?) + */ + public Procedure setOutcome(CodeableConcept value) { + this.outcome = value; + return this; + } + + /** + * @return {@link #report} (This could be a histology result, pathology report, surgical report, etc..) + */ + public List getReport() { + if (this.report == null) + this.report = new ArrayList(); + return this.report; + } + + public boolean hasReport() { + if (this.report == null) + return false; + for (Reference item : this.report) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #report} (This could be a histology result, pathology report, surgical report, etc..) + */ + // syntactic sugar + public Reference addReport() { //3 + Reference t = new Reference(); + if (this.report == null) + this.report = new ArrayList(); + this.report.add(t); + return t; + } + + // syntactic sugar + public Procedure addReport(Reference t) { //3 + if (t == null) + return this; + if (this.report == null) + this.report = new ArrayList(); + this.report.add(t); + return this; + } + + /** + * @return {@link #report} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. This could be a histology result, pathology report, surgical report, etc..) + */ + public List getReportTarget() { + if (this.reportTarget == null) + this.reportTarget = new ArrayList(); + return this.reportTarget; + } + + // syntactic sugar + /** + * @return {@link #report} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. This could be a histology result, pathology report, surgical report, etc..) + */ + public DiagnosticReport addReportTarget() { + DiagnosticReport r = new DiagnosticReport(); + if (this.reportTarget == null) + this.reportTarget = new ArrayList(); + this.reportTarget.add(r); + return r; + } + + /** + * @return {@link #complication} (Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.) + */ + public List getComplication() { + if (this.complication == null) + this.complication = new ArrayList(); + return this.complication; + } + + public boolean hasComplication() { + if (this.complication == null) + return false; + for (CodeableConcept item : this.complication) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #complication} (Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.) + */ + // syntactic sugar + public CodeableConcept addComplication() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.complication == null) + this.complication = new ArrayList(); + this.complication.add(t); + return t; + } + + // syntactic sugar + public Procedure addComplication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.complication == null) + this.complication = new ArrayList(); + this.complication.add(t); + return this; + } + + /** + * @return {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.) + */ + public List getFollowUp() { + if (this.followUp == null) + this.followUp = new ArrayList(); + return this.followUp; + } + + public boolean hasFollowUp() { + if (this.followUp == null) + return false; + for (CodeableConcept item : this.followUp) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.) + */ + // syntactic sugar + public CodeableConcept addFollowUp() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.followUp == null) + this.followUp = new ArrayList(); + this.followUp.add(t); + return t; + } + + // syntactic sugar + public Procedure addFollowUp(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.followUp == null) + this.followUp = new ArrayList(); + this.followUp.add(t); + return this; + } + + /** + * @return {@link #request} (A reference to a resource that contains details of the request for this procedure.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (A reference to a resource that contains details of the request for this procedure.) + */ + public Procedure setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a resource that contains details of the request for this procedure.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a resource that contains details of the request for this procedure.) + */ + public Procedure setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #notes} (Any other notes about the procedure. E.g. the operative notes.) + */ + public List getNotes() { + if (this.notes == null) + this.notes = new ArrayList(); + return this.notes; + } + + public boolean hasNotes() { + if (this.notes == null) + return false; + for (Annotation item : this.notes) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notes} (Any other notes about the procedure. E.g. the operative notes.) + */ + // syntactic sugar + public Annotation addNotes() { //3 + Annotation t = new Annotation(); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return t; + } + + // syntactic sugar + public Procedure addNotes(Annotation t) { //3 + if (t == null) + return this; + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return this; + } + + /** + * @return {@link #focalDevice} (A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.) + */ + public List getFocalDevice() { + if (this.focalDevice == null) + this.focalDevice = new ArrayList(); + return this.focalDevice; + } + + public boolean hasFocalDevice() { + if (this.focalDevice == null) + return false; + for (ProcedureFocalDeviceComponent item : this.focalDevice) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #focalDevice} (A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.) + */ + // syntactic sugar + public ProcedureFocalDeviceComponent addFocalDevice() { //3 + ProcedureFocalDeviceComponent t = new ProcedureFocalDeviceComponent(); + if (this.focalDevice == null) + this.focalDevice = new ArrayList(); + this.focalDevice.add(t); + return t; + } + + // syntactic sugar + public Procedure addFocalDevice(ProcedureFocalDeviceComponent t) { //3 + if (t == null) + return this; + if (this.focalDevice == null) + this.focalDevice = new ArrayList(); + this.focalDevice.add(t); + return this; + } + + /** + * @return {@link #used} (Identifies medications, devices and any other substance used as part of the procedure.) + */ + public List getUsed() { + if (this.used == null) + this.used = new ArrayList(); + return this.used; + } + + public boolean hasUsed() { + if (this.used == null) + return false; + for (Reference item : this.used) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #used} (Identifies medications, devices and any other substance used as part of the procedure.) + */ + // syntactic sugar + public Reference addUsed() { //3 + Reference t = new Reference(); + if (this.used == null) + this.used = new ArrayList(); + this.used.add(t); + return t; + } + + // syntactic sugar + public Procedure addUsed(Reference t) { //3 + if (t == null) + return this; + if (this.used == null) + this.used = new ArrayList(); + this.used.add(t); + return this; + } + + /** + * @return {@link #used} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies medications, devices and any other substance used as part of the procedure.) + */ + public List getUsedTarget() { + if (this.usedTarget == null) + this.usedTarget = new ArrayList(); + return this.usedTarget; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Group)", "The person, animal or group on which the procedure was performed.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("status", "code", "A code specifying the state of the procedure. Generally this will be in-progress or completed state.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the procedure for searching, sorting and display purposes (e.g. \"Surgical Procedure\").", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("code", "CodeableConcept", "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \"Laparoscopic Appendectomy\").", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("notPerformed", "boolean", "Set this to true if the record is saying that the procedure was NOT performed.", 0, java.lang.Integer.MAX_VALUE, notPerformed)); + childrenList.add(new Property("reasonNotPerformed", "CodeableConcept", "A code indicating why the procedure was not performed.", 0, java.lang.Integer.MAX_VALUE, reasonNotPerformed)); + childrenList.add(new Property("bodySite", "CodeableConcept", "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("performer", "", "Limited to 'real' people rather than equipment.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("performed[x]", "dateTime|Period", "The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, java.lang.Integer.MAX_VALUE, performed)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter during which the procedure was performed.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("location", "Reference(Location)", "The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("outcome", "CodeableConcept", "The outcome of the procedure - did it resolve reasons for the procedure being performed?", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("report", "Reference(DiagnosticReport)", "This could be a histology result, pathology report, surgical report, etc..", 0, java.lang.Integer.MAX_VALUE, report)); + childrenList.add(new Property("complication", "CodeableConcept", "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", 0, java.lang.Integer.MAX_VALUE, complication)); + childrenList.add(new Property("followUp", "CodeableConcept", "If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.", 0, java.lang.Integer.MAX_VALUE, followUp)); + childrenList.add(new Property("request", "Reference(CarePlan|DiagnosticOrder|ProcedureRequest|ReferralRequest)", "A reference to a resource that contains details of the request for this procedure.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("notes", "Annotation", "Any other notes about the procedure. E.g. the operative notes.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("focalDevice", "", "A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.", 0, java.lang.Integer.MAX_VALUE, focalDevice)); + childrenList.add(new Property("used", "Reference(Device|Medication|Substance)", "Identifies medications, devices and any other substance used as part of the procedure.", 0, java.lang.Integer.MAX_VALUE, used)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new ProcedureStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("notPerformed")) + this.notPerformed = castToBoolean(value); // BooleanType + else if (name.equals("reasonNotPerformed")) + this.getReasonNotPerformed().add(castToCodeableConcept(value)); + else if (name.equals("bodySite")) + this.getBodySite().add(castToCodeableConcept(value)); + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("performer")) + this.getPerformer().add((ProcedurePerformerComponent) value); + else if (name.equals("performed[x]")) + this.performed = (Type) value; // Type + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("report")) + this.getReport().add(castToReference(value)); + else if (name.equals("complication")) + this.getComplication().add(castToCodeableConcept(value)); + else if (name.equals("followUp")) + this.getFollowUp().add(castToCodeableConcept(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("notes")) + this.getNotes().add(castToAnnotation(value)); + else if (name.equals("focalDevice")) + this.getFocalDevice().add((ProcedureFocalDeviceComponent) value); + else if (name.equals("used")) + this.getUsed().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Procedure.status"); + } + else if (name.equals("category")) { + this.category = new CodeableConcept(); + return this.category; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("notPerformed")) { + throw new FHIRException("Cannot call addChild on a primitive type Procedure.notPerformed"); + } + else if (name.equals("reasonNotPerformed")) { + return addReasonNotPerformed(); + } + else if (name.equals("bodySite")) { + return addBodySite(); + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("performer")) { + return addPerformer(); + } + else if (name.equals("performedDateTime")) { + this.performed = new DateTimeType(); + return this.performed; + } + else if (name.equals("performedPeriod")) { + this.performed = new Period(); + return this.performed; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("outcome")) { + this.outcome = new CodeableConcept(); + return this.outcome; + } + else if (name.equals("report")) { + return addReport(); + } + else if (name.equals("complication")) { + return addComplication(); + } + else if (name.equals("followUp")) { + return addFollowUp(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("notes")) { + return addNotes(); + } + else if (name.equals("focalDevice")) { + return addFocalDevice(); + } + else if (name.equals("used")) { + return addUsed(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Procedure"; + + } + + public Procedure copy() { + Procedure dst = new Procedure(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.status = status == null ? null : status.copy(); + dst.category = category == null ? null : category.copy(); + dst.code = code == null ? null : code.copy(); + dst.notPerformed = notPerformed == null ? null : notPerformed.copy(); + if (reasonNotPerformed != null) { + dst.reasonNotPerformed = new ArrayList(); + for (CodeableConcept i : reasonNotPerformed) + dst.reasonNotPerformed.add(i.copy()); + }; + if (bodySite != null) { + dst.bodySite = new ArrayList(); + for (CodeableConcept i : bodySite) + dst.bodySite.add(i.copy()); + }; + dst.reason = reason == null ? null : reason.copy(); + if (performer != null) { + dst.performer = new ArrayList(); + for (ProcedurePerformerComponent i : performer) + dst.performer.add(i.copy()); + }; + dst.performed = performed == null ? null : performed.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.location = location == null ? null : location.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + if (report != null) { + dst.report = new ArrayList(); + for (Reference i : report) + dst.report.add(i.copy()); + }; + if (complication != null) { + dst.complication = new ArrayList(); + for (CodeableConcept i : complication) + dst.complication.add(i.copy()); + }; + if (followUp != null) { + dst.followUp = new ArrayList(); + for (CodeableConcept i : followUp) + dst.followUp.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + if (notes != null) { + dst.notes = new ArrayList(); + for (Annotation i : notes) + dst.notes.add(i.copy()); + }; + if (focalDevice != null) { + dst.focalDevice = new ArrayList(); + for (ProcedureFocalDeviceComponent i : focalDevice) + dst.focalDevice.add(i.copy()); + }; + if (used != null) { + dst.used = new ArrayList(); + for (Reference i : used) + dst.used.add(i.copy()); + }; + return dst; + } + + protected Procedure typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Procedure)) + return false; + Procedure o = (Procedure) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(status, o.status, true) + && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) && compareDeep(notPerformed, o.notPerformed, true) + && compareDeep(reasonNotPerformed, o.reasonNotPerformed, true) && compareDeep(bodySite, o.bodySite, true) + && compareDeep(reason, o.reason, true) && compareDeep(performer, o.performer, true) && compareDeep(performed, o.performed, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(location, o.location, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(report, o.report, true) && compareDeep(complication, o.complication, true) && compareDeep(followUp, o.followUp, true) + && compareDeep(request, o.request, true) && compareDeep(notes, o.notes, true) && compareDeep(focalDevice, o.focalDevice, true) + && compareDeep(used, o.used, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Procedure)) + return false; + Procedure o = (Procedure) other; + return compareValues(status, o.status, true) && compareValues(notPerformed, o.notPerformed, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) + && (status == null || status.isEmpty()) && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) + && (notPerformed == null || notPerformed.isEmpty()) && (reasonNotPerformed == null || reasonNotPerformed.isEmpty()) + && (bodySite == null || bodySite.isEmpty()) && (reason == null || reason.isEmpty()) && (performer == null || performer.isEmpty()) + && (performed == null || performed.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (location == null || location.isEmpty()) && (outcome == null || outcome.isEmpty()) && (report == null || report.isEmpty()) + && (complication == null || complication.isEmpty()) && (followUp == null || followUp.isEmpty()) + && (request == null || request.isEmpty()) && (notes == null || notes.isEmpty()) && (focalDevice == null || focalDevice.isEmpty()) + && (used == null || used.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Procedure; + } + + @SearchParamDefinition(name="date", path="Procedure.performed[x]", description="Date/Period the procedure was performed", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Procedure.identifier", description="A unique identifier for a procedure", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="Procedure.code", description="A code to identify a procedure", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="performer", path="Procedure.performer.actor", description="The reference to the practitioner", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="subject", path="Procedure.subject", description="Search by subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Procedure.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="location", path="Procedure.location", description="Where the procedure happened", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="encounter", path="Procedure.encounter", description="The encounter associated with the procedure", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcedureRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcedureRequest.java new file mode 100644 index 00000000000..21cb52bd9de --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcedureRequest.java @@ -0,0 +1,1332 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A request for a procedure to be performed. May be a proposal or an order. + */ +@ResourceDef(name="ProcedureRequest", profile="http://hl7.org/fhir/Profile/ProcedureRequest") +public class ProcedureRequest extends DomainResource { + + public enum ProcedureRequestStatus { + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request is in preliminary form, prior to being requested. + */ + DRAFT, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The receiving system has received the request but not yet decided whether it will be performed. + */ + RECEIVED, + /** + * The receiving system has accepted the request, but work has not yet commenced. + */ + ACCEPTED, + /** + * The work to fulfill the request is happening. + */ + INPROGRESS, + /** + * The work has been completed, the report(s) released, and no further work is planned. + */ + COMPLETED, + /** + * The request has been held by originating system/user request. + */ + SUSPENDED, + /** + * The receiving system has declined to fulfill the request. + */ + REJECTED, + /** + * The request was attempted, but due to some procedural error, it could not be completed. + */ + ABORTED, + /** + * added to help the parsers + */ + NULL; + public static ProcedureRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("aborted".equals(codeString)) + return ABORTED; + throw new FHIRException("Unknown ProcedureRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case SUSPENDED: return "suspended"; + case REJECTED: return "rejected"; + case ABORTED: return "aborted"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/procedure-request-status"; + case DRAFT: return "http://hl7.org/fhir/procedure-request-status"; + case REQUESTED: return "http://hl7.org/fhir/procedure-request-status"; + case RECEIVED: return "http://hl7.org/fhir/procedure-request-status"; + case ACCEPTED: return "http://hl7.org/fhir/procedure-request-status"; + case INPROGRESS: return "http://hl7.org/fhir/procedure-request-status"; + case COMPLETED: return "http://hl7.org/fhir/procedure-request-status"; + case SUSPENDED: return "http://hl7.org/fhir/procedure-request-status"; + case REJECTED: return "http://hl7.org/fhir/procedure-request-status"; + case ABORTED: return "http://hl7.org/fhir/procedure-request-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case DRAFT: return "The request is in preliminary form, prior to being requested."; + case REQUESTED: return "The request has been placed."; + case RECEIVED: return "The receiving system has received the request but not yet decided whether it will be performed."; + case ACCEPTED: return "The receiving system has accepted the request, but work has not yet commenced."; + case INPROGRESS: return "The work to fulfill the request is happening."; + case COMPLETED: return "The work has been completed, the report(s) released, and no further work is planned."; + case SUSPENDED: return "The request has been held by originating system/user request."; + case REJECTED: return "The receiving system has declined to fulfill the request."; + case ABORTED: return "The request was attempted, but due to some procedural error, it could not be completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case DRAFT: return "Draft"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case SUSPENDED: return "Suspended"; + case REJECTED: return "Rejected"; + case ABORTED: return "Aborted"; + default: return "?"; + } + } + } + + public static class ProcedureRequestStatusEnumFactory implements EnumFactory { + public ProcedureRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return ProcedureRequestStatus.PROPOSED; + if ("draft".equals(codeString)) + return ProcedureRequestStatus.DRAFT; + if ("requested".equals(codeString)) + return ProcedureRequestStatus.REQUESTED; + if ("received".equals(codeString)) + return ProcedureRequestStatus.RECEIVED; + if ("accepted".equals(codeString)) + return ProcedureRequestStatus.ACCEPTED; + if ("in-progress".equals(codeString)) + return ProcedureRequestStatus.INPROGRESS; + if ("completed".equals(codeString)) + return ProcedureRequestStatus.COMPLETED; + if ("suspended".equals(codeString)) + return ProcedureRequestStatus.SUSPENDED; + if ("rejected".equals(codeString)) + return ProcedureRequestStatus.REJECTED; + if ("aborted".equals(codeString)) + return ProcedureRequestStatus.ABORTED; + throw new IllegalArgumentException("Unknown ProcedureRequestStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.PROPOSED); + if ("draft".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.DRAFT); + if ("requested".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.RECEIVED); + if ("accepted".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.ACCEPTED); + if ("in-progress".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.COMPLETED); + if ("suspended".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.SUSPENDED); + if ("rejected".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.REJECTED); + if ("aborted".equals(codeString)) + return new Enumeration(this, ProcedureRequestStatus.ABORTED); + throw new FHIRException("Unknown ProcedureRequestStatus code '"+codeString+"'"); + } + public String toCode(ProcedureRequestStatus code) { + if (code == ProcedureRequestStatus.PROPOSED) + return "proposed"; + if (code == ProcedureRequestStatus.DRAFT) + return "draft"; + if (code == ProcedureRequestStatus.REQUESTED) + return "requested"; + if (code == ProcedureRequestStatus.RECEIVED) + return "received"; + if (code == ProcedureRequestStatus.ACCEPTED) + return "accepted"; + if (code == ProcedureRequestStatus.INPROGRESS) + return "in-progress"; + if (code == ProcedureRequestStatus.COMPLETED) + return "completed"; + if (code == ProcedureRequestStatus.SUSPENDED) + return "suspended"; + if (code == ProcedureRequestStatus.REJECTED) + return "rejected"; + if (code == ProcedureRequestStatus.ABORTED) + return "aborted"; + return "?"; + } + } + + public enum ProcedureRequestPriority { + /** + * The request has a normal priority. + */ + ROUTINE, + /** + * The request should be done urgently. + */ + URGENT, + /** + * The request is time-critical. + */ + STAT, + /** + * The request should be acted on as soon as possible. + */ + ASAP, + /** + * added to help the parsers + */ + NULL; + public static ProcedureRequestPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("stat".equals(codeString)) + return STAT; + if ("asap".equals(codeString)) + return ASAP; + throw new FHIRException("Unknown ProcedureRequestPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case STAT: return "stat"; + case ASAP: return "asap"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ROUTINE: return "http://hl7.org/fhir/procedure-request-priority"; + case URGENT: return "http://hl7.org/fhir/procedure-request-priority"; + case STAT: return "http://hl7.org/fhir/procedure-request-priority"; + case ASAP: return "http://hl7.org/fhir/procedure-request-priority"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The request has a normal priority."; + case URGENT: return "The request should be done urgently."; + case STAT: return "The request is time-critical."; + case ASAP: return "The request should be acted on as soon as possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case STAT: return "Stat"; + case ASAP: return "ASAP"; + default: return "?"; + } + } + } + + public static class ProcedureRequestPriorityEnumFactory implements EnumFactory { + public ProcedureRequestPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ProcedureRequestPriority.ROUTINE; + if ("urgent".equals(codeString)) + return ProcedureRequestPriority.URGENT; + if ("stat".equals(codeString)) + return ProcedureRequestPriority.STAT; + if ("asap".equals(codeString)) + return ProcedureRequestPriority.ASAP; + throw new IllegalArgumentException("Unknown ProcedureRequestPriority code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return new Enumeration(this, ProcedureRequestPriority.ROUTINE); + if ("urgent".equals(codeString)) + return new Enumeration(this, ProcedureRequestPriority.URGENT); + if ("stat".equals(codeString)) + return new Enumeration(this, ProcedureRequestPriority.STAT); + if ("asap".equals(codeString)) + return new Enumeration(this, ProcedureRequestPriority.ASAP); + throw new FHIRException("Unknown ProcedureRequestPriority code '"+codeString+"'"); + } + public String toCode(ProcedureRequestPriority code) { + if (code == ProcedureRequestPriority.ROUTINE) + return "routine"; + if (code == ProcedureRequestPriority.URGENT) + return "urgent"; + if (code == ProcedureRequestPriority.STAT) + return "stat"; + if (code == ProcedureRequestPriority.ASAP) + return "asap"; + return "?"; + } + } + + /** + * Identifiers assigned to this order by the order or by the receiver. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier for the request", formalDefinition="Identifiers assigned to this order by the order or by the receiver." ) + protected List identifier; + + /** + * The person, animal or group that should receive the procedure. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who the procedure should be done to", formalDefinition="The person, animal or group that should receive the procedure." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The person, animal or group that should receive the procedure.) + */ + protected Resource subjectTarget; + + /** + * The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What procedure to perform", formalDefinition="The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded." ) + protected CodeableConcept code; + + /** + * Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites). + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="What part of body to perform on", formalDefinition="Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites)." ) + protected List bodySite; + + /** + * The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance. + */ + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why procedure should occur", formalDefinition="The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance." ) + protected Type reason; + + /** + * The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". + */ + @Child(name = "scheduled", type = {DateTimeType.class, Period.class, Timing.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When procedure should occur", formalDefinition="The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"." ) + protected Type scheduled; + + /** + * The encounter within which the procedure proposal or request was created. + */ + @Child(name = "encounter", type = {Encounter.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Encounter request created during", formalDefinition="The encounter within which the procedure proposal or request was created." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter within which the procedure proposal or request was created.) + */ + protected Encounter encounterTarget; + + /** + * For example, the surgeon, anaethetist, endoscopist, etc. + */ + @Child(name = "performer", type = {Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who should perform the procedure", formalDefinition="For example, the surgeon, anaethetist, endoscopist, etc." ) + protected Reference performer; + + /** + * The actual object that is the target of the reference (For example, the surgeon, anaethetist, endoscopist, etc.) + */ + protected Resource performerTarget; + + /** + * The status of the order. + */ + @Child(name = "status", type = {CodeType.class}, order=8, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | requested | received | accepted | in-progress | completed | suspended | rejected | aborted", formalDefinition="The status of the order." ) + protected Enumeration status; + + /** + * Any other notes associated with this proposal or order - e.g. provider instructions. + */ + @Child(name = "notes", type = {Annotation.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional information about desired procedure", formalDefinition="Any other notes associated with this proposal or order - e.g. provider instructions." ) + protected List notes; + + /** + * If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. + */ + @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Preconditions for procedure", formalDefinition="If a CodeableConcept is present, it indicates the pre-condition for performing the procedure." ) + protected Type asNeeded; + + /** + * The time when the request was made. + */ + @Child(name = "orderedOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When request was created", formalDefinition="The time when the request was made." ) + protected DateTimeType orderedOn; + + /** + * The healthcare professional responsible for proposing or ordering the procedure. + */ + @Child(name = "orderer", type = {Practitioner.class, Patient.class, RelatedPerson.class, Device.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who made request", formalDefinition="The healthcare professional responsible for proposing or ordering the procedure." ) + protected Reference orderer; + + /** + * The actual object that is the target of the reference (The healthcare professional responsible for proposing or ordering the procedure.) + */ + protected Resource ordererTarget; + + /** + * The clinical priority associated with this order. + */ + @Child(name = "priority", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) + protected Enumeration priority; + + private static final long serialVersionUID = -916650578L; + + /* + * Constructor + */ + public ProcedureRequest() { + super(); + } + + /* + * Constructor + */ + public ProcedureRequest(Reference subject, CodeableConcept code) { + super(); + this.subject = subject; + this.code = code; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order or by the receiver.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order or by the receiver.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ProcedureRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #subject} (The person, animal or group that should receive the procedure.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The person, animal or group that should receive the procedure.) + */ + public ProcedureRequest setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person, animal or group that should receive the procedure.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person, animal or group that should receive the procedure.) + */ + public ProcedureRequest setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #code} (The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.) + */ + public ProcedureRequest setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #bodySite} (Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).) + */ + public List getBodySite() { + if (this.bodySite == null) + this.bodySite = new ArrayList(); + return this.bodySite; + } + + public boolean hasBodySite() { + if (this.bodySite == null) + return false; + for (CodeableConcept item : this.bodySite) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #bodySite} (Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).) + */ + // syntactic sugar + public CodeableConcept addBodySite() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return t; + } + + // syntactic sugar + public ProcedureRequest addBodySite(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return this; + } + + /** + * @return {@link #reason} (The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.) + */ + public ProcedureRequest setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #scheduled} (The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Type getScheduled() { + return this.scheduled; + } + + /** + * @return {@link #scheduled} (The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public DateTimeType getScheduledDateTimeType() throws FHIRException { + if (!(this.scheduled instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (DateTimeType) this.scheduled; + } + + public boolean hasScheduledDateTimeType() { + return this.scheduled instanceof DateTimeType; + } + + /** + * @return {@link #scheduled} (The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Period getScheduledPeriod() throws FHIRException { + if (!(this.scheduled instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (Period) this.scheduled; + } + + public boolean hasScheduledPeriod() { + return this.scheduled instanceof Period; + } + + /** + * @return {@link #scheduled} (The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public Timing getScheduledTiming() throws FHIRException { + if (!(this.scheduled instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.scheduled.getClass().getName()+" was encountered"); + return (Timing) this.scheduled; + } + + public boolean hasScheduledTiming() { + return this.scheduled instanceof Timing; + } + + public boolean hasScheduled() { + return this.scheduled != null && !this.scheduled.isEmpty(); + } + + /** + * @param value {@link #scheduled} (The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".) + */ + public ProcedureRequest setScheduled(Type value) { + this.scheduled = value; + return this; + } + + /** + * @return {@link #encounter} (The encounter within which the procedure proposal or request was created.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter within which the procedure proposal or request was created.) + */ + public ProcedureRequest setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter within which the procedure proposal or request was created.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter within which the procedure proposal or request was created.) + */ + public ProcedureRequest setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #performer} (For example, the surgeon, anaethetist, endoscopist, etc.) + */ + public Reference getPerformer() { + if (this.performer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.performer"); + else if (Configuration.doAutoCreate()) + this.performer = new Reference(); // cc + return this.performer; + } + + public boolean hasPerformer() { + return this.performer != null && !this.performer.isEmpty(); + } + + /** + * @param value {@link #performer} (For example, the surgeon, anaethetist, endoscopist, etc.) + */ + public ProcedureRequest setPerformer(Reference value) { + this.performer = value; + return this; + } + + /** + * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For example, the surgeon, anaethetist, endoscopist, etc.) + */ + public Resource getPerformerTarget() { + return this.performerTarget; + } + + /** + * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (For example, the surgeon, anaethetist, endoscopist, etc.) + */ + public ProcedureRequest setPerformerTarget(Resource value) { + this.performerTarget = value; + return this; + } + + /** + * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ProcedureRequestStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ProcedureRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the order. + */ + public ProcedureRequestStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the order. + */ + public ProcedureRequest setStatus(ProcedureRequestStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new ProcedureRequestStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #notes} (Any other notes associated with this proposal or order - e.g. provider instructions.) + */ + public List getNotes() { + if (this.notes == null) + this.notes = new ArrayList(); + return this.notes; + } + + public boolean hasNotes() { + if (this.notes == null) + return false; + for (Annotation item : this.notes) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notes} (Any other notes associated with this proposal or order - e.g. provider instructions.) + */ + // syntactic sugar + public Annotation addNotes() { //3 + Annotation t = new Annotation(); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return t; + } + + // syntactic sugar + public ProcedureRequest addNotes(Annotation t) { //3 + if (t == null) + return this; + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return this; + } + + /** + * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.) + */ + public Type getAsNeeded() { + return this.asNeeded; + } + + /** + * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.) + */ + public BooleanType getAsNeededBooleanType() throws FHIRException { + if (!(this.asNeeded instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (BooleanType) this.asNeeded; + } + + public boolean hasAsNeededBooleanType() { + return this.asNeeded instanceof BooleanType; + } + + /** + * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.) + */ + public CodeableConcept getAsNeededCodeableConcept() throws FHIRException { + if (!(this.asNeeded instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.asNeeded.getClass().getName()+" was encountered"); + return (CodeableConcept) this.asNeeded; + } + + public boolean hasAsNeededCodeableConcept() { + return this.asNeeded instanceof CodeableConcept; + } + + public boolean hasAsNeeded() { + return this.asNeeded != null && !this.asNeeded.isEmpty(); + } + + /** + * @param value {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.) + */ + public ProcedureRequest setAsNeeded(Type value) { + this.asNeeded = value; + return this; + } + + /** + * @return {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value + */ + public DateTimeType getOrderedOnElement() { + if (this.orderedOn == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.orderedOn"); + else if (Configuration.doAutoCreate()) + this.orderedOn = new DateTimeType(); // bb + return this.orderedOn; + } + + public boolean hasOrderedOnElement() { + return this.orderedOn != null && !this.orderedOn.isEmpty(); + } + + public boolean hasOrderedOn() { + return this.orderedOn != null && !this.orderedOn.isEmpty(); + } + + /** + * @param value {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value + */ + public ProcedureRequest setOrderedOnElement(DateTimeType value) { + this.orderedOn = value; + return this; + } + + /** + * @return The time when the request was made. + */ + public Date getOrderedOn() { + return this.orderedOn == null ? null : this.orderedOn.getValue(); + } + + /** + * @param value The time when the request was made. + */ + public ProcedureRequest setOrderedOn(Date value) { + if (value == null) + this.orderedOn = null; + else { + if (this.orderedOn == null) + this.orderedOn = new DateTimeType(); + this.orderedOn.setValue(value); + } + return this; + } + + /** + * @return {@link #orderer} (The healthcare professional responsible for proposing or ordering the procedure.) + */ + public Reference getOrderer() { + if (this.orderer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.orderer"); + else if (Configuration.doAutoCreate()) + this.orderer = new Reference(); // cc + return this.orderer; + } + + public boolean hasOrderer() { + return this.orderer != null && !this.orderer.isEmpty(); + } + + /** + * @param value {@link #orderer} (The healthcare professional responsible for proposing or ordering the procedure.) + */ + public ProcedureRequest setOrderer(Reference value) { + this.orderer = value; + return this; + } + + /** + * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for proposing or ordering the procedure.) + */ + public Resource getOrdererTarget() { + return this.ordererTarget; + } + + /** + * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for proposing or ordering the procedure.) + */ + public ProcedureRequest setOrdererTarget(Resource value) { + this.ordererTarget = value; + return this; + } + + /** + * @return {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureRequest.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Enumeration(new ProcedureRequestPriorityEnumFactory()); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public ProcedureRequest setPriorityElement(Enumeration value) { + this.priority = value; + return this; + } + + /** + * @return The clinical priority associated with this order. + */ + public ProcedureRequestPriority getPriority() { + return this.priority == null ? null : this.priority.getValue(); + } + + /** + * @param value The clinical priority associated with this order. + */ + public ProcedureRequest setPriority(ProcedureRequestPriority value) { + if (value == null) + this.priority = null; + else { + if (this.priority == null) + this.priority = new Enumeration(new ProcedureRequestPriorityEnumFactory()); + this.priority.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order or by the receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("subject", "Reference(Patient|Group)", "The person, animal or group that should receive the procedure.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("code", "CodeableConcept", "The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("bodySite", "CodeableConcept", "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("scheduled[x]", "dateTime|Period|Timing", "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".", 0, java.lang.Integer.MAX_VALUE, scheduled)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the procedure proposal or request was created.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("performer", "Reference(Practitioner|Organization|Patient|RelatedPerson)", "For example, the surgeon, anaethetist, endoscopist, etc.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("notes", "Annotation", "Any other notes associated with this proposal or order - e.g. provider instructions.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.", 0, java.lang.Integer.MAX_VALUE, asNeeded)); + childrenList.add(new Property("orderedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, orderedOn)); + childrenList.add(new Property("orderer", "Reference(Practitioner|Patient|RelatedPerson|Device)", "The healthcare professional responsible for proposing or ordering the procedure.", 0, java.lang.Integer.MAX_VALUE, orderer)); + childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("bodySite")) + this.getBodySite().add(castToCodeableConcept(value)); + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("scheduled[x]")) + this.scheduled = (Type) value; // Type + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("performer")) + this.performer = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new ProcedureRequestStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("notes")) + this.getNotes().add(castToAnnotation(value)); + else if (name.equals("asNeeded[x]")) + this.asNeeded = (Type) value; // Type + else if (name.equals("orderedOn")) + this.orderedOn = castToDateTime(value); // DateTimeType + else if (name.equals("orderer")) + this.orderer = castToReference(value); // Reference + else if (name.equals("priority")) + this.priority = new ProcedureRequestPriorityEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("bodySite")) { + return addBodySite(); + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("scheduledDateTime")) { + this.scheduled = new DateTimeType(); + return this.scheduled; + } + else if (name.equals("scheduledPeriod")) { + this.scheduled = new Period(); + return this.scheduled; + } + else if (name.equals("scheduledTiming")) { + this.scheduled = new Timing(); + return this.scheduled; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("performer")) { + this.performer = new Reference(); + return this.performer; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcedureRequest.status"); + } + else if (name.equals("notes")) { + return addNotes(); + } + else if (name.equals("asNeededBoolean")) { + this.asNeeded = new BooleanType(); + return this.asNeeded; + } + else if (name.equals("asNeededCodeableConcept")) { + this.asNeeded = new CodeableConcept(); + return this.asNeeded; + } + else if (name.equals("orderedOn")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcedureRequest.orderedOn"); + } + else if (name.equals("orderer")) { + this.orderer = new Reference(); + return this.orderer; + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcedureRequest.priority"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ProcedureRequest"; + + } + + public ProcedureRequest copy() { + ProcedureRequest dst = new ProcedureRequest(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.code = code == null ? null : code.copy(); + if (bodySite != null) { + dst.bodySite = new ArrayList(); + for (CodeableConcept i : bodySite) + dst.bodySite.add(i.copy()); + }; + dst.reason = reason == null ? null : reason.copy(); + dst.scheduled = scheduled == null ? null : scheduled.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.performer = performer == null ? null : performer.copy(); + dst.status = status == null ? null : status.copy(); + if (notes != null) { + dst.notes = new ArrayList(); + for (Annotation i : notes) + dst.notes.add(i.copy()); + }; + dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); + dst.orderedOn = orderedOn == null ? null : orderedOn.copy(); + dst.orderer = orderer == null ? null : orderer.copy(); + dst.priority = priority == null ? null : priority.copy(); + return dst; + } + + protected ProcedureRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureRequest)) + return false; + ProcedureRequest o = (ProcedureRequest) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(code, o.code, true) + && compareDeep(bodySite, o.bodySite, true) && compareDeep(reason, o.reason, true) && compareDeep(scheduled, o.scheduled, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(performer, o.performer, true) && compareDeep(status, o.status, true) + && compareDeep(notes, o.notes, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(orderedOn, o.orderedOn, true) + && compareDeep(orderer, o.orderer, true) && compareDeep(priority, o.priority, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureRequest)) + return false; + ProcedureRequest o = (ProcedureRequest) other; + return compareValues(status, o.status, true) && compareValues(orderedOn, o.orderedOn, true) && compareValues(priority, o.priority, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) + && (code == null || code.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (reason == null || reason.isEmpty()) + && (scheduled == null || scheduled.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (performer == null || performer.isEmpty()) && (status == null || status.isEmpty()) && (notes == null || notes.isEmpty()) + && (asNeeded == null || asNeeded.isEmpty()) && (orderedOn == null || orderedOn.isEmpty()) + && (orderer == null || orderer.isEmpty()) && (priority == null || priority.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ProcedureRequest; + } + + @SearchParamDefinition(name="identifier", path="ProcedureRequest.identifier", description="A unique identifier of the Procedure Request", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="performer", path="ProcedureRequest.performer", description="Who should perform the procedure", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="subject", path="ProcedureRequest.subject", description="Search by subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="ProcedureRequest.subject", description="Search by subject - a patient", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="orderer", path="ProcedureRequest.orderer", description="Who made request", type="reference" ) + public static final String SP_ORDERER = "orderer"; + @SearchParamDefinition(name="encounter", path="ProcedureRequest.encounter", description="Encounter request created during", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessRequest.java new file mode 100644 index 00000000000..0af2f956bca --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessRequest.java @@ -0,0 +1,1329 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ +@ResourceDef(name="ProcessRequest", profile="http://hl7.org/fhir/Profile/ProcessRequest") +public class ProcessRequest extends DomainResource { + + public enum ActionList { + /** + * Cancel, reverse or nullify the target resource. + */ + CANCEL, + /** + * Check for previously un-read/ not-retrieved resources. + */ + POLL, + /** + * Re-process the target resource. + */ + REPROCESS, + /** + * Retrieve the processing status of the target resource. + */ + STATUS, + /** + * added to help the parsers + */ + NULL; + public static ActionList fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return CANCEL; + if ("poll".equals(codeString)) + return POLL; + if ("reprocess".equals(codeString)) + return REPROCESS; + if ("status".equals(codeString)) + return STATUS; + throw new FHIRException("Unknown ActionList code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANCEL: return "cancel"; + case POLL: return "poll"; + case REPROCESS: return "reprocess"; + case STATUS: return "status"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CANCEL: return "http://hl7.org/fhir/actionlist"; + case POLL: return "http://hl7.org/fhir/actionlist"; + case REPROCESS: return "http://hl7.org/fhir/actionlist"; + case STATUS: return "http://hl7.org/fhir/actionlist"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CANCEL: return "Cancel, reverse or nullify the target resource."; + case POLL: return "Check for previously un-read/ not-retrieved resources."; + case REPROCESS: return "Re-process the target resource."; + case STATUS: return "Retrieve the processing status of the target resource."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANCEL: return "Cancel, Reverse or Nullify"; + case POLL: return "Poll"; + case REPROCESS: return "Re-Process"; + case STATUS: return "Status Check"; + default: return "?"; + } + } + } + + public static class ActionListEnumFactory implements EnumFactory { + public ActionList fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return ActionList.CANCEL; + if ("poll".equals(codeString)) + return ActionList.POLL; + if ("reprocess".equals(codeString)) + return ActionList.REPROCESS; + if ("status".equals(codeString)) + return ActionList.STATUS; + throw new IllegalArgumentException("Unknown ActionList code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return new Enumeration(this, ActionList.CANCEL); + if ("poll".equals(codeString)) + return new Enumeration(this, ActionList.POLL); + if ("reprocess".equals(codeString)) + return new Enumeration(this, ActionList.REPROCESS); + if ("status".equals(codeString)) + return new Enumeration(this, ActionList.STATUS); + throw new FHIRException("Unknown ActionList code '"+codeString+"'"); + } + public String toCode(ActionList code) { + if (code == ActionList.CANCEL) + return "cancel"; + if (code == ActionList.POLL) + return "poll"; + if (code == ActionList.REPROCESS) + return "reprocess"; + if (code == ActionList.STATUS) + return "status"; + return "?"; + } + } + + @Block() + public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A service line number. + */ + @Child(name = "sequenceLinkId", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected IntegerType sequenceLinkId; + + private static final long serialVersionUID = -1598360600L; + + /* + * Constructor + */ + public ItemsComponent() { + super(); + } + + /* + * Constructor + */ + public ItemsComponent(IntegerType sequenceLinkId) { + super(); + this.sequenceLinkId = sequenceLinkId; + } + + /** + * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public IntegerType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new IntegerType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public ItemsComponent setSequenceLinkIdElement(IntegerType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value A service line number. + */ + public ItemsComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new IntegerType(); + this.sequenceLinkId.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequenceLinkId")) + this.sequenceLinkId = castToInteger(value); // IntegerType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequenceLinkId")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.sequenceLinkId"); + } + else + return super.addChild(name); + } + + public ItemsComponent copy() { + ItemsComponent dst = new ItemsComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()); + } + + public String fhirType() { + return "ProcessRequest.item"; + + } + + } + + /** + * The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + @Child(name = "action", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="cancel | poll | reprocess | status", formalDefinition="The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest." ) + protected Enumeration action; + + /** + * The ProcessRequest business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The ProcessRequest business identifier." ) + protected List identifier; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when this resource was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) + protected DateTimeType created; + + /** + * The organization which is the target of the request. + */ + @Child(name = "target", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Target of the request", formalDefinition="The organization which is the target of the request." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The organization which is the target of the request.) + */ + protected Organization targetTarget; + + /** + * The practitioner who is responsible for the action specified in thise request. + */ + @Child(name = "provider", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the action specified in thise request." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the action specified in thise request.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the action speccified in thise request. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the action speccified in thise request." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the action speccified in thise request.) + */ + protected Organization organizationTarget; + + /** + * Reference of resource which is the target or subject of this action. + */ + @Child(name = "request", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Request reference", formalDefinition="Reference of resource which is the target or subject of this action." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Reference of resource which is the target or subject of this action.) + */ + protected Resource requestTarget; + + /** + * Reference of a prior response to resource which is the target or subject of this action. + */ + @Child(name = "response", type = {}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Response reference", formalDefinition="Reference of a prior response to resource which is the target or subject of this action." ) + protected Reference response; + + /** + * The actual object that is the target of the reference (Reference of a prior response to resource which is the target or subject of this action.) + */ + protected Resource responseTarget; + + /** + * If true remove all history excluding audit. + */ + @Child(name = "nullify", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) + protected BooleanType nullify; + + /** + * A reference to supply which authenticates the process. + */ + @Child(name = "reference", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticates the process." ) + protected StringType reference; + + /** + * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. + */ + @Child(name = "item", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) + protected List item; + + /** + * Names of resource types to include. + */ + @Child(name = "include", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) + protected List include; + + /** + * Names of resource types to exclude. + */ + @Child(name = "exclude", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) + protected List exclude; + + /** + * A period of time during which the fulfilling resources would have been created. + */ + @Child(name = "period", type = {Period.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) + protected Period period; + + private static final long serialVersionUID = -1332331220L; + + /* + * Constructor + */ + public ProcessRequest() { + super(); + } + + /* + * Constructor + */ + public ProcessRequest(Enumeration action) { + super(); + this.action = action; + } + + /** + * @return {@link #action} (The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public Enumeration getActionElement() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.action"); + else if (Configuration.doAutoCreate()) + this.action = new Enumeration(new ActionListEnumFactory()); // bb + return this.action; + } + + public boolean hasActionElement() { + return this.action != null && !this.action.isEmpty(); + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public ProcessRequest setActionElement(Enumeration value) { + this.action = value; + return this; + } + + /** + * @return The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + public ActionList getAction() { + return this.action == null ? null : this.action.getValue(); + } + + /** + * @param value The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + public ProcessRequest setAction(ActionList value) { + if (this.action == null) + this.action = new Enumeration(new ActionListEnumFactory()); + this.action.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (The ProcessRequest business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The ProcessRequest business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ProcessRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public ProcessRequest setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public ProcessRequest setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public ProcessRequest setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when this resource was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when this resource was created. + */ + public ProcessRequest setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (The organization which is the target of the request.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The organization which is the target of the request.) + */ + public ProcessRequest setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is the target of the request.) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is the target of the request.) + */ + public ProcessRequest setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public ProcessRequest setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) + */ + public ProcessRequest setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public ProcessRequest setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) + */ + public ProcessRequest setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public ProcessRequest setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) + */ + public ProcessRequest setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Reference getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.response"); + else if (Configuration.doAutoCreate()) + this.response = new Reference(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public ProcessRequest setResponse(Reference value) { + this.response = value; + return this; + } + + /** + * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Resource getResponseTarget() { + return this.responseTarget; + } + + /** + * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) + */ + public ProcessRequest setResponseTarget(Resource value) { + this.responseTarget = value; + return this; + } + + /** + * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value + */ + public BooleanType getNullifyElement() { + if (this.nullify == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.nullify"); + else if (Configuration.doAutoCreate()) + this.nullify = new BooleanType(); // bb + return this.nullify; + } + + public boolean hasNullifyElement() { + return this.nullify != null && !this.nullify.isEmpty(); + } + + public boolean hasNullify() { + return this.nullify != null && !this.nullify.isEmpty(); + } + + /** + * @param value {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value + */ + public ProcessRequest setNullifyElement(BooleanType value) { + this.nullify = value; + return this; + } + + /** + * @return If true remove all history excluding audit. + */ + public boolean getNullify() { + return this.nullify == null || this.nullify.isEmpty() ? false : this.nullify.getValue(); + } + + /** + * @param value If true remove all history excluding audit. + */ + public ProcessRequest setNullify(boolean value) { + if (this.nullify == null) + this.nullify = new BooleanType(); + this.nullify.setValue(value); + return this; + } + + /** + * @return {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public StringType getReferenceElement() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new StringType(); // bb + return this.reference; + } + + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public ProcessRequest setReferenceElement(StringType value) { + this.reference = value; + return this; + } + + /** + * @return A reference to supply which authenticates the process. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value A reference to supply which authenticates the process. + */ + public ProcessRequest setReference(String value) { + if (Utilities.noString(value)) + this.reference = null; + else { + if (this.reference == null) + this.reference = new StringType(); + this.reference.setValue(value); + } + return this; + } + + /** + * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (ItemsComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) + */ + // syntactic sugar + public ItemsComponent addItem() { //3 + ItemsComponent t = new ItemsComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public ProcessRequest addItem(ItemsComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #include} (Names of resource types to include.) + */ + public List getInclude() { + if (this.include == null) + this.include = new ArrayList(); + return this.include; + } + + public boolean hasInclude() { + if (this.include == null) + return false; + for (StringType item : this.include) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #include} (Names of resource types to include.) + */ + // syntactic sugar + public StringType addIncludeElement() {//2 + StringType t = new StringType(); + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return t; + } + + /** + * @param value {@link #include} (Names of resource types to include.) + */ + public ProcessRequest addInclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return this; + } + + /** + * @param value {@link #include} (Names of resource types to include.) + */ + public boolean hasInclude(String value) { + if (this.include == null) + return false; + for (StringType v : this.include) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #exclude} (Names of resource types to exclude.) + */ + public List getExclude() { + if (this.exclude == null) + this.exclude = new ArrayList(); + return this.exclude; + } + + public boolean hasExclude() { + if (this.exclude == null) + return false; + for (StringType item : this.exclude) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #exclude} (Names of resource types to exclude.) + */ + // syntactic sugar + public StringType addExcludeElement() {//2 + StringType t = new StringType(); + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return t; + } + + /** + * @param value {@link #exclude} (Names of resource types to exclude.) + */ + public ProcessRequest addExclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return this; + } + + /** + * @param value {@link #exclude} (Names of resource types to exclude.) + */ + public boolean hasExclude(String value) { + if (this.exclude == null) + return false; + for (StringType v : this.exclude) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #period} (A period of time during which the fulfilling resources would have been created.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (A period of time during which the fulfilling resources would have been created.) + */ + public ProcessRequest setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "code", "The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("identifier", "Identifier", "The ProcessRequest business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "The organization which is the target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the action specified in thise request.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the action speccified in thise request.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("request", "Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "Reference(Any)", "Reference of a prior response to resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); + childrenList.add(new Property("reference", "string", "A reference to supply which authenticates the process.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("item", "", "List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("include", "string", "Names of resource types to include.", 0, java.lang.Integer.MAX_VALUE, include)); + childrenList.add(new Property("exclude", "string", "Names of resource types to exclude.", 0, java.lang.Integer.MAX_VALUE, exclude)); + childrenList.add(new Property("period", "Period", "A period of time during which the fulfilling resources would have been created.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("action")) + this.action = new ActionListEnumFactory().fromType(value); // Enumeration + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("target")) + this.target = castToReference(value); // Reference + else if (name.equals("provider")) + this.provider = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("response")) + this.response = castToReference(value); // Reference + else if (name.equals("nullify")) + this.nullify = castToBoolean(value); // BooleanType + else if (name.equals("reference")) + this.reference = castToString(value); // StringType + else if (name.equals("item")) + this.getItem().add((ItemsComponent) value); + else if (name.equals("include")) + this.getInclude().add(castToString(value)); + else if (name.equals("exclude")) + this.getExclude().add(castToString(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("action")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.action"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.created"); + } + else if (name.equals("target")) { + this.target = new Reference(); + return this.target; + } + else if (name.equals("provider")) { + this.provider = new Reference(); + return this.provider; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("response")) { + this.response = new Reference(); + return this.response; + } + else if (name.equals("nullify")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.nullify"); + } + else if (name.equals("reference")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.reference"); + } + else if (name.equals("item")) { + return addItem(); + } + else if (name.equals("include")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.include"); + } + else if (name.equals("exclude")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.exclude"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ProcessRequest"; + + } + + public ProcessRequest copy() { + ProcessRequest dst = new ProcessRequest(); + copyValues(dst); + dst.action = action == null ? null : action.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + dst.nullify = nullify == null ? null : nullify.copy(); + dst.reference = reference == null ? null : reference.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (ItemsComponent i : item) + dst.item.add(i.copy()); + }; + if (include != null) { + dst.include = new ArrayList(); + for (StringType i : include) + dst.include.add(i.copy()); + }; + if (exclude != null) { + dst.exclude = new ArrayList(); + for (StringType i : exclude) + dst.exclude.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected ProcessRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcessRequest)) + return false; + ProcessRequest o = (ProcessRequest) other; + return compareDeep(action, o.action, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) + && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) + && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) && compareDeep(nullify, o.nullify, true) + && compareDeep(reference, o.reference, true) && compareDeep(item, o.item, true) && compareDeep(include, o.include, true) + && compareDeep(exclude, o.exclude, true) && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcessRequest)) + return false; + ProcessRequest o = (ProcessRequest) other; + return compareValues(action, o.action, true) && compareValues(created, o.created, true) && compareValues(nullify, o.nullify, true) + && compareValues(reference, o.reference, true) && compareValues(include, o.include, true) && compareValues(exclude, o.exclude, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) + && (organization == null || organization.isEmpty()) && (request == null || request.isEmpty()) + && (response == null || response.isEmpty()) && (nullify == null || nullify.isEmpty()) && (reference == null || reference.isEmpty()) + && (item == null || item.isEmpty()) && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) + && (period == null || period.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ProcessRequest; + } + + @SearchParamDefinition(name="identifier", path="ProcessRequest.identifier", description="The business identifier of the ProcessRequest", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="provider", path="ProcessRequest.provider", description="The provider who regenerated this request", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="organization", path="ProcessRequest.organization", description="The organization who generated this request", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="action", path="ProcessRequest.action", description="The action requested by this resource", type="token" ) + public static final String SP_ACTION = "action"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessResponse.java new file mode 100644 index 00000000000..033015d4f3f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ProcessResponse.java @@ -0,0 +1,1016 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This resource provides processing status, errors and notes from the processing of a resource. + */ +@ResourceDef(name="ProcessResponse", profile="http://hl7.org/fhir/Profile/ProcessResponse") +public class ProcessResponse extends DomainResource { + + @Block() + public static class ProcessResponseNotesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The note purpose: Print/Display. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) + protected Coding type; + + /** + * The note text. + */ + @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Notes text", formalDefinition="The note text." ) + protected StringType text; + + private static final long serialVersionUID = 129959202L; + + /* + * Constructor + */ + public ProcessResponseNotesComponent() { + super(); + } + + /** + * @return {@link #type} (The note purpose: Print/Display.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponseNotesComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The note purpose: Print/Display.) + */ + public ProcessResponseNotesComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponseNotesComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public ProcessResponseNotesComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return The note text. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value The note text. + */ + public ProcessResponseNotesComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("text")) + this.text = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.text"); + } + else + return super.addChild(name); + } + + public ProcessResponseNotesComponent copy() { + ProcessResponseNotesComponent dst = new ProcessResponseNotesComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.text = text == null ? null : text.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcessResponseNotesComponent)) + return false; + ProcessResponseNotesComponent o = (ProcessResponseNotesComponent) other; + return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcessResponseNotesComponent)) + return false; + ProcessResponseNotesComponent o = (ProcessResponseNotesComponent) other; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) + ; + } + + public String fhirType() { + return "ProcessResponse.notes"; + + } + + } + + /** + * The Response business identifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) + protected List identifier; + + /** + * Original request resource reference. + */ + @Child(name = "request", type = {}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Original request resource reference.) + */ + protected Resource requestTarget; + + /** + * Transaction status: error, complete, held. + */ + @Child(name = "outcome", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) + protected Coding outcome; + + /** + * A description of the status of the adjudication or processing. + */ + @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication or processing." ) + protected StringType disposition; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when the enclosed suite of services were performed or completed. + */ + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) + protected DateTimeType created; + + /** + * The organization who produced this adjudicated response. + */ + @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Authoring Organization", formalDefinition="The organization who produced this adjudicated response." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization who produced this adjudicated response.) + */ + protected Organization organizationTarget; + + /** + * The practitioner who is responsible for the services rendered to the patient. + */ + @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible Practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) + protected Reference requestProvider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + */ + protected Practitioner requestProviderTarget; + + /** + * The organization which is responsible for the services rendered to the patient. + */ + @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) + protected Reference requestOrganization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) + */ + protected Organization requestOrganizationTarget; + + /** + * The form to be used for printing the content. + */ + @Child(name = "form", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) + protected Coding form; + + /** + * Suite of processing note or additional requirements is the processing has been held. + */ + @Child(name = "notes", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Notes", formalDefinition="Suite of processing note or additional requirements is the processing has been held." ) + protected List notes; + + /** + * Processing errors. + */ + @Child(name = "error", type = {Coding.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) + protected List error; + + private static final long serialVersionUID = -1668062545L; + + /* + * Constructor + */ + public ProcessResponse() { + super(); + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The Response business identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ProcessResponse addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Original request resource reference.) + */ + public ProcessResponse setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) + */ + public ProcessResponse setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #outcome} (Transaction status: error, complete, held.) + */ + public Coding getOutcome() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new Coding(); // cc + return this.outcome; + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Transaction status: error, complete, held.) + */ + public ProcessResponse setOutcome(Coding value) { + this.outcome = value; + return this; + } + + /** + * @return {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public StringType getDispositionElement() { + if (this.disposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.disposition"); + else if (Configuration.doAutoCreate()) + this.disposition = new StringType(); // bb + return this.disposition; + } + + public boolean hasDispositionElement() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + public boolean hasDisposition() { + return this.disposition != null && !this.disposition.isEmpty(); + } + + /** + * @param value {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value + */ + public ProcessResponse setDispositionElement(StringType value) { + this.disposition = value; + return this; + } + + /** + * @return A description of the status of the adjudication or processing. + */ + public String getDisposition() { + return this.disposition == null ? null : this.disposition.getValue(); + } + + /** + * @param value A description of the status of the adjudication or processing. + */ + public ProcessResponse setDisposition(String value) { + if (Utilities.noString(value)) + this.disposition = null; + else { + if (this.disposition == null) + this.disposition = new StringType(); + this.disposition.setValue(value); + } + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public ProcessResponse setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public ProcessResponse setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public ProcessResponse setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when the enclosed suite of services were performed or completed. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when the enclosed suite of services were performed or completed. + */ + public ProcessResponse setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + + /** + * @return {@link #organization} (The organization who produced this adjudicated response.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization who produced this adjudicated response.) + */ + public ProcessResponse setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who produced this adjudicated response.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who produced this adjudicated response.) + */ + public ProcessResponse setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProvider() { + if (this.requestProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProvider = new Reference(); // cc + return this.requestProvider; + } + + public boolean hasRequestProvider() { + return this.requestProvider != null && !this.requestProvider.isEmpty(); + } + + /** + * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public ProcessResponse setRequestProvider(Reference value) { + this.requestProvider = value; + return this; + } + + /** + * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public Practitioner getRequestProviderTarget() { + if (this.requestProviderTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); + else if (Configuration.doAutoCreate()) + this.requestProviderTarget = new Practitioner(); // aa + return this.requestProviderTarget; + } + + /** + * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + */ + public ProcessResponse setRequestProviderTarget(Practitioner value) { + this.requestProviderTarget = value; + return this; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganization() { + if (this.requestOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganization = new Reference(); // cc + return this.requestOrganization; + } + + public boolean hasRequestOrganization() { + return this.requestOrganization != null && !this.requestOrganization.isEmpty(); + } + + /** + * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public ProcessResponse setRequestOrganization(Reference value) { + this.requestOrganization = value; + return this; + } + + /** + * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public Organization getRequestOrganizationTarget() { + if (this.requestOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); + else if (Configuration.doAutoCreate()) + this.requestOrganizationTarget = new Organization(); // aa + return this.requestOrganizationTarget; + } + + /** + * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) + */ + public ProcessResponse setRequestOrganizationTarget(Organization value) { + this.requestOrganizationTarget = value; + return this; + } + + /** + * @return {@link #form} (The form to be used for printing the content.) + */ + public Coding getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessResponse.form"); + else if (Configuration.doAutoCreate()) + this.form = new Coding(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (The form to be used for printing the content.) + */ + public ProcessResponse setForm(Coding value) { + this.form = value; + return this; + } + + /** + * @return {@link #notes} (Suite of processing note or additional requirements is the processing has been held.) + */ + public List getNotes() { + if (this.notes == null) + this.notes = new ArrayList(); + return this.notes; + } + + public boolean hasNotes() { + if (this.notes == null) + return false; + for (ProcessResponseNotesComponent item : this.notes) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notes} (Suite of processing note or additional requirements is the processing has been held.) + */ + // syntactic sugar + public ProcessResponseNotesComponent addNotes() { //3 + ProcessResponseNotesComponent t = new ProcessResponseNotesComponent(); + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return t; + } + + // syntactic sugar + public ProcessResponse addNotes(ProcessResponseNotesComponent t) { //3 + if (t == null) + return this; + if (this.notes == null) + this.notes = new ArrayList(); + this.notes.add(t); + return this; + } + + /** + * @return {@link #error} (Processing errors.) + */ + public List getError() { + if (this.error == null) + this.error = new ArrayList(); + return this.error; + } + + public boolean hasError() { + if (this.error == null) + return false; + for (Coding item : this.error) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #error} (Processing errors.) + */ + // syntactic sugar + public Coding addError() { //3 + Coding t = new Coding(); + if (this.error == null) + this.error = new ArrayList(); + this.error.add(t); + return t; + } + + // syntactic sugar + public ProcessResponse addError(Coding t) { //3 + if (t == null) + return this; + if (this.error == null) + this.error = new ArrayList(); + this.error.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("request", "Reference(Any)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("outcome", "Coding", "Transaction status: error, complete, held.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, java.lang.Integer.MAX_VALUE, disposition)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); + childrenList.add(new Property("notes", "", "Suite of processing note or additional requirements is the processing has been held.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("error", "Coding", "Processing errors.", 0, java.lang.Integer.MAX_VALUE, error)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("request")) + this.request = castToReference(value); // Reference + else if (name.equals("outcome")) + this.outcome = castToCoding(value); // Coding + else if (name.equals("disposition")) + this.disposition = castToString(value); // StringType + else if (name.equals("ruleset")) + this.ruleset = castToCoding(value); // Coding + else if (name.equals("originalRuleset")) + this.originalRuleset = castToCoding(value); // Coding + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("requestProvider")) + this.requestProvider = castToReference(value); // Reference + else if (name.equals("requestOrganization")) + this.requestOrganization = castToReference(value); // Reference + else if (name.equals("form")) + this.form = castToCoding(value); // Coding + else if (name.equals("notes")) + this.getNotes().add((ProcessResponseNotesComponent) value); + else if (name.equals("error")) + this.getError().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("outcome")) { + this.outcome = new Coding(); + return this.outcome; + } + else if (name.equals("disposition")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.disposition"); + } + else if (name.equals("ruleset")) { + this.ruleset = new Coding(); + return this.ruleset; + } + else if (name.equals("originalRuleset")) { + this.originalRuleset = new Coding(); + return this.originalRuleset; + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.created"); + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("requestProvider")) { + this.requestProvider = new Reference(); + return this.requestProvider; + } + else if (name.equals("requestOrganization")) { + this.requestOrganization = new Reference(); + return this.requestOrganization; + } + else if (name.equals("form")) { + this.form = new Coding(); + return this.form; + } + else if (name.equals("notes")) { + return addNotes(); + } + else if (name.equals("error")) { + return addError(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ProcessResponse"; + + } + + public ProcessResponse copy() { + ProcessResponse dst = new ProcessResponse(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.disposition = disposition == null ? null : disposition.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); + dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); + dst.form = form == null ? null : form.copy(); + if (notes != null) { + dst.notes = new ArrayList(); + for (ProcessResponseNotesComponent i : notes) + dst.notes.add(i.copy()); + }; + if (error != null) { + dst.error = new ArrayList(); + for (Coding i : error) + dst.error.add(i.copy()); + }; + return dst; + } + + protected ProcessResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcessResponse)) + return false; + ProcessResponse o = (ProcessResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) + && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(form, o.form, true) + && compareDeep(notes, o.notes, true) && compareDeep(error, o.error, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcessResponse)) + return false; + ProcessResponse o = (ProcessResponse) other; + return compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) + && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) + && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) + && (form == null || form.isEmpty()) && (notes == null || notes.isEmpty()) && (error == null || error.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ProcessResponse; + } + + @SearchParamDefinition(name="identifier", path="ProcessResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="request", path="ProcessResponse.request", description="The reference to the claim", type="reference" ) + public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="organization", path="ProcessResponse.organization", description="The organization who generated this resource", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="requestprovider", path="ProcessResponse.requestProvider", description="The Provider who is responsible the request transaction", type="reference" ) + public static final String SP_REQUESTPROVIDER = "requestprovider"; + @SearchParamDefinition(name="requestorganization", path="ProcessResponse.requestOrganization", description="The Organization who is responsible the request transaction", type="reference" ) + public static final String SP_REQUESTORGANIZATION = "requestorganization"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Property.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Property.java new file mode 100644 index 00000000000..f184f0c47ee --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Property.java @@ -0,0 +1,140 @@ +package org.hl7.fhir.dstu21.model; + +import java.util.ArrayList; +import java.util.List; + +/** + * A child element or property defined by the FHIR specification + * This class is defined as a helper class when iterating the + * children of an element in a generic fashion + * + * At present, iteration is only based on the specification, but + * this may be changed to allow profile based expression at a + * later date + * + * note: there's no point in creating one of these classes outside this package + */ +public class Property { + + /** + * The name of the property as found in the FHIR specification + */ + private String name; + + /** + * The type of the property as specified in the FHIR specification (e.g. type|type|Reference(Name|Name) + */ + private String typeCode; + + /** + * The formal definition of the element given in the FHIR specification + */ + private String definition; + + /** + * The minimum allowed cardinality - 0 or 1 when based on the specification + */ + private int minCardinality; + + /** + * The maximum allowed cardinality - 1 or MAX_INT when based on the specification + */ + private int maxCardinality; + + /** + * The actual elements that exist on this instance + */ + private List values = new ArrayList(); + + /** + * For run time, if/once a property is hooked up to it's definition + */ + private StructureDefinition structure; + + /** + * Internal constructor + */ + public Property(String name, String typeCode, String definition, int minCardinality, int maxCardinality, Base value) { + super(); + this.name = name; + this.typeCode = typeCode; + this.definition = definition; + this.minCardinality = minCardinality; + this.maxCardinality = maxCardinality; + this.values.add(value); + } + + /** + * Internal constructor + */ + public Property(String name, String typeCode, String definition, int minCardinality, int maxCardinality, List values) { + super(); + this.name = name; + this.typeCode = typeCode; + this.definition = definition; + this.minCardinality = minCardinality; + this.maxCardinality = maxCardinality; + if (values != null) + this.values.addAll(values); + } + + /** + * @return The name of this property in the FHIR Specification + */ + public String getName() { + return name; + } + + /** + * @return The stated type in the FHIR specification + */ + public String getTypeCode() { + return typeCode; + } + + /** + * @return The definition of this element in the FHIR spec + */ + public String getDefinition() { + return definition; + } + + /** + * @return the minimum cardinality for this element + */ + public int getMinCardinality() { + return minCardinality; + } + + /** + * @return the maximum cardinality for this element + */ + public int getMaxCardinality() { + return maxCardinality; + } + + /** + * @return the actual values - will only be 1 unless maximum cardinality == MAX_INT + */ + public List getValues() { + return values; + } + + public boolean hasValues() { + for (Base e : getValues()) + if (e != null) + return true; + return false; + } + + public StructureDefinition getStructure() { + return structure; + } + + public void setStructure(StructureDefinition structure) { + this.structure = structure; + } + + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Provenance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Provenance.java new file mode 100644 index 00000000000..1f1e4d7c3ff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Provenance.java @@ -0,0 +1,1627 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ +@ResourceDef(name="Provenance", profile="http://hl7.org/fhir/Profile/Provenance") +public class Provenance extends DomainResource { + + public enum ProvenanceEntityRole { + /** + * A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity. + */ + DERIVATION, + /** + * A derivation for which the resulting entity is a revised version of some original. + */ + REVISION, + /** + * The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author. + */ + QUOTATION, + /** + * A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. + */ + SOURCE, + /** + * added to help the parsers + */ + NULL; + public static ProvenanceEntityRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("derivation".equals(codeString)) + return DERIVATION; + if ("revision".equals(codeString)) + return REVISION; + if ("quotation".equals(codeString)) + return QUOTATION; + if ("source".equals(codeString)) + return SOURCE; + throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DERIVATION: return "derivation"; + case REVISION: return "revision"; + case QUOTATION: return "quotation"; + case SOURCE: return "source"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DERIVATION: return "http://hl7.org/fhir/provenance-entity-role"; + case REVISION: return "http://hl7.org/fhir/provenance-entity-role"; + case QUOTATION: return "http://hl7.org/fhir/provenance-entity-role"; + case SOURCE: return "http://hl7.org/fhir/provenance-entity-role"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DERIVATION: return "A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity."; + case REVISION: return "A derivation for which the resulting entity is a revised version of some original."; + case QUOTATION: return "The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author."; + case SOURCE: return "A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DERIVATION: return "Derivation"; + case REVISION: return "Revision"; + case QUOTATION: return "Quotation"; + case SOURCE: return "Source"; + default: return "?"; + } + } + } + + public static class ProvenanceEntityRoleEnumFactory implements EnumFactory { + public ProvenanceEntityRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("derivation".equals(codeString)) + return ProvenanceEntityRole.DERIVATION; + if ("revision".equals(codeString)) + return ProvenanceEntityRole.REVISION; + if ("quotation".equals(codeString)) + return ProvenanceEntityRole.QUOTATION; + if ("source".equals(codeString)) + return ProvenanceEntityRole.SOURCE; + throw new IllegalArgumentException("Unknown ProvenanceEntityRole code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("derivation".equals(codeString)) + return new Enumeration(this, ProvenanceEntityRole.DERIVATION); + if ("revision".equals(codeString)) + return new Enumeration(this, ProvenanceEntityRole.REVISION); + if ("quotation".equals(codeString)) + return new Enumeration(this, ProvenanceEntityRole.QUOTATION); + if ("source".equals(codeString)) + return new Enumeration(this, ProvenanceEntityRole.SOURCE); + throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); + } + public String toCode(ProvenanceEntityRole code) { + if (code == ProvenanceEntityRole.DERIVATION) + return "derivation"; + if (code == ProvenanceEntityRole.REVISION) + return "revision"; + if (code == ProvenanceEntityRole.QUOTATION) + return "quotation"; + if (code == ProvenanceEntityRole.SOURCE) + return "source"; + return "?"; + } + } + + @Block() + public static class ProvenanceAgentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The function of the agent with respect to the activity. + */ + @Child(name = "role", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What the agents involvement was", formalDefinition="The function of the agent with respect to the activity." ) + protected Coding role; + + /** + * The individual, device or organization that participated in the event. + */ + @Child(name = "actor", type = {Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Individual, device or organization playing role", formalDefinition="The individual, device or organization that participated in the event." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (The individual, device or organization that participated in the event.) + */ + protected Resource actorTarget; + + /** + * The identity of the agent as known by the authorization system. + */ + @Child(name = "userId", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Authorization-system identifier for the agent", formalDefinition="The identity of the agent as known by the authorization system." ) + protected Identifier userId; + + /** + * A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest. + */ + @Child(name = "relatedAgent", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Track delegation between agents", formalDefinition="A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest." ) + protected List relatedAgent; + + private static final long serialVersionUID = 1792758952L; + + /* + * Constructor + */ + public ProvenanceAgentComponent() { + super(); + } + + /* + * Constructor + */ + public ProvenanceAgentComponent(Coding role) { + super(); + this.role = role; + } + + /** + * @return {@link #role} (The function of the agent with respect to the activity.) + */ + public Coding getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new Coding(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (The function of the agent with respect to the activity.) + */ + public ProvenanceAgentComponent setRole(Coding value) { + this.role = value; + return this; + } + + /** + * @return {@link #actor} (The individual, device or organization that participated in the event.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (The individual, device or organization that participated in the event.) + */ + public ProvenanceAgentComponent setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The individual, device or organization that participated in the event.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The individual, device or organization that participated in the event.) + */ + public ProvenanceAgentComponent setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + /** + * @return {@link #userId} (The identity of the agent as known by the authorization system.) + */ + public Identifier getUserId() { + if (this.userId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentComponent.userId"); + else if (Configuration.doAutoCreate()) + this.userId = new Identifier(); // cc + return this.userId; + } + + public boolean hasUserId() { + return this.userId != null && !this.userId.isEmpty(); + } + + /** + * @param value {@link #userId} (The identity of the agent as known by the authorization system.) + */ + public ProvenanceAgentComponent setUserId(Identifier value) { + this.userId = value; + return this; + } + + /** + * @return {@link #relatedAgent} (A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.) + */ + public List getRelatedAgent() { + if (this.relatedAgent == null) + this.relatedAgent = new ArrayList(); + return this.relatedAgent; + } + + public boolean hasRelatedAgent() { + if (this.relatedAgent == null) + return false; + for (ProvenanceAgentRelatedAgentComponent item : this.relatedAgent) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #relatedAgent} (A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.) + */ + // syntactic sugar + public ProvenanceAgentRelatedAgentComponent addRelatedAgent() { //3 + ProvenanceAgentRelatedAgentComponent t = new ProvenanceAgentRelatedAgentComponent(); + if (this.relatedAgent == null) + this.relatedAgent = new ArrayList(); + this.relatedAgent.add(t); + return t; + } + + // syntactic sugar + public ProvenanceAgentComponent addRelatedAgent(ProvenanceAgentRelatedAgentComponent t) { //3 + if (t == null) + return this; + if (this.relatedAgent == null) + this.relatedAgent = new ArrayList(); + this.relatedAgent.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "Coding", "The function of the agent with respect to the activity.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("actor", "Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("userId", "Identifier", "The identity of the agent as known by the authorization system.", 0, java.lang.Integer.MAX_VALUE, userId)); + childrenList.add(new Property("relatedAgent", "", "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", 0, java.lang.Integer.MAX_VALUE, relatedAgent)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.role = castToCoding(value); // Coding + else if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else if (name.equals("userId")) + this.userId = castToIdentifier(value); // Identifier + else if (name.equals("relatedAgent")) + this.getRelatedAgent().add((ProvenanceAgentRelatedAgentComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + this.role = new Coding(); + return this.role; + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("userId")) { + this.userId = new Identifier(); + return this.userId; + } + else if (name.equals("relatedAgent")) { + return addRelatedAgent(); + } + else + return super.addChild(name); + } + + public ProvenanceAgentComponent copy() { + ProvenanceAgentComponent dst = new ProvenanceAgentComponent(); + copyValues(dst); + dst.role = role == null ? null : role.copy(); + dst.actor = actor == null ? null : actor.copy(); + dst.userId = userId == null ? null : userId.copy(); + if (relatedAgent != null) { + dst.relatedAgent = new ArrayList(); + for (ProvenanceAgentRelatedAgentComponent i : relatedAgent) + dst.relatedAgent.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProvenanceAgentComponent)) + return false; + ProvenanceAgentComponent o = (ProvenanceAgentComponent) other; + return compareDeep(role, o.role, true) && compareDeep(actor, o.actor, true) && compareDeep(userId, o.userId, true) + && compareDeep(relatedAgent, o.relatedAgent, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProvenanceAgentComponent)) + return false; + ProvenanceAgentComponent o = (ProvenanceAgentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (role == null || role.isEmpty()) && (actor == null || actor.isEmpty()) + && (userId == null || userId.isEmpty()) && (relatedAgent == null || relatedAgent.isEmpty()) + ; + } + + public String fhirType() { + return "Provenance.agent"; + + } + + } + + @Block() + public static class ProvenanceAgentRelatedAgentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of relationship between agents. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of relationship between agents", formalDefinition="The type of relationship between agents." ) + protected CodeableConcept type; + + /** + * An internal reference to another agent listed in this provenance by its identifier. + */ + @Child(name = "target", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to other agent in this resource by identifier", formalDefinition="An internal reference to another agent listed in this provenance by its identifier." ) + protected UriType target; + + private static final long serialVersionUID = 794181198L; + + /* + * Constructor + */ + public ProvenanceAgentRelatedAgentComponent() { + super(); + } + + /* + * Constructor + */ + public ProvenanceAgentRelatedAgentComponent(CodeableConcept type, UriType target) { + super(); + this.type = type; + this.target = target; + } + + /** + * @return {@link #type} (The type of relationship between agents.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentRelatedAgentComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of relationship between agents.) + */ + public ProvenanceAgentRelatedAgentComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #target} (An internal reference to another agent listed in this provenance by its identifier.). This is the underlying object with id, value and extensions. The accessor "getTarget" gives direct access to the value + */ + public UriType getTargetElement() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentRelatedAgentComponent.target"); + else if (Configuration.doAutoCreate()) + this.target = new UriType(); // bb + return this.target; + } + + public boolean hasTargetElement() { + return this.target != null && !this.target.isEmpty(); + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (An internal reference to another agent listed in this provenance by its identifier.). This is the underlying object with id, value and extensions. The accessor "getTarget" gives direct access to the value + */ + public ProvenanceAgentRelatedAgentComponent setTargetElement(UriType value) { + this.target = value; + return this; + } + + /** + * @return An internal reference to another agent listed in this provenance by its identifier. + */ + public String getTarget() { + return this.target == null ? null : this.target.getValue(); + } + + /** + * @param value An internal reference to another agent listed in this provenance by its identifier. + */ + public ProvenanceAgentRelatedAgentComponent setTarget(String value) { + if (this.target == null) + this.target = new UriType(); + this.target.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "The type of relationship between agents.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("target", "uri", "An internal reference to another agent listed in this provenance by its identifier.", 0, java.lang.Integer.MAX_VALUE, target)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("target")) + this.target = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("target")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.target"); + } + else + return super.addChild(name); + } + + public ProvenanceAgentRelatedAgentComponent copy() { + ProvenanceAgentRelatedAgentComponent dst = new ProvenanceAgentRelatedAgentComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.target = target == null ? null : target.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProvenanceAgentRelatedAgentComponent)) + return false; + ProvenanceAgentRelatedAgentComponent o = (ProvenanceAgentRelatedAgentComponent) other; + return compareDeep(type, o.type, true) && compareDeep(target, o.target, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProvenanceAgentRelatedAgentComponent)) + return false; + ProvenanceAgentRelatedAgentComponent o = (ProvenanceAgentRelatedAgentComponent) other; + return compareValues(target, o.target, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (target == null || target.isEmpty()) + ; + } + + public String fhirType() { + return "Provenance.agent.relatedAgent"; + + } + + } + + @Block() + public static class ProvenanceEntityComponent extends BackboneElement implements IBaseBackboneElement { + /** + * How the entity was used during the activity. + */ + @Child(name = "role", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="derivation | revision | quotation | source", formalDefinition="How the entity was used during the activity." ) + protected Enumeration role; + + /** + * The type of the entity. If the entity is a resource, then this is a resource type. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of resource in this entity", formalDefinition="The type of the entity. If the entity is a resource, then this is a resource type." ) + protected Coding type; + + /** + * Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative. + */ + @Child(name = "reference", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identity of entity", formalDefinition="Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative." ) + protected UriType reference; + + /** + * Human-readable description of the entity. + */ + @Child(name = "display", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human description of entity", formalDefinition="Human-readable description of the entity." ) + protected StringType display; + + /** + * The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity. + */ + @Child(name = "agent", type = {ProvenanceAgentComponent.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Entity is attributed to this agent", formalDefinition="The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity." ) + protected ProvenanceAgentComponent agent; + + private static final long serialVersionUID = 1533729633L; + + /* + * Constructor + */ + public ProvenanceEntityComponent() { + super(); + } + + /* + * Constructor + */ + public ProvenanceEntityComponent(Enumeration role, Coding type, UriType reference) { + super(); + this.role = role; + this.type = type; + this.reference = reference; + } + + /** + * @return {@link #role} (How the entity was used during the activity.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value + */ + public Enumeration getRoleElement() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceEntityComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new Enumeration(new ProvenanceEntityRoleEnumFactory()); // bb + return this.role; + } + + public boolean hasRoleElement() { + return this.role != null && !this.role.isEmpty(); + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (How the entity was used during the activity.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value + */ + public ProvenanceEntityComponent setRoleElement(Enumeration value) { + this.role = value; + return this; + } + + /** + * @return How the entity was used during the activity. + */ + public ProvenanceEntityRole getRole() { + return this.role == null ? null : this.role.getValue(); + } + + /** + * @param value How the entity was used during the activity. + */ + public ProvenanceEntityComponent setRole(ProvenanceEntityRole value) { + if (this.role == null) + this.role = new Enumeration(new ProvenanceEntityRoleEnumFactory()); + this.role.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of the entity. If the entity is a resource, then this is a resource type.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceEntityComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the entity. If the entity is a resource, then this is a resource type.) + */ + public ProvenanceEntityComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #reference} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public UriType getReferenceElement() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceEntityComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new UriType(); // bb + return this.reference; + } + + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public ProvenanceEntityComponent setReferenceElement(UriType value) { + this.reference = value; + return this; + } + + /** + * @return Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative. + */ + public ProvenanceEntityComponent setReference(String value) { + if (this.reference == null) + this.reference = new UriType(); + this.reference.setValue(value); + return this; + } + + /** + * @return {@link #display} (Human-readable description of the entity.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceEntityComponent.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (Human-readable description of the entity.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public ProvenanceEntityComponent setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return Human-readable description of the entity. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value Human-readable description of the entity. + */ + public ProvenanceEntityComponent setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #agent} (The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.) + */ + public ProvenanceAgentComponent getAgent() { + if (this.agent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceEntityComponent.agent"); + else if (Configuration.doAutoCreate()) + this.agent = new ProvenanceAgentComponent(); // cc + return this.agent; + } + + public boolean hasAgent() { + return this.agent != null && !this.agent.isEmpty(); + } + + /** + * @param value {@link #agent} (The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.) + */ + public ProvenanceEntityComponent setAgent(ProvenanceAgentComponent value) { + this.agent = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "code", "How the entity was used during the activity.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("type", "Coding", "The type of the entity. If the entity is a resource, then this is a resource type.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("reference", "uri", "Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("display", "string", "Human-readable description of the entity.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("agent", "@Provenance.agent", "The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.", 0, java.lang.Integer.MAX_VALUE, agent)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.role = new ProvenanceEntityRoleEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("reference")) + this.reference = castToUri(value); // UriType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("agent")) + this.agent = (ProvenanceAgentComponent) value; // ProvenanceAgentComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.role"); + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("reference")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.reference"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.display"); + } + else if (name.equals("agent")) { + this.agent = new ProvenanceAgentComponent(); + return this.agent; + } + else + return super.addChild(name); + } + + public ProvenanceEntityComponent copy() { + ProvenanceEntityComponent dst = new ProvenanceEntityComponent(); + copyValues(dst); + dst.role = role == null ? null : role.copy(); + dst.type = type == null ? null : type.copy(); + dst.reference = reference == null ? null : reference.copy(); + dst.display = display == null ? null : display.copy(); + dst.agent = agent == null ? null : agent.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProvenanceEntityComponent)) + return false; + ProvenanceEntityComponent o = (ProvenanceEntityComponent) other; + return compareDeep(role, o.role, true) && compareDeep(type, o.type, true) && compareDeep(reference, o.reference, true) + && compareDeep(display, o.display, true) && compareDeep(agent, o.agent, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProvenanceEntityComponent)) + return false; + ProvenanceEntityComponent o = (ProvenanceEntityComponent) other; + return compareValues(role, o.role, true) && compareValues(reference, o.reference, true) && compareValues(display, o.display, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (role == null || role.isEmpty()) && (type == null || type.isEmpty()) + && (reference == null || reference.isEmpty()) && (display == null || display.isEmpty()) && (agent == null || agent.isEmpty()) + ; + } + + public String fhirType() { + return "Provenance.entity"; + + } + + } + + /** + * The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity. + */ + @Child(name = "target", type = {}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Target Reference(s) (usually version specific)", formalDefinition="The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) + protected List target; + /** + * The actual objects that are the target of the reference (The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) + */ + protected List targetTarget; + + + /** + * The period during which the activity occurred. + */ + @Child(name = "period", type = {Period.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) + protected Period period; + + /** + * The instant of time at which the activity was recorded. + */ + @Child(name = "recorded", type = {InstantType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the activity was recorded / updated", formalDefinition="The instant of time at which the activity was recorded." ) + protected InstantType recorded; + + /** + * The reason that the activity was taking place. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason the activity is occurring", formalDefinition="The reason that the activity was taking place." ) + protected List reason; + + /** + * An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities. + */ + @Child(name = "activity", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Activity that occurred", formalDefinition="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities." ) + protected CodeableConcept activity; + + /** + * Where the activity occurred, if relevant. + */ + @Child(name = "location", type = {Location.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the activity occurred, if relevant", formalDefinition="Where the activity occurred, if relevant." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (Where the activity occurred, if relevant.) + */ + protected Location locationTarget; + + /** + * Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc. + */ + @Child(name = "policy", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Policy or plan the activity was defined by", formalDefinition="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc." ) + protected List policy; + + /** + * An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility. + */ + @Child(name = "agent", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Agents involved in creating resource", formalDefinition="An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility." ) + protected List agent; + + /** + * An entity used in this activity. + */ + @Child(name = "entity", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="An entity used in this activity", formalDefinition="An entity used in this activity." ) + protected List entity; + + /** + * A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated. + */ + @Child(name = "signature", type = {Signature.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Signature on target", formalDefinition="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated." ) + protected List signature; + + private static final long serialVersionUID = -1053458671L; + + /* + * Constructor + */ + public Provenance() { + super(); + } + + /* + * Constructor + */ + public Provenance(InstantType recorded) { + super(); + this.recorded = recorded; + } + + /** + * @return {@link #target} (The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) + */ + public List getTarget() { + if (this.target == null) + this.target = new ArrayList(); + return this.target; + } + + public boolean hasTarget() { + if (this.target == null) + return false; + for (Reference item : this.target) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #target} (The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) + */ + // syntactic sugar + public Reference addTarget() { //3 + Reference t = new Reference(); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return t; + } + + // syntactic sugar + public Provenance addTarget(Reference t) { //3 + if (t == null) + return this; + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return this; + } + + /** + * @return {@link #target} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) + */ + public List getTargetTarget() { + if (this.targetTarget == null) + this.targetTarget = new ArrayList(); + return this.targetTarget; + } + + /** + * @return {@link #period} (The period during which the activity occurred.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Provenance.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which the activity occurred.) + */ + public Provenance setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #recorded} (The instant of time at which the activity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public InstantType getRecordedElement() { + if (this.recorded == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Provenance.recorded"); + else if (Configuration.doAutoCreate()) + this.recorded = new InstantType(); // bb + return this.recorded; + } + + public boolean hasRecordedElement() { + return this.recorded != null && !this.recorded.isEmpty(); + } + + public boolean hasRecorded() { + return this.recorded != null && !this.recorded.isEmpty(); + } + + /** + * @param value {@link #recorded} (The instant of time at which the activity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public Provenance setRecordedElement(InstantType value) { + this.recorded = value; + return this; + } + + /** + * @return The instant of time at which the activity was recorded. + */ + public Date getRecorded() { + return this.recorded == null ? null : this.recorded.getValue(); + } + + /** + * @param value The instant of time at which the activity was recorded. + */ + public Provenance setRecorded(Date value) { + if (this.recorded == null) + this.recorded = new InstantType(); + this.recorded.setValue(value); + return this; + } + + /** + * @return {@link #reason} (The reason that the activity was taking place.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableConcept item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #reason} (The reason that the activity was taking place.) + */ + // syntactic sugar + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + // syntactic sugar + public Provenance addReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) + */ + public CodeableConcept getActivity() { + if (this.activity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Provenance.activity"); + else if (Configuration.doAutoCreate()) + this.activity = new CodeableConcept(); // cc + return this.activity; + } + + public boolean hasActivity() { + return this.activity != null && !this.activity.isEmpty(); + } + + /** + * @param value {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) + */ + public Provenance setActivity(CodeableConcept value) { + this.activity = value; + return this; + } + + /** + * @return {@link #location} (Where the activity occurred, if relevant.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Provenance.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (Where the activity occurred, if relevant.) + */ + public Provenance setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the activity occurred, if relevant.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Provenance.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the activity occurred, if relevant.) + */ + public Provenance setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) + */ + public List getPolicy() { + if (this.policy == null) + this.policy = new ArrayList(); + return this.policy; + } + + public boolean hasPolicy() { + if (this.policy == null) + return false; + for (UriType item : this.policy) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) + */ + // syntactic sugar + public UriType addPolicyElement() {//2 + UriType t = new UriType(); + if (this.policy == null) + this.policy = new ArrayList(); + this.policy.add(t); + return t; + } + + /** + * @param value {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) + */ + public Provenance addPolicy(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.policy == null) + this.policy = new ArrayList(); + this.policy.add(t); + return this; + } + + /** + * @param value {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) + */ + public boolean hasPolicy(String value) { + if (this.policy == null) + return false; + for (UriType v : this.policy) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) + */ + public List getAgent() { + if (this.agent == null) + this.agent = new ArrayList(); + return this.agent; + } + + public boolean hasAgent() { + if (this.agent == null) + return false; + for (ProvenanceAgentComponent item : this.agent) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) + */ + // syntactic sugar + public ProvenanceAgentComponent addAgent() { //3 + ProvenanceAgentComponent t = new ProvenanceAgentComponent(); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); + return t; + } + + // syntactic sugar + public Provenance addAgent(ProvenanceAgentComponent t) { //3 + if (t == null) + return this; + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); + return this; + } + + /** + * @return {@link #entity} (An entity used in this activity.) + */ + public List getEntity() { + if (this.entity == null) + this.entity = new ArrayList(); + return this.entity; + } + + public boolean hasEntity() { + if (this.entity == null) + return false; + for (ProvenanceEntityComponent item : this.entity) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #entity} (An entity used in this activity.) + */ + // syntactic sugar + public ProvenanceEntityComponent addEntity() { //3 + ProvenanceEntityComponent t = new ProvenanceEntityComponent(); + if (this.entity == null) + this.entity = new ArrayList(); + this.entity.add(t); + return t; + } + + // syntactic sugar + public Provenance addEntity(ProvenanceEntityComponent t) { //3 + if (t == null) + return this; + if (this.entity == null) + this.entity = new ArrayList(); + this.entity.add(t); + return this; + } + + /** + * @return {@link #signature} (A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.) + */ + public List getSignature() { + if (this.signature == null) + this.signature = new ArrayList(); + return this.signature; + } + + public boolean hasSignature() { + if (this.signature == null) + return false; + for (Signature item : this.signature) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #signature} (A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.) + */ + // syntactic sugar + public Signature addSignature() { //3 + Signature t = new Signature(); + if (this.signature == null) + this.signature = new ArrayList(); + this.signature.add(t); + return t; + } + + // syntactic sugar + public Provenance addSignature(Signature t) { //3 + if (t == null) + return this; + if (this.signature == null) + this.signature = new ArrayList(); + this.signature.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("target", "Reference(Any)", "The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("period", "Period", "The period during which the activity occurred.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("recorded", "instant", "The instant of time at which the activity was recorded.", 0, java.lang.Integer.MAX_VALUE, recorded)); + childrenList.add(new Property("reason", "CodeableConcept", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("activity", "CodeableConcept", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, java.lang.Integer.MAX_VALUE, activity)); + childrenList.add(new Property("location", "Reference(Location)", "Where the activity occurred, if relevant.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("policy", "uri", "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", 0, java.lang.Integer.MAX_VALUE, policy)); + childrenList.add(new Property("agent", "", "An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.", 0, java.lang.Integer.MAX_VALUE, agent)); + childrenList.add(new Property("entity", "", "An entity used in this activity.", 0, java.lang.Integer.MAX_VALUE, entity)); + childrenList.add(new Property("signature", "Signature", "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", 0, java.lang.Integer.MAX_VALUE, signature)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("target")) + this.getTarget().add(castToReference(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("recorded")) + this.recorded = castToInstant(value); // InstantType + else if (name.equals("reason")) + this.getReason().add(castToCodeableConcept(value)); + else if (name.equals("activity")) + this.activity = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("location")) + this.location = castToReference(value); // Reference + else if (name.equals("policy")) + this.getPolicy().add(castToUri(value)); + else if (name.equals("agent")) + this.getAgent().add((ProvenanceAgentComponent) value); + else if (name.equals("entity")) + this.getEntity().add((ProvenanceEntityComponent) value); + else if (name.equals("signature")) + this.getSignature().add(castToSignature(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("target")) { + return addTarget(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("recorded")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.recorded"); + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("activity")) { + this.activity = new CodeableConcept(); + return this.activity; + } + else if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("policy")) { + throw new FHIRException("Cannot call addChild on a primitive type Provenance.policy"); + } + else if (name.equals("agent")) { + return addAgent(); + } + else if (name.equals("entity")) { + return addEntity(); + } + else if (name.equals("signature")) { + return addSignature(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Provenance"; + + } + + public Provenance copy() { + Provenance dst = new Provenance(); + copyValues(dst); + if (target != null) { + dst.target = new ArrayList(); + for (Reference i : target) + dst.target.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.recorded = recorded == null ? null : recorded.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) + dst.reason.add(i.copy()); + }; + dst.activity = activity == null ? null : activity.copy(); + dst.location = location == null ? null : location.copy(); + if (policy != null) { + dst.policy = new ArrayList(); + for (UriType i : policy) + dst.policy.add(i.copy()); + }; + if (agent != null) { + dst.agent = new ArrayList(); + for (ProvenanceAgentComponent i : agent) + dst.agent.add(i.copy()); + }; + if (entity != null) { + dst.entity = new ArrayList(); + for (ProvenanceEntityComponent i : entity) + dst.entity.add(i.copy()); + }; + if (signature != null) { + dst.signature = new ArrayList(); + for (Signature i : signature) + dst.signature.add(i.copy()); + }; + return dst; + } + + protected Provenance typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Provenance)) + return false; + Provenance o = (Provenance) other; + return compareDeep(target, o.target, true) && compareDeep(period, o.period, true) && compareDeep(recorded, o.recorded, true) + && compareDeep(reason, o.reason, true) && compareDeep(activity, o.activity, true) && compareDeep(location, o.location, true) + && compareDeep(policy, o.policy, true) && compareDeep(agent, o.agent, true) && compareDeep(entity, o.entity, true) + && compareDeep(signature, o.signature, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Provenance)) + return false; + Provenance o = (Provenance) other; + return compareValues(recorded, o.recorded, true) && compareValues(policy, o.policy, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (target == null || target.isEmpty()) && (period == null || period.isEmpty()) + && (recorded == null || recorded.isEmpty()) && (reason == null || reason.isEmpty()) && (activity == null || activity.isEmpty()) + && (location == null || location.isEmpty()) && (policy == null || policy.isEmpty()) && (agent == null || agent.isEmpty()) + && (entity == null || entity.isEmpty()) && (signature == null || signature.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Provenance; + } + + @SearchParamDefinition(name="sigtype", path="Provenance.signature.type", description="Indication of the reason the entity signed the object(s)", type="token" ) + public static final String SP_SIGTYPE = "sigtype"; + @SearchParamDefinition(name="agent", path="Provenance.agent.actor", description="Individual, device or organization playing role", type="reference" ) + public static final String SP_AGENT = "agent"; + @SearchParamDefinition(name="entitytype", path="Provenance.entity.type", description="The type of resource in this entity", type="token" ) + public static final String SP_ENTITYTYPE = "entitytype"; + @SearchParamDefinition(name="patient", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="start", path="Provenance.period.start", description="Starting time with inclusive boundary", type="date" ) + public static final String SP_START = "start"; + @SearchParamDefinition(name="end", path="Provenance.period.end", description="End time with inclusive boundary, if not ongoing", type="date" ) + public static final String SP_END = "end"; + @SearchParamDefinition(name="location", path="Provenance.location", description="Where the activity occurred, if relevant", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="userid", path="Provenance.agent.userId", description="Authorization-system identifier for the agent", type="token" ) + public static final String SP_USERID = "userid"; + @SearchParamDefinition(name="entity", path="Provenance.entity.reference", description="Identity of entity", type="uri" ) + public static final String SP_ENTITY = "entity"; + @SearchParamDefinition(name="target", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) + public static final String SP_TARGET = "target"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Quantity.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Quantity.java new file mode 100644 index 00000000000..2c80b8eecf9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Quantity.java @@ -0,0 +1,569 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="Quantity") +public class Quantity extends Type implements ICompositeType { + + public enum QuantityComparator { + /** + * The actual value is less than the given value. + */ + LESS_THAN, + /** + * The actual value is less than or equal to the given value. + */ + LESS_OR_EQUAL, + /** + * The actual value is greater than or equal to the given value. + */ + GREATER_OR_EQUAL, + /** + * The actual value is greater than the given value. + */ + GREATER_THAN, + /** + * added to help the parsers + */ + NULL; + public static QuantityComparator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("<".equals(codeString)) + return LESS_THAN; + if ("<=".equals(codeString)) + return LESS_OR_EQUAL; + if (">=".equals(codeString)) + return GREATER_OR_EQUAL; + if (">".equals(codeString)) + return GREATER_THAN; + throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LESS_THAN: return "<"; + case LESS_OR_EQUAL: return "<="; + case GREATER_OR_EQUAL: return ">="; + case GREATER_THAN: return ">"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case LESS_THAN: return "http://hl7.org/fhir/quantity-comparator"; + case LESS_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator"; + case GREATER_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator"; + case GREATER_THAN: return "http://hl7.org/fhir/quantity-comparator"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case LESS_THAN: return "The actual value is less than the given value."; + case LESS_OR_EQUAL: return "The actual value is less than or equal to the given value."; + case GREATER_OR_EQUAL: return "The actual value is greater than or equal to the given value."; + case GREATER_THAN: return "The actual value is greater than the given value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LESS_THAN: return "Less than"; + case LESS_OR_EQUAL: return "Less or Equal to"; + case GREATER_OR_EQUAL: return "Greater or Equal to"; + case GREATER_THAN: return "Greater than"; + default: return "?"; + } + } + } + + public static class QuantityComparatorEnumFactory implements EnumFactory { + public QuantityComparator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("<".equals(codeString)) + return QuantityComparator.LESS_THAN; + if ("<=".equals(codeString)) + return QuantityComparator.LESS_OR_EQUAL; + if (">=".equals(codeString)) + return QuantityComparator.GREATER_OR_EQUAL; + if (">".equals(codeString)) + return QuantityComparator.GREATER_THAN; + throw new IllegalArgumentException("Unknown QuantityComparator code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("<".equals(codeString)) + return new Enumeration(this, QuantityComparator.LESS_THAN); + if ("<=".equals(codeString)) + return new Enumeration(this, QuantityComparator.LESS_OR_EQUAL); + if (">=".equals(codeString)) + return new Enumeration(this, QuantityComparator.GREATER_OR_EQUAL); + if (">".equals(codeString)) + return new Enumeration(this, QuantityComparator.GREATER_THAN); + throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'"); + } + public String toCode(QuantityComparator code) { + if (code == QuantityComparator.LESS_THAN) + return "<"; + if (code == QuantityComparator.LESS_OR_EQUAL) + return "<="; + if (code == QuantityComparator.GREATER_OR_EQUAL) + return ">="; + if (code == QuantityComparator.GREATER_THAN) + return ">"; + return "?"; + } + } + + /** + * The value of the measured amount. The value includes an implicit precision in the presentation of the value. + */ + @Child(name = "value", type = {DecimalType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Numerical value (with implicit precision)", formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value." ) + protected DecimalType value; + + /** + * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value. + */ + @Child(name = "comparator", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="< | <= | >= | > - how to understand the value", formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value." ) + protected Enumeration comparator; + + /** + * A human-readable form of the unit. + */ + @Child(name = "unit", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unit representation", formalDefinition="A human-readable form of the unit." ) + protected StringType unit; + + /** + * The identification of the system that provides the coded form of the unit. + */ + @Child(name = "system", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="System that defines coded unit form", formalDefinition="The identification of the system that provides the coded form of the unit." ) + protected UriType system; + + /** + * A computer processable form of the unit in some unit representation system. + */ + @Child(name = "code", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Coded form of the unit", formalDefinition="A computer processable form of the unit in some unit representation system." ) + protected CodeType code; + + private static final long serialVersionUID = 1069574054L; + + /* + * Constructor + */ + public Quantity() { + super(); + } + + /** + * @return {@link #value} (The value of the measured amount. The value includes an implicit precision in the presentation of the value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public DecimalType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Quantity.value"); + else if (Configuration.doAutoCreate()) + this.value = new DecimalType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the measured amount. The value includes an implicit precision in the presentation of the value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public Quantity setValueElement(DecimalType value) { + this.value = value; + return this; + } + + /** + * @return The value of the measured amount. The value includes an implicit precision in the presentation of the value. + */ + public BigDecimal getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value of the measured amount. The value includes an implicit precision in the presentation of the value. + */ + public Quantity setValue(BigDecimal value) { + if (value == null) + this.value = null; + else { + if (this.value == null) + this.value = new DecimalType(); + this.value.setValue(value); + } + return this; + } + + /** + * @param value The value of the measured amount. The value includes an implicit precision in the presentation of the value. + */ + public Quantity setValue(long value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @param value The value of the measured amount. The value includes an implicit precision in the presentation of the value. + */ + public Quantity setValue(double value) { + this.value = new DecimalType(); + this.value.setValue(value); + return this; + } + + /** + * @return {@link #comparator} (How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.). This is the underlying object with id, value and extensions. The accessor "getComparator" gives direct access to the value + */ + public Enumeration getComparatorElement() { + if (this.comparator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Quantity.comparator"); + else if (Configuration.doAutoCreate()) + this.comparator = new Enumeration(new QuantityComparatorEnumFactory()); // bb + return this.comparator; + } + + public boolean hasComparatorElement() { + return this.comparator != null && !this.comparator.isEmpty(); + } + + public boolean hasComparator() { + return this.comparator != null && !this.comparator.isEmpty(); + } + + /** + * @param value {@link #comparator} (How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.). This is the underlying object with id, value and extensions. The accessor "getComparator" gives direct access to the value + */ + public Quantity setComparatorElement(Enumeration value) { + this.comparator = value; + return this; + } + + /** + * @return How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value. + */ + public QuantityComparator getComparator() { + return this.comparator == null ? null : this.comparator.getValue(); + } + + /** + * @param value How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value. + */ + public Quantity setComparator(QuantityComparator value) { + if (value == null) + this.comparator = null; + else { + if (this.comparator == null) + this.comparator = new Enumeration(new QuantityComparatorEnumFactory()); + this.comparator.setValue(value); + } + return this; + } + + /** + * @return {@link #unit} (A human-readable form of the unit.). This is the underlying object with id, value and extensions. The accessor "getUnit" gives direct access to the value + */ + public StringType getUnitElement() { + if (this.unit == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Quantity.unit"); + else if (Configuration.doAutoCreate()) + this.unit = new StringType(); // bb + return this.unit; + } + + public boolean hasUnitElement() { + return this.unit != null && !this.unit.isEmpty(); + } + + public boolean hasUnit() { + return this.unit != null && !this.unit.isEmpty(); + } + + /** + * @param value {@link #unit} (A human-readable form of the unit.). This is the underlying object with id, value and extensions. The accessor "getUnit" gives direct access to the value + */ + public Quantity setUnitElement(StringType value) { + this.unit = value; + return this; + } + + /** + * @return A human-readable form of the unit. + */ + public String getUnit() { + return this.unit == null ? null : this.unit.getValue(); + } + + /** + * @param value A human-readable form of the unit. + */ + public Quantity setUnit(String value) { + if (Utilities.noString(value)) + this.unit = null; + else { + if (this.unit == null) + this.unit = new StringType(); + this.unit.setValue(value); + } + return this; + } + + /** + * @return {@link #system} (The identification of the system that provides the coded form of the unit.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Quantity.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (The identification of the system that provides the coded form of the unit.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public Quantity setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return The identification of the system that provides the coded form of the unit. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value The identification of the system that provides the coded form of the unit. + */ + public Quantity setSystem(String value) { + if (Utilities.noString(value)) + this.system = null; + else { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (A computer processable form of the unit in some unit representation system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Quantity.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A computer processable form of the unit in some unit representation system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Quantity setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return A computer processable form of the unit in some unit representation system. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value A computer processable form of the unit in some unit representation system. + */ + public Quantity setCode(String value) { + if (Utilities.noString(value)) + this.code = null; + else { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value", "decimal", "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("comparator", "code", "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.", 0, java.lang.Integer.MAX_VALUE, comparator)); + childrenList.add(new Property("unit", "string", "A human-readable form of the unit.", 0, java.lang.Integer.MAX_VALUE, unit)); + childrenList.add(new Property("system", "uri", "The identification of the system that provides the coded form of the unit.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("code", "code", "A computer processable form of the unit in some unit representation system.", 0, java.lang.Integer.MAX_VALUE, code)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value")) + this.value = castToDecimal(value); // DecimalType + else if (name.equals("comparator")) + this.comparator = new QuantityComparatorEnumFactory().fromType(value); // Enumeration + else if (name.equals("unit")) + this.unit = castToString(value); // StringType + else if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type Quantity.value"); + } + else if (name.equals("comparator")) { + throw new FHIRException("Cannot call addChild on a primitive type Quantity.comparator"); + } + else if (name.equals("unit")) { + throw new FHIRException("Cannot call addChild on a primitive type Quantity.unit"); + } + else if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type Quantity.system"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type Quantity.code"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Quantity"; + + } + + public Quantity copy() { + Quantity dst = new Quantity(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Quantity typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Quantity)) + return false; + Quantity o = (Quantity) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Quantity)) + return false; + Quantity o = (Quantity) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Questionnaire.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Questionnaire.java new file mode 100644 index 00000000000..496361a027b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Questionnaire.java @@ -0,0 +1,1827 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ +@ResourceDef(name="Questionnaire", profile="http://hl7.org/fhir/Profile/Questionnaire") +public class Questionnaire extends DomainResource { + + public enum QuestionnaireStatus { + /** + * This Questionnaire is not ready for official use. + */ + DRAFT, + /** + * This Questionnaire is ready for use. + */ + PUBLISHED, + /** + * This Questionnaire should no longer be used to gather data. + */ + RETIRED, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("published".equals(codeString)) + return PUBLISHED; + if ("retired".equals(codeString)) + return RETIRED; + throw new FHIRException("Unknown QuestionnaireStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case PUBLISHED: return "published"; + case RETIRED: return "retired"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/questionnaire-status"; + case PUBLISHED: return "http://hl7.org/fhir/questionnaire-status"; + case RETIRED: return "http://hl7.org/fhir/questionnaire-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "This Questionnaire is not ready for official use."; + case PUBLISHED: return "This Questionnaire is ready for use."; + case RETIRED: return "This Questionnaire should no longer be used to gather data."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case PUBLISHED: return "Published"; + case RETIRED: return "Retired"; + default: return "?"; + } + } + } + + public static class QuestionnaireStatusEnumFactory implements EnumFactory { + public QuestionnaireStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return QuestionnaireStatus.DRAFT; + if ("published".equals(codeString)) + return QuestionnaireStatus.PUBLISHED; + if ("retired".equals(codeString)) + return QuestionnaireStatus.RETIRED; + throw new IllegalArgumentException("Unknown QuestionnaireStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, QuestionnaireStatus.DRAFT); + if ("published".equals(codeString)) + return new Enumeration(this, QuestionnaireStatus.PUBLISHED); + if ("retired".equals(codeString)) + return new Enumeration(this, QuestionnaireStatus.RETIRED); + throw new FHIRException("Unknown QuestionnaireStatus code '"+codeString+"'"); + } + public String toCode(QuestionnaireStatus code) { + if (code == QuestionnaireStatus.DRAFT) + return "draft"; + if (code == QuestionnaireStatus.PUBLISHED) + return "published"; + if (code == QuestionnaireStatus.RETIRED) + return "retired"; + return "?"; + } + } + + public enum QuestionnaireItemType { + /** + * An item with no direct answer but which has descendant items that are questions + */ + GROUP, + /** + * Text for display that will not capture an answer or have descendants + */ + DISPLAY, + /** + * An item that defines a specific answer to be captured (and may have descendant items) + */ + QUESTION, + /** + * Question with a yes/no answer + */ + BOOLEAN, + /** + * Question with is a real number answer + */ + DECIMAL, + /** + * Question with an integer answer + */ + INTEGER, + /** + * Question with adate answer + */ + DATE, + /** + * Question with a date and time answer + */ + DATETIME, + /** + * Question with a system timestamp answer + */ + INSTANT, + /** + * Question with a time (hour/minute/second) answer independent of date. + */ + TIME, + /** + * Question with a short (few words to short sentence) free-text entry answer + */ + STRING, + /** + * Question with a long (potentially multi-paragraph) free-text entry (still captured as a string) answer + */ + TEXT, + /** + * Question with a url (website, FTP site, etc.) answer + */ + URL, + /** + * Question with a Coding drawn from a list of options as an answer + */ + CHOICE, + /** + * Answer is a Coding drawn from a list of options or a free-text entry captured as Coding.display + */ + OPENCHOICE, + /** + * Question with binary content such as a image, PDF, etc. as an answer + */ + ATTACHMENT, + /** + * Question with a reference to another resource (practitioner, organization, etc.) as an answer + */ + REFERENCE, + /** + * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. + */ + QUANTITY, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireItemType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("display".equals(codeString)) + return DISPLAY; + if ("question".equals(codeString)) + return QUESTION; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("integer".equals(codeString)) + return INTEGER; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("instant".equals(codeString)) + return INSTANT; + if ("time".equals(codeString)) + return TIME; + if ("string".equals(codeString)) + return STRING; + if ("text".equals(codeString)) + return TEXT; + if ("url".equals(codeString)) + return URL; + if ("choice".equals(codeString)) + return CHOICE; + if ("open-choice".equals(codeString)) + return OPENCHOICE; + if ("attachment".equals(codeString)) + return ATTACHMENT; + if ("reference".equals(codeString)) + return REFERENCE; + if ("quantity".equals(codeString)) + return QUANTITY; + throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case DISPLAY: return "display"; + case QUESTION: return "question"; + case BOOLEAN: return "boolean"; + case DECIMAL: return "decimal"; + case INTEGER: return "integer"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case INSTANT: return "instant"; + case TIME: return "time"; + case STRING: return "string"; + case TEXT: return "text"; + case URL: return "url"; + case CHOICE: return "choice"; + case OPENCHOICE: return "open-choice"; + case ATTACHMENT: return "attachment"; + case REFERENCE: return "reference"; + case QUANTITY: return "quantity"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case GROUP: return "http://hl7.org/fhir/item-type"; + case DISPLAY: return "http://hl7.org/fhir/item-type"; + case QUESTION: return "http://hl7.org/fhir/item-type"; + case BOOLEAN: return "http://hl7.org/fhir/item-type"; + case DECIMAL: return "http://hl7.org/fhir/item-type"; + case INTEGER: return "http://hl7.org/fhir/item-type"; + case DATE: return "http://hl7.org/fhir/item-type"; + case DATETIME: return "http://hl7.org/fhir/item-type"; + case INSTANT: return "http://hl7.org/fhir/item-type"; + case TIME: return "http://hl7.org/fhir/item-type"; + case STRING: return "http://hl7.org/fhir/item-type"; + case TEXT: return "http://hl7.org/fhir/item-type"; + case URL: return "http://hl7.org/fhir/item-type"; + case CHOICE: return "http://hl7.org/fhir/item-type"; + case OPENCHOICE: return "http://hl7.org/fhir/item-type"; + case ATTACHMENT: return "http://hl7.org/fhir/item-type"; + case REFERENCE: return "http://hl7.org/fhir/item-type"; + case QUANTITY: return "http://hl7.org/fhir/item-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case GROUP: return "An item with no direct answer but which has descendant items that are questions"; + case DISPLAY: return "Text for display that will not capture an answer or have descendants"; + case QUESTION: return "An item that defines a specific answer to be captured (and may have descendant items)"; + case BOOLEAN: return "Question with a yes/no answer"; + case DECIMAL: return "Question with is a real number answer"; + case INTEGER: return "Question with an integer answer"; + case DATE: return "Question with adate answer"; + case DATETIME: return "Question with a date and time answer"; + case INSTANT: return "Question with a system timestamp answer"; + case TIME: return "Question with a time (hour/minute/second) answer independent of date."; + case STRING: return "Question with a short (few words to short sentence) free-text entry answer"; + case TEXT: return "Question with a long (potentially multi-paragraph) free-text entry (still captured as a string) answer"; + case URL: return "Question with a url (website, FTP site, etc.) answer"; + case CHOICE: return "Question with a Coding drawn from a list of options as an answer"; + case OPENCHOICE: return "Answer is a Coding drawn from a list of options or a free-text entry captured as Coding.display"; + case ATTACHMENT: return "Question with binary content such as a image, PDF, etc. as an answer"; + case REFERENCE: return "Question with a reference to another resource (practitioner, organization, etc.) as an answer"; + case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "Group"; + case DISPLAY: return "Display"; + case QUESTION: return "Question"; + case BOOLEAN: return "Boolean"; + case DECIMAL: return "Decimal"; + case INTEGER: return "Integer"; + case DATE: return "Date"; + case DATETIME: return "Date Time"; + case INSTANT: return "Instant"; + case TIME: return "Time"; + case STRING: return "String"; + case TEXT: return "Text"; + case URL: return "Url"; + case CHOICE: return "Choice"; + case OPENCHOICE: return "Open Choice"; + case ATTACHMENT: return "Attachment"; + case REFERENCE: return "Reference"; + case QUANTITY: return "Quantity"; + default: return "?"; + } + } + } + + public static class QuestionnaireItemTypeEnumFactory implements EnumFactory { + public QuestionnaireItemType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return QuestionnaireItemType.GROUP; + if ("display".equals(codeString)) + return QuestionnaireItemType.DISPLAY; + if ("question".equals(codeString)) + return QuestionnaireItemType.QUESTION; + if ("boolean".equals(codeString)) + return QuestionnaireItemType.BOOLEAN; + if ("decimal".equals(codeString)) + return QuestionnaireItemType.DECIMAL; + if ("integer".equals(codeString)) + return QuestionnaireItemType.INTEGER; + if ("date".equals(codeString)) + return QuestionnaireItemType.DATE; + if ("dateTime".equals(codeString)) + return QuestionnaireItemType.DATETIME; + if ("instant".equals(codeString)) + return QuestionnaireItemType.INSTANT; + if ("time".equals(codeString)) + return QuestionnaireItemType.TIME; + if ("string".equals(codeString)) + return QuestionnaireItemType.STRING; + if ("text".equals(codeString)) + return QuestionnaireItemType.TEXT; + if ("url".equals(codeString)) + return QuestionnaireItemType.URL; + if ("choice".equals(codeString)) + return QuestionnaireItemType.CHOICE; + if ("open-choice".equals(codeString)) + return QuestionnaireItemType.OPENCHOICE; + if ("attachment".equals(codeString)) + return QuestionnaireItemType.ATTACHMENT; + if ("reference".equals(codeString)) + return QuestionnaireItemType.REFERENCE; + if ("quantity".equals(codeString)) + return QuestionnaireItemType.QUANTITY; + throw new IllegalArgumentException("Unknown QuestionnaireItemType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.GROUP); + if ("display".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.DISPLAY); + if ("question".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.QUESTION); + if ("boolean".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.BOOLEAN); + if ("decimal".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.DECIMAL); + if ("integer".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.INTEGER); + if ("date".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.DATE); + if ("dateTime".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.DATETIME); + if ("instant".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.INSTANT); + if ("time".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.TIME); + if ("string".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.STRING); + if ("text".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.TEXT); + if ("url".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.URL); + if ("choice".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.CHOICE); + if ("open-choice".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.OPENCHOICE); + if ("attachment".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.ATTACHMENT); + if ("reference".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.REFERENCE); + if ("quantity".equals(codeString)) + return new Enumeration(this, QuestionnaireItemType.QUANTITY); + throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); + } + public String toCode(QuestionnaireItemType code) { + if (code == QuestionnaireItemType.GROUP) + return "group"; + if (code == QuestionnaireItemType.DISPLAY) + return "display"; + if (code == QuestionnaireItemType.QUESTION) + return "question"; + if (code == QuestionnaireItemType.BOOLEAN) + return "boolean"; + if (code == QuestionnaireItemType.DECIMAL) + return "decimal"; + if (code == QuestionnaireItemType.INTEGER) + return "integer"; + if (code == QuestionnaireItemType.DATE) + return "date"; + if (code == QuestionnaireItemType.DATETIME) + return "dateTime"; + if (code == QuestionnaireItemType.INSTANT) + return "instant"; + if (code == QuestionnaireItemType.TIME) + return "time"; + if (code == QuestionnaireItemType.STRING) + return "string"; + if (code == QuestionnaireItemType.TEXT) + return "text"; + if (code == QuestionnaireItemType.URL) + return "url"; + if (code == QuestionnaireItemType.CHOICE) + return "choice"; + if (code == QuestionnaireItemType.OPENCHOICE) + return "open-choice"; + if (code == QuestionnaireItemType.ATTACHMENT) + return "attachment"; + if (code == QuestionnaireItemType.REFERENCE) + return "reference"; + if (code == QuestionnaireItemType.QUANTITY) + return "quantity"; + return "?"; + } + } + + @Block() + public static class QuestionnaireItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. + */ + @Child(name = "linkId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="To link questionnaire with questionnaire response", formalDefinition="An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource." ) + protected StringType linkId; + + /** + * Identifies a how this group of questions is known in a particular terminology such as LOINC. + */ + @Child(name = "concept", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Concept that represents this item within in a questionnaire", formalDefinition="Identifies a how this group of questions is known in a particular terminology such as LOINC." ) + protected List concept; + + /** + * The name of a section, the text of a question or text content for a text item. + */ + @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Primary text for the item", formalDefinition="The name of a section, the text of a question or text content for a text item." ) + protected StringType text; + + /** + * Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). + */ + @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="group | display | boolean | decimal | integer | date | dateTime +", formalDefinition="Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.)." ) + protected Enumeration type; + + /** + * If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. + */ + @Child(name = "required", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the group must be included in data results", formalDefinition="If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire." ) + protected BooleanType required; + + /** + * Whether the item may occur multiple times in the instance, containing multiple sets of answers. + */ + @Child(name = "repeats", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the group may repeat", formalDefinition="Whether the item may occur multiple times in the instance, containing multiple sets of answers." ) + protected BooleanType repeats; + + /** + * Reference to a value set containing a list of codes representing permitted answers for the question. + */ + @Child(name = "options", type = {ValueSet.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Valueset containing permitted answers", formalDefinition="Reference to a value set containing a list of codes representing permitted answers for the question." ) + protected Reference options; + + /** + * The actual object that is the target of the reference (Reference to a value set containing a list of codes representing permitted answers for the question.) + */ + protected ValueSet optionsTarget; + + /** + * For a "choice" question, identifies one of the permitted answers for the question. + */ + @Child(name = "option", type = {Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Permitted answer", formalDefinition="For a \"choice\" question, identifies one of the permitted answers for the question." ) + protected List option; + + /** + * Allows text, questions and other groups to be nested beneath a question or group. + */ + @Child(name = "item", type = {QuestionnaireItemComponent.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested questionnaire items", formalDefinition="Allows text, questions and other groups to be nested beneath a question or group." ) + protected List item; + + private static final long serialVersionUID = 10326314L; + + /* + * Constructor + */ + public QuestionnaireItemComponent() { + super(); + } + + /* + * Constructor + */ + public QuestionnaireItemComponent(Enumeration type) { + super(); + this.type = type; + } + + /** + * @return {@link #linkId} (An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value + */ + public StringType getLinkIdElement() { + if (this.linkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.linkId"); + else if (Configuration.doAutoCreate()) + this.linkId = new StringType(); // bb + return this.linkId; + } + + public boolean hasLinkIdElement() { + return this.linkId != null && !this.linkId.isEmpty(); + } + + public boolean hasLinkId() { + return this.linkId != null && !this.linkId.isEmpty(); + } + + /** + * @param value {@link #linkId} (An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value + */ + public QuestionnaireItemComponent setLinkIdElement(StringType value) { + this.linkId = value; + return this; + } + + /** + * @return An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. + */ + public String getLinkId() { + return this.linkId == null ? null : this.linkId.getValue(); + } + + /** + * @param value An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. + */ + public QuestionnaireItemComponent setLinkId(String value) { + if (Utilities.noString(value)) + this.linkId = null; + else { + if (this.linkId == null) + this.linkId = new StringType(); + this.linkId.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (Identifies a how this group of questions is known in a particular terminology such as LOINC.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (Coding item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Identifies a how this group of questions is known in a particular terminology such as LOINC.) + */ + // syntactic sugar + public Coding addConcept() { //3 + Coding t = new Coding(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireItemComponent addConcept(Coding t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #text} (The name of a section, the text of a question or text content for a text item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (The name of a section, the text of a question or text content for a text item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public QuestionnaireItemComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return The name of a section, the text of a question or text content for a text item. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value The name of a section, the text of a question or text content for a text item. + */ + public QuestionnaireItemComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new QuestionnaireItemTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public QuestionnaireItemComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). + */ + public QuestionnaireItemType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). + */ + public QuestionnaireItemComponent setType(QuestionnaireItemType value) { + if (this.type == null) + this.type = new Enumeration(new QuestionnaireItemTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #required} (If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public BooleanType getRequiredElement() { + if (this.required == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.required"); + else if (Configuration.doAutoCreate()) + this.required = new BooleanType(); // bb + return this.required; + } + + public boolean hasRequiredElement() { + return this.required != null && !this.required.isEmpty(); + } + + public boolean hasRequired() { + return this.required != null && !this.required.isEmpty(); + } + + /** + * @param value {@link #required} (If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public QuestionnaireItemComponent setRequiredElement(BooleanType value) { + this.required = value; + return this; + } + + /** + * @return If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. + */ + public boolean getRequired() { + return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); + } + + /** + * @param value If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. + */ + public QuestionnaireItemComponent setRequired(boolean value) { + if (this.required == null) + this.required = new BooleanType(); + this.required.setValue(value); + return this; + } + + /** + * @return {@link #repeats} (Whether the item may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value + */ + public BooleanType getRepeatsElement() { + if (this.repeats == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.repeats"); + else if (Configuration.doAutoCreate()) + this.repeats = new BooleanType(); // bb + return this.repeats; + } + + public boolean hasRepeatsElement() { + return this.repeats != null && !this.repeats.isEmpty(); + } + + public boolean hasRepeats() { + return this.repeats != null && !this.repeats.isEmpty(); + } + + /** + * @param value {@link #repeats} (Whether the item may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value + */ + public QuestionnaireItemComponent setRepeatsElement(BooleanType value) { + this.repeats = value; + return this; + } + + /** + * @return Whether the item may occur multiple times in the instance, containing multiple sets of answers. + */ + public boolean getRepeats() { + return this.repeats == null || this.repeats.isEmpty() ? false : this.repeats.getValue(); + } + + /** + * @param value Whether the item may occur multiple times in the instance, containing multiple sets of answers. + */ + public QuestionnaireItemComponent setRepeats(boolean value) { + if (this.repeats == null) + this.repeats = new BooleanType(); + this.repeats.setValue(value); + return this; + } + + /** + * @return {@link #options} (Reference to a value set containing a list of codes representing permitted answers for the question.) + */ + public Reference getOptions() { + if (this.options == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); + else if (Configuration.doAutoCreate()) + this.options = new Reference(); // cc + return this.options; + } + + public boolean hasOptions() { + return this.options != null && !this.options.isEmpty(); + } + + /** + * @param value {@link #options} (Reference to a value set containing a list of codes representing permitted answers for the question.) + */ + public QuestionnaireItemComponent setOptions(Reference value) { + this.options = value; + return this; + } + + /** + * @return {@link #options} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to a value set containing a list of codes representing permitted answers for the question.) + */ + public ValueSet getOptionsTarget() { + if (this.optionsTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); + else if (Configuration.doAutoCreate()) + this.optionsTarget = new ValueSet(); // aa + return this.optionsTarget; + } + + /** + * @param value {@link #options} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to a value set containing a list of codes representing permitted answers for the question.) + */ + public QuestionnaireItemComponent setOptionsTarget(ValueSet value) { + this.optionsTarget = value; + return this; + } + + /** + * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) + */ + public List getOption() { + if (this.option == null) + this.option = new ArrayList(); + return this.option; + } + + public boolean hasOption() { + if (this.option == null) + return false; + for (Coding item : this.option) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) + */ + // syntactic sugar + public Coding addOption() { //3 + Coding t = new Coding(); + if (this.option == null) + this.option = new ArrayList(); + this.option.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireItemComponent addOption(Coding t) { //3 + if (t == null) + return this; + if (this.option == null) + this.option = new ArrayList(); + this.option.add(t); + return this; + } + + /** + * @return {@link #item} (Allows text, questions and other groups to be nested beneath a question or group.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (QuestionnaireItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (Allows text, questions and other groups to be nested beneath a question or group.) + */ + // syntactic sugar + public QuestionnaireItemComponent addItem() { //3 + QuestionnaireItemComponent t = new QuestionnaireItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireItemComponent addItem(QuestionnaireItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("linkId", "string", "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); + childrenList.add(new Property("concept", "Coding", "Identifies a how this group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("text", "string", "The name of a section, the text of a question or text content for a text item.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("type", "code", "Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("required", "boolean", "If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("repeats", "boolean", "Whether the item may occur multiple times in the instance, containing multiple sets of answers.", 0, java.lang.Integer.MAX_VALUE, repeats)); + childrenList.add(new Property("options", "Reference(ValueSet)", "Reference to a value set containing a list of codes representing permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, options)); + childrenList.add(new Property("option", "Coding", "For a \"choice\" question, identifies one of the permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, option)); + childrenList.add(new Property("item", "@Questionnaire.item", "Allows text, questions and other groups to be nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("linkId")) + this.linkId = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add(castToCoding(value)); + else if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("type")) + this.type = new QuestionnaireItemTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("required")) + this.required = castToBoolean(value); // BooleanType + else if (name.equals("repeats")) + this.repeats = castToBoolean(value); // BooleanType + else if (name.equals("options")) + this.options = castToReference(value); // Reference + else if (name.equals("option")) + this.getOption().add(castToCoding(value)); + else if (name.equals("item")) + this.getItem().add((QuestionnaireItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("linkId")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.linkId"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.text"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.type"); + } + else if (name.equals("required")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.required"); + } + else if (name.equals("repeats")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.repeats"); + } + else if (name.equals("options")) { + this.options = new Reference(); + return this.options; + } + else if (name.equals("option")) { + return addOption(); + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public QuestionnaireItemComponent copy() { + QuestionnaireItemComponent dst = new QuestionnaireItemComponent(); + copyValues(dst); + dst.linkId = linkId == null ? null : linkId.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (Coding i : concept) + dst.concept.add(i.copy()); + }; + dst.text = text == null ? null : text.copy(); + dst.type = type == null ? null : type.copy(); + dst.required = required == null ? null : required.copy(); + dst.repeats = repeats == null ? null : repeats.copy(); + dst.options = options == null ? null : options.copy(); + if (option != null) { + dst.option = new ArrayList(); + for (Coding i : option) + dst.option.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (QuestionnaireItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireItemComponent)) + return false; + QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; + return compareDeep(linkId, o.linkId, true) && compareDeep(concept, o.concept, true) && compareDeep(text, o.text, true) + && compareDeep(type, o.type, true) && compareDeep(required, o.required, true) && compareDeep(repeats, o.repeats, true) + && compareDeep(options, o.options, true) && compareDeep(option, o.option, true) && compareDeep(item, o.item, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireItemComponent)) + return false; + QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; + return compareValues(linkId, o.linkId, true) && compareValues(text, o.text, true) && compareValues(type, o.type, true) + && compareValues(required, o.required, true) && compareValues(repeats, o.repeats, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (concept == null || concept.isEmpty()) + && (text == null || text.isEmpty()) && (type == null || type.isEmpty()) && (required == null || required.isEmpty()) + && (repeats == null || repeats.isEmpty()) && (options == null || options.isEmpty()) && (option == null || option.isEmpty()) + && (item == null || item.isEmpty()); + } + + public String fhirType() { + return "Questionnaire.item"; + + } + + } + + /** + * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External identifiers for this questionnaire", formalDefinition="This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) + protected List identifier; + + /** + * The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier for this version of Questionnaire", formalDefinition="The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated." ) + protected StringType version; + + /** + * The lifecycle status of the questionnaire as a whole. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | published | retired", formalDefinition="The lifecycle status of the questionnaire as a whole." ) + protected Enumeration status; + + /** + * The date that this questionnaire was last changed. + */ + @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date this version was authored", formalDefinition="The date that this questionnaire was last changed." ) + protected DateTimeType date; + + /** + * Organization or person responsible for developing and maintaining the questionnaire. + */ + @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization/individual who designed the questionnaire", formalDefinition="Organization or person responsible for developing and maintaining the questionnaire." ) + protected StringType publisher; + + /** + * Contact details to assist a user in finding and communicating with the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) + protected List telecom; + + /** + * The name or label associated with this questionnaire. + */ + @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name for the questionnaire", formalDefinition="The name or label associated with this questionnaire." ) + protected StringType title; + + /** + * Identifies a how this question or group of questions is known in a particular terminology such as LOINC. + */ + @Child(name = "concept", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Concept that represents the overall questionnaire", formalDefinition="Identifies a how this question or group of questions is known in a particular terminology such as LOINC." ) + protected List concept; + + /** + * Identifies the types of subjects that can be the subject of the questionnaire. + */ + @Child(name = "subjectType", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Resource that can be subject of QuestionnaireResponse", formalDefinition="Identifies the types of subjects that can be the subject of the questionnaire." ) + protected List subjectType; + + /** + * The questions and groupings of questions that make up the questionnaire. + */ + @Child(name = "item", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Questions and sections within the Questionnaire", formalDefinition="The questions and groupings of questions that make up the questionnaire." ) + protected List item; + + private static final long serialVersionUID = 154986016L; + + /* + * Constructor + */ + public Questionnaire() { + super(); + } + + /* + * Constructor + */ + public Questionnaire(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Questionnaire addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public Questionnaire setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. + */ + public Questionnaire setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The lifecycle status of the questionnaire as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new QuestionnaireStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The lifecycle status of the questionnaire as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Questionnaire setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The lifecycle status of the questionnaire as a whole. + */ + public QuestionnaireStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The lifecycle status of the questionnaire as a whole. + */ + public Questionnaire setStatus(QuestionnaireStatus value) { + if (this.status == null) + this.status = new Enumeration(new QuestionnaireStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #date} (The date that this questionnaire was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date that this questionnaire was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public Questionnaire setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date that this questionnaire was last changed. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date that this questionnaire was last changed. + */ + public Questionnaire setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public Questionnaire setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return Organization or person responsible for developing and maintaining the questionnaire. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value Organization or person responsible for developing and maintaining the questionnaire. + */ + public Questionnaire setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public Questionnaire addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #title} (The name or label associated with this questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The name or label associated with this questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public Questionnaire setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The name or label associated with this questionnaire. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The name or label associated with this questionnaire. + */ + public Questionnaire setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (Identifies a how this question or group of questions is known in a particular terminology such as LOINC.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (Coding item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Identifies a how this question or group of questions is known in a particular terminology such as LOINC.) + */ + // syntactic sugar + public Coding addConcept() { //3 + Coding t = new Coding(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public Questionnaire addConcept(Coding t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) + */ + public List getSubjectType() { + if (this.subjectType == null) + this.subjectType = new ArrayList(); + return this.subjectType; + } + + public boolean hasSubjectType() { + if (this.subjectType == null) + return false; + for (CodeType item : this.subjectType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) + */ + // syntactic sugar + public CodeType addSubjectTypeElement() {//2 + CodeType t = new CodeType(); + if (this.subjectType == null) + this.subjectType = new ArrayList(); + this.subjectType.add(t); + return t; + } + + /** + * @param value {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) + */ + public Questionnaire addSubjectType(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.subjectType == null) + this.subjectType = new ArrayList(); + this.subjectType.add(t); + return this; + } + + /** + * @param value {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) + */ + public boolean hasSubjectType(String value) { + if (this.subjectType == null) + return false; + for (CodeType v : this.subjectType) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #item} (The questions and groupings of questions that make up the questionnaire.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (QuestionnaireItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (The questions and groupings of questions that make up the questionnaire.) + */ + // syntactic sugar + public QuestionnaireItemComponent addItem() { //3 + QuestionnaireItemComponent t = new QuestionnaireItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public Questionnaire addItem(QuestionnaireItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("date", "dateTime", "The date that this questionnaire was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("title", "string", "The name or label associated with this questionnaire.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("concept", "Coding", "Identifies a how this question or group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("subjectType", "code", "Identifies the types of subjects that can be the subject of the questionnaire.", 0, java.lang.Integer.MAX_VALUE, subjectType)); + childrenList.add(new Property("item", "", "The questions and groupings of questions that make up the questionnaire.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("status")) + this.status = new QuestionnaireStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add(castToCoding(value)); + else if (name.equals("subjectType")) + this.getSubjectType().add(castToCode(value)); + else if (name.equals("item")) + this.getItem().add((QuestionnaireItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.version"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.status"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.date"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.publisher"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.title"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("subjectType")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.subjectType"); + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Questionnaire"; + + } + + public Questionnaire copy() { + Questionnaire dst = new Questionnaire(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.status = status == null ? null : status.copy(); + dst.date = date == null ? null : date.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.title = title == null ? null : title.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (Coding i : concept) + dst.concept.add(i.copy()); + }; + if (subjectType != null) { + dst.subjectType = new ArrayList(); + for (CodeType i : subjectType) + dst.subjectType.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (QuestionnaireItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + protected Questionnaire typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Questionnaire)) + return false; + Questionnaire o = (Questionnaire) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(status, o.status, true) + && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) + && compareDeep(title, o.title, true) && compareDeep(concept, o.concept, true) && compareDeep(subjectType, o.subjectType, true) + && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Questionnaire)) + return false; + Questionnaire o = (Questionnaire) other; + return compareValues(version, o.version, true) && compareValues(status, o.status, true) && compareValues(date, o.date, true) + && compareValues(publisher, o.publisher, true) && compareValues(title, o.title, true) && compareValues(subjectType, o.subjectType, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) + && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (telecom == null || telecom.isEmpty()) && (title == null || title.isEmpty()) && (concept == null || concept.isEmpty()) + && (subjectType == null || subjectType.isEmpty()) && (item == null || item.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Questionnaire; + } + + @SearchParamDefinition(name="date", path="Questionnaire.date", description="When the questionnaire was last changed", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="Questionnaire.item.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="The author of the questionnaire", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="title", path="Questionnaire.title", description="All or part of the name of the questionnaire", type="string" ) + public static final String SP_TITLE = "title"; + @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/QuestionnaireResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/QuestionnaireResponse.java new file mode 100644 index 00000000000..90d3ce3e6cc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/QuestionnaireResponse.java @@ -0,0 +1,1517 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ +@ResourceDef(name="QuestionnaireResponse", profile="http://hl7.org/fhir/Profile/QuestionnaireResponse") +public class QuestionnaireResponse extends DomainResource { + + public enum QuestionnaireResponseStatus { + /** + * This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it. + */ + INPROGRESS, + /** + * This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive. + */ + COMPLETED, + /** + * This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards. + */ + AMENDED, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireResponseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("amended".equals(codeString)) + return AMENDED; + throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case AMENDED: return "amended"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/questionnaire-answers-status"; + case COMPLETED: return "http://hl7.org/fhir/questionnaire-answers-status"; + case AMENDED: return "http://hl7.org/fhir/questionnaire-answers-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it."; + case COMPLETED: return "This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive."; + case AMENDED: return "This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case AMENDED: return "Amended"; + default: return "?"; + } + } + } + + public static class QuestionnaireResponseStatusEnumFactory implements EnumFactory { + public QuestionnaireResponseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return QuestionnaireResponseStatus.INPROGRESS; + if ("completed".equals(codeString)) + return QuestionnaireResponseStatus.COMPLETED; + if ("amended".equals(codeString)) + return QuestionnaireResponseStatus.AMENDED; + throw new IllegalArgumentException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, QuestionnaireResponseStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, QuestionnaireResponseStatus.COMPLETED); + if ("amended".equals(codeString)) + return new Enumeration(this, QuestionnaireResponseStatus.AMENDED); + throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); + } + public String toCode(QuestionnaireResponseStatus code) { + if (code == QuestionnaireResponseStatus.INPROGRESS) + return "in-progress"; + if (code == QuestionnaireResponseStatus.COMPLETED) + return "completed"; + if (code == QuestionnaireResponseStatus.AMENDED) + return "amended"; + return "?"; + } + } + + @Block() + public static class QuestionnaireResponseItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. + */ + @Child(name = "linkId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Corresponding item within Questionnaire", formalDefinition="Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource." ) + protected StringType linkId; + + /** + * Text that is displayed above the contents of the group or as the text of the question being answered. + */ + @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name for group or question text", formalDefinition="Text that is displayed above the contents of the group or as the text of the question being answered." ) + protected StringType text; + + /** + * More specific subject this section's answers are about, details the subject given in QuestionnaireResponse. + */ + @Child(name = "subject", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The subject this group's answers are about", formalDefinition="More specific subject this section's answers are about, details the subject given in QuestionnaireResponse." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) + */ + protected Resource subjectTarget; + + /** + * The respondent's answer(s) to the question. + */ + @Child(name = "answer", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The response(s) to the question", formalDefinition="The respondent's answer(s) to the question." ) + protected List answer; + + /** + * Questions or sub-groups nested beneath a question or group. + */ + @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested questionnaire response items", formalDefinition="Questions or sub-groups nested beneath a question or group." ) + protected List item; + + private static final long serialVersionUID = 1059526517L; + + /* + * Constructor + */ + public QuestionnaireResponseItemComponent() { + super(); + } + + /** + * @return {@link #linkId} (Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value + */ + public StringType getLinkIdElement() { + if (this.linkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.linkId"); + else if (Configuration.doAutoCreate()) + this.linkId = new StringType(); // bb + return this.linkId; + } + + public boolean hasLinkIdElement() { + return this.linkId != null && !this.linkId.isEmpty(); + } + + public boolean hasLinkId() { + return this.linkId != null && !this.linkId.isEmpty(); + } + + /** + * @param value {@link #linkId} (Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value + */ + public QuestionnaireResponseItemComponent setLinkIdElement(StringType value) { + this.linkId = value; + return this; + } + + /** + * @return Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. + */ + public String getLinkId() { + return this.linkId == null ? null : this.linkId.getValue(); + } + + /** + * @param value Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. + */ + public QuestionnaireResponseItemComponent setLinkId(String value) { + if (Utilities.noString(value)) + this.linkId = null; + else { + if (this.linkId == null) + this.linkId = new StringType(); + this.linkId.setValue(value); + } + return this; + } + + /** + * @return {@link #text} (Text that is displayed above the contents of the group or as the text of the question being answered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Text that is displayed above the contents of the group or as the text of the question being answered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public QuestionnaireResponseItemComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Text that is displayed above the contents of the group or as the text of the question being answered. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Text that is displayed above the contents of the group or as the text of the question being answered. + */ + public QuestionnaireResponseItemComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) + */ + public QuestionnaireResponseItemComponent setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) + */ + public QuestionnaireResponseItemComponent setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #answer} (The respondent's answer(s) to the question.) + */ + public List getAnswer() { + if (this.answer == null) + this.answer = new ArrayList(); + return this.answer; + } + + public boolean hasAnswer() { + if (this.answer == null) + return false; + for (QuestionnaireResponseItemAnswerComponent item : this.answer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #answer} (The respondent's answer(s) to the question.) + */ + // syntactic sugar + public QuestionnaireResponseItemAnswerComponent addAnswer() { //3 + QuestionnaireResponseItemAnswerComponent t = new QuestionnaireResponseItemAnswerComponent(); + if (this.answer == null) + this.answer = new ArrayList(); + this.answer.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireResponseItemComponent addAnswer(QuestionnaireResponseItemAnswerComponent t) { //3 + if (t == null) + return this; + if (this.answer == null) + this.answer = new ArrayList(); + this.answer.add(t); + return this; + } + + /** + * @return {@link #item} (Questions or sub-groups nested beneath a question or group.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (QuestionnaireResponseItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (Questions or sub-groups nested beneath a question or group.) + */ + // syntactic sugar + public QuestionnaireResponseItemComponent addItem() { //3 + QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireResponseItemComponent addItem(QuestionnaireResponseItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("linkId", "string", "Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); + childrenList.add(new Property("text", "string", "Text that is displayed above the contents of the group or as the text of the question being answered.", 0, java.lang.Integer.MAX_VALUE, text)); + childrenList.add(new Property("subject", "Reference(Any)", "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer)); + childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Questions or sub-groups nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("linkId")) + this.linkId = castToString(value); // StringType + else if (name.equals("text")) + this.text = castToString(value); // StringType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("answer")) + this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); + else if (name.equals("item")) + this.getItem().add((QuestionnaireResponseItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("linkId")) { + throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.linkId"); + } + else if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.text"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("answer")) { + return addAnswer(); + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public QuestionnaireResponseItemComponent copy() { + QuestionnaireResponseItemComponent dst = new QuestionnaireResponseItemComponent(); + copyValues(dst); + dst.linkId = linkId == null ? null : linkId.copy(); + dst.text = text == null ? null : text.copy(); + dst.subject = subject == null ? null : subject.copy(); + if (answer != null) { + dst.answer = new ArrayList(); + for (QuestionnaireResponseItemAnswerComponent i : answer) + dst.answer.add(i.copy()); + }; + if (item != null) { + dst.item = new ArrayList(); + for (QuestionnaireResponseItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireResponseItemComponent)) + return false; + QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; + return compareDeep(linkId, o.linkId, true) && compareDeep(text, o.text, true) && compareDeep(subject, o.subject, true) + && compareDeep(answer, o.answer, true) && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireResponseItemComponent)) + return false; + QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; + return compareValues(linkId, o.linkId, true) && compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (text == null || text.isEmpty()) + && (subject == null || subject.isEmpty()) && (answer == null || answer.isEmpty()) && (item == null || item.isEmpty()) + ; + } + + public String fhirType() { + return "QuestionnaireResponse.item"; + + } + + } + + @Block() + public static class QuestionnaireResponseItemAnswerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The answer (or one of the answers) provided by the respondent to the question. + */ + @Child(name = "value", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondent to the question." ) + protected Type value; + + /** + * Nested groups and/or questions found within this particular answer. + */ + @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested groups and questions", formalDefinition="Nested groups and/or questions found within this particular answer." ) + protected List item; + + private static final long serialVersionUID = 2052422636L; + + /* + * Constructor + */ + public QuestionnaireResponseItemAnswerComponent() { + super(); + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public DecimalType getValueDecimalType() throws FHIRException { + if (!(this.value instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DecimalType) this.value; + } + + public boolean hasValueDecimalType() { + return this.value instanceof DecimalType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public DateType getValueDateType() throws FHIRException { + if (!(this.value instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateType) this.value; + } + + public boolean hasValueDateType() { + return this.value instanceof DateType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public InstantType getValueInstantType() throws FHIRException { + if (!(this.value instanceof InstantType)) + throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (InstantType) this.value; + } + + public boolean hasValueInstantType() { + return this.value instanceof InstantType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public TimeType getValueTimeType() throws FHIRException { + if (!(this.value instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (TimeType) this.value; + } + + public boolean hasValueTimeType() { + return this.value instanceof TimeType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public UriType getValueUriType() throws FHIRException { + if (!(this.value instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (UriType) this.value; + } + + public boolean hasValueUriType() { + return this.value instanceof UriType; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public Attachment getValueAttachment() throws FHIRException { + if (!(this.value instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Attachment) this.value; + } + + public boolean hasValueAttachment() { + return this.value instanceof Attachment; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public Coding getValueCoding() throws FHIRException { + if (!(this.value instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Coding) this.value; + } + + public boolean hasValueCoding() { + return this.value instanceof Coding; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public Quantity getValueQuantity() throws FHIRException { + if (!(this.value instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Quantity) this.value; + } + + public boolean hasValueQuantity() { + return this.value instanceof Quantity; + } + + /** + * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public Reference getValueReference() throws FHIRException { + if (!(this.value instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Reference) this.value; + } + + public boolean hasValueReference() { + return this.value instanceof Reference; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) + */ + public QuestionnaireResponseItemAnswerComponent setValue(Type value) { + this.value = value; + return this; + } + + /** + * @return {@link #item} (Nested groups and/or questions found within this particular answer.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (QuestionnaireResponseItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (Nested groups and/or questions found within this particular answer.) + */ + // syntactic sugar + public QuestionnaireResponseItemComponent addItem() { //3 + QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireResponseItemAnswerComponent addItem(QuestionnaireResponseItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The answer (or one of the answers) provided by the respondent to the question.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Nested groups and/or questions found within this particular answer.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value[x]")) + this.value = (Type) value; // Type + else if (name.equals("item")) + this.getItem().add((QuestionnaireResponseItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valueInstant")) { + this.value = new InstantType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueReference")) { + this.value = new Reference(); + return this.value; + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public QuestionnaireResponseItemAnswerComponent copy() { + QuestionnaireResponseItemAnswerComponent dst = new QuestionnaireResponseItemAnswerComponent(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (QuestionnaireResponseItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) + return false; + QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; + return compareDeep(value, o.value, true) && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) + return false; + QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (item == null || item.isEmpty()) + ; + } + + public String fhirType() { + return "QuestionnaireResponse.item.answer"; + + } + + } + + /** + * A business identifier assigned to a particular completed (or partially completed) questionnaire. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique id for this set of answers", formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) + protected Identifier identifier; + + /** + * Indicates the Questionnaire resource that defines the form for which answers are being provided. + */ + @Child(name = "questionnaire", type = {Questionnaire.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Form being answered", formalDefinition="Indicates the Questionnaire resource that defines the form for which answers are being provided." ) + protected Reference questionnaire; + + /** + * The actual object that is the target of the reference (Indicates the Questionnaire resource that defines the form for which answers are being provided.) + */ + protected Questionnaire questionnaireTarget; + + /** + * The lifecycle status of the questionnaire response as a whole. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | completed | amended", formalDefinition="The lifecycle status of the questionnaire response as a whole." ) + protected Enumeration status; + + /** + * The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information. + */ + @Child(name = "subject", type = {}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The subject of the questions", formalDefinition="The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.) + */ + protected Resource subjectTarget; + + /** + * Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system. + */ + @Child(name = "author", type = {Device.class, Practitioner.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Person who received and recorded the answers", formalDefinition="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) + */ + protected Resource authorTarget; + + /** + * The date and/or time that this version of the questionnaire response was authored. + */ + @Child(name = "authored", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date this version was authored", formalDefinition="The date and/or time that this version of the questionnaire response was authored." ) + protected DateTimeType authored; + + /** + * The person who answered the questions about the subject. + */ + @Child(name = "source", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (The person who answered the questions about the subject.) + */ + protected Resource sourceTarget; + + /** + * Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers. + */ + @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Primary encounter during which the answers were collected", formalDefinition="Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) + */ + protected Encounter encounterTarget; + + /** + * Corresponds to a group or question item from the original questionnaire. + */ + @Child(name = "item", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Groups and questions", formalDefinition="Corresponds to a group or question item from the original questionnaire." ) + protected List item; + + private static final long serialVersionUID = 850624885L; + + /* + * Constructor + */ + public QuestionnaireResponse() { + super(); + } + + /* + * Constructor + */ + public QuestionnaireResponse(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) + */ + public QuestionnaireResponse setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #questionnaire} (Indicates the Questionnaire resource that defines the form for which answers are being provided.) + */ + public Reference getQuestionnaire() { + if (this.questionnaire == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); + else if (Configuration.doAutoCreate()) + this.questionnaire = new Reference(); // cc + return this.questionnaire; + } + + public boolean hasQuestionnaire() { + return this.questionnaire != null && !this.questionnaire.isEmpty(); + } + + /** + * @param value {@link #questionnaire} (Indicates the Questionnaire resource that defines the form for which answers are being provided.) + */ + public QuestionnaireResponse setQuestionnaire(Reference value) { + this.questionnaire = value; + return this; + } + + /** + * @return {@link #questionnaire} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the Questionnaire resource that defines the form for which answers are being provided.) + */ + public Questionnaire getQuestionnaireTarget() { + if (this.questionnaireTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); + else if (Configuration.doAutoCreate()) + this.questionnaireTarget = new Questionnaire(); // aa + return this.questionnaireTarget; + } + + /** + * @param value {@link #questionnaire} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the Questionnaire resource that defines the form for which answers are being provided.) + */ + public QuestionnaireResponse setQuestionnaireTarget(Questionnaire value) { + this.questionnaireTarget = value; + return this; + } + + /** + * @return {@link #status} (The lifecycle status of the questionnaire response as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new QuestionnaireResponseStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The lifecycle status of the questionnaire response as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public QuestionnaireResponse setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The lifecycle status of the questionnaire response as a whole. + */ + public QuestionnaireResponseStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The lifecycle status of the questionnaire response as a whole. + */ + public QuestionnaireResponse setStatus(QuestionnaireResponseStatus value) { + if (this.status == null) + this.status = new Enumeration(new QuestionnaireResponseStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #subject} (The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.) + */ + public QuestionnaireResponse setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.) + */ + public QuestionnaireResponse setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) + */ + public QuestionnaireResponse setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) + */ + public QuestionnaireResponse setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #authored} (The date and/or time that this version of the questionnaire response was authored.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value + */ + public DateTimeType getAuthoredElement() { + if (this.authored == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.authored"); + else if (Configuration.doAutoCreate()) + this.authored = new DateTimeType(); // bb + return this.authored; + } + + public boolean hasAuthoredElement() { + return this.authored != null && !this.authored.isEmpty(); + } + + public boolean hasAuthored() { + return this.authored != null && !this.authored.isEmpty(); + } + + /** + * @param value {@link #authored} (The date and/or time that this version of the questionnaire response was authored.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value + */ + public QuestionnaireResponse setAuthoredElement(DateTimeType value) { + this.authored = value; + return this; + } + + /** + * @return The date and/or time that this version of the questionnaire response was authored. + */ + public Date getAuthored() { + return this.authored == null ? null : this.authored.getValue(); + } + + /** + * @param value The date and/or time that this version of the questionnaire response was authored. + */ + public QuestionnaireResponse setAuthored(Date value) { + if (value == null) + this.authored = null; + else { + if (this.authored == null) + this.authored = new DateTimeType(); + this.authored.setValue(value); + } + return this; + } + + /** + * @return {@link #source} (The person who answered the questions about the subject.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The person who answered the questions about the subject.) + */ + public QuestionnaireResponse setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) + */ + public Resource getSourceTarget() { + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) + */ + public QuestionnaireResponse setSourceTarget(Resource value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #encounter} (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) + */ + public QuestionnaireResponse setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireResponse.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) + */ + public QuestionnaireResponse setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #item} (Corresponds to a group or question item from the original questionnaire.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (QuestionnaireResponseItemComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (Corresponds to a group or question item from the original questionnaire.) + */ + // syntactic sugar + public QuestionnaireResponseItemComponent addItem() { //3 + QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireResponse addItem(QuestionnaireResponseItemComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A business identifier assigned to a particular completed (or partially completed) questionnaire.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("questionnaire", "Reference(Questionnaire)", "Indicates the Questionnaire resource that defines the form for which answers are being provided.", 0, java.lang.Integer.MAX_VALUE, questionnaire)); + childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire response as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("subject", "Reference(Any)", "The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("author", "Reference(Device|Practitioner|Patient|RelatedPerson)", "Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("authored", "dateTime", "The date and/or time that this version of the questionnaire response was authored.", 0, java.lang.Integer.MAX_VALUE, authored)); + childrenList.add(new Property("source", "Reference(Patient|Practitioner|RelatedPerson)", "The person who answered the questions about the subject.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("item", "", "Corresponds to a group or question item from the original questionnaire.", 0, java.lang.Integer.MAX_VALUE, item)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("questionnaire")) + this.questionnaire = castToReference(value); // Reference + else if (name.equals("status")) + this.status = new QuestionnaireResponseStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("authored")) + this.authored = castToDateTime(value); // DateTimeType + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("item")) + this.getItem().add((QuestionnaireResponseItemComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("questionnaire")) { + this.questionnaire = new Reference(); + return this.questionnaire; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.status"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("authored")) { + throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.authored"); + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("item")) { + return addItem(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "QuestionnaireResponse"; + + } + + public QuestionnaireResponse copy() { + QuestionnaireResponse dst = new QuestionnaireResponse(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.questionnaire = questionnaire == null ? null : questionnaire.copy(); + dst.status = status == null ? null : status.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.author = author == null ? null : author.copy(); + dst.authored = authored == null ? null : authored.copy(); + dst.source = source == null ? null : source.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (QuestionnaireResponseItemComponent i : item) + dst.item.add(i.copy()); + }; + return dst; + } + + protected QuestionnaireResponse typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireResponse)) + return false; + QuestionnaireResponse o = (QuestionnaireResponse) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(questionnaire, o.questionnaire, true) + && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true) && compareDeep(author, o.author, true) + && compareDeep(authored, o.authored, true) && compareDeep(source, o.source, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(item, o.item, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireResponse)) + return false; + QuestionnaireResponse o = (QuestionnaireResponse) other; + return compareValues(status, o.status, true) && compareValues(authored, o.authored, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (questionnaire == null || questionnaire.isEmpty()) + && (status == null || status.isEmpty()) && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) + && (authored == null || authored.isEmpty()) && (source == null || source.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (item == null || item.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.QuestionnaireResponse; + } + + @SearchParamDefinition(name="authored", path="QuestionnaireResponse.authored", description="When the questionnaire was authored", type="date" ) + public static final String SP_AUTHORED = "authored"; + @SearchParamDefinition(name="questionnaire", path="QuestionnaireResponse.questionnaire", description="The questionnaire the answers are provided for", type="reference" ) + public static final String SP_QUESTIONNAIRE = "questionnaire"; + @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire", type="reference" ) + public static final String SP_AUTHOR = "author"; + @SearchParamDefinition(name="patient", path="QuestionnaireResponse.subject", description="The patient that is the subject of the questionnaire", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="encounter", path="QuestionnaireResponse.encounter", description="Encounter during which questionnaire was authored", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="The person who answered the questions", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="status", path="QuestionnaireResponse.status", description="The status of the questionnaire response", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Range.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Range.java new file mode 100644 index 00000000000..3f7e5588af6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Range.java @@ -0,0 +1,193 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A set of ordered Quantities defined by a low and high limit. + */ +@DatatypeDef(name="Range") +public class Range extends Type implements ICompositeType { + + /** + * The low limit. The boundary is inclusive. + */ + @Child(name = "low", type = {SimpleQuantity.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Low limit", formalDefinition="The low limit. The boundary is inclusive." ) + protected SimpleQuantity low; + + /** + * The high limit. The boundary is inclusive. + */ + @Child(name = "high", type = {SimpleQuantity.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="High limit", formalDefinition="The high limit. The boundary is inclusive." ) + protected SimpleQuantity high; + + private static final long serialVersionUID = 1699187994L; + + /* + * Constructor + */ + public Range() { + super(); + } + + /** + * @return {@link #low} (The low limit. The boundary is inclusive.) + */ + public SimpleQuantity getLow() { + if (this.low == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Range.low"); + else if (Configuration.doAutoCreate()) + this.low = new SimpleQuantity(); // cc + return this.low; + } + + public boolean hasLow() { + return this.low != null && !this.low.isEmpty(); + } + + /** + * @param value {@link #low} (The low limit. The boundary is inclusive.) + */ + public Range setLow(SimpleQuantity value) { + this.low = value; + return this; + } + + /** + * @return {@link #high} (The high limit. The boundary is inclusive.) + */ + public SimpleQuantity getHigh() { + if (this.high == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Range.high"); + else if (Configuration.doAutoCreate()) + this.high = new SimpleQuantity(); // cc + return this.high; + } + + public boolean hasHigh() { + return this.high != null && !this.high.isEmpty(); + } + + /** + * @param value {@link #high} (The high limit. The boundary is inclusive.) + */ + public Range setHigh(SimpleQuantity value) { + this.high = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("low", "SimpleQuantity", "The low limit. The boundary is inclusive.", 0, java.lang.Integer.MAX_VALUE, low)); + childrenList.add(new Property("high", "SimpleQuantity", "The high limit. The boundary is inclusive.", 0, java.lang.Integer.MAX_VALUE, high)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("low")) + this.low = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("high")) + this.high = castToSimpleQuantity(value); // SimpleQuantity + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("low")) { + this.low = new SimpleQuantity(); + return this.low; + } + else if (name.equals("high")) { + this.high = new SimpleQuantity(); + return this.high; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Range"; + + } + + public Range copy() { + Range dst = new Range(); + copyValues(dst); + dst.low = low == null ? null : low.copy(); + dst.high = high == null ? null : high.copy(); + return dst; + } + + protected Range typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Range)) + return false; + Range o = (Range) other; + return compareDeep(low, o.low, true) && compareDeep(high, o.high, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Range)) + return false; + Range o = (Range) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (low == null || low.isEmpty()) && (high == null || high.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Ratio.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Ratio.java new file mode 100644 index 00000000000..b96b0f1f2ad --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Ratio.java @@ -0,0 +1,194 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A relationship of two Quantity values - expressed as a numerator and a denominator. + */ +@DatatypeDef(name="Ratio") +public class Ratio extends Type implements ICompositeType { + + /** + * The value of the numerator. + */ + @Child(name = "numerator", type = {Quantity.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Numerator value", formalDefinition="The value of the numerator." ) + protected Quantity numerator; + + /** + * The value of the denominator. + */ + @Child(name = "denominator", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Denominator value", formalDefinition="The value of the denominator." ) + protected Quantity denominator; + + private static final long serialVersionUID = 479922563L; + + /* + * Constructor + */ + public Ratio() { + super(); + } + + /** + * @return {@link #numerator} (The value of the numerator.) + */ + public Quantity getNumerator() { + if (this.numerator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Ratio.numerator"); + else if (Configuration.doAutoCreate()) + this.numerator = new Quantity(); // cc + return this.numerator; + } + + public boolean hasNumerator() { + return this.numerator != null && !this.numerator.isEmpty(); + } + + /** + * @param value {@link #numerator} (The value of the numerator.) + */ + public Ratio setNumerator(Quantity value) { + this.numerator = value; + return this; + } + + /** + * @return {@link #denominator} (The value of the denominator.) + */ + public Quantity getDenominator() { + if (this.denominator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Ratio.denominator"); + else if (Configuration.doAutoCreate()) + this.denominator = new Quantity(); // cc + return this.denominator; + } + + public boolean hasDenominator() { + return this.denominator != null && !this.denominator.isEmpty(); + } + + /** + * @param value {@link #denominator} (The value of the denominator.) + */ + public Ratio setDenominator(Quantity value) { + this.denominator = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("numerator", "Quantity", "The value of the numerator.", 0, java.lang.Integer.MAX_VALUE, numerator)); + childrenList.add(new Property("denominator", "Quantity", "The value of the denominator.", 0, java.lang.Integer.MAX_VALUE, denominator)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("numerator")) + this.numerator = castToQuantity(value); // Quantity + else if (name.equals("denominator")) + this.denominator = castToQuantity(value); // Quantity + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("numerator")) { + this.numerator = new Quantity(); + return this.numerator; + } + else if (name.equals("denominator")) { + this.denominator = new Quantity(); + return this.denominator; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Ratio"; + + } + + public Ratio copy() { + Ratio dst = new Ratio(); + copyValues(dst); + dst.numerator = numerator == null ? null : numerator.copy(); + dst.denominator = denominator == null ? null : denominator.copy(); + return dst; + } + + protected Ratio typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Ratio)) + return false; + Ratio o = (Ratio) other; + return compareDeep(numerator, o.numerator, true) && compareDeep(denominator, o.denominator, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Ratio)) + return false; + Ratio o = (Ratio) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (numerator == null || numerator.isEmpty()) && (denominator == null || denominator.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Reference.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Reference.java new file mode 100644 index 00000000000..0d0907236b7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Reference.java @@ -0,0 +1,260 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A reference from one resource to another. + */ +@DatatypeDef(name="Reference") +public class Reference extends BaseReference implements IBaseReference, ICompositeType { + + /** + * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + @Child(name = "reference", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Relative, internal or absolute URL reference", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) + protected StringType reference; + + /** + * Plain text narrative that identifies the resource in addition to the resource reference. + */ + @Child(name = "display", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) + protected StringType display; + + private static final long serialVersionUID = 22777321L; + + /* + * Constructor + */ + public Reference() { + super(); + } + + /** + * Constructor + * + * @param theReference The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123") + */ + public Reference(String theReference) { + super(theReference); + } + + /** + * Constructor + * + * @param theReference The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123") + */ + public Reference(IdType theReference) { + super(theReference); + } + + /** + * Constructor + * + * @param theResource The resource represented by this reference + */ + public Reference(IAnyResource theResource) { + super(theResource); + } + + /** + * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public Reference setReferenceElement(StringType value) { + this.reference = value; + return this; + } + + /** + * @return A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + public Reference setReference(String value) { + if (Utilities.noString(value)) + this.reference = null; + else { + if (this.reference == null) + this.reference = new StringType(); + this.reference.setValue(value); + } + return this; + } + + /** + * @return {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Reference.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public Reference setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return Plain text narrative that identifies the resource in addition to the resource reference. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value Plain text narrative that identifies the resource in addition to the resource reference. + */ + public Reference setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, java.lang.Integer.MAX_VALUE, display)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("reference")) + this.reference = castToString(value); // StringType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("reference")) { + throw new FHIRException("Cannot call addChild on a primitive type Reference.reference"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type Reference.display"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Reference"; + + } + + public Reference copy() { + Reference dst = new Reference(); + copyValues(dst); + dst.reference = reference == null ? null : reference.copy(); + dst.display = display == null ? null : display.copy(); + return dst; + } + + protected Reference typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Reference)) + return false; + Reference o = (Reference) other; + return compareDeep(reference, o.reference, true) && compareDeep(display, o.display, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Reference)) + return false; + Reference o = (Reference) other; + return compareValues(reference, o.reference, true) && compareValues(display, o.display, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (reference == null || reference.isEmpty()) && (display == null || display.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ReferralRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ReferralRequest.java new file mode 100644 index 00000000000..09d5fd17375 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ReferralRequest.java @@ -0,0 +1,1212 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization. + */ +@ResourceDef(name="ReferralRequest", profile="http://hl7.org/fhir/Profile/ReferralRequest") +public class ReferralRequest extends DomainResource { + + public enum ReferralStatus { + /** + * A draft referral that has yet to be send. + */ + DRAFT, + /** + * The referral has been transmitted, but not yet acknowledged by the recipient. + */ + REQUESTED, + /** + * The referral has been acknowledged by the recipient, and is in the process of being actioned. + */ + ACTIVE, + /** + * The referral has been cancelled without being completed. For example it is no longer needed. + */ + CANCELLED, + /** + * The recipient has agreed to deliver the care requested by the referral. + */ + ACCEPTED, + /** + * The recipient has declined to accept the referral. + */ + REJECTED, + /** + * The referral has been completely actioned. + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static ReferralStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown ReferralStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case ACCEPTED: return "accepted"; + case REJECTED: return "rejected"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/referralstatus"; + case REQUESTED: return "http://hl7.org/fhir/referralstatus"; + case ACTIVE: return "http://hl7.org/fhir/referralstatus"; + case CANCELLED: return "http://hl7.org/fhir/referralstatus"; + case ACCEPTED: return "http://hl7.org/fhir/referralstatus"; + case REJECTED: return "http://hl7.org/fhir/referralstatus"; + case COMPLETED: return "http://hl7.org/fhir/referralstatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "A draft referral that has yet to be send."; + case REQUESTED: return "The referral has been transmitted, but not yet acknowledged by the recipient."; + case ACTIVE: return "The referral has been acknowledged by the recipient, and is in the process of being actioned."; + case CANCELLED: return "The referral has been cancelled without being completed. For example it is no longer needed."; + case ACCEPTED: return "The recipient has agreed to deliver the care requested by the referral."; + case REJECTED: return "The recipient has declined to accept the referral."; + case COMPLETED: return "The referral has been completely actioned."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case REQUESTED: return "Requested"; + case ACTIVE: return "Active"; + case CANCELLED: return "Cancelled"; + case ACCEPTED: return "Accepted"; + case REJECTED: return "Rejected"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + } + + public static class ReferralStatusEnumFactory implements EnumFactory { + public ReferralStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ReferralStatus.DRAFT; + if ("requested".equals(codeString)) + return ReferralStatus.REQUESTED; + if ("active".equals(codeString)) + return ReferralStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return ReferralStatus.CANCELLED; + if ("accepted".equals(codeString)) + return ReferralStatus.ACCEPTED; + if ("rejected".equals(codeString)) + return ReferralStatus.REJECTED; + if ("completed".equals(codeString)) + return ReferralStatus.COMPLETED; + throw new IllegalArgumentException("Unknown ReferralStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, ReferralStatus.DRAFT); + if ("requested".equals(codeString)) + return new Enumeration(this, ReferralStatus.REQUESTED); + if ("active".equals(codeString)) + return new Enumeration(this, ReferralStatus.ACTIVE); + if ("cancelled".equals(codeString)) + return new Enumeration(this, ReferralStatus.CANCELLED); + if ("accepted".equals(codeString)) + return new Enumeration(this, ReferralStatus.ACCEPTED); + if ("rejected".equals(codeString)) + return new Enumeration(this, ReferralStatus.REJECTED); + if ("completed".equals(codeString)) + return new Enumeration(this, ReferralStatus.COMPLETED); + throw new FHIRException("Unknown ReferralStatus code '"+codeString+"'"); + } + public String toCode(ReferralStatus code) { + if (code == ReferralStatus.DRAFT) + return "draft"; + if (code == ReferralStatus.REQUESTED) + return "requested"; + if (code == ReferralStatus.ACTIVE) + return "active"; + if (code == ReferralStatus.CANCELLED) + return "cancelled"; + if (code == ReferralStatus.ACCEPTED) + return "accepted"; + if (code == ReferralStatus.REJECTED) + return "rejected"; + if (code == ReferralStatus.COMPLETED) + return "completed"; + return "?"; + } + } + + /** + * The workflow status of the referral or transfer of care request. + */ + @Child(name = "status", type = {CodeType.class}, order=0, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | requested | active | cancelled | accepted | rejected | completed", formalDefinition="The workflow status of the referral or transfer of care request." ) + protected Enumeration status; + + /** + * Business identifier that uniquely identifies the referral/care transfer request instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Business identifier", formalDefinition="Business identifier that uniquely identifies the referral/care transfer request instance." ) + protected List identifier; + + /** + * Date/DateTime of creation for draft requests and date of activation for active requests. + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date of creation/activation", formalDefinition="Date/DateTime of creation for draft requests and date of activation for active requests." ) + protected DateTimeType date; + + /** + * An indication of the type of referral (or where applicable the type of transfer of care) request. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Referral/Transition of care request type", formalDefinition="An indication of the type of referral (or where applicable the type of transfer of care) request." ) + protected CodeableConcept type; + + /** + * Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The clinical specialty (discipline) that the referral is requested for", formalDefinition="Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology." ) + protected CodeableConcept specialty; + + /** + * An indication of the urgency of referral (or where applicable the type of transfer of care) request. + */ + @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Urgency of referral / transfer of care request", formalDefinition="An indication of the urgency of referral (or where applicable the type of transfer of care) request." ) + protected CodeableConcept priority; + + /** + * The patient who is the subject of a referral or transfer of care request. + */ + @Child(name = "patient", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient referred to care or transfer", formalDefinition="The patient who is the subject of a referral or transfer of care request." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient who is the subject of a referral or transfer of care request.) + */ + protected Patient patientTarget; + + /** + * The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral). + */ + @Child(name = "requester", type = {Practitioner.class, Organization.class, Patient.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Requester of referral / transfer of care", formalDefinition="The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral)." ) + protected Reference requester; + + /** + * The actual object that is the target of the reference (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) + */ + protected Resource requesterTarget; + + /** + * The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request. + */ + @Child(name = "recipient", type = {Practitioner.class, Organization.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Receiver of referral / transfer of care request", formalDefinition="The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request." ) + protected List recipient; + /** + * The actual objects that are the target of the reference (The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.) + */ + protected List recipientTarget; + + + /** + * The encounter at which the request for referral or transfer of care is initiated. + */ + @Child(name = "encounter", type = {Encounter.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Originating encounter", formalDefinition="The encounter at which the request for referral or transfer of care is initiated." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter at which the request for referral or transfer of care is initiated.) + */ + protected Encounter encounterTarget; + + /** + * Date/DateTime the request for referral or transfer of care is sent by the author. + */ + @Child(name = "dateSent", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date referral/transfer of care request is sent", formalDefinition="Date/DateTime the request for referral or transfer of care is sent by the author." ) + protected DateTimeType dateSent; + + /** + * Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for referral / transfer of care request", formalDefinition="Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management." ) + protected CodeableConcept reason; + + /** + * The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. + */ + @Child(name = "description", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A textual description of the referral", formalDefinition="The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary." ) + protected StringType description; + + /** + * The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion. + */ + @Child(name = "serviceRequested", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Actions requested as part of the referral", formalDefinition="The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion." ) + protected List serviceRequested; + + /** + * Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan. + */ + @Child(name = "supportingInformation", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additonal information to support referral or transfer of care request", formalDefinition="Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan." ) + protected List supportingInformation; + /** + * The actual objects that are the target of the reference (Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.) + */ + protected List supportingInformationTarget; + + + /** + * The period of time within which the services identified in the referral/transfer of care is specified or required to occur. + */ + @Child(name = "fulfillmentTime", type = {Period.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Requested service(s) fulfillment time", formalDefinition="The period of time within which the services identified in the referral/transfer of care is specified or required to occur." ) + protected Period fulfillmentTime; + + private static final long serialVersionUID = 1948652599L; + + /* + * Constructor + */ + public ReferralRequest() { + super(); + } + + /* + * Constructor + */ + public ReferralRequest(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #status} (The workflow status of the referral or transfer of care request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ReferralStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The workflow status of the referral or transfer of care request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ReferralRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The workflow status of the referral or transfer of care request. + */ + public ReferralStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The workflow status of the referral or transfer of care request. + */ + public ReferralRequest setStatus(ReferralStatus value) { + if (this.status == null) + this.status = new Enumeration(new ReferralStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (Business identifier that uniquely identifies the referral/care transfer request instance.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Business identifier that uniquely identifies the referral/care transfer request instance.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ReferralRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #date} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ReferralRequest setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Date/DateTime of creation for draft requests and date of activation for active requests. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Date/DateTime of creation for draft requests and date of activation for active requests. + */ + public ReferralRequest setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (An indication of the type of referral (or where applicable the type of transfer of care) request.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (An indication of the type of referral (or where applicable the type of transfer of care) request.) + */ + public ReferralRequest setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) + */ + public CodeableConcept getSpecialty() { + if (this.specialty == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.specialty"); + else if (Configuration.doAutoCreate()) + this.specialty = new CodeableConcept(); // cc + return this.specialty; + } + + public boolean hasSpecialty() { + return this.specialty != null && !this.specialty.isEmpty(); + } + + /** + * @param value {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) + */ + public ReferralRequest setSpecialty(CodeableConcept value) { + this.specialty = value; + return this; + } + + /** + * @return {@link #priority} (An indication of the urgency of referral (or where applicable the type of transfer of care) request.) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (An indication of the urgency of referral (or where applicable the type of transfer of care) request.) + */ + public ReferralRequest setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + /** + * @return {@link #patient} (The patient who is the subject of a referral or transfer of care request.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient who is the subject of a referral or transfer of care request.) + */ + public ReferralRequest setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who is the subject of a referral or transfer of care request.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who is the subject of a referral or transfer of care request.) + */ + public ReferralRequest setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #requester} (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) + */ + public Reference getRequester() { + if (this.requester == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.requester"); + else if (Configuration.doAutoCreate()) + this.requester = new Reference(); // cc + return this.requester; + } + + public boolean hasRequester() { + return this.requester != null && !this.requester.isEmpty(); + } + + /** + * @param value {@link #requester} (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) + */ + public ReferralRequest setRequester(Reference value) { + this.requester = value; + return this; + } + + /** + * @return {@link #requester} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) + */ + public Resource getRequesterTarget() { + return this.requesterTarget; + } + + /** + * @param value {@link #requester} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) + */ + public ReferralRequest setRequesterTarget(Resource value) { + this.requesterTarget = value; + return this; + } + + /** + * @return {@link #recipient} (The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.) + */ + public List getRecipient() { + if (this.recipient == null) + this.recipient = new ArrayList(); + return this.recipient; + } + + public boolean hasRecipient() { + if (this.recipient == null) + return false; + for (Reference item : this.recipient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #recipient} (The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.) + */ + // syntactic sugar + public Reference addRecipient() { //3 + Reference t = new Reference(); + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return t; + } + + // syntactic sugar + public ReferralRequest addRecipient(Reference t) { //3 + if (t == null) + return this; + if (this.recipient == null) + this.recipient = new ArrayList(); + this.recipient.add(t); + return this; + } + + /** + * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.) + */ + public List getRecipientTarget() { + if (this.recipientTarget == null) + this.recipientTarget = new ArrayList(); + return this.recipientTarget; + } + + /** + * @return {@link #encounter} (The encounter at which the request for referral or transfer of care is initiated.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter at which the request for referral or transfer of care is initiated.) + */ + public ReferralRequest setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) + */ + public ReferralRequest setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #dateSent} (Date/DateTime the request for referral or transfer of care is sent by the author.). This is the underlying object with id, value and extensions. The accessor "getDateSent" gives direct access to the value + */ + public DateTimeType getDateSentElement() { + if (this.dateSent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.dateSent"); + else if (Configuration.doAutoCreate()) + this.dateSent = new DateTimeType(); // bb + return this.dateSent; + } + + public boolean hasDateSentElement() { + return this.dateSent != null && !this.dateSent.isEmpty(); + } + + public boolean hasDateSent() { + return this.dateSent != null && !this.dateSent.isEmpty(); + } + + /** + * @param value {@link #dateSent} (Date/DateTime the request for referral or transfer of care is sent by the author.). This is the underlying object with id, value and extensions. The accessor "getDateSent" gives direct access to the value + */ + public ReferralRequest setDateSentElement(DateTimeType value) { + this.dateSent = value; + return this; + } + + /** + * @return Date/DateTime the request for referral or transfer of care is sent by the author. + */ + public Date getDateSent() { + return this.dateSent == null ? null : this.dateSent.getValue(); + } + + /** + * @param value Date/DateTime the request for referral or transfer of care is sent by the author. + */ + public ReferralRequest setDateSent(Date value) { + if (value == null) + this.dateSent = null; + else { + if (this.dateSent == null) + this.dateSent = new DateTimeType(); + this.dateSent.setValue(value); + } + return this; + } + + /** + * @return {@link #reason} (Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.) + */ + public CodeableConcept getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new CodeableConcept(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.) + */ + public ReferralRequest setReason(CodeableConcept value) { + this.reason = value; + return this; + } + + /** + * @return {@link #description} (The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ReferralRequest setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. + */ + public ReferralRequest setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #serviceRequested} (The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.) + */ + public List getServiceRequested() { + if (this.serviceRequested == null) + this.serviceRequested = new ArrayList(); + return this.serviceRequested; + } + + public boolean hasServiceRequested() { + if (this.serviceRequested == null) + return false; + for (CodeableConcept item : this.serviceRequested) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceRequested} (The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.) + */ + // syntactic sugar + public CodeableConcept addServiceRequested() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.serviceRequested == null) + this.serviceRequested = new ArrayList(); + this.serviceRequested.add(t); + return t; + } + + // syntactic sugar + public ReferralRequest addServiceRequested(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.serviceRequested == null) + this.serviceRequested = new ArrayList(); + this.serviceRequested.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingInformation} (Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.) + */ + // syntactic sugar + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + // syntactic sugar + public ReferralRequest addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.) + */ + public List getSupportingInformationTarget() { + if (this.supportingInformationTarget == null) + this.supportingInformationTarget = new ArrayList(); + return this.supportingInformationTarget; + } + + /** + * @return {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) + */ + public Period getFulfillmentTime() { + if (this.fulfillmentTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.fulfillmentTime"); + else if (Configuration.doAutoCreate()) + this.fulfillmentTime = new Period(); // cc + return this.fulfillmentTime; + } + + public boolean hasFulfillmentTime() { + return this.fulfillmentTime != null && !this.fulfillmentTime.isEmpty(); + } + + /** + * @param value {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) + */ + public ReferralRequest setFulfillmentTime(Period value) { + this.fulfillmentTime = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("status", "code", "The workflow status of the referral or transfer of care request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("identifier", "Identifier", "Business identifier that uniquely identifies the referral/care transfer request instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("date", "dateTime", "Date/DateTime of creation for draft requests and date of activation for active requests.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("type", "CodeableConcept", "An indication of the type of referral (or where applicable the type of transfer of care) request.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("specialty", "CodeableConcept", "Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("priority", "CodeableConcept", "An indication of the urgency of referral (or where applicable the type of transfer of care) request.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient who is the subject of a referral or transfer of care request.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("requester", "Reference(Practitioner|Organization|Patient)", "The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).", 0, java.lang.Integer.MAX_VALUE, requester)); + childrenList.add(new Property("recipient", "Reference(Practitioner|Organization)", "The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.", 0, java.lang.Integer.MAX_VALUE, recipient)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter at which the request for referral or transfer of care is initiated.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("dateSent", "dateTime", "Date/DateTime the request for referral or transfer of care is sent by the author.", 0, java.lang.Integer.MAX_VALUE, dateSent)); + childrenList.add(new Property("reason", "CodeableConcept", "Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("description", "string", "The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("serviceRequested", "CodeableConcept", "The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.", 0, java.lang.Integer.MAX_VALUE, serviceRequested)); + childrenList.add(new Property("supportingInformation", "Reference(Any)", "Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + childrenList.add(new Property("fulfillmentTime", "Period", "The period of time within which the services identified in the referral/transfer of care is specified or required to occur.", 0, java.lang.Integer.MAX_VALUE, fulfillmentTime)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("status")) + this.status = new ReferralStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("specialty")) + this.specialty = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("priority")) + this.priority = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("requester")) + this.requester = castToReference(value); // Reference + else if (name.equals("recipient")) + this.getRecipient().add(castToReference(value)); + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("dateSent")) + this.dateSent = castToDateTime(value); // DateTimeType + else if (name.equals("reason")) + this.reason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("serviceRequested")) + this.getServiceRequested().add(castToCodeableConcept(value)); + else if (name.equals("supportingInformation")) + this.getSupportingInformation().add(castToReference(value)); + else if (name.equals("fulfillmentTime")) + this.fulfillmentTime = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.status"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.date"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("specialty")) { + this.specialty = new CodeableConcept(); + return this.specialty; + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("requester")) { + this.requester = new Reference(); + return this.requester; + } + else if (name.equals("recipient")) { + return addRecipient(); + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("dateSent")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.dateSent"); + } + else if (name.equals("reason")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.description"); + } + else if (name.equals("serviceRequested")) { + return addServiceRequested(); + } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } + else if (name.equals("fulfillmentTime")) { + this.fulfillmentTime = new Period(); + return this.fulfillmentTime; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ReferralRequest"; + + } + + public ReferralRequest copy() { + ReferralRequest dst = new ReferralRequest(); + copyValues(dst); + dst.status = status == null ? null : status.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.type = type == null ? null : type.copy(); + dst.specialty = specialty == null ? null : specialty.copy(); + dst.priority = priority == null ? null : priority.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.requester = requester == null ? null : requester.copy(); + if (recipient != null) { + dst.recipient = new ArrayList(); + for (Reference i : recipient) + dst.recipient.add(i.copy()); + }; + dst.encounter = encounter == null ? null : encounter.copy(); + dst.dateSent = dateSent == null ? null : dateSent.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.description = description == null ? null : description.copy(); + if (serviceRequested != null) { + dst.serviceRequested = new ArrayList(); + for (CodeableConcept i : serviceRequested) + dst.serviceRequested.add(i.copy()); + }; + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; + dst.fulfillmentTime = fulfillmentTime == null ? null : fulfillmentTime.copy(); + return dst; + } + + protected ReferralRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ReferralRequest)) + return false; + ReferralRequest o = (ReferralRequest) other; + return compareDeep(status, o.status, true) && compareDeep(identifier, o.identifier, true) && compareDeep(date, o.date, true) + && compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true) && compareDeep(priority, o.priority, true) + && compareDeep(patient, o.patient, true) && compareDeep(requester, o.requester, true) && compareDeep(recipient, o.recipient, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(dateSent, o.dateSent, true) && compareDeep(reason, o.reason, true) + && compareDeep(description, o.description, true) && compareDeep(serviceRequested, o.serviceRequested, true) + && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(fulfillmentTime, o.fulfillmentTime, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ReferralRequest)) + return false; + ReferralRequest o = (ReferralRequest) other; + return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(dateSent, o.dateSent, true) + && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (date == null || date.isEmpty()) && (type == null || type.isEmpty()) && (specialty == null || specialty.isEmpty()) + && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty()) && (requester == null || requester.isEmpty()) + && (recipient == null || recipient.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (dateSent == null || dateSent.isEmpty()) && (reason == null || reason.isEmpty()) && (description == null || description.isEmpty()) + && (serviceRequested == null || serviceRequested.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) + && (fulfillmentTime == null || fulfillmentTime.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ReferralRequest; + } + + @SearchParamDefinition(name="date", path="ReferralRequest.date", description="Creation or activation date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="requester", path="ReferralRequest.requester", description="Requester of referral / transfer of care", type="reference" ) + public static final String SP_REQUESTER = "requester"; + @SearchParamDefinition(name="specialty", path="ReferralRequest.specialty", description="The specialty that the referral is for", type="token" ) + public static final String SP_SPECIALTY = "specialty"; + @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="recipient", path="ReferralRequest.recipient", description="The person that the referral was sent to", type="reference" ) + public static final String SP_RECIPIENT = "recipient"; + @SearchParamDefinition(name="type", path="ReferralRequest.type", description="The type of the referral", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="priority", path="ReferralRequest.priority", description="The priority assigned to the referral", type="token" ) + public static final String SP_PRIORITY = "priority"; + @SearchParamDefinition(name="status", path="ReferralRequest.status", description="The status of the referral", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RelatedPerson.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RelatedPerson.java new file mode 100644 index 00000000000..b8d7fd22b5a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RelatedPerson.java @@ -0,0 +1,705 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ +@ResourceDef(name="RelatedPerson", profile="http://hl7.org/fhir/Profile/RelatedPerson") +public class RelatedPerson extends DomainResource { + + /** + * Identifier for a person within a particular scope. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A human identifier for this person", formalDefinition="Identifier for a person within a particular scope." ) + protected List identifier; + + /** + * The patient this person is related to. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The patient this person is related to", formalDefinition="The patient this person is related to." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The patient this person is related to.) + */ + protected Patient patientTarget; + + /** + * The nature of the relationship between a patient and the related person. + */ + @Child(name = "relationship", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The nature of the relationship", formalDefinition="The nature of the relationship between a patient and the related person." ) + protected CodeableConcept relationship; + + /** + * A name associated with the person. + */ + @Child(name = "name", type = {HumanName.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) + protected HumanName name; + + /** + * A contact detail for the person, e.g. a telephone number or an email address. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." ) + protected List telecom; + + /** + * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * The date on which the related person was born. + */ + @Child(name = "birthDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date on which the related person was born", formalDefinition="The date on which the related person was born." ) + protected DateType birthDate; + + /** + * Address where the related person can be contacted or visited. + */ + @Child(name = "address", type = {Address.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Address where the related person can be contacted or visited", formalDefinition="Address where the related person can be contacted or visited." ) + protected List
address; + + /** + * Image of the person. + */ + @Child(name = "photo", type = {Attachment.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." ) + protected List photo; + + /** + * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown. + */ + @Child(name = "period", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period of time that this relationship is considered valid", formalDefinition="The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown." ) + protected Period period; + + private static final long serialVersionUID = 7777543L; + + /* + * Constructor + */ + public RelatedPerson() { + super(); + } + + /* + * Constructor + */ + public RelatedPerson(Reference patient) { + super(); + this.patient = patient; + } + + /** + * @return {@link #identifier} (Identifier for a person within a particular scope.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifier for a person within a particular scope.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public RelatedPerson addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (The patient this person is related to.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient this person is related to.) + */ + public RelatedPerson setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient this person is related to.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient this person is related to.) + */ + public RelatedPerson setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #relationship} (The nature of the relationship between a patient and the related person.) + */ + public CodeableConcept getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new CodeableConcept(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The nature of the relationship between a patient and the related person.) + */ + public RelatedPerson setRelationship(CodeableConcept value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #name} (A name associated with the person.) + */ + public HumanName getName() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.name"); + else if (Configuration.doAutoCreate()) + this.name = new HumanName(); // cc + return this.name; + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name associated with the person.) + */ + public RelatedPerson setName(HumanName value) { + this.name = value; + return this; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public RelatedPerson addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public RelatedPerson setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. + */ + public RelatedPerson setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #birthDate} (The date on which the related person was born.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public DateType getBirthDateElement() { + if (this.birthDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.birthDate"); + else if (Configuration.doAutoCreate()) + this.birthDate = new DateType(); // bb + return this.birthDate; + } + + public boolean hasBirthDateElement() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + public boolean hasBirthDate() { + return this.birthDate != null && !this.birthDate.isEmpty(); + } + + /** + * @param value {@link #birthDate} (The date on which the related person was born.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value + */ + public RelatedPerson setBirthDateElement(DateType value) { + this.birthDate = value; + return this; + } + + /** + * @return The date on which the related person was born. + */ + public Date getBirthDate() { + return this.birthDate == null ? null : this.birthDate.getValue(); + } + + /** + * @param value The date on which the related person was born. + */ + public RelatedPerson setBirthDate(Date value) { + if (value == null) + this.birthDate = null; + else { + if (this.birthDate == null) + this.birthDate = new DateType(); + this.birthDate.setValue(value); + } + return this; + } + + /** + * @return {@link #address} (Address where the related person can be contacted or visited.) + */ + public List
getAddress() { + if (this.address == null) + this.address = new ArrayList
(); + return this.address; + } + + public boolean hasAddress() { + if (this.address == null) + return false; + for (Address item : this.address) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #address} (Address where the related person can be contacted or visited.) + */ + // syntactic sugar + public Address addAddress() { //3 + Address t = new Address(); + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return t; + } + + // syntactic sugar + public RelatedPerson addAddress(Address t) { //3 + if (t == null) + return this; + if (this.address == null) + this.address = new ArrayList
(); + this.address.add(t); + return this; + } + + /** + * @return {@link #photo} (Image of the person.) + */ + public List getPhoto() { + if (this.photo == null) + this.photo = new ArrayList(); + return this.photo; + } + + public boolean hasPhoto() { + if (this.photo == null) + return false; + for (Attachment item : this.photo) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #photo} (Image of the person.) + */ + // syntactic sugar + public Attachment addPhoto() { //3 + Attachment t = new Attachment(); + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return t; + } + + // syntactic sugar + public RelatedPerson addPhoto(Attachment t) { //3 + if (t == null) + return this; + if (this.photo == null) + this.photo = new ArrayList(); + this.photo.add(t); + return this; + } + + /** + * @return {@link #period} (The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedPerson.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.) + */ + public RelatedPerson setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier for a person within a particular scope.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient this person is related to.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("relationship", "CodeableConcept", "The nature of the relationship between a patient and the related person.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("name", "HumanName", "A name associated with the person.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the person, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("birthDate", "date", "The date on which the related person was born.", 0, java.lang.Integer.MAX_VALUE, birthDate)); + childrenList.add(new Property("address", "Address", "Address where the related person can be contacted or visited.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo)); + childrenList.add(new Property("period", "Period", "The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("relationship")) + this.relationship = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("name")) + this.name = castToHumanName(value); // HumanName + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("gender")) + this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration + else if (name.equals("birthDate")) + this.birthDate = castToDate(value); // DateType + else if (name.equals("address")) + this.getAddress().add(castToAddress(value)); + else if (name.equals("photo")) + this.getPhoto().add(castToAttachment(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("relationship")) { + this.relationship = new CodeableConcept(); + return this.relationship; + } + else if (name.equals("name")) { + this.name = new HumanName(); + return this.name; + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("gender")) { + throw new FHIRException("Cannot call addChild on a primitive type RelatedPerson.gender"); + } + else if (name.equals("birthDate")) { + throw new FHIRException("Cannot call addChild on a primitive type RelatedPerson.birthDate"); + } + else if (name.equals("address")) { + return addAddress(); + } + else if (name.equals("photo")) { + return addPhoto(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "RelatedPerson"; + + } + + public RelatedPerson copy() { + RelatedPerson dst = new RelatedPerson(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.gender = gender == null ? null : gender.copy(); + dst.birthDate = birthDate == null ? null : birthDate.copy(); + if (address != null) { + dst.address = new ArrayList
(); + for (Address i : address) + dst.address.add(i.copy()); + }; + if (photo != null) { + dst.photo = new ArrayList(); + for (Attachment i : photo) + dst.photo.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected RelatedPerson typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof RelatedPerson)) + return false; + RelatedPerson o = (RelatedPerson) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true) && compareDeep(gender, o.gender, true) + && compareDeep(birthDate, o.birthDate, true) && compareDeep(address, o.address, true) && compareDeep(photo, o.photo, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof RelatedPerson)) + return false; + RelatedPerson o = (RelatedPerson) other; + return compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (relationship == null || relationship.isEmpty()) && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) && (address == null || address.isEmpty()) + && (photo == null || photo.isEmpty()) && (period == null || period.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.RelatedPerson; + } + + @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string" ) + public static final String SP_ADDRESS = "address"; + @SearchParamDefinition(name="birthdate", path="RelatedPerson.birthDate", description="The Related Person's date of birth", type="date" ) + public static final String SP_BIRTHDATE = "birthdate"; + @SearchParamDefinition(name="address-state", path="RelatedPerson.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESSSTATE = "address-state"; + @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token" ) + public static final String SP_GENDER = "gender"; + @SearchParamDefinition(name="address-postalcode", path="RelatedPerson.address.postalCode", description="A postal code specified in an address", type="string" ) + public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; + @SearchParamDefinition(name="address-country", path="RelatedPerson.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESSCOUNTRY = "address-country"; + @SearchParamDefinition(name="phonetic", path="RelatedPerson.name", description="A portion of name using some kind of phonetic matching algorithm", type="string" ) + public static final String SP_PHONETIC = "phonetic"; + @SearchParamDefinition(name="phone", path="RelatedPerson.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + public static final String SP_PHONE = "phone"; + @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="address-use", path="RelatedPerson.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESSUSE = "address-use"; + @SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact", type="token" ) + public static final String SP_TELECOM = "telecom"; + @SearchParamDefinition(name="address-city", path="RelatedPerson.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESSCITY = "address-city"; + @SearchParamDefinition(name="email", path="RelatedPerson.telecom.where(system='email')", description="A value in an email contact", type="token" ) + public static final String SP_EMAIL = "email"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Resource.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Resource.java new file mode 100644 index 00000000000..45f1712d685 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Resource.java @@ -0,0 +1,342 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * This is the base resource type for everything. + */ +public abstract class Resource extends BaseResource implements IAnyResource { + + /** + * The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. + */ + @Child(name = "id", type = {IdType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id of this artifact", formalDefinition="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) + protected IdType id; + + /** + * The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ + @Child(name = "meta", type = {Meta.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Metadata about the resource", formalDefinition="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource." ) + protected Meta meta; + + /** + * A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. + */ + @Child(name = "implicitRules", type = {UriType.class}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="A set of rules under which this content was created", formalDefinition="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content." ) + protected UriType implicitRules; + + /** + * The base language in which the resource is written. + */ + @Child(name = "language", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Language of the resource content", formalDefinition="The base language in which the resource is written." ) + protected CodeType language; + + private static final long serialVersionUID = -559462759L; + + /* + * Constructor + */ + public Resource() { + super(); + } + + /** + * @return {@link #id} (The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value + */ + public IdType getIdElement() { + if (this.id == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Resource.id"); + else if (Configuration.doAutoCreate()) + this.id = new IdType(); // bb + return this.id; + } + + public boolean hasIdElement() { + return this.id != null && !this.id.isEmpty(); + } + + public boolean hasId() { + return this.id != null && !this.id.isEmpty(); + } + + /** + * @param value {@link #id} (The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value + */ + public Resource setIdElement(IdType value) { + this.id = value; + return this; + } + + /** + * @return The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. + */ + public String getId() { + return this.id == null ? null : this.id.getValue(); + } + + /** + * @param value The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. + */ + public Resource setId(String value) { + if (Utilities.noString(value)) + this.id = null; + else { + if (this.id == null) + this.id = new IdType(); + this.id.setValue(value); + } + return this; + } + + /** + * @return {@link #meta} (The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.) + */ + public Meta getMeta() { + if (this.meta == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Resource.meta"); + else if (Configuration.doAutoCreate()) + this.meta = new Meta(); // cc + return this.meta; + } + + public boolean hasMeta() { + return this.meta != null && !this.meta.isEmpty(); + } + + /** + * @param value {@link #meta} (The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.) + */ + public Resource setMeta(Meta value) { + this.meta = value; + return this; + } + + /** + * @return {@link #implicitRules} (A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.). This is the underlying object with id, value and extensions. The accessor "getImplicitRules" gives direct access to the value + */ + public UriType getImplicitRulesElement() { + if (this.implicitRules == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Resource.implicitRules"); + else if (Configuration.doAutoCreate()) + this.implicitRules = new UriType(); // bb + return this.implicitRules; + } + + public boolean hasImplicitRulesElement() { + return this.implicitRules != null && !this.implicitRules.isEmpty(); + } + + public boolean hasImplicitRules() { + return this.implicitRules != null && !this.implicitRules.isEmpty(); + } + + /** + * @param value {@link #implicitRules} (A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.). This is the underlying object with id, value and extensions. The accessor "getImplicitRules" gives direct access to the value + */ + public Resource setImplicitRulesElement(UriType value) { + this.implicitRules = value; + return this; + } + + /** + * @return A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. + */ + public String getImplicitRules() { + return this.implicitRules == null ? null : this.implicitRules.getValue(); + } + + /** + * @param value A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. + */ + public Resource setImplicitRules(String value) { + if (Utilities.noString(value)) + this.implicitRules = null; + else { + if (this.implicitRules == null) + this.implicitRules = new UriType(); + this.implicitRules.setValue(value); + } + return this; + } + + /** + * @return {@link #language} (The base language in which the resource is written.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Resource.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The base language in which the resource is written.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public Resource setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The base language in which the resource is written. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The base language in which the resource is written. + */ + public Resource setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + childrenList.add(new Property("id", "id", "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", 0, java.lang.Integer.MAX_VALUE, id)); + childrenList.add(new Property("meta", "Meta", "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.", 0, java.lang.Integer.MAX_VALUE, meta)); + childrenList.add(new Property("implicitRules", "uri", "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.", 0, java.lang.Integer.MAX_VALUE, implicitRules)); + childrenList.add(new Property("language", "code", "The base language in which the resource is written.", 0, java.lang.Integer.MAX_VALUE, language)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("id")) + this.id = castToId(value); // IdType + else if (name.equals("meta")) + this.meta = castToMeta(value); // Meta + else if (name.equals("implicitRules")) + this.implicitRules = castToUri(value); // UriType + else if (name.equals("language")) + this.language = castToCode(value); // CodeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("id")) { + throw new FHIRException("Cannot call addChild on a primitive type Resource.id"); + } + else if (name.equals("meta")) { + this.meta = new Meta(); + return this.meta; + } + else if (name.equals("implicitRules")) { + throw new FHIRException("Cannot call addChild on a primitive type Resource.implicitRules"); + } + else if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type Resource.language"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Resource"; + + } + + public abstract Resource copy(); + + public void copyValues(Resource dst) { + dst.id = id == null ? null : id.copy(); + dst.meta = meta == null ? null : meta.copy(); + dst.implicitRules = implicitRules == null ? null : implicitRules.copy(); + dst.language = language == null ? null : language.copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Resource)) + return false; + Resource o = (Resource) other; + return compareDeep(id, o.id, true) && compareDeep(meta, o.meta, true) && compareDeep(implicitRules, o.implicitRules, true) + && compareDeep(language, o.language, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Resource)) + return false; + Resource o = (Resource) other; + return compareValues(id, o.id, true) && compareValues(implicitRules, o.implicitRules, true) && compareValues(language, o.language, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (id == null || id.isEmpty()) && (meta == null || meta.isEmpty()) && (implicitRules == null || implicitRules.isEmpty()) + && (language == null || language.isEmpty()); + } + + public abstract ResourceType getResourceType(); + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceFactory.java new file mode 100644 index 00000000000..7a3828df02b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceFactory.java @@ -0,0 +1,309 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import org.hl7.fhir.exceptions.FHIRException; + +public class ResourceFactory extends Factory { + + public static Resource createResource(String name) throws FHIRException { + if ("Appointment".equals(name)) + return new Appointment(); + if ("ReferralRequest".equals(name)) + return new ReferralRequest(); + if ("Account".equals(name)) + return new Account(); + if ("DocumentManifest".equals(name)) + return new DocumentManifest(); + if ("Goal".equals(name)) + return new Goal(); + if ("EnrollmentRequest".equals(name)) + return new EnrollmentRequest(); + if ("Medication".equals(name)) + return new Medication(); + if ("Measure".equals(name)) + return new Measure(); + if ("Subscription".equals(name)) + return new Subscription(); + if ("DocumentReference".equals(name)) + return new DocumentReference(); + if ("Parameters".equals(name)) + return new Parameters(); + if ("Conformance".equals(name)) + return new Conformance(); + if ("RelatedPerson".equals(name)) + return new RelatedPerson(); + if ("SupplyRequest".equals(name)) + return new SupplyRequest(); + if ("Practitioner".equals(name)) + return new Practitioner(); + if ("ExpansionProfile".equals(name)) + return new ExpansionProfile(); + if ("OrderSet".equals(name)) + return new OrderSet(); + if ("Slot".equals(name)) + return new Slot(); + if ("Person".equals(name)) + return new Person(); + if ("Contract".equals(name)) + return new Contract(); + if ("RiskAssessment".equals(name)) + return new RiskAssessment(); + if ("Group".equals(name)) + return new Group(); + if ("PaymentNotice".equals(name)) + return new PaymentNotice(); + if ("Organization".equals(name)) + return new Organization(); + if ("ImplementationGuide".equals(name)) + return new ImplementationGuide(); + if ("ImagingStudy".equals(name)) + return new ImagingStudy(); + if ("DeviceComponent".equals(name)) + return new DeviceComponent(); + if ("FamilyMemberHistory".equals(name)) + return new FamilyMemberHistory(); + if ("Encounter".equals(name)) + return new Encounter(); + if ("Substance".equals(name)) + return new Substance(); + if ("SearchParameter".equals(name)) + return new SearchParameter(); + if ("Communication".equals(name)) + return new Communication(); + if ("OrderResponse".equals(name)) + return new OrderResponse(); + if ("DeviceUseStatement".equals(name)) + return new DeviceUseStatement(); + if ("MessageHeader".equals(name)) + return new MessageHeader(); + if ("ImmunizationRecommendation".equals(name)) + return new ImmunizationRecommendation(); + if ("BodySite".equals(name)) + return new BodySite(); + if ("Provenance".equals(name)) + return new Provenance(); + if ("Questionnaire".equals(name)) + return new Questionnaire(); + if ("ExplanationOfBenefit".equals(name)) + return new ExplanationOfBenefit(); + if ("Specimen".equals(name)) + return new Specimen(); + if ("AllergyIntolerance".equals(name)) + return new AllergyIntolerance(); + if ("CarePlan".equals(name)) + return new CarePlan(); + if ("StructureDefinition".equals(name)) + return new StructureDefinition(); + if ("GuidanceRequest".equals(name)) + return new GuidanceRequest(); + if ("EpisodeOfCare".equals(name)) + return new EpisodeOfCare(); + if ("OperationOutcome".equals(name)) + return new OperationOutcome(); + if ("Procedure".equals(name)) + return new Procedure(); + if ("List".equals(name)) + return new List_(); + if ("ConceptMap".equals(name)) + return new ConceptMap(); + if ("ValueSet".equals(name)) + return new ValueSet(); + if ("OperationDefinition".equals(name)) + return new OperationDefinition(); + if ("Order".equals(name)) + return new Order(); + if ("Immunization".equals(name)) + return new Immunization(); + if ("Device".equals(name)) + return new Device(); + if ("VisionPrescription".equals(name)) + return new VisionPrescription(); + if ("Media".equals(name)) + return new Media(); + if ("ModuleMetadata".equals(name)) + return new ModuleMetadata(); + if ("ProcedureRequest".equals(name)) + return new ProcedureRequest(); + if ("EligibilityResponse".equals(name)) + return new EligibilityResponse(); + if ("DeviceUseRequest".equals(name)) + return new DeviceUseRequest(); + if ("DeviceMetric".equals(name)) + return new DeviceMetric(); + if ("Flag".equals(name)) + return new Flag(); + if ("AppointmentResponse".equals(name)) + return new AppointmentResponse(); + if ("GuidanceResponse".equals(name)) + return new GuidanceResponse(); + if ("Observation".equals(name)) + return new Observation(); + if ("MedicationAdministration".equals(name)) + return new MedicationAdministration(); + if ("EnrollmentResponse".equals(name)) + return new EnrollmentResponse(); + if ("Binary".equals(name)) + return new Binary(); + if ("Library".equals(name)) + return new Library(); + if ("MedicationStatement".equals(name)) + return new MedicationStatement(); + if ("CommunicationRequest".equals(name)) + return new CommunicationRequest(); + if ("TestScript".equals(name)) + return new TestScript(); + if ("Basic".equals(name)) + return new Basic(); + if ("ClaimResponse".equals(name)) + return new ClaimResponse(); + if ("EligibilityRequest".equals(name)) + return new EligibilityRequest(); + if ("ProcessRequest".equals(name)) + return new ProcessRequest(); + if ("MedicationDispense".equals(name)) + return new MedicationDispense(); + if ("DiagnosticReport".equals(name)) + return new DiagnosticReport(); + if ("ImagingObjectSelection".equals(name)) + return new ImagingObjectSelection(); + if ("HealthcareService".equals(name)) + return new HealthcareService(); + if ("DataElement".equals(name)) + return new DataElement(); + if ("NutritionOrder".equals(name)) + return new NutritionOrder(); + if ("AuditEvent".equals(name)) + return new AuditEvent(); + if ("MedicationOrder".equals(name)) + return new MedicationOrder(); + if ("DecisionSupportRule".equals(name)) + return new DecisionSupportRule(); + if ("PaymentReconciliation".equals(name)) + return new PaymentReconciliation(); + if ("Condition".equals(name)) + return new Condition(); + if ("Composition".equals(name)) + return new Composition(); + if ("DetectedIssue".equals(name)) + return new DetectedIssue(); + if ("Bundle".equals(name)) + return new Bundle(); + if ("DiagnosticOrder".equals(name)) + return new DiagnosticOrder(); + if ("Patient".equals(name)) + return new Patient(); + if ("Coverage".equals(name)) + return new Coverage(); + if ("QuestionnaireResponse".equals(name)) + return new QuestionnaireResponse(); + if ("ProcessResponse".equals(name)) + return new ProcessResponse(); + if ("ModuleDefinition".equals(name)) + return new ModuleDefinition(); + if ("NamingSystem".equals(name)) + return new NamingSystem(); + if ("DecisionSupportServiceModule".equals(name)) + return new DecisionSupportServiceModule(); + if ("Schedule".equals(name)) + return new Schedule(); + if ("SupplyDelivery".equals(name)) + return new SupplyDelivery(); + if ("ClinicalImpression".equals(name)) + return new ClinicalImpression(); + if ("Claim".equals(name)) + return new Claim(); + if ("Location".equals(name)) + return new Location(); + else + throw new FHIRException("Unknown Resource Name '"+name+"'"); + } + + public static Element createType(String name) throws FHIRException { + if ("Meta".equals(name)) + return new Meta(); + if ("Address".equals(name)) + return new Address(); + if ("Attachment".equals(name)) + return new Attachment(); + if ("Count".equals(name)) + return new Count(); + if ("Money".equals(name)) + return new Money(); + if ("HumanName".equals(name)) + return new HumanName(); + if ("ContactPoint".equals(name)) + return new ContactPoint(); + if ("Identifier".equals(name)) + return new Identifier(); + if ("Narrative".equals(name)) + return new Narrative(); + if ("Coding".equals(name)) + return new Coding(); + if ("SampledData".equals(name)) + return new SampledData(); + if ("Ratio".equals(name)) + return new Ratio(); + if ("ElementDefinition".equals(name)) + return new ElementDefinition(); + if ("Distance".equals(name)) + return new Distance(); + if ("Age".equals(name)) + return new Age(); + if ("Reference".equals(name)) + return new Reference(); + if ("SimpleQuantity".equals(name)) + return new SimpleQuantity(); + if ("Quantity".equals(name)) + return new Quantity(); + if ("Period".equals(name)) + return new Period(); + if ("Duration".equals(name)) + return new Duration(); + if ("Range".equals(name)) + return new Range(); + if ("Annotation".equals(name)) + return new Annotation(); + if ("Extension".equals(name)) + return new Extension(); + if ("Signature".equals(name)) + return new Signature(); + if ("Timing".equals(name)) + return new Timing(); + if ("CodeableConcept".equals(name)) + return new CodeableConcept(); + else + throw new FHIRException("Unknown Type Name '"+name+"'"); + } + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceType.java new file mode 100644 index 00000000000..ca98f70958a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ResourceType.java @@ -0,0 +1,542 @@ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.exceptions.FHIRException; + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +public enum ResourceType { + Account, + AllergyIntolerance, + Appointment, + AppointmentResponse, + AuditEvent, + Basic, + Binary, + BodySite, + Bundle, + CarePlan, + Claim, + ClaimResponse, + ClinicalImpression, + Communication, + CommunicationRequest, + Composition, + ConceptMap, + Condition, + Conformance, + Contract, + Coverage, + DataElement, + DecisionSupportRule, + DecisionSupportServiceModule, + DetectedIssue, + Device, + DeviceComponent, + DeviceMetric, + DeviceUseRequest, + DeviceUseStatement, + DiagnosticOrder, + DiagnosticReport, + DocumentManifest, + DocumentReference, + EligibilityRequest, + EligibilityResponse, + Encounter, + EnrollmentRequest, + EnrollmentResponse, + EpisodeOfCare, + ExpansionProfile, + ExplanationOfBenefit, + FamilyMemberHistory, + Flag, + Goal, + Group, + GuidanceRequest, + GuidanceResponse, + HealthcareService, + ImagingObjectSelection, + ImagingStudy, + Immunization, + ImmunizationRecommendation, + ImplementationGuide, + Library, + List, + Location, + Measure, + Media, + Medication, + MedicationAdministration, + MedicationDispense, + MedicationOrder, + MedicationStatement, + MessageHeader, + ModuleDefinition, + ModuleMetadata, + NamingSystem, + NutritionOrder, + Observation, + OperationDefinition, + OperationOutcome, + Order, + OrderResponse, + OrderSet, + Organization, + Parameters, + Patient, + PaymentNotice, + PaymentReconciliation, + Person, + Practitioner, + Procedure, + ProcedureRequest, + ProcessRequest, + ProcessResponse, + Provenance, + Questionnaire, + QuestionnaireResponse, + ReferralRequest, + RelatedPerson, + RiskAssessment, + Schedule, + SearchParameter, + Slot, + Specimen, + StructureDefinition, + Subscription, + Substance, + SupplyDelivery, + SupplyRequest, + TestScript, + ValueSet, + VisionPrescription; + + + public String getPath() {; + switch (this) { + case Account: + return "account"; + case AllergyIntolerance: + return "allergyintolerance"; + case Appointment: + return "appointment"; + case AppointmentResponse: + return "appointmentresponse"; + case AuditEvent: + return "auditevent"; + case Basic: + return "basic"; + case Binary: + return "binary"; + case BodySite: + return "bodysite"; + case Bundle: + return "bundle"; + case CarePlan: + return "careplan"; + case Claim: + return "claim"; + case ClaimResponse: + return "claimresponse"; + case ClinicalImpression: + return "clinicalimpression"; + case Communication: + return "communication"; + case CommunicationRequest: + return "communicationrequest"; + case Composition: + return "composition"; + case ConceptMap: + return "conceptmap"; + case Condition: + return "condition"; + case Conformance: + return "conformance"; + case Contract: + return "contract"; + case Coverage: + return "coverage"; + case DataElement: + return "dataelement"; + case DecisionSupportRule: + return "decisionsupportrule"; + case DecisionSupportServiceModule: + return "decisionsupportservicemodule"; + case DetectedIssue: + return "detectedissue"; + case Device: + return "device"; + case DeviceComponent: + return "devicecomponent"; + case DeviceMetric: + return "devicemetric"; + case DeviceUseRequest: + return "deviceuserequest"; + case DeviceUseStatement: + return "deviceusestatement"; + case DiagnosticOrder: + return "diagnosticorder"; + case DiagnosticReport: + return "diagnosticreport"; + case DocumentManifest: + return "documentmanifest"; + case DocumentReference: + return "documentreference"; + case EligibilityRequest: + return "eligibilityrequest"; + case EligibilityResponse: + return "eligibilityresponse"; + case Encounter: + return "encounter"; + case EnrollmentRequest: + return "enrollmentrequest"; + case EnrollmentResponse: + return "enrollmentresponse"; + case EpisodeOfCare: + return "episodeofcare"; + case ExpansionProfile: + return "expansionprofile"; + case ExplanationOfBenefit: + return "explanationofbenefit"; + case FamilyMemberHistory: + return "familymemberhistory"; + case Flag: + return "flag"; + case Goal: + return "goal"; + case Group: + return "group"; + case GuidanceRequest: + return "guidancerequest"; + case GuidanceResponse: + return "guidanceresponse"; + case HealthcareService: + return "healthcareservice"; + case ImagingObjectSelection: + return "imagingobjectselection"; + case ImagingStudy: + return "imagingstudy"; + case Immunization: + return "immunization"; + case ImmunizationRecommendation: + return "immunizationrecommendation"; + case ImplementationGuide: + return "implementationguide"; + case Library: + return "library"; + case List: + return "list"; + case Location: + return "location"; + case Measure: + return "measure"; + case Media: + return "media"; + case Medication: + return "medication"; + case MedicationAdministration: + return "medicationadministration"; + case MedicationDispense: + return "medicationdispense"; + case MedicationOrder: + return "medicationorder"; + case MedicationStatement: + return "medicationstatement"; + case MessageHeader: + return "messageheader"; + case ModuleDefinition: + return "moduledefinition"; + case ModuleMetadata: + return "modulemetadata"; + case NamingSystem: + return "namingsystem"; + case NutritionOrder: + return "nutritionorder"; + case Observation: + return "observation"; + case OperationDefinition: + return "operationdefinition"; + case OperationOutcome: + return "operationoutcome"; + case Order: + return "order"; + case OrderResponse: + return "orderresponse"; + case OrderSet: + return "orderset"; + case Organization: + return "organization"; + case Parameters: + return "parameters"; + case Patient: + return "patient"; + case PaymentNotice: + return "paymentnotice"; + case PaymentReconciliation: + return "paymentreconciliation"; + case Person: + return "person"; + case Practitioner: + return "practitioner"; + case Procedure: + return "procedure"; + case ProcedureRequest: + return "procedurerequest"; + case ProcessRequest: + return "processrequest"; + case ProcessResponse: + return "processresponse"; + case Provenance: + return "provenance"; + case Questionnaire: + return "questionnaire"; + case QuestionnaireResponse: + return "questionnaireresponse"; + case ReferralRequest: + return "referralrequest"; + case RelatedPerson: + return "relatedperson"; + case RiskAssessment: + return "riskassessment"; + case Schedule: + return "schedule"; + case SearchParameter: + return "searchparameter"; + case Slot: + return "slot"; + case Specimen: + return "specimen"; + case StructureDefinition: + return "structuredefinition"; + case Subscription: + return "subscription"; + case Substance: + return "substance"; + case SupplyDelivery: + return "supplydelivery"; + case SupplyRequest: + return "supplyrequest"; + case TestScript: + return "testscript"; + case ValueSet: + return "valueset"; + case VisionPrescription: + return "visionprescription"; + } + return null; + } + + + public static ResourceType fromCode(String code) throws FHIRException {; + if ("Account".equals(code)) + return Account; + if ("AllergyIntolerance".equals(code)) + return AllergyIntolerance; + if ("Appointment".equals(code)) + return Appointment; + if ("AppointmentResponse".equals(code)) + return AppointmentResponse; + if ("AuditEvent".equals(code)) + return AuditEvent; + if ("Basic".equals(code)) + return Basic; + if ("Binary".equals(code)) + return Binary; + if ("BodySite".equals(code)) + return BodySite; + if ("Bundle".equals(code)) + return Bundle; + if ("CarePlan".equals(code)) + return CarePlan; + if ("Claim".equals(code)) + return Claim; + if ("ClaimResponse".equals(code)) + return ClaimResponse; + if ("ClinicalImpression".equals(code)) + return ClinicalImpression; + if ("Communication".equals(code)) + return Communication; + if ("CommunicationRequest".equals(code)) + return CommunicationRequest; + if ("Composition".equals(code)) + return Composition; + if ("ConceptMap".equals(code)) + return ConceptMap; + if ("Condition".equals(code)) + return Condition; + if ("Conformance".equals(code)) + return Conformance; + if ("Contract".equals(code)) + return Contract; + if ("Coverage".equals(code)) + return Coverage; + if ("DataElement".equals(code)) + return DataElement; + if ("DecisionSupportRule".equals(code)) + return DecisionSupportRule; + if ("DecisionSupportServiceModule".equals(code)) + return DecisionSupportServiceModule; + if ("DetectedIssue".equals(code)) + return DetectedIssue; + if ("Device".equals(code)) + return Device; + if ("DeviceComponent".equals(code)) + return DeviceComponent; + if ("DeviceMetric".equals(code)) + return DeviceMetric; + if ("DeviceUseRequest".equals(code)) + return DeviceUseRequest; + if ("DeviceUseStatement".equals(code)) + return DeviceUseStatement; + if ("DiagnosticOrder".equals(code)) + return DiagnosticOrder; + if ("DiagnosticReport".equals(code)) + return DiagnosticReport; + if ("DocumentManifest".equals(code)) + return DocumentManifest; + if ("DocumentReference".equals(code)) + return DocumentReference; + if ("EligibilityRequest".equals(code)) + return EligibilityRequest; + if ("EligibilityResponse".equals(code)) + return EligibilityResponse; + if ("Encounter".equals(code)) + return Encounter; + if ("EnrollmentRequest".equals(code)) + return EnrollmentRequest; + if ("EnrollmentResponse".equals(code)) + return EnrollmentResponse; + if ("EpisodeOfCare".equals(code)) + return EpisodeOfCare; + if ("ExpansionProfile".equals(code)) + return ExpansionProfile; + if ("ExplanationOfBenefit".equals(code)) + return ExplanationOfBenefit; + if ("FamilyMemberHistory".equals(code)) + return FamilyMemberHistory; + if ("Flag".equals(code)) + return Flag; + if ("Goal".equals(code)) + return Goal; + if ("Group".equals(code)) + return Group; + if ("GuidanceRequest".equals(code)) + return GuidanceRequest; + if ("GuidanceResponse".equals(code)) + return GuidanceResponse; + if ("HealthcareService".equals(code)) + return HealthcareService; + if ("ImagingObjectSelection".equals(code)) + return ImagingObjectSelection; + if ("ImagingStudy".equals(code)) + return ImagingStudy; + if ("Immunization".equals(code)) + return Immunization; + if ("ImmunizationRecommendation".equals(code)) + return ImmunizationRecommendation; + if ("ImplementationGuide".equals(code)) + return ImplementationGuide; + if ("Library".equals(code)) + return Library; + if ("List".equals(code)) + return List; + if ("Location".equals(code)) + return Location; + if ("Measure".equals(code)) + return Measure; + if ("Media".equals(code)) + return Media; + if ("Medication".equals(code)) + return Medication; + if ("MedicationAdministration".equals(code)) + return MedicationAdministration; + if ("MedicationDispense".equals(code)) + return MedicationDispense; + if ("MedicationOrder".equals(code)) + return MedicationOrder; + if ("MedicationStatement".equals(code)) + return MedicationStatement; + if ("MessageHeader".equals(code)) + return MessageHeader; + if ("ModuleDefinition".equals(code)) + return ModuleDefinition; + if ("ModuleMetadata".equals(code)) + return ModuleMetadata; + if ("NamingSystem".equals(code)) + return NamingSystem; + if ("NutritionOrder".equals(code)) + return NutritionOrder; + if ("Observation".equals(code)) + return Observation; + if ("OperationDefinition".equals(code)) + return OperationDefinition; + if ("OperationOutcome".equals(code)) + return OperationOutcome; + if ("Order".equals(code)) + return Order; + if ("OrderResponse".equals(code)) + return OrderResponse; + if ("OrderSet".equals(code)) + return OrderSet; + if ("Organization".equals(code)) + return Organization; + if ("Parameters".equals(code)) + return Parameters; + if ("Patient".equals(code)) + return Patient; + if ("PaymentNotice".equals(code)) + return PaymentNotice; + if ("PaymentReconciliation".equals(code)) + return PaymentReconciliation; + if ("Person".equals(code)) + return Person; + if ("Practitioner".equals(code)) + return Practitioner; + if ("Procedure".equals(code)) + return Procedure; + if ("ProcedureRequest".equals(code)) + return ProcedureRequest; + if ("ProcessRequest".equals(code)) + return ProcessRequest; + if ("ProcessResponse".equals(code)) + return ProcessResponse; + if ("Provenance".equals(code)) + return Provenance; + if ("Questionnaire".equals(code)) + return Questionnaire; + if ("QuestionnaireResponse".equals(code)) + return QuestionnaireResponse; + if ("ReferralRequest".equals(code)) + return ReferralRequest; + if ("RelatedPerson".equals(code)) + return RelatedPerson; + if ("RiskAssessment".equals(code)) + return RiskAssessment; + if ("Schedule".equals(code)) + return Schedule; + if ("SearchParameter".equals(code)) + return SearchParameter; + if ("Slot".equals(code)) + return Slot; + if ("Specimen".equals(code)) + return Specimen; + if ("StructureDefinition".equals(code)) + return StructureDefinition; + if ("Subscription".equals(code)) + return Subscription; + if ("Substance".equals(code)) + return Substance; + if ("SupplyDelivery".equals(code)) + return SupplyDelivery; + if ("SupplyRequest".equals(code)) + return SupplyRequest; + if ("TestScript".equals(code)) + return TestScript; + if ("ValueSet".equals(code)) + return ValueSet; + if ("VisionPrescription".equals(code)) + return VisionPrescription; + + throw new FHIRException("Unknown resource type"+code); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RiskAssessment.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RiskAssessment.java new file mode 100644 index 00000000000..a98b28c8046 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/RiskAssessment.java @@ -0,0 +1,1129 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ +@ResourceDef(name="RiskAssessment", profile="http://hl7.org/fhir/Profile/RiskAssessment") +public class RiskAssessment extends DomainResource { + + @Block() + public static class RiskAssessmentPredictionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * One of the potential outcomes for the patient (e.g. remission, death, a particular condition). + */ + @Child(name = "outcome", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Possible outcome for the subject", formalDefinition="One of the potential outcomes for the patient (e.g. remission, death, a particular condition)." ) + protected CodeableConcept outcome; + + /** + * How likely is the outcome (in the specified timeframe). + */ + @Child(name = "probability", type = {DecimalType.class, Range.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Likelihood of specified outcome", formalDefinition="How likely is the outcome (in the specified timeframe)." ) + protected Type probability; + + /** + * Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). + */ + @Child(name = "relativeRisk", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Relative likelihood", formalDefinition="Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.)." ) + protected DecimalType relativeRisk; + + /** + * Indicates the period of time or age range of the subject to which the specified probability applies. + */ + @Child(name = "when", type = {Period.class, Range.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Timeframe or age range", formalDefinition="Indicates the period of time or age range of the subject to which the specified probability applies." ) + protected Type when; + + /** + * Additional information explaining the basis for the prediction. + */ + @Child(name = "rationale", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Explanation of prediction", formalDefinition="Additional information explaining the basis for the prediction." ) + protected StringType rationale; + + private static final long serialVersionUID = 647967428L; + + /* + * Constructor + */ + public RiskAssessmentPredictionComponent() { + super(); + } + + /* + * Constructor + */ + public RiskAssessmentPredictionComponent(CodeableConcept outcome) { + super(); + this.outcome = outcome; + } + + /** + * @return {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) + */ + public CodeableConcept getOutcome() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new CodeableConcept(); // cc + return this.outcome; + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) + */ + public RiskAssessmentPredictionComponent setOutcome(CodeableConcept value) { + this.outcome = value; + return this; + } + + /** + * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) + */ + public Type getProbability() { + return this.probability; + } + + /** + * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) + */ + public DecimalType getProbabilityDecimalType() throws FHIRException { + if (!(this.probability instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.probability.getClass().getName()+" was encountered"); + return (DecimalType) this.probability; + } + + public boolean hasProbabilityDecimalType() { + return this.probability instanceof DecimalType; + } + + /** + * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) + */ + public Range getProbabilityRange() throws FHIRException { + if (!(this.probability instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.probability.getClass().getName()+" was encountered"); + return (Range) this.probability; + } + + public boolean hasProbabilityRange() { + return this.probability instanceof Range; + } + + /** + * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) + */ + public CodeableConcept getProbabilityCodeableConcept() throws FHIRException { + if (!(this.probability instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.probability.getClass().getName()+" was encountered"); + return (CodeableConcept) this.probability; + } + + public boolean hasProbabilityCodeableConcept() { + return this.probability instanceof CodeableConcept; + } + + public boolean hasProbability() { + return this.probability != null && !this.probability.isEmpty(); + } + + /** + * @param value {@link #probability} (How likely is the outcome (in the specified timeframe).) + */ + public RiskAssessmentPredictionComponent setProbability(Type value) { + this.probability = value; + return this; + } + + /** + * @return {@link #relativeRisk} (Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).). This is the underlying object with id, value and extensions. The accessor "getRelativeRisk" gives direct access to the value + */ + public DecimalType getRelativeRiskElement() { + if (this.relativeRisk == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.relativeRisk"); + else if (Configuration.doAutoCreate()) + this.relativeRisk = new DecimalType(); // bb + return this.relativeRisk; + } + + public boolean hasRelativeRiskElement() { + return this.relativeRisk != null && !this.relativeRisk.isEmpty(); + } + + public boolean hasRelativeRisk() { + return this.relativeRisk != null && !this.relativeRisk.isEmpty(); + } + + /** + * @param value {@link #relativeRisk} (Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).). This is the underlying object with id, value and extensions. The accessor "getRelativeRisk" gives direct access to the value + */ + public RiskAssessmentPredictionComponent setRelativeRiskElement(DecimalType value) { + this.relativeRisk = value; + return this; + } + + /** + * @return Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). + */ + public BigDecimal getRelativeRisk() { + return this.relativeRisk == null ? null : this.relativeRisk.getValue(); + } + + /** + * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). + */ + public RiskAssessmentPredictionComponent setRelativeRisk(BigDecimal value) { + if (value == null) + this.relativeRisk = null; + else { + if (this.relativeRisk == null) + this.relativeRisk = new DecimalType(); + this.relativeRisk.setValue(value); + } + return this; + } + + /** + * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). + */ + public RiskAssessmentPredictionComponent setRelativeRisk(long value) { + this.relativeRisk = new DecimalType(); + this.relativeRisk.setValue(value); + return this; + } + + /** + * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). + */ + public RiskAssessmentPredictionComponent setRelativeRisk(double value) { + this.relativeRisk = new DecimalType(); + this.relativeRisk.setValue(value); + return this; + } + + /** + * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) + */ + public Type getWhen() { + return this.when; + } + + /** + * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) + */ + public Period getWhenPeriod() throws FHIRException { + if (!(this.when instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered"); + return (Period) this.when; + } + + public boolean hasWhenPeriod() { + return this.when instanceof Period; + } + + /** + * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) + */ + public Range getWhenRange() throws FHIRException { + if (!(this.when instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.when.getClass().getName()+" was encountered"); + return (Range) this.when; + } + + public boolean hasWhenRange() { + return this.when instanceof Range; + } + + public boolean hasWhen() { + return this.when != null && !this.when.isEmpty(); + } + + /** + * @param value {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) + */ + public RiskAssessmentPredictionComponent setWhen(Type value) { + this.when = value; + return this; + } + + /** + * @return {@link #rationale} (Additional information explaining the basis for the prediction.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value + */ + public StringType getRationaleElement() { + if (this.rationale == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.rationale"); + else if (Configuration.doAutoCreate()) + this.rationale = new StringType(); // bb + return this.rationale; + } + + public boolean hasRationaleElement() { + return this.rationale != null && !this.rationale.isEmpty(); + } + + public boolean hasRationale() { + return this.rationale != null && !this.rationale.isEmpty(); + } + + /** + * @param value {@link #rationale} (Additional information explaining the basis for the prediction.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value + */ + public RiskAssessmentPredictionComponent setRationaleElement(StringType value) { + this.rationale = value; + return this; + } + + /** + * @return Additional information explaining the basis for the prediction. + */ + public String getRationale() { + return this.rationale == null ? null : this.rationale.getValue(); + } + + /** + * @param value Additional information explaining the basis for the prediction. + */ + public RiskAssessmentPredictionComponent setRationale(String value) { + if (Utilities.noString(value)) + this.rationale = null; + else { + if (this.rationale == null) + this.rationale = new StringType(); + this.rationale.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("outcome", "CodeableConcept", "One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("probability[x]", "decimal|Range|CodeableConcept", "How likely is the outcome (in the specified timeframe).", 0, java.lang.Integer.MAX_VALUE, probability)); + childrenList.add(new Property("relativeRisk", "decimal", "Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).", 0, java.lang.Integer.MAX_VALUE, relativeRisk)); + childrenList.add(new Property("when[x]", "Period|Range", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, java.lang.Integer.MAX_VALUE, when)); + childrenList.add(new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, java.lang.Integer.MAX_VALUE, rationale)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("outcome")) + this.outcome = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("probability[x]")) + this.probability = (Type) value; // Type + else if (name.equals("relativeRisk")) + this.relativeRisk = castToDecimal(value); // DecimalType + else if (name.equals("when[x]")) + this.when = (Type) value; // Type + else if (name.equals("rationale")) + this.rationale = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("outcome")) { + this.outcome = new CodeableConcept(); + return this.outcome; + } + else if (name.equals("probabilityDecimal")) { + this.probability = new DecimalType(); + return this.probability; + } + else if (name.equals("probabilityRange")) { + this.probability = new Range(); + return this.probability; + } + else if (name.equals("probabilityCodeableConcept")) { + this.probability = new CodeableConcept(); + return this.probability; + } + else if (name.equals("relativeRisk")) { + throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.relativeRisk"); + } + else if (name.equals("whenPeriod")) { + this.when = new Period(); + return this.when; + } + else if (name.equals("whenRange")) { + this.when = new Range(); + return this.when; + } + else if (name.equals("rationale")) { + throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.rationale"); + } + else + return super.addChild(name); + } + + public RiskAssessmentPredictionComponent copy() { + RiskAssessmentPredictionComponent dst = new RiskAssessmentPredictionComponent(); + copyValues(dst); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.probability = probability == null ? null : probability.copy(); + dst.relativeRisk = relativeRisk == null ? null : relativeRisk.copy(); + dst.when = when == null ? null : when.copy(); + dst.rationale = rationale == null ? null : rationale.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof RiskAssessmentPredictionComponent)) + return false; + RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other; + return compareDeep(outcome, o.outcome, true) && compareDeep(probability, o.probability, true) && compareDeep(relativeRisk, o.relativeRisk, true) + && compareDeep(when, o.when, true) && compareDeep(rationale, o.rationale, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof RiskAssessmentPredictionComponent)) + return false; + RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other; + return compareValues(relativeRisk, o.relativeRisk, true) && compareValues(rationale, o.rationale, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (outcome == null || outcome.isEmpty()) && (probability == null || probability.isEmpty()) + && (relativeRisk == null || relativeRisk.isEmpty()) && (when == null || when.isEmpty()) && (rationale == null || rationale.isEmpty()) + ; + } + + public String fhirType() { + return "RiskAssessment.prediction"; + + } + + } + + /** + * The patient or group the risk assessment applies to. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The patient or group the risk assessment applies to.) + */ + protected Resource subjectTarget; + + /** + * The date (and possibly time) the risk assessment was performed. + */ + @Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) + protected DateTimeType date; + + /** + * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. + */ + @Child(name = "condition", type = {Condition.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) + protected Reference condition; + + /** + * The actual object that is the target of the reference (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) + */ + protected Condition conditionTarget; + + /** + * The encounter where the assessment was performed. + */ + @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where was assessment performed?", formalDefinition="The encounter where the assessment was performed." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (The encounter where the assessment was performed.) + */ + protected Encounter encounterTarget; + + /** + * The provider or software application that performed the assessment. + */ + @Child(name = "performer", type = {Practitioner.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) + protected Reference performer; + + /** + * The actual object that is the target of the reference (The provider or software application that performed the assessment.) + */ + protected Resource performerTarget; + + /** + * Business identifier assigned to the risk assessment. + */ + @Child(name = "identifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) + protected Identifier identifier; + + /** + * The algorithm, process or mechanism used to evaluate the risk. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, process or mechanism used to evaluate the risk." ) + protected CodeableConcept method; + + /** + * Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.). + */ + @Child(name = "basis", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.)." ) + protected List basis; + /** + * The actual objects that are the target of the reference (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) + */ + protected List basisTarget; + + + /** + * Describes the expected outcome for the subject. + */ + @Child(name = "prediction", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) + protected List prediction; + + /** + * A description of the steps that might be taken to reduce the identified risk(s). + */ + @Child(name = "mitigation", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) + protected StringType mitigation; + + private static final long serialVersionUID = 724306293L; + + /* + * Constructor + */ + public RiskAssessment() { + super(); + } + + /** + * @return {@link #subject} (The patient or group the risk assessment applies to.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The patient or group the risk assessment applies to.) + */ + public RiskAssessment setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient or group the risk assessment applies to.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient or group the risk assessment applies to.) + */ + public RiskAssessment setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #date} (The date (and possibly time) the risk assessment was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and possibly time) the risk assessment was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public RiskAssessment setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and possibly time) the risk assessment was performed. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and possibly time) the risk assessment was performed. + */ + public RiskAssessment setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) + */ + public Reference getCondition() { + if (this.condition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.condition"); + else if (Configuration.doAutoCreate()) + this.condition = new Reference(); // cc + return this.condition; + } + + public boolean hasCondition() { + return this.condition != null && !this.condition.isEmpty(); + } + + /** + * @param value {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) + */ + public RiskAssessment setCondition(Reference value) { + this.condition = value; + return this; + } + + /** + * @return {@link #condition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) + */ + public Condition getConditionTarget() { + if (this.conditionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.condition"); + else if (Configuration.doAutoCreate()) + this.conditionTarget = new Condition(); // aa + return this.conditionTarget; + } + + /** + * @param value {@link #condition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) + */ + public RiskAssessment setConditionTarget(Condition value) { + this.conditionTarget = value; + return this; + } + + /** + * @return {@link #encounter} (The encounter where the assessment was performed.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (The encounter where the assessment was performed.) + */ + public RiskAssessment setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter where the assessment was performed.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter where the assessment was performed.) + */ + public RiskAssessment setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #performer} (The provider or software application that performed the assessment.) + */ + public Reference getPerformer() { + if (this.performer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.performer"); + else if (Configuration.doAutoCreate()) + this.performer = new Reference(); // cc + return this.performer; + } + + public boolean hasPerformer() { + return this.performer != null && !this.performer.isEmpty(); + } + + /** + * @param value {@link #performer} (The provider or software application that performed the assessment.) + */ + public RiskAssessment setPerformer(Reference value) { + this.performer = value; + return this; + } + + /** + * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider or software application that performed the assessment.) + */ + public Resource getPerformerTarget() { + return this.performerTarget; + } + + /** + * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider or software application that performed the assessment.) + */ + public RiskAssessment setPerformerTarget(Resource value) { + this.performerTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Business identifier assigned to the risk assessment.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Business identifier assigned to the risk assessment.) + */ + public RiskAssessment setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) + */ + public RiskAssessment setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #basis} (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) + */ + public List getBasis() { + if (this.basis == null) + this.basis = new ArrayList(); + return this.basis; + } + + public boolean hasBasis() { + if (this.basis == null) + return false; + for (Reference item : this.basis) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #basis} (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) + */ + // syntactic sugar + public Reference addBasis() { //3 + Reference t = new Reference(); + if (this.basis == null) + this.basis = new ArrayList(); + this.basis.add(t); + return t; + } + + // syntactic sugar + public RiskAssessment addBasis(Reference t) { //3 + if (t == null) + return this; + if (this.basis == null) + this.basis = new ArrayList(); + this.basis.add(t); + return this; + } + + /** + * @return {@link #basis} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) + */ + public List getBasisTarget() { + if (this.basisTarget == null) + this.basisTarget = new ArrayList(); + return this.basisTarget; + } + + /** + * @return {@link #prediction} (Describes the expected outcome for the subject.) + */ + public List getPrediction() { + if (this.prediction == null) + this.prediction = new ArrayList(); + return this.prediction; + } + + public boolean hasPrediction() { + if (this.prediction == null) + return false; + for (RiskAssessmentPredictionComponent item : this.prediction) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #prediction} (Describes the expected outcome for the subject.) + */ + // syntactic sugar + public RiskAssessmentPredictionComponent addPrediction() { //3 + RiskAssessmentPredictionComponent t = new RiskAssessmentPredictionComponent(); + if (this.prediction == null) + this.prediction = new ArrayList(); + this.prediction.add(t); + return t; + } + + // syntactic sugar + public RiskAssessment addPrediction(RiskAssessmentPredictionComponent t) { //3 + if (t == null) + return this; + if (this.prediction == null) + this.prediction = new ArrayList(); + this.prediction.add(t); + return this; + } + + /** + * @return {@link #mitigation} (A description of the steps that might be taken to reduce the identified risk(s).). This is the underlying object with id, value and extensions. The accessor "getMitigation" gives direct access to the value + */ + public StringType getMitigationElement() { + if (this.mitigation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RiskAssessment.mitigation"); + else if (Configuration.doAutoCreate()) + this.mitigation = new StringType(); // bb + return this.mitigation; + } + + public boolean hasMitigationElement() { + return this.mitigation != null && !this.mitigation.isEmpty(); + } + + public boolean hasMitigation() { + return this.mitigation != null && !this.mitigation.isEmpty(); + } + + /** + * @param value {@link #mitigation} (A description of the steps that might be taken to reduce the identified risk(s).). This is the underlying object with id, value and extensions. The accessor "getMitigation" gives direct access to the value + */ + public RiskAssessment setMitigationElement(StringType value) { + this.mitigation = value; + return this; + } + + /** + * @return A description of the steps that might be taken to reduce the identified risk(s). + */ + public String getMitigation() { + return this.mitigation == null ? null : this.mitigation.getValue(); + } + + /** + * @param value A description of the steps that might be taken to reduce the identified risk(s). + */ + public RiskAssessment setMitigation(String value) { + if (Utilities.noString(value)) + this.mitigation = null; + else { + if (this.mitigation == null) + this.mitigation = new StringType(); + this.mitigation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("date", "dateTime", "The date (and possibly time) the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("condition", "Reference(Condition)", "For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("performer", "Reference(Practitioner|Device)", "The provider or software application that performed the assessment.", 0, java.lang.Integer.MAX_VALUE, performer)); + childrenList.add(new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("basis", "Reference(Any)", "Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).", 0, java.lang.Integer.MAX_VALUE, basis)); + childrenList.add(new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction)); + childrenList.add(new Property("mitigation", "string", "A description of the steps that might be taken to reduce the identified risk(s).", 0, java.lang.Integer.MAX_VALUE, mitigation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("condition")) + this.condition = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("performer")) + this.performer = castToReference(value); // Reference + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("basis")) + this.getBasis().add(castToReference(value)); + else if (name.equals("prediction")) + this.getPrediction().add((RiskAssessmentPredictionComponent) value); + else if (name.equals("mitigation")) + this.mitigation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.date"); + } + else if (name.equals("condition")) { + this.condition = new Reference(); + return this.condition; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("performer")) { + this.performer = new Reference(); + return this.performer; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("basis")) { + return addBasis(); + } + else if (name.equals("prediction")) { + return addPrediction(); + } + else if (name.equals("mitigation")) { + throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.mitigation"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "RiskAssessment"; + + } + + public RiskAssessment copy() { + RiskAssessment dst = new RiskAssessment(); + copyValues(dst); + dst.subject = subject == null ? null : subject.copy(); + dst.date = date == null ? null : date.copy(); + dst.condition = condition == null ? null : condition.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.performer = performer == null ? null : performer.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.method = method == null ? null : method.copy(); + if (basis != null) { + dst.basis = new ArrayList(); + for (Reference i : basis) + dst.basis.add(i.copy()); + }; + if (prediction != null) { + dst.prediction = new ArrayList(); + for (RiskAssessmentPredictionComponent i : prediction) + dst.prediction.add(i.copy()); + }; + dst.mitigation = mitigation == null ? null : mitigation.copy(); + return dst; + } + + protected RiskAssessment typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof RiskAssessment)) + return false; + RiskAssessment o = (RiskAssessment) other; + return compareDeep(subject, o.subject, true) && compareDeep(date, o.date, true) && compareDeep(condition, o.condition, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(performer, o.performer, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(method, o.method, true) && compareDeep(basis, o.basis, true) && compareDeep(prediction, o.prediction, true) + && compareDeep(mitigation, o.mitigation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof RiskAssessment)) + return false; + RiskAssessment o = (RiskAssessment) other; + return compareValues(date, o.date, true) && compareValues(mitigation, o.mitigation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (subject == null || subject.isEmpty()) && (date == null || date.isEmpty()) + && (condition == null || condition.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (performer == null || performer.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (method == null || method.isEmpty()) && (basis == null || basis.isEmpty()) && (prediction == null || prediction.isEmpty()) + && (mitigation == null || mitigation.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.RiskAssessment; + } + + @SearchParamDefinition(name="date", path="RiskAssessment.date", description="When was assessment made?", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="RiskAssessment.identifier", description="Unique identifier for the assessment", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference" ) + public static final String SP_CONDITION = "condition"; + @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) + public static final String SP_METHOD = "method"; + @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="encounter", path="RiskAssessment.encounter", description="Where was assessment performed?", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SampledData.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SampledData.java new file mode 100644 index 00000000000..1a7cc57890b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SampledData.java @@ -0,0 +1,610 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. + */ +@DatatypeDef(name="SampledData") +public class SampledData extends Type implements ICompositeType { + + /** + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series. + */ + @Child(name = "origin", type = {SimpleQuantity.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Zero value and units", formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." ) + protected SimpleQuantity origin; + + /** + * The length of time between sampling times, measured in milliseconds. + */ + @Child(name = "period", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of milliseconds between samples", formalDefinition="The length of time between sampling times, measured in milliseconds." ) + protected DecimalType period; + + /** + * A correction factor that is applied to the sampled data points before they are added to the origin. + */ + @Child(name = "factor", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Multiply data by this before adding to origin", formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin." ) + protected DecimalType factor; + + /** + * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). + */ + @Child(name = "lowerLimit", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lower limit of detection", formalDefinition="The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)." ) + protected DecimalType lowerLimit; + + /** + * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). + */ + @Child(name = "upperLimit", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Upper limit of detection", formalDefinition="The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)." ) + protected DecimalType upperLimit; + + /** + * The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once. + */ + @Child(name = "dimensions", type = {PositiveIntType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of sample points at each time point", formalDefinition="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." ) + protected PositiveIntType dimensions; + + /** + * A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. + */ + @Child(name = "data", type = {StringType.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Decimal values with spaces, or \"E\" | \"U\" | \"L\"", formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value." ) + protected StringType data; + + private static final long serialVersionUID = -1763278368L; + + /* + * Constructor + */ + public SampledData() { + super(); + } + + /* + * Constructor + */ + public SampledData(SimpleQuantity origin, DecimalType period, PositiveIntType dimensions, StringType data) { + super(); + this.origin = origin; + this.period = period; + this.dimensions = dimensions; + this.data = data; + } + + /** + * @return {@link #origin} (The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.) + */ + public SimpleQuantity getOrigin() { + if (this.origin == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.origin"); + else if (Configuration.doAutoCreate()) + this.origin = new SimpleQuantity(); // cc + return this.origin; + } + + public boolean hasOrigin() { + return this.origin != null && !this.origin.isEmpty(); + } + + /** + * @param value {@link #origin} (The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.) + */ + public SampledData setOrigin(SimpleQuantity value) { + this.origin = value; + return this; + } + + /** + * @return {@link #period} (The length of time between sampling times, measured in milliseconds.). This is the underlying object with id, value and extensions. The accessor "getPeriod" gives direct access to the value + */ + public DecimalType getPeriodElement() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.period"); + else if (Configuration.doAutoCreate()) + this.period = new DecimalType(); // bb + return this.period; + } + + public boolean hasPeriodElement() { + return this.period != null && !this.period.isEmpty(); + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The length of time between sampling times, measured in milliseconds.). This is the underlying object with id, value and extensions. The accessor "getPeriod" gives direct access to the value + */ + public SampledData setPeriodElement(DecimalType value) { + this.period = value; + return this; + } + + /** + * @return The length of time between sampling times, measured in milliseconds. + */ + public BigDecimal getPeriod() { + return this.period == null ? null : this.period.getValue(); + } + + /** + * @param value The length of time between sampling times, measured in milliseconds. + */ + public SampledData setPeriod(BigDecimal value) { + if (this.period == null) + this.period = new DecimalType(); + this.period.setValue(value); + return this; + } + + /** + * @param value The length of time between sampling times, measured in milliseconds. + */ + public SampledData setPeriod(long value) { + this.period = new DecimalType(); + this.period.setValue(value); + return this; + } + + /** + * @param value The length of time between sampling times, measured in milliseconds. + */ + public SampledData setPeriod(double value) { + this.period = new DecimalType(); + this.period.setValue(value); + return this; + } + + /** + * @return {@link #factor} (A correction factor that is applied to the sampled data points before they are added to the origin.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public DecimalType getFactorElement() { + if (this.factor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.factor"); + else if (Configuration.doAutoCreate()) + this.factor = new DecimalType(); // bb + return this.factor; + } + + public boolean hasFactorElement() { + return this.factor != null && !this.factor.isEmpty(); + } + + public boolean hasFactor() { + return this.factor != null && !this.factor.isEmpty(); + } + + /** + * @param value {@link #factor} (A correction factor that is applied to the sampled data points before they are added to the origin.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value + */ + public SampledData setFactorElement(DecimalType value) { + this.factor = value; + return this; + } + + /** + * @return A correction factor that is applied to the sampled data points before they are added to the origin. + */ + public BigDecimal getFactor() { + return this.factor == null ? null : this.factor.getValue(); + } + + /** + * @param value A correction factor that is applied to the sampled data points before they are added to the origin. + */ + public SampledData setFactor(BigDecimal value) { + if (value == null) + this.factor = null; + else { + if (this.factor == null) + this.factor = new DecimalType(); + this.factor.setValue(value); + } + return this; + } + + /** + * @param value A correction factor that is applied to the sampled data points before they are added to the origin. + */ + public SampledData setFactor(long value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @param value A correction factor that is applied to the sampled data points before they are added to the origin. + */ + public SampledData setFactor(double value) { + this.factor = new DecimalType(); + this.factor.setValue(value); + return this; + } + + /** + * @return {@link #lowerLimit} (The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit).). This is the underlying object with id, value and extensions. The accessor "getLowerLimit" gives direct access to the value + */ + public DecimalType getLowerLimitElement() { + if (this.lowerLimit == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.lowerLimit"); + else if (Configuration.doAutoCreate()) + this.lowerLimit = new DecimalType(); // bb + return this.lowerLimit; + } + + public boolean hasLowerLimitElement() { + return this.lowerLimit != null && !this.lowerLimit.isEmpty(); + } + + public boolean hasLowerLimit() { + return this.lowerLimit != null && !this.lowerLimit.isEmpty(); + } + + /** + * @param value {@link #lowerLimit} (The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit).). This is the underlying object with id, value and extensions. The accessor "getLowerLimit" gives direct access to the value + */ + public SampledData setLowerLimitElement(DecimalType value) { + this.lowerLimit = value; + return this; + } + + /** + * @return The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). + */ + public BigDecimal getLowerLimit() { + return this.lowerLimit == null ? null : this.lowerLimit.getValue(); + } + + /** + * @param value The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). + */ + public SampledData setLowerLimit(BigDecimal value) { + if (value == null) + this.lowerLimit = null; + else { + if (this.lowerLimit == null) + this.lowerLimit = new DecimalType(); + this.lowerLimit.setValue(value); + } + return this; + } + + /** + * @param value The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). + */ + public SampledData setLowerLimit(long value) { + this.lowerLimit = new DecimalType(); + this.lowerLimit.setValue(value); + return this; + } + + /** + * @param value The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit). + */ + public SampledData setLowerLimit(double value) { + this.lowerLimit = new DecimalType(); + this.lowerLimit.setValue(value); + return this; + } + + /** + * @return {@link #upperLimit} (The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit).). This is the underlying object with id, value and extensions. The accessor "getUpperLimit" gives direct access to the value + */ + public DecimalType getUpperLimitElement() { + if (this.upperLimit == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.upperLimit"); + else if (Configuration.doAutoCreate()) + this.upperLimit = new DecimalType(); // bb + return this.upperLimit; + } + + public boolean hasUpperLimitElement() { + return this.upperLimit != null && !this.upperLimit.isEmpty(); + } + + public boolean hasUpperLimit() { + return this.upperLimit != null && !this.upperLimit.isEmpty(); + } + + /** + * @param value {@link #upperLimit} (The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit).). This is the underlying object with id, value and extensions. The accessor "getUpperLimit" gives direct access to the value + */ + public SampledData setUpperLimitElement(DecimalType value) { + this.upperLimit = value; + return this; + } + + /** + * @return The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). + */ + public BigDecimal getUpperLimit() { + return this.upperLimit == null ? null : this.upperLimit.getValue(); + } + + /** + * @param value The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). + */ + public SampledData setUpperLimit(BigDecimal value) { + if (value == null) + this.upperLimit = null; + else { + if (this.upperLimit == null) + this.upperLimit = new DecimalType(); + this.upperLimit.setValue(value); + } + return this; + } + + /** + * @param value The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). + */ + public SampledData setUpperLimit(long value) { + this.upperLimit = new DecimalType(); + this.upperLimit.setValue(value); + return this; + } + + /** + * @param value The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit). + */ + public SampledData setUpperLimit(double value) { + this.upperLimit = new DecimalType(); + this.upperLimit.setValue(value); + return this; + } + + /** + * @return {@link #dimensions} (The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.). This is the underlying object with id, value and extensions. The accessor "getDimensions" gives direct access to the value + */ + public PositiveIntType getDimensionsElement() { + if (this.dimensions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.dimensions"); + else if (Configuration.doAutoCreate()) + this.dimensions = new PositiveIntType(); // bb + return this.dimensions; + } + + public boolean hasDimensionsElement() { + return this.dimensions != null && !this.dimensions.isEmpty(); + } + + public boolean hasDimensions() { + return this.dimensions != null && !this.dimensions.isEmpty(); + } + + /** + * @param value {@link #dimensions} (The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.). This is the underlying object with id, value and extensions. The accessor "getDimensions" gives direct access to the value + */ + public SampledData setDimensionsElement(PositiveIntType value) { + this.dimensions = value; + return this; + } + + /** + * @return The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once. + */ + public int getDimensions() { + return this.dimensions == null || this.dimensions.isEmpty() ? 0 : this.dimensions.getValue(); + } + + /** + * @param value The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once. + */ + public SampledData setDimensions(int value) { + if (this.dimensions == null) + this.dimensions = new PositiveIntType(); + this.dimensions.setValue(value); + return this; + } + + /** + * @return {@link #data} (A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value + */ + public StringType getDataElement() { + if (this.data == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SampledData.data"); + else if (Configuration.doAutoCreate()) + this.data = new StringType(); // bb + return this.data; + } + + public boolean hasDataElement() { + return this.data != null && !this.data.isEmpty(); + } + + public boolean hasData() { + return this.data != null && !this.data.isEmpty(); + } + + /** + * @param value {@link #data} (A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value + */ + public SampledData setDataElement(StringType value) { + this.data = value; + return this; + } + + /** + * @return A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. + */ + public String getData() { + return this.data == null ? null : this.data.getValue(); + } + + /** + * @param value A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. + */ + public SampledData setData(String value) { + if (this.data == null) + this.data = new StringType(); + this.data.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("origin", "SimpleQuantity", "The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.", 0, java.lang.Integer.MAX_VALUE, origin)); + childrenList.add(new Property("period", "decimal", "The length of time between sampling times, measured in milliseconds.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("factor", "decimal", "A correction factor that is applied to the sampled data points before they are added to the origin.", 0, java.lang.Integer.MAX_VALUE, factor)); + childrenList.add(new Property("lowerLimit", "decimal", "The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit).", 0, java.lang.Integer.MAX_VALUE, lowerLimit)); + childrenList.add(new Property("upperLimit", "decimal", "The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit).", 0, java.lang.Integer.MAX_VALUE, upperLimit)); + childrenList.add(new Property("dimensions", "positiveInt", "The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.", 0, java.lang.Integer.MAX_VALUE, dimensions)); + childrenList.add(new Property("data", "string", "A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value.", 0, java.lang.Integer.MAX_VALUE, data)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("origin")) + this.origin = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("period")) + this.period = castToDecimal(value); // DecimalType + else if (name.equals("factor")) + this.factor = castToDecimal(value); // DecimalType + else if (name.equals("lowerLimit")) + this.lowerLimit = castToDecimal(value); // DecimalType + else if (name.equals("upperLimit")) + this.upperLimit = castToDecimal(value); // DecimalType + else if (name.equals("dimensions")) + this.dimensions = castToPositiveInt(value); // PositiveIntType + else if (name.equals("data")) + this.data = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("origin")) { + this.origin = new SimpleQuantity(); + return this.origin; + } + else if (name.equals("period")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.period"); + } + else if (name.equals("factor")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.factor"); + } + else if (name.equals("lowerLimit")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.lowerLimit"); + } + else if (name.equals("upperLimit")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.upperLimit"); + } + else if (name.equals("dimensions")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.dimensions"); + } + else if (name.equals("data")) { + throw new FHIRException("Cannot call addChild on a primitive type SampledData.data"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "SampledData"; + + } + + public SampledData copy() { + SampledData dst = new SampledData(); + copyValues(dst); + dst.origin = origin == null ? null : origin.copy(); + dst.period = period == null ? null : period.copy(); + dst.factor = factor == null ? null : factor.copy(); + dst.lowerLimit = lowerLimit == null ? null : lowerLimit.copy(); + dst.upperLimit = upperLimit == null ? null : upperLimit.copy(); + dst.dimensions = dimensions == null ? null : dimensions.copy(); + dst.data = data == null ? null : data.copy(); + return dst; + } + + protected SampledData typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SampledData)) + return false; + SampledData o = (SampledData) other; + return compareDeep(origin, o.origin, true) && compareDeep(period, o.period, true) && compareDeep(factor, o.factor, true) + && compareDeep(lowerLimit, o.lowerLimit, true) && compareDeep(upperLimit, o.upperLimit, true) && compareDeep(dimensions, o.dimensions, true) + && compareDeep(data, o.data, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SampledData)) + return false; + SampledData o = (SampledData) other; + return compareValues(period, o.period, true) && compareValues(factor, o.factor, true) && compareValues(lowerLimit, o.lowerLimit, true) + && compareValues(upperLimit, o.upperLimit, true) && compareValues(dimensions, o.dimensions, true) && compareValues(data, o.data, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (origin == null || origin.isEmpty()) && (period == null || period.isEmpty()) + && (factor == null || factor.isEmpty()) && (lowerLimit == null || lowerLimit.isEmpty()) && (upperLimit == null || upperLimit.isEmpty()) + && (dimensions == null || dimensions.isEmpty()) && (data == null || data.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Schedule.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Schedule.java new file mode 100644 index 00000000000..8d2a9f1b392 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Schedule.java @@ -0,0 +1,418 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A container for slot(s) of time that may be available for booking appointments. + */ +@ResourceDef(name="Schedule", profile="http://hl7.org/fhir/Profile/Schedule") +public class Schedule extends DomainResource { + + /** + * External Ids for this item. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) + protected List identifier; + + /** + * The schedule type can be used for the categorization of healthcare services or other appointment types. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types", formalDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types." ) + protected List type; + + /** + * The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson. + */ + @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson", formalDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson." ) + protected Reference actor; + + /** + * The actual object that is the target of the reference (The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.) + */ + protected Resource actorTarget; + + /** + * The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates. + */ + @Child(name = "planningHorizon", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates", formalDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates." ) + protected Period planningHorizon; + + /** + * Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. + */ + @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated", formalDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated." ) + protected StringType comment; + + private static final long serialVersionUID = 158030926L; + + /* + * Constructor + */ + public Schedule() { + super(); + } + + /* + * Constructor + */ + public Schedule(Reference actor) { + super(); + this.actor = actor; + } + + /** + * @return {@link #identifier} (External Ids for this item.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External Ids for this item.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Schedule addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #type} (The schedule type can be used for the categorization of healthcare services or other appointment types.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (The schedule type can be used for the categorization of healthcare services or other appointment types.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public Schedule addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #actor} (The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Schedule.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.) + */ + public Schedule setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.) + */ + public Resource getActorTarget() { + return this.actorTarget; + } + + /** + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.) + */ + public Schedule setActorTarget(Resource value) { + this.actorTarget = value; + return this; + } + + /** + * @return {@link #planningHorizon} (The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates.) + */ + public Period getPlanningHorizon() { + if (this.planningHorizon == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Schedule.planningHorizon"); + else if (Configuration.doAutoCreate()) + this.planningHorizon = new Period(); // cc + return this.planningHorizon; + } + + public boolean hasPlanningHorizon() { + return this.planningHorizon != null && !this.planningHorizon.isEmpty(); + } + + /** + * @param value {@link #planningHorizon} (The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates.) + */ + public Schedule setPlanningHorizon(Period value) { + this.planningHorizon = value; + return this; + } + + /** + * @return {@link #comment} (Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Schedule.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public Schedule setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. + */ + public Schedule setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External Ids for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "CodeableConcept", "The schedule type can be used for the categorization of healthcare services or other appointment types.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("planningHorizon", "Period", "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates.", 0, java.lang.Integer.MAX_VALUE, planningHorizon)); + childrenList.add(new Property("comment", "string", "Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.", 0, java.lang.Integer.MAX_VALUE, comment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("actor")) + this.actor = castToReference(value); // Reference + else if (name.equals("planningHorizon")) + this.planningHorizon = castToPeriod(value); // Period + else if (name.equals("comment")) + this.comment = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("planningHorizon")) { + this.planningHorizon = new Period(); + return this.planningHorizon; + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type Schedule.comment"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Schedule"; + + } + + public Schedule copy() { + Schedule dst = new Schedule(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.actor = actor == null ? null : actor.copy(); + dst.planningHorizon = planningHorizon == null ? null : planningHorizon.copy(); + dst.comment = comment == null ? null : comment.copy(); + return dst; + } + + protected Schedule typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Schedule)) + return false; + Schedule o = (Schedule) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(actor, o.actor, true) + && compareDeep(planningHorizon, o.planningHorizon, true) && compareDeep(comment, o.comment, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Schedule)) + return false; + Schedule o = (Schedule) other; + return compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) + && (actor == null || actor.isEmpty()) && (planningHorizon == null || planningHorizon.isEmpty()) + && (comment == null || comment.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Schedule; + } + + @SearchParamDefinition(name="actor", path="Schedule.actor", description="The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for", type="reference" ) + public static final String SP_ACTOR = "actor"; + @SearchParamDefinition(name="date", path="Schedule.planningHorizon", description="Search for Schedule resources that have a period that contains this date specified", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="Schedule.identifier", description="A Schedule Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="type", path="Schedule.type", description="The type of appointments that can be booked into associated slot(s)", type="token" ) + public static final String SP_TYPE = "type"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SearchParameter.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SearchParameter.java new file mode 100644 index 00000000000..cef8354b8b9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SearchParameter.java @@ -0,0 +1,1403 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ +@ResourceDef(name="SearchParameter", profile="http://hl7.org/fhir/Profile/SearchParameter") +public class SearchParameter extends DomainResource { + + public enum XPathUsageType { + /** + * The search parameter is derived directly from the selected nodes based on the type definitions. + */ + NORMAL, + /** + * The search parameter is derived by a phonetic transform from the selected nodes. + */ + PHONETIC, + /** + * The search parameter is based on a spatial transform of the selected nodes. + */ + NEARBY, + /** + * The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle. + */ + DISTANCE, + /** + * The interpretation of the xpath statement is unknown (and can't be automated). + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static XPathUsageType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("phonetic".equals(codeString)) + return PHONETIC; + if ("nearby".equals(codeString)) + return NEARBY; + if ("distance".equals(codeString)) + return DISTANCE; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case PHONETIC: return "phonetic"; + case NEARBY: return "nearby"; + case DISTANCE: return "distance"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NORMAL: return "http://hl7.org/fhir/search-xpath-usage"; + case PHONETIC: return "http://hl7.org/fhir/search-xpath-usage"; + case NEARBY: return "http://hl7.org/fhir/search-xpath-usage"; + case DISTANCE: return "http://hl7.org/fhir/search-xpath-usage"; + case OTHER: return "http://hl7.org/fhir/search-xpath-usage"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The search parameter is derived directly from the selected nodes based on the type definitions."; + case PHONETIC: return "The search parameter is derived by a phonetic transform from the selected nodes."; + case NEARBY: return "The search parameter is based on a spatial transform of the selected nodes."; + case DISTANCE: return "The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle."; + case OTHER: return "The interpretation of the xpath statement is unknown (and can't be automated)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "Normal"; + case PHONETIC: return "Phonetic"; + case NEARBY: return "Nearby"; + case DISTANCE: return "Distance"; + case OTHER: return "Other"; + default: return "?"; + } + } + } + + public static class XPathUsageTypeEnumFactory implements EnumFactory { + public XPathUsageType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return XPathUsageType.NORMAL; + if ("phonetic".equals(codeString)) + return XPathUsageType.PHONETIC; + if ("nearby".equals(codeString)) + return XPathUsageType.NEARBY; + if ("distance".equals(codeString)) + return XPathUsageType.DISTANCE; + if ("other".equals(codeString)) + return XPathUsageType.OTHER; + throw new IllegalArgumentException("Unknown XPathUsageType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return new Enumeration(this, XPathUsageType.NORMAL); + if ("phonetic".equals(codeString)) + return new Enumeration(this, XPathUsageType.PHONETIC); + if ("nearby".equals(codeString)) + return new Enumeration(this, XPathUsageType.NEARBY); + if ("distance".equals(codeString)) + return new Enumeration(this, XPathUsageType.DISTANCE); + if ("other".equals(codeString)) + return new Enumeration(this, XPathUsageType.OTHER); + throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'"); + } + public String toCode(XPathUsageType code) { + if (code == XPathUsageType.NORMAL) + return "normal"; + if (code == XPathUsageType.PHONETIC) + return "phonetic"; + if (code == XPathUsageType.NEARBY) + return "nearby"; + if (code == XPathUsageType.DISTANCE) + return "distance"; + if (code == XPathUsageType.OTHER) + return "other"; + return "?"; + } + } + + @Block() + public static class SearchParameterContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the search parameter. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the search parameter." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public SearchParameterContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the search parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameterContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the search parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public SearchParameterContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the search parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the search parameter. + */ + public SearchParameterContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public SearchParameterContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the search parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public SearchParameterContactComponent copy() { + SearchParameterContactComponent dst = new SearchParameterContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SearchParameterContactComponent)) + return false; + SearchParameterContactComponent o = (SearchParameterContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SearchParameterContactComponent)) + return false; + SearchParameterContactComponent o = (SearchParameterContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "SearchParameter.contact"; + + } + + } + + /** + * An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this search parameter", formalDefinition="An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published." ) + protected UriType url; + + /** + * A free text natural language name identifying the search parameter. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this search parameter", formalDefinition="A free text natural language name identifying the search parameter." ) + protected StringType name; + + /** + * The status of this search parameter definition. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this search parameter definition." ) + protected Enumeration status; + + /** + * A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the search parameter. + */ + @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the search parameter." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes." ) + protected DateTimeType date; + + /** + * The Scope and Usage that this search parameter was created to meet. + */ + @Child(name = "requirements", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why this search parameter is defined", formalDefinition="The Scope and Usage that this search parameter was created to meet." ) + protected StringType requirements; + + /** + * The code used in the URL or the parameter name in a parameters resource for this search parameter. + */ + @Child(name = "code", type = {CodeType.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code used in URL", formalDefinition="The code used in the URL or the parameter name in a parameters resource for this search parameter." ) + protected CodeType code; + + /** + * The base resource type that this search parameter refers to. + */ + @Child(name = "base", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The resource type this search parameter applies to", formalDefinition="The base resource type that this search parameter refers to." ) + protected CodeType base; + + /** + * The type of value a search parameter refers to, and how the content is interpreted. + */ + @Child(name = "type", type = {CodeType.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) + protected Enumeration type; + + /** + * A description of the search parameters and how it used. + */ + @Child(name = "description", type = {StringType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Documentation for search parameter", formalDefinition="A description of the search parameters and how it used." ) + protected StringType description; + + /** + * An XPath expression that returns a set of elements for the search parameter. + */ + @Child(name = "xpath", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." ) + protected StringType xpath; + + /** + * How the search parameter relates to the set of elements returned by evaluating the xpath query. + */ + @Child(name = "xpathUsage", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="normal | phonetic | nearby | distance | other", formalDefinition="How the search parameter relates to the set of elements returned by evaluating the xpath query." ) + protected Enumeration xpathUsage; + + /** + * Types of resource (if a resource is referenced). + */ + @Child(name = "target", type = {CodeType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) + protected List target; + + private static final long serialVersionUID = -742596414L; + + /* + * Constructor + */ + public SearchParameter() { + super(); + } + + /* + * Constructor + */ + public SearchParameter(UriType url, StringType name, CodeType code, CodeType base, Enumeration type, StringType description) { + super(); + this.url = url; + this.name = name; + this.code = code; + this.base = base; + this.type = type; + this.description = description; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public SearchParameter setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. + */ + public SearchParameter setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the search parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the search parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public SearchParameter setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the search parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the search parameter. + */ + public SearchParameter setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of this search parameter definition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this search parameter definition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public SearchParameter setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this search parameter definition. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this search parameter definition. + */ + public SearchParameter setStatus(ConformanceResourceStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #experimental} (A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public SearchParameter setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public SearchParameter setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public SearchParameter setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the search parameter. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the search parameter. + */ + public SearchParameter setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (SearchParameterContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public SearchParameterContactComponent addContact() { //3 + SearchParameterContactComponent t = new SearchParameterContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public SearchParameter addContact(SearchParameterContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public SearchParameter setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + public SearchParameter setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #requirements} (The Scope and Usage that this search parameter was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (The Scope and Usage that this search parameter was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public SearchParameter setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return The Scope and Usage that this search parameter was created to meet. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value The Scope and Usage that this search parameter was created to meet. + */ + public SearchParameter setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public SearchParameter setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return The code used in the URL or the parameter name in a parameters resource for this search parameter. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value The code used in the URL or the parameter name in a parameters resource for this search parameter. + */ + public SearchParameter setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #base} (The base resource type that this search parameter refers to.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public CodeType getBaseElement() { + if (this.base == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.base"); + else if (Configuration.doAutoCreate()) + this.base = new CodeType(); // bb + return this.base; + } + + public boolean hasBaseElement() { + return this.base != null && !this.base.isEmpty(); + } + + public boolean hasBase() { + return this.base != null && !this.base.isEmpty(); + } + + /** + * @param value {@link #base} (The base resource type that this search parameter refers to.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public SearchParameter setBaseElement(CodeType value) { + this.base = value; + return this; + } + + /** + * @return The base resource type that this search parameter refers to. + */ + public String getBase() { + return this.base == null ? null : this.base.getValue(); + } + + /** + * @param value The base resource type that this search parameter refers to. + */ + public SearchParameter setBase(String value) { + if (this.base == null) + this.base = new CodeType(); + this.base.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new SearchParamTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public SearchParameter setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of value a search parameter refers to, and how the content is interpreted. + */ + public SearchParamType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of value a search parameter refers to, and how the content is interpreted. + */ + public SearchParameter setType(SearchParamType value) { + if (this.type == null) + this.type = new Enumeration(new SearchParamTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #description} (A description of the search parameters and how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the search parameters and how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public SearchParameter setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the search parameters and how it used. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the search parameters and how it used. + */ + public SearchParameter setDescription(String value) { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value + */ + public StringType getXpathElement() { + if (this.xpath == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.xpath"); + else if (Configuration.doAutoCreate()) + this.xpath = new StringType(); // bb + return this.xpath; + } + + public boolean hasXpathElement() { + return this.xpath != null && !this.xpath.isEmpty(); + } + + public boolean hasXpath() { + return this.xpath != null && !this.xpath.isEmpty(); + } + + /** + * @param value {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value + */ + public SearchParameter setXpathElement(StringType value) { + this.xpath = value; + return this; + } + + /** + * @return An XPath expression that returns a set of elements for the search parameter. + */ + public String getXpath() { + return this.xpath == null ? null : this.xpath.getValue(); + } + + /** + * @param value An XPath expression that returns a set of elements for the search parameter. + */ + public SearchParameter setXpath(String value) { + if (Utilities.noString(value)) + this.xpath = null; + else { + if (this.xpath == null) + this.xpath = new StringType(); + this.xpath.setValue(value); + } + return this; + } + + /** + * @return {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value + */ + public Enumeration getXpathUsageElement() { + if (this.xpathUsage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.xpathUsage"); + else if (Configuration.doAutoCreate()) + this.xpathUsage = new Enumeration(new XPathUsageTypeEnumFactory()); // bb + return this.xpathUsage; + } + + public boolean hasXpathUsageElement() { + return this.xpathUsage != null && !this.xpathUsage.isEmpty(); + } + + public boolean hasXpathUsage() { + return this.xpathUsage != null && !this.xpathUsage.isEmpty(); + } + + /** + * @param value {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value + */ + public SearchParameter setXpathUsageElement(Enumeration value) { + this.xpathUsage = value; + return this; + } + + /** + * @return How the search parameter relates to the set of elements returned by evaluating the xpath query. + */ + public XPathUsageType getXpathUsage() { + return this.xpathUsage == null ? null : this.xpathUsage.getValue(); + } + + /** + * @param value How the search parameter relates to the set of elements returned by evaluating the xpath query. + */ + public SearchParameter setXpathUsage(XPathUsageType value) { + if (value == null) + this.xpathUsage = null; + else { + if (this.xpathUsage == null) + this.xpathUsage = new Enumeration(new XPathUsageTypeEnumFactory()); + this.xpathUsage.setValue(value); + } + return this; + } + + /** + * @return {@link #target} (Types of resource (if a resource is referenced).) + */ + public List getTarget() { + if (this.target == null) + this.target = new ArrayList(); + return this.target; + } + + public boolean hasTarget() { + if (this.target == null) + return false; + for (CodeType item : this.target) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #target} (Types of resource (if a resource is referenced).) + */ + // syntactic sugar + public CodeType addTargetElement() {//2 + CodeType t = new CodeType(); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return t; + } + + /** + * @param value {@link #target} (Types of resource (if a resource is referenced).) + */ + public SearchParameter addTarget(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return this; + } + + /** + * @param value {@link #target} (Types of resource (if a resource is referenced).) + */ + public boolean hasTarget(String value) { + if (this.target == null) + return false; + for (CodeType v : this.target) + if (v.equals(value)) // code + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the search parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of this search parameter definition.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the search parameter.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("requirements", "string", "The Scope and Usage that this search parameter was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("base", "code", "The base resource type that this search parameter refers to.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("description", "string", "A description of the search parameters and how it used.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, java.lang.Integer.MAX_VALUE, xpath)); + childrenList.add(new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, java.lang.Integer.MAX_VALUE, xpathUsage)); + childrenList.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((SearchParameterContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("base")) + this.base = castToCode(value); // CodeType + else if (name.equals("type")) + this.type = new SearchParamTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("xpath")) + this.xpath = castToString(value); // StringType + else if (name.equals("xpathUsage")) + this.xpathUsage = new XPathUsageTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("target")) + this.getTarget().add(castToCode(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.url"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.date"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.requirements"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.code"); + } + else if (name.equals("base")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.base"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.type"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.description"); + } + else if (name.equals("xpath")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpath"); + } + else if (name.equals("xpathUsage")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpathUsage"); + } + else if (name.equals("target")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.target"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "SearchParameter"; + + } + + public SearchParameter copy() { + SearchParameter dst = new SearchParameter(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (SearchParameterContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.code = code == null ? null : code.copy(); + dst.base = base == null ? null : base.copy(); + dst.type = type == null ? null : type.copy(); + dst.description = description == null ? null : description.copy(); + dst.xpath = xpath == null ? null : xpath.copy(); + dst.xpathUsage = xpathUsage == null ? null : xpathUsage.copy(); + if (target != null) { + dst.target = new ArrayList(); + for (CodeType i : target) + dst.target.add(i.copy()); + }; + return dst; + } + + protected SearchParameter typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SearchParameter)) + return false; + SearchParameter o = (SearchParameter) other; + return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) + && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(code, o.code, true) && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) + && compareDeep(description, o.description, true) && compareDeep(xpath, o.xpath, true) && compareDeep(xpathUsage, o.xpathUsage, true) + && compareDeep(target, o.target, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SearchParameter)) + return false; + SearchParameter o = (SearchParameter) other; + return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(status, o.status, true) + && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(requirements, o.requirements, true) && compareValues(code, o.code, true) + && compareValues(base, o.base, true) && compareValues(type, o.type, true) && compareValues(description, o.description, true) + && compareValues(xpath, o.xpath, true) && compareValues(xpathUsage, o.xpathUsage, true) && compareValues(target, o.target, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (name == null || name.isEmpty()) + && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) + && (requirements == null || requirements.isEmpty()) && (code == null || code.isEmpty()) && (base == null || base.isEmpty()) + && (type == null || type.isEmpty()) && (description == null || description.isEmpty()) && (xpath == null || xpath.isEmpty()) + && (xpathUsage == null || xpathUsage.isEmpty()) && (target == null || target.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.SearchParameter; + } + + @SearchParamDefinition(name="code", path="SearchParameter.code", description="Code used in URL", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="name", path="SearchParameter.name", description="Informal name for this search parameter", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="description", path="SearchParameter.description", description="Documentation for search parameter", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="type", path="SearchParameter.type", description="number | date | string | token | reference | composite | quantity | uri", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="url", path="SearchParameter.url", description="Absolute URL used to reference this search parameter", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type this search parameter applies to", type="token" ) + public static final String SP_BASE = "base"; + @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" ) + public static final String SP_TARGET = "target"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SidType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SidType.java new file mode 100644 index 00000000000..26518fc0fbb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SidType.java @@ -0,0 +1,38 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.dstu21.model; + +public class SidType extends UriType { + + private static final long serialVersionUID = 5486832330986493589L; + + public String fhirType() { + return "sid"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Signature.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Signature.java new file mode 100644 index 00000000000..c0c72ed115b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Signature.java @@ -0,0 +1,430 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities. + */ +@DatatypeDef(name="Signature") +public class Signature extends Type implements ICompositeType { + + /** + * An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document. + */ + @Child(name = "type", type = {Coding.class}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Indication of the reason the entity signed the object(s)", formalDefinition="An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document." ) + protected List type; + + /** + * When the digital signature was signed. + */ + @Child(name = "when", type = {InstantType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the signature was created", formalDefinition="When the digital signature was signed." ) + protected InstantType when; + + /** + * A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key). + */ + @Child(name = "who", type = {UriType.class, Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who signed the signature", formalDefinition="A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key)." ) + protected Type who; + + /** + * A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + */ + @Child(name = "contentType", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The technical format of the signature", formalDefinition="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature." ) + protected CodeType contentType; + + /** + * The base64 encoding of the Signature content. + */ + @Child(name = "blob", type = {Base64BinaryType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The actual signature content (XML DigSig. JWT, picture, etc.)", formalDefinition="The base64 encoding of the Signature content." ) + protected Base64BinaryType blob; + + private static final long serialVersionUID = -452432714L; + + /* + * Constructor + */ + public Signature() { + super(); + } + + /* + * Constructor + */ + public Signature(InstantType when, Type who, CodeType contentType, Base64BinaryType blob) { + super(); + this.when = when; + this.who = who; + this.contentType = contentType; + this.blob = blob; + } + + /** + * @return {@link #type} (An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (Coding item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.) + */ + // syntactic sugar + public Coding addType() { //3 + Coding t = new Coding(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public Signature addType(Coding t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #when} (When the digital signature was signed.). This is the underlying object with id, value and extensions. The accessor "getWhen" gives direct access to the value + */ + public InstantType getWhenElement() { + if (this.when == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Signature.when"); + else if (Configuration.doAutoCreate()) + this.when = new InstantType(); // bb + return this.when; + } + + public boolean hasWhenElement() { + return this.when != null && !this.when.isEmpty(); + } + + public boolean hasWhen() { + return this.when != null && !this.when.isEmpty(); + } + + /** + * @param value {@link #when} (When the digital signature was signed.). This is the underlying object with id, value and extensions. The accessor "getWhen" gives direct access to the value + */ + public Signature setWhenElement(InstantType value) { + this.when = value; + return this; + } + + /** + * @return When the digital signature was signed. + */ + public Date getWhen() { + return this.when == null ? null : this.when.getValue(); + } + + /** + * @param value When the digital signature was signed. + */ + public Signature setWhen(Date value) { + if (this.when == null) + this.when = new InstantType(); + this.when.setValue(value); + return this; + } + + /** + * @return {@link #who} (A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).) + */ + public Type getWho() { + return this.who; + } + + /** + * @return {@link #who} (A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).) + */ + public UriType getWhoUriType() throws FHIRException { + if (!(this.who instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.who.getClass().getName()+" was encountered"); + return (UriType) this.who; + } + + public boolean hasWhoUriType() { + return this.who instanceof UriType; + } + + /** + * @return {@link #who} (A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).) + */ + public Reference getWhoReference() throws FHIRException { + if (!(this.who instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.who.getClass().getName()+" was encountered"); + return (Reference) this.who; + } + + public boolean hasWhoReference() { + return this.who instanceof Reference; + } + + public boolean hasWho() { + return this.who != null && !this.who.isEmpty(); + } + + /** + * @param value {@link #who} (A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).) + */ + public Signature setWho(Type value) { + this.who = value; + return this; + } + + /** + * @return {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public CodeType getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Signature.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new CodeType(); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public Signature setContentTypeElement(CodeType value) { + this.contentType = value; + return this; + } + + /** + * @return A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + */ + public String getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + */ + public Signature setContentType(String value) { + if (this.contentType == null) + this.contentType = new CodeType(); + this.contentType.setValue(value); + return this; + } + + /** + * @return {@link #blob} (The base64 encoding of the Signature content.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + */ + public Base64BinaryType getBlobElement() { + if (this.blob == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Signature.blob"); + else if (Configuration.doAutoCreate()) + this.blob = new Base64BinaryType(); // bb + return this.blob; + } + + public boolean hasBlobElement() { + return this.blob != null && !this.blob.isEmpty(); + } + + public boolean hasBlob() { + return this.blob != null && !this.blob.isEmpty(); + } + + /** + * @param value {@link #blob} (The base64 encoding of the Signature content.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + */ + public Signature setBlobElement(Base64BinaryType value) { + this.blob = value; + return this; + } + + /** + * @return The base64 encoding of the Signature content. + */ + public byte[] getBlob() { + return this.blob == null ? null : this.blob.getValue(); + } + + /** + * @param value The base64 encoding of the Signature content. + */ + public Signature setBlob(byte[] value) { + if (this.blob == null) + this.blob = new Base64BinaryType(); + this.blob.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("when", "instant", "When the digital signature was signed.", 0, java.lang.Integer.MAX_VALUE, when)); + childrenList.add(new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).", 0, java.lang.Integer.MAX_VALUE, who)); + childrenList.add(new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content.", 0, java.lang.Integer.MAX_VALUE, blob)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.getType().add(castToCoding(value)); + else if (name.equals("when")) + this.when = castToInstant(value); // InstantType + else if (name.equals("who[x]")) + this.who = (Type) value; // Type + else if (name.equals("contentType")) + this.contentType = castToCode(value); // CodeType + else if (name.equals("blob")) + this.blob = castToBase64Binary(value); // Base64BinaryType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("when")) { + throw new FHIRException("Cannot call addChild on a primitive type Signature.when"); + } + else if (name.equals("whoUri")) { + this.who = new UriType(); + return this.who; + } + else if (name.equals("whoReference")) { + this.who = new Reference(); + return this.who; + } + else if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type Signature.contentType"); + } + else if (name.equals("blob")) { + throw new FHIRException("Cannot call addChild on a primitive type Signature.blob"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Signature"; + + } + + public Signature copy() { + Signature dst = new Signature(); + copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (Coding i : type) + dst.type.add(i.copy()); + }; + dst.when = when == null ? null : when.copy(); + dst.who = who == null ? null : who.copy(); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.blob = blob == null ? null : blob.copy(); + return dst; + } + + protected Signature typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Signature)) + return false; + Signature o = (Signature) other; + return compareDeep(type, o.type, true) && compareDeep(when, o.when, true) && compareDeep(who, o.who, true) + && compareDeep(contentType, o.contentType, true) && compareDeep(blob, o.blob, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Signature)) + return false; + Signature o = (Signature) other; + return compareValues(when, o.when, true) && compareValues(contentType, o.contentType, true) && compareValues(blob, o.blob, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (when == null || when.isEmpty()) + && (who == null || who.isEmpty()) && (contentType == null || contentType.isEmpty()) && (blob == null || blob.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SimpleQuantity.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SimpleQuantity.java new file mode 100644 index 00000000000..0dda2cdd1ee --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SimpleQuantity.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ +@DatatypeDef(name="SimpleQuantity", profileOf=Quantity.class) +public class SimpleQuantity extends Quantity { + + private static final long serialVersionUID = 1069574054L; + + public SimpleQuantity copy() { + SimpleQuantity dst = new SimpleQuantity(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.comparator = comparator == null ? null : comparator.copy(); + dst.unit = unit == null ? null : unit.copy(); + dst.system = system == null ? null : system.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected SimpleQuantity typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SimpleQuantity)) + return false; + SimpleQuantity o = (SimpleQuantity) other; + return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true) + && compareDeep(system, o.system, true) && compareDeep(code, o.code, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SimpleQuantity)) + return false; + SimpleQuantity o = (SimpleQuantity) other; + return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true) + && compareValues(system, o.system, true) && compareValues(code, o.code, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) + && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) + ; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Slot.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Slot.java new file mode 100644 index 00000000000..7cb91336bc8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Slot.java @@ -0,0 +1,724 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A slot of time on a schedule that may be available for booking appointments. + */ +@ResourceDef(name="Slot", profile="http://hl7.org/fhir/Profile/Slot") +public class Slot extends DomainResource { + + public enum SlotStatus { + /** + * Indicates that the time interval is busy because one or more events have been scheduled for that interval. + */ + BUSY, + /** + * Indicates that the time interval is free for scheduling. + */ + FREE, + /** + * Indicates that the time interval is busy and that the interval can not be scheduled. + */ + BUSYUNAVAILABLE, + /** + * Indicates that the time interval is busy because one or more events have been tentatively scheduled for that interval. + */ + BUSYTENTATIVE, + /** + * added to help the parsers + */ + NULL; + public static SlotStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("busy".equals(codeString)) + return BUSY; + if ("free".equals(codeString)) + return FREE; + if ("busy-unavailable".equals(codeString)) + return BUSYUNAVAILABLE; + if ("busy-tentative".equals(codeString)) + return BUSYTENTATIVE; + throw new FHIRException("Unknown SlotStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BUSY: return "busy"; + case FREE: return "free"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case BUSYTENTATIVE: return "busy-tentative"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case BUSY: return "http://hl7.org/fhir/slotstatus"; + case FREE: return "http://hl7.org/fhir/slotstatus"; + case BUSYUNAVAILABLE: return "http://hl7.org/fhir/slotstatus"; + case BUSYTENTATIVE: return "http://hl7.org/fhir/slotstatus"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case BUSY: return "Indicates that the time interval is busy because one or more events have been scheduled for that interval."; + case FREE: return "Indicates that the time interval is free for scheduling."; + case BUSYUNAVAILABLE: return "Indicates that the time interval is busy and that the interval can not be scheduled."; + case BUSYTENTATIVE: return "Indicates that the time interval is busy because one or more events have been tentatively scheduled for that interval."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BUSY: return "Busy"; + case FREE: return "Free"; + case BUSYUNAVAILABLE: return "Busy (Unavailable)"; + case BUSYTENTATIVE: return "Busy (Tentative)"; + default: return "?"; + } + } + } + + public static class SlotStatusEnumFactory implements EnumFactory { + public SlotStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("busy".equals(codeString)) + return SlotStatus.BUSY; + if ("free".equals(codeString)) + return SlotStatus.FREE; + if ("busy-unavailable".equals(codeString)) + return SlotStatus.BUSYUNAVAILABLE; + if ("busy-tentative".equals(codeString)) + return SlotStatus.BUSYTENTATIVE; + throw new IllegalArgumentException("Unknown SlotStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("busy".equals(codeString)) + return new Enumeration(this, SlotStatus.BUSY); + if ("free".equals(codeString)) + return new Enumeration(this, SlotStatus.FREE); + if ("busy-unavailable".equals(codeString)) + return new Enumeration(this, SlotStatus.BUSYUNAVAILABLE); + if ("busy-tentative".equals(codeString)) + return new Enumeration(this, SlotStatus.BUSYTENTATIVE); + throw new FHIRException("Unknown SlotStatus code '"+codeString+"'"); + } + public String toCode(SlotStatus code) { + if (code == SlotStatus.BUSY) + return "busy"; + if (code == SlotStatus.FREE) + return "free"; + if (code == SlotStatus.BUSYUNAVAILABLE) + return "busy-unavailable"; + if (code == SlotStatus.BUSYTENTATIVE) + return "busy-tentative"; + return "?"; + } + } + + /** + * External Ids for this item. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) + protected List identifier; + + /** + * The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource", formalDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource." ) + protected CodeableConcept type; + + /** + * The schedule resource that this slot defines an interval of status information. + */ + @Child(name = "schedule", type = {Schedule.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The schedule resource that this slot defines an interval of status information", formalDefinition="The schedule resource that this slot defines an interval of status information." ) + protected Reference schedule; + + /** + * The actual object that is the target of the reference (The schedule resource that this slot defines an interval of status information.) + */ + protected Schedule scheduleTarget; + + /** + * busy | free | busy-unavailable | busy-tentative. + */ + @Child(name = "freeBusyType", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="busy | free | busy-unavailable | busy-tentative", formalDefinition="busy | free | busy-unavailable | busy-tentative." ) + protected Enumeration freeBusyType; + + /** + * Date/Time that the slot is to begin. + */ + @Child(name = "start", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date/Time that the slot is to begin", formalDefinition="Date/Time that the slot is to begin." ) + protected InstantType start; + + /** + * Date/Time that the slot is to conclude. + */ + @Child(name = "end", type = {InstantType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date/Time that the slot is to conclude", formalDefinition="Date/Time that the slot is to conclude." ) + protected InstantType end; + + /** + * This slot has already been overbooked, appointments are unlikely to be accepted for this time. + */ + @Child(name = "overbooked", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time", formalDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time." ) + protected BooleanType overbooked; + + /** + * Comments on the slot to describe any extended information. Such as custom constraints on the slot. + */ + @Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot", formalDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot." ) + protected StringType comment; + + private static final long serialVersionUID = 1984269299L; + + /* + * Constructor + */ + public Slot() { + super(); + } + + /* + * Constructor + */ + public Slot(Reference schedule, Enumeration freeBusyType, InstantType start, InstantType end) { + super(); + this.schedule = schedule; + this.freeBusyType = freeBusyType; + this.start = start; + this.end = end; + } + + /** + * @return {@link #identifier} (External Ids for this item.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (External Ids for this item.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Slot addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #type} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + */ + public Slot setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #schedule} (The schedule resource that this slot defines an interval of status information.) + */ + public Reference getSchedule() { + if (this.schedule == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.schedule"); + else if (Configuration.doAutoCreate()) + this.schedule = new Reference(); // cc + return this.schedule; + } + + public boolean hasSchedule() { + return this.schedule != null && !this.schedule.isEmpty(); + } + + /** + * @param value {@link #schedule} (The schedule resource that this slot defines an interval of status information.) + */ + public Slot setSchedule(Reference value) { + this.schedule = value; + return this; + } + + /** + * @return {@link #schedule} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The schedule resource that this slot defines an interval of status information.) + */ + public Schedule getScheduleTarget() { + if (this.scheduleTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.schedule"); + else if (Configuration.doAutoCreate()) + this.scheduleTarget = new Schedule(); // aa + return this.scheduleTarget; + } + + /** + * @param value {@link #schedule} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The schedule resource that this slot defines an interval of status information.) + */ + public Slot setScheduleTarget(Schedule value) { + this.scheduleTarget = value; + return this; + } + + /** + * @return {@link #freeBusyType} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getFreeBusyType" gives direct access to the value + */ + public Enumeration getFreeBusyTypeElement() { + if (this.freeBusyType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.freeBusyType"); + else if (Configuration.doAutoCreate()) + this.freeBusyType = new Enumeration(new SlotStatusEnumFactory()); // bb + return this.freeBusyType; + } + + public boolean hasFreeBusyTypeElement() { + return this.freeBusyType != null && !this.freeBusyType.isEmpty(); + } + + public boolean hasFreeBusyType() { + return this.freeBusyType != null && !this.freeBusyType.isEmpty(); + } + + /** + * @param value {@link #freeBusyType} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getFreeBusyType" gives direct access to the value + */ + public Slot setFreeBusyTypeElement(Enumeration value) { + this.freeBusyType = value; + return this; + } + + /** + * @return busy | free | busy-unavailable | busy-tentative. + */ + public SlotStatus getFreeBusyType() { + return this.freeBusyType == null ? null : this.freeBusyType.getValue(); + } + + /** + * @param value busy | free | busy-unavailable | busy-tentative. + */ + public Slot setFreeBusyType(SlotStatus value) { + if (this.freeBusyType == null) + this.freeBusyType = new Enumeration(new SlotStatusEnumFactory()); + this.freeBusyType.setValue(value); + return this; + } + + /** + * @return {@link #start} (Date/Time that the slot is to begin.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public InstantType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.start"); + else if (Configuration.doAutoCreate()) + this.start = new InstantType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Date/Time that the slot is to begin.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public Slot setStartElement(InstantType value) { + this.start = value; + return this; + } + + /** + * @return Date/Time that the slot is to begin. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value Date/Time that the slot is to begin. + */ + public Slot setStart(Date value) { + if (this.start == null) + this.start = new InstantType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (Date/Time that the slot is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public InstantType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.end"); + else if (Configuration.doAutoCreate()) + this.end = new InstantType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Date/Time that the slot is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Slot setEndElement(InstantType value) { + this.end = value; + return this; + } + + /** + * @return Date/Time that the slot is to conclude. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value Date/Time that the slot is to conclude. + */ + public Slot setEnd(Date value) { + if (this.end == null) + this.end = new InstantType(); + this.end.setValue(value); + return this; + } + + /** + * @return {@link #overbooked} (This slot has already been overbooked, appointments are unlikely to be accepted for this time.). This is the underlying object with id, value and extensions. The accessor "getOverbooked" gives direct access to the value + */ + public BooleanType getOverbookedElement() { + if (this.overbooked == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.overbooked"); + else if (Configuration.doAutoCreate()) + this.overbooked = new BooleanType(); // bb + return this.overbooked; + } + + public boolean hasOverbookedElement() { + return this.overbooked != null && !this.overbooked.isEmpty(); + } + + public boolean hasOverbooked() { + return this.overbooked != null && !this.overbooked.isEmpty(); + } + + /** + * @param value {@link #overbooked} (This slot has already been overbooked, appointments are unlikely to be accepted for this time.). This is the underlying object with id, value and extensions. The accessor "getOverbooked" gives direct access to the value + */ + public Slot setOverbookedElement(BooleanType value) { + this.overbooked = value; + return this; + } + + /** + * @return This slot has already been overbooked, appointments are unlikely to be accepted for this time. + */ + public boolean getOverbooked() { + return this.overbooked == null || this.overbooked.isEmpty() ? false : this.overbooked.getValue(); + } + + /** + * @param value This slot has already been overbooked, appointments are unlikely to be accepted for this time. + */ + public Slot setOverbooked(boolean value) { + if (this.overbooked == null) + this.overbooked = new BooleanType(); + this.overbooked.setValue(value); + return this; + } + + /** + * @return {@link #comment} (Comments on the slot to describe any extended information. Such as custom constraints on the slot.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public StringType getCommentElement() { + if (this.comment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb + return this.comment; + } + + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); + } + + /** + * @param value {@link #comment} (Comments on the slot to describe any extended information. Such as custom constraints on the slot.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value + */ + public Slot setCommentElement(StringType value) { + this.comment = value; + return this; + } + + /** + * @return Comments on the slot to describe any extended information. Such as custom constraints on the slot. + */ + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value Comments on the slot to describe any extended information. Such as custom constraints on the slot. + */ + public Slot setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "External Ids for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "CodeableConcept", "The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("schedule", "Reference(Schedule)", "The schedule resource that this slot defines an interval of status information.", 0, java.lang.Integer.MAX_VALUE, schedule)); + childrenList.add(new Property("freeBusyType", "code", "busy | free | busy-unavailable | busy-tentative.", 0, java.lang.Integer.MAX_VALUE, freeBusyType)); + childrenList.add(new Property("start", "instant", "Date/Time that the slot is to begin.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "instant", "Date/Time that the slot is to conclude.", 0, java.lang.Integer.MAX_VALUE, end)); + childrenList.add(new Property("overbooked", "boolean", "This slot has already been overbooked, appointments are unlikely to be accepted for this time.", 0, java.lang.Integer.MAX_VALUE, overbooked)); + childrenList.add(new Property("comment", "string", "Comments on the slot to describe any extended information. Such as custom constraints on the slot.", 0, java.lang.Integer.MAX_VALUE, comment)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("schedule")) + this.schedule = castToReference(value); // Reference + else if (name.equals("freeBusyType")) + this.freeBusyType = new SlotStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("start")) + this.start = castToInstant(value); // InstantType + else if (name.equals("end")) + this.end = castToInstant(value); // InstantType + else if (name.equals("overbooked")) + this.overbooked = castToBoolean(value); // BooleanType + else if (name.equals("comment")) + this.comment = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("schedule")) { + this.schedule = new Reference(); + return this.schedule; + } + else if (name.equals("freeBusyType")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.freeBusyType"); + } + else if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.end"); + } + else if (name.equals("overbooked")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.overbooked"); + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.comment"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Slot"; + + } + + public Slot copy() { + Slot dst = new Slot(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + dst.schedule = schedule == null ? null : schedule.copy(); + dst.freeBusyType = freeBusyType == null ? null : freeBusyType.copy(); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + dst.overbooked = overbooked == null ? null : overbooked.copy(); + dst.comment = comment == null ? null : comment.copy(); + return dst; + } + + protected Slot typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Slot)) + return false; + Slot o = (Slot) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(schedule, o.schedule, true) + && compareDeep(freeBusyType, o.freeBusyType, true) && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) + && compareDeep(overbooked, o.overbooked, true) && compareDeep(comment, o.comment, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Slot)) + return false; + Slot o = (Slot) other; + return compareValues(freeBusyType, o.freeBusyType, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true) + && compareValues(overbooked, o.overbooked, true) && compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) + && (schedule == null || schedule.isEmpty()) && (freeBusyType == null || freeBusyType.isEmpty()) + && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (overbooked == null || overbooked.isEmpty()) + && (comment == null || comment.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Slot; + } + + @SearchParamDefinition(name="schedule", path="Slot.schedule", description="The Schedule Resource that we are seeking a slot within", type="reference" ) + public static final String SP_SCHEDULE = "schedule"; + @SearchParamDefinition(name="identifier", path="Slot.identifier", description="A Slot Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.", type="date" ) + public static final String SP_START = "start"; + @SearchParamDefinition(name="slot-type", path="Slot.type", description="The type of appointments that can be booked into the slot", type="token" ) + public static final String SP_SLOTTYPE = "slot-type"; + @SearchParamDefinition(name="fb-type", path="Slot.freeBusyType", description="The free/busy status of the appointment", type="token" ) + public static final String SP_FBTYPE = "fb-type"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Specimen.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Specimen.java new file mode 100644 index 00000000000..28292142daa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Specimen.java @@ -0,0 +1,1841 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A sample to be used for analysis. + */ +@ResourceDef(name="Specimen", profile="http://hl7.org/fhir/Profile/Specimen") +public class Specimen extends DomainResource { + + public enum SpecimenStatus { + /** + * The physical specimen is present and in good condition. + */ + AVAILABLE, + /** + * There is no physical specimen because it is either lost, destroyed or consumed. + */ + UNAVAILABLE, + /** + * The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old. + */ + UNSATISFACTORY, + /** + * The specimen was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static SpecimenStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return AVAILABLE; + if ("unavailable".equals(codeString)) + return UNAVAILABLE; + if ("unsatisfactory".equals(codeString)) + return UNSATISFACTORY; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AVAILABLE: return "available"; + case UNAVAILABLE: return "unavailable"; + case UNSATISFACTORY: return "unsatisfactory"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case AVAILABLE: return "http://hl7.org/fhir/specimen-status"; + case UNAVAILABLE: return "http://hl7.org/fhir/specimen-status"; + case UNSATISFACTORY: return "http://hl7.org/fhir/specimen-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/specimen-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case AVAILABLE: return "The physical specimen is present and in good condition."; + case UNAVAILABLE: return "There is no physical specimen because it is either lost, destroyed or consumed."; + case UNSATISFACTORY: return "The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old."; + case ENTEREDINERROR: return "The specimen was entered in error and therefore nullified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AVAILABLE: return "Available"; + case UNAVAILABLE: return "Unavailable"; + case UNSATISFACTORY: return "Unsatisfactory"; + case ENTEREDINERROR: return "Entered-in-error"; + default: return "?"; + } + } + } + + public static class SpecimenStatusEnumFactory implements EnumFactory { + public SpecimenStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return SpecimenStatus.AVAILABLE; + if ("unavailable".equals(codeString)) + return SpecimenStatus.UNAVAILABLE; + if ("unsatisfactory".equals(codeString)) + return SpecimenStatus.UNSATISFACTORY; + if ("entered-in-error".equals(codeString)) + return SpecimenStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown SpecimenStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return new Enumeration(this, SpecimenStatus.AVAILABLE); + if ("unavailable".equals(codeString)) + return new Enumeration(this, SpecimenStatus.UNAVAILABLE); + if ("unsatisfactory".equals(codeString)) + return new Enumeration(this, SpecimenStatus.UNSATISFACTORY); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, SpecimenStatus.ENTEREDINERROR); + throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); + } + public String toCode(SpecimenStatus code) { + if (code == SpecimenStatus.AVAILABLE) + return "available"; + if (code == SpecimenStatus.UNAVAILABLE) + return "unavailable"; + if (code == SpecimenStatus.UNSATISFACTORY) + return "unsatisfactory"; + if (code == SpecimenStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + + @Block() + public static class SpecimenCollectionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Person who collected the specimen. + */ + @Child(name = "collector", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who collected the specimen", formalDefinition="Person who collected the specimen." ) + protected Reference collector; + + /** + * The actual object that is the target of the reference (Person who collected the specimen.) + */ + protected Practitioner collectorTarget; + + /** + * To communicate any details or issues encountered during the specimen collection procedure. + */ + @Child(name = "comment", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Collector comments", formalDefinition="To communicate any details or issues encountered during the specimen collection procedure." ) + protected List comment; + + /** + * Time when specimen was collected from subject - the physiologically relevant time. + */ + @Child(name = "collected", type = {DateTimeType.class, Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Collection time", formalDefinition="Time when specimen was collected from subject - the physiologically relevant time." ) + protected Type collected; + + /** + * The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The quantity of specimen collected", formalDefinition="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample." ) + protected SimpleQuantity quantity; + + /** + * A coded value specifying the technique that is used to perform the procedure. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Technique used to perform collection", formalDefinition="A coded value specifying the technique that is used to perform the procedure." ) + protected CodeableConcept method; + + /** + * Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens. + */ + @Child(name = "bodySite", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Anatomical collection site", formalDefinition="Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens." ) + protected CodeableConcept bodySite; + + private static final long serialVersionUID = -1418734687L; + + /* + * Constructor + */ + public SpecimenCollectionComponent() { + super(); + } + + /** + * @return {@link #collector} (Person who collected the specimen.) + */ + public Reference getCollector() { + if (this.collector == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.collector"); + else if (Configuration.doAutoCreate()) + this.collector = new Reference(); // cc + return this.collector; + } + + public boolean hasCollector() { + return this.collector != null && !this.collector.isEmpty(); + } + + /** + * @param value {@link #collector} (Person who collected the specimen.) + */ + public SpecimenCollectionComponent setCollector(Reference value) { + this.collector = value; + return this; + } + + /** + * @return {@link #collector} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who collected the specimen.) + */ + public Practitioner getCollectorTarget() { + if (this.collectorTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.collector"); + else if (Configuration.doAutoCreate()) + this.collectorTarget = new Practitioner(); // aa + return this.collectorTarget; + } + + /** + * @param value {@link #collector} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who collected the specimen.) + */ + public SpecimenCollectionComponent setCollectorTarget(Practitioner value) { + this.collectorTarget = value; + return this; + } + + /** + * @return {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + */ + public List getComment() { + if (this.comment == null) + this.comment = new ArrayList(); + return this.comment; + } + + public boolean hasComment() { + if (this.comment == null) + return false; + for (StringType item : this.comment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + */ + // syntactic sugar + public StringType addCommentElement() {//2 + StringType t = new StringType(); + if (this.comment == null) + this.comment = new ArrayList(); + this.comment.add(t); + return t; + } + + /** + * @param value {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + */ + public SpecimenCollectionComponent addComment(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.comment == null) + this.comment = new ArrayList(); + this.comment.add(t); + return this; + } + + /** + * @param value {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + */ + public boolean hasComment(String value) { + if (this.comment == null) + return false; + for (StringType v : this.comment) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) + */ + public Type getCollected() { + return this.collected; + } + + /** + * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) + */ + public DateTimeType getCollectedDateTimeType() throws FHIRException { + if (!(this.collected instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.collected.getClass().getName()+" was encountered"); + return (DateTimeType) this.collected; + } + + public boolean hasCollectedDateTimeType() { + return this.collected instanceof DateTimeType; + } + + /** + * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) + */ + public Period getCollectedPeriod() throws FHIRException { + if (!(this.collected instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.collected.getClass().getName()+" was encountered"); + return (Period) this.collected; + } + + public boolean hasCollectedPeriod() { + return this.collected instanceof Period; + } + + public boolean hasCollected() { + return this.collected != null && !this.collected.isEmpty(); + } + + /** + * @param value {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) + */ + public SpecimenCollectionComponent setCollected(Type value) { + this.collected = value; + return this; + } + + /** + * @return {@link #quantity} (The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.) + */ + public SpecimenCollectionComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #method} (A coded value specifying the technique that is used to perform the procedure.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value specifying the technique that is used to perform the procedure.) + */ + public SpecimenCollectionComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #bodySite} (Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.) + */ + public CodeableConcept getBodySite() { + if (this.bodySite == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.bodySite"); + else if (Configuration.doAutoCreate()) + this.bodySite = new CodeableConcept(); // cc + return this.bodySite; + } + + public boolean hasBodySite() { + return this.bodySite != null && !this.bodySite.isEmpty(); + } + + /** + * @param value {@link #bodySite} (Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.) + */ + public SpecimenCollectionComponent setBodySite(CodeableConcept value) { + this.bodySite = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("collector", "Reference(Practitioner)", "Person who collected the specimen.", 0, java.lang.Integer.MAX_VALUE, collector)); + childrenList.add(new Property("comment", "string", "To communicate any details or issues encountered during the specimen collection procedure.", 0, java.lang.Integer.MAX_VALUE, comment)); + childrenList.add(new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, java.lang.Integer.MAX_VALUE, collected)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("method", "CodeableConcept", "A coded value specifying the technique that is used to perform the procedure.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("bodySite", "CodeableConcept", "Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("collector")) + this.collector = castToReference(value); // Reference + else if (name.equals("comment")) + this.getComment().add(castToString(value)); + else if (name.equals("collected[x]")) + this.collected = (Type) value; // Type + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("method")) + this.method = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("bodySite")) + this.bodySite = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("collector")) { + this.collector = new Reference(); + return this.collector; + } + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type Specimen.comment"); + } + else if (name.equals("collectedDateTime")) { + this.collected = new DateTimeType(); + return this.collected; + } + else if (name.equals("collectedPeriod")) { + this.collected = new Period(); + return this.collected; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("bodySite")) { + this.bodySite = new CodeableConcept(); + return this.bodySite; + } + else + return super.addChild(name); + } + + public SpecimenCollectionComponent copy() { + SpecimenCollectionComponent dst = new SpecimenCollectionComponent(); + copyValues(dst); + dst.collector = collector == null ? null : collector.copy(); + if (comment != null) { + dst.comment = new ArrayList(); + for (StringType i : comment) + dst.comment.add(i.copy()); + }; + dst.collected = collected == null ? null : collected.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.method = method == null ? null : method.copy(); + dst.bodySite = bodySite == null ? null : bodySite.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenCollectionComponent)) + return false; + SpecimenCollectionComponent o = (SpecimenCollectionComponent) other; + return compareDeep(collector, o.collector, true) && compareDeep(comment, o.comment, true) && compareDeep(collected, o.collected, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(method, o.method, true) && compareDeep(bodySite, o.bodySite, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenCollectionComponent)) + return false; + SpecimenCollectionComponent o = (SpecimenCollectionComponent) other; + return compareValues(comment, o.comment, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (collector == null || collector.isEmpty()) && (comment == null || comment.isEmpty()) + && (collected == null || collected.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (method == null || method.isEmpty()) && (bodySite == null || bodySite.isEmpty()); + } + + public String fhirType() { + return "Specimen.collection"; + + } + + } + + @Block() + public static class SpecimenTreatmentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Textual description of procedure. + */ + @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Textual description of procedure", formalDefinition="Textual description of procedure." ) + protected StringType description; + + /** + * A coded value specifying the procedure used to process the specimen. + */ + @Child(name = "procedure", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates the treatment or processing step applied to the specimen", formalDefinition="A coded value specifying the procedure used to process the specimen." ) + protected CodeableConcept procedure; + + /** + * Material used in the processing step. + */ + @Child(name = "additive", type = {Substance.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Material used in the processing step", formalDefinition="Material used in the processing step." ) + protected List additive; + /** + * The actual objects that are the target of the reference (Material used in the processing step.) + */ + protected List additiveTarget; + + + private static final long serialVersionUID = -373251521L; + + /* + * Constructor + */ + public SpecimenTreatmentComponent() { + super(); + } + + /** + * @return {@link #description} (Textual description of procedure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenTreatmentComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Textual description of procedure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public SpecimenTreatmentComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Textual description of procedure. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Textual description of procedure. + */ + public SpecimenTreatmentComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #procedure} (A coded value specifying the procedure used to process the specimen.) + */ + public CodeableConcept getProcedure() { + if (this.procedure == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenTreatmentComponent.procedure"); + else if (Configuration.doAutoCreate()) + this.procedure = new CodeableConcept(); // cc + return this.procedure; + } + + public boolean hasProcedure() { + return this.procedure != null && !this.procedure.isEmpty(); + } + + /** + * @param value {@link #procedure} (A coded value specifying the procedure used to process the specimen.) + */ + public SpecimenTreatmentComponent setProcedure(CodeableConcept value) { + this.procedure = value; + return this; + } + + /** + * @return {@link #additive} (Material used in the processing step.) + */ + public List getAdditive() { + if (this.additive == null) + this.additive = new ArrayList(); + return this.additive; + } + + public boolean hasAdditive() { + if (this.additive == null) + return false; + for (Reference item : this.additive) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #additive} (Material used in the processing step.) + */ + // syntactic sugar + public Reference addAdditive() { //3 + Reference t = new Reference(); + if (this.additive == null) + this.additive = new ArrayList(); + this.additive.add(t); + return t; + } + + // syntactic sugar + public SpecimenTreatmentComponent addAdditive(Reference t) { //3 + if (t == null) + return this; + if (this.additive == null) + this.additive = new ArrayList(); + this.additive.add(t); + return this; + } + + /** + * @return {@link #additive} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Material used in the processing step.) + */ + public List getAdditiveTarget() { + if (this.additiveTarget == null) + this.additiveTarget = new ArrayList(); + return this.additiveTarget; + } + + // syntactic sugar + /** + * @return {@link #additive} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Material used in the processing step.) + */ + public Substance addAdditiveTarget() { + Substance r = new Substance(); + if (this.additiveTarget == null) + this.additiveTarget = new ArrayList(); + this.additiveTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("description", "string", "Textual description of procedure.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("procedure", "CodeableConcept", "A coded value specifying the procedure used to process the specimen.", 0, java.lang.Integer.MAX_VALUE, procedure)); + childrenList.add(new Property("additive", "Reference(Substance)", "Material used in the processing step.", 0, java.lang.Integer.MAX_VALUE, additive)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("procedure")) + this.procedure = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("additive")) + this.getAdditive().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Specimen.description"); + } + else if (name.equals("procedure")) { + this.procedure = new CodeableConcept(); + return this.procedure; + } + else if (name.equals("additive")) { + return addAdditive(); + } + else + return super.addChild(name); + } + + public SpecimenTreatmentComponent copy() { + SpecimenTreatmentComponent dst = new SpecimenTreatmentComponent(); + copyValues(dst); + dst.description = description == null ? null : description.copy(); + dst.procedure = procedure == null ? null : procedure.copy(); + if (additive != null) { + dst.additive = new ArrayList(); + for (Reference i : additive) + dst.additive.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenTreatmentComponent)) + return false; + SpecimenTreatmentComponent o = (SpecimenTreatmentComponent) other; + return compareDeep(description, o.description, true) && compareDeep(procedure, o.procedure, true) + && compareDeep(additive, o.additive, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenTreatmentComponent)) + return false; + SpecimenTreatmentComponent o = (SpecimenTreatmentComponent) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (description == null || description.isEmpty()) && (procedure == null || procedure.isEmpty()) + && (additive == null || additive.isEmpty()); + } + + public String fhirType() { + return "Specimen.treatment"; + + } + + } + + @Block() + public static class SpecimenContainerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Id for the container", formalDefinition="Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances." ) + protected List identifier; + + /** + * Textual description of the container. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Textual description of the container", formalDefinition="Textual description of the container." ) + protected StringType description; + + /** + * The type of container associated with the specimen (e.g. slide, aliquot, etc.). + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Kind of container directly associated with specimen", formalDefinition="The type of container associated with the specimen (e.g. slide, aliquot, etc.)." ) + protected CodeableConcept type; + + /** + * The capacity (volume or other measure) the container may contain. + */ + @Child(name = "capacity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Container volume or size", formalDefinition="The capacity (volume or other measure) the container may contain." ) + protected SimpleQuantity capacity; + + /** + * The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type. + */ + @Child(name = "specimenQuantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Quantity of specimen within container", formalDefinition="The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type." ) + protected SimpleQuantity specimenQuantity; + + /** + * Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. + */ + @Child(name = "additive", type = {CodeableConcept.class, Substance.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additive associated with container", formalDefinition="Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." ) + protected Type additive; + + private static final long serialVersionUID = 187274879L; + + /* + * Constructor + */ + public SpecimenContainerComponent() { + super(); + } + + /** + * @return {@link #identifier} (Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public SpecimenContainerComponent addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #description} (Textual description of the container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenContainerComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Textual description of the container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public SpecimenContainerComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Textual description of the container. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Textual description of the container. + */ + public SpecimenContainerComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type of container associated with the specimen (e.g. slide, aliquot, etc.).) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenContainerComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of container associated with the specimen (e.g. slide, aliquot, etc.).) + */ + public SpecimenContainerComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #capacity} (The capacity (volume or other measure) the container may contain.) + */ + public SimpleQuantity getCapacity() { + if (this.capacity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenContainerComponent.capacity"); + else if (Configuration.doAutoCreate()) + this.capacity = new SimpleQuantity(); // cc + return this.capacity; + } + + public boolean hasCapacity() { + return this.capacity != null && !this.capacity.isEmpty(); + } + + /** + * @param value {@link #capacity} (The capacity (volume or other measure) the container may contain.) + */ + public SpecimenContainerComponent setCapacity(SimpleQuantity value) { + this.capacity = value; + return this; + } + + /** + * @return {@link #specimenQuantity} (The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.) + */ + public SimpleQuantity getSpecimenQuantity() { + if (this.specimenQuantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenContainerComponent.specimenQuantity"); + else if (Configuration.doAutoCreate()) + this.specimenQuantity = new SimpleQuantity(); // cc + return this.specimenQuantity; + } + + public boolean hasSpecimenQuantity() { + return this.specimenQuantity != null && !this.specimenQuantity.isEmpty(); + } + + /** + * @param value {@link #specimenQuantity} (The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.) + */ + public SpecimenContainerComponent setSpecimenQuantity(SimpleQuantity value) { + this.specimenQuantity = value; + return this; + } + + /** + * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public Type getAdditive() { + return this.additive; + } + + /** + * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public CodeableConcept getAdditiveCodeableConcept() throws FHIRException { + if (!(this.additive instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.additive.getClass().getName()+" was encountered"); + return (CodeableConcept) this.additive; + } + + public boolean hasAdditiveCodeableConcept() { + return this.additive instanceof CodeableConcept; + } + + /** + * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public Reference getAdditiveReference() throws FHIRException { + if (!(this.additive instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.additive.getClass().getName()+" was encountered"); + return (Reference) this.additive; + } + + public boolean hasAdditiveReference() { + return this.additive instanceof Reference; + } + + public boolean hasAdditive() { + return this.additive != null && !this.additive.isEmpty(); + } + + /** + * @param value {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public SpecimenContainerComponent setAdditive(Type value) { + this.additive = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("description", "string", "Textual description of the container.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("type", "CodeableConcept", "The type of container associated with the specimen (e.g. slide, aliquot, etc.).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("capacity", "SimpleQuantity", "The capacity (volume or other measure) the container may contain.", 0, java.lang.Integer.MAX_VALUE, capacity)); + childrenList.add(new Property("specimenQuantity", "SimpleQuantity", "The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.", 0, java.lang.Integer.MAX_VALUE, specimenQuantity)); + childrenList.add(new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, java.lang.Integer.MAX_VALUE, additive)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("capacity")) + this.capacity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("specimenQuantity")) + this.specimenQuantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("additive[x]")) + this.additive = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Specimen.description"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("capacity")) { + this.capacity = new SimpleQuantity(); + return this.capacity; + } + else if (name.equals("specimenQuantity")) { + this.specimenQuantity = new SimpleQuantity(); + return this.specimenQuantity; + } + else if (name.equals("additiveCodeableConcept")) { + this.additive = new CodeableConcept(); + return this.additive; + } + else if (name.equals("additiveReference")) { + this.additive = new Reference(); + return this.additive; + } + else + return super.addChild(name); + } + + public SpecimenContainerComponent copy() { + SpecimenContainerComponent dst = new SpecimenContainerComponent(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + dst.type = type == null ? null : type.copy(); + dst.capacity = capacity == null ? null : capacity.copy(); + dst.specimenQuantity = specimenQuantity == null ? null : specimenQuantity.copy(); + dst.additive = additive == null ? null : additive.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenContainerComponent)) + return false; + SpecimenContainerComponent o = (SpecimenContainerComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(description, o.description, true) + && compareDeep(type, o.type, true) && compareDeep(capacity, o.capacity, true) && compareDeep(specimenQuantity, o.specimenQuantity, true) + && compareDeep(additive, o.additive, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenContainerComponent)) + return false; + SpecimenContainerComponent o = (SpecimenContainerComponent) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (description == null || description.isEmpty()) + && (type == null || type.isEmpty()) && (capacity == null || capacity.isEmpty()) && (specimenQuantity == null || specimenQuantity.isEmpty()) + && (additive == null || additive.isEmpty()); + } + + public String fhirType() { + return "Specimen.container"; + + } + + } + + /** + * Id for specimen. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Identifier", formalDefinition="Id for specimen." ) + protected List identifier; + + /** + * The availability of the specimen. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="available | unavailable | unsatisfactory | entered-in-error", formalDefinition="The availability of the specimen." ) + protected Enumeration status; + + /** + * The kind of material that forms the specimen. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of material that forms the specimen", formalDefinition="The kind of material that forms the specimen." ) + protected CodeableConcept type; + + /** + * Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen. + */ + @Child(name = "parent", type = {Specimen.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specimen from which this specimen originated", formalDefinition="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen." ) + protected List parent; + /** + * The actual objects that are the target of the reference (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + protected List parentTarget; + + + /** + * Where the specimen came from. This may be from the patient(s) or from the environment or a device. + */ + @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Substance.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device", formalDefinition="Where the specimen came from. This may be from the patient(s) or from the environment or a device." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + protected Resource subjectTarget; + + /** + * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. + */ + @Child(name = "accessionIdentifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) + protected Identifier accessionIdentifier; + + /** + * Time when specimen was received for processing or testing. + */ + @Child(name = "receivedTime", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The time when specimen was received for processing", formalDefinition="Time when specimen was received for processing or testing." ) + protected DateTimeType receivedTime; + + /** + * Details concerning the specimen collection. + */ + @Child(name = "collection", type = {}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Collection details", formalDefinition="Details concerning the specimen collection." ) + protected SpecimenCollectionComponent collection; + + /** + * Details concerning treatment and processing steps for the specimen. + */ + @Child(name = "treatment", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Treatment and processing step details", formalDefinition="Details concerning treatment and processing steps for the specimen." ) + protected List treatment; + + /** + * The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here. + */ + @Child(name = "container", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Direct container of specimen (tube/slide, etc.)", formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." ) + protected List container; + + private static final long serialVersionUID = 1025605602L; + + /* + * Constructor + */ + public Specimen() { + super(); + } + + /* + * Constructor + */ + public Specimen(Reference subject) { + super(); + this.subject = subject; + } + + /** + * @return {@link #identifier} (Id for specimen.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Id for specimen.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Specimen addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (The availability of the specimen.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new SpecimenStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The availability of the specimen.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Specimen setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The availability of the specimen. + */ + public SpecimenStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The availability of the specimen. + */ + public Specimen setStatus(SpecimenStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new SpecimenStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The kind of material that forms the specimen.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The kind of material that forms the specimen.) + */ + public Specimen setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #parent} (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + public List getParent() { + if (this.parent == null) + this.parent = new ArrayList(); + return this.parent; + } + + public boolean hasParent() { + if (this.parent == null) + return false; + for (Reference item : this.parent) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parent} (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + // syntactic sugar + public Reference addParent() { //3 + Reference t = new Reference(); + if (this.parent == null) + this.parent = new ArrayList(); + this.parent.add(t); + return t; + } + + // syntactic sugar + public Specimen addParent(Reference t) { //3 + if (t == null) + return this; + if (this.parent == null) + this.parent = new ArrayList(); + this.parent.add(t); + return this; + } + + /** + * @return {@link #parent} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + public List getParentTarget() { + if (this.parentTarget == null) + this.parentTarget = new ArrayList(); + return this.parentTarget; + } + + // syntactic sugar + /** + * @return {@link #parent} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + public Specimen addParentTarget() { + Specimen r = new Specimen(); + if (this.parentTarget == null) + this.parentTarget = new ArrayList(); + this.parentTarget.add(r); + return r; + } + + /** + * @return {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Specimen setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Specimen setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) + */ + public Identifier getAccessionIdentifier() { + if (this.accessionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.accessionIdentifier"); + else if (Configuration.doAutoCreate()) + this.accessionIdentifier = new Identifier(); // cc + return this.accessionIdentifier; + } + + public boolean hasAccessionIdentifier() { + return this.accessionIdentifier != null && !this.accessionIdentifier.isEmpty(); + } + + /** + * @param value {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) + */ + public Specimen setAccessionIdentifier(Identifier value) { + this.accessionIdentifier = value; + return this; + } + + /** + * @return {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value + */ + public DateTimeType getReceivedTimeElement() { + if (this.receivedTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.receivedTime"); + else if (Configuration.doAutoCreate()) + this.receivedTime = new DateTimeType(); // bb + return this.receivedTime; + } + + public boolean hasReceivedTimeElement() { + return this.receivedTime != null && !this.receivedTime.isEmpty(); + } + + public boolean hasReceivedTime() { + return this.receivedTime != null && !this.receivedTime.isEmpty(); + } + + /** + * @param value {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value + */ + public Specimen setReceivedTimeElement(DateTimeType value) { + this.receivedTime = value; + return this; + } + + /** + * @return Time when specimen was received for processing or testing. + */ + public Date getReceivedTime() { + return this.receivedTime == null ? null : this.receivedTime.getValue(); + } + + /** + * @param value Time when specimen was received for processing or testing. + */ + public Specimen setReceivedTime(Date value) { + if (value == null) + this.receivedTime = null; + else { + if (this.receivedTime == null) + this.receivedTime = new DateTimeType(); + this.receivedTime.setValue(value); + } + return this; + } + + /** + * @return {@link #collection} (Details concerning the specimen collection.) + */ + public SpecimenCollectionComponent getCollection() { + if (this.collection == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.collection"); + else if (Configuration.doAutoCreate()) + this.collection = new SpecimenCollectionComponent(); // cc + return this.collection; + } + + public boolean hasCollection() { + return this.collection != null && !this.collection.isEmpty(); + } + + /** + * @param value {@link #collection} (Details concerning the specimen collection.) + */ + public Specimen setCollection(SpecimenCollectionComponent value) { + this.collection = value; + return this; + } + + /** + * @return {@link #treatment} (Details concerning treatment and processing steps for the specimen.) + */ + public List getTreatment() { + if (this.treatment == null) + this.treatment = new ArrayList(); + return this.treatment; + } + + public boolean hasTreatment() { + if (this.treatment == null) + return false; + for (SpecimenTreatmentComponent item : this.treatment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #treatment} (Details concerning treatment and processing steps for the specimen.) + */ + // syntactic sugar + public SpecimenTreatmentComponent addTreatment() { //3 + SpecimenTreatmentComponent t = new SpecimenTreatmentComponent(); + if (this.treatment == null) + this.treatment = new ArrayList(); + this.treatment.add(t); + return t; + } + + // syntactic sugar + public Specimen addTreatment(SpecimenTreatmentComponent t) { //3 + if (t == null) + return this; + if (this.treatment == null) + this.treatment = new ArrayList(); + this.treatment.add(t); + return this; + } + + /** + * @return {@link #container} (The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.) + */ + public List getContainer() { + if (this.container == null) + this.container = new ArrayList(); + return this.container; + } + + public boolean hasContainer() { + if (this.container == null) + return false; + for (SpecimenContainerComponent item : this.container) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #container} (The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.) + */ + // syntactic sugar + public SpecimenContainerComponent addContainer() { //3 + SpecimenContainerComponent t = new SpecimenContainerComponent(); + if (this.container == null) + this.container = new ArrayList(); + this.container.add(t); + return t; + } + + // syntactic sugar + public Specimen addContainer(SpecimenContainerComponent t) { //3 + if (t == null) + return this; + if (this.container == null) + this.container = new ArrayList(); + this.container.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Id for specimen.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The availability of the specimen.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("type", "CodeableConcept", "The kind of material that forms the specimen.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("parent", "Reference(Specimen)", "Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", 0, java.lang.Integer.MAX_VALUE, parent)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Substance)", "Where the specimen came from. This may be from the patient(s) or from the environment or a device.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("accessionIdentifier", "Identifier", "The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", 0, java.lang.Integer.MAX_VALUE, accessionIdentifier)); + childrenList.add(new Property("receivedTime", "dateTime", "Time when specimen was received for processing or testing.", 0, java.lang.Integer.MAX_VALUE, receivedTime)); + childrenList.add(new Property("collection", "", "Details concerning the specimen collection.", 0, java.lang.Integer.MAX_VALUE, collection)); + childrenList.add(new Property("treatment", "", "Details concerning treatment and processing steps for the specimen.", 0, java.lang.Integer.MAX_VALUE, treatment)); + childrenList.add(new Property("container", "", "The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.", 0, java.lang.Integer.MAX_VALUE, container)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new SpecimenStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("parent")) + this.getParent().add(castToReference(value)); + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("accessionIdentifier")) + this.accessionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("receivedTime")) + this.receivedTime = castToDateTime(value); // DateTimeType + else if (name.equals("collection")) + this.collection = (SpecimenCollectionComponent) value; // SpecimenCollectionComponent + else if (name.equals("treatment")) + this.getTreatment().add((SpecimenTreatmentComponent) value); + else if (name.equals("container")) + this.getContainer().add((SpecimenContainerComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Specimen.status"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("parent")) { + return addParent(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("accessionIdentifier")) { + this.accessionIdentifier = new Identifier(); + return this.accessionIdentifier; + } + else if (name.equals("receivedTime")) { + throw new FHIRException("Cannot call addChild on a primitive type Specimen.receivedTime"); + } + else if (name.equals("collection")) { + this.collection = new SpecimenCollectionComponent(); + return this.collection; + } + else if (name.equals("treatment")) { + return addTreatment(); + } + else if (name.equals("container")) { + return addContainer(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Specimen"; + + } + + public Specimen copy() { + Specimen dst = new Specimen(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.type = type == null ? null : type.copy(); + if (parent != null) { + dst.parent = new ArrayList(); + for (Reference i : parent) + dst.parent.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.accessionIdentifier = accessionIdentifier == null ? null : accessionIdentifier.copy(); + dst.receivedTime = receivedTime == null ? null : receivedTime.copy(); + dst.collection = collection == null ? null : collection.copy(); + if (treatment != null) { + dst.treatment = new ArrayList(); + for (SpecimenTreatmentComponent i : treatment) + dst.treatment.add(i.copy()); + }; + if (container != null) { + dst.container = new ArrayList(); + for (SpecimenContainerComponent i : container) + dst.container.add(i.copy()); + }; + return dst; + } + + protected Specimen typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Specimen)) + return false; + Specimen o = (Specimen) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) + && compareDeep(parent, o.parent, true) && compareDeep(subject, o.subject, true) && compareDeep(accessionIdentifier, o.accessionIdentifier, true) + && compareDeep(receivedTime, o.receivedTime, true) && compareDeep(collection, o.collection, true) + && compareDeep(treatment, o.treatment, true) && compareDeep(container, o.container, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Specimen)) + return false; + Specimen o = (Specimen) other; + return compareValues(status, o.status, true) && compareValues(receivedTime, o.receivedTime, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (type == null || type.isEmpty()) && (parent == null || parent.isEmpty()) && (subject == null || subject.isEmpty()) + && (accessionIdentifier == null || accessionIdentifier.isEmpty()) && (receivedTime == null || receivedTime.isEmpty()) + && (collection == null || collection.isEmpty()) && (treatment == null || treatment.isEmpty()) + && (container == null || container.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Specimen; + } + + @SearchParamDefinition(name="container", path="Specimen.container.type", description="The kind of specimen container", type="token" ) + public static final String SP_CONTAINER = "container"; + @SearchParamDefinition(name="identifier", path="Specimen.identifier", description="The unique identifier associated with the specimen", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="parent", path="Specimen.parent", description="The parent of the specimen", type="reference" ) + public static final String SP_PARENT = "parent"; + @SearchParamDefinition(name="container-id", path="Specimen.container.identifier", description="The unique identifier associated with the specimen container", type="token" ) + public static final String SP_CONTAINERID = "container-id"; + @SearchParamDefinition(name="bodysite", path="Specimen.collection.bodySite", description="The code for the body site from where the specimen originated", type="token" ) + public static final String SP_BODYSITE = "bodysite"; + @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference" ) + public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="patient", path="Specimen.subject", description="The patient the specimen comes from", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="collected", path="Specimen.collection.collected[x]", description="The date the specimen was collected", type="date" ) + public static final String SP_COLLECTED = "collected"; + @SearchParamDefinition(name="accession", path="Specimen.accessionIdentifier", description="The accession number associated with the specimen", type="token" ) + public static final String SP_ACCESSION = "accession"; + @SearchParamDefinition(name="type", path="Specimen.type", description="The specimen type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference" ) + public static final String SP_COLLECTOR = "collector"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StringType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StringType.java new file mode 100644 index 00000000000..e880ce861a6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StringType.java @@ -0,0 +1,95 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.dstu21.model; + +import org.apache.commons.lang3.StringUtils; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + + +/** + * Primitive type "string" in FHIR - any sequence of unicode characters less than 1MB in length + */ +@DatatypeDef(name = "string") +public class StringType extends PrimitiveType { + + private static final long serialVersionUID = 3L; + + /** + * Create a new String + */ + public StringType() { + super(); + } + + /** + * Create a new String + */ + public StringType(String theValue) { + setValue(theValue); + } + + /** + * Returns the value of this StringType, or an empty string ("") if the + * value is null. This method is provided as a convenience to + * users of this API. + */ + public String getValueNotNull() { + return StringUtils.defaultString(getValue()); + } + + /** + * Returns the value of this string, or null if no value + * is present + */ + @Override + public String toString() { + return getValue(); + } + + @Override + protected String parse(String theValue) { + return theValue; + } + + @Override + protected String encode(String theValue) { + return theValue; + } + + @Override + public StringType copy() { + return new StringType(getValue()); + } + + public String fhirType() { + return "string"; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StructureDefinition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StructureDefinition.java new file mode 100644 index 00000000000..c2444dc5853 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/StructureDefinition.java @@ -0,0 +1,2657 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. + */ +@ResourceDef(name="StructureDefinition", profile="http://hl7.org/fhir/Profile/StructureDefinition") +public class StructureDefinition extends DomainResource { + + public enum StructureDefinitionKind { + /** + * A data type - either a primitive or complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions. + */ + DATATYPE, + /** + * A resource defined by the FHIR specification. + */ + RESOURCE, + /** + * A logical model - a conceptual package of data that will be mapped to resources for implementation. + */ + LOGICAL, + /** + * added to help the parsers + */ + NULL; + public static StructureDefinitionKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("datatype".equals(codeString)) + return DATATYPE; + if ("resource".equals(codeString)) + return RESOURCE; + if ("logical".equals(codeString)) + return LOGICAL; + throw new FHIRException("Unknown StructureDefinitionKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DATATYPE: return "datatype"; + case RESOURCE: return "resource"; + case LOGICAL: return "logical"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DATATYPE: return "http://hl7.org/fhir/structure-definition-kind"; + case RESOURCE: return "http://hl7.org/fhir/structure-definition-kind"; + case LOGICAL: return "http://hl7.org/fhir/structure-definition-kind"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DATATYPE: return "A data type - either a primitive or complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions."; + case RESOURCE: return "A resource defined by the FHIR specification."; + case LOGICAL: return "A logical model - a conceptual package of data that will be mapped to resources for implementation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DATATYPE: return "Data Type"; + case RESOURCE: return "Resource"; + case LOGICAL: return "Logical Model"; + default: return "?"; + } + } + } + + public static class StructureDefinitionKindEnumFactory implements EnumFactory { + public StructureDefinitionKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("datatype".equals(codeString)) + return StructureDefinitionKind.DATATYPE; + if ("resource".equals(codeString)) + return StructureDefinitionKind.RESOURCE; + if ("logical".equals(codeString)) + return StructureDefinitionKind.LOGICAL; + throw new IllegalArgumentException("Unknown StructureDefinitionKind code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("datatype".equals(codeString)) + return new Enumeration(this, StructureDefinitionKind.DATATYPE); + if ("resource".equals(codeString)) + return new Enumeration(this, StructureDefinitionKind.RESOURCE); + if ("logical".equals(codeString)) + return new Enumeration(this, StructureDefinitionKind.LOGICAL); + throw new FHIRException("Unknown StructureDefinitionKind code '"+codeString+"'"); + } + public String toCode(StructureDefinitionKind code) { + if (code == StructureDefinitionKind.DATATYPE) + return "datatype"; + if (code == StructureDefinitionKind.RESOURCE) + return "resource"; + if (code == StructureDefinitionKind.LOGICAL) + return "logical"; + return "?"; + } + } + + public enum ExtensionContext { + /** + * The context is all elements matching a particular resource element path. + */ + RESOURCE, + /** + * The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name). + */ + DATATYPE, + /** + * The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used. + */ + MAPPING, + /** + * The context is a particular extension from a particular profile, a uri that identifies the extension definition. + */ + EXTENSION, + /** + * added to help the parsers + */ + NULL; + public static ExtensionContext fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("resource".equals(codeString)) + return RESOURCE; + if ("datatype".equals(codeString)) + return DATATYPE; + if ("mapping".equals(codeString)) + return MAPPING; + if ("extension".equals(codeString)) + return EXTENSION; + throw new FHIRException("Unknown ExtensionContext code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESOURCE: return "resource"; + case DATATYPE: return "datatype"; + case MAPPING: return "mapping"; + case EXTENSION: return "extension"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case RESOURCE: return "http://hl7.org/fhir/extension-context"; + case DATATYPE: return "http://hl7.org/fhir/extension-context"; + case MAPPING: return "http://hl7.org/fhir/extension-context"; + case EXTENSION: return "http://hl7.org/fhir/extension-context"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case RESOURCE: return "The context is all elements matching a particular resource element path."; + case DATATYPE: return "The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name)."; + case MAPPING: return "The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used."; + case EXTENSION: return "The context is a particular extension from a particular profile, a uri that identifies the extension definition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESOURCE: return "Resource"; + case DATATYPE: return "Datatype"; + case MAPPING: return "Mapping"; + case EXTENSION: return "Extension"; + default: return "?"; + } + } + } + + public static class ExtensionContextEnumFactory implements EnumFactory { + public ExtensionContext fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("resource".equals(codeString)) + return ExtensionContext.RESOURCE; + if ("datatype".equals(codeString)) + return ExtensionContext.DATATYPE; + if ("mapping".equals(codeString)) + return ExtensionContext.MAPPING; + if ("extension".equals(codeString)) + return ExtensionContext.EXTENSION; + throw new IllegalArgumentException("Unknown ExtensionContext code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("resource".equals(codeString)) + return new Enumeration(this, ExtensionContext.RESOURCE); + if ("datatype".equals(codeString)) + return new Enumeration(this, ExtensionContext.DATATYPE); + if ("mapping".equals(codeString)) + return new Enumeration(this, ExtensionContext.MAPPING); + if ("extension".equals(codeString)) + return new Enumeration(this, ExtensionContext.EXTENSION); + throw new FHIRException("Unknown ExtensionContext code '"+codeString+"'"); + } + public String toCode(ExtensionContext code) { + if (code == ExtensionContext.RESOURCE) + return "resource"; + if (code == ExtensionContext.DATATYPE) + return "datatype"; + if (code == ExtensionContext.MAPPING) + return "mapping"; + if (code == ExtensionContext.EXTENSION) + return "extension"; + return "?"; + } + } + + @Block() + public static class StructureDefinitionContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the structure definition. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the structure definition." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public StructureDefinitionContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the structure definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the structure definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureDefinitionContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the structure definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the structure definition. + */ + public StructureDefinitionContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public StructureDefinitionContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the structure definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public StructureDefinitionContactComponent copy() { + StructureDefinitionContactComponent dst = new StructureDefinitionContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinitionContactComponent)) + return false; + StructureDefinitionContactComponent o = (StructureDefinitionContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinitionContactComponent)) + return false; + StructureDefinitionContactComponent o = (StructureDefinitionContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "StructureDefinition.contact"; + + } + + } + + @Block() + public static class StructureDefinitionMappingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An Internal id that is used to identify this mapping set when specific mappings are made. + */ + @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made." ) + protected IdType identity; + + /** + * An absolute URI that identifies the specification that this mapping is expressed to. + */ + @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="An absolute URI that identifies the specification that this mapping is expressed to." ) + protected UriType uri; + + /** + * A name for the specification that is being mapped to. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) + protected StringType name; + + /** + * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + @Child(name = "comments", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Versions, Issues, Scope limitations etc.", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) + protected StringType comments; + + private static final long serialVersionUID = 299630820L; + + /* + * Constructor + */ + public StructureDefinitionMappingComponent() { + super(); + } + + /* + * Constructor + */ + public StructureDefinitionMappingComponent(IdType identity) { + super(); + this.identity = identity; + } + + /** + * @return {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public IdType getIdentityElement() { + if (this.identity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.identity"); + else if (Configuration.doAutoCreate()) + this.identity = new IdType(); // bb + return this.identity; + } + + public boolean hasIdentityElement() { + return this.identity != null && !this.identity.isEmpty(); + } + + public boolean hasIdentity() { + return this.identity != null && !this.identity.isEmpty(); + } + + /** + * @param value {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value + */ + public StructureDefinitionMappingComponent setIdentityElement(IdType value) { + this.identity = value; + return this; + } + + /** + * @return An Internal id that is used to identify this mapping set when specific mappings are made. + */ + public String getIdentity() { + return this.identity == null ? null : this.identity.getValue(); + } + + /** + * @param value An Internal id that is used to identify this mapping set when specific mappings are made. + */ + public StructureDefinitionMappingComponent setIdentity(String value) { + if (this.identity == null) + this.identity = new IdType(); + this.identity.setValue(value); + return this; + } + + /** + * @return {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public UriType getUriElement() { + if (this.uri == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.uri"); + else if (Configuration.doAutoCreate()) + this.uri = new UriType(); // bb + return this.uri; + } + + public boolean hasUriElement() { + return this.uri != null && !this.uri.isEmpty(); + } + + public boolean hasUri() { + return this.uri != null && !this.uri.isEmpty(); + } + + /** + * @param value {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + */ + public StructureDefinitionMappingComponent setUriElement(UriType value) { + this.uri = value; + return this; + } + + /** + * @return An absolute URI that identifies the specification that this mapping is expressed to. + */ + public String getUri() { + return this.uri == null ? null : this.uri.getValue(); + } + + /** + * @param value An absolute URI that identifies the specification that this mapping is expressed to. + */ + public StructureDefinitionMappingComponent setUri(String value) { + if (Utilities.noString(value)) + this.uri = null; + else { + if (this.uri == null) + this.uri = new UriType(); + this.uri.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureDefinitionMappingComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A name for the specification that is being mapped to. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A name for the specification that is being mapped to. + */ + public StructureDefinitionMappingComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public StringType getCommentsElement() { + if (this.comments == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.comments"); + else if (Configuration.doAutoCreate()) + this.comments = new StringType(); // bb + return this.comments; + } + + public boolean hasCommentsElement() { + return this.comments != null && !this.comments.isEmpty(); + } + + public boolean hasComments() { + return this.comments != null && !this.comments.isEmpty(); + } + + /** + * @param value {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + */ + public StructureDefinitionMappingComponent setCommentsElement(StringType value) { + this.comments = value; + return this; + } + + /** + * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + public String getComments() { + return this.comments == null ? null : this.comments.getValue(); + } + + /** + * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. + */ + public StructureDefinitionMappingComponent setComments(String value) { + if (Utilities.noString(value)) + this.comments = null; + else { + if (this.comments == null) + this.comments = new StringType(); + this.comments.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identity", "id", "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, java.lang.Integer.MAX_VALUE, identity)); + childrenList.add(new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); + childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identity")) + this.identity = castToId(value); // IdType + else if (name.equals("uri")) + this.uri = castToUri(value); // UriType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("comments")) + this.comments = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identity")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.identity"); + } + else if (name.equals("uri")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.uri"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.name"); + } + else if (name.equals("comments")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.comments"); + } + else + return super.addChild(name); + } + + public StructureDefinitionMappingComponent copy() { + StructureDefinitionMappingComponent dst = new StructureDefinitionMappingComponent(); + copyValues(dst); + dst.identity = identity == null ? null : identity.copy(); + dst.uri = uri == null ? null : uri.copy(); + dst.name = name == null ? null : name.copy(); + dst.comments = comments == null ? null : comments.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinitionMappingComponent)) + return false; + StructureDefinitionMappingComponent o = (StructureDefinitionMappingComponent) other; + return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) + && compareDeep(comments, o.comments, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinitionMappingComponent)) + return false; + StructureDefinitionMappingComponent o = (StructureDefinitionMappingComponent) other; + return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) + && compareValues(comments, o.comments, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) + && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); + } + + public String fhirType() { + return "StructureDefinition.mapping"; + + } + + } + + @Block() + public static class StructureDefinitionSnapshotComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Captures constraints on each element within the resource. + */ + @Child(name = "element", type = {ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Definition of elements in the resource (if no StructureDefinition)", formalDefinition="Captures constraints on each element within the resource." ) + protected List element; + + private static final long serialVersionUID = 53896641L; + + /* + * Constructor + */ + public StructureDefinitionSnapshotComponent() { + super(); + } + + /** + * @return {@link #element} (Captures constraints on each element within the resource.) + */ + public List getElement() { + if (this.element == null) + this.element = new ArrayList(); + return this.element; + } + + public boolean hasElement() { + if (this.element == null) + return false; + for (ElementDefinition item : this.element) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #element} (Captures constraints on each element within the resource.) + */ + // syntactic sugar + public ElementDefinition addElement() { //3 + ElementDefinition t = new ElementDefinition(); + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return t; + } + + // syntactic sugar + public StructureDefinitionSnapshotComponent addElement(ElementDefinition t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("element", "ElementDefinition", "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("element")) + this.getElement().add(castToElementDefinition(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("element")) { + return addElement(); + } + else + return super.addChild(name); + } + + public StructureDefinitionSnapshotComponent copy() { + StructureDefinitionSnapshotComponent dst = new StructureDefinitionSnapshotComponent(); + copyValues(dst); + if (element != null) { + dst.element = new ArrayList(); + for (ElementDefinition i : element) + dst.element.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinitionSnapshotComponent)) + return false; + StructureDefinitionSnapshotComponent o = (StructureDefinitionSnapshotComponent) other; + return compareDeep(element, o.element, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinitionSnapshotComponent)) + return false; + StructureDefinitionSnapshotComponent o = (StructureDefinitionSnapshotComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (element == null || element.isEmpty()); + } + + public String fhirType() { + return "StructureDefinition.snapshot"; + + } + + } + + @Block() + public static class StructureDefinitionDifferentialComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Captures constraints on each element within the resource. + */ + @Child(name = "element", type = {ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Definition of elements in the resource (if no StructureDefinition)", formalDefinition="Captures constraints on each element within the resource." ) + protected List element; + + private static final long serialVersionUID = 53896641L; + + /* + * Constructor + */ + public StructureDefinitionDifferentialComponent() { + super(); + } + + /** + * @return {@link #element} (Captures constraints on each element within the resource.) + */ + public List getElement() { + if (this.element == null) + this.element = new ArrayList(); + return this.element; + } + + public boolean hasElement() { + if (this.element == null) + return false; + for (ElementDefinition item : this.element) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #element} (Captures constraints on each element within the resource.) + */ + // syntactic sugar + public ElementDefinition addElement() { //3 + ElementDefinition t = new ElementDefinition(); + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return t; + } + + // syntactic sugar + public StructureDefinitionDifferentialComponent addElement(ElementDefinition t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("element", "ElementDefinition", "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("element")) + this.getElement().add(castToElementDefinition(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("element")) { + return addElement(); + } + else + return super.addChild(name); + } + + public StructureDefinitionDifferentialComponent copy() { + StructureDefinitionDifferentialComponent dst = new StructureDefinitionDifferentialComponent(); + copyValues(dst); + if (element != null) { + dst.element = new ArrayList(); + for (ElementDefinition i : element) + dst.element.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinitionDifferentialComponent)) + return false; + StructureDefinitionDifferentialComponent o = (StructureDefinitionDifferentialComponent) other; + return compareDeep(element, o.element, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinitionDifferentialComponent)) + return false; + StructureDefinitionDifferentialComponent o = (StructureDefinitionDifferentialComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (element == null || element.isEmpty()); + } + + public String fhirType() { + return "StructureDefinition.differential"; + + } + + } + + /** + * An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this StructureDefinition", formalDefinition="An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the StructureDefinition", formalDefinition="Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) + protected List identifier; + + /** + * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the StructureDefinition", formalDefinition="The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually." ) + protected StringType version; + + /** + * A free text natural language name identifying the StructureDefinition. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this StructureDefinition", formalDefinition="A free text natural language name identifying the StructureDefinition." ) + protected StringType name; + + /** + * Defined so that applications can use this name when displaying the value of the extension to the user. + */ + @Child(name = "display", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) + protected StringType display; + + /** + * The status of the StructureDefinition. + */ + @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the StructureDefinition." ) + protected Enumeration status; + + /** + * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the structure definition. + */ + @Child(name = "publisher", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the structure definition." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for this version of the StructureDefinition", formalDefinition="The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the StructureDefinition and its use. + */ + @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Natural language description of the StructureDefinition", formalDefinition="A free text natural language description of the StructureDefinition and its use." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions." ) + protected List useContext; + + /** + * Explains why this structure definition is needed and why it's been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Scope and Usage this structure definition is for", formalDefinition="Explains why this structure definition is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + @Child(name = "copyright", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) + protected StringType copyright; + + /** + * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. + */ + @Child(name = "code", type = {Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) + protected List code; + + /** + * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + @Child(name = "fhirVersion", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="FHIR Version this StructureDefinition targets", formalDefinition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version." ) + protected IdType fhirVersion; + + /** + * An external specification that the content is mapped to. + */ + @Child(name = "mapping", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) + protected List mapping; + + /** + * Defines the kind of structure that this definition is describing. + */ + @Child(name = "kind", type = {CodeType.class}, order=17, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="datatype | resource | logical", formalDefinition="Defines the kind of structure that this definition is describing." ) + protected Enumeration kind; + + /** + * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. + */ + @Child(name = "constrainedType", type = {CodeType.class}, order=18, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Any datatype or resource, including abstract ones", formalDefinition="The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure." ) + protected CodeType constrainedType; + + /** + * Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. + */ + @Child(name = "abstract", type = {BooleanType.class}, order=19, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether the structure is abstract", formalDefinition="Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type." ) + protected BooleanType abstract_; + + /** + * If this is an extension, Identifies the context within FHIR resources where the extension can be used. + */ + @Child(name = "contextType", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="If this is an extension, Identifies the context within FHIR resources where the extension can be used." ) + protected Enumeration contextType; + + /** + * Identifies the types of resource or data type elements to which the extension can be applied. + */ + @Child(name = "context", type = {StringType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) + protected List context; + + /** + * An absolute URI that is the base structure from which this set of constraints is derived. + */ + @Child(name = "base", type = {UriType.class}, order=22, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="An absolute URI that is the base structure from which this set of constraints is derived." ) + protected UriType base; + + /** + * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition. + */ + @Child(name = "snapshot", type = {}, order=23, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition." ) + protected StructureDefinitionSnapshotComponent snapshot; + + /** + * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies. + */ + @Child(name = "differential", type = {}, order=24, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies." ) + protected StructureDefinitionDifferentialComponent differential; + + private static final long serialVersionUID = -580779569L; + + /* + * Constructor + */ + public StructureDefinition() { + super(); + } + + /* + * Constructor + */ + public StructureDefinition(UriType url, StringType name, Enumeration status, Enumeration kind, BooleanType abstract_) { + super(); + this.url = url; + this.name = name; + this.status = status; + this.kind = kind; + this.abstract_ = abstract_; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StructureDefinition setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. + */ + public StructureDefinition setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StructureDefinition setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. + */ + public StructureDefinition setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureDefinition setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the StructureDefinition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the StructureDefinition. + */ + public StructureDefinition setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #display} (Defined so that applications can use this name when displaying the value of the extension to the user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (Defined so that applications can use this name when displaying the value of the extension to the user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StructureDefinition setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return Defined so that applications can use this name when displaying the value of the extension to the user. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value Defined so that applications can use this name when displaying the value of the extension to the user. + */ + public StructureDefinition setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public StructureDefinition setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the StructureDefinition. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the StructureDefinition. + */ + public StructureDefinition setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public StructureDefinition setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public StructureDefinition setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the structure definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the structure definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StructureDefinition setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the structure definition. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the structure definition. + */ + public StructureDefinition setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (StructureDefinitionContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public StructureDefinitionContactComponent addContact() { //3 + StructureDefinitionContactComponent t = new StructureDefinitionContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addContact(StructureDefinitionContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public StructureDefinition setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes. + */ + public StructureDefinition setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the StructureDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the StructureDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StructureDefinition setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the StructureDefinition and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the StructureDefinition and its use. + */ + public StructureDefinition setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #requirements} (Explains why this structure definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this structure definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StructureDefinition setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this structure definition is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this structure definition is needed and why it's been constrained as it has. + */ + public StructureDefinition setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StructureDefinition setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public StructureDefinition setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) + */ + public List getCode() { + if (this.code == null) + this.code = new ArrayList(); + return this.code; + } + + public boolean hasCode() { + if (this.code == null) + return false; + for (Coding item : this.code) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) + */ + // syntactic sugar + public Coding addCode() { //3 + Coding t = new Coding(); + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addCode(Coding t) { //3 + if (t == null) + return this; + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return this; + } + + /** + * @return {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public IdType getFhirVersionElement() { + if (this.fhirVersion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.fhirVersion"); + else if (Configuration.doAutoCreate()) + this.fhirVersion = new IdType(); // bb + return this.fhirVersion; + } + + public boolean hasFhirVersionElement() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + public boolean hasFhirVersion() { + return this.fhirVersion != null && !this.fhirVersion.isEmpty(); + } + + /** + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + */ + public StructureDefinition setFhirVersionElement(IdType value) { + this.fhirVersion = value; + return this; + } + + /** + * @return The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + public String getFhirVersion() { + return this.fhirVersion == null ? null : this.fhirVersion.getValue(); + } + + /** + * @param value The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. + */ + public StructureDefinition setFhirVersion(String value) { + if (Utilities.noString(value)) + this.fhirVersion = null; + else { + if (this.fhirVersion == null) + this.fhirVersion = new IdType(); + this.fhirVersion.setValue(value); + } + return this; + } + + /** + * @return {@link #mapping} (An external specification that the content is mapped to.) + */ + public List getMapping() { + if (this.mapping == null) + this.mapping = new ArrayList(); + return this.mapping; + } + + public boolean hasMapping() { + if (this.mapping == null) + return false; + for (StructureDefinitionMappingComponent item : this.mapping) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mapping} (An external specification that the content is mapped to.) + */ + // syntactic sugar + public StructureDefinitionMappingComponent addMapping() { //3 + StructureDefinitionMappingComponent t = new StructureDefinitionMappingComponent(); + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addMapping(StructureDefinitionMappingComponent t) { //3 + if (t == null) + return this; + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return this; + } + + /** + * @return {@link #kind} (Defines the kind of structure that this definition is describing.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public Enumeration getKindElement() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new Enumeration(new StructureDefinitionKindEnumFactory()); // bb + return this.kind; + } + + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (Defines the kind of structure that this definition is describing.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value + */ + public StructureDefinition setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return Defines the kind of structure that this definition is describing. + */ + public StructureDefinitionKind getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value Defines the kind of structure that this definition is describing. + */ + public StructureDefinition setKind(StructureDefinitionKind value) { + if (this.kind == null) + this.kind = new Enumeration(new StructureDefinitionKindEnumFactory()); + this.kind.setValue(value); + return this; + } + + /** + * @return {@link #constrainedType} (The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.). This is the underlying object with id, value and extensions. The accessor "getConstrainedType" gives direct access to the value + */ + public CodeType getConstrainedTypeElement() { + if (this.constrainedType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.constrainedType"); + else if (Configuration.doAutoCreate()) + this.constrainedType = new CodeType(); // bb + return this.constrainedType; + } + + public boolean hasConstrainedTypeElement() { + return this.constrainedType != null && !this.constrainedType.isEmpty(); + } + + public boolean hasConstrainedType() { + return this.constrainedType != null && !this.constrainedType.isEmpty(); + } + + /** + * @param value {@link #constrainedType} (The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.). This is the underlying object with id, value and extensions. The accessor "getConstrainedType" gives direct access to the value + */ + public StructureDefinition setConstrainedTypeElement(CodeType value) { + this.constrainedType = value; + return this; + } + + /** + * @return The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. + */ + public String getConstrainedType() { + return this.constrainedType == null ? null : this.constrainedType.getValue(); + } + + /** + * @param value The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. + */ + public StructureDefinition setConstrainedType(String value) { + if (Utilities.noString(value)) + this.constrainedType = null; + else { + if (this.constrainedType == null) + this.constrainedType = new CodeType(); + this.constrainedType.setValue(value); + } + return this; + } + + /** + * @return {@link #abstract_} (Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public BooleanType getAbstractElement() { + if (this.abstract_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.abstract_"); + else if (Configuration.doAutoCreate()) + this.abstract_ = new BooleanType(); // bb + return this.abstract_; + } + + public boolean hasAbstractElement() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + public boolean hasAbstract() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + /** + * @param value {@link #abstract_} (Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public StructureDefinition setAbstractElement(BooleanType value) { + this.abstract_ = value; + return this; + } + + /** + * @return Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. + */ + public boolean getAbstract() { + return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); + } + + /** + * @param value Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. + */ + public StructureDefinition setAbstract(boolean value) { + if (this.abstract_ == null) + this.abstract_ = new BooleanType(); + this.abstract_.setValue(value); + return this; + } + + /** + * @return {@link #contextType} (If this is an extension, Identifies the context within FHIR resources where the extension can be used.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public Enumeration getContextTypeElement() { + if (this.contextType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.contextType"); + else if (Configuration.doAutoCreate()) + this.contextType = new Enumeration(new ExtensionContextEnumFactory()); // bb + return this.contextType; + } + + public boolean hasContextTypeElement() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + public boolean hasContextType() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + /** + * @param value {@link #contextType} (If this is an extension, Identifies the context within FHIR resources where the extension can be used.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public StructureDefinition setContextTypeElement(Enumeration value) { + this.contextType = value; + return this; + } + + /** + * @return If this is an extension, Identifies the context within FHIR resources where the extension can be used. + */ + public ExtensionContext getContextType() { + return this.contextType == null ? null : this.contextType.getValue(); + } + + /** + * @param value If this is an extension, Identifies the context within FHIR resources where the extension can be used. + */ + public StructureDefinition setContextType(ExtensionContext value) { + if (value == null) + this.contextType = null; + else { + if (this.contextType == null) + this.contextType = new Enumeration(new ExtensionContextEnumFactory()); + this.contextType.setValue(value); + } + return this; + } + + /** + * @return {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) + */ + public List getContext() { + if (this.context == null) + this.context = new ArrayList(); + return this.context; + } + + public boolean hasContext() { + if (this.context == null) + return false; + for (StringType item : this.context) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) + */ + // syntactic sugar + public StringType addContextElement() {//2 + StringType t = new StringType(); + if (this.context == null) + this.context = new ArrayList(); + this.context.add(t); + return t; + } + + /** + * @param value {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) + */ + public StructureDefinition addContext(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.context == null) + this.context = new ArrayList(); + this.context.add(t); + return this; + } + + /** + * @param value {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) + */ + public boolean hasContext(String value) { + if (this.context == null) + return false; + for (StringType v : this.context) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public UriType getBaseElement() { + if (this.base == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.base"); + else if (Configuration.doAutoCreate()) + this.base = new UriType(); // bb + return this.base; + } + + public boolean hasBaseElement() { + return this.base != null && !this.base.isEmpty(); + } + + public boolean hasBase() { + return this.base != null && !this.base.isEmpty(); + } + + /** + * @param value {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public StructureDefinition setBaseElement(UriType value) { + this.base = value; + return this; + } + + /** + * @return An absolute URI that is the base structure from which this set of constraints is derived. + */ + public String getBase() { + return this.base == null ? null : this.base.getValue(); + } + + /** + * @param value An absolute URI that is the base structure from which this set of constraints is derived. + */ + public StructureDefinition setBase(String value) { + if (Utilities.noString(value)) + this.base = null; + else { + if (this.base == null) + this.base = new UriType(); + this.base.setValue(value); + } + return this; + } + + /** + * @return {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.) + */ + public StructureDefinitionSnapshotComponent getSnapshot() { + if (this.snapshot == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.snapshot"); + else if (Configuration.doAutoCreate()) + this.snapshot = new StructureDefinitionSnapshotComponent(); // cc + return this.snapshot; + } + + public boolean hasSnapshot() { + return this.snapshot != null && !this.snapshot.isEmpty(); + } + + /** + * @param value {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.) + */ + public StructureDefinition setSnapshot(StructureDefinitionSnapshotComponent value) { + this.snapshot = value; + return this; + } + + /** + * @return {@link #differential} (A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.) + */ + public StructureDefinitionDifferentialComponent getDifferential() { + if (this.differential == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.differential"); + else if (Configuration.doAutoCreate()) + this.differential = new StructureDefinitionDifferentialComponent(); // cc + return this.differential; + } + + public boolean hasDifferential() { + return this.differential != null && !this.differential.isEmpty(); + } + + /** + * @param value {@link #differential} (A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.) + */ + public StructureDefinition setDifferential(StructureDefinitionDifferentialComponent value) { + this.differential = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("display", "string", "Defined so that applications can use this name when displaying the value of the extension to the user.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("status", "code", "The status of the StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the structure definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the StructureDefinition and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("requirements", "string", "Explains why this structure definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of templates.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, java.lang.Integer.MAX_VALUE, mapping)); + childrenList.add(new Property("kind", "code", "Defines the kind of structure that this definition is describing.", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("constrainedType", "code", "The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.", 0, java.lang.Integer.MAX_VALUE, constrainedType)); + childrenList.add(new Property("abstract", "boolean", "Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.", 0, java.lang.Integer.MAX_VALUE, abstract_)); + childrenList.add(new Property("contextType", "code", "If this is an extension, Identifies the context within FHIR resources where the extension can be used.", 0, java.lang.Integer.MAX_VALUE, contextType)); + childrenList.add(new Property("context", "string", "Identifies the types of resource or data type elements to which the extension can be applied.", 0, java.lang.Integer.MAX_VALUE, context)); + childrenList.add(new Property("base", "uri", "An absolute URI that is the base structure from which this set of constraints is derived.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("snapshot", "", "A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, snapshot)); + childrenList.add(new Property("differential", "", "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", 0, java.lang.Integer.MAX_VALUE, differential)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((StructureDefinitionContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("code")) + this.getCode().add(castToCoding(value)); + else if (name.equals("fhirVersion")) + this.fhirVersion = castToId(value); // IdType + else if (name.equals("mapping")) + this.getMapping().add((StructureDefinitionMappingComponent) value); + else if (name.equals("kind")) + this.kind = new StructureDefinitionKindEnumFactory().fromType(value); // Enumeration + else if (name.equals("constrainedType")) + this.constrainedType = castToCode(value); // CodeType + else if (name.equals("abstract")) + this.abstract_ = castToBoolean(value); // BooleanType + else if (name.equals("contextType")) + this.contextType = new ExtensionContextEnumFactory().fromType(value); // Enumeration + else if (name.equals("context")) + this.getContext().add(castToString(value)); + else if (name.equals("base")) + this.base = castToUri(value); // UriType + else if (name.equals("snapshot")) + this.snapshot = (StructureDefinitionSnapshotComponent) value; // StructureDefinitionSnapshotComponent + else if (name.equals("differential")) + this.differential = (StructureDefinitionDifferentialComponent) value; // StructureDefinitionDifferentialComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.url"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.name"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.display"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.copyright"); + } + else if (name.equals("code")) { + return addCode(); + } + else if (name.equals("fhirVersion")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.fhirVersion"); + } + else if (name.equals("mapping")) { + return addMapping(); + } + else if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.kind"); + } + else if (name.equals("constrainedType")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.constrainedType"); + } + else if (name.equals("abstract")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.abstract"); + } + else if (name.equals("contextType")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.contextType"); + } + else if (name.equals("context")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.context"); + } + else if (name.equals("base")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.base"); + } + else if (name.equals("snapshot")) { + this.snapshot = new StructureDefinitionSnapshotComponent(); + return this.snapshot; + } + else if (name.equals("differential")) { + this.differential = new StructureDefinitionDifferentialComponent(); + return this.differential; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "StructureDefinition"; + + } + + public StructureDefinition copy() { + StructureDefinition dst = new StructureDefinition(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.display = display == null ? null : display.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (StructureDefinitionContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + if (code != null) { + dst.code = new ArrayList(); + for (Coding i : code) + dst.code.add(i.copy()); + }; + dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); + if (mapping != null) { + dst.mapping = new ArrayList(); + for (StructureDefinitionMappingComponent i : mapping) + dst.mapping.add(i.copy()); + }; + dst.kind = kind == null ? null : kind.copy(); + dst.constrainedType = constrainedType == null ? null : constrainedType.copy(); + dst.abstract_ = abstract_ == null ? null : abstract_.copy(); + dst.contextType = contextType == null ? null : contextType.copy(); + if (context != null) { + dst.context = new ArrayList(); + for (StringType i : context) + dst.context.add(i.copy()); + }; + dst.base = base == null ? null : base.copy(); + dst.snapshot = snapshot == null ? null : snapshot.copy(); + dst.differential = differential == null ? null : differential.copy(); + return dst; + } + + protected StructureDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinition)) + return false; + StructureDefinition o = (StructureDefinition) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(display, o.display, true) && compareDeep(status, o.status, true) + && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) + && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(copyright, o.copyright, true) && compareDeep(code, o.code, true) && compareDeep(fhirVersion, o.fhirVersion, true) + && compareDeep(mapping, o.mapping, true) && compareDeep(kind, o.kind, true) && compareDeep(constrainedType, o.constrainedType, true) + && compareDeep(abstract_, o.abstract_, true) && compareDeep(contextType, o.contextType, true) && compareDeep(context, o.context, true) + && compareDeep(base, o.base, true) && compareDeep(snapshot, o.snapshot, true) && compareDeep(differential, o.differential, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinition)) + return false; + StructureDefinition o = (StructureDefinition) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(display, o.display, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) + && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) + && compareValues(requirements, o.requirements, true) && compareValues(copyright, o.copyright, true) + && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(kind, o.kind, true) && compareValues(constrainedType, o.constrainedType, true) + && compareValues(abstract_, o.abstract_, true) && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true) + && compareValues(base, o.base, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (display == null || display.isEmpty()) + && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) + && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (requirements == null || requirements.isEmpty()) && (copyright == null || copyright.isEmpty()) + && (code == null || code.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) && (mapping == null || mapping.isEmpty()) + && (kind == null || kind.isEmpty()) && (constrainedType == null || constrainedType.isEmpty()) + && (abstract_ == null || abstract_.isEmpty()) && (contextType == null || contextType.isEmpty()) + && (context == null || context.isEmpty()) && (base == null || base.isEmpty()) && (snapshot == null || snapshot.isEmpty()) + && (differential == null || differential.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.StructureDefinition; + } + + @SearchParamDefinition(name="date", path="StructureDefinition.date", description="The profile publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="StructureDefinition.identifier", description="The identifier of the profile", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.valueSet[x]", description="A vocabulary binding reference", type="reference" ) + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name="kind", path="StructureDefinition.kind", description="datatype | resource | logical", type="token" ) + public static final String SP_KIND = "kind"; + @SearchParamDefinition(name="display", path="StructureDefinition.display", description="Use this name when displaying the value", type="string" ) + public static final String SP_DISPLAY = "display"; + @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="experimental", path="StructureDefinition.experimental", description="If for testing purposes, not real usage", type="token" ) + public static final String SP_EXPERIMENTAL = "experimental"; + @SearchParamDefinition(name="context-type", path="StructureDefinition.contextType", description="resource | datatype | mapping | extension", type="token" ) + public static final String SP_CONTEXTTYPE = "context-type"; + @SearchParamDefinition(name="abstract", path="StructureDefinition.abstract", description="Whether the structure is abstract", type="token" ) + public static final String SP_ABSTRACT = "abstract"; + @SearchParamDefinition(name="type", path="StructureDefinition.constrainedType", description="Any datatype or resource, including abstract ones", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="version", path="StructureDefinition.version", description="The version identifier of the profile", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="StructureDefinition.url", description="Absolute URL used to reference this StructureDefinition", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description="A path that is constrained in the profile", type="token" ) + public static final String SP_PATH = "path"; + @SearchParamDefinition(name="ext-context", path="StructureDefinition.context", description="Where the extension can be used in instances", type="string" ) + public static final String SP_EXTCONTEXT = "ext-context"; + @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="StructureDefinition.useContext", description="A use context assigned to the structure", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="base-path", path="StructureDefinition.snapshot.element.base.path|StructureDefinition.differential.element.base.path", description="Path that identifies the base element", type="token" ) + public static final String SP_BASEPATH = "base-path"; + @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="base", path="StructureDefinition.base", description="Structure that this set of constraints applies to", type="uri" ) + public static final String SP_BASE = "base"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Subscription.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Subscription.java new file mode 100644 index 00000000000..01ca4261f00 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Subscription.java @@ -0,0 +1,1178 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ +@ResourceDef(name="Subscription", profile="http://hl7.org/fhir/Profile/Subscription") +public class Subscription extends DomainResource { + + public enum SubscriptionStatus { + /** + * The client has requested the subscription, and the server has not yet set it up. + */ + REQUESTED, + /** + * The subscription is active. + */ + ACTIVE, + /** + * The server has an error executing the notification. + */ + ERROR, + /** + * Too many errors have occurred or the subscription has expired. + */ + OFF, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return REQUESTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("error".equals(codeString)) + return ERROR; + if ("off".equals(codeString)) + return OFF; + throw new FHIRException("Unknown SubscriptionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case ERROR: return "error"; + case OFF: return "off"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REQUESTED: return "http://hl7.org/fhir/subscription-status"; + case ACTIVE: return "http://hl7.org/fhir/subscription-status"; + case ERROR: return "http://hl7.org/fhir/subscription-status"; + case OFF: return "http://hl7.org/fhir/subscription-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REQUESTED: return "The client has requested the subscription, and the server has not yet set it up."; + case ACTIVE: return "The subscription is active."; + case ERROR: return "The server has an error executing the notification."; + case OFF: return "Too many errors have occurred or the subscription has expired."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUESTED: return "Requested"; + case ACTIVE: return "Active"; + case ERROR: return "Error"; + case OFF: return "Off"; + default: return "?"; + } + } + } + + public static class SubscriptionStatusEnumFactory implements EnumFactory { + public SubscriptionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return SubscriptionStatus.REQUESTED; + if ("active".equals(codeString)) + return SubscriptionStatus.ACTIVE; + if ("error".equals(codeString)) + return SubscriptionStatus.ERROR; + if ("off".equals(codeString)) + return SubscriptionStatus.OFF; + throw new IllegalArgumentException("Unknown SubscriptionStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return new Enumeration(this, SubscriptionStatus.REQUESTED); + if ("active".equals(codeString)) + return new Enumeration(this, SubscriptionStatus.ACTIVE); + if ("error".equals(codeString)) + return new Enumeration(this, SubscriptionStatus.ERROR); + if ("off".equals(codeString)) + return new Enumeration(this, SubscriptionStatus.OFF); + throw new FHIRException("Unknown SubscriptionStatus code '"+codeString+"'"); + } + public String toCode(SubscriptionStatus code) { + if (code == SubscriptionStatus.REQUESTED) + return "requested"; + if (code == SubscriptionStatus.ACTIVE) + return "active"; + if (code == SubscriptionStatus.ERROR) + return "error"; + if (code == SubscriptionStatus.OFF) + return "off"; + return "?"; + } + } + + public enum SubscriptionChannelType { + /** + * The channel is executed by making a post to the URI. If a payload is included, the URL is interpreted as the service base, and an update (PUT) is made. + */ + RESTHOOK, + /** + * The channel is executed by sending a packet across a web socket connection maintained by the client. The URL identifies the websocket, and the client binds to this URL. + */ + WEBSOCKET, + /** + * The channel is executed by sending an email to the email addressed in the URI (which must be a mailto:). + */ + EMAIL, + /** + * The channel is executed by sending an SMS message to the phone number identified in the URL (tel:). + */ + SMS, + /** + * The channel is executed by sending a message (e.g. a Bundle with a MessageHeader resource etc.) to the application identified in the URI. + */ + MESSAGE, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionChannelType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("rest-hook".equals(codeString)) + return RESTHOOK; + if ("websocket".equals(codeString)) + return WEBSOCKET; + if ("email".equals(codeString)) + return EMAIL; + if ("sms".equals(codeString)) + return SMS; + if ("message".equals(codeString)) + return MESSAGE; + throw new FHIRException("Unknown SubscriptionChannelType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESTHOOK: return "rest-hook"; + case WEBSOCKET: return "websocket"; + case EMAIL: return "email"; + case SMS: return "sms"; + case MESSAGE: return "message"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case RESTHOOK: return "http://hl7.org/fhir/subscription-channel-type"; + case WEBSOCKET: return "http://hl7.org/fhir/subscription-channel-type"; + case EMAIL: return "http://hl7.org/fhir/subscription-channel-type"; + case SMS: return "http://hl7.org/fhir/subscription-channel-type"; + case MESSAGE: return "http://hl7.org/fhir/subscription-channel-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case RESTHOOK: return "The channel is executed by making a post to the URI. If a payload is included, the URL is interpreted as the service base, and an update (PUT) is made."; + case WEBSOCKET: return "The channel is executed by sending a packet across a web socket connection maintained by the client. The URL identifies the websocket, and the client binds to this URL."; + case EMAIL: return "The channel is executed by sending an email to the email addressed in the URI (which must be a mailto:)."; + case SMS: return "The channel is executed by sending an SMS message to the phone number identified in the URL (tel:)."; + case MESSAGE: return "The channel is executed by sending a message (e.g. a Bundle with a MessageHeader resource etc.) to the application identified in the URI."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESTHOOK: return "Rest Hook"; + case WEBSOCKET: return "Websocket"; + case EMAIL: return "Email"; + case SMS: return "SMS"; + case MESSAGE: return "Message"; + default: return "?"; + } + } + } + + public static class SubscriptionChannelTypeEnumFactory implements EnumFactory { + public SubscriptionChannelType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("rest-hook".equals(codeString)) + return SubscriptionChannelType.RESTHOOK; + if ("websocket".equals(codeString)) + return SubscriptionChannelType.WEBSOCKET; + if ("email".equals(codeString)) + return SubscriptionChannelType.EMAIL; + if ("sms".equals(codeString)) + return SubscriptionChannelType.SMS; + if ("message".equals(codeString)) + return SubscriptionChannelType.MESSAGE; + throw new IllegalArgumentException("Unknown SubscriptionChannelType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("rest-hook".equals(codeString)) + return new Enumeration(this, SubscriptionChannelType.RESTHOOK); + if ("websocket".equals(codeString)) + return new Enumeration(this, SubscriptionChannelType.WEBSOCKET); + if ("email".equals(codeString)) + return new Enumeration(this, SubscriptionChannelType.EMAIL); + if ("sms".equals(codeString)) + return new Enumeration(this, SubscriptionChannelType.SMS); + if ("message".equals(codeString)) + return new Enumeration(this, SubscriptionChannelType.MESSAGE); + throw new FHIRException("Unknown SubscriptionChannelType code '"+codeString+"'"); + } + public String toCode(SubscriptionChannelType code) { + if (code == SubscriptionChannelType.RESTHOOK) + return "rest-hook"; + if (code == SubscriptionChannelType.WEBSOCKET) + return "websocket"; + if (code == SubscriptionChannelType.EMAIL) + return "email"; + if (code == SubscriptionChannelType.SMS) + return "sms"; + if (code == SubscriptionChannelType.MESSAGE) + return "message"; + return "?"; + } + } + + @Block() + public static class SubscriptionChannelComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of channel to send notifications on. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="rest-hook | websocket | email | sms | message", formalDefinition="The type of channel to send notifications on." ) + protected Enumeration type; + + /** + * The uri that describes the actual end-point to send messages to. + */ + @Child(name = "endpoint", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the channel points to", formalDefinition="The uri that describes the actual end-point to send messages to." ) + protected UriType endpoint; + + /** + * The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification. + */ + @Child(name = "payload", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Mimetype to send, or blank for no payload", formalDefinition="The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification." ) + protected StringType payload; + + /** + * Additional headers / information to send as part of the notification. + */ + @Child(name = "header", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Usage depends on the channel type", formalDefinition="Additional headers / information to send as part of the notification." ) + protected StringType header; + + private static final long serialVersionUID = -279715391L; + + /* + * Constructor + */ + public SubscriptionChannelComponent() { + super(); + } + + /* + * Constructor + */ + public SubscriptionChannelComponent(Enumeration type, StringType payload) { + super(); + this.type = type; + this.payload = payload; + } + + /** + * @return {@link #type} (The type of channel to send notifications on.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubscriptionChannelComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new SubscriptionChannelTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of channel to send notifications on.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public SubscriptionChannelComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of channel to send notifications on. + */ + public SubscriptionChannelType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of channel to send notifications on. + */ + public SubscriptionChannelComponent setType(SubscriptionChannelType value) { + if (this.type == null) + this.type = new Enumeration(new SubscriptionChannelTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #endpoint} (The uri that describes the actual end-point to send messages to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public UriType getEndpointElement() { + if (this.endpoint == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubscriptionChannelComponent.endpoint"); + else if (Configuration.doAutoCreate()) + this.endpoint = new UriType(); // bb + return this.endpoint; + } + + public boolean hasEndpointElement() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + public boolean hasEndpoint() { + return this.endpoint != null && !this.endpoint.isEmpty(); + } + + /** + * @param value {@link #endpoint} (The uri that describes the actual end-point to send messages to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value + */ + public SubscriptionChannelComponent setEndpointElement(UriType value) { + this.endpoint = value; + return this; + } + + /** + * @return The uri that describes the actual end-point to send messages to. + */ + public String getEndpoint() { + return this.endpoint == null ? null : this.endpoint.getValue(); + } + + /** + * @param value The uri that describes the actual end-point to send messages to. + */ + public SubscriptionChannelComponent setEndpoint(String value) { + if (Utilities.noString(value)) + this.endpoint = null; + else { + if (this.endpoint == null) + this.endpoint = new UriType(); + this.endpoint.setValue(value); + } + return this; + } + + /** + * @return {@link #payload} (The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.). This is the underlying object with id, value and extensions. The accessor "getPayload" gives direct access to the value + */ + public StringType getPayloadElement() { + if (this.payload == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubscriptionChannelComponent.payload"); + else if (Configuration.doAutoCreate()) + this.payload = new StringType(); // bb + return this.payload; + } + + public boolean hasPayloadElement() { + return this.payload != null && !this.payload.isEmpty(); + } + + public boolean hasPayload() { + return this.payload != null && !this.payload.isEmpty(); + } + + /** + * @param value {@link #payload} (The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.). This is the underlying object with id, value and extensions. The accessor "getPayload" gives direct access to the value + */ + public SubscriptionChannelComponent setPayloadElement(StringType value) { + this.payload = value; + return this; + } + + /** + * @return The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification. + */ + public String getPayload() { + return this.payload == null ? null : this.payload.getValue(); + } + + /** + * @param value The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification. + */ + public SubscriptionChannelComponent setPayload(String value) { + if (this.payload == null) + this.payload = new StringType(); + this.payload.setValue(value); + return this; + } + + /** + * @return {@link #header} (Additional headers / information to send as part of the notification.). This is the underlying object with id, value and extensions. The accessor "getHeader" gives direct access to the value + */ + public StringType getHeaderElement() { + if (this.header == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubscriptionChannelComponent.header"); + else if (Configuration.doAutoCreate()) + this.header = new StringType(); // bb + return this.header; + } + + public boolean hasHeaderElement() { + return this.header != null && !this.header.isEmpty(); + } + + public boolean hasHeader() { + return this.header != null && !this.header.isEmpty(); + } + + /** + * @param value {@link #header} (Additional headers / information to send as part of the notification.). This is the underlying object with id, value and extensions. The accessor "getHeader" gives direct access to the value + */ + public SubscriptionChannelComponent setHeaderElement(StringType value) { + this.header = value; + return this; + } + + /** + * @return Additional headers / information to send as part of the notification. + */ + public String getHeader() { + return this.header == null ? null : this.header.getValue(); + } + + /** + * @param value Additional headers / information to send as part of the notification. + */ + public SubscriptionChannelComponent setHeader(String value) { + if (Utilities.noString(value)) + this.header = null; + else { + if (this.header == null) + this.header = new StringType(); + this.header.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of channel to send notifications on.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("endpoint", "uri", "The uri that describes the actual end-point to send messages to.", 0, java.lang.Integer.MAX_VALUE, endpoint)); + childrenList.add(new Property("payload", "string", "The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.", 0, java.lang.Integer.MAX_VALUE, payload)); + childrenList.add(new Property("header", "string", "Additional headers / information to send as part of the notification.", 0, java.lang.Integer.MAX_VALUE, header)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new SubscriptionChannelTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("endpoint")) + this.endpoint = castToUri(value); // UriType + else if (name.equals("payload")) + this.payload = castToString(value); // StringType + else if (name.equals("header")) + this.header = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.type"); + } + else if (name.equals("endpoint")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.endpoint"); + } + else if (name.equals("payload")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.payload"); + } + else if (name.equals("header")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.header"); + } + else + return super.addChild(name); + } + + public SubscriptionChannelComponent copy() { + SubscriptionChannelComponent dst = new SubscriptionChannelComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.endpoint = endpoint == null ? null : endpoint.copy(); + dst.payload = payload == null ? null : payload.copy(); + dst.header = header == null ? null : header.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubscriptionChannelComponent)) + return false; + SubscriptionChannelComponent o = (SubscriptionChannelComponent) other; + return compareDeep(type, o.type, true) && compareDeep(endpoint, o.endpoint, true) && compareDeep(payload, o.payload, true) + && compareDeep(header, o.header, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubscriptionChannelComponent)) + return false; + SubscriptionChannelComponent o = (SubscriptionChannelComponent) other; + return compareValues(type, o.type, true) && compareValues(endpoint, o.endpoint, true) && compareValues(payload, o.payload, true) + && compareValues(header, o.header, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (endpoint == null || endpoint.isEmpty()) + && (payload == null || payload.isEmpty()) && (header == null || header.isEmpty()); + } + + public String fhirType() { + return "Subscription.channel"; + + } + + } + + /** + * The rules that the server should use to determine when to generate notifications for this subscription. + */ + @Child(name = "criteria", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Rule for server push criteria", formalDefinition="The rules that the server should use to determine when to generate notifications for this subscription." ) + protected StringType criteria; + + /** + * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting. + */ + @Child(name = "contact", type = {ContactPoint.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for source (e.g. troubleshooting)", formalDefinition="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting." ) + protected List contact; + + /** + * A description of why this subscription is defined. + */ + @Child(name = "reason", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description of why this subscription was created", formalDefinition="A description of why this subscription is defined." ) + protected StringType reason; + + /** + * The status of the subscription, which marks the server state for managing the subscription. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="requested | active | error | off", formalDefinition="The status of the subscription, which marks the server state for managing the subscription." ) + protected Enumeration status; + + /** + * A record of the last error that occurred when the server processed a notification. + */ + @Child(name = "error", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Latest error note", formalDefinition="A record of the last error that occurred when the server processed a notification." ) + protected StringType error; + + /** + * Details where to send notifications when resources are received that meet the criteria. + */ + @Child(name = "channel", type = {}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The channel on which to report matches to the criteria", formalDefinition="Details where to send notifications when resources are received that meet the criteria." ) + protected SubscriptionChannelComponent channel; + + /** + * The time for the server to turn the subscription off. + */ + @Child(name = "end", type = {InstantType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When to automatically delete the subscription", formalDefinition="The time for the server to turn the subscription off." ) + protected InstantType end; + + /** + * A tag to add to any resource that matches the criteria, after the subscription is processed. + */ + @Child(name = "tag", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A tag to add to matching resources", formalDefinition="A tag to add to any resource that matches the criteria, after the subscription is processed." ) + protected List tag; + + private static final long serialVersionUID = -1390870804L; + + /* + * Constructor + */ + public Subscription() { + super(); + } + + /* + * Constructor + */ + public Subscription(StringType criteria, StringType reason, Enumeration status, SubscriptionChannelComponent channel) { + super(); + this.criteria = criteria; + this.reason = reason; + this.status = status; + this.channel = channel; + } + + /** + * @return {@link #criteria} (The rules that the server should use to determine when to generate notifications for this subscription.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public StringType getCriteriaElement() { + if (this.criteria == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.criteria"); + else if (Configuration.doAutoCreate()) + this.criteria = new StringType(); // bb + return this.criteria; + } + + public boolean hasCriteriaElement() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + public boolean hasCriteria() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + /** + * @param value {@link #criteria} (The rules that the server should use to determine when to generate notifications for this subscription.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public Subscription setCriteriaElement(StringType value) { + this.criteria = value; + return this; + } + + /** + * @return The rules that the server should use to determine when to generate notifications for this subscription. + */ + public String getCriteria() { + return this.criteria == null ? null : this.criteria.getValue(); + } + + /** + * @param value The rules that the server should use to determine when to generate notifications for this subscription. + */ + public Subscription setCriteria(String value) { + if (this.criteria == null) + this.criteria = new StringType(); + this.criteria.setValue(value); + return this; + } + + /** + * @return {@link #contact} (Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ContactPoint item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.) + */ + // syntactic sugar + public ContactPoint addContact() { //3 + ContactPoint t = new ContactPoint(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Subscription addContact(ContactPoint t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #reason} (A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value + */ + public StringType getReasonElement() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new StringType(); // bb + return this.reason; + } + + public boolean hasReasonElement() { + return this.reason != null && !this.reason.isEmpty(); + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value + */ + public Subscription setReasonElement(StringType value) { + this.reason = value; + return this; + } + + /** + * @return A description of why this subscription is defined. + */ + public String getReason() { + return this.reason == null ? null : this.reason.getValue(); + } + + /** + * @param value A description of why this subscription is defined. + */ + public Subscription setReason(String value) { + if (this.reason == null) + this.reason = new StringType(); + this.reason.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new SubscriptionStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Subscription setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the subscription, which marks the server state for managing the subscription. + */ + public SubscriptionStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the subscription, which marks the server state for managing the subscription. + */ + public Subscription setStatus(SubscriptionStatus value) { + if (this.status == null) + this.status = new Enumeration(new SubscriptionStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #error} (A record of the last error that occurred when the server processed a notification.). This is the underlying object with id, value and extensions. The accessor "getError" gives direct access to the value + */ + public StringType getErrorElement() { + if (this.error == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.error"); + else if (Configuration.doAutoCreate()) + this.error = new StringType(); // bb + return this.error; + } + + public boolean hasErrorElement() { + return this.error != null && !this.error.isEmpty(); + } + + public boolean hasError() { + return this.error != null && !this.error.isEmpty(); + } + + /** + * @param value {@link #error} (A record of the last error that occurred when the server processed a notification.). This is the underlying object with id, value and extensions. The accessor "getError" gives direct access to the value + */ + public Subscription setErrorElement(StringType value) { + this.error = value; + return this; + } + + /** + * @return A record of the last error that occurred when the server processed a notification. + */ + public String getError() { + return this.error == null ? null : this.error.getValue(); + } + + /** + * @param value A record of the last error that occurred when the server processed a notification. + */ + public Subscription setError(String value) { + if (Utilities.noString(value)) + this.error = null; + else { + if (this.error == null) + this.error = new StringType(); + this.error.setValue(value); + } + return this; + } + + /** + * @return {@link #channel} (Details where to send notifications when resources are received that meet the criteria.) + */ + public SubscriptionChannelComponent getChannel() { + if (this.channel == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.channel"); + else if (Configuration.doAutoCreate()) + this.channel = new SubscriptionChannelComponent(); // cc + return this.channel; + } + + public boolean hasChannel() { + return this.channel != null && !this.channel.isEmpty(); + } + + /** + * @param value {@link #channel} (Details where to send notifications when resources are received that meet the criteria.) + */ + public Subscription setChannel(SubscriptionChannelComponent value) { + this.channel = value; + return this; + } + + /** + * @return {@link #end} (The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public InstantType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Subscription.end"); + else if (Configuration.doAutoCreate()) + this.end = new InstantType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Subscription setEndElement(InstantType value) { + this.end = value; + return this; + } + + /** + * @return The time for the server to turn the subscription off. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value The time for the server to turn the subscription off. + */ + public Subscription setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new InstantType(); + this.end.setValue(value); + } + return this; + } + + /** + * @return {@link #tag} (A tag to add to any resource that matches the criteria, after the subscription is processed.) + */ + public List getTag() { + if (this.tag == null) + this.tag = new ArrayList(); + return this.tag; + } + + public boolean hasTag() { + if (this.tag == null) + return false; + for (Coding item : this.tag) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #tag} (A tag to add to any resource that matches the criteria, after the subscription is processed.) + */ + // syntactic sugar + public Coding addTag() { //3 + Coding t = new Coding(); + if (this.tag == null) + this.tag = new ArrayList(); + this.tag.add(t); + return t; + } + + // syntactic sugar + public Subscription addTag(Coding t) { //3 + if (t == null) + return this; + if (this.tag == null) + this.tag = new ArrayList(); + this.tag.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("criteria", "string", "The rules that the server should use to determine when to generate notifications for this subscription.", 0, java.lang.Integer.MAX_VALUE, criteria)); + childrenList.add(new Property("contact", "ContactPoint", "Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("reason", "string", "A description of why this subscription is defined.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("status", "code", "The status of the subscription, which marks the server state for managing the subscription.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("error", "string", "A record of the last error that occurred when the server processed a notification.", 0, java.lang.Integer.MAX_VALUE, error)); + childrenList.add(new Property("channel", "", "Details where to send notifications when resources are received that meet the criteria.", 0, java.lang.Integer.MAX_VALUE, channel)); + childrenList.add(new Property("end", "instant", "The time for the server to turn the subscription off.", 0, java.lang.Integer.MAX_VALUE, end)); + childrenList.add(new Property("tag", "Coding", "A tag to add to any resource that matches the criteria, after the subscription is processed.", 0, java.lang.Integer.MAX_VALUE, tag)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("criteria")) + this.criteria = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add(castToContactPoint(value)); + else if (name.equals("reason")) + this.reason = castToString(value); // StringType + else if (name.equals("status")) + this.status = new SubscriptionStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("error")) + this.error = castToString(value); // StringType + else if (name.equals("channel")) + this.channel = (SubscriptionChannelComponent) value; // SubscriptionChannelComponent + else if (name.equals("end")) + this.end = castToInstant(value); // InstantType + else if (name.equals("tag")) + this.getTag().add(castToCoding(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("criteria")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.criteria"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("reason")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.reason"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.status"); + } + else if (name.equals("error")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.error"); + } + else if (name.equals("channel")) { + this.channel = new SubscriptionChannelComponent(); + return this.channel; + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Subscription.end"); + } + else if (name.equals("tag")) { + return addTag(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Subscription"; + + } + + public Subscription copy() { + Subscription dst = new Subscription(); + copyValues(dst); + dst.criteria = criteria == null ? null : criteria.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ContactPoint i : contact) + dst.contact.add(i.copy()); + }; + dst.reason = reason == null ? null : reason.copy(); + dst.status = status == null ? null : status.copy(); + dst.error = error == null ? null : error.copy(); + dst.channel = channel == null ? null : channel.copy(); + dst.end = end == null ? null : end.copy(); + if (tag != null) { + dst.tag = new ArrayList(); + for (Coding i : tag) + dst.tag.add(i.copy()); + }; + return dst; + } + + protected Subscription typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Subscription)) + return false; + Subscription o = (Subscription) other; + return compareDeep(criteria, o.criteria, true) && compareDeep(contact, o.contact, true) && compareDeep(reason, o.reason, true) + && compareDeep(status, o.status, true) && compareDeep(error, o.error, true) && compareDeep(channel, o.channel, true) + && compareDeep(end, o.end, true) && compareDeep(tag, o.tag, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Subscription)) + return false; + Subscription o = (Subscription) other; + return compareValues(criteria, o.criteria, true) && compareValues(reason, o.reason, true) && compareValues(status, o.status, true) + && compareValues(error, o.error, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (criteria == null || criteria.isEmpty()) && (contact == null || contact.isEmpty()) + && (reason == null || reason.isEmpty()) && (status == null || status.isEmpty()) && (error == null || error.isEmpty()) + && (channel == null || channel.isEmpty()) && (end == null || end.isEmpty()) && (tag == null || tag.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Subscription; + } + + @SearchParamDefinition(name="payload", path="Subscription.channel.payload", description="Mimetype to send, or blank for no payload", type="string" ) + public static final String SP_PAYLOAD = "payload"; + @SearchParamDefinition(name="criteria", path="Subscription.criteria", description="Rule for server push criteria", type="string" ) + public static final String SP_CRITERIA = "criteria"; + @SearchParamDefinition(name="contact", path="Subscription.contact", description="Contact details for source (e.g. troubleshooting)", type="token" ) + public static final String SP_CONTACT = "contact"; + @SearchParamDefinition(name="tag", path="Subscription.tag", description="A tag to add to matching resources", type="token" ) + public static final String SP_TAG = "tag"; + @SearchParamDefinition(name="type", path="Subscription.channel.type", description="rest-hook | websocket | email | sms | message", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="url", path="Subscription.channel.endpoint", description="Where the channel points to", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="status", path="Subscription.status", description="requested | active | error | off", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Substance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Substance.java new file mode 100644 index 00000000000..3e543f3162d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Substance.java @@ -0,0 +1,864 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A homogeneous material with a definite composition. + */ +@ResourceDef(name="Substance", profile="http://hl7.org/fhir/Profile/Substance") +public class Substance extends DomainResource { + + @Block() + public static class SubstanceInstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifier associated with the package/container (usually a label affixed directly). + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of the package/container", formalDefinition="Identifier associated with the package/container (usually a label affixed directly)." ) + protected Identifier identifier; + + /** + * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. + */ + @Child(name = "expiry", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When no longer valid to use", formalDefinition="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry." ) + protected DateTimeType expiry; + + /** + * The amount of the substance. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount of substance in the package", formalDefinition="The amount of the substance." ) + protected SimpleQuantity quantity; + + private static final long serialVersionUID = -794314734L; + + /* + * Constructor + */ + public SubstanceInstanceComponent() { + super(); + } + + /** + * @return {@link #identifier} (Identifier associated with the package/container (usually a label affixed directly).) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceInstanceComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifier associated with the package/container (usually a label affixed directly).) + */ + public SubstanceInstanceComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #expiry} (When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value + */ + public DateTimeType getExpiryElement() { + if (this.expiry == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceInstanceComponent.expiry"); + else if (Configuration.doAutoCreate()) + this.expiry = new DateTimeType(); // bb + return this.expiry; + } + + public boolean hasExpiryElement() { + return this.expiry != null && !this.expiry.isEmpty(); + } + + public boolean hasExpiry() { + return this.expiry != null && !this.expiry.isEmpty(); + } + + /** + * @param value {@link #expiry} (When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value + */ + public SubstanceInstanceComponent setExpiryElement(DateTimeType value) { + this.expiry = value; + return this; + } + + /** + * @return When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. + */ + public Date getExpiry() { + return this.expiry == null ? null : this.expiry.getValue(); + } + + /** + * @param value When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. + */ + public SubstanceInstanceComponent setExpiry(Date value) { + if (value == null) + this.expiry = null; + else { + if (this.expiry == null) + this.expiry = new DateTimeType(); + this.expiry.setValue(value); + } + return this; + } + + /** + * @return {@link #quantity} (The amount of the substance.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceInstanceComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of the substance.) + */ + public SubstanceInstanceComponent setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier associated with the package/container (usually a label affixed directly).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("expiry", "dateTime", "When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.", 0, java.lang.Integer.MAX_VALUE, expiry)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount of the substance.", 0, java.lang.Integer.MAX_VALUE, quantity)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("expiry")) + this.expiry = castToDateTime(value); // DateTimeType + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("expiry")) { + throw new FHIRException("Cannot call addChild on a primitive type Substance.expiry"); + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else + return super.addChild(name); + } + + public SubstanceInstanceComponent copy() { + SubstanceInstanceComponent dst = new SubstanceInstanceComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.expiry = expiry == null ? null : expiry.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubstanceInstanceComponent)) + return false; + SubstanceInstanceComponent o = (SubstanceInstanceComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(expiry, o.expiry, true) && compareDeep(quantity, o.quantity, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubstanceInstanceComponent)) + return false; + SubstanceInstanceComponent o = (SubstanceInstanceComponent) other; + return compareValues(expiry, o.expiry, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (expiry == null || expiry.isEmpty()) + && (quantity == null || quantity.isEmpty()); + } + + public String fhirType() { + return "Substance.instance"; + + } + + } + + @Block() + public static class SubstanceIngredientComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The amount of the ingredient in the substance - a concentration ratio. + */ + @Child(name = "quantity", type = {Ratio.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Optional amount (concentration)", formalDefinition="The amount of the ingredient in the substance - a concentration ratio." ) + protected Ratio quantity; + + /** + * Another substance that is a component of this substance. + */ + @Child(name = "substance", type = {Substance.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="A component of the substance", formalDefinition="Another substance that is a component of this substance." ) + protected Reference substance; + + /** + * The actual object that is the target of the reference (Another substance that is a component of this substance.) + */ + protected Substance substanceTarget; + + private static final long serialVersionUID = -1783242034L; + + /* + * Constructor + */ + public SubstanceIngredientComponent() { + super(); + } + + /* + * Constructor + */ + public SubstanceIngredientComponent(Reference substance) { + super(); + this.substance = substance; + } + + /** + * @return {@link #quantity} (The amount of the ingredient in the substance - a concentration ratio.) + */ + public Ratio getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceIngredientComponent.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new Ratio(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of the ingredient in the substance - a concentration ratio.) + */ + public SubstanceIngredientComponent setQuantity(Ratio value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #substance} (Another substance that is a component of this substance.) + */ + public Reference getSubstance() { + if (this.substance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceIngredientComponent.substance"); + else if (Configuration.doAutoCreate()) + this.substance = new Reference(); // cc + return this.substance; + } + + public boolean hasSubstance() { + return this.substance != null && !this.substance.isEmpty(); + } + + /** + * @param value {@link #substance} (Another substance that is a component of this substance.) + */ + public SubstanceIngredientComponent setSubstance(Reference value) { + this.substance = value; + return this; + } + + /** + * @return {@link #substance} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another substance that is a component of this substance.) + */ + public Substance getSubstanceTarget() { + if (this.substanceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubstanceIngredientComponent.substance"); + else if (Configuration.doAutoCreate()) + this.substanceTarget = new Substance(); // aa + return this.substanceTarget; + } + + /** + * @param value {@link #substance} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another substance that is a component of this substance.) + */ + public SubstanceIngredientComponent setSubstanceTarget(Substance value) { + this.substanceTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("quantity", "Ratio", "The amount of the ingredient in the substance - a concentration ratio.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("substance", "Reference(Substance)", "Another substance that is a component of this substance.", 0, java.lang.Integer.MAX_VALUE, substance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("quantity")) + this.quantity = castToRatio(value); // Ratio + else if (name.equals("substance")) + this.substance = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("quantity")) { + this.quantity = new Ratio(); + return this.quantity; + } + else if (name.equals("substance")) { + this.substance = new Reference(); + return this.substance; + } + else + return super.addChild(name); + } + + public SubstanceIngredientComponent copy() { + SubstanceIngredientComponent dst = new SubstanceIngredientComponent(); + copyValues(dst); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.substance = substance == null ? null : substance.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SubstanceIngredientComponent)) + return false; + SubstanceIngredientComponent o = (SubstanceIngredientComponent) other; + return compareDeep(quantity, o.quantity, true) && compareDeep(substance, o.substance, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SubstanceIngredientComponent)) + return false; + SubstanceIngredientComponent o = (SubstanceIngredientComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (quantity == null || quantity.isEmpty()) && (substance == null || substance.isEmpty()) + ; + } + + public String fhirType() { + return "Substance.ingredient"; + + } + + } + + /** + * Unique identifier for the substance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="Unique identifier for the substance." ) + protected List identifier; + + /** + * A code that classifies the general type of substance. This is used for searching, sorting and display purposes. + */ + @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="What class/type of substance this is", formalDefinition="A code that classifies the general type of substance. This is used for searching, sorting and display purposes." ) + protected List category; + + /** + * A code (or set of codes) that identify this substance. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What substance this is", formalDefinition="A code (or set of codes) that identify this substance." ) + protected CodeableConcept code; + + /** + * A description of the substance - its appearance, handling requirements, and other usage notes. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Textual description of the substance, comments", formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes." ) + protected StringType description; + + /** + * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance. + */ + @Child(name = "instance", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="If this describes a specific package/container of the substance", formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." ) + protected List instance; + + /** + * A substance can be composed of other substances. + */ + @Child(name = "ingredient", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Composition information about the substance", formalDefinition="A substance can be composed of other substances." ) + protected List ingredient; + + private static final long serialVersionUID = -1653977206L; + + /* + * Constructor + */ + public Substance() { + super(); + } + + /* + * Constructor + */ + public Substance(CodeableConcept code) { + super(); + this.code = code; + } + + /** + * @return {@link #identifier} (Unique identifier for the substance.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Unique identifier for the substance.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public Substance addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #category} (A code that classifies the general type of substance. This is used for searching, sorting and display purposes.) + */ + public List getCategory() { + if (this.category == null) + this.category = new ArrayList(); + return this.category; + } + + public boolean hasCategory() { + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #category} (A code that classifies the general type of substance. This is used for searching, sorting and display purposes.) + */ + // syntactic sugar + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + // syntactic sugar + public Substance addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; + } + + /** + * @return {@link #code} (A code (or set of codes) that identify this substance.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Substance.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code (or set of codes) that identify this substance.) + */ + public Substance setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #description} (A description of the substance - its appearance, handling requirements, and other usage notes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Substance.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of the substance - its appearance, handling requirements, and other usage notes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Substance setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of the substance - its appearance, handling requirements, and other usage notes. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of the substance - its appearance, handling requirements, and other usage notes. + */ + public Substance setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #instance} (Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.) + */ + public List getInstance() { + if (this.instance == null) + this.instance = new ArrayList(); + return this.instance; + } + + public boolean hasInstance() { + if (this.instance == null) + return false; + for (SubstanceInstanceComponent item : this.instance) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #instance} (Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.) + */ + // syntactic sugar + public SubstanceInstanceComponent addInstance() { //3 + SubstanceInstanceComponent t = new SubstanceInstanceComponent(); + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return t; + } + + // syntactic sugar + public Substance addInstance(SubstanceInstanceComponent t) { //3 + if (t == null) + return this; + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return this; + } + + /** + * @return {@link #ingredient} (A substance can be composed of other substances.) + */ + public List getIngredient() { + if (this.ingredient == null) + this.ingredient = new ArrayList(); + return this.ingredient; + } + + public boolean hasIngredient() { + if (this.ingredient == null) + return false; + for (SubstanceIngredientComponent item : this.ingredient) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #ingredient} (A substance can be composed of other substances.) + */ + // syntactic sugar + public SubstanceIngredientComponent addIngredient() { //3 + SubstanceIngredientComponent t = new SubstanceIngredientComponent(); + if (this.ingredient == null) + this.ingredient = new ArrayList(); + this.ingredient.add(t); + return t; + } + + // syntactic sugar + public Substance addIngredient(SubstanceIngredientComponent t) { //3 + if (t == null) + return this; + if (this.ingredient == null) + this.ingredient = new ArrayList(); + this.ingredient.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Unique identifier for the substance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the general type of substance. This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("code", "CodeableConcept", "A code (or set of codes) that identify this substance.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("description", "string", "A description of the substance - its appearance, handling requirements, and other usage notes.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("instance", "", "Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.", 0, java.lang.Integer.MAX_VALUE, instance)); + childrenList.add(new Property("ingredient", "", "A substance can be composed of other substances.", 0, java.lang.Integer.MAX_VALUE, ingredient)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("category")) + this.getCategory().add(castToCodeableConcept(value)); + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("instance")) + this.getInstance().add((SubstanceInstanceComponent) value); + else if (name.equals("ingredient")) + this.getIngredient().add((SubstanceIngredientComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("category")) { + return addCategory(); + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Substance.description"); + } + else if (name.equals("instance")) { + return addInstance(); + } + else if (name.equals("ingredient")) { + return addIngredient(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Substance"; + + } + + public Substance copy() { + Substance dst = new Substance(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; + dst.code = code == null ? null : code.copy(); + dst.description = description == null ? null : description.copy(); + if (instance != null) { + dst.instance = new ArrayList(); + for (SubstanceInstanceComponent i : instance) + dst.instance.add(i.copy()); + }; + if (ingredient != null) { + dst.ingredient = new ArrayList(); + for (SubstanceIngredientComponent i : ingredient) + dst.ingredient.add(i.copy()); + }; + return dst; + } + + protected Substance typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Substance)) + return false; + Substance o = (Substance) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) + && compareDeep(description, o.description, true) && compareDeep(instance, o.instance, true) && compareDeep(ingredient, o.ingredient, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Substance)) + return false; + Substance o = (Substance) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) + && (code == null || code.isEmpty()) && (description == null || description.isEmpty()) && (instance == null || instance.isEmpty()) + && (ingredient == null || ingredient.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Substance; + } + + @SearchParamDefinition(name="identifier", path="Substance.identifier", description="Unique identifier for the substance", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="container-identifier", path="Substance.instance.identifier", description="Identifier of the package/container", type="token" ) + public static final String SP_CONTAINERIDENTIFIER = "container-identifier"; + @SearchParamDefinition(name="code", path="Substance.code", description="The code of the substance", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="Amount of substance in the package", type="quantity" ) + public static final String SP_QUANTITY = "quantity"; + @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="A component of the substance", type="reference" ) + public static final String SP_SUBSTANCE = "substance"; + @SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="Expiry date of package or container of substance", type="date" ) + public static final String SP_EXPIRY = "expiry"; + @SearchParamDefinition(name="category", path="Substance.category", description="The category of the substance", type="token" ) + public static final String SP_CATEGORY = "category"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyDelivery.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyDelivery.java new file mode 100644 index 00000000000..1ad8399360c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyDelivery.java @@ -0,0 +1,855 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Record of delivery of what is supplied. + */ +@ResourceDef(name="SupplyDelivery", profile="http://hl7.org/fhir/Profile/SupplyDelivery") +public class SupplyDelivery extends DomainResource { + + public enum SupplyDeliveryStatus { + /** + * Supply has been requested, but not delivered. + */ + INPROGRESS, + /** + * Supply has been delivered ("completed"). + */ + COMPLETED, + /** + * Dispensing was not completed. + */ + ABANDONED, + /** + * added to help the parsers + */ + NULL; + public static SupplyDeliveryStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("abandoned".equals(codeString)) + return ABANDONED; + throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case ABANDONED: return "abandoned"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/supplydelivery-status"; + case COMPLETED: return "http://hl7.org/fhir/supplydelivery-status"; + case ABANDONED: return "http://hl7.org/fhir/supplydelivery-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "Supply has been requested, but not delivered."; + case COMPLETED: return "Supply has been delivered (\"completed\")."; + case ABANDONED: return "Dispensing was not completed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Delivered"; + case ABANDONED: return "Abandoned"; + default: return "?"; + } + } + } + + public static class SupplyDeliveryStatusEnumFactory implements EnumFactory { + public SupplyDeliveryStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return SupplyDeliveryStatus.INPROGRESS; + if ("completed".equals(codeString)) + return SupplyDeliveryStatus.COMPLETED; + if ("abandoned".equals(codeString)) + return SupplyDeliveryStatus.ABANDONED; + throw new IllegalArgumentException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return new Enumeration(this, SupplyDeliveryStatus.INPROGRESS); + if ("completed".equals(codeString)) + return new Enumeration(this, SupplyDeliveryStatus.COMPLETED); + if ("abandoned".equals(codeString)) + return new Enumeration(this, SupplyDeliveryStatus.ABANDONED); + throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); + } + public String toCode(SupplyDeliveryStatus code) { + if (code == SupplyDeliveryStatus.INPROGRESS) + return "in-progress"; + if (code == SupplyDeliveryStatus.COMPLETED) + return "completed"; + if (code == SupplyDeliveryStatus.ABANDONED) + return "abandoned"; + return "?"; + } + } + + /** + * Identifier assigned by the dispensing facility when the item(s) is dispensed. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="Identifier assigned by the dispensing facility when the item(s) is dispensed." ) + protected Identifier identifier; + + /** + * A code specifying the state of the dispense event. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | completed | abandoned", formalDefinition="A code specifying the state of the dispense event." ) + protected Enumeration status; + + /** + * A link to a resource representing the person whom the delivered item is for. + */ + @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the delivered item is for." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A link to a resource representing the person whom the delivered item is for.) + */ + protected Patient patientTarget; + + /** + * Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Category of dispense event", formalDefinition="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ) + protected CodeableConcept type; + + /** + * The amount of supply that has been dispensed. Includes unit of measure. + */ + @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of supply that has been dispensed. Includes unit of measure." ) + protected SimpleQuantity quantity; + + /** + * Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list. + */ + @Child(name = "suppliedItem", type = {Medication.class, Substance.class, Device.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Medication, Substance, or Device supplied", formalDefinition="Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list." ) + protected Reference suppliedItem; + + /** + * The actual object that is the target of the reference (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.) + */ + protected Resource suppliedItemTarget; + + /** + * The individual responsible for dispensing the medication, supplier or device. + */ + @Child(name = "supplier", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dispenser", formalDefinition="The individual responsible for dispensing the medication, supplier or device." ) + protected Reference supplier; + + /** + * The actual object that is the target of the reference (The individual responsible for dispensing the medication, supplier or device.) + */ + protected Practitioner supplierTarget; + + /** + * The time the dispense event occurred. + */ + @Child(name = "whenPrepared", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dispensing time", formalDefinition="The time the dispense event occurred." ) + protected Period whenPrepared; + + /** + * The time the dispensed item was sent or handed to the patient (or agent). + */ + @Child(name = "time", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Handover time", formalDefinition="The time the dispensed item was sent or handed to the patient (or agent)." ) + protected DateTimeType time; + + /** + * Identification of the facility/location where the Supply was shipped to, as part of the dispense event. + */ + @Child(name = "destination", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Where the Supply was sent", formalDefinition="Identification of the facility/location where the Supply was shipped to, as part of the dispense event." ) + protected Reference destination; + + /** + * The actual object that is the target of the reference (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) + */ + protected Location destinationTarget; + + /** + * Identifies the person who picked up the Supply. + */ + @Child(name = "receiver", type = {Practitioner.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who collected the Supply", formalDefinition="Identifies the person who picked up the Supply." ) + protected List receiver; + /** + * The actual objects that are the target of the reference (Identifies the person who picked up the Supply.) + */ + protected List receiverTarget; + + + private static final long serialVersionUID = -1520129707L; + + /* + * Constructor + */ + public SupplyDelivery() { + super(); + } + + /** + * @return {@link #identifier} (Identifier assigned by the dispensing facility when the item(s) is dispensed.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifier assigned by the dispensing facility when the item(s) is dispensed.) + */ + public SupplyDelivery setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new SupplyDeliveryStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public SupplyDelivery setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying the state of the dispense event. + */ + public SupplyDeliveryStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying the state of the dispense event. + */ + public SupplyDelivery setStatus(SupplyDeliveryStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new SupplyDeliveryStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #patient} (A link to a resource representing the person whom the delivered item is for.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A link to a resource representing the person whom the delivered item is for.) + */ + public SupplyDelivery setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person whom the delivered item is for.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person whom the delivered item is for.) + */ + public SupplyDelivery setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #type} (Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) + */ + public SupplyDelivery setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #quantity} (The amount of supply that has been dispensed. Includes unit of measure.) + */ + public SimpleQuantity getQuantity() { + if (this.quantity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.quantity"); + else if (Configuration.doAutoCreate()) + this.quantity = new SimpleQuantity(); // cc + return this.quantity; + } + + public boolean hasQuantity() { + return this.quantity != null && !this.quantity.isEmpty(); + } + + /** + * @param value {@link #quantity} (The amount of supply that has been dispensed. Includes unit of measure.) + */ + public SupplyDelivery setQuantity(SimpleQuantity value) { + this.quantity = value; + return this; + } + + /** + * @return {@link #suppliedItem} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.) + */ + public Reference getSuppliedItem() { + if (this.suppliedItem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.suppliedItem"); + else if (Configuration.doAutoCreate()) + this.suppliedItem = new Reference(); // cc + return this.suppliedItem; + } + + public boolean hasSuppliedItem() { + return this.suppliedItem != null && !this.suppliedItem.isEmpty(); + } + + /** + * @param value {@link #suppliedItem} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.) + */ + public SupplyDelivery setSuppliedItem(Reference value) { + this.suppliedItem = value; + return this; + } + + /** + * @return {@link #suppliedItem} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.) + */ + public Resource getSuppliedItemTarget() { + return this.suppliedItemTarget; + } + + /** + * @param value {@link #suppliedItem} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.) + */ + public SupplyDelivery setSuppliedItemTarget(Resource value) { + this.suppliedItemTarget = value; + return this; + } + + /** + * @return {@link #supplier} (The individual responsible for dispensing the medication, supplier or device.) + */ + public Reference getSupplier() { + if (this.supplier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.supplier"); + else if (Configuration.doAutoCreate()) + this.supplier = new Reference(); // cc + return this.supplier; + } + + public boolean hasSupplier() { + return this.supplier != null && !this.supplier.isEmpty(); + } + + /** + * @param value {@link #supplier} (The individual responsible for dispensing the medication, supplier or device.) + */ + public SupplyDelivery setSupplier(Reference value) { + this.supplier = value; + return this; + } + + /** + * @return {@link #supplier} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The individual responsible for dispensing the medication, supplier or device.) + */ + public Practitioner getSupplierTarget() { + if (this.supplierTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.supplier"); + else if (Configuration.doAutoCreate()) + this.supplierTarget = new Practitioner(); // aa + return this.supplierTarget; + } + + /** + * @param value {@link #supplier} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The individual responsible for dispensing the medication, supplier or device.) + */ + public SupplyDelivery setSupplierTarget(Practitioner value) { + this.supplierTarget = value; + return this; + } + + /** + * @return {@link #whenPrepared} (The time the dispense event occurred.) + */ + public Period getWhenPrepared() { + if (this.whenPrepared == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.whenPrepared"); + else if (Configuration.doAutoCreate()) + this.whenPrepared = new Period(); // cc + return this.whenPrepared; + } + + public boolean hasWhenPrepared() { + return this.whenPrepared != null && !this.whenPrepared.isEmpty(); + } + + /** + * @param value {@link #whenPrepared} (The time the dispense event occurred.) + */ + public SupplyDelivery setWhenPrepared(Period value) { + this.whenPrepared = value; + return this; + } + + /** + * @return {@link #time} (The time the dispensed item was sent or handed to the patient (or agent).). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public DateTimeType getTimeElement() { + if (this.time == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.time"); + else if (Configuration.doAutoCreate()) + this.time = new DateTimeType(); // bb + return this.time; + } + + public boolean hasTimeElement() { + return this.time != null && !this.time.isEmpty(); + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (The time the dispensed item was sent or handed to the patient (or agent).). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value + */ + public SupplyDelivery setTimeElement(DateTimeType value) { + this.time = value; + return this; + } + + /** + * @return The time the dispensed item was sent or handed to the patient (or agent). + */ + public Date getTime() { + return this.time == null ? null : this.time.getValue(); + } + + /** + * @param value The time the dispensed item was sent or handed to the patient (or agent). + */ + public SupplyDelivery setTime(Date value) { + if (value == null) + this.time = null; + else { + if (this.time == null) + this.time = new DateTimeType(); + this.time.setValue(value); + } + return this; + } + + /** + * @return {@link #destination} (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) + */ + public Reference getDestination() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new Reference(); // cc + return this.destination; + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) + */ + public SupplyDelivery setDestination(Reference value) { + this.destination = value; + return this; + } + + /** + * @return {@link #destination} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) + */ + public Location getDestinationTarget() { + if (this.destinationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyDelivery.destination"); + else if (Configuration.doAutoCreate()) + this.destinationTarget = new Location(); // aa + return this.destinationTarget; + } + + /** + * @param value {@link #destination} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) + */ + public SupplyDelivery setDestinationTarget(Location value) { + this.destinationTarget = value; + return this; + } + + /** + * @return {@link #receiver} (Identifies the person who picked up the Supply.) + */ + public List getReceiver() { + if (this.receiver == null) + this.receiver = new ArrayList(); + return this.receiver; + } + + public boolean hasReceiver() { + if (this.receiver == null) + return false; + for (Reference item : this.receiver) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #receiver} (Identifies the person who picked up the Supply.) + */ + // syntactic sugar + public Reference addReceiver() { //3 + Reference t = new Reference(); + if (this.receiver == null) + this.receiver = new ArrayList(); + this.receiver.add(t); + return t; + } + + // syntactic sugar + public SupplyDelivery addReceiver(Reference t) { //3 + if (t == null) + return this; + if (this.receiver == null) + this.receiver = new ArrayList(); + this.receiver.add(t); + return this; + } + + /** + * @return {@link #receiver} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the person who picked up the Supply.) + */ + public List getReceiverTarget() { + if (this.receiverTarget == null) + this.receiverTarget = new ArrayList(); + return this.receiverTarget; + } + + // syntactic sugar + /** + * @return {@link #receiver} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Identifies the person who picked up the Supply.) + */ + public Practitioner addReceiverTarget() { + Practitioner r = new Practitioner(); + if (this.receiverTarget == null) + this.receiverTarget = new ArrayList(); + this.receiverTarget.add(r); + return r; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Identifier assigned by the dispensing facility when the item(s) is dispensed.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "A code specifying the state of the dispense event.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the delivered item is for.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("type", "CodeableConcept", "Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("quantity", "SimpleQuantity", "The amount of supply that has been dispensed. Includes unit of measure.", 0, java.lang.Integer.MAX_VALUE, quantity)); + childrenList.add(new Property("suppliedItem", "Reference(Medication|Substance|Device)", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.", 0, java.lang.Integer.MAX_VALUE, suppliedItem)); + childrenList.add(new Property("supplier", "Reference(Practitioner)", "The individual responsible for dispensing the medication, supplier or device.", 0, java.lang.Integer.MAX_VALUE, supplier)); + childrenList.add(new Property("whenPrepared", "Period", "The time the dispense event occurred.", 0, java.lang.Integer.MAX_VALUE, whenPrepared)); + childrenList.add(new Property("time", "dateTime", "The time the dispensed item was sent or handed to the patient (or agent).", 0, java.lang.Integer.MAX_VALUE, time)); + childrenList.add(new Property("destination", "Reference(Location)", "Identification of the facility/location where the Supply was shipped to, as part of the dispense event.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("receiver", "Reference(Practitioner)", "Identifies the person who picked up the Supply.", 0, java.lang.Integer.MAX_VALUE, receiver)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("status")) + this.status = new SupplyDeliveryStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("quantity")) + this.quantity = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("suppliedItem")) + this.suppliedItem = castToReference(value); // Reference + else if (name.equals("supplier")) + this.supplier = castToReference(value); // Reference + else if (name.equals("whenPrepared")) + this.whenPrepared = castToPeriod(value); // Period + else if (name.equals("time")) + this.time = castToDateTime(value); // DateTimeType + else if (name.equals("destination")) + this.destination = castToReference(value); // Reference + else if (name.equals("receiver")) + this.getReceiver().add(castToReference(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type SupplyDelivery.status"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("quantity")) { + this.quantity = new SimpleQuantity(); + return this.quantity; + } + else if (name.equals("suppliedItem")) { + this.suppliedItem = new Reference(); + return this.suppliedItem; + } + else if (name.equals("supplier")) { + this.supplier = new Reference(); + return this.supplier; + } + else if (name.equals("whenPrepared")) { + this.whenPrepared = new Period(); + return this.whenPrepared; + } + else if (name.equals("time")) { + throw new FHIRException("Cannot call addChild on a primitive type SupplyDelivery.time"); + } + else if (name.equals("destination")) { + this.destination = new Reference(); + return this.destination; + } + else if (name.equals("receiver")) { + return addReceiver(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "SupplyDelivery"; + + } + + public SupplyDelivery copy() { + SupplyDelivery dst = new SupplyDelivery(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.status = status == null ? null : status.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.type = type == null ? null : type.copy(); + dst.quantity = quantity == null ? null : quantity.copy(); + dst.suppliedItem = suppliedItem == null ? null : suppliedItem.copy(); + dst.supplier = supplier == null ? null : supplier.copy(); + dst.whenPrepared = whenPrepared == null ? null : whenPrepared.copy(); + dst.time = time == null ? null : time.copy(); + dst.destination = destination == null ? null : destination.copy(); + if (receiver != null) { + dst.receiver = new ArrayList(); + for (Reference i : receiver) + dst.receiver.add(i.copy()); + }; + return dst; + } + + protected SupplyDelivery typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SupplyDelivery)) + return false; + SupplyDelivery o = (SupplyDelivery) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) + && compareDeep(type, o.type, true) && compareDeep(quantity, o.quantity, true) && compareDeep(suppliedItem, o.suppliedItem, true) + && compareDeep(supplier, o.supplier, true) && compareDeep(whenPrepared, o.whenPrepared, true) && compareDeep(time, o.time, true) + && compareDeep(destination, o.destination, true) && compareDeep(receiver, o.receiver, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SupplyDelivery)) + return false; + SupplyDelivery o = (SupplyDelivery) other; + return compareValues(status, o.status, true) && compareValues(time, o.time, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (patient == null || patient.isEmpty()) && (type == null || type.isEmpty()) && (quantity == null || quantity.isEmpty()) + && (suppliedItem == null || suppliedItem.isEmpty()) && (supplier == null || supplier.isEmpty()) + && (whenPrepared == null || whenPrepared.isEmpty()) && (time == null || time.isEmpty()) && (destination == null || destination.isEmpty()) + && (receiver == null || receiver.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.SupplyDelivery; + } + + @SearchParamDefinition(name="identifier", path="SupplyDelivery.identifier", description="External identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="receiver", path="SupplyDelivery.receiver", description="Who collected the Supply", type="reference" ) + public static final String SP_RECEIVER = "receiver"; + @SearchParamDefinition(name="patient", path="SupplyDelivery.patient", description="Patient for whom the item is supplied", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="supplier", path="SupplyDelivery.supplier", description="Dispenser", type="reference" ) + public static final String SP_SUPPLIER = "supplier"; + @SearchParamDefinition(name="status", path="SupplyDelivery.status", description="in-progress | completed | abandoned", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyRequest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyRequest.java new file mode 100644 index 00000000000..747748f96e0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/SupplyRequest.java @@ -0,0 +1,973 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ +@ResourceDef(name="SupplyRequest", profile="http://hl7.org/fhir/Profile/SupplyRequest") +public class SupplyRequest extends DomainResource { + + public enum SupplyRequestStatus { + /** + * Supply has been requested, but not dispensed. + */ + REQUESTED, + /** + * Supply has been received by the requestor. + */ + COMPLETED, + /** + * The supply will not be completed because the supplier was unable or unwilling to supply the item. + */ + FAILED, + /** + * The orderer of the supply cancelled the request. + */ + CANCELLED, + /** + * added to help the parsers + */ + NULL; + public static SupplyRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return REQUESTED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("failed".equals(codeString)) + return FAILED; + if ("cancelled".equals(codeString)) + return CANCELLED; + throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUESTED: return "requested"; + case COMPLETED: return "completed"; + case FAILED: return "failed"; + case CANCELLED: return "cancelled"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case REQUESTED: return "http://hl7.org/fhir/supplyrequest-status"; + case COMPLETED: return "http://hl7.org/fhir/supplyrequest-status"; + case FAILED: return "http://hl7.org/fhir/supplyrequest-status"; + case CANCELLED: return "http://hl7.org/fhir/supplyrequest-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case REQUESTED: return "Supply has been requested, but not dispensed."; + case COMPLETED: return "Supply has been received by the requestor."; + case FAILED: return "The supply will not be completed because the supplier was unable or unwilling to supply the item."; + case CANCELLED: return "The orderer of the supply cancelled the request."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUESTED: return "Requested"; + case COMPLETED: return "Received"; + case FAILED: return "Failed"; + case CANCELLED: return "Cancelled"; + default: return "?"; + } + } + } + + public static class SupplyRequestStatusEnumFactory implements EnumFactory { + public SupplyRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return SupplyRequestStatus.REQUESTED; + if ("completed".equals(codeString)) + return SupplyRequestStatus.COMPLETED; + if ("failed".equals(codeString)) + return SupplyRequestStatus.FAILED; + if ("cancelled".equals(codeString)) + return SupplyRequestStatus.CANCELLED; + throw new IllegalArgumentException("Unknown SupplyRequestStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return new Enumeration(this, SupplyRequestStatus.REQUESTED); + if ("completed".equals(codeString)) + return new Enumeration(this, SupplyRequestStatus.COMPLETED); + if ("failed".equals(codeString)) + return new Enumeration(this, SupplyRequestStatus.FAILED); + if ("cancelled".equals(codeString)) + return new Enumeration(this, SupplyRequestStatus.CANCELLED); + throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'"); + } + public String toCode(SupplyRequestStatus code) { + if (code == SupplyRequestStatus.REQUESTED) + return "requested"; + if (code == SupplyRequestStatus.COMPLETED) + return "completed"; + if (code == SupplyRequestStatus.FAILED) + return "failed"; + if (code == SupplyRequestStatus.CANCELLED) + return "cancelled"; + return "?"; + } + } + + @Block() + public static class SupplyRequestWhenComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code indicating when the request should be fulfilled. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Fulfilment code", formalDefinition="Code indicating when the request should be fulfilled." ) + protected CodeableConcept code; + + /** + * Formal fulfillment schedule. + */ + @Child(name = "schedule", type = {Timing.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal fulfillment schedule", formalDefinition="Formal fulfillment schedule." ) + protected Timing schedule; + + private static final long serialVersionUID = 307115287L; + + /* + * Constructor + */ + public SupplyRequestWhenComponent() { + super(); + } + + /** + * @return {@link #code} (Code indicating when the request should be fulfilled.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequestWhenComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Code indicating when the request should be fulfilled.) + */ + public SupplyRequestWhenComponent setCode(CodeableConcept value) { + this.code = value; + return this; + } + + /** + * @return {@link #schedule} (Formal fulfillment schedule.) + */ + public Timing getSchedule() { + if (this.schedule == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequestWhenComponent.schedule"); + else if (Configuration.doAutoCreate()) + this.schedule = new Timing(); // cc + return this.schedule; + } + + public boolean hasSchedule() { + return this.schedule != null && !this.schedule.isEmpty(); + } + + /** + * @param value {@link #schedule} (Formal fulfillment schedule.) + */ + public SupplyRequestWhenComponent setSchedule(Timing value) { + this.schedule = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "CodeableConcept", "Code indicating when the request should be fulfilled.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("schedule", "Timing", "Formal fulfillment schedule.", 0, java.lang.Integer.MAX_VALUE, schedule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("schedule")) + this.schedule = castToTiming(value); // Timing + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else if (name.equals("schedule")) { + this.schedule = new Timing(); + return this.schedule; + } + else + return super.addChild(name); + } + + public SupplyRequestWhenComponent copy() { + SupplyRequestWhenComponent dst = new SupplyRequestWhenComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.schedule = schedule == null ? null : schedule.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SupplyRequestWhenComponent)) + return false; + SupplyRequestWhenComponent o = (SupplyRequestWhenComponent) other; + return compareDeep(code, o.code, true) && compareDeep(schedule, o.schedule, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SupplyRequestWhenComponent)) + return false; + SupplyRequestWhenComponent o = (SupplyRequestWhenComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (schedule == null || schedule.isEmpty()) + ; + } + + public String fhirType() { + return "SupplyRequest.when"; + + } + + } + + /** + * A link to a resource representing the person whom the ordered item is for. + */ + @Child(name = "patient", type = {Patient.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the ordered item is for." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A link to a resource representing the person whom the ordered item is for.) + */ + protected Patient patientTarget; + + /** + * The Practitioner , Organization or Patient who initiated this order for the supply. + */ + @Child(name = "source", type = {Practitioner.class, Organization.class, Patient.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who initiated this order", formalDefinition="The Practitioner , Organization or Patient who initiated this order for the supply." ) + protected Reference source; + + /** + * The actual object that is the target of the reference (The Practitioner , Organization or Patient who initiated this order for the supply.) + */ + protected Resource sourceTarget; + + /** + * When the request was made. + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the request was made", formalDefinition="When the request was made." ) + protected DateTimeType date; + + /** + * Unique identifier for this supply request. + */ + @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="Unique identifier for this supply request." ) + protected Identifier identifier; + + /** + * Status of the supply request. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="requested | completed | failed | cancelled", formalDefinition="Status of the supply request." ) + protected Enumeration status; + + /** + * Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process. + */ + @Child(name = "kind", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The kind of supply (central, non-stock, etc.)", formalDefinition="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process." ) + protected CodeableConcept kind; + + /** + * The item that is requested to be supplied. + */ + @Child(name = "orderedItem", type = {Medication.class, Substance.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Medication, Substance, or Device requested to be supplied", formalDefinition="The item that is requested to be supplied." ) + protected Reference orderedItem; + + /** + * The actual object that is the target of the reference (The item that is requested to be supplied.) + */ + protected Resource orderedItemTarget; + + /** + * Who is intended to fulfill the request. + */ + @Child(name = "supplier", type = {Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who is intended to fulfill the request", formalDefinition="Who is intended to fulfill the request." ) + protected List supplier; + /** + * The actual objects that are the target of the reference (Who is intended to fulfill the request.) + */ + protected List supplierTarget; + + + /** + * Why the supply item was requested. + */ + @Child(name = "reason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why the supply item was requested", formalDefinition="Why the supply item was requested." ) + protected Type reason; + + /** + * When the request should be fulfilled. + */ + @Child(name = "when", type = {}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the request should be fulfilled", formalDefinition="When the request should be fulfilled." ) + protected SupplyRequestWhenComponent when; + + private static final long serialVersionUID = 1649766198L; + + /* + * Constructor + */ + public SupplyRequest() { + super(); + } + + /** + * @return {@link #patient} (A link to a resource representing the person whom the ordered item is for.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A link to a resource representing the person whom the ordered item is for.) + */ + public SupplyRequest setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person whom the ordered item is for.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person whom the ordered item is for.) + */ + public SupplyRequest setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #source} (The Practitioner , Organization or Patient who initiated this order for the supply.) + */ + public Reference getSource() { + if (this.source == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.source"); + else if (Configuration.doAutoCreate()) + this.source = new Reference(); // cc + return this.source; + } + + public boolean hasSource() { + return this.source != null && !this.source.isEmpty(); + } + + /** + * @param value {@link #source} (The Practitioner , Organization or Patient who initiated this order for the supply.) + */ + public SupplyRequest setSource(Reference value) { + this.source = value; + return this; + } + + /** + * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Practitioner , Organization or Patient who initiated this order for the supply.) + */ + public Resource getSourceTarget() { + return this.sourceTarget; + } + + /** + * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Practitioner , Organization or Patient who initiated this order for the supply.) + */ + public SupplyRequest setSourceTarget(Resource value) { + this.sourceTarget = value; + return this; + } + + /** + * @return {@link #date} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public SupplyRequest setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return When the request was made. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value When the request was made. + */ + public SupplyRequest setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Unique identifier for this supply request.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Unique identifier for this supply request.) + */ + public SupplyRequest setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new SupplyRequestStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public SupplyRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Status of the supply request. + */ + public SupplyRequestStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Status of the supply request. + */ + public SupplyRequest setStatus(SupplyRequestStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new SupplyRequestStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #kind} (Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.) + */ + public CodeableConcept getKind() { + if (this.kind == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.kind"); + else if (Configuration.doAutoCreate()) + this.kind = new CodeableConcept(); // cc + return this.kind; + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); + } + + /** + * @param value {@link #kind} (Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.) + */ + public SupplyRequest setKind(CodeableConcept value) { + this.kind = value; + return this; + } + + /** + * @return {@link #orderedItem} (The item that is requested to be supplied.) + */ + public Reference getOrderedItem() { + if (this.orderedItem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.orderedItem"); + else if (Configuration.doAutoCreate()) + this.orderedItem = new Reference(); // cc + return this.orderedItem; + } + + public boolean hasOrderedItem() { + return this.orderedItem != null && !this.orderedItem.isEmpty(); + } + + /** + * @param value {@link #orderedItem} (The item that is requested to be supplied.) + */ + public SupplyRequest setOrderedItem(Reference value) { + this.orderedItem = value; + return this; + } + + /** + * @return {@link #orderedItem} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The item that is requested to be supplied.) + */ + public Resource getOrderedItemTarget() { + return this.orderedItemTarget; + } + + /** + * @param value {@link #orderedItem} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The item that is requested to be supplied.) + */ + public SupplyRequest setOrderedItemTarget(Resource value) { + this.orderedItemTarget = value; + return this; + } + + /** + * @return {@link #supplier} (Who is intended to fulfill the request.) + */ + public List getSupplier() { + if (this.supplier == null) + this.supplier = new ArrayList(); + return this.supplier; + } + + public boolean hasSupplier() { + if (this.supplier == null) + return false; + for (Reference item : this.supplier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supplier} (Who is intended to fulfill the request.) + */ + // syntactic sugar + public Reference addSupplier() { //3 + Reference t = new Reference(); + if (this.supplier == null) + this.supplier = new ArrayList(); + this.supplier.add(t); + return t; + } + + // syntactic sugar + public SupplyRequest addSupplier(Reference t) { //3 + if (t == null) + return this; + if (this.supplier == null) + this.supplier = new ArrayList(); + this.supplier.add(t); + return this; + } + + /** + * @return {@link #supplier} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Who is intended to fulfill the request.) + */ + public List getSupplierTarget() { + if (this.supplierTarget == null) + this.supplierTarget = new ArrayList(); + return this.supplierTarget; + } + + // syntactic sugar + /** + * @return {@link #supplier} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Who is intended to fulfill the request.) + */ + public Organization addSupplierTarget() { + Organization r = new Organization(); + if (this.supplierTarget == null) + this.supplierTarget = new ArrayList(); + this.supplierTarget.add(r); + return r; + } + + /** + * @return {@link #reason} (Why the supply item was requested.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (Why the supply item was requested.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (Why the supply item was requested.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Why the supply item was requested.) + */ + public SupplyRequest setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #when} (When the request should be fulfilled.) + */ + public SupplyRequestWhenComponent getWhen() { + if (this.when == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SupplyRequest.when"); + else if (Configuration.doAutoCreate()) + this.when = new SupplyRequestWhenComponent(); // cc + return this.when; + } + + public boolean hasWhen() { + return this.when != null && !this.when.isEmpty(); + } + + /** + * @param value {@link #when} (When the request should be fulfilled.) + */ + public SupplyRequest setWhen(SupplyRequestWhenComponent value) { + this.when = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the ordered item is for.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("source", "Reference(Practitioner|Organization|Patient)", "The Practitioner , Organization or Patient who initiated this order for the supply.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("date", "dateTime", "When the request was made.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this supply request.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "Status of the supply request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("kind", "CodeableConcept", "Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("orderedItem", "Reference(Medication|Substance|Device)", "The item that is requested to be supplied.", 0, java.lang.Integer.MAX_VALUE, orderedItem)); + childrenList.add(new Property("supplier", "Reference(Organization)", "Who is intended to fulfill the request.", 0, java.lang.Integer.MAX_VALUE, supplier)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Any)", "Why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("when", "", "When the request should be fulfilled.", 0, java.lang.Integer.MAX_VALUE, when)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("source")) + this.source = castToReference(value); // Reference + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("status")) + this.status = new SupplyRequestStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("kind")) + this.kind = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("orderedItem")) + this.orderedItem = castToReference(value); // Reference + else if (name.equals("supplier")) + this.getSupplier().add(castToReference(value)); + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("when")) + this.when = (SupplyRequestWhenComponent) value; // SupplyRequestWhenComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("source")) { + this.source = new Reference(); + return this.source; + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type SupplyRequest.date"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type SupplyRequest.status"); + } + else if (name.equals("kind")) { + this.kind = new CodeableConcept(); + return this.kind; + } + else if (name.equals("orderedItem")) { + this.orderedItem = new Reference(); + return this.orderedItem; + } + else if (name.equals("supplier")) { + return addSupplier(); + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("when")) { + this.when = new SupplyRequestWhenComponent(); + return this.when; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "SupplyRequest"; + + } + + public SupplyRequest copy() { + SupplyRequest dst = new SupplyRequest(); + copyValues(dst); + dst.patient = patient == null ? null : patient.copy(); + dst.source = source == null ? null : source.copy(); + dst.date = date == null ? null : date.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.status = status == null ? null : status.copy(); + dst.kind = kind == null ? null : kind.copy(); + dst.orderedItem = orderedItem == null ? null : orderedItem.copy(); + if (supplier != null) { + dst.supplier = new ArrayList(); + for (Reference i : supplier) + dst.supplier.add(i.copy()); + }; + dst.reason = reason == null ? null : reason.copy(); + dst.when = when == null ? null : when.copy(); + return dst; + } + + protected SupplyRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SupplyRequest)) + return false; + SupplyRequest o = (SupplyRequest) other; + return compareDeep(patient, o.patient, true) && compareDeep(source, o.source, true) && compareDeep(date, o.date, true) + && compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) + && compareDeep(orderedItem, o.orderedItem, true) && compareDeep(supplier, o.supplier, true) && compareDeep(reason, o.reason, true) + && compareDeep(when, o.when, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SupplyRequest)) + return false; + SupplyRequest o = (SupplyRequest) other; + return compareValues(date, o.date, true) && compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (patient == null || patient.isEmpty()) && (source == null || source.isEmpty()) + && (date == null || date.isEmpty()) && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) + && (kind == null || kind.isEmpty()) && (orderedItem == null || orderedItem.isEmpty()) && (supplier == null || supplier.isEmpty()) + && (reason == null || reason.isEmpty()) && (when == null || when.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.SupplyRequest; + } + + @SearchParamDefinition(name="date", path="SupplyRequest.date", description="When the request was made", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="SupplyRequest.identifier", description="Unique identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="kind", path="SupplyRequest.kind", description="The kind of supply (central, non-stock, etc.)", type="token" ) + public static final String SP_KIND = "kind"; + @SearchParamDefinition(name="patient", path="SupplyRequest.patient", description="Patient for whom the item is supplied", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="supplier", path="SupplyRequest.supplier", description="Who is intended to fulfill the request", type="reference" ) + public static final String SP_SUPPLIER = "supplier"; + @SearchParamDefinition(name="source", path="SupplyRequest.source", description="Who initiated this order", type="reference" ) + public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="status", path="SupplyRequest.status", description="requested | completed | failed | cancelled", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TemporalPrecisionEnum.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TemporalPrecisionEnum.java new file mode 100644 index 00000000000..8c908da8a85 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TemporalPrecisionEnum.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.dstu21.model; + +import java.util.Calendar; +import java.util.Date; + +import org.apache.commons.lang3.time.DateUtils; + +public enum TemporalPrecisionEnum { + + YEAR(Calendar.YEAR) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addYears(theInput, theAmount); + } + }, + + MONTH(Calendar.MONTH) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addMonths(theInput, theAmount); + } + }, + DAY(Calendar.DATE) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addDays(theInput, theAmount); + } + }, + MINUTE(Calendar.MINUTE) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addMinutes(theInput, theAmount); + } + }, + SECOND(Calendar.SECOND) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addSeconds(theInput, theAmount); + } + }, + MILLI(Calendar.MILLISECOND) { + @Override + public Date add(Date theInput, int theAmount) { + return DateUtils.addMilliseconds(theInput, theAmount); + } + }, + + ; + + private int myCalendarConstant; + + TemporalPrecisionEnum(int theCalendarConstant) { + myCalendarConstant = theCalendarConstant; + } + + public abstract Date add(Date theInput, int theAmount); + + public int getCalendarConstant() { + return myCalendarConstant; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TestScript.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TestScript.java new file mode 100644 index 00000000000..5a8de3f3a77 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TestScript.java @@ -0,0 +1,7686 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ +@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") +public class TestScript extends DomainResource { + + public enum ProfileOriginType { + /** + * General DSTU2 client initiating against a DSTU2 Server. + */ + FHIRDSTU2CLIENT, + /** + * DSTU2 client that serves as an SDC-FormFiller. + */ + FHIRDSTU2SDCFORMFILLER, + /** + * added to help the parsers + */ + NULL; + public static ProfileOriginType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Client".equals(codeString)) + return FHIRDSTU2CLIENT; + if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) + return FHIRDSTU2SDCFORMFILLER; + throw new FHIRException("Unknown ProfileOriginType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FHIRDSTU2CLIENT: return "FHIR-DSTU2-Client"; + case FHIRDSTU2SDCFORMFILLER: return "FHIR-DSTU2-SDC-FormFiller"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case FHIRDSTU2CLIENT: return "http://hl7.org/fhir/profile-origin-types"; + case FHIRDSTU2SDCFORMFILLER: return "http://hl7.org/fhir/profile-origin-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case FHIRDSTU2CLIENT: return "General DSTU2 client initiating against a DSTU2 Server."; + case FHIRDSTU2SDCFORMFILLER: return "DSTU2 client that serves as an SDC-FormFiller."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FHIRDSTU2CLIENT: return "FHIR-DSTU2-Client"; + case FHIRDSTU2SDCFORMFILLER: return "FHIR-DSTU2-SDC-FormFiller"; + default: return "?"; + } + } + } + + public static class ProfileOriginTypeEnumFactory implements EnumFactory { + public ProfileOriginType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Client".equals(codeString)) + return ProfileOriginType.FHIRDSTU2CLIENT; + if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) + return ProfileOriginType.FHIRDSTU2SDCFORMFILLER; + throw new IllegalArgumentException("Unknown ProfileOriginType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Client".equals(codeString)) + return new Enumeration(this, ProfileOriginType.FHIRDSTU2CLIENT); + if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) + return new Enumeration(this, ProfileOriginType.FHIRDSTU2SDCFORMFILLER); + throw new FHIRException("Unknown ProfileOriginType code '"+codeString+"'"); + } + public String toCode(ProfileOriginType code) { + if (code == ProfileOriginType.FHIRDSTU2CLIENT) + return "FHIR-DSTU2-Client"; + if (code == ProfileOriginType.FHIRDSTU2SDCFORMFILLER) + return "FHIR-DSTU2-SDC-FormFiller"; + return "?"; + } + } + + public enum ProfileDestinationType { + /** + * General DSTU2 server. + */ + FHIRDSTU2SERVER, + /** + * DSTU2 server that serves as an SDC-FormManager. + */ + FHIRDSTU2SDCFORMMANAGER, + /** + * DSTU2 server that serves as an SDC-FormReceiver. + */ + FHIRDSTU2SDCFORMRECEIVER, + /** + * DSTU2 server that serves as an SDC-FormProcessor. + */ + FHIRDSTU2SDCFORMPROCESSOR, + /** + * added to help the parsers + */ + NULL; + public static ProfileDestinationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Server".equals(codeString)) + return FHIRDSTU2SERVER; + if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) + return FHIRDSTU2SDCFORMMANAGER; + if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) + return FHIRDSTU2SDCFORMRECEIVER; + if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) + return FHIRDSTU2SDCFORMPROCESSOR; + throw new FHIRException("Unknown ProfileDestinationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FHIRDSTU2SERVER: return "FHIR-DSTU2-Server"; + case FHIRDSTU2SDCFORMMANAGER: return "FHIR-DSTU2-SDC-FormManager"; + case FHIRDSTU2SDCFORMRECEIVER: return "FHIR-DSTU2-SDC-FormReceiver"; + case FHIRDSTU2SDCFORMPROCESSOR: return "FHIR-DSTU2-SDC-FormProcessor"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case FHIRDSTU2SERVER: return "http://hl7.org/fhir/profile-destination-types"; + case FHIRDSTU2SDCFORMMANAGER: return "http://hl7.org/fhir/profile-destination-types"; + case FHIRDSTU2SDCFORMRECEIVER: return "http://hl7.org/fhir/profile-destination-types"; + case FHIRDSTU2SDCFORMPROCESSOR: return "http://hl7.org/fhir/profile-destination-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case FHIRDSTU2SERVER: return "General DSTU2 server."; + case FHIRDSTU2SDCFORMMANAGER: return "DSTU2 server that serves as an SDC-FormManager."; + case FHIRDSTU2SDCFORMRECEIVER: return "DSTU2 server that serves as an SDC-FormReceiver."; + case FHIRDSTU2SDCFORMPROCESSOR: return "DSTU2 server that serves as an SDC-FormProcessor."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FHIRDSTU2SERVER: return "FHIR-DSTU2-Server"; + case FHIRDSTU2SDCFORMMANAGER: return "FHIR-DSTU2-SDC-FormManager"; + case FHIRDSTU2SDCFORMRECEIVER: return "FHIR-DSTU2-SDC-FormReceiver"; + case FHIRDSTU2SDCFORMPROCESSOR: return "FHIR-DSTU2-SDC-FormProcessor"; + default: return "?"; + } + } + } + + public static class ProfileDestinationTypeEnumFactory implements EnumFactory { + public ProfileDestinationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Server".equals(codeString)) + return ProfileDestinationType.FHIRDSTU2SERVER; + if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) + return ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER; + if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) + return ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER; + if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) + return ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR; + throw new IllegalArgumentException("Unknown ProfileDestinationType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-DSTU2-Server".equals(codeString)) + return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SERVER); + if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) + return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER); + if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) + return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER); + if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) + return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR); + throw new FHIRException("Unknown ProfileDestinationType code '"+codeString+"'"); + } + public String toCode(ProfileDestinationType code) { + if (code == ProfileDestinationType.FHIRDSTU2SERVER) + return "FHIR-DSTU2-Server"; + if (code == ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER) + return "FHIR-DSTU2-SDC-FormManager"; + if (code == ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER) + return "FHIR-DSTU2-SDC-FormReceiver"; + if (code == ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR) + return "FHIR-DSTU2-SDC-FormProcessor"; + return "?"; + } + } + + public enum ContentType { + /** + * XML content-type corresponding to the application/xml+fhir mime-type. + */ + XML, + /** + * JSON content-type corresponding to the application/json+fhir mime-type. + */ + JSON, + /** + * added to help the parsers + */ + NULL; + public static ContentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xml".equals(codeString)) + return XML; + if ("json".equals(codeString)) + return JSON; + throw new FHIRException("Unknown ContentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XML: return "xml"; + case JSON: return "json"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case XML: return "http://hl7.org/fhir/content-type"; + case JSON: return "http://hl7.org/fhir/content-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case XML: return "XML content-type corresponding to the application/xml+fhir mime-type."; + case JSON: return "JSON content-type corresponding to the application/json+fhir mime-type."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XML: return "xml"; + case JSON: return "json"; + default: return "?"; + } + } + } + + public static class ContentTypeEnumFactory implements EnumFactory { + public ContentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("xml".equals(codeString)) + return ContentType.XML; + if ("json".equals(codeString)) + return ContentType.JSON; + throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("xml".equals(codeString)) + return new Enumeration(this, ContentType.XML); + if ("json".equals(codeString)) + return new Enumeration(this, ContentType.JSON); + throw new FHIRException("Unknown ContentType code '"+codeString+"'"); + } + public String toCode(ContentType code) { + if (code == ContentType.XML) + return "xml"; + if (code == ContentType.JSON) + return "json"; + return "?"; + } + } + + public enum AssertionDirectionType { + /** + * The assertion is evaluated on the response. This is the default value. + */ + RESPONSE, + /** + * The assertion is evaluated on the request. + */ + REQUEST, + /** + * added to help the parsers + */ + NULL; + public static AssertionDirectionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("response".equals(codeString)) + return RESPONSE; + if ("request".equals(codeString)) + return REQUEST; + throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESPONSE: return "response"; + case REQUEST: return "request"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; + case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; + case REQUEST: return "The assertion is evaluated on the request."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESPONSE: return "response"; + case REQUEST: return "request"; + default: return "?"; + } + } + } + + public static class AssertionDirectionTypeEnumFactory implements EnumFactory { + public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("response".equals(codeString)) + return AssertionDirectionType.RESPONSE; + if ("request".equals(codeString)) + return AssertionDirectionType.REQUEST; + throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("response".equals(codeString)) + return new Enumeration(this, AssertionDirectionType.RESPONSE); + if ("request".equals(codeString)) + return new Enumeration(this, AssertionDirectionType.REQUEST); + throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); + } + public String toCode(AssertionDirectionType code) { + if (code == AssertionDirectionType.RESPONSE) + return "response"; + if (code == AssertionDirectionType.REQUEST) + return "request"; + return "?"; + } + } + + public enum AssertionOperatorType { + /** + * Default value. Equals comparison. + */ + EQUALS, + /** + * Not equals comparison. + */ + NOTEQUALS, + /** + * Compare value within a known set of values. + */ + IN, + /** + * Compare value not within a known set of values. + */ + NOTIN, + /** + * Compare value to be greater than a known value. + */ + GREATERTHAN, + /** + * Compare value to be less than a known value. + */ + LESSTHAN, + /** + * Compare value is empty. + */ + EMPTY, + /** + * Compare value is not empty. + */ + NOTEMPTY, + /** + * Compare value string contains a known value. + */ + CONTAINS, + /** + * Compare value string does not contain a known value. + */ + NOTCONTAINS, + /** + * added to help the parsers + */ + NULL; + public static AssertionOperatorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("equals".equals(codeString)) + return EQUALS; + if ("notEquals".equals(codeString)) + return NOTEQUALS; + if ("in".equals(codeString)) + return IN; + if ("notIn".equals(codeString)) + return NOTIN; + if ("greaterThan".equals(codeString)) + return GREATERTHAN; + if ("lessThan".equals(codeString)) + return LESSTHAN; + if ("empty".equals(codeString)) + return EMPTY; + if ("notEmpty".equals(codeString)) + return NOTEMPTY; + if ("contains".equals(codeString)) + return CONTAINS; + if ("notContains".equals(codeString)) + return NOTCONTAINS; + throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQUALS: return "equals"; + case NOTEQUALS: return "notEquals"; + case IN: return "in"; + case NOTIN: return "notIn"; + case GREATERTHAN: return "greaterThan"; + case LESSTHAN: return "lessThan"; + case EMPTY: return "empty"; + case NOTEMPTY: return "notEmpty"; + case CONTAINS: return "contains"; + case NOTCONTAINS: return "notContains"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; + case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; + case IN: return "http://hl7.org/fhir/assert-operator-codes"; + case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; + case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; + case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; + case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; + case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; + case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; + case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case EQUALS: return "Default value. Equals comparison."; + case NOTEQUALS: return "Not equals comparison."; + case IN: return "Compare value within a known set of values."; + case NOTIN: return "Compare value not within a known set of values."; + case GREATERTHAN: return "Compare value to be greater than a known value."; + case LESSTHAN: return "Compare value to be less than a known value."; + case EMPTY: return "Compare value is empty."; + case NOTEMPTY: return "Compare value is not empty."; + case CONTAINS: return "Compare value string contains a known value."; + case NOTCONTAINS: return "Compare value string does not contain a known value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQUALS: return "equals"; + case NOTEQUALS: return "notEquals"; + case IN: return "in"; + case NOTIN: return "notIn"; + case GREATERTHAN: return "greaterThan"; + case LESSTHAN: return "lessThan"; + case EMPTY: return "empty"; + case NOTEMPTY: return "notEmpty"; + case CONTAINS: return "contains"; + case NOTCONTAINS: return "notContains"; + default: return "?"; + } + } + } + + public static class AssertionOperatorTypeEnumFactory implements EnumFactory { + public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("equals".equals(codeString)) + return AssertionOperatorType.EQUALS; + if ("notEquals".equals(codeString)) + return AssertionOperatorType.NOTEQUALS; + if ("in".equals(codeString)) + return AssertionOperatorType.IN; + if ("notIn".equals(codeString)) + return AssertionOperatorType.NOTIN; + if ("greaterThan".equals(codeString)) + return AssertionOperatorType.GREATERTHAN; + if ("lessThan".equals(codeString)) + return AssertionOperatorType.LESSTHAN; + if ("empty".equals(codeString)) + return AssertionOperatorType.EMPTY; + if ("notEmpty".equals(codeString)) + return AssertionOperatorType.NOTEMPTY; + if ("contains".equals(codeString)) + return AssertionOperatorType.CONTAINS; + if ("notContains".equals(codeString)) + return AssertionOperatorType.NOTCONTAINS; + throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("equals".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.EQUALS); + if ("notEquals".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.NOTEQUALS); + if ("in".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.IN); + if ("notIn".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.NOTIN); + if ("greaterThan".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.GREATERTHAN); + if ("lessThan".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.LESSTHAN); + if ("empty".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.EMPTY); + if ("notEmpty".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.NOTEMPTY); + if ("contains".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.CONTAINS); + if ("notContains".equals(codeString)) + return new Enumeration(this, AssertionOperatorType.NOTCONTAINS); + throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); + } + public String toCode(AssertionOperatorType code) { + if (code == AssertionOperatorType.EQUALS) + return "equals"; + if (code == AssertionOperatorType.NOTEQUALS) + return "notEquals"; + if (code == AssertionOperatorType.IN) + return "in"; + if (code == AssertionOperatorType.NOTIN) + return "notIn"; + if (code == AssertionOperatorType.GREATERTHAN) + return "greaterThan"; + if (code == AssertionOperatorType.LESSTHAN) + return "lessThan"; + if (code == AssertionOperatorType.EMPTY) + return "empty"; + if (code == AssertionOperatorType.NOTEMPTY) + return "notEmpty"; + if (code == AssertionOperatorType.CONTAINS) + return "contains"; + if (code == AssertionOperatorType.NOTCONTAINS) + return "notContains"; + return "?"; + } + } + + public enum AssertionResponseTypes { + /** + * Response code is 200. + */ + OKAY, + /** + * Response code is 201. + */ + CREATED, + /** + * Response code is 204. + */ + NOCONTENT, + /** + * Response code is 304. + */ + NOTMODIFIED, + /** + * Response code is 400. + */ + BAD, + /** + * Response code is 403. + */ + FORBIDDEN, + /** + * Response code is 404. + */ + NOTFOUND, + /** + * Response code is 405. + */ + METHODNOTALLOWED, + /** + * Response code is 409. + */ + CONFLICT, + /** + * Response code is 410. + */ + GONE, + /** + * Response code is 412. + */ + PRECONDITIONFAILED, + /** + * Response code is 422. + */ + UNPROCESSABLE, + /** + * added to help the parsers + */ + NULL; + public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("okay".equals(codeString)) + return OKAY; + if ("created".equals(codeString)) + return CREATED; + if ("noContent".equals(codeString)) + return NOCONTENT; + if ("notModified".equals(codeString)) + return NOTMODIFIED; + if ("bad".equals(codeString)) + return BAD; + if ("forbidden".equals(codeString)) + return FORBIDDEN; + if ("notFound".equals(codeString)) + return NOTFOUND; + if ("methodNotAllowed".equals(codeString)) + return METHODNOTALLOWED; + if ("conflict".equals(codeString)) + return CONFLICT; + if ("gone".equals(codeString)) + return GONE; + if ("preconditionFailed".equals(codeString)) + return PRECONDITIONFAILED; + if ("unprocessable".equals(codeString)) + return UNPROCESSABLE; + throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OKAY: return "okay"; + case CREATED: return "created"; + case NOCONTENT: return "noContent"; + case NOTMODIFIED: return "notModified"; + case BAD: return "bad"; + case FORBIDDEN: return "forbidden"; + case NOTFOUND: return "notFound"; + case METHODNOTALLOWED: return "methodNotAllowed"; + case CONFLICT: return "conflict"; + case GONE: return "gone"; + case PRECONDITIONFAILED: return "preconditionFailed"; + case UNPROCESSABLE: return "unprocessable"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; + case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; + case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; + case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; + case BAD: return "http://hl7.org/fhir/assert-response-code-types"; + case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; + case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; + case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; + case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; + case GONE: return "http://hl7.org/fhir/assert-response-code-types"; + case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; + case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case OKAY: return "Response code is 200."; + case CREATED: return "Response code is 201."; + case NOCONTENT: return "Response code is 204."; + case NOTMODIFIED: return "Response code is 304."; + case BAD: return "Response code is 400."; + case FORBIDDEN: return "Response code is 403."; + case NOTFOUND: return "Response code is 404."; + case METHODNOTALLOWED: return "Response code is 405."; + case CONFLICT: return "Response code is 409."; + case GONE: return "Response code is 410."; + case PRECONDITIONFAILED: return "Response code is 412."; + case UNPROCESSABLE: return "Response code is 422."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OKAY: return "okay"; + case CREATED: return "created"; + case NOCONTENT: return "noContent"; + case NOTMODIFIED: return "notModified"; + case BAD: return "bad"; + case FORBIDDEN: return "forbidden"; + case NOTFOUND: return "notFound"; + case METHODNOTALLOWED: return "methodNotAllowed"; + case CONFLICT: return "conflict"; + case GONE: return "gone"; + case PRECONDITIONFAILED: return "preconditionFailed"; + case UNPROCESSABLE: return "unprocessable"; + default: return "?"; + } + } + } + + public static class AssertionResponseTypesEnumFactory implements EnumFactory { + public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("okay".equals(codeString)) + return AssertionResponseTypes.OKAY; + if ("created".equals(codeString)) + return AssertionResponseTypes.CREATED; + if ("noContent".equals(codeString)) + return AssertionResponseTypes.NOCONTENT; + if ("notModified".equals(codeString)) + return AssertionResponseTypes.NOTMODIFIED; + if ("bad".equals(codeString)) + return AssertionResponseTypes.BAD; + if ("forbidden".equals(codeString)) + return AssertionResponseTypes.FORBIDDEN; + if ("notFound".equals(codeString)) + return AssertionResponseTypes.NOTFOUND; + if ("methodNotAllowed".equals(codeString)) + return AssertionResponseTypes.METHODNOTALLOWED; + if ("conflict".equals(codeString)) + return AssertionResponseTypes.CONFLICT; + if ("gone".equals(codeString)) + return AssertionResponseTypes.GONE; + if ("preconditionFailed".equals(codeString)) + return AssertionResponseTypes.PRECONDITIONFAILED; + if ("unprocessable".equals(codeString)) + return AssertionResponseTypes.UNPROCESSABLE; + throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("okay".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.OKAY); + if ("created".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.CREATED); + if ("noContent".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.NOCONTENT); + if ("notModified".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.NOTMODIFIED); + if ("bad".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.BAD); + if ("forbidden".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.FORBIDDEN); + if ("notFound".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.NOTFOUND); + if ("methodNotAllowed".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.METHODNOTALLOWED); + if ("conflict".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.CONFLICT); + if ("gone".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.GONE); + if ("preconditionFailed".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.PRECONDITIONFAILED); + if ("unprocessable".equals(codeString)) + return new Enumeration(this, AssertionResponseTypes.UNPROCESSABLE); + throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); + } + public String toCode(AssertionResponseTypes code) { + if (code == AssertionResponseTypes.OKAY) + return "okay"; + if (code == AssertionResponseTypes.CREATED) + return "created"; + if (code == AssertionResponseTypes.NOCONTENT) + return "noContent"; + if (code == AssertionResponseTypes.NOTMODIFIED) + return "notModified"; + if (code == AssertionResponseTypes.BAD) + return "bad"; + if (code == AssertionResponseTypes.FORBIDDEN) + return "forbidden"; + if (code == AssertionResponseTypes.NOTFOUND) + return "notFound"; + if (code == AssertionResponseTypes.METHODNOTALLOWED) + return "methodNotAllowed"; + if (code == AssertionResponseTypes.CONFLICT) + return "conflict"; + if (code == AssertionResponseTypes.GONE) + return "gone"; + if (code == AssertionResponseTypes.PRECONDITIONFAILED) + return "preconditionFailed"; + if (code == AssertionResponseTypes.UNPROCESSABLE) + return "unprocessable"; + return "?"; + } + } + + @Block() + public static class TestScriptContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the Test Script. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the Test Script." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public TestScriptContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the Test Script.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the Test Script.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScriptContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the Test Script. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the Test Script. + */ + public TestScriptContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public TestScriptContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the Test Script.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public TestScriptContactComponent copy() { + TestScriptContactComponent dst = new TestScriptContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptContactComponent)) + return false; + TestScriptContactComponent o = (TestScriptContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptContactComponent)) + return false; + TestScriptContactComponent o = (TestScriptContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.contact"; + + } + + } + + @Block() + public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A link to the FHIR specification that this test is covering. + */ + @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) + protected List link; + + /** + * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. + */ + @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Capabilities that are assumed to function correctly on the FHIR server being tested", formalDefinition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." ) + protected List capability; + + private static final long serialVersionUID = 745183328L; + + /* + * Constructor + */ + public TestScriptMetadataComponent() { + super(); + } + + /** + * @return {@link #link} (A link to the FHIR specification that this test is covering.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (TestScriptMetadataLinkComponent item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (A link to the FHIR specification that this test is covering.) + */ + // syntactic sugar + public TestScriptMetadataLinkComponent addLink() { //3 + TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + // syntactic sugar + public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 + if (t == null) + return this; + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + /** + * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public List getCapability() { + if (this.capability == null) + this.capability = new ArrayList(); + return this.capability; + } + + public boolean hasCapability() { + if (this.capability == null) + return false; + for (TestScriptMetadataCapabilityComponent item : this.capability) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + // syntactic sugar + public TestScriptMetadataCapabilityComponent addCapability() { //3 + TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); + if (this.capability == null) + this.capability = new ArrayList(); + this.capability.add(t); + return t; + } + + // syntactic sugar + public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 + if (t == null) + return this; + if (this.capability == null) + this.capability = new ArrayList(); + this.capability.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); + childrenList.add(new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("link")) + this.getLink().add((TestScriptMetadataLinkComponent) value); + else if (name.equals("capability")) + this.getCapability().add((TestScriptMetadataCapabilityComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("link")) { + return addLink(); + } + else if (name.equals("capability")) { + return addCapability(); + } + else + return super.addChild(name); + } + + public TestScriptMetadataComponent copy() { + TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); + copyValues(dst); + if (link != null) { + dst.link = new ArrayList(); + for (TestScriptMetadataLinkComponent i : link) + dst.link.add(i.copy()); + }; + if (capability != null) { + dst.capability = new ArrayList(); + for (TestScriptMetadataCapabilityComponent i : capability) + dst.capability.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptMetadataComponent)) + return false; + TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; + return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptMetadataComponent)) + return false; + TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (link == null || link.isEmpty()) && (capability == null || capability.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.metadata"; + + } + + } + + @Block() + public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { + /** + * URL to a particular requirement or feature within the FHIR specification. + */ + @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) + protected UriType url; + + /** + * Short description of the link. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) + protected StringType description; + + private static final long serialVersionUID = 213372298L; + + /* + * Constructor + */ + public TestScriptMetadataLinkComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptMetadataLinkComponent(UriType url) { + super(); + this.url = url; + } + + /** + * @return {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public TestScriptMetadataLinkComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return URL to a particular requirement or feature within the FHIR specification. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value URL to a particular requirement or feature within the FHIR specification. + */ + public TestScriptMetadataLinkComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Short description of the link. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Short description of the link. + */ + public TestScriptMetadataLinkComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("description", "string", "Short description of the link.", 0, java.lang.Integer.MAX_VALUE, description)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else + return super.addChild(name); + } + + public TestScriptMetadataLinkComponent copy() { + TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.description = description == null ? null : description.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptMetadataLinkComponent)) + return false; + TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; + return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptMetadataLinkComponent)) + return false; + TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; + return compareValues(url, o.url, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (description == null || description.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.metadata.link"; + + } + + } + + @Block() + public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. + */ + @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Are the capabilities required?", formalDefinition="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute." ) + protected BooleanType required; + + /** + * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. + */ + @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Are the capabilities validated?", formalDefinition="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute." ) + protected BooleanType validated; + + /** + * Description of the capabilities that this test script is requiring the server to support. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) + protected StringType description; + + /** + * Which origin server these requirements apply to. + */ + @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) + protected List origin; + + /** + * Which server these requirements apply to. + */ + @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) + protected IntegerType destination; + + /** + * Links to the FHIR specification that describes this interaction and the resources involved in more detail. + */ + @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) + protected List link; + + /** + * Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped. + */ + @Child(name = "conformance", type = {Conformance.class}, order=7, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Required Conformance", formalDefinition="Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped." ) + protected Reference conformance; + + /** + * The actual object that is the target of the reference (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) + */ + protected Conformance conformanceTarget; + + private static final long serialVersionUID = 500671983L; + + /* + * Constructor + */ + public TestScriptMetadataCapabilityComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptMetadataCapabilityComponent(Reference conformance) { + super(); + this.conformance = conformance; + } + + /** + * @return {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public BooleanType getRequiredElement() { + if (this.required == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); + else if (Configuration.doAutoCreate()) + this.required = new BooleanType(); // bb + return this.required; + } + + public boolean hasRequiredElement() { + return this.required != null && !this.required.isEmpty(); + } + + public boolean hasRequired() { + return this.required != null && !this.required.isEmpty(); + } + + /** + * @param value {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { + this.required = value; + return this; + } + + /** + * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. + */ + public boolean getRequired() { + return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); + } + + /** + * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. + */ + public TestScriptMetadataCapabilityComponent setRequired(boolean value) { + if (this.required == null) + this.required = new BooleanType(); + this.required.setValue(value); + return this; + } + + /** + * @return {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value + */ + public BooleanType getValidatedElement() { + if (this.validated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); + else if (Configuration.doAutoCreate()) + this.validated = new BooleanType(); // bb + return this.validated; + } + + public boolean hasValidatedElement() { + return this.validated != null && !this.validated.isEmpty(); + } + + public boolean hasValidated() { + return this.validated != null && !this.validated.isEmpty(); + } + + /** + * @param value {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value + */ + public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { + this.validated = value; + return this; + } + + /** + * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. + */ + public boolean getValidated() { + return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); + } + + /** + * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. + */ + public TestScriptMetadataCapabilityComponent setValidated(boolean value) { + if (this.validated == null) + this.validated = new BooleanType(); + this.validated.setValue(value); + return this; + } + + /** + * @return {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Description of the capabilities that this test script is requiring the server to support. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Description of the capabilities that this test script is requiring the server to support. + */ + public TestScriptMetadataCapabilityComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #origin} (Which origin server these requirements apply to.) + */ + public List getOrigin() { + if (this.origin == null) + this.origin = new ArrayList(); + return this.origin; + } + + public boolean hasOrigin() { + if (this.origin == null) + return false; + for (IntegerType item : this.origin) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #origin} (Which origin server these requirements apply to.) + */ + // syntactic sugar + public IntegerType addOriginElement() {//2 + IntegerType t = new IntegerType(); + if (this.origin == null) + this.origin = new ArrayList(); + this.origin.add(t); + return t; + } + + /** + * @param value {@link #origin} (Which origin server these requirements apply to.) + */ + public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 + IntegerType t = new IntegerType(); + t.setValue(value); + if (this.origin == null) + this.origin = new ArrayList(); + this.origin.add(t); + return this; + } + + /** + * @param value {@link #origin} (Which origin server these requirements apply to.) + */ + public boolean hasOrigin(int value) { + if (this.origin == null) + return false; + for (IntegerType v : this.origin) + if (v.equals(value)) // integer + return true; + return false; + } + + /** + * @return {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value + */ + public IntegerType getDestinationElement() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new IntegerType(); // bb + return this.destination; + } + + public boolean hasDestinationElement() { + return this.destination != null && !this.destination.isEmpty(); + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value + */ + public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { + this.destination = value; + return this; + } + + /** + * @return Which server these requirements apply to. + */ + public int getDestination() { + return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); + } + + /** + * @param value Which server these requirements apply to. + */ + public TestScriptMetadataCapabilityComponent setDestination(int value) { + if (this.destination == null) + this.destination = new IntegerType(); + this.destination.setValue(value); + return this; + } + + /** + * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) + */ + public List getLink() { + if (this.link == null) + this.link = new ArrayList(); + return this.link; + } + + public boolean hasLink() { + if (this.link == null) + return false; + for (UriType item : this.link) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) + */ + // syntactic sugar + public UriType addLinkElement() {//2 + UriType t = new UriType(); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return t; + } + + /** + * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) + */ + public TestScriptMetadataCapabilityComponent addLink(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.link == null) + this.link = new ArrayList(); + this.link.add(t); + return this; + } + + /** + * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) + */ + public boolean hasLink(String value) { + if (this.link == null) + return false; + for (UriType v : this.link) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #conformance} (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) + */ + public Reference getConformance() { + if (this.conformance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); + else if (Configuration.doAutoCreate()) + this.conformance = new Reference(); // cc + return this.conformance; + } + + public boolean hasConformance() { + return this.conformance != null && !this.conformance.isEmpty(); + } + + /** + * @param value {@link #conformance} (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) + */ + public TestScriptMetadataCapabilityComponent setConformance(Reference value) { + this.conformance = value; + return this; + } + + /** + * @return {@link #conformance} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) + */ + public Conformance getConformanceTarget() { + if (this.conformanceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); + else if (Configuration.doAutoCreate()) + this.conformanceTarget = new Conformance(); // aa + return this.conformanceTarget; + } + + /** + * @param value {@link #conformance} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) + */ + public TestScriptMetadataCapabilityComponent setConformanceTarget(Conformance value) { + this.conformanceTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, validated)); + childrenList.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); + childrenList.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link)); + childrenList.add(new Property("conformance", "Reference(Conformance)", "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.", 0, java.lang.Integer.MAX_VALUE, conformance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("required")) + this.required = castToBoolean(value); // BooleanType + else if (name.equals("validated")) + this.validated = castToBoolean(value); // BooleanType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("origin")) + this.getOrigin().add(castToInteger(value)); + else if (name.equals("destination")) + this.destination = castToInteger(value); // IntegerType + else if (name.equals("link")) + this.getLink().add(castToUri(value)); + else if (name.equals("conformance")) + this.conformance = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("required")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); + } + else if (name.equals("validated")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else if (name.equals("origin")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); + } + else if (name.equals("destination")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); + } + else if (name.equals("link")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); + } + else if (name.equals("conformance")) { + this.conformance = new Reference(); + return this.conformance; + } + else + return super.addChild(name); + } + + public TestScriptMetadataCapabilityComponent copy() { + TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); + copyValues(dst); + dst.required = required == null ? null : required.copy(); + dst.validated = validated == null ? null : validated.copy(); + dst.description = description == null ? null : description.copy(); + if (origin != null) { + dst.origin = new ArrayList(); + for (IntegerType i : origin) + dst.origin.add(i.copy()); + }; + dst.destination = destination == null ? null : destination.copy(); + if (link != null) { + dst.link = new ArrayList(); + for (UriType i : link) + dst.link.add(i.copy()); + }; + dst.conformance = conformance == null ? null : conformance.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptMetadataCapabilityComponent)) + return false; + TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; + return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) + && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) + && compareDeep(conformance, o.conformance, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptMetadataCapabilityComponent)) + return false; + TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; + return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) + && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (required == null || required.isEmpty()) && (validated == null || validated.isEmpty()) + && (description == null || description.isEmpty()) && (origin == null || origin.isEmpty()) + && (destination == null || destination.isEmpty()) && (link == null || link.isEmpty()) && (conformance == null || conformance.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.metadata.capability"; + + } + + } + + @Block() + public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The index of the abstract origin server starting at 1", formalDefinition="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1." ) + protected IntegerType index; + + /** + * The type of profile the server supports. + */ + @Child(name = "profile", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="FHIR-DSTU2-Client | FHIR-DSTU2-SDC-FormFiller", formalDefinition="The type of profile the server supports." ) + protected Enumeration profile; + + private static final long serialVersionUID = -1472818765L; + + /* + * Constructor + */ + public TestScriptOriginComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptOriginComponent(IntegerType index, Enumeration profile) { + super(); + this.index = index; + this.profile = profile; + } + + /** + * @return {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public IntegerType getIndexElement() { + if (this.index == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); + else if (Configuration.doAutoCreate()) + this.index = new IntegerType(); // bb + return this.index; + } + + public boolean hasIndexElement() { + return this.index != null && !this.index.isEmpty(); + } + + public boolean hasIndex() { + return this.index != null && !this.index.isEmpty(); + } + + /** + * @param value {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public TestScriptOriginComponent setIndexElement(IntegerType value) { + this.index = value; + return this; + } + + /** + * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + public int getIndex() { + return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); + } + + /** + * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + public TestScriptOriginComponent setIndex(int value) { + if (this.index == null) + this.index = new IntegerType(); + this.index.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value + */ + public Enumeration getProfileElement() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Enumeration(new ProfileOriginTypeEnumFactory()); // bb + return this.profile; + } + + public boolean hasProfileElement() { + return this.profile != null && !this.profile.isEmpty(); + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value + */ + public TestScriptOriginComponent setProfileElement(Enumeration value) { + this.profile = value; + return this; + } + + /** + * @return The type of profile the server supports. + */ + public ProfileOriginType getProfile() { + return this.profile == null ? null : this.profile.getValue(); + } + + /** + * @param value The type of profile the server supports. + */ + public TestScriptOriginComponent setProfile(ProfileOriginType value) { + if (this.profile == null) + this.profile = new Enumeration(new ProfileOriginTypeEnumFactory()); + this.profile.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("index", "integer", "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); + childrenList.add(new Property("profile", "code", "The type of profile the server supports.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("index")) + this.index = castToInteger(value); // IntegerType + else if (name.equals("profile")) + this.profile = new ProfileOriginTypeEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("index")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); + } + else if (name.equals("profile")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.profile"); + } + else + return super.addChild(name); + } + + public TestScriptOriginComponent copy() { + TestScriptOriginComponent dst = new TestScriptOriginComponent(); + copyValues(dst); + dst.index = index == null ? null : index.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptOriginComponent)) + return false; + TestScriptOriginComponent o = (TestScriptOriginComponent) other; + return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptOriginComponent)) + return false; + TestScriptOriginComponent o = (TestScriptOriginComponent) other; + return compareValues(index, o.index, true) && compareValues(profile, o.profile, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.origin"; + + } + + } + + @Block() + public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The index of the abstract destination server starting at 1", formalDefinition="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1." ) + protected IntegerType index; + + /** + * The type of profile the server supports. + */ + @Child(name = "profile", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="FHIR-DSTU2-Server | FHIR-DSTU2-SDC-FormManager | FHIR-DSTU2-SDC-FormReceiver | FHIR-DSTU2-SDC-FormProcessor", formalDefinition="The type of profile the server supports." ) + protected Enumeration profile; + + private static final long serialVersionUID = 399132503L; + + /* + * Constructor + */ + public TestScriptDestinationComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptDestinationComponent(IntegerType index, Enumeration profile) { + super(); + this.index = index; + this.profile = profile; + } + + /** + * @return {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public IntegerType getIndexElement() { + if (this.index == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); + else if (Configuration.doAutoCreate()) + this.index = new IntegerType(); // bb + return this.index; + } + + public boolean hasIndexElement() { + return this.index != null && !this.index.isEmpty(); + } + + public boolean hasIndex() { + return this.index != null && !this.index.isEmpty(); + } + + /** + * @param value {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public TestScriptDestinationComponent setIndexElement(IntegerType value) { + this.index = value; + return this; + } + + /** + * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + public int getIndex() { + return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); + } + + /** + * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + public TestScriptDestinationComponent setIndex(int value) { + if (this.index == null) + this.index = new IntegerType(); + this.index.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value + */ + public Enumeration getProfileElement() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Enumeration(new ProfileDestinationTypeEnumFactory()); // bb + return this.profile; + } + + public boolean hasProfileElement() { + return this.profile != null && !this.profile.isEmpty(); + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value + */ + public TestScriptDestinationComponent setProfileElement(Enumeration value) { + this.profile = value; + return this; + } + + /** + * @return The type of profile the server supports. + */ + public ProfileDestinationType getProfile() { + return this.profile == null ? null : this.profile.getValue(); + } + + /** + * @param value The type of profile the server supports. + */ + public TestScriptDestinationComponent setProfile(ProfileDestinationType value) { + if (this.profile == null) + this.profile = new Enumeration(new ProfileDestinationTypeEnumFactory()); + this.profile.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("index", "integer", "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); + childrenList.add(new Property("profile", "code", "The type of profile the server supports.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("index")) + this.index = castToInteger(value); // IntegerType + else if (name.equals("profile")) + this.profile = new ProfileDestinationTypeEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("index")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); + } + else if (name.equals("profile")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.profile"); + } + else + return super.addChild(name); + } + + public TestScriptDestinationComponent copy() { + TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); + copyValues(dst); + dst.index = index == null ? null : index.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptDestinationComponent)) + return false; + TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; + return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptDestinationComponent)) + return false; + TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; + return compareValues(index, o.index, true) && compareValues(profile, o.profile, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.destination"; + + } + + } + + @Block() + public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. + */ + @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether or not to implicitly create the fixture during setup", formalDefinition="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section." ) + protected BooleanType autocreate; + + /** + * Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. + */ + @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether or not to implicitly delete the fixture during teardown", formalDefinition="Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section." ) + protected BooleanType autodelete; + + /** + * Reference to the resource (containing the contents of the resource needed for operations). + */ + @Child(name = "resource", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) + */ + protected Resource resourceTarget; + + private static final long serialVersionUID = 1110683307L; + + /* + * Constructor + */ + public TestScriptFixtureComponent() { + super(); + } + + /** + * @return {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value + */ + public BooleanType getAutocreateElement() { + if (this.autocreate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); + else if (Configuration.doAutoCreate()) + this.autocreate = new BooleanType(); // bb + return this.autocreate; + } + + public boolean hasAutocreateElement() { + return this.autocreate != null && !this.autocreate.isEmpty(); + } + + public boolean hasAutocreate() { + return this.autocreate != null && !this.autocreate.isEmpty(); + } + + /** + * @param value {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value + */ + public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { + this.autocreate = value; + return this; + } + + /** + * @return Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. + */ + public boolean getAutocreate() { + return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); + } + + /** + * @param value Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. + */ + public TestScriptFixtureComponent setAutocreate(boolean value) { + if (this.autocreate == null) + this.autocreate = new BooleanType(); + this.autocreate.setValue(value); + return this; + } + + /** + * @return {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value + */ + public BooleanType getAutodeleteElement() { + if (this.autodelete == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); + else if (Configuration.doAutoCreate()) + this.autodelete = new BooleanType(); // bb + return this.autodelete; + } + + public boolean hasAutodeleteElement() { + return this.autodelete != null && !this.autodelete.isEmpty(); + } + + public boolean hasAutodelete() { + return this.autodelete != null && !this.autodelete.isEmpty(); + } + + /** + * @param value {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value + */ + public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { + this.autodelete = value; + return this; + } + + /** + * @return Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. + */ + public boolean getAutodelete() { + return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); + } + + /** + * @param value Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. + */ + public TestScriptFixtureComponent setAutodelete(boolean value) { + if (this.autodelete == null) + this.autodelete = new BooleanType(); + this.autodelete.setValue(value); + return this; + } + + /** + * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) + */ + public TestScriptFixtureComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the resource needed for operations).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the resource needed for operations).) + */ + public TestScriptFixtureComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("autocreate", "boolean", "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", 0, java.lang.Integer.MAX_VALUE, autocreate)); + childrenList.add(new Property("autodelete", "boolean", "Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", 0, java.lang.Integer.MAX_VALUE, autodelete)); + childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, java.lang.Integer.MAX_VALUE, resource)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("autocreate")) + this.autocreate = castToBoolean(value); // BooleanType + else if (name.equals("autodelete")) + this.autodelete = castToBoolean(value); // BooleanType + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("autocreate")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); + } + else if (name.equals("autodelete")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); + } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else + return super.addChild(name); + } + + public TestScriptFixtureComponent copy() { + TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); + copyValues(dst); + dst.autocreate = autocreate == null ? null : autocreate.copy(); + dst.autodelete = autodelete == null ? null : autodelete.copy(); + dst.resource = resource == null ? null : resource.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptFixtureComponent)) + return false; + TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; + return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) + && compareDeep(resource, o.resource, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptFixtureComponent)) + return false; + TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; + return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (autocreate == null || autocreate.isEmpty()) && (autodelete == null || autodelete.isEmpty()) + && (resource == null || resource.isEmpty()); + } + + public String fhirType() { + return "TestScript.fixture"; + + } + + } + + @Block() + public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for this variable. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) + protected StringType name; + + /** + * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. + */ + @Child(name = "headerField", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="HTTP header field name for source", formalDefinition="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to." ) + protected StringType headerField; + + /** + * XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. + */ + @Child(name = "path", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="XPath or JSONPath against the fixture body", formalDefinition="XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both." ) + protected StringType path; + + /** + * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. + */ + @Child(name = "sourceId", type = {IdType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Fixture Id of source expression or headerField within this variable", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable." ) + protected IdType sourceId; + + private static final long serialVersionUID = 1128806685L; + + /* + * Constructor + */ + public TestScriptVariableComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptVariableComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScriptVariableComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for this variable. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for this variable. + */ + public TestScriptVariableComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value + */ + public StringType getHeaderFieldElement() { + if (this.headerField == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); + else if (Configuration.doAutoCreate()) + this.headerField = new StringType(); // bb + return this.headerField; + } + + public boolean hasHeaderFieldElement() { + return this.headerField != null && !this.headerField.isEmpty(); + } + + public boolean hasHeaderField() { + return this.headerField != null && !this.headerField.isEmpty(); + } + + /** + * @param value {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value + */ + public TestScriptVariableComponent setHeaderFieldElement(StringType value) { + this.headerField = value; + return this; + } + + /** + * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. + */ + public String getHeaderField() { + return this.headerField == null ? null : this.headerField.getValue(); + } + + /** + * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. + */ + public TestScriptVariableComponent setHeaderField(String value) { + if (Utilities.noString(value)) + this.headerField = null; + else { + if (this.headerField == null) + this.headerField = new StringType(); + this.headerField.setValue(value); + } + return this; + } + + /** + * @return {@link #path} (XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public TestScriptVariableComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. + */ + public TestScriptVariableComponent setPath(String value) { + if (Utilities.noString(value)) + this.path = null; + else { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + } + return this; + } + + /** + * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public IdType getSourceIdElement() { + if (this.sourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); + else if (Configuration.doAutoCreate()) + this.sourceId = new IdType(); // bb + return this.sourceId; + } + + public boolean hasSourceIdElement() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + public boolean hasSourceId() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + /** + * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public TestScriptVariableComponent setSourceIdElement(IdType value) { + this.sourceId = value; + return this; + } + + /** + * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. + */ + public String getSourceId() { + return this.sourceId == null ? null : this.sourceId.getValue(); + } + + /** + * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. + */ + public TestScriptVariableComponent setSourceId(String value) { + if (Utilities.noString(value)) + this.sourceId = null; + else { + if (this.sourceId == null) + this.sourceId = new IdType(); + this.sourceId.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Descriptive name for this variable.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, java.lang.Integer.MAX_VALUE, headerField)); + childrenList.add(new Property("path", "string", "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, java.lang.Integer.MAX_VALUE, sourceId)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("headerField")) + this.headerField = castToString(value); // StringType + else if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("sourceId")) + this.sourceId = castToId(value); // IdType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("headerField")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); + } + else if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); + } + else if (name.equals("sourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); + } + else + return super.addChild(name); + } + + public TestScriptVariableComponent copy() { + TestScriptVariableComponent dst = new TestScriptVariableComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.headerField = headerField == null ? null : headerField.copy(); + dst.path = path == null ? null : path.copy(); + dst.sourceId = sourceId == null ? null : sourceId.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptVariableComponent)) + return false; + TestScriptVariableComponent o = (TestScriptVariableComponent) other; + return compareDeep(name, o.name, true) && compareDeep(headerField, o.headerField, true) && compareDeep(path, o.path, true) + && compareDeep(sourceId, o.sourceId, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptVariableComponent)) + return false; + TestScriptVariableComponent o = (TestScriptVariableComponent) other; + return compareValues(name, o.name, true) && compareValues(headerField, o.headerField, true) && compareValues(path, o.path, true) + && compareValues(sourceId, o.sourceId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (headerField == null || headerField.isEmpty()) + && (path == null || path.isEmpty()) && (sourceId == null || sourceId.isEmpty()); + } + + public String fhirType() { + return "TestScript.variable"; + + } + + } + + @Block() + public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. + */ + @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Capabilities that are assumed to function correctly on the FHIR server being tested", formalDefinition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." ) + protected TestScriptMetadataComponent metadata; + + /** + * Action would contain either an operation or an assertion. + */ + @Child(name = "action", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) + protected List action; + + private static final long serialVersionUID = -1836543723L; + + /* + * Constructor + */ + public TestScriptSetupComponent() { + super(); + } + + /** + * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScriptMetadataComponent getMetadata() { + if (this.metadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupComponent.metadata"); + else if (Configuration.doAutoCreate()) + this.metadata = new TestScriptMetadataComponent(); // cc + return this.metadata; + } + + public boolean hasMetadata() { + return this.metadata != null && !this.metadata.isEmpty(); + } + + /** + * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScriptSetupComponent setMetadata(TestScriptMetadataComponent value) { + this.metadata = value; + return this; + } + + /** + * @return {@link #action} (Action would contain either an operation or an assertion.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (TestScriptSetupActionComponent item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Action would contain either an operation or an assertion.) + */ + // syntactic sugar + public TestScriptSetupActionComponent addAction() { //3 + TestScriptSetupActionComponent t = new TestScriptSetupActionComponent(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public TestScriptSetupComponent addAction(TestScriptSetupActionComponent t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("metadata", "@TestScript.metadata", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); + childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("metadata")) + this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent + else if (name.equals("action")) + this.getAction().add((TestScriptSetupActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("metadata")) { + this.metadata = new TestScriptMetadataComponent(); + return this.metadata; + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public TestScriptSetupComponent copy() { + TestScriptSetupComponent dst = new TestScriptSetupComponent(); + copyValues(dst); + dst.metadata = metadata == null ? null : metadata.copy(); + if (action != null) { + dst.action = new ArrayList(); + for (TestScriptSetupActionComponent i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptSetupComponent)) + return false; + TestScriptSetupComponent o = (TestScriptSetupComponent) other; + return compareDeep(metadata, o.metadata, true) && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptSetupComponent)) + return false; + TestScriptSetupComponent o = (TestScriptSetupComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.setup"; + + } + + } + + @Block() + public static class TestScriptSetupActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The operation to perform. + */ + @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) + protected TestScriptSetupActionOperationComponent operation; + + /** + * Evaluates the results of previous operations to determine if the server under test behaves appropriately. + */ + @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) + protected TestScriptSetupActionAssertComponent assert_; + + private static final long serialVersionUID = 1411550037L; + + /* + * Constructor + */ + public TestScriptSetupActionComponent() { + super(); + } + + /** + * @return {@link #operation} (The operation to perform.) + */ + public TestScriptSetupActionOperationComponent getOperation() { + if (this.operation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionComponent.operation"); + else if (Configuration.doAutoCreate()) + this.operation = new TestScriptSetupActionOperationComponent(); // cc + return this.operation; + } + + public boolean hasOperation() { + return this.operation != null && !this.operation.isEmpty(); + } + + /** + * @param value {@link #operation} (The operation to perform.) + */ + public TestScriptSetupActionComponent setOperation(TestScriptSetupActionOperationComponent value) { + this.operation = value; + return this; + } + + /** + * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) + */ + public TestScriptSetupActionAssertComponent getAssert() { + if (this.assert_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionComponent.assert_"); + else if (Configuration.doAutoCreate()) + this.assert_ = new TestScriptSetupActionAssertComponent(); // cc + return this.assert_; + } + + public boolean hasAssert() { + return this.assert_ != null && !this.assert_.isEmpty(); + } + + /** + * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) + */ + public TestScriptSetupActionComponent setAssert(TestScriptSetupActionAssertComponent value) { + this.assert_ = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("operation", "", "The operation to perform.", 0, java.lang.Integer.MAX_VALUE, operation)); + childrenList.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("operation")) + this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent + else if (name.equals("assert")) + this.assert_ = (TestScriptSetupActionAssertComponent) value; // TestScriptSetupActionAssertComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("operation")) { + this.operation = new TestScriptSetupActionOperationComponent(); + return this.operation; + } + else if (name.equals("assert")) { + this.assert_ = new TestScriptSetupActionAssertComponent(); + return this.assert_; + } + else + return super.addChild(name); + } + + public TestScriptSetupActionComponent copy() { + TestScriptSetupActionComponent dst = new TestScriptSetupActionComponent(); + copyValues(dst); + dst.operation = operation == null ? null : operation.copy(); + dst.assert_ = assert_ == null ? null : assert_.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptSetupActionComponent)) + return false; + TestScriptSetupActionComponent o = (TestScriptSetupActionComponent) other; + return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptSetupActionComponent)) + return false; + TestScriptSetupActionComponent o = (TestScriptSetupActionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.setup.action"; + + } + + } + + @Block() + public static class TestScriptSetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Server interaction or operation type. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The setup operation type that will be executed", formalDefinition="Server interaction or operation type." ) + protected Coding type; + + /** + * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) + protected CodeType resource; + + /** + * The label would be used for tracking/logging purposes by test engines. + */ + @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) + protected StringType label; + + /** + * The description would be used by test engines for tracking and reporting purposes. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) + protected StringType description; + + /** + * The content-type or mime-type to use for RESTful operation in the 'Accept' header. + */ + @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) + protected Enumeration accept; + + /** + * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) + protected Enumeration contentType; + + /** + * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. + */ + @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Server responding to the request", formalDefinition="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section." ) + protected IntegerType destination; + + /** + * Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. + */ + @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether or not to send the request url in encoded format", formalDefinition="Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths." ) + protected BooleanType encodeRequestUrl; + + /** + * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. + */ + @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Server initiating the request", formalDefinition="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section." ) + protected IntegerType origin; + + /** + * Path plus parameters after [type]. Used to set parts of the request URL explicitly. + */ + @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) + protected StringType params; + + /** + * Header elements would be used to set HTTP headers. + */ + @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Each operation can have one ore more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) + protected List requestHeader; + + /** + * The fixture id (maybe new) to map to the response. + */ + @Child(name = "responseId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) + protected IdType responseId; + + /** + * The id of the fixture used as the body of a PUT or POST request. + */ + @Child(name = "sourceId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Fixture Id of body for PUT and POST requests", formalDefinition="The id of the fixture used as the body of a PUT or POST request." ) + protected IdType sourceId; + + /** + * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. + */ + @Child(name = "targetId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Id of fixture used for extracting the [id], [type], and [vid] for GET requests", formalDefinition="Id of fixture used for extracting the [id], [type], and [vid] for GET requests." ) + protected IdType targetId; + + /** + * Complete request URL. + */ + @Child(name = "url", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) + protected StringType url; + + private static final long serialVersionUID = 808886214L; + + /* + * Constructor + */ + public TestScriptSetupActionOperationComponent() { + super(); + } + + /** + * @return {@link #type} (Server interaction or operation type.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Server interaction or operation type.) + */ + public TestScriptSetupActionOperationComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value + */ + public CodeType getResourceElement() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new CodeType(); // bb + return this.resource; + } + + public boolean hasResourceElement() { + return this.resource != null && !this.resource.isEmpty(); + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setResourceElement(CodeType value) { + this.resource = value; + return this; + } + + /** + * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + public String getResource() { + return this.resource == null ? null : this.resource.getValue(); + } + + /** + * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + public TestScriptSetupActionOperationComponent setResource(String value) { + if (Utilities.noString(value)) + this.resource = null; + else { + if (this.resource == null) + this.resource = new CodeType(); + this.resource.setValue(value); + } + return this; + } + + /** + * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public StringType getLabelElement() { + if (this.label == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.label"); + else if (Configuration.doAutoCreate()) + this.label = new StringType(); // bb + return this.label; + } + + public boolean hasLabelElement() { + return this.label != null && !this.label.isEmpty(); + } + + public boolean hasLabel() { + return this.label != null && !this.label.isEmpty(); + } + + /** + * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setLabelElement(StringType value) { + this.label = value; + return this; + } + + /** + * @return The label would be used for tracking/logging purposes by test engines. + */ + public String getLabel() { + return this.label == null ? null : this.label.getValue(); + } + + /** + * @param value The label would be used for tracking/logging purposes by test engines. + */ + public TestScriptSetupActionOperationComponent setLabel(String value) { + if (Utilities.noString(value)) + this.label = null; + else { + if (this.label == null) + this.label = new StringType(); + this.label.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The description would be used by test engines for tracking and reporting purposes. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The description would be used by test engines for tracking and reporting purposes. + */ + public TestScriptSetupActionOperationComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value + */ + public Enumeration getAcceptElement() { + if (this.accept == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.accept"); + else if (Configuration.doAutoCreate()) + this.accept = new Enumeration(new ContentTypeEnumFactory()); // bb + return this.accept; + } + + public boolean hasAcceptElement() { + return this.accept != null && !this.accept.isEmpty(); + } + + public boolean hasAccept() { + return this.accept != null && !this.accept.isEmpty(); + } + + /** + * @param value {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setAcceptElement(Enumeration value) { + this.accept = value; + return this; + } + + /** + * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. + */ + public ContentType getAccept() { + return this.accept == null ? null : this.accept.getValue(); + } + + /** + * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. + */ + public TestScriptSetupActionOperationComponent setAccept(ContentType value) { + if (value == null) + this.accept = null; + else { + if (this.accept == null) + this.accept = new Enumeration(new ContentTypeEnumFactory()); + this.accept.setValue(value); + } + return this; + } + + /** + * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public Enumeration getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new Enumeration(new ContentTypeEnumFactory()); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setContentTypeElement(Enumeration value) { + this.contentType = value; + return this; + } + + /** + * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + public ContentType getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + public TestScriptSetupActionOperationComponent setContentType(ContentType value) { + if (value == null) + this.contentType = null; + else { + if (this.contentType == null) + this.contentType = new Enumeration(new ContentTypeEnumFactory()); + this.contentType.setValue(value); + } + return this; + } + + /** + * @return {@link #destination} (The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value + */ + public IntegerType getDestinationElement() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new IntegerType(); // bb + return this.destination; + } + + public boolean hasDestinationElement() { + return this.destination != null && !this.destination.isEmpty(); + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setDestinationElement(IntegerType value) { + this.destination = value; + return this; + } + + /** + * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. + */ + public int getDestination() { + return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); + } + + /** + * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. + */ + public TestScriptSetupActionOperationComponent setDestination(int value) { + if (this.destination == null) + this.destination = new IntegerType(); + this.destination.setValue(value); + return this; + } + + /** + * @return {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value + */ + public BooleanType getEncodeRequestUrlElement() { + if (this.encodeRequestUrl == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.encodeRequestUrl"); + else if (Configuration.doAutoCreate()) + this.encodeRequestUrl = new BooleanType(); // bb + return this.encodeRequestUrl; + } + + public boolean hasEncodeRequestUrlElement() { + return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); + } + + public boolean hasEncodeRequestUrl() { + return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); + } + + /** + * @param value {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { + this.encodeRequestUrl = value; + return this; + } + + /** + * @return Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. + */ + public boolean getEncodeRequestUrl() { + return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); + } + + /** + * @param value Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. + */ + public TestScriptSetupActionOperationComponent setEncodeRequestUrl(boolean value) { + if (this.encodeRequestUrl == null) + this.encodeRequestUrl = new BooleanType(); + this.encodeRequestUrl.setValue(value); + return this; + } + + /** + * @return {@link #origin} (The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value + */ + public IntegerType getOriginElement() { + if (this.origin == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.origin"); + else if (Configuration.doAutoCreate()) + this.origin = new IntegerType(); // bb + return this.origin; + } + + public boolean hasOriginElement() { + return this.origin != null && !this.origin.isEmpty(); + } + + public boolean hasOrigin() { + return this.origin != null && !this.origin.isEmpty(); + } + + /** + * @param value {@link #origin} (The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setOriginElement(IntegerType value) { + this.origin = value; + return this; + } + + /** + * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. + */ + public int getOrigin() { + return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); + } + + /** + * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. + */ + public TestScriptSetupActionOperationComponent setOrigin(int value) { + if (this.origin == null) + this.origin = new IntegerType(); + this.origin.setValue(value); + return this; + } + + /** + * @return {@link #params} (Path plus parameters after [type]. Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value + */ + public StringType getParamsElement() { + if (this.params == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.params"); + else if (Configuration.doAutoCreate()) + this.params = new StringType(); // bb + return this.params; + } + + public boolean hasParamsElement() { + return this.params != null && !this.params.isEmpty(); + } + + public boolean hasParams() { + return this.params != null && !this.params.isEmpty(); + } + + /** + * @param value {@link #params} (Path plus parameters after [type]. Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setParamsElement(StringType value) { + this.params = value; + return this; + } + + /** + * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. + */ + public String getParams() { + return this.params == null ? null : this.params.getValue(); + } + + /** + * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. + */ + public TestScriptSetupActionOperationComponent setParams(String value) { + if (Utilities.noString(value)) + this.params = null; + else { + if (this.params == null) + this.params = new StringType(); + this.params.setValue(value); + } + return this; + } + + /** + * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) + */ + public List getRequestHeader() { + if (this.requestHeader == null) + this.requestHeader = new ArrayList(); + return this.requestHeader; + } + + public boolean hasRequestHeader() { + if (this.requestHeader == null) + return false; + for (TestScriptSetupActionOperationRequestHeaderComponent item : this.requestHeader) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) + */ + // syntactic sugar + public TestScriptSetupActionOperationRequestHeaderComponent addRequestHeader() { //3 + TestScriptSetupActionOperationRequestHeaderComponent t = new TestScriptSetupActionOperationRequestHeaderComponent(); + if (this.requestHeader == null) + this.requestHeader = new ArrayList(); + this.requestHeader.add(t); + return t; + } + + // syntactic sugar + public TestScriptSetupActionOperationComponent addRequestHeader(TestScriptSetupActionOperationRequestHeaderComponent t) { //3 + if (t == null) + return this; + if (this.requestHeader == null) + this.requestHeader = new ArrayList(); + this.requestHeader.add(t); + return this; + } + + /** + * @return {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value + */ + public IdType getResponseIdElement() { + if (this.responseId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.responseId"); + else if (Configuration.doAutoCreate()) + this.responseId = new IdType(); // bb + return this.responseId; + } + + public boolean hasResponseIdElement() { + return this.responseId != null && !this.responseId.isEmpty(); + } + + public boolean hasResponseId() { + return this.responseId != null && !this.responseId.isEmpty(); + } + + /** + * @param value {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setResponseIdElement(IdType value) { + this.responseId = value; + return this; + } + + /** + * @return The fixture id (maybe new) to map to the response. + */ + public String getResponseId() { + return this.responseId == null ? null : this.responseId.getValue(); + } + + /** + * @param value The fixture id (maybe new) to map to the response. + */ + public TestScriptSetupActionOperationComponent setResponseId(String value) { + if (Utilities.noString(value)) + this.responseId = null; + else { + if (this.responseId == null) + this.responseId = new IdType(); + this.responseId.setValue(value); + } + return this; + } + + /** + * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public IdType getSourceIdElement() { + if (this.sourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.sourceId"); + else if (Configuration.doAutoCreate()) + this.sourceId = new IdType(); // bb + return this.sourceId; + } + + public boolean hasSourceIdElement() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + public boolean hasSourceId() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + /** + * @param value {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setSourceIdElement(IdType value) { + this.sourceId = value; + return this; + } + + /** + * @return The id of the fixture used as the body of a PUT or POST request. + */ + public String getSourceId() { + return this.sourceId == null ? null : this.sourceId.getValue(); + } + + /** + * @param value The id of the fixture used as the body of a PUT or POST request. + */ + public TestScriptSetupActionOperationComponent setSourceId(String value) { + if (Utilities.noString(value)) + this.sourceId = null; + else { + if (this.sourceId == null) + this.sourceId = new IdType(); + this.sourceId.setValue(value); + } + return this; + } + + /** + * @return {@link #targetId} (Id of fixture used for extracting the [id], [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value + */ + public IdType getTargetIdElement() { + if (this.targetId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.targetId"); + else if (Configuration.doAutoCreate()) + this.targetId = new IdType(); // bb + return this.targetId; + } + + public boolean hasTargetIdElement() { + return this.targetId != null && !this.targetId.isEmpty(); + } + + public boolean hasTargetId() { + return this.targetId != null && !this.targetId.isEmpty(); + } + + /** + * @param value {@link #targetId} (Id of fixture used for extracting the [id], [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setTargetIdElement(IdType value) { + this.targetId = value; + return this; + } + + /** + * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. + */ + public String getTargetId() { + return this.targetId == null ? null : this.targetId.getValue(); + } + + /** + * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. + */ + public TestScriptSetupActionOperationComponent setTargetId(String value) { + if (Utilities.noString(value)) + this.targetId = null; + else { + if (this.targetId == null) + this.targetId = new IdType(); + this.targetId.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StringType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new StringType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public TestScriptSetupActionOperationComponent setUrlElement(StringType value) { + this.url = value; + return this; + } + + /** + * @return Complete request URL. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value Complete request URL. + */ + public TestScriptSetupActionOperationComponent setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new StringType(); + this.url.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Server interaction or operation type.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("resource", "code", "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); + childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, java.lang.Integer.MAX_VALUE, accept)); + childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("destination", "integer", "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("encodeRequestUrl", "boolean", "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", 0, java.lang.Integer.MAX_VALUE, encodeRequestUrl)); + childrenList.add(new Property("origin", "integer", "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", 0, java.lang.Integer.MAX_VALUE, origin)); + childrenList.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, java.lang.Integer.MAX_VALUE, params)); + childrenList.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); + childrenList.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, java.lang.Integer.MAX_VALUE, responseId)); + childrenList.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, java.lang.Integer.MAX_VALUE, sourceId)); + childrenList.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, java.lang.Integer.MAX_VALUE, targetId)); + childrenList.add(new Property("url", "string", "Complete request URL.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("resource")) + this.resource = castToCode(value); // CodeType + else if (name.equals("label")) + this.label = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("accept")) + this.accept = new ContentTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("contentType")) + this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("destination")) + this.destination = castToInteger(value); // IntegerType + else if (name.equals("encodeRequestUrl")) + this.encodeRequestUrl = castToBoolean(value); // BooleanType + else if (name.equals("origin")) + this.origin = castToInteger(value); // IntegerType + else if (name.equals("params")) + this.params = castToString(value); // StringType + else if (name.equals("requestHeader")) + this.getRequestHeader().add((TestScriptSetupActionOperationRequestHeaderComponent) value); + else if (name.equals("responseId")) + this.responseId = castToId(value); // IdType + else if (name.equals("sourceId")) + this.sourceId = castToId(value); // IdType + else if (name.equals("targetId")) + this.targetId = castToId(value); // IdType + else if (name.equals("url")) + this.url = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("resource")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); + } + else if (name.equals("label")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else if (name.equals("accept")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); + } + else if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); + } + else if (name.equals("destination")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); + } + else if (name.equals("encodeRequestUrl")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); + } + else if (name.equals("origin")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); + } + else if (name.equals("params")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); + } + else if (name.equals("requestHeader")) { + return addRequestHeader(); + } + else if (name.equals("responseId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); + } + else if (name.equals("sourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); + } + else if (name.equals("targetId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); + } + else + return super.addChild(name); + } + + public TestScriptSetupActionOperationComponent copy() { + TestScriptSetupActionOperationComponent dst = new TestScriptSetupActionOperationComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.resource = resource == null ? null : resource.copy(); + dst.label = label == null ? null : label.copy(); + dst.description = description == null ? null : description.copy(); + dst.accept = accept == null ? null : accept.copy(); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.destination = destination == null ? null : destination.copy(); + dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); + dst.origin = origin == null ? null : origin.copy(); + dst.params = params == null ? null : params.copy(); + if (requestHeader != null) { + dst.requestHeader = new ArrayList(); + for (TestScriptSetupActionOperationRequestHeaderComponent i : requestHeader) + dst.requestHeader.add(i.copy()); + }; + dst.responseId = responseId == null ? null : responseId.copy(); + dst.sourceId = sourceId == null ? null : sourceId.copy(); + dst.targetId = targetId == null ? null : targetId.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptSetupActionOperationComponent)) + return false; + TestScriptSetupActionOperationComponent o = (TestScriptSetupActionOperationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) + && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) + && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) + && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) + && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true) + && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptSetupActionOperationComponent)) + return false; + TestScriptSetupActionOperationComponent o = (TestScriptSetupActionOperationComponent) other; + return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) + && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) + && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true) + && compareValues(params, o.params, true) && compareValues(responseId, o.responseId, true) && compareValues(sourceId, o.sourceId, true) + && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) + && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) && (accept == null || accept.isEmpty()) + && (contentType == null || contentType.isEmpty()) && (destination == null || destination.isEmpty()) + && (encodeRequestUrl == null || encodeRequestUrl.isEmpty()) && (origin == null || origin.isEmpty()) + && (params == null || params.isEmpty()) && (requestHeader == null || requestHeader.isEmpty()) + && (responseId == null || responseId.isEmpty()) && (sourceId == null || sourceId.isEmpty()) + && (targetId == null || targetId.isEmpty()) && (url == null || url.isEmpty()); + } + + public String fhirType() { + return "TestScript.setup.action.operation"; + + } + + } + + @Block() + public static class TestScriptSetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The HTTP header field e.g. "Accept". + */ + @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) + protected StringType field; + + /** + * The value of the header e.g. "application/xml". + */ + @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/xml\"." ) + protected StringType value; + + private static final long serialVersionUID = 274395337L; + + /* + * Constructor + */ + public TestScriptSetupActionOperationRequestHeaderComponent() { + super(); + } + + /* + * Constructor + */ + public TestScriptSetupActionOperationRequestHeaderComponent(StringType field, StringType value) { + super(); + this.field = field; + this.value = value; + } + + /** + * @return {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value + */ + public StringType getFieldElement() { + if (this.field == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationRequestHeaderComponent.field"); + else if (Configuration.doAutoCreate()) + this.field = new StringType(); // bb + return this.field; + } + + public boolean hasFieldElement() { + return this.field != null && !this.field.isEmpty(); + } + + public boolean hasField() { + return this.field != null && !this.field.isEmpty(); + } + + /** + * @param value {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value + */ + public TestScriptSetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { + this.field = value; + return this; + } + + /** + * @return The HTTP header field e.g. "Accept". + */ + public String getField() { + return this.field == null ? null : this.field.getValue(); + } + + /** + * @param value The HTTP header field e.g. "Accept". + */ + public TestScriptSetupActionOperationRequestHeaderComponent setField(String value) { + if (this.field == null) + this.field = new StringType(); + this.field.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the header e.g. "application/xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionOperationRequestHeaderComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the header e.g. "application/xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public TestScriptSetupActionOperationRequestHeaderComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value of the header e.g. "application/xml". + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value of the header e.g. "application/xml". + */ + public TestScriptSetupActionOperationRequestHeaderComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, java.lang.Integer.MAX_VALUE, field)); + childrenList.add(new Property("value", "string", "The value of the header e.g. \"application/xml\".", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("field")) + this.field = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("field")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else + return super.addChild(name); + } + + public TestScriptSetupActionOperationRequestHeaderComponent copy() { + TestScriptSetupActionOperationRequestHeaderComponent dst = new TestScriptSetupActionOperationRequestHeaderComponent(); + copyValues(dst); + dst.field = field == null ? null : field.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptSetupActionOperationRequestHeaderComponent)) + return false; + TestScriptSetupActionOperationRequestHeaderComponent o = (TestScriptSetupActionOperationRequestHeaderComponent) other; + return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptSetupActionOperationRequestHeaderComponent)) + return false; + TestScriptSetupActionOperationRequestHeaderComponent o = (TestScriptSetupActionOperationRequestHeaderComponent) other; + return compareValues(field, o.field, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (field == null || field.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.setup.action.operation.requestHeader"; + + } + + } + + @Block() + public static class TestScriptSetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The label would be used for tracking/logging purposes by test engines. + */ + @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) + protected StringType label; + + /** + * The description would be used by test engines for tracking and reporting purposes. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) + protected StringType description; + + /** + * The direction to use for the assertion. + */ + @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) + protected Enumeration direction; + + /** + * Id of fixture used to compare the "sourceId/path" evaluations to. + */ + @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Id of fixture used to compare the \"sourceId/path\" evaluations to", formalDefinition="Id of fixture used to compare the \"sourceId/path\" evaluations to." ) + protected StringType compareToSourceId; + + /** + * XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. + */ + @Child(name = "compareToSourcePath", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to", formalDefinition="XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to." ) + protected StringType compareToSourcePath; + + /** + * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) + protected Enumeration contentType; + + /** + * The HTTP header field name e.g. 'Location'. + */ + @Child(name = "headerField", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) + protected StringType headerField; + + /** + * The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + */ + @Child(name = "minimumId", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Fixture Id of minimum content resource", formalDefinition="The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId." ) + protected StringType minimumId; + + /** + * Whether or not the test execution performs validation on the bundle navigation links. + */ + @Child(name = "navigationLinks", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) + protected BooleanType navigationLinks; + + /** + * The operator type. + */ + @Child(name = "operator", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains", formalDefinition="The operator type." ) + protected Enumeration operator; + + /** + * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. + */ + @Child(name = "path", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) + protected StringType path; + + /** + * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + @Child(name = "resource", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) + protected CodeType resource; + + /** + * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. + */ + @Child(name = "response", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable", formalDefinition="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable." ) + protected Enumeration response; + + /** + * The value of the HTTP response code to be tested. + */ + @Child(name = "responseCode", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) + protected StringType responseCode; + + /** + * Fixture to evaluate the XPath/JSONPath expression or the headerField against. + */ + @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) + protected IdType sourceId; + + /** + * The ID of the Profile to validate against. + */ + @Child(name = "validateProfileId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) + protected IdType validateProfileId; + + /** + * The value to compare to. + */ + @Child(name = "value", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) + protected StringType value; + + /** + * Whether or not the test execution will produce a warning only on error for this assert. + */ + @Child(name = "warningOnly", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Will this assert produce a warning only on error?", formalDefinition="Whether or not the test execution will produce a warning only on error for this assert." ) + protected BooleanType warningOnly; + + private static final long serialVersionUID = -607939856L; + + /* + * Constructor + */ + public TestScriptSetupActionAssertComponent() { + super(); + } + + /** + * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public StringType getLabelElement() { + if (this.label == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.label"); + else if (Configuration.doAutoCreate()) + this.label = new StringType(); // bb + return this.label; + } + + public boolean hasLabelElement() { + return this.label != null && !this.label.isEmpty(); + } + + public boolean hasLabel() { + return this.label != null && !this.label.isEmpty(); + } + + /** + * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setLabelElement(StringType value) { + this.label = value; + return this; + } + + /** + * @return The label would be used for tracking/logging purposes by test engines. + */ + public String getLabel() { + return this.label == null ? null : this.label.getValue(); + } + + /** + * @param value The label would be used for tracking/logging purposes by test engines. + */ + public TestScriptSetupActionAssertComponent setLabel(String value) { + if (Utilities.noString(value)) + this.label = null; + else { + if (this.label == null) + this.label = new StringType(); + this.label.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The description would be used by test engines for tracking and reporting purposes. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The description would be used by test engines for tracking and reporting purposes. + */ + public TestScriptSetupActionAssertComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value + */ + public Enumeration getDirectionElement() { + if (this.direction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.direction"); + else if (Configuration.doAutoCreate()) + this.direction = new Enumeration(new AssertionDirectionTypeEnumFactory()); // bb + return this.direction; + } + + public boolean hasDirectionElement() { + return this.direction != null && !this.direction.isEmpty(); + } + + public boolean hasDirection() { + return this.direction != null && !this.direction.isEmpty(); + } + + /** + * @param value {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setDirectionElement(Enumeration value) { + this.direction = value; + return this; + } + + /** + * @return The direction to use for the assertion. + */ + public AssertionDirectionType getDirection() { + return this.direction == null ? null : this.direction.getValue(); + } + + /** + * @param value The direction to use for the assertion. + */ + public TestScriptSetupActionAssertComponent setDirection(AssertionDirectionType value) { + if (value == null) + this.direction = null; + else { + if (this.direction == null) + this.direction = new Enumeration(new AssertionDirectionTypeEnumFactory()); + this.direction.setValue(value); + } + return this; + } + + /** + * @return {@link #compareToSourceId} (Id of fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value + */ + public StringType getCompareToSourceIdElement() { + if (this.compareToSourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.compareToSourceId"); + else if (Configuration.doAutoCreate()) + this.compareToSourceId = new StringType(); // bb + return this.compareToSourceId; + } + + public boolean hasCompareToSourceIdElement() { + return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); + } + + public boolean hasCompareToSourceId() { + return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); + } + + /** + * @param value {@link #compareToSourceId} (Id of fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setCompareToSourceIdElement(StringType value) { + this.compareToSourceId = value; + return this; + } + + /** + * @return Id of fixture used to compare the "sourceId/path" evaluations to. + */ + public String getCompareToSourceId() { + return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); + } + + /** + * @param value Id of fixture used to compare the "sourceId/path" evaluations to. + */ + public TestScriptSetupActionAssertComponent setCompareToSourceId(String value) { + if (Utilities.noString(value)) + this.compareToSourceId = null; + else { + if (this.compareToSourceId == null) + this.compareToSourceId = new StringType(); + this.compareToSourceId.setValue(value); + } + return this; + } + + /** + * @return {@link #compareToSourcePath} (XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value + */ + public StringType getCompareToSourcePathElement() { + if (this.compareToSourcePath == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.compareToSourcePath"); + else if (Configuration.doAutoCreate()) + this.compareToSourcePath = new StringType(); // bb + return this.compareToSourcePath; + } + + public boolean hasCompareToSourcePathElement() { + return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); + } + + public boolean hasCompareToSourcePath() { + return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); + } + + /** + * @param value {@link #compareToSourcePath} (XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setCompareToSourcePathElement(StringType value) { + this.compareToSourcePath = value; + return this; + } + + /** + * @return XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. + */ + public String getCompareToSourcePath() { + return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); + } + + /** + * @param value XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. + */ + public TestScriptSetupActionAssertComponent setCompareToSourcePath(String value) { + if (Utilities.noString(value)) + this.compareToSourcePath = null; + else { + if (this.compareToSourcePath == null) + this.compareToSourcePath = new StringType(); + this.compareToSourcePath.setValue(value); + } + return this; + } + + /** + * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public Enumeration getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new Enumeration(new ContentTypeEnumFactory()); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setContentTypeElement(Enumeration value) { + this.contentType = value; + return this; + } + + /** + * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + public ContentType getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. + */ + public TestScriptSetupActionAssertComponent setContentType(ContentType value) { + if (value == null) + this.contentType = null; + else { + if (this.contentType == null) + this.contentType = new Enumeration(new ContentTypeEnumFactory()); + this.contentType.setValue(value); + } + return this; + } + + /** + * @return {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value + */ + public StringType getHeaderFieldElement() { + if (this.headerField == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.headerField"); + else if (Configuration.doAutoCreate()) + this.headerField = new StringType(); // bb + return this.headerField; + } + + public boolean hasHeaderFieldElement() { + return this.headerField != null && !this.headerField.isEmpty(); + } + + public boolean hasHeaderField() { + return this.headerField != null && !this.headerField.isEmpty(); + } + + /** + * @param value {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setHeaderFieldElement(StringType value) { + this.headerField = value; + return this; + } + + /** + * @return The HTTP header field name e.g. 'Location'. + */ + public String getHeaderField() { + return this.headerField == null ? null : this.headerField.getValue(); + } + + /** + * @param value The HTTP header field name e.g. 'Location'. + */ + public TestScriptSetupActionAssertComponent setHeaderField(String value) { + if (Utilities.noString(value)) + this.headerField = null; + else { + if (this.headerField == null) + this.headerField = new StringType(); + this.headerField.setValue(value); + } + return this; + } + + /** + * @return {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value + */ + public StringType getMinimumIdElement() { + if (this.minimumId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.minimumId"); + else if (Configuration.doAutoCreate()) + this.minimumId = new StringType(); // bb + return this.minimumId; + } + + public boolean hasMinimumIdElement() { + return this.minimumId != null && !this.minimumId.isEmpty(); + } + + public boolean hasMinimumId() { + return this.minimumId != null && !this.minimumId.isEmpty(); + } + + /** + * @param value {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setMinimumIdElement(StringType value) { + this.minimumId = value; + return this; + } + + /** + * @return The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + */ + public String getMinimumId() { + return this.minimumId == null ? null : this.minimumId.getValue(); + } + + /** + * @param value The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + */ + public TestScriptSetupActionAssertComponent setMinimumId(String value) { + if (Utilities.noString(value)) + this.minimumId = null; + else { + if (this.minimumId == null) + this.minimumId = new StringType(); + this.minimumId.setValue(value); + } + return this; + } + + /** + * @return {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value + */ + public BooleanType getNavigationLinksElement() { + if (this.navigationLinks == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.navigationLinks"); + else if (Configuration.doAutoCreate()) + this.navigationLinks = new BooleanType(); // bb + return this.navigationLinks; + } + + public boolean hasNavigationLinksElement() { + return this.navigationLinks != null && !this.navigationLinks.isEmpty(); + } + + public boolean hasNavigationLinks() { + return this.navigationLinks != null && !this.navigationLinks.isEmpty(); + } + + /** + * @param value {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setNavigationLinksElement(BooleanType value) { + this.navigationLinks = value; + return this; + } + + /** + * @return Whether or not the test execution performs validation on the bundle navigation links. + */ + public boolean getNavigationLinks() { + return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); + } + + /** + * @param value Whether or not the test execution performs validation on the bundle navigation links. + */ + public TestScriptSetupActionAssertComponent setNavigationLinks(boolean value) { + if (this.navigationLinks == null) + this.navigationLinks = new BooleanType(); + this.navigationLinks.setValue(value); + return this; + } + + /** + * @return {@link #operator} (The operator type.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value + */ + public Enumeration getOperatorElement() { + if (this.operator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.operator"); + else if (Configuration.doAutoCreate()) + this.operator = new Enumeration(new AssertionOperatorTypeEnumFactory()); // bb + return this.operator; + } + + public boolean hasOperatorElement() { + return this.operator != null && !this.operator.isEmpty(); + } + + public boolean hasOperator() { + return this.operator != null && !this.operator.isEmpty(); + } + + /** + * @param value {@link #operator} (The operator type.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setOperatorElement(Enumeration value) { + this.operator = value; + return this; + } + + /** + * @return The operator type. + */ + public AssertionOperatorType getOperator() { + return this.operator == null ? null : this.operator.getValue(); + } + + /** + * @param value The operator type. + */ + public TestScriptSetupActionAssertComponent setOperator(AssertionOperatorType value) { + if (value == null) + this.operator = null; + else { + if (this.operator == null) + this.operator = new Enumeration(new AssertionOperatorTypeEnumFactory()); + this.operator.setValue(value); + } + return this; + } + + /** + * @return {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. + */ + public TestScriptSetupActionAssertComponent setPath(String value) { + if (Utilities.noString(value)) + this.path = null; + else { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + } + return this; + } + + /** + * @return {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value + */ + public CodeType getResourceElement() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new CodeType(); // bb + return this.resource; + } + + public boolean hasResourceElement() { + return this.resource != null && !this.resource.isEmpty(); + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setResourceElement(CodeType value) { + this.resource = value; + return this; + } + + /** + * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + public String getResource() { + return this.resource == null ? null : this.resource.getValue(); + } + + /** + * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. + */ + public TestScriptSetupActionAssertComponent setResource(String value) { + if (Utilities.noString(value)) + this.resource = null; + else { + if (this.resource == null) + this.resource = new CodeType(); + this.resource.setValue(value); + } + return this; + } + + /** + * @return {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value + */ + public Enumeration getResponseElement() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.response"); + else if (Configuration.doAutoCreate()) + this.response = new Enumeration(new AssertionResponseTypesEnumFactory()); // bb + return this.response; + } + + public boolean hasResponseElement() { + return this.response != null && !this.response.isEmpty(); + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setResponseElement(Enumeration value) { + this.response = value; + return this; + } + + /** + * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. + */ + public AssertionResponseTypes getResponse() { + return this.response == null ? null : this.response.getValue(); + } + + /** + * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. + */ + public TestScriptSetupActionAssertComponent setResponse(AssertionResponseTypes value) { + if (value == null) + this.response = null; + else { + if (this.response == null) + this.response = new Enumeration(new AssertionResponseTypesEnumFactory()); + this.response.setValue(value); + } + return this; + } + + /** + * @return {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value + */ + public StringType getResponseCodeElement() { + if (this.responseCode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.responseCode"); + else if (Configuration.doAutoCreate()) + this.responseCode = new StringType(); // bb + return this.responseCode; + } + + public boolean hasResponseCodeElement() { + return this.responseCode != null && !this.responseCode.isEmpty(); + } + + public boolean hasResponseCode() { + return this.responseCode != null && !this.responseCode.isEmpty(); + } + + /** + * @param value {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setResponseCodeElement(StringType value) { + this.responseCode = value; + return this; + } + + /** + * @return The value of the HTTP response code to be tested. + */ + public String getResponseCode() { + return this.responseCode == null ? null : this.responseCode.getValue(); + } + + /** + * @param value The value of the HTTP response code to be tested. + */ + public TestScriptSetupActionAssertComponent setResponseCode(String value) { + if (Utilities.noString(value)) + this.responseCode = null; + else { + if (this.responseCode == null) + this.responseCode = new StringType(); + this.responseCode.setValue(value); + } + return this; + } + + /** + * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public IdType getSourceIdElement() { + if (this.sourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.sourceId"); + else if (Configuration.doAutoCreate()) + this.sourceId = new IdType(); // bb + return this.sourceId; + } + + public boolean hasSourceIdElement() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + public boolean hasSourceId() { + return this.sourceId != null && !this.sourceId.isEmpty(); + } + + /** + * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setSourceIdElement(IdType value) { + this.sourceId = value; + return this; + } + + /** + * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. + */ + public String getSourceId() { + return this.sourceId == null ? null : this.sourceId.getValue(); + } + + /** + * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. + */ + public TestScriptSetupActionAssertComponent setSourceId(String value) { + if (Utilities.noString(value)) + this.sourceId = null; + else { + if (this.sourceId == null) + this.sourceId = new IdType(); + this.sourceId.setValue(value); + } + return this; + } + + /** + * @return {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value + */ + public IdType getValidateProfileIdElement() { + if (this.validateProfileId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.validateProfileId"); + else if (Configuration.doAutoCreate()) + this.validateProfileId = new IdType(); // bb + return this.validateProfileId; + } + + public boolean hasValidateProfileIdElement() { + return this.validateProfileId != null && !this.validateProfileId.isEmpty(); + } + + public boolean hasValidateProfileId() { + return this.validateProfileId != null && !this.validateProfileId.isEmpty(); + } + + /** + * @param value {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setValidateProfileIdElement(IdType value) { + this.validateProfileId = value; + return this; + } + + /** + * @return The ID of the Profile to validate against. + */ + public String getValidateProfileId() { + return this.validateProfileId == null ? null : this.validateProfileId.getValue(); + } + + /** + * @param value The ID of the Profile to validate against. + */ + public TestScriptSetupActionAssertComponent setValidateProfileId(String value) { + if (Utilities.noString(value)) + this.validateProfileId = null; + else { + if (this.validateProfileId == null) + this.validateProfileId = new IdType(); + this.validateProfileId.setValue(value); + } + return this; + } + + /** + * @return {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value to compare to. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value to compare to. + */ + public TestScriptSetupActionAssertComponent setValue(String value) { + if (Utilities.noString(value)) + this.value = null; + else { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + } + return this; + } + + /** + * @return {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value + */ + public BooleanType getWarningOnlyElement() { + if (this.warningOnly == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.warningOnly"); + else if (Configuration.doAutoCreate()) + this.warningOnly = new BooleanType(); // bb + return this.warningOnly; + } + + public boolean hasWarningOnlyElement() { + return this.warningOnly != null && !this.warningOnly.isEmpty(); + } + + public boolean hasWarningOnly() { + return this.warningOnly != null && !this.warningOnly.isEmpty(); + } + + /** + * @param value {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value + */ + public TestScriptSetupActionAssertComponent setWarningOnlyElement(BooleanType value) { + this.warningOnly = value; + return this; + } + + /** + * @return Whether or not the test execution will produce a warning only on error for this assert. + */ + public boolean getWarningOnly() { + return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); + } + + /** + * @param value Whether or not the test execution will produce a warning only on error for this assert. + */ + public TestScriptSetupActionAssertComponent setWarningOnly(boolean value) { + if (this.warningOnly == null) + this.warningOnly = new BooleanType(); + this.warningOnly.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); + childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("direction", "code", "The direction to use for the assertion.", 0, java.lang.Integer.MAX_VALUE, direction)); + childrenList.add(new Property("compareToSourceId", "string", "Id of fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourceId)); + childrenList.add(new Property("compareToSourcePath", "string", "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourcePath)); + childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, java.lang.Integer.MAX_VALUE, headerField)); + childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); + childrenList.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, java.lang.Integer.MAX_VALUE, navigationLinks)); + childrenList.add(new Property("operator", "code", "The operator type.", 0, java.lang.Integer.MAX_VALUE, operator)); + childrenList.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("resource", "code", "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, java.lang.Integer.MAX_VALUE, responseCode)); + childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, java.lang.Integer.MAX_VALUE, sourceId)); + childrenList.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, java.lang.Integer.MAX_VALUE, validateProfileId)); + childrenList.add(new Property("value", "string", "The value to compare to.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, java.lang.Integer.MAX_VALUE, warningOnly)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("label")) + this.label = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("direction")) + this.direction = new AssertionDirectionTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("compareToSourceId")) + this.compareToSourceId = castToString(value); // StringType + else if (name.equals("compareToSourcePath")) + this.compareToSourcePath = castToString(value); // StringType + else if (name.equals("contentType")) + this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("headerField")) + this.headerField = castToString(value); // StringType + else if (name.equals("minimumId")) + this.minimumId = castToString(value); // StringType + else if (name.equals("navigationLinks")) + this.navigationLinks = castToBoolean(value); // BooleanType + else if (name.equals("operator")) + this.operator = new AssertionOperatorTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("resource")) + this.resource = castToCode(value); // CodeType + else if (name.equals("response")) + this.response = new AssertionResponseTypesEnumFactory().fromType(value); // Enumeration + else if (name.equals("responseCode")) + this.responseCode = castToString(value); // StringType + else if (name.equals("sourceId")) + this.sourceId = castToId(value); // IdType + else if (name.equals("validateProfileId")) + this.validateProfileId = castToId(value); // IdType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("warningOnly")) + this.warningOnly = castToBoolean(value); // BooleanType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("label")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else if (name.equals("direction")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); + } + else if (name.equals("compareToSourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); + } + else if (name.equals("compareToSourcePath")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); + } + else if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); + } + else if (name.equals("headerField")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); + } + else if (name.equals("minimumId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); + } + else if (name.equals("navigationLinks")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); + } + else if (name.equals("operator")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); + } + else if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); + } + else if (name.equals("resource")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); + } + else if (name.equals("response")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); + } + else if (name.equals("responseCode")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); + } + else if (name.equals("sourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); + } + else if (name.equals("validateProfileId")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else if (name.equals("warningOnly")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); + } + else + return super.addChild(name); + } + + public TestScriptSetupActionAssertComponent copy() { + TestScriptSetupActionAssertComponent dst = new TestScriptSetupActionAssertComponent(); + copyValues(dst); + dst.label = label == null ? null : label.copy(); + dst.description = description == null ? null : description.copy(); + dst.direction = direction == null ? null : direction.copy(); + dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); + dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.headerField = headerField == null ? null : headerField.copy(); + dst.minimumId = minimumId == null ? null : minimumId.copy(); + dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); + dst.operator = operator == null ? null : operator.copy(); + dst.path = path == null ? null : path.copy(); + dst.resource = resource == null ? null : resource.copy(); + dst.response = response == null ? null : response.copy(); + dst.responseCode = responseCode == null ? null : responseCode.copy(); + dst.sourceId = sourceId == null ? null : sourceId.copy(); + dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); + dst.value = value == null ? null : value.copy(); + dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptSetupActionAssertComponent)) + return false; + TestScriptSetupActionAssertComponent o = (TestScriptSetupActionAssertComponent) other; + return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) + && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourcePath, o.compareToSourcePath, true) + && compareDeep(contentType, o.contentType, true) && compareDeep(headerField, o.headerField, true) + && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) + && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(resource, o.resource, true) + && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true) && compareDeep(sourceId, o.sourceId, true) + && compareDeep(validateProfileId, o.validateProfileId, true) && compareDeep(value, o.value, true) + && compareDeep(warningOnly, o.warningOnly, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptSetupActionAssertComponent)) + return false; + TestScriptSetupActionAssertComponent o = (TestScriptSetupActionAssertComponent) other; + return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) + && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourcePath, o.compareToSourcePath, true) + && compareValues(contentType, o.contentType, true) && compareValues(headerField, o.headerField, true) + && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) + && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(resource, o.resource, true) + && compareValues(response, o.response, true) && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) + && compareValues(validateProfileId, o.validateProfileId, true) && compareValues(value, o.value, true) + && compareValues(warningOnly, o.warningOnly, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) + && (direction == null || direction.isEmpty()) && (compareToSourceId == null || compareToSourceId.isEmpty()) + && (compareToSourcePath == null || compareToSourcePath.isEmpty()) && (contentType == null || contentType.isEmpty()) + && (headerField == null || headerField.isEmpty()) && (minimumId == null || minimumId.isEmpty()) + && (navigationLinks == null || navigationLinks.isEmpty()) && (operator == null || operator.isEmpty()) + && (path == null || path.isEmpty()) && (resource == null || resource.isEmpty()) && (response == null || response.isEmpty()) + && (responseCode == null || responseCode.isEmpty()) && (sourceId == null || sourceId.isEmpty()) + && (validateProfileId == null || validateProfileId.isEmpty()) && (value == null || value.isEmpty()) + && (warningOnly == null || warningOnly.isEmpty()); + } + + public String fhirType() { + return "TestScript.setup.action.assert"; + + } + + } + + @Block() + public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of this test used for tracking/logging purposes by test engines. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) + protected StringType name; + + /** + * A short description of the test used by test engines for tracking and reporting purposes. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Tracking/reporting short description of the test", formalDefinition="A short description of the test used by test engines for tracking and reporting purposes." ) + protected StringType description; + + /** + * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. + */ + @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Capabilities that are expected to function correctly on the FHIR server being tested", formalDefinition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." ) + protected TestScriptMetadataComponent metadata; + + /** + * Action would contain either an operation or an assertion. + */ + @Child(name = "action", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) + protected List action; + + private static final long serialVersionUID = 408339297L; + + /* + * Constructor + */ + public TestScriptTestComponent() { + super(); + } + + /** + * @return {@link #name} (The name of this test used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTestComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of this test used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScriptTestComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of this test used for tracking/logging purposes by test engines. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of this test used for tracking/logging purposes by test engines. + */ + public TestScriptTestComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the test used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTestComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the test used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScriptTestComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the test used by test engines for tracking and reporting purposes. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the test used by test engines for tracking and reporting purposes. + */ + public TestScriptTestComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScriptMetadataComponent getMetadata() { + if (this.metadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTestComponent.metadata"); + else if (Configuration.doAutoCreate()) + this.metadata = new TestScriptMetadataComponent(); // cc + return this.metadata; + } + + public boolean hasMetadata() { + return this.metadata != null && !this.metadata.isEmpty(); + } + + /** + * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScriptTestComponent setMetadata(TestScriptMetadataComponent value) { + this.metadata = value; + return this; + } + + /** + * @return {@link #action} (Action would contain either an operation or an assertion.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (TestScriptTestActionComponent item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Action would contain either an operation or an assertion.) + */ + // syntactic sugar + public TestScriptTestActionComponent addAction() { //3 + TestScriptTestActionComponent t = new TestScriptTestActionComponent(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public TestScriptTestComponent addAction(TestScriptTestActionComponent t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("metadata", "@TestScript.metadata", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); + childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("metadata")) + this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent + else if (name.equals("action")) + this.getAction().add((TestScriptTestActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else if (name.equals("metadata")) { + this.metadata = new TestScriptMetadataComponent(); + return this.metadata; + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public TestScriptTestComponent copy() { + TestScriptTestComponent dst = new TestScriptTestComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + dst.metadata = metadata == null ? null : metadata.copy(); + if (action != null) { + dst.action = new ArrayList(); + for (TestScriptTestActionComponent i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptTestComponent)) + return false; + TestScriptTestComponent o = (TestScriptTestComponent) other; + return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(metadata, o.metadata, true) + && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptTestComponent)) + return false; + TestScriptTestComponent o = (TestScriptTestComponent) other; + return compareValues(name, o.name, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) + && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()); + } + + public String fhirType() { + return "TestScript.test"; + + } + + } + + @Block() + public static class TestScriptTestActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An operation would involve a REST request to a server. + */ + @Child(name = "operation", type = {TestScriptSetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) + protected TestScriptSetupActionOperationComponent operation; + + /** + * Evaluates the results of previous operations to determine if the server under test behaves appropriately. + */ + @Child(name = "assert", type = {TestScriptSetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) + protected TestScriptSetupActionAssertComponent assert_; + + private static final long serialVersionUID = 1411550037L; + + /* + * Constructor + */ + public TestScriptTestActionComponent() { + super(); + } + + /** + * @return {@link #operation} (An operation would involve a REST request to a server.) + */ + public TestScriptSetupActionOperationComponent getOperation() { + if (this.operation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTestActionComponent.operation"); + else if (Configuration.doAutoCreate()) + this.operation = new TestScriptSetupActionOperationComponent(); // cc + return this.operation; + } + + public boolean hasOperation() { + return this.operation != null && !this.operation.isEmpty(); + } + + /** + * @param value {@link #operation} (An operation would involve a REST request to a server.) + */ + public TestScriptTestActionComponent setOperation(TestScriptSetupActionOperationComponent value) { + this.operation = value; + return this; + } + + /** + * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) + */ + public TestScriptSetupActionAssertComponent getAssert() { + if (this.assert_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTestActionComponent.assert_"); + else if (Configuration.doAutoCreate()) + this.assert_ = new TestScriptSetupActionAssertComponent(); // cc + return this.assert_; + } + + public boolean hasAssert() { + return this.assert_ != null && !this.assert_.isEmpty(); + } + + /** + * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) + */ + public TestScriptTestActionComponent setAssert(TestScriptSetupActionAssertComponent value) { + this.assert_ = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); + childrenList.add(new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("operation")) + this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent + else if (name.equals("assert")) + this.assert_ = (TestScriptSetupActionAssertComponent) value; // TestScriptSetupActionAssertComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("operation")) { + this.operation = new TestScriptSetupActionOperationComponent(); + return this.operation; + } + else if (name.equals("assert")) { + this.assert_ = new TestScriptSetupActionAssertComponent(); + return this.assert_; + } + else + return super.addChild(name); + } + + public TestScriptTestActionComponent copy() { + TestScriptTestActionComponent dst = new TestScriptTestActionComponent(); + copyValues(dst); + dst.operation = operation == null ? null : operation.copy(); + dst.assert_ = assert_ == null ? null : assert_.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptTestActionComponent)) + return false; + TestScriptTestActionComponent o = (TestScriptTestActionComponent) other; + return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptTestActionComponent)) + return false; + TestScriptTestActionComponent o = (TestScriptTestActionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) + ; + } + + public String fhirType() { + return "TestScript.test.action"; + + } + + } + + @Block() + public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The teardown action will only contain an operation. + */ + @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) + protected List action; + + private static final long serialVersionUID = 1850225254L; + + /* + * Constructor + */ + public TestScriptTeardownComponent() { + super(); + } + + /** + * @return {@link #action} (The teardown action will only contain an operation.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (TestScriptTeardownActionComponent item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (The teardown action will only contain an operation.) + */ + // syntactic sugar + public TestScriptTeardownActionComponent addAction() { //3 + TestScriptTeardownActionComponent t = new TestScriptTeardownActionComponent(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public TestScriptTeardownComponent addAction(TestScriptTeardownActionComponent t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("action")) + this.getAction().add((TestScriptTeardownActionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public TestScriptTeardownComponent copy() { + TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); + copyValues(dst); + if (action != null) { + dst.action = new ArrayList(); + for (TestScriptTeardownActionComponent i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptTeardownComponent)) + return false; + TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; + return compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptTeardownComponent)) + return false; + TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()); + } + + public String fhirType() { + return "TestScript.teardown"; + + } + + } + + @Block() + public static class TestScriptTeardownActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An operation would involve a REST request to a server. + */ + @Child(name = "operation", type = {TestScriptSetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) + protected TestScriptSetupActionOperationComponent operation; + + private static final long serialVersionUID = 1684092023L; + + /* + * Constructor + */ + public TestScriptTeardownActionComponent() { + super(); + } + + /** + * @return {@link #operation} (An operation would involve a REST request to a server.) + */ + public TestScriptSetupActionOperationComponent getOperation() { + if (this.operation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptTeardownActionComponent.operation"); + else if (Configuration.doAutoCreate()) + this.operation = new TestScriptSetupActionOperationComponent(); // cc + return this.operation; + } + + public boolean hasOperation() { + return this.operation != null && !this.operation.isEmpty(); + } + + /** + * @param value {@link #operation} (An operation would involve a REST request to a server.) + */ + public TestScriptTeardownActionComponent setOperation(TestScriptSetupActionOperationComponent value) { + this.operation = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("operation")) + this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("operation")) { + this.operation = new TestScriptSetupActionOperationComponent(); + return this.operation; + } + else + return super.addChild(name); + } + + public TestScriptTeardownActionComponent copy() { + TestScriptTeardownActionComponent dst = new TestScriptTeardownActionComponent(); + copyValues(dst); + dst.operation = operation == null ? null : operation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptTeardownActionComponent)) + return false; + TestScriptTeardownActionComponent o = (TestScriptTeardownActionComponent) other; + return compareDeep(operation, o.operation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptTeardownActionComponent)) + return false; + TestScriptTeardownActionComponent o = (TestScriptTeardownActionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (operation == null || operation.isEmpty()); + } + + public String fhirType() { + return "TestScript.teardown.action"; + + } + + } + + /** + * An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this TestScript", formalDefinition="An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published." ) + protected UriType url; + + /** + * The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. + */ + @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the TestScript", formalDefinition="The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually." ) + protected StringType version; + + /** + * A free text natural language name identifying the TestScript. + */ + @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this TestScript", formalDefinition="A free text natural language name identifying the TestScript." ) + protected StringType name; + + /** + * The status of the TestScript. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the TestScript." ) + protected Enumeration status; + + /** + * Identifier for the TestScript assigned for external purposes outside the context of FHIR. + */ + @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="External identifier", formalDefinition="Identifier for the TestScript assigned for external purposes outside the context of FHIR." ) + protected Identifier identifier; + + /** + * This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the Test Script. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the Test Script." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for this version of the TestScript", formalDefinition="The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change." ) + protected DateTimeType date; + + /** + * A free text natural language description of the TestScript and its use. + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Natural language description of the TestScript", formalDefinition="A free text natural language description of the TestScript and its use." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts." ) + protected List useContext; + + /** + * Explains why this Test Script is needed and why it's been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Scope and Usage this Test Script is for", formalDefinition="Explains why this Test Script is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) + protected StringType copyright; + + /** + * The required capability must exist and are assumed to function correctly on the FHIR server being tested. + */ + @Child(name = "metadata", type = {}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Required capability that is assumed to function correctly on the FHIR server being tested", formalDefinition="The required capability must exist and are assumed to function correctly on the FHIR server being tested." ) + protected TestScriptMetadataComponent metadata; + + /** + * An abstract server used in operations within this test script in the origin element. + */ + @Child(name = "origin", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="An abstract server representing a client or sender in a message exchange", formalDefinition="An abstract server used in operations within this test script in the origin element." ) + protected List origin; + + /** + * An abstract server used in operations within this test script in the destination element. + */ + @Child(name = "destination", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="An abstract server representing a destination or receiver in a message exchange", formalDefinition="An abstract server used in operations within this test script in the destination element." ) + protected List destination; + + /** + * If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. + */ + @Child(name = "multiserver", type = {BooleanType.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether or not the tests apply to more than one FHIR server", formalDefinition="If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified." ) + protected BooleanType multiserver; + + /** + * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. + */ + @Child(name = "fixture", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Fixture in the test script - by reference (uri)", formalDefinition="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute." ) + protected List fixture; + + /** + * Reference to the profile to be used for validation. + */ + @Child(name = "profile", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) + protected List profile; + /** + * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) + */ + protected List profileTarget; + + + /** + * Variable is set based either on element value in response body or on header field value in the response headers. + */ + @Child(name = "variable", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Placeholder for evaluated elements", formalDefinition="Variable is set based either on element value in response body or on header field value in the response headers." ) + protected List variable; + + /** + * A series of required setup operations before tests are executed. + */ + @Child(name = "setup", type = {}, order=20, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) + protected TestScriptSetupComponent setup; + + /** + * A test in this script. + */ + @Child(name = "test", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) + protected List test; + + /** + * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). + */ + @Child(name = "teardown", type = {}, order=22, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)." ) + protected TestScriptTeardownComponent teardown; + + private static final long serialVersionUID = -1185376163L; + + /* + * Constructor + */ + public TestScript() { + super(); + } + + /* + * Constructor + */ + public TestScript(UriType url, StringType name, Enumeration status) { + super(); + this.url = url; + this.name = name; + this.status = status; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public TestScript setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. + */ + public TestScript setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public TestScript setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. + */ + public TestScript setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the TestScript.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the TestScript.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScript setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the TestScript. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the TestScript. + */ + public TestScript setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the TestScript.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the TestScript.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public TestScript setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the TestScript. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the TestScript. + */ + public TestScript setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) + */ + public TestScript setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #experimental} (This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public TestScript setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public TestScript setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the Test Script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the Test Script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public TestScript setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the Test Script. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the Test Script. + */ + public TestScript setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (TestScriptContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public TestScriptContactComponent addContact() { //3 + TestScriptContactComponent t = new TestScriptContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public TestScript addContact(TestScriptContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public TestScript setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. + */ + public TestScript setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the TestScript and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the TestScript and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public TestScript setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the TestScript and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the TestScript and its use. + */ + public TestScript setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public TestScript addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #requirements} (Explains why this Test Script is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this Test Script is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public TestScript setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this Test Script is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this Test Script is needed and why it's been constrained as it has. + */ + public TestScript setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public TestScript setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public TestScript setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScriptMetadataComponent getMetadata() { + if (this.metadata == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.metadata"); + else if (Configuration.doAutoCreate()) + this.metadata = new TestScriptMetadataComponent(); // cc + return this.metadata; + } + + public boolean hasMetadata() { + return this.metadata != null && !this.metadata.isEmpty(); + } + + /** + * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) + */ + public TestScript setMetadata(TestScriptMetadataComponent value) { + this.metadata = value; + return this; + } + + /** + * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) + */ + public List getOrigin() { + if (this.origin == null) + this.origin = new ArrayList(); + return this.origin; + } + + public boolean hasOrigin() { + if (this.origin == null) + return false; + for (TestScriptOriginComponent item : this.origin) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) + */ + // syntactic sugar + public TestScriptOriginComponent addOrigin() { //3 + TestScriptOriginComponent t = new TestScriptOriginComponent(); + if (this.origin == null) + this.origin = new ArrayList(); + this.origin.add(t); + return t; + } + + // syntactic sugar + public TestScript addOrigin(TestScriptOriginComponent t) { //3 + if (t == null) + return this; + if (this.origin == null) + this.origin = new ArrayList(); + this.origin.add(t); + return this; + } + + /** + * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) + */ + public List getDestination() { + if (this.destination == null) + this.destination = new ArrayList(); + return this.destination; + } + + public boolean hasDestination() { + if (this.destination == null) + return false; + for (TestScriptDestinationComponent item : this.destination) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) + */ + // syntactic sugar + public TestScriptDestinationComponent addDestination() { //3 + TestScriptDestinationComponent t = new TestScriptDestinationComponent(); + if (this.destination == null) + this.destination = new ArrayList(); + this.destination.add(t); + return t; + } + + // syntactic sugar + public TestScript addDestination(TestScriptDestinationComponent t) { //3 + if (t == null) + return this; + if (this.destination == null) + this.destination = new ArrayList(); + this.destination.add(t); + return this; + } + + /** + * @return {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value + */ + public BooleanType getMultiserverElement() { + if (this.multiserver == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.multiserver"); + else if (Configuration.doAutoCreate()) + this.multiserver = new BooleanType(); // bb + return this.multiserver; + } + + public boolean hasMultiserverElement() { + return this.multiserver != null && !this.multiserver.isEmpty(); + } + + public boolean hasMultiserver() { + return this.multiserver != null && !this.multiserver.isEmpty(); + } + + /** + * @param value {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value + */ + public TestScript setMultiserverElement(BooleanType value) { + this.multiserver = value; + return this; + } + + /** + * @return If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. + */ + public boolean getMultiserver() { + return this.multiserver == null || this.multiserver.isEmpty() ? false : this.multiserver.getValue(); + } + + /** + * @param value If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. + */ + public TestScript setMultiserver(boolean value) { + if (this.multiserver == null) + this.multiserver = new BooleanType(); + this.multiserver.setValue(value); + return this; + } + + /** + * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) + */ + public List getFixture() { + if (this.fixture == null) + this.fixture = new ArrayList(); + return this.fixture; + } + + public boolean hasFixture() { + if (this.fixture == null) + return false; + for (TestScriptFixtureComponent item : this.fixture) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) + */ + // syntactic sugar + public TestScriptFixtureComponent addFixture() { //3 + TestScriptFixtureComponent t = new TestScriptFixtureComponent(); + if (this.fixture == null) + this.fixture = new ArrayList(); + this.fixture.add(t); + return t; + } + + // syntactic sugar + public TestScript addFixture(TestScriptFixtureComponent t) { //3 + if (t == null) + return this; + if (this.fixture == null) + this.fixture = new ArrayList(); + this.fixture.add(t); + return this; + } + + /** + * @return {@link #profile} (Reference to the profile to be used for validation.) + */ + public List getProfile() { + if (this.profile == null) + this.profile = new ArrayList(); + return this.profile; + } + + public boolean hasProfile() { + if (this.profile == null) + return false; + for (Reference item : this.profile) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #profile} (Reference to the profile to be used for validation.) + */ + // syntactic sugar + public Reference addProfile() { //3 + Reference t = new Reference(); + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return t; + } + + // syntactic sugar + public TestScript addProfile(Reference t) { //3 + if (t == null) + return this; + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return this; + } + + /** + * @return {@link #profile} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Reference to the profile to be used for validation.) + */ + public List getProfileTarget() { + if (this.profileTarget == null) + this.profileTarget = new ArrayList(); + return this.profileTarget; + } + + /** + * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) + */ + public List getVariable() { + if (this.variable == null) + this.variable = new ArrayList(); + return this.variable; + } + + public boolean hasVariable() { + if (this.variable == null) + return false; + for (TestScriptVariableComponent item : this.variable) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) + */ + // syntactic sugar + public TestScriptVariableComponent addVariable() { //3 + TestScriptVariableComponent t = new TestScriptVariableComponent(); + if (this.variable == null) + this.variable = new ArrayList(); + this.variable.add(t); + return t; + } + + // syntactic sugar + public TestScript addVariable(TestScriptVariableComponent t) { //3 + if (t == null) + return this; + if (this.variable == null) + this.variable = new ArrayList(); + this.variable.add(t); + return this; + } + + /** + * @return {@link #setup} (A series of required setup operations before tests are executed.) + */ + public TestScriptSetupComponent getSetup() { + if (this.setup == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.setup"); + else if (Configuration.doAutoCreate()) + this.setup = new TestScriptSetupComponent(); // cc + return this.setup; + } + + public boolean hasSetup() { + return this.setup != null && !this.setup.isEmpty(); + } + + /** + * @param value {@link #setup} (A series of required setup operations before tests are executed.) + */ + public TestScript setSetup(TestScriptSetupComponent value) { + this.setup = value; + return this; + } + + /** + * @return {@link #test} (A test in this script.) + */ + public List getTest() { + if (this.test == null) + this.test = new ArrayList(); + return this.test; + } + + public boolean hasTest() { + if (this.test == null) + return false; + for (TestScriptTestComponent item : this.test) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #test} (A test in this script.) + */ + // syntactic sugar + public TestScriptTestComponent addTest() { //3 + TestScriptTestComponent t = new TestScriptTestComponent(); + if (this.test == null) + this.test = new ArrayList(); + this.test.add(t); + return t; + } + + // syntactic sugar + public TestScript addTest(TestScriptTestComponent t) { //3 + if (t == null) + return this; + if (this.test == null) + this.test = new ArrayList(); + this.test.add(t); + return this; + } + + /** + * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) + */ + public TestScriptTeardownComponent getTeardown() { + if (this.teardown == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScript.teardown"); + else if (Configuration.doAutoCreate()) + this.teardown = new TestScriptTeardownComponent(); // cc + return this.teardown; + } + + public boolean hasTeardown() { + return this.teardown != null && !this.teardown.isEmpty(); + } + + /** + * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) + */ + public TestScript setTeardown(TestScriptTeardownComponent value) { + this.teardown = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the TestScript.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the TestScript.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("identifier", "Identifier", "Identifier for the TestScript assigned for external purposes outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("experimental", "boolean", "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the Test Script.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the TestScript and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("requirements", "string", "Explains why this Test Script is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); + childrenList.add(new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin)); + childrenList.add(new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination)); + childrenList.add(new Property("multiserver", "boolean", "If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.", 0, java.lang.Integer.MAX_VALUE, multiserver)); + childrenList.add(new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture)); + childrenList.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable)); + childrenList.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, java.lang.Integer.MAX_VALUE, setup)); + childrenList.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); + childrenList.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, java.lang.Integer.MAX_VALUE, teardown)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((TestScriptContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("metadata")) + this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent + else if (name.equals("origin")) + this.getOrigin().add((TestScriptOriginComponent) value); + else if (name.equals("destination")) + this.getDestination().add((TestScriptDestinationComponent) value); + else if (name.equals("multiserver")) + this.multiserver = castToBoolean(value); // BooleanType + else if (name.equals("fixture")) + this.getFixture().add((TestScriptFixtureComponent) value); + else if (name.equals("profile")) + this.getProfile().add(castToReference(value)); + else if (name.equals("variable")) + this.getVariable().add((TestScriptVariableComponent) value); + else if (name.equals("setup")) + this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent + else if (name.equals("test")) + this.getTest().add((TestScriptTestComponent) value); + else if (name.equals("teardown")) + this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); + } + else if (name.equals("metadata")) { + this.metadata = new TestScriptMetadataComponent(); + return this.metadata; + } + else if (name.equals("origin")) { + return addOrigin(); + } + else if (name.equals("destination")) { + return addDestination(); + } + else if (name.equals("multiserver")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.multiserver"); + } + else if (name.equals("fixture")) { + return addFixture(); + } + else if (name.equals("profile")) { + return addProfile(); + } + else if (name.equals("variable")) { + return addVariable(); + } + else if (name.equals("setup")) { + this.setup = new TestScriptSetupComponent(); + return this.setup; + } + else if (name.equals("test")) { + return addTest(); + } + else if (name.equals("teardown")) { + this.teardown = new TestScriptTeardownComponent(); + return this.teardown; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "TestScript"; + + } + + public TestScript copy() { + TestScript dst = new TestScript(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (TestScriptContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + dst.metadata = metadata == null ? null : metadata.copy(); + if (origin != null) { + dst.origin = new ArrayList(); + for (TestScriptOriginComponent i : origin) + dst.origin.add(i.copy()); + }; + if (destination != null) { + dst.destination = new ArrayList(); + for (TestScriptDestinationComponent i : destination) + dst.destination.add(i.copy()); + }; + dst.multiserver = multiserver == null ? null : multiserver.copy(); + if (fixture != null) { + dst.fixture = new ArrayList(); + for (TestScriptFixtureComponent i : fixture) + dst.fixture.add(i.copy()); + }; + if (profile != null) { + dst.profile = new ArrayList(); + for (Reference i : profile) + dst.profile.add(i.copy()); + }; + if (variable != null) { + dst.variable = new ArrayList(); + for (TestScriptVariableComponent i : variable) + dst.variable.add(i.copy()); + }; + dst.setup = setup == null ? null : setup.copy(); + if (test != null) { + dst.test = new ArrayList(); + for (TestScriptTestComponent i : test) + dst.test.add(i.copy()); + }; + dst.teardown = teardown == null ? null : teardown.copy(); + return dst; + } + + protected TestScript typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScript)) + return false; + TestScript o = (TestScript) other; + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(status, o.status, true) && compareDeep(identifier, o.identifier, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(metadata, o.metadata, true) && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) + && compareDeep(multiserver, o.multiserver, true) && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) + && compareDeep(variable, o.variable, true) && compareDeep(setup, o.setup, true) && compareDeep(test, o.test, true) + && compareDeep(teardown, o.teardown, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScript)) + return false; + TestScript o = (TestScript) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(multiserver, o.multiserver, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) + && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (metadata == null || metadata.isEmpty()) + && (origin == null || origin.isEmpty()) && (destination == null || destination.isEmpty()) + && (multiserver == null || multiserver.isEmpty()) && (fixture == null || fixture.isEmpty()) + && (profile == null || profile.isEmpty()) && (variable == null || variable.isEmpty()) && (setup == null || setup.isEmpty()) + && (test == null || test.isEmpty()) && (teardown == null || teardown.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.TestScript; + } + + @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="testscript-test-capability", path="TestScript.test.metadata.capability.description", description="TestScript test required and validated capability", type="string" ) + public static final String SP_TESTSCRIPTTESTCAPABILITY = "testscript-test-capability"; + @SearchParamDefinition(name="testscript-setup-capability", path="TestScript.setup.metadata.capability.description", description="TestScript setup required and validated capability", type="string" ) + public static final String SP_TESTSCRIPTSETUPCAPABILITY = "testscript-setup-capability"; + @SearchParamDefinition(name="name", path="TestScript.name", description="Informal name for this TestScript", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="description", path="TestScript.description", description="Natural language description of the TestScript", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) + public static final String SP_TESTSCRIPTCAPABILITY = "testscript-capability"; + @SearchParamDefinition(name="url", path="TestScript.url", description="Absolute URL used to reference this TestScript", type="uri" ) + public static final String SP_URL = "url"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TimeType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TimeType.java new file mode 100644 index 00000000000..7a0e3518b54 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/TimeType.java @@ -0,0 +1,76 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +package org.hl7.fhir.dstu21.model; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a Time datatype, per the FHIR specification. A time is a specification of hours and minutes (and optionally milliseconds), with NO date and NO timezone information attached. It is + * expressed as a string in the form HH:mm:ss[.SSSS] + */ +@DatatypeDef(name="time") +public class TimeType extends PrimitiveType { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public TimeType() { + // nothing + } + + /** + * Constructor + */ + public TimeType(String theValue) { + setValue(theValue); + } + + @Override + protected String parse(String theValue) { + return theValue; + } + + @Override + protected String encode(String theValue) { + return theValue; + } + + @Override + public TimeType copy() { + return new TimeType(getValue()); + } + + public String fhirType() { + return "time"; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Timing.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Timing.java new file mode 100644 index 00000000000..c7c37784017 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Timing.java @@ -0,0 +1,1555 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. + */ +@DatatypeDef(name="Timing") +public class Timing extends Type implements ICompositeType { + + public enum UnitsOfTime { + /** + * null + */ + S, + /** + * null + */ + MIN, + /** + * null + */ + H, + /** + * null + */ + D, + /** + * null + */ + WK, + /** + * null + */ + MO, + /** + * null + */ + A, + /** + * added to help the parsers + */ + NULL; + public static UnitsOfTime fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("s".equals(codeString)) + return S; + if ("min".equals(codeString)) + return MIN; + if ("h".equals(codeString)) + return H; + if ("d".equals(codeString)) + return D; + if ("wk".equals(codeString)) + return WK; + if ("mo".equals(codeString)) + return MO; + if ("a".equals(codeString)) + return A; + throw new FHIRException("Unknown UnitsOfTime code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case S: return "s"; + case MIN: return "min"; + case H: return "h"; + case D: return "d"; + case WK: return "wk"; + case MO: return "mo"; + case A: return "a"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case S: return "http://unitsofmeasure.org"; + case MIN: return "http://unitsofmeasure.org"; + case H: return "http://unitsofmeasure.org"; + case D: return "http://unitsofmeasure.org"; + case WK: return "http://unitsofmeasure.org"; + case MO: return "http://unitsofmeasure.org"; + case A: return "http://unitsofmeasure.org"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case S: return ""; + case MIN: return ""; + case H: return ""; + case D: return ""; + case WK: return ""; + case MO: return ""; + case A: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case S: return "s"; + case MIN: return "min"; + case H: return "h"; + case D: return "d"; + case WK: return "wk"; + case MO: return "mo"; + case A: return "a"; + default: return "?"; + } + } + } + + public static class UnitsOfTimeEnumFactory implements EnumFactory { + public UnitsOfTime fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("s".equals(codeString)) + return UnitsOfTime.S; + if ("min".equals(codeString)) + return UnitsOfTime.MIN; + if ("h".equals(codeString)) + return UnitsOfTime.H; + if ("d".equals(codeString)) + return UnitsOfTime.D; + if ("wk".equals(codeString)) + return UnitsOfTime.WK; + if ("mo".equals(codeString)) + return UnitsOfTime.MO; + if ("a".equals(codeString)) + return UnitsOfTime.A; + throw new IllegalArgumentException("Unknown UnitsOfTime code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("s".equals(codeString)) + return new Enumeration(this, UnitsOfTime.S); + if ("min".equals(codeString)) + return new Enumeration(this, UnitsOfTime.MIN); + if ("h".equals(codeString)) + return new Enumeration(this, UnitsOfTime.H); + if ("d".equals(codeString)) + return new Enumeration(this, UnitsOfTime.D); + if ("wk".equals(codeString)) + return new Enumeration(this, UnitsOfTime.WK); + if ("mo".equals(codeString)) + return new Enumeration(this, UnitsOfTime.MO); + if ("a".equals(codeString)) + return new Enumeration(this, UnitsOfTime.A); + throw new FHIRException("Unknown UnitsOfTime code '"+codeString+"'"); + } + public String toCode(UnitsOfTime code) { + if (code == UnitsOfTime.S) + return "s"; + if (code == UnitsOfTime.MIN) + return "min"; + if (code == UnitsOfTime.H) + return "h"; + if (code == UnitsOfTime.D) + return "d"; + if (code == UnitsOfTime.WK) + return "wk"; + if (code == UnitsOfTime.MO) + return "mo"; + if (code == UnitsOfTime.A) + return "a"; + return "?"; + } + } + + public enum EventTiming { + /** + * null + */ + HS, + /** + * null + */ + WAKE, + /** + * null + */ + C, + /** + * null + */ + CM, + /** + * null + */ + CD, + /** + * null + */ + CV, + /** + * null + */ + AC, + /** + * null + */ + ACM, + /** + * null + */ + ACD, + /** + * null + */ + ACV, + /** + * null + */ + PC, + /** + * null + */ + PCM, + /** + * null + */ + PCD, + /** + * null + */ + PCV, + /** + * added to help the parsers + */ + NULL; + public static EventTiming fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("HS".equals(codeString)) + return HS; + if ("WAKE".equals(codeString)) + return WAKE; + if ("C".equals(codeString)) + return C; + if ("CM".equals(codeString)) + return CM; + if ("CD".equals(codeString)) + return CD; + if ("CV".equals(codeString)) + return CV; + if ("AC".equals(codeString)) + return AC; + if ("ACM".equals(codeString)) + return ACM; + if ("ACD".equals(codeString)) + return ACD; + if ("ACV".equals(codeString)) + return ACV; + if ("PC".equals(codeString)) + return PC; + if ("PCM".equals(codeString)) + return PCM; + if ("PCD".equals(codeString)) + return PCD; + if ("PCV".equals(codeString)) + return PCV; + throw new FHIRException("Unknown EventTiming code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HS: return "HS"; + case WAKE: return "WAKE"; + case C: return "C"; + case CM: return "CM"; + case CD: return "CD"; + case CV: return "CV"; + case AC: return "AC"; + case ACM: return "ACM"; + case ACD: return "ACD"; + case ACV: return "ACV"; + case PC: return "PC"; + case PCM: return "PCM"; + case PCD: return "PCD"; + case PCV: return "PCV"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case HS: return "http://hl7.org/fhir/v3/TimingEvent"; + case WAKE: return "http://hl7.org/fhir/v3/TimingEvent"; + case C: return "http://hl7.org/fhir/v3/TimingEvent"; + case CM: return "http://hl7.org/fhir/v3/TimingEvent"; + case CD: return "http://hl7.org/fhir/v3/TimingEvent"; + case CV: return "http://hl7.org/fhir/v3/TimingEvent"; + case AC: return "http://hl7.org/fhir/v3/TimingEvent"; + case ACM: return "http://hl7.org/fhir/v3/TimingEvent"; + case ACD: return "http://hl7.org/fhir/v3/TimingEvent"; + case ACV: return "http://hl7.org/fhir/v3/TimingEvent"; + case PC: return "http://hl7.org/fhir/v3/TimingEvent"; + case PCM: return "http://hl7.org/fhir/v3/TimingEvent"; + case PCD: return "http://hl7.org/fhir/v3/TimingEvent"; + case PCV: return "http://hl7.org/fhir/v3/TimingEvent"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case HS: return ""; + case WAKE: return ""; + case C: return ""; + case CM: return ""; + case CD: return ""; + case CV: return ""; + case AC: return ""; + case ACM: return ""; + case ACD: return ""; + case ACV: return ""; + case PC: return ""; + case PCM: return ""; + case PCD: return ""; + case PCV: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HS: return "HS"; + case WAKE: return "WAKE"; + case C: return "C"; + case CM: return "CM"; + case CD: return "CD"; + case CV: return "CV"; + case AC: return "AC"; + case ACM: return "ACM"; + case ACD: return "ACD"; + case ACV: return "ACV"; + case PC: return "PC"; + case PCM: return "PCM"; + case PCD: return "PCD"; + case PCV: return "PCV"; + default: return "?"; + } + } + } + + public static class EventTimingEnumFactory implements EnumFactory { + public EventTiming fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("HS".equals(codeString)) + return EventTiming.HS; + if ("WAKE".equals(codeString)) + return EventTiming.WAKE; + if ("C".equals(codeString)) + return EventTiming.C; + if ("CM".equals(codeString)) + return EventTiming.CM; + if ("CD".equals(codeString)) + return EventTiming.CD; + if ("CV".equals(codeString)) + return EventTiming.CV; + if ("AC".equals(codeString)) + return EventTiming.AC; + if ("ACM".equals(codeString)) + return EventTiming.ACM; + if ("ACD".equals(codeString)) + return EventTiming.ACD; + if ("ACV".equals(codeString)) + return EventTiming.ACV; + if ("PC".equals(codeString)) + return EventTiming.PC; + if ("PCM".equals(codeString)) + return EventTiming.PCM; + if ("PCD".equals(codeString)) + return EventTiming.PCD; + if ("PCV".equals(codeString)) + return EventTiming.PCV; + throw new IllegalArgumentException("Unknown EventTiming code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("HS".equals(codeString)) + return new Enumeration(this, EventTiming.HS); + if ("WAKE".equals(codeString)) + return new Enumeration(this, EventTiming.WAKE); + if ("C".equals(codeString)) + return new Enumeration(this, EventTiming.C); + if ("CM".equals(codeString)) + return new Enumeration(this, EventTiming.CM); + if ("CD".equals(codeString)) + return new Enumeration(this, EventTiming.CD); + if ("CV".equals(codeString)) + return new Enumeration(this, EventTiming.CV); + if ("AC".equals(codeString)) + return new Enumeration(this, EventTiming.AC); + if ("ACM".equals(codeString)) + return new Enumeration(this, EventTiming.ACM); + if ("ACD".equals(codeString)) + return new Enumeration(this, EventTiming.ACD); + if ("ACV".equals(codeString)) + return new Enumeration(this, EventTiming.ACV); + if ("PC".equals(codeString)) + return new Enumeration(this, EventTiming.PC); + if ("PCM".equals(codeString)) + return new Enumeration(this, EventTiming.PCM); + if ("PCD".equals(codeString)) + return new Enumeration(this, EventTiming.PCD); + if ("PCV".equals(codeString)) + return new Enumeration(this, EventTiming.PCV); + throw new FHIRException("Unknown EventTiming code '"+codeString+"'"); + } + public String toCode(EventTiming code) { + if (code == EventTiming.HS) + return "HS"; + if (code == EventTiming.WAKE) + return "WAKE"; + if (code == EventTiming.C) + return "C"; + if (code == EventTiming.CM) + return "CM"; + if (code == EventTiming.CD) + return "CD"; + if (code == EventTiming.CV) + return "CV"; + if (code == EventTiming.AC) + return "AC"; + if (code == EventTiming.ACM) + return "ACM"; + if (code == EventTiming.ACD) + return "ACD"; + if (code == EventTiming.ACV) + return "ACV"; + if (code == EventTiming.PC) + return "PC"; + if (code == EventTiming.PCM) + return "PCM"; + if (code == EventTiming.PCD) + return "PCD"; + if (code == EventTiming.PCV) + return "PCV"; + return "?"; + } + } + + @Block() + public static class TimingRepeatComponent extends Element implements IBaseDatatypeElement { + /** + * Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule. + */ + @Child(name = "bounds", type = {Duration.class, Range.class, Period.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Length/Range of lengths, or (Start and/or end) limits", formalDefinition="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule." ) + protected Type bounds; + + /** + * A total count of the desired number of repetitions. + */ + @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of times to repeat", formalDefinition="A total count of the desired number of repetitions." ) + protected IntegerType count; + + /** + * How long this thing happens for when it happens. + */ + @Child(name = "duration", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How long when it happens", formalDefinition="How long this thing happens for when it happens." ) + protected DecimalType duration; + + /** + * The upper limit of how long this thing happens for when it happens. + */ + @Child(name = "durationMax", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How long when it happens (Max)", formalDefinition="The upper limit of how long this thing happens for when it happens." ) + protected DecimalType durationMax; + + /** + * The units of time for the duration, in UCUM units. + */ + @Child(name = "durationUnits", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)", formalDefinition="The units of time for the duration, in UCUM units." ) + protected Enumeration durationUnits; + + /** + * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided). + */ + @Child(name = "frequency", type = {IntegerType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Event occurs frequency times per period", formalDefinition="The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided)." ) + protected IntegerType frequency; + + /** + * If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range. + */ + @Child(name = "frequencyMax", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Event occurs up to frequencyMax times per period", formalDefinition="If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range." ) + protected IntegerType frequencyMax; + + /** + * Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. + */ + @Child(name = "period", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Event occurs frequency times per period", formalDefinition="Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period." ) + protected DecimalType period; + + /** + * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. + */ + @Child(name = "periodMax", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Upper limit of period (3-4 hours)", formalDefinition="If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days." ) + protected DecimalType periodMax; + + /** + * The units of time for the period in UCUM units. + */ + @Child(name = "periodUnits", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)", formalDefinition="The units of time for the period in UCUM units." ) + protected Enumeration periodUnits; + + /** + * A real world event that the occurrence of the event should be tied to. + */ + @Child(name = "when", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Regular life events the event is tied to", formalDefinition="A real world event that the occurrence of the event should be tied to." ) + protected Enumeration when; + + private static final long serialVersionUID = -585686982L; + + /* + * Constructor + */ + public TimingRepeatComponent() { + super(); + } + + /** + * @return {@link #bounds} (Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.) + */ + public Type getBounds() { + return this.bounds; + } + + /** + * @return {@link #bounds} (Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.) + */ + public Duration getBoundsDuration() throws FHIRException { + if (!(this.bounds instanceof Duration)) + throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.bounds.getClass().getName()+" was encountered"); + return (Duration) this.bounds; + } + + public boolean hasBoundsDuration() { + return this.bounds instanceof Duration; + } + + /** + * @return {@link #bounds} (Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.) + */ + public Range getBoundsRange() throws FHIRException { + if (!(this.bounds instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.bounds.getClass().getName()+" was encountered"); + return (Range) this.bounds; + } + + public boolean hasBoundsRange() { + return this.bounds instanceof Range; + } + + /** + * @return {@link #bounds} (Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.) + */ + public Period getBoundsPeriod() throws FHIRException { + if (!(this.bounds instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.bounds.getClass().getName()+" was encountered"); + return (Period) this.bounds; + } + + public boolean hasBoundsPeriod() { + return this.bounds instanceof Period; + } + + public boolean hasBounds() { + return this.bounds != null && !this.bounds.isEmpty(); + } + + /** + * @param value {@link #bounds} (Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.) + */ + public TimingRepeatComponent setBounds(Type value) { + this.bounds = value; + return this; + } + + /** + * @return {@link #count} (A total count of the desired number of repetitions.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public IntegerType getCountElement() { + if (this.count == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.count"); + else if (Configuration.doAutoCreate()) + this.count = new IntegerType(); // bb + return this.count; + } + + public boolean hasCountElement() { + return this.count != null && !this.count.isEmpty(); + } + + public boolean hasCount() { + return this.count != null && !this.count.isEmpty(); + } + + /** + * @param value {@link #count} (A total count of the desired number of repetitions.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public TimingRepeatComponent setCountElement(IntegerType value) { + this.count = value; + return this; + } + + /** + * @return A total count of the desired number of repetitions. + */ + public int getCount() { + return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); + } + + /** + * @param value A total count of the desired number of repetitions. + */ + public TimingRepeatComponent setCount(int value) { + if (this.count == null) + this.count = new IntegerType(); + this.count.setValue(value); + return this; + } + + /** + * @return {@link #duration} (How long this thing happens for when it happens.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public DecimalType getDurationElement() { + if (this.duration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.duration"); + else if (Configuration.doAutoCreate()) + this.duration = new DecimalType(); // bb + return this.duration; + } + + public boolean hasDurationElement() { + return this.duration != null && !this.duration.isEmpty(); + } + + public boolean hasDuration() { + return this.duration != null && !this.duration.isEmpty(); + } + + /** + * @param value {@link #duration} (How long this thing happens for when it happens.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public TimingRepeatComponent setDurationElement(DecimalType value) { + this.duration = value; + return this; + } + + /** + * @return How long this thing happens for when it happens. + */ + public BigDecimal getDuration() { + return this.duration == null ? null : this.duration.getValue(); + } + + /** + * @param value How long this thing happens for when it happens. + */ + public TimingRepeatComponent setDuration(BigDecimal value) { + if (value == null) + this.duration = null; + else { + if (this.duration == null) + this.duration = new DecimalType(); + this.duration.setValue(value); + } + return this; + } + + /** + * @param value How long this thing happens for when it happens. + */ + public TimingRepeatComponent setDuration(long value) { + this.duration = new DecimalType(); + this.duration.setValue(value); + return this; + } + + /** + * @param value How long this thing happens for when it happens. + */ + public TimingRepeatComponent setDuration(double value) { + this.duration = new DecimalType(); + this.duration.setValue(value); + return this; + } + + /** + * @return {@link #durationMax} (The upper limit of how long this thing happens for when it happens.). This is the underlying object with id, value and extensions. The accessor "getDurationMax" gives direct access to the value + */ + public DecimalType getDurationMaxElement() { + if (this.durationMax == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.durationMax"); + else if (Configuration.doAutoCreate()) + this.durationMax = new DecimalType(); // bb + return this.durationMax; + } + + public boolean hasDurationMaxElement() { + return this.durationMax != null && !this.durationMax.isEmpty(); + } + + public boolean hasDurationMax() { + return this.durationMax != null && !this.durationMax.isEmpty(); + } + + /** + * @param value {@link #durationMax} (The upper limit of how long this thing happens for when it happens.). This is the underlying object with id, value and extensions. The accessor "getDurationMax" gives direct access to the value + */ + public TimingRepeatComponent setDurationMaxElement(DecimalType value) { + this.durationMax = value; + return this; + } + + /** + * @return The upper limit of how long this thing happens for when it happens. + */ + public BigDecimal getDurationMax() { + return this.durationMax == null ? null : this.durationMax.getValue(); + } + + /** + * @param value The upper limit of how long this thing happens for when it happens. + */ + public TimingRepeatComponent setDurationMax(BigDecimal value) { + if (value == null) + this.durationMax = null; + else { + if (this.durationMax == null) + this.durationMax = new DecimalType(); + this.durationMax.setValue(value); + } + return this; + } + + /** + * @param value The upper limit of how long this thing happens for when it happens. + */ + public TimingRepeatComponent setDurationMax(long value) { + this.durationMax = new DecimalType(); + this.durationMax.setValue(value); + return this; + } + + /** + * @param value The upper limit of how long this thing happens for when it happens. + */ + public TimingRepeatComponent setDurationMax(double value) { + this.durationMax = new DecimalType(); + this.durationMax.setValue(value); + return this; + } + + /** + * @return {@link #durationUnits} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnits" gives direct access to the value + */ + public Enumeration getDurationUnitsElement() { + if (this.durationUnits == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.durationUnits"); + else if (Configuration.doAutoCreate()) + this.durationUnits = new Enumeration(new UnitsOfTimeEnumFactory()); // bb + return this.durationUnits; + } + + public boolean hasDurationUnitsElement() { + return this.durationUnits != null && !this.durationUnits.isEmpty(); + } + + public boolean hasDurationUnits() { + return this.durationUnits != null && !this.durationUnits.isEmpty(); + } + + /** + * @param value {@link #durationUnits} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnits" gives direct access to the value + */ + public TimingRepeatComponent setDurationUnitsElement(Enumeration value) { + this.durationUnits = value; + return this; + } + + /** + * @return The units of time for the duration, in UCUM units. + */ + public UnitsOfTime getDurationUnits() { + return this.durationUnits == null ? null : this.durationUnits.getValue(); + } + + /** + * @param value The units of time for the duration, in UCUM units. + */ + public TimingRepeatComponent setDurationUnits(UnitsOfTime value) { + if (value == null) + this.durationUnits = null; + else { + if (this.durationUnits == null) + this.durationUnits = new Enumeration(new UnitsOfTimeEnumFactory()); + this.durationUnits.setValue(value); + } + return this; + } + + /** + * @return {@link #frequency} (The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).). This is the underlying object with id, value and extensions. The accessor "getFrequency" gives direct access to the value + */ + public IntegerType getFrequencyElement() { + if (this.frequency == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.frequency"); + else if (Configuration.doAutoCreate()) + this.frequency = new IntegerType(); // bb + return this.frequency; + } + + public boolean hasFrequencyElement() { + return this.frequency != null && !this.frequency.isEmpty(); + } + + public boolean hasFrequency() { + return this.frequency != null && !this.frequency.isEmpty(); + } + + /** + * @param value {@link #frequency} (The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).). This is the underlying object with id, value and extensions. The accessor "getFrequency" gives direct access to the value + */ + public TimingRepeatComponent setFrequencyElement(IntegerType value) { + this.frequency = value; + return this; + } + + /** + * @return The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided). + */ + public int getFrequency() { + return this.frequency == null || this.frequency.isEmpty() ? 0 : this.frequency.getValue(); + } + + /** + * @param value The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided). + */ + public TimingRepeatComponent setFrequency(int value) { + if (this.frequency == null) + this.frequency = new IntegerType(); + this.frequency.setValue(value); + return this; + } + + /** + * @return {@link #frequencyMax} (If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.). This is the underlying object with id, value and extensions. The accessor "getFrequencyMax" gives direct access to the value + */ + public IntegerType getFrequencyMaxElement() { + if (this.frequencyMax == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.frequencyMax"); + else if (Configuration.doAutoCreate()) + this.frequencyMax = new IntegerType(); // bb + return this.frequencyMax; + } + + public boolean hasFrequencyMaxElement() { + return this.frequencyMax != null && !this.frequencyMax.isEmpty(); + } + + public boolean hasFrequencyMax() { + return this.frequencyMax != null && !this.frequencyMax.isEmpty(); + } + + /** + * @param value {@link #frequencyMax} (If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.). This is the underlying object with id, value and extensions. The accessor "getFrequencyMax" gives direct access to the value + */ + public TimingRepeatComponent setFrequencyMaxElement(IntegerType value) { + this.frequencyMax = value; + return this; + } + + /** + * @return If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range. + */ + public int getFrequencyMax() { + return this.frequencyMax == null || this.frequencyMax.isEmpty() ? 0 : this.frequencyMax.getValue(); + } + + /** + * @param value If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range. + */ + public TimingRepeatComponent setFrequencyMax(int value) { + if (this.frequencyMax == null) + this.frequencyMax = new IntegerType(); + this.frequencyMax.setValue(value); + return this; + } + + /** + * @return {@link #period} (Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period.). This is the underlying object with id, value and extensions. The accessor "getPeriod" gives direct access to the value + */ + public DecimalType getPeriodElement() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new DecimalType(); // bb + return this.period; + } + + public boolean hasPeriodElement() { + return this.period != null && !this.period.isEmpty(); + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period.). This is the underlying object with id, value and extensions. The accessor "getPeriod" gives direct access to the value + */ + public TimingRepeatComponent setPeriodElement(DecimalType value) { + this.period = value; + return this; + } + + /** + * @return Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. + */ + public BigDecimal getPeriod() { + return this.period == null ? null : this.period.getValue(); + } + + /** + * @param value Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. + */ + public TimingRepeatComponent setPeriod(BigDecimal value) { + if (value == null) + this.period = null; + else { + if (this.period == null) + this.period = new DecimalType(); + this.period.setValue(value); + } + return this; + } + + /** + * @param value Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. + */ + public TimingRepeatComponent setPeriod(long value) { + this.period = new DecimalType(); + this.period.setValue(value); + return this; + } + + /** + * @param value Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. + */ + public TimingRepeatComponent setPeriod(double value) { + this.period = new DecimalType(); + this.period.setValue(value); + return this; + } + + /** + * @return {@link #periodMax} (If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days.). This is the underlying object with id, value and extensions. The accessor "getPeriodMax" gives direct access to the value + */ + public DecimalType getPeriodMaxElement() { + if (this.periodMax == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.periodMax"); + else if (Configuration.doAutoCreate()) + this.periodMax = new DecimalType(); // bb + return this.periodMax; + } + + public boolean hasPeriodMaxElement() { + return this.periodMax != null && !this.periodMax.isEmpty(); + } + + public boolean hasPeriodMax() { + return this.periodMax != null && !this.periodMax.isEmpty(); + } + + /** + * @param value {@link #periodMax} (If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days.). This is the underlying object with id, value and extensions. The accessor "getPeriodMax" gives direct access to the value + */ + public TimingRepeatComponent setPeriodMaxElement(DecimalType value) { + this.periodMax = value; + return this; + } + + /** + * @return If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. + */ + public BigDecimal getPeriodMax() { + return this.periodMax == null ? null : this.periodMax.getValue(); + } + + /** + * @param value If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. + */ + public TimingRepeatComponent setPeriodMax(BigDecimal value) { + if (value == null) + this.periodMax = null; + else { + if (this.periodMax == null) + this.periodMax = new DecimalType(); + this.periodMax.setValue(value); + } + return this; + } + + /** + * @param value If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. + */ + public TimingRepeatComponent setPeriodMax(long value) { + this.periodMax = new DecimalType(); + this.periodMax.setValue(value); + return this; + } + + /** + * @param value If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. + */ + public TimingRepeatComponent setPeriodMax(double value) { + this.periodMax = new DecimalType(); + this.periodMax.setValue(value); + return this; + } + + /** + * @return {@link #periodUnits} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnits" gives direct access to the value + */ + public Enumeration getPeriodUnitsElement() { + if (this.periodUnits == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.periodUnits"); + else if (Configuration.doAutoCreate()) + this.periodUnits = new Enumeration(new UnitsOfTimeEnumFactory()); // bb + return this.periodUnits; + } + + public boolean hasPeriodUnitsElement() { + return this.periodUnits != null && !this.periodUnits.isEmpty(); + } + + public boolean hasPeriodUnits() { + return this.periodUnits != null && !this.periodUnits.isEmpty(); + } + + /** + * @param value {@link #periodUnits} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnits" gives direct access to the value + */ + public TimingRepeatComponent setPeriodUnitsElement(Enumeration value) { + this.periodUnits = value; + return this; + } + + /** + * @return The units of time for the period in UCUM units. + */ + public UnitsOfTime getPeriodUnits() { + return this.periodUnits == null ? null : this.periodUnits.getValue(); + } + + /** + * @param value The units of time for the period in UCUM units. + */ + public TimingRepeatComponent setPeriodUnits(UnitsOfTime value) { + if (value == null) + this.periodUnits = null; + else { + if (this.periodUnits == null) + this.periodUnits = new Enumeration(new UnitsOfTimeEnumFactory()); + this.periodUnits.setValue(value); + } + return this; + } + + /** + * @return {@link #when} (A real world event that the occurrence of the event should be tied to.). This is the underlying object with id, value and extensions. The accessor "getWhen" gives direct access to the value + */ + public Enumeration getWhenElement() { + if (this.when == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.when"); + else if (Configuration.doAutoCreate()) + this.when = new Enumeration(new EventTimingEnumFactory()); // bb + return this.when; + } + + public boolean hasWhenElement() { + return this.when != null && !this.when.isEmpty(); + } + + public boolean hasWhen() { + return this.when != null && !this.when.isEmpty(); + } + + /** + * @param value {@link #when} (A real world event that the occurrence of the event should be tied to.). This is the underlying object with id, value and extensions. The accessor "getWhen" gives direct access to the value + */ + public TimingRepeatComponent setWhenElement(Enumeration value) { + this.when = value; + return this; + } + + /** + * @return A real world event that the occurrence of the event should be tied to. + */ + public EventTiming getWhen() { + return this.when == null ? null : this.when.getValue(); + } + + /** + * @param value A real world event that the occurrence of the event should be tied to. + */ + public TimingRepeatComponent setWhen(EventTiming value) { + if (value == null) + this.when = null; + else { + if (this.when == null) + this.when = new Enumeration(new EventTimingEnumFactory()); + this.when.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("bounds[x]", "Duration|Range|Period", "Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.", 0, java.lang.Integer.MAX_VALUE, bounds)); + childrenList.add(new Property("count", "integer", "A total count of the desired number of repetitions.", 0, java.lang.Integer.MAX_VALUE, count)); + childrenList.add(new Property("duration", "decimal", "How long this thing happens for when it happens.", 0, java.lang.Integer.MAX_VALUE, duration)); + childrenList.add(new Property("durationMax", "decimal", "The upper limit of how long this thing happens for when it happens.", 0, java.lang.Integer.MAX_VALUE, durationMax)); + childrenList.add(new Property("durationUnits", "code", "The units of time for the duration, in UCUM units.", 0, java.lang.Integer.MAX_VALUE, durationUnits)); + childrenList.add(new Property("frequency", "integer", "The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).", 0, java.lang.Integer.MAX_VALUE, frequency)); + childrenList.add(new Property("frequencyMax", "integer", "If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.", 0, java.lang.Integer.MAX_VALUE, frequencyMax)); + childrenList.add(new Property("period", "decimal", "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("periodMax", "decimal", "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days.", 0, java.lang.Integer.MAX_VALUE, periodMax)); + childrenList.add(new Property("periodUnits", "code", "The units of time for the period in UCUM units.", 0, java.lang.Integer.MAX_VALUE, periodUnits)); + childrenList.add(new Property("when", "code", "A real world event that the occurrence of the event should be tied to.", 0, java.lang.Integer.MAX_VALUE, when)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("bounds[x]")) + this.bounds = (Type) value; // Type + else if (name.equals("count")) + this.count = castToInteger(value); // IntegerType + else if (name.equals("duration")) + this.duration = castToDecimal(value); // DecimalType + else if (name.equals("durationMax")) + this.durationMax = castToDecimal(value); // DecimalType + else if (name.equals("durationUnits")) + this.durationUnits = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration + else if (name.equals("frequency")) + this.frequency = castToInteger(value); // IntegerType + else if (name.equals("frequencyMax")) + this.frequencyMax = castToInteger(value); // IntegerType + else if (name.equals("period")) + this.period = castToDecimal(value); // DecimalType + else if (name.equals("periodMax")) + this.periodMax = castToDecimal(value); // DecimalType + else if (name.equals("periodUnits")) + this.periodUnits = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration + else if (name.equals("when")) + this.when = new EventTimingEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("boundsDuration")) { + this.bounds = new Duration(); + return this.bounds; + } + else if (name.equals("boundsRange")) { + this.bounds = new Range(); + return this.bounds; + } + else if (name.equals("boundsPeriod")) { + this.bounds = new Period(); + return this.bounds; + } + else if (name.equals("count")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.count"); + } + else if (name.equals("duration")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.duration"); + } + else if (name.equals("durationMax")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.durationMax"); + } + else if (name.equals("durationUnits")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.durationUnits"); + } + else if (name.equals("frequency")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.frequency"); + } + else if (name.equals("frequencyMax")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.frequencyMax"); + } + else if (name.equals("period")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.period"); + } + else if (name.equals("periodMax")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.periodMax"); + } + else if (name.equals("periodUnits")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.periodUnits"); + } + else if (name.equals("when")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.when"); + } + else + return super.addChild(name); + } + + public TimingRepeatComponent copy() { + TimingRepeatComponent dst = new TimingRepeatComponent(); + copyValues(dst); + dst.bounds = bounds == null ? null : bounds.copy(); + dst.count = count == null ? null : count.copy(); + dst.duration = duration == null ? null : duration.copy(); + dst.durationMax = durationMax == null ? null : durationMax.copy(); + dst.durationUnits = durationUnits == null ? null : durationUnits.copy(); + dst.frequency = frequency == null ? null : frequency.copy(); + dst.frequencyMax = frequencyMax == null ? null : frequencyMax.copy(); + dst.period = period == null ? null : period.copy(); + dst.periodMax = periodMax == null ? null : periodMax.copy(); + dst.periodUnits = periodUnits == null ? null : periodUnits.copy(); + dst.when = when == null ? null : when.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TimingRepeatComponent)) + return false; + TimingRepeatComponent o = (TimingRepeatComponent) other; + return compareDeep(bounds, o.bounds, true) && compareDeep(count, o.count, true) && compareDeep(duration, o.duration, true) + && compareDeep(durationMax, o.durationMax, true) && compareDeep(durationUnits, o.durationUnits, true) + && compareDeep(frequency, o.frequency, true) && compareDeep(frequencyMax, o.frequencyMax, true) + && compareDeep(period, o.period, true) && compareDeep(periodMax, o.periodMax, true) && compareDeep(periodUnits, o.periodUnits, true) + && compareDeep(when, o.when, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TimingRepeatComponent)) + return false; + TimingRepeatComponent o = (TimingRepeatComponent) other; + return compareValues(count, o.count, true) && compareValues(duration, o.duration, true) && compareValues(durationMax, o.durationMax, true) + && compareValues(durationUnits, o.durationUnits, true) && compareValues(frequency, o.frequency, true) + && compareValues(frequencyMax, o.frequencyMax, true) && compareValues(period, o.period, true) && compareValues(periodMax, o.periodMax, true) + && compareValues(periodUnits, o.periodUnits, true) && compareValues(when, o.when, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (bounds == null || bounds.isEmpty()) && (count == null || count.isEmpty()) + && (duration == null || duration.isEmpty()) && (durationMax == null || durationMax.isEmpty()) + && (durationUnits == null || durationUnits.isEmpty()) && (frequency == null || frequency.isEmpty()) + && (frequencyMax == null || frequencyMax.isEmpty()) && (period == null || period.isEmpty()) + && (periodMax == null || periodMax.isEmpty()) && (periodUnits == null || periodUnits.isEmpty()) + && (when == null || when.isEmpty()); + } + + public String fhirType() { + return "Timing.repeat"; + + } + + } + + /** + * Identifies specific times when the event occurs. + */ + @Child(name = "event", type = {DateTimeType.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="When the event occurs", formalDefinition="Identifies specific times when the event occurs." ) + protected List event; + + /** + * A set of rules that describe when the event should occur. + */ + @Child(name = "repeat", type = {}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the event is to occur", formalDefinition="A set of rules that describe when the event should occur." ) + protected TimingRepeatComponent repeat; + + /** + * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="QD | QOD | Q4H | Q6H | BID | TID | QID | AM | PM +", formalDefinition="A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes." ) + protected CodeableConcept code; + + private static final long serialVersionUID = 791565112L; + + /* + * Constructor + */ + public Timing() { + super(); + } + + /** + * @return {@link #event} (Identifies specific times when the event occurs.) + */ + public List getEvent() { + if (this.event == null) + this.event = new ArrayList(); + return this.event; + } + + public boolean hasEvent() { + if (this.event == null) + return false; + for (DateTimeType item : this.event) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #event} (Identifies specific times when the event occurs.) + */ + // syntactic sugar + public DateTimeType addEventElement() {//2 + DateTimeType t = new DateTimeType(); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return t; + } + + /** + * @param value {@link #event} (Identifies specific times when the event occurs.) + */ + public Timing addEvent(Date value) { //1 + DateTimeType t = new DateTimeType(); + t.setValue(value); + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + + /** + * @param value {@link #event} (Identifies specific times when the event occurs.) + */ + public boolean hasEvent(Date value) { + if (this.event == null) + return false; + for (DateTimeType v : this.event) + if (v.equals(value)) // dateTime + return true; + return false; + } + + /** + * @return {@link #repeat} (A set of rules that describe when the event should occur.) + */ + public TimingRepeatComponent getRepeat() { + if (this.repeat == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Timing.repeat"); + else if (Configuration.doAutoCreate()) + this.repeat = new TimingRepeatComponent(); // cc + return this.repeat; + } + + public boolean hasRepeat() { + return this.repeat != null && !this.repeat.isEmpty(); + } + + /** + * @param value {@link #repeat} (A set of rules that describe when the event should occur.) + */ + public Timing setRepeat(TimingRepeatComponent value) { + this.repeat = value; + return this; + } + + /** + * @return {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Timing.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.) + */ + public Timing setCode(CodeableConcept value) { + this.code = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("event", "dateTime", "Identifies specific times when the event occurs.", 0, java.lang.Integer.MAX_VALUE, event)); + childrenList.add(new Property("repeat", "", "A set of rules that describe when the event should occur.", 0, java.lang.Integer.MAX_VALUE, repeat)); + childrenList.add(new Property("code", "CodeableConcept", "A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.", 0, java.lang.Integer.MAX_VALUE, code)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("event")) + this.getEvent().add(castToDateTime(value)); + else if (name.equals("repeat")) + this.repeat = (TimingRepeatComponent) value; // TimingRepeatComponent + else if (name.equals("code")) + this.code = castToCodeableConcept(value); // CodeableConcept + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("event")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.event"); + } + else if (name.equals("repeat")) { + this.repeat = new TimingRepeatComponent(); + return this.repeat; + } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Timing"; + + } + + public Timing copy() { + Timing dst = new Timing(); + copyValues(dst); + if (event != null) { + dst.event = new ArrayList(); + for (DateTimeType i : event) + dst.event.add(i.copy()); + }; + dst.repeat = repeat == null ? null : repeat.copy(); + dst.code = code == null ? null : code.copy(); + return dst; + } + + protected Timing typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Timing)) + return false; + Timing o = (Timing) other; + return compareDeep(event, o.event, true) && compareDeep(repeat, o.repeat, true) && compareDeep(code, o.code, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Timing)) + return false; + Timing o = (Timing) other; + return compareValues(event, o.event, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (event == null || event.isEmpty()) && (repeat == null || repeat.isEmpty()) + && (code == null || code.isEmpty()); + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Type.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Type.java new file mode 100644 index 00000000000..40af6149cfb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/Type.java @@ -0,0 +1,47 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.dstu21.model; + +import org.hl7.fhir.instance.model.api.IBaseDatatype; + +import ca.uhn.fhir.model.api.IElement; + +/** + * An element that is a type. Used when the element type in FHIR is a choice of more than one data type + */ +public abstract class Type extends Element implements IBaseDatatype, IElement { + + private static final long serialVersionUID = 4623040030733049991L; + + public Type copy() { + return typedCopy(); + } + + protected abstract Type typedCopy(); +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UnsignedIntType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UnsignedIntType.java new file mode 100644 index 00000000000..a15a2633196 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UnsignedIntType.java @@ -0,0 +1,98 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +/** + * + */ +package org.hl7.fhir.dstu21.model; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "integer" in FHIR: A signed 32-bit integer + */ +@DatatypeDef(name = "unsignedInt", profileOf=IntegerType.class) +public class UnsignedIntType extends IntegerType { + + + /** + * + */ + private static final long serialVersionUID = -7991875974606711355L; + + /** + * Constructor + */ + public UnsignedIntType() { + // nothing + } + + /** + * Constructor + */ + public UnsignedIntType(int theInteger) { + setValue(theInteger); + } + + /** + * Constructor + * + * @param theIntegerAsString + * A string representation of an integer + * @throws IllegalArgumentException + * If the string is not a valid integer representation + */ + public UnsignedIntType(String theIntegerAsString) { + setValueAsString(theIntegerAsString); + } + + /** + * Constructor + * + * @param theValue The value + * @throws IllegalArgumentException If the value is too large to fit in a signed integer + */ + public UnsignedIntType(Long theValue) { + if (theValue < 0 || theValue > java.lang.Integer.MAX_VALUE) { + throw new IllegalArgumentException + (theValue + " cannot be cast to int without changing its value."); + } + if(theValue!=null) { + setValue((int)theValue.longValue()); + } + } + + @Override + public UnsignedIntType copy() { + return new UnsignedIntType(getValue()); + } + + public String fhirType() { + return "unsignedInt"; + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UriType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UriType.java new file mode 100644 index 00000000000..9162e39ac92 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UriType.java @@ -0,0 +1,163 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.dstu21.model; + +import java.net.URI; +import java.net.URISyntaxException; + +import org.apache.commons.lang3.StringUtils; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Primitive type "uri" in FHIR: any valid URI. Sometimes constrained to be only an absolute URI, and sometimes constrained to be a literal reference + */ +@DatatypeDef(name = "uri") +public class UriType extends PrimitiveType { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public UriType() { + // nothing + } + + /** + * Constructor + */ + public UriType(String theValue) { + setValueAsString(theValue); + } + + /** + * Constructor + */ + public UriType(URI theValue) { + setValue(theValue.toString()); + } + + @Override + public UriType copy() { + return new UriType(getValue()); + } + + @Override + protected String encode(String theValue) { + return theValue; + } + + /** + * Compares the given string to the string representation of this URI. In many cases it is preferable to use this + * instead of the standard {@link #equals(Object)} method, since that method returns false unless it is + * passed an instance of {@link UriType} + */ + public boolean equals(String theString) { + return StringUtils.equals(getValueAsString(), theString); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + + String normalize = normalize(getValue()); + result = prime * result + ((normalize == null) ? 0 : normalize.hashCode()); + + return result; + } + + private String normalize(String theValue) { + if (theValue == null) { + return null; + } + try { + URI retVal = new URI(getValue()).normalize(); + String urlString = retVal.toString(); + if (urlString.endsWith("/") && urlString.length() > 1) { + retVal = new URI(urlString.substring(0, urlString.length() - 1)); + } + return retVal.toASCIIString(); + } catch (URISyntaxException e) { + // ourLog.debug("Failed to normalize URL '{}', message was: {}", urlString, e.toString()); + return theValue; + } + } + + @Override + protected String parse(String theValue) { + return theValue; + } + + /** + * Creates a new OidType instance which uses the given OID as the content (and prepends "urn:oid:" to the OID string + * in the value of the newly created OidType, per the FHIR specification). + * + * @param theOid + * The OID to use (null is acceptable and will result in a UriDt instance with a + * null value) + * @return A new UriDt instance + */ + public static OidType fromOid(String theOid) { + if (theOid == null) { + return new OidType(); + } + return new OidType("urn:oid:" + theOid); + } + + @Override + public boolean equalsDeep(Base obj) { + if (!super.equalsDeep(obj)) + return false; + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + + UriType other = (UriType) obj; + if (getValue() == null && other.getValue() == null) { + return true; + } + if (getValue() == null || other.getValue() == null) { + return false; + } + + String normalize = normalize(getValue()); + String normalize2 = normalize(other.getValue()); + return normalize.equals(normalize2); + } + + public String fhirType() { + return "uri"; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UuidType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UuidType.java new file mode 100644 index 00000000000..307e446cd88 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/UuidType.java @@ -0,0 +1,70 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.dstu21.model; + +import java.net.URI; + +public class UuidType extends UriType { + + private static final long serialVersionUID = 3L; + + /** + * Constructor + */ + public UuidType() { + super(); + } + + /** + * Constructor + */ + public UuidType(String theValue) { + super(theValue); + } + + /** + * Constructor + */ + public UuidType(URI theValue) { + super(theValue); + } + + /** + * Constructor + */ + @Override + public UuidType copy() { + return new UuidType(getValue()); + } + + public String fhirType() { + return "uuid"; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ValueSet.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ValueSet.java new file mode 100644 index 00000000000..3d02df1279a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/ValueSet.java @@ -0,0 +1,4777 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu21.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A value set specifies a set of codes drawn from one or more code systems. + */ +@ResourceDef(name="ValueSet", profile="http://hl7.org/fhir/Profile/ValueSet") +public class ValueSet extends DomainResource { + + public enum FilterOperator { + /** + * The specified property of the code equals the provided value. + */ + EQUAL, + /** + * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself. + */ + ISA, + /** + * The specified property of the code does not have an is-a relationship with the provided value. + */ + ISNOTA, + /** + * The specified property of the code matches the regex specified in the provided value. + */ + REGEX, + /** + * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list). + */ + IN, + /** + * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list). + */ + NOTIN, + /** + * added to help the parsers + */ + NULL; + public static FilterOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("=".equals(codeString)) + return EQUAL; + if ("is-a".equals(codeString)) + return ISA; + if ("is-not-a".equals(codeString)) + return ISNOTA; + if ("regex".equals(codeString)) + return REGEX; + if ("in".equals(codeString)) + return IN; + if ("not-in".equals(codeString)) + return NOTIN; + throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQUAL: return "="; + case ISA: return "is-a"; + case ISNOTA: return "is-not-a"; + case REGEX: return "regex"; + case IN: return "in"; + case NOTIN: return "not-in"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case EQUAL: return "http://hl7.org/fhir/filter-operator"; + case ISA: return "http://hl7.org/fhir/filter-operator"; + case ISNOTA: return "http://hl7.org/fhir/filter-operator"; + case REGEX: return "http://hl7.org/fhir/filter-operator"; + case IN: return "http://hl7.org/fhir/filter-operator"; + case NOTIN: return "http://hl7.org/fhir/filter-operator"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case EQUAL: return "The specified property of the code equals the provided value."; + case ISA: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself."; + case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value."; + case REGEX: return "The specified property of the code matches the regex specified in the provided value."; + case IN: return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list)."; + case NOTIN: return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQUAL: return "Equals"; + case ISA: return "Is A (by subsumption)"; + case ISNOTA: return "Not (Is A) (by subsumption)"; + case REGEX: return "Regular Expression"; + case IN: return "In Set"; + case NOTIN: return "Not in Set"; + default: return "?"; + } + } + } + + public static class FilterOperatorEnumFactory implements EnumFactory { + public FilterOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("=".equals(codeString)) + return FilterOperator.EQUAL; + if ("is-a".equals(codeString)) + return FilterOperator.ISA; + if ("is-not-a".equals(codeString)) + return FilterOperator.ISNOTA; + if ("regex".equals(codeString)) + return FilterOperator.REGEX; + if ("in".equals(codeString)) + return FilterOperator.IN; + if ("not-in".equals(codeString)) + return FilterOperator.NOTIN; + throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("=".equals(codeString)) + return new Enumeration(this, FilterOperator.EQUAL); + if ("is-a".equals(codeString)) + return new Enumeration(this, FilterOperator.ISA); + if ("is-not-a".equals(codeString)) + return new Enumeration(this, FilterOperator.ISNOTA); + if ("regex".equals(codeString)) + return new Enumeration(this, FilterOperator.REGEX); + if ("in".equals(codeString)) + return new Enumeration(this, FilterOperator.IN); + if ("not-in".equals(codeString)) + return new Enumeration(this, FilterOperator.NOTIN); + throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); + } + public String toCode(FilterOperator code) { + if (code == FilterOperator.EQUAL) + return "="; + if (code == FilterOperator.ISA) + return "is-a"; + if (code == FilterOperator.ISNOTA) + return "is-not-a"; + if (code == FilterOperator.REGEX) + return "regex"; + if (code == FilterOperator.IN) + return "in"; + if (code == FilterOperator.NOTIN) + return "not-in"; + return "?"; + } + } + + @Block() + public static class ValueSetContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the value set. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the value set." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /* + * Constructor + */ + public ValueSetContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ValueSetContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the value set. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the value set. + */ + public ValueSetContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ValueSetContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the value set.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ValueSetContactComponent copy() { + ValueSetContactComponent dst = new ValueSetContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetContactComponent)) + return false; + ValueSetContactComponent o = (ValueSetContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetContactComponent)) + return false; + ValueSetContactComponent o = (ValueSetContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + public String fhirType() { + return "ValueSet.contact"; + + } + + } + + @Block() + public static class ValueSetCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. + */ + @Child(name = "system", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="URI to identify the code system (e.g. in Coding.system)", formalDefinition="An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system." ) + protected UriType system; + + /** + * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Version (for use in Coding.version)", formalDefinition="The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked." ) + protected StringType version; + + /** + * If code comparison is case sensitive when codes within this system are compared to each other. + */ + @Child(name = "caseSensitive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If code comparison is case sensitive", formalDefinition="If code comparison is case sensitive when codes within this system are compared to each other." ) + protected BooleanType caseSensitive; + + /** + * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are. + */ + @Child(name = "concept", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Concepts in the code system", formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are." ) + protected List concept; + + private static final long serialVersionUID = -1109401192L; + + /* + * Constructor + */ + public ValueSetCodeSystemComponent() { + super(); + } + + /* + * Constructor + */ + public ValueSetCodeSystemComponent(UriType system) { + super(); + this.system = system; + } + + /** + * @return {@link #system} (An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ValueSetCodeSystemComponent setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. + */ + public ValueSetCodeSystemComponent setSystem(String value) { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ValueSetCodeSystemComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. + */ + public ValueSetCodeSystemComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #caseSensitive} (If code comparison is case sensitive when codes within this system are compared to each other.). This is the underlying object with id, value and extensions. The accessor "getCaseSensitive" gives direct access to the value + */ + public BooleanType getCaseSensitiveElement() { + if (this.caseSensitive == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.caseSensitive"); + else if (Configuration.doAutoCreate()) + this.caseSensitive = new BooleanType(); // bb + return this.caseSensitive; + } + + public boolean hasCaseSensitiveElement() { + return this.caseSensitive != null && !this.caseSensitive.isEmpty(); + } + + public boolean hasCaseSensitive() { + return this.caseSensitive != null && !this.caseSensitive.isEmpty(); + } + + /** + * @param value {@link #caseSensitive} (If code comparison is case sensitive when codes within this system are compared to each other.). This is the underlying object with id, value and extensions. The accessor "getCaseSensitive" gives direct access to the value + */ + public ValueSetCodeSystemComponent setCaseSensitiveElement(BooleanType value) { + this.caseSensitive = value; + return this; + } + + /** + * @return If code comparison is case sensitive when codes within this system are compared to each other. + */ + public boolean getCaseSensitive() { + return this.caseSensitive == null || this.caseSensitive.isEmpty() ? false : this.caseSensitive.getValue(); + } + + /** + * @param value If code comparison is case sensitive when codes within this system are compared to each other. + */ + public ValueSetCodeSystemComponent setCaseSensitive(boolean value) { + if (this.caseSensitive == null) + this.caseSensitive = new BooleanType(); + this.caseSensitive.setValue(value); + return this; + } + + /** + * @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (ConceptDefinitionComponent item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.) + */ + // syntactic sugar + public ConceptDefinitionComponent addConcept() { //3 + ConceptDefinitionComponent t = new ConceptDefinitionComponent(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public ValueSetCodeSystemComponent addConcept(ConceptDefinitionComponent t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("caseSensitive", "boolean", "If code comparison is case sensitive when codes within this system are compared to each other.", 0, java.lang.Integer.MAX_VALUE, caseSensitive)); + childrenList.add(new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("caseSensitive")) + this.caseSensitive = castToBoolean(value); // BooleanType + else if (name.equals("concept")) + this.getConcept().add((ConceptDefinitionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); + } + else if (name.equals("caseSensitive")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.caseSensitive"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else + return super.addChild(name); + } + + public ValueSetCodeSystemComponent copy() { + ValueSetCodeSystemComponent dst = new ValueSetCodeSystemComponent(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); + dst.caseSensitive = caseSensitive == null ? null : caseSensitive.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (ConceptDefinitionComponent i : concept) + dst.concept.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetCodeSystemComponent)) + return false; + ValueSetCodeSystemComponent o = (ValueSetCodeSystemComponent) other; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(caseSensitive, o.caseSensitive, true) + && compareDeep(concept, o.concept, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetCodeSystemComponent)) + return false; + ValueSetCodeSystemComponent o = (ValueSetCodeSystemComponent) other; + return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(caseSensitive, o.caseSensitive, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) + && (caseSensitive == null || caseSensitive.isEmpty()) && (concept == null || concept.isEmpty()) + ; + } + + public String fhirType() { + return "ValueSet.codeSystem"; + + } + + } + + @Block() + public static class ConceptDefinitionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code - a text symbol - that uniquely identifies the concept within the code system. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code that identifies concept", formalDefinition="A code - a text symbol - that uniquely identifies the concept within the code system." ) + protected CodeType code; + + /** + * If this code is not for use as a real concept. + */ + @Child(name = "abstract", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If this code is not for use as a real concept", formalDefinition="If this code is not for use as a real concept." ) + protected BooleanType abstract_; + + /** + * A human readable string that is the recommended default way to present this concept to a user. + */ + @Child(name = "display", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Text to display to the user", formalDefinition="A human readable string that is the recommended default way to present this concept to a user." ) + protected StringType display; + + /** + * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. + */ + @Child(name = "definition", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Formal definition", formalDefinition="The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept." ) + protected StringType definition; + + /** + * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc. + */ + @Child(name = "designation", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional representations for the concept", formalDefinition="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc." ) + protected List designation; + + /** + * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts. + */ + @Child(name = "concept", type = {ConceptDefinitionComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Child Concepts (is-a/contains/categorizes)", formalDefinition="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts." ) + protected List concept; + + private static final long serialVersionUID = -318560292L; + + /* + * Constructor + */ + public ConceptDefinitionComponent() { + super(); + } + + /* + * Constructor + */ + public ConceptDefinitionComponent(CodeType code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (A code - a text symbol - that uniquely identifies the concept within the code system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code - a text symbol - that uniquely identifies the concept within the code system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public ConceptDefinitionComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return A code - a text symbol - that uniquely identifies the concept within the code system. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value A code - a text symbol - that uniquely identifies the concept within the code system. + */ + public ConceptDefinitionComponent setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #abstract_} (If this code is not for use as a real concept.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public BooleanType getAbstractElement() { + if (this.abstract_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionComponent.abstract_"); + else if (Configuration.doAutoCreate()) + this.abstract_ = new BooleanType(); // bb + return this.abstract_; + } + + public boolean hasAbstractElement() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + public boolean hasAbstract() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + /** + * @param value {@link #abstract_} (If this code is not for use as a real concept.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public ConceptDefinitionComponent setAbstractElement(BooleanType value) { + this.abstract_ = value; + return this; + } + + /** + * @return If this code is not for use as a real concept. + */ + public boolean getAbstract() { + return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); + } + + /** + * @param value If this code is not for use as a real concept. + */ + public ConceptDefinitionComponent setAbstract(boolean value) { + if (this.abstract_ == null) + this.abstract_ = new BooleanType(); + this.abstract_.setValue(value); + return this; + } + + /** + * @return {@link #display} (A human readable string that is the recommended default way to present this concept to a user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionComponent.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (A human readable string that is the recommended default way to present this concept to a user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public ConceptDefinitionComponent setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return A human readable string that is the recommended default way to present this concept to a user. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value A human readable string that is the recommended default way to present this concept to a user. + */ + public ConceptDefinitionComponent setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #definition} (The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public StringType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionComponent.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new StringType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public ConceptDefinitionComponent setDefinitionElement(StringType value) { + this.definition = value; + return this; + } + + /** + * @return The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. + */ + public ConceptDefinitionComponent setDefinition(String value) { + if (Utilities.noString(value)) + this.definition = null; + else { + if (this.definition == null) + this.definition = new StringType(); + this.definition.setValue(value); + } + return this; + } + + /** + * @return {@link #designation} (Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.) + */ + public List getDesignation() { + if (this.designation == null) + this.designation = new ArrayList(); + return this.designation; + } + + public boolean hasDesignation() { + if (this.designation == null) + return false; + for (ConceptDefinitionDesignationComponent item : this.designation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #designation} (Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.) + */ + // syntactic sugar + public ConceptDefinitionDesignationComponent addDesignation() { //3 + ConceptDefinitionDesignationComponent t = new ConceptDefinitionDesignationComponent(); + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return t; + } + + // syntactic sugar + public ConceptDefinitionComponent addDesignation(ConceptDefinitionDesignationComponent t) { //3 + if (t == null) + return this; + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return this; + } + + /** + * @return {@link #concept} (Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (ConceptDefinitionComponent item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.) + */ + // syntactic sugar + public ConceptDefinitionComponent addConcept() { //3 + ConceptDefinitionComponent t = new ConceptDefinitionComponent(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public ConceptDefinitionComponent addConcept(ConceptDefinitionComponent t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "A code - a text symbol - that uniquely identifies the concept within the code system.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("abstract", "boolean", "If this code is not for use as a real concept.", 0, java.lang.Integer.MAX_VALUE, abstract_)); + childrenList.add(new Property("display", "string", "A human readable string that is the recommended default way to present this concept to a user.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("definition", "string", "The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("designation", "", "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); + childrenList.add(new Property("concept", "@ValueSet.codeSystem.concept", "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.", 0, java.lang.Integer.MAX_VALUE, concept)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("abstract")) + this.abstract_ = castToBoolean(value); // BooleanType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("definition")) + this.definition = castToString(value); // StringType + else if (name.equals("designation")) + this.getDesignation().add((ConceptDefinitionDesignationComponent) value); + else if (name.equals("concept")) + this.getConcept().add((ConceptDefinitionComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); + } + else if (name.equals("abstract")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); + } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.definition"); + } + else if (name.equals("designation")) { + return addDesignation(); + } + else if (name.equals("concept")) { + return addConcept(); + } + else + return super.addChild(name); + } + + public ConceptDefinitionComponent copy() { + ConceptDefinitionComponent dst = new ConceptDefinitionComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.abstract_ = abstract_ == null ? null : abstract_.copy(); + dst.display = display == null ? null : display.copy(); + dst.definition = definition == null ? null : definition.copy(); + if (designation != null) { + dst.designation = new ArrayList(); + for (ConceptDefinitionDesignationComponent i : designation) + dst.designation.add(i.copy()); + }; + if (concept != null) { + dst.concept = new ArrayList(); + for (ConceptDefinitionComponent i : concept) + dst.concept.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptDefinitionComponent)) + return false; + ConceptDefinitionComponent o = (ConceptDefinitionComponent) other; + return compareDeep(code, o.code, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(display, o.display, true) + && compareDeep(definition, o.definition, true) && compareDeep(designation, o.designation, true) + && compareDeep(concept, o.concept, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptDefinitionComponent)) + return false; + ConceptDefinitionComponent o = (ConceptDefinitionComponent) other; + return compareValues(code, o.code, true) && compareValues(abstract_, o.abstract_, true) && compareValues(display, o.display, true) + && compareValues(definition, o.definition, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (abstract_ == null || abstract_.isEmpty()) + && (display == null || display.isEmpty()) && (definition == null || definition.isEmpty()) + && (designation == null || designation.isEmpty()) && (concept == null || concept.isEmpty()) + ; + } + + public String fhirType() { + return "ValueSet.codeSystem.concept"; + + } + + } + + @Block() + public static class ConceptDefinitionDesignationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The language this designation is defined for. + */ + @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human language of the designation", formalDefinition="The language this designation is defined for." ) + protected CodeType language; + + /** + * A code that details how this designation would be used. + */ + @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details how this designation would be used", formalDefinition="A code that details how this designation would be used." ) + protected Coding use; + + /** + * The text value for this designation. + */ + @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The text value for this designation", formalDefinition="The text value for this designation." ) + protected StringType value; + + private static final long serialVersionUID = 1515662414L; + + /* + * Constructor + */ + public ConceptDefinitionDesignationComponent() { + super(); + } + + /* + * Constructor + */ + public ConceptDefinitionDesignationComponent(StringType value) { + super(); + this.value = value; + } + + /** + * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public ConceptDefinitionDesignationComponent setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The language this designation is defined for. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The language this designation is defined for. + */ + public ConceptDefinitionDesignationComponent setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (A code that details how this designation would be used.) + */ + public Coding getUse() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Coding(); // cc + return this.use; + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (A code that details how this designation would be used.) + */ + public ConceptDefinitionDesignationComponent setUse(Coding value) { + this.use = value; + return this; + } + + /** + * @return {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ConceptDefinitionDesignationComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The text value for this designation. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The text value for this designation. + */ + public ConceptDefinitionDesignationComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("language", "code", "The language this designation is defined for.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("use", "Coding", "A code that details how this designation would be used.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("value", "string", "The text value for this designation.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCoding(value); // Coding + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.language"); + } + else if (name.equals("use")) { + this.use = new Coding(); + return this.use; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); + } + else + return super.addChild(name); + } + + public ConceptDefinitionDesignationComponent copy() { + ConceptDefinitionDesignationComponent dst = new ConceptDefinitionDesignationComponent(); + copyValues(dst); + dst.language = language == null ? null : language.copy(); + dst.use = use == null ? null : use.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptDefinitionDesignationComponent)) + return false; + ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other; + return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptDefinitionDesignationComponent)) + return false; + ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other; + return compareValues(language, o.language, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ValueSet.codeSystem.concept.designation"; + + } + + } + + @Block() + public static class ValueSetComposeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri. + */ + @Child(name = "import", type = {UriType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Import the contents of another value set", formalDefinition="Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri." ) + protected List import_; + + /** + * Include one or more codes from a code system. + */ + @Child(name = "include", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Include one or more codes from a code system", formalDefinition="Include one or more codes from a code system." ) + protected List include; + + /** + * Exclude one or more codes from the value set. + */ + @Child(name = "exclude", type = {ConceptSetComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Explicitly exclude codes", formalDefinition="Exclude one or more codes from the value set." ) + protected List exclude; + + private static final long serialVersionUID = -703166694L; + + /* + * Constructor + */ + public ValueSetComposeComponent() { + super(); + } + + /** + * @return {@link #import_} (Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.) + */ + public List getImport() { + if (this.import_ == null) + this.import_ = new ArrayList(); + return this.import_; + } + + public boolean hasImport() { + if (this.import_ == null) + return false; + for (UriType item : this.import_) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #import_} (Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.) + */ + // syntactic sugar + public UriType addImportElement() {//2 + UriType t = new UriType(); + if (this.import_ == null) + this.import_ = new ArrayList(); + this.import_.add(t); + return t; + } + + /** + * @param value {@link #import_} (Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.) + */ + public ValueSetComposeComponent addImport(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.import_ == null) + this.import_ = new ArrayList(); + this.import_.add(t); + return this; + } + + /** + * @param value {@link #import_} (Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.) + */ + public boolean hasImport(String value) { + if (this.import_ == null) + return false; + for (UriType v : this.import_) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #include} (Include one or more codes from a code system.) + */ + public List getInclude() { + if (this.include == null) + this.include = new ArrayList(); + return this.include; + } + + public boolean hasInclude() { + if (this.include == null) + return false; + for (ConceptSetComponent item : this.include) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #include} (Include one or more codes from a code system.) + */ + // syntactic sugar + public ConceptSetComponent addInclude() { //3 + ConceptSetComponent t = new ConceptSetComponent(); + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return t; + } + + // syntactic sugar + public ValueSetComposeComponent addInclude(ConceptSetComponent t) { //3 + if (t == null) + return this; + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return this; + } + + /** + * @return {@link #exclude} (Exclude one or more codes from the value set.) + */ + public List getExclude() { + if (this.exclude == null) + this.exclude = new ArrayList(); + return this.exclude; + } + + public boolean hasExclude() { + if (this.exclude == null) + return false; + for (ConceptSetComponent item : this.exclude) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #exclude} (Exclude one or more codes from the value set.) + */ + // syntactic sugar + public ConceptSetComponent addExclude() { //3 + ConceptSetComponent t = new ConceptSetComponent(); + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return t; + } + + // syntactic sugar + public ValueSetComposeComponent addExclude(ConceptSetComponent t) { //3 + if (t == null) + return this; + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("import", "uri", "Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.", 0, java.lang.Integer.MAX_VALUE, import_)); + childrenList.add(new Property("include", "", "Include one or more codes from a code system.", 0, java.lang.Integer.MAX_VALUE, include)); + childrenList.add(new Property("exclude", "@ValueSet.compose.include", "Exclude one or more codes from the value set.", 0, java.lang.Integer.MAX_VALUE, exclude)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("import")) + this.getImport().add(castToUri(value)); + else if (name.equals("include")) + this.getInclude().add((ConceptSetComponent) value); + else if (name.equals("exclude")) + this.getExclude().add((ConceptSetComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("import")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.import"); + } + else if (name.equals("include")) { + return addInclude(); + } + else if (name.equals("exclude")) { + return addExclude(); + } + else + return super.addChild(name); + } + + public ValueSetComposeComponent copy() { + ValueSetComposeComponent dst = new ValueSetComposeComponent(); + copyValues(dst); + if (import_ != null) { + dst.import_ = new ArrayList(); + for (UriType i : import_) + dst.import_.add(i.copy()); + }; + if (include != null) { + dst.include = new ArrayList(); + for (ConceptSetComponent i : include) + dst.include.add(i.copy()); + }; + if (exclude != null) { + dst.exclude = new ArrayList(); + for (ConceptSetComponent i : exclude) + dst.exclude.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetComposeComponent)) + return false; + ValueSetComposeComponent o = (ValueSetComposeComponent) other; + return compareDeep(import_, o.import_, true) && compareDeep(include, o.include, true) && compareDeep(exclude, o.exclude, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetComposeComponent)) + return false; + ValueSetComposeComponent o = (ValueSetComposeComponent) other; + return compareValues(import_, o.import_, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (import_ == null || import_.isEmpty()) && (include == null || include.isEmpty()) + && (exclude == null || exclude.isEmpty()); + } + + public String fhirType() { + return "ValueSet.compose"; + + } + + } + + @Block() + public static class ConceptSetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI which is the code system from which the selected codes come from. + */ + @Child(name = "system", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The system the codes come from", formalDefinition="An absolute URI which is the code system from which the selected codes come from." ) + protected UriType system; + + /** + * The version of the code system that the codes are selected from. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific version of the code system referred to", formalDefinition="The version of the code system that the codes are selected from." ) + protected StringType version; + + /** + * Specifies a concept to be included or excluded. + */ + @Child(name = "concept", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A concept defined in the system", formalDefinition="Specifies a concept to be included or excluded." ) + protected List concept; + + /** + * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true. + */ + @Child(name = "filter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Select codes/concepts by their properties (including relationships)", formalDefinition="Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true." ) + protected List filter; + + private static final long serialVersionUID = -196054471L; + + /* + * Constructor + */ + public ConceptSetComponent() { + super(); + } + + /* + * Constructor + */ + public ConceptSetComponent(UriType system) { + super(); + this.system = system; + } + + /** + * @return {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptSetComponent.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ConceptSetComponent setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return An absolute URI which is the code system from which the selected codes come from. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value An absolute URI which is the code system from which the selected codes come from. + */ + public ConceptSetComponent setSystem(String value) { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of the code system that the codes are selected from.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptSetComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of the code system that the codes are selected from.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ConceptSetComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of the code system that the codes are selected from. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of the code system that the codes are selected from. + */ + public ConceptSetComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (Specifies a concept to be included or excluded.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (ConceptReferenceComponent item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (Specifies a concept to be included or excluded.) + */ + // syntactic sugar + public ConceptReferenceComponent addConcept() { //3 + ConceptReferenceComponent t = new ConceptReferenceComponent(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public ConceptSetComponent addConcept(ConceptReferenceComponent t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #filter} (Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.) + */ + public List getFilter() { + if (this.filter == null) + this.filter = new ArrayList(); + return this.filter; + } + + public boolean hasFilter() { + if (this.filter == null) + return false; + for (ConceptSetFilterComponent item : this.filter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #filter} (Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.) + */ + // syntactic sugar + public ConceptSetFilterComponent addFilter() { //3 + ConceptSetFilterComponent t = new ConceptSetFilterComponent(); + if (this.filter == null) + this.filter = new ArrayList(); + this.filter.add(t); + return t; + } + + // syntactic sugar + public ConceptSetComponent addFilter(ConceptSetFilterComponent t) { //3 + if (t == null) + return this; + if (this.filter == null) + this.filter = new ArrayList(); + this.filter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "An absolute URI which is the code system from which the selected codes come from.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The version of the code system that the codes are selected from.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("concept", "", "Specifies a concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("filter", "", "Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.", 0, java.lang.Integer.MAX_VALUE, filter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add((ConceptReferenceComponent) value); + else if (name.equals("filter")) + this.getFilter().add((ConceptSetFilterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("filter")) { + return addFilter(); + } + else + return super.addChild(name); + } + + public ConceptSetComponent copy() { + ConceptSetComponent dst = new ConceptSetComponent(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (ConceptReferenceComponent i : concept) + dst.concept.add(i.copy()); + }; + if (filter != null) { + dst.filter = new ArrayList(); + for (ConceptSetFilterComponent i : filter) + dst.filter.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptSetComponent)) + return false; + ConceptSetComponent o = (ConceptSetComponent) other; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(concept, o.concept, true) + && compareDeep(filter, o.filter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptSetComponent)) + return false; + ConceptSetComponent o = (ConceptSetComponent) other; + return compareValues(system, o.system, true) && compareValues(version, o.version, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) + && (concept == null || concept.isEmpty()) && (filter == null || filter.isEmpty()); + } + + public String fhirType() { + return "ValueSet.compose.include"; + + } + + } + + @Block() + public static class ConceptReferenceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specifies a code for the concept to be included or excluded. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code or expression from system", formalDefinition="Specifies a code for the concept to be included or excluded." ) + protected CodeType code; + + /** + * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. + */ + @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Test to display for this code for this value set", formalDefinition="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system." ) + protected StringType display; + + /** + * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc. + */ + @Child(name = "designation", type = {ConceptDefinitionDesignationComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional representations for this valueset", formalDefinition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc." ) + protected List designation; + + private static final long serialVersionUID = -1513912691L; + + /* + * Constructor + */ + public ConceptReferenceComponent() { + super(); + } + + /* + * Constructor + */ + public ConceptReferenceComponent(CodeType code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptReferenceComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public ConceptReferenceComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return Specifies a code for the concept to be included or excluded. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Specifies a code for the concept to be included or excluded. + */ + public ConceptReferenceComponent setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptReferenceComponent.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public ConceptReferenceComponent setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. + */ + public ConceptReferenceComponent setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.) + */ + public List getDesignation() { + if (this.designation == null) + this.designation = new ArrayList(); + return this.designation; + } + + public boolean hasDesignation() { + if (this.designation == null) + return false; + for (ConceptDefinitionDesignationComponent item : this.designation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.) + */ + // syntactic sugar + public ConceptDefinitionDesignationComponent addDesignation() { //3 + ConceptDefinitionDesignationComponent t = new ConceptDefinitionDesignationComponent(); + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return t; + } + + // syntactic sugar + public ConceptReferenceComponent addDesignation(ConceptDefinitionDesignationComponent t) { //3 + if (t == null) + return this; + if (this.designation == null) + this.designation = new ArrayList(); + this.designation.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("designation", "@ValueSet.codeSystem.concept.designation", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("designation")) + this.getDesignation().add((ConceptDefinitionDesignationComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); + } + else if (name.equals("designation")) { + return addDesignation(); + } + else + return super.addChild(name); + } + + public ConceptReferenceComponent copy() { + ConceptReferenceComponent dst = new ConceptReferenceComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + dst.display = display == null ? null : display.copy(); + if (designation != null) { + dst.designation = new ArrayList(); + for (ConceptDefinitionDesignationComponent i : designation) + dst.designation.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptReferenceComponent)) + return false; + ConceptReferenceComponent o = (ConceptReferenceComponent) other; + return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(designation, o.designation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptReferenceComponent)) + return false; + ConceptReferenceComponent o = (ConceptReferenceComponent) other; + return compareValues(code, o.code, true) && compareValues(display, o.display, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) + && (designation == null || designation.isEmpty()); + } + + public String fhirType() { + return "ValueSet.compose.include.concept"; + + } + + } + + @Block() + public static class ConceptSetFilterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A code that identifies a property defined in the code system. + */ + @Child(name = "property", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="A property defined by the code system", formalDefinition="A code that identifies a property defined in the code system." ) + protected CodeType property; + + /** + * The kind of operation to perform as a part of the filter criteria. + */ + @Child(name = "op", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="= | is-a | is-not-a | regex | in | not-in", formalDefinition="The kind of operation to perform as a part of the filter criteria." ) + protected Enumeration op; + + /** + * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value. + */ + @Child(name = "value", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code from the system, or regex criteria", formalDefinition="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value." ) + protected CodeType value; + + private static final long serialVersionUID = 1985515000L; + + /* + * Constructor + */ + public ConceptSetFilterComponent() { + super(); + } + + /* + * Constructor + */ + public ConceptSetFilterComponent(CodeType property, Enumeration op, CodeType value) { + super(); + this.property = property; + this.op = op; + this.value = value; + } + + /** + * @return {@link #property} (A code that identifies a property defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value + */ + public CodeType getPropertyElement() { + if (this.property == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptSetFilterComponent.property"); + else if (Configuration.doAutoCreate()) + this.property = new CodeType(); // bb + return this.property; + } + + public boolean hasPropertyElement() { + return this.property != null && !this.property.isEmpty(); + } + + public boolean hasProperty() { + return this.property != null && !this.property.isEmpty(); + } + + /** + * @param value {@link #property} (A code that identifies a property defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value + */ + public ConceptSetFilterComponent setPropertyElement(CodeType value) { + this.property = value; + return this; + } + + /** + * @return A code that identifies a property defined in the code system. + */ + public String getProperty() { + return this.property == null ? null : this.property.getValue(); + } + + /** + * @param value A code that identifies a property defined in the code system. + */ + public ConceptSetFilterComponent setProperty(String value) { + if (this.property == null) + this.property = new CodeType(); + this.property.setValue(value); + return this; + } + + /** + * @return {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value + */ + public Enumeration getOpElement() { + if (this.op == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptSetFilterComponent.op"); + else if (Configuration.doAutoCreate()) + this.op = new Enumeration(new FilterOperatorEnumFactory()); // bb + return this.op; + } + + public boolean hasOpElement() { + return this.op != null && !this.op.isEmpty(); + } + + public boolean hasOp() { + return this.op != null && !this.op.isEmpty(); + } + + /** + * @param value {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value + */ + public ConceptSetFilterComponent setOpElement(Enumeration value) { + this.op = value; + return this; + } + + /** + * @return The kind of operation to perform as a part of the filter criteria. + */ + public FilterOperator getOp() { + return this.op == null ? null : this.op.getValue(); + } + + /** + * @param value The kind of operation to perform as a part of the filter criteria. + */ + public ConceptSetFilterComponent setOp(FilterOperator value) { + if (this.op == null) + this.op = new Enumeration(new FilterOperatorEnumFactory()); + this.op.setValue(value); + return this; + } + + /** + * @return {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public CodeType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptSetFilterComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new CodeType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ConceptSetFilterComponent setValueElement(CodeType value) { + this.value = value; + return this; + } + + /** + * @return The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value. + */ + public ConceptSetFilterComponent setValue(String value) { + if (this.value == null) + this.value = new CodeType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("property", "code", "A code that identifies a property defined in the code system.", 0, java.lang.Integer.MAX_VALUE, property)); + childrenList.add(new Property("op", "code", "The kind of operation to perform as a part of the filter criteria.", 0, java.lang.Integer.MAX_VALUE, op)); + childrenList.add(new Property("value", "code", "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("property")) + this.property = castToCode(value); // CodeType + else if (name.equals("op")) + this.op = new FilterOperatorEnumFactory().fromType(value); // Enumeration + else if (name.equals("value")) + this.value = castToCode(value); // CodeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("property")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.property"); + } + else if (name.equals("op")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.op"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); + } + else + return super.addChild(name); + } + + public ConceptSetFilterComponent copy() { + ConceptSetFilterComponent dst = new ConceptSetFilterComponent(); + copyValues(dst); + dst.property = property == null ? null : property.copy(); + dst.op = op == null ? null : op.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptSetFilterComponent)) + return false; + ConceptSetFilterComponent o = (ConceptSetFilterComponent) other; + return compareDeep(property, o.property, true) && compareDeep(op, o.op, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptSetFilterComponent)) + return false; + ConceptSetFilterComponent o = (ConceptSetFilterComponent) other; + return compareValues(property, o.property, true) && compareValues(op, o.op, true) && compareValues(value, o.value, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (property == null || property.isEmpty()) && (op == null || op.isEmpty()) + && (value == null || value.isEmpty()); + } + + public String fhirType() { + return "ValueSet.compose.include.filter"; + + } + + } + + @Block() + public static class ValueSetExpansionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so. + */ + @Child(name = "identifier", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Uniquely identifies this expansion", formalDefinition="An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so." ) + protected UriType identifier; + + /** + * The time at which the expansion was produced by the expanding system. + */ + @Child(name = "timestamp", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time ValueSet expansion happened", formalDefinition="The time at which the expansion was produced by the expanding system." ) + protected DateTimeType timestamp; + + /** + * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. + */ + @Child(name = "total", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Total number of codes in the expansion", formalDefinition="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter." ) + protected IntegerType total; + + /** + * If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present. + */ + @Child(name = "offset", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Offset at which this resource starts", formalDefinition="If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present." ) + protected IntegerType offset; + + /** + * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion. + */ + @Child(name = "parameter", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Parameter that controlled the expansion process", formalDefinition="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion." ) + protected List parameter; + + /** + * The codes that are contained in the value set expansion. + */ + @Child(name = "contains", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Codes in the value set", formalDefinition="The codes that are contained in the value set expansion." ) + protected List contains; + + private static final long serialVersionUID = -43471993L; + + /* + * Constructor + */ + public ValueSetExpansionComponent() { + super(); + } + + /* + * Constructor + */ + public ValueSetExpansionComponent(UriType identifier, DateTimeType timestamp) { + super(); + this.identifier = identifier; + this.timestamp = timestamp; + } + + /** + * @return {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public UriType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new UriType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public ValueSetExpansionComponent setIdentifierElement(UriType value) { + this.identifier = value; + return this; + } + + /** + * @return An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so. + */ + public ValueSetExpansionComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new UriType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value + */ + public DateTimeType getTimestampElement() { + if (this.timestamp == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionComponent.timestamp"); + else if (Configuration.doAutoCreate()) + this.timestamp = new DateTimeType(); // bb + return this.timestamp; + } + + public boolean hasTimestampElement() { + return this.timestamp != null && !this.timestamp.isEmpty(); + } + + public boolean hasTimestamp() { + return this.timestamp != null && !this.timestamp.isEmpty(); + } + + /** + * @param value {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value + */ + public ValueSetExpansionComponent setTimestampElement(DateTimeType value) { + this.timestamp = value; + return this; + } + + /** + * @return The time at which the expansion was produced by the expanding system. + */ + public Date getTimestamp() { + return this.timestamp == null ? null : this.timestamp.getValue(); + } + + /** + * @param value The time at which the expansion was produced by the expanding system. + */ + public ValueSetExpansionComponent setTimestamp(Date value) { + if (this.timestamp == null) + this.timestamp = new DateTimeType(); + this.timestamp.setValue(value); + return this; + } + + /** + * @return {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value + */ + public IntegerType getTotalElement() { + if (this.total == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionComponent.total"); + else if (Configuration.doAutoCreate()) + this.total = new IntegerType(); // bb + return this.total; + } + + public boolean hasTotalElement() { + return this.total != null && !this.total.isEmpty(); + } + + public boolean hasTotal() { + return this.total != null && !this.total.isEmpty(); + } + + /** + * @param value {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value + */ + public ValueSetExpansionComponent setTotalElement(IntegerType value) { + this.total = value; + return this; + } + + /** + * @return The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. + */ + public int getTotal() { + return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue(); + } + + /** + * @param value The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. + */ + public ValueSetExpansionComponent setTotal(int value) { + if (this.total == null) + this.total = new IntegerType(); + this.total.setValue(value); + return this; + } + + /** + * @return {@link #offset} (If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value + */ + public IntegerType getOffsetElement() { + if (this.offset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionComponent.offset"); + else if (Configuration.doAutoCreate()) + this.offset = new IntegerType(); // bb + return this.offset; + } + + public boolean hasOffsetElement() { + return this.offset != null && !this.offset.isEmpty(); + } + + public boolean hasOffset() { + return this.offset != null && !this.offset.isEmpty(); + } + + /** + * @param value {@link #offset} (If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value + */ + public ValueSetExpansionComponent setOffsetElement(IntegerType value) { + this.offset = value; + return this; + } + + /** + * @return If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present. + */ + public int getOffset() { + return this.offset == null || this.offset.isEmpty() ? 0 : this.offset.getValue(); + } + + /** + * @param value If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present. + */ + public ValueSetExpansionComponent setOffset(int value) { + if (this.offset == null) + this.offset = new IntegerType(); + this.offset.setValue(value); + return this; + } + + /** + * @return {@link #parameter} (A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (ValueSetExpansionParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.) + */ + // syntactic sugar + public ValueSetExpansionParameterComponent addParameter() { //3 + ValueSetExpansionParameterComponent t = new ValueSetExpansionParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public ValueSetExpansionComponent addParameter(ValueSetExpansionParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + /** + * @return {@link #contains} (The codes that are contained in the value set expansion.) + */ + public List getContains() { + if (this.contains == null) + this.contains = new ArrayList(); + return this.contains; + } + + public boolean hasContains() { + if (this.contains == null) + return false; + for (ValueSetExpansionContainsComponent item : this.contains) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contains} (The codes that are contained in the value set expansion.) + */ + // syntactic sugar + public ValueSetExpansionContainsComponent addContains() { //3 + ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent(); + if (this.contains == null) + this.contains = new ArrayList(); + this.contains.add(t); + return t; + } + + // syntactic sugar + public ValueSetExpansionComponent addContains(ValueSetExpansionContainsComponent t) { //3 + if (t == null) + return this; + if (this.contains == null) + this.contains = new ArrayList(); + this.contains.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "uri", "An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("timestamp", "dateTime", "The time at which the expansion was produced by the expanding system.", 0, java.lang.Integer.MAX_VALUE, timestamp)); + childrenList.add(new Property("total", "integer", "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", 0, java.lang.Integer.MAX_VALUE, total)); + childrenList.add(new Property("offset", "integer", "If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.", 0, java.lang.Integer.MAX_VALUE, offset)); + childrenList.add(new Property("parameter", "", "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", 0, java.lang.Integer.MAX_VALUE, parameter)); + childrenList.add(new Property("contains", "", "The codes that are contained in the value set expansion.", 0, java.lang.Integer.MAX_VALUE, contains)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToUri(value); // UriType + else if (name.equals("timestamp")) + this.timestamp = castToDateTime(value); // DateTimeType + else if (name.equals("total")) + this.total = castToInteger(value); // IntegerType + else if (name.equals("offset")) + this.offset = castToInteger(value); // IntegerType + else if (name.equals("parameter")) + this.getParameter().add((ValueSetExpansionParameterComponent) value); + else if (name.equals("contains")) + this.getContains().add((ValueSetExpansionContainsComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.identifier"); + } + else if (name.equals("timestamp")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.timestamp"); + } + else if (name.equals("total")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.total"); + } + else if (name.equals("offset")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.offset"); + } + else if (name.equals("parameter")) { + return addParameter(); + } + else if (name.equals("contains")) { + return addContains(); + } + else + return super.addChild(name); + } + + public ValueSetExpansionComponent copy() { + ValueSetExpansionComponent dst = new ValueSetExpansionComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.timestamp = timestamp == null ? null : timestamp.copy(); + dst.total = total == null ? null : total.copy(); + dst.offset = offset == null ? null : offset.copy(); + if (parameter != null) { + dst.parameter = new ArrayList(); + for (ValueSetExpansionParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + if (contains != null) { + dst.contains = new ArrayList(); + for (ValueSetExpansionContainsComponent i : contains) + dst.contains.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetExpansionComponent)) + return false; + ValueSetExpansionComponent o = (ValueSetExpansionComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(timestamp, o.timestamp, true) + && compareDeep(total, o.total, true) && compareDeep(offset, o.offset, true) && compareDeep(parameter, o.parameter, true) + && compareDeep(contains, o.contains, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetExpansionComponent)) + return false; + ValueSetExpansionComponent o = (ValueSetExpansionComponent) other; + return compareValues(identifier, o.identifier, true) && compareValues(timestamp, o.timestamp, true) + && compareValues(total, o.total, true) && compareValues(offset, o.offset, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (timestamp == null || timestamp.isEmpty()) + && (total == null || total.isEmpty()) && (offset == null || offset.isEmpty()) && (parameter == null || parameter.isEmpty()) + && (contains == null || contains.isEmpty()); + } + + public String fhirType() { + return "ValueSet.expansion"; + + } + + } + + @Block() + public static class ValueSetExpansionParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the parameter. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name as assigned by the server", formalDefinition="The name of the parameter." ) + protected StringType name; + + /** + * The value of the parameter. + */ + @Child(name = "value", type = {StringType.class, BooleanType.class, IntegerType.class, DecimalType.class, UriType.class, CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value of the named parameter", formalDefinition="The value of the parameter." ) + protected Type value; + + private static final long serialVersionUID = 1172641169L; + + /* + * Constructor + */ + public ValueSetExpansionParameterComponent() { + super(); + } + + /* + * Constructor + */ + public ValueSetExpansionParameterComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ValueSetExpansionParameterComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the parameter. + */ + public ValueSetExpansionParameterComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public DecimalType getValueDecimalType() throws FHIRException { + if (!(this.value instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DecimalType) this.value; + } + + public boolean hasValueDecimalType() { + return this.value instanceof DecimalType; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public UriType getValueUriType() throws FHIRException { + if (!(this.value instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (UriType) this.value; + } + + public boolean hasValueUriType() { + return this.value instanceof UriType; + } + + /** + * @return {@link #value} (The value of the parameter.) + */ + public CodeType getValueCodeType() throws FHIRException { + if (!(this.value instanceof CodeType)) + throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (CodeType) this.value; + } + + public boolean hasValueCodeType() { + return this.value instanceof CodeType; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the parameter.) + */ + public ValueSetExpansionParameterComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value[x]", "string|boolean|integer|decimal|uri|code", "The value of the parameter.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name"); + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueCode")) { + this.value = new CodeType(); + return this.value; + } + else + return super.addChild(name); + } + + public ValueSetExpansionParameterComponent copy() { + ValueSetExpansionParameterComponent dst = new ValueSetExpansionParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetExpansionParameterComponent)) + return false; + ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetExpansionParameterComponent)) + return false; + ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) + ; + } + + public String fhirType() { + return "ValueSet.expansion.parameter"; + + } + + } + + @Block() + public static class ValueSetExpansionContainsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An absolute URI which is the code system in which the code for this item in the expansion is defined. + */ + @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="System value for the code", formalDefinition="An absolute URI which is the code system in which the code for this item in the expansion is defined." ) + protected UriType system; + + /** + * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. + */ + @Child(name = "abstract", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If user cannot select this entry", formalDefinition="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value." ) + protected BooleanType abstract_; + + /** + * The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Version in which this code/display is defined", formalDefinition="The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence." ) + protected StringType version; + + /** + * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. + */ + @Child(name = "code", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Code - if blank, this is not a selectable code", formalDefinition="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set." ) + protected CodeType code; + + /** + * The recommended display for this item in the expansion. + */ + @Child(name = "display", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="User display for the concept", formalDefinition="The recommended display for this item in the expansion." ) + protected StringType display; + + /** + * Other codes and entries contained under this entry in the hierarchy. + */ + @Child(name = "contains", type = {ValueSetExpansionContainsComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Codes contained under this entry", formalDefinition="Other codes and entries contained under this entry in the hierarchy." ) + protected List contains; + + private static final long serialVersionUID = -2038349483L; + + /* + * Constructor + */ + public ValueSetExpansionContainsComponent() { + super(); + } + + /** + * @return {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public UriType getSystemElement() { + if (this.system == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.system"); + else if (Configuration.doAutoCreate()) + this.system = new UriType(); // bb + return this.system; + } + + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); + } + + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); + } + + /** + * @param value {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value + */ + public ValueSetExpansionContainsComponent setSystemElement(UriType value) { + this.system = value; + return this; + } + + /** + * @return An absolute URI which is the code system in which the code for this item in the expansion is defined. + */ + public String getSystem() { + return this.system == null ? null : this.system.getValue(); + } + + /** + * @param value An absolute URI which is the code system in which the code for this item in the expansion is defined. + */ + public ValueSetExpansionContainsComponent setSystem(String value) { + if (Utilities.noString(value)) + this.system = null; + else { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public BooleanType getAbstractElement() { + if (this.abstract_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.abstract_"); + else if (Configuration.doAutoCreate()) + this.abstract_ = new BooleanType(); // bb + return this.abstract_; + } + + public boolean hasAbstractElement() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + public boolean hasAbstract() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + /** + * @param value {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public ValueSetExpansionContainsComponent setAbstractElement(BooleanType value) { + this.abstract_ = value; + return this; + } + + /** + * @return If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. + */ + public boolean getAbstract() { + return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); + } + + /** + * @param value If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. + */ + public ValueSetExpansionContainsComponent setAbstract(boolean value) { + if (this.abstract_ == null) + this.abstract_ = new BooleanType(); + this.abstract_.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ValueSetExpansionContainsComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence. + */ + public ValueSetExpansionContainsComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public ValueSetExpansionContainsComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. + */ + public ValueSetExpansionContainsComponent setCode(String value) { + if (Utilities.noString(value)) + this.code = null; + else { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + } + return this; + } + + /** + * @return {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public ValueSetExpansionContainsComponent setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return The recommended display for this item in the expansion. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value The recommended display for this item in the expansion. + */ + public ValueSetExpansionContainsComponent setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * @return {@link #contains} (Other codes and entries contained under this entry in the hierarchy.) + */ + public List getContains() { + if (this.contains == null) + this.contains = new ArrayList(); + return this.contains; + } + + public boolean hasContains() { + if (this.contains == null) + return false; + for (ValueSetExpansionContainsComponent item : this.contains) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contains} (Other codes and entries contained under this entry in the hierarchy.) + */ + // syntactic sugar + public ValueSetExpansionContainsComponent addContains() { //3 + ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent(); + if (this.contains == null) + this.contains = new ArrayList(); + this.contains.add(t); + return t; + } + + // syntactic sugar + public ValueSetExpansionContainsComponent addContains(ValueSetExpansionContainsComponent t) { //3 + if (t == null) + return this; + if (this.contains == null) + this.contains = new ArrayList(); + this.contains.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("system", "uri", "An absolute URI which is the code system in which the code for this item in the expansion is defined.", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("abstract", "boolean", "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", 0, java.lang.Integer.MAX_VALUE, abstract_)); + childrenList.add(new Property("version", "string", "The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("code", "code", "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("display", "string", "The recommended display for this item in the expansion.", 0, java.lang.Integer.MAX_VALUE, display)); + childrenList.add(new Property("contains", "@ValueSet.expansion.contains", "Other codes and entries contained under this entry in the hierarchy.", 0, java.lang.Integer.MAX_VALUE, contains)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("abstract")) + this.abstract_ = castToBoolean(value); // BooleanType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("display")) + this.display = castToString(value); // StringType + else if (name.equals("contains")) + this.getContains().add((ValueSetExpansionContainsComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); + } + else if (name.equals("abstract")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); + } + else if (name.equals("contains")) { + return addContains(); + } + else + return super.addChild(name); + } + + public ValueSetExpansionContainsComponent copy() { + ValueSetExpansionContainsComponent dst = new ValueSetExpansionContainsComponent(); + copyValues(dst); + dst.system = system == null ? null : system.copy(); + dst.abstract_ = abstract_ == null ? null : abstract_.copy(); + dst.version = version == null ? null : version.copy(); + dst.code = code == null ? null : code.copy(); + dst.display = display == null ? null : display.copy(); + if (contains != null) { + dst.contains = new ArrayList(); + for (ValueSetExpansionContainsComponent i : contains) + dst.contains.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSetExpansionContainsComponent)) + return false; + ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other; + return compareDeep(system, o.system, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(version, o.version, true) + && compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(contains, o.contains, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSetExpansionContainsComponent)) + return false; + ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other; + return compareValues(system, o.system, true) && compareValues(abstract_, o.abstract_, true) && compareValues(version, o.version, true) + && compareValues(code, o.code, true) && compareValues(display, o.display, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (system == null || system.isEmpty()) && (abstract_ == null || abstract_.isEmpty()) + && (version == null || version.isEmpty()) && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) + && (contains == null || contains.isEmpty()); + } + + public String fhirType() { + return "ValueSet.expansion.contains"; + + } + + } + + /** + * An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Globally unique logical identifier for value set", formalDefinition="An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Additional identifier for the value set (e.g. HL7 v2 / CDA)", formalDefinition="Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected Identifier identifier; + + /** + * Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier for this version of the value set", formalDefinition="Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) + protected StringType version; + + /** + * A free text natural language name describing the value set. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this value set", formalDefinition="A free text natural language name describing the value set." ) + protected StringType name; + + /** + * The status of the value set. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the value set." ) + protected Enumeration status; + + /** + * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the value set. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the individual or organization that published the value set." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition'). + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for given status", formalDefinition="The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')." ) + protected DateTimeType date; + + /** + * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date. + */ + @Child(name = "lockedDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Fixed date for all referenced code systems and value sets", formalDefinition="If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date." ) + protected DateType lockedDate; + + /** + * A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set. + */ + @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human language description of the value set", formalDefinition="A free text natural language description of the use of the value set - reason for definition, \"the semantic space\" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions." ) + protected List useContext; + + /** + * If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. + */ + @Child(name = "immutable", type = {BooleanType.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Indicates whether or not any change to the content logical definition may occur", formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change." ) + protected BooleanType immutable; + + /** + * Explains why this value set is needed and why it has been constrained as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why needed", formalDefinition="Explains why this value set is needed and why it has been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. + */ + @Child(name = "copyright", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set." ) + protected StringType copyright; + + /** + * Whether this is intended to be used with an extensible binding or not. + */ + @Child(name = "extensible", type = {BooleanType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether this is intended to be used with an extensible binding", formalDefinition="Whether this is intended to be used with an extensible binding or not." ) + protected BooleanType extensible; + + /** + * A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly. + */ + @Child(name = "codeSystem", type = {}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="An inline code system, which is part of this value set", formalDefinition="A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly." ) + protected ValueSetCodeSystemComponent codeSystem; + + /** + * A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set. + */ + @Child(name = "compose", type = {}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When value set includes codes from elsewhere", formalDefinition="A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set." ) + protected ValueSetComposeComponent compose; + + /** + * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. + */ + @Child(name = "expansion", type = {}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Used when the value set is \"expanded\"", formalDefinition="A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." ) + protected ValueSetExpansionComponent expansion; + + private static final long serialVersionUID = -467533312L; + + /* + * Constructor + */ + public ValueSet() { + super(); + } + + /* + * Constructor + */ + public ValueSet(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ValueSet setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. + */ + public ValueSet setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public ValueSet setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #version} (Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ValueSet setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. + */ + public ValueSet setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name describing the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name describing the value set.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ValueSet setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name describing the value set. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name describing the value set. + */ + public ValueSet setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of the value set.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the value set.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ValueSet setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the value set. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the value set. + */ + public ValueSet setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ValueSet setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public ValueSet setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public ValueSet setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the value set. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the value set. + */ + public ValueSet setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ValueSetContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ValueSetContactComponent addContact() { //3 + ValueSetContactComponent t = new ValueSetContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ValueSet addContact(ValueSetContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ValueSet setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition'). + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition'). + */ + public ValueSet setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #lockedDate} (If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value + */ + public DateType getLockedDateElement() { + if (this.lockedDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.lockedDate"); + else if (Configuration.doAutoCreate()) + this.lockedDate = new DateType(); // bb + return this.lockedDate; + } + + public boolean hasLockedDateElement() { + return this.lockedDate != null && !this.lockedDate.isEmpty(); + } + + public boolean hasLockedDate() { + return this.lockedDate != null && !this.lockedDate.isEmpty(); + } + + /** + * @param value {@link #lockedDate} (If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value + */ + public ValueSet setLockedDateElement(DateType value) { + this.lockedDate = value; + return this; + } + + /** + * @return If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date. + */ + public Date getLockedDate() { + return this.lockedDate == null ? null : this.lockedDate.getValue(); + } + + /** + * @param value If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date. + */ + public ValueSet setLockedDate(Date value) { + if (value == null) + this.lockedDate = null; + else { + if (this.lockedDate == null) + this.lockedDate = new DateType(); + this.lockedDate.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ValueSet setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the use of the value set - reason for definition, "the semantic space" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set. + */ + public ValueSet setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public ValueSet addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value + */ + public BooleanType getImmutableElement() { + if (this.immutable == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.immutable"); + else if (Configuration.doAutoCreate()) + this.immutable = new BooleanType(); // bb + return this.immutable; + } + + public boolean hasImmutableElement() { + return this.immutable != null && !this.immutable.isEmpty(); + } + + public boolean hasImmutable() { + return this.immutable != null && !this.immutable.isEmpty(); + } + + /** + * @param value {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value + */ + public ValueSet setImmutableElement(BooleanType value) { + this.immutable = value; + return this; + } + + /** + * @return If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. + */ + public boolean getImmutable() { + return this.immutable == null || this.immutable.isEmpty() ? false : this.immutable.getValue(); + } + + /** + * @param value If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. + */ + public ValueSet setImmutable(boolean value) { + if (this.immutable == null) + this.immutable = new BooleanType(); + this.immutable.setValue(value); + return this; + } + + /** + * @return {@link #requirements} (Explains why this value set is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this value set is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public ValueSet setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this value set is needed and why it has been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this value set is needed and why it has been constrained as it has. + */ + public ValueSet setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public ValueSet setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. + */ + public ValueSet setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #extensible} (Whether this is intended to be used with an extensible binding or not.). This is the underlying object with id, value and extensions. The accessor "getExtensible" gives direct access to the value + */ + public BooleanType getExtensibleElement() { + if (this.extensible == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.extensible"); + else if (Configuration.doAutoCreate()) + this.extensible = new BooleanType(); // bb + return this.extensible; + } + + public boolean hasExtensibleElement() { + return this.extensible != null && !this.extensible.isEmpty(); + } + + public boolean hasExtensible() { + return this.extensible != null && !this.extensible.isEmpty(); + } + + /** + * @param value {@link #extensible} (Whether this is intended to be used with an extensible binding or not.). This is the underlying object with id, value and extensions. The accessor "getExtensible" gives direct access to the value + */ + public ValueSet setExtensibleElement(BooleanType value) { + this.extensible = value; + return this; + } + + /** + * @return Whether this is intended to be used with an extensible binding or not. + */ + public boolean getExtensible() { + return this.extensible == null || this.extensible.isEmpty() ? false : this.extensible.getValue(); + } + + /** + * @param value Whether this is intended to be used with an extensible binding or not. + */ + public ValueSet setExtensible(boolean value) { + if (this.extensible == null) + this.extensible = new BooleanType(); + this.extensible.setValue(value); + return this; + } + + /** + * @return {@link #codeSystem} (A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.) + */ + public ValueSetCodeSystemComponent getCodeSystem() { + if (this.codeSystem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.codeSystem"); + else if (Configuration.doAutoCreate()) + this.codeSystem = new ValueSetCodeSystemComponent(); // cc + return this.codeSystem; + } + + public boolean hasCodeSystem() { + return this.codeSystem != null && !this.codeSystem.isEmpty(); + } + + /** + * @param value {@link #codeSystem} (A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.) + */ + public ValueSet setCodeSystem(ValueSetCodeSystemComponent value) { + this.codeSystem = value; + return this; + } + + /** + * @return {@link #compose} (A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.) + */ + public ValueSetComposeComponent getCompose() { + if (this.compose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.compose"); + else if (Configuration.doAutoCreate()) + this.compose = new ValueSetComposeComponent(); // cc + return this.compose; + } + + public boolean hasCompose() { + return this.compose != null && !this.compose.isEmpty(); + } + + /** + * @param value {@link #compose} (A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.) + */ + public ValueSet setCompose(ValueSetComposeComponent value) { + this.compose = value; + return this; + } + + /** + * @return {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.) + */ + public ValueSetExpansionComponent getExpansion() { + if (this.expansion == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ValueSet.expansion"); + else if (Configuration.doAutoCreate()) + this.expansion = new ValueSetExpansionComponent(); // cc + return this.expansion; + } + + public boolean hasExpansion() { + return this.expansion != null && !this.expansion.isEmpty(); + } + + /** + * @param value {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.) + */ + public ValueSet setExpansion(ValueSetExpansionComponent value) { + this.expansion = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name describing the value set.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the value set.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the value set.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("lockedDate", "date", "If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.", 0, java.lang.Integer.MAX_VALUE, lockedDate)); + childrenList.add(new Property("description", "string", "A free text natural language description of the use of the value set - reason for definition, \"the semantic space\" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("immutable", "boolean", "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", 0, java.lang.Integer.MAX_VALUE, immutable)); + childrenList.add(new Property("requirements", "string", "Explains why this value set is needed and why it has been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("extensible", "boolean", "Whether this is intended to be used with an extensible binding or not.", 0, java.lang.Integer.MAX_VALUE, extensible)); + childrenList.add(new Property("codeSystem", "", "A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("compose", "", "A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.", 0, java.lang.Integer.MAX_VALUE, compose)); + childrenList.add(new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, java.lang.Integer.MAX_VALUE, expansion)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ValueSetContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("lockedDate")) + this.lockedDate = castToDate(value); // DateType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("immutable")) + this.immutable = castToBoolean(value); // BooleanType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("extensible")) + this.extensible = castToBoolean(value); // BooleanType + else if (name.equals("codeSystem")) + this.codeSystem = (ValueSetCodeSystemComponent) value; // ValueSetCodeSystemComponent + else if (name.equals("compose")) + this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent + else if (name.equals("expansion")) + this.expansion = (ValueSetExpansionComponent) value; // ValueSetExpansionComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.url"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.date"); + } + else if (name.equals("lockedDate")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.lockedDate"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("immutable")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.immutable"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.copyright"); + } + else if (name.equals("extensible")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.extensible"); + } + else if (name.equals("codeSystem")) { + this.codeSystem = new ValueSetCodeSystemComponent(); + return this.codeSystem; + } + else if (name.equals("compose")) { + this.compose = new ValueSetComposeComponent(); + return this.compose; + } + else if (name.equals("expansion")) { + this.expansion = new ValueSetExpansionComponent(); + return this.expansion; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ValueSet"; + + } + + public ValueSet copy() { + ValueSet dst = new ValueSet(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ValueSetContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.lockedDate = lockedDate == null ? null : lockedDate.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.immutable = immutable == null ? null : immutable.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + dst.extensible = extensible == null ? null : extensible.copy(); + dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.compose = compose == null ? null : compose.copy(); + dst.expansion = expansion == null ? null : expansion.copy(); + return dst; + } + + protected ValueSet typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ValueSet)) + return false; + ValueSet o = (ValueSet) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(lockedDate, o.lockedDate, true) && compareDeep(description, o.description, true) + && compareDeep(useContext, o.useContext, true) && compareDeep(immutable, o.immutable, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(copyright, o.copyright, true) && compareDeep(extensible, o.extensible, true) && compareDeep(codeSystem, o.codeSystem, true) + && compareDeep(compose, o.compose, true) && compareDeep(expansion, o.expansion, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ValueSet)) + return false; + ValueSet o = (ValueSet) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(lockedDate, o.lockedDate, true) && compareValues(description, o.description, true) + && compareValues(immutable, o.immutable, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(extensible, o.extensible, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) + && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (lockedDate == null || lockedDate.isEmpty()) + && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (immutable == null || immutable.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (extensible == null || extensible.isEmpty()) + && (codeSystem == null || codeSystem.isEmpty()) && (compose == null || compose.isEmpty()) + && (expansion == null || expansion.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ValueSet; + } + + @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier for the value set", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="code", path="ValueSet.codeSystem.concept.code", description="A code defined in the value set", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="ValueSet.url", description="The logical URL for the value set", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="Uniquely identifies this expansion", type="uri" ) + public static final String SP_EXPANSION = "expansion"; + @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="uri" ) + public static final String SP_REFERENCE = "reference"; + @SearchParamDefinition(name="system", path="ValueSet.codeSystem.system", description="The system for any codes defined by this value set", type="uri" ) + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="ValueSet.useContext", description="A use context assigned to the value set", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set", type="token" ) + public static final String SP_STATUS = "status"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/VisionPrescription.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/VisionPrescription.java new file mode 100644 index 00000000000..00db20481ac --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/VisionPrescription.java @@ -0,0 +1,1877 @@ +package org.hl7.fhir.dstu21.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ +@ResourceDef(name="VisionPrescription", profile="http://hl7.org/fhir/Profile/VisionPrescription") +public class VisionPrescription extends DomainResource { + + public enum VisionEyes { + /** + * Right Eye + */ + RIGHT, + /** + * Left Eye + */ + LEFT, + /** + * added to help the parsers + */ + NULL; + public static VisionEyes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("right".equals(codeString)) + return RIGHT; + if ("left".equals(codeString)) + return LEFT; + throw new FHIRException("Unknown VisionEyes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RIGHT: return "right"; + case LEFT: return "left"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case RIGHT: return "http://hl7.org/fhir/vision-eye-codes"; + case LEFT: return "http://hl7.org/fhir/vision-eye-codes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case RIGHT: return "Right Eye"; + case LEFT: return "Left Eye"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RIGHT: return "Right Eye"; + case LEFT: return "Left Eye"; + default: return "?"; + } + } + } + + public static class VisionEyesEnumFactory implements EnumFactory { + public VisionEyes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("right".equals(codeString)) + return VisionEyes.RIGHT; + if ("left".equals(codeString)) + return VisionEyes.LEFT; + throw new IllegalArgumentException("Unknown VisionEyes code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("right".equals(codeString)) + return new Enumeration(this, VisionEyes.RIGHT); + if ("left".equals(codeString)) + return new Enumeration(this, VisionEyes.LEFT); + throw new FHIRException("Unknown VisionEyes code '"+codeString+"'"); + } + public String toCode(VisionEyes code) { + if (code == VisionEyes.RIGHT) + return "right"; + if (code == VisionEyes.LEFT) + return "left"; + return "?"; + } + } + + public enum VisionBase { + /** + * top + */ + UP, + /** + * bottom + */ + DOWN, + /** + * inner edge + */ + IN, + /** + * outer edge + */ + OUT, + /** + * added to help the parsers + */ + NULL; + public static VisionBase fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("up".equals(codeString)) + return UP; + if ("down".equals(codeString)) + return DOWN; + if ("in".equals(codeString)) + return IN; + if ("out".equals(codeString)) + return OUT; + throw new FHIRException("Unknown VisionBase code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UP: return "up"; + case DOWN: return "down"; + case IN: return "in"; + case OUT: return "out"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case UP: return "http://hl7.org/fhir/vision-base-codes"; + case DOWN: return "http://hl7.org/fhir/vision-base-codes"; + case IN: return "http://hl7.org/fhir/vision-base-codes"; + case OUT: return "http://hl7.org/fhir/vision-base-codes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case UP: return "top"; + case DOWN: return "bottom"; + case IN: return "inner edge"; + case OUT: return "outer edge"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UP: return "Up"; + case DOWN: return "Down"; + case IN: return "In"; + case OUT: return "Out"; + default: return "?"; + } + } + } + + public static class VisionBaseEnumFactory implements EnumFactory { + public VisionBase fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("up".equals(codeString)) + return VisionBase.UP; + if ("down".equals(codeString)) + return VisionBase.DOWN; + if ("in".equals(codeString)) + return VisionBase.IN; + if ("out".equals(codeString)) + return VisionBase.OUT; + throw new IllegalArgumentException("Unknown VisionBase code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("up".equals(codeString)) + return new Enumeration(this, VisionBase.UP); + if ("down".equals(codeString)) + return new Enumeration(this, VisionBase.DOWN); + if ("in".equals(codeString)) + return new Enumeration(this, VisionBase.IN); + if ("out".equals(codeString)) + return new Enumeration(this, VisionBase.OUT); + throw new FHIRException("Unknown VisionBase code '"+codeString+"'"); + } + public String toCode(VisionBase code) { + if (code == VisionBase.UP) + return "up"; + if (code == VisionBase.DOWN) + return "down"; + if (code == VisionBase.IN) + return "in"; + if (code == VisionBase.OUT) + return "out"; + return "?"; + } + } + + @Block() + public static class VisionPrescriptionDispenseComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the type of vision correction product which is required for the patient. + */ + @Child(name = "product", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Product to be supplied", formalDefinition="Identifies the type of vision correction product which is required for the patient." ) + protected Coding product; + + /** + * The eye for which the lens applies. + */ + @Child(name = "eye", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="right | left", formalDefinition="The eye for which the lens applies." ) + protected Enumeration eye; + + /** + * Lens power measured in diopters (0.25 units). + */ + @Child(name = "sphere", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens sphere", formalDefinition="Lens power measured in diopters (0.25 units)." ) + protected DecimalType sphere; + + /** + * Power adjustment for astigmatism measured in diopters (0.25 units). + */ + @Child(name = "cylinder", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens cylinder", formalDefinition="Power adjustment for astigmatism measured in diopters (0.25 units)." ) + protected DecimalType cylinder; + + /** + * Adjustment for astigmatism measured in integer degrees. + */ + @Child(name = "axis", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens axis", formalDefinition="Adjustment for astigmatism measured in integer degrees." ) + protected IntegerType axis; + + /** + * Amount of prism to compensate for eye alignment in fractional units. + */ + @Child(name = "prism", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens prism", formalDefinition="Amount of prism to compensate for eye alignment in fractional units." ) + protected DecimalType prism; + + /** + * The relative base, or reference lens edge, for the prism. + */ + @Child(name = "base", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="up | down | in | out", formalDefinition="The relative base, or reference lens edge, for the prism." ) + protected Enumeration base; + + /** + * Power adjustment for multifocal lenses measured in diopters (0.25 units). + */ + @Child(name = "add", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens add", formalDefinition="Power adjustment for multifocal lenses measured in diopters (0.25 units)." ) + protected DecimalType add; + + /** + * Contact lens power measured in diopters (0.25 units). + */ + @Child(name = "power", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contact lens power", formalDefinition="Contact lens power measured in diopters (0.25 units)." ) + protected DecimalType power; + + /** + * Back curvature measured in millimeters. + */ + @Child(name = "backCurve", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contact lens back curvature", formalDefinition="Back curvature measured in millimeters." ) + protected DecimalType backCurve; + + /** + * Contact lens diameter measured in millimeters. + */ + @Child(name = "diameter", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contact lens diameter", formalDefinition="Contact lens diameter measured in millimeters." ) + protected DecimalType diameter; + + /** + * The recommended maximum wear period for the lens. + */ + @Child(name = "duration", type = {SimpleQuantity.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens wear duration", formalDefinition="The recommended maximum wear period for the lens." ) + protected SimpleQuantity duration; + + /** + * Special color or pattern. + */ + @Child(name = "color", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens add", formalDefinition="Special color or pattern." ) + protected StringType color; + + /** + * Brand recommendations or restrictions. + */ + @Child(name = "brand", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Lens add", formalDefinition="Brand recommendations or restrictions." ) + protected StringType brand; + + /** + * Notes for special requirements such as coatings and lens materials. + */ + @Child(name = "notes", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Notes for coatings", formalDefinition="Notes for special requirements such as coatings and lens materials." ) + protected StringType notes; + + private static final long serialVersionUID = -1586392610L; + + /* + * Constructor + */ + public VisionPrescriptionDispenseComponent() { + super(); + } + + /* + * Constructor + */ + public VisionPrescriptionDispenseComponent(Coding product) { + super(); + this.product = product; + } + + /** + * @return {@link #product} (Identifies the type of vision correction product which is required for the patient.) + */ + public Coding getProduct() { + if (this.product == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.product"); + else if (Configuration.doAutoCreate()) + this.product = new Coding(); // cc + return this.product; + } + + public boolean hasProduct() { + return this.product != null && !this.product.isEmpty(); + } + + /** + * @param value {@link #product} (Identifies the type of vision correction product which is required for the patient.) + */ + public VisionPrescriptionDispenseComponent setProduct(Coding value) { + this.product = value; + return this; + } + + /** + * @return {@link #eye} (The eye for which the lens applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value + */ + public Enumeration getEyeElement() { + if (this.eye == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.eye"); + else if (Configuration.doAutoCreate()) + this.eye = new Enumeration(new VisionEyesEnumFactory()); // bb + return this.eye; + } + + public boolean hasEyeElement() { + return this.eye != null && !this.eye.isEmpty(); + } + + public boolean hasEye() { + return this.eye != null && !this.eye.isEmpty(); + } + + /** + * @param value {@link #eye} (The eye for which the lens applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setEyeElement(Enumeration value) { + this.eye = value; + return this; + } + + /** + * @return The eye for which the lens applies. + */ + public VisionEyes getEye() { + return this.eye == null ? null : this.eye.getValue(); + } + + /** + * @param value The eye for which the lens applies. + */ + public VisionPrescriptionDispenseComponent setEye(VisionEyes value) { + if (value == null) + this.eye = null; + else { + if (this.eye == null) + this.eye = new Enumeration(new VisionEyesEnumFactory()); + this.eye.setValue(value); + } + return this; + } + + /** + * @return {@link #sphere} (Lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value + */ + public DecimalType getSphereElement() { + if (this.sphere == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.sphere"); + else if (Configuration.doAutoCreate()) + this.sphere = new DecimalType(); // bb + return this.sphere; + } + + public boolean hasSphereElement() { + return this.sphere != null && !this.sphere.isEmpty(); + } + + public boolean hasSphere() { + return this.sphere != null && !this.sphere.isEmpty(); + } + + /** + * @param value {@link #sphere} (Lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setSphereElement(DecimalType value) { + this.sphere = value; + return this; + } + + /** + * @return Lens power measured in diopters (0.25 units). + */ + public BigDecimal getSphere() { + return this.sphere == null ? null : this.sphere.getValue(); + } + + /** + * @param value Lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setSphere(BigDecimal value) { + if (value == null) + this.sphere = null; + else { + if (this.sphere == null) + this.sphere = new DecimalType(); + this.sphere.setValue(value); + } + return this; + } + + /** + * @param value Lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setSphere(long value) { + this.sphere = new DecimalType(); + this.sphere.setValue(value); + return this; + } + + /** + * @param value Lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setSphere(double value) { + this.sphere = new DecimalType(); + this.sphere.setValue(value); + return this; + } + + /** + * @return {@link #cylinder} (Power adjustment for astigmatism measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value + */ + public DecimalType getCylinderElement() { + if (this.cylinder == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.cylinder"); + else if (Configuration.doAutoCreate()) + this.cylinder = new DecimalType(); // bb + return this.cylinder; + } + + public boolean hasCylinderElement() { + return this.cylinder != null && !this.cylinder.isEmpty(); + } + + public boolean hasCylinder() { + return this.cylinder != null && !this.cylinder.isEmpty(); + } + + /** + * @param value {@link #cylinder} (Power adjustment for astigmatism measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setCylinderElement(DecimalType value) { + this.cylinder = value; + return this; + } + + /** + * @return Power adjustment for astigmatism measured in diopters (0.25 units). + */ + public BigDecimal getCylinder() { + return this.cylinder == null ? null : this.cylinder.getValue(); + } + + /** + * @param value Power adjustment for astigmatism measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setCylinder(BigDecimal value) { + if (value == null) + this.cylinder = null; + else { + if (this.cylinder == null) + this.cylinder = new DecimalType(); + this.cylinder.setValue(value); + } + return this; + } + + /** + * @param value Power adjustment for astigmatism measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setCylinder(long value) { + this.cylinder = new DecimalType(); + this.cylinder.setValue(value); + return this; + } + + /** + * @param value Power adjustment for astigmatism measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setCylinder(double value) { + this.cylinder = new DecimalType(); + this.cylinder.setValue(value); + return this; + } + + /** + * @return {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value + */ + public IntegerType getAxisElement() { + if (this.axis == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.axis"); + else if (Configuration.doAutoCreate()) + this.axis = new IntegerType(); // bb + return this.axis; + } + + public boolean hasAxisElement() { + return this.axis != null && !this.axis.isEmpty(); + } + + public boolean hasAxis() { + return this.axis != null && !this.axis.isEmpty(); + } + + /** + * @param value {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setAxisElement(IntegerType value) { + this.axis = value; + return this; + } + + /** + * @return Adjustment for astigmatism measured in integer degrees. + */ + public int getAxis() { + return this.axis == null || this.axis.isEmpty() ? 0 : this.axis.getValue(); + } + + /** + * @param value Adjustment for astigmatism measured in integer degrees. + */ + public VisionPrescriptionDispenseComponent setAxis(int value) { + if (this.axis == null) + this.axis = new IntegerType(); + this.axis.setValue(value); + return this; + } + + /** + * @return {@link #prism} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getPrism" gives direct access to the value + */ + public DecimalType getPrismElement() { + if (this.prism == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.prism"); + else if (Configuration.doAutoCreate()) + this.prism = new DecimalType(); // bb + return this.prism; + } + + public boolean hasPrismElement() { + return this.prism != null && !this.prism.isEmpty(); + } + + public boolean hasPrism() { + return this.prism != null && !this.prism.isEmpty(); + } + + /** + * @param value {@link #prism} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getPrism" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setPrismElement(DecimalType value) { + this.prism = value; + return this; + } + + /** + * @return Amount of prism to compensate for eye alignment in fractional units. + */ + public BigDecimal getPrism() { + return this.prism == null ? null : this.prism.getValue(); + } + + /** + * @param value Amount of prism to compensate for eye alignment in fractional units. + */ + public VisionPrescriptionDispenseComponent setPrism(BigDecimal value) { + if (value == null) + this.prism = null; + else { + if (this.prism == null) + this.prism = new DecimalType(); + this.prism.setValue(value); + } + return this; + } + + /** + * @param value Amount of prism to compensate for eye alignment in fractional units. + */ + public VisionPrescriptionDispenseComponent setPrism(long value) { + this.prism = new DecimalType(); + this.prism.setValue(value); + return this; + } + + /** + * @param value Amount of prism to compensate for eye alignment in fractional units. + */ + public VisionPrescriptionDispenseComponent setPrism(double value) { + this.prism = new DecimalType(); + this.prism.setValue(value); + return this; + } + + /** + * @return {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public Enumeration getBaseElement() { + if (this.base == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.base"); + else if (Configuration.doAutoCreate()) + this.base = new Enumeration(new VisionBaseEnumFactory()); // bb + return this.base; + } + + public boolean hasBaseElement() { + return this.base != null && !this.base.isEmpty(); + } + + public boolean hasBase() { + return this.base != null && !this.base.isEmpty(); + } + + /** + * @param value {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setBaseElement(Enumeration value) { + this.base = value; + return this; + } + + /** + * @return The relative base, or reference lens edge, for the prism. + */ + public VisionBase getBase() { + return this.base == null ? null : this.base.getValue(); + } + + /** + * @param value The relative base, or reference lens edge, for the prism. + */ + public VisionPrescriptionDispenseComponent setBase(VisionBase value) { + if (value == null) + this.base = null; + else { + if (this.base == null) + this.base = new Enumeration(new VisionBaseEnumFactory()); + this.base.setValue(value); + } + return this; + } + + /** + * @return {@link #add} (Power adjustment for multifocal lenses measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value + */ + public DecimalType getAddElement() { + if (this.add == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.add"); + else if (Configuration.doAutoCreate()) + this.add = new DecimalType(); // bb + return this.add; + } + + public boolean hasAddElement() { + return this.add != null && !this.add.isEmpty(); + } + + public boolean hasAdd() { + return this.add != null && !this.add.isEmpty(); + } + + /** + * @param value {@link #add} (Power adjustment for multifocal lenses measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setAddElement(DecimalType value) { + this.add = value; + return this; + } + + /** + * @return Power adjustment for multifocal lenses measured in diopters (0.25 units). + */ + public BigDecimal getAdd() { + return this.add == null ? null : this.add.getValue(); + } + + /** + * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setAdd(BigDecimal value) { + if (value == null) + this.add = null; + else { + if (this.add == null) + this.add = new DecimalType(); + this.add.setValue(value); + } + return this; + } + + /** + * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setAdd(long value) { + this.add = new DecimalType(); + this.add.setValue(value); + return this; + } + + /** + * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setAdd(double value) { + this.add = new DecimalType(); + this.add.setValue(value); + return this; + } + + /** + * @return {@link #power} (Contact lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value + */ + public DecimalType getPowerElement() { + if (this.power == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.power"); + else if (Configuration.doAutoCreate()) + this.power = new DecimalType(); // bb + return this.power; + } + + public boolean hasPowerElement() { + return this.power != null && !this.power.isEmpty(); + } + + public boolean hasPower() { + return this.power != null && !this.power.isEmpty(); + } + + /** + * @param value {@link #power} (Contact lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setPowerElement(DecimalType value) { + this.power = value; + return this; + } + + /** + * @return Contact lens power measured in diopters (0.25 units). + */ + public BigDecimal getPower() { + return this.power == null ? null : this.power.getValue(); + } + + /** + * @param value Contact lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setPower(BigDecimal value) { + if (value == null) + this.power = null; + else { + if (this.power == null) + this.power = new DecimalType(); + this.power.setValue(value); + } + return this; + } + + /** + * @param value Contact lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setPower(long value) { + this.power = new DecimalType(); + this.power.setValue(value); + return this; + } + + /** + * @param value Contact lens power measured in diopters (0.25 units). + */ + public VisionPrescriptionDispenseComponent setPower(double value) { + this.power = new DecimalType(); + this.power.setValue(value); + return this; + } + + /** + * @return {@link #backCurve} (Back curvature measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value + */ + public DecimalType getBackCurveElement() { + if (this.backCurve == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.backCurve"); + else if (Configuration.doAutoCreate()) + this.backCurve = new DecimalType(); // bb + return this.backCurve; + } + + public boolean hasBackCurveElement() { + return this.backCurve != null && !this.backCurve.isEmpty(); + } + + public boolean hasBackCurve() { + return this.backCurve != null && !this.backCurve.isEmpty(); + } + + /** + * @param value {@link #backCurve} (Back curvature measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setBackCurveElement(DecimalType value) { + this.backCurve = value; + return this; + } + + /** + * @return Back curvature measured in millimeters. + */ + public BigDecimal getBackCurve() { + return this.backCurve == null ? null : this.backCurve.getValue(); + } + + /** + * @param value Back curvature measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setBackCurve(BigDecimal value) { + if (value == null) + this.backCurve = null; + else { + if (this.backCurve == null) + this.backCurve = new DecimalType(); + this.backCurve.setValue(value); + } + return this; + } + + /** + * @param value Back curvature measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setBackCurve(long value) { + this.backCurve = new DecimalType(); + this.backCurve.setValue(value); + return this; + } + + /** + * @param value Back curvature measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setBackCurve(double value) { + this.backCurve = new DecimalType(); + this.backCurve.setValue(value); + return this; + } + + /** + * @return {@link #diameter} (Contact lens diameter measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value + */ + public DecimalType getDiameterElement() { + if (this.diameter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.diameter"); + else if (Configuration.doAutoCreate()) + this.diameter = new DecimalType(); // bb + return this.diameter; + } + + public boolean hasDiameterElement() { + return this.diameter != null && !this.diameter.isEmpty(); + } + + public boolean hasDiameter() { + return this.diameter != null && !this.diameter.isEmpty(); + } + + /** + * @param value {@link #diameter} (Contact lens diameter measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setDiameterElement(DecimalType value) { + this.diameter = value; + return this; + } + + /** + * @return Contact lens diameter measured in millimeters. + */ + public BigDecimal getDiameter() { + return this.diameter == null ? null : this.diameter.getValue(); + } + + /** + * @param value Contact lens diameter measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setDiameter(BigDecimal value) { + if (value == null) + this.diameter = null; + else { + if (this.diameter == null) + this.diameter = new DecimalType(); + this.diameter.setValue(value); + } + return this; + } + + /** + * @param value Contact lens diameter measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setDiameter(long value) { + this.diameter = new DecimalType(); + this.diameter.setValue(value); + return this; + } + + /** + * @param value Contact lens diameter measured in millimeters. + */ + public VisionPrescriptionDispenseComponent setDiameter(double value) { + this.diameter = new DecimalType(); + this.diameter.setValue(value); + return this; + } + + /** + * @return {@link #duration} (The recommended maximum wear period for the lens.) + */ + public SimpleQuantity getDuration() { + if (this.duration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.duration"); + else if (Configuration.doAutoCreate()) + this.duration = new SimpleQuantity(); // cc + return this.duration; + } + + public boolean hasDuration() { + return this.duration != null && !this.duration.isEmpty(); + } + + /** + * @param value {@link #duration} (The recommended maximum wear period for the lens.) + */ + public VisionPrescriptionDispenseComponent setDuration(SimpleQuantity value) { + this.duration = value; + return this; + } + + /** + * @return {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value + */ + public StringType getColorElement() { + if (this.color == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.color"); + else if (Configuration.doAutoCreate()) + this.color = new StringType(); // bb + return this.color; + } + + public boolean hasColorElement() { + return this.color != null && !this.color.isEmpty(); + } + + public boolean hasColor() { + return this.color != null && !this.color.isEmpty(); + } + + /** + * @param value {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setColorElement(StringType value) { + this.color = value; + return this; + } + + /** + * @return Special color or pattern. + */ + public String getColor() { + return this.color == null ? null : this.color.getValue(); + } + + /** + * @param value Special color or pattern. + */ + public VisionPrescriptionDispenseComponent setColor(String value) { + if (Utilities.noString(value)) + this.color = null; + else { + if (this.color == null) + this.color = new StringType(); + this.color.setValue(value); + } + return this; + } + + /** + * @return {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value + */ + public StringType getBrandElement() { + if (this.brand == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.brand"); + else if (Configuration.doAutoCreate()) + this.brand = new StringType(); // bb + return this.brand; + } + + public boolean hasBrandElement() { + return this.brand != null && !this.brand.isEmpty(); + } + + public boolean hasBrand() { + return this.brand != null && !this.brand.isEmpty(); + } + + /** + * @param value {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setBrandElement(StringType value) { + this.brand = value; + return this; + } + + /** + * @return Brand recommendations or restrictions. + */ + public String getBrand() { + return this.brand == null ? null : this.brand.getValue(); + } + + /** + * @param value Brand recommendations or restrictions. + */ + public VisionPrescriptionDispenseComponent setBrand(String value) { + if (Utilities.noString(value)) + this.brand = null; + else { + if (this.brand == null) + this.brand = new StringType(); + this.brand.setValue(value); + } + return this; + } + + /** + * @return {@link #notes} (Notes for special requirements such as coatings and lens materials.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public StringType getNotesElement() { + if (this.notes == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.notes"); + else if (Configuration.doAutoCreate()) + this.notes = new StringType(); // bb + return this.notes; + } + + public boolean hasNotesElement() { + return this.notes != null && !this.notes.isEmpty(); + } + + public boolean hasNotes() { + return this.notes != null && !this.notes.isEmpty(); + } + + /** + * @param value {@link #notes} (Notes for special requirements such as coatings and lens materials.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value + */ + public VisionPrescriptionDispenseComponent setNotesElement(StringType value) { + this.notes = value; + return this; + } + + /** + * @return Notes for special requirements such as coatings and lens materials. + */ + public String getNotes() { + return this.notes == null ? null : this.notes.getValue(); + } + + /** + * @param value Notes for special requirements such as coatings and lens materials. + */ + public VisionPrescriptionDispenseComponent setNotes(String value) { + if (Utilities.noString(value)) + this.notes = null; + else { + if (this.notes == null) + this.notes = new StringType(); + this.notes.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("product", "Coding", "Identifies the type of vision correction product which is required for the patient.", 0, java.lang.Integer.MAX_VALUE, product)); + childrenList.add(new Property("eye", "code", "The eye for which the lens applies.", 0, java.lang.Integer.MAX_VALUE, eye)); + childrenList.add(new Property("sphere", "decimal", "Lens power measured in diopters (0.25 units).", 0, java.lang.Integer.MAX_VALUE, sphere)); + childrenList.add(new Property("cylinder", "decimal", "Power adjustment for astigmatism measured in diopters (0.25 units).", 0, java.lang.Integer.MAX_VALUE, cylinder)); + childrenList.add(new Property("axis", "integer", "Adjustment for astigmatism measured in integer degrees.", 0, java.lang.Integer.MAX_VALUE, axis)); + childrenList.add(new Property("prism", "decimal", "Amount of prism to compensate for eye alignment in fractional units.", 0, java.lang.Integer.MAX_VALUE, prism)); + childrenList.add(new Property("base", "code", "The relative base, or reference lens edge, for the prism.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("add", "decimal", "Power adjustment for multifocal lenses measured in diopters (0.25 units).", 0, java.lang.Integer.MAX_VALUE, add)); + childrenList.add(new Property("power", "decimal", "Contact lens power measured in diopters (0.25 units).", 0, java.lang.Integer.MAX_VALUE, power)); + childrenList.add(new Property("backCurve", "decimal", "Back curvature measured in millimeters.", 0, java.lang.Integer.MAX_VALUE, backCurve)); + childrenList.add(new Property("diameter", "decimal", "Contact lens diameter measured in millimeters.", 0, java.lang.Integer.MAX_VALUE, diameter)); + childrenList.add(new Property("duration", "SimpleQuantity", "The recommended maximum wear period for the lens.", 0, java.lang.Integer.MAX_VALUE, duration)); + childrenList.add(new Property("color", "string", "Special color or pattern.", 0, java.lang.Integer.MAX_VALUE, color)); + childrenList.add(new Property("brand", "string", "Brand recommendations or restrictions.", 0, java.lang.Integer.MAX_VALUE, brand)); + childrenList.add(new Property("notes", "string", "Notes for special requirements such as coatings and lens materials.", 0, java.lang.Integer.MAX_VALUE, notes)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("product")) + this.product = castToCoding(value); // Coding + else if (name.equals("eye")) + this.eye = new VisionEyesEnumFactory().fromType(value); // Enumeration + else if (name.equals("sphere")) + this.sphere = castToDecimal(value); // DecimalType + else if (name.equals("cylinder")) + this.cylinder = castToDecimal(value); // DecimalType + else if (name.equals("axis")) + this.axis = castToInteger(value); // IntegerType + else if (name.equals("prism")) + this.prism = castToDecimal(value); // DecimalType + else if (name.equals("base")) + this.base = new VisionBaseEnumFactory().fromType(value); // Enumeration + else if (name.equals("add")) + this.add = castToDecimal(value); // DecimalType + else if (name.equals("power")) + this.power = castToDecimal(value); // DecimalType + else if (name.equals("backCurve")) + this.backCurve = castToDecimal(value); // DecimalType + else if (name.equals("diameter")) + this.diameter = castToDecimal(value); // DecimalType + else if (name.equals("duration")) + this.duration = castToSimpleQuantity(value); // SimpleQuantity + else if (name.equals("color")) + this.color = castToString(value); // StringType + else if (name.equals("brand")) + this.brand = castToString(value); // StringType + else if (name.equals("notes")) + this.notes = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("product")) { + this.product = new Coding(); + return this.product; + } + else if (name.equals("eye")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.eye"); + } + else if (name.equals("sphere")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.sphere"); + } + else if (name.equals("cylinder")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.cylinder"); + } + else if (name.equals("axis")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.axis"); + } + else if (name.equals("prism")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.prism"); + } + else if (name.equals("base")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.base"); + } + else if (name.equals("add")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.add"); + } + else if (name.equals("power")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.power"); + } + else if (name.equals("backCurve")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.backCurve"); + } + else if (name.equals("diameter")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.diameter"); + } + else if (name.equals("duration")) { + this.duration = new SimpleQuantity(); + return this.duration; + } + else if (name.equals("color")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.color"); + } + else if (name.equals("brand")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.brand"); + } + else if (name.equals("notes")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.notes"); + } + else + return super.addChild(name); + } + + public VisionPrescriptionDispenseComponent copy() { + VisionPrescriptionDispenseComponent dst = new VisionPrescriptionDispenseComponent(); + copyValues(dst); + dst.product = product == null ? null : product.copy(); + dst.eye = eye == null ? null : eye.copy(); + dst.sphere = sphere == null ? null : sphere.copy(); + dst.cylinder = cylinder == null ? null : cylinder.copy(); + dst.axis = axis == null ? null : axis.copy(); + dst.prism = prism == null ? null : prism.copy(); + dst.base = base == null ? null : base.copy(); + dst.add = add == null ? null : add.copy(); + dst.power = power == null ? null : power.copy(); + dst.backCurve = backCurve == null ? null : backCurve.copy(); + dst.diameter = diameter == null ? null : diameter.copy(); + dst.duration = duration == null ? null : duration.copy(); + dst.color = color == null ? null : color.copy(); + dst.brand = brand == null ? null : brand.copy(); + dst.notes = notes == null ? null : notes.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof VisionPrescriptionDispenseComponent)) + return false; + VisionPrescriptionDispenseComponent o = (VisionPrescriptionDispenseComponent) other; + return compareDeep(product, o.product, true) && compareDeep(eye, o.eye, true) && compareDeep(sphere, o.sphere, true) + && compareDeep(cylinder, o.cylinder, true) && compareDeep(axis, o.axis, true) && compareDeep(prism, o.prism, true) + && compareDeep(base, o.base, true) && compareDeep(add, o.add, true) && compareDeep(power, o.power, true) + && compareDeep(backCurve, o.backCurve, true) && compareDeep(diameter, o.diameter, true) && compareDeep(duration, o.duration, true) + && compareDeep(color, o.color, true) && compareDeep(brand, o.brand, true) && compareDeep(notes, o.notes, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof VisionPrescriptionDispenseComponent)) + return false; + VisionPrescriptionDispenseComponent o = (VisionPrescriptionDispenseComponent) other; + return compareValues(eye, o.eye, true) && compareValues(sphere, o.sphere, true) && compareValues(cylinder, o.cylinder, true) + && compareValues(axis, o.axis, true) && compareValues(prism, o.prism, true) && compareValues(base, o.base, true) + && compareValues(add, o.add, true) && compareValues(power, o.power, true) && compareValues(backCurve, o.backCurve, true) + && compareValues(diameter, o.diameter, true) && compareValues(color, o.color, true) && compareValues(brand, o.brand, true) + && compareValues(notes, o.notes, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (product == null || product.isEmpty()) && (eye == null || eye.isEmpty()) + && (sphere == null || sphere.isEmpty()) && (cylinder == null || cylinder.isEmpty()) && (axis == null || axis.isEmpty()) + && (prism == null || prism.isEmpty()) && (base == null || base.isEmpty()) && (add == null || add.isEmpty()) + && (power == null || power.isEmpty()) && (backCurve == null || backCurve.isEmpty()) && (diameter == null || diameter.isEmpty()) + && (duration == null || duration.isEmpty()) && (color == null || color.isEmpty()) && (brand == null || brand.isEmpty()) + && (notes == null || notes.isEmpty()); + } + + public String fhirType() { + return "VisionPrescription.dispense"; + + } + + } + + /** + * Business identifier which may be used by other parties to reference or identify the prescription. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business identifier", formalDefinition="Business identifier which may be used by other parties to reference or identify the prescription." ) + protected List identifier; + + /** + * The date (and perhaps time) when the prescription was written. + */ + @Child(name = "dateWritten", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) + protected DateTimeType dateWritten; + + /** + * A link to a resource representing the person to whom the vision products will be supplied. + */ + @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the vision products will be supplied." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A link to a resource representing the person to whom the vision products will be supplied.) + */ + protected Patient patientTarget; + + /** + * The healthcare professional responsible for authorizing the prescription. + */ + @Child(name = "prescriber", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who authorizes the vision product", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) + protected Reference prescriber; + + /** + * The actual object that is the target of the reference (The healthcare professional responsible for authorizing the prescription.) + */ + protected Practitioner prescriberTarget; + + /** + * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. + */ + @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) + protected Reference encounter; + + /** + * The actual object that is the target of the reference (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + protected Encounter encounterTarget; + + /** + * Can be the reason or the indication for writing the prescription. + */ + @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) + protected Type reason; + + /** + * Deals with details of the dispense part of the supply specification. + */ + @Child(name = "dispense", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Vision supply authorization", formalDefinition="Deals with details of the dispense part of the supply specification." ) + protected List dispense; + + private static final long serialVersionUID = -1108276057L; + + /* + * Constructor + */ + public VisionPrescription() { + super(); + } + + /** + * @return {@link #identifier} (Business identifier which may be used by other parties to reference or identify the prescription.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Business identifier which may be used by other parties to reference or identify the prescription.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public VisionPrescription addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value + */ + public DateTimeType getDateWrittenElement() { + if (this.dateWritten == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.dateWritten"); + else if (Configuration.doAutoCreate()) + this.dateWritten = new DateTimeType(); // bb + return this.dateWritten; + } + + public boolean hasDateWrittenElement() { + return this.dateWritten != null && !this.dateWritten.isEmpty(); + } + + public boolean hasDateWritten() { + return this.dateWritten != null && !this.dateWritten.isEmpty(); + } + + /** + * @param value {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value + */ + public VisionPrescription setDateWrittenElement(DateTimeType value) { + this.dateWritten = value; + return this; + } + + /** + * @return The date (and perhaps time) when the prescription was written. + */ + public Date getDateWritten() { + return this.dateWritten == null ? null : this.dateWritten.getValue(); + } + + /** + * @param value The date (and perhaps time) when the prescription was written. + */ + public VisionPrescription setDateWritten(Date value) { + if (value == null) + this.dateWritten = null; + else { + if (this.dateWritten == null) + this.dateWritten = new DateTimeType(); + this.dateWritten.setValue(value); + } + return this; + } + + /** + * @return {@link #patient} (A link to a resource representing the person to whom the vision products will be supplied.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A link to a resource representing the person to whom the vision products will be supplied.) + */ + public VisionPrescription setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the vision products will be supplied.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the vision products will be supplied.) + */ + public VisionPrescription setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) + */ + public Reference getPrescriber() { + if (this.prescriber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.prescriber"); + else if (Configuration.doAutoCreate()) + this.prescriber = new Reference(); // cc + return this.prescriber; + } + + public boolean hasPrescriber() { + return this.prescriber != null && !this.prescriber.isEmpty(); + } + + /** + * @param value {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) + */ + public VisionPrescription setPrescriber(Reference value) { + this.prescriber = value; + return this; + } + + /** + * @return {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) + */ + public Practitioner getPrescriberTarget() { + if (this.prescriberTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.prescriber"); + else if (Configuration.doAutoCreate()) + this.prescriberTarget = new Practitioner(); // aa + return this.prescriberTarget; + } + + /** + * @param value {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) + */ + public VisionPrescription setPrescriberTarget(Practitioner value) { + this.prescriberTarget = value; + return this; + } + + /** + * @return {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.encounter"); + else if (Configuration.doAutoCreate()) + this.encounter = new Reference(); // cc + return this.encounter; + } + + public boolean hasEncounter() { + return this.encounter != null && !this.encounter.isEmpty(); + } + + /** + * @param value {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public VisionPrescription setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public Encounter getEncounterTarget() { + if (this.encounterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create VisionPrescription.encounter"); + else if (Configuration.doAutoCreate()) + this.encounterTarget = new Encounter(); // aa + return this.encounterTarget; + } + + /** + * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) + */ + public VisionPrescription setEncounterTarget(Encounter value) { + this.encounterTarget = value; + return this; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public Type getReason() { + return this.reason; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public CodeableConcept getReasonCodeableConcept() throws FHIRException { + if (!(this.reason instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (CodeableConcept) this.reason; + } + + public boolean hasReasonCodeableConcept() { + return this.reason instanceof CodeableConcept; + } + + /** + * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public Reference getReasonReference() throws FHIRException { + if (!(this.reason instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); + return (Reference) this.reason; + } + + public boolean hasReasonReference() { + return this.reason instanceof Reference; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Can be the reason or the indication for writing the prescription.) + */ + public VisionPrescription setReason(Type value) { + this.reason = value; + return this; + } + + /** + * @return {@link #dispense} (Deals with details of the dispense part of the supply specification.) + */ + public List getDispense() { + if (this.dispense == null) + this.dispense = new ArrayList(); + return this.dispense; + } + + public boolean hasDispense() { + if (this.dispense == null) + return false; + for (VisionPrescriptionDispenseComponent item : this.dispense) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dispense} (Deals with details of the dispense part of the supply specification.) + */ + // syntactic sugar + public VisionPrescriptionDispenseComponent addDispense() { //3 + VisionPrescriptionDispenseComponent t = new VisionPrescriptionDispenseComponent(); + if (this.dispense == null) + this.dispense = new ArrayList(); + this.dispense.add(t); + return t; + } + + // syntactic sugar + public VisionPrescription addDispense(VisionPrescriptionDispenseComponent t) { //3 + if (t == null) + return this; + if (this.dispense == null) + this.dispense = new ArrayList(); + this.dispense.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Business identifier which may be used by other parties to reference or identify the prescription.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, java.lang.Integer.MAX_VALUE, dateWritten)); + childrenList.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person to whom the vision products will be supplied.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("prescriber", "Reference(Practitioner)", "The healthcare professional responsible for authorizing the prescription.", 0, java.lang.Integer.MAX_VALUE, prescriber)); + childrenList.add(new Property("encounter", "Reference(Encounter)", "A link to a resource that identifies the particular occurrence of contact between patient and health care provider.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("dispense", "", "Deals with details of the dispense part of the supply specification.", 0, java.lang.Integer.MAX_VALUE, dispense)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("dateWritten")) + this.dateWritten = castToDateTime(value); // DateTimeType + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("prescriber")) + this.prescriber = castToReference(value); // Reference + else if (name.equals("encounter")) + this.encounter = castToReference(value); // Reference + else if (name.equals("reason[x]")) + this.reason = (Type) value; // Type + else if (name.equals("dispense")) + this.getDispense().add((VisionPrescriptionDispenseComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("dateWritten")) { + throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.dateWritten"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("prescriber")) { + this.prescriber = new Reference(); + return this.prescriber; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("reasonCodeableConcept")) { + this.reason = new CodeableConcept(); + return this.reason; + } + else if (name.equals("reasonReference")) { + this.reason = new Reference(); + return this.reason; + } + else if (name.equals("dispense")) { + return addDispense(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "VisionPrescription"; + + } + + public VisionPrescription copy() { + VisionPrescription dst = new VisionPrescription(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.dateWritten = dateWritten == null ? null : dateWritten.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.prescriber = prescriber == null ? null : prescriber.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + dst.reason = reason == null ? null : reason.copy(); + if (dispense != null) { + dst.dispense = new ArrayList(); + for (VisionPrescriptionDispenseComponent i : dispense) + dst.dispense.add(i.copy()); + }; + return dst; + } + + protected VisionPrescription typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof VisionPrescription)) + return false; + VisionPrescription o = (VisionPrescription) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(dateWritten, o.dateWritten, true) + && compareDeep(patient, o.patient, true) && compareDeep(prescriber, o.prescriber, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(reason, o.reason, true) && compareDeep(dispense, o.dispense, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof VisionPrescription)) + return false; + VisionPrescription o = (VisionPrescription) other; + return compareValues(dateWritten, o.dateWritten, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (dateWritten == null || dateWritten.isEmpty()) + && (patient == null || patient.isEmpty()) && (prescriber == null || prescriber.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (reason == null || reason.isEmpty()) && (dispense == null || dispense.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.VisionPrescription; + } + + @SearchParamDefinition(name="prescriber", path="VisionPrescription.prescriber", description="Who authorizes the vision product", type="reference" ) + public static final String SP_PRESCRIBER = "prescriber"; + @SearchParamDefinition(name="identifier", path="VisionPrescription.identifier", description="Return prescriptions with this external identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) + public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) + public static final String SP_DATEWRITTEN = "datewritten"; + @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identifier", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Additionalmaterials.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Additionalmaterials.java new file mode 100644 index 00000000000..17af4e046b7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Additionalmaterials.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Additionalmaterials { + + /** + * XRay + */ + XRAY, + /** + * Image + */ + IMAGE, + /** + * Email + */ + EMAIL, + /** + * Model + */ + MODEL, + /** + * Document + */ + DOCUMENT, + /** + * Other + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Additionalmaterials fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xray".equals(codeString)) + return XRAY; + if ("image".equals(codeString)) + return IMAGE; + if ("email".equals(codeString)) + return EMAIL; + if ("model".equals(codeString)) + return MODEL; + if ("document".equals(codeString)) + return DOCUMENT; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Additionalmaterials code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XRAY: return "xray"; + case IMAGE: return "image"; + case EMAIL: return "email"; + case MODEL: return "model"; + case DOCUMENT: return "document"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/additionalmaterials"; + } + public String getDefinition() { + switch (this) { + case XRAY: return "XRay"; + case IMAGE: return "Image"; + case EMAIL: return "Email"; + case MODEL: return "Model"; + case DOCUMENT: return "Document"; + case OTHER: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XRAY: return "XRay"; + case IMAGE: return "Image"; + case EMAIL: return "Email"; + case MODEL: return "Model"; + case DOCUMENT: return "Document"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdditionalmaterialsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdditionalmaterialsEnumFactory.java new file mode 100644 index 00000000000..8351e848bc4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdditionalmaterialsEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AdditionalmaterialsEnumFactory implements EnumFactory { + + public Additionalmaterials fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xray".equals(codeString)) + return Additionalmaterials.XRAY; + if ("image".equals(codeString)) + return Additionalmaterials.IMAGE; + if ("email".equals(codeString)) + return Additionalmaterials.EMAIL; + if ("model".equals(codeString)) + return Additionalmaterials.MODEL; + if ("document".equals(codeString)) + return Additionalmaterials.DOCUMENT; + if ("other".equals(codeString)) + return Additionalmaterials.OTHER; + throw new IllegalArgumentException("Unknown Additionalmaterials code '"+codeString+"'"); + } + + public String toCode(Additionalmaterials code) { + if (code == Additionalmaterials.XRAY) + return "xray"; + if (code == Additionalmaterials.IMAGE) + return "image"; + if (code == Additionalmaterials.EMAIL) + return "email"; + if (code == Additionalmaterials.MODEL) + return "model"; + if (code == Additionalmaterials.DOCUMENT) + return "document"; + if (code == Additionalmaterials.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Adjudication.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Adjudication.java new file mode 100644 index 00000000000..d10c31b7e6d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Adjudication.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Adjudication { + + /** + * null + */ + TOTAL, + /** + * null + */ + COPAY, + /** + * null + */ + ELIGIBLE, + /** + * null + */ + DEDUCTIBLE, + /** + * null + */ + ELIGPERCENT, + /** + * null + */ + TAX, + /** + * null + */ + BENEFIT, + /** + * added to help the parsers + */ + NULL; + public static Adjudication fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("total".equals(codeString)) + return TOTAL; + if ("copay".equals(codeString)) + return COPAY; + if ("eligible".equals(codeString)) + return ELIGIBLE; + if ("deductible".equals(codeString)) + return DEDUCTIBLE; + if ("eligpercent".equals(codeString)) + return ELIGPERCENT; + if ("tax".equals(codeString)) + return TAX; + if ("benefit".equals(codeString)) + return BENEFIT; + throw new FHIRException("Unknown Adjudication code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TOTAL: return "total"; + case COPAY: return "copay"; + case ELIGIBLE: return "eligible"; + case DEDUCTIBLE: return "deductible"; + case ELIGPERCENT: return "eligpercent"; + case TAX: return "tax"; + case BENEFIT: return "benefit"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjudication"; + } + public String getDefinition() { + switch (this) { + case TOTAL: return ""; + case COPAY: return ""; + case ELIGIBLE: return ""; + case DEDUCTIBLE: return ""; + case ELIGPERCENT: return ""; + case TAX: return ""; + case BENEFIT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TOTAL: return "total"; + case COPAY: return "copay"; + case ELIGIBLE: return "eligible"; + case DEDUCTIBLE: return "deductible"; + case ELIGPERCENT: return "eligpercent"; + case TAX: return "tax"; + case BENEFIT: return "benefit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationEnumFactory.java new file mode 100644 index 00000000000..f95dbf2aec5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AdjudicationEnumFactory implements EnumFactory { + + public Adjudication fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("total".equals(codeString)) + return Adjudication.TOTAL; + if ("copay".equals(codeString)) + return Adjudication.COPAY; + if ("eligible".equals(codeString)) + return Adjudication.ELIGIBLE; + if ("deductible".equals(codeString)) + return Adjudication.DEDUCTIBLE; + if ("eligpercent".equals(codeString)) + return Adjudication.ELIGPERCENT; + if ("tax".equals(codeString)) + return Adjudication.TAX; + if ("benefit".equals(codeString)) + return Adjudication.BENEFIT; + throw new IllegalArgumentException("Unknown Adjudication code '"+codeString+"'"); + } + + public String toCode(Adjudication code) { + if (code == Adjudication.TOTAL) + return "total"; + if (code == Adjudication.COPAY) + return "copay"; + if (code == Adjudication.ELIGIBLE) + return "eligible"; + if (code == Adjudication.DEDUCTIBLE) + return "deductible"; + if (code == Adjudication.ELIGPERCENT) + return "eligpercent"; + if (code == Adjudication.TAX) + return "tax"; + if (code == Adjudication.BENEFIT) + return "benefit"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationError.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationError.java new file mode 100644 index 00000000000..8b32f97314a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationError.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdjudicationError { + + /** + * null + */ + A001, + /** + * null + */ + A002, + /** + * added to help the parsers + */ + NULL; + public static AdjudicationError fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A001".equals(codeString)) + return A001; + if ("A002".equals(codeString)) + return A002; + throw new FHIRException("Unknown AdjudicationError code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A001: return "A001"; + case A002: return "A002"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjudication-error"; + } + public String getDefinition() { + switch (this) { + case A001: return ""; + case A002: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A001: return "A001"; + case A002: return "A002"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationErrorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationErrorEnumFactory.java new file mode 100644 index 00000000000..fa2b8e6a995 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjudicationErrorEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AdjudicationErrorEnumFactory implements EnumFactory { + + public AdjudicationError fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A001".equals(codeString)) + return AdjudicationError.A001; + if ("A002".equals(codeString)) + return AdjudicationError.A002; + throw new IllegalArgumentException("Unknown AdjudicationError code '"+codeString+"'"); + } + + public String toCode(AdjudicationError code) { + if (code == AdjudicationError.A001) + return "A001"; + if (code == AdjudicationError.A002) + return "A002"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReason.java new file mode 100644 index 00000000000..8802898fcf9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReason.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdjustmentReason { + + /** + * null + */ + A001, + /** + * null + */ + A002, + /** + * added to help the parsers + */ + NULL; + public static AdjustmentReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A001".equals(codeString)) + return A001; + if ("A002".equals(codeString)) + return A002; + throw new FHIRException("Unknown AdjustmentReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A001: return "A001"; + case A002: return "A002"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjustment-reason"; + } + public String getDefinition() { + switch (this) { + case A001: return ""; + case A002: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A001: return "A001"; + case A002: return "A002"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReasonEnumFactory.java new file mode 100644 index 00000000000..9021e000248 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AdjustmentReasonEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AdjustmentReasonEnumFactory implements EnumFactory { + + public AdjustmentReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A001".equals(codeString)) + return AdjustmentReason.A001; + if ("A002".equals(codeString)) + return AdjustmentReason.A002; + throw new IllegalArgumentException("Unknown AdjustmentReason code '"+codeString+"'"); + } + + public String toCode(AdjustmentReason code) { + if (code == AdjustmentReason.A001) + return "A001"; + if (code == AdjustmentReason.A002) + return "A002"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreeds.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreeds.java new file mode 100644 index 00000000000..190923f2233 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreeds.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnimalBreeds { + + /** + * null + */ + GSD, + /** + * null + */ + IRT, + /** + * null + */ + TIBMAS, + /** + * null + */ + GRET, + /** + * added to help the parsers + */ + NULL; + public static AnimalBreeds fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gsd".equals(codeString)) + return GSD; + if ("irt".equals(codeString)) + return IRT; + if ("tibmas".equals(codeString)) + return TIBMAS; + if ("gret".equals(codeString)) + return GRET; + throw new FHIRException("Unknown AnimalBreeds code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GSD: return "gsd"; + case IRT: return "irt"; + case TIBMAS: return "tibmas"; + case GRET: return "gret"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/animal-breed"; + } + public String getDefinition() { + switch (this) { + case GSD: return ""; + case IRT: return ""; + case TIBMAS: return ""; + case GRET: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GSD: return "German Shepherd Dog"; + case IRT: return "Irish Terrier"; + case TIBMAS: return "Tibetan Mastiff"; + case GRET: return "Golden Retriever"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreedsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreedsEnumFactory.java new file mode 100644 index 00000000000..3ca3cc43bab --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalBreedsEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AnimalBreedsEnumFactory implements EnumFactory { + + public AnimalBreeds fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gsd".equals(codeString)) + return AnimalBreeds.GSD; + if ("irt".equals(codeString)) + return AnimalBreeds.IRT; + if ("tibmas".equals(codeString)) + return AnimalBreeds.TIBMAS; + if ("gret".equals(codeString)) + return AnimalBreeds.GRET; + throw new IllegalArgumentException("Unknown AnimalBreeds code '"+codeString+"'"); + } + + public String toCode(AnimalBreeds code) { + if (code == AnimalBreeds.GSD) + return "gsd"; + if (code == AnimalBreeds.IRT) + return "irt"; + if (code == AnimalBreeds.TIBMAS) + return "tibmas"; + if (code == AnimalBreeds.GRET) + return "gret"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatus.java new file mode 100644 index 00000000000..0d5df1df15d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnimalGenderstatus { + + /** + * The animal has been sterilized, castrated or otherwise made infertile. + */ + NEUTERED, + /** + * The animal's reproductive organs are intact. + */ + INTACT, + /** + * Unable to determine whether the animal has been neutered. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AnimalGenderstatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("neutered".equals(codeString)) + return NEUTERED; + if ("intact".equals(codeString)) + return INTACT; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown AnimalGenderstatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NEUTERED: return "neutered"; + case INTACT: return "intact"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/animal-genderstatus"; + } + public String getDefinition() { + switch (this) { + case NEUTERED: return "The animal has been sterilized, castrated or otherwise made infertile."; + case INTACT: return "The animal's reproductive organs are intact."; + case UNKNOWN: return "Unable to determine whether the animal has been neutered."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NEUTERED: return "Neutered"; + case INTACT: return "Intact"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatusEnumFactory.java new file mode 100644 index 00000000000..fa5108496de --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalGenderstatusEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AnimalGenderstatusEnumFactory implements EnumFactory { + + public AnimalGenderstatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("neutered".equals(codeString)) + return AnimalGenderstatus.NEUTERED; + if ("intact".equals(codeString)) + return AnimalGenderstatus.INTACT; + if ("unknown".equals(codeString)) + return AnimalGenderstatus.UNKNOWN; + throw new IllegalArgumentException("Unknown AnimalGenderstatus code '"+codeString+"'"); + } + + public String toCode(AnimalGenderstatus code) { + if (code == AnimalGenderstatus.NEUTERED) + return "neutered"; + if (code == AnimalGenderstatus.INTACT) + return "intact"; + if (code == AnimalGenderstatus.UNKNOWN) + return "unknown"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpecies.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpecies.java new file mode 100644 index 00000000000..3eefe4b5518 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpecies.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnimalSpecies { + + /** + * Canis lupus familiaris + */ + CANISLF, + /** + * Ovis aries + */ + OVISA, + /** + * Serinus canaria domestica + */ + SERINUSCD, + /** + * added to help the parsers + */ + NULL; + public static AnimalSpecies fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("canislf".equals(codeString)) + return CANISLF; + if ("ovisa".equals(codeString)) + return OVISA; + if ("serinuscd".equals(codeString)) + return SERINUSCD; + throw new FHIRException("Unknown AnimalSpecies code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANISLF: return "canislf"; + case OVISA: return "ovisa"; + case SERINUSCD: return "serinuscd"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/animal-species"; + } + public String getDefinition() { + switch (this) { + case CANISLF: return "Canis lupus familiaris"; + case OVISA: return "Ovis aries"; + case SERINUSCD: return "Serinus canaria domestica"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANISLF: return "Dog"; + case OVISA: return "Sheep"; + case SERINUSCD: return "Domestic Canary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpeciesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpeciesEnumFactory.java new file mode 100644 index 00000000000..029253016bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnimalSpeciesEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AnimalSpeciesEnumFactory implements EnumFactory { + + public AnimalSpecies fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("canislf".equals(codeString)) + return AnimalSpecies.CANISLF; + if ("ovisa".equals(codeString)) + return AnimalSpecies.OVISA; + if ("serinuscd".equals(codeString)) + return AnimalSpecies.SERINUSCD; + throw new IllegalArgumentException("Unknown AnimalSpecies code '"+codeString+"'"); + } + + public String toCode(AnimalSpecies code) { + if (code == AnimalSpecies.CANISLF) + return "canislf"; + if (code == AnimalSpecies.OVISA) + return "ovisa"; + if (code == AnimalSpecies.SERINUSCD) + return "serinuscd"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupations.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupations.java new file mode 100644 index 00000000000..641714b9835 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupations.java @@ -0,0 +1,12003 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnzscoOccupations { + + /** + * Managers not further defined + */ + _100000, + /** + * Chief Executives, General Managers and Legislators not further defined + */ + _111000, + /** + * Chief Executive or Managing Director + */ + _111111, + /** + * General Managers not further defined + */ + _111200, + /** + * Corporate General Manager + */ + _111211, + /** + * Defence Force Senior Officer + */ + _111212, + /** + * Legislators not further defined + */ + _111300, + /** + * Local Government Legislator + */ + _111311, + /** + * Member of Parliament + */ + _111312, + /** + * Legislators not elsewhere classified + */ + _111399, + /** + * Farmers and Farm Managers not further defined + */ + _121000, + /** + * Aquaculture Farmer + */ + _121111, + /** + * Crop Farmers not further defined + */ + _121200, + /** + * Cotton Grower + */ + _121211, + /** + * Flower Grower + */ + _121212, + /** + * Fruit or Nut Grower + */ + _121213, + /** + * Grain, Oilseed or Pasture Grower + */ + _121214, + /** + * Grape Grower + */ + _121215, + /** + * Mixed Crop Farmer + */ + _121216, + /** + * Sugar Cane Grower + */ + _121217, + /** + * Turf Grower + */ + _121218, + /** + * Vegetable Grower + */ + _121221, + /** + * Crop Farmers not elsewhere classified + */ + _121299, + /** + * Livestock Farmers not further defined + */ + _121300, + /** + * Apiarist + */ + _121311, + /** + * Beef Cattle Farmer + */ + _121312, + /** + * Dairy Cattle Farmer + */ + _121313, + /** + * Deer Farmer + */ + _121314, + /** + * Goat Farmer + */ + _121315, + /** + * Horse Breeder + */ + _121316, + /** + * Mixed Livestock Farmer + */ + _121317, + /** + * Pig Farmer + */ + _121318, + /** + * Poultry Farmer + */ + _121321, + /** + * Sheep Farmer + */ + _121322, + /** + * Livestock Farmers not elsewhere classified + */ + _121399, + /** + * Mixed Crop and Livestock Farmer + */ + _121411, + /** + * Specialist Managers not further defined + */ + _130000, + /** + * Advertising and Sales Managers not further defined + */ + _131100, + /** + * Advertising and Public Relations Manager + */ + _131111, + /** + * Sales and Marketing Manager + */ + _131112, + /** + * Business Administration Managers not further defined + */ + _132000, + /** + * Corporate Services Manager + */ + _132111, + /** + * Finance Manager + */ + _132211, + /** + * Human Resource Manager + */ + _132311, + /** + * Policy and Planning Manager + */ + _132411, + /** + * Research and Development Manager + */ + _132511, + /** + * Construction, Distribution and Production Managers not further defined + */ + _133000, + /** + * Construction Managers not further defined + */ + _133100, + /** + * Construction Project Manager + */ + _133111, + /** + * Project Builder + */ + _133112, + /** + * Engineering Manager + */ + _133211, + /** + * Importers, Exporters and Wholesalers not further defined + */ + _133300, + /** + * Importer or Exporter + */ + _133311, + /** + * Wholesaler + */ + _133312, + /** + * Manufacturer + */ + _133411, + /** + * Production Managers not further defined + */ + _133500, + /** + * Production Manager (Forestry) + */ + _133511, + /** + * Production Manager (Manufacturing) + */ + _133512, + /** + * Production Manager (Mining) + */ + _133513, + /** + * Supply and Distribution Manager + */ + _133611, + /** + * Education, Health and Welfare Services Managers not further defined + */ + _134000, + /** + * Child Care Centre Manager + */ + _134111, + /** + * Health and Welfare Services Managers not further defined + */ + _134200, + /** + * Medical Administrator + */ + _134211, + /** + * Nursing Clinical Director + */ + _134212, + /** + * Primary Health Organization Manager + */ + _134213, + /** + * Welfare Centre Manager + */ + _134214, + /** + * Health and Welfare Services Managers not elsewhere classified + */ + _134299, + /** + * School Principal + */ + _134311, + /** + * Other Education Managers not further defined + */ + _134400, + /** + * Faculty Head + */ + _134411, + /** + * Regional Education Manager + */ + _134412, + /** + * Education Managers not elsewhere classified + */ + _134499, + /** + * ICT Managers not further defined + */ + _135100, + /** + * Chief Information Officer + */ + _135111, + /** + * ICT Project Manager + */ + _135112, + /** + * ICT Managers not elsewhere classified + */ + _135199, + /** + * Miscellaneous Specialist Managers not further defined + */ + _139000, + /** + * Commissioned Officers (Management) not further defined + */ + _139100, + /** + * Commissioned Defence Force Officer + */ + _139111, + /** + * Commissioned Fire Officer + */ + _139112, + /** + * Commissioned Police Officer + */ + _139113, + /** + * Senior Non-commissioned Defence Force Member + */ + _139211, + /** + * Other Specialist Managers not further defined + */ + _139900, + /** + * Arts Administrator or Manager + */ + _139911, + /** + * Environmental Manager + */ + _139912, + /** + * Laboratory Manager + */ + _139913, + /** + * Quality Assurance Manager + */ + _139914, + /** + * Sports Administrator + */ + _139915, + /** + * Specialist Managers not elsewhere classified + */ + _139999, + /** + * Hospitality, Retail and Service Managers not further defined + */ + _140000, + /** + * Accommodation and Hospitality Managers not further defined + */ + _141000, + /** + * Cafe or Restaurant Manager + */ + _141111, + /** + * Caravan Park and Camping Ground Manager + */ + _141211, + /** + * Hotel or Motel Manager + */ + _141311, + /** + * Licensed Club Manager + */ + _141411, + /** + * Other Accommodation and Hospitality Managers not further defined + */ + _141900, + /** + * Bed and Breakfast Operator + */ + _141911, + /** + * Accommodation and Hospitality Managers not elsewhere classified + */ + _141999, + /** + * Retail Managers not further defined + */ + _142100, + /** + * Retail Manager (General) + */ + _142111, + /** + * Antique Dealer + */ + _142112, + /** + * Betting Agency Manager + */ + _142113, + /** + * Hair or Beauty Salon Manager + */ + _142114, + /** + * Post Office Manager + */ + _142115, + /** + * Travel Agency Manager + */ + _142116, + /** + * Miscellaneous Hospitality, Retail and Service Managers not further defined + */ + _149000, + /** + * Amusement, Fitness and Sports Centre Managers not further defined + */ + _149100, + /** + * Amusement Centre Manager + */ + _149111, + /** + * Fitness Centre Manager + */ + _149112, + /** + * Sports Centre Manager + */ + _149113, + /** + * Call or Contact Centre and Customer Service Managers not further defined + */ + _149200, + /** + * Call or Contact Centre Manager + */ + _149211, + /** + * Customer Service Manager + */ + _149212, + /** + * Conference and Event Organizer + */ + _149311, + /** + * Transport Services Managers not further defined + */ + _149400, + /** + * Fleet Manager + */ + _149411, + /** + * Railway Station Manager + */ + _149412, + /** + * Transport Company Manager + */ + _149413, + /** + * Other Hospitality, Retail and Service Managers not further defined + */ + _149900, + /** + * Boarding Kennel or Cattery Operator + */ + _149911, + /** + * Cinema or Theatre Manager + */ + _149912, + /** + * Facilities Manager + */ + _149913, + /** + * Financial Institution Branch Manager + */ + _149914, + /** + * Hospitality, Retail and Service Managers not elsewhere classified + */ + _149999, + /** + * Professionals not further defined + */ + _200000, + /** + * Arts and Media Professionals not further defined + */ + _210000, + /** + * Arts Professionals not further defined + */ + _211000, + /** + * Actors, Dancers and Other Entertainers not further defined + */ + _211100, + /** + * Actor + */ + _211111, + /** + * Dancer or Choreographer + */ + _211112, + /** + * Entertainer or Variety Artist + */ + _211113, + /** + * Actors, Dancers and Other Entertainers not elsewhere classified + */ + _211199, + /** + * Music Professionals not further defined + */ + _211200, + /** + * Composer + */ + _211211, + /** + * Music Director + */ + _211212, + /** + * Musician (Instrumental) + */ + _211213, + /** + * Singer + */ + _211214, + /** + * Music Professionals not elsewhere classified + */ + _211299, + /** + * Photographer + */ + _211311, + /** + * Visual Arts and Crafts Professionals not further defined + */ + _211400, + /** + * Painter (Visual Arts) + */ + _211411, + /** + * Potter or Ceramic Artist + */ + _211412, + /** + * Sculptor + */ + _211413, + /** + * Visual Arts and Crafts Professionals not elsewhere classified + */ + _211499, + /** + * Media Professionals not further defined + */ + _212000, + /** + * Artistic Directors, and Media Producers and Presenters not further defined + */ + _212100, + /** + * Artistic Director + */ + _212111, + /** + * Media Producer (excluding Video) + */ + _212112, + /** + * Radio Presenter + */ + _212113, + /** + * Television Presenter + */ + _212114, + /** + * Authors, and Book and Script Editors not further defined + */ + _212200, + /** + * Author + */ + _212211, + /** + * Book or Script Editor + */ + _212212, + /** + * Film, Television, Radio and Stage Directors not further defined + */ + _212300, + /** + * Art Director (Film, Television or Stage) + */ + _212311, + /** + * Director (Film, Television, Radio or Stage) + */ + _212312, + /** + * Director of Photography + */ + _212313, + /** + * Film and Video Editor + */ + _212314, + /** + * Program Director (Television or Radio) + */ + _212315, + /** + * Stage Manager + */ + _212316, + /** + * Technical Director + */ + _212317, + /** + * Video Producer + */ + _212318, + /** + * Film, Television, Radio and Stage Directors not elsewhere classified + */ + _212399, + /** + * Journalists and Other Writers not further defined + */ + _212400, + /** + * Copywriter + */ + _212411, + /** + * Newspaper or Periodical Editor + */ + _212412, + /** + * Print Journalist + */ + _212413, + /** + * Radio Journalist + */ + _212414, + /** + * Technical Writer + */ + _212415, + /** + * Television Journalist + */ + _212416, + /** + * Journalists and Other Writers not elsewhere classified + */ + _212499, + /** + * Business, Human Resource and Marketing Professionals not further defined + */ + _220000, + /** + * Accountants, Auditors and Company Secretaries not further defined + */ + _221000, + /** + * Accountants not further defined + */ + _221100, + /** + * Accountant (General) + */ + _221111, + /** + * Management Accountant + */ + _221112, + /** + * Taxation Accountant + */ + _221113, + /** + * Auditors, Company Secretaries and Corporate Treasurers not further defined + */ + _221200, + /** + * Company Secretary + */ + _221211, + /** + * Corporate Treasurer + */ + _221212, + /** + * External Auditor + */ + _221213, + /** + * Internal Auditor + */ + _221214, + /** + * Financial Brokers and Dealers, and Investment Advisers not further defined + */ + _222000, + /** + * Financial Brokers not further defined + */ + _222100, + /** + * Commodities Trader + */ + _222111, + /** + * Finance Broker + */ + _222112, + /** + * Insurance Broker + */ + _222113, + /** + * Financial Brokers not elsewhere classified + */ + _222199, + /** + * Financial Dealers not further defined + */ + _222200, + /** + * Financial Market Dealer + */ + _222211, + /** + * Futures Trader + */ + _222212, + /** + * Stockbroking Dealer + */ + _222213, + /** + * Financial Dealers not elsewhere classified + */ + _222299, + /** + * Financial Investment Advisers and Managers not further defined + */ + _222300, + /** + * Financial Investment Adviser + */ + _222311, + /** + * Financial Investment Manager + */ + _222312, + /** + * Human Resource and Training Professionals not further defined + */ + _223000, + /** + * Human Resource Professionals not further defined + */ + _223100, + /** + * Human Resource Adviser + */ + _223111, + /** + * Recruitment Consultant + */ + _223112, + /** + * Workplace Relations Adviser + */ + _223113, + /** + * ICT Trainer + */ + _223211, + /** + * Training and Development Professional + */ + _223311, + /** + * Information and Organization Professionals not further defined + */ + _224000, + /** + * Actuaries, Mathematicians and Statisticians not further defined + */ + _224100, + /** + * Actuary + */ + _224111, + /** + * Mathematician + */ + _224112, + /** + * Statistician + */ + _224113, + /** + * Archivists, Curators and Records Managers not further defined + */ + _224200, + /** + * Archivist + */ + _224211, + /** + * Gallery or Museum Curator + */ + _224212, + /** + * Health Information Manager + */ + _224213, + /** + * Records Manager + */ + _224214, + /** + * Economist + */ + _224311, + /** + * Intelligence and Policy Analysts not further defined + */ + _224400, + /** + * Intelligence Officer + */ + _224411, + /** + * Policy Analyst + */ + _224412, + /** + * Land Economists and Valuers not further defined + */ + _224500, + /** + * Land Economist + */ + _224511, + /** + * Valuer + */ + _224512, + /** + * Librarian + */ + _224611, + /** + * Management and Organization Analysts not further defined + */ + _224700, + /** + * Management Consultant + */ + _224711, + /** + * Organization and Methods Analyst + */ + _224712, + /** + * Other Information and Organization Professionals not further defined + */ + _224900, + /** + * Electorate Officer + */ + _224911, + /** + * Liaison Officer + */ + _224912, + /** + * Migration Agent + */ + _224913, + /** + * Patents Examiner + */ + _224914, + /** + * Information and Organization Professionals not elsewhere classified + */ + _224999, + /** + * Sales, Marketing and Public Relations Professionals not further defined + */ + _225000, + /** + * Advertising and Marketing Professionals not further defined + */ + _225100, + /** + * Advertising Specialist + */ + _225111, + /** + * Market Research Analyst + */ + _225112, + /** + * Marketing Specialist + */ + _225113, + /** + * ICT Sales Professionals not further defined + */ + _225200, + /** + * ICT Account Manager + */ + _225211, + /** + * ICT Business Development Manager + */ + _225212, + /** + * ICT Sales Representative + */ + _225213, + /** + * Public Relations Professional + */ + _225311, + /** + * Technical Sales Representatives not further defined + */ + _225400, + /** + * Sales Representative (Industrial Products) + */ + _225411, + /** + * Sales Representative (Medical and Pharmaceutical Products) + */ + _225412, + /** + * Technical Sales Representatives not elsewhere classified + */ + _225499, + /** + * Design, Engineering, Science and Transport Professionals not further defined + */ + _230000, + /** + * Air and Marine Transport Professionals not further defined + */ + _231000, + /** + * Air Transport Professionals not further defined + */ + _231100, + /** + * Aeroplane Pilot + */ + _231111, + /** + * Air Traffic Controller + */ + _231112, + /** + * Flying Instructor + */ + _231113, + /** + * Helicopter Pilot + */ + _231114, + /** + * Air Transport Professionals not elsewhere classified + */ + _231199, + /** + * Marine Transport Professionals not further defined + */ + _231200, + /** + * Master Fisher + */ + _231211, + /** + * Ship's Engineer + */ + _231212, + /** + * Ship's Master + */ + _231213, + /** + * Ship's Officer + */ + _231214, + /** + * Ship's Surveyor + */ + _231215, + /** + * Marine Transport Professionals not elsewhere classified + */ + _231299, + /** + * Architects, Designers, Planners and Surveyors not further defined + */ + _232000, + /** + * Architects and Landscape Architects not further defined + */ + _232100, + /** + * Architect + */ + _232111, + /** + * Landscape Architect + */ + _232112, + /** + * Cartographers and Surveyors not further defined + */ + _232200, + /** + * Cartographer + */ + _232211, + /** + * Surveyor + */ + _232212, + /** + * Fashion, Industrial and Jewellery Designers not further defined + */ + _232300, + /** + * Fashion Designer + */ + _232311, + /** + * Industrial Designer + */ + _232312, + /** + * Jewellery Designer + */ + _232313, + /** + * Graphic and Web Designers, and Illustrators not further defined + */ + _232400, + /** + * Graphic Designer + */ + _232411, + /** + * Illustrator + */ + _232412, + /** + * Multimedia Designer + */ + _232413, + /** + * Web Designer + */ + _232414, + /** + * Interior Designer + */ + _232511, + /** + * Urban and Regional Planner + */ + _232611, + /** + * Engineering Professionals not further defined + */ + _233000, + /** + * Chemical and Materials Engineers not further defined + */ + _233100, + /** + * Chemical Engineer + */ + _233111, + /** + * Materials Engineer + */ + _233112, + /** + * Civil Engineering Professionals not further defined + */ + _233200, + /** + * Civil Engineer + */ + _233211, + /** + * Geotechnical Engineer + */ + _233212, + /** + * Quantity Surveyor + */ + _233213, + /** + * Structural Engineer + */ + _233214, + /** + * Transport Engineer + */ + _233215, + /** + * Electrical Engineer + */ + _233311, + /** + * Electronics Engineer + */ + _233411, + /** + * Industrial, Mechanical and Production Engineers not further defined + */ + _233500, + /** + * Industrial Engineer + */ + _233511, + /** + * Mechanical Engineer + */ + _233512, + /** + * Production or Plant Engineer + */ + _233513, + /** + * Mining Engineers not further defined + */ + _233600, + /** + * Mining Engineer (excluding Petroleum) + */ + _233611, + /** + * Petroleum Engineer + */ + _233612, + /** + * Other Engineering Professionals not further defined + */ + _233900, + /** + * Aeronautical Engineer + */ + _233911, + /** + * Agricultural Engineer + */ + _233912, + /** + * Biomedical Engineer + */ + _233913, + /** + * Engineering Technologist + */ + _233914, + /** + * Environmental Engineer + */ + _233915, + /** + * Naval Architect + */ + _233916, + /** + * Engineering Professionals not elsewhere classified + */ + _233999, + /** + * Natural and Physical Science Professionals not further defined + */ + _234000, + /** + * Agricultural and Forestry Scientists not further defined + */ + _234100, + /** + * Agricultural Consultant + */ + _234111, + /** + * Agricultural Scientist + */ + _234112, + /** + * Forester + */ + _234113, + /** + * Chemists, and Food and Wine Scientists not further defined + */ + _234200, + /** + * Chemist + */ + _234211, + /** + * Food Technologist + */ + _234212, + /** + * Wine Maker + */ + _234213, + /** + * Environmental Scientists not further defined + */ + _234300, + /** + * Conservation Officer + */ + _234311, + /** + * Environmental Consultant + */ + _234312, + /** + * Environmental Research Scientist + */ + _234313, + /** + * Park Ranger + */ + _234314, + /** + * Environmental Scientists not elsewhere classified + */ + _234399, + /** + * Geologists and Geophysicists not further defined + */ + _234400, + /** + * Geologist + */ + _234411, + /** + * Geophysicist + */ + _234412, + /** + * Life Scientists not further defined + */ + _234500, + /** + * Life Scientist (General) + */ + _234511, + /** + * Anatomist or Physiologist + */ + _234512, + /** + * Biochemist + */ + _234513, + /** + * Biotechnologist + */ + _234514, + /** + * Botanist + */ + _234515, + /** + * Marine Biologist + */ + _234516, + /** + * Microbiologist + */ + _234517, + /** + * Zoologist + */ + _234518, + /** + * Life Scientists not elsewhere classified + */ + _234599, + /** + * Medical Laboratory Scientist + */ + _234611, + /** + * Veterinarian + */ + _234711, + /** + * Other Natural and Physical Science Professionals not further defined + */ + _234900, + /** + * Conservator + */ + _234911, + /** + * Metallurgist + */ + _234912, + /** + * Meteorologist + */ + _234913, + /** + * Physicist + */ + _234914, + /** + * Natural and Physical Science Professionals not elsewhere classified + */ + _234999, + /** + * Education Professionals not further defined + */ + _240000, + /** + * School Teachers not further defined + */ + _241000, + /** + * Early Childhood (Pre-primary School) Teacher + */ + _241111, + /** + * Primary School Teacher + */ + _241213, + /** + * Middle School Teacher + */ + _241311, + /** + * Secondary School Teacher + */ + _241411, + /** + * Special Education Teachers not further defined + */ + _241500, + /** + * Special Needs Teacher + */ + _241511, + /** + * Teacher of the Hearing Impaired + */ + _241512, + /** + * Teacher of the Sight Impaired + */ + _241513, + /** + * Special Education Teachers not elsewhere classified + */ + _241599, + /** + * Tertiary Education Teachers not further defined + */ + _242000, + /** + * University Lecturers and Tutors not further defined + */ + _242100, + /** + * University Lecturer + */ + _242111, + /** + * University Tutor + */ + _242112, + /** + * Vocational Education Teacher + */ + _242211, + /** + * Miscellaneous Education Professionals not further defined + */ + _249000, + /** + * Education Advisers and Reviewers not further defined + */ + _249100, + /** + * Education Adviser + */ + _249111, + /** + * Education Reviewer + */ + _249112, + /** + * Private Tutors and Teachers not further defined + */ + _249200, + /** + * Art Teacher (Private Tuition) + */ + _249211, + /** + * Dance Teacher (Private Tuition) + */ + _249212, + /** + * Drama Teacher (Private Tuition) + */ + _249213, + /** + * Music Teacher (Private Tuition) + */ + _249214, + /** + * Private Tutors and Teachers not elsewhere classified + */ + _249299, + /** + * Teacher of English to Speakers of Other Languages + */ + _249311, + /** + * Health Professionals not further defined + */ + _250000, + /** + * Health Diagnostic and Promotion Professionals not further defined + */ + _251000, + /** + * Dietitian + */ + _251111, + /** + * Medical Imaging Professionals not further defined + */ + _251200, + /** + * Medical Diagnostic Radiographer + */ + _251211, + /** + * Medical Radiation Therapist + */ + _251212, + /** + * Nuclear Medicine Technologist + */ + _251213, + /** + * Sonographer + */ + _251214, + /** + * Occupational and Environmental Health Professionals not further defined + */ + _251300, + /** + * Environmental Health Officer + */ + _251311, + /** + * Occupational Health and Safety Adviser + */ + _251312, + /** + * Optometrists and Orthoptists not further defined + */ + _251400, + /** + * Optometrist + */ + _251411, + /** + * Orthoptist + */ + _251412, + /** + * Pharmacists not further defined + */ + _251500, + /** + * Hospital Pharmacist + */ + _251511, + /** + * Industrial Pharmacist + */ + _251512, + /** + * Retail Pharmacist + */ + _251513, + /** + * Other Health Diagnostic and Promotion Professionals not further defined + */ + _251900, + /** + * Health Promotion Officer + */ + _251911, + /** + * Orthotist or Prosthetist + */ + _251912, + /** + * Health Diagnostic and Promotion Professionals not elsewhere classified + */ + _251999, + /** + * Health Therapy Professionals not further defined + */ + _252000, + /** + * Chiropractors and Osteopaths not further defined + */ + _252100, + /** + * Chiropractor + */ + _252111, + /** + * Osteopath + */ + _252112, + /** + * Complementary Health Therapists not further defined + */ + _252200, + /** + * Acupuncturist + */ + _252211, + /** + * Homoeopath + */ + _252212, + /** + * Naturopath + */ + _252213, + /** + * Traditional Chinese Medicine Practitioner + */ + _252214, + /** + * Complementary Health Therapists not elsewhere classified + */ + _252299, + /** + * Dental Practitioners not further defined + */ + _252300, + /** + * Dental Specialist + */ + _252311, + /** + * Dentist + */ + _252312, + /** + * Occupational Therapist + */ + _252411, + /** + * Physiotherapist + */ + _252511, + /** + * Podiatrist + */ + _252611, + /** + * Speech Professionals and Audiologists not further defined + */ + _252700, + /** + * Audiologist + */ + _252711, + /** + * Speech Pathologist + */ + _252712, + /** + * Medical Practitioners not further defined + */ + _253000, + /** + * Generalist Medical Practitioners not further defined + */ + _253100, + /** + * General Medical Practitioner + */ + _253111, + /** + * Resident Medical Officer + */ + _253112, + /** + * Anaesthetist + */ + _253211, + /** + * Internal Medicine Specialists not further defined + */ + _253300, + /** + * Specialist Physician (General Medicine) + */ + _253311, + /** + * Cardiologist + */ + _253312, + /** + * Clinical Haematologist + */ + _253313, + /** + * Clinical Oncologist + */ + _253314, + /** + * Endocrinologist + */ + _253315, + /** + * Gastroenterologist + */ + _253316, + /** + * Intensive Care Specialist + */ + _253317, + /** + * Neurologist + */ + _253318, + /** + * Paediatrician + */ + _253321, + /** + * Renal Medicine Specialist + */ + _253322, + /** + * Rheumatologist + */ + _253323, + /** + * Thoracic Medicine Specialist + */ + _253324, + /** + * Internal Medicine Specialists not elsewhere classified + */ + _253399, + /** + * Psychiatrist + */ + _253411, + /** + * Surgeons not further defined + */ + _253500, + /** + * Surgeon (General) + */ + _253511, + /** + * Cardiothoracic Surgeon + */ + _253512, + /** + * Neurosurgeon + */ + _253513, + /** + * Orthopaedic Surgeon + */ + _253514, + /** + * Otorhinolaryngologist + */ + _253515, + /** + * Paediatric Surgeon + */ + _253516, + /** + * Plastic and Reconstructive Surgeon + */ + _253517, + /** + * Urologist + */ + _253518, + /** + * Vascular Surgeon + */ + _253521, + /** + * Other Medical Practitioners not further defined + */ + _253900, + /** + * Dermatologist + */ + _253911, + /** + * Emergency Medicine Specialist + */ + _253912, + /** + * Obstetrician and Gynaecologist + */ + _253913, + /** + * Ophthalmologist + */ + _253914, + /** + * Pathologist + */ + _253915, + /** + * Radiologist + */ + _253916, + /** + * Medical Practitioners not elsewhere classified + */ + _253999, + /** + * Midwifery and Nursing Professionals not further defined + */ + _254000, + /** + * Midwife + */ + _254111, + /** + * Nurse Educators and Researchers not further defined + */ + _254200, + /** + * Nurse Educator + */ + _254211, + /** + * Nurse Researcher + */ + _254212, + /** + * Nurse Manager + */ + _254311, + /** + * Registered Nurses not further defined + */ + _254400, + /** + * Nurse Practitioner + */ + _254411, + /** + * Registered Nurse (Aged Care) + */ + _254412, + /** + * Registered Nurse (Child and Family Health) + */ + _254413, + /** + * Registered Nurse (Community Health) + */ + _254414, + /** + * Registered Nurse (Critical Care and Emergency) + */ + _254415, + /** + * Registered Nurse (Developmental Disability) + */ + _254416, + /** + * Registered Nurse (Disability and Rehabilitation) + */ + _254417, + /** + * Registered Nurse (Medical) + */ + _254418, + /** + * Registered Nurse (Medical Practice) + */ + _254421, + /** + * Registered Nurse (Mental Health) + */ + _254422, + /** + * Registered Nurse (Perioperative) + */ + _254423, + /** + * Registered Nurse (Surgical) + */ + _254424, + /** + * Registered Nurses not elsewhere classified + */ + _254499, + /** + * ICT Professionals not further defined + */ + _260000, + /** + * Business and Systems Analysts, and Programmers not further defined + */ + _261000, + /** + * ICT Business and Systems Analysts not further defined + */ + _261100, + /** + * ICT Business Analyst + */ + _261111, + /** + * Systems Analyst + */ + _261112, + /** + * Multimedia Specialists and Web Developers not further defined + */ + _261200, + /** + * Multimedia Specialist + */ + _261211, + /** + * Web Developer + */ + _261212, + /** + * Software and Applications Programmers not further defined + */ + _261300, + /** + * Analyst Programmer + */ + _261311, + /** + * Developer Programmer + */ + _261312, + /** + * Software Engineer + */ + _261313, + /** + * Software and Applications Programmers not elsewhere classified + */ + _261399, + /** + * Database and Systems Administrators, and ICT Security Specialists not further defined + */ + _262100, + /** + * Database Administrator + */ + _262111, + /** + * ICT Security Specialist + */ + _262112, + /** + * Systems Administrator + */ + _262113, + /** + * ICT Network and Support Professionals not further defined + */ + _263000, + /** + * Computer Network Professionals not further defined + */ + _263100, + /** + * Computer Network and Systems Engineer + */ + _263111, + /** + * Network Administrator + */ + _263112, + /** + * Network Analyst + */ + _263113, + /** + * ICT Support and Test Engineers not further defined + */ + _263200, + /** + * ICT Quality Assurance Engineer + */ + _263211, + /** + * ICT Support Engineer + */ + _263212, + /** + * ICT Systems Test Engineer + */ + _263213, + /** + * ICT Support and Test Engineers not elsewhere classified + */ + _263299, + /** + * Telecommunications Engineering Professionals not further defined + */ + _263300, + /** + * Telecommunications Engineer + */ + _263311, + /** + * Telecommunications Network Engineer + */ + _263312, + /** + * Legal, Social and Welfare Professionals not further defined + */ + _270000, + /** + * Legal Professionals not further defined + */ + _271000, + /** + * Barrister + */ + _271111, + /** + * Judicial and Other Legal Professionals not further defined + */ + _271200, + /** + * Judge + */ + _271211, + /** + * Magistrate + */ + _271212, + /** + * Tribunal Member + */ + _271213, + /** + * Judicial and Other Legal Professionals not elsewhere classified + */ + _271299, + /** + * Solicitor + */ + _271311, + /** + * Social and Welfare Professionals not further defined + */ + _272000, + /** + * Counsellors not further defined + */ + _272100, + /** + * Careers Counsellor + */ + _272111, + /** + * Drug and Alcohol Counsellor + */ + _272112, + /** + * Family and Marriage Counsellor + */ + _272113, + /** + * Rehabilitation Counsellor + */ + _272114, + /** + * Student Counsellor + */ + _272115, + /** + * Counsellors not elsewhere classified + */ + _272199, + /** + * Minister of Religion + */ + _272211, + /** + * Psychologists not further defined + */ + _272300, + /** + * Clinical Psychologist + */ + _272311, + /** + * Educational Psychologist + */ + _272312, + /** + * Organizational Psychologist + */ + _272313, + /** + * Psychotherapist + */ + _272314, + /** + * Psychologists not elsewhere classified + */ + _272399, + /** + * Social Professionals not further defined + */ + _272400, + /** + * Historian + */ + _272411, + /** + * Interpreter + */ + _272412, + /** + * Translator + */ + _272413, + /** + * Social Professionals not elsewhere classified + */ + _272499, + /** + * Social Worker + */ + _272511, + /** + * Welfare, Recreation and Community Arts Workers not further defined + */ + _272600, + /** + * Community Arts Worker + */ + _272611, + /** + * Recreation Officer + */ + _272612, + /** + * Welfare Worker + */ + _272613, + /** + * Technicians and Trades Workers not further defined + */ + _300000, + /** + * Engineering, ICT and Science Technicians not further defined + */ + _310000, + /** + * Agricultural, Medical and Science Technicians not further defined + */ + _311000, + /** + * Agricultural Technician + */ + _311111, + /** + * Medical Technicians not further defined + */ + _311200, + /** + * Anaesthetic Technician + */ + _311211, + /** + * Cardiac Technician + */ + _311212, + /** + * Medical Laboratory Technician + */ + _311213, + /** + * Operating Theatre Technician + */ + _311214, + /** + * Pharmacy Technician + */ + _311215, + /** + * Medical Technicians not elsewhere classified + */ + _311299, + /** + * Primary Products Inspectors not further defined + */ + _311300, + /** + * Fisheries Officer + */ + _311311, + /** + * Meat Inspector + */ + _311312, + /** + * Quarantine Officer + */ + _311313, + /** + * Primary Products Inspectors not elsewhere classified + */ + _311399, + /** + * Science Technicians not further defined + */ + _311400, + /** + * Chemistry Technician + */ + _311411, + /** + * Earth Science Technician + */ + _311412, + /** + * Life Science Technician + */ + _311413, + /** + * School Laboratory Technician + */ + _311414, + /** + * Science Technicians not elsewhere classified + */ + _311499, + /** + * Building and Engineering Technicians not further defined + */ + _312000, + /** + * Architectural, Building and Surveying Technicians not further defined + */ + _312100, + /** + * Architectural Draftsperson + */ + _312111, + /** + * Building Associate + */ + _312112, + /** + * Building Inspector + */ + _312113, + /** + * Construction Estimator + */ + _312114, + /** + * Plumbing Inspector + */ + _312115, + /** + * Surveying or Cartographic Technician + */ + _312116, + /** + * Civil Engineering Draftspersons and Technicians not further defined + */ + _312200, + /** + * Civil Engineering Draftsperson + */ + _312211, + /** + * Civil Engineering Technician + */ + _312212, + /** + * Electrical Engineering Draftspersons and Technicians not further defined + */ + _312300, + /** + * Electrical Engineering Draftsperson + */ + _312311, + /** + * Electrical Engineering Technician + */ + _312312, + /** + * Electronic Engineering Draftspersons and Technicians not further defined + */ + _312400, + /** + * Electronic Engineering Draftsperson + */ + _312411, + /** + * Electronic Engineering Technician + */ + _312412, + /** + * Mechanical Engineering Draftspersons and Technicians not further defined + */ + _312500, + /** + * Mechanical Engineering Draftsperson + */ + _312511, + /** + * Mechanical Engineering Technician + */ + _312512, + /** + * Safety Inspector + */ + _312611, + /** + * Other Building and Engineering Technicians not further defined + */ + _312900, + /** + * Maintenance Planner + */ + _312911, + /** + * Metallurgical or Materials Technician + */ + _312912, + /** + * Mine Deputy + */ + _312913, + /** + * Building and Engineering Technicians not elsewhere classified + */ + _312999, + /** + * ICT and Telecommunications Technicians not further defined + */ + _313000, + /** + * ICT Support Technicians not further defined + */ + _313100, + /** + * Hardware Technician + */ + _313111, + /** + * ICT Customer Support Officer + */ + _313112, + /** + * Web Administrator + */ + _313113, + /** + * ICT Support Technicians not elsewhere classified + */ + _313199, + /** + * Telecommunications Technical Specialists not further defined + */ + _313200, + /** + * Radiocommunications Technician + */ + _313211, + /** + * Telecommunications Field Engineer + */ + _313212, + /** + * Telecommunications Network Planner + */ + _313213, + /** + * Telecommunications Technical Officer or Technologist + */ + _313214, + /** + * Automotive and Engineering Trades Workers not further defined + */ + _320000, + /** + * Automotive Electricians and Mechanics not further defined + */ + _321000, + /** + * Automotive Electrician + */ + _321111, + /** + * Motor Mechanics not further defined + */ + _321200, + /** + * Motor Mechanic (General) + */ + _321211, + /** + * Diesel Motor Mechanic + */ + _321212, + /** + * Motorcycle Mechanic + */ + _321213, + /** + * Small Engine Mechanic + */ + _321214, + /** + * Fabrication Engineering Trades Workers not further defined + */ + _322000, + /** + * Metal Casting, Forging and Finishing Trades Workers not further defined + */ + _322100, + /** + * Blacksmith + */ + _322111, + /** + * Electroplater + */ + _322112, + /** + * Farrier + */ + _322113, + /** + * Metal Casting Trades Worker + */ + _322114, + /** + * Metal Polisher + */ + _322115, + /** + * Sheetmetal Trades Worker + */ + _322211, + /** + * Structural Steel and Welding Trades Workers not further defined + */ + _322300, + /** + * Metal Fabricator + */ + _322311, + /** + * Pressure Welder + */ + _322312, + /** + * Welder (First Class) + */ + _322313, + /** + * Mechanical Engineering Trades Workers not further defined + */ + _323000, + /** + * Aircraft Maintenance Engineers not further defined + */ + _323100, + /** + * Aircraft Maintenance Engineer (Avionics) + */ + _323111, + /** + * Aircraft Maintenance Engineer (Mechanical) + */ + _323112, + /** + * Aircraft Maintenance Engineer (Structures) + */ + _323113, + /** + * Metal Fitters and Machinists not further defined + */ + _323200, + /** + * Fitter (General) + */ + _323211, + /** + * Fitter and Turner + */ + _323212, + /** + * Fitter-Welder + */ + _323213, + /** + * Metal Machinist (First Class) + */ + _323214, + /** + * Textile, Clothing and Footwear Mechanic + */ + _323215, + /** + * Metal Fitters and Machinists not elsewhere classified + */ + _323299, + /** + * Precision Metal Trades Workers not further defined + */ + _323300, + /** + * Engraver + */ + _323311, + /** + * Gunsmith + */ + _323312, + /** + * Locksmith + */ + _323313, + /** + * Precision Instrument Maker and Repairer + */ + _323314, + /** + * Saw Maker and Repairer + */ + _323315, + /** + * Watch and Clock Maker and Repairer + */ + _323316, + /** + * Toolmakers and Engineering Patternmakers not further defined + */ + _323400, + /** + * Engineering Patternmaker + */ + _323411, + /** + * Toolmaker + */ + _323412, + /** + * Panelbeaters, and Vehicle Body Builders, Trimmers and Painters not further defined + */ + _324000, + /** + * Panelbeater + */ + _324111, + /** + * Vehicle Body Builders and Trimmers not further defined + */ + _324200, + /** + * Vehicle Body Builder + */ + _324211, + /** + * Vehicle Trimmer + */ + _324212, + /** + * Vehicle Painter + */ + _324311, + /** + * Construction Trades Workers not further defined + */ + _330000, + /** + * Bricklayers, and Carpenters and Joiners not further defined + */ + _331000, + /** + * Bricklayers and Stonemasons not further defined + */ + _331100, + /** + * Bricklayer + */ + _331111, + /** + * Stonemason + */ + _331112, + /** + * Carpenter and Joiner + */ + _331211, + /** + * Carpenter + */ + _331212, + /** + * Joiner + */ + _331213, + /** + * Floor Finishers and Painting Trades Workers not further defined + */ + _332000, + /** + * Floor Finisher + */ + _332111, + /** + * Painting Trades Worker + */ + _332211, + /** + * Glaziers, Plasterers and Tilers not further defined + */ + _333000, + /** + * Glazier + */ + _333111, + /** + * Plasterers not further defined + */ + _333200, + /** + * Fibrous Plasterer + */ + _333211, + /** + * Solid Plasterer + */ + _333212, + /** + * Roof Tiler + */ + _333311, + /** + * Wall and Floor Tiler + */ + _333411, + /** + * Plumbers not further defined + */ + _334100, + /** + * Plumber (General) + */ + _334111, + /** + * Airconditioning and Mechanical Services Plumber + */ + _334112, + /** + * Drainer + */ + _334113, + /** + * Gasfitter + */ + _334114, + /** + * Roof Plumber + */ + _334115, + /** + * Electrotechnology and Telecommunications Trades Workers not further defined + */ + _340000, + /** + * Electricians not further defined + */ + _341100, + /** + * Electrician (General) + */ + _341111, + /** + * Electrician (Special Class) + */ + _341112, + /** + * Lift Mechanic + */ + _341113, + /** + * Electronics and Telecommunications Trades Workers not further defined + */ + _342000, + /** + * Airconditioning and Refrigeration Mechanic + */ + _342111, + /** + * Electrical Distribution Trades Workers not further defined + */ + _342200, + /** + * Electrical Linesworker + */ + _342211, + /** + * Technical Cable Jointer + */ + _342212, + /** + * Electronics Trades Workers not further defined + */ + _342300, + /** + * Business Machine Mechanic + */ + _342311, + /** + * Communications Operator + */ + _342312, + /** + * Electronic Equipment Trades Worker + */ + _342313, + /** + * Electronic Instrument Trades Worker (General) + */ + _342314, + /** + * Electronic Instrument Trades Worker (Special Class) + */ + _342315, + /** + * Telecommunications Trades Workers not further defined + */ + _342400, + /** + * Cabler (Data and Telecommunications) + */ + _342411, + /** + * Telecommunications Cable Jointer + */ + _342412, + /** + * Telecommunications Linesworker + */ + _342413, + /** + * Telecommunications Technician + */ + _342414, + /** + * Food Trades Workers not further defined + */ + _351000, + /** + * Bakers and Pastrycooks not further defined + */ + _351100, + /** + * Baker + */ + _351111, + /** + * Pastrycook + */ + _351112, + /** + * Butcher or Smallgoods Maker + */ + _351211, + /** + * Chef + */ + _351311, + /** + * Cook + */ + _351411, + /** + * Skilled Animal and Horticultural Workers not further defined + */ + _360000, + /** + * Animal Attendants and Trainers, and Shearers not further defined + */ + _361000, + /** + * Animal Attendants and Trainers not further defined + */ + _361100, + /** + * Dog Handler or Trainer + */ + _361111, + /** + * Horse Trainer + */ + _361112, + /** + * Pet Groomer + */ + _361113, + /** + * Zookeeper + */ + _361114, + /** + * Animal Attendants and Trainers not elsewhere classified + */ + _361199, + /** + * Shearer + */ + _361211, + /** + * Veterinary Nurse + */ + _361311, + /** + * Horticultural Trades Workers not further defined + */ + _362000, + /** + * Florist + */ + _362111, + /** + * Gardeners not further defined + */ + _362200, + /** + * Gardener (General) + */ + _362211, + /** + * Arborist + */ + _362212, + /** + * Landscape Gardener + */ + _362213, + /** + * Greenkeeper + */ + _362311, + /** + * Nurseryperson + */ + _362411, + /** + * Other Technicians and Trades Workers not further defined + */ + _390000, + /** + * Hairdresser + */ + _391111, + /** + * Printing Trades Workers not further defined + */ + _392000, + /** + * Binders, Finishers and Screen Printers not further defined + */ + _392100, + /** + * Binder and Finisher + */ + _392111, + /** + * Screen Printer + */ + _392112, + /** + * Graphic Pre-press Trades Worker + */ + _392211, + /** + * Printers not further defined + */ + _392300, + /** + * Printing Machinist + */ + _392311, + /** + * Small Offset Printer + */ + _392312, + /** + * Textile, Clothing and Footwear Trades Workers not further defined + */ + _393000, + /** + * Canvas and Leather Goods Makers not further defined + */ + _393100, + /** + * Canvas Goods Maker + */ + _393111, + /** + * Leather Goods Maker + */ + _393112, + /** + * Sail Maker + */ + _393113, + /** + * Shoemaker + */ + _393114, + /** + * Clothing Trades Workers not further defined + */ + _393200, + /** + * Apparel Cutter + */ + _393211, + /** + * Clothing Patternmaker + */ + _393212, + /** + * Dressmaker or Tailor + */ + _393213, + /** + * Clothing Trades Workers not elsewhere classified + */ + _393299, + /** + * Upholsterer + */ + _393311, + /** + * Wood Trades Workers not further defined + */ + _394000, + /** + * Cabinetmaker + */ + _394111, + /** + * Wood Machinists and Other Wood Trades Workers not further defined + */ + _394200, + /** + * Furniture Finisher + */ + _394211, + /** + * Picture Framer + */ + _394212, + /** + * Wood Machinist + */ + _394213, + /** + * Wood Turner + */ + _394214, + /** + * Wood Machinists and Other Wood Trades Workers not elsewhere classified + */ + _394299, + /** + * Miscellaneous Technicians and Trades Workers not further defined + */ + _399000, + /** + * Boat Builders and Shipwrights not further defined + */ + _399100, + /** + * Boat Builder and Repairer + */ + _399111, + /** + * Shipwright + */ + _399112, + /** + * Chemical, Gas, Petroleum and Power Generation Plant Operators not further defined + */ + _399200, + /** + * Chemical Plant Operator + */ + _399211, + /** + * Gas or Petroleum Operator + */ + _399212, + /** + * Power Generation Plant Operator + */ + _399213, + /** + * Gallery, Library and Museum Technicians not further defined + */ + _399300, + /** + * Gallery or Museum Technician + */ + _399311, + /** + * Library Technician + */ + _399312, + /** + * Jeweller + */ + _399411, + /** + * Performing Arts Technicians not further defined + */ + _399500, + /** + * Broadcast Transmitter Operator + */ + _399511, + /** + * Camera Operator (Film, Television or Video) + */ + _399512, + /** + * Light Technician + */ + _399513, + /** + * Make Up Artist + */ + _399514, + /** + * Musical Instrument Maker or Repairer + */ + _399515, + /** + * Sound Technician + */ + _399516, + /** + * Television Equipment Operator + */ + _399517, + /** + * Performing Arts Technicians not elsewhere classified + */ + _399599, + /** + * Signwriter + */ + _399611, + /** + * Other Miscellaneous Technicians and Trades Workers not further defined + */ + _399900, + /** + * Diver + */ + _399911, + /** + * Interior Decorator + */ + _399912, + /** + * Optical Dispenser + */ + _399913, + /** + * Optical Mechanic + */ + _399914, + /** + * Photographer's Assistant + */ + _399915, + /** + * Plastics Technician + */ + _399916, + /** + * Wool Classer + */ + _399917, + /** + * Technicians and Trades Workers not elsewhere classified + */ + _399999, + /** + * Community and Personal Service Workers not further defined + */ + _400000, + /** + * Health and Welfare Support Workers not further defined + */ + _411000, + /** + * Ambulance Officers and Paramedics not further defined + */ + _411100, + /** + * Ambulance Officer + */ + _411111, + /** + * Intensive Care Ambulance Paramedic + */ + _411112, + /** + * Dental Hygienists, Technicians and Therapists not further defined + */ + _411200, + /** + * Dental Hygienist + */ + _411211, + /** + * Dental Prosthetist + */ + _411212, + /** + * Dental Technician + */ + _411213, + /** + * Dental Therapist + */ + _411214, + /** + * Diversional Therapist + */ + _411311, + /** + * Enrolled and Mothercraft Nurses not further defined + */ + _411400, + /** + * Enrolled Nurse + */ + _411411, + /** + * Mothercraft Nurse + */ + _411412, + /** + * Aboriginal and Torres Strait Islander Health Worker + */ + _411511, + /** + * Massage Therapist + */ + _411611, + /** + * Welfare Support Workers not further defined + */ + _411700, + /** + * Community Worker + */ + _411711, + /** + * Disabilities Services Officer + */ + _411712, + /** + * Family Support Worker + */ + _411713, + /** + * Parole or Probation Officer + */ + _411714, + /** + * Residential Care Officer + */ + _411715, + /** + * Youth Worker + */ + _411716, + /** + * Carers and Aides not further defined + */ + _420000, + /** + * Child Carers not further defined + */ + _421100, + /** + * Child Care Worker + */ + _421111, + /** + * Family Day Care Worker + */ + _421112, + /** + * Nanny + */ + _421113, + /** + * Out of School Hours Care Worker + */ + _421114, + /** + * Education Aides not further defined + */ + _422100, + /** + * Aboriginal and Torres Strait Islander Education Worker + */ + _422111, + /** + * Integration Aide + */ + _422112, + /** + * Preschool Aide + */ + _422115, + /** + * Teachers' Aide + */ + _422116, + /** + * Personal Carers and Assistants not further defined + */ + _423000, + /** + * Aged or Disabled Carer + */ + _423111, + /** + * Dental Assistant + */ + _423211, + /** + * Nursing Support and Personal Care Workers not further defined + */ + _423300, + /** + * Hospital Orderly + */ + _423311, + /** + * Nursing Support Worker + */ + _423312, + /** + * Personal Care Assistant + */ + _423313, + /** + * Therapy Aide + */ + _423314, + /** + * Special Care Workers not further defined + */ + _423400, + /** + * Child or Youth Residential Care Assistant + */ + _423411, + /** + * Hostel Parent + */ + _423412, + /** + * Refuge Worker + */ + _423413, + /** + * Hospitality Workers not further defined + */ + _431000, + /** + * Bar Attendants and Baristas not further defined + */ + _431100, + /** + * Bar Attendant + */ + _431111, + /** + * Barista + */ + _431112, + /** + * Cafe Worker + */ + _431211, + /** + * Gaming Worker + */ + _431311, + /** + * Hotel Service Manager + */ + _431411, + /** + * Waiter + */ + _431511, + /** + * Other Hospitality Workers not further defined + */ + _431900, + /** + * Bar Useful or Busser + */ + _431911, + /** + * Doorperson or Luggage Porter + */ + _431912, + /** + * Hospitality Workers not elsewhere classified + */ + _431999, + /** + * Protective Service Workers not further defined + */ + _440000, + /** + * Defence Force Members, Fire Fighters and Police not further defined + */ + _441000, + /** + * Defence Force Member - Other Ranks + */ + _441111, + /** + * Fire and Emergency Workers not further defined + */ + _441200, + /** + * Emergency Service Worker + */ + _441211, + /** + * Fire Fighter + */ + _441212, + /** + * Police not further defined + */ + _441300, + /** + * Detective + */ + _441311, + /** + * Police Officer + */ + _441312, + /** + * Prison and Security Officers not further defined + */ + _442000, + /** + * Prison Officer + */ + _442111, + /** + * Security Officers and Guards not further defined + */ + _442200, + /** + * Alarm, Security or Surveillance Monitor + */ + _442211, + /** + * Armoured Car Escort + */ + _442212, + /** + * Crowd Controller + */ + _442213, + /** + * Private Investigator + */ + _442214, + /** + * Retail Loss Prevention Officer + */ + _442215, + /** + * Security Consultant + */ + _442216, + /** + * Security Officer + */ + _442217, + /** + * Security Officers and Guards not elsewhere classified + */ + _442299, + /** + * Sports and Personal Service Workers not further defined + */ + _450000, + /** + * Personal Service and Travel Workers not further defined + */ + _451000, + /** + * Beauty Therapist + */ + _451111, + /** + * Driving Instructor + */ + _451211, + /** + * Funeral Workers not further defined + */ + _451300, + /** + * Funeral Director + */ + _451311, + /** + * Funeral Workers not elsewhere classified + */ + _451399, + /** + * Gallery, Museum and Tour Guides not further defined + */ + _451400, + /** + * Gallery or Museum Guide + */ + _451411, + /** + * Tour Guide + */ + _451412, + /** + * Personal Care Consultants not further defined + */ + _451500, + /** + * Natural Remedy Consultant + */ + _451511, + /** + * Weight Loss Consultant + */ + _451512, + /** + * Tourism and Travel Advisers not further defined + */ + _451600, + /** + * Tourist Information Officer + */ + _451611, + /** + * Travel Consultant + */ + _451612, + /** + * Travel Attendants not further defined + */ + _451700, + /** + * Flight Attendant + */ + _451711, + /** + * Travel Attendants not elsewhere classified + */ + _451799, + /** + * Other Personal Service Workers not further defined + */ + _451800, + /** + * Civil Celebrant + */ + _451811, + /** + * Hair or Beauty Salon Assistant + */ + _451812, + /** + * Sex Worker or Escort + */ + _451813, + /** + * Personal Service Workers not elsewhere classified + */ + _451899, + /** + * Sports and Fitness Workers not further defined + */ + _452000, + /** + * Fitness Instructor + */ + _452111, + /** + * Outdoor Adventure Guides not further defined + */ + _452200, + /** + * Bungy Jump Master + */ + _452211, + /** + * Fishing Guide + */ + _452212, + /** + * Hunting Guide + */ + _452213, + /** + * Mountain or Glacier Guide + */ + _452214, + /** + * Outdoor Adventure Instructor + */ + _452215, + /** + * Trekking Guide + */ + _452216, + /** + * Whitewater Rafting Guide + */ + _452217, + /** + * Outdoor Adventure Guides not elsewhere classified + */ + _452299, + /** + * Sports Coaches, Instructors and Officials not further defined + */ + _452300, + /** + * Diving Instructor (Open Water) + */ + _452311, + /** + * Gymnastics Coach or Instructor + */ + _452312, + /** + * Horse Riding Coach or Instructor + */ + _452313, + /** + * Snowsport Instructor + */ + _452314, + /** + * Swimming Coach or Instructor + */ + _452315, + /** + * Tennis Coach + */ + _452316, + /** + * Other Sports Coach or Instructor + */ + _452317, + /** + * Dog or Horse Racing Official + */ + _452318, + /** + * Sports Development Officer + */ + _452321, + /** + * Sports Umpire + */ + _452322, + /** + * Other Sports Official + */ + _452323, + /** + * Sportspersons not further defined + */ + _452400, + /** + * Footballer + */ + _452411, + /** + * Golfer + */ + _452412, + /** + * Jockey + */ + _452413, + /** + * Lifeguard + */ + _452414, + /** + * Sportspersons not elsewhere classified + */ + _452499, + /** + * Clerical and Administrative Workers not further defined + */ + _500000, + /** + * Office Managers and Program Administrators not further defined + */ + _510000, + /** + * Contract, Program and Project Administrators not further defined + */ + _511100, + /** + * Contract Administrator + */ + _511111, + /** + * Program or Project Administrator + */ + _511112, + /** + * Office and Practice Managers not further defined + */ + _512000, + /** + * Office Manager + */ + _512111, + /** + * Practice Managers not further defined + */ + _512200, + /** + * Health Practice Manager + */ + _512211, + /** + * Practice Managers not elsewhere classified + */ + _512299, + /** + * Personal Assistants and Secretaries not further defined + */ + _521000, + /** + * Personal Assistant + */ + _521111, + /** + * Secretaries not further defined + */ + _521200, + /** + * Secretary (General) + */ + _521211, + /** + * Legal Secretary + */ + _521212, + /** + * General Clerical Workers not further defined + */ + _530000, + /** + * General Clerk + */ + _531111, + /** + * Keyboard Operators not further defined + */ + _532100, + /** + * Data Entry Operator + */ + _532111, + /** + * Machine Shorthand Reporter + */ + _532112, + /** + * Word Processing Operator + */ + _532113, + /** + * Inquiry Clerks and Receptionists not further defined + */ + _540000, + /** + * Call or Contact Centre Information Clerks not further defined + */ + _541000, + /** + * Call or Contact Centre Workers not further defined + */ + _541100, + /** + * Call or Contact Centre Team Leader + */ + _541111, + /** + * Call or Contact Centre Operator + */ + _541112, + /** + * Inquiry Clerk + */ + _541211, + /** + * Receptionists not further defined + */ + _542100, + /** + * Receptionist (General) + */ + _542111, + /** + * Admissions Clerk + */ + _542112, + /** + * Hotel or Motel Receptionist + */ + _542113, + /** + * Medical Receptionist + */ + _542114, + /** + * Numerical Clerks not further defined + */ + _550000, + /** + * Accounting Clerks and Bookkeepers not further defined + */ + _551000, + /** + * Accounting Clerks not further defined + */ + _551100, + /** + * Accounts Clerk + */ + _551111, + /** + * Cost Clerk + */ + _551112, + /** + * Bookkeeper + */ + _551211, + /** + * Payroll Clerk + */ + _551311, + /** + * Financial and Insurance Clerks not further defined + */ + _552000, + /** + * Bank Worker + */ + _552111, + /** + * Credit or Loans Officer + */ + _552211, + /** + * Insurance, Money Market and Statistical Clerks not further defined + */ + _552300, + /** + * Bookmaker + */ + _552311, + /** + * Insurance Consultant + */ + _552312, + /** + * Money Market Clerk + */ + _552313, + /** + * Statistical Clerk + */ + _552314, + /** + * Clerical and Office Support Workers not further defined + */ + _561000, + /** + * Betting Clerks not further defined + */ + _561100, + /** + * Betting Agency Counter Clerk + */ + _561111, + /** + * Bookmaker's Clerk + */ + _561112, + /** + * Telephone Betting Clerk + */ + _561113, + /** + * Betting Clerks not elsewhere classified + */ + _561199, + /** + * Couriers and Postal Deliverers not further defined + */ + _561200, + /** + * Courier + */ + _561211, + /** + * Postal Delivery Officer + */ + _561212, + /** + * Filing or Registry Clerk + */ + _561311, + /** + * Mail Sorters not further defined + */ + _561400, + /** + * Mail Clerk + */ + _561411, + /** + * Postal Sorting Officer + */ + _561412, + /** + * Survey Interviewer + */ + _561511, + /** + * Switchboard Operator + */ + _561611, + /** + * Other Clerical and Office Support Workers not further defined + */ + _561900, + /** + * Classified Advertising Clerk + */ + _561911, + /** + * Meter Reader + */ + _561912, + /** + * Parking Inspector + */ + _561913, + /** + * Clerical and Office Support Workers not elsewhere classified + */ + _561999, + /** + * Other Clerical and Administrative Workers not further defined + */ + _590000, + /** + * Logistics Clerks not further defined + */ + _591000, + /** + * Purchasing and Supply Logistics Clerks not further defined + */ + _591100, + /** + * Order Clerk + */ + _591111, + /** + * Production Clerk + */ + _591112, + /** + * Purchasing Officer + */ + _591113, + /** + * Sales Clerk + */ + _591114, + /** + * Stock Clerk + */ + _591115, + /** + * Warehouse Administrator + */ + _591116, + /** + * Transport and Despatch Clerks not further defined + */ + _591200, + /** + * Despatching and Receiving Clerk + */ + _591211, + /** + * Import-Export Clerk + */ + _591212, + /** + * Miscellaneous Clerical and Administrative Workers not further defined + */ + _599000, + /** + * Conveyancers and Legal Executives not further defined + */ + _599100, + /** + * Conveyancer + */ + _599111, + /** + * Legal Executive + */ + _599112, + /** + * Court and Legal Clerks not further defined + */ + _599200, + /** + * Clerk of Court + */ + _599211, + /** + * Court Bailiff or Sheriff + */ + _599212, + /** + * Court Orderly + */ + _599213, + /** + * Law Clerk + */ + _599214, + /** + * Trust Officer + */ + _599215, + /** + * Debt Collector + */ + _599311, + /** + * Human Resource Clerk + */ + _599411, + /** + * Inspectors and Regulatory Officers not further defined + */ + _599500, + /** + * Customs Officer + */ + _599511, + /** + * Immigration Officer + */ + _599512, + /** + * Motor Vehicle Licence Examiner + */ + _599513, + /** + * Noxious Weeds and Pest Inspector + */ + _599514, + /** + * Social Security Assessor + */ + _599515, + /** + * Taxation Inspector + */ + _599516, + /** + * Train Examiner + */ + _599517, + /** + * Transport Operations Inspector + */ + _599518, + /** + * Water Inspector + */ + _599521, + /** + * Inspectors and Regulatory Officers not elsewhere classified + */ + _599599, + /** + * Insurance Investigators, Loss Adjusters and Risk Surveyors not further defined + */ + _599600, + /** + * Insurance Investigator + */ + _599611, + /** + * Insurance Loss Adjuster + */ + _599612, + /** + * Insurance Risk Surveyor + */ + _599613, + /** + * Library Assistant + */ + _599711, + /** + * Other Miscellaneous Clerical and Administrative Workers not further defined + */ + _599900, + /** + * Coding Clerk + */ + _599911, + /** + * Production Assistant (Film, Television, Radio or Stage) + */ + _599912, + /** + * Proof Reader + */ + _599913, + /** + * Radio Despatcher + */ + _599914, + /** + * Clerical and Administrative Workers not elsewhere classified + */ + _599999, + /** + * Sales Workers not further defined + */ + _600000, + /** + * Sales Representatives and Agents not further defined + */ + _610000, + /** + * Insurance Agents and Sales Representatives not further defined + */ + _611000, + /** + * Auctioneers, and Stock and Station Agents not further defined + */ + _611100, + /** + * Auctioneer + */ + _611111, + /** + * Stock and Station Agent + */ + _611112, + /** + * Insurance Agent + */ + _611211, + /** + * Sales Representatives not further defined + */ + _611300, + /** + * Sales Representative (Building and Plumbing Supplies) + */ + _611311, + /** + * Sales Representative (Business Services) + */ + _611312, + /** + * Sales Representative (Motor Vehicle Parts and Accessories) + */ + _611313, + /** + * Sales Representative (Personal and Household Goods) + */ + _611314, + /** + * Sales Representatives not elsewhere classified + */ + _611399, + /** + * Real Estate Sales Agents not further defined + */ + _612100, + /** + * Business Broker + */ + _612111, + /** + * Property Manager + */ + _612112, + /** + * Real Estate Agency Principal + */ + _612113, + /** + * Real Estate Agent + */ + _612114, + /** + * Real Estate Representative + */ + _612115, + /** + * Sales Assistants and Salespersons not further defined + */ + _621000, + /** + * Sales Assistant (General) + */ + _621111, + /** + * ICT Sales Assistant + */ + _621211, + /** + * Motor Vehicle and Vehicle Parts Salespersons not further defined + */ + _621300, + /** + * Motor Vehicle or Caravan Salesperson + */ + _621311, + /** + * Motor Vehicle Parts Interpreter + */ + _621312, + /** + * Pharmacy Sales Assistant + */ + _621411, + /** + * Retail Supervisor + */ + _621511, + /** + * Service Station Attendant + */ + _621611, + /** + * Street Vendors and Related Salespersons not further defined + */ + _621700, + /** + * Cash Van Salesperson + */ + _621711, + /** + * Door-to-door Salesperson + */ + _621712, + /** + * Street Vendor + */ + _621713, + /** + * Other Sales Assistants and Salespersons not further defined + */ + _621900, + /** + * Materials Recycler + */ + _621911, + /** + * Rental Salesperson + */ + _621912, + /** + * Sales Assistants and Salespersons not elsewhere classified + */ + _621999, + /** + * Sales Support Workers not further defined + */ + _630000, + /** + * Checkout Operators and Office Cashiers not further defined + */ + _631100, + /** + * Checkout Operator + */ + _631111, + /** + * Office Cashier + */ + _631112, + /** + * Miscellaneous Sales Support Workers not further defined + */ + _639000, + /** + * Models and Sales Demonstrators not further defined + */ + _639100, + /** + * Model + */ + _639111, + /** + * Sales Demonstrator + */ + _639112, + /** + * Retail and Wool Buyers not further defined + */ + _639200, + /** + * Retail Buyer + */ + _639211, + /** + * Wool Buyer + */ + _639212, + /** + * Telemarketer + */ + _639311, + /** + * Ticket Salespersons not further defined + */ + _639400, + /** + * Ticket Seller + */ + _639411, + /** + * Transport Conductor + */ + _639412, + /** + * Visual Merchandiser + */ + _639511, + /** + * Other Sales Support Worker + */ + _639911, + /** + * Machinery Operators and Drivers not further defined + */ + _700000, + /** + * Machine and Stationary Plant Operators not further defined + */ + _710000, + /** + * Machine Operators not further defined + */ + _711000, + /** + * Clay, Concrete, Glass and Stone Processing Machine Operators not further defined + */ + _711100, + /** + * Clay Products Machine Operator + */ + _711111, + /** + * Concrete Products Machine Operator + */ + _711112, + /** + * Glass Production Machine Operator + */ + _711113, + /** + * Stone Processing Machine Operator + */ + _711114, + /** + * Clay, Concrete, Glass and Stone Processing Machine Operators not elsewhere classified + */ + _711199, + /** + * Industrial Spraypainter + */ + _711211, + /** + * Paper and Wood Processing Machine Operators not further defined + */ + _711300, + /** + * Paper Products Machine Operator + */ + _711311, + /** + * Wood Processing Machine Operator + */ + _711312, + /** + * Photographic Developer and Printer + */ + _711411, + /** + * Plastics and Rubber Production Machine Operators not further defined + */ + _711500, + /** + * Plastic Cablemaking Machine Operator + */ + _711511, + /** + * Plastic Compounding and Reclamation Machine Operator + */ + _711512, + /** + * Plastics Fabricator or Welder + */ + _711513, + /** + * Plastics Production Machine Operator (General) + */ + _711514, + /** + * Reinforced Plastic and Composite Production Worker + */ + _711515, + /** + * Rubber Production Machine Operator + */ + _711516, + /** + * Plastics and Rubber Production Machine Operators not elsewhere classified + */ + _711599, + /** + * Sewing Machinist + */ + _711611, + /** + * Textile and Footwear Production Machine Operators not further defined + */ + _711700, + /** + * Footwear Production Machine Operator + */ + _711711, + /** + * Hide and Skin Processing Machine Operator + */ + _711712, + /** + * Knitting Machine Operator + */ + _711713, + /** + * Textile Dyeing and Finishing Machine Operator + */ + _711714, + /** + * Weaving Machine Operator + */ + _711715, + /** + * Yarn Carding and Spinning Machine Operator + */ + _711716, + /** + * Textile and Footwear Production Machine Operators not elsewhere classified + */ + _711799, + /** + * Other Machine Operators not further defined + */ + _711900, + /** + * Chemical Production Machine Operator + */ + _711911, + /** + * Motion Picture Projectionist + */ + _711912, + /** + * Sand Blaster + */ + _711913, + /** + * Sterilisation Technician + */ + _711914, + /** + * Machine Operators not elsewhere classified + */ + _711999, + /** + * Stationary Plant Operators not further defined + */ + _712000, + /** + * Crane, Hoist or Lift Operator + */ + _712111, + /** + * Drillers, Miners and Shot Firers not further defined + */ + _712200, + /** + * Driller + */ + _712211, + /** + * Miner + */ + _712212, + /** + * Shot Firer + */ + _712213, + /** + * Engineering Production Systems Worker + */ + _712311, + /** + * Other Stationary Plant Operators not further defined + */ + _712900, + /** + * Boiler or Engine Operator + */ + _712911, + /** + * Bulk Materials Handling Plant Operator + */ + _712912, + /** + * Cement Production Plant Operator + */ + _712913, + /** + * Concrete Batching Plant Operator + */ + _712914, + /** + * Concrete Pump Operator + */ + _712915, + /** + * Paper and Pulp Mill Operator + */ + _712916, + /** + * Railway Signal Operator + */ + _712917, + /** + * Train Controller + */ + _712918, + /** + * Waste Water or Water Plant Operator + */ + _712921, + /** + * Weighbridge Operator + */ + _712922, + /** + * Stationary Plant Operators not elsewhere classified + */ + _712999, + /** + * Mobile Plant Operators not further defined + */ + _721000, + /** + * Agricultural, Forestry and Horticultural Plant Operators not further defined + */ + _721100, + /** + * Agricultural and Horticultural Mobile Plant Operator + */ + _721111, + /** + * Logging Plant Operator + */ + _721112, + /** + * Earthmoving Plant Operators not further defined + */ + _721200, + /** + * Earthmoving Plant Operator (General) + */ + _721211, + /** + * Backhoe Operator + */ + _721212, + /** + * Bulldozer Operator + */ + _721213, + /** + * Excavator Operator + */ + _721214, + /** + * Grader Operator + */ + _721215, + /** + * Loader Operator + */ + _721216, + /** + * Forklift Driver + */ + _721311, + /** + * Other Mobile Plant Operators not further defined + */ + _721900, + /** + * Aircraft Baggage Handler and Airline Ground Crew + */ + _721911, + /** + * Linemarker + */ + _721912, + /** + * Paving Plant Operator + */ + _721913, + /** + * Railway Track Plant Operator + */ + _721914, + /** + * Road Roller Operator + */ + _721915, + /** + * Streetsweeper Operator + */ + _721916, + /** + * Mobile Plant Operators not elsewhere classified + */ + _721999, + /** + * Road and Rail Drivers not further defined + */ + _730000, + /** + * Automobile, Bus and Rail Drivers not further defined + */ + _731000, + /** + * Automobile Drivers not further defined + */ + _731100, + /** + * Chauffeur + */ + _731111, + /** + * Taxi Driver + */ + _731112, + /** + * Automobile Drivers not elsewhere classified + */ + _731199, + /** + * Bus and Coach Drivers not further defined + */ + _731200, + /** + * Bus Driver + */ + _731211, + /** + * Charter and Tour Bus Driver + */ + _731212, + /** + * Passenger Coach Driver + */ + _731213, + /** + * Train and Tram Drivers not further defined + */ + _731300, + /** + * Train Driver + */ + _731311, + /** + * Tram Driver + */ + _731312, + /** + * Delivery Driver + */ + _732111, + /** + * Truck Drivers not further defined + */ + _733100, + /** + * Truck Driver (General) + */ + _733111, + /** + * Aircraft Refueller + */ + _733112, + /** + * Furniture Removalist + */ + _733113, + /** + * Tanker Driver + */ + _733114, + /** + * Tow Truck Driver + */ + _733115, + /** + * Storeperson + */ + _741111, + /** + * Labourers not further defined + */ + _800000, + /** + * Cleaners and Laundry Workers not further defined + */ + _811000, + /** + * Car Detailer + */ + _811111, + /** + * Commercial Cleaner + */ + _811211, + /** + * Domestic Cleaner + */ + _811311, + /** + * Housekeepers not further defined + */ + _811400, + /** + * Commercial Housekeeper + */ + _811411, + /** + * Domestic Housekeeper + */ + _811412, + /** + * Laundry Workers not further defined + */ + _811500, + /** + * Laundry Worker (General) + */ + _811511, + /** + * Drycleaner + */ + _811512, + /** + * Ironer or Presser + */ + _811513, + /** + * Other Cleaners not further defined + */ + _811600, + /** + * Carpet Cleaner + */ + _811611, + /** + * Window Cleaner + */ + _811612, + /** + * Cleaners not elsewhere classified + */ + _811699, + /** + * Construction and Mining Labourers not further defined + */ + _821000, + /** + * Building and Plumbing Labourers not further defined + */ + _821100, + /** + * Builder's Labourer + */ + _821111, + /** + * Drainage, Sewerage and Stormwater Labourer + */ + _821112, + /** + * Earthmoving Labourer + */ + _821113, + /** + * Plumber's Assistant + */ + _821114, + /** + * Concreter + */ + _821211, + /** + * Fencer + */ + _821311, + /** + * Insulation and Home Improvement Installers not further defined + */ + _821400, + /** + * Building Insulation Installer + */ + _821411, + /** + * Home Improvement Installer + */ + _821412, + /** + * Paving and Surfacing Labourer + */ + _821511, + /** + * Railway Track Worker + */ + _821611, + /** + * Structural Steel Construction Workers not further defined + */ + _821700, + /** + * Construction Rigger + */ + _821711, + /** + * Scaffolder + */ + _821712, + /** + * Steel Fixer + */ + _821713, + /** + * Structural Steel Erector + */ + _821714, + /** + * Other Construction and Mining Labourers not further defined + */ + _821900, + /** + * Crane Chaser + */ + _821911, + /** + * Driller's Assistant + */ + _821912, + /** + * Lagger + */ + _821913, + /** + * Mining Support Worker + */ + _821914, + /** + * Surveyor's Assistant + */ + _821915, + /** + * Factory Process Workers not further defined + */ + _830000, + /** + * Food Process Workers not further defined + */ + _831000, + /** + * Food and Drink Factory Workers not further defined + */ + _831100, + /** + * Baking Factory Worker + */ + _831111, + /** + * Brewery Worker + */ + _831112, + /** + * Confectionery Maker + */ + _831113, + /** + * Dairy Products Maker + */ + _831114, + /** + * Fruit and Vegetable Factory Worker + */ + _831115, + /** + * Grain Mill Worker + */ + _831116, + /** + * Sugar Mill Worker + */ + _831117, + /** + * Winery Cellar Hand + */ + _831118, + /** + * Food and Drink Factory Workers not elsewhere classified + */ + _831199, + /** + * Meat Boners and Slicers, and Slaughterers not further defined + */ + _831200, + /** + * Meat Boner and Slicer + */ + _831211, + /** + * Slaughterer + */ + _831212, + /** + * Meat, Poultry and Seafood Process Workers not further defined + */ + _831300, + /** + * Meat Process Worker + */ + _831311, + /** + * Poultry Process Worker + */ + _831312, + /** + * Seafood Process Worker + */ + _831313, + /** + * Packers and Product Assemblers not further defined + */ + _832000, + /** + * Packers not further defined + */ + _832100, + /** + * Chocolate Packer + */ + _832111, + /** + * Container Filler + */ + _832112, + /** + * Fruit and Vegetable Packer + */ + _832113, + /** + * Meat Packer + */ + _832114, + /** + * Seafood Packer + */ + _832115, + /** + * Packers not elsewhere classified + */ + _832199, + /** + * Product Assembler + */ + _832211, + /** + * Miscellaneous Factory Process Workers not further defined + */ + _839000, + /** + * Metal Engineering Process Worker + */ + _839111, + /** + * Plastics and Rubber Factory Workers not further defined + */ + _839200, + /** + * Plastics Factory Worker + */ + _839211, + /** + * Rubber Factory Worker + */ + _839212, + /** + * Product Quality Controllers not further defined + */ + _839300, + /** + * Product Examiner + */ + _839311, + /** + * Product Grader + */ + _839312, + /** + * Product Tester + */ + _839313, + /** + * Timber and Wood Process Workers not further defined + */ + _839400, + /** + * Paper and Pulp Mill Worker + */ + _839411, + /** + * Sawmill or Timber Yard Worker + */ + _839412, + /** + * Wood and Wood Products Factory Worker + */ + _839413, + /** + * Other Factory Process Workers not further defined + */ + _839900, + /** + * Cement and Concrete Plant Worker + */ + _839911, + /** + * Chemical Plant Worker + */ + _839912, + /** + * Clay Processing Factory Worker + */ + _839913, + /** + * Fabric and Textile Factory Worker + */ + _839914, + /** + * Footwear Factory Worker + */ + _839915, + /** + * Glass Processing Worker + */ + _839916, + /** + * Hide and Skin Processing Worker + */ + _839917, + /** + * Factory Process Workers not elsewhere classified + */ + _839999, + /** + * Farm, Forestry and Garden Workers not further defined + */ + _841000, + /** + * Aquaculture Worker + */ + _841111, + /** + * Crop Farm Workers not further defined + */ + _841200, + /** + * Fruit or Nut Farm Worker + */ + _841211, + /** + * Fruit or Nut Picker + */ + _841212, + /** + * Grain, Oilseed or Pasture Farm Worker + */ + _841213, + /** + * Vegetable Farm Worker + */ + _841214, + /** + * Vegetable Picker + */ + _841215, + /** + * Vineyard Worker + */ + _841216, + /** + * Crop Farm Workers not elsewhere classified + */ + _841299, + /** + * Forestry and Logging Workers not further defined + */ + _841300, + /** + * Forestry Worker + */ + _841311, + /** + * Logging Assistant + */ + _841312, + /** + * Tree Faller + */ + _841313, + /** + * Garden and Nursery Labourers not further defined + */ + _841400, + /** + * Garden Labourer + */ + _841411, + /** + * Horticultural Nursery Assistant + */ + _841412, + /** + * Livestock Farm Workers not further defined + */ + _841500, + /** + * Beef Cattle Farm Worker + */ + _841511, + /** + * Dairy Cattle Farm Worker + */ + _841512, + /** + * Mixed Livestock Farm Worker + */ + _841513, + /** + * Poultry Farm Worker + */ + _841514, + /** + * Sheep Farm Worker + */ + _841515, + /** + * Stablehand + */ + _841516, + /** + * Wool Handler + */ + _841517, + /** + * Livestock Farm Workers not elsewhere classified + */ + _841599, + /** + * Mixed Crop and Livestock Farm Worker + */ + _841611, + /** + * Other Farm, Forestry and Garden Workers not further defined + */ + _841900, + /** + * Hunter-Trapper + */ + _841911, + /** + * Pest or Weed Controller + */ + _841912, + /** + * Farm, Forestry and Garden Workers not elsewhere classified + */ + _841999, + /** + * Food Preparation Assistants not further defined + */ + _851000, + /** + * Fast Food Cook + */ + _851111, + /** + * Food Trades Assistants not further defined + */ + _851200, + /** + * Pastrycook's Assistant + */ + _851211, + /** + * Food Trades Assistants not elsewhere classified + */ + _851299, + /** + * Kitchenhand + */ + _851311, + /** + * Other Labourers not further defined + */ + _890000, + /** + * Freight Handlers and Shelf Fillers not further defined + */ + _891000, + /** + * Freight and Furniture Handlers not further defined + */ + _891100, + /** + * Freight Handler (Rail or Road) + */ + _891111, + /** + * Truck Driver's Offsider + */ + _891112, + /** + * Waterside Worker + */ + _891113, + /** + * Shelf Filler + */ + _891211, + /** + * Miscellaneous Labourers not further defined + */ + _899000, + /** + * Caretaker + */ + _899111, + /** + * Deck and Fishing Hands not further defined + */ + _899200, + /** + * Deck Hand + */ + _899211, + /** + * Fishing Hand + */ + _899212, + /** + * Handyperson + */ + _899311, + /** + * Motor Vehicle Parts and Accessories Fitters not further defined + */ + _899400, + /** + * Motor Vehicle Parts and Accessories Fitter (General) + */ + _899411, + /** + * Autoglazier + */ + _899412, + /** + * Exhaust and Muffler Fitter + */ + _899413, + /** + * Radiator Fitter + */ + _899414, + /** + * Tyre Fitter + */ + _899415, + /** + * Printing Assistants and Table Workers not further defined + */ + _899500, + /** + * Printer's Assistant + */ + _899511, + /** + * Printing Table Worker + */ + _899512, + /** + * Recycling or Rubbish Collector + */ + _899611, + /** + * Vending Machine Attendant + */ + _899711, + /** + * Other Miscellaneous Labourers not further defined + */ + _899900, + /** + * Bicycle Mechanic + */ + _899911, + /** + * Car Park Attendant + */ + _899912, + /** + * Crossing Supervisor + */ + _899913, + /** + * Electrical or Telecommunications Trades Assistant + */ + _899914, + /** + * Leaflet or Newspaper Deliverer + */ + _899915, + /** + * Mechanic's Assistant + */ + _899916, + /** + * Railways Assistant + */ + _899917, + /** + * Sign Erector + */ + _899918, + /** + * Ticket Collector or Usher + */ + _899921, + /** + * Trolley Collector + */ + _899922, + /** + * Labourers not elsewhere classified + */ + _899999, + /** + * added to help the parsers + */ + NULL; + public static AnzscoOccupations fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("100000".equals(codeString)) + return _100000; + if ("111000".equals(codeString)) + return _111000; + if ("111111".equals(codeString)) + return _111111; + if ("111200".equals(codeString)) + return _111200; + if ("111211".equals(codeString)) + return _111211; + if ("111212".equals(codeString)) + return _111212; + if ("111300".equals(codeString)) + return _111300; + if ("111311".equals(codeString)) + return _111311; + if ("111312".equals(codeString)) + return _111312; + if ("111399".equals(codeString)) + return _111399; + if ("121000".equals(codeString)) + return _121000; + if ("121111".equals(codeString)) + return _121111; + if ("121200".equals(codeString)) + return _121200; + if ("121211".equals(codeString)) + return _121211; + if ("121212".equals(codeString)) + return _121212; + if ("121213".equals(codeString)) + return _121213; + if ("121214".equals(codeString)) + return _121214; + if ("121215".equals(codeString)) + return _121215; + if ("121216".equals(codeString)) + return _121216; + if ("121217".equals(codeString)) + return _121217; + if ("121218".equals(codeString)) + return _121218; + if ("121221".equals(codeString)) + return _121221; + if ("121299".equals(codeString)) + return _121299; + if ("121300".equals(codeString)) + return _121300; + if ("121311".equals(codeString)) + return _121311; + if ("121312".equals(codeString)) + return _121312; + if ("121313".equals(codeString)) + return _121313; + if ("121314".equals(codeString)) + return _121314; + if ("121315".equals(codeString)) + return _121315; + if ("121316".equals(codeString)) + return _121316; + if ("121317".equals(codeString)) + return _121317; + if ("121318".equals(codeString)) + return _121318; + if ("121321".equals(codeString)) + return _121321; + if ("121322".equals(codeString)) + return _121322; + if ("121399".equals(codeString)) + return _121399; + if ("121411".equals(codeString)) + return _121411; + if ("130000".equals(codeString)) + return _130000; + if ("131100".equals(codeString)) + return _131100; + if ("131111".equals(codeString)) + return _131111; + if ("131112".equals(codeString)) + return _131112; + if ("132000".equals(codeString)) + return _132000; + if ("132111".equals(codeString)) + return _132111; + if ("132211".equals(codeString)) + return _132211; + if ("132311".equals(codeString)) + return _132311; + if ("132411".equals(codeString)) + return _132411; + if ("132511".equals(codeString)) + return _132511; + if ("133000".equals(codeString)) + return _133000; + if ("133100".equals(codeString)) + return _133100; + if ("133111".equals(codeString)) + return _133111; + if ("133112".equals(codeString)) + return _133112; + if ("133211".equals(codeString)) + return _133211; + if ("133300".equals(codeString)) + return _133300; + if ("133311".equals(codeString)) + return _133311; + if ("133312".equals(codeString)) + return _133312; + if ("133411".equals(codeString)) + return _133411; + if ("133500".equals(codeString)) + return _133500; + if ("133511".equals(codeString)) + return _133511; + if ("133512".equals(codeString)) + return _133512; + if ("133513".equals(codeString)) + return _133513; + if ("133611".equals(codeString)) + return _133611; + if ("134000".equals(codeString)) + return _134000; + if ("134111".equals(codeString)) + return _134111; + if ("134200".equals(codeString)) + return _134200; + if ("134211".equals(codeString)) + return _134211; + if ("134212".equals(codeString)) + return _134212; + if ("134213".equals(codeString)) + return _134213; + if ("134214".equals(codeString)) + return _134214; + if ("134299".equals(codeString)) + return _134299; + if ("134311".equals(codeString)) + return _134311; + if ("134400".equals(codeString)) + return _134400; + if ("134411".equals(codeString)) + return _134411; + if ("134412".equals(codeString)) + return _134412; + if ("134499".equals(codeString)) + return _134499; + if ("135100".equals(codeString)) + return _135100; + if ("135111".equals(codeString)) + return _135111; + if ("135112".equals(codeString)) + return _135112; + if ("135199".equals(codeString)) + return _135199; + if ("139000".equals(codeString)) + return _139000; + if ("139100".equals(codeString)) + return _139100; + if ("139111".equals(codeString)) + return _139111; + if ("139112".equals(codeString)) + return _139112; + if ("139113".equals(codeString)) + return _139113; + if ("139211".equals(codeString)) + return _139211; + if ("139900".equals(codeString)) + return _139900; + if ("139911".equals(codeString)) + return _139911; + if ("139912".equals(codeString)) + return _139912; + if ("139913".equals(codeString)) + return _139913; + if ("139914".equals(codeString)) + return _139914; + if ("139915".equals(codeString)) + return _139915; + if ("139999".equals(codeString)) + return _139999; + if ("140000".equals(codeString)) + return _140000; + if ("141000".equals(codeString)) + return _141000; + if ("141111".equals(codeString)) + return _141111; + if ("141211".equals(codeString)) + return _141211; + if ("141311".equals(codeString)) + return _141311; + if ("141411".equals(codeString)) + return _141411; + if ("141900".equals(codeString)) + return _141900; + if ("141911".equals(codeString)) + return _141911; + if ("141999".equals(codeString)) + return _141999; + if ("142100".equals(codeString)) + return _142100; + if ("142111".equals(codeString)) + return _142111; + if ("142112".equals(codeString)) + return _142112; + if ("142113".equals(codeString)) + return _142113; + if ("142114".equals(codeString)) + return _142114; + if ("142115".equals(codeString)) + return _142115; + if ("142116".equals(codeString)) + return _142116; + if ("149000".equals(codeString)) + return _149000; + if ("149100".equals(codeString)) + return _149100; + if ("149111".equals(codeString)) + return _149111; + if ("149112".equals(codeString)) + return _149112; + if ("149113".equals(codeString)) + return _149113; + if ("149200".equals(codeString)) + return _149200; + if ("149211".equals(codeString)) + return _149211; + if ("149212".equals(codeString)) + return _149212; + if ("149311".equals(codeString)) + return _149311; + if ("149400".equals(codeString)) + return _149400; + if ("149411".equals(codeString)) + return _149411; + if ("149412".equals(codeString)) + return _149412; + if ("149413".equals(codeString)) + return _149413; + if ("149900".equals(codeString)) + return _149900; + if ("149911".equals(codeString)) + return _149911; + if ("149912".equals(codeString)) + return _149912; + if ("149913".equals(codeString)) + return _149913; + if ("149914".equals(codeString)) + return _149914; + if ("149999".equals(codeString)) + return _149999; + if ("200000".equals(codeString)) + return _200000; + if ("210000".equals(codeString)) + return _210000; + if ("211000".equals(codeString)) + return _211000; + if ("211100".equals(codeString)) + return _211100; + if ("211111".equals(codeString)) + return _211111; + if ("211112".equals(codeString)) + return _211112; + if ("211113".equals(codeString)) + return _211113; + if ("211199".equals(codeString)) + return _211199; + if ("211200".equals(codeString)) + return _211200; + if ("211211".equals(codeString)) + return _211211; + if ("211212".equals(codeString)) + return _211212; + if ("211213".equals(codeString)) + return _211213; + if ("211214".equals(codeString)) + return _211214; + if ("211299".equals(codeString)) + return _211299; + if ("211311".equals(codeString)) + return _211311; + if ("211400".equals(codeString)) + return _211400; + if ("211411".equals(codeString)) + return _211411; + if ("211412".equals(codeString)) + return _211412; + if ("211413".equals(codeString)) + return _211413; + if ("211499".equals(codeString)) + return _211499; + if ("212000".equals(codeString)) + return _212000; + if ("212100".equals(codeString)) + return _212100; + if ("212111".equals(codeString)) + return _212111; + if ("212112".equals(codeString)) + return _212112; + if ("212113".equals(codeString)) + return _212113; + if ("212114".equals(codeString)) + return _212114; + if ("212200".equals(codeString)) + return _212200; + if ("212211".equals(codeString)) + return _212211; + if ("212212".equals(codeString)) + return _212212; + if ("212300".equals(codeString)) + return _212300; + if ("212311".equals(codeString)) + return _212311; + if ("212312".equals(codeString)) + return _212312; + if ("212313".equals(codeString)) + return _212313; + if ("212314".equals(codeString)) + return _212314; + if ("212315".equals(codeString)) + return _212315; + if ("212316".equals(codeString)) + return _212316; + if ("212317".equals(codeString)) + return _212317; + if ("212318".equals(codeString)) + return _212318; + if ("212399".equals(codeString)) + return _212399; + if ("212400".equals(codeString)) + return _212400; + if ("212411".equals(codeString)) + return _212411; + if ("212412".equals(codeString)) + return _212412; + if ("212413".equals(codeString)) + return _212413; + if ("212414".equals(codeString)) + return _212414; + if ("212415".equals(codeString)) + return _212415; + if ("212416".equals(codeString)) + return _212416; + if ("212499".equals(codeString)) + return _212499; + if ("220000".equals(codeString)) + return _220000; + if ("221000".equals(codeString)) + return _221000; + if ("221100".equals(codeString)) + return _221100; + if ("221111".equals(codeString)) + return _221111; + if ("221112".equals(codeString)) + return _221112; + if ("221113".equals(codeString)) + return _221113; + if ("221200".equals(codeString)) + return _221200; + if ("221211".equals(codeString)) + return _221211; + if ("221212".equals(codeString)) + return _221212; + if ("221213".equals(codeString)) + return _221213; + if ("221214".equals(codeString)) + return _221214; + if ("222000".equals(codeString)) + return _222000; + if ("222100".equals(codeString)) + return _222100; + if ("222111".equals(codeString)) + return _222111; + if ("222112".equals(codeString)) + return _222112; + if ("222113".equals(codeString)) + return _222113; + if ("222199".equals(codeString)) + return _222199; + if ("222200".equals(codeString)) + return _222200; + if ("222211".equals(codeString)) + return _222211; + if ("222212".equals(codeString)) + return _222212; + if ("222213".equals(codeString)) + return _222213; + if ("222299".equals(codeString)) + return _222299; + if ("222300".equals(codeString)) + return _222300; + if ("222311".equals(codeString)) + return _222311; + if ("222312".equals(codeString)) + return _222312; + if ("223000".equals(codeString)) + return _223000; + if ("223100".equals(codeString)) + return _223100; + if ("223111".equals(codeString)) + return _223111; + if ("223112".equals(codeString)) + return _223112; + if ("223113".equals(codeString)) + return _223113; + if ("223211".equals(codeString)) + return _223211; + if ("223311".equals(codeString)) + return _223311; + if ("224000".equals(codeString)) + return _224000; + if ("224100".equals(codeString)) + return _224100; + if ("224111".equals(codeString)) + return _224111; + if ("224112".equals(codeString)) + return _224112; + if ("224113".equals(codeString)) + return _224113; + if ("224200".equals(codeString)) + return _224200; + if ("224211".equals(codeString)) + return _224211; + if ("224212".equals(codeString)) + return _224212; + if ("224213".equals(codeString)) + return _224213; + if ("224214".equals(codeString)) + return _224214; + if ("224311".equals(codeString)) + return _224311; + if ("224400".equals(codeString)) + return _224400; + if ("224411".equals(codeString)) + return _224411; + if ("224412".equals(codeString)) + return _224412; + if ("224500".equals(codeString)) + return _224500; + if ("224511".equals(codeString)) + return _224511; + if ("224512".equals(codeString)) + return _224512; + if ("224611".equals(codeString)) + return _224611; + if ("224700".equals(codeString)) + return _224700; + if ("224711".equals(codeString)) + return _224711; + if ("224712".equals(codeString)) + return _224712; + if ("224900".equals(codeString)) + return _224900; + if ("224911".equals(codeString)) + return _224911; + if ("224912".equals(codeString)) + return _224912; + if ("224913".equals(codeString)) + return _224913; + if ("224914".equals(codeString)) + return _224914; + if ("224999".equals(codeString)) + return _224999; + if ("225000".equals(codeString)) + return _225000; + if ("225100".equals(codeString)) + return _225100; + if ("225111".equals(codeString)) + return _225111; + if ("225112".equals(codeString)) + return _225112; + if ("225113".equals(codeString)) + return _225113; + if ("225200".equals(codeString)) + return _225200; + if ("225211".equals(codeString)) + return _225211; + if ("225212".equals(codeString)) + return _225212; + if ("225213".equals(codeString)) + return _225213; + if ("225311".equals(codeString)) + return _225311; + if ("225400".equals(codeString)) + return _225400; + if ("225411".equals(codeString)) + return _225411; + if ("225412".equals(codeString)) + return _225412; + if ("225499".equals(codeString)) + return _225499; + if ("230000".equals(codeString)) + return _230000; + if ("231000".equals(codeString)) + return _231000; + if ("231100".equals(codeString)) + return _231100; + if ("231111".equals(codeString)) + return _231111; + if ("231112".equals(codeString)) + return _231112; + if ("231113".equals(codeString)) + return _231113; + if ("231114".equals(codeString)) + return _231114; + if ("231199".equals(codeString)) + return _231199; + if ("231200".equals(codeString)) + return _231200; + if ("231211".equals(codeString)) + return _231211; + if ("231212".equals(codeString)) + return _231212; + if ("231213".equals(codeString)) + return _231213; + if ("231214".equals(codeString)) + return _231214; + if ("231215".equals(codeString)) + return _231215; + if ("231299".equals(codeString)) + return _231299; + if ("232000".equals(codeString)) + return _232000; + if ("232100".equals(codeString)) + return _232100; + if ("232111".equals(codeString)) + return _232111; + if ("232112".equals(codeString)) + return _232112; + if ("232200".equals(codeString)) + return _232200; + if ("232211".equals(codeString)) + return _232211; + if ("232212".equals(codeString)) + return _232212; + if ("232300".equals(codeString)) + return _232300; + if ("232311".equals(codeString)) + return _232311; + if ("232312".equals(codeString)) + return _232312; + if ("232313".equals(codeString)) + return _232313; + if ("232400".equals(codeString)) + return _232400; + if ("232411".equals(codeString)) + return _232411; + if ("232412".equals(codeString)) + return _232412; + if ("232413".equals(codeString)) + return _232413; + if ("232414".equals(codeString)) + return _232414; + if ("232511".equals(codeString)) + return _232511; + if ("232611".equals(codeString)) + return _232611; + if ("233000".equals(codeString)) + return _233000; + if ("233100".equals(codeString)) + return _233100; + if ("233111".equals(codeString)) + return _233111; + if ("233112".equals(codeString)) + return _233112; + if ("233200".equals(codeString)) + return _233200; + if ("233211".equals(codeString)) + return _233211; + if ("233212".equals(codeString)) + return _233212; + if ("233213".equals(codeString)) + return _233213; + if ("233214".equals(codeString)) + return _233214; + if ("233215".equals(codeString)) + return _233215; + if ("233311".equals(codeString)) + return _233311; + if ("233411".equals(codeString)) + return _233411; + if ("233500".equals(codeString)) + return _233500; + if ("233511".equals(codeString)) + return _233511; + if ("233512".equals(codeString)) + return _233512; + if ("233513".equals(codeString)) + return _233513; + if ("233600".equals(codeString)) + return _233600; + if ("233611".equals(codeString)) + return _233611; + if ("233612".equals(codeString)) + return _233612; + if ("233900".equals(codeString)) + return _233900; + if ("233911".equals(codeString)) + return _233911; + if ("233912".equals(codeString)) + return _233912; + if ("233913".equals(codeString)) + return _233913; + if ("233914".equals(codeString)) + return _233914; + if ("233915".equals(codeString)) + return _233915; + if ("233916".equals(codeString)) + return _233916; + if ("233999".equals(codeString)) + return _233999; + if ("234000".equals(codeString)) + return _234000; + if ("234100".equals(codeString)) + return _234100; + if ("234111".equals(codeString)) + return _234111; + if ("234112".equals(codeString)) + return _234112; + if ("234113".equals(codeString)) + return _234113; + if ("234200".equals(codeString)) + return _234200; + if ("234211".equals(codeString)) + return _234211; + if ("234212".equals(codeString)) + return _234212; + if ("234213".equals(codeString)) + return _234213; + if ("234300".equals(codeString)) + return _234300; + if ("234311".equals(codeString)) + return _234311; + if ("234312".equals(codeString)) + return _234312; + if ("234313".equals(codeString)) + return _234313; + if ("234314".equals(codeString)) + return _234314; + if ("234399".equals(codeString)) + return _234399; + if ("234400".equals(codeString)) + return _234400; + if ("234411".equals(codeString)) + return _234411; + if ("234412".equals(codeString)) + return _234412; + if ("234500".equals(codeString)) + return _234500; + if ("234511".equals(codeString)) + return _234511; + if ("234512".equals(codeString)) + return _234512; + if ("234513".equals(codeString)) + return _234513; + if ("234514".equals(codeString)) + return _234514; + if ("234515".equals(codeString)) + return _234515; + if ("234516".equals(codeString)) + return _234516; + if ("234517".equals(codeString)) + return _234517; + if ("234518".equals(codeString)) + return _234518; + if ("234599".equals(codeString)) + return _234599; + if ("234611".equals(codeString)) + return _234611; + if ("234711".equals(codeString)) + return _234711; + if ("234900".equals(codeString)) + return _234900; + if ("234911".equals(codeString)) + return _234911; + if ("234912".equals(codeString)) + return _234912; + if ("234913".equals(codeString)) + return _234913; + if ("234914".equals(codeString)) + return _234914; + if ("234999".equals(codeString)) + return _234999; + if ("240000".equals(codeString)) + return _240000; + if ("241000".equals(codeString)) + return _241000; + if ("241111".equals(codeString)) + return _241111; + if ("241213".equals(codeString)) + return _241213; + if ("241311".equals(codeString)) + return _241311; + if ("241411".equals(codeString)) + return _241411; + if ("241500".equals(codeString)) + return _241500; + if ("241511".equals(codeString)) + return _241511; + if ("241512".equals(codeString)) + return _241512; + if ("241513".equals(codeString)) + return _241513; + if ("241599".equals(codeString)) + return _241599; + if ("242000".equals(codeString)) + return _242000; + if ("242100".equals(codeString)) + return _242100; + if ("242111".equals(codeString)) + return _242111; + if ("242112".equals(codeString)) + return _242112; + if ("242211".equals(codeString)) + return _242211; + if ("249000".equals(codeString)) + return _249000; + if ("249100".equals(codeString)) + return _249100; + if ("249111".equals(codeString)) + return _249111; + if ("249112".equals(codeString)) + return _249112; + if ("249200".equals(codeString)) + return _249200; + if ("249211".equals(codeString)) + return _249211; + if ("249212".equals(codeString)) + return _249212; + if ("249213".equals(codeString)) + return _249213; + if ("249214".equals(codeString)) + return _249214; + if ("249299".equals(codeString)) + return _249299; + if ("249311".equals(codeString)) + return _249311; + if ("250000".equals(codeString)) + return _250000; + if ("251000".equals(codeString)) + return _251000; + if ("251111".equals(codeString)) + return _251111; + if ("251200".equals(codeString)) + return _251200; + if ("251211".equals(codeString)) + return _251211; + if ("251212".equals(codeString)) + return _251212; + if ("251213".equals(codeString)) + return _251213; + if ("251214".equals(codeString)) + return _251214; + if ("251300".equals(codeString)) + return _251300; + if ("251311".equals(codeString)) + return _251311; + if ("251312".equals(codeString)) + return _251312; + if ("251400".equals(codeString)) + return _251400; + if ("251411".equals(codeString)) + return _251411; + if ("251412".equals(codeString)) + return _251412; + if ("251500".equals(codeString)) + return _251500; + if ("251511".equals(codeString)) + return _251511; + if ("251512".equals(codeString)) + return _251512; + if ("251513".equals(codeString)) + return _251513; + if ("251900".equals(codeString)) + return _251900; + if ("251911".equals(codeString)) + return _251911; + if ("251912".equals(codeString)) + return _251912; + if ("251999".equals(codeString)) + return _251999; + if ("252000".equals(codeString)) + return _252000; + if ("252100".equals(codeString)) + return _252100; + if ("252111".equals(codeString)) + return _252111; + if ("252112".equals(codeString)) + return _252112; + if ("252200".equals(codeString)) + return _252200; + if ("252211".equals(codeString)) + return _252211; + if ("252212".equals(codeString)) + return _252212; + if ("252213".equals(codeString)) + return _252213; + if ("252214".equals(codeString)) + return _252214; + if ("252299".equals(codeString)) + return _252299; + if ("252300".equals(codeString)) + return _252300; + if ("252311".equals(codeString)) + return _252311; + if ("252312".equals(codeString)) + return _252312; + if ("252411".equals(codeString)) + return _252411; + if ("252511".equals(codeString)) + return _252511; + if ("252611".equals(codeString)) + return _252611; + if ("252700".equals(codeString)) + return _252700; + if ("252711".equals(codeString)) + return _252711; + if ("252712".equals(codeString)) + return _252712; + if ("253000".equals(codeString)) + return _253000; + if ("253100".equals(codeString)) + return _253100; + if ("253111".equals(codeString)) + return _253111; + if ("253112".equals(codeString)) + return _253112; + if ("253211".equals(codeString)) + return _253211; + if ("253300".equals(codeString)) + return _253300; + if ("253311".equals(codeString)) + return _253311; + if ("253312".equals(codeString)) + return _253312; + if ("253313".equals(codeString)) + return _253313; + if ("253314".equals(codeString)) + return _253314; + if ("253315".equals(codeString)) + return _253315; + if ("253316".equals(codeString)) + return _253316; + if ("253317".equals(codeString)) + return _253317; + if ("253318".equals(codeString)) + return _253318; + if ("253321".equals(codeString)) + return _253321; + if ("253322".equals(codeString)) + return _253322; + if ("253323".equals(codeString)) + return _253323; + if ("253324".equals(codeString)) + return _253324; + if ("253399".equals(codeString)) + return _253399; + if ("253411".equals(codeString)) + return _253411; + if ("253500".equals(codeString)) + return _253500; + if ("253511".equals(codeString)) + return _253511; + if ("253512".equals(codeString)) + return _253512; + if ("253513".equals(codeString)) + return _253513; + if ("253514".equals(codeString)) + return _253514; + if ("253515".equals(codeString)) + return _253515; + if ("253516".equals(codeString)) + return _253516; + if ("253517".equals(codeString)) + return _253517; + if ("253518".equals(codeString)) + return _253518; + if ("253521".equals(codeString)) + return _253521; + if ("253900".equals(codeString)) + return _253900; + if ("253911".equals(codeString)) + return _253911; + if ("253912".equals(codeString)) + return _253912; + if ("253913".equals(codeString)) + return _253913; + if ("253914".equals(codeString)) + return _253914; + if ("253915".equals(codeString)) + return _253915; + if ("253916".equals(codeString)) + return _253916; + if ("253999".equals(codeString)) + return _253999; + if ("254000".equals(codeString)) + return _254000; + if ("254111".equals(codeString)) + return _254111; + if ("254200".equals(codeString)) + return _254200; + if ("254211".equals(codeString)) + return _254211; + if ("254212".equals(codeString)) + return _254212; + if ("254311".equals(codeString)) + return _254311; + if ("254400".equals(codeString)) + return _254400; + if ("254411".equals(codeString)) + return _254411; + if ("254412".equals(codeString)) + return _254412; + if ("254413".equals(codeString)) + return _254413; + if ("254414".equals(codeString)) + return _254414; + if ("254415".equals(codeString)) + return _254415; + if ("254416".equals(codeString)) + return _254416; + if ("254417".equals(codeString)) + return _254417; + if ("254418".equals(codeString)) + return _254418; + if ("254421".equals(codeString)) + return _254421; + if ("254422".equals(codeString)) + return _254422; + if ("254423".equals(codeString)) + return _254423; + if ("254424".equals(codeString)) + return _254424; + if ("254499".equals(codeString)) + return _254499; + if ("260000".equals(codeString)) + return _260000; + if ("261000".equals(codeString)) + return _261000; + if ("261100".equals(codeString)) + return _261100; + if ("261111".equals(codeString)) + return _261111; + if ("261112".equals(codeString)) + return _261112; + if ("261200".equals(codeString)) + return _261200; + if ("261211".equals(codeString)) + return _261211; + if ("261212".equals(codeString)) + return _261212; + if ("261300".equals(codeString)) + return _261300; + if ("261311".equals(codeString)) + return _261311; + if ("261312".equals(codeString)) + return _261312; + if ("261313".equals(codeString)) + return _261313; + if ("261399".equals(codeString)) + return _261399; + if ("262100".equals(codeString)) + return _262100; + if ("262111".equals(codeString)) + return _262111; + if ("262112".equals(codeString)) + return _262112; + if ("262113".equals(codeString)) + return _262113; + if ("263000".equals(codeString)) + return _263000; + if ("263100".equals(codeString)) + return _263100; + if ("263111".equals(codeString)) + return _263111; + if ("263112".equals(codeString)) + return _263112; + if ("263113".equals(codeString)) + return _263113; + if ("263200".equals(codeString)) + return _263200; + if ("263211".equals(codeString)) + return _263211; + if ("263212".equals(codeString)) + return _263212; + if ("263213".equals(codeString)) + return _263213; + if ("263299".equals(codeString)) + return _263299; + if ("263300".equals(codeString)) + return _263300; + if ("263311".equals(codeString)) + return _263311; + if ("263312".equals(codeString)) + return _263312; + if ("270000".equals(codeString)) + return _270000; + if ("271000".equals(codeString)) + return _271000; + if ("271111".equals(codeString)) + return _271111; + if ("271200".equals(codeString)) + return _271200; + if ("271211".equals(codeString)) + return _271211; + if ("271212".equals(codeString)) + return _271212; + if ("271213".equals(codeString)) + return _271213; + if ("271299".equals(codeString)) + return _271299; + if ("271311".equals(codeString)) + return _271311; + if ("272000".equals(codeString)) + return _272000; + if ("272100".equals(codeString)) + return _272100; + if ("272111".equals(codeString)) + return _272111; + if ("272112".equals(codeString)) + return _272112; + if ("272113".equals(codeString)) + return _272113; + if ("272114".equals(codeString)) + return _272114; + if ("272115".equals(codeString)) + return _272115; + if ("272199".equals(codeString)) + return _272199; + if ("272211".equals(codeString)) + return _272211; + if ("272300".equals(codeString)) + return _272300; + if ("272311".equals(codeString)) + return _272311; + if ("272312".equals(codeString)) + return _272312; + if ("272313".equals(codeString)) + return _272313; + if ("272314".equals(codeString)) + return _272314; + if ("272399".equals(codeString)) + return _272399; + if ("272400".equals(codeString)) + return _272400; + if ("272411".equals(codeString)) + return _272411; + if ("272412".equals(codeString)) + return _272412; + if ("272413".equals(codeString)) + return _272413; + if ("272499".equals(codeString)) + return _272499; + if ("272511".equals(codeString)) + return _272511; + if ("272600".equals(codeString)) + return _272600; + if ("272611".equals(codeString)) + return _272611; + if ("272612".equals(codeString)) + return _272612; + if ("272613".equals(codeString)) + return _272613; + if ("300000".equals(codeString)) + return _300000; + if ("310000".equals(codeString)) + return _310000; + if ("311000".equals(codeString)) + return _311000; + if ("311111".equals(codeString)) + return _311111; + if ("311200".equals(codeString)) + return _311200; + if ("311211".equals(codeString)) + return _311211; + if ("311212".equals(codeString)) + return _311212; + if ("311213".equals(codeString)) + return _311213; + if ("311214".equals(codeString)) + return _311214; + if ("311215".equals(codeString)) + return _311215; + if ("311299".equals(codeString)) + return _311299; + if ("311300".equals(codeString)) + return _311300; + if ("311311".equals(codeString)) + return _311311; + if ("311312".equals(codeString)) + return _311312; + if ("311313".equals(codeString)) + return _311313; + if ("311399".equals(codeString)) + return _311399; + if ("311400".equals(codeString)) + return _311400; + if ("311411".equals(codeString)) + return _311411; + if ("311412".equals(codeString)) + return _311412; + if ("311413".equals(codeString)) + return _311413; + if ("311414".equals(codeString)) + return _311414; + if ("311499".equals(codeString)) + return _311499; + if ("312000".equals(codeString)) + return _312000; + if ("312100".equals(codeString)) + return _312100; + if ("312111".equals(codeString)) + return _312111; + if ("312112".equals(codeString)) + return _312112; + if ("312113".equals(codeString)) + return _312113; + if ("312114".equals(codeString)) + return _312114; + if ("312115".equals(codeString)) + return _312115; + if ("312116".equals(codeString)) + return _312116; + if ("312200".equals(codeString)) + return _312200; + if ("312211".equals(codeString)) + return _312211; + if ("312212".equals(codeString)) + return _312212; + if ("312300".equals(codeString)) + return _312300; + if ("312311".equals(codeString)) + return _312311; + if ("312312".equals(codeString)) + return _312312; + if ("312400".equals(codeString)) + return _312400; + if ("312411".equals(codeString)) + return _312411; + if ("312412".equals(codeString)) + return _312412; + if ("312500".equals(codeString)) + return _312500; + if ("312511".equals(codeString)) + return _312511; + if ("312512".equals(codeString)) + return _312512; + if ("312611".equals(codeString)) + return _312611; + if ("312900".equals(codeString)) + return _312900; + if ("312911".equals(codeString)) + return _312911; + if ("312912".equals(codeString)) + return _312912; + if ("312913".equals(codeString)) + return _312913; + if ("312999".equals(codeString)) + return _312999; + if ("313000".equals(codeString)) + return _313000; + if ("313100".equals(codeString)) + return _313100; + if ("313111".equals(codeString)) + return _313111; + if ("313112".equals(codeString)) + return _313112; + if ("313113".equals(codeString)) + return _313113; + if ("313199".equals(codeString)) + return _313199; + if ("313200".equals(codeString)) + return _313200; + if ("313211".equals(codeString)) + return _313211; + if ("313212".equals(codeString)) + return _313212; + if ("313213".equals(codeString)) + return _313213; + if ("313214".equals(codeString)) + return _313214; + if ("320000".equals(codeString)) + return _320000; + if ("321000".equals(codeString)) + return _321000; + if ("321111".equals(codeString)) + return _321111; + if ("321200".equals(codeString)) + return _321200; + if ("321211".equals(codeString)) + return _321211; + if ("321212".equals(codeString)) + return _321212; + if ("321213".equals(codeString)) + return _321213; + if ("321214".equals(codeString)) + return _321214; + if ("322000".equals(codeString)) + return _322000; + if ("322100".equals(codeString)) + return _322100; + if ("322111".equals(codeString)) + return _322111; + if ("322112".equals(codeString)) + return _322112; + if ("322113".equals(codeString)) + return _322113; + if ("322114".equals(codeString)) + return _322114; + if ("322115".equals(codeString)) + return _322115; + if ("322211".equals(codeString)) + return _322211; + if ("322300".equals(codeString)) + return _322300; + if ("322311".equals(codeString)) + return _322311; + if ("322312".equals(codeString)) + return _322312; + if ("322313".equals(codeString)) + return _322313; + if ("323000".equals(codeString)) + return _323000; + if ("323100".equals(codeString)) + return _323100; + if ("323111".equals(codeString)) + return _323111; + if ("323112".equals(codeString)) + return _323112; + if ("323113".equals(codeString)) + return _323113; + if ("323200".equals(codeString)) + return _323200; + if ("323211".equals(codeString)) + return _323211; + if ("323212".equals(codeString)) + return _323212; + if ("323213".equals(codeString)) + return _323213; + if ("323214".equals(codeString)) + return _323214; + if ("323215".equals(codeString)) + return _323215; + if ("323299".equals(codeString)) + return _323299; + if ("323300".equals(codeString)) + return _323300; + if ("323311".equals(codeString)) + return _323311; + if ("323312".equals(codeString)) + return _323312; + if ("323313".equals(codeString)) + return _323313; + if ("323314".equals(codeString)) + return _323314; + if ("323315".equals(codeString)) + return _323315; + if ("323316".equals(codeString)) + return _323316; + if ("323400".equals(codeString)) + return _323400; + if ("323411".equals(codeString)) + return _323411; + if ("323412".equals(codeString)) + return _323412; + if ("324000".equals(codeString)) + return _324000; + if ("324111".equals(codeString)) + return _324111; + if ("324200".equals(codeString)) + return _324200; + if ("324211".equals(codeString)) + return _324211; + if ("324212".equals(codeString)) + return _324212; + if ("324311".equals(codeString)) + return _324311; + if ("330000".equals(codeString)) + return _330000; + if ("331000".equals(codeString)) + return _331000; + if ("331100".equals(codeString)) + return _331100; + if ("331111".equals(codeString)) + return _331111; + if ("331112".equals(codeString)) + return _331112; + if ("331211".equals(codeString)) + return _331211; + if ("331212".equals(codeString)) + return _331212; + if ("331213".equals(codeString)) + return _331213; + if ("332000".equals(codeString)) + return _332000; + if ("332111".equals(codeString)) + return _332111; + if ("332211".equals(codeString)) + return _332211; + if ("333000".equals(codeString)) + return _333000; + if ("333111".equals(codeString)) + return _333111; + if ("333200".equals(codeString)) + return _333200; + if ("333211".equals(codeString)) + return _333211; + if ("333212".equals(codeString)) + return _333212; + if ("333311".equals(codeString)) + return _333311; + if ("333411".equals(codeString)) + return _333411; + if ("334100".equals(codeString)) + return _334100; + if ("334111".equals(codeString)) + return _334111; + if ("334112".equals(codeString)) + return _334112; + if ("334113".equals(codeString)) + return _334113; + if ("334114".equals(codeString)) + return _334114; + if ("334115".equals(codeString)) + return _334115; + if ("340000".equals(codeString)) + return _340000; + if ("341100".equals(codeString)) + return _341100; + if ("341111".equals(codeString)) + return _341111; + if ("341112".equals(codeString)) + return _341112; + if ("341113".equals(codeString)) + return _341113; + if ("342000".equals(codeString)) + return _342000; + if ("342111".equals(codeString)) + return _342111; + if ("342200".equals(codeString)) + return _342200; + if ("342211".equals(codeString)) + return _342211; + if ("342212".equals(codeString)) + return _342212; + if ("342300".equals(codeString)) + return _342300; + if ("342311".equals(codeString)) + return _342311; + if ("342312".equals(codeString)) + return _342312; + if ("342313".equals(codeString)) + return _342313; + if ("342314".equals(codeString)) + return _342314; + if ("342315".equals(codeString)) + return _342315; + if ("342400".equals(codeString)) + return _342400; + if ("342411".equals(codeString)) + return _342411; + if ("342412".equals(codeString)) + return _342412; + if ("342413".equals(codeString)) + return _342413; + if ("342414".equals(codeString)) + return _342414; + if ("351000".equals(codeString)) + return _351000; + if ("351100".equals(codeString)) + return _351100; + if ("351111".equals(codeString)) + return _351111; + if ("351112".equals(codeString)) + return _351112; + if ("351211".equals(codeString)) + return _351211; + if ("351311".equals(codeString)) + return _351311; + if ("351411".equals(codeString)) + return _351411; + if ("360000".equals(codeString)) + return _360000; + if ("361000".equals(codeString)) + return _361000; + if ("361100".equals(codeString)) + return _361100; + if ("361111".equals(codeString)) + return _361111; + if ("361112".equals(codeString)) + return _361112; + if ("361113".equals(codeString)) + return _361113; + if ("361114".equals(codeString)) + return _361114; + if ("361199".equals(codeString)) + return _361199; + if ("361211".equals(codeString)) + return _361211; + if ("361311".equals(codeString)) + return _361311; + if ("362000".equals(codeString)) + return _362000; + if ("362111".equals(codeString)) + return _362111; + if ("362200".equals(codeString)) + return _362200; + if ("362211".equals(codeString)) + return _362211; + if ("362212".equals(codeString)) + return _362212; + if ("362213".equals(codeString)) + return _362213; + if ("362311".equals(codeString)) + return _362311; + if ("362411".equals(codeString)) + return _362411; + if ("390000".equals(codeString)) + return _390000; + if ("391111".equals(codeString)) + return _391111; + if ("392000".equals(codeString)) + return _392000; + if ("392100".equals(codeString)) + return _392100; + if ("392111".equals(codeString)) + return _392111; + if ("392112".equals(codeString)) + return _392112; + if ("392211".equals(codeString)) + return _392211; + if ("392300".equals(codeString)) + return _392300; + if ("392311".equals(codeString)) + return _392311; + if ("392312".equals(codeString)) + return _392312; + if ("393000".equals(codeString)) + return _393000; + if ("393100".equals(codeString)) + return _393100; + if ("393111".equals(codeString)) + return _393111; + if ("393112".equals(codeString)) + return _393112; + if ("393113".equals(codeString)) + return _393113; + if ("393114".equals(codeString)) + return _393114; + if ("393200".equals(codeString)) + return _393200; + if ("393211".equals(codeString)) + return _393211; + if ("393212".equals(codeString)) + return _393212; + if ("393213".equals(codeString)) + return _393213; + if ("393299".equals(codeString)) + return _393299; + if ("393311".equals(codeString)) + return _393311; + if ("394000".equals(codeString)) + return _394000; + if ("394111".equals(codeString)) + return _394111; + if ("394200".equals(codeString)) + return _394200; + if ("394211".equals(codeString)) + return _394211; + if ("394212".equals(codeString)) + return _394212; + if ("394213".equals(codeString)) + return _394213; + if ("394214".equals(codeString)) + return _394214; + if ("394299".equals(codeString)) + return _394299; + if ("399000".equals(codeString)) + return _399000; + if ("399100".equals(codeString)) + return _399100; + if ("399111".equals(codeString)) + return _399111; + if ("399112".equals(codeString)) + return _399112; + if ("399200".equals(codeString)) + return _399200; + if ("399211".equals(codeString)) + return _399211; + if ("399212".equals(codeString)) + return _399212; + if ("399213".equals(codeString)) + return _399213; + if ("399300".equals(codeString)) + return _399300; + if ("399311".equals(codeString)) + return _399311; + if ("399312".equals(codeString)) + return _399312; + if ("399411".equals(codeString)) + return _399411; + if ("399500".equals(codeString)) + return _399500; + if ("399511".equals(codeString)) + return _399511; + if ("399512".equals(codeString)) + return _399512; + if ("399513".equals(codeString)) + return _399513; + if ("399514".equals(codeString)) + return _399514; + if ("399515".equals(codeString)) + return _399515; + if ("399516".equals(codeString)) + return _399516; + if ("399517".equals(codeString)) + return _399517; + if ("399599".equals(codeString)) + return _399599; + if ("399611".equals(codeString)) + return _399611; + if ("399900".equals(codeString)) + return _399900; + if ("399911".equals(codeString)) + return _399911; + if ("399912".equals(codeString)) + return _399912; + if ("399913".equals(codeString)) + return _399913; + if ("399914".equals(codeString)) + return _399914; + if ("399915".equals(codeString)) + return _399915; + if ("399916".equals(codeString)) + return _399916; + if ("399917".equals(codeString)) + return _399917; + if ("399999".equals(codeString)) + return _399999; + if ("400000".equals(codeString)) + return _400000; + if ("411000".equals(codeString)) + return _411000; + if ("411100".equals(codeString)) + return _411100; + if ("411111".equals(codeString)) + return _411111; + if ("411112".equals(codeString)) + return _411112; + if ("411200".equals(codeString)) + return _411200; + if ("411211".equals(codeString)) + return _411211; + if ("411212".equals(codeString)) + return _411212; + if ("411213".equals(codeString)) + return _411213; + if ("411214".equals(codeString)) + return _411214; + if ("411311".equals(codeString)) + return _411311; + if ("411400".equals(codeString)) + return _411400; + if ("411411".equals(codeString)) + return _411411; + if ("411412".equals(codeString)) + return _411412; + if ("411511".equals(codeString)) + return _411511; + if ("411611".equals(codeString)) + return _411611; + if ("411700".equals(codeString)) + return _411700; + if ("411711".equals(codeString)) + return _411711; + if ("411712".equals(codeString)) + return _411712; + if ("411713".equals(codeString)) + return _411713; + if ("411714".equals(codeString)) + return _411714; + if ("411715".equals(codeString)) + return _411715; + if ("411716".equals(codeString)) + return _411716; + if ("420000".equals(codeString)) + return _420000; + if ("421100".equals(codeString)) + return _421100; + if ("421111".equals(codeString)) + return _421111; + if ("421112".equals(codeString)) + return _421112; + if ("421113".equals(codeString)) + return _421113; + if ("421114".equals(codeString)) + return _421114; + if ("422100".equals(codeString)) + return _422100; + if ("422111".equals(codeString)) + return _422111; + if ("422112".equals(codeString)) + return _422112; + if ("422115".equals(codeString)) + return _422115; + if ("422116".equals(codeString)) + return _422116; + if ("423000".equals(codeString)) + return _423000; + if ("423111".equals(codeString)) + return _423111; + if ("423211".equals(codeString)) + return _423211; + if ("423300".equals(codeString)) + return _423300; + if ("423311".equals(codeString)) + return _423311; + if ("423312".equals(codeString)) + return _423312; + if ("423313".equals(codeString)) + return _423313; + if ("423314".equals(codeString)) + return _423314; + if ("423400".equals(codeString)) + return _423400; + if ("423411".equals(codeString)) + return _423411; + if ("423412".equals(codeString)) + return _423412; + if ("423413".equals(codeString)) + return _423413; + if ("431000".equals(codeString)) + return _431000; + if ("431100".equals(codeString)) + return _431100; + if ("431111".equals(codeString)) + return _431111; + if ("431112".equals(codeString)) + return _431112; + if ("431211".equals(codeString)) + return _431211; + if ("431311".equals(codeString)) + return _431311; + if ("431411".equals(codeString)) + return _431411; + if ("431511".equals(codeString)) + return _431511; + if ("431900".equals(codeString)) + return _431900; + if ("431911".equals(codeString)) + return _431911; + if ("431912".equals(codeString)) + return _431912; + if ("431999".equals(codeString)) + return _431999; + if ("440000".equals(codeString)) + return _440000; + if ("441000".equals(codeString)) + return _441000; + if ("441111".equals(codeString)) + return _441111; + if ("441200".equals(codeString)) + return _441200; + if ("441211".equals(codeString)) + return _441211; + if ("441212".equals(codeString)) + return _441212; + if ("441300".equals(codeString)) + return _441300; + if ("441311".equals(codeString)) + return _441311; + if ("441312".equals(codeString)) + return _441312; + if ("442000".equals(codeString)) + return _442000; + if ("442111".equals(codeString)) + return _442111; + if ("442200".equals(codeString)) + return _442200; + if ("442211".equals(codeString)) + return _442211; + if ("442212".equals(codeString)) + return _442212; + if ("442213".equals(codeString)) + return _442213; + if ("442214".equals(codeString)) + return _442214; + if ("442215".equals(codeString)) + return _442215; + if ("442216".equals(codeString)) + return _442216; + if ("442217".equals(codeString)) + return _442217; + if ("442299".equals(codeString)) + return _442299; + if ("450000".equals(codeString)) + return _450000; + if ("451000".equals(codeString)) + return _451000; + if ("451111".equals(codeString)) + return _451111; + if ("451211".equals(codeString)) + return _451211; + if ("451300".equals(codeString)) + return _451300; + if ("451311".equals(codeString)) + return _451311; + if ("451399".equals(codeString)) + return _451399; + if ("451400".equals(codeString)) + return _451400; + if ("451411".equals(codeString)) + return _451411; + if ("451412".equals(codeString)) + return _451412; + if ("451500".equals(codeString)) + return _451500; + if ("451511".equals(codeString)) + return _451511; + if ("451512".equals(codeString)) + return _451512; + if ("451600".equals(codeString)) + return _451600; + if ("451611".equals(codeString)) + return _451611; + if ("451612".equals(codeString)) + return _451612; + if ("451700".equals(codeString)) + return _451700; + if ("451711".equals(codeString)) + return _451711; + if ("451799".equals(codeString)) + return _451799; + if ("451800".equals(codeString)) + return _451800; + if ("451811".equals(codeString)) + return _451811; + if ("451812".equals(codeString)) + return _451812; + if ("451813".equals(codeString)) + return _451813; + if ("451899".equals(codeString)) + return _451899; + if ("452000".equals(codeString)) + return _452000; + if ("452111".equals(codeString)) + return _452111; + if ("452200".equals(codeString)) + return _452200; + if ("452211".equals(codeString)) + return _452211; + if ("452212".equals(codeString)) + return _452212; + if ("452213".equals(codeString)) + return _452213; + if ("452214".equals(codeString)) + return _452214; + if ("452215".equals(codeString)) + return _452215; + if ("452216".equals(codeString)) + return _452216; + if ("452217".equals(codeString)) + return _452217; + if ("452299".equals(codeString)) + return _452299; + if ("452300".equals(codeString)) + return _452300; + if ("452311".equals(codeString)) + return _452311; + if ("452312".equals(codeString)) + return _452312; + if ("452313".equals(codeString)) + return _452313; + if ("452314".equals(codeString)) + return _452314; + if ("452315".equals(codeString)) + return _452315; + if ("452316".equals(codeString)) + return _452316; + if ("452317".equals(codeString)) + return _452317; + if ("452318".equals(codeString)) + return _452318; + if ("452321".equals(codeString)) + return _452321; + if ("452322".equals(codeString)) + return _452322; + if ("452323".equals(codeString)) + return _452323; + if ("452400".equals(codeString)) + return _452400; + if ("452411".equals(codeString)) + return _452411; + if ("452412".equals(codeString)) + return _452412; + if ("452413".equals(codeString)) + return _452413; + if ("452414".equals(codeString)) + return _452414; + if ("452499".equals(codeString)) + return _452499; + if ("500000".equals(codeString)) + return _500000; + if ("510000".equals(codeString)) + return _510000; + if ("511100".equals(codeString)) + return _511100; + if ("511111".equals(codeString)) + return _511111; + if ("511112".equals(codeString)) + return _511112; + if ("512000".equals(codeString)) + return _512000; + if ("512111".equals(codeString)) + return _512111; + if ("512200".equals(codeString)) + return _512200; + if ("512211".equals(codeString)) + return _512211; + if ("512299".equals(codeString)) + return _512299; + if ("521000".equals(codeString)) + return _521000; + if ("521111".equals(codeString)) + return _521111; + if ("521200".equals(codeString)) + return _521200; + if ("521211".equals(codeString)) + return _521211; + if ("521212".equals(codeString)) + return _521212; + if ("530000".equals(codeString)) + return _530000; + if ("531111".equals(codeString)) + return _531111; + if ("532100".equals(codeString)) + return _532100; + if ("532111".equals(codeString)) + return _532111; + if ("532112".equals(codeString)) + return _532112; + if ("532113".equals(codeString)) + return _532113; + if ("540000".equals(codeString)) + return _540000; + if ("541000".equals(codeString)) + return _541000; + if ("541100".equals(codeString)) + return _541100; + if ("541111".equals(codeString)) + return _541111; + if ("541112".equals(codeString)) + return _541112; + if ("541211".equals(codeString)) + return _541211; + if ("542100".equals(codeString)) + return _542100; + if ("542111".equals(codeString)) + return _542111; + if ("542112".equals(codeString)) + return _542112; + if ("542113".equals(codeString)) + return _542113; + if ("542114".equals(codeString)) + return _542114; + if ("550000".equals(codeString)) + return _550000; + if ("551000".equals(codeString)) + return _551000; + if ("551100".equals(codeString)) + return _551100; + if ("551111".equals(codeString)) + return _551111; + if ("551112".equals(codeString)) + return _551112; + if ("551211".equals(codeString)) + return _551211; + if ("551311".equals(codeString)) + return _551311; + if ("552000".equals(codeString)) + return _552000; + if ("552111".equals(codeString)) + return _552111; + if ("552211".equals(codeString)) + return _552211; + if ("552300".equals(codeString)) + return _552300; + if ("552311".equals(codeString)) + return _552311; + if ("552312".equals(codeString)) + return _552312; + if ("552313".equals(codeString)) + return _552313; + if ("552314".equals(codeString)) + return _552314; + if ("561000".equals(codeString)) + return _561000; + if ("561100".equals(codeString)) + return _561100; + if ("561111".equals(codeString)) + return _561111; + if ("561112".equals(codeString)) + return _561112; + if ("561113".equals(codeString)) + return _561113; + if ("561199".equals(codeString)) + return _561199; + if ("561200".equals(codeString)) + return _561200; + if ("561211".equals(codeString)) + return _561211; + if ("561212".equals(codeString)) + return _561212; + if ("561311".equals(codeString)) + return _561311; + if ("561400".equals(codeString)) + return _561400; + if ("561411".equals(codeString)) + return _561411; + if ("561412".equals(codeString)) + return _561412; + if ("561511".equals(codeString)) + return _561511; + if ("561611".equals(codeString)) + return _561611; + if ("561900".equals(codeString)) + return _561900; + if ("561911".equals(codeString)) + return _561911; + if ("561912".equals(codeString)) + return _561912; + if ("561913".equals(codeString)) + return _561913; + if ("561999".equals(codeString)) + return _561999; + if ("590000".equals(codeString)) + return _590000; + if ("591000".equals(codeString)) + return _591000; + if ("591100".equals(codeString)) + return _591100; + if ("591111".equals(codeString)) + return _591111; + if ("591112".equals(codeString)) + return _591112; + if ("591113".equals(codeString)) + return _591113; + if ("591114".equals(codeString)) + return _591114; + if ("591115".equals(codeString)) + return _591115; + if ("591116".equals(codeString)) + return _591116; + if ("591200".equals(codeString)) + return _591200; + if ("591211".equals(codeString)) + return _591211; + if ("591212".equals(codeString)) + return _591212; + if ("599000".equals(codeString)) + return _599000; + if ("599100".equals(codeString)) + return _599100; + if ("599111".equals(codeString)) + return _599111; + if ("599112".equals(codeString)) + return _599112; + if ("599200".equals(codeString)) + return _599200; + if ("599211".equals(codeString)) + return _599211; + if ("599212".equals(codeString)) + return _599212; + if ("599213".equals(codeString)) + return _599213; + if ("599214".equals(codeString)) + return _599214; + if ("599215".equals(codeString)) + return _599215; + if ("599311".equals(codeString)) + return _599311; + if ("599411".equals(codeString)) + return _599411; + if ("599500".equals(codeString)) + return _599500; + if ("599511".equals(codeString)) + return _599511; + if ("599512".equals(codeString)) + return _599512; + if ("599513".equals(codeString)) + return _599513; + if ("599514".equals(codeString)) + return _599514; + if ("599515".equals(codeString)) + return _599515; + if ("599516".equals(codeString)) + return _599516; + if ("599517".equals(codeString)) + return _599517; + if ("599518".equals(codeString)) + return _599518; + if ("599521".equals(codeString)) + return _599521; + if ("599599".equals(codeString)) + return _599599; + if ("599600".equals(codeString)) + return _599600; + if ("599611".equals(codeString)) + return _599611; + if ("599612".equals(codeString)) + return _599612; + if ("599613".equals(codeString)) + return _599613; + if ("599711".equals(codeString)) + return _599711; + if ("599900".equals(codeString)) + return _599900; + if ("599911".equals(codeString)) + return _599911; + if ("599912".equals(codeString)) + return _599912; + if ("599913".equals(codeString)) + return _599913; + if ("599914".equals(codeString)) + return _599914; + if ("599999".equals(codeString)) + return _599999; + if ("600000".equals(codeString)) + return _600000; + if ("610000".equals(codeString)) + return _610000; + if ("611000".equals(codeString)) + return _611000; + if ("611100".equals(codeString)) + return _611100; + if ("611111".equals(codeString)) + return _611111; + if ("611112".equals(codeString)) + return _611112; + if ("611211".equals(codeString)) + return _611211; + if ("611300".equals(codeString)) + return _611300; + if ("611311".equals(codeString)) + return _611311; + if ("611312".equals(codeString)) + return _611312; + if ("611313".equals(codeString)) + return _611313; + if ("611314".equals(codeString)) + return _611314; + if ("611399".equals(codeString)) + return _611399; + if ("612100".equals(codeString)) + return _612100; + if ("612111".equals(codeString)) + return _612111; + if ("612112".equals(codeString)) + return _612112; + if ("612113".equals(codeString)) + return _612113; + if ("612114".equals(codeString)) + return _612114; + if ("612115".equals(codeString)) + return _612115; + if ("621000".equals(codeString)) + return _621000; + if ("621111".equals(codeString)) + return _621111; + if ("621211".equals(codeString)) + return _621211; + if ("621300".equals(codeString)) + return _621300; + if ("621311".equals(codeString)) + return _621311; + if ("621312".equals(codeString)) + return _621312; + if ("621411".equals(codeString)) + return _621411; + if ("621511".equals(codeString)) + return _621511; + if ("621611".equals(codeString)) + return _621611; + if ("621700".equals(codeString)) + return _621700; + if ("621711".equals(codeString)) + return _621711; + if ("621712".equals(codeString)) + return _621712; + if ("621713".equals(codeString)) + return _621713; + if ("621900".equals(codeString)) + return _621900; + if ("621911".equals(codeString)) + return _621911; + if ("621912".equals(codeString)) + return _621912; + if ("621999".equals(codeString)) + return _621999; + if ("630000".equals(codeString)) + return _630000; + if ("631100".equals(codeString)) + return _631100; + if ("631111".equals(codeString)) + return _631111; + if ("631112".equals(codeString)) + return _631112; + if ("639000".equals(codeString)) + return _639000; + if ("639100".equals(codeString)) + return _639100; + if ("639111".equals(codeString)) + return _639111; + if ("639112".equals(codeString)) + return _639112; + if ("639200".equals(codeString)) + return _639200; + if ("639211".equals(codeString)) + return _639211; + if ("639212".equals(codeString)) + return _639212; + if ("639311".equals(codeString)) + return _639311; + if ("639400".equals(codeString)) + return _639400; + if ("639411".equals(codeString)) + return _639411; + if ("639412".equals(codeString)) + return _639412; + if ("639511".equals(codeString)) + return _639511; + if ("639911".equals(codeString)) + return _639911; + if ("700000".equals(codeString)) + return _700000; + if ("710000".equals(codeString)) + return _710000; + if ("711000".equals(codeString)) + return _711000; + if ("711100".equals(codeString)) + return _711100; + if ("711111".equals(codeString)) + return _711111; + if ("711112".equals(codeString)) + return _711112; + if ("711113".equals(codeString)) + return _711113; + if ("711114".equals(codeString)) + return _711114; + if ("711199".equals(codeString)) + return _711199; + if ("711211".equals(codeString)) + return _711211; + if ("711300".equals(codeString)) + return _711300; + if ("711311".equals(codeString)) + return _711311; + if ("711312".equals(codeString)) + return _711312; + if ("711411".equals(codeString)) + return _711411; + if ("711500".equals(codeString)) + return _711500; + if ("711511".equals(codeString)) + return _711511; + if ("711512".equals(codeString)) + return _711512; + if ("711513".equals(codeString)) + return _711513; + if ("711514".equals(codeString)) + return _711514; + if ("711515".equals(codeString)) + return _711515; + if ("711516".equals(codeString)) + return _711516; + if ("711599".equals(codeString)) + return _711599; + if ("711611".equals(codeString)) + return _711611; + if ("711700".equals(codeString)) + return _711700; + if ("711711".equals(codeString)) + return _711711; + if ("711712".equals(codeString)) + return _711712; + if ("711713".equals(codeString)) + return _711713; + if ("711714".equals(codeString)) + return _711714; + if ("711715".equals(codeString)) + return _711715; + if ("711716".equals(codeString)) + return _711716; + if ("711799".equals(codeString)) + return _711799; + if ("711900".equals(codeString)) + return _711900; + if ("711911".equals(codeString)) + return _711911; + if ("711912".equals(codeString)) + return _711912; + if ("711913".equals(codeString)) + return _711913; + if ("711914".equals(codeString)) + return _711914; + if ("711999".equals(codeString)) + return _711999; + if ("712000".equals(codeString)) + return _712000; + if ("712111".equals(codeString)) + return _712111; + if ("712200".equals(codeString)) + return _712200; + if ("712211".equals(codeString)) + return _712211; + if ("712212".equals(codeString)) + return _712212; + if ("712213".equals(codeString)) + return _712213; + if ("712311".equals(codeString)) + return _712311; + if ("712900".equals(codeString)) + return _712900; + if ("712911".equals(codeString)) + return _712911; + if ("712912".equals(codeString)) + return _712912; + if ("712913".equals(codeString)) + return _712913; + if ("712914".equals(codeString)) + return _712914; + if ("712915".equals(codeString)) + return _712915; + if ("712916".equals(codeString)) + return _712916; + if ("712917".equals(codeString)) + return _712917; + if ("712918".equals(codeString)) + return _712918; + if ("712921".equals(codeString)) + return _712921; + if ("712922".equals(codeString)) + return _712922; + if ("712999".equals(codeString)) + return _712999; + if ("721000".equals(codeString)) + return _721000; + if ("721100".equals(codeString)) + return _721100; + if ("721111".equals(codeString)) + return _721111; + if ("721112".equals(codeString)) + return _721112; + if ("721200".equals(codeString)) + return _721200; + if ("721211".equals(codeString)) + return _721211; + if ("721212".equals(codeString)) + return _721212; + if ("721213".equals(codeString)) + return _721213; + if ("721214".equals(codeString)) + return _721214; + if ("721215".equals(codeString)) + return _721215; + if ("721216".equals(codeString)) + return _721216; + if ("721311".equals(codeString)) + return _721311; + if ("721900".equals(codeString)) + return _721900; + if ("721911".equals(codeString)) + return _721911; + if ("721912".equals(codeString)) + return _721912; + if ("721913".equals(codeString)) + return _721913; + if ("721914".equals(codeString)) + return _721914; + if ("721915".equals(codeString)) + return _721915; + if ("721916".equals(codeString)) + return _721916; + if ("721999".equals(codeString)) + return _721999; + if ("730000".equals(codeString)) + return _730000; + if ("731000".equals(codeString)) + return _731000; + if ("731100".equals(codeString)) + return _731100; + if ("731111".equals(codeString)) + return _731111; + if ("731112".equals(codeString)) + return _731112; + if ("731199".equals(codeString)) + return _731199; + if ("731200".equals(codeString)) + return _731200; + if ("731211".equals(codeString)) + return _731211; + if ("731212".equals(codeString)) + return _731212; + if ("731213".equals(codeString)) + return _731213; + if ("731300".equals(codeString)) + return _731300; + if ("731311".equals(codeString)) + return _731311; + if ("731312".equals(codeString)) + return _731312; + if ("732111".equals(codeString)) + return _732111; + if ("733100".equals(codeString)) + return _733100; + if ("733111".equals(codeString)) + return _733111; + if ("733112".equals(codeString)) + return _733112; + if ("733113".equals(codeString)) + return _733113; + if ("733114".equals(codeString)) + return _733114; + if ("733115".equals(codeString)) + return _733115; + if ("741111".equals(codeString)) + return _741111; + if ("800000".equals(codeString)) + return _800000; + if ("811000".equals(codeString)) + return _811000; + if ("811111".equals(codeString)) + return _811111; + if ("811211".equals(codeString)) + return _811211; + if ("811311".equals(codeString)) + return _811311; + if ("811400".equals(codeString)) + return _811400; + if ("811411".equals(codeString)) + return _811411; + if ("811412".equals(codeString)) + return _811412; + if ("811500".equals(codeString)) + return _811500; + if ("811511".equals(codeString)) + return _811511; + if ("811512".equals(codeString)) + return _811512; + if ("811513".equals(codeString)) + return _811513; + if ("811600".equals(codeString)) + return _811600; + if ("811611".equals(codeString)) + return _811611; + if ("811612".equals(codeString)) + return _811612; + if ("811699".equals(codeString)) + return _811699; + if ("821000".equals(codeString)) + return _821000; + if ("821100".equals(codeString)) + return _821100; + if ("821111".equals(codeString)) + return _821111; + if ("821112".equals(codeString)) + return _821112; + if ("821113".equals(codeString)) + return _821113; + if ("821114".equals(codeString)) + return _821114; + if ("821211".equals(codeString)) + return _821211; + if ("821311".equals(codeString)) + return _821311; + if ("821400".equals(codeString)) + return _821400; + if ("821411".equals(codeString)) + return _821411; + if ("821412".equals(codeString)) + return _821412; + if ("821511".equals(codeString)) + return _821511; + if ("821611".equals(codeString)) + return _821611; + if ("821700".equals(codeString)) + return _821700; + if ("821711".equals(codeString)) + return _821711; + if ("821712".equals(codeString)) + return _821712; + if ("821713".equals(codeString)) + return _821713; + if ("821714".equals(codeString)) + return _821714; + if ("821900".equals(codeString)) + return _821900; + if ("821911".equals(codeString)) + return _821911; + if ("821912".equals(codeString)) + return _821912; + if ("821913".equals(codeString)) + return _821913; + if ("821914".equals(codeString)) + return _821914; + if ("821915".equals(codeString)) + return _821915; + if ("830000".equals(codeString)) + return _830000; + if ("831000".equals(codeString)) + return _831000; + if ("831100".equals(codeString)) + return _831100; + if ("831111".equals(codeString)) + return _831111; + if ("831112".equals(codeString)) + return _831112; + if ("831113".equals(codeString)) + return _831113; + if ("831114".equals(codeString)) + return _831114; + if ("831115".equals(codeString)) + return _831115; + if ("831116".equals(codeString)) + return _831116; + if ("831117".equals(codeString)) + return _831117; + if ("831118".equals(codeString)) + return _831118; + if ("831199".equals(codeString)) + return _831199; + if ("831200".equals(codeString)) + return _831200; + if ("831211".equals(codeString)) + return _831211; + if ("831212".equals(codeString)) + return _831212; + if ("831300".equals(codeString)) + return _831300; + if ("831311".equals(codeString)) + return _831311; + if ("831312".equals(codeString)) + return _831312; + if ("831313".equals(codeString)) + return _831313; + if ("832000".equals(codeString)) + return _832000; + if ("832100".equals(codeString)) + return _832100; + if ("832111".equals(codeString)) + return _832111; + if ("832112".equals(codeString)) + return _832112; + if ("832113".equals(codeString)) + return _832113; + if ("832114".equals(codeString)) + return _832114; + if ("832115".equals(codeString)) + return _832115; + if ("832199".equals(codeString)) + return _832199; + if ("832211".equals(codeString)) + return _832211; + if ("839000".equals(codeString)) + return _839000; + if ("839111".equals(codeString)) + return _839111; + if ("839200".equals(codeString)) + return _839200; + if ("839211".equals(codeString)) + return _839211; + if ("839212".equals(codeString)) + return _839212; + if ("839300".equals(codeString)) + return _839300; + if ("839311".equals(codeString)) + return _839311; + if ("839312".equals(codeString)) + return _839312; + if ("839313".equals(codeString)) + return _839313; + if ("839400".equals(codeString)) + return _839400; + if ("839411".equals(codeString)) + return _839411; + if ("839412".equals(codeString)) + return _839412; + if ("839413".equals(codeString)) + return _839413; + if ("839900".equals(codeString)) + return _839900; + if ("839911".equals(codeString)) + return _839911; + if ("839912".equals(codeString)) + return _839912; + if ("839913".equals(codeString)) + return _839913; + if ("839914".equals(codeString)) + return _839914; + if ("839915".equals(codeString)) + return _839915; + if ("839916".equals(codeString)) + return _839916; + if ("839917".equals(codeString)) + return _839917; + if ("839999".equals(codeString)) + return _839999; + if ("841000".equals(codeString)) + return _841000; + if ("841111".equals(codeString)) + return _841111; + if ("841200".equals(codeString)) + return _841200; + if ("841211".equals(codeString)) + return _841211; + if ("841212".equals(codeString)) + return _841212; + if ("841213".equals(codeString)) + return _841213; + if ("841214".equals(codeString)) + return _841214; + if ("841215".equals(codeString)) + return _841215; + if ("841216".equals(codeString)) + return _841216; + if ("841299".equals(codeString)) + return _841299; + if ("841300".equals(codeString)) + return _841300; + if ("841311".equals(codeString)) + return _841311; + if ("841312".equals(codeString)) + return _841312; + if ("841313".equals(codeString)) + return _841313; + if ("841400".equals(codeString)) + return _841400; + if ("841411".equals(codeString)) + return _841411; + if ("841412".equals(codeString)) + return _841412; + if ("841500".equals(codeString)) + return _841500; + if ("841511".equals(codeString)) + return _841511; + if ("841512".equals(codeString)) + return _841512; + if ("841513".equals(codeString)) + return _841513; + if ("841514".equals(codeString)) + return _841514; + if ("841515".equals(codeString)) + return _841515; + if ("841516".equals(codeString)) + return _841516; + if ("841517".equals(codeString)) + return _841517; + if ("841599".equals(codeString)) + return _841599; + if ("841611".equals(codeString)) + return _841611; + if ("841900".equals(codeString)) + return _841900; + if ("841911".equals(codeString)) + return _841911; + if ("841912".equals(codeString)) + return _841912; + if ("841999".equals(codeString)) + return _841999; + if ("851000".equals(codeString)) + return _851000; + if ("851111".equals(codeString)) + return _851111; + if ("851200".equals(codeString)) + return _851200; + if ("851211".equals(codeString)) + return _851211; + if ("851299".equals(codeString)) + return _851299; + if ("851311".equals(codeString)) + return _851311; + if ("890000".equals(codeString)) + return _890000; + if ("891000".equals(codeString)) + return _891000; + if ("891100".equals(codeString)) + return _891100; + if ("891111".equals(codeString)) + return _891111; + if ("891112".equals(codeString)) + return _891112; + if ("891113".equals(codeString)) + return _891113; + if ("891211".equals(codeString)) + return _891211; + if ("899000".equals(codeString)) + return _899000; + if ("899111".equals(codeString)) + return _899111; + if ("899200".equals(codeString)) + return _899200; + if ("899211".equals(codeString)) + return _899211; + if ("899212".equals(codeString)) + return _899212; + if ("899311".equals(codeString)) + return _899311; + if ("899400".equals(codeString)) + return _899400; + if ("899411".equals(codeString)) + return _899411; + if ("899412".equals(codeString)) + return _899412; + if ("899413".equals(codeString)) + return _899413; + if ("899414".equals(codeString)) + return _899414; + if ("899415".equals(codeString)) + return _899415; + if ("899500".equals(codeString)) + return _899500; + if ("899511".equals(codeString)) + return _899511; + if ("899512".equals(codeString)) + return _899512; + if ("899611".equals(codeString)) + return _899611; + if ("899711".equals(codeString)) + return _899711; + if ("899900".equals(codeString)) + return _899900; + if ("899911".equals(codeString)) + return _899911; + if ("899912".equals(codeString)) + return _899912; + if ("899913".equals(codeString)) + return _899913; + if ("899914".equals(codeString)) + return _899914; + if ("899915".equals(codeString)) + return _899915; + if ("899916".equals(codeString)) + return _899916; + if ("899917".equals(codeString)) + return _899917; + if ("899918".equals(codeString)) + return _899918; + if ("899921".equals(codeString)) + return _899921; + if ("899922".equals(codeString)) + return _899922; + if ("899999".equals(codeString)) + return _899999; + throw new FHIRException("Unknown AnzscoOccupations code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _100000: return "100000"; + case _111000: return "111000"; + case _111111: return "111111"; + case _111200: return "111200"; + case _111211: return "111211"; + case _111212: return "111212"; + case _111300: return "111300"; + case _111311: return "111311"; + case _111312: return "111312"; + case _111399: return "111399"; + case _121000: return "121000"; + case _121111: return "121111"; + case _121200: return "121200"; + case _121211: return "121211"; + case _121212: return "121212"; + case _121213: return "121213"; + case _121214: return "121214"; + case _121215: return "121215"; + case _121216: return "121216"; + case _121217: return "121217"; + case _121218: return "121218"; + case _121221: return "121221"; + case _121299: return "121299"; + case _121300: return "121300"; + case _121311: return "121311"; + case _121312: return "121312"; + case _121313: return "121313"; + case _121314: return "121314"; + case _121315: return "121315"; + case _121316: return "121316"; + case _121317: return "121317"; + case _121318: return "121318"; + case _121321: return "121321"; + case _121322: return "121322"; + case _121399: return "121399"; + case _121411: return "121411"; + case _130000: return "130000"; + case _131100: return "131100"; + case _131111: return "131111"; + case _131112: return "131112"; + case _132000: return "132000"; + case _132111: return "132111"; + case _132211: return "132211"; + case _132311: return "132311"; + case _132411: return "132411"; + case _132511: return "132511"; + case _133000: return "133000"; + case _133100: return "133100"; + case _133111: return "133111"; + case _133112: return "133112"; + case _133211: return "133211"; + case _133300: return "133300"; + case _133311: return "133311"; + case _133312: return "133312"; + case _133411: return "133411"; + case _133500: return "133500"; + case _133511: return "133511"; + case _133512: return "133512"; + case _133513: return "133513"; + case _133611: return "133611"; + case _134000: return "134000"; + case _134111: return "134111"; + case _134200: return "134200"; + case _134211: return "134211"; + case _134212: return "134212"; + case _134213: return "134213"; + case _134214: return "134214"; + case _134299: return "134299"; + case _134311: return "134311"; + case _134400: return "134400"; + case _134411: return "134411"; + case _134412: return "134412"; + case _134499: return "134499"; + case _135100: return "135100"; + case _135111: return "135111"; + case _135112: return "135112"; + case _135199: return "135199"; + case _139000: return "139000"; + case _139100: return "139100"; + case _139111: return "139111"; + case _139112: return "139112"; + case _139113: return "139113"; + case _139211: return "139211"; + case _139900: return "139900"; + case _139911: return "139911"; + case _139912: return "139912"; + case _139913: return "139913"; + case _139914: return "139914"; + case _139915: return "139915"; + case _139999: return "139999"; + case _140000: return "140000"; + case _141000: return "141000"; + case _141111: return "141111"; + case _141211: return "141211"; + case _141311: return "141311"; + case _141411: return "141411"; + case _141900: return "141900"; + case _141911: return "141911"; + case _141999: return "141999"; + case _142100: return "142100"; + case _142111: return "142111"; + case _142112: return "142112"; + case _142113: return "142113"; + case _142114: return "142114"; + case _142115: return "142115"; + case _142116: return "142116"; + case _149000: return "149000"; + case _149100: return "149100"; + case _149111: return "149111"; + case _149112: return "149112"; + case _149113: return "149113"; + case _149200: return "149200"; + case _149211: return "149211"; + case _149212: return "149212"; + case _149311: return "149311"; + case _149400: return "149400"; + case _149411: return "149411"; + case _149412: return "149412"; + case _149413: return "149413"; + case _149900: return "149900"; + case _149911: return "149911"; + case _149912: return "149912"; + case _149913: return "149913"; + case _149914: return "149914"; + case _149999: return "149999"; + case _200000: return "200000"; + case _210000: return "210000"; + case _211000: return "211000"; + case _211100: return "211100"; + case _211111: return "211111"; + case _211112: return "211112"; + case _211113: return "211113"; + case _211199: return "211199"; + case _211200: return "211200"; + case _211211: return "211211"; + case _211212: return "211212"; + case _211213: return "211213"; + case _211214: return "211214"; + case _211299: return "211299"; + case _211311: return "211311"; + case _211400: return "211400"; + case _211411: return "211411"; + case _211412: return "211412"; + case _211413: return "211413"; + case _211499: return "211499"; + case _212000: return "212000"; + case _212100: return "212100"; + case _212111: return "212111"; + case _212112: return "212112"; + case _212113: return "212113"; + case _212114: return "212114"; + case _212200: return "212200"; + case _212211: return "212211"; + case _212212: return "212212"; + case _212300: return "212300"; + case _212311: return "212311"; + case _212312: return "212312"; + case _212313: return "212313"; + case _212314: return "212314"; + case _212315: return "212315"; + case _212316: return "212316"; + case _212317: return "212317"; + case _212318: return "212318"; + case _212399: return "212399"; + case _212400: return "212400"; + case _212411: return "212411"; + case _212412: return "212412"; + case _212413: return "212413"; + case _212414: return "212414"; + case _212415: return "212415"; + case _212416: return "212416"; + case _212499: return "212499"; + case _220000: return "220000"; + case _221000: return "221000"; + case _221100: return "221100"; + case _221111: return "221111"; + case _221112: return "221112"; + case _221113: return "221113"; + case _221200: return "221200"; + case _221211: return "221211"; + case _221212: return "221212"; + case _221213: return "221213"; + case _221214: return "221214"; + case _222000: return "222000"; + case _222100: return "222100"; + case _222111: return "222111"; + case _222112: return "222112"; + case _222113: return "222113"; + case _222199: return "222199"; + case _222200: return "222200"; + case _222211: return "222211"; + case _222212: return "222212"; + case _222213: return "222213"; + case _222299: return "222299"; + case _222300: return "222300"; + case _222311: return "222311"; + case _222312: return "222312"; + case _223000: return "223000"; + case _223100: return "223100"; + case _223111: return "223111"; + case _223112: return "223112"; + case _223113: return "223113"; + case _223211: return "223211"; + case _223311: return "223311"; + case _224000: return "224000"; + case _224100: return "224100"; + case _224111: return "224111"; + case _224112: return "224112"; + case _224113: return "224113"; + case _224200: return "224200"; + case _224211: return "224211"; + case _224212: return "224212"; + case _224213: return "224213"; + case _224214: return "224214"; + case _224311: return "224311"; + case _224400: return "224400"; + case _224411: return "224411"; + case _224412: return "224412"; + case _224500: return "224500"; + case _224511: return "224511"; + case _224512: return "224512"; + case _224611: return "224611"; + case _224700: return "224700"; + case _224711: return "224711"; + case _224712: return "224712"; + case _224900: return "224900"; + case _224911: return "224911"; + case _224912: return "224912"; + case _224913: return "224913"; + case _224914: return "224914"; + case _224999: return "224999"; + case _225000: return "225000"; + case _225100: return "225100"; + case _225111: return "225111"; + case _225112: return "225112"; + case _225113: return "225113"; + case _225200: return "225200"; + case _225211: return "225211"; + case _225212: return "225212"; + case _225213: return "225213"; + case _225311: return "225311"; + case _225400: return "225400"; + case _225411: return "225411"; + case _225412: return "225412"; + case _225499: return "225499"; + case _230000: return "230000"; + case _231000: return "231000"; + case _231100: return "231100"; + case _231111: return "231111"; + case _231112: return "231112"; + case _231113: return "231113"; + case _231114: return "231114"; + case _231199: return "231199"; + case _231200: return "231200"; + case _231211: return "231211"; + case _231212: return "231212"; + case _231213: return "231213"; + case _231214: return "231214"; + case _231215: return "231215"; + case _231299: return "231299"; + case _232000: return "232000"; + case _232100: return "232100"; + case _232111: return "232111"; + case _232112: return "232112"; + case _232200: return "232200"; + case _232211: return "232211"; + case _232212: return "232212"; + case _232300: return "232300"; + case _232311: return "232311"; + case _232312: return "232312"; + case _232313: return "232313"; + case _232400: return "232400"; + case _232411: return "232411"; + case _232412: return "232412"; + case _232413: return "232413"; + case _232414: return "232414"; + case _232511: return "232511"; + case _232611: return "232611"; + case _233000: return "233000"; + case _233100: return "233100"; + case _233111: return "233111"; + case _233112: return "233112"; + case _233200: return "233200"; + case _233211: return "233211"; + case _233212: return "233212"; + case _233213: return "233213"; + case _233214: return "233214"; + case _233215: return "233215"; + case _233311: return "233311"; + case _233411: return "233411"; + case _233500: return "233500"; + case _233511: return "233511"; + case _233512: return "233512"; + case _233513: return "233513"; + case _233600: return "233600"; + case _233611: return "233611"; + case _233612: return "233612"; + case _233900: return "233900"; + case _233911: return "233911"; + case _233912: return "233912"; + case _233913: return "233913"; + case _233914: return "233914"; + case _233915: return "233915"; + case _233916: return "233916"; + case _233999: return "233999"; + case _234000: return "234000"; + case _234100: return "234100"; + case _234111: return "234111"; + case _234112: return "234112"; + case _234113: return "234113"; + case _234200: return "234200"; + case _234211: return "234211"; + case _234212: return "234212"; + case _234213: return "234213"; + case _234300: return "234300"; + case _234311: return "234311"; + case _234312: return "234312"; + case _234313: return "234313"; + case _234314: return "234314"; + case _234399: return "234399"; + case _234400: return "234400"; + case _234411: return "234411"; + case _234412: return "234412"; + case _234500: return "234500"; + case _234511: return "234511"; + case _234512: return "234512"; + case _234513: return "234513"; + case _234514: return "234514"; + case _234515: return "234515"; + case _234516: return "234516"; + case _234517: return "234517"; + case _234518: return "234518"; + case _234599: return "234599"; + case _234611: return "234611"; + case _234711: return "234711"; + case _234900: return "234900"; + case _234911: return "234911"; + case _234912: return "234912"; + case _234913: return "234913"; + case _234914: return "234914"; + case _234999: return "234999"; + case _240000: return "240000"; + case _241000: return "241000"; + case _241111: return "241111"; + case _241213: return "241213"; + case _241311: return "241311"; + case _241411: return "241411"; + case _241500: return "241500"; + case _241511: return "241511"; + case _241512: return "241512"; + case _241513: return "241513"; + case _241599: return "241599"; + case _242000: return "242000"; + case _242100: return "242100"; + case _242111: return "242111"; + case _242112: return "242112"; + case _242211: return "242211"; + case _249000: return "249000"; + case _249100: return "249100"; + case _249111: return "249111"; + case _249112: return "249112"; + case _249200: return "249200"; + case _249211: return "249211"; + case _249212: return "249212"; + case _249213: return "249213"; + case _249214: return "249214"; + case _249299: return "249299"; + case _249311: return "249311"; + case _250000: return "250000"; + case _251000: return "251000"; + case _251111: return "251111"; + case _251200: return "251200"; + case _251211: return "251211"; + case _251212: return "251212"; + case _251213: return "251213"; + case _251214: return "251214"; + case _251300: return "251300"; + case _251311: return "251311"; + case _251312: return "251312"; + case _251400: return "251400"; + case _251411: return "251411"; + case _251412: return "251412"; + case _251500: return "251500"; + case _251511: return "251511"; + case _251512: return "251512"; + case _251513: return "251513"; + case _251900: return "251900"; + case _251911: return "251911"; + case _251912: return "251912"; + case _251999: return "251999"; + case _252000: return "252000"; + case _252100: return "252100"; + case _252111: return "252111"; + case _252112: return "252112"; + case _252200: return "252200"; + case _252211: return "252211"; + case _252212: return "252212"; + case _252213: return "252213"; + case _252214: return "252214"; + case _252299: return "252299"; + case _252300: return "252300"; + case _252311: return "252311"; + case _252312: return "252312"; + case _252411: return "252411"; + case _252511: return "252511"; + case _252611: return "252611"; + case _252700: return "252700"; + case _252711: return "252711"; + case _252712: return "252712"; + case _253000: return "253000"; + case _253100: return "253100"; + case _253111: return "253111"; + case _253112: return "253112"; + case _253211: return "253211"; + case _253300: return "253300"; + case _253311: return "253311"; + case _253312: return "253312"; + case _253313: return "253313"; + case _253314: return "253314"; + case _253315: return "253315"; + case _253316: return "253316"; + case _253317: return "253317"; + case _253318: return "253318"; + case _253321: return "253321"; + case _253322: return "253322"; + case _253323: return "253323"; + case _253324: return "253324"; + case _253399: return "253399"; + case _253411: return "253411"; + case _253500: return "253500"; + case _253511: return "253511"; + case _253512: return "253512"; + case _253513: return "253513"; + case _253514: return "253514"; + case _253515: return "253515"; + case _253516: return "253516"; + case _253517: return "253517"; + case _253518: return "253518"; + case _253521: return "253521"; + case _253900: return "253900"; + case _253911: return "253911"; + case _253912: return "253912"; + case _253913: return "253913"; + case _253914: return "253914"; + case _253915: return "253915"; + case _253916: return "253916"; + case _253999: return "253999"; + case _254000: return "254000"; + case _254111: return "254111"; + case _254200: return "254200"; + case _254211: return "254211"; + case _254212: return "254212"; + case _254311: return "254311"; + case _254400: return "254400"; + case _254411: return "254411"; + case _254412: return "254412"; + case _254413: return "254413"; + case _254414: return "254414"; + case _254415: return "254415"; + case _254416: return "254416"; + case _254417: return "254417"; + case _254418: return "254418"; + case _254421: return "254421"; + case _254422: return "254422"; + case _254423: return "254423"; + case _254424: return "254424"; + case _254499: return "254499"; + case _260000: return "260000"; + case _261000: return "261000"; + case _261100: return "261100"; + case _261111: return "261111"; + case _261112: return "261112"; + case _261200: return "261200"; + case _261211: return "261211"; + case _261212: return "261212"; + case _261300: return "261300"; + case _261311: return "261311"; + case _261312: return "261312"; + case _261313: return "261313"; + case _261399: return "261399"; + case _262100: return "262100"; + case _262111: return "262111"; + case _262112: return "262112"; + case _262113: return "262113"; + case _263000: return "263000"; + case _263100: return "263100"; + case _263111: return "263111"; + case _263112: return "263112"; + case _263113: return "263113"; + case _263200: return "263200"; + case _263211: return "263211"; + case _263212: return "263212"; + case _263213: return "263213"; + case _263299: return "263299"; + case _263300: return "263300"; + case _263311: return "263311"; + case _263312: return "263312"; + case _270000: return "270000"; + case _271000: return "271000"; + case _271111: return "271111"; + case _271200: return "271200"; + case _271211: return "271211"; + case _271212: return "271212"; + case _271213: return "271213"; + case _271299: return "271299"; + case _271311: return "271311"; + case _272000: return "272000"; + case _272100: return "272100"; + case _272111: return "272111"; + case _272112: return "272112"; + case _272113: return "272113"; + case _272114: return "272114"; + case _272115: return "272115"; + case _272199: return "272199"; + case _272211: return "272211"; + case _272300: return "272300"; + case _272311: return "272311"; + case _272312: return "272312"; + case _272313: return "272313"; + case _272314: return "272314"; + case _272399: return "272399"; + case _272400: return "272400"; + case _272411: return "272411"; + case _272412: return "272412"; + case _272413: return "272413"; + case _272499: return "272499"; + case _272511: return "272511"; + case _272600: return "272600"; + case _272611: return "272611"; + case _272612: return "272612"; + case _272613: return "272613"; + case _300000: return "300000"; + case _310000: return "310000"; + case _311000: return "311000"; + case _311111: return "311111"; + case _311200: return "311200"; + case _311211: return "311211"; + case _311212: return "311212"; + case _311213: return "311213"; + case _311214: return "311214"; + case _311215: return "311215"; + case _311299: return "311299"; + case _311300: return "311300"; + case _311311: return "311311"; + case _311312: return "311312"; + case _311313: return "311313"; + case _311399: return "311399"; + case _311400: return "311400"; + case _311411: return "311411"; + case _311412: return "311412"; + case _311413: return "311413"; + case _311414: return "311414"; + case _311499: return "311499"; + case _312000: return "312000"; + case _312100: return "312100"; + case _312111: return "312111"; + case _312112: return "312112"; + case _312113: return "312113"; + case _312114: return "312114"; + case _312115: return "312115"; + case _312116: return "312116"; + case _312200: return "312200"; + case _312211: return "312211"; + case _312212: return "312212"; + case _312300: return "312300"; + case _312311: return "312311"; + case _312312: return "312312"; + case _312400: return "312400"; + case _312411: return "312411"; + case _312412: return "312412"; + case _312500: return "312500"; + case _312511: return "312511"; + case _312512: return "312512"; + case _312611: return "312611"; + case _312900: return "312900"; + case _312911: return "312911"; + case _312912: return "312912"; + case _312913: return "312913"; + case _312999: return "312999"; + case _313000: return "313000"; + case _313100: return "313100"; + case _313111: return "313111"; + case _313112: return "313112"; + case _313113: return "313113"; + case _313199: return "313199"; + case _313200: return "313200"; + case _313211: return "313211"; + case _313212: return "313212"; + case _313213: return "313213"; + case _313214: return "313214"; + case _320000: return "320000"; + case _321000: return "321000"; + case _321111: return "321111"; + case _321200: return "321200"; + case _321211: return "321211"; + case _321212: return "321212"; + case _321213: return "321213"; + case _321214: return "321214"; + case _322000: return "322000"; + case _322100: return "322100"; + case _322111: return "322111"; + case _322112: return "322112"; + case _322113: return "322113"; + case _322114: return "322114"; + case _322115: return "322115"; + case _322211: return "322211"; + case _322300: return "322300"; + case _322311: return "322311"; + case _322312: return "322312"; + case _322313: return "322313"; + case _323000: return "323000"; + case _323100: return "323100"; + case _323111: return "323111"; + case _323112: return "323112"; + case _323113: return "323113"; + case _323200: return "323200"; + case _323211: return "323211"; + case _323212: return "323212"; + case _323213: return "323213"; + case _323214: return "323214"; + case _323215: return "323215"; + case _323299: return "323299"; + case _323300: return "323300"; + case _323311: return "323311"; + case _323312: return "323312"; + case _323313: return "323313"; + case _323314: return "323314"; + case _323315: return "323315"; + case _323316: return "323316"; + case _323400: return "323400"; + case _323411: return "323411"; + case _323412: return "323412"; + case _324000: return "324000"; + case _324111: return "324111"; + case _324200: return "324200"; + case _324211: return "324211"; + case _324212: return "324212"; + case _324311: return "324311"; + case _330000: return "330000"; + case _331000: return "331000"; + case _331100: return "331100"; + case _331111: return "331111"; + case _331112: return "331112"; + case _331211: return "331211"; + case _331212: return "331212"; + case _331213: return "331213"; + case _332000: return "332000"; + case _332111: return "332111"; + case _332211: return "332211"; + case _333000: return "333000"; + case _333111: return "333111"; + case _333200: return "333200"; + case _333211: return "333211"; + case _333212: return "333212"; + case _333311: return "333311"; + case _333411: return "333411"; + case _334100: return "334100"; + case _334111: return "334111"; + case _334112: return "334112"; + case _334113: return "334113"; + case _334114: return "334114"; + case _334115: return "334115"; + case _340000: return "340000"; + case _341100: return "341100"; + case _341111: return "341111"; + case _341112: return "341112"; + case _341113: return "341113"; + case _342000: return "342000"; + case _342111: return "342111"; + case _342200: return "342200"; + case _342211: return "342211"; + case _342212: return "342212"; + case _342300: return "342300"; + case _342311: return "342311"; + case _342312: return "342312"; + case _342313: return "342313"; + case _342314: return "342314"; + case _342315: return "342315"; + case _342400: return "342400"; + case _342411: return "342411"; + case _342412: return "342412"; + case _342413: return "342413"; + case _342414: return "342414"; + case _351000: return "351000"; + case _351100: return "351100"; + case _351111: return "351111"; + case _351112: return "351112"; + case _351211: return "351211"; + case _351311: return "351311"; + case _351411: return "351411"; + case _360000: return "360000"; + case _361000: return "361000"; + case _361100: return "361100"; + case _361111: return "361111"; + case _361112: return "361112"; + case _361113: return "361113"; + case _361114: return "361114"; + case _361199: return "361199"; + case _361211: return "361211"; + case _361311: return "361311"; + case _362000: return "362000"; + case _362111: return "362111"; + case _362200: return "362200"; + case _362211: return "362211"; + case _362212: return "362212"; + case _362213: return "362213"; + case _362311: return "362311"; + case _362411: return "362411"; + case _390000: return "390000"; + case _391111: return "391111"; + case _392000: return "392000"; + case _392100: return "392100"; + case _392111: return "392111"; + case _392112: return "392112"; + case _392211: return "392211"; + case _392300: return "392300"; + case _392311: return "392311"; + case _392312: return "392312"; + case _393000: return "393000"; + case _393100: return "393100"; + case _393111: return "393111"; + case _393112: return "393112"; + case _393113: return "393113"; + case _393114: return "393114"; + case _393200: return "393200"; + case _393211: return "393211"; + case _393212: return "393212"; + case _393213: return "393213"; + case _393299: return "393299"; + case _393311: return "393311"; + case _394000: return "394000"; + case _394111: return "394111"; + case _394200: return "394200"; + case _394211: return "394211"; + case _394212: return "394212"; + case _394213: return "394213"; + case _394214: return "394214"; + case _394299: return "394299"; + case _399000: return "399000"; + case _399100: return "399100"; + case _399111: return "399111"; + case _399112: return "399112"; + case _399200: return "399200"; + case _399211: return "399211"; + case _399212: return "399212"; + case _399213: return "399213"; + case _399300: return "399300"; + case _399311: return "399311"; + case _399312: return "399312"; + case _399411: return "399411"; + case _399500: return "399500"; + case _399511: return "399511"; + case _399512: return "399512"; + case _399513: return "399513"; + case _399514: return "399514"; + case _399515: return "399515"; + case _399516: return "399516"; + case _399517: return "399517"; + case _399599: return "399599"; + case _399611: return "399611"; + case _399900: return "399900"; + case _399911: return "399911"; + case _399912: return "399912"; + case _399913: return "399913"; + case _399914: return "399914"; + case _399915: return "399915"; + case _399916: return "399916"; + case _399917: return "399917"; + case _399999: return "399999"; + case _400000: return "400000"; + case _411000: return "411000"; + case _411100: return "411100"; + case _411111: return "411111"; + case _411112: return "411112"; + case _411200: return "411200"; + case _411211: return "411211"; + case _411212: return "411212"; + case _411213: return "411213"; + case _411214: return "411214"; + case _411311: return "411311"; + case _411400: return "411400"; + case _411411: return "411411"; + case _411412: return "411412"; + case _411511: return "411511"; + case _411611: return "411611"; + case _411700: return "411700"; + case _411711: return "411711"; + case _411712: return "411712"; + case _411713: return "411713"; + case _411714: return "411714"; + case _411715: return "411715"; + case _411716: return "411716"; + case _420000: return "420000"; + case _421100: return "421100"; + case _421111: return "421111"; + case _421112: return "421112"; + case _421113: return "421113"; + case _421114: return "421114"; + case _422100: return "422100"; + case _422111: return "422111"; + case _422112: return "422112"; + case _422115: return "422115"; + case _422116: return "422116"; + case _423000: return "423000"; + case _423111: return "423111"; + case _423211: return "423211"; + case _423300: return "423300"; + case _423311: return "423311"; + case _423312: return "423312"; + case _423313: return "423313"; + case _423314: return "423314"; + case _423400: return "423400"; + case _423411: return "423411"; + case _423412: return "423412"; + case _423413: return "423413"; + case _431000: return "431000"; + case _431100: return "431100"; + case _431111: return "431111"; + case _431112: return "431112"; + case _431211: return "431211"; + case _431311: return "431311"; + case _431411: return "431411"; + case _431511: return "431511"; + case _431900: return "431900"; + case _431911: return "431911"; + case _431912: return "431912"; + case _431999: return "431999"; + case _440000: return "440000"; + case _441000: return "441000"; + case _441111: return "441111"; + case _441200: return "441200"; + case _441211: return "441211"; + case _441212: return "441212"; + case _441300: return "441300"; + case _441311: return "441311"; + case _441312: return "441312"; + case _442000: return "442000"; + case _442111: return "442111"; + case _442200: return "442200"; + case _442211: return "442211"; + case _442212: return "442212"; + case _442213: return "442213"; + case _442214: return "442214"; + case _442215: return "442215"; + case _442216: return "442216"; + case _442217: return "442217"; + case _442299: return "442299"; + case _450000: return "450000"; + case _451000: return "451000"; + case _451111: return "451111"; + case _451211: return "451211"; + case _451300: return "451300"; + case _451311: return "451311"; + case _451399: return "451399"; + case _451400: return "451400"; + case _451411: return "451411"; + case _451412: return "451412"; + case _451500: return "451500"; + case _451511: return "451511"; + case _451512: return "451512"; + case _451600: return "451600"; + case _451611: return "451611"; + case _451612: return "451612"; + case _451700: return "451700"; + case _451711: return "451711"; + case _451799: return "451799"; + case _451800: return "451800"; + case _451811: return "451811"; + case _451812: return "451812"; + case _451813: return "451813"; + case _451899: return "451899"; + case _452000: return "452000"; + case _452111: return "452111"; + case _452200: return "452200"; + case _452211: return "452211"; + case _452212: return "452212"; + case _452213: return "452213"; + case _452214: return "452214"; + case _452215: return "452215"; + case _452216: return "452216"; + case _452217: return "452217"; + case _452299: return "452299"; + case _452300: return "452300"; + case _452311: return "452311"; + case _452312: return "452312"; + case _452313: return "452313"; + case _452314: return "452314"; + case _452315: return "452315"; + case _452316: return "452316"; + case _452317: return "452317"; + case _452318: return "452318"; + case _452321: return "452321"; + case _452322: return "452322"; + case _452323: return "452323"; + case _452400: return "452400"; + case _452411: return "452411"; + case _452412: return "452412"; + case _452413: return "452413"; + case _452414: return "452414"; + case _452499: return "452499"; + case _500000: return "500000"; + case _510000: return "510000"; + case _511100: return "511100"; + case _511111: return "511111"; + case _511112: return "511112"; + case _512000: return "512000"; + case _512111: return "512111"; + case _512200: return "512200"; + case _512211: return "512211"; + case _512299: return "512299"; + case _521000: return "521000"; + case _521111: return "521111"; + case _521200: return "521200"; + case _521211: return "521211"; + case _521212: return "521212"; + case _530000: return "530000"; + case _531111: return "531111"; + case _532100: return "532100"; + case _532111: return "532111"; + case _532112: return "532112"; + case _532113: return "532113"; + case _540000: return "540000"; + case _541000: return "541000"; + case _541100: return "541100"; + case _541111: return "541111"; + case _541112: return "541112"; + case _541211: return "541211"; + case _542100: return "542100"; + case _542111: return "542111"; + case _542112: return "542112"; + case _542113: return "542113"; + case _542114: return "542114"; + case _550000: return "550000"; + case _551000: return "551000"; + case _551100: return "551100"; + case _551111: return "551111"; + case _551112: return "551112"; + case _551211: return "551211"; + case _551311: return "551311"; + case _552000: return "552000"; + case _552111: return "552111"; + case _552211: return "552211"; + case _552300: return "552300"; + case _552311: return "552311"; + case _552312: return "552312"; + case _552313: return "552313"; + case _552314: return "552314"; + case _561000: return "561000"; + case _561100: return "561100"; + case _561111: return "561111"; + case _561112: return "561112"; + case _561113: return "561113"; + case _561199: return "561199"; + case _561200: return "561200"; + case _561211: return "561211"; + case _561212: return "561212"; + case _561311: return "561311"; + case _561400: return "561400"; + case _561411: return "561411"; + case _561412: return "561412"; + case _561511: return "561511"; + case _561611: return "561611"; + case _561900: return "561900"; + case _561911: return "561911"; + case _561912: return "561912"; + case _561913: return "561913"; + case _561999: return "561999"; + case _590000: return "590000"; + case _591000: return "591000"; + case _591100: return "591100"; + case _591111: return "591111"; + case _591112: return "591112"; + case _591113: return "591113"; + case _591114: return "591114"; + case _591115: return "591115"; + case _591116: return "591116"; + case _591200: return "591200"; + case _591211: return "591211"; + case _591212: return "591212"; + case _599000: return "599000"; + case _599100: return "599100"; + case _599111: return "599111"; + case _599112: return "599112"; + case _599200: return "599200"; + case _599211: return "599211"; + case _599212: return "599212"; + case _599213: return "599213"; + case _599214: return "599214"; + case _599215: return "599215"; + case _599311: return "599311"; + case _599411: return "599411"; + case _599500: return "599500"; + case _599511: return "599511"; + case _599512: return "599512"; + case _599513: return "599513"; + case _599514: return "599514"; + case _599515: return "599515"; + case _599516: return "599516"; + case _599517: return "599517"; + case _599518: return "599518"; + case _599521: return "599521"; + case _599599: return "599599"; + case _599600: return "599600"; + case _599611: return "599611"; + case _599612: return "599612"; + case _599613: return "599613"; + case _599711: return "599711"; + case _599900: return "599900"; + case _599911: return "599911"; + case _599912: return "599912"; + case _599913: return "599913"; + case _599914: return "599914"; + case _599999: return "599999"; + case _600000: return "600000"; + case _610000: return "610000"; + case _611000: return "611000"; + case _611100: return "611100"; + case _611111: return "611111"; + case _611112: return "611112"; + case _611211: return "611211"; + case _611300: return "611300"; + case _611311: return "611311"; + case _611312: return "611312"; + case _611313: return "611313"; + case _611314: return "611314"; + case _611399: return "611399"; + case _612100: return "612100"; + case _612111: return "612111"; + case _612112: return "612112"; + case _612113: return "612113"; + case _612114: return "612114"; + case _612115: return "612115"; + case _621000: return "621000"; + case _621111: return "621111"; + case _621211: return "621211"; + case _621300: return "621300"; + case _621311: return "621311"; + case _621312: return "621312"; + case _621411: return "621411"; + case _621511: return "621511"; + case _621611: return "621611"; + case _621700: return "621700"; + case _621711: return "621711"; + case _621712: return "621712"; + case _621713: return "621713"; + case _621900: return "621900"; + case _621911: return "621911"; + case _621912: return "621912"; + case _621999: return "621999"; + case _630000: return "630000"; + case _631100: return "631100"; + case _631111: return "631111"; + case _631112: return "631112"; + case _639000: return "639000"; + case _639100: return "639100"; + case _639111: return "639111"; + case _639112: return "639112"; + case _639200: return "639200"; + case _639211: return "639211"; + case _639212: return "639212"; + case _639311: return "639311"; + case _639400: return "639400"; + case _639411: return "639411"; + case _639412: return "639412"; + case _639511: return "639511"; + case _639911: return "639911"; + case _700000: return "700000"; + case _710000: return "710000"; + case _711000: return "711000"; + case _711100: return "711100"; + case _711111: return "711111"; + case _711112: return "711112"; + case _711113: return "711113"; + case _711114: return "711114"; + case _711199: return "711199"; + case _711211: return "711211"; + case _711300: return "711300"; + case _711311: return "711311"; + case _711312: return "711312"; + case _711411: return "711411"; + case _711500: return "711500"; + case _711511: return "711511"; + case _711512: return "711512"; + case _711513: return "711513"; + case _711514: return "711514"; + case _711515: return "711515"; + case _711516: return "711516"; + case _711599: return "711599"; + case _711611: return "711611"; + case _711700: return "711700"; + case _711711: return "711711"; + case _711712: return "711712"; + case _711713: return "711713"; + case _711714: return "711714"; + case _711715: return "711715"; + case _711716: return "711716"; + case _711799: return "711799"; + case _711900: return "711900"; + case _711911: return "711911"; + case _711912: return "711912"; + case _711913: return "711913"; + case _711914: return "711914"; + case _711999: return "711999"; + case _712000: return "712000"; + case _712111: return "712111"; + case _712200: return "712200"; + case _712211: return "712211"; + case _712212: return "712212"; + case _712213: return "712213"; + case _712311: return "712311"; + case _712900: return "712900"; + case _712911: return "712911"; + case _712912: return "712912"; + case _712913: return "712913"; + case _712914: return "712914"; + case _712915: return "712915"; + case _712916: return "712916"; + case _712917: return "712917"; + case _712918: return "712918"; + case _712921: return "712921"; + case _712922: return "712922"; + case _712999: return "712999"; + case _721000: return "721000"; + case _721100: return "721100"; + case _721111: return "721111"; + case _721112: return "721112"; + case _721200: return "721200"; + case _721211: return "721211"; + case _721212: return "721212"; + case _721213: return "721213"; + case _721214: return "721214"; + case _721215: return "721215"; + case _721216: return "721216"; + case _721311: return "721311"; + case _721900: return "721900"; + case _721911: return "721911"; + case _721912: return "721912"; + case _721913: return "721913"; + case _721914: return "721914"; + case _721915: return "721915"; + case _721916: return "721916"; + case _721999: return "721999"; + case _730000: return "730000"; + case _731000: return "731000"; + case _731100: return "731100"; + case _731111: return "731111"; + case _731112: return "731112"; + case _731199: return "731199"; + case _731200: return "731200"; + case _731211: return "731211"; + case _731212: return "731212"; + case _731213: return "731213"; + case _731300: return "731300"; + case _731311: return "731311"; + case _731312: return "731312"; + case _732111: return "732111"; + case _733100: return "733100"; + case _733111: return "733111"; + case _733112: return "733112"; + case _733113: return "733113"; + case _733114: return "733114"; + case _733115: return "733115"; + case _741111: return "741111"; + case _800000: return "800000"; + case _811000: return "811000"; + case _811111: return "811111"; + case _811211: return "811211"; + case _811311: return "811311"; + case _811400: return "811400"; + case _811411: return "811411"; + case _811412: return "811412"; + case _811500: return "811500"; + case _811511: return "811511"; + case _811512: return "811512"; + case _811513: return "811513"; + case _811600: return "811600"; + case _811611: return "811611"; + case _811612: return "811612"; + case _811699: return "811699"; + case _821000: return "821000"; + case _821100: return "821100"; + case _821111: return "821111"; + case _821112: return "821112"; + case _821113: return "821113"; + case _821114: return "821114"; + case _821211: return "821211"; + case _821311: return "821311"; + case _821400: return "821400"; + case _821411: return "821411"; + case _821412: return "821412"; + case _821511: return "821511"; + case _821611: return "821611"; + case _821700: return "821700"; + case _821711: return "821711"; + case _821712: return "821712"; + case _821713: return "821713"; + case _821714: return "821714"; + case _821900: return "821900"; + case _821911: return "821911"; + case _821912: return "821912"; + case _821913: return "821913"; + case _821914: return "821914"; + case _821915: return "821915"; + case _830000: return "830000"; + case _831000: return "831000"; + case _831100: return "831100"; + case _831111: return "831111"; + case _831112: return "831112"; + case _831113: return "831113"; + case _831114: return "831114"; + case _831115: return "831115"; + case _831116: return "831116"; + case _831117: return "831117"; + case _831118: return "831118"; + case _831199: return "831199"; + case _831200: return "831200"; + case _831211: return "831211"; + case _831212: return "831212"; + case _831300: return "831300"; + case _831311: return "831311"; + case _831312: return "831312"; + case _831313: return "831313"; + case _832000: return "832000"; + case _832100: return "832100"; + case _832111: return "832111"; + case _832112: return "832112"; + case _832113: return "832113"; + case _832114: return "832114"; + case _832115: return "832115"; + case _832199: return "832199"; + case _832211: return "832211"; + case _839000: return "839000"; + case _839111: return "839111"; + case _839200: return "839200"; + case _839211: return "839211"; + case _839212: return "839212"; + case _839300: return "839300"; + case _839311: return "839311"; + case _839312: return "839312"; + case _839313: return "839313"; + case _839400: return "839400"; + case _839411: return "839411"; + case _839412: return "839412"; + case _839413: return "839413"; + case _839900: return "839900"; + case _839911: return "839911"; + case _839912: return "839912"; + case _839913: return "839913"; + case _839914: return "839914"; + case _839915: return "839915"; + case _839916: return "839916"; + case _839917: return "839917"; + case _839999: return "839999"; + case _841000: return "841000"; + case _841111: return "841111"; + case _841200: return "841200"; + case _841211: return "841211"; + case _841212: return "841212"; + case _841213: return "841213"; + case _841214: return "841214"; + case _841215: return "841215"; + case _841216: return "841216"; + case _841299: return "841299"; + case _841300: return "841300"; + case _841311: return "841311"; + case _841312: return "841312"; + case _841313: return "841313"; + case _841400: return "841400"; + case _841411: return "841411"; + case _841412: return "841412"; + case _841500: return "841500"; + case _841511: return "841511"; + case _841512: return "841512"; + case _841513: return "841513"; + case _841514: return "841514"; + case _841515: return "841515"; + case _841516: return "841516"; + case _841517: return "841517"; + case _841599: return "841599"; + case _841611: return "841611"; + case _841900: return "841900"; + case _841911: return "841911"; + case _841912: return "841912"; + case _841999: return "841999"; + case _851000: return "851000"; + case _851111: return "851111"; + case _851200: return "851200"; + case _851211: return "851211"; + case _851299: return "851299"; + case _851311: return "851311"; + case _890000: return "890000"; + case _891000: return "891000"; + case _891100: return "891100"; + case _891111: return "891111"; + case _891112: return "891112"; + case _891113: return "891113"; + case _891211: return "891211"; + case _899000: return "899000"; + case _899111: return "899111"; + case _899200: return "899200"; + case _899211: return "899211"; + case _899212: return "899212"; + case _899311: return "899311"; + case _899400: return "899400"; + case _899411: return "899411"; + case _899412: return "899412"; + case _899413: return "899413"; + case _899414: return "899414"; + case _899415: return "899415"; + case _899500: return "899500"; + case _899511: return "899511"; + case _899512: return "899512"; + case _899611: return "899611"; + case _899711: return "899711"; + case _899900: return "899900"; + case _899911: return "899911"; + case _899912: return "899912"; + case _899913: return "899913"; + case _899914: return "899914"; + case _899915: return "899915"; + case _899916: return "899916"; + case _899917: return "899917"; + case _899918: return "899918"; + case _899921: return "899921"; + case _899922: return "899922"; + case _899999: return "899999"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.abs.gov.au/ausstats/abs@.nsf/mf/1220.0"; + } + public String getDefinition() { + switch (this) { + case _100000: return "Managers not further defined"; + case _111000: return "Chief Executives, General Managers and Legislators not further defined"; + case _111111: return "Chief Executive or Managing Director"; + case _111200: return "General Managers not further defined"; + case _111211: return "Corporate General Manager"; + case _111212: return "Defence Force Senior Officer"; + case _111300: return "Legislators not further defined"; + case _111311: return "Local Government Legislator"; + case _111312: return "Member of Parliament"; + case _111399: return "Legislators not elsewhere classified"; + case _121000: return "Farmers and Farm Managers not further defined"; + case _121111: return "Aquaculture Farmer"; + case _121200: return "Crop Farmers not further defined"; + case _121211: return "Cotton Grower"; + case _121212: return "Flower Grower"; + case _121213: return "Fruit or Nut Grower"; + case _121214: return "Grain, Oilseed or Pasture Grower"; + case _121215: return "Grape Grower"; + case _121216: return "Mixed Crop Farmer"; + case _121217: return "Sugar Cane Grower"; + case _121218: return "Turf Grower"; + case _121221: return "Vegetable Grower"; + case _121299: return "Crop Farmers not elsewhere classified"; + case _121300: return "Livestock Farmers not further defined"; + case _121311: return "Apiarist"; + case _121312: return "Beef Cattle Farmer"; + case _121313: return "Dairy Cattle Farmer"; + case _121314: return "Deer Farmer"; + case _121315: return "Goat Farmer"; + case _121316: return "Horse Breeder"; + case _121317: return "Mixed Livestock Farmer"; + case _121318: return "Pig Farmer"; + case _121321: return "Poultry Farmer"; + case _121322: return "Sheep Farmer"; + case _121399: return "Livestock Farmers not elsewhere classified"; + case _121411: return "Mixed Crop and Livestock Farmer"; + case _130000: return "Specialist Managers not further defined"; + case _131100: return "Advertising and Sales Managers not further defined"; + case _131111: return "Advertising and Public Relations Manager"; + case _131112: return "Sales and Marketing Manager"; + case _132000: return "Business Administration Managers not further defined"; + case _132111: return "Corporate Services Manager"; + case _132211: return "Finance Manager"; + case _132311: return "Human Resource Manager"; + case _132411: return "Policy and Planning Manager"; + case _132511: return "Research and Development Manager"; + case _133000: return "Construction, Distribution and Production Managers not further defined"; + case _133100: return "Construction Managers not further defined"; + case _133111: return "Construction Project Manager"; + case _133112: return "Project Builder"; + case _133211: return "Engineering Manager"; + case _133300: return "Importers, Exporters and Wholesalers not further defined"; + case _133311: return "Importer or Exporter"; + case _133312: return "Wholesaler"; + case _133411: return "Manufacturer"; + case _133500: return "Production Managers not further defined"; + case _133511: return "Production Manager (Forestry)"; + case _133512: return "Production Manager (Manufacturing)"; + case _133513: return "Production Manager (Mining)"; + case _133611: return "Supply and Distribution Manager"; + case _134000: return "Education, Health and Welfare Services Managers not further defined"; + case _134111: return "Child Care Centre Manager"; + case _134200: return "Health and Welfare Services Managers not further defined"; + case _134211: return "Medical Administrator"; + case _134212: return "Nursing Clinical Director"; + case _134213: return "Primary Health Organization Manager"; + case _134214: return "Welfare Centre Manager"; + case _134299: return "Health and Welfare Services Managers not elsewhere classified"; + case _134311: return "School Principal"; + case _134400: return "Other Education Managers not further defined"; + case _134411: return "Faculty Head"; + case _134412: return "Regional Education Manager"; + case _134499: return "Education Managers not elsewhere classified"; + case _135100: return "ICT Managers not further defined"; + case _135111: return "Chief Information Officer"; + case _135112: return "ICT Project Manager"; + case _135199: return "ICT Managers not elsewhere classified"; + case _139000: return "Miscellaneous Specialist Managers not further defined"; + case _139100: return "Commissioned Officers (Management) not further defined"; + case _139111: return "Commissioned Defence Force Officer"; + case _139112: return "Commissioned Fire Officer"; + case _139113: return "Commissioned Police Officer"; + case _139211: return "Senior Non-commissioned Defence Force Member"; + case _139900: return "Other Specialist Managers not further defined"; + case _139911: return "Arts Administrator or Manager"; + case _139912: return "Environmental Manager"; + case _139913: return "Laboratory Manager"; + case _139914: return "Quality Assurance Manager"; + case _139915: return "Sports Administrator"; + case _139999: return "Specialist Managers not elsewhere classified"; + case _140000: return "Hospitality, Retail and Service Managers not further defined"; + case _141000: return "Accommodation and Hospitality Managers not further defined"; + case _141111: return "Cafe or Restaurant Manager"; + case _141211: return "Caravan Park and Camping Ground Manager"; + case _141311: return "Hotel or Motel Manager"; + case _141411: return "Licensed Club Manager"; + case _141900: return "Other Accommodation and Hospitality Managers not further defined"; + case _141911: return "Bed and Breakfast Operator"; + case _141999: return "Accommodation and Hospitality Managers not elsewhere classified"; + case _142100: return "Retail Managers not further defined"; + case _142111: return "Retail Manager (General)"; + case _142112: return "Antique Dealer"; + case _142113: return "Betting Agency Manager"; + case _142114: return "Hair or Beauty Salon Manager"; + case _142115: return "Post Office Manager"; + case _142116: return "Travel Agency Manager"; + case _149000: return "Miscellaneous Hospitality, Retail and Service Managers not further defined"; + case _149100: return "Amusement, Fitness and Sports Centre Managers not further defined"; + case _149111: return "Amusement Centre Manager"; + case _149112: return "Fitness Centre Manager"; + case _149113: return "Sports Centre Manager"; + case _149200: return "Call or Contact Centre and Customer Service Managers not further defined"; + case _149211: return "Call or Contact Centre Manager"; + case _149212: return "Customer Service Manager"; + case _149311: return "Conference and Event Organizer"; + case _149400: return "Transport Services Managers not further defined"; + case _149411: return "Fleet Manager"; + case _149412: return "Railway Station Manager"; + case _149413: return "Transport Company Manager"; + case _149900: return "Other Hospitality, Retail and Service Managers not further defined"; + case _149911: return "Boarding Kennel or Cattery Operator"; + case _149912: return "Cinema or Theatre Manager"; + case _149913: return "Facilities Manager"; + case _149914: return "Financial Institution Branch Manager"; + case _149999: return "Hospitality, Retail and Service Managers not elsewhere classified"; + case _200000: return "Professionals not further defined"; + case _210000: return "Arts and Media Professionals not further defined"; + case _211000: return "Arts Professionals not further defined"; + case _211100: return "Actors, Dancers and Other Entertainers not further defined"; + case _211111: return "Actor"; + case _211112: return "Dancer or Choreographer"; + case _211113: return "Entertainer or Variety Artist"; + case _211199: return "Actors, Dancers and Other Entertainers not elsewhere classified"; + case _211200: return "Music Professionals not further defined"; + case _211211: return "Composer"; + case _211212: return "Music Director"; + case _211213: return "Musician (Instrumental)"; + case _211214: return "Singer"; + case _211299: return "Music Professionals not elsewhere classified"; + case _211311: return "Photographer"; + case _211400: return "Visual Arts and Crafts Professionals not further defined"; + case _211411: return "Painter (Visual Arts)"; + case _211412: return "Potter or Ceramic Artist"; + case _211413: return "Sculptor"; + case _211499: return "Visual Arts and Crafts Professionals not elsewhere classified"; + case _212000: return "Media Professionals not further defined"; + case _212100: return "Artistic Directors, and Media Producers and Presenters not further defined"; + case _212111: return "Artistic Director"; + case _212112: return "Media Producer (excluding Video)"; + case _212113: return "Radio Presenter"; + case _212114: return "Television Presenter"; + case _212200: return "Authors, and Book and Script Editors not further defined"; + case _212211: return "Author"; + case _212212: return "Book or Script Editor"; + case _212300: return "Film, Television, Radio and Stage Directors not further defined"; + case _212311: return "Art Director (Film, Television or Stage)"; + case _212312: return "Director (Film, Television, Radio or Stage)"; + case _212313: return "Director of Photography"; + case _212314: return "Film and Video Editor"; + case _212315: return "Program Director (Television or Radio)"; + case _212316: return "Stage Manager"; + case _212317: return "Technical Director"; + case _212318: return "Video Producer"; + case _212399: return "Film, Television, Radio and Stage Directors not elsewhere classified"; + case _212400: return "Journalists and Other Writers not further defined"; + case _212411: return "Copywriter"; + case _212412: return "Newspaper or Periodical Editor"; + case _212413: return "Print Journalist"; + case _212414: return "Radio Journalist"; + case _212415: return "Technical Writer"; + case _212416: return "Television Journalist"; + case _212499: return "Journalists and Other Writers not elsewhere classified"; + case _220000: return "Business, Human Resource and Marketing Professionals not further defined"; + case _221000: return "Accountants, Auditors and Company Secretaries not further defined"; + case _221100: return "Accountants not further defined"; + case _221111: return "Accountant (General)"; + case _221112: return "Management Accountant"; + case _221113: return "Taxation Accountant"; + case _221200: return "Auditors, Company Secretaries and Corporate Treasurers not further defined"; + case _221211: return "Company Secretary"; + case _221212: return "Corporate Treasurer"; + case _221213: return "External Auditor"; + case _221214: return "Internal Auditor"; + case _222000: return "Financial Brokers and Dealers, and Investment Advisers not further defined"; + case _222100: return "Financial Brokers not further defined"; + case _222111: return "Commodities Trader"; + case _222112: return "Finance Broker"; + case _222113: return "Insurance Broker"; + case _222199: return "Financial Brokers not elsewhere classified"; + case _222200: return "Financial Dealers not further defined"; + case _222211: return "Financial Market Dealer"; + case _222212: return "Futures Trader"; + case _222213: return "Stockbroking Dealer"; + case _222299: return "Financial Dealers not elsewhere classified"; + case _222300: return "Financial Investment Advisers and Managers not further defined"; + case _222311: return "Financial Investment Adviser"; + case _222312: return "Financial Investment Manager"; + case _223000: return "Human Resource and Training Professionals not further defined"; + case _223100: return "Human Resource Professionals not further defined"; + case _223111: return "Human Resource Adviser"; + case _223112: return "Recruitment Consultant"; + case _223113: return "Workplace Relations Adviser"; + case _223211: return "ICT Trainer"; + case _223311: return "Training and Development Professional"; + case _224000: return "Information and Organization Professionals not further defined"; + case _224100: return "Actuaries, Mathematicians and Statisticians not further defined"; + case _224111: return "Actuary"; + case _224112: return "Mathematician"; + case _224113: return "Statistician"; + case _224200: return "Archivists, Curators and Records Managers not further defined"; + case _224211: return "Archivist"; + case _224212: return "Gallery or Museum Curator"; + case _224213: return "Health Information Manager"; + case _224214: return "Records Manager"; + case _224311: return "Economist"; + case _224400: return "Intelligence and Policy Analysts not further defined"; + case _224411: return "Intelligence Officer"; + case _224412: return "Policy Analyst"; + case _224500: return "Land Economists and Valuers not further defined"; + case _224511: return "Land Economist"; + case _224512: return "Valuer"; + case _224611: return "Librarian"; + case _224700: return "Management and Organization Analysts not further defined"; + case _224711: return "Management Consultant"; + case _224712: return "Organization and Methods Analyst"; + case _224900: return "Other Information and Organization Professionals not further defined"; + case _224911: return "Electorate Officer"; + case _224912: return "Liaison Officer"; + case _224913: return "Migration Agent"; + case _224914: return "Patents Examiner"; + case _224999: return "Information and Organization Professionals not elsewhere classified"; + case _225000: return "Sales, Marketing and Public Relations Professionals not further defined"; + case _225100: return "Advertising and Marketing Professionals not further defined"; + case _225111: return "Advertising Specialist"; + case _225112: return "Market Research Analyst"; + case _225113: return "Marketing Specialist"; + case _225200: return "ICT Sales Professionals not further defined"; + case _225211: return "ICT Account Manager"; + case _225212: return "ICT Business Development Manager"; + case _225213: return "ICT Sales Representative"; + case _225311: return "Public Relations Professional"; + case _225400: return "Technical Sales Representatives not further defined"; + case _225411: return "Sales Representative (Industrial Products)"; + case _225412: return "Sales Representative (Medical and Pharmaceutical Products)"; + case _225499: return "Technical Sales Representatives not elsewhere classified"; + case _230000: return "Design, Engineering, Science and Transport Professionals not further defined"; + case _231000: return "Air and Marine Transport Professionals not further defined"; + case _231100: return "Air Transport Professionals not further defined"; + case _231111: return "Aeroplane Pilot"; + case _231112: return "Air Traffic Controller"; + case _231113: return "Flying Instructor"; + case _231114: return "Helicopter Pilot"; + case _231199: return "Air Transport Professionals not elsewhere classified"; + case _231200: return "Marine Transport Professionals not further defined"; + case _231211: return "Master Fisher"; + case _231212: return "Ship's Engineer"; + case _231213: return "Ship's Master"; + case _231214: return "Ship's Officer"; + case _231215: return "Ship's Surveyor"; + case _231299: return "Marine Transport Professionals not elsewhere classified"; + case _232000: return "Architects, Designers, Planners and Surveyors not further defined"; + case _232100: return "Architects and Landscape Architects not further defined"; + case _232111: return "Architect"; + case _232112: return "Landscape Architect"; + case _232200: return "Cartographers and Surveyors not further defined"; + case _232211: return "Cartographer"; + case _232212: return "Surveyor"; + case _232300: return "Fashion, Industrial and Jewellery Designers not further defined"; + case _232311: return "Fashion Designer"; + case _232312: return "Industrial Designer"; + case _232313: return "Jewellery Designer"; + case _232400: return "Graphic and Web Designers, and Illustrators not further defined"; + case _232411: return "Graphic Designer"; + case _232412: return "Illustrator"; + case _232413: return "Multimedia Designer"; + case _232414: return "Web Designer"; + case _232511: return "Interior Designer"; + case _232611: return "Urban and Regional Planner"; + case _233000: return "Engineering Professionals not further defined"; + case _233100: return "Chemical and Materials Engineers not further defined"; + case _233111: return "Chemical Engineer"; + case _233112: return "Materials Engineer"; + case _233200: return "Civil Engineering Professionals not further defined"; + case _233211: return "Civil Engineer"; + case _233212: return "Geotechnical Engineer"; + case _233213: return "Quantity Surveyor"; + case _233214: return "Structural Engineer"; + case _233215: return "Transport Engineer"; + case _233311: return "Electrical Engineer"; + case _233411: return "Electronics Engineer"; + case _233500: return "Industrial, Mechanical and Production Engineers not further defined"; + case _233511: return "Industrial Engineer"; + case _233512: return "Mechanical Engineer"; + case _233513: return "Production or Plant Engineer"; + case _233600: return "Mining Engineers not further defined"; + case _233611: return "Mining Engineer (excluding Petroleum)"; + case _233612: return "Petroleum Engineer"; + case _233900: return "Other Engineering Professionals not further defined"; + case _233911: return "Aeronautical Engineer"; + case _233912: return "Agricultural Engineer"; + case _233913: return "Biomedical Engineer"; + case _233914: return "Engineering Technologist"; + case _233915: return "Environmental Engineer"; + case _233916: return "Naval Architect"; + case _233999: return "Engineering Professionals not elsewhere classified"; + case _234000: return "Natural and Physical Science Professionals not further defined"; + case _234100: return "Agricultural and Forestry Scientists not further defined"; + case _234111: return "Agricultural Consultant"; + case _234112: return "Agricultural Scientist"; + case _234113: return "Forester"; + case _234200: return "Chemists, and Food and Wine Scientists not further defined"; + case _234211: return "Chemist"; + case _234212: return "Food Technologist"; + case _234213: return "Wine Maker"; + case _234300: return "Environmental Scientists not further defined"; + case _234311: return "Conservation Officer"; + case _234312: return "Environmental Consultant"; + case _234313: return "Environmental Research Scientist"; + case _234314: return "Park Ranger"; + case _234399: return "Environmental Scientists not elsewhere classified"; + case _234400: return "Geologists and Geophysicists not further defined"; + case _234411: return "Geologist"; + case _234412: return "Geophysicist"; + case _234500: return "Life Scientists not further defined"; + case _234511: return "Life Scientist (General)"; + case _234512: return "Anatomist or Physiologist"; + case _234513: return "Biochemist"; + case _234514: return "Biotechnologist"; + case _234515: return "Botanist"; + case _234516: return "Marine Biologist"; + case _234517: return "Microbiologist"; + case _234518: return "Zoologist"; + case _234599: return "Life Scientists not elsewhere classified"; + case _234611: return "Medical Laboratory Scientist"; + case _234711: return "Veterinarian"; + case _234900: return "Other Natural and Physical Science Professionals not further defined"; + case _234911: return "Conservator"; + case _234912: return "Metallurgist"; + case _234913: return "Meteorologist"; + case _234914: return "Physicist"; + case _234999: return "Natural and Physical Science Professionals not elsewhere classified"; + case _240000: return "Education Professionals not further defined"; + case _241000: return "School Teachers not further defined"; + case _241111: return "Early Childhood (Pre-primary School) Teacher"; + case _241213: return "Primary School Teacher"; + case _241311: return "Middle School Teacher"; + case _241411: return "Secondary School Teacher"; + case _241500: return "Special Education Teachers not further defined"; + case _241511: return "Special Needs Teacher"; + case _241512: return "Teacher of the Hearing Impaired"; + case _241513: return "Teacher of the Sight Impaired"; + case _241599: return "Special Education Teachers not elsewhere classified"; + case _242000: return "Tertiary Education Teachers not further defined"; + case _242100: return "University Lecturers and Tutors not further defined"; + case _242111: return "University Lecturer"; + case _242112: return "University Tutor"; + case _242211: return "Vocational Education Teacher"; + case _249000: return "Miscellaneous Education Professionals not further defined"; + case _249100: return "Education Advisers and Reviewers not further defined"; + case _249111: return "Education Adviser"; + case _249112: return "Education Reviewer"; + case _249200: return "Private Tutors and Teachers not further defined"; + case _249211: return "Art Teacher (Private Tuition)"; + case _249212: return "Dance Teacher (Private Tuition)"; + case _249213: return "Drama Teacher (Private Tuition)"; + case _249214: return "Music Teacher (Private Tuition)"; + case _249299: return "Private Tutors and Teachers not elsewhere classified"; + case _249311: return "Teacher of English to Speakers of Other Languages"; + case _250000: return "Health Professionals not further defined"; + case _251000: return "Health Diagnostic and Promotion Professionals not further defined"; + case _251111: return "Dietitian"; + case _251200: return "Medical Imaging Professionals not further defined"; + case _251211: return "Medical Diagnostic Radiographer"; + case _251212: return "Medical Radiation Therapist"; + case _251213: return "Nuclear Medicine Technologist"; + case _251214: return "Sonographer"; + case _251300: return "Occupational and Environmental Health Professionals not further defined"; + case _251311: return "Environmental Health Officer"; + case _251312: return "Occupational Health and Safety Adviser"; + case _251400: return "Optometrists and Orthoptists not further defined"; + case _251411: return "Optometrist"; + case _251412: return "Orthoptist"; + case _251500: return "Pharmacists not further defined"; + case _251511: return "Hospital Pharmacist"; + case _251512: return "Industrial Pharmacist"; + case _251513: return "Retail Pharmacist"; + case _251900: return "Other Health Diagnostic and Promotion Professionals not further defined"; + case _251911: return "Health Promotion Officer"; + case _251912: return "Orthotist or Prosthetist"; + case _251999: return "Health Diagnostic and Promotion Professionals not elsewhere classified"; + case _252000: return "Health Therapy Professionals not further defined"; + case _252100: return "Chiropractors and Osteopaths not further defined"; + case _252111: return "Chiropractor"; + case _252112: return "Osteopath"; + case _252200: return "Complementary Health Therapists not further defined"; + case _252211: return "Acupuncturist"; + case _252212: return "Homoeopath"; + case _252213: return "Naturopath"; + case _252214: return "Traditional Chinese Medicine Practitioner"; + case _252299: return "Complementary Health Therapists not elsewhere classified"; + case _252300: return "Dental Practitioners not further defined"; + case _252311: return "Dental Specialist"; + case _252312: return "Dentist"; + case _252411: return "Occupational Therapist"; + case _252511: return "Physiotherapist"; + case _252611: return "Podiatrist"; + case _252700: return "Speech Professionals and Audiologists not further defined"; + case _252711: return "Audiologist"; + case _252712: return "Speech Pathologist"; + case _253000: return "Medical Practitioners not further defined"; + case _253100: return "Generalist Medical Practitioners not further defined"; + case _253111: return "General Medical Practitioner"; + case _253112: return "Resident Medical Officer"; + case _253211: return "Anaesthetist"; + case _253300: return "Internal Medicine Specialists not further defined"; + case _253311: return "Specialist Physician (General Medicine)"; + case _253312: return "Cardiologist"; + case _253313: return "Clinical Haematologist"; + case _253314: return "Clinical Oncologist"; + case _253315: return "Endocrinologist"; + case _253316: return "Gastroenterologist"; + case _253317: return "Intensive Care Specialist"; + case _253318: return "Neurologist"; + case _253321: return "Paediatrician"; + case _253322: return "Renal Medicine Specialist"; + case _253323: return "Rheumatologist"; + case _253324: return "Thoracic Medicine Specialist"; + case _253399: return "Internal Medicine Specialists not elsewhere classified"; + case _253411: return "Psychiatrist"; + case _253500: return "Surgeons not further defined"; + case _253511: return "Surgeon (General)"; + case _253512: return "Cardiothoracic Surgeon"; + case _253513: return "Neurosurgeon"; + case _253514: return "Orthopaedic Surgeon"; + case _253515: return "Otorhinolaryngologist"; + case _253516: return "Paediatric Surgeon"; + case _253517: return "Plastic and Reconstructive Surgeon"; + case _253518: return "Urologist"; + case _253521: return "Vascular Surgeon"; + case _253900: return "Other Medical Practitioners not further defined"; + case _253911: return "Dermatologist"; + case _253912: return "Emergency Medicine Specialist"; + case _253913: return "Obstetrician and Gynaecologist"; + case _253914: return "Ophthalmologist"; + case _253915: return "Pathologist"; + case _253916: return "Radiologist"; + case _253999: return "Medical Practitioners not elsewhere classified"; + case _254000: return "Midwifery and Nursing Professionals not further defined"; + case _254111: return "Midwife"; + case _254200: return "Nurse Educators and Researchers not further defined"; + case _254211: return "Nurse Educator"; + case _254212: return "Nurse Researcher"; + case _254311: return "Nurse Manager"; + case _254400: return "Registered Nurses not further defined"; + case _254411: return "Nurse Practitioner"; + case _254412: return "Registered Nurse (Aged Care)"; + case _254413: return "Registered Nurse (Child and Family Health)"; + case _254414: return "Registered Nurse (Community Health)"; + case _254415: return "Registered Nurse (Critical Care and Emergency)"; + case _254416: return "Registered Nurse (Developmental Disability)"; + case _254417: return "Registered Nurse (Disability and Rehabilitation)"; + case _254418: return "Registered Nurse (Medical)"; + case _254421: return "Registered Nurse (Medical Practice)"; + case _254422: return "Registered Nurse (Mental Health)"; + case _254423: return "Registered Nurse (Perioperative)"; + case _254424: return "Registered Nurse (Surgical)"; + case _254499: return "Registered Nurses not elsewhere classified"; + case _260000: return "ICT Professionals not further defined"; + case _261000: return "Business and Systems Analysts, and Programmers not further defined"; + case _261100: return "ICT Business and Systems Analysts not further defined"; + case _261111: return "ICT Business Analyst"; + case _261112: return "Systems Analyst"; + case _261200: return "Multimedia Specialists and Web Developers not further defined"; + case _261211: return "Multimedia Specialist"; + case _261212: return "Web Developer"; + case _261300: return "Software and Applications Programmers not further defined"; + case _261311: return "Analyst Programmer"; + case _261312: return "Developer Programmer"; + case _261313: return "Software Engineer"; + case _261399: return "Software and Applications Programmers not elsewhere classified"; + case _262100: return "Database and Systems Administrators, and ICT Security Specialists not further defined"; + case _262111: return "Database Administrator"; + case _262112: return "ICT Security Specialist"; + case _262113: return "Systems Administrator"; + case _263000: return "ICT Network and Support Professionals not further defined"; + case _263100: return "Computer Network Professionals not further defined"; + case _263111: return "Computer Network and Systems Engineer"; + case _263112: return "Network Administrator"; + case _263113: return "Network Analyst"; + case _263200: return "ICT Support and Test Engineers not further defined"; + case _263211: return "ICT Quality Assurance Engineer"; + case _263212: return "ICT Support Engineer"; + case _263213: return "ICT Systems Test Engineer"; + case _263299: return "ICT Support and Test Engineers not elsewhere classified"; + case _263300: return "Telecommunications Engineering Professionals not further defined"; + case _263311: return "Telecommunications Engineer"; + case _263312: return "Telecommunications Network Engineer"; + case _270000: return "Legal, Social and Welfare Professionals not further defined"; + case _271000: return "Legal Professionals not further defined"; + case _271111: return "Barrister"; + case _271200: return "Judicial and Other Legal Professionals not further defined"; + case _271211: return "Judge"; + case _271212: return "Magistrate"; + case _271213: return "Tribunal Member"; + case _271299: return "Judicial and Other Legal Professionals not elsewhere classified"; + case _271311: return "Solicitor"; + case _272000: return "Social and Welfare Professionals not further defined"; + case _272100: return "Counsellors not further defined"; + case _272111: return "Careers Counsellor"; + case _272112: return "Drug and Alcohol Counsellor"; + case _272113: return "Family and Marriage Counsellor"; + case _272114: return "Rehabilitation Counsellor"; + case _272115: return "Student Counsellor"; + case _272199: return "Counsellors not elsewhere classified"; + case _272211: return "Minister of Religion"; + case _272300: return "Psychologists not further defined"; + case _272311: return "Clinical Psychologist"; + case _272312: return "Educational Psychologist"; + case _272313: return "Organizational Psychologist"; + case _272314: return "Psychotherapist"; + case _272399: return "Psychologists not elsewhere classified"; + case _272400: return "Social Professionals not further defined"; + case _272411: return "Historian"; + case _272412: return "Interpreter"; + case _272413: return "Translator"; + case _272499: return "Social Professionals not elsewhere classified"; + case _272511: return "Social Worker"; + case _272600: return "Welfare, Recreation and Community Arts Workers not further defined"; + case _272611: return "Community Arts Worker"; + case _272612: return "Recreation Officer"; + case _272613: return "Welfare Worker"; + case _300000: return "Technicians and Trades Workers not further defined"; + case _310000: return "Engineering, ICT and Science Technicians not further defined"; + case _311000: return "Agricultural, Medical and Science Technicians not further defined"; + case _311111: return "Agricultural Technician"; + case _311200: return "Medical Technicians not further defined"; + case _311211: return "Anaesthetic Technician"; + case _311212: return "Cardiac Technician"; + case _311213: return "Medical Laboratory Technician"; + case _311214: return "Operating Theatre Technician"; + case _311215: return "Pharmacy Technician"; + case _311299: return "Medical Technicians not elsewhere classified"; + case _311300: return "Primary Products Inspectors not further defined"; + case _311311: return "Fisheries Officer"; + case _311312: return "Meat Inspector"; + case _311313: return "Quarantine Officer"; + case _311399: return "Primary Products Inspectors not elsewhere classified"; + case _311400: return "Science Technicians not further defined"; + case _311411: return "Chemistry Technician"; + case _311412: return "Earth Science Technician"; + case _311413: return "Life Science Technician"; + case _311414: return "School Laboratory Technician"; + case _311499: return "Science Technicians not elsewhere classified"; + case _312000: return "Building and Engineering Technicians not further defined"; + case _312100: return "Architectural, Building and Surveying Technicians not further defined"; + case _312111: return "Architectural Draftsperson"; + case _312112: return "Building Associate"; + case _312113: return "Building Inspector"; + case _312114: return "Construction Estimator"; + case _312115: return "Plumbing Inspector"; + case _312116: return "Surveying or Cartographic Technician"; + case _312200: return "Civil Engineering Draftspersons and Technicians not further defined"; + case _312211: return "Civil Engineering Draftsperson"; + case _312212: return "Civil Engineering Technician"; + case _312300: return "Electrical Engineering Draftspersons and Technicians not further defined"; + case _312311: return "Electrical Engineering Draftsperson"; + case _312312: return "Electrical Engineering Technician"; + case _312400: return "Electronic Engineering Draftspersons and Technicians not further defined"; + case _312411: return "Electronic Engineering Draftsperson"; + case _312412: return "Electronic Engineering Technician"; + case _312500: return "Mechanical Engineering Draftspersons and Technicians not further defined"; + case _312511: return "Mechanical Engineering Draftsperson"; + case _312512: return "Mechanical Engineering Technician"; + case _312611: return "Safety Inspector"; + case _312900: return "Other Building and Engineering Technicians not further defined"; + case _312911: return "Maintenance Planner"; + case _312912: return "Metallurgical or Materials Technician"; + case _312913: return "Mine Deputy"; + case _312999: return "Building and Engineering Technicians not elsewhere classified"; + case _313000: return "ICT and Telecommunications Technicians not further defined"; + case _313100: return "ICT Support Technicians not further defined"; + case _313111: return "Hardware Technician"; + case _313112: return "ICT Customer Support Officer"; + case _313113: return "Web Administrator"; + case _313199: return "ICT Support Technicians not elsewhere classified"; + case _313200: return "Telecommunications Technical Specialists not further defined"; + case _313211: return "Radiocommunications Technician"; + case _313212: return "Telecommunications Field Engineer"; + case _313213: return "Telecommunications Network Planner"; + case _313214: return "Telecommunications Technical Officer or Technologist"; + case _320000: return "Automotive and Engineering Trades Workers not further defined"; + case _321000: return "Automotive Electricians and Mechanics not further defined"; + case _321111: return "Automotive Electrician"; + case _321200: return "Motor Mechanics not further defined"; + case _321211: return "Motor Mechanic (General)"; + case _321212: return "Diesel Motor Mechanic"; + case _321213: return "Motorcycle Mechanic"; + case _321214: return "Small Engine Mechanic"; + case _322000: return "Fabrication Engineering Trades Workers not further defined"; + case _322100: return "Metal Casting, Forging and Finishing Trades Workers not further defined"; + case _322111: return "Blacksmith"; + case _322112: return "Electroplater"; + case _322113: return "Farrier"; + case _322114: return "Metal Casting Trades Worker"; + case _322115: return "Metal Polisher"; + case _322211: return "Sheetmetal Trades Worker"; + case _322300: return "Structural Steel and Welding Trades Workers not further defined"; + case _322311: return "Metal Fabricator"; + case _322312: return "Pressure Welder"; + case _322313: return "Welder (First Class)"; + case _323000: return "Mechanical Engineering Trades Workers not further defined"; + case _323100: return "Aircraft Maintenance Engineers not further defined"; + case _323111: return "Aircraft Maintenance Engineer (Avionics)"; + case _323112: return "Aircraft Maintenance Engineer (Mechanical)"; + case _323113: return "Aircraft Maintenance Engineer (Structures)"; + case _323200: return "Metal Fitters and Machinists not further defined"; + case _323211: return "Fitter (General)"; + case _323212: return "Fitter and Turner"; + case _323213: return "Fitter-Welder"; + case _323214: return "Metal Machinist (First Class)"; + case _323215: return "Textile, Clothing and Footwear Mechanic"; + case _323299: return "Metal Fitters and Machinists not elsewhere classified"; + case _323300: return "Precision Metal Trades Workers not further defined"; + case _323311: return "Engraver"; + case _323312: return "Gunsmith"; + case _323313: return "Locksmith"; + case _323314: return "Precision Instrument Maker and Repairer"; + case _323315: return "Saw Maker and Repairer"; + case _323316: return "Watch and Clock Maker and Repairer"; + case _323400: return "Toolmakers and Engineering Patternmakers not further defined"; + case _323411: return "Engineering Patternmaker"; + case _323412: return "Toolmaker"; + case _324000: return "Panelbeaters, and Vehicle Body Builders, Trimmers and Painters not further defined"; + case _324111: return "Panelbeater"; + case _324200: return "Vehicle Body Builders and Trimmers not further defined"; + case _324211: return "Vehicle Body Builder"; + case _324212: return "Vehicle Trimmer"; + case _324311: return "Vehicle Painter"; + case _330000: return "Construction Trades Workers not further defined"; + case _331000: return "Bricklayers, and Carpenters and Joiners not further defined"; + case _331100: return "Bricklayers and Stonemasons not further defined"; + case _331111: return "Bricklayer"; + case _331112: return "Stonemason"; + case _331211: return "Carpenter and Joiner"; + case _331212: return "Carpenter"; + case _331213: return "Joiner"; + case _332000: return "Floor Finishers and Painting Trades Workers not further defined"; + case _332111: return "Floor Finisher"; + case _332211: return "Painting Trades Worker"; + case _333000: return "Glaziers, Plasterers and Tilers not further defined"; + case _333111: return "Glazier"; + case _333200: return "Plasterers not further defined"; + case _333211: return "Fibrous Plasterer"; + case _333212: return "Solid Plasterer"; + case _333311: return "Roof Tiler"; + case _333411: return "Wall and Floor Tiler"; + case _334100: return "Plumbers not further defined"; + case _334111: return "Plumber (General)"; + case _334112: return "Airconditioning and Mechanical Services Plumber"; + case _334113: return "Drainer"; + case _334114: return "Gasfitter"; + case _334115: return "Roof Plumber"; + case _340000: return "Electrotechnology and Telecommunications Trades Workers not further defined"; + case _341100: return "Electricians not further defined"; + case _341111: return "Electrician (General)"; + case _341112: return "Electrician (Special Class)"; + case _341113: return "Lift Mechanic"; + case _342000: return "Electronics and Telecommunications Trades Workers not further defined"; + case _342111: return "Airconditioning and Refrigeration Mechanic"; + case _342200: return "Electrical Distribution Trades Workers not further defined"; + case _342211: return "Electrical Linesworker"; + case _342212: return "Technical Cable Jointer"; + case _342300: return "Electronics Trades Workers not further defined"; + case _342311: return "Business Machine Mechanic"; + case _342312: return "Communications Operator"; + case _342313: return "Electronic Equipment Trades Worker"; + case _342314: return "Electronic Instrument Trades Worker (General)"; + case _342315: return "Electronic Instrument Trades Worker (Special Class)"; + case _342400: return "Telecommunications Trades Workers not further defined"; + case _342411: return "Cabler (Data and Telecommunications)"; + case _342412: return "Telecommunications Cable Jointer"; + case _342413: return "Telecommunications Linesworker"; + case _342414: return "Telecommunications Technician"; + case _351000: return "Food Trades Workers not further defined"; + case _351100: return "Bakers and Pastrycooks not further defined"; + case _351111: return "Baker"; + case _351112: return "Pastrycook"; + case _351211: return "Butcher or Smallgoods Maker"; + case _351311: return "Chef"; + case _351411: return "Cook"; + case _360000: return "Skilled Animal and Horticultural Workers not further defined"; + case _361000: return "Animal Attendants and Trainers, and Shearers not further defined"; + case _361100: return "Animal Attendants and Trainers not further defined"; + case _361111: return "Dog Handler or Trainer"; + case _361112: return "Horse Trainer"; + case _361113: return "Pet Groomer"; + case _361114: return "Zookeeper"; + case _361199: return "Animal Attendants and Trainers not elsewhere classified"; + case _361211: return "Shearer"; + case _361311: return "Veterinary Nurse"; + case _362000: return "Horticultural Trades Workers not further defined"; + case _362111: return "Florist"; + case _362200: return "Gardeners not further defined"; + case _362211: return "Gardener (General)"; + case _362212: return "Arborist"; + case _362213: return "Landscape Gardener"; + case _362311: return "Greenkeeper"; + case _362411: return "Nurseryperson"; + case _390000: return "Other Technicians and Trades Workers not further defined"; + case _391111: return "Hairdresser"; + case _392000: return "Printing Trades Workers not further defined"; + case _392100: return "Binders, Finishers and Screen Printers not further defined"; + case _392111: return "Binder and Finisher"; + case _392112: return "Screen Printer"; + case _392211: return "Graphic Pre-press Trades Worker"; + case _392300: return "Printers not further defined"; + case _392311: return "Printing Machinist"; + case _392312: return "Small Offset Printer"; + case _393000: return "Textile, Clothing and Footwear Trades Workers not further defined"; + case _393100: return "Canvas and Leather Goods Makers not further defined"; + case _393111: return "Canvas Goods Maker"; + case _393112: return "Leather Goods Maker"; + case _393113: return "Sail Maker"; + case _393114: return "Shoemaker"; + case _393200: return "Clothing Trades Workers not further defined"; + case _393211: return "Apparel Cutter"; + case _393212: return "Clothing Patternmaker"; + case _393213: return "Dressmaker or Tailor"; + case _393299: return "Clothing Trades Workers not elsewhere classified"; + case _393311: return "Upholsterer"; + case _394000: return "Wood Trades Workers not further defined"; + case _394111: return "Cabinetmaker"; + case _394200: return "Wood Machinists and Other Wood Trades Workers not further defined"; + case _394211: return "Furniture Finisher"; + case _394212: return "Picture Framer"; + case _394213: return "Wood Machinist"; + case _394214: return "Wood Turner"; + case _394299: return "Wood Machinists and Other Wood Trades Workers not elsewhere classified"; + case _399000: return "Miscellaneous Technicians and Trades Workers not further defined"; + case _399100: return "Boat Builders and Shipwrights not further defined"; + case _399111: return "Boat Builder and Repairer"; + case _399112: return "Shipwright"; + case _399200: return "Chemical, Gas, Petroleum and Power Generation Plant Operators not further defined"; + case _399211: return "Chemical Plant Operator"; + case _399212: return "Gas or Petroleum Operator"; + case _399213: return "Power Generation Plant Operator"; + case _399300: return "Gallery, Library and Museum Technicians not further defined"; + case _399311: return "Gallery or Museum Technician"; + case _399312: return "Library Technician"; + case _399411: return "Jeweller"; + case _399500: return "Performing Arts Technicians not further defined"; + case _399511: return "Broadcast Transmitter Operator"; + case _399512: return "Camera Operator (Film, Television or Video)"; + case _399513: return "Light Technician"; + case _399514: return "Make Up Artist"; + case _399515: return "Musical Instrument Maker or Repairer"; + case _399516: return "Sound Technician"; + case _399517: return "Television Equipment Operator"; + case _399599: return "Performing Arts Technicians not elsewhere classified"; + case _399611: return "Signwriter"; + case _399900: return "Other Miscellaneous Technicians and Trades Workers not further defined"; + case _399911: return "Diver"; + case _399912: return "Interior Decorator"; + case _399913: return "Optical Dispenser"; + case _399914: return "Optical Mechanic"; + case _399915: return "Photographer's Assistant"; + case _399916: return "Plastics Technician"; + case _399917: return "Wool Classer"; + case _399999: return "Technicians and Trades Workers not elsewhere classified"; + case _400000: return "Community and Personal Service Workers not further defined"; + case _411000: return "Health and Welfare Support Workers not further defined"; + case _411100: return "Ambulance Officers and Paramedics not further defined"; + case _411111: return "Ambulance Officer"; + case _411112: return "Intensive Care Ambulance Paramedic"; + case _411200: return "Dental Hygienists, Technicians and Therapists not further defined"; + case _411211: return "Dental Hygienist"; + case _411212: return "Dental Prosthetist"; + case _411213: return "Dental Technician"; + case _411214: return "Dental Therapist"; + case _411311: return "Diversional Therapist"; + case _411400: return "Enrolled and Mothercraft Nurses not further defined"; + case _411411: return "Enrolled Nurse"; + case _411412: return "Mothercraft Nurse"; + case _411511: return "Aboriginal and Torres Strait Islander Health Worker"; + case _411611: return "Massage Therapist"; + case _411700: return "Welfare Support Workers not further defined"; + case _411711: return "Community Worker"; + case _411712: return "Disabilities Services Officer"; + case _411713: return "Family Support Worker"; + case _411714: return "Parole or Probation Officer"; + case _411715: return "Residential Care Officer"; + case _411716: return "Youth Worker"; + case _420000: return "Carers and Aides not further defined"; + case _421100: return "Child Carers not further defined"; + case _421111: return "Child Care Worker"; + case _421112: return "Family Day Care Worker"; + case _421113: return "Nanny"; + case _421114: return "Out of School Hours Care Worker"; + case _422100: return "Education Aides not further defined"; + case _422111: return "Aboriginal and Torres Strait Islander Education Worker"; + case _422112: return "Integration Aide"; + case _422115: return "Preschool Aide"; + case _422116: return "Teachers' Aide"; + case _423000: return "Personal Carers and Assistants not further defined"; + case _423111: return "Aged or Disabled Carer"; + case _423211: return "Dental Assistant"; + case _423300: return "Nursing Support and Personal Care Workers not further defined"; + case _423311: return "Hospital Orderly"; + case _423312: return "Nursing Support Worker"; + case _423313: return "Personal Care Assistant"; + case _423314: return "Therapy Aide"; + case _423400: return "Special Care Workers not further defined"; + case _423411: return "Child or Youth Residential Care Assistant"; + case _423412: return "Hostel Parent"; + case _423413: return "Refuge Worker"; + case _431000: return "Hospitality Workers not further defined"; + case _431100: return "Bar Attendants and Baristas not further defined"; + case _431111: return "Bar Attendant"; + case _431112: return "Barista"; + case _431211: return "Cafe Worker"; + case _431311: return "Gaming Worker"; + case _431411: return "Hotel Service Manager"; + case _431511: return "Waiter"; + case _431900: return "Other Hospitality Workers not further defined"; + case _431911: return "Bar Useful or Busser"; + case _431912: return "Doorperson or Luggage Porter"; + case _431999: return "Hospitality Workers not elsewhere classified"; + case _440000: return "Protective Service Workers not further defined"; + case _441000: return "Defence Force Members, Fire Fighters and Police not further defined"; + case _441111: return "Defence Force Member - Other Ranks"; + case _441200: return "Fire and Emergency Workers not further defined"; + case _441211: return "Emergency Service Worker"; + case _441212: return "Fire Fighter"; + case _441300: return "Police not further defined"; + case _441311: return "Detective"; + case _441312: return "Police Officer"; + case _442000: return "Prison and Security Officers not further defined"; + case _442111: return "Prison Officer"; + case _442200: return "Security Officers and Guards not further defined"; + case _442211: return "Alarm, Security or Surveillance Monitor"; + case _442212: return "Armoured Car Escort"; + case _442213: return "Crowd Controller"; + case _442214: return "Private Investigator"; + case _442215: return "Retail Loss Prevention Officer"; + case _442216: return "Security Consultant"; + case _442217: return "Security Officer"; + case _442299: return "Security Officers and Guards not elsewhere classified"; + case _450000: return "Sports and Personal Service Workers not further defined"; + case _451000: return "Personal Service and Travel Workers not further defined"; + case _451111: return "Beauty Therapist"; + case _451211: return "Driving Instructor"; + case _451300: return "Funeral Workers not further defined"; + case _451311: return "Funeral Director"; + case _451399: return "Funeral Workers not elsewhere classified"; + case _451400: return "Gallery, Museum and Tour Guides not further defined"; + case _451411: return "Gallery or Museum Guide"; + case _451412: return "Tour Guide"; + case _451500: return "Personal Care Consultants not further defined"; + case _451511: return "Natural Remedy Consultant"; + case _451512: return "Weight Loss Consultant"; + case _451600: return "Tourism and Travel Advisers not further defined"; + case _451611: return "Tourist Information Officer"; + case _451612: return "Travel Consultant"; + case _451700: return "Travel Attendants not further defined"; + case _451711: return "Flight Attendant"; + case _451799: return "Travel Attendants not elsewhere classified"; + case _451800: return "Other Personal Service Workers not further defined"; + case _451811: return "Civil Celebrant"; + case _451812: return "Hair or Beauty Salon Assistant"; + case _451813: return "Sex Worker or Escort"; + case _451899: return "Personal Service Workers not elsewhere classified"; + case _452000: return "Sports and Fitness Workers not further defined"; + case _452111: return "Fitness Instructor"; + case _452200: return "Outdoor Adventure Guides not further defined"; + case _452211: return "Bungy Jump Master"; + case _452212: return "Fishing Guide"; + case _452213: return "Hunting Guide"; + case _452214: return "Mountain or Glacier Guide"; + case _452215: return "Outdoor Adventure Instructor"; + case _452216: return "Trekking Guide"; + case _452217: return "Whitewater Rafting Guide"; + case _452299: return "Outdoor Adventure Guides not elsewhere classified"; + case _452300: return "Sports Coaches, Instructors and Officials not further defined"; + case _452311: return "Diving Instructor (Open Water)"; + case _452312: return "Gymnastics Coach or Instructor"; + case _452313: return "Horse Riding Coach or Instructor"; + case _452314: return "Snowsport Instructor"; + case _452315: return "Swimming Coach or Instructor"; + case _452316: return "Tennis Coach"; + case _452317: return "Other Sports Coach or Instructor"; + case _452318: return "Dog or Horse Racing Official"; + case _452321: return "Sports Development Officer"; + case _452322: return "Sports Umpire"; + case _452323: return "Other Sports Official"; + case _452400: return "Sportspersons not further defined"; + case _452411: return "Footballer"; + case _452412: return "Golfer"; + case _452413: return "Jockey"; + case _452414: return "Lifeguard"; + case _452499: return "Sportspersons not elsewhere classified"; + case _500000: return "Clerical and Administrative Workers not further defined"; + case _510000: return "Office Managers and Program Administrators not further defined"; + case _511100: return "Contract, Program and Project Administrators not further defined"; + case _511111: return "Contract Administrator"; + case _511112: return "Program or Project Administrator"; + case _512000: return "Office and Practice Managers not further defined"; + case _512111: return "Office Manager"; + case _512200: return "Practice Managers not further defined"; + case _512211: return "Health Practice Manager"; + case _512299: return "Practice Managers not elsewhere classified"; + case _521000: return "Personal Assistants and Secretaries not further defined"; + case _521111: return "Personal Assistant"; + case _521200: return "Secretaries not further defined"; + case _521211: return "Secretary (General)"; + case _521212: return "Legal Secretary"; + case _530000: return "General Clerical Workers not further defined"; + case _531111: return "General Clerk"; + case _532100: return "Keyboard Operators not further defined"; + case _532111: return "Data Entry Operator"; + case _532112: return "Machine Shorthand Reporter"; + case _532113: return "Word Processing Operator"; + case _540000: return "Inquiry Clerks and Receptionists not further defined"; + case _541000: return "Call or Contact Centre Information Clerks not further defined"; + case _541100: return "Call or Contact Centre Workers not further defined"; + case _541111: return "Call or Contact Centre Team Leader"; + case _541112: return "Call or Contact Centre Operator"; + case _541211: return "Inquiry Clerk"; + case _542100: return "Receptionists not further defined"; + case _542111: return "Receptionist (General)"; + case _542112: return "Admissions Clerk"; + case _542113: return "Hotel or Motel Receptionist"; + case _542114: return "Medical Receptionist"; + case _550000: return "Numerical Clerks not further defined"; + case _551000: return "Accounting Clerks and Bookkeepers not further defined"; + case _551100: return "Accounting Clerks not further defined"; + case _551111: return "Accounts Clerk"; + case _551112: return "Cost Clerk"; + case _551211: return "Bookkeeper"; + case _551311: return "Payroll Clerk"; + case _552000: return "Financial and Insurance Clerks not further defined"; + case _552111: return "Bank Worker"; + case _552211: return "Credit or Loans Officer"; + case _552300: return "Insurance, Money Market and Statistical Clerks not further defined"; + case _552311: return "Bookmaker"; + case _552312: return "Insurance Consultant"; + case _552313: return "Money Market Clerk"; + case _552314: return "Statistical Clerk"; + case _561000: return "Clerical and Office Support Workers not further defined"; + case _561100: return "Betting Clerks not further defined"; + case _561111: return "Betting Agency Counter Clerk"; + case _561112: return "Bookmaker's Clerk"; + case _561113: return "Telephone Betting Clerk"; + case _561199: return "Betting Clerks not elsewhere classified"; + case _561200: return "Couriers and Postal Deliverers not further defined"; + case _561211: return "Courier"; + case _561212: return "Postal Delivery Officer"; + case _561311: return "Filing or Registry Clerk"; + case _561400: return "Mail Sorters not further defined"; + case _561411: return "Mail Clerk"; + case _561412: return "Postal Sorting Officer"; + case _561511: return "Survey Interviewer"; + case _561611: return "Switchboard Operator"; + case _561900: return "Other Clerical and Office Support Workers not further defined"; + case _561911: return "Classified Advertising Clerk"; + case _561912: return "Meter Reader"; + case _561913: return "Parking Inspector"; + case _561999: return "Clerical and Office Support Workers not elsewhere classified"; + case _590000: return "Other Clerical and Administrative Workers not further defined"; + case _591000: return "Logistics Clerks not further defined"; + case _591100: return "Purchasing and Supply Logistics Clerks not further defined"; + case _591111: return "Order Clerk"; + case _591112: return "Production Clerk"; + case _591113: return "Purchasing Officer"; + case _591114: return "Sales Clerk"; + case _591115: return "Stock Clerk"; + case _591116: return "Warehouse Administrator"; + case _591200: return "Transport and Despatch Clerks not further defined"; + case _591211: return "Despatching and Receiving Clerk"; + case _591212: return "Import-Export Clerk"; + case _599000: return "Miscellaneous Clerical and Administrative Workers not further defined"; + case _599100: return "Conveyancers and Legal Executives not further defined"; + case _599111: return "Conveyancer"; + case _599112: return "Legal Executive"; + case _599200: return "Court and Legal Clerks not further defined"; + case _599211: return "Clerk of Court"; + case _599212: return "Court Bailiff or Sheriff"; + case _599213: return "Court Orderly"; + case _599214: return "Law Clerk"; + case _599215: return "Trust Officer"; + case _599311: return "Debt Collector"; + case _599411: return "Human Resource Clerk"; + case _599500: return "Inspectors and Regulatory Officers not further defined"; + case _599511: return "Customs Officer"; + case _599512: return "Immigration Officer"; + case _599513: return "Motor Vehicle Licence Examiner"; + case _599514: return "Noxious Weeds and Pest Inspector"; + case _599515: return "Social Security Assessor"; + case _599516: return "Taxation Inspector"; + case _599517: return "Train Examiner"; + case _599518: return "Transport Operations Inspector"; + case _599521: return "Water Inspector"; + case _599599: return "Inspectors and Regulatory Officers not elsewhere classified"; + case _599600: return "Insurance Investigators, Loss Adjusters and Risk Surveyors not further defined"; + case _599611: return "Insurance Investigator"; + case _599612: return "Insurance Loss Adjuster"; + case _599613: return "Insurance Risk Surveyor"; + case _599711: return "Library Assistant"; + case _599900: return "Other Miscellaneous Clerical and Administrative Workers not further defined"; + case _599911: return "Coding Clerk"; + case _599912: return "Production Assistant (Film, Television, Radio or Stage)"; + case _599913: return "Proof Reader"; + case _599914: return "Radio Despatcher"; + case _599999: return "Clerical and Administrative Workers not elsewhere classified"; + case _600000: return "Sales Workers not further defined"; + case _610000: return "Sales Representatives and Agents not further defined"; + case _611000: return "Insurance Agents and Sales Representatives not further defined"; + case _611100: return "Auctioneers, and Stock and Station Agents not further defined"; + case _611111: return "Auctioneer"; + case _611112: return "Stock and Station Agent"; + case _611211: return "Insurance Agent"; + case _611300: return "Sales Representatives not further defined"; + case _611311: return "Sales Representative (Building and Plumbing Supplies)"; + case _611312: return "Sales Representative (Business Services)"; + case _611313: return "Sales Representative (Motor Vehicle Parts and Accessories)"; + case _611314: return "Sales Representative (Personal and Household Goods)"; + case _611399: return "Sales Representatives not elsewhere classified"; + case _612100: return "Real Estate Sales Agents not further defined"; + case _612111: return "Business Broker"; + case _612112: return "Property Manager"; + case _612113: return "Real Estate Agency Principal"; + case _612114: return "Real Estate Agent"; + case _612115: return "Real Estate Representative"; + case _621000: return "Sales Assistants and Salespersons not further defined"; + case _621111: return "Sales Assistant (General)"; + case _621211: return "ICT Sales Assistant"; + case _621300: return "Motor Vehicle and Vehicle Parts Salespersons not further defined"; + case _621311: return "Motor Vehicle or Caravan Salesperson"; + case _621312: return "Motor Vehicle Parts Interpreter"; + case _621411: return "Pharmacy Sales Assistant"; + case _621511: return "Retail Supervisor"; + case _621611: return "Service Station Attendant"; + case _621700: return "Street Vendors and Related Salespersons not further defined"; + case _621711: return "Cash Van Salesperson"; + case _621712: return "Door-to-door Salesperson"; + case _621713: return "Street Vendor"; + case _621900: return "Other Sales Assistants and Salespersons not further defined"; + case _621911: return "Materials Recycler"; + case _621912: return "Rental Salesperson"; + case _621999: return "Sales Assistants and Salespersons not elsewhere classified"; + case _630000: return "Sales Support Workers not further defined"; + case _631100: return "Checkout Operators and Office Cashiers not further defined"; + case _631111: return "Checkout Operator"; + case _631112: return "Office Cashier"; + case _639000: return "Miscellaneous Sales Support Workers not further defined"; + case _639100: return "Models and Sales Demonstrators not further defined"; + case _639111: return "Model"; + case _639112: return "Sales Demonstrator"; + case _639200: return "Retail and Wool Buyers not further defined"; + case _639211: return "Retail Buyer"; + case _639212: return "Wool Buyer"; + case _639311: return "Telemarketer"; + case _639400: return "Ticket Salespersons not further defined"; + case _639411: return "Ticket Seller"; + case _639412: return "Transport Conductor"; + case _639511: return "Visual Merchandiser"; + case _639911: return "Other Sales Support Worker"; + case _700000: return "Machinery Operators and Drivers not further defined"; + case _710000: return "Machine and Stationary Plant Operators not further defined"; + case _711000: return "Machine Operators not further defined"; + case _711100: return "Clay, Concrete, Glass and Stone Processing Machine Operators not further defined"; + case _711111: return "Clay Products Machine Operator"; + case _711112: return "Concrete Products Machine Operator"; + case _711113: return "Glass Production Machine Operator"; + case _711114: return "Stone Processing Machine Operator"; + case _711199: return "Clay, Concrete, Glass and Stone Processing Machine Operators not elsewhere classified"; + case _711211: return "Industrial Spraypainter"; + case _711300: return "Paper and Wood Processing Machine Operators not further defined"; + case _711311: return "Paper Products Machine Operator"; + case _711312: return "Wood Processing Machine Operator"; + case _711411: return "Photographic Developer and Printer"; + case _711500: return "Plastics and Rubber Production Machine Operators not further defined"; + case _711511: return "Plastic Cablemaking Machine Operator"; + case _711512: return "Plastic Compounding and Reclamation Machine Operator"; + case _711513: return "Plastics Fabricator or Welder"; + case _711514: return "Plastics Production Machine Operator (General)"; + case _711515: return "Reinforced Plastic and Composite Production Worker"; + case _711516: return "Rubber Production Machine Operator"; + case _711599: return "Plastics and Rubber Production Machine Operators not elsewhere classified"; + case _711611: return "Sewing Machinist"; + case _711700: return "Textile and Footwear Production Machine Operators not further defined"; + case _711711: return "Footwear Production Machine Operator"; + case _711712: return "Hide and Skin Processing Machine Operator"; + case _711713: return "Knitting Machine Operator"; + case _711714: return "Textile Dyeing and Finishing Machine Operator"; + case _711715: return "Weaving Machine Operator"; + case _711716: return "Yarn Carding and Spinning Machine Operator"; + case _711799: return "Textile and Footwear Production Machine Operators not elsewhere classified"; + case _711900: return "Other Machine Operators not further defined"; + case _711911: return "Chemical Production Machine Operator"; + case _711912: return "Motion Picture Projectionist"; + case _711913: return "Sand Blaster"; + case _711914: return "Sterilisation Technician"; + case _711999: return "Machine Operators not elsewhere classified"; + case _712000: return "Stationary Plant Operators not further defined"; + case _712111: return "Crane, Hoist or Lift Operator"; + case _712200: return "Drillers, Miners and Shot Firers not further defined"; + case _712211: return "Driller"; + case _712212: return "Miner"; + case _712213: return "Shot Firer"; + case _712311: return "Engineering Production Systems Worker"; + case _712900: return "Other Stationary Plant Operators not further defined"; + case _712911: return "Boiler or Engine Operator"; + case _712912: return "Bulk Materials Handling Plant Operator"; + case _712913: return "Cement Production Plant Operator"; + case _712914: return "Concrete Batching Plant Operator"; + case _712915: return "Concrete Pump Operator"; + case _712916: return "Paper and Pulp Mill Operator"; + case _712917: return "Railway Signal Operator"; + case _712918: return "Train Controller"; + case _712921: return "Waste Water or Water Plant Operator"; + case _712922: return "Weighbridge Operator"; + case _712999: return "Stationary Plant Operators not elsewhere classified"; + case _721000: return "Mobile Plant Operators not further defined"; + case _721100: return "Agricultural, Forestry and Horticultural Plant Operators not further defined"; + case _721111: return "Agricultural and Horticultural Mobile Plant Operator"; + case _721112: return "Logging Plant Operator"; + case _721200: return "Earthmoving Plant Operators not further defined"; + case _721211: return "Earthmoving Plant Operator (General)"; + case _721212: return "Backhoe Operator"; + case _721213: return "Bulldozer Operator"; + case _721214: return "Excavator Operator"; + case _721215: return "Grader Operator"; + case _721216: return "Loader Operator"; + case _721311: return "Forklift Driver"; + case _721900: return "Other Mobile Plant Operators not further defined"; + case _721911: return "Aircraft Baggage Handler and Airline Ground Crew"; + case _721912: return "Linemarker"; + case _721913: return "Paving Plant Operator"; + case _721914: return "Railway Track Plant Operator"; + case _721915: return "Road Roller Operator"; + case _721916: return "Streetsweeper Operator"; + case _721999: return "Mobile Plant Operators not elsewhere classified"; + case _730000: return "Road and Rail Drivers not further defined"; + case _731000: return "Automobile, Bus and Rail Drivers not further defined"; + case _731100: return "Automobile Drivers not further defined"; + case _731111: return "Chauffeur"; + case _731112: return "Taxi Driver"; + case _731199: return "Automobile Drivers not elsewhere classified"; + case _731200: return "Bus and Coach Drivers not further defined"; + case _731211: return "Bus Driver"; + case _731212: return "Charter and Tour Bus Driver"; + case _731213: return "Passenger Coach Driver"; + case _731300: return "Train and Tram Drivers not further defined"; + case _731311: return "Train Driver"; + case _731312: return "Tram Driver"; + case _732111: return "Delivery Driver"; + case _733100: return "Truck Drivers not further defined"; + case _733111: return "Truck Driver (General)"; + case _733112: return "Aircraft Refueller"; + case _733113: return "Furniture Removalist"; + case _733114: return "Tanker Driver"; + case _733115: return "Tow Truck Driver"; + case _741111: return "Storeperson"; + case _800000: return "Labourers not further defined"; + case _811000: return "Cleaners and Laundry Workers not further defined"; + case _811111: return "Car Detailer"; + case _811211: return "Commercial Cleaner"; + case _811311: return "Domestic Cleaner"; + case _811400: return "Housekeepers not further defined"; + case _811411: return "Commercial Housekeeper"; + case _811412: return "Domestic Housekeeper"; + case _811500: return "Laundry Workers not further defined"; + case _811511: return "Laundry Worker (General)"; + case _811512: return "Drycleaner"; + case _811513: return "Ironer or Presser"; + case _811600: return "Other Cleaners not further defined"; + case _811611: return "Carpet Cleaner"; + case _811612: return "Window Cleaner"; + case _811699: return "Cleaners not elsewhere classified"; + case _821000: return "Construction and Mining Labourers not further defined"; + case _821100: return "Building and Plumbing Labourers not further defined"; + case _821111: return "Builder's Labourer"; + case _821112: return "Drainage, Sewerage and Stormwater Labourer"; + case _821113: return "Earthmoving Labourer"; + case _821114: return "Plumber's Assistant"; + case _821211: return "Concreter"; + case _821311: return "Fencer"; + case _821400: return "Insulation and Home Improvement Installers not further defined"; + case _821411: return "Building Insulation Installer"; + case _821412: return "Home Improvement Installer"; + case _821511: return "Paving and Surfacing Labourer"; + case _821611: return "Railway Track Worker"; + case _821700: return "Structural Steel Construction Workers not further defined"; + case _821711: return "Construction Rigger"; + case _821712: return "Scaffolder"; + case _821713: return "Steel Fixer"; + case _821714: return "Structural Steel Erector"; + case _821900: return "Other Construction and Mining Labourers not further defined"; + case _821911: return "Crane Chaser"; + case _821912: return "Driller's Assistant"; + case _821913: return "Lagger"; + case _821914: return "Mining Support Worker"; + case _821915: return "Surveyor's Assistant"; + case _830000: return "Factory Process Workers not further defined"; + case _831000: return "Food Process Workers not further defined"; + case _831100: return "Food and Drink Factory Workers not further defined"; + case _831111: return "Baking Factory Worker"; + case _831112: return "Brewery Worker"; + case _831113: return "Confectionery Maker"; + case _831114: return "Dairy Products Maker"; + case _831115: return "Fruit and Vegetable Factory Worker"; + case _831116: return "Grain Mill Worker"; + case _831117: return "Sugar Mill Worker"; + case _831118: return "Winery Cellar Hand"; + case _831199: return "Food and Drink Factory Workers not elsewhere classified"; + case _831200: return "Meat Boners and Slicers, and Slaughterers not further defined"; + case _831211: return "Meat Boner and Slicer"; + case _831212: return "Slaughterer"; + case _831300: return "Meat, Poultry and Seafood Process Workers not further defined"; + case _831311: return "Meat Process Worker"; + case _831312: return "Poultry Process Worker"; + case _831313: return "Seafood Process Worker"; + case _832000: return "Packers and Product Assemblers not further defined"; + case _832100: return "Packers not further defined"; + case _832111: return "Chocolate Packer"; + case _832112: return "Container Filler"; + case _832113: return "Fruit and Vegetable Packer"; + case _832114: return "Meat Packer"; + case _832115: return "Seafood Packer"; + case _832199: return "Packers not elsewhere classified"; + case _832211: return "Product Assembler"; + case _839000: return "Miscellaneous Factory Process Workers not further defined"; + case _839111: return "Metal Engineering Process Worker"; + case _839200: return "Plastics and Rubber Factory Workers not further defined"; + case _839211: return "Plastics Factory Worker"; + case _839212: return "Rubber Factory Worker"; + case _839300: return "Product Quality Controllers not further defined"; + case _839311: return "Product Examiner"; + case _839312: return "Product Grader"; + case _839313: return "Product Tester"; + case _839400: return "Timber and Wood Process Workers not further defined"; + case _839411: return "Paper and Pulp Mill Worker"; + case _839412: return "Sawmill or Timber Yard Worker"; + case _839413: return "Wood and Wood Products Factory Worker"; + case _839900: return "Other Factory Process Workers not further defined"; + case _839911: return "Cement and Concrete Plant Worker"; + case _839912: return "Chemical Plant Worker"; + case _839913: return "Clay Processing Factory Worker"; + case _839914: return "Fabric and Textile Factory Worker"; + case _839915: return "Footwear Factory Worker"; + case _839916: return "Glass Processing Worker"; + case _839917: return "Hide and Skin Processing Worker"; + case _839999: return "Factory Process Workers not elsewhere classified"; + case _841000: return "Farm, Forestry and Garden Workers not further defined"; + case _841111: return "Aquaculture Worker"; + case _841200: return "Crop Farm Workers not further defined"; + case _841211: return "Fruit or Nut Farm Worker"; + case _841212: return "Fruit or Nut Picker"; + case _841213: return "Grain, Oilseed or Pasture Farm Worker"; + case _841214: return "Vegetable Farm Worker"; + case _841215: return "Vegetable Picker"; + case _841216: return "Vineyard Worker"; + case _841299: return "Crop Farm Workers not elsewhere classified"; + case _841300: return "Forestry and Logging Workers not further defined"; + case _841311: return "Forestry Worker"; + case _841312: return "Logging Assistant"; + case _841313: return "Tree Faller"; + case _841400: return "Garden and Nursery Labourers not further defined"; + case _841411: return "Garden Labourer"; + case _841412: return "Horticultural Nursery Assistant"; + case _841500: return "Livestock Farm Workers not further defined"; + case _841511: return "Beef Cattle Farm Worker"; + case _841512: return "Dairy Cattle Farm Worker"; + case _841513: return "Mixed Livestock Farm Worker"; + case _841514: return "Poultry Farm Worker"; + case _841515: return "Sheep Farm Worker"; + case _841516: return "Stablehand"; + case _841517: return "Wool Handler"; + case _841599: return "Livestock Farm Workers not elsewhere classified"; + case _841611: return "Mixed Crop and Livestock Farm Worker"; + case _841900: return "Other Farm, Forestry and Garden Workers not further defined"; + case _841911: return "Hunter-Trapper"; + case _841912: return "Pest or Weed Controller"; + case _841999: return "Farm, Forestry and Garden Workers not elsewhere classified"; + case _851000: return "Food Preparation Assistants not further defined"; + case _851111: return "Fast Food Cook"; + case _851200: return "Food Trades Assistants not further defined"; + case _851211: return "Pastrycook's Assistant"; + case _851299: return "Food Trades Assistants not elsewhere classified"; + case _851311: return "Kitchenhand"; + case _890000: return "Other Labourers not further defined"; + case _891000: return "Freight Handlers and Shelf Fillers not further defined"; + case _891100: return "Freight and Furniture Handlers not further defined"; + case _891111: return "Freight Handler (Rail or Road)"; + case _891112: return "Truck Driver's Offsider"; + case _891113: return "Waterside Worker"; + case _891211: return "Shelf Filler"; + case _899000: return "Miscellaneous Labourers not further defined"; + case _899111: return "Caretaker"; + case _899200: return "Deck and Fishing Hands not further defined"; + case _899211: return "Deck Hand"; + case _899212: return "Fishing Hand"; + case _899311: return "Handyperson"; + case _899400: return "Motor Vehicle Parts and Accessories Fitters not further defined"; + case _899411: return "Motor Vehicle Parts and Accessories Fitter (General)"; + case _899412: return "Autoglazier"; + case _899413: return "Exhaust and Muffler Fitter"; + case _899414: return "Radiator Fitter"; + case _899415: return "Tyre Fitter"; + case _899500: return "Printing Assistants and Table Workers not further defined"; + case _899511: return "Printer's Assistant"; + case _899512: return "Printing Table Worker"; + case _899611: return "Recycling or Rubbish Collector"; + case _899711: return "Vending Machine Attendant"; + case _899900: return "Other Miscellaneous Labourers not further defined"; + case _899911: return "Bicycle Mechanic"; + case _899912: return "Car Park Attendant"; + case _899913: return "Crossing Supervisor"; + case _899914: return "Electrical or Telecommunications Trades Assistant"; + case _899915: return "Leaflet or Newspaper Deliverer"; + case _899916: return "Mechanic's Assistant"; + case _899917: return "Railways Assistant"; + case _899918: return "Sign Erector"; + case _899921: return "Ticket Collector or Usher"; + case _899922: return "Trolley Collector"; + case _899999: return "Labourers not elsewhere classified"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _100000: return "Managers nfd"; + case _111000: return "Chief Executives, General Managers and Legislators nfd"; + case _111111: return "Chief Executive or Managing Director"; + case _111200: return "General Managers nfd"; + case _111211: return "Corporate General Manager"; + case _111212: return "Defence Force Senior Officer"; + case _111300: return "Legislators nfd"; + case _111311: return "Local Government Legislator"; + case _111312: return "Member of Parliament"; + case _111399: return "Legislators nec"; + case _121000: return "Farmers and Farm Managers nfd"; + case _121111: return "Aquaculture Farmer"; + case _121200: return "Crop Farmers nfd"; + case _121211: return "Cotton Grower"; + case _121212: return "Flower Grower"; + case _121213: return "Fruit or Nut Grower"; + case _121214: return "Grain, Oilseed or Pasture Grower"; + case _121215: return "Grape Grower"; + case _121216: return "Mixed Crop Farmer"; + case _121217: return "Sugar Cane Grower"; + case _121218: return "Turf Grower"; + case _121221: return "Vegetable Grower"; + case _121299: return "Crop Farmers nec"; + case _121300: return "Livestock Farmers nfd"; + case _121311: return "Apiarist"; + case _121312: return "Beef Cattle Farmer"; + case _121313: return "Dairy Cattle Farmer"; + case _121314: return "Deer Farmer"; + case _121315: return "Goat Farmer"; + case _121316: return "Horse Breeder"; + case _121317: return "Mixed Livestock Farmer"; + case _121318: return "Pig Farmer"; + case _121321: return "Poultry Farmer"; + case _121322: return "Sheep Farmer"; + case _121399: return "Livestock Farmers nec"; + case _121411: return "Mixed Crop and Livestock Farmer"; + case _130000: return "Specialist Managers nfd"; + case _131100: return "Advertising and Sales Managers nfd"; + case _131111: return "Advertising and Public Relations Manager"; + case _131112: return "Sales and Marketing Manager"; + case _132000: return "Business Administration Managers nfd"; + case _132111: return "Corporate Services Manager"; + case _132211: return "Finance Manager"; + case _132311: return "Human Resource Manager"; + case _132411: return "Policy and Planning Manager"; + case _132511: return "Research and Development Manager"; + case _133000: return "Construction, Distribution and Production Managers nfd"; + case _133100: return "Construction Managers nfd"; + case _133111: return "Construction Project Manager"; + case _133112: return "Project Builder"; + case _133211: return "Engineering Manager"; + case _133300: return "Importers, Exporters and Wholesalers nfd"; + case _133311: return "Importer or Exporter"; + case _133312: return "Wholesaler"; + case _133411: return "Manufacturer"; + case _133500: return "Production Managers nfd"; + case _133511: return "Production Manager (Forestry)"; + case _133512: return "Production Manager (Manufacturing)"; + case _133513: return "Production Manager (Mining)"; + case _133611: return "Supply and Distribution Manager"; + case _134000: return "Education, Health and Welfare Services Managers nfd"; + case _134111: return "Child Care Centre Manager"; + case _134200: return "Health and Welfare Services Managers nfd"; + case _134211: return "Medical Administrator"; + case _134212: return "Nursing Clinical Director"; + case _134213: return "Primary Health Organization Manager"; + case _134214: return "Welfare Centre Manager"; + case _134299: return "Health and Welfare Services Managers nec"; + case _134311: return "School Principal"; + case _134400: return "Other Education Managers nfd"; + case _134411: return "Faculty Head"; + case _134412: return "Regional Education Manager"; + case _134499: return "Education Managers nec"; + case _135100: return "ICT Managers nfd"; + case _135111: return "Chief Information Officer"; + case _135112: return "ICT Project Manager"; + case _135199: return "ICT Managers nec"; + case _139000: return "Miscellaneous Specialist Managers nfd"; + case _139100: return "Commissioned Officers (Management) nfd"; + case _139111: return "Commissioned Defence Force Officer"; + case _139112: return "Commissioned Fire Officer"; + case _139113: return "Commissioned Police Officer"; + case _139211: return "Senior Non-commissioned Defence Force Member"; + case _139900: return "Other Specialist Managers nfd"; + case _139911: return "Arts Administrator or Manager"; + case _139912: return "Environmental Manager"; + case _139913: return "Laboratory Manager"; + case _139914: return "Quality Assurance Manager"; + case _139915: return "Sports Administrator"; + case _139999: return "Specialist Managers nec"; + case _140000: return "Hospitality, Retail and Service Managers nfd"; + case _141000: return "Accommodation and Hospitality Managers nfd"; + case _141111: return "Cafe or Restaurant Manager"; + case _141211: return "Caravan Park and Camping Ground Manager"; + case _141311: return "Hotel or Motel Manager"; + case _141411: return "Licensed Club Manager"; + case _141900: return "Other Accommodation and Hospitality Managers nfd"; + case _141911: return "Bed and Breakfast Operator"; + case _141999: return "Accommodation and Hospitality Managers nec"; + case _142100: return "Retail Managers nfd"; + case _142111: return "Retail Manager (General)"; + case _142112: return "Antique Dealer"; + case _142113: return "Betting Agency Manager"; + case _142114: return "Hair or Beauty Salon Manager"; + case _142115: return "Post Office Manager"; + case _142116: return "Travel Agency Manager"; + case _149000: return "Miscellaneous Hospitality, Retail and Service Managers nfd"; + case _149100: return "Amusement, Fitness and Sports Centre Managers nfd"; + case _149111: return "Amusement Centre Manager"; + case _149112: return "Fitness Centre Manager"; + case _149113: return "Sports Centre Manager"; + case _149200: return "Call or Contact Centre and Customer Service Managers nfd"; + case _149211: return "Call or Contact Centre Manager"; + case _149212: return "Customer Service Manager"; + case _149311: return "Conference and Event Organizer"; + case _149400: return "Transport Services Managers nfd"; + case _149411: return "Fleet Manager"; + case _149412: return "Railway Station Manager"; + case _149413: return "Transport Company Manager"; + case _149900: return "Other Hospitality, Retail and Service Managers nfd"; + case _149911: return "Boarding Kennel or Cattery Operator"; + case _149912: return "Cinema or Theatre Manager"; + case _149913: return "Facilities Manager"; + case _149914: return "Financial Institution Branch Manager"; + case _149999: return "Hospitality, Retail and Service Managers nec"; + case _200000: return "Professionals nfd"; + case _210000: return "Arts and Media Professionals nfd"; + case _211000: return "Arts Professionals nfd"; + case _211100: return "Actors, Dancers and Other Entertainers nfd"; + case _211111: return "Actor"; + case _211112: return "Dancer or Choreographer"; + case _211113: return "Entertainer or Variety Artist"; + case _211199: return "Actors, Dancers and Other Entertainers nec"; + case _211200: return "Music Professionals nfd"; + case _211211: return "Composer"; + case _211212: return "Music Director"; + case _211213: return "Musician (Instrumental)"; + case _211214: return "Singer"; + case _211299: return "Music Professionals nec"; + case _211311: return "Photographer"; + case _211400: return "Visual Arts and Crafts Professionals nfd"; + case _211411: return "Painter (Visual Arts)"; + case _211412: return "Potter or Ceramic Artist"; + case _211413: return "Sculptor"; + case _211499: return "Visual Arts and Crafts Professionals nec"; + case _212000: return "Media Professionals nfd"; + case _212100: return "Artistic Directors, and Media Producers and Presenters nfd"; + case _212111: return "Artistic Director"; + case _212112: return "Media Producer (excluding Video)"; + case _212113: return "Radio Presenter"; + case _212114: return "Television Presenter"; + case _212200: return "Authors, and Book and Script Editors nfd"; + case _212211: return "Author"; + case _212212: return "Book or Script Editor"; + case _212300: return "Film, Television, Radio and Stage Directors nfd"; + case _212311: return "Art Director (Film, Television or Stage)"; + case _212312: return "Director (Film, Television, Radio or Stage)"; + case _212313: return "Director of Photography"; + case _212314: return "Film and Video Editor"; + case _212315: return "Program Director (Television or Radio)"; + case _212316: return "Stage Manager"; + case _212317: return "Technical Director"; + case _212318: return "Video Producer"; + case _212399: return "Film, Television, Radio and Stage Directors nec"; + case _212400: return "Journalists and Other Writers nfd"; + case _212411: return "Copywriter"; + case _212412: return "Newspaper or Periodical Editor"; + case _212413: return "Print Journalist"; + case _212414: return "Radio Journalist"; + case _212415: return "Technical Writer"; + case _212416: return "Television Journalist"; + case _212499: return "Journalists and Other Writers nec"; + case _220000: return "Business, Human Resource and Marketing Professionals nfd"; + case _221000: return "Accountants, Auditors and Company Secretaries nfd"; + case _221100: return "Accountants nfd"; + case _221111: return "Accountant (General)"; + case _221112: return "Management Accountant"; + case _221113: return "Taxation Accountant"; + case _221200: return "Auditors, Company Secretaries and Corporate Treasurers nfd"; + case _221211: return "Company Secretary"; + case _221212: return "Corporate Treasurer"; + case _221213: return "External Auditor"; + case _221214: return "Internal Auditor"; + case _222000: return "Financial Brokers and Dealers, and Investment Advisers nfd"; + case _222100: return "Financial Brokers nfd"; + case _222111: return "Commodities Trader"; + case _222112: return "Finance Broker"; + case _222113: return "Insurance Broker"; + case _222199: return "Financial Brokers nec"; + case _222200: return "Financial Dealers nfd"; + case _222211: return "Financial Market Dealer"; + case _222212: return "Futures Trader"; + case _222213: return "Stockbroking Dealer"; + case _222299: return "Financial Dealers nec"; + case _222300: return "Financial Investment Advisers and Managers nfd"; + case _222311: return "Financial Investment Adviser"; + case _222312: return "Financial Investment Manager"; + case _223000: return "Human Resource and Training Professionals nfd"; + case _223100: return "Human Resource Professionals nfd"; + case _223111: return "Human Resource Adviser"; + case _223112: return "Recruitment Consultant"; + case _223113: return "Workplace Relations Adviser"; + case _223211: return "ICT Trainer"; + case _223311: return "Training and Development Professional"; + case _224000: return "Information and Organization Professionals nfd"; + case _224100: return "Actuaries, Mathematicians and Statisticians nfd"; + case _224111: return "Actuary"; + case _224112: return "Mathematician"; + case _224113: return "Statistician"; + case _224200: return "Archivists, Curators and Records Managers nfd"; + case _224211: return "Archivist"; + case _224212: return "Gallery or Museum Curator"; + case _224213: return "Health Information Manager"; + case _224214: return "Records Manager"; + case _224311: return "Economist"; + case _224400: return "Intelligence and Policy Analysts nfd"; + case _224411: return "Intelligence Officer"; + case _224412: return "Policy Analyst"; + case _224500: return "Land Economists and Valuers nfd"; + case _224511: return "Land Economist"; + case _224512: return "Valuer"; + case _224611: return "Librarian"; + case _224700: return "Management and Organization Analysts nfd"; + case _224711: return "Management Consultant"; + case _224712: return "Organization and Methods Analyst"; + case _224900: return "Other Information and Organization Professionals nfd"; + case _224911: return "Electorate Officer"; + case _224912: return "Liaison Officer"; + case _224913: return "Migration Agent"; + case _224914: return "Patents Examiner"; + case _224999: return "Information and Organization Professionals nec"; + case _225000: return "Sales, Marketing and Public Relations Professionals nfd"; + case _225100: return "Advertising and Marketing Professionals nfd"; + case _225111: return "Advertising Specialist"; + case _225112: return "Market Research Analyst"; + case _225113: return "Marketing Specialist"; + case _225200: return "ICT Sales Professionals nfd"; + case _225211: return "ICT Account Manager"; + case _225212: return "ICT Business Development Manager"; + case _225213: return "ICT Sales Representative"; + case _225311: return "Public Relations Professional"; + case _225400: return "Technical Sales Representatives nfd"; + case _225411: return "Sales Representative (Industrial Products)"; + case _225412: return "Sales Representative (Medical and Pharmaceutical Products)"; + case _225499: return "Technical Sales Representatives nec"; + case _230000: return "Design, Engineering, Science and Transport Professionals nfd"; + case _231000: return "Air and Marine Transport Professionals nfd"; + case _231100: return "Air Transport Professionals nfd"; + case _231111: return "Aeroplane Pilot"; + case _231112: return "Air Traffic Controller"; + case _231113: return "Flying Instructor"; + case _231114: return "Helicopter Pilot"; + case _231199: return "Air Transport Professionals nec"; + case _231200: return "Marine Transport Professionals nfd"; + case _231211: return "Master Fisher"; + case _231212: return "Ship's Engineer"; + case _231213: return "Ship's Master"; + case _231214: return "Ship's Officer"; + case _231215: return "Ship's Surveyor"; + case _231299: return "Marine Transport Professionals nec"; + case _232000: return "Architects, Designers, Planners and Surveyors nfd"; + case _232100: return "Architects and Landscape Architects nfd"; + case _232111: return "Architect"; + case _232112: return "Landscape Architect"; + case _232200: return "Cartographers and Surveyors nfd"; + case _232211: return "Cartographer"; + case _232212: return "Surveyor"; + case _232300: return "Fashion, Industrial and Jewellery Designers nfd"; + case _232311: return "Fashion Designer"; + case _232312: return "Industrial Designer"; + case _232313: return "Jewellery Designer"; + case _232400: return "Graphic and Web Designers, and Illustrators nfd"; + case _232411: return "Graphic Designer"; + case _232412: return "Illustrator"; + case _232413: return "Multimedia Designer"; + case _232414: return "Web Designer"; + case _232511: return "Interior Designer"; + case _232611: return "Urban and Regional Planner"; + case _233000: return "Engineering Professionals nfd"; + case _233100: return "Chemical and Materials Engineers nfd"; + case _233111: return "Chemical Engineer"; + case _233112: return "Materials Engineer"; + case _233200: return "Civil Engineering Professionals nfd"; + case _233211: return "Civil Engineer"; + case _233212: return "Geotechnical Engineer"; + case _233213: return "Quantity Surveyor"; + case _233214: return "Structural Engineer"; + case _233215: return "Transport Engineer"; + case _233311: return "Electrical Engineer"; + case _233411: return "Electronics Engineer"; + case _233500: return "Industrial, Mechanical and Production Engineers nfd"; + case _233511: return "Industrial Engineer"; + case _233512: return "Mechanical Engineer"; + case _233513: return "Production or Plant Engineer"; + case _233600: return "Mining Engineers nfd"; + case _233611: return "Mining Engineer (excluding Petroleum)"; + case _233612: return "Petroleum Engineer"; + case _233900: return "Other Engineering Professionals nfd"; + case _233911: return "Aeronautical Engineer"; + case _233912: return "Agricultural Engineer"; + case _233913: return "Biomedical Engineer"; + case _233914: return "Engineering Technologist"; + case _233915: return "Environmental Engineer"; + case _233916: return "Naval Architect"; + case _233999: return "Engineering Professionals nec"; + case _234000: return "Natural and Physical Science Professionals nfd"; + case _234100: return "Agricultural and Forestry Scientists nfd"; + case _234111: return "Agricultural Consultant"; + case _234112: return "Agricultural Scientist"; + case _234113: return "Forester"; + case _234200: return "Chemists, and Food and Wine Scientists nfd"; + case _234211: return "Chemist"; + case _234212: return "Food Technologist"; + case _234213: return "Wine Maker"; + case _234300: return "Environmental Scientists nfd"; + case _234311: return "Conservation Officer"; + case _234312: return "Environmental Consultant"; + case _234313: return "Environmental Research Scientist"; + case _234314: return "Park Ranger"; + case _234399: return "Environmental Scientists nec"; + case _234400: return "Geologists and Geophysicists nfd"; + case _234411: return "Geologist"; + case _234412: return "Geophysicist"; + case _234500: return "Life Scientists nfd"; + case _234511: return "Life Scientist (General)"; + case _234512: return "Anatomist or Physiologist"; + case _234513: return "Biochemist"; + case _234514: return "Biotechnologist"; + case _234515: return "Botanist"; + case _234516: return "Marine Biologist"; + case _234517: return "Microbiologist"; + case _234518: return "Zoologist"; + case _234599: return "Life Scientists nec"; + case _234611: return "Medical Laboratory Scientist"; + case _234711: return "Veterinarian"; + case _234900: return "Other Natural and Physical Science Professionals nfd"; + case _234911: return "Conservator"; + case _234912: return "Metallurgist"; + case _234913: return "Meteorologist"; + case _234914: return "Physicist"; + case _234999: return "Natural and Physical Science Professionals nec"; + case _240000: return "Education Professionals nfd"; + case _241000: return "School Teachers nfd"; + case _241111: return "Early Childhood (Pre-primary School) Teacher"; + case _241213: return "Primary School Teacher"; + case _241311: return "Middle School Teacher"; + case _241411: return "Secondary School Teacher"; + case _241500: return "Special Education Teachers nfd"; + case _241511: return "Special Needs Teacher"; + case _241512: return "Teacher of the Hearing Impaired"; + case _241513: return "Teacher of the Sight Impaired"; + case _241599: return "Special Education Teachers nec"; + case _242000: return "Tertiary Education Teachers nfd"; + case _242100: return "University Lecturers and Tutors nfd"; + case _242111: return "University Lecturer"; + case _242112: return "University Tutor"; + case _242211: return "Vocational Education Teacher"; + case _249000: return "Miscellaneous Education Professionals nfd"; + case _249100: return "Education Advisers and Reviewers nfd"; + case _249111: return "Education Adviser"; + case _249112: return "Education Reviewer"; + case _249200: return "Private Tutors and Teachers nfd"; + case _249211: return "Art Teacher (Private Tuition)"; + case _249212: return "Dance Teacher (Private Tuition)"; + case _249213: return "Drama Teacher (Private Tuition)"; + case _249214: return "Music Teacher (Private Tuition)"; + case _249299: return "Private Tutors and Teachers nec"; + case _249311: return "Teacher of English to Speakers of Other Languages"; + case _250000: return "Health Professionals nfd"; + case _251000: return "Health Diagnostic and Promotion Professionals nfd"; + case _251111: return "Dietitian"; + case _251200: return "Medical Imaging Professionals nfd"; + case _251211: return "Medical Diagnostic Radiographer"; + case _251212: return "Medical Radiation Therapist"; + case _251213: return "Nuclear Medicine Technologist"; + case _251214: return "Sonographer"; + case _251300: return "Occupational and Environmental Health Professionals nfd"; + case _251311: return "Environmental Health Officer"; + case _251312: return "Occupational Health and Safety Adviser"; + case _251400: return "Optometrists and Orthoptists nfd"; + case _251411: return "Optometrist"; + case _251412: return "Orthoptist"; + case _251500: return "Pharmacists nfd"; + case _251511: return "Hospital Pharmacist"; + case _251512: return "Industrial Pharmacist"; + case _251513: return "Retail Pharmacist"; + case _251900: return "Other Health Diagnostic and Promotion Professionals nfd"; + case _251911: return "Health Promotion Officer"; + case _251912: return "Orthotist or Prosthetist"; + case _251999: return "Health Diagnostic and Promotion Professionals nec"; + case _252000: return "Health Therapy Professionals nfd"; + case _252100: return "Chiropractors and Osteopaths nfd"; + case _252111: return "Chiropractor"; + case _252112: return "Osteopath"; + case _252200: return "Complementary Health Therapists nfd"; + case _252211: return "Acupuncturist"; + case _252212: return "Homoeopath"; + case _252213: return "Naturopath"; + case _252214: return "Traditional Chinese Medicine Practitioner"; + case _252299: return "Complementary Health Therapists nec"; + case _252300: return "Dental Practitioners nfd"; + case _252311: return "Dental Specialist"; + case _252312: return "Dentist"; + case _252411: return "Occupational Therapist"; + case _252511: return "Physiotherapist"; + case _252611: return "Podiatrist"; + case _252700: return "Speech Professionals and Audiologists nfd"; + case _252711: return "Audiologist"; + case _252712: return "Speech Pathologist"; + case _253000: return "Medical Practitioners nfd"; + case _253100: return "Generalist Medical Practitioners nfd"; + case _253111: return "General Medical Practitioner"; + case _253112: return "Resident Medical Officer"; + case _253211: return "Anaesthetist"; + case _253300: return "Internal Medicine Specialists nfd"; + case _253311: return "Specialist Physician (General Medicine)"; + case _253312: return "Cardiologist"; + case _253313: return "Clinical Haematologist"; + case _253314: return "Clinical Oncologist"; + case _253315: return "Endocrinologist"; + case _253316: return "Gastroenterologist"; + case _253317: return "Intensive Care Specialist"; + case _253318: return "Neurologist"; + case _253321: return "Paediatrician"; + case _253322: return "Renal Medicine Specialist"; + case _253323: return "Rheumatologist"; + case _253324: return "Thoracic Medicine Specialist"; + case _253399: return "Internal Medicine Specialists nec"; + case _253411: return "Psychiatrist"; + case _253500: return "Surgeons nfd"; + case _253511: return "Surgeon (General)"; + case _253512: return "Cardiothoracic Surgeon"; + case _253513: return "Neurosurgeon"; + case _253514: return "Orthopaedic Surgeon"; + case _253515: return "Otorhinolaryngologist"; + case _253516: return "Paediatric Surgeon"; + case _253517: return "Plastic and Reconstructive Surgeon"; + case _253518: return "Urologist"; + case _253521: return "Vascular Surgeon"; + case _253900: return "Other Medical Practitioners nfd"; + case _253911: return "Dermatologist"; + case _253912: return "Emergency Medicine Specialist"; + case _253913: return "Obstetrician and Gynaecologist"; + case _253914: return "Ophthalmologist"; + case _253915: return "Pathologist"; + case _253916: return "Radiologist"; + case _253999: return "Medical Practitioners nec"; + case _254000: return "Midwifery and Nursing Professionals nfd"; + case _254111: return "Midwife"; + case _254200: return "Nurse Educators and Researchers nfd"; + case _254211: return "Nurse Educator"; + case _254212: return "Nurse Researcher"; + case _254311: return "Nurse Manager"; + case _254400: return "Registered Nurses nfd"; + case _254411: return "Nurse Practitioner"; + case _254412: return "Registered Nurse (Aged Care)"; + case _254413: return "Registered Nurse (Child and Family Health)"; + case _254414: return "Registered Nurse (Community Health)"; + case _254415: return "Registered Nurse (Critical Care and Emergency)"; + case _254416: return "Registered Nurse (Developmental Disability)"; + case _254417: return "Registered Nurse (Disability and Rehabilitation)"; + case _254418: return "Registered Nurse (Medical)"; + case _254421: return "Registered Nurse (Medical Practice)"; + case _254422: return "Registered Nurse (Mental Health)"; + case _254423: return "Registered Nurse (Perioperative)"; + case _254424: return "Registered Nurse (Surgical)"; + case _254499: return "Registered Nurses nec"; + case _260000: return "ICT Professionals nfd"; + case _261000: return "Business and Systems Analysts, and Programmers nfd"; + case _261100: return "ICT Business and Systems Analysts nfd"; + case _261111: return "ICT Business Analyst"; + case _261112: return "Systems Analyst"; + case _261200: return "Multimedia Specialists and Web Developers nfd"; + case _261211: return "Multimedia Specialist"; + case _261212: return "Web Developer"; + case _261300: return "Software and Applications Programmers nfd"; + case _261311: return "Analyst Programmer"; + case _261312: return "Developer Programmer"; + case _261313: return "Software Engineer"; + case _261399: return "Software and Applications Programmers nec"; + case _262100: return "Database and Systems Administrators, and ICT Security Specialists nfd"; + case _262111: return "Database Administrator"; + case _262112: return "ICT Security Specialist"; + case _262113: return "Systems Administrator"; + case _263000: return "ICT Network and Support Professionals nfd"; + case _263100: return "Computer Network Professionals nfd"; + case _263111: return "Computer Network and Systems Engineer"; + case _263112: return "Network Administrator"; + case _263113: return "Network Analyst"; + case _263200: return "ICT Support and Test Engineers nfd"; + case _263211: return "ICT Quality Assurance Engineer"; + case _263212: return "ICT Support Engineer"; + case _263213: return "ICT Systems Test Engineer"; + case _263299: return "ICT Support and Test Engineers nec"; + case _263300: return "Telecommunications Engineering Professionals nfd"; + case _263311: return "Telecommunications Engineer"; + case _263312: return "Telecommunications Network Engineer"; + case _270000: return "Legal, Social and Welfare Professionals nfd"; + case _271000: return "Legal Professionals nfd"; + case _271111: return "Barrister"; + case _271200: return "Judicial and Other Legal Professionals nfd"; + case _271211: return "Judge"; + case _271212: return "Magistrate"; + case _271213: return "Tribunal Member"; + case _271299: return "Judicial and Other Legal Professionals nec"; + case _271311: return "Solicitor"; + case _272000: return "Social and Welfare Professionals nfd"; + case _272100: return "Counsellors nfd"; + case _272111: return "Careers Counsellor"; + case _272112: return "Drug and Alcohol Counsellor"; + case _272113: return "Family and Marriage Counsellor"; + case _272114: return "Rehabilitation Counsellor"; + case _272115: return "Student Counsellor"; + case _272199: return "Counsellors nec"; + case _272211: return "Minister of Religion"; + case _272300: return "Psychologists nfd"; + case _272311: return "Clinical Psychologist"; + case _272312: return "Educational Psychologist"; + case _272313: return "Organizational Psychologist"; + case _272314: return "Psychotherapist"; + case _272399: return "Psychologists nec"; + case _272400: return "Social Professionals nfd"; + case _272411: return "Historian"; + case _272412: return "Interpreter"; + case _272413: return "Translator"; + case _272499: return "Social Professionals nec"; + case _272511: return "Social Worker"; + case _272600: return "Welfare, Recreation and Community Arts Workers nfd"; + case _272611: return "Community Arts Worker"; + case _272612: return "Recreation Officer"; + case _272613: return "Welfare Worker"; + case _300000: return "Technicians and Trades Workers nfd"; + case _310000: return "Engineering, ICT and Science Technicians nfd"; + case _311000: return "Agricultural, Medical and Science Technicians nfd"; + case _311111: return "Agricultural Technician"; + case _311200: return "Medical Technicians nfd"; + case _311211: return "Anaesthetic Technician"; + case _311212: return "Cardiac Technician"; + case _311213: return "Medical Laboratory Technician"; + case _311214: return "Operating Theatre Technician"; + case _311215: return "Pharmacy Technician"; + case _311299: return "Medical Technicians nec"; + case _311300: return "Primary Products Inspectors nfd"; + case _311311: return "Fisheries Officer"; + case _311312: return "Meat Inspector"; + case _311313: return "Quarantine Officer"; + case _311399: return "Primary Products Inspectors nec"; + case _311400: return "Science Technicians nfd"; + case _311411: return "Chemistry Technician"; + case _311412: return "Earth Science Technician"; + case _311413: return "Life Science Technician"; + case _311414: return "School Laboratory Technician"; + case _311499: return "Science Technicians nec"; + case _312000: return "Building and Engineering Technicians nfd"; + case _312100: return "Architectural, Building and Surveying Technicians nfd"; + case _312111: return "Architectural Draftsperson"; + case _312112: return "Building Associate"; + case _312113: return "Building Inspector"; + case _312114: return "Construction Estimator"; + case _312115: return "Plumbing Inspector"; + case _312116: return "Surveying or Cartographic Technician"; + case _312200: return "Civil Engineering Draftspersons and Technicians nfd"; + case _312211: return "Civil Engineering Draftsperson"; + case _312212: return "Civil Engineering Technician"; + case _312300: return "Electrical Engineering Draftspersons and Technicians nfd"; + case _312311: return "Electrical Engineering Draftsperson"; + case _312312: return "Electrical Engineering Technician"; + case _312400: return "Electronic Engineering Draftspersons and Technicians nfd"; + case _312411: return "Electronic Engineering Draftsperson"; + case _312412: return "Electronic Engineering Technician"; + case _312500: return "Mechanical Engineering Draftspersons and Technicians nfd"; + case _312511: return "Mechanical Engineering Draftsperson"; + case _312512: return "Mechanical Engineering Technician"; + case _312611: return "Safety Inspector"; + case _312900: return "Other Building and Engineering Technicians nfd"; + case _312911: return "Maintenance Planner"; + case _312912: return "Metallurgical or Materials Technician"; + case _312913: return "Mine Deputy"; + case _312999: return "Building and Engineering Technicians nec"; + case _313000: return "ICT and Telecommunications Technicians nfd"; + case _313100: return "ICT Support Technicians nfd"; + case _313111: return "Hardware Technician"; + case _313112: return "ICT Customer Support Officer"; + case _313113: return "Web Administrator"; + case _313199: return "ICT Support Technicians nec"; + case _313200: return "Telecommunications Technical Specialists nfd"; + case _313211: return "Radiocommunications Technician"; + case _313212: return "Telecommunications Field Engineer"; + case _313213: return "Telecommunications Network Planner"; + case _313214: return "Telecommunications Technical Officer or Technologist"; + case _320000: return "Automotive and Engineering Trades Workers nfd"; + case _321000: return "Automotive Electricians and Mechanics nfd"; + case _321111: return "Automotive Electrician"; + case _321200: return "Motor Mechanics nfd"; + case _321211: return "Motor Mechanic (General)"; + case _321212: return "Diesel Motor Mechanic"; + case _321213: return "Motorcycle Mechanic"; + case _321214: return "Small Engine Mechanic"; + case _322000: return "Fabrication Engineering Trades Workers nfd"; + case _322100: return "Metal Casting, Forging and Finishing Trades Workers nfd"; + case _322111: return "Blacksmith"; + case _322112: return "Electroplater"; + case _322113: return "Farrier"; + case _322114: return "Metal Casting Trades Worker"; + case _322115: return "Metal Polisher"; + case _322211: return "Sheetmetal Trades Worker"; + case _322300: return "Structural Steel and Welding Trades Workers nfd"; + case _322311: return "Metal Fabricator"; + case _322312: return "Pressure Welder"; + case _322313: return "Welder (First Class)"; + case _323000: return "Mechanical Engineering Trades Workers nfd"; + case _323100: return "Aircraft Maintenance Engineers nfd"; + case _323111: return "Aircraft Maintenance Engineer (Avionics)"; + case _323112: return "Aircraft Maintenance Engineer (Mechanical)"; + case _323113: return "Aircraft Maintenance Engineer (Structures)"; + case _323200: return "Metal Fitters and Machinists nfd"; + case _323211: return "Fitter (General)"; + case _323212: return "Fitter and Turner"; + case _323213: return "Fitter-Welder"; + case _323214: return "Metal Machinist (First Class)"; + case _323215: return "Textile, Clothing and Footwear Mechanic"; + case _323299: return "Metal Fitters and Machinists nec"; + case _323300: return "Precision Metal Trades Workers nfd"; + case _323311: return "Engraver"; + case _323312: return "Gunsmith"; + case _323313: return "Locksmith"; + case _323314: return "Precision Instrument Maker and Repairer"; + case _323315: return "Saw Maker and Repairer"; + case _323316: return "Watch and Clock Maker and Repairer"; + case _323400: return "Toolmakers and Engineering Patternmakers nfd"; + case _323411: return "Engineering Patternmaker"; + case _323412: return "Toolmaker"; + case _324000: return "Panelbeaters, and Vehicle Body Builders, Trimmers and Painters nfd"; + case _324111: return "Panelbeater"; + case _324200: return "Vehicle Body Builders and Trimmers nfd"; + case _324211: return "Vehicle Body Builder"; + case _324212: return "Vehicle Trimmer"; + case _324311: return "Vehicle Painter"; + case _330000: return "Construction Trades Workers nfd"; + case _331000: return "Bricklayers, and Carpenters and Joiners nfd"; + case _331100: return "Bricklayers and Stonemasons nfd"; + case _331111: return "Bricklayer"; + case _331112: return "Stonemason"; + case _331211: return "Carpenter and Joiner"; + case _331212: return "Carpenter"; + case _331213: return "Joiner"; + case _332000: return "Floor Finishers and Painting Trades Workers nfd"; + case _332111: return "Floor Finisher"; + case _332211: return "Painting Trades Worker"; + case _333000: return "Glaziers, Plasterers and Tilers nfd"; + case _333111: return "Glazier"; + case _333200: return "Plasterers nfd"; + case _333211: return "Fibrous Plasterer"; + case _333212: return "Solid Plasterer"; + case _333311: return "Roof Tiler"; + case _333411: return "Wall and Floor Tiler"; + case _334100: return "Plumbers nfd"; + case _334111: return "Plumber (General)"; + case _334112: return "Airconditioning and Mechanical Services Plumber"; + case _334113: return "Drainer"; + case _334114: return "Gasfitter"; + case _334115: return "Roof Plumber"; + case _340000: return "Electrotechnology and Telecommunications Trades Workers nfd"; + case _341100: return "Electricians nfd"; + case _341111: return "Electrician (General)"; + case _341112: return "Electrician (Special Class)"; + case _341113: return "Lift Mechanic"; + case _342000: return "Electronics and Telecommunications Trades Workers nfd"; + case _342111: return "Airconditioning and Refrigeration Mechanic"; + case _342200: return "Electrical Distribution Trades Workers nfd"; + case _342211: return "Electrical Linesworker"; + case _342212: return "Technical Cable Jointer"; + case _342300: return "Electronics Trades Workers nfd"; + case _342311: return "Business Machine Mechanic"; + case _342312: return "Communications Operator"; + case _342313: return "Electronic Equipment Trades Worker"; + case _342314: return "Electronic Instrument Trades Worker (General)"; + case _342315: return "Electronic Instrument Trades Worker (Special Class)"; + case _342400: return "Telecommunications Trades Workers nfd"; + case _342411: return "Cabler (Data and Telecommunications)"; + case _342412: return "Telecommunications Cable Jointer"; + case _342413: return "Telecommunications Linesworker"; + case _342414: return "Telecommunications Technician"; + case _351000: return "Food Trades Workers nfd"; + case _351100: return "Bakers and Pastrycooks nfd"; + case _351111: return "Baker"; + case _351112: return "Pastrycook"; + case _351211: return "Butcher or Smallgoods Maker"; + case _351311: return "Chef"; + case _351411: return "Cook"; + case _360000: return "Skilled Animal and Horticultural Workers nfd"; + case _361000: return "Animal Attendants and Trainers, and Shearers nfd"; + case _361100: return "Animal Attendants and Trainers nfd"; + case _361111: return "Dog Handler or Trainer"; + case _361112: return "Horse Trainer"; + case _361113: return "Pet Groomer"; + case _361114: return "Zookeeper"; + case _361199: return "Animal Attendants and Trainers nec"; + case _361211: return "Shearer"; + case _361311: return "Veterinary Nurse"; + case _362000: return "Horticultural Trades Workers nfd"; + case _362111: return "Florist"; + case _362200: return "Gardeners nfd"; + case _362211: return "Gardener (General)"; + case _362212: return "Arborist"; + case _362213: return "Landscape Gardener"; + case _362311: return "Greenkeeper"; + case _362411: return "Nurseryperson"; + case _390000: return "Other Technicians and Trades Workers nfd"; + case _391111: return "Hairdresser"; + case _392000: return "Printing Trades Workers nfd"; + case _392100: return "Binders, Finishers and Screen Printers nfd"; + case _392111: return "Binder and Finisher"; + case _392112: return "Screen Printer"; + case _392211: return "Graphic Pre-press Trades Worker"; + case _392300: return "Printers nfd"; + case _392311: return "Printing Machinist"; + case _392312: return "Small Offset Printer"; + case _393000: return "Textile, Clothing and Footwear Trades Workers nfd"; + case _393100: return "Canvas and Leather Goods Makers nfd"; + case _393111: return "Canvas Goods Maker"; + case _393112: return "Leather Goods Maker"; + case _393113: return "Sail Maker"; + case _393114: return "Shoemaker"; + case _393200: return "Clothing Trades Workers nfd"; + case _393211: return "Apparel Cutter"; + case _393212: return "Clothing Patternmaker"; + case _393213: return "Dressmaker or Tailor"; + case _393299: return "Clothing Trades Workers nec"; + case _393311: return "Upholsterer"; + case _394000: return "Wood Trades Workers nfd"; + case _394111: return "Cabinetmaker"; + case _394200: return "Wood Machinists and Other Wood Trades Workers nfd"; + case _394211: return "Furniture Finisher"; + case _394212: return "Picture Framer"; + case _394213: return "Wood Machinist"; + case _394214: return "Wood Turner"; + case _394299: return "Wood Machinists and Other Wood Trades Workers nec"; + case _399000: return "Miscellaneous Technicians and Trades Workers nfd"; + case _399100: return "Boat Builders and Shipwrights nfd"; + case _399111: return "Boat Builder and Repairer"; + case _399112: return "Shipwright"; + case _399200: return "Chemical, Gas, Petroleum and Power Generation Plant Operators nfd"; + case _399211: return "Chemical Plant Operator"; + case _399212: return "Gas or Petroleum Operator"; + case _399213: return "Power Generation Plant Operator"; + case _399300: return "Gallery, Library and Museum Technicians nfd"; + case _399311: return "Gallery or Museum Technician"; + case _399312: return "Library Technician"; + case _399411: return "Jeweller"; + case _399500: return "Performing Arts Technicians nfd"; + case _399511: return "Broadcast Transmitter Operator"; + case _399512: return "Camera Operator (Film, Television or Video)"; + case _399513: return "Light Technician"; + case _399514: return "Make Up Artist"; + case _399515: return "Musical Instrument Maker or Repairer"; + case _399516: return "Sound Technician"; + case _399517: return "Television Equipment Operator"; + case _399599: return "Performing Arts Technicians nec"; + case _399611: return "Signwriter"; + case _399900: return "Other Miscellaneous Technicians and Trades Workers nfd"; + case _399911: return "Diver"; + case _399912: return "Interior Decorator"; + case _399913: return "Optical Dispenser"; + case _399914: return "Optical Mechanic"; + case _399915: return "Photographer's Assistant"; + case _399916: return "Plastics Technician"; + case _399917: return "Wool Classer"; + case _399999: return "Technicians and Trades Workers nec"; + case _400000: return "Community and Personal Service Workers nfd"; + case _411000: return "Health and Welfare Support Workers nfd"; + case _411100: return "Ambulance Officers and Paramedics nfd"; + case _411111: return "Ambulance Officer"; + case _411112: return "Intensive Care Ambulance Paramedic"; + case _411200: return "Dental Hygienists, Technicians and Therapists nfd"; + case _411211: return "Dental Hygienist"; + case _411212: return "Dental Prosthetist"; + case _411213: return "Dental Technician"; + case _411214: return "Dental Therapist"; + case _411311: return "Diversional Therapist"; + case _411400: return "Enrolled and Mothercraft Nurses nfd"; + case _411411: return "Enrolled Nurse"; + case _411412: return "Mothercraft Nurse"; + case _411511: return "Aboriginal and Torres Strait Islander Health Worker"; + case _411611: return "Massage Therapist"; + case _411700: return "Welfare Support Workers nfd"; + case _411711: return "Community Worker"; + case _411712: return "Disabilities Services Officer"; + case _411713: return "Family Support Worker"; + case _411714: return "Parole or Probation Officer"; + case _411715: return "Residential Care Officer"; + case _411716: return "Youth Worker"; + case _420000: return "Carers and Aides nfd"; + case _421100: return "Child Carers nfd"; + case _421111: return "Child Care Worker"; + case _421112: return "Family Day Care Worker"; + case _421113: return "Nanny"; + case _421114: return "Out of School Hours Care Worker"; + case _422100: return "Education Aides nfd"; + case _422111: return "Aboriginal and Torres Strait Islander Education Worker"; + case _422112: return "Integration Aide"; + case _422115: return "Preschool Aide"; + case _422116: return "Teachers' Aide"; + case _423000: return "Personal Carers and Assistants nfd"; + case _423111: return "Aged or Disabled Carer"; + case _423211: return "Dental Assistant"; + case _423300: return "Nursing Support and Personal Care Workers nfd"; + case _423311: return "Hospital Orderly"; + case _423312: return "Nursing Support Worker"; + case _423313: return "Personal Care Assistant"; + case _423314: return "Therapy Aide"; + case _423400: return "Special Care Workers nfd"; + case _423411: return "Child or Youth Residential Care Assistant"; + case _423412: return "Hostel Parent"; + case _423413: return "Refuge Worker"; + case _431000: return "Hospitality Workers nfd"; + case _431100: return "Bar Attendants and Baristas nfd"; + case _431111: return "Bar Attendant"; + case _431112: return "Barista"; + case _431211: return "Cafe Worker"; + case _431311: return "Gaming Worker"; + case _431411: return "Hotel Service Manager"; + case _431511: return "Waiter"; + case _431900: return "Other Hospitality Workers nfd"; + case _431911: return "Bar Useful or Busser"; + case _431912: return "Doorperson or Luggage Porter"; + case _431999: return "Hospitality Workers nec"; + case _440000: return "Protective Service Workers nfd"; + case _441000: return "Defence Force Members, Fire Fighters and Police nfd"; + case _441111: return "Defence Force Member - Other Ranks"; + case _441200: return "Fire and Emergency Workers nfd"; + case _441211: return "Emergency Service Worker"; + case _441212: return "Fire Fighter"; + case _441300: return "Police nfd"; + case _441311: return "Detective"; + case _441312: return "Police Officer"; + case _442000: return "Prison and Security Officers nfd"; + case _442111: return "Prison Officer"; + case _442200: return "Security Officers and Guards nfd"; + case _442211: return "Alarm, Security or Surveillance Monitor"; + case _442212: return "Armoured Car Escort"; + case _442213: return "Crowd Controller"; + case _442214: return "Private Investigator"; + case _442215: return "Retail Loss Prevention Officer"; + case _442216: return "Security Consultant"; + case _442217: return "Security Officer"; + case _442299: return "Security Officers and Guards nec"; + case _450000: return "Sports and Personal Service Workers nfd"; + case _451000: return "Personal Service and Travel Workers nfd"; + case _451111: return "Beauty Therapist"; + case _451211: return "Driving Instructor"; + case _451300: return "Funeral Workers nfd"; + case _451311: return "Funeral Director"; + case _451399: return "Funeral Workers nec"; + case _451400: return "Gallery, Museum and Tour Guides nfd"; + case _451411: return "Gallery or Museum Guide"; + case _451412: return "Tour Guide"; + case _451500: return "Personal Care Consultants nfd"; + case _451511: return "Natural Remedy Consultant"; + case _451512: return "Weight Loss Consultant"; + case _451600: return "Tourism and Travel Advisers nfd"; + case _451611: return "Tourist Information Officer"; + case _451612: return "Travel Consultant"; + case _451700: return "Travel Attendants nfd"; + case _451711: return "Flight Attendant"; + case _451799: return "Travel Attendants nec"; + case _451800: return "Other Personal Service Workers nfd"; + case _451811: return "Civil Celebrant"; + case _451812: return "Hair or Beauty Salon Assistant"; + case _451813: return "Sex Worker or Escort"; + case _451899: return "Personal Service Workers nec"; + case _452000: return "Sports and Fitness Workers nfd"; + case _452111: return "Fitness Instructor"; + case _452200: return "Outdoor Adventure Guides nfd"; + case _452211: return "Bungy Jump Master"; + case _452212: return "Fishing Guide"; + case _452213: return "Hunting Guide"; + case _452214: return "Mountain or Glacier Guide"; + case _452215: return "Outdoor Adventure Instructor"; + case _452216: return "Trekking Guide"; + case _452217: return "Whitewater Rafting Guide"; + case _452299: return "Outdoor Adventure Guides nec"; + case _452300: return "Sports Coaches, Instructors and Officials nfd"; + case _452311: return "Diving Instructor (Open Water)"; + case _452312: return "Gymnastics Coach or Instructor"; + case _452313: return "Horse Riding Coach or Instructor"; + case _452314: return "Snowsport Instructor"; + case _452315: return "Swimming Coach or Instructor"; + case _452316: return "Tennis Coach"; + case _452317: return "Other Sports Coach or Instructor"; + case _452318: return "Dog or Horse Racing Official"; + case _452321: return "Sports Development Officer"; + case _452322: return "Sports Umpire"; + case _452323: return "Other Sports Official"; + case _452400: return "Sportspersons nfd"; + case _452411: return "Footballer"; + case _452412: return "Golfer"; + case _452413: return "Jockey"; + case _452414: return "Lifeguard"; + case _452499: return "Sportspersons nec"; + case _500000: return "Clerical and Administrative Workers nfd"; + case _510000: return "Office Managers and Program Administrators nfd"; + case _511100: return "Contract, Program and Project Administrators nfd"; + case _511111: return "Contract Administrator"; + case _511112: return "Program or Project Administrator"; + case _512000: return "Office and Practice Managers nfd"; + case _512111: return "Office Manager"; + case _512200: return "Practice Managers nfd"; + case _512211: return "Health Practice Manager"; + case _512299: return "Practice Managers nec"; + case _521000: return "Personal Assistants and Secretaries nfd"; + case _521111: return "Personal Assistant"; + case _521200: return "Secretaries nfd"; + case _521211: return "Secretary (General)"; + case _521212: return "Legal Secretary"; + case _530000: return "General Clerical Workers nfd"; + case _531111: return "General Clerk"; + case _532100: return "Keyboard Operators nfd"; + case _532111: return "Data Entry Operator"; + case _532112: return "Machine Shorthand Reporter"; + case _532113: return "Word Processing Operator"; + case _540000: return "Inquiry Clerks and Receptionists nfd"; + case _541000: return "Call or Contact Centre Information Clerks nfd"; + case _541100: return "Call or Contact Centre Workers nfd"; + case _541111: return "Call or Contact Centre Team Leader"; + case _541112: return "Call or Contact Centre Operator"; + case _541211: return "Inquiry Clerk"; + case _542100: return "Receptionists nfd"; + case _542111: return "Receptionist (General)"; + case _542112: return "Admissions Clerk"; + case _542113: return "Hotel or Motel Receptionist"; + case _542114: return "Medical Receptionist"; + case _550000: return "Numerical Clerks nfd"; + case _551000: return "Accounting Clerks and Bookkeepers nfd"; + case _551100: return "Accounting Clerks nfd"; + case _551111: return "Accounts Clerk"; + case _551112: return "Cost Clerk"; + case _551211: return "Bookkeeper"; + case _551311: return "Payroll Clerk"; + case _552000: return "Financial and Insurance Clerks nfd"; + case _552111: return "Bank Worker"; + case _552211: return "Credit or Loans Officer"; + case _552300: return "Insurance, Money Market and Statistical Clerks nfd"; + case _552311: return "Bookmaker"; + case _552312: return "Insurance Consultant"; + case _552313: return "Money Market Clerk"; + case _552314: return "Statistical Clerk"; + case _561000: return "Clerical and Office Support Workers nfd"; + case _561100: return "Betting Clerks nfd"; + case _561111: return "Betting Agency Counter Clerk"; + case _561112: return "Bookmaker's Clerk"; + case _561113: return "Telephone Betting Clerk"; + case _561199: return "Betting Clerks nec"; + case _561200: return "Couriers and Postal Deliverers nfd"; + case _561211: return "Courier"; + case _561212: return "Postal Delivery Officer"; + case _561311: return "Filing or Registry Clerk"; + case _561400: return "Mail Sorters nfd"; + case _561411: return "Mail Clerk"; + case _561412: return "Postal Sorting Officer"; + case _561511: return "Survey Interviewer"; + case _561611: return "Switchboard Operator"; + case _561900: return "Other Clerical and Office Support Workers nfd"; + case _561911: return "Classified Advertising Clerk"; + case _561912: return "Meter Reader"; + case _561913: return "Parking Inspector"; + case _561999: return "Clerical and Office Support Workers nec"; + case _590000: return "Other Clerical and Administrative Workers nfd"; + case _591000: return "Logistics Clerks nfd"; + case _591100: return "Purchasing and Supply Logistics Clerks nfd"; + case _591111: return "Order Clerk"; + case _591112: return "Production Clerk"; + case _591113: return "Purchasing Officer"; + case _591114: return "Sales Clerk"; + case _591115: return "Stock Clerk"; + case _591116: return "Warehouse Administrator"; + case _591200: return "Transport and Despatch Clerks nfd"; + case _591211: return "Despatching and Receiving Clerk"; + case _591212: return "Import-Export Clerk"; + case _599000: return "Miscellaneous Clerical and Administrative Workers nfd"; + case _599100: return "Conveyancers and Legal Executives nfd"; + case _599111: return "Conveyancer"; + case _599112: return "Legal Executive"; + case _599200: return "Court and Legal Clerks nfd"; + case _599211: return "Clerk of Court"; + case _599212: return "Court Bailiff or Sheriff"; + case _599213: return "Court Orderly"; + case _599214: return "Law Clerk"; + case _599215: return "Trust Officer"; + case _599311: return "Debt Collector"; + case _599411: return "Human Resource Clerk"; + case _599500: return "Inspectors and Regulatory Officers nfd"; + case _599511: return "Customs Officer"; + case _599512: return "Immigration Officer"; + case _599513: return "Motor Vehicle Licence Examiner"; + case _599514: return "Noxious Weeds and Pest Inspector"; + case _599515: return "Social Security Assessor"; + case _599516: return "Taxation Inspector"; + case _599517: return "Train Examiner"; + case _599518: return "Transport Operations Inspector"; + case _599521: return "Water Inspector"; + case _599599: return "Inspectors and Regulatory Officers nec"; + case _599600: return "Insurance Investigators, Loss Adjusters and Risk Surveyors nfd"; + case _599611: return "Insurance Investigator"; + case _599612: return "Insurance Loss Adjuster"; + case _599613: return "Insurance Risk Surveyor"; + case _599711: return "Library Assistant"; + case _599900: return "Other Miscellaneous Clerical and Administrative Workers nfd"; + case _599911: return "Coding Clerk"; + case _599912: return "Production Assistant (Film, Television, Radio or Stage)"; + case _599913: return "Proof Reader"; + case _599914: return "Radio Despatcher"; + case _599999: return "Clerical and Administrative Workers nec"; + case _600000: return "Sales Workers nfd"; + case _610000: return "Sales Representatives and Agents nfd"; + case _611000: return "Insurance Agents and Sales Representatives nfd"; + case _611100: return "Auctioneers, and Stock and Station Agents nfd"; + case _611111: return "Auctioneer"; + case _611112: return "Stock and Station Agent"; + case _611211: return "Insurance Agent"; + case _611300: return "Sales Representatives nfd"; + case _611311: return "Sales Representative (Building and Plumbing Supplies)"; + case _611312: return "Sales Representative (Business Services)"; + case _611313: return "Sales Representative (Motor Vehicle Parts and Accessories)"; + case _611314: return "Sales Representative (Personal and Household Goods)"; + case _611399: return "Sales Representatives nec"; + case _612100: return "Real Estate Sales Agents nfd"; + case _612111: return "Business Broker"; + case _612112: return "Property Manager"; + case _612113: return "Real Estate Agency Principal"; + case _612114: return "Real Estate Agent"; + case _612115: return "Real Estate Representative"; + case _621000: return "Sales Assistants and Salespersons nfd"; + case _621111: return "Sales Assistant (General)"; + case _621211: return "ICT Sales Assistant"; + case _621300: return "Motor Vehicle and Vehicle Parts Salespersons nfd"; + case _621311: return "Motor Vehicle or Caravan Salesperson"; + case _621312: return "Motor Vehicle Parts Interpreter"; + case _621411: return "Pharmacy Sales Assistant"; + case _621511: return "Retail Supervisor"; + case _621611: return "Service Station Attendant"; + case _621700: return "Street Vendors and Related Salespersons nfd"; + case _621711: return "Cash Van Salesperson"; + case _621712: return "Door-to-door Salesperson"; + case _621713: return "Street Vendor"; + case _621900: return "Other Sales Assistants and Salespersons nfd"; + case _621911: return "Materials Recycler"; + case _621912: return "Rental Salesperson"; + case _621999: return "Sales Assistants and Salespersons nec"; + case _630000: return "Sales Support Workers nfd"; + case _631100: return "Checkout Operators and Office Cashiers nfd"; + case _631111: return "Checkout Operator"; + case _631112: return "Office Cashier"; + case _639000: return "Miscellaneous Sales Support Workers nfd"; + case _639100: return "Models and Sales Demonstrators nfd"; + case _639111: return "Model"; + case _639112: return "Sales Demonstrator"; + case _639200: return "Retail and Wool Buyers nfd"; + case _639211: return "Retail Buyer"; + case _639212: return "Wool Buyer"; + case _639311: return "Telemarketer"; + case _639400: return "Ticket Salespersons nfd"; + case _639411: return "Ticket Seller"; + case _639412: return "Transport Conductor"; + case _639511: return "Visual Merchandiser"; + case _639911: return "Other Sales Support Worker"; + case _700000: return "Machinery Operators and Drivers nfd"; + case _710000: return "Machine and Stationary Plant Operators nfd"; + case _711000: return "Machine Operators nfd"; + case _711100: return "Clay, Concrete, Glass and Stone Processing Machine Operators nfd"; + case _711111: return "Clay Products Machine Operator"; + case _711112: return "Concrete Products Machine Operator"; + case _711113: return "Glass Production Machine Operator"; + case _711114: return "Stone Processing Machine Operator"; + case _711199: return "Clay, Concrete, Glass and Stone Processing Machine Operators nec"; + case _711211: return "Industrial Spraypainter"; + case _711300: return "Paper and Wood Processing Machine Operators nfd"; + case _711311: return "Paper Products Machine Operator"; + case _711312: return "Wood Processing Machine Operator"; + case _711411: return "Photographic Developer and Printer"; + case _711500: return "Plastics and Rubber Production Machine Operators nfd"; + case _711511: return "Plastic Cablemaking Machine Operator"; + case _711512: return "Plastic Compounding and Reclamation Machine Operator"; + case _711513: return "Plastics Fabricator or Welder"; + case _711514: return "Plastics Production Machine Operator (General)"; + case _711515: return "Reinforced Plastic and Composite Production Worker"; + case _711516: return "Rubber Production Machine Operator"; + case _711599: return "Plastics and Rubber Production Machine Operators nec"; + case _711611: return "Sewing Machinist"; + case _711700: return "Textile and Footwear Production Machine Operators nfd"; + case _711711: return "Footwear Production Machine Operator"; + case _711712: return "Hide and Skin Processing Machine Operator"; + case _711713: return "Knitting Machine Operator"; + case _711714: return "Textile Dyeing and Finishing Machine Operator"; + case _711715: return "Weaving Machine Operator"; + case _711716: return "Yarn Carding and Spinning Machine Operator"; + case _711799: return "Textile and Footwear Production Machine Operators nec"; + case _711900: return "Other Machine Operators nfd"; + case _711911: return "Chemical Production Machine Operator"; + case _711912: return "Motion Picture Projectionist"; + case _711913: return "Sand Blaster"; + case _711914: return "Sterilisation Technician"; + case _711999: return "Machine Operators nec"; + case _712000: return "Stationary Plant Operators nfd"; + case _712111: return "Crane, Hoist or Lift Operator"; + case _712200: return "Drillers, Miners and Shot Firers nfd"; + case _712211: return "Driller"; + case _712212: return "Miner"; + case _712213: return "Shot Firer"; + case _712311: return "Engineering Production Systems Worker"; + case _712900: return "Other Stationary Plant Operators nfd"; + case _712911: return "Boiler or Engine Operator"; + case _712912: return "Bulk Materials Handling Plant Operator"; + case _712913: return "Cement Production Plant Operator"; + case _712914: return "Concrete Batching Plant Operator"; + case _712915: return "Concrete Pump Operator"; + case _712916: return "Paper and Pulp Mill Operator"; + case _712917: return "Railway Signal Operator"; + case _712918: return "Train Controller"; + case _712921: return "Waste Water or Water Plant Operator"; + case _712922: return "Weighbridge Operator"; + case _712999: return "Stationary Plant Operators nec"; + case _721000: return "Mobile Plant Operators nfd"; + case _721100: return "Agricultural, Forestry and Horticultural Plant Operators nfd"; + case _721111: return "Agricultural and Horticultural Mobile Plant Operator"; + case _721112: return "Logging Plant Operator"; + case _721200: return "Earthmoving Plant Operators nfd"; + case _721211: return "Earthmoving Plant Operator (General)"; + case _721212: return "Backhoe Operator"; + case _721213: return "Bulldozer Operator"; + case _721214: return "Excavator Operator"; + case _721215: return "Grader Operator"; + case _721216: return "Loader Operator"; + case _721311: return "Forklift Driver"; + case _721900: return "Other Mobile Plant Operators nfd"; + case _721911: return "Aircraft Baggage Handler and Airline Ground Crew"; + case _721912: return "Linemarker"; + case _721913: return "Paving Plant Operator"; + case _721914: return "Railway Track Plant Operator"; + case _721915: return "Road Roller Operator"; + case _721916: return "Streetsweeper Operator"; + case _721999: return "Mobile Plant Operators nec"; + case _730000: return "Road and Rail Drivers nfd"; + case _731000: return "Automobile, Bus and Rail Drivers nfd"; + case _731100: return "Automobile Drivers nfd"; + case _731111: return "Chauffeur"; + case _731112: return "Taxi Driver"; + case _731199: return "Automobile Drivers nec"; + case _731200: return "Bus and Coach Drivers nfd"; + case _731211: return "Bus Driver"; + case _731212: return "Charter and Tour Bus Driver"; + case _731213: return "Passenger Coach Driver"; + case _731300: return "Train and Tram Drivers nfd"; + case _731311: return "Train Driver"; + case _731312: return "Tram Driver"; + case _732111: return "Delivery Driver"; + case _733100: return "Truck Drivers nfd"; + case _733111: return "Truck Driver (General)"; + case _733112: return "Aircraft Refueller"; + case _733113: return "Furniture Removalist"; + case _733114: return "Tanker Driver"; + case _733115: return "Tow Truck Driver"; + case _741111: return "Storeperson"; + case _800000: return "Labourers nfd"; + case _811000: return "Cleaners and Laundry Workers nfd"; + case _811111: return "Car Detailer"; + case _811211: return "Commercial Cleaner"; + case _811311: return "Domestic Cleaner"; + case _811400: return "Housekeepers nfd"; + case _811411: return "Commercial Housekeeper"; + case _811412: return "Domestic Housekeeper"; + case _811500: return "Laundry Workers nfd"; + case _811511: return "Laundry Worker (General)"; + case _811512: return "Drycleaner"; + case _811513: return "Ironer or Presser"; + case _811600: return "Other Cleaners nfd"; + case _811611: return "Carpet Cleaner"; + case _811612: return "Window Cleaner"; + case _811699: return "Cleaners nec"; + case _821000: return "Construction and Mining Labourers nfd"; + case _821100: return "Building and Plumbing Labourers nfd"; + case _821111: return "Builder's Labourer"; + case _821112: return "Drainage, Sewerage and Stormwater Labourer"; + case _821113: return "Earthmoving Labourer"; + case _821114: return "Plumber's Assistant"; + case _821211: return "Concreter"; + case _821311: return "Fencer"; + case _821400: return "Insulation and Home Improvement Installers nfd"; + case _821411: return "Building Insulation Installer"; + case _821412: return "Home Improvement Installer"; + case _821511: return "Paving and Surfacing Labourer"; + case _821611: return "Railway Track Worker"; + case _821700: return "Structural Steel Construction Workers nfd"; + case _821711: return "Construction Rigger"; + case _821712: return "Scaffolder"; + case _821713: return "Steel Fixer"; + case _821714: return "Structural Steel Erector"; + case _821900: return "Other Construction and Mining Labourers nfd"; + case _821911: return "Crane Chaser"; + case _821912: return "Driller's Assistant"; + case _821913: return "Lagger"; + case _821914: return "Mining Support Worker"; + case _821915: return "Surveyor's Assistant"; + case _830000: return "Factory Process Workers nfd"; + case _831000: return "Food Process Workers nfd"; + case _831100: return "Food and Drink Factory Workers nfd"; + case _831111: return "Baking Factory Worker"; + case _831112: return "Brewery Worker"; + case _831113: return "Confectionery Maker"; + case _831114: return "Dairy Products Maker"; + case _831115: return "Fruit and Vegetable Factory Worker"; + case _831116: return "Grain Mill Worker"; + case _831117: return "Sugar Mill Worker"; + case _831118: return "Winery Cellar Hand"; + case _831199: return "Food and Drink Factory Workers nec"; + case _831200: return "Meat Boners and Slicers, and Slaughterers nfd"; + case _831211: return "Meat Boner and Slicer"; + case _831212: return "Slaughterer"; + case _831300: return "Meat, Poultry and Seafood Process Workers nfd"; + case _831311: return "Meat Process Worker"; + case _831312: return "Poultry Process Worker"; + case _831313: return "Seafood Process Worker"; + case _832000: return "Packers and Product Assemblers nfd"; + case _832100: return "Packers nfd"; + case _832111: return "Chocolate Packer"; + case _832112: return "Container Filler"; + case _832113: return "Fruit and Vegetable Packer"; + case _832114: return "Meat Packer"; + case _832115: return "Seafood Packer"; + case _832199: return "Packers nec"; + case _832211: return "Product Assembler"; + case _839000: return "Miscellaneous Factory Process Workers nfd"; + case _839111: return "Metal Engineering Process Worker"; + case _839200: return "Plastics and Rubber Factory Workers nfd"; + case _839211: return "Plastics Factory Worker"; + case _839212: return "Rubber Factory Worker"; + case _839300: return "Product Quality Controllers nfd"; + case _839311: return "Product Examiner"; + case _839312: return "Product Grader"; + case _839313: return "Product Tester"; + case _839400: return "Timber and Wood Process Workers nfd"; + case _839411: return "Paper and Pulp Mill Worker"; + case _839412: return "Sawmill or Timber Yard Worker"; + case _839413: return "Wood and Wood Products Factory Worker"; + case _839900: return "Other Factory Process Workers nfd"; + case _839911: return "Cement and Concrete Plant Worker"; + case _839912: return "Chemical Plant Worker"; + case _839913: return "Clay Processing Factory Worker"; + case _839914: return "Fabric and Textile Factory Worker"; + case _839915: return "Footwear Factory Worker"; + case _839916: return "Glass Processing Worker"; + case _839917: return "Hide and Skin Processing Worker"; + case _839999: return "Factory Process Workers nec"; + case _841000: return "Farm, Forestry and Garden Workers nfd"; + case _841111: return "Aquaculture Worker"; + case _841200: return "Crop Farm Workers nfd"; + case _841211: return "Fruit or Nut Farm Worker"; + case _841212: return "Fruit or Nut Picker"; + case _841213: return "Grain, Oilseed or Pasture Farm Worker"; + case _841214: return "Vegetable Farm Worker"; + case _841215: return "Vegetable Picker"; + case _841216: return "Vineyard Worker"; + case _841299: return "Crop Farm Workers nec"; + case _841300: return "Forestry and Logging Workers nfd"; + case _841311: return "Forestry Worker"; + case _841312: return "Logging Assistant"; + case _841313: return "Tree Faller"; + case _841400: return "Garden and Nursery Labourers nfd"; + case _841411: return "Garden Labourer"; + case _841412: return "Horticultural Nursery Assistant"; + case _841500: return "Livestock Farm Workers nfd"; + case _841511: return "Beef Cattle Farm Worker"; + case _841512: return "Dairy Cattle Farm Worker"; + case _841513: return "Mixed Livestock Farm Worker"; + case _841514: return "Poultry Farm Worker"; + case _841515: return "Sheep Farm Worker"; + case _841516: return "Stablehand"; + case _841517: return "Wool Handler"; + case _841599: return "Livestock Farm Workers nec"; + case _841611: return "Mixed Crop and Livestock Farm Worker"; + case _841900: return "Other Farm, Forestry and Garden Workers nfd"; + case _841911: return "Hunter-Trapper"; + case _841912: return "Pest or Weed Controller"; + case _841999: return "Farm, Forestry and Garden Workers nec"; + case _851000: return "Food Preparation Assistants nfd"; + case _851111: return "Fast Food Cook"; + case _851200: return "Food Trades Assistants nfd"; + case _851211: return "Pastrycook's Assistant"; + case _851299: return "Food Trades Assistants nec"; + case _851311: return "Kitchenhand"; + case _890000: return "Other Labourers nfd"; + case _891000: return "Freight Handlers and Shelf Fillers nfd"; + case _891100: return "Freight and Furniture Handlers nfd"; + case _891111: return "Freight Handler (Rail or Road)"; + case _891112: return "Truck Driver's Offsider"; + case _891113: return "Waterside Worker"; + case _891211: return "Shelf Filler"; + case _899000: return "Miscellaneous Labourers nfd"; + case _899111: return "Caretaker"; + case _899200: return "Deck and Fishing Hands nfd"; + case _899211: return "Deck Hand"; + case _899212: return "Fishing Hand"; + case _899311: return "Handyperson"; + case _899400: return "Motor Vehicle Parts and Accessories Fitters nfd"; + case _899411: return "Motor Vehicle Parts and Accessories Fitter (General)"; + case _899412: return "Autoglazier"; + case _899413: return "Exhaust and Muffler Fitter"; + case _899414: return "Radiator Fitter"; + case _899415: return "Tyre Fitter"; + case _899500: return "Printing Assistants and Table Workers nfd"; + case _899511: return "Printer's Assistant"; + case _899512: return "Printing Table Worker"; + case _899611: return "Recycling or Rubbish Collector"; + case _899711: return "Vending Machine Attendant"; + case _899900: return "Other Miscellaneous Labourers nfd"; + case _899911: return "Bicycle Mechanic"; + case _899912: return "Car Park Attendant"; + case _899913: return "Crossing Supervisor"; + case _899914: return "Electrical or Telecommunications Trades Assistant"; + case _899915: return "Leaflet or Newspaper Deliverer"; + case _899916: return "Mechanic's Assistant"; + case _899917: return "Railways Assistant"; + case _899918: return "Sign Erector"; + case _899921: return "Ticket Collector or Usher"; + case _899922: return "Trolley Collector"; + case _899999: return "Labourers nec"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupationsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupationsEnumFactory.java new file mode 100644 index 00000000000..143bcf93849 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AnzscoOccupationsEnumFactory.java @@ -0,0 +1,5355 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AnzscoOccupationsEnumFactory implements EnumFactory { + + public AnzscoOccupations fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("100000".equals(codeString)) + return AnzscoOccupations._100000; + if ("111000".equals(codeString)) + return AnzscoOccupations._111000; + if ("111111".equals(codeString)) + return AnzscoOccupations._111111; + if ("111200".equals(codeString)) + return AnzscoOccupations._111200; + if ("111211".equals(codeString)) + return AnzscoOccupations._111211; + if ("111212".equals(codeString)) + return AnzscoOccupations._111212; + if ("111300".equals(codeString)) + return AnzscoOccupations._111300; + if ("111311".equals(codeString)) + return AnzscoOccupations._111311; + if ("111312".equals(codeString)) + return AnzscoOccupations._111312; + if ("111399".equals(codeString)) + return AnzscoOccupations._111399; + if ("121000".equals(codeString)) + return AnzscoOccupations._121000; + if ("121111".equals(codeString)) + return AnzscoOccupations._121111; + if ("121200".equals(codeString)) + return AnzscoOccupations._121200; + if ("121211".equals(codeString)) + return AnzscoOccupations._121211; + if ("121212".equals(codeString)) + return AnzscoOccupations._121212; + if ("121213".equals(codeString)) + return AnzscoOccupations._121213; + if ("121214".equals(codeString)) + return AnzscoOccupations._121214; + if ("121215".equals(codeString)) + return AnzscoOccupations._121215; + if ("121216".equals(codeString)) + return AnzscoOccupations._121216; + if ("121217".equals(codeString)) + return AnzscoOccupations._121217; + if ("121218".equals(codeString)) + return AnzscoOccupations._121218; + if ("121221".equals(codeString)) + return AnzscoOccupations._121221; + if ("121299".equals(codeString)) + return AnzscoOccupations._121299; + if ("121300".equals(codeString)) + return AnzscoOccupations._121300; + if ("121311".equals(codeString)) + return AnzscoOccupations._121311; + if ("121312".equals(codeString)) + return AnzscoOccupations._121312; + if ("121313".equals(codeString)) + return AnzscoOccupations._121313; + if ("121314".equals(codeString)) + return AnzscoOccupations._121314; + if ("121315".equals(codeString)) + return AnzscoOccupations._121315; + if ("121316".equals(codeString)) + return AnzscoOccupations._121316; + if ("121317".equals(codeString)) + return AnzscoOccupations._121317; + if ("121318".equals(codeString)) + return AnzscoOccupations._121318; + if ("121321".equals(codeString)) + return AnzscoOccupations._121321; + if ("121322".equals(codeString)) + return AnzscoOccupations._121322; + if ("121399".equals(codeString)) + return AnzscoOccupations._121399; + if ("121411".equals(codeString)) + return AnzscoOccupations._121411; + if ("130000".equals(codeString)) + return AnzscoOccupations._130000; + if ("131100".equals(codeString)) + return AnzscoOccupations._131100; + if ("131111".equals(codeString)) + return AnzscoOccupations._131111; + if ("131112".equals(codeString)) + return AnzscoOccupations._131112; + if ("132000".equals(codeString)) + return AnzscoOccupations._132000; + if ("132111".equals(codeString)) + return AnzscoOccupations._132111; + if ("132211".equals(codeString)) + return AnzscoOccupations._132211; + if ("132311".equals(codeString)) + return AnzscoOccupations._132311; + if ("132411".equals(codeString)) + return AnzscoOccupations._132411; + if ("132511".equals(codeString)) + return AnzscoOccupations._132511; + if ("133000".equals(codeString)) + return AnzscoOccupations._133000; + if ("133100".equals(codeString)) + return AnzscoOccupations._133100; + if ("133111".equals(codeString)) + return AnzscoOccupations._133111; + if ("133112".equals(codeString)) + return AnzscoOccupations._133112; + if ("133211".equals(codeString)) + return AnzscoOccupations._133211; + if ("133300".equals(codeString)) + return AnzscoOccupations._133300; + if ("133311".equals(codeString)) + return AnzscoOccupations._133311; + if ("133312".equals(codeString)) + return AnzscoOccupations._133312; + if ("133411".equals(codeString)) + return AnzscoOccupations._133411; + if ("133500".equals(codeString)) + return AnzscoOccupations._133500; + if ("133511".equals(codeString)) + return AnzscoOccupations._133511; + if ("133512".equals(codeString)) + return AnzscoOccupations._133512; + if ("133513".equals(codeString)) + return AnzscoOccupations._133513; + if ("133611".equals(codeString)) + return AnzscoOccupations._133611; + if ("134000".equals(codeString)) + return AnzscoOccupations._134000; + if ("134111".equals(codeString)) + return AnzscoOccupations._134111; + if ("134200".equals(codeString)) + return AnzscoOccupations._134200; + if ("134211".equals(codeString)) + return AnzscoOccupations._134211; + if ("134212".equals(codeString)) + return AnzscoOccupations._134212; + if ("134213".equals(codeString)) + return AnzscoOccupations._134213; + if ("134214".equals(codeString)) + return AnzscoOccupations._134214; + if ("134299".equals(codeString)) + return AnzscoOccupations._134299; + if ("134311".equals(codeString)) + return AnzscoOccupations._134311; + if ("134400".equals(codeString)) + return AnzscoOccupations._134400; + if ("134411".equals(codeString)) + return AnzscoOccupations._134411; + if ("134412".equals(codeString)) + return AnzscoOccupations._134412; + if ("134499".equals(codeString)) + return AnzscoOccupations._134499; + if ("135100".equals(codeString)) + return AnzscoOccupations._135100; + if ("135111".equals(codeString)) + return AnzscoOccupations._135111; + if ("135112".equals(codeString)) + return AnzscoOccupations._135112; + if ("135199".equals(codeString)) + return AnzscoOccupations._135199; + if ("139000".equals(codeString)) + return AnzscoOccupations._139000; + if ("139100".equals(codeString)) + return AnzscoOccupations._139100; + if ("139111".equals(codeString)) + return AnzscoOccupations._139111; + if ("139112".equals(codeString)) + return AnzscoOccupations._139112; + if ("139113".equals(codeString)) + return AnzscoOccupations._139113; + if ("139211".equals(codeString)) + return AnzscoOccupations._139211; + if ("139900".equals(codeString)) + return AnzscoOccupations._139900; + if ("139911".equals(codeString)) + return AnzscoOccupations._139911; + if ("139912".equals(codeString)) + return AnzscoOccupations._139912; + if ("139913".equals(codeString)) + return AnzscoOccupations._139913; + if ("139914".equals(codeString)) + return AnzscoOccupations._139914; + if ("139915".equals(codeString)) + return AnzscoOccupations._139915; + if ("139999".equals(codeString)) + return AnzscoOccupations._139999; + if ("140000".equals(codeString)) + return AnzscoOccupations._140000; + if ("141000".equals(codeString)) + return AnzscoOccupations._141000; + if ("141111".equals(codeString)) + return AnzscoOccupations._141111; + if ("141211".equals(codeString)) + return AnzscoOccupations._141211; + if ("141311".equals(codeString)) + return AnzscoOccupations._141311; + if ("141411".equals(codeString)) + return AnzscoOccupations._141411; + if ("141900".equals(codeString)) + return AnzscoOccupations._141900; + if ("141911".equals(codeString)) + return AnzscoOccupations._141911; + if ("141999".equals(codeString)) + return AnzscoOccupations._141999; + if ("142100".equals(codeString)) + return AnzscoOccupations._142100; + if ("142111".equals(codeString)) + return AnzscoOccupations._142111; + if ("142112".equals(codeString)) + return AnzscoOccupations._142112; + if ("142113".equals(codeString)) + return AnzscoOccupations._142113; + if ("142114".equals(codeString)) + return AnzscoOccupations._142114; + if ("142115".equals(codeString)) + return AnzscoOccupations._142115; + if ("142116".equals(codeString)) + return AnzscoOccupations._142116; + if ("149000".equals(codeString)) + return AnzscoOccupations._149000; + if ("149100".equals(codeString)) + return AnzscoOccupations._149100; + if ("149111".equals(codeString)) + return AnzscoOccupations._149111; + if ("149112".equals(codeString)) + return AnzscoOccupations._149112; + if ("149113".equals(codeString)) + return AnzscoOccupations._149113; + if ("149200".equals(codeString)) + return AnzscoOccupations._149200; + if ("149211".equals(codeString)) + return AnzscoOccupations._149211; + if ("149212".equals(codeString)) + return AnzscoOccupations._149212; + if ("149311".equals(codeString)) + return AnzscoOccupations._149311; + if ("149400".equals(codeString)) + return AnzscoOccupations._149400; + if ("149411".equals(codeString)) + return AnzscoOccupations._149411; + if ("149412".equals(codeString)) + return AnzscoOccupations._149412; + if ("149413".equals(codeString)) + return AnzscoOccupations._149413; + if ("149900".equals(codeString)) + return AnzscoOccupations._149900; + if ("149911".equals(codeString)) + return AnzscoOccupations._149911; + if ("149912".equals(codeString)) + return AnzscoOccupations._149912; + if ("149913".equals(codeString)) + return AnzscoOccupations._149913; + if ("149914".equals(codeString)) + return AnzscoOccupations._149914; + if ("149999".equals(codeString)) + return AnzscoOccupations._149999; + if ("200000".equals(codeString)) + return AnzscoOccupations._200000; + if ("210000".equals(codeString)) + return AnzscoOccupations._210000; + if ("211000".equals(codeString)) + return AnzscoOccupations._211000; + if ("211100".equals(codeString)) + return AnzscoOccupations._211100; + if ("211111".equals(codeString)) + return AnzscoOccupations._211111; + if ("211112".equals(codeString)) + return AnzscoOccupations._211112; + if ("211113".equals(codeString)) + return AnzscoOccupations._211113; + if ("211199".equals(codeString)) + return AnzscoOccupations._211199; + if ("211200".equals(codeString)) + return AnzscoOccupations._211200; + if ("211211".equals(codeString)) + return AnzscoOccupations._211211; + if ("211212".equals(codeString)) + return AnzscoOccupations._211212; + if ("211213".equals(codeString)) + return AnzscoOccupations._211213; + if ("211214".equals(codeString)) + return AnzscoOccupations._211214; + if ("211299".equals(codeString)) + return AnzscoOccupations._211299; + if ("211311".equals(codeString)) + return AnzscoOccupations._211311; + if ("211400".equals(codeString)) + return AnzscoOccupations._211400; + if ("211411".equals(codeString)) + return AnzscoOccupations._211411; + if ("211412".equals(codeString)) + return AnzscoOccupations._211412; + if ("211413".equals(codeString)) + return AnzscoOccupations._211413; + if ("211499".equals(codeString)) + return AnzscoOccupations._211499; + if ("212000".equals(codeString)) + return AnzscoOccupations._212000; + if ("212100".equals(codeString)) + return AnzscoOccupations._212100; + if ("212111".equals(codeString)) + return AnzscoOccupations._212111; + if ("212112".equals(codeString)) + return AnzscoOccupations._212112; + if ("212113".equals(codeString)) + return AnzscoOccupations._212113; + if ("212114".equals(codeString)) + return AnzscoOccupations._212114; + if ("212200".equals(codeString)) + return AnzscoOccupations._212200; + if ("212211".equals(codeString)) + return AnzscoOccupations._212211; + if ("212212".equals(codeString)) + return AnzscoOccupations._212212; + if ("212300".equals(codeString)) + return AnzscoOccupations._212300; + if ("212311".equals(codeString)) + return AnzscoOccupations._212311; + if ("212312".equals(codeString)) + return AnzscoOccupations._212312; + if ("212313".equals(codeString)) + return AnzscoOccupations._212313; + if ("212314".equals(codeString)) + return AnzscoOccupations._212314; + if ("212315".equals(codeString)) + return AnzscoOccupations._212315; + if ("212316".equals(codeString)) + return AnzscoOccupations._212316; + if ("212317".equals(codeString)) + return AnzscoOccupations._212317; + if ("212318".equals(codeString)) + return AnzscoOccupations._212318; + if ("212399".equals(codeString)) + return AnzscoOccupations._212399; + if ("212400".equals(codeString)) + return AnzscoOccupations._212400; + if ("212411".equals(codeString)) + return AnzscoOccupations._212411; + if ("212412".equals(codeString)) + return AnzscoOccupations._212412; + if ("212413".equals(codeString)) + return AnzscoOccupations._212413; + if ("212414".equals(codeString)) + return AnzscoOccupations._212414; + if ("212415".equals(codeString)) + return AnzscoOccupations._212415; + if ("212416".equals(codeString)) + return AnzscoOccupations._212416; + if ("212499".equals(codeString)) + return AnzscoOccupations._212499; + if ("220000".equals(codeString)) + return AnzscoOccupations._220000; + if ("221000".equals(codeString)) + return AnzscoOccupations._221000; + if ("221100".equals(codeString)) + return AnzscoOccupations._221100; + if ("221111".equals(codeString)) + return AnzscoOccupations._221111; + if ("221112".equals(codeString)) + return AnzscoOccupations._221112; + if ("221113".equals(codeString)) + return AnzscoOccupations._221113; + if ("221200".equals(codeString)) + return AnzscoOccupations._221200; + if ("221211".equals(codeString)) + return AnzscoOccupations._221211; + if ("221212".equals(codeString)) + return AnzscoOccupations._221212; + if ("221213".equals(codeString)) + return AnzscoOccupations._221213; + if ("221214".equals(codeString)) + return AnzscoOccupations._221214; + if ("222000".equals(codeString)) + return AnzscoOccupations._222000; + if ("222100".equals(codeString)) + return AnzscoOccupations._222100; + if ("222111".equals(codeString)) + return AnzscoOccupations._222111; + if ("222112".equals(codeString)) + return AnzscoOccupations._222112; + if ("222113".equals(codeString)) + return AnzscoOccupations._222113; + if ("222199".equals(codeString)) + return AnzscoOccupations._222199; + if ("222200".equals(codeString)) + return AnzscoOccupations._222200; + if ("222211".equals(codeString)) + return AnzscoOccupations._222211; + if ("222212".equals(codeString)) + return AnzscoOccupations._222212; + if ("222213".equals(codeString)) + return AnzscoOccupations._222213; + if ("222299".equals(codeString)) + return AnzscoOccupations._222299; + if ("222300".equals(codeString)) + return AnzscoOccupations._222300; + if ("222311".equals(codeString)) + return AnzscoOccupations._222311; + if ("222312".equals(codeString)) + return AnzscoOccupations._222312; + if ("223000".equals(codeString)) + return AnzscoOccupations._223000; + if ("223100".equals(codeString)) + return AnzscoOccupations._223100; + if ("223111".equals(codeString)) + return AnzscoOccupations._223111; + if ("223112".equals(codeString)) + return AnzscoOccupations._223112; + if ("223113".equals(codeString)) + return AnzscoOccupations._223113; + if ("223211".equals(codeString)) + return AnzscoOccupations._223211; + if ("223311".equals(codeString)) + return AnzscoOccupations._223311; + if ("224000".equals(codeString)) + return AnzscoOccupations._224000; + if ("224100".equals(codeString)) + return AnzscoOccupations._224100; + if ("224111".equals(codeString)) + return AnzscoOccupations._224111; + if ("224112".equals(codeString)) + return AnzscoOccupations._224112; + if ("224113".equals(codeString)) + return AnzscoOccupations._224113; + if ("224200".equals(codeString)) + return AnzscoOccupations._224200; + if ("224211".equals(codeString)) + return AnzscoOccupations._224211; + if ("224212".equals(codeString)) + return AnzscoOccupations._224212; + if ("224213".equals(codeString)) + return AnzscoOccupations._224213; + if ("224214".equals(codeString)) + return AnzscoOccupations._224214; + if ("224311".equals(codeString)) + return AnzscoOccupations._224311; + if ("224400".equals(codeString)) + return AnzscoOccupations._224400; + if ("224411".equals(codeString)) + return AnzscoOccupations._224411; + if ("224412".equals(codeString)) + return AnzscoOccupations._224412; + if ("224500".equals(codeString)) + return AnzscoOccupations._224500; + if ("224511".equals(codeString)) + return AnzscoOccupations._224511; + if ("224512".equals(codeString)) + return AnzscoOccupations._224512; + if ("224611".equals(codeString)) + return AnzscoOccupations._224611; + if ("224700".equals(codeString)) + return AnzscoOccupations._224700; + if ("224711".equals(codeString)) + return AnzscoOccupations._224711; + if ("224712".equals(codeString)) + return AnzscoOccupations._224712; + if ("224900".equals(codeString)) + return AnzscoOccupations._224900; + if ("224911".equals(codeString)) + return AnzscoOccupations._224911; + if ("224912".equals(codeString)) + return AnzscoOccupations._224912; + if ("224913".equals(codeString)) + return AnzscoOccupations._224913; + if ("224914".equals(codeString)) + return AnzscoOccupations._224914; + if ("224999".equals(codeString)) + return AnzscoOccupations._224999; + if ("225000".equals(codeString)) + return AnzscoOccupations._225000; + if ("225100".equals(codeString)) + return AnzscoOccupations._225100; + if ("225111".equals(codeString)) + return AnzscoOccupations._225111; + if ("225112".equals(codeString)) + return AnzscoOccupations._225112; + if ("225113".equals(codeString)) + return AnzscoOccupations._225113; + if ("225200".equals(codeString)) + return AnzscoOccupations._225200; + if ("225211".equals(codeString)) + return AnzscoOccupations._225211; + if ("225212".equals(codeString)) + return AnzscoOccupations._225212; + if ("225213".equals(codeString)) + return AnzscoOccupations._225213; + if ("225311".equals(codeString)) + return AnzscoOccupations._225311; + if ("225400".equals(codeString)) + return AnzscoOccupations._225400; + if ("225411".equals(codeString)) + return AnzscoOccupations._225411; + if ("225412".equals(codeString)) + return AnzscoOccupations._225412; + if ("225499".equals(codeString)) + return AnzscoOccupations._225499; + if ("230000".equals(codeString)) + return AnzscoOccupations._230000; + if ("231000".equals(codeString)) + return AnzscoOccupations._231000; + if ("231100".equals(codeString)) + return AnzscoOccupations._231100; + if ("231111".equals(codeString)) + return AnzscoOccupations._231111; + if ("231112".equals(codeString)) + return AnzscoOccupations._231112; + if ("231113".equals(codeString)) + return AnzscoOccupations._231113; + if ("231114".equals(codeString)) + return AnzscoOccupations._231114; + if ("231199".equals(codeString)) + return AnzscoOccupations._231199; + if ("231200".equals(codeString)) + return AnzscoOccupations._231200; + if ("231211".equals(codeString)) + return AnzscoOccupations._231211; + if ("231212".equals(codeString)) + return AnzscoOccupations._231212; + if ("231213".equals(codeString)) + return AnzscoOccupations._231213; + if ("231214".equals(codeString)) + return AnzscoOccupations._231214; + if ("231215".equals(codeString)) + return AnzscoOccupations._231215; + if ("231299".equals(codeString)) + return AnzscoOccupations._231299; + if ("232000".equals(codeString)) + return AnzscoOccupations._232000; + if ("232100".equals(codeString)) + return AnzscoOccupations._232100; + if ("232111".equals(codeString)) + return AnzscoOccupations._232111; + if ("232112".equals(codeString)) + return AnzscoOccupations._232112; + if ("232200".equals(codeString)) + return AnzscoOccupations._232200; + if ("232211".equals(codeString)) + return AnzscoOccupations._232211; + if ("232212".equals(codeString)) + return AnzscoOccupations._232212; + if ("232300".equals(codeString)) + return AnzscoOccupations._232300; + if ("232311".equals(codeString)) + return AnzscoOccupations._232311; + if ("232312".equals(codeString)) + return AnzscoOccupations._232312; + if ("232313".equals(codeString)) + return AnzscoOccupations._232313; + if ("232400".equals(codeString)) + return AnzscoOccupations._232400; + if ("232411".equals(codeString)) + return AnzscoOccupations._232411; + if ("232412".equals(codeString)) + return AnzscoOccupations._232412; + if ("232413".equals(codeString)) + return AnzscoOccupations._232413; + if ("232414".equals(codeString)) + return AnzscoOccupations._232414; + if ("232511".equals(codeString)) + return AnzscoOccupations._232511; + if ("232611".equals(codeString)) + return AnzscoOccupations._232611; + if ("233000".equals(codeString)) + return AnzscoOccupations._233000; + if ("233100".equals(codeString)) + return AnzscoOccupations._233100; + if ("233111".equals(codeString)) + return AnzscoOccupations._233111; + if ("233112".equals(codeString)) + return AnzscoOccupations._233112; + if ("233200".equals(codeString)) + return AnzscoOccupations._233200; + if ("233211".equals(codeString)) + return AnzscoOccupations._233211; + if ("233212".equals(codeString)) + return AnzscoOccupations._233212; + if ("233213".equals(codeString)) + return AnzscoOccupations._233213; + if ("233214".equals(codeString)) + return AnzscoOccupations._233214; + if ("233215".equals(codeString)) + return AnzscoOccupations._233215; + if ("233311".equals(codeString)) + return AnzscoOccupations._233311; + if ("233411".equals(codeString)) + return AnzscoOccupations._233411; + if ("233500".equals(codeString)) + return AnzscoOccupations._233500; + if ("233511".equals(codeString)) + return AnzscoOccupations._233511; + if ("233512".equals(codeString)) + return AnzscoOccupations._233512; + if ("233513".equals(codeString)) + return AnzscoOccupations._233513; + if ("233600".equals(codeString)) + return AnzscoOccupations._233600; + if ("233611".equals(codeString)) + return AnzscoOccupations._233611; + if ("233612".equals(codeString)) + return AnzscoOccupations._233612; + if ("233900".equals(codeString)) + return AnzscoOccupations._233900; + if ("233911".equals(codeString)) + return AnzscoOccupations._233911; + if ("233912".equals(codeString)) + return AnzscoOccupations._233912; + if ("233913".equals(codeString)) + return AnzscoOccupations._233913; + if ("233914".equals(codeString)) + return AnzscoOccupations._233914; + if ("233915".equals(codeString)) + return AnzscoOccupations._233915; + if ("233916".equals(codeString)) + return AnzscoOccupations._233916; + if ("233999".equals(codeString)) + return AnzscoOccupations._233999; + if ("234000".equals(codeString)) + return AnzscoOccupations._234000; + if ("234100".equals(codeString)) + return AnzscoOccupations._234100; + if ("234111".equals(codeString)) + return AnzscoOccupations._234111; + if ("234112".equals(codeString)) + return AnzscoOccupations._234112; + if ("234113".equals(codeString)) + return AnzscoOccupations._234113; + if ("234200".equals(codeString)) + return AnzscoOccupations._234200; + if ("234211".equals(codeString)) + return AnzscoOccupations._234211; + if ("234212".equals(codeString)) + return AnzscoOccupations._234212; + if ("234213".equals(codeString)) + return AnzscoOccupations._234213; + if ("234300".equals(codeString)) + return AnzscoOccupations._234300; + if ("234311".equals(codeString)) + return AnzscoOccupations._234311; + if ("234312".equals(codeString)) + return AnzscoOccupations._234312; + if ("234313".equals(codeString)) + return AnzscoOccupations._234313; + if ("234314".equals(codeString)) + return AnzscoOccupations._234314; + if ("234399".equals(codeString)) + return AnzscoOccupations._234399; + if ("234400".equals(codeString)) + return AnzscoOccupations._234400; + if ("234411".equals(codeString)) + return AnzscoOccupations._234411; + if ("234412".equals(codeString)) + return AnzscoOccupations._234412; + if ("234500".equals(codeString)) + return AnzscoOccupations._234500; + if ("234511".equals(codeString)) + return AnzscoOccupations._234511; + if ("234512".equals(codeString)) + return AnzscoOccupations._234512; + if ("234513".equals(codeString)) + return AnzscoOccupations._234513; + if ("234514".equals(codeString)) + return AnzscoOccupations._234514; + if ("234515".equals(codeString)) + return AnzscoOccupations._234515; + if ("234516".equals(codeString)) + return AnzscoOccupations._234516; + if ("234517".equals(codeString)) + return AnzscoOccupations._234517; + if ("234518".equals(codeString)) + return AnzscoOccupations._234518; + if ("234599".equals(codeString)) + return AnzscoOccupations._234599; + if ("234611".equals(codeString)) + return AnzscoOccupations._234611; + if ("234711".equals(codeString)) + return AnzscoOccupations._234711; + if ("234900".equals(codeString)) + return AnzscoOccupations._234900; + if ("234911".equals(codeString)) + return AnzscoOccupations._234911; + if ("234912".equals(codeString)) + return AnzscoOccupations._234912; + if ("234913".equals(codeString)) + return AnzscoOccupations._234913; + if ("234914".equals(codeString)) + return AnzscoOccupations._234914; + if ("234999".equals(codeString)) + return AnzscoOccupations._234999; + if ("240000".equals(codeString)) + return AnzscoOccupations._240000; + if ("241000".equals(codeString)) + return AnzscoOccupations._241000; + if ("241111".equals(codeString)) + return AnzscoOccupations._241111; + if ("241213".equals(codeString)) + return AnzscoOccupations._241213; + if ("241311".equals(codeString)) + return AnzscoOccupations._241311; + if ("241411".equals(codeString)) + return AnzscoOccupations._241411; + if ("241500".equals(codeString)) + return AnzscoOccupations._241500; + if ("241511".equals(codeString)) + return AnzscoOccupations._241511; + if ("241512".equals(codeString)) + return AnzscoOccupations._241512; + if ("241513".equals(codeString)) + return AnzscoOccupations._241513; + if ("241599".equals(codeString)) + return AnzscoOccupations._241599; + if ("242000".equals(codeString)) + return AnzscoOccupations._242000; + if ("242100".equals(codeString)) + return AnzscoOccupations._242100; + if ("242111".equals(codeString)) + return AnzscoOccupations._242111; + if ("242112".equals(codeString)) + return AnzscoOccupations._242112; + if ("242211".equals(codeString)) + return AnzscoOccupations._242211; + if ("249000".equals(codeString)) + return AnzscoOccupations._249000; + if ("249100".equals(codeString)) + return AnzscoOccupations._249100; + if ("249111".equals(codeString)) + return AnzscoOccupations._249111; + if ("249112".equals(codeString)) + return AnzscoOccupations._249112; + if ("249200".equals(codeString)) + return AnzscoOccupations._249200; + if ("249211".equals(codeString)) + return AnzscoOccupations._249211; + if ("249212".equals(codeString)) + return AnzscoOccupations._249212; + if ("249213".equals(codeString)) + return AnzscoOccupations._249213; + if ("249214".equals(codeString)) + return AnzscoOccupations._249214; + if ("249299".equals(codeString)) + return AnzscoOccupations._249299; + if ("249311".equals(codeString)) + return AnzscoOccupations._249311; + if ("250000".equals(codeString)) + return AnzscoOccupations._250000; + if ("251000".equals(codeString)) + return AnzscoOccupations._251000; + if ("251111".equals(codeString)) + return AnzscoOccupations._251111; + if ("251200".equals(codeString)) + return AnzscoOccupations._251200; + if ("251211".equals(codeString)) + return AnzscoOccupations._251211; + if ("251212".equals(codeString)) + return AnzscoOccupations._251212; + if ("251213".equals(codeString)) + return AnzscoOccupations._251213; + if ("251214".equals(codeString)) + return AnzscoOccupations._251214; + if ("251300".equals(codeString)) + return AnzscoOccupations._251300; + if ("251311".equals(codeString)) + return AnzscoOccupations._251311; + if ("251312".equals(codeString)) + return AnzscoOccupations._251312; + if ("251400".equals(codeString)) + return AnzscoOccupations._251400; + if ("251411".equals(codeString)) + return AnzscoOccupations._251411; + if ("251412".equals(codeString)) + return AnzscoOccupations._251412; + if ("251500".equals(codeString)) + return AnzscoOccupations._251500; + if ("251511".equals(codeString)) + return AnzscoOccupations._251511; + if ("251512".equals(codeString)) + return AnzscoOccupations._251512; + if ("251513".equals(codeString)) + return AnzscoOccupations._251513; + if ("251900".equals(codeString)) + return AnzscoOccupations._251900; + if ("251911".equals(codeString)) + return AnzscoOccupations._251911; + if ("251912".equals(codeString)) + return AnzscoOccupations._251912; + if ("251999".equals(codeString)) + return AnzscoOccupations._251999; + if ("252000".equals(codeString)) + return AnzscoOccupations._252000; + if ("252100".equals(codeString)) + return AnzscoOccupations._252100; + if ("252111".equals(codeString)) + return AnzscoOccupations._252111; + if ("252112".equals(codeString)) + return AnzscoOccupations._252112; + if ("252200".equals(codeString)) + return AnzscoOccupations._252200; + if ("252211".equals(codeString)) + return AnzscoOccupations._252211; + if ("252212".equals(codeString)) + return AnzscoOccupations._252212; + if ("252213".equals(codeString)) + return AnzscoOccupations._252213; + if ("252214".equals(codeString)) + return AnzscoOccupations._252214; + if ("252299".equals(codeString)) + return AnzscoOccupations._252299; + if ("252300".equals(codeString)) + return AnzscoOccupations._252300; + if ("252311".equals(codeString)) + return AnzscoOccupations._252311; + if ("252312".equals(codeString)) + return AnzscoOccupations._252312; + if ("252411".equals(codeString)) + return AnzscoOccupations._252411; + if ("252511".equals(codeString)) + return AnzscoOccupations._252511; + if ("252611".equals(codeString)) + return AnzscoOccupations._252611; + if ("252700".equals(codeString)) + return AnzscoOccupations._252700; + if ("252711".equals(codeString)) + return AnzscoOccupations._252711; + if ("252712".equals(codeString)) + return AnzscoOccupations._252712; + if ("253000".equals(codeString)) + return AnzscoOccupations._253000; + if ("253100".equals(codeString)) + return AnzscoOccupations._253100; + if ("253111".equals(codeString)) + return AnzscoOccupations._253111; + if ("253112".equals(codeString)) + return AnzscoOccupations._253112; + if ("253211".equals(codeString)) + return AnzscoOccupations._253211; + if ("253300".equals(codeString)) + return AnzscoOccupations._253300; + if ("253311".equals(codeString)) + return AnzscoOccupations._253311; + if ("253312".equals(codeString)) + return AnzscoOccupations._253312; + if ("253313".equals(codeString)) + return AnzscoOccupations._253313; + if ("253314".equals(codeString)) + return AnzscoOccupations._253314; + if ("253315".equals(codeString)) + return AnzscoOccupations._253315; + if ("253316".equals(codeString)) + return AnzscoOccupations._253316; + if ("253317".equals(codeString)) + return AnzscoOccupations._253317; + if ("253318".equals(codeString)) + return AnzscoOccupations._253318; + if ("253321".equals(codeString)) + return AnzscoOccupations._253321; + if ("253322".equals(codeString)) + return AnzscoOccupations._253322; + if ("253323".equals(codeString)) + return AnzscoOccupations._253323; + if ("253324".equals(codeString)) + return AnzscoOccupations._253324; + if ("253399".equals(codeString)) + return AnzscoOccupations._253399; + if ("253411".equals(codeString)) + return AnzscoOccupations._253411; + if ("253500".equals(codeString)) + return AnzscoOccupations._253500; + if ("253511".equals(codeString)) + return AnzscoOccupations._253511; + if ("253512".equals(codeString)) + return AnzscoOccupations._253512; + if ("253513".equals(codeString)) + return AnzscoOccupations._253513; + if ("253514".equals(codeString)) + return AnzscoOccupations._253514; + if ("253515".equals(codeString)) + return AnzscoOccupations._253515; + if ("253516".equals(codeString)) + return AnzscoOccupations._253516; + if ("253517".equals(codeString)) + return AnzscoOccupations._253517; + if ("253518".equals(codeString)) + return AnzscoOccupations._253518; + if ("253521".equals(codeString)) + return AnzscoOccupations._253521; + if ("253900".equals(codeString)) + return AnzscoOccupations._253900; + if ("253911".equals(codeString)) + return AnzscoOccupations._253911; + if ("253912".equals(codeString)) + return AnzscoOccupations._253912; + if ("253913".equals(codeString)) + return AnzscoOccupations._253913; + if ("253914".equals(codeString)) + return AnzscoOccupations._253914; + if ("253915".equals(codeString)) + return AnzscoOccupations._253915; + if ("253916".equals(codeString)) + return AnzscoOccupations._253916; + if ("253999".equals(codeString)) + return AnzscoOccupations._253999; + if ("254000".equals(codeString)) + return AnzscoOccupations._254000; + if ("254111".equals(codeString)) + return AnzscoOccupations._254111; + if ("254200".equals(codeString)) + return AnzscoOccupations._254200; + if ("254211".equals(codeString)) + return AnzscoOccupations._254211; + if ("254212".equals(codeString)) + return AnzscoOccupations._254212; + if ("254311".equals(codeString)) + return AnzscoOccupations._254311; + if ("254400".equals(codeString)) + return AnzscoOccupations._254400; + if ("254411".equals(codeString)) + return AnzscoOccupations._254411; + if ("254412".equals(codeString)) + return AnzscoOccupations._254412; + if ("254413".equals(codeString)) + return AnzscoOccupations._254413; + if ("254414".equals(codeString)) + return AnzscoOccupations._254414; + if ("254415".equals(codeString)) + return AnzscoOccupations._254415; + if ("254416".equals(codeString)) + return AnzscoOccupations._254416; + if ("254417".equals(codeString)) + return AnzscoOccupations._254417; + if ("254418".equals(codeString)) + return AnzscoOccupations._254418; + if ("254421".equals(codeString)) + return AnzscoOccupations._254421; + if ("254422".equals(codeString)) + return AnzscoOccupations._254422; + if ("254423".equals(codeString)) + return AnzscoOccupations._254423; + if ("254424".equals(codeString)) + return AnzscoOccupations._254424; + if ("254499".equals(codeString)) + return AnzscoOccupations._254499; + if ("260000".equals(codeString)) + return AnzscoOccupations._260000; + if ("261000".equals(codeString)) + return AnzscoOccupations._261000; + if ("261100".equals(codeString)) + return AnzscoOccupations._261100; + if ("261111".equals(codeString)) + return AnzscoOccupations._261111; + if ("261112".equals(codeString)) + return AnzscoOccupations._261112; + if ("261200".equals(codeString)) + return AnzscoOccupations._261200; + if ("261211".equals(codeString)) + return AnzscoOccupations._261211; + if ("261212".equals(codeString)) + return AnzscoOccupations._261212; + if ("261300".equals(codeString)) + return AnzscoOccupations._261300; + if ("261311".equals(codeString)) + return AnzscoOccupations._261311; + if ("261312".equals(codeString)) + return AnzscoOccupations._261312; + if ("261313".equals(codeString)) + return AnzscoOccupations._261313; + if ("261399".equals(codeString)) + return AnzscoOccupations._261399; + if ("262100".equals(codeString)) + return AnzscoOccupations._262100; + if ("262111".equals(codeString)) + return AnzscoOccupations._262111; + if ("262112".equals(codeString)) + return AnzscoOccupations._262112; + if ("262113".equals(codeString)) + return AnzscoOccupations._262113; + if ("263000".equals(codeString)) + return AnzscoOccupations._263000; + if ("263100".equals(codeString)) + return AnzscoOccupations._263100; + if ("263111".equals(codeString)) + return AnzscoOccupations._263111; + if ("263112".equals(codeString)) + return AnzscoOccupations._263112; + if ("263113".equals(codeString)) + return AnzscoOccupations._263113; + if ("263200".equals(codeString)) + return AnzscoOccupations._263200; + if ("263211".equals(codeString)) + return AnzscoOccupations._263211; + if ("263212".equals(codeString)) + return AnzscoOccupations._263212; + if ("263213".equals(codeString)) + return AnzscoOccupations._263213; + if ("263299".equals(codeString)) + return AnzscoOccupations._263299; + if ("263300".equals(codeString)) + return AnzscoOccupations._263300; + if ("263311".equals(codeString)) + return AnzscoOccupations._263311; + if ("263312".equals(codeString)) + return AnzscoOccupations._263312; + if ("270000".equals(codeString)) + return AnzscoOccupations._270000; + if ("271000".equals(codeString)) + return AnzscoOccupations._271000; + if ("271111".equals(codeString)) + return AnzscoOccupations._271111; + if ("271200".equals(codeString)) + return AnzscoOccupations._271200; + if ("271211".equals(codeString)) + return AnzscoOccupations._271211; + if ("271212".equals(codeString)) + return AnzscoOccupations._271212; + if ("271213".equals(codeString)) + return AnzscoOccupations._271213; + if ("271299".equals(codeString)) + return AnzscoOccupations._271299; + if ("271311".equals(codeString)) + return AnzscoOccupations._271311; + if ("272000".equals(codeString)) + return AnzscoOccupations._272000; + if ("272100".equals(codeString)) + return AnzscoOccupations._272100; + if ("272111".equals(codeString)) + return AnzscoOccupations._272111; + if ("272112".equals(codeString)) + return AnzscoOccupations._272112; + if ("272113".equals(codeString)) + return AnzscoOccupations._272113; + if ("272114".equals(codeString)) + return AnzscoOccupations._272114; + if ("272115".equals(codeString)) + return AnzscoOccupations._272115; + if ("272199".equals(codeString)) + return AnzscoOccupations._272199; + if ("272211".equals(codeString)) + return AnzscoOccupations._272211; + if ("272300".equals(codeString)) + return AnzscoOccupations._272300; + if ("272311".equals(codeString)) + return AnzscoOccupations._272311; + if ("272312".equals(codeString)) + return AnzscoOccupations._272312; + if ("272313".equals(codeString)) + return AnzscoOccupations._272313; + if ("272314".equals(codeString)) + return AnzscoOccupations._272314; + if ("272399".equals(codeString)) + return AnzscoOccupations._272399; + if ("272400".equals(codeString)) + return AnzscoOccupations._272400; + if ("272411".equals(codeString)) + return AnzscoOccupations._272411; + if ("272412".equals(codeString)) + return AnzscoOccupations._272412; + if ("272413".equals(codeString)) + return AnzscoOccupations._272413; + if ("272499".equals(codeString)) + return AnzscoOccupations._272499; + if ("272511".equals(codeString)) + return AnzscoOccupations._272511; + if ("272600".equals(codeString)) + return AnzscoOccupations._272600; + if ("272611".equals(codeString)) + return AnzscoOccupations._272611; + if ("272612".equals(codeString)) + return AnzscoOccupations._272612; + if ("272613".equals(codeString)) + return AnzscoOccupations._272613; + if ("300000".equals(codeString)) + return AnzscoOccupations._300000; + if ("310000".equals(codeString)) + return AnzscoOccupations._310000; + if ("311000".equals(codeString)) + return AnzscoOccupations._311000; + if ("311111".equals(codeString)) + return AnzscoOccupations._311111; + if ("311200".equals(codeString)) + return AnzscoOccupations._311200; + if ("311211".equals(codeString)) + return AnzscoOccupations._311211; + if ("311212".equals(codeString)) + return AnzscoOccupations._311212; + if ("311213".equals(codeString)) + return AnzscoOccupations._311213; + if ("311214".equals(codeString)) + return AnzscoOccupations._311214; + if ("311215".equals(codeString)) + return AnzscoOccupations._311215; + if ("311299".equals(codeString)) + return AnzscoOccupations._311299; + if ("311300".equals(codeString)) + return AnzscoOccupations._311300; + if ("311311".equals(codeString)) + return AnzscoOccupations._311311; + if ("311312".equals(codeString)) + return AnzscoOccupations._311312; + if ("311313".equals(codeString)) + return AnzscoOccupations._311313; + if ("311399".equals(codeString)) + return AnzscoOccupations._311399; + if ("311400".equals(codeString)) + return AnzscoOccupations._311400; + if ("311411".equals(codeString)) + return AnzscoOccupations._311411; + if ("311412".equals(codeString)) + return AnzscoOccupations._311412; + if ("311413".equals(codeString)) + return AnzscoOccupations._311413; + if ("311414".equals(codeString)) + return AnzscoOccupations._311414; + if ("311499".equals(codeString)) + return AnzscoOccupations._311499; + if ("312000".equals(codeString)) + return AnzscoOccupations._312000; + if ("312100".equals(codeString)) + return AnzscoOccupations._312100; + if ("312111".equals(codeString)) + return AnzscoOccupations._312111; + if ("312112".equals(codeString)) + return AnzscoOccupations._312112; + if ("312113".equals(codeString)) + return AnzscoOccupations._312113; + if ("312114".equals(codeString)) + return AnzscoOccupations._312114; + if ("312115".equals(codeString)) + return AnzscoOccupations._312115; + if ("312116".equals(codeString)) + return AnzscoOccupations._312116; + if ("312200".equals(codeString)) + return AnzscoOccupations._312200; + if ("312211".equals(codeString)) + return AnzscoOccupations._312211; + if ("312212".equals(codeString)) + return AnzscoOccupations._312212; + if ("312300".equals(codeString)) + return AnzscoOccupations._312300; + if ("312311".equals(codeString)) + return AnzscoOccupations._312311; + if ("312312".equals(codeString)) + return AnzscoOccupations._312312; + if ("312400".equals(codeString)) + return AnzscoOccupations._312400; + if ("312411".equals(codeString)) + return AnzscoOccupations._312411; + if ("312412".equals(codeString)) + return AnzscoOccupations._312412; + if ("312500".equals(codeString)) + return AnzscoOccupations._312500; + if ("312511".equals(codeString)) + return AnzscoOccupations._312511; + if ("312512".equals(codeString)) + return AnzscoOccupations._312512; + if ("312611".equals(codeString)) + return AnzscoOccupations._312611; + if ("312900".equals(codeString)) + return AnzscoOccupations._312900; + if ("312911".equals(codeString)) + return AnzscoOccupations._312911; + if ("312912".equals(codeString)) + return AnzscoOccupations._312912; + if ("312913".equals(codeString)) + return AnzscoOccupations._312913; + if ("312999".equals(codeString)) + return AnzscoOccupations._312999; + if ("313000".equals(codeString)) + return AnzscoOccupations._313000; + if ("313100".equals(codeString)) + return AnzscoOccupations._313100; + if ("313111".equals(codeString)) + return AnzscoOccupations._313111; + if ("313112".equals(codeString)) + return AnzscoOccupations._313112; + if ("313113".equals(codeString)) + return AnzscoOccupations._313113; + if ("313199".equals(codeString)) + return AnzscoOccupations._313199; + if ("313200".equals(codeString)) + return AnzscoOccupations._313200; + if ("313211".equals(codeString)) + return AnzscoOccupations._313211; + if ("313212".equals(codeString)) + return AnzscoOccupations._313212; + if ("313213".equals(codeString)) + return AnzscoOccupations._313213; + if ("313214".equals(codeString)) + return AnzscoOccupations._313214; + if ("320000".equals(codeString)) + return AnzscoOccupations._320000; + if ("321000".equals(codeString)) + return AnzscoOccupations._321000; + if ("321111".equals(codeString)) + return AnzscoOccupations._321111; + if ("321200".equals(codeString)) + return AnzscoOccupations._321200; + if ("321211".equals(codeString)) + return AnzscoOccupations._321211; + if ("321212".equals(codeString)) + return AnzscoOccupations._321212; + if ("321213".equals(codeString)) + return AnzscoOccupations._321213; + if ("321214".equals(codeString)) + return AnzscoOccupations._321214; + if ("322000".equals(codeString)) + return AnzscoOccupations._322000; + if ("322100".equals(codeString)) + return AnzscoOccupations._322100; + if ("322111".equals(codeString)) + return AnzscoOccupations._322111; + if ("322112".equals(codeString)) + return AnzscoOccupations._322112; + if ("322113".equals(codeString)) + return AnzscoOccupations._322113; + if ("322114".equals(codeString)) + return AnzscoOccupations._322114; + if ("322115".equals(codeString)) + return AnzscoOccupations._322115; + if ("322211".equals(codeString)) + return AnzscoOccupations._322211; + if ("322300".equals(codeString)) + return AnzscoOccupations._322300; + if ("322311".equals(codeString)) + return AnzscoOccupations._322311; + if ("322312".equals(codeString)) + return AnzscoOccupations._322312; + if ("322313".equals(codeString)) + return AnzscoOccupations._322313; + if ("323000".equals(codeString)) + return AnzscoOccupations._323000; + if ("323100".equals(codeString)) + return AnzscoOccupations._323100; + if ("323111".equals(codeString)) + return AnzscoOccupations._323111; + if ("323112".equals(codeString)) + return AnzscoOccupations._323112; + if ("323113".equals(codeString)) + return AnzscoOccupations._323113; + if ("323200".equals(codeString)) + return AnzscoOccupations._323200; + if ("323211".equals(codeString)) + return AnzscoOccupations._323211; + if ("323212".equals(codeString)) + return AnzscoOccupations._323212; + if ("323213".equals(codeString)) + return AnzscoOccupations._323213; + if ("323214".equals(codeString)) + return AnzscoOccupations._323214; + if ("323215".equals(codeString)) + return AnzscoOccupations._323215; + if ("323299".equals(codeString)) + return AnzscoOccupations._323299; + if ("323300".equals(codeString)) + return AnzscoOccupations._323300; + if ("323311".equals(codeString)) + return AnzscoOccupations._323311; + if ("323312".equals(codeString)) + return AnzscoOccupations._323312; + if ("323313".equals(codeString)) + return AnzscoOccupations._323313; + if ("323314".equals(codeString)) + return AnzscoOccupations._323314; + if ("323315".equals(codeString)) + return AnzscoOccupations._323315; + if ("323316".equals(codeString)) + return AnzscoOccupations._323316; + if ("323400".equals(codeString)) + return AnzscoOccupations._323400; + if ("323411".equals(codeString)) + return AnzscoOccupations._323411; + if ("323412".equals(codeString)) + return AnzscoOccupations._323412; + if ("324000".equals(codeString)) + return AnzscoOccupations._324000; + if ("324111".equals(codeString)) + return AnzscoOccupations._324111; + if ("324200".equals(codeString)) + return AnzscoOccupations._324200; + if ("324211".equals(codeString)) + return AnzscoOccupations._324211; + if ("324212".equals(codeString)) + return AnzscoOccupations._324212; + if ("324311".equals(codeString)) + return AnzscoOccupations._324311; + if ("330000".equals(codeString)) + return AnzscoOccupations._330000; + if ("331000".equals(codeString)) + return AnzscoOccupations._331000; + if ("331100".equals(codeString)) + return AnzscoOccupations._331100; + if ("331111".equals(codeString)) + return AnzscoOccupations._331111; + if ("331112".equals(codeString)) + return AnzscoOccupations._331112; + if ("331211".equals(codeString)) + return AnzscoOccupations._331211; + if ("331212".equals(codeString)) + return AnzscoOccupations._331212; + if ("331213".equals(codeString)) + return AnzscoOccupations._331213; + if ("332000".equals(codeString)) + return AnzscoOccupations._332000; + if ("332111".equals(codeString)) + return AnzscoOccupations._332111; + if ("332211".equals(codeString)) + return AnzscoOccupations._332211; + if ("333000".equals(codeString)) + return AnzscoOccupations._333000; + if ("333111".equals(codeString)) + return AnzscoOccupations._333111; + if ("333200".equals(codeString)) + return AnzscoOccupations._333200; + if ("333211".equals(codeString)) + return AnzscoOccupations._333211; + if ("333212".equals(codeString)) + return AnzscoOccupations._333212; + if ("333311".equals(codeString)) + return AnzscoOccupations._333311; + if ("333411".equals(codeString)) + return AnzscoOccupations._333411; + if ("334100".equals(codeString)) + return AnzscoOccupations._334100; + if ("334111".equals(codeString)) + return AnzscoOccupations._334111; + if ("334112".equals(codeString)) + return AnzscoOccupations._334112; + if ("334113".equals(codeString)) + return AnzscoOccupations._334113; + if ("334114".equals(codeString)) + return AnzscoOccupations._334114; + if ("334115".equals(codeString)) + return AnzscoOccupations._334115; + if ("340000".equals(codeString)) + return AnzscoOccupations._340000; + if ("341100".equals(codeString)) + return AnzscoOccupations._341100; + if ("341111".equals(codeString)) + return AnzscoOccupations._341111; + if ("341112".equals(codeString)) + return AnzscoOccupations._341112; + if ("341113".equals(codeString)) + return AnzscoOccupations._341113; + if ("342000".equals(codeString)) + return AnzscoOccupations._342000; + if ("342111".equals(codeString)) + return AnzscoOccupations._342111; + if ("342200".equals(codeString)) + return AnzscoOccupations._342200; + if ("342211".equals(codeString)) + return AnzscoOccupations._342211; + if ("342212".equals(codeString)) + return AnzscoOccupations._342212; + if ("342300".equals(codeString)) + return AnzscoOccupations._342300; + if ("342311".equals(codeString)) + return AnzscoOccupations._342311; + if ("342312".equals(codeString)) + return AnzscoOccupations._342312; + if ("342313".equals(codeString)) + return AnzscoOccupations._342313; + if ("342314".equals(codeString)) + return AnzscoOccupations._342314; + if ("342315".equals(codeString)) + return AnzscoOccupations._342315; + if ("342400".equals(codeString)) + return AnzscoOccupations._342400; + if ("342411".equals(codeString)) + return AnzscoOccupations._342411; + if ("342412".equals(codeString)) + return AnzscoOccupations._342412; + if ("342413".equals(codeString)) + return AnzscoOccupations._342413; + if ("342414".equals(codeString)) + return AnzscoOccupations._342414; + if ("351000".equals(codeString)) + return AnzscoOccupations._351000; + if ("351100".equals(codeString)) + return AnzscoOccupations._351100; + if ("351111".equals(codeString)) + return AnzscoOccupations._351111; + if ("351112".equals(codeString)) + return AnzscoOccupations._351112; + if ("351211".equals(codeString)) + return AnzscoOccupations._351211; + if ("351311".equals(codeString)) + return AnzscoOccupations._351311; + if ("351411".equals(codeString)) + return AnzscoOccupations._351411; + if ("360000".equals(codeString)) + return AnzscoOccupations._360000; + if ("361000".equals(codeString)) + return AnzscoOccupations._361000; + if ("361100".equals(codeString)) + return AnzscoOccupations._361100; + if ("361111".equals(codeString)) + return AnzscoOccupations._361111; + if ("361112".equals(codeString)) + return AnzscoOccupations._361112; + if ("361113".equals(codeString)) + return AnzscoOccupations._361113; + if ("361114".equals(codeString)) + return AnzscoOccupations._361114; + if ("361199".equals(codeString)) + return AnzscoOccupations._361199; + if ("361211".equals(codeString)) + return AnzscoOccupations._361211; + if ("361311".equals(codeString)) + return AnzscoOccupations._361311; + if ("362000".equals(codeString)) + return AnzscoOccupations._362000; + if ("362111".equals(codeString)) + return AnzscoOccupations._362111; + if ("362200".equals(codeString)) + return AnzscoOccupations._362200; + if ("362211".equals(codeString)) + return AnzscoOccupations._362211; + if ("362212".equals(codeString)) + return AnzscoOccupations._362212; + if ("362213".equals(codeString)) + return AnzscoOccupations._362213; + if ("362311".equals(codeString)) + return AnzscoOccupations._362311; + if ("362411".equals(codeString)) + return AnzscoOccupations._362411; + if ("390000".equals(codeString)) + return AnzscoOccupations._390000; + if ("391111".equals(codeString)) + return AnzscoOccupations._391111; + if ("392000".equals(codeString)) + return AnzscoOccupations._392000; + if ("392100".equals(codeString)) + return AnzscoOccupations._392100; + if ("392111".equals(codeString)) + return AnzscoOccupations._392111; + if ("392112".equals(codeString)) + return AnzscoOccupations._392112; + if ("392211".equals(codeString)) + return AnzscoOccupations._392211; + if ("392300".equals(codeString)) + return AnzscoOccupations._392300; + if ("392311".equals(codeString)) + return AnzscoOccupations._392311; + if ("392312".equals(codeString)) + return AnzscoOccupations._392312; + if ("393000".equals(codeString)) + return AnzscoOccupations._393000; + if ("393100".equals(codeString)) + return AnzscoOccupations._393100; + if ("393111".equals(codeString)) + return AnzscoOccupations._393111; + if ("393112".equals(codeString)) + return AnzscoOccupations._393112; + if ("393113".equals(codeString)) + return AnzscoOccupations._393113; + if ("393114".equals(codeString)) + return AnzscoOccupations._393114; + if ("393200".equals(codeString)) + return AnzscoOccupations._393200; + if ("393211".equals(codeString)) + return AnzscoOccupations._393211; + if ("393212".equals(codeString)) + return AnzscoOccupations._393212; + if ("393213".equals(codeString)) + return AnzscoOccupations._393213; + if ("393299".equals(codeString)) + return AnzscoOccupations._393299; + if ("393311".equals(codeString)) + return AnzscoOccupations._393311; + if ("394000".equals(codeString)) + return AnzscoOccupations._394000; + if ("394111".equals(codeString)) + return AnzscoOccupations._394111; + if ("394200".equals(codeString)) + return AnzscoOccupations._394200; + if ("394211".equals(codeString)) + return AnzscoOccupations._394211; + if ("394212".equals(codeString)) + return AnzscoOccupations._394212; + if ("394213".equals(codeString)) + return AnzscoOccupations._394213; + if ("394214".equals(codeString)) + return AnzscoOccupations._394214; + if ("394299".equals(codeString)) + return AnzscoOccupations._394299; + if ("399000".equals(codeString)) + return AnzscoOccupations._399000; + if ("399100".equals(codeString)) + return AnzscoOccupations._399100; + if ("399111".equals(codeString)) + return AnzscoOccupations._399111; + if ("399112".equals(codeString)) + return AnzscoOccupations._399112; + if ("399200".equals(codeString)) + return AnzscoOccupations._399200; + if ("399211".equals(codeString)) + return AnzscoOccupations._399211; + if ("399212".equals(codeString)) + return AnzscoOccupations._399212; + if ("399213".equals(codeString)) + return AnzscoOccupations._399213; + if ("399300".equals(codeString)) + return AnzscoOccupations._399300; + if ("399311".equals(codeString)) + return AnzscoOccupations._399311; + if ("399312".equals(codeString)) + return AnzscoOccupations._399312; + if ("399411".equals(codeString)) + return AnzscoOccupations._399411; + if ("399500".equals(codeString)) + return AnzscoOccupations._399500; + if ("399511".equals(codeString)) + return AnzscoOccupations._399511; + if ("399512".equals(codeString)) + return AnzscoOccupations._399512; + if ("399513".equals(codeString)) + return AnzscoOccupations._399513; + if ("399514".equals(codeString)) + return AnzscoOccupations._399514; + if ("399515".equals(codeString)) + return AnzscoOccupations._399515; + if ("399516".equals(codeString)) + return AnzscoOccupations._399516; + if ("399517".equals(codeString)) + return AnzscoOccupations._399517; + if ("399599".equals(codeString)) + return AnzscoOccupations._399599; + if ("399611".equals(codeString)) + return AnzscoOccupations._399611; + if ("399900".equals(codeString)) + return AnzscoOccupations._399900; + if ("399911".equals(codeString)) + return AnzscoOccupations._399911; + if ("399912".equals(codeString)) + return AnzscoOccupations._399912; + if ("399913".equals(codeString)) + return AnzscoOccupations._399913; + if ("399914".equals(codeString)) + return AnzscoOccupations._399914; + if ("399915".equals(codeString)) + return AnzscoOccupations._399915; + if ("399916".equals(codeString)) + return AnzscoOccupations._399916; + if ("399917".equals(codeString)) + return AnzscoOccupations._399917; + if ("399999".equals(codeString)) + return AnzscoOccupations._399999; + if ("400000".equals(codeString)) + return AnzscoOccupations._400000; + if ("411000".equals(codeString)) + return AnzscoOccupations._411000; + if ("411100".equals(codeString)) + return AnzscoOccupations._411100; + if ("411111".equals(codeString)) + return AnzscoOccupations._411111; + if ("411112".equals(codeString)) + return AnzscoOccupations._411112; + if ("411200".equals(codeString)) + return AnzscoOccupations._411200; + if ("411211".equals(codeString)) + return AnzscoOccupations._411211; + if ("411212".equals(codeString)) + return AnzscoOccupations._411212; + if ("411213".equals(codeString)) + return AnzscoOccupations._411213; + if ("411214".equals(codeString)) + return AnzscoOccupations._411214; + if ("411311".equals(codeString)) + return AnzscoOccupations._411311; + if ("411400".equals(codeString)) + return AnzscoOccupations._411400; + if ("411411".equals(codeString)) + return AnzscoOccupations._411411; + if ("411412".equals(codeString)) + return AnzscoOccupations._411412; + if ("411511".equals(codeString)) + return AnzscoOccupations._411511; + if ("411611".equals(codeString)) + return AnzscoOccupations._411611; + if ("411700".equals(codeString)) + return AnzscoOccupations._411700; + if ("411711".equals(codeString)) + return AnzscoOccupations._411711; + if ("411712".equals(codeString)) + return AnzscoOccupations._411712; + if ("411713".equals(codeString)) + return AnzscoOccupations._411713; + if ("411714".equals(codeString)) + return AnzscoOccupations._411714; + if ("411715".equals(codeString)) + return AnzscoOccupations._411715; + if ("411716".equals(codeString)) + return AnzscoOccupations._411716; + if ("420000".equals(codeString)) + return AnzscoOccupations._420000; + if ("421100".equals(codeString)) + return AnzscoOccupations._421100; + if ("421111".equals(codeString)) + return AnzscoOccupations._421111; + if ("421112".equals(codeString)) + return AnzscoOccupations._421112; + if ("421113".equals(codeString)) + return AnzscoOccupations._421113; + if ("421114".equals(codeString)) + return AnzscoOccupations._421114; + if ("422100".equals(codeString)) + return AnzscoOccupations._422100; + if ("422111".equals(codeString)) + return AnzscoOccupations._422111; + if ("422112".equals(codeString)) + return AnzscoOccupations._422112; + if ("422115".equals(codeString)) + return AnzscoOccupations._422115; + if ("422116".equals(codeString)) + return AnzscoOccupations._422116; + if ("423000".equals(codeString)) + return AnzscoOccupations._423000; + if ("423111".equals(codeString)) + return AnzscoOccupations._423111; + if ("423211".equals(codeString)) + return AnzscoOccupations._423211; + if ("423300".equals(codeString)) + return AnzscoOccupations._423300; + if ("423311".equals(codeString)) + return AnzscoOccupations._423311; + if ("423312".equals(codeString)) + return AnzscoOccupations._423312; + if ("423313".equals(codeString)) + return AnzscoOccupations._423313; + if ("423314".equals(codeString)) + return AnzscoOccupations._423314; + if ("423400".equals(codeString)) + return AnzscoOccupations._423400; + if ("423411".equals(codeString)) + return AnzscoOccupations._423411; + if ("423412".equals(codeString)) + return AnzscoOccupations._423412; + if ("423413".equals(codeString)) + return AnzscoOccupations._423413; + if ("431000".equals(codeString)) + return AnzscoOccupations._431000; + if ("431100".equals(codeString)) + return AnzscoOccupations._431100; + if ("431111".equals(codeString)) + return AnzscoOccupations._431111; + if ("431112".equals(codeString)) + return AnzscoOccupations._431112; + if ("431211".equals(codeString)) + return AnzscoOccupations._431211; + if ("431311".equals(codeString)) + return AnzscoOccupations._431311; + if ("431411".equals(codeString)) + return AnzscoOccupations._431411; + if ("431511".equals(codeString)) + return AnzscoOccupations._431511; + if ("431900".equals(codeString)) + return AnzscoOccupations._431900; + if ("431911".equals(codeString)) + return AnzscoOccupations._431911; + if ("431912".equals(codeString)) + return AnzscoOccupations._431912; + if ("431999".equals(codeString)) + return AnzscoOccupations._431999; + if ("440000".equals(codeString)) + return AnzscoOccupations._440000; + if ("441000".equals(codeString)) + return AnzscoOccupations._441000; + if ("441111".equals(codeString)) + return AnzscoOccupations._441111; + if ("441200".equals(codeString)) + return AnzscoOccupations._441200; + if ("441211".equals(codeString)) + return AnzscoOccupations._441211; + if ("441212".equals(codeString)) + return AnzscoOccupations._441212; + if ("441300".equals(codeString)) + return AnzscoOccupations._441300; + if ("441311".equals(codeString)) + return AnzscoOccupations._441311; + if ("441312".equals(codeString)) + return AnzscoOccupations._441312; + if ("442000".equals(codeString)) + return AnzscoOccupations._442000; + if ("442111".equals(codeString)) + return AnzscoOccupations._442111; + if ("442200".equals(codeString)) + return AnzscoOccupations._442200; + if ("442211".equals(codeString)) + return AnzscoOccupations._442211; + if ("442212".equals(codeString)) + return AnzscoOccupations._442212; + if ("442213".equals(codeString)) + return AnzscoOccupations._442213; + if ("442214".equals(codeString)) + return AnzscoOccupations._442214; + if ("442215".equals(codeString)) + return AnzscoOccupations._442215; + if ("442216".equals(codeString)) + return AnzscoOccupations._442216; + if ("442217".equals(codeString)) + return AnzscoOccupations._442217; + if ("442299".equals(codeString)) + return AnzscoOccupations._442299; + if ("450000".equals(codeString)) + return AnzscoOccupations._450000; + if ("451000".equals(codeString)) + return AnzscoOccupations._451000; + if ("451111".equals(codeString)) + return AnzscoOccupations._451111; + if ("451211".equals(codeString)) + return AnzscoOccupations._451211; + if ("451300".equals(codeString)) + return AnzscoOccupations._451300; + if ("451311".equals(codeString)) + return AnzscoOccupations._451311; + if ("451399".equals(codeString)) + return AnzscoOccupations._451399; + if ("451400".equals(codeString)) + return AnzscoOccupations._451400; + if ("451411".equals(codeString)) + return AnzscoOccupations._451411; + if ("451412".equals(codeString)) + return AnzscoOccupations._451412; + if ("451500".equals(codeString)) + return AnzscoOccupations._451500; + if ("451511".equals(codeString)) + return AnzscoOccupations._451511; + if ("451512".equals(codeString)) + return AnzscoOccupations._451512; + if ("451600".equals(codeString)) + return AnzscoOccupations._451600; + if ("451611".equals(codeString)) + return AnzscoOccupations._451611; + if ("451612".equals(codeString)) + return AnzscoOccupations._451612; + if ("451700".equals(codeString)) + return AnzscoOccupations._451700; + if ("451711".equals(codeString)) + return AnzscoOccupations._451711; + if ("451799".equals(codeString)) + return AnzscoOccupations._451799; + if ("451800".equals(codeString)) + return AnzscoOccupations._451800; + if ("451811".equals(codeString)) + return AnzscoOccupations._451811; + if ("451812".equals(codeString)) + return AnzscoOccupations._451812; + if ("451813".equals(codeString)) + return AnzscoOccupations._451813; + if ("451899".equals(codeString)) + return AnzscoOccupations._451899; + if ("452000".equals(codeString)) + return AnzscoOccupations._452000; + if ("452111".equals(codeString)) + return AnzscoOccupations._452111; + if ("452200".equals(codeString)) + return AnzscoOccupations._452200; + if ("452211".equals(codeString)) + return AnzscoOccupations._452211; + if ("452212".equals(codeString)) + return AnzscoOccupations._452212; + if ("452213".equals(codeString)) + return AnzscoOccupations._452213; + if ("452214".equals(codeString)) + return AnzscoOccupations._452214; + if ("452215".equals(codeString)) + return AnzscoOccupations._452215; + if ("452216".equals(codeString)) + return AnzscoOccupations._452216; + if ("452217".equals(codeString)) + return AnzscoOccupations._452217; + if ("452299".equals(codeString)) + return AnzscoOccupations._452299; + if ("452300".equals(codeString)) + return AnzscoOccupations._452300; + if ("452311".equals(codeString)) + return AnzscoOccupations._452311; + if ("452312".equals(codeString)) + return AnzscoOccupations._452312; + if ("452313".equals(codeString)) + return AnzscoOccupations._452313; + if ("452314".equals(codeString)) + return AnzscoOccupations._452314; + if ("452315".equals(codeString)) + return AnzscoOccupations._452315; + if ("452316".equals(codeString)) + return AnzscoOccupations._452316; + if ("452317".equals(codeString)) + return AnzscoOccupations._452317; + if ("452318".equals(codeString)) + return AnzscoOccupations._452318; + if ("452321".equals(codeString)) + return AnzscoOccupations._452321; + if ("452322".equals(codeString)) + return AnzscoOccupations._452322; + if ("452323".equals(codeString)) + return AnzscoOccupations._452323; + if ("452400".equals(codeString)) + return AnzscoOccupations._452400; + if ("452411".equals(codeString)) + return AnzscoOccupations._452411; + if ("452412".equals(codeString)) + return AnzscoOccupations._452412; + if ("452413".equals(codeString)) + return AnzscoOccupations._452413; + if ("452414".equals(codeString)) + return AnzscoOccupations._452414; + if ("452499".equals(codeString)) + return AnzscoOccupations._452499; + if ("500000".equals(codeString)) + return AnzscoOccupations._500000; + if ("510000".equals(codeString)) + return AnzscoOccupations._510000; + if ("511100".equals(codeString)) + return AnzscoOccupations._511100; + if ("511111".equals(codeString)) + return AnzscoOccupations._511111; + if ("511112".equals(codeString)) + return AnzscoOccupations._511112; + if ("512000".equals(codeString)) + return AnzscoOccupations._512000; + if ("512111".equals(codeString)) + return AnzscoOccupations._512111; + if ("512200".equals(codeString)) + return AnzscoOccupations._512200; + if ("512211".equals(codeString)) + return AnzscoOccupations._512211; + if ("512299".equals(codeString)) + return AnzscoOccupations._512299; + if ("521000".equals(codeString)) + return AnzscoOccupations._521000; + if ("521111".equals(codeString)) + return AnzscoOccupations._521111; + if ("521200".equals(codeString)) + return AnzscoOccupations._521200; + if ("521211".equals(codeString)) + return AnzscoOccupations._521211; + if ("521212".equals(codeString)) + return AnzscoOccupations._521212; + if ("530000".equals(codeString)) + return AnzscoOccupations._530000; + if ("531111".equals(codeString)) + return AnzscoOccupations._531111; + if ("532100".equals(codeString)) + return AnzscoOccupations._532100; + if ("532111".equals(codeString)) + return AnzscoOccupations._532111; + if ("532112".equals(codeString)) + return AnzscoOccupations._532112; + if ("532113".equals(codeString)) + return AnzscoOccupations._532113; + if ("540000".equals(codeString)) + return AnzscoOccupations._540000; + if ("541000".equals(codeString)) + return AnzscoOccupations._541000; + if ("541100".equals(codeString)) + return AnzscoOccupations._541100; + if ("541111".equals(codeString)) + return AnzscoOccupations._541111; + if ("541112".equals(codeString)) + return AnzscoOccupations._541112; + if ("541211".equals(codeString)) + return AnzscoOccupations._541211; + if ("542100".equals(codeString)) + return AnzscoOccupations._542100; + if ("542111".equals(codeString)) + return AnzscoOccupations._542111; + if ("542112".equals(codeString)) + return AnzscoOccupations._542112; + if ("542113".equals(codeString)) + return AnzscoOccupations._542113; + if ("542114".equals(codeString)) + return AnzscoOccupations._542114; + if ("550000".equals(codeString)) + return AnzscoOccupations._550000; + if ("551000".equals(codeString)) + return AnzscoOccupations._551000; + if ("551100".equals(codeString)) + return AnzscoOccupations._551100; + if ("551111".equals(codeString)) + return AnzscoOccupations._551111; + if ("551112".equals(codeString)) + return AnzscoOccupations._551112; + if ("551211".equals(codeString)) + return AnzscoOccupations._551211; + if ("551311".equals(codeString)) + return AnzscoOccupations._551311; + if ("552000".equals(codeString)) + return AnzscoOccupations._552000; + if ("552111".equals(codeString)) + return AnzscoOccupations._552111; + if ("552211".equals(codeString)) + return AnzscoOccupations._552211; + if ("552300".equals(codeString)) + return AnzscoOccupations._552300; + if ("552311".equals(codeString)) + return AnzscoOccupations._552311; + if ("552312".equals(codeString)) + return AnzscoOccupations._552312; + if ("552313".equals(codeString)) + return AnzscoOccupations._552313; + if ("552314".equals(codeString)) + return AnzscoOccupations._552314; + if ("561000".equals(codeString)) + return AnzscoOccupations._561000; + if ("561100".equals(codeString)) + return AnzscoOccupations._561100; + if ("561111".equals(codeString)) + return AnzscoOccupations._561111; + if ("561112".equals(codeString)) + return AnzscoOccupations._561112; + if ("561113".equals(codeString)) + return AnzscoOccupations._561113; + if ("561199".equals(codeString)) + return AnzscoOccupations._561199; + if ("561200".equals(codeString)) + return AnzscoOccupations._561200; + if ("561211".equals(codeString)) + return AnzscoOccupations._561211; + if ("561212".equals(codeString)) + return AnzscoOccupations._561212; + if ("561311".equals(codeString)) + return AnzscoOccupations._561311; + if ("561400".equals(codeString)) + return AnzscoOccupations._561400; + if ("561411".equals(codeString)) + return AnzscoOccupations._561411; + if ("561412".equals(codeString)) + return AnzscoOccupations._561412; + if ("561511".equals(codeString)) + return AnzscoOccupations._561511; + if ("561611".equals(codeString)) + return AnzscoOccupations._561611; + if ("561900".equals(codeString)) + return AnzscoOccupations._561900; + if ("561911".equals(codeString)) + return AnzscoOccupations._561911; + if ("561912".equals(codeString)) + return AnzscoOccupations._561912; + if ("561913".equals(codeString)) + return AnzscoOccupations._561913; + if ("561999".equals(codeString)) + return AnzscoOccupations._561999; + if ("590000".equals(codeString)) + return AnzscoOccupations._590000; + if ("591000".equals(codeString)) + return AnzscoOccupations._591000; + if ("591100".equals(codeString)) + return AnzscoOccupations._591100; + if ("591111".equals(codeString)) + return AnzscoOccupations._591111; + if ("591112".equals(codeString)) + return AnzscoOccupations._591112; + if ("591113".equals(codeString)) + return AnzscoOccupations._591113; + if ("591114".equals(codeString)) + return AnzscoOccupations._591114; + if ("591115".equals(codeString)) + return AnzscoOccupations._591115; + if ("591116".equals(codeString)) + return AnzscoOccupations._591116; + if ("591200".equals(codeString)) + return AnzscoOccupations._591200; + if ("591211".equals(codeString)) + return AnzscoOccupations._591211; + if ("591212".equals(codeString)) + return AnzscoOccupations._591212; + if ("599000".equals(codeString)) + return AnzscoOccupations._599000; + if ("599100".equals(codeString)) + return AnzscoOccupations._599100; + if ("599111".equals(codeString)) + return AnzscoOccupations._599111; + if ("599112".equals(codeString)) + return AnzscoOccupations._599112; + if ("599200".equals(codeString)) + return AnzscoOccupations._599200; + if ("599211".equals(codeString)) + return AnzscoOccupations._599211; + if ("599212".equals(codeString)) + return AnzscoOccupations._599212; + if ("599213".equals(codeString)) + return AnzscoOccupations._599213; + if ("599214".equals(codeString)) + return AnzscoOccupations._599214; + if ("599215".equals(codeString)) + return AnzscoOccupations._599215; + if ("599311".equals(codeString)) + return AnzscoOccupations._599311; + if ("599411".equals(codeString)) + return AnzscoOccupations._599411; + if ("599500".equals(codeString)) + return AnzscoOccupations._599500; + if ("599511".equals(codeString)) + return AnzscoOccupations._599511; + if ("599512".equals(codeString)) + return AnzscoOccupations._599512; + if ("599513".equals(codeString)) + return AnzscoOccupations._599513; + if ("599514".equals(codeString)) + return AnzscoOccupations._599514; + if ("599515".equals(codeString)) + return AnzscoOccupations._599515; + if ("599516".equals(codeString)) + return AnzscoOccupations._599516; + if ("599517".equals(codeString)) + return AnzscoOccupations._599517; + if ("599518".equals(codeString)) + return AnzscoOccupations._599518; + if ("599521".equals(codeString)) + return AnzscoOccupations._599521; + if ("599599".equals(codeString)) + return AnzscoOccupations._599599; + if ("599600".equals(codeString)) + return AnzscoOccupations._599600; + if ("599611".equals(codeString)) + return AnzscoOccupations._599611; + if ("599612".equals(codeString)) + return AnzscoOccupations._599612; + if ("599613".equals(codeString)) + return AnzscoOccupations._599613; + if ("599711".equals(codeString)) + return AnzscoOccupations._599711; + if ("599900".equals(codeString)) + return AnzscoOccupations._599900; + if ("599911".equals(codeString)) + return AnzscoOccupations._599911; + if ("599912".equals(codeString)) + return AnzscoOccupations._599912; + if ("599913".equals(codeString)) + return AnzscoOccupations._599913; + if ("599914".equals(codeString)) + return AnzscoOccupations._599914; + if ("599999".equals(codeString)) + return AnzscoOccupations._599999; + if ("600000".equals(codeString)) + return AnzscoOccupations._600000; + if ("610000".equals(codeString)) + return AnzscoOccupations._610000; + if ("611000".equals(codeString)) + return AnzscoOccupations._611000; + if ("611100".equals(codeString)) + return AnzscoOccupations._611100; + if ("611111".equals(codeString)) + return AnzscoOccupations._611111; + if ("611112".equals(codeString)) + return AnzscoOccupations._611112; + if ("611211".equals(codeString)) + return AnzscoOccupations._611211; + if ("611300".equals(codeString)) + return AnzscoOccupations._611300; + if ("611311".equals(codeString)) + return AnzscoOccupations._611311; + if ("611312".equals(codeString)) + return AnzscoOccupations._611312; + if ("611313".equals(codeString)) + return AnzscoOccupations._611313; + if ("611314".equals(codeString)) + return AnzscoOccupations._611314; + if ("611399".equals(codeString)) + return AnzscoOccupations._611399; + if ("612100".equals(codeString)) + return AnzscoOccupations._612100; + if ("612111".equals(codeString)) + return AnzscoOccupations._612111; + if ("612112".equals(codeString)) + return AnzscoOccupations._612112; + if ("612113".equals(codeString)) + return AnzscoOccupations._612113; + if ("612114".equals(codeString)) + return AnzscoOccupations._612114; + if ("612115".equals(codeString)) + return AnzscoOccupations._612115; + if ("621000".equals(codeString)) + return AnzscoOccupations._621000; + if ("621111".equals(codeString)) + return AnzscoOccupations._621111; + if ("621211".equals(codeString)) + return AnzscoOccupations._621211; + if ("621300".equals(codeString)) + return AnzscoOccupations._621300; + if ("621311".equals(codeString)) + return AnzscoOccupations._621311; + if ("621312".equals(codeString)) + return AnzscoOccupations._621312; + if ("621411".equals(codeString)) + return AnzscoOccupations._621411; + if ("621511".equals(codeString)) + return AnzscoOccupations._621511; + if ("621611".equals(codeString)) + return AnzscoOccupations._621611; + if ("621700".equals(codeString)) + return AnzscoOccupations._621700; + if ("621711".equals(codeString)) + return AnzscoOccupations._621711; + if ("621712".equals(codeString)) + return AnzscoOccupations._621712; + if ("621713".equals(codeString)) + return AnzscoOccupations._621713; + if ("621900".equals(codeString)) + return AnzscoOccupations._621900; + if ("621911".equals(codeString)) + return AnzscoOccupations._621911; + if ("621912".equals(codeString)) + return AnzscoOccupations._621912; + if ("621999".equals(codeString)) + return AnzscoOccupations._621999; + if ("630000".equals(codeString)) + return AnzscoOccupations._630000; + if ("631100".equals(codeString)) + return AnzscoOccupations._631100; + if ("631111".equals(codeString)) + return AnzscoOccupations._631111; + if ("631112".equals(codeString)) + return AnzscoOccupations._631112; + if ("639000".equals(codeString)) + return AnzscoOccupations._639000; + if ("639100".equals(codeString)) + return AnzscoOccupations._639100; + if ("639111".equals(codeString)) + return AnzscoOccupations._639111; + if ("639112".equals(codeString)) + return AnzscoOccupations._639112; + if ("639200".equals(codeString)) + return AnzscoOccupations._639200; + if ("639211".equals(codeString)) + return AnzscoOccupations._639211; + if ("639212".equals(codeString)) + return AnzscoOccupations._639212; + if ("639311".equals(codeString)) + return AnzscoOccupations._639311; + if ("639400".equals(codeString)) + return AnzscoOccupations._639400; + if ("639411".equals(codeString)) + return AnzscoOccupations._639411; + if ("639412".equals(codeString)) + return AnzscoOccupations._639412; + if ("639511".equals(codeString)) + return AnzscoOccupations._639511; + if ("639911".equals(codeString)) + return AnzscoOccupations._639911; + if ("700000".equals(codeString)) + return AnzscoOccupations._700000; + if ("710000".equals(codeString)) + return AnzscoOccupations._710000; + if ("711000".equals(codeString)) + return AnzscoOccupations._711000; + if ("711100".equals(codeString)) + return AnzscoOccupations._711100; + if ("711111".equals(codeString)) + return AnzscoOccupations._711111; + if ("711112".equals(codeString)) + return AnzscoOccupations._711112; + if ("711113".equals(codeString)) + return AnzscoOccupations._711113; + if ("711114".equals(codeString)) + return AnzscoOccupations._711114; + if ("711199".equals(codeString)) + return AnzscoOccupations._711199; + if ("711211".equals(codeString)) + return AnzscoOccupations._711211; + if ("711300".equals(codeString)) + return AnzscoOccupations._711300; + if ("711311".equals(codeString)) + return AnzscoOccupations._711311; + if ("711312".equals(codeString)) + return AnzscoOccupations._711312; + if ("711411".equals(codeString)) + return AnzscoOccupations._711411; + if ("711500".equals(codeString)) + return AnzscoOccupations._711500; + if ("711511".equals(codeString)) + return AnzscoOccupations._711511; + if ("711512".equals(codeString)) + return AnzscoOccupations._711512; + if ("711513".equals(codeString)) + return AnzscoOccupations._711513; + if ("711514".equals(codeString)) + return AnzscoOccupations._711514; + if ("711515".equals(codeString)) + return AnzscoOccupations._711515; + if ("711516".equals(codeString)) + return AnzscoOccupations._711516; + if ("711599".equals(codeString)) + return AnzscoOccupations._711599; + if ("711611".equals(codeString)) + return AnzscoOccupations._711611; + if ("711700".equals(codeString)) + return AnzscoOccupations._711700; + if ("711711".equals(codeString)) + return AnzscoOccupations._711711; + if ("711712".equals(codeString)) + return AnzscoOccupations._711712; + if ("711713".equals(codeString)) + return AnzscoOccupations._711713; + if ("711714".equals(codeString)) + return AnzscoOccupations._711714; + if ("711715".equals(codeString)) + return AnzscoOccupations._711715; + if ("711716".equals(codeString)) + return AnzscoOccupations._711716; + if ("711799".equals(codeString)) + return AnzscoOccupations._711799; + if ("711900".equals(codeString)) + return AnzscoOccupations._711900; + if ("711911".equals(codeString)) + return AnzscoOccupations._711911; + if ("711912".equals(codeString)) + return AnzscoOccupations._711912; + if ("711913".equals(codeString)) + return AnzscoOccupations._711913; + if ("711914".equals(codeString)) + return AnzscoOccupations._711914; + if ("711999".equals(codeString)) + return AnzscoOccupations._711999; + if ("712000".equals(codeString)) + return AnzscoOccupations._712000; + if ("712111".equals(codeString)) + return AnzscoOccupations._712111; + if ("712200".equals(codeString)) + return AnzscoOccupations._712200; + if ("712211".equals(codeString)) + return AnzscoOccupations._712211; + if ("712212".equals(codeString)) + return AnzscoOccupations._712212; + if ("712213".equals(codeString)) + return AnzscoOccupations._712213; + if ("712311".equals(codeString)) + return AnzscoOccupations._712311; + if ("712900".equals(codeString)) + return AnzscoOccupations._712900; + if ("712911".equals(codeString)) + return AnzscoOccupations._712911; + if ("712912".equals(codeString)) + return AnzscoOccupations._712912; + if ("712913".equals(codeString)) + return AnzscoOccupations._712913; + if ("712914".equals(codeString)) + return AnzscoOccupations._712914; + if ("712915".equals(codeString)) + return AnzscoOccupations._712915; + if ("712916".equals(codeString)) + return AnzscoOccupations._712916; + if ("712917".equals(codeString)) + return AnzscoOccupations._712917; + if ("712918".equals(codeString)) + return AnzscoOccupations._712918; + if ("712921".equals(codeString)) + return AnzscoOccupations._712921; + if ("712922".equals(codeString)) + return AnzscoOccupations._712922; + if ("712999".equals(codeString)) + return AnzscoOccupations._712999; + if ("721000".equals(codeString)) + return AnzscoOccupations._721000; + if ("721100".equals(codeString)) + return AnzscoOccupations._721100; + if ("721111".equals(codeString)) + return AnzscoOccupations._721111; + if ("721112".equals(codeString)) + return AnzscoOccupations._721112; + if ("721200".equals(codeString)) + return AnzscoOccupations._721200; + if ("721211".equals(codeString)) + return AnzscoOccupations._721211; + if ("721212".equals(codeString)) + return AnzscoOccupations._721212; + if ("721213".equals(codeString)) + return AnzscoOccupations._721213; + if ("721214".equals(codeString)) + return AnzscoOccupations._721214; + if ("721215".equals(codeString)) + return AnzscoOccupations._721215; + if ("721216".equals(codeString)) + return AnzscoOccupations._721216; + if ("721311".equals(codeString)) + return AnzscoOccupations._721311; + if ("721900".equals(codeString)) + return AnzscoOccupations._721900; + if ("721911".equals(codeString)) + return AnzscoOccupations._721911; + if ("721912".equals(codeString)) + return AnzscoOccupations._721912; + if ("721913".equals(codeString)) + return AnzscoOccupations._721913; + if ("721914".equals(codeString)) + return AnzscoOccupations._721914; + if ("721915".equals(codeString)) + return AnzscoOccupations._721915; + if ("721916".equals(codeString)) + return AnzscoOccupations._721916; + if ("721999".equals(codeString)) + return AnzscoOccupations._721999; + if ("730000".equals(codeString)) + return AnzscoOccupations._730000; + if ("731000".equals(codeString)) + return AnzscoOccupations._731000; + if ("731100".equals(codeString)) + return AnzscoOccupations._731100; + if ("731111".equals(codeString)) + return AnzscoOccupations._731111; + if ("731112".equals(codeString)) + return AnzscoOccupations._731112; + if ("731199".equals(codeString)) + return AnzscoOccupations._731199; + if ("731200".equals(codeString)) + return AnzscoOccupations._731200; + if ("731211".equals(codeString)) + return AnzscoOccupations._731211; + if ("731212".equals(codeString)) + return AnzscoOccupations._731212; + if ("731213".equals(codeString)) + return AnzscoOccupations._731213; + if ("731300".equals(codeString)) + return AnzscoOccupations._731300; + if ("731311".equals(codeString)) + return AnzscoOccupations._731311; + if ("731312".equals(codeString)) + return AnzscoOccupations._731312; + if ("732111".equals(codeString)) + return AnzscoOccupations._732111; + if ("733100".equals(codeString)) + return AnzscoOccupations._733100; + if ("733111".equals(codeString)) + return AnzscoOccupations._733111; + if ("733112".equals(codeString)) + return AnzscoOccupations._733112; + if ("733113".equals(codeString)) + return AnzscoOccupations._733113; + if ("733114".equals(codeString)) + return AnzscoOccupations._733114; + if ("733115".equals(codeString)) + return AnzscoOccupations._733115; + if ("741111".equals(codeString)) + return AnzscoOccupations._741111; + if ("800000".equals(codeString)) + return AnzscoOccupations._800000; + if ("811000".equals(codeString)) + return AnzscoOccupations._811000; + if ("811111".equals(codeString)) + return AnzscoOccupations._811111; + if ("811211".equals(codeString)) + return AnzscoOccupations._811211; + if ("811311".equals(codeString)) + return AnzscoOccupations._811311; + if ("811400".equals(codeString)) + return AnzscoOccupations._811400; + if ("811411".equals(codeString)) + return AnzscoOccupations._811411; + if ("811412".equals(codeString)) + return AnzscoOccupations._811412; + if ("811500".equals(codeString)) + return AnzscoOccupations._811500; + if ("811511".equals(codeString)) + return AnzscoOccupations._811511; + if ("811512".equals(codeString)) + return AnzscoOccupations._811512; + if ("811513".equals(codeString)) + return AnzscoOccupations._811513; + if ("811600".equals(codeString)) + return AnzscoOccupations._811600; + if ("811611".equals(codeString)) + return AnzscoOccupations._811611; + if ("811612".equals(codeString)) + return AnzscoOccupations._811612; + if ("811699".equals(codeString)) + return AnzscoOccupations._811699; + if ("821000".equals(codeString)) + return AnzscoOccupations._821000; + if ("821100".equals(codeString)) + return AnzscoOccupations._821100; + if ("821111".equals(codeString)) + return AnzscoOccupations._821111; + if ("821112".equals(codeString)) + return AnzscoOccupations._821112; + if ("821113".equals(codeString)) + return AnzscoOccupations._821113; + if ("821114".equals(codeString)) + return AnzscoOccupations._821114; + if ("821211".equals(codeString)) + return AnzscoOccupations._821211; + if ("821311".equals(codeString)) + return AnzscoOccupations._821311; + if ("821400".equals(codeString)) + return AnzscoOccupations._821400; + if ("821411".equals(codeString)) + return AnzscoOccupations._821411; + if ("821412".equals(codeString)) + return AnzscoOccupations._821412; + if ("821511".equals(codeString)) + return AnzscoOccupations._821511; + if ("821611".equals(codeString)) + return AnzscoOccupations._821611; + if ("821700".equals(codeString)) + return AnzscoOccupations._821700; + if ("821711".equals(codeString)) + return AnzscoOccupations._821711; + if ("821712".equals(codeString)) + return AnzscoOccupations._821712; + if ("821713".equals(codeString)) + return AnzscoOccupations._821713; + if ("821714".equals(codeString)) + return AnzscoOccupations._821714; + if ("821900".equals(codeString)) + return AnzscoOccupations._821900; + if ("821911".equals(codeString)) + return AnzscoOccupations._821911; + if ("821912".equals(codeString)) + return AnzscoOccupations._821912; + if ("821913".equals(codeString)) + return AnzscoOccupations._821913; + if ("821914".equals(codeString)) + return AnzscoOccupations._821914; + if ("821915".equals(codeString)) + return AnzscoOccupations._821915; + if ("830000".equals(codeString)) + return AnzscoOccupations._830000; + if ("831000".equals(codeString)) + return AnzscoOccupations._831000; + if ("831100".equals(codeString)) + return AnzscoOccupations._831100; + if ("831111".equals(codeString)) + return AnzscoOccupations._831111; + if ("831112".equals(codeString)) + return AnzscoOccupations._831112; + if ("831113".equals(codeString)) + return AnzscoOccupations._831113; + if ("831114".equals(codeString)) + return AnzscoOccupations._831114; + if ("831115".equals(codeString)) + return AnzscoOccupations._831115; + if ("831116".equals(codeString)) + return AnzscoOccupations._831116; + if ("831117".equals(codeString)) + return AnzscoOccupations._831117; + if ("831118".equals(codeString)) + return AnzscoOccupations._831118; + if ("831199".equals(codeString)) + return AnzscoOccupations._831199; + if ("831200".equals(codeString)) + return AnzscoOccupations._831200; + if ("831211".equals(codeString)) + return AnzscoOccupations._831211; + if ("831212".equals(codeString)) + return AnzscoOccupations._831212; + if ("831300".equals(codeString)) + return AnzscoOccupations._831300; + if ("831311".equals(codeString)) + return AnzscoOccupations._831311; + if ("831312".equals(codeString)) + return AnzscoOccupations._831312; + if ("831313".equals(codeString)) + return AnzscoOccupations._831313; + if ("832000".equals(codeString)) + return AnzscoOccupations._832000; + if ("832100".equals(codeString)) + return AnzscoOccupations._832100; + if ("832111".equals(codeString)) + return AnzscoOccupations._832111; + if ("832112".equals(codeString)) + return AnzscoOccupations._832112; + if ("832113".equals(codeString)) + return AnzscoOccupations._832113; + if ("832114".equals(codeString)) + return AnzscoOccupations._832114; + if ("832115".equals(codeString)) + return AnzscoOccupations._832115; + if ("832199".equals(codeString)) + return AnzscoOccupations._832199; + if ("832211".equals(codeString)) + return AnzscoOccupations._832211; + if ("839000".equals(codeString)) + return AnzscoOccupations._839000; + if ("839111".equals(codeString)) + return AnzscoOccupations._839111; + if ("839200".equals(codeString)) + return AnzscoOccupations._839200; + if ("839211".equals(codeString)) + return AnzscoOccupations._839211; + if ("839212".equals(codeString)) + return AnzscoOccupations._839212; + if ("839300".equals(codeString)) + return AnzscoOccupations._839300; + if ("839311".equals(codeString)) + return AnzscoOccupations._839311; + if ("839312".equals(codeString)) + return AnzscoOccupations._839312; + if ("839313".equals(codeString)) + return AnzscoOccupations._839313; + if ("839400".equals(codeString)) + return AnzscoOccupations._839400; + if ("839411".equals(codeString)) + return AnzscoOccupations._839411; + if ("839412".equals(codeString)) + return AnzscoOccupations._839412; + if ("839413".equals(codeString)) + return AnzscoOccupations._839413; + if ("839900".equals(codeString)) + return AnzscoOccupations._839900; + if ("839911".equals(codeString)) + return AnzscoOccupations._839911; + if ("839912".equals(codeString)) + return AnzscoOccupations._839912; + if ("839913".equals(codeString)) + return AnzscoOccupations._839913; + if ("839914".equals(codeString)) + return AnzscoOccupations._839914; + if ("839915".equals(codeString)) + return AnzscoOccupations._839915; + if ("839916".equals(codeString)) + return AnzscoOccupations._839916; + if ("839917".equals(codeString)) + return AnzscoOccupations._839917; + if ("839999".equals(codeString)) + return AnzscoOccupations._839999; + if ("841000".equals(codeString)) + return AnzscoOccupations._841000; + if ("841111".equals(codeString)) + return AnzscoOccupations._841111; + if ("841200".equals(codeString)) + return AnzscoOccupations._841200; + if ("841211".equals(codeString)) + return AnzscoOccupations._841211; + if ("841212".equals(codeString)) + return AnzscoOccupations._841212; + if ("841213".equals(codeString)) + return AnzscoOccupations._841213; + if ("841214".equals(codeString)) + return AnzscoOccupations._841214; + if ("841215".equals(codeString)) + return AnzscoOccupations._841215; + if ("841216".equals(codeString)) + return AnzscoOccupations._841216; + if ("841299".equals(codeString)) + return AnzscoOccupations._841299; + if ("841300".equals(codeString)) + return AnzscoOccupations._841300; + if ("841311".equals(codeString)) + return AnzscoOccupations._841311; + if ("841312".equals(codeString)) + return AnzscoOccupations._841312; + if ("841313".equals(codeString)) + return AnzscoOccupations._841313; + if ("841400".equals(codeString)) + return AnzscoOccupations._841400; + if ("841411".equals(codeString)) + return AnzscoOccupations._841411; + if ("841412".equals(codeString)) + return AnzscoOccupations._841412; + if ("841500".equals(codeString)) + return AnzscoOccupations._841500; + if ("841511".equals(codeString)) + return AnzscoOccupations._841511; + if ("841512".equals(codeString)) + return AnzscoOccupations._841512; + if ("841513".equals(codeString)) + return AnzscoOccupations._841513; + if ("841514".equals(codeString)) + return AnzscoOccupations._841514; + if ("841515".equals(codeString)) + return AnzscoOccupations._841515; + if ("841516".equals(codeString)) + return AnzscoOccupations._841516; + if ("841517".equals(codeString)) + return AnzscoOccupations._841517; + if ("841599".equals(codeString)) + return AnzscoOccupations._841599; + if ("841611".equals(codeString)) + return AnzscoOccupations._841611; + if ("841900".equals(codeString)) + return AnzscoOccupations._841900; + if ("841911".equals(codeString)) + return AnzscoOccupations._841911; + if ("841912".equals(codeString)) + return AnzscoOccupations._841912; + if ("841999".equals(codeString)) + return AnzscoOccupations._841999; + if ("851000".equals(codeString)) + return AnzscoOccupations._851000; + if ("851111".equals(codeString)) + return AnzscoOccupations._851111; + if ("851200".equals(codeString)) + return AnzscoOccupations._851200; + if ("851211".equals(codeString)) + return AnzscoOccupations._851211; + if ("851299".equals(codeString)) + return AnzscoOccupations._851299; + if ("851311".equals(codeString)) + return AnzscoOccupations._851311; + if ("890000".equals(codeString)) + return AnzscoOccupations._890000; + if ("891000".equals(codeString)) + return AnzscoOccupations._891000; + if ("891100".equals(codeString)) + return AnzscoOccupations._891100; + if ("891111".equals(codeString)) + return AnzscoOccupations._891111; + if ("891112".equals(codeString)) + return AnzscoOccupations._891112; + if ("891113".equals(codeString)) + return AnzscoOccupations._891113; + if ("891211".equals(codeString)) + return AnzscoOccupations._891211; + if ("899000".equals(codeString)) + return AnzscoOccupations._899000; + if ("899111".equals(codeString)) + return AnzscoOccupations._899111; + if ("899200".equals(codeString)) + return AnzscoOccupations._899200; + if ("899211".equals(codeString)) + return AnzscoOccupations._899211; + if ("899212".equals(codeString)) + return AnzscoOccupations._899212; + if ("899311".equals(codeString)) + return AnzscoOccupations._899311; + if ("899400".equals(codeString)) + return AnzscoOccupations._899400; + if ("899411".equals(codeString)) + return AnzscoOccupations._899411; + if ("899412".equals(codeString)) + return AnzscoOccupations._899412; + if ("899413".equals(codeString)) + return AnzscoOccupations._899413; + if ("899414".equals(codeString)) + return AnzscoOccupations._899414; + if ("899415".equals(codeString)) + return AnzscoOccupations._899415; + if ("899500".equals(codeString)) + return AnzscoOccupations._899500; + if ("899511".equals(codeString)) + return AnzscoOccupations._899511; + if ("899512".equals(codeString)) + return AnzscoOccupations._899512; + if ("899611".equals(codeString)) + return AnzscoOccupations._899611; + if ("899711".equals(codeString)) + return AnzscoOccupations._899711; + if ("899900".equals(codeString)) + return AnzscoOccupations._899900; + if ("899911".equals(codeString)) + return AnzscoOccupations._899911; + if ("899912".equals(codeString)) + return AnzscoOccupations._899912; + if ("899913".equals(codeString)) + return AnzscoOccupations._899913; + if ("899914".equals(codeString)) + return AnzscoOccupations._899914; + if ("899915".equals(codeString)) + return AnzscoOccupations._899915; + if ("899916".equals(codeString)) + return AnzscoOccupations._899916; + if ("899917".equals(codeString)) + return AnzscoOccupations._899917; + if ("899918".equals(codeString)) + return AnzscoOccupations._899918; + if ("899921".equals(codeString)) + return AnzscoOccupations._899921; + if ("899922".equals(codeString)) + return AnzscoOccupations._899922; + if ("899999".equals(codeString)) + return AnzscoOccupations._899999; + throw new IllegalArgumentException("Unknown AnzscoOccupations code '"+codeString+"'"); + } + + public String toCode(AnzscoOccupations code) { + if (code == AnzscoOccupations._100000) + return "100000"; + if (code == AnzscoOccupations._111000) + return "111000"; + if (code == AnzscoOccupations._111111) + return "111111"; + if (code == AnzscoOccupations._111200) + return "111200"; + if (code == AnzscoOccupations._111211) + return "111211"; + if (code == AnzscoOccupations._111212) + return "111212"; + if (code == AnzscoOccupations._111300) + return "111300"; + if (code == AnzscoOccupations._111311) + return "111311"; + if (code == AnzscoOccupations._111312) + return "111312"; + if (code == AnzscoOccupations._111399) + return "111399"; + if (code == AnzscoOccupations._121000) + return "121000"; + if (code == AnzscoOccupations._121111) + return "121111"; + if (code == AnzscoOccupations._121200) + return "121200"; + if (code == AnzscoOccupations._121211) + return "121211"; + if (code == AnzscoOccupations._121212) + return "121212"; + if (code == AnzscoOccupations._121213) + return "121213"; + if (code == AnzscoOccupations._121214) + return "121214"; + if (code == AnzscoOccupations._121215) + return "121215"; + if (code == AnzscoOccupations._121216) + return "121216"; + if (code == AnzscoOccupations._121217) + return "121217"; + if (code == AnzscoOccupations._121218) + return "121218"; + if (code == AnzscoOccupations._121221) + return "121221"; + if (code == AnzscoOccupations._121299) + return "121299"; + if (code == AnzscoOccupations._121300) + return "121300"; + if (code == AnzscoOccupations._121311) + return "121311"; + if (code == AnzscoOccupations._121312) + return "121312"; + if (code == AnzscoOccupations._121313) + return "121313"; + if (code == AnzscoOccupations._121314) + return "121314"; + if (code == AnzscoOccupations._121315) + return "121315"; + if (code == AnzscoOccupations._121316) + return "121316"; + if (code == AnzscoOccupations._121317) + return "121317"; + if (code == AnzscoOccupations._121318) + return "121318"; + if (code == AnzscoOccupations._121321) + return "121321"; + if (code == AnzscoOccupations._121322) + return "121322"; + if (code == AnzscoOccupations._121399) + return "121399"; + if (code == AnzscoOccupations._121411) + return "121411"; + if (code == AnzscoOccupations._130000) + return "130000"; + if (code == AnzscoOccupations._131100) + return "131100"; + if (code == AnzscoOccupations._131111) + return "131111"; + if (code == AnzscoOccupations._131112) + return "131112"; + if (code == AnzscoOccupations._132000) + return "132000"; + if (code == AnzscoOccupations._132111) + return "132111"; + if (code == AnzscoOccupations._132211) + return "132211"; + if (code == AnzscoOccupations._132311) + return "132311"; + if (code == AnzscoOccupations._132411) + return "132411"; + if (code == AnzscoOccupations._132511) + return "132511"; + if (code == AnzscoOccupations._133000) + return "133000"; + if (code == AnzscoOccupations._133100) + return "133100"; + if (code == AnzscoOccupations._133111) + return "133111"; + if (code == AnzscoOccupations._133112) + return "133112"; + if (code == AnzscoOccupations._133211) + return "133211"; + if (code == AnzscoOccupations._133300) + return "133300"; + if (code == AnzscoOccupations._133311) + return "133311"; + if (code == AnzscoOccupations._133312) + return "133312"; + if (code == AnzscoOccupations._133411) + return "133411"; + if (code == AnzscoOccupations._133500) + return "133500"; + if (code == AnzscoOccupations._133511) + return "133511"; + if (code == AnzscoOccupations._133512) + return "133512"; + if (code == AnzscoOccupations._133513) + return "133513"; + if (code == AnzscoOccupations._133611) + return "133611"; + if (code == AnzscoOccupations._134000) + return "134000"; + if (code == AnzscoOccupations._134111) + return "134111"; + if (code == AnzscoOccupations._134200) + return "134200"; + if (code == AnzscoOccupations._134211) + return "134211"; + if (code == AnzscoOccupations._134212) + return "134212"; + if (code == AnzscoOccupations._134213) + return "134213"; + if (code == AnzscoOccupations._134214) + return "134214"; + if (code == AnzscoOccupations._134299) + return "134299"; + if (code == AnzscoOccupations._134311) + return "134311"; + if (code == AnzscoOccupations._134400) + return "134400"; + if (code == AnzscoOccupations._134411) + return "134411"; + if (code == AnzscoOccupations._134412) + return "134412"; + if (code == AnzscoOccupations._134499) + return "134499"; + if (code == AnzscoOccupations._135100) + return "135100"; + if (code == AnzscoOccupations._135111) + return "135111"; + if (code == AnzscoOccupations._135112) + return "135112"; + if (code == AnzscoOccupations._135199) + return "135199"; + if (code == AnzscoOccupations._139000) + return "139000"; + if (code == AnzscoOccupations._139100) + return "139100"; + if (code == AnzscoOccupations._139111) + return "139111"; + if (code == AnzscoOccupations._139112) + return "139112"; + if (code == AnzscoOccupations._139113) + return "139113"; + if (code == AnzscoOccupations._139211) + return "139211"; + if (code == AnzscoOccupations._139900) + return "139900"; + if (code == AnzscoOccupations._139911) + return "139911"; + if (code == AnzscoOccupations._139912) + return "139912"; + if (code == AnzscoOccupations._139913) + return "139913"; + if (code == AnzscoOccupations._139914) + return "139914"; + if (code == AnzscoOccupations._139915) + return "139915"; + if (code == AnzscoOccupations._139999) + return "139999"; + if (code == AnzscoOccupations._140000) + return "140000"; + if (code == AnzscoOccupations._141000) + return "141000"; + if (code == AnzscoOccupations._141111) + return "141111"; + if (code == AnzscoOccupations._141211) + return "141211"; + if (code == AnzscoOccupations._141311) + return "141311"; + if (code == AnzscoOccupations._141411) + return "141411"; + if (code == AnzscoOccupations._141900) + return "141900"; + if (code == AnzscoOccupations._141911) + return "141911"; + if (code == AnzscoOccupations._141999) + return "141999"; + if (code == AnzscoOccupations._142100) + return "142100"; + if (code == AnzscoOccupations._142111) + return "142111"; + if (code == AnzscoOccupations._142112) + return "142112"; + if (code == AnzscoOccupations._142113) + return "142113"; + if (code == AnzscoOccupations._142114) + return "142114"; + if (code == AnzscoOccupations._142115) + return "142115"; + if (code == AnzscoOccupations._142116) + return "142116"; + if (code == AnzscoOccupations._149000) + return "149000"; + if (code == AnzscoOccupations._149100) + return "149100"; + if (code == AnzscoOccupations._149111) + return "149111"; + if (code == AnzscoOccupations._149112) + return "149112"; + if (code == AnzscoOccupations._149113) + return "149113"; + if (code == AnzscoOccupations._149200) + return "149200"; + if (code == AnzscoOccupations._149211) + return "149211"; + if (code == AnzscoOccupations._149212) + return "149212"; + if (code == AnzscoOccupations._149311) + return "149311"; + if (code == AnzscoOccupations._149400) + return "149400"; + if (code == AnzscoOccupations._149411) + return "149411"; + if (code == AnzscoOccupations._149412) + return "149412"; + if (code == AnzscoOccupations._149413) + return "149413"; + if (code == AnzscoOccupations._149900) + return "149900"; + if (code == AnzscoOccupations._149911) + return "149911"; + if (code == AnzscoOccupations._149912) + return "149912"; + if (code == AnzscoOccupations._149913) + return "149913"; + if (code == AnzscoOccupations._149914) + return "149914"; + if (code == AnzscoOccupations._149999) + return "149999"; + if (code == AnzscoOccupations._200000) + return "200000"; + if (code == AnzscoOccupations._210000) + return "210000"; + if (code == AnzscoOccupations._211000) + return "211000"; + if (code == AnzscoOccupations._211100) + return "211100"; + if (code == AnzscoOccupations._211111) + return "211111"; + if (code == AnzscoOccupations._211112) + return "211112"; + if (code == AnzscoOccupations._211113) + return "211113"; + if (code == AnzscoOccupations._211199) + return "211199"; + if (code == AnzscoOccupations._211200) + return "211200"; + if (code == AnzscoOccupations._211211) + return "211211"; + if (code == AnzscoOccupations._211212) + return "211212"; + if (code == AnzscoOccupations._211213) + return "211213"; + if (code == AnzscoOccupations._211214) + return "211214"; + if (code == AnzscoOccupations._211299) + return "211299"; + if (code == AnzscoOccupations._211311) + return "211311"; + if (code == AnzscoOccupations._211400) + return "211400"; + if (code == AnzscoOccupations._211411) + return "211411"; + if (code == AnzscoOccupations._211412) + return "211412"; + if (code == AnzscoOccupations._211413) + return "211413"; + if (code == AnzscoOccupations._211499) + return "211499"; + if (code == AnzscoOccupations._212000) + return "212000"; + if (code == AnzscoOccupations._212100) + return "212100"; + if (code == AnzscoOccupations._212111) + return "212111"; + if (code == AnzscoOccupations._212112) + return "212112"; + if (code == AnzscoOccupations._212113) + return "212113"; + if (code == AnzscoOccupations._212114) + return "212114"; + if (code == AnzscoOccupations._212200) + return "212200"; + if (code == AnzscoOccupations._212211) + return "212211"; + if (code == AnzscoOccupations._212212) + return "212212"; + if (code == AnzscoOccupations._212300) + return "212300"; + if (code == AnzscoOccupations._212311) + return "212311"; + if (code == AnzscoOccupations._212312) + return "212312"; + if (code == AnzscoOccupations._212313) + return "212313"; + if (code == AnzscoOccupations._212314) + return "212314"; + if (code == AnzscoOccupations._212315) + return "212315"; + if (code == AnzscoOccupations._212316) + return "212316"; + if (code == AnzscoOccupations._212317) + return "212317"; + if (code == AnzscoOccupations._212318) + return "212318"; + if (code == AnzscoOccupations._212399) + return "212399"; + if (code == AnzscoOccupations._212400) + return "212400"; + if (code == AnzscoOccupations._212411) + return "212411"; + if (code == AnzscoOccupations._212412) + return "212412"; + if (code == AnzscoOccupations._212413) + return "212413"; + if (code == AnzscoOccupations._212414) + return "212414"; + if (code == AnzscoOccupations._212415) + return "212415"; + if (code == AnzscoOccupations._212416) + return "212416"; + if (code == AnzscoOccupations._212499) + return "212499"; + if (code == AnzscoOccupations._220000) + return "220000"; + if (code == AnzscoOccupations._221000) + return "221000"; + if (code == AnzscoOccupations._221100) + return "221100"; + if (code == AnzscoOccupations._221111) + return "221111"; + if (code == AnzscoOccupations._221112) + return "221112"; + if (code == AnzscoOccupations._221113) + return "221113"; + if (code == AnzscoOccupations._221200) + return "221200"; + if (code == AnzscoOccupations._221211) + return "221211"; + if (code == AnzscoOccupations._221212) + return "221212"; + if (code == AnzscoOccupations._221213) + return "221213"; + if (code == AnzscoOccupations._221214) + return "221214"; + if (code == AnzscoOccupations._222000) + return "222000"; + if (code == AnzscoOccupations._222100) + return "222100"; + if (code == AnzscoOccupations._222111) + return "222111"; + if (code == AnzscoOccupations._222112) + return "222112"; + if (code == AnzscoOccupations._222113) + return "222113"; + if (code == AnzscoOccupations._222199) + return "222199"; + if (code == AnzscoOccupations._222200) + return "222200"; + if (code == AnzscoOccupations._222211) + return "222211"; + if (code == AnzscoOccupations._222212) + return "222212"; + if (code == AnzscoOccupations._222213) + return "222213"; + if (code == AnzscoOccupations._222299) + return "222299"; + if (code == AnzscoOccupations._222300) + return "222300"; + if (code == AnzscoOccupations._222311) + return "222311"; + if (code == AnzscoOccupations._222312) + return "222312"; + if (code == AnzscoOccupations._223000) + return "223000"; + if (code == AnzscoOccupations._223100) + return "223100"; + if (code == AnzscoOccupations._223111) + return "223111"; + if (code == AnzscoOccupations._223112) + return "223112"; + if (code == AnzscoOccupations._223113) + return "223113"; + if (code == AnzscoOccupations._223211) + return "223211"; + if (code == AnzscoOccupations._223311) + return "223311"; + if (code == AnzscoOccupations._224000) + return "224000"; + if (code == AnzscoOccupations._224100) + return "224100"; + if (code == AnzscoOccupations._224111) + return "224111"; + if (code == AnzscoOccupations._224112) + return "224112"; + if (code == AnzscoOccupations._224113) + return "224113"; + if (code == AnzscoOccupations._224200) + return "224200"; + if (code == AnzscoOccupations._224211) + return "224211"; + if (code == AnzscoOccupations._224212) + return "224212"; + if (code == AnzscoOccupations._224213) + return "224213"; + if (code == AnzscoOccupations._224214) + return "224214"; + if (code == AnzscoOccupations._224311) + return "224311"; + if (code == AnzscoOccupations._224400) + return "224400"; + if (code == AnzscoOccupations._224411) + return "224411"; + if (code == AnzscoOccupations._224412) + return "224412"; + if (code == AnzscoOccupations._224500) + return "224500"; + if (code == AnzscoOccupations._224511) + return "224511"; + if (code == AnzscoOccupations._224512) + return "224512"; + if (code == AnzscoOccupations._224611) + return "224611"; + if (code == AnzscoOccupations._224700) + return "224700"; + if (code == AnzscoOccupations._224711) + return "224711"; + if (code == AnzscoOccupations._224712) + return "224712"; + if (code == AnzscoOccupations._224900) + return "224900"; + if (code == AnzscoOccupations._224911) + return "224911"; + if (code == AnzscoOccupations._224912) + return "224912"; + if (code == AnzscoOccupations._224913) + return "224913"; + if (code == AnzscoOccupations._224914) + return "224914"; + if (code == AnzscoOccupations._224999) + return "224999"; + if (code == AnzscoOccupations._225000) + return "225000"; + if (code == AnzscoOccupations._225100) + return "225100"; + if (code == AnzscoOccupations._225111) + return "225111"; + if (code == AnzscoOccupations._225112) + return "225112"; + if (code == AnzscoOccupations._225113) + return "225113"; + if (code == AnzscoOccupations._225200) + return "225200"; + if (code == AnzscoOccupations._225211) + return "225211"; + if (code == AnzscoOccupations._225212) + return "225212"; + if (code == AnzscoOccupations._225213) + return "225213"; + if (code == AnzscoOccupations._225311) + return "225311"; + if (code == AnzscoOccupations._225400) + return "225400"; + if (code == AnzscoOccupations._225411) + return "225411"; + if (code == AnzscoOccupations._225412) + return "225412"; + if (code == AnzscoOccupations._225499) + return "225499"; + if (code == AnzscoOccupations._230000) + return "230000"; + if (code == AnzscoOccupations._231000) + return "231000"; + if (code == AnzscoOccupations._231100) + return "231100"; + if (code == AnzscoOccupations._231111) + return "231111"; + if (code == AnzscoOccupations._231112) + return "231112"; + if (code == AnzscoOccupations._231113) + return "231113"; + if (code == AnzscoOccupations._231114) + return "231114"; + if (code == AnzscoOccupations._231199) + return "231199"; + if (code == AnzscoOccupations._231200) + return "231200"; + if (code == AnzscoOccupations._231211) + return "231211"; + if (code == AnzscoOccupations._231212) + return "231212"; + if (code == AnzscoOccupations._231213) + return "231213"; + if (code == AnzscoOccupations._231214) + return "231214"; + if (code == AnzscoOccupations._231215) + return "231215"; + if (code == AnzscoOccupations._231299) + return "231299"; + if (code == AnzscoOccupations._232000) + return "232000"; + if (code == AnzscoOccupations._232100) + return "232100"; + if (code == AnzscoOccupations._232111) + return "232111"; + if (code == AnzscoOccupations._232112) + return "232112"; + if (code == AnzscoOccupations._232200) + return "232200"; + if (code == AnzscoOccupations._232211) + return "232211"; + if (code == AnzscoOccupations._232212) + return "232212"; + if (code == AnzscoOccupations._232300) + return "232300"; + if (code == AnzscoOccupations._232311) + return "232311"; + if (code == AnzscoOccupations._232312) + return "232312"; + if (code == AnzscoOccupations._232313) + return "232313"; + if (code == AnzscoOccupations._232400) + return "232400"; + if (code == AnzscoOccupations._232411) + return "232411"; + if (code == AnzscoOccupations._232412) + return "232412"; + if (code == AnzscoOccupations._232413) + return "232413"; + if (code == AnzscoOccupations._232414) + return "232414"; + if (code == AnzscoOccupations._232511) + return "232511"; + if (code == AnzscoOccupations._232611) + return "232611"; + if (code == AnzscoOccupations._233000) + return "233000"; + if (code == AnzscoOccupations._233100) + return "233100"; + if (code == AnzscoOccupations._233111) + return "233111"; + if (code == AnzscoOccupations._233112) + return "233112"; + if (code == AnzscoOccupations._233200) + return "233200"; + if (code == AnzscoOccupations._233211) + return "233211"; + if (code == AnzscoOccupations._233212) + return "233212"; + if (code == AnzscoOccupations._233213) + return "233213"; + if (code == AnzscoOccupations._233214) + return "233214"; + if (code == AnzscoOccupations._233215) + return "233215"; + if (code == AnzscoOccupations._233311) + return "233311"; + if (code == AnzscoOccupations._233411) + return "233411"; + if (code == AnzscoOccupations._233500) + return "233500"; + if (code == AnzscoOccupations._233511) + return "233511"; + if (code == AnzscoOccupations._233512) + return "233512"; + if (code == AnzscoOccupations._233513) + return "233513"; + if (code == AnzscoOccupations._233600) + return "233600"; + if (code == AnzscoOccupations._233611) + return "233611"; + if (code == AnzscoOccupations._233612) + return "233612"; + if (code == AnzscoOccupations._233900) + return "233900"; + if (code == AnzscoOccupations._233911) + return "233911"; + if (code == AnzscoOccupations._233912) + return "233912"; + if (code == AnzscoOccupations._233913) + return "233913"; + if (code == AnzscoOccupations._233914) + return "233914"; + if (code == AnzscoOccupations._233915) + return "233915"; + if (code == AnzscoOccupations._233916) + return "233916"; + if (code == AnzscoOccupations._233999) + return "233999"; + if (code == AnzscoOccupations._234000) + return "234000"; + if (code == AnzscoOccupations._234100) + return "234100"; + if (code == AnzscoOccupations._234111) + return "234111"; + if (code == AnzscoOccupations._234112) + return "234112"; + if (code == AnzscoOccupations._234113) + return "234113"; + if (code == AnzscoOccupations._234200) + return "234200"; + if (code == AnzscoOccupations._234211) + return "234211"; + if (code == AnzscoOccupations._234212) + return "234212"; + if (code == AnzscoOccupations._234213) + return "234213"; + if (code == AnzscoOccupations._234300) + return "234300"; + if (code == AnzscoOccupations._234311) + return "234311"; + if (code == AnzscoOccupations._234312) + return "234312"; + if (code == AnzscoOccupations._234313) + return "234313"; + if (code == AnzscoOccupations._234314) + return "234314"; + if (code == AnzscoOccupations._234399) + return "234399"; + if (code == AnzscoOccupations._234400) + return "234400"; + if (code == AnzscoOccupations._234411) + return "234411"; + if (code == AnzscoOccupations._234412) + return "234412"; + if (code == AnzscoOccupations._234500) + return "234500"; + if (code == AnzscoOccupations._234511) + return "234511"; + if (code == AnzscoOccupations._234512) + return "234512"; + if (code == AnzscoOccupations._234513) + return "234513"; + if (code == AnzscoOccupations._234514) + return "234514"; + if (code == AnzscoOccupations._234515) + return "234515"; + if (code == AnzscoOccupations._234516) + return "234516"; + if (code == AnzscoOccupations._234517) + return "234517"; + if (code == AnzscoOccupations._234518) + return "234518"; + if (code == AnzscoOccupations._234599) + return "234599"; + if (code == AnzscoOccupations._234611) + return "234611"; + if (code == AnzscoOccupations._234711) + return "234711"; + if (code == AnzscoOccupations._234900) + return "234900"; + if (code == AnzscoOccupations._234911) + return "234911"; + if (code == AnzscoOccupations._234912) + return "234912"; + if (code == AnzscoOccupations._234913) + return "234913"; + if (code == AnzscoOccupations._234914) + return "234914"; + if (code == AnzscoOccupations._234999) + return "234999"; + if (code == AnzscoOccupations._240000) + return "240000"; + if (code == AnzscoOccupations._241000) + return "241000"; + if (code == AnzscoOccupations._241111) + return "241111"; + if (code == AnzscoOccupations._241213) + return "241213"; + if (code == AnzscoOccupations._241311) + return "241311"; + if (code == AnzscoOccupations._241411) + return "241411"; + if (code == AnzscoOccupations._241500) + return "241500"; + if (code == AnzscoOccupations._241511) + return "241511"; + if (code == AnzscoOccupations._241512) + return "241512"; + if (code == AnzscoOccupations._241513) + return "241513"; + if (code == AnzscoOccupations._241599) + return "241599"; + if (code == AnzscoOccupations._242000) + return "242000"; + if (code == AnzscoOccupations._242100) + return "242100"; + if (code == AnzscoOccupations._242111) + return "242111"; + if (code == AnzscoOccupations._242112) + return "242112"; + if (code == AnzscoOccupations._242211) + return "242211"; + if (code == AnzscoOccupations._249000) + return "249000"; + if (code == AnzscoOccupations._249100) + return "249100"; + if (code == AnzscoOccupations._249111) + return "249111"; + if (code == AnzscoOccupations._249112) + return "249112"; + if (code == AnzscoOccupations._249200) + return "249200"; + if (code == AnzscoOccupations._249211) + return "249211"; + if (code == AnzscoOccupations._249212) + return "249212"; + if (code == AnzscoOccupations._249213) + return "249213"; + if (code == AnzscoOccupations._249214) + return "249214"; + if (code == AnzscoOccupations._249299) + return "249299"; + if (code == AnzscoOccupations._249311) + return "249311"; + if (code == AnzscoOccupations._250000) + return "250000"; + if (code == AnzscoOccupations._251000) + return "251000"; + if (code == AnzscoOccupations._251111) + return "251111"; + if (code == AnzscoOccupations._251200) + return "251200"; + if (code == AnzscoOccupations._251211) + return "251211"; + if (code == AnzscoOccupations._251212) + return "251212"; + if (code == AnzscoOccupations._251213) + return "251213"; + if (code == AnzscoOccupations._251214) + return "251214"; + if (code == AnzscoOccupations._251300) + return "251300"; + if (code == AnzscoOccupations._251311) + return "251311"; + if (code == AnzscoOccupations._251312) + return "251312"; + if (code == AnzscoOccupations._251400) + return "251400"; + if (code == AnzscoOccupations._251411) + return "251411"; + if (code == AnzscoOccupations._251412) + return "251412"; + if (code == AnzscoOccupations._251500) + return "251500"; + if (code == AnzscoOccupations._251511) + return "251511"; + if (code == AnzscoOccupations._251512) + return "251512"; + if (code == AnzscoOccupations._251513) + return "251513"; + if (code == AnzscoOccupations._251900) + return "251900"; + if (code == AnzscoOccupations._251911) + return "251911"; + if (code == AnzscoOccupations._251912) + return "251912"; + if (code == AnzscoOccupations._251999) + return "251999"; + if (code == AnzscoOccupations._252000) + return "252000"; + if (code == AnzscoOccupations._252100) + return "252100"; + if (code == AnzscoOccupations._252111) + return "252111"; + if (code == AnzscoOccupations._252112) + return "252112"; + if (code == AnzscoOccupations._252200) + return "252200"; + if (code == AnzscoOccupations._252211) + return "252211"; + if (code == AnzscoOccupations._252212) + return "252212"; + if (code == AnzscoOccupations._252213) + return "252213"; + if (code == AnzscoOccupations._252214) + return "252214"; + if (code == AnzscoOccupations._252299) + return "252299"; + if (code == AnzscoOccupations._252300) + return "252300"; + if (code == AnzscoOccupations._252311) + return "252311"; + if (code == AnzscoOccupations._252312) + return "252312"; + if (code == AnzscoOccupations._252411) + return "252411"; + if (code == AnzscoOccupations._252511) + return "252511"; + if (code == AnzscoOccupations._252611) + return "252611"; + if (code == AnzscoOccupations._252700) + return "252700"; + if (code == AnzscoOccupations._252711) + return "252711"; + if (code == AnzscoOccupations._252712) + return "252712"; + if (code == AnzscoOccupations._253000) + return "253000"; + if (code == AnzscoOccupations._253100) + return "253100"; + if (code == AnzscoOccupations._253111) + return "253111"; + if (code == AnzscoOccupations._253112) + return "253112"; + if (code == AnzscoOccupations._253211) + return "253211"; + if (code == AnzscoOccupations._253300) + return "253300"; + if (code == AnzscoOccupations._253311) + return "253311"; + if (code == AnzscoOccupations._253312) + return "253312"; + if (code == AnzscoOccupations._253313) + return "253313"; + if (code == AnzscoOccupations._253314) + return "253314"; + if (code == AnzscoOccupations._253315) + return "253315"; + if (code == AnzscoOccupations._253316) + return "253316"; + if (code == AnzscoOccupations._253317) + return "253317"; + if (code == AnzscoOccupations._253318) + return "253318"; + if (code == AnzscoOccupations._253321) + return "253321"; + if (code == AnzscoOccupations._253322) + return "253322"; + if (code == AnzscoOccupations._253323) + return "253323"; + if (code == AnzscoOccupations._253324) + return "253324"; + if (code == AnzscoOccupations._253399) + return "253399"; + if (code == AnzscoOccupations._253411) + return "253411"; + if (code == AnzscoOccupations._253500) + return "253500"; + if (code == AnzscoOccupations._253511) + return "253511"; + if (code == AnzscoOccupations._253512) + return "253512"; + if (code == AnzscoOccupations._253513) + return "253513"; + if (code == AnzscoOccupations._253514) + return "253514"; + if (code == AnzscoOccupations._253515) + return "253515"; + if (code == AnzscoOccupations._253516) + return "253516"; + if (code == AnzscoOccupations._253517) + return "253517"; + if (code == AnzscoOccupations._253518) + return "253518"; + if (code == AnzscoOccupations._253521) + return "253521"; + if (code == AnzscoOccupations._253900) + return "253900"; + if (code == AnzscoOccupations._253911) + return "253911"; + if (code == AnzscoOccupations._253912) + return "253912"; + if (code == AnzscoOccupations._253913) + return "253913"; + if (code == AnzscoOccupations._253914) + return "253914"; + if (code == AnzscoOccupations._253915) + return "253915"; + if (code == AnzscoOccupations._253916) + return "253916"; + if (code == AnzscoOccupations._253999) + return "253999"; + if (code == AnzscoOccupations._254000) + return "254000"; + if (code == AnzscoOccupations._254111) + return "254111"; + if (code == AnzscoOccupations._254200) + return "254200"; + if (code == AnzscoOccupations._254211) + return "254211"; + if (code == AnzscoOccupations._254212) + return "254212"; + if (code == AnzscoOccupations._254311) + return "254311"; + if (code == AnzscoOccupations._254400) + return "254400"; + if (code == AnzscoOccupations._254411) + return "254411"; + if (code == AnzscoOccupations._254412) + return "254412"; + if (code == AnzscoOccupations._254413) + return "254413"; + if (code == AnzscoOccupations._254414) + return "254414"; + if (code == AnzscoOccupations._254415) + return "254415"; + if (code == AnzscoOccupations._254416) + return "254416"; + if (code == AnzscoOccupations._254417) + return "254417"; + if (code == AnzscoOccupations._254418) + return "254418"; + if (code == AnzscoOccupations._254421) + return "254421"; + if (code == AnzscoOccupations._254422) + return "254422"; + if (code == AnzscoOccupations._254423) + return "254423"; + if (code == AnzscoOccupations._254424) + return "254424"; + if (code == AnzscoOccupations._254499) + return "254499"; + if (code == AnzscoOccupations._260000) + return "260000"; + if (code == AnzscoOccupations._261000) + return "261000"; + if (code == AnzscoOccupations._261100) + return "261100"; + if (code == AnzscoOccupations._261111) + return "261111"; + if (code == AnzscoOccupations._261112) + return "261112"; + if (code == AnzscoOccupations._261200) + return "261200"; + if (code == AnzscoOccupations._261211) + return "261211"; + if (code == AnzscoOccupations._261212) + return "261212"; + if (code == AnzscoOccupations._261300) + return "261300"; + if (code == AnzscoOccupations._261311) + return "261311"; + if (code == AnzscoOccupations._261312) + return "261312"; + if (code == AnzscoOccupations._261313) + return "261313"; + if (code == AnzscoOccupations._261399) + return "261399"; + if (code == AnzscoOccupations._262100) + return "262100"; + if (code == AnzscoOccupations._262111) + return "262111"; + if (code == AnzscoOccupations._262112) + return "262112"; + if (code == AnzscoOccupations._262113) + return "262113"; + if (code == AnzscoOccupations._263000) + return "263000"; + if (code == AnzscoOccupations._263100) + return "263100"; + if (code == AnzscoOccupations._263111) + return "263111"; + if (code == AnzscoOccupations._263112) + return "263112"; + if (code == AnzscoOccupations._263113) + return "263113"; + if (code == AnzscoOccupations._263200) + return "263200"; + if (code == AnzscoOccupations._263211) + return "263211"; + if (code == AnzscoOccupations._263212) + return "263212"; + if (code == AnzscoOccupations._263213) + return "263213"; + if (code == AnzscoOccupations._263299) + return "263299"; + if (code == AnzscoOccupations._263300) + return "263300"; + if (code == AnzscoOccupations._263311) + return "263311"; + if (code == AnzscoOccupations._263312) + return "263312"; + if (code == AnzscoOccupations._270000) + return "270000"; + if (code == AnzscoOccupations._271000) + return "271000"; + if (code == AnzscoOccupations._271111) + return "271111"; + if (code == AnzscoOccupations._271200) + return "271200"; + if (code == AnzscoOccupations._271211) + return "271211"; + if (code == AnzscoOccupations._271212) + return "271212"; + if (code == AnzscoOccupations._271213) + return "271213"; + if (code == AnzscoOccupations._271299) + return "271299"; + if (code == AnzscoOccupations._271311) + return "271311"; + if (code == AnzscoOccupations._272000) + return "272000"; + if (code == AnzscoOccupations._272100) + return "272100"; + if (code == AnzscoOccupations._272111) + return "272111"; + if (code == AnzscoOccupations._272112) + return "272112"; + if (code == AnzscoOccupations._272113) + return "272113"; + if (code == AnzscoOccupations._272114) + return "272114"; + if (code == AnzscoOccupations._272115) + return "272115"; + if (code == AnzscoOccupations._272199) + return "272199"; + if (code == AnzscoOccupations._272211) + return "272211"; + if (code == AnzscoOccupations._272300) + return "272300"; + if (code == AnzscoOccupations._272311) + return "272311"; + if (code == AnzscoOccupations._272312) + return "272312"; + if (code == AnzscoOccupations._272313) + return "272313"; + if (code == AnzscoOccupations._272314) + return "272314"; + if (code == AnzscoOccupations._272399) + return "272399"; + if (code == AnzscoOccupations._272400) + return "272400"; + if (code == AnzscoOccupations._272411) + return "272411"; + if (code == AnzscoOccupations._272412) + return "272412"; + if (code == AnzscoOccupations._272413) + return "272413"; + if (code == AnzscoOccupations._272499) + return "272499"; + if (code == AnzscoOccupations._272511) + return "272511"; + if (code == AnzscoOccupations._272600) + return "272600"; + if (code == AnzscoOccupations._272611) + return "272611"; + if (code == AnzscoOccupations._272612) + return "272612"; + if (code == AnzscoOccupations._272613) + return "272613"; + if (code == AnzscoOccupations._300000) + return "300000"; + if (code == AnzscoOccupations._310000) + return "310000"; + if (code == AnzscoOccupations._311000) + return "311000"; + if (code == AnzscoOccupations._311111) + return "311111"; + if (code == AnzscoOccupations._311200) + return "311200"; + if (code == AnzscoOccupations._311211) + return "311211"; + if (code == AnzscoOccupations._311212) + return "311212"; + if (code == AnzscoOccupations._311213) + return "311213"; + if (code == AnzscoOccupations._311214) + return "311214"; + if (code == AnzscoOccupations._311215) + return "311215"; + if (code == AnzscoOccupations._311299) + return "311299"; + if (code == AnzscoOccupations._311300) + return "311300"; + if (code == AnzscoOccupations._311311) + return "311311"; + if (code == AnzscoOccupations._311312) + return "311312"; + if (code == AnzscoOccupations._311313) + return "311313"; + if (code == AnzscoOccupations._311399) + return "311399"; + if (code == AnzscoOccupations._311400) + return "311400"; + if (code == AnzscoOccupations._311411) + return "311411"; + if (code == AnzscoOccupations._311412) + return "311412"; + if (code == AnzscoOccupations._311413) + return "311413"; + if (code == AnzscoOccupations._311414) + return "311414"; + if (code == AnzscoOccupations._311499) + return "311499"; + if (code == AnzscoOccupations._312000) + return "312000"; + if (code == AnzscoOccupations._312100) + return "312100"; + if (code == AnzscoOccupations._312111) + return "312111"; + if (code == AnzscoOccupations._312112) + return "312112"; + if (code == AnzscoOccupations._312113) + return "312113"; + if (code == AnzscoOccupations._312114) + return "312114"; + if (code == AnzscoOccupations._312115) + return "312115"; + if (code == AnzscoOccupations._312116) + return "312116"; + if (code == AnzscoOccupations._312200) + return "312200"; + if (code == AnzscoOccupations._312211) + return "312211"; + if (code == AnzscoOccupations._312212) + return "312212"; + if (code == AnzscoOccupations._312300) + return "312300"; + if (code == AnzscoOccupations._312311) + return "312311"; + if (code == AnzscoOccupations._312312) + return "312312"; + if (code == AnzscoOccupations._312400) + return "312400"; + if (code == AnzscoOccupations._312411) + return "312411"; + if (code == AnzscoOccupations._312412) + return "312412"; + if (code == AnzscoOccupations._312500) + return "312500"; + if (code == AnzscoOccupations._312511) + return "312511"; + if (code == AnzscoOccupations._312512) + return "312512"; + if (code == AnzscoOccupations._312611) + return "312611"; + if (code == AnzscoOccupations._312900) + return "312900"; + if (code == AnzscoOccupations._312911) + return "312911"; + if (code == AnzscoOccupations._312912) + return "312912"; + if (code == AnzscoOccupations._312913) + return "312913"; + if (code == AnzscoOccupations._312999) + return "312999"; + if (code == AnzscoOccupations._313000) + return "313000"; + if (code == AnzscoOccupations._313100) + return "313100"; + if (code == AnzscoOccupations._313111) + return "313111"; + if (code == AnzscoOccupations._313112) + return "313112"; + if (code == AnzscoOccupations._313113) + return "313113"; + if (code == AnzscoOccupations._313199) + return "313199"; + if (code == AnzscoOccupations._313200) + return "313200"; + if (code == AnzscoOccupations._313211) + return "313211"; + if (code == AnzscoOccupations._313212) + return "313212"; + if (code == AnzscoOccupations._313213) + return "313213"; + if (code == AnzscoOccupations._313214) + return "313214"; + if (code == AnzscoOccupations._320000) + return "320000"; + if (code == AnzscoOccupations._321000) + return "321000"; + if (code == AnzscoOccupations._321111) + return "321111"; + if (code == AnzscoOccupations._321200) + return "321200"; + if (code == AnzscoOccupations._321211) + return "321211"; + if (code == AnzscoOccupations._321212) + return "321212"; + if (code == AnzscoOccupations._321213) + return "321213"; + if (code == AnzscoOccupations._321214) + return "321214"; + if (code == AnzscoOccupations._322000) + return "322000"; + if (code == AnzscoOccupations._322100) + return "322100"; + if (code == AnzscoOccupations._322111) + return "322111"; + if (code == AnzscoOccupations._322112) + return "322112"; + if (code == AnzscoOccupations._322113) + return "322113"; + if (code == AnzscoOccupations._322114) + return "322114"; + if (code == AnzscoOccupations._322115) + return "322115"; + if (code == AnzscoOccupations._322211) + return "322211"; + if (code == AnzscoOccupations._322300) + return "322300"; + if (code == AnzscoOccupations._322311) + return "322311"; + if (code == AnzscoOccupations._322312) + return "322312"; + if (code == AnzscoOccupations._322313) + return "322313"; + if (code == AnzscoOccupations._323000) + return "323000"; + if (code == AnzscoOccupations._323100) + return "323100"; + if (code == AnzscoOccupations._323111) + return "323111"; + if (code == AnzscoOccupations._323112) + return "323112"; + if (code == AnzscoOccupations._323113) + return "323113"; + if (code == AnzscoOccupations._323200) + return "323200"; + if (code == AnzscoOccupations._323211) + return "323211"; + if (code == AnzscoOccupations._323212) + return "323212"; + if (code == AnzscoOccupations._323213) + return "323213"; + if (code == AnzscoOccupations._323214) + return "323214"; + if (code == AnzscoOccupations._323215) + return "323215"; + if (code == AnzscoOccupations._323299) + return "323299"; + if (code == AnzscoOccupations._323300) + return "323300"; + if (code == AnzscoOccupations._323311) + return "323311"; + if (code == AnzscoOccupations._323312) + return "323312"; + if (code == AnzscoOccupations._323313) + return "323313"; + if (code == AnzscoOccupations._323314) + return "323314"; + if (code == AnzscoOccupations._323315) + return "323315"; + if (code == AnzscoOccupations._323316) + return "323316"; + if (code == AnzscoOccupations._323400) + return "323400"; + if (code == AnzscoOccupations._323411) + return "323411"; + if (code == AnzscoOccupations._323412) + return "323412"; + if (code == AnzscoOccupations._324000) + return "324000"; + if (code == AnzscoOccupations._324111) + return "324111"; + if (code == AnzscoOccupations._324200) + return "324200"; + if (code == AnzscoOccupations._324211) + return "324211"; + if (code == AnzscoOccupations._324212) + return "324212"; + if (code == AnzscoOccupations._324311) + return "324311"; + if (code == AnzscoOccupations._330000) + return "330000"; + if (code == AnzscoOccupations._331000) + return "331000"; + if (code == AnzscoOccupations._331100) + return "331100"; + if (code == AnzscoOccupations._331111) + return "331111"; + if (code == AnzscoOccupations._331112) + return "331112"; + if (code == AnzscoOccupations._331211) + return "331211"; + if (code == AnzscoOccupations._331212) + return "331212"; + if (code == AnzscoOccupations._331213) + return "331213"; + if (code == AnzscoOccupations._332000) + return "332000"; + if (code == AnzscoOccupations._332111) + return "332111"; + if (code == AnzscoOccupations._332211) + return "332211"; + if (code == AnzscoOccupations._333000) + return "333000"; + if (code == AnzscoOccupations._333111) + return "333111"; + if (code == AnzscoOccupations._333200) + return "333200"; + if (code == AnzscoOccupations._333211) + return "333211"; + if (code == AnzscoOccupations._333212) + return "333212"; + if (code == AnzscoOccupations._333311) + return "333311"; + if (code == AnzscoOccupations._333411) + return "333411"; + if (code == AnzscoOccupations._334100) + return "334100"; + if (code == AnzscoOccupations._334111) + return "334111"; + if (code == AnzscoOccupations._334112) + return "334112"; + if (code == AnzscoOccupations._334113) + return "334113"; + if (code == AnzscoOccupations._334114) + return "334114"; + if (code == AnzscoOccupations._334115) + return "334115"; + if (code == AnzscoOccupations._340000) + return "340000"; + if (code == AnzscoOccupations._341100) + return "341100"; + if (code == AnzscoOccupations._341111) + return "341111"; + if (code == AnzscoOccupations._341112) + return "341112"; + if (code == AnzscoOccupations._341113) + return "341113"; + if (code == AnzscoOccupations._342000) + return "342000"; + if (code == AnzscoOccupations._342111) + return "342111"; + if (code == AnzscoOccupations._342200) + return "342200"; + if (code == AnzscoOccupations._342211) + return "342211"; + if (code == AnzscoOccupations._342212) + return "342212"; + if (code == AnzscoOccupations._342300) + return "342300"; + if (code == AnzscoOccupations._342311) + return "342311"; + if (code == AnzscoOccupations._342312) + return "342312"; + if (code == AnzscoOccupations._342313) + return "342313"; + if (code == AnzscoOccupations._342314) + return "342314"; + if (code == AnzscoOccupations._342315) + return "342315"; + if (code == AnzscoOccupations._342400) + return "342400"; + if (code == AnzscoOccupations._342411) + return "342411"; + if (code == AnzscoOccupations._342412) + return "342412"; + if (code == AnzscoOccupations._342413) + return "342413"; + if (code == AnzscoOccupations._342414) + return "342414"; + if (code == AnzscoOccupations._351000) + return "351000"; + if (code == AnzscoOccupations._351100) + return "351100"; + if (code == AnzscoOccupations._351111) + return "351111"; + if (code == AnzscoOccupations._351112) + return "351112"; + if (code == AnzscoOccupations._351211) + return "351211"; + if (code == AnzscoOccupations._351311) + return "351311"; + if (code == AnzscoOccupations._351411) + return "351411"; + if (code == AnzscoOccupations._360000) + return "360000"; + if (code == AnzscoOccupations._361000) + return "361000"; + if (code == AnzscoOccupations._361100) + return "361100"; + if (code == AnzscoOccupations._361111) + return "361111"; + if (code == AnzscoOccupations._361112) + return "361112"; + if (code == AnzscoOccupations._361113) + return "361113"; + if (code == AnzscoOccupations._361114) + return "361114"; + if (code == AnzscoOccupations._361199) + return "361199"; + if (code == AnzscoOccupations._361211) + return "361211"; + if (code == AnzscoOccupations._361311) + return "361311"; + if (code == AnzscoOccupations._362000) + return "362000"; + if (code == AnzscoOccupations._362111) + return "362111"; + if (code == AnzscoOccupations._362200) + return "362200"; + if (code == AnzscoOccupations._362211) + return "362211"; + if (code == AnzscoOccupations._362212) + return "362212"; + if (code == AnzscoOccupations._362213) + return "362213"; + if (code == AnzscoOccupations._362311) + return "362311"; + if (code == AnzscoOccupations._362411) + return "362411"; + if (code == AnzscoOccupations._390000) + return "390000"; + if (code == AnzscoOccupations._391111) + return "391111"; + if (code == AnzscoOccupations._392000) + return "392000"; + if (code == AnzscoOccupations._392100) + return "392100"; + if (code == AnzscoOccupations._392111) + return "392111"; + if (code == AnzscoOccupations._392112) + return "392112"; + if (code == AnzscoOccupations._392211) + return "392211"; + if (code == AnzscoOccupations._392300) + return "392300"; + if (code == AnzscoOccupations._392311) + return "392311"; + if (code == AnzscoOccupations._392312) + return "392312"; + if (code == AnzscoOccupations._393000) + return "393000"; + if (code == AnzscoOccupations._393100) + return "393100"; + if (code == AnzscoOccupations._393111) + return "393111"; + if (code == AnzscoOccupations._393112) + return "393112"; + if (code == AnzscoOccupations._393113) + return "393113"; + if (code == AnzscoOccupations._393114) + return "393114"; + if (code == AnzscoOccupations._393200) + return "393200"; + if (code == AnzscoOccupations._393211) + return "393211"; + if (code == AnzscoOccupations._393212) + return "393212"; + if (code == AnzscoOccupations._393213) + return "393213"; + if (code == AnzscoOccupations._393299) + return "393299"; + if (code == AnzscoOccupations._393311) + return "393311"; + if (code == AnzscoOccupations._394000) + return "394000"; + if (code == AnzscoOccupations._394111) + return "394111"; + if (code == AnzscoOccupations._394200) + return "394200"; + if (code == AnzscoOccupations._394211) + return "394211"; + if (code == AnzscoOccupations._394212) + return "394212"; + if (code == AnzscoOccupations._394213) + return "394213"; + if (code == AnzscoOccupations._394214) + return "394214"; + if (code == AnzscoOccupations._394299) + return "394299"; + if (code == AnzscoOccupations._399000) + return "399000"; + if (code == AnzscoOccupations._399100) + return "399100"; + if (code == AnzscoOccupations._399111) + return "399111"; + if (code == AnzscoOccupations._399112) + return "399112"; + if (code == AnzscoOccupations._399200) + return "399200"; + if (code == AnzscoOccupations._399211) + return "399211"; + if (code == AnzscoOccupations._399212) + return "399212"; + if (code == AnzscoOccupations._399213) + return "399213"; + if (code == AnzscoOccupations._399300) + return "399300"; + if (code == AnzscoOccupations._399311) + return "399311"; + if (code == AnzscoOccupations._399312) + return "399312"; + if (code == AnzscoOccupations._399411) + return "399411"; + if (code == AnzscoOccupations._399500) + return "399500"; + if (code == AnzscoOccupations._399511) + return "399511"; + if (code == AnzscoOccupations._399512) + return "399512"; + if (code == AnzscoOccupations._399513) + return "399513"; + if (code == AnzscoOccupations._399514) + return "399514"; + if (code == AnzscoOccupations._399515) + return "399515"; + if (code == AnzscoOccupations._399516) + return "399516"; + if (code == AnzscoOccupations._399517) + return "399517"; + if (code == AnzscoOccupations._399599) + return "399599"; + if (code == AnzscoOccupations._399611) + return "399611"; + if (code == AnzscoOccupations._399900) + return "399900"; + if (code == AnzscoOccupations._399911) + return "399911"; + if (code == AnzscoOccupations._399912) + return "399912"; + if (code == AnzscoOccupations._399913) + return "399913"; + if (code == AnzscoOccupations._399914) + return "399914"; + if (code == AnzscoOccupations._399915) + return "399915"; + if (code == AnzscoOccupations._399916) + return "399916"; + if (code == AnzscoOccupations._399917) + return "399917"; + if (code == AnzscoOccupations._399999) + return "399999"; + if (code == AnzscoOccupations._400000) + return "400000"; + if (code == AnzscoOccupations._411000) + return "411000"; + if (code == AnzscoOccupations._411100) + return "411100"; + if (code == AnzscoOccupations._411111) + return "411111"; + if (code == AnzscoOccupations._411112) + return "411112"; + if (code == AnzscoOccupations._411200) + return "411200"; + if (code == AnzscoOccupations._411211) + return "411211"; + if (code == AnzscoOccupations._411212) + return "411212"; + if (code == AnzscoOccupations._411213) + return "411213"; + if (code == AnzscoOccupations._411214) + return "411214"; + if (code == AnzscoOccupations._411311) + return "411311"; + if (code == AnzscoOccupations._411400) + return "411400"; + if (code == AnzscoOccupations._411411) + return "411411"; + if (code == AnzscoOccupations._411412) + return "411412"; + if (code == AnzscoOccupations._411511) + return "411511"; + if (code == AnzscoOccupations._411611) + return "411611"; + if (code == AnzscoOccupations._411700) + return "411700"; + if (code == AnzscoOccupations._411711) + return "411711"; + if (code == AnzscoOccupations._411712) + return "411712"; + if (code == AnzscoOccupations._411713) + return "411713"; + if (code == AnzscoOccupations._411714) + return "411714"; + if (code == AnzscoOccupations._411715) + return "411715"; + if (code == AnzscoOccupations._411716) + return "411716"; + if (code == AnzscoOccupations._420000) + return "420000"; + if (code == AnzscoOccupations._421100) + return "421100"; + if (code == AnzscoOccupations._421111) + return "421111"; + if (code == AnzscoOccupations._421112) + return "421112"; + if (code == AnzscoOccupations._421113) + return "421113"; + if (code == AnzscoOccupations._421114) + return "421114"; + if (code == AnzscoOccupations._422100) + return "422100"; + if (code == AnzscoOccupations._422111) + return "422111"; + if (code == AnzscoOccupations._422112) + return "422112"; + if (code == AnzscoOccupations._422115) + return "422115"; + if (code == AnzscoOccupations._422116) + return "422116"; + if (code == AnzscoOccupations._423000) + return "423000"; + if (code == AnzscoOccupations._423111) + return "423111"; + if (code == AnzscoOccupations._423211) + return "423211"; + if (code == AnzscoOccupations._423300) + return "423300"; + if (code == AnzscoOccupations._423311) + return "423311"; + if (code == AnzscoOccupations._423312) + return "423312"; + if (code == AnzscoOccupations._423313) + return "423313"; + if (code == AnzscoOccupations._423314) + return "423314"; + if (code == AnzscoOccupations._423400) + return "423400"; + if (code == AnzscoOccupations._423411) + return "423411"; + if (code == AnzscoOccupations._423412) + return "423412"; + if (code == AnzscoOccupations._423413) + return "423413"; + if (code == AnzscoOccupations._431000) + return "431000"; + if (code == AnzscoOccupations._431100) + return "431100"; + if (code == AnzscoOccupations._431111) + return "431111"; + if (code == AnzscoOccupations._431112) + return "431112"; + if (code == AnzscoOccupations._431211) + return "431211"; + if (code == AnzscoOccupations._431311) + return "431311"; + if (code == AnzscoOccupations._431411) + return "431411"; + if (code == AnzscoOccupations._431511) + return "431511"; + if (code == AnzscoOccupations._431900) + return "431900"; + if (code == AnzscoOccupations._431911) + return "431911"; + if (code == AnzscoOccupations._431912) + return "431912"; + if (code == AnzscoOccupations._431999) + return "431999"; + if (code == AnzscoOccupations._440000) + return "440000"; + if (code == AnzscoOccupations._441000) + return "441000"; + if (code == AnzscoOccupations._441111) + return "441111"; + if (code == AnzscoOccupations._441200) + return "441200"; + if (code == AnzscoOccupations._441211) + return "441211"; + if (code == AnzscoOccupations._441212) + return "441212"; + if (code == AnzscoOccupations._441300) + return "441300"; + if (code == AnzscoOccupations._441311) + return "441311"; + if (code == AnzscoOccupations._441312) + return "441312"; + if (code == AnzscoOccupations._442000) + return "442000"; + if (code == AnzscoOccupations._442111) + return "442111"; + if (code == AnzscoOccupations._442200) + return "442200"; + if (code == AnzscoOccupations._442211) + return "442211"; + if (code == AnzscoOccupations._442212) + return "442212"; + if (code == AnzscoOccupations._442213) + return "442213"; + if (code == AnzscoOccupations._442214) + return "442214"; + if (code == AnzscoOccupations._442215) + return "442215"; + if (code == AnzscoOccupations._442216) + return "442216"; + if (code == AnzscoOccupations._442217) + return "442217"; + if (code == AnzscoOccupations._442299) + return "442299"; + if (code == AnzscoOccupations._450000) + return "450000"; + if (code == AnzscoOccupations._451000) + return "451000"; + if (code == AnzscoOccupations._451111) + return "451111"; + if (code == AnzscoOccupations._451211) + return "451211"; + if (code == AnzscoOccupations._451300) + return "451300"; + if (code == AnzscoOccupations._451311) + return "451311"; + if (code == AnzscoOccupations._451399) + return "451399"; + if (code == AnzscoOccupations._451400) + return "451400"; + if (code == AnzscoOccupations._451411) + return "451411"; + if (code == AnzscoOccupations._451412) + return "451412"; + if (code == AnzscoOccupations._451500) + return "451500"; + if (code == AnzscoOccupations._451511) + return "451511"; + if (code == AnzscoOccupations._451512) + return "451512"; + if (code == AnzscoOccupations._451600) + return "451600"; + if (code == AnzscoOccupations._451611) + return "451611"; + if (code == AnzscoOccupations._451612) + return "451612"; + if (code == AnzscoOccupations._451700) + return "451700"; + if (code == AnzscoOccupations._451711) + return "451711"; + if (code == AnzscoOccupations._451799) + return "451799"; + if (code == AnzscoOccupations._451800) + return "451800"; + if (code == AnzscoOccupations._451811) + return "451811"; + if (code == AnzscoOccupations._451812) + return "451812"; + if (code == AnzscoOccupations._451813) + return "451813"; + if (code == AnzscoOccupations._451899) + return "451899"; + if (code == AnzscoOccupations._452000) + return "452000"; + if (code == AnzscoOccupations._452111) + return "452111"; + if (code == AnzscoOccupations._452200) + return "452200"; + if (code == AnzscoOccupations._452211) + return "452211"; + if (code == AnzscoOccupations._452212) + return "452212"; + if (code == AnzscoOccupations._452213) + return "452213"; + if (code == AnzscoOccupations._452214) + return "452214"; + if (code == AnzscoOccupations._452215) + return "452215"; + if (code == AnzscoOccupations._452216) + return "452216"; + if (code == AnzscoOccupations._452217) + return "452217"; + if (code == AnzscoOccupations._452299) + return "452299"; + if (code == AnzscoOccupations._452300) + return "452300"; + if (code == AnzscoOccupations._452311) + return "452311"; + if (code == AnzscoOccupations._452312) + return "452312"; + if (code == AnzscoOccupations._452313) + return "452313"; + if (code == AnzscoOccupations._452314) + return "452314"; + if (code == AnzscoOccupations._452315) + return "452315"; + if (code == AnzscoOccupations._452316) + return "452316"; + if (code == AnzscoOccupations._452317) + return "452317"; + if (code == AnzscoOccupations._452318) + return "452318"; + if (code == AnzscoOccupations._452321) + return "452321"; + if (code == AnzscoOccupations._452322) + return "452322"; + if (code == AnzscoOccupations._452323) + return "452323"; + if (code == AnzscoOccupations._452400) + return "452400"; + if (code == AnzscoOccupations._452411) + return "452411"; + if (code == AnzscoOccupations._452412) + return "452412"; + if (code == AnzscoOccupations._452413) + return "452413"; + if (code == AnzscoOccupations._452414) + return "452414"; + if (code == AnzscoOccupations._452499) + return "452499"; + if (code == AnzscoOccupations._500000) + return "500000"; + if (code == AnzscoOccupations._510000) + return "510000"; + if (code == AnzscoOccupations._511100) + return "511100"; + if (code == AnzscoOccupations._511111) + return "511111"; + if (code == AnzscoOccupations._511112) + return "511112"; + if (code == AnzscoOccupations._512000) + return "512000"; + if (code == AnzscoOccupations._512111) + return "512111"; + if (code == AnzscoOccupations._512200) + return "512200"; + if (code == AnzscoOccupations._512211) + return "512211"; + if (code == AnzscoOccupations._512299) + return "512299"; + if (code == AnzscoOccupations._521000) + return "521000"; + if (code == AnzscoOccupations._521111) + return "521111"; + if (code == AnzscoOccupations._521200) + return "521200"; + if (code == AnzscoOccupations._521211) + return "521211"; + if (code == AnzscoOccupations._521212) + return "521212"; + if (code == AnzscoOccupations._530000) + return "530000"; + if (code == AnzscoOccupations._531111) + return "531111"; + if (code == AnzscoOccupations._532100) + return "532100"; + if (code == AnzscoOccupations._532111) + return "532111"; + if (code == AnzscoOccupations._532112) + return "532112"; + if (code == AnzscoOccupations._532113) + return "532113"; + if (code == AnzscoOccupations._540000) + return "540000"; + if (code == AnzscoOccupations._541000) + return "541000"; + if (code == AnzscoOccupations._541100) + return "541100"; + if (code == AnzscoOccupations._541111) + return "541111"; + if (code == AnzscoOccupations._541112) + return "541112"; + if (code == AnzscoOccupations._541211) + return "541211"; + if (code == AnzscoOccupations._542100) + return "542100"; + if (code == AnzscoOccupations._542111) + return "542111"; + if (code == AnzscoOccupations._542112) + return "542112"; + if (code == AnzscoOccupations._542113) + return "542113"; + if (code == AnzscoOccupations._542114) + return "542114"; + if (code == AnzscoOccupations._550000) + return "550000"; + if (code == AnzscoOccupations._551000) + return "551000"; + if (code == AnzscoOccupations._551100) + return "551100"; + if (code == AnzscoOccupations._551111) + return "551111"; + if (code == AnzscoOccupations._551112) + return "551112"; + if (code == AnzscoOccupations._551211) + return "551211"; + if (code == AnzscoOccupations._551311) + return "551311"; + if (code == AnzscoOccupations._552000) + return "552000"; + if (code == AnzscoOccupations._552111) + return "552111"; + if (code == AnzscoOccupations._552211) + return "552211"; + if (code == AnzscoOccupations._552300) + return "552300"; + if (code == AnzscoOccupations._552311) + return "552311"; + if (code == AnzscoOccupations._552312) + return "552312"; + if (code == AnzscoOccupations._552313) + return "552313"; + if (code == AnzscoOccupations._552314) + return "552314"; + if (code == AnzscoOccupations._561000) + return "561000"; + if (code == AnzscoOccupations._561100) + return "561100"; + if (code == AnzscoOccupations._561111) + return "561111"; + if (code == AnzscoOccupations._561112) + return "561112"; + if (code == AnzscoOccupations._561113) + return "561113"; + if (code == AnzscoOccupations._561199) + return "561199"; + if (code == AnzscoOccupations._561200) + return "561200"; + if (code == AnzscoOccupations._561211) + return "561211"; + if (code == AnzscoOccupations._561212) + return "561212"; + if (code == AnzscoOccupations._561311) + return "561311"; + if (code == AnzscoOccupations._561400) + return "561400"; + if (code == AnzscoOccupations._561411) + return "561411"; + if (code == AnzscoOccupations._561412) + return "561412"; + if (code == AnzscoOccupations._561511) + return "561511"; + if (code == AnzscoOccupations._561611) + return "561611"; + if (code == AnzscoOccupations._561900) + return "561900"; + if (code == AnzscoOccupations._561911) + return "561911"; + if (code == AnzscoOccupations._561912) + return "561912"; + if (code == AnzscoOccupations._561913) + return "561913"; + if (code == AnzscoOccupations._561999) + return "561999"; + if (code == AnzscoOccupations._590000) + return "590000"; + if (code == AnzscoOccupations._591000) + return "591000"; + if (code == AnzscoOccupations._591100) + return "591100"; + if (code == AnzscoOccupations._591111) + return "591111"; + if (code == AnzscoOccupations._591112) + return "591112"; + if (code == AnzscoOccupations._591113) + return "591113"; + if (code == AnzscoOccupations._591114) + return "591114"; + if (code == AnzscoOccupations._591115) + return "591115"; + if (code == AnzscoOccupations._591116) + return "591116"; + if (code == AnzscoOccupations._591200) + return "591200"; + if (code == AnzscoOccupations._591211) + return "591211"; + if (code == AnzscoOccupations._591212) + return "591212"; + if (code == AnzscoOccupations._599000) + return "599000"; + if (code == AnzscoOccupations._599100) + return "599100"; + if (code == AnzscoOccupations._599111) + return "599111"; + if (code == AnzscoOccupations._599112) + return "599112"; + if (code == AnzscoOccupations._599200) + return "599200"; + if (code == AnzscoOccupations._599211) + return "599211"; + if (code == AnzscoOccupations._599212) + return "599212"; + if (code == AnzscoOccupations._599213) + return "599213"; + if (code == AnzscoOccupations._599214) + return "599214"; + if (code == AnzscoOccupations._599215) + return "599215"; + if (code == AnzscoOccupations._599311) + return "599311"; + if (code == AnzscoOccupations._599411) + return "599411"; + if (code == AnzscoOccupations._599500) + return "599500"; + if (code == AnzscoOccupations._599511) + return "599511"; + if (code == AnzscoOccupations._599512) + return "599512"; + if (code == AnzscoOccupations._599513) + return "599513"; + if (code == AnzscoOccupations._599514) + return "599514"; + if (code == AnzscoOccupations._599515) + return "599515"; + if (code == AnzscoOccupations._599516) + return "599516"; + if (code == AnzscoOccupations._599517) + return "599517"; + if (code == AnzscoOccupations._599518) + return "599518"; + if (code == AnzscoOccupations._599521) + return "599521"; + if (code == AnzscoOccupations._599599) + return "599599"; + if (code == AnzscoOccupations._599600) + return "599600"; + if (code == AnzscoOccupations._599611) + return "599611"; + if (code == AnzscoOccupations._599612) + return "599612"; + if (code == AnzscoOccupations._599613) + return "599613"; + if (code == AnzscoOccupations._599711) + return "599711"; + if (code == AnzscoOccupations._599900) + return "599900"; + if (code == AnzscoOccupations._599911) + return "599911"; + if (code == AnzscoOccupations._599912) + return "599912"; + if (code == AnzscoOccupations._599913) + return "599913"; + if (code == AnzscoOccupations._599914) + return "599914"; + if (code == AnzscoOccupations._599999) + return "599999"; + if (code == AnzscoOccupations._600000) + return "600000"; + if (code == AnzscoOccupations._610000) + return "610000"; + if (code == AnzscoOccupations._611000) + return "611000"; + if (code == AnzscoOccupations._611100) + return "611100"; + if (code == AnzscoOccupations._611111) + return "611111"; + if (code == AnzscoOccupations._611112) + return "611112"; + if (code == AnzscoOccupations._611211) + return "611211"; + if (code == AnzscoOccupations._611300) + return "611300"; + if (code == AnzscoOccupations._611311) + return "611311"; + if (code == AnzscoOccupations._611312) + return "611312"; + if (code == AnzscoOccupations._611313) + return "611313"; + if (code == AnzscoOccupations._611314) + return "611314"; + if (code == AnzscoOccupations._611399) + return "611399"; + if (code == AnzscoOccupations._612100) + return "612100"; + if (code == AnzscoOccupations._612111) + return "612111"; + if (code == AnzscoOccupations._612112) + return "612112"; + if (code == AnzscoOccupations._612113) + return "612113"; + if (code == AnzscoOccupations._612114) + return "612114"; + if (code == AnzscoOccupations._612115) + return "612115"; + if (code == AnzscoOccupations._621000) + return "621000"; + if (code == AnzscoOccupations._621111) + return "621111"; + if (code == AnzscoOccupations._621211) + return "621211"; + if (code == AnzscoOccupations._621300) + return "621300"; + if (code == AnzscoOccupations._621311) + return "621311"; + if (code == AnzscoOccupations._621312) + return "621312"; + if (code == AnzscoOccupations._621411) + return "621411"; + if (code == AnzscoOccupations._621511) + return "621511"; + if (code == AnzscoOccupations._621611) + return "621611"; + if (code == AnzscoOccupations._621700) + return "621700"; + if (code == AnzscoOccupations._621711) + return "621711"; + if (code == AnzscoOccupations._621712) + return "621712"; + if (code == AnzscoOccupations._621713) + return "621713"; + if (code == AnzscoOccupations._621900) + return "621900"; + if (code == AnzscoOccupations._621911) + return "621911"; + if (code == AnzscoOccupations._621912) + return "621912"; + if (code == AnzscoOccupations._621999) + return "621999"; + if (code == AnzscoOccupations._630000) + return "630000"; + if (code == AnzscoOccupations._631100) + return "631100"; + if (code == AnzscoOccupations._631111) + return "631111"; + if (code == AnzscoOccupations._631112) + return "631112"; + if (code == AnzscoOccupations._639000) + return "639000"; + if (code == AnzscoOccupations._639100) + return "639100"; + if (code == AnzscoOccupations._639111) + return "639111"; + if (code == AnzscoOccupations._639112) + return "639112"; + if (code == AnzscoOccupations._639200) + return "639200"; + if (code == AnzscoOccupations._639211) + return "639211"; + if (code == AnzscoOccupations._639212) + return "639212"; + if (code == AnzscoOccupations._639311) + return "639311"; + if (code == AnzscoOccupations._639400) + return "639400"; + if (code == AnzscoOccupations._639411) + return "639411"; + if (code == AnzscoOccupations._639412) + return "639412"; + if (code == AnzscoOccupations._639511) + return "639511"; + if (code == AnzscoOccupations._639911) + return "639911"; + if (code == AnzscoOccupations._700000) + return "700000"; + if (code == AnzscoOccupations._710000) + return "710000"; + if (code == AnzscoOccupations._711000) + return "711000"; + if (code == AnzscoOccupations._711100) + return "711100"; + if (code == AnzscoOccupations._711111) + return "711111"; + if (code == AnzscoOccupations._711112) + return "711112"; + if (code == AnzscoOccupations._711113) + return "711113"; + if (code == AnzscoOccupations._711114) + return "711114"; + if (code == AnzscoOccupations._711199) + return "711199"; + if (code == AnzscoOccupations._711211) + return "711211"; + if (code == AnzscoOccupations._711300) + return "711300"; + if (code == AnzscoOccupations._711311) + return "711311"; + if (code == AnzscoOccupations._711312) + return "711312"; + if (code == AnzscoOccupations._711411) + return "711411"; + if (code == AnzscoOccupations._711500) + return "711500"; + if (code == AnzscoOccupations._711511) + return "711511"; + if (code == AnzscoOccupations._711512) + return "711512"; + if (code == AnzscoOccupations._711513) + return "711513"; + if (code == AnzscoOccupations._711514) + return "711514"; + if (code == AnzscoOccupations._711515) + return "711515"; + if (code == AnzscoOccupations._711516) + return "711516"; + if (code == AnzscoOccupations._711599) + return "711599"; + if (code == AnzscoOccupations._711611) + return "711611"; + if (code == AnzscoOccupations._711700) + return "711700"; + if (code == AnzscoOccupations._711711) + return "711711"; + if (code == AnzscoOccupations._711712) + return "711712"; + if (code == AnzscoOccupations._711713) + return "711713"; + if (code == AnzscoOccupations._711714) + return "711714"; + if (code == AnzscoOccupations._711715) + return "711715"; + if (code == AnzscoOccupations._711716) + return "711716"; + if (code == AnzscoOccupations._711799) + return "711799"; + if (code == AnzscoOccupations._711900) + return "711900"; + if (code == AnzscoOccupations._711911) + return "711911"; + if (code == AnzscoOccupations._711912) + return "711912"; + if (code == AnzscoOccupations._711913) + return "711913"; + if (code == AnzscoOccupations._711914) + return "711914"; + if (code == AnzscoOccupations._711999) + return "711999"; + if (code == AnzscoOccupations._712000) + return "712000"; + if (code == AnzscoOccupations._712111) + return "712111"; + if (code == AnzscoOccupations._712200) + return "712200"; + if (code == AnzscoOccupations._712211) + return "712211"; + if (code == AnzscoOccupations._712212) + return "712212"; + if (code == AnzscoOccupations._712213) + return "712213"; + if (code == AnzscoOccupations._712311) + return "712311"; + if (code == AnzscoOccupations._712900) + return "712900"; + if (code == AnzscoOccupations._712911) + return "712911"; + if (code == AnzscoOccupations._712912) + return "712912"; + if (code == AnzscoOccupations._712913) + return "712913"; + if (code == AnzscoOccupations._712914) + return "712914"; + if (code == AnzscoOccupations._712915) + return "712915"; + if (code == AnzscoOccupations._712916) + return "712916"; + if (code == AnzscoOccupations._712917) + return "712917"; + if (code == AnzscoOccupations._712918) + return "712918"; + if (code == AnzscoOccupations._712921) + return "712921"; + if (code == AnzscoOccupations._712922) + return "712922"; + if (code == AnzscoOccupations._712999) + return "712999"; + if (code == AnzscoOccupations._721000) + return "721000"; + if (code == AnzscoOccupations._721100) + return "721100"; + if (code == AnzscoOccupations._721111) + return "721111"; + if (code == AnzscoOccupations._721112) + return "721112"; + if (code == AnzscoOccupations._721200) + return "721200"; + if (code == AnzscoOccupations._721211) + return "721211"; + if (code == AnzscoOccupations._721212) + return "721212"; + if (code == AnzscoOccupations._721213) + return "721213"; + if (code == AnzscoOccupations._721214) + return "721214"; + if (code == AnzscoOccupations._721215) + return "721215"; + if (code == AnzscoOccupations._721216) + return "721216"; + if (code == AnzscoOccupations._721311) + return "721311"; + if (code == AnzscoOccupations._721900) + return "721900"; + if (code == AnzscoOccupations._721911) + return "721911"; + if (code == AnzscoOccupations._721912) + return "721912"; + if (code == AnzscoOccupations._721913) + return "721913"; + if (code == AnzscoOccupations._721914) + return "721914"; + if (code == AnzscoOccupations._721915) + return "721915"; + if (code == AnzscoOccupations._721916) + return "721916"; + if (code == AnzscoOccupations._721999) + return "721999"; + if (code == AnzscoOccupations._730000) + return "730000"; + if (code == AnzscoOccupations._731000) + return "731000"; + if (code == AnzscoOccupations._731100) + return "731100"; + if (code == AnzscoOccupations._731111) + return "731111"; + if (code == AnzscoOccupations._731112) + return "731112"; + if (code == AnzscoOccupations._731199) + return "731199"; + if (code == AnzscoOccupations._731200) + return "731200"; + if (code == AnzscoOccupations._731211) + return "731211"; + if (code == AnzscoOccupations._731212) + return "731212"; + if (code == AnzscoOccupations._731213) + return "731213"; + if (code == AnzscoOccupations._731300) + return "731300"; + if (code == AnzscoOccupations._731311) + return "731311"; + if (code == AnzscoOccupations._731312) + return "731312"; + if (code == AnzscoOccupations._732111) + return "732111"; + if (code == AnzscoOccupations._733100) + return "733100"; + if (code == AnzscoOccupations._733111) + return "733111"; + if (code == AnzscoOccupations._733112) + return "733112"; + if (code == AnzscoOccupations._733113) + return "733113"; + if (code == AnzscoOccupations._733114) + return "733114"; + if (code == AnzscoOccupations._733115) + return "733115"; + if (code == AnzscoOccupations._741111) + return "741111"; + if (code == AnzscoOccupations._800000) + return "800000"; + if (code == AnzscoOccupations._811000) + return "811000"; + if (code == AnzscoOccupations._811111) + return "811111"; + if (code == AnzscoOccupations._811211) + return "811211"; + if (code == AnzscoOccupations._811311) + return "811311"; + if (code == AnzscoOccupations._811400) + return "811400"; + if (code == AnzscoOccupations._811411) + return "811411"; + if (code == AnzscoOccupations._811412) + return "811412"; + if (code == AnzscoOccupations._811500) + return "811500"; + if (code == AnzscoOccupations._811511) + return "811511"; + if (code == AnzscoOccupations._811512) + return "811512"; + if (code == AnzscoOccupations._811513) + return "811513"; + if (code == AnzscoOccupations._811600) + return "811600"; + if (code == AnzscoOccupations._811611) + return "811611"; + if (code == AnzscoOccupations._811612) + return "811612"; + if (code == AnzscoOccupations._811699) + return "811699"; + if (code == AnzscoOccupations._821000) + return "821000"; + if (code == AnzscoOccupations._821100) + return "821100"; + if (code == AnzscoOccupations._821111) + return "821111"; + if (code == AnzscoOccupations._821112) + return "821112"; + if (code == AnzscoOccupations._821113) + return "821113"; + if (code == AnzscoOccupations._821114) + return "821114"; + if (code == AnzscoOccupations._821211) + return "821211"; + if (code == AnzscoOccupations._821311) + return "821311"; + if (code == AnzscoOccupations._821400) + return "821400"; + if (code == AnzscoOccupations._821411) + return "821411"; + if (code == AnzscoOccupations._821412) + return "821412"; + if (code == AnzscoOccupations._821511) + return "821511"; + if (code == AnzscoOccupations._821611) + return "821611"; + if (code == AnzscoOccupations._821700) + return "821700"; + if (code == AnzscoOccupations._821711) + return "821711"; + if (code == AnzscoOccupations._821712) + return "821712"; + if (code == AnzscoOccupations._821713) + return "821713"; + if (code == AnzscoOccupations._821714) + return "821714"; + if (code == AnzscoOccupations._821900) + return "821900"; + if (code == AnzscoOccupations._821911) + return "821911"; + if (code == AnzscoOccupations._821912) + return "821912"; + if (code == AnzscoOccupations._821913) + return "821913"; + if (code == AnzscoOccupations._821914) + return "821914"; + if (code == AnzscoOccupations._821915) + return "821915"; + if (code == AnzscoOccupations._830000) + return "830000"; + if (code == AnzscoOccupations._831000) + return "831000"; + if (code == AnzscoOccupations._831100) + return "831100"; + if (code == AnzscoOccupations._831111) + return "831111"; + if (code == AnzscoOccupations._831112) + return "831112"; + if (code == AnzscoOccupations._831113) + return "831113"; + if (code == AnzscoOccupations._831114) + return "831114"; + if (code == AnzscoOccupations._831115) + return "831115"; + if (code == AnzscoOccupations._831116) + return "831116"; + if (code == AnzscoOccupations._831117) + return "831117"; + if (code == AnzscoOccupations._831118) + return "831118"; + if (code == AnzscoOccupations._831199) + return "831199"; + if (code == AnzscoOccupations._831200) + return "831200"; + if (code == AnzscoOccupations._831211) + return "831211"; + if (code == AnzscoOccupations._831212) + return "831212"; + if (code == AnzscoOccupations._831300) + return "831300"; + if (code == AnzscoOccupations._831311) + return "831311"; + if (code == AnzscoOccupations._831312) + return "831312"; + if (code == AnzscoOccupations._831313) + return "831313"; + if (code == AnzscoOccupations._832000) + return "832000"; + if (code == AnzscoOccupations._832100) + return "832100"; + if (code == AnzscoOccupations._832111) + return "832111"; + if (code == AnzscoOccupations._832112) + return "832112"; + if (code == AnzscoOccupations._832113) + return "832113"; + if (code == AnzscoOccupations._832114) + return "832114"; + if (code == AnzscoOccupations._832115) + return "832115"; + if (code == AnzscoOccupations._832199) + return "832199"; + if (code == AnzscoOccupations._832211) + return "832211"; + if (code == AnzscoOccupations._839000) + return "839000"; + if (code == AnzscoOccupations._839111) + return "839111"; + if (code == AnzscoOccupations._839200) + return "839200"; + if (code == AnzscoOccupations._839211) + return "839211"; + if (code == AnzscoOccupations._839212) + return "839212"; + if (code == AnzscoOccupations._839300) + return "839300"; + if (code == AnzscoOccupations._839311) + return "839311"; + if (code == AnzscoOccupations._839312) + return "839312"; + if (code == AnzscoOccupations._839313) + return "839313"; + if (code == AnzscoOccupations._839400) + return "839400"; + if (code == AnzscoOccupations._839411) + return "839411"; + if (code == AnzscoOccupations._839412) + return "839412"; + if (code == AnzscoOccupations._839413) + return "839413"; + if (code == AnzscoOccupations._839900) + return "839900"; + if (code == AnzscoOccupations._839911) + return "839911"; + if (code == AnzscoOccupations._839912) + return "839912"; + if (code == AnzscoOccupations._839913) + return "839913"; + if (code == AnzscoOccupations._839914) + return "839914"; + if (code == AnzscoOccupations._839915) + return "839915"; + if (code == AnzscoOccupations._839916) + return "839916"; + if (code == AnzscoOccupations._839917) + return "839917"; + if (code == AnzscoOccupations._839999) + return "839999"; + if (code == AnzscoOccupations._841000) + return "841000"; + if (code == AnzscoOccupations._841111) + return "841111"; + if (code == AnzscoOccupations._841200) + return "841200"; + if (code == AnzscoOccupations._841211) + return "841211"; + if (code == AnzscoOccupations._841212) + return "841212"; + if (code == AnzscoOccupations._841213) + return "841213"; + if (code == AnzscoOccupations._841214) + return "841214"; + if (code == AnzscoOccupations._841215) + return "841215"; + if (code == AnzscoOccupations._841216) + return "841216"; + if (code == AnzscoOccupations._841299) + return "841299"; + if (code == AnzscoOccupations._841300) + return "841300"; + if (code == AnzscoOccupations._841311) + return "841311"; + if (code == AnzscoOccupations._841312) + return "841312"; + if (code == AnzscoOccupations._841313) + return "841313"; + if (code == AnzscoOccupations._841400) + return "841400"; + if (code == AnzscoOccupations._841411) + return "841411"; + if (code == AnzscoOccupations._841412) + return "841412"; + if (code == AnzscoOccupations._841500) + return "841500"; + if (code == AnzscoOccupations._841511) + return "841511"; + if (code == AnzscoOccupations._841512) + return "841512"; + if (code == AnzscoOccupations._841513) + return "841513"; + if (code == AnzscoOccupations._841514) + return "841514"; + if (code == AnzscoOccupations._841515) + return "841515"; + if (code == AnzscoOccupations._841516) + return "841516"; + if (code == AnzscoOccupations._841517) + return "841517"; + if (code == AnzscoOccupations._841599) + return "841599"; + if (code == AnzscoOccupations._841611) + return "841611"; + if (code == AnzscoOccupations._841900) + return "841900"; + if (code == AnzscoOccupations._841911) + return "841911"; + if (code == AnzscoOccupations._841912) + return "841912"; + if (code == AnzscoOccupations._841999) + return "841999"; + if (code == AnzscoOccupations._851000) + return "851000"; + if (code == AnzscoOccupations._851111) + return "851111"; + if (code == AnzscoOccupations._851200) + return "851200"; + if (code == AnzscoOccupations._851211) + return "851211"; + if (code == AnzscoOccupations._851299) + return "851299"; + if (code == AnzscoOccupations._851311) + return "851311"; + if (code == AnzscoOccupations._890000) + return "890000"; + if (code == AnzscoOccupations._891000) + return "891000"; + if (code == AnzscoOccupations._891100) + return "891100"; + if (code == AnzscoOccupations._891111) + return "891111"; + if (code == AnzscoOccupations._891112) + return "891112"; + if (code == AnzscoOccupations._891113) + return "891113"; + if (code == AnzscoOccupations._891211) + return "891211"; + if (code == AnzscoOccupations._899000) + return "899000"; + if (code == AnzscoOccupations._899111) + return "899111"; + if (code == AnzscoOccupations._899200) + return "899200"; + if (code == AnzscoOccupations._899211) + return "899211"; + if (code == AnzscoOccupations._899212) + return "899212"; + if (code == AnzscoOccupations._899311) + return "899311"; + if (code == AnzscoOccupations._899400) + return "899400"; + if (code == AnzscoOccupations._899411) + return "899411"; + if (code == AnzscoOccupations._899412) + return "899412"; + if (code == AnzscoOccupations._899413) + return "899413"; + if (code == AnzscoOccupations._899414) + return "899414"; + if (code == AnzscoOccupations._899415) + return "899415"; + if (code == AnzscoOccupations._899500) + return "899500"; + if (code == AnzscoOccupations._899511) + return "899511"; + if (code == AnzscoOccupations._899512) + return "899512"; + if (code == AnzscoOccupations._899611) + return "899611"; + if (code == AnzscoOccupations._899711) + return "899711"; + if (code == AnzscoOccupations._899900) + return "899900"; + if (code == AnzscoOccupations._899911) + return "899911"; + if (code == AnzscoOccupations._899912) + return "899912"; + if (code == AnzscoOccupations._899913) + return "899913"; + if (code == AnzscoOccupations._899914) + return "899914"; + if (code == AnzscoOccupations._899915) + return "899915"; + if (code == AnzscoOccupations._899916) + return "899916"; + if (code == AnzscoOccupations._899917) + return "899917"; + if (code == AnzscoOccupations._899918) + return "899918"; + if (code == AnzscoOccupations._899921) + return "899921"; + if (code == AnzscoOccupations._899922) + return "899922"; + if (code == AnzscoOccupations._899999) + return "899999"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceType.java new file mode 100644 index 00000000000..19271355572 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditSourceType { + + /** + * End-user display device, diagnostic device. + */ + _1, + /** + * Data acquisition device or instrument. + */ + _2, + /** + * Web Server process or thread. + */ + _3, + /** + * Application Server process or thread. + */ + _4, + /** + * Database Server process or thread. + */ + _5, + /** + * Security server, e.g. a domain controller. + */ + _6, + /** + * ISO level 1-3 network component. + */ + _7, + /** + * ISO level 4-6 operating software. + */ + _8, + /** + * other kind of device (defined by DICOM, but some other code/system can be used). + */ + _9, + /** + * added to help the parsers + */ + NULL; + public static AuditSourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + throw new FHIRException("Unknown AuditSourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/security-source-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "End-user display device, diagnostic device."; + case _2: return "Data acquisition device or instrument."; + case _3: return "Web Server process or thread."; + case _4: return "Application Server process or thread."; + case _5: return "Database Server process or thread."; + case _6: return "Security server, e.g. a domain controller."; + case _7: return "ISO level 1-3 network component."; + case _8: return "ISO level 4-6 operating software."; + case _9: return "other kind of device (defined by DICOM, but some other code/system can be used)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "User Device"; + case _2: return "Data Interface"; + case _3: return "Web Server"; + case _4: return "Application Server"; + case _5: return "Database Server"; + case _6: return "Security Server"; + case _7: return "Network Device"; + case _8: return "Network Router"; + case _9: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceTypeEnumFactory.java new file mode 100644 index 00000000000..a482d334821 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/AuditSourceTypeEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class AuditSourceTypeEnumFactory implements EnumFactory { + + public AuditSourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return AuditSourceType._1; + if ("2".equals(codeString)) + return AuditSourceType._2; + if ("3".equals(codeString)) + return AuditSourceType._3; + if ("4".equals(codeString)) + return AuditSourceType._4; + if ("5".equals(codeString)) + return AuditSourceType._5; + if ("6".equals(codeString)) + return AuditSourceType._6; + if ("7".equals(codeString)) + return AuditSourceType._7; + if ("8".equals(codeString)) + return AuditSourceType._8; + if ("9".equals(codeString)) + return AuditSourceType._9; + throw new IllegalArgumentException("Unknown AuditSourceType code '"+codeString+"'"); + } + + public String toCode(AuditSourceType code) { + if (code == AuditSourceType._1) + return "1"; + if (code == AuditSourceType._2) + return "2"; + if (code == AuditSourceType._3) + return "3"; + if (code == AuditSourceType._4) + return "4"; + if (code == AuditSourceType._5) + return "5"; + if (code == AuditSourceType._6) + return "6"; + if (code == AuditSourceType._7) + return "7"; + if (code == AuditSourceType._8) + return "8"; + if (code == AuditSourceType._9) + return "9"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceType.java new file mode 100644 index 00000000000..2064039e58e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceType.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BasicResourceType { + + /** + * An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc. + */ + CONSENT, + /** + * A request that care of a particular type be provided to a patient. Could involve the transfer of care, a consult, etc. + */ + REFERRAL, + /** + * An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent). + */ + ADVEVENT, + /** + * A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints + */ + APTMTREQ, + /** + * The transition of a patient or set of material from one location to another + */ + TRANSFER, + /** + * The specification of a set of food and/or other nutritional material to be delivered to a patient. + */ + DIET, + /** + * An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc. + */ + ADMINACT, + /** + * Record of a situation where a subject was exposed to a substance. Usually of interest to public health. + */ + EXPOSURE, + /** + * A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event + */ + INVESTIGATION, + /** + * A financial instrument used to track costs, charges or other amounts. + */ + ACCOUNT, + /** + * A request for payment for goods and/or services. Includes the idea of a healthcare insurance claim. + */ + INVOICE, + /** + * The determination of what will be paid against a particular invoice based on coverage, plan rules, etc. + */ + ADJUDICAT, + /** + * A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services + */ + PREDETREQ, + /** + * An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services + */ + PREDETERMINE, + /** + * An investigation to determine information about a particular therapy or product + */ + STUDY, + /** + * A set of (possibly conditional) steps to be taken to achieve some aim. Includes study protocols, treatment protocols, emergency protocols, etc. + */ + PROTOCOL, + /** + * added to help the parsers + */ + NULL; + public static BasicResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("consent".equals(codeString)) + return CONSENT; + if ("referral".equals(codeString)) + return REFERRAL; + if ("advevent".equals(codeString)) + return ADVEVENT; + if ("aptmtreq".equals(codeString)) + return APTMTREQ; + if ("transfer".equals(codeString)) + return TRANSFER; + if ("diet".equals(codeString)) + return DIET; + if ("adminact".equals(codeString)) + return ADMINACT; + if ("exposure".equals(codeString)) + return EXPOSURE; + if ("investigation".equals(codeString)) + return INVESTIGATION; + if ("account".equals(codeString)) + return ACCOUNT; + if ("invoice".equals(codeString)) + return INVOICE; + if ("adjudicat".equals(codeString)) + return ADJUDICAT; + if ("predetreq".equals(codeString)) + return PREDETREQ; + if ("predetermine".equals(codeString)) + return PREDETERMINE; + if ("study".equals(codeString)) + return STUDY; + if ("protocol".equals(codeString)) + return PROTOCOL; + throw new FHIRException("Unknown BasicResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONSENT: return "consent"; + case REFERRAL: return "referral"; + case ADVEVENT: return "advevent"; + case APTMTREQ: return "aptmtreq"; + case TRANSFER: return "transfer"; + case DIET: return "diet"; + case ADMINACT: return "adminact"; + case EXPOSURE: return "exposure"; + case INVESTIGATION: return "investigation"; + case ACCOUNT: return "account"; + case INVOICE: return "invoice"; + case ADJUDICAT: return "adjudicat"; + case PREDETREQ: return "predetreq"; + case PREDETERMINE: return "predetermine"; + case STUDY: return "study"; + case PROTOCOL: return "protocol"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/basic-resource-type"; + } + public String getDefinition() { + switch (this) { + case CONSENT: return "An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc."; + case REFERRAL: return "A request that care of a particular type be provided to a patient. Could involve the transfer of care, a consult, etc."; + case ADVEVENT: return "An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent)."; + case APTMTREQ: return "A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints"; + case TRANSFER: return "The transition of a patient or set of material from one location to another"; + case DIET: return "The specification of a set of food and/or other nutritional material to be delivered to a patient."; + case ADMINACT: return "An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc."; + case EXPOSURE: return "Record of a situation where a subject was exposed to a substance. Usually of interest to public health."; + case INVESTIGATION: return "A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event"; + case ACCOUNT: return "A financial instrument used to track costs, charges or other amounts."; + case INVOICE: return "A request for payment for goods and/or services. Includes the idea of a healthcare insurance claim."; + case ADJUDICAT: return "The determination of what will be paid against a particular invoice based on coverage, plan rules, etc."; + case PREDETREQ: return "A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services"; + case PREDETERMINE: return "An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services"; + case STUDY: return "An investigation to determine information about a particular therapy or product"; + case PROTOCOL: return "A set of (possibly conditional) steps to be taken to achieve some aim. Includes study protocols, treatment protocols, emergency protocols, etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONSENT: return "Consent"; + case REFERRAL: return "Referral"; + case ADVEVENT: return "Adverse Event"; + case APTMTREQ: return "Appointment Request"; + case TRANSFER: return "Transfer"; + case DIET: return "Diet"; + case ADMINACT: return "Administrative Activity"; + case EXPOSURE: return "Exposure"; + case INVESTIGATION: return "Investigation"; + case ACCOUNT: return "Account"; + case INVOICE: return "Invoice"; + case ADJUDICAT: return "Invoice Adjudication"; + case PREDETREQ: return "Pre-determination Request"; + case PREDETERMINE: return "Predetermination"; + case STUDY: return "Study"; + case PROTOCOL: return "Protocol"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceTypeEnumFactory.java new file mode 100644 index 00000000000..defe38d56f0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/BasicResourceTypeEnumFactory.java @@ -0,0 +1,115 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class BasicResourceTypeEnumFactory implements EnumFactory { + + public BasicResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("consent".equals(codeString)) + return BasicResourceType.CONSENT; + if ("referral".equals(codeString)) + return BasicResourceType.REFERRAL; + if ("advevent".equals(codeString)) + return BasicResourceType.ADVEVENT; + if ("aptmtreq".equals(codeString)) + return BasicResourceType.APTMTREQ; + if ("transfer".equals(codeString)) + return BasicResourceType.TRANSFER; + if ("diet".equals(codeString)) + return BasicResourceType.DIET; + if ("adminact".equals(codeString)) + return BasicResourceType.ADMINACT; + if ("exposure".equals(codeString)) + return BasicResourceType.EXPOSURE; + if ("investigation".equals(codeString)) + return BasicResourceType.INVESTIGATION; + if ("account".equals(codeString)) + return BasicResourceType.ACCOUNT; + if ("invoice".equals(codeString)) + return BasicResourceType.INVOICE; + if ("adjudicat".equals(codeString)) + return BasicResourceType.ADJUDICAT; + if ("predetreq".equals(codeString)) + return BasicResourceType.PREDETREQ; + if ("predetermine".equals(codeString)) + return BasicResourceType.PREDETERMINE; + if ("study".equals(codeString)) + return BasicResourceType.STUDY; + if ("protocol".equals(codeString)) + return BasicResourceType.PROTOCOL; + throw new IllegalArgumentException("Unknown BasicResourceType code '"+codeString+"'"); + } + + public String toCode(BasicResourceType code) { + if (code == BasicResourceType.CONSENT) + return "consent"; + if (code == BasicResourceType.REFERRAL) + return "referral"; + if (code == BasicResourceType.ADVEVENT) + return "advevent"; + if (code == BasicResourceType.APTMTREQ) + return "aptmtreq"; + if (code == BasicResourceType.TRANSFER) + return "transfer"; + if (code == BasicResourceType.DIET) + return "diet"; + if (code == BasicResourceType.ADMINACT) + return "adminact"; + if (code == BasicResourceType.EXPOSURE) + return "exposure"; + if (code == BasicResourceType.INVESTIGATION) + return "investigation"; + if (code == BasicResourceType.ACCOUNT) + return "account"; + if (code == BasicResourceType.INVOICE) + return "invoice"; + if (code == BasicResourceType.ADJUDICAT) + return "adjudicat"; + if (code == BasicResourceType.PREDETREQ) + return "predetreq"; + if (code == BasicResourceType.PREDETERMINE) + return "predetermine"; + if (code == BasicResourceType.STUDY) + return "study"; + if (code == BasicResourceType.PROTOCOL) + return "protocol"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategory.java new file mode 100644 index 00000000000..272f3c600d5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategory.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CarePlanActivityCategory { + + /** + * Plan for the patient to consume food of a specified nature + */ + DIET, + /** + * Plan for the patient to consume/receive a drug, vaccine or other product + */ + DRUG, + /** + * Plan to meet or communicate with the patient (in-patient, out-patient, phone call, etc.) + */ + ENCOUNTER, + /** + * Plan to capture information about a patient (vitals, labs, diagnostic images, etc.) + */ + OBSERVATION, + /** + * Plan to modify the patient in some way (surgery, physiotherapy, education, counseling, etc.) + */ + PROCEDURE, + /** + * Plan to provide something to the patient (medication, medical supply, etc.) + */ + SUPPLY, + /** + * Some other form of action + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static CarePlanActivityCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return DIET; + if ("drug".equals(codeString)) + return DRUG; + if ("encounter".equals(codeString)) + return ENCOUNTER; + if ("observation".equals(codeString)) + return OBSERVATION; + if ("procedure".equals(codeString)) + return PROCEDURE; + if ("supply".equals(codeString)) + return SUPPLY; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown CarePlanActivityCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIET: return "diet"; + case DRUG: return "drug"; + case ENCOUNTER: return "encounter"; + case OBSERVATION: return "observation"; + case PROCEDURE: return "procedure"; + case SUPPLY: return "supply"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-plan-activity-category"; + } + public String getDefinition() { + switch (this) { + case DIET: return "Plan for the patient to consume food of a specified nature"; + case DRUG: return "Plan for the patient to consume/receive a drug, vaccine or other product"; + case ENCOUNTER: return "Plan to meet or communicate with the patient (in-patient, out-patient, phone call, etc.)"; + case OBSERVATION: return "Plan to capture information about a patient (vitals, labs, diagnostic images, etc.)"; + case PROCEDURE: return "Plan to modify the patient in some way (surgery, physiotherapy, education, counseling, etc.)"; + case SUPPLY: return "Plan to provide something to the patient (medication, medical supply, etc.)"; + case OTHER: return "Some other form of action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIET: return "Diet"; + case DRUG: return "Drug"; + case ENCOUNTER: return "Encounter"; + case OBSERVATION: return "Observation"; + case PROCEDURE: return "Procedure"; + case SUPPLY: return "Supply"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategoryEnumFactory.java new file mode 100644 index 00000000000..4b7574a6cbc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/CarePlanActivityCategoryEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class CarePlanActivityCategoryEnumFactory implements EnumFactory { + + public CarePlanActivityCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return CarePlanActivityCategory.DIET; + if ("drug".equals(codeString)) + return CarePlanActivityCategory.DRUG; + if ("encounter".equals(codeString)) + return CarePlanActivityCategory.ENCOUNTER; + if ("observation".equals(codeString)) + return CarePlanActivityCategory.OBSERVATION; + if ("procedure".equals(codeString)) + return CarePlanActivityCategory.PROCEDURE; + if ("supply".equals(codeString)) + return CarePlanActivityCategory.SUPPLY; + if ("other".equals(codeString)) + return CarePlanActivityCategory.OTHER; + throw new IllegalArgumentException("Unknown CarePlanActivityCategory code '"+codeString+"'"); + } + + public String toCode(CarePlanActivityCategory code) { + if (code == CarePlanActivityCategory.DIET) + return "diet"; + if (code == CarePlanActivityCategory.DRUG) + return "drug"; + if (code == CarePlanActivityCategory.ENCOUNTER) + return "encounter"; + if (code == CarePlanActivityCategory.OBSERVATION) + return "observation"; + if (code == CarePlanActivityCategory.PROCEDURE) + return "procedure"; + if (code == CarePlanActivityCategory.SUPPLY) + return "supply"; + if (code == CarePlanActivityCategory.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientation.java new file mode 100644 index 00000000000..4e64f01197f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientation.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ChoiceListOrientation { + + /** + * List choices along the horizontal axis + */ + HORIZONTAL, + /** + * List choices down the vertical axis + */ + VERTICAL, + /** + * added to help the parsers + */ + NULL; + public static ChoiceListOrientation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("horizontal".equals(codeString)) + return HORIZONTAL; + if ("vertical".equals(codeString)) + return VERTICAL; + throw new FHIRException("Unknown ChoiceListOrientation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HORIZONTAL: return "horizontal"; + case VERTICAL: return "vertical"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/choice-list-orientation"; + } + public String getDefinition() { + switch (this) { + case HORIZONTAL: return "List choices along the horizontal axis"; + case VERTICAL: return "List choices down the vertical axis"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HORIZONTAL: return "Horizontal"; + case VERTICAL: return "Vertical"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientationEnumFactory.java new file mode 100644 index 00000000000..c8f4ad546f2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ChoiceListOrientationEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ChoiceListOrientationEnumFactory implements EnumFactory { + + public ChoiceListOrientation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("horizontal".equals(codeString)) + return ChoiceListOrientation.HORIZONTAL; + if ("vertical".equals(codeString)) + return ChoiceListOrientation.VERTICAL; + throw new IllegalArgumentException("Unknown ChoiceListOrientation code '"+codeString+"'"); + } + + public String toCode(ChoiceListOrientation code) { + if (code == ChoiceListOrientation.HORIZONTAL) + return "horizontal"; + if (code == ChoiceListOrientation.VERTICAL) + return "vertical"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimException.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimException.java new file mode 100644 index 00000000000..cbc49d84e6d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimException.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimException { + + /** + * Fulltime Student + */ + STUDENT, + /** + * Disabled + */ + DISABLED, + /** + * added to help the parsers + */ + NULL; + public static ClaimException fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("student".equals(codeString)) + return STUDENT; + if ("disabled".equals(codeString)) + return DISABLED; + throw new FHIRException("Unknown ClaimException code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STUDENT: return "student"; + case DISABLED: return "disabled"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/exception"; + } + public String getDefinition() { + switch (this) { + case STUDENT: return "Fulltime Student"; + case DISABLED: return "Disabled"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STUDENT: return "Student (Fulltime)"; + case DISABLED: return "Disabled"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimExceptionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimExceptionEnumFactory.java new file mode 100644 index 00000000000..9dd46295249 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimExceptionEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ClaimExceptionEnumFactory implements EnumFactory { + + public ClaimException fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("student".equals(codeString)) + return ClaimException.STUDENT; + if ("disabled".equals(codeString)) + return ClaimException.DISABLED; + throw new IllegalArgumentException("Unknown ClaimException code '"+codeString+"'"); + } + + public String toCode(ClaimException code) { + if (code == ClaimException.STUDENT) + return "student"; + if (code == ClaimException.DISABLED) + return "disabled"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiers.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiers.java new file mode 100644 index 00000000000..c23f21a621d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiers.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimModifiers { + + /** + * Repair of prior service or installation. + */ + A, + /** + * Temporary service or installation. + */ + B, + /** + * Treatment associated with TMJ. + */ + C, + /** + * Implant or associated with an implant. + */ + E, + /** + * None. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static ClaimModifiers fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("B".equals(codeString)) + return B; + if ("C".equals(codeString)) + return C; + if ("E".equals(codeString)) + return E; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown ClaimModifiers code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case B: return "B"; + case C: return "C"; + case E: return "E"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/modifiers"; + } + public String getDefinition() { + switch (this) { + case A: return "Repair of prior service or installation."; + case B: return "Temporary service or installation."; + case C: return "Treatment associated with TMJ."; + case E: return "Implant or associated with an implant."; + case X: return "None."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Repair of prior service or installation"; + case B: return "Temporary service or installation"; + case C: return "TMJ treatment"; + case E: return "Implant or associated with an implant"; + case X: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiersEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiersEnumFactory.java new file mode 100644 index 00000000000..2aa98089154 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClaimModifiersEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ClaimModifiersEnumFactory implements EnumFactory { + + public ClaimModifiers fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return ClaimModifiers.A; + if ("B".equals(codeString)) + return ClaimModifiers.B; + if ("C".equals(codeString)) + return ClaimModifiers.C; + if ("E".equals(codeString)) + return ClaimModifiers.E; + if ("X".equals(codeString)) + return ClaimModifiers.X; + throw new IllegalArgumentException("Unknown ClaimModifiers code '"+codeString+"'"); + } + + public String toCode(ClaimModifiers code) { + if (code == ClaimModifiers.A) + return "A"; + if (code == ClaimModifiers.B) + return "B"; + if (code == ClaimModifiers.C) + return "C"; + if (code == ClaimModifiers.E) + return "E"; + if (code == ClaimModifiers.X) + return "X"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContext.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContext.java new file mode 100644 index 00000000000..b93525a2b83 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContext.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClassificationOrContext { + + /** + * Indicates the useContext is a classification - e.g. Administrative, financial, etc. + */ + CLASSIFICATION, + /** + * Indicates the useContext is a context - a domain of use - e.g. Particular country, organization or system + */ + CONTEXT, + /** + * added to help the parsers + */ + NULL; + public static ClassificationOrContext fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("classification".equals(codeString)) + return CLASSIFICATION; + if ("context".equals(codeString)) + return CONTEXT; + throw new FHIRException("Unknown ClassificationOrContext code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CLASSIFICATION: return "classification"; + case CONTEXT: return "context"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/classification-or-context"; + } + public String getDefinition() { + switch (this) { + case CLASSIFICATION: return "Indicates the useContext is a classification - e.g. Administrative, financial, etc."; + case CONTEXT: return "Indicates the useContext is a context - a domain of use - e.g. Particular country, organization or system"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CLASSIFICATION: return "Classification"; + case CONTEXT: return "Context"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContextEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContextEnumFactory.java new file mode 100644 index 00000000000..0c1ba31c0b9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ClassificationOrContextEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ClassificationOrContextEnumFactory implements EnumFactory { + + public ClassificationOrContext fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("classification".equals(codeString)) + return ClassificationOrContext.CLASSIFICATION; + if ("context".equals(codeString)) + return ClassificationOrContext.CONTEXT; + throw new IllegalArgumentException("Unknown ClassificationOrContext code '"+codeString+"'"); + } + + public String toCode(ClassificationOrContext code) { + if (code == ClassificationOrContext.CLASSIFICATION) + return "classification"; + if (code == ClassificationOrContext.CONTEXT) + return "context"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategory.java new file mode 100644 index 00000000000..347198c07ff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionCategory { + + /** + * The patient considers the condition an issue to be addressed. + */ + COMPLAINT, + /** + * A symptom of a condition (as might be mentioned in a review of systems). + */ + SYMPTOM, + /** + * An observation made by a healthcare provider. + */ + FINDING, + /** + * This is a judgment made by a healthcare provider that the patient has a particular disease or condition. + */ + DIAGNOSIS, + /** + * added to help the parsers + */ + NULL; + public static ConditionCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complaint".equals(codeString)) + return COMPLAINT; + if ("symptom".equals(codeString)) + return SYMPTOM; + if ("finding".equals(codeString)) + return FINDING; + if ("diagnosis".equals(codeString)) + return DIAGNOSIS; + throw new FHIRException("Unknown ConditionCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLAINT: return "complaint"; + case SYMPTOM: return "symptom"; + case FINDING: return "finding"; + case DIAGNOSIS: return "diagnosis"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-category"; + } + public String getDefinition() { + switch (this) { + case COMPLAINT: return "The patient considers the condition an issue to be addressed."; + case SYMPTOM: return "A symptom of a condition (as might be mentioned in a review of systems)."; + case FINDING: return "An observation made by a healthcare provider."; + case DIAGNOSIS: return "This is a judgment made by a healthcare provider that the patient has a particular disease or condition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLAINT: return "Complaint"; + case SYMPTOM: return "Symptom"; + case FINDING: return "Finding"; + case DIAGNOSIS: return "Diagnosis"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategoryEnumFactory.java new file mode 100644 index 00000000000..91fcdfd31d6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionCategoryEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ConditionCategoryEnumFactory implements EnumFactory { + + public ConditionCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complaint".equals(codeString)) + return ConditionCategory.COMPLAINT; + if ("symptom".equals(codeString)) + return ConditionCategory.SYMPTOM; + if ("finding".equals(codeString)) + return ConditionCategory.FINDING; + if ("diagnosis".equals(codeString)) + return ConditionCategory.DIAGNOSIS; + throw new IllegalArgumentException("Unknown ConditionCategory code '"+codeString+"'"); + } + + public String toCode(ConditionCategory code) { + if (code == ConditionCategory.COMPLAINT) + return "complaint"; + if (code == ConditionCategory.SYMPTOM) + return "symptom"; + if (code == ConditionCategory.FINDING) + return "finding"; + if (code == ConditionCategory.DIAGNOSIS) + return "diagnosis"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinical.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinical.java new file mode 100644 index 00000000000..6429ccbf0fe --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinical.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionClinical { + + /** + * The subject is currently experiencing the symptoms of the condition. + */ + ACTIVE, + /** + * The subject is re-experiencing the symptoms of the condition after a period of remission or presumed resolution. + */ + RELAPSE, + /** + * The subject is no longer experiencing the symptoms of the condition, but there is a risk of the symptoms returning. + */ + REMISSION, + /** + * The subject is no longer experiencing the symptoms of the condition and there is no perceived risk of the symptoms returning. + */ + RESOLVED, + /** + * added to help the parsers + */ + NULL; + public static ConditionClinical fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("relapse".equals(codeString)) + return RELAPSE; + if ("remission".equals(codeString)) + return REMISSION; + if ("resolved".equals(codeString)) + return RESOLVED; + throw new FHIRException("Unknown ConditionClinical code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case RELAPSE: return "relapse"; + case REMISSION: return "remission"; + case RESOLVED: return "resolved"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-clinical"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The subject is currently experiencing the symptoms of the condition."; + case RELAPSE: return "The subject is re-experiencing the symptoms of the condition after a period of remission or presumed resolution."; + case REMISSION: return "The subject is no longer experiencing the symptoms of the condition, but there is a risk of the symptoms returning."; + case RESOLVED: return "The subject is no longer experiencing the symptoms of the condition and there is no perceived risk of the symptoms returning."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case RELAPSE: return "Relapse"; + case REMISSION: return "Remission"; + case RESOLVED: return "Resolved"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinicalEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinicalEnumFactory.java new file mode 100644 index 00000000000..780b867009a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionClinicalEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ConditionClinicalEnumFactory implements EnumFactory { + + public ConditionClinical fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ConditionClinical.ACTIVE; + if ("relapse".equals(codeString)) + return ConditionClinical.RELAPSE; + if ("remission".equals(codeString)) + return ConditionClinical.REMISSION; + if ("resolved".equals(codeString)) + return ConditionClinical.RESOLVED; + throw new IllegalArgumentException("Unknown ConditionClinical code '"+codeString+"'"); + } + + public String toCode(ConditionClinical code) { + if (code == ConditionClinical.ACTIVE) + return "active"; + if (code == ConditionClinical.RELAPSE) + return "relapse"; + if (code == ConditionClinical.REMISSION) + return "remission"; + if (code == ConditionClinical.RESOLVED) + return "resolved"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionState.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionState.java new file mode 100644 index 00000000000..538fe878557 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionState.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionState { + + /** + * The condition is active. + */ + ACTIVE, + /** + * The condition inactive but not resolved. + */ + INACTIVE, + /** + * The condition is resolved. + */ + RESOLVED, + /** + * added to help the parsers + */ + NULL; + public static ConditionState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("resolved".equals(codeString)) + return RESOLVED; + throw new FHIRException("Unknown ConditionState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case RESOLVED: return "resolved"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-state"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The condition is active."; + case INACTIVE: return "The condition inactive but not resolved."; + case RESOLVED: return "The condition is resolved."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case RESOLVED: return "Resolved"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionStateEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionStateEnumFactory.java new file mode 100644 index 00000000000..fcf960aac91 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConditionStateEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ConditionStateEnumFactory implements EnumFactory { + + public ConditionState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ConditionState.ACTIVE; + if ("inactive".equals(codeString)) + return ConditionState.INACTIVE; + if ("resolved".equals(codeString)) + return ConditionState.RESOLVED; + throw new IllegalArgumentException("Unknown ConditionState code '"+codeString+"'"); + } + + public String toCode(ConditionState code) { + if (code == ConditionState.ACTIVE) + return "active"; + if (code == ConditionState.INACTIVE) + return "inactive"; + if (code == ConditionState.RESOLVED) + return "resolved"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectation.java new file mode 100644 index 00000000000..a3aa3e17783 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectation.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConformanceExpectation { + + /** + * Support for the specified capability is required to be considered conformant. + */ + SHALL, + /** + * Support for the specified capability is strongly encouraged and failure to support it should only occur after careful consideration. + */ + SHOULD, + /** + * Support for the specified capability is not necessary to be considered conformant and the requirement should be considered strictly optional. + */ + MAY, + /** + * Support for the specified capability is strongly discouraged and should occur only after careful consideration. + */ + SHOULDNOT, + /** + * added to help the parsers + */ + NULL; + public static ConformanceExpectation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHALL".equals(codeString)) + return SHALL; + if ("SHOULD".equals(codeString)) + return SHOULD; + if ("MAY".equals(codeString)) + return MAY; + if ("SHOULD-NOT".equals(codeString)) + return SHOULDNOT; + throw new FHIRException("Unknown ConformanceExpectation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SHALL: return "SHALL"; + case SHOULD: return "SHOULD"; + case MAY: return "MAY"; + case SHOULDNOT: return "SHOULD-NOT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/conformance-expectation"; + } + public String getDefinition() { + switch (this) { + case SHALL: return "Support for the specified capability is required to be considered conformant."; + case SHOULD: return "Support for the specified capability is strongly encouraged and failure to support it should only occur after careful consideration."; + case MAY: return "Support for the specified capability is not necessary to be considered conformant and the requirement should be considered strictly optional."; + case SHOULDNOT: return "Support for the specified capability is strongly discouraged and should occur only after careful consideration."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SHALL: return "SHALL"; + case SHOULD: return "SHOULD"; + case MAY: return "MAY"; + case SHOULDNOT: return "SHOULD-NOT"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectationEnumFactory.java new file mode 100644 index 00000000000..de76f911290 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ConformanceExpectationEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ConformanceExpectationEnumFactory implements EnumFactory { + + public ConformanceExpectation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHALL".equals(codeString)) + return ConformanceExpectation.SHALL; + if ("SHOULD".equals(codeString)) + return ConformanceExpectation.SHOULD; + if ("MAY".equals(codeString)) + return ConformanceExpectation.MAY; + if ("SHOULD-NOT".equals(codeString)) + return ConformanceExpectation.SHOULDNOT; + throw new IllegalArgumentException("Unknown ConformanceExpectation code '"+codeString+"'"); + } + + public String toCode(ConformanceExpectation code) { + if (code == ConformanceExpectation.SHALL) + return "SHALL"; + if (code == ConformanceExpectation.SHOULD) + return "SHOULD"; + if (code == ConformanceExpectation.MAY) + return "MAY"; + if (code == ConformanceExpectation.SHOULDNOT) + return "SHOULD-NOT"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityType.java new file mode 100644 index 00000000000..2607671d364 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContactentityType { + + /** + * Contact details for information regarding to billing/general finance enquiries. + */ + BILL, + /** + * Contact details for administrative enquiries. + */ + ADMIN, + /** + * Contact details for issues related to Human Resources, such as staff matters, OH&S etc. + */ + HR, + /** + * Contact details for dealing with issues related to insurance claims/adjudication/payment. + */ + PAYOR, + /** + * Generic information contact for patients. + */ + PATINF, + /** + * Dedicated contact point for matters relating to press enquiries. + */ + PRESS, + /** + * added to help the parsers + */ + NULL; + public static ContactentityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BILL".equals(codeString)) + return BILL; + if ("ADMIN".equals(codeString)) + return ADMIN; + if ("HR".equals(codeString)) + return HR; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("PATINF".equals(codeString)) + return PATINF; + if ("PRESS".equals(codeString)) + return PRESS; + throw new FHIRException("Unknown ContactentityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BILL: return "BILL"; + case ADMIN: return "ADMIN"; + case HR: return "HR"; + case PAYOR: return "PAYOR"; + case PATINF: return "PATINF"; + case PRESS: return "PRESS"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contactentity-type"; + } + public String getDefinition() { + switch (this) { + case BILL: return "Contact details for information regarding to billing/general finance enquiries."; + case ADMIN: return "Contact details for administrative enquiries."; + case HR: return "Contact details for issues related to Human Resources, such as staff matters, OH&S etc."; + case PAYOR: return "Contact details for dealing with issues related to insurance claims/adjudication/payment."; + case PATINF: return "Generic information contact for patients."; + case PRESS: return "Dedicated contact point for matters relating to press enquiries."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BILL: return "Billing"; + case ADMIN: return "Administrative"; + case HR: return "Human Resource"; + case PAYOR: return "Payor"; + case PATINF: return "Patient"; + case PRESS: return "Press"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityTypeEnumFactory.java new file mode 100644 index 00000000000..03c78c733d1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContactentityTypeEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContactentityTypeEnumFactory implements EnumFactory { + + public ContactentityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BILL".equals(codeString)) + return ContactentityType.BILL; + if ("ADMIN".equals(codeString)) + return ContactentityType.ADMIN; + if ("HR".equals(codeString)) + return ContactentityType.HR; + if ("PAYOR".equals(codeString)) + return ContactentityType.PAYOR; + if ("PATINF".equals(codeString)) + return ContactentityType.PATINF; + if ("PRESS".equals(codeString)) + return ContactentityType.PRESS; + throw new IllegalArgumentException("Unknown ContactentityType code '"+codeString+"'"); + } + + public String toCode(ContactentityType code) { + if (code == ContactentityType.BILL) + return "BILL"; + if (code == ContactentityType.ADMIN) + return "ADMIN"; + if (code == ContactentityType.HR) + return "HR"; + if (code == ContactentityType.PAYOR) + return "PAYOR"; + if (code == ContactentityType.PATINF) + return "PATINF"; + if (code == ContactentityType.PRESS) + return "PRESS"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractAction.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractAction.java new file mode 100644 index 00000000000..326547fb8ed --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractAction.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractAction { + + /** + * null + */ + ACTIONA, + /** + * null + */ + ACTIONB, + /** + * added to help the parsers + */ + NULL; + public static ContractAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("action-a".equals(codeString)) + return ACTIONA; + if ("action-b".equals(codeString)) + return ACTIONB; + throw new FHIRException("Unknown ContractAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIONA: return "action-a"; + case ACTIONB: return "action-b"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.hl7.org/fhir/contractaction"; + } + public String getDefinition() { + switch (this) { + case ACTIONA: return ""; + case ACTIONB: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIONA: return "action-a"; + case ACTIONB: return "action-b"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActionEnumFactory.java new file mode 100644 index 00000000000..efd9b2cd0bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActionEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractActionEnumFactory implements EnumFactory { + + public ContractAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("action-a".equals(codeString)) + return ContractAction.ACTIONA; + if ("action-b".equals(codeString)) + return ContractAction.ACTIONB; + throw new IllegalArgumentException("Unknown ContractAction code '"+codeString+"'"); + } + + public String toCode(ContractAction code) { + if (code == ContractAction.ACTIONA) + return "action-a"; + if (code == ContractAction.ACTIONB) + return "action-b"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorrole.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorrole.java new file mode 100644 index 00000000000..714acb001d0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorrole.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractActorrole { + + /** + * null + */ + PRACTITIONER, + /** + * null + */ + PATIENT, + /** + * added to help the parsers + */ + NULL; + public static ContractActorrole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("patient".equals(codeString)) + return PATIENT; + throw new FHIRException("Unknown ContractActorrole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRACTITIONER: return "practitioner"; + case PATIENT: return "patient"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.hl7.org/fhir/contractactorrole"; + } + public String getDefinition() { + switch (this) { + case PRACTITIONER: return ""; + case PATIENT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRACTITIONER: return "Practitioner"; + case PATIENT: return "Patient"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorroleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorroleEnumFactory.java new file mode 100644 index 00000000000..a55c6bd5e81 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractActorroleEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractActorroleEnumFactory implements EnumFactory { + + public ContractActorrole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("practitioner".equals(codeString)) + return ContractActorrole.PRACTITIONER; + if ("patient".equals(codeString)) + return ContractActorrole.PATIENT; + throw new IllegalArgumentException("Unknown ContractActorrole code '"+codeString+"'"); + } + + public String toCode(ContractActorrole code) { + if (code == ContractActorrole.PRACTITIONER) + return "practitioner"; + if (code == ContractActorrole.PATIENT) + return "patient"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerType.java new file mode 100644 index 00000000000..2ddf0c077dc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerType.java @@ -0,0 +1,222 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractSignerType { + + /** + * the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document. + */ + OID_1_2_840_10065_1_12_1_1, + /** + * the signature of a health information document coauthor. There can be multiple coauthors of a health information document. + */ + OID_1_2_840_10065_1_12_1_2, + /** + * the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.) + */ + OID_1_2_840_10065_1_12_1_3, + /** + * the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format. + */ + OID_1_2_840_10065_1_12_1_4, + /** + * a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.) + */ + OID_1_2_840_10065_1_12_1_5, + /** + * a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.) + */ + OID_1_2_840_10065_1_12_1_6, + /** + * the signature of an individual consenting to what is described in a health information document. + */ + OID_1_2_840_10065_1_12_1_7, + /** + * the signature of a witness to any other signature. + */ + OID_1_2_840_10065_1_12_1_8, + /** + * the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.) + */ + OID_1_2_840_10065_1_12_1_9, + /** + * the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.) + */ + OID_1_2_840_10065_1_12_1_10, + /** + * the signature of an individual who has witnessed the health care provider counselling a patient. + */ + OID_1_2_840_10065_1_12_1_11, + /** + * the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment. + */ + OID_1_2_840_10065_1_12_1_12, + /** + * the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.) + */ + OID_1_2_840_10065_1_12_1_13, + /** + * the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.) + */ + OID_1_2_840_10065_1_12_1_14, + /** + * the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand. + */ + OID_1_2_840_10065_1_12_1_15, + /** + * the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document. + */ + OID_1_2_840_10065_1_12_1_16, + /** + * the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record. + */ + OID_1_2_840_10065_1_12_1_17, + /** + * added to help the parsers + */ + NULL; + public static ContractSignerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return OID_1_2_840_10065_1_12_1_17; + throw new FHIRException("Unknown ContractSignerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "1.2.840.10065.1.12.1.1"; + case OID_1_2_840_10065_1_12_1_2: return "1.2.840.10065.1.12.1.2"; + case OID_1_2_840_10065_1_12_1_3: return "1.2.840.10065.1.12.1.3"; + case OID_1_2_840_10065_1_12_1_4: return "1.2.840.10065.1.12.1.4"; + case OID_1_2_840_10065_1_12_1_5: return "1.2.840.10065.1.12.1.5"; + case OID_1_2_840_10065_1_12_1_6: return "1.2.840.10065.1.12.1.6"; + case OID_1_2_840_10065_1_12_1_7: return "1.2.840.10065.1.12.1.7"; + case OID_1_2_840_10065_1_12_1_8: return "1.2.840.10065.1.12.1.8"; + case OID_1_2_840_10065_1_12_1_9: return "1.2.840.10065.1.12.1.9"; + case OID_1_2_840_10065_1_12_1_10: return "1.2.840.10065.1.12.1.10"; + case OID_1_2_840_10065_1_12_1_11: return "1.2.840.10065.1.12.1.11"; + case OID_1_2_840_10065_1_12_1_12: return "1.2.840.10065.1.12.1.12"; + case OID_1_2_840_10065_1_12_1_13: return "1.2.840.10065.1.12.1.13"; + case OID_1_2_840_10065_1_12_1_14: return "1.2.840.10065.1.12.1.14"; + case OID_1_2_840_10065_1_12_1_15: return "1.2.840.10065.1.12.1.15"; + case OID_1_2_840_10065_1_12_1_16: return "1.2.840.10065.1.12.1.16"; + case OID_1_2_840_10065_1_12_1_17: return "1.2.840.10065.1.12.1.17"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contractsignertypecodes"; + } + public String getDefinition() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document."; + case OID_1_2_840_10065_1_12_1_2: return "the signature of a health information document coauthor. There can be multiple coauthors of a health information document."; + case OID_1_2_840_10065_1_12_1_3: return "the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.)"; + case OID_1_2_840_10065_1_12_1_4: return "the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format."; + case OID_1_2_840_10065_1_12_1_5: return "a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.)"; + case OID_1_2_840_10065_1_12_1_6: return "a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.)"; + case OID_1_2_840_10065_1_12_1_7: return "the signature of an individual consenting to what is described in a health information document."; + case OID_1_2_840_10065_1_12_1_8: return "the signature of a witness to any other signature."; + case OID_1_2_840_10065_1_12_1_9: return "the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.)"; + case OID_1_2_840_10065_1_12_1_10: return "the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.)"; + case OID_1_2_840_10065_1_12_1_11: return "the signature of an individual who has witnessed the health care provider counselling a patient."; + case OID_1_2_840_10065_1_12_1_12: return "the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment."; + case OID_1_2_840_10065_1_12_1_13: return "the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.)"; + case OID_1_2_840_10065_1_12_1_14: return "the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.)"; + case OID_1_2_840_10065_1_12_1_15: return "the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand."; + case OID_1_2_840_10065_1_12_1_16: return "the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document."; + case OID_1_2_840_10065_1_12_1_17: return "the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "AuthorID"; + case OID_1_2_840_10065_1_12_1_2: return "Co-AuthorID"; + case OID_1_2_840_10065_1_12_1_3: return "Co-Participated"; + case OID_1_2_840_10065_1_12_1_4: return "Transcriptionist"; + case OID_1_2_840_10065_1_12_1_5: return "Verification"; + case OID_1_2_840_10065_1_12_1_6: return "Validation"; + case OID_1_2_840_10065_1_12_1_7: return "Consent"; + case OID_1_2_840_10065_1_12_1_8: return "Witness"; + case OID_1_2_840_10065_1_12_1_9: return "Event-Witness"; + case OID_1_2_840_10065_1_12_1_10: return "Identity-Witness"; + case OID_1_2_840_10065_1_12_1_11: return "Consent-Witness"; + case OID_1_2_840_10065_1_12_1_12: return "Interpreter"; + case OID_1_2_840_10065_1_12_1_13: return "Review"; + case OID_1_2_840_10065_1_12_1_14: return "Source"; + case OID_1_2_840_10065_1_12_1_15: return "Addendum"; + case OID_1_2_840_10065_1_12_1_16: return "Administrative"; + case OID_1_2_840_10065_1_12_1_17: return "Timestamp"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerTypeEnumFactory.java new file mode 100644 index 00000000000..c87019653d8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSignerTypeEnumFactory.java @@ -0,0 +1,119 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractSignerTypeEnumFactory implements EnumFactory { + + public ContractSignerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return ContractSignerType.OID_1_2_840_10065_1_12_1_17; + throw new IllegalArgumentException("Unknown ContractSignerType code '"+codeString+"'"); + } + + public String toCode(ContractSignerType code) { + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_1) + return "1.2.840.10065.1.12.1.1"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_2) + return "1.2.840.10065.1.12.1.2"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_3) + return "1.2.840.10065.1.12.1.3"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_4) + return "1.2.840.10065.1.12.1.4"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_5) + return "1.2.840.10065.1.12.1.5"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_6) + return "1.2.840.10065.1.12.1.6"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_7) + return "1.2.840.10065.1.12.1.7"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_8) + return "1.2.840.10065.1.12.1.8"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_9) + return "1.2.840.10065.1.12.1.9"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_10) + return "1.2.840.10065.1.12.1.10"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_11) + return "1.2.840.10065.1.12.1.11"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_12) + return "1.2.840.10065.1.12.1.12"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_13) + return "1.2.840.10065.1.12.1.13"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_14) + return "1.2.840.10065.1.12.1.14"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_15) + return "1.2.840.10065.1.12.1.15"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_16) + return "1.2.840.10065.1.12.1.16"; + if (code == ContractSignerType.OID_1_2_840_10065_1_12_1_17) + return "1.2.840.10065.1.12.1.17"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtype.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtype.java new file mode 100644 index 00000000000..8597d942245 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtype.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractSubtype { + + /** + * null + */ + DISCLOSURECA, + /** + * null + */ + DISCLOSUREUS, + /** + * added to help the parsers + */ + NULL; + public static ContractSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("disclosure-CA".equals(codeString)) + return DISCLOSURECA; + if ("disclosure-US".equals(codeString)) + return DISCLOSUREUS; + throw new FHIRException("Unknown ContractSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DISCLOSURECA: return "disclosure-CA"; + case DISCLOSUREUS: return "disclosure-US"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contractsubtypecodes"; + } + public String getDefinition() { + switch (this) { + case DISCLOSURECA: return ""; + case DISCLOSUREUS: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DISCLOSURECA: return "disclosure-CA"; + case DISCLOSUREUS: return "disclosure-US"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtypeEnumFactory.java new file mode 100644 index 00000000000..43d3ea09b2c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractSubtypeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractSubtypeEnumFactory implements EnumFactory { + + public ContractSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("disclosure-CA".equals(codeString)) + return ContractSubtype.DISCLOSURECA; + if ("disclosure-US".equals(codeString)) + return ContractSubtype.DISCLOSUREUS; + throw new IllegalArgumentException("Unknown ContractSubtype code '"+codeString+"'"); + } + + public String toCode(ContractSubtype code) { + if (code == ContractSubtype.DISCLOSURECA) + return "disclosure-CA"; + if (code == ContractSubtype.DISCLOSUREUS) + return "disclosure-US"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtype.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtype.java new file mode 100644 index 00000000000..b3d17f5b94d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractTermSubtype { + + /** + * null + */ + ORALHEALTHBASIC, + /** + * null + */ + ORALHEALTHMAJOR, + /** + * null + */ + ORALHEALTHORTHODONTIC, + /** + * added to help the parsers + */ + NULL; + public static ContractTermSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OralHealth-Basic".equals(codeString)) + return ORALHEALTHBASIC; + if ("OralHealth-Major".equals(codeString)) + return ORALHEALTHMAJOR; + if ("OralHealth-Orthodontic".equals(codeString)) + return ORALHEALTHORTHODONTIC; + throw new FHIRException("Unknown ContractTermSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORALHEALTHBASIC: return "OralHealth-Basic"; + case ORALHEALTHMAJOR: return "OralHealth-Major"; + case ORALHEALTHORTHODONTIC: return "OralHealth-Orthodontic"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttermsubtypecodes"; + } + public String getDefinition() { + switch (this) { + case ORALHEALTHBASIC: return ""; + case ORALHEALTHMAJOR: return ""; + case ORALHEALTHORTHODONTIC: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORALHEALTHBASIC: return "OralHealth-Basic"; + case ORALHEALTHMAJOR: return "OralHealth-Major"; + case ORALHEALTHORTHODONTIC: return "OralHealth-Orthodontic"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtypeEnumFactory.java new file mode 100644 index 00000000000..ea49bacb9b7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermSubtypeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractTermSubtypeEnumFactory implements EnumFactory { + + public ContractTermSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OralHealth-Basic".equals(codeString)) + return ContractTermSubtype.ORALHEALTHBASIC; + if ("OralHealth-Major".equals(codeString)) + return ContractTermSubtype.ORALHEALTHMAJOR; + if ("OralHealth-Orthodontic".equals(codeString)) + return ContractTermSubtype.ORALHEALTHORTHODONTIC; + throw new IllegalArgumentException("Unknown ContractTermSubtype code '"+codeString+"'"); + } + + public String toCode(ContractTermSubtype code) { + if (code == ContractTermSubtype.ORALHEALTHBASIC) + return "OralHealth-Basic"; + if (code == ContractTermSubtype.ORALHEALTHMAJOR) + return "OralHealth-Major"; + if (code == ContractTermSubtype.ORALHEALTHORTHODONTIC) + return "OralHealth-Orthodontic"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermType.java new file mode 100644 index 00000000000..e77d5892cfa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractTermType { + + /** + * null + */ + ORALHEALTH, + /** + * null + */ + VISION, + /** + * added to help the parsers + */ + NULL; + public static ContractTermType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OralHealth".equals(codeString)) + return ORALHEALTH; + if ("Vision".equals(codeString)) + return VISION; + throw new FHIRException("Unknown ContractTermType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORALHEALTH: return "OralHealth"; + case VISION: return "Vision"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttermtypecodes"; + } + public String getDefinition() { + switch (this) { + case ORALHEALTH: return ""; + case VISION: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORALHEALTH: return "OralHealth"; + case VISION: return "Vision"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermTypeEnumFactory.java new file mode 100644 index 00000000000..be2186c8098 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTermTypeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractTermTypeEnumFactory implements EnumFactory { + + public ContractTermType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OralHealth".equals(codeString)) + return ContractTermType.ORALHEALTH; + if ("Vision".equals(codeString)) + return ContractTermType.VISION; + throw new IllegalArgumentException("Unknown ContractTermType code '"+codeString+"'"); + } + + public String toCode(ContractTermType code) { + if (code == ContractTermType.ORALHEALTH) + return "OralHealth"; + if (code == ContractTermType.VISION) + return "Vision"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractType.java new file mode 100644 index 00000000000..deeb228b455 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractType { + + /** + * null + */ + PRIVACY, + /** + * null + */ + DISCLOSURE, + /** + * added to help the parsers + */ + NULL; + public static ContractType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("privacy".equals(codeString)) + return PRIVACY; + if ("disclosure".equals(codeString)) + return DISCLOSURE; + throw new FHIRException("Unknown ContractType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRIVACY: return "privacy"; + case DISCLOSURE: return "disclosure"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttypecodes"; + } + public String getDefinition() { + switch (this) { + case PRIVACY: return ""; + case DISCLOSURE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRIVACY: return "privacy"; + case DISCLOSURE: return "disclosure"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTypeEnumFactory.java new file mode 100644 index 00000000000..83a2905042a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ContractTypeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ContractTypeEnumFactory implements EnumFactory { + + public ContractType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("privacy".equals(codeString)) + return ContractType.PRIVACY; + if ("disclosure".equals(codeString)) + return ContractType.DISCLOSURE; + throw new IllegalArgumentException("Unknown ContractType code '"+codeString+"'"); + } + + public String toCode(ContractType code) { + if (code == ContractType.PRIVACY) + return "privacy"; + if (code == ContractType.DISCLOSURE) + return "disclosure"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceAction.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceAction.java new file mode 100644 index 00000000000..64344067e9b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceAction.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DeviceAction { + + /** + * The device was implanted in the patient during the procedure. + */ + IMPLANTED, + /** + * The device was explanted from the patient during the procedure. + */ + EXPLANTED, + /** + * The device remains in that patient, but its location, settings, or functionality was changed. + */ + MANIPULATED, + /** + * added to help the parsers + */ + NULL; + public static DeviceAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("implanted".equals(codeString)) + return IMPLANTED; + if ("explanted".equals(codeString)) + return EXPLANTED; + if ("manipulated".equals(codeString)) + return MANIPULATED; + throw new FHIRException("Unknown DeviceAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IMPLANTED: return "implanted"; + case EXPLANTED: return "explanted"; + case MANIPULATED: return "manipulated"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/device-action"; + } + public String getDefinition() { + switch (this) { + case IMPLANTED: return "The device was implanted in the patient during the procedure."; + case EXPLANTED: return "The device was explanted from the patient during the procedure."; + case MANIPULATED: return "The device remains in that patient, but its location, settings, or functionality was changed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IMPLANTED: return "Implanted"; + case EXPLANTED: return "Explanted"; + case MANIPULATED: return "Manipulated"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceActionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceActionEnumFactory.java new file mode 100644 index 00000000000..2008135db14 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/DeviceActionEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class DeviceActionEnumFactory implements EnumFactory { + + public DeviceAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("implanted".equals(codeString)) + return DeviceAction.IMPLANTED; + if ("explanted".equals(codeString)) + return DeviceAction.EXPLANTED; + if ("manipulated".equals(codeString)) + return DeviceAction.MANIPULATED; + throw new IllegalArgumentException("Unknown DeviceAction code '"+codeString+"'"); + } + + public String toCode(DeviceAction code) { + if (code == DeviceAction.IMPLANTED) + return "implanted"; + if (code == DeviceAction.EXPLANTED) + return "explanted"; + if (code == DeviceAction.MANIPULATED) + return "manipulated"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSource.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSource.java new file mode 100644 index 00000000000..4fe6d243585 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSource.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterAdmitSource { + + /** + * null + */ + HOSPTRANS, + /** + * null + */ + EMD, + /** + * null + */ + OUTP, + /** + * null + */ + BORN, + /** + * null + */ + GP, + /** + * null + */ + MP, + /** + * null + */ + NURSING, + /** + * null + */ + PSYCH, + /** + * null + */ + REHAB, + /** + * null + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static EncounterAdmitSource fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hosp-trans".equals(codeString)) + return HOSPTRANS; + if ("emd".equals(codeString)) + return EMD; + if ("outp".equals(codeString)) + return OUTP; + if ("born".equals(codeString)) + return BORN; + if ("gp".equals(codeString)) + return GP; + if ("mp".equals(codeString)) + return MP; + if ("nursing".equals(codeString)) + return NURSING; + if ("psych".equals(codeString)) + return PSYCH; + if ("rehab".equals(codeString)) + return REHAB; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown EncounterAdmitSource code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOSPTRANS: return "hosp-trans"; + case EMD: return "emd"; + case OUTP: return "outp"; + case BORN: return "born"; + case GP: return "gp"; + case MP: return "mp"; + case NURSING: return "nursing"; + case PSYCH: return "psych"; + case REHAB: return "rehab"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/admit-source"; + } + public String getDefinition() { + switch (this) { + case HOSPTRANS: return ""; + case EMD: return ""; + case OUTP: return ""; + case BORN: return ""; + case GP: return ""; + case MP: return ""; + case NURSING: return ""; + case PSYCH: return ""; + case REHAB: return ""; + case OTHER: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOSPTRANS: return "Transferred from other hospital"; + case EMD: return "From accident/emergency department"; + case OUTP: return "From outpatient department"; + case BORN: return "Born in hospital"; + case GP: return "General Practitioner referral"; + case MP: return "Medical Practitioner/physician referral"; + case NURSING: return "From nursing home"; + case PSYCH: return "From psychiatric hospital"; + case REHAB: return "From rehabilitation facility"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSourceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSourceEnumFactory.java new file mode 100644 index 00000000000..f96dadf9886 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterAdmitSourceEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterAdmitSourceEnumFactory implements EnumFactory { + + public EncounterAdmitSource fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hosp-trans".equals(codeString)) + return EncounterAdmitSource.HOSPTRANS; + if ("emd".equals(codeString)) + return EncounterAdmitSource.EMD; + if ("outp".equals(codeString)) + return EncounterAdmitSource.OUTP; + if ("born".equals(codeString)) + return EncounterAdmitSource.BORN; + if ("gp".equals(codeString)) + return EncounterAdmitSource.GP; + if ("mp".equals(codeString)) + return EncounterAdmitSource.MP; + if ("nursing".equals(codeString)) + return EncounterAdmitSource.NURSING; + if ("psych".equals(codeString)) + return EncounterAdmitSource.PSYCH; + if ("rehab".equals(codeString)) + return EncounterAdmitSource.REHAB; + if ("other".equals(codeString)) + return EncounterAdmitSource.OTHER; + throw new IllegalArgumentException("Unknown EncounterAdmitSource code '"+codeString+"'"); + } + + public String toCode(EncounterAdmitSource code) { + if (code == EncounterAdmitSource.HOSPTRANS) + return "hosp-trans"; + if (code == EncounterAdmitSource.EMD) + return "emd"; + if (code == EncounterAdmitSource.OUTP) + return "outp"; + if (code == EncounterAdmitSource.BORN) + return "born"; + if (code == EncounterAdmitSource.GP) + return "gp"; + if (code == EncounterAdmitSource.MP) + return "mp"; + if (code == EncounterAdmitSource.NURSING) + return "nursing"; + if (code == EncounterAdmitSource.PSYCH) + return "psych"; + if (code == EncounterAdmitSource.REHAB) + return "rehab"; + if (code == EncounterAdmitSource.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDiet.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDiet.java new file mode 100644 index 00000000000..0cebc12a3a3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDiet.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterDiet { + + /** + * Food without meat, poultry or seafood. + */ + VEGETARIAN, + /** + * Excludes dairy products. + */ + DAIRYFREE, + /** + * Excludes ingredients containing nuts. + */ + NUTFREE, + /** + * Excludes ingredients containing gluten. + */ + GLUTENFREE, + /** + * Food without meat, poultry, seafood, eggs, dairy products and other animal-derived substances. + */ + VEGAN, + /** + * Foods that conform to Islamic law. + */ + HALAL, + /** + * Foods that conform to Jewish dietary law. + */ + KOSHER, + /** + * added to help the parsers + */ + NULL; + public static EncounterDiet fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("vegetarian".equals(codeString)) + return VEGETARIAN; + if ("dairy-free".equals(codeString)) + return DAIRYFREE; + if ("nut-free".equals(codeString)) + return NUTFREE; + if ("gluten-free".equals(codeString)) + return GLUTENFREE; + if ("vegan".equals(codeString)) + return VEGAN; + if ("halal".equals(codeString)) + return HALAL; + if ("kosher".equals(codeString)) + return KOSHER; + throw new FHIRException("Unknown EncounterDiet code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case VEGETARIAN: return "vegetarian"; + case DAIRYFREE: return "dairy-free"; + case NUTFREE: return "nut-free"; + case GLUTENFREE: return "gluten-free"; + case VEGAN: return "vegan"; + case HALAL: return "halal"; + case KOSHER: return "kosher"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/diet"; + } + public String getDefinition() { + switch (this) { + case VEGETARIAN: return "Food without meat, poultry or seafood."; + case DAIRYFREE: return "Excludes dairy products."; + case NUTFREE: return "Excludes ingredients containing nuts."; + case GLUTENFREE: return "Excludes ingredients containing gluten."; + case VEGAN: return "Food without meat, poultry, seafood, eggs, dairy products and other animal-derived substances."; + case HALAL: return "Foods that conform to Islamic law."; + case KOSHER: return "Foods that conform to Jewish dietary law."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case VEGETARIAN: return "Vegetarian"; + case DAIRYFREE: return "Dairy Free"; + case NUTFREE: return "Nut Free"; + case GLUTENFREE: return "Gluten Free"; + case VEGAN: return "Vegan"; + case HALAL: return "Halal"; + case KOSHER: return "Kosher"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDietEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDietEnumFactory.java new file mode 100644 index 00000000000..c3f4d0b1ad5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDietEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterDietEnumFactory implements EnumFactory { + + public EncounterDiet fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("vegetarian".equals(codeString)) + return EncounterDiet.VEGETARIAN; + if ("dairy-free".equals(codeString)) + return EncounterDiet.DAIRYFREE; + if ("nut-free".equals(codeString)) + return EncounterDiet.NUTFREE; + if ("gluten-free".equals(codeString)) + return EncounterDiet.GLUTENFREE; + if ("vegan".equals(codeString)) + return EncounterDiet.VEGAN; + if ("halal".equals(codeString)) + return EncounterDiet.HALAL; + if ("kosher".equals(codeString)) + return EncounterDiet.KOSHER; + throw new IllegalArgumentException("Unknown EncounterDiet code '"+codeString+"'"); + } + + public String toCode(EncounterDiet code) { + if (code == EncounterDiet.VEGETARIAN) + return "vegetarian"; + if (code == EncounterDiet.DAIRYFREE) + return "dairy-free"; + if (code == EncounterDiet.NUTFREE) + return "nut-free"; + if (code == EncounterDiet.GLUTENFREE) + return "gluten-free"; + if (code == EncounterDiet.VEGAN) + return "vegan"; + if (code == EncounterDiet.HALAL) + return "halal"; + if (code == EncounterDiet.KOSHER) + return "kosher"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDisposition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDisposition.java new file mode 100644 index 00000000000..d62b682dc4e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDisposition.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterDischargeDisposition { + + /** + * null + */ + HOME, + /** + * null + */ + OTHERHCF, + /** + * null + */ + HOSP, + /** + * null + */ + LONG, + /** + * null + */ + AADVICE, + /** + * null + */ + EXP, + /** + * null + */ + PSY, + /** + * null + */ + REHAB, + /** + * null + */ + OTH, + /** + * added to help the parsers + */ + NULL; + public static EncounterDischargeDisposition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("other-hcf".equals(codeString)) + return OTHERHCF; + if ("hosp".equals(codeString)) + return HOSP; + if ("long".equals(codeString)) + return LONG; + if ("aadvice".equals(codeString)) + return AADVICE; + if ("exp".equals(codeString)) + return EXP; + if ("psy".equals(codeString)) + return PSY; + if ("rehab".equals(codeString)) + return REHAB; + if ("oth".equals(codeString)) + return OTH; + throw new FHIRException("Unknown EncounterDischargeDisposition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case OTHERHCF: return "other-hcf"; + case HOSP: return "hosp"; + case LONG: return "long"; + case AADVICE: return "aadvice"; + case EXP: return "exp"; + case PSY: return "psy"; + case REHAB: return "rehab"; + case OTH: return "oth"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/discharge-disposition"; + } + public String getDefinition() { + switch (this) { + case HOME: return ""; + case OTHERHCF: return ""; + case HOSP: return ""; + case LONG: return ""; + case AADVICE: return ""; + case EXP: return ""; + case PSY: return ""; + case REHAB: return ""; + case OTH: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case OTHERHCF: return "Other healthcare facility"; + case HOSP: return "Hospice"; + case LONG: return "Long-term care"; + case AADVICE: return "Left against advice"; + case EXP: return "Expired"; + case PSY: return "Psychiatric hospital"; + case REHAB: return "Rehabilitation"; + case OTH: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDispositionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDispositionEnumFactory.java new file mode 100644 index 00000000000..3c4b1ae9700 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDispositionEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterDischargeDispositionEnumFactory implements EnumFactory { + + public EncounterDischargeDisposition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return EncounterDischargeDisposition.HOME; + if ("other-hcf".equals(codeString)) + return EncounterDischargeDisposition.OTHERHCF; + if ("hosp".equals(codeString)) + return EncounterDischargeDisposition.HOSP; + if ("long".equals(codeString)) + return EncounterDischargeDisposition.LONG; + if ("aadvice".equals(codeString)) + return EncounterDischargeDisposition.AADVICE; + if ("exp".equals(codeString)) + return EncounterDischargeDisposition.EXP; + if ("psy".equals(codeString)) + return EncounterDischargeDisposition.PSY; + if ("rehab".equals(codeString)) + return EncounterDischargeDisposition.REHAB; + if ("oth".equals(codeString)) + return EncounterDischargeDisposition.OTH; + throw new IllegalArgumentException("Unknown EncounterDischargeDisposition code '"+codeString+"'"); + } + + public String toCode(EncounterDischargeDisposition code) { + if (code == EncounterDischargeDisposition.HOME) + return "home"; + if (code == EncounterDischargeDisposition.OTHERHCF) + return "other-hcf"; + if (code == EncounterDischargeDisposition.HOSP) + return "hosp"; + if (code == EncounterDischargeDisposition.LONG) + return "long"; + if (code == EncounterDischargeDisposition.AADVICE) + return "aadvice"; + if (code == EncounterDischargeDisposition.EXP) + return "exp"; + if (code == EncounterDischargeDisposition.PSY) + return "psy"; + if (code == EncounterDischargeDisposition.REHAB) + return "rehab"; + if (code == EncounterDischargeDisposition.OTH) + return "oth"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriority.java new file mode 100644 index 00000000000..5c3466960f4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriority.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterPriority { + + /** + * Within seconds. + */ + IMM, + /** + * Within 10 minutes. + */ + EMG, + /** + * Within 30 minutes. + */ + URG, + /** + * Within 60 minutes. + */ + SURG, + /** + * Within 120 minutes. + */ + NOURG, + /** + * added to help the parsers + */ + NULL; + public static EncounterPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("imm".equals(codeString)) + return IMM; + if ("emg".equals(codeString)) + return EMG; + if ("urg".equals(codeString)) + return URG; + if ("s-urg".equals(codeString)) + return SURG; + if ("no-urg".equals(codeString)) + return NOURG; + throw new FHIRException("Unknown EncounterPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IMM: return "imm"; + case EMG: return "emg"; + case URG: return "urg"; + case SURG: return "s-urg"; + case NOURG: return "no-urg"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-priority"; + } + public String getDefinition() { + switch (this) { + case IMM: return "Within seconds."; + case EMG: return "Within 10 minutes."; + case URG: return "Within 30 minutes."; + case SURG: return "Within 60 minutes."; + case NOURG: return "Within 120 minutes."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IMM: return "Immediate"; + case EMG: return "Emergency"; + case URG: return "Urgent"; + case SURG: return "Semi-urgent"; + case NOURG: return "Non-urgent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriorityEnumFactory.java new file mode 100644 index 00000000000..f6ecf353f95 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterPriorityEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterPriorityEnumFactory implements EnumFactory { + + public EncounterPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("imm".equals(codeString)) + return EncounterPriority.IMM; + if ("emg".equals(codeString)) + return EncounterPriority.EMG; + if ("urg".equals(codeString)) + return EncounterPriority.URG; + if ("s-urg".equals(codeString)) + return EncounterPriority.SURG; + if ("no-urg".equals(codeString)) + return EncounterPriority.NOURG; + throw new IllegalArgumentException("Unknown EncounterPriority code '"+codeString+"'"); + } + + public String toCode(EncounterPriority code) { + if (code == EncounterPriority.IMM) + return "imm"; + if (code == EncounterPriority.EMG) + return "emg"; + if (code == EncounterPriority.URG) + return "urg"; + if (code == EncounterPriority.SURG) + return "s-urg"; + if (code == EncounterPriority.NOURG) + return "no-urg"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangements.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangements.java new file mode 100644 index 00000000000..708e9d684da --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangements.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterSpecialArrangements { + + /** + * null + */ + WHEEL, + /** + * null + */ + STRET, + /** + * null + */ + INT, + /** + * null + */ + ATT, + /** + * null + */ + DOG, + /** + * added to help the parsers + */ + NULL; + public static EncounterSpecialArrangements fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("wheel".equals(codeString)) + return WHEEL; + if ("stret".equals(codeString)) + return STRET; + if ("int".equals(codeString)) + return INT; + if ("att".equals(codeString)) + return ATT; + if ("dog".equals(codeString)) + return DOG; + throw new FHIRException("Unknown EncounterSpecialArrangements code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case WHEEL: return "wheel"; + case STRET: return "stret"; + case INT: return "int"; + case ATT: return "att"; + case DOG: return "dog"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-special-arrangements"; + } + public String getDefinition() { + switch (this) { + case WHEEL: return ""; + case STRET: return ""; + case INT: return ""; + case ATT: return ""; + case DOG: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case WHEEL: return "Wheelchair"; + case STRET: return "Stretcher"; + case INT: return "Interpreter"; + case ATT: return "Attendant"; + case DOG: return "Guide dog"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangementsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangementsEnumFactory.java new file mode 100644 index 00000000000..a65a0d99dac --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterSpecialArrangementsEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterSpecialArrangementsEnumFactory implements EnumFactory { + + public EncounterSpecialArrangements fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("wheel".equals(codeString)) + return EncounterSpecialArrangements.WHEEL; + if ("stret".equals(codeString)) + return EncounterSpecialArrangements.STRET; + if ("int".equals(codeString)) + return EncounterSpecialArrangements.INT; + if ("att".equals(codeString)) + return EncounterSpecialArrangements.ATT; + if ("dog".equals(codeString)) + return EncounterSpecialArrangements.DOG; + throw new IllegalArgumentException("Unknown EncounterSpecialArrangements code '"+codeString+"'"); + } + + public String toCode(EncounterSpecialArrangements code) { + if (code == EncounterSpecialArrangements.WHEEL) + return "wheel"; + if (code == EncounterSpecialArrangements.STRET) + return "stret"; + if (code == EncounterSpecialArrangements.INT) + return "int"; + if (code == EncounterSpecialArrangements.ATT) + return "att"; + if (code == EncounterSpecialArrangements.DOG) + return "dog"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterType.java new file mode 100644 index 00000000000..e70d21f6219 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterType { + + /** + * null + */ + ADMS, + /** + * null + */ + BD_BMCLIN, + /** + * null + */ + CCS60, + /** + * null + */ + OKI, + /** + * added to help the parsers + */ + NULL; + public static EncounterType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADMS".equals(codeString)) + return ADMS; + if ("BD/BM-clin".equals(codeString)) + return BD_BMCLIN; + if ("CCS60".equals(codeString)) + return CCS60; + if ("OKI".equals(codeString)) + return OKI; + throw new FHIRException("Unknown EncounterType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADMS: return "ADMS"; + case BD_BMCLIN: return "BD/BM-clin"; + case CCS60: return "CCS60"; + case OKI: return "OKI"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-type"; + } + public String getDefinition() { + switch (this) { + case ADMS: return ""; + case BD_BMCLIN: return ""; + case CCS60: return ""; + case OKI: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADMS: return "Annual diabetes mellitus screening"; + case BD_BMCLIN: return "Bone drilling/bone marrow punction in clinic"; + case CCS60: return "Infant colon screening - 60 minutes"; + case OKI: return "Outpatient Kenacort injection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterTypeEnumFactory.java new file mode 100644 index 00000000000..e7c54964df5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterTypeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EncounterTypeEnumFactory implements EnumFactory { + + public EncounterType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADMS".equals(codeString)) + return EncounterType.ADMS; + if ("BD/BM-clin".equals(codeString)) + return EncounterType.BD_BMCLIN; + if ("CCS60".equals(codeString)) + return EncounterType.CCS60; + if ("OKI".equals(codeString)) + return EncounterType.OKI; + throw new IllegalArgumentException("Unknown EncounterType code '"+codeString+"'"); + } + + public String toCode(EncounterType code) { + if (code == EncounterType.ADMS) + return "ADMS"; + if (code == EncounterType.BD_BMCLIN) + return "BD/BM-clin"; + if (code == EncounterType.CCS60) + return "CCS60"; + if (code == EncounterType.OKI) + return "OKI"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditive.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditive.java new file mode 100644 index 00000000000..5c4c81cd707 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditive.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EntformulaAdditive { + + /** + * null + */ + LIPID, + /** + * null + */ + PROTEIN, + /** + * null + */ + CARBOHYDRATE, + /** + * null + */ + FIBER, + /** + * null + */ + WATER, + /** + * added to help the parsers + */ + NULL; + public static EntformulaAdditive fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lipid".equals(codeString)) + return LIPID; + if ("protein".equals(codeString)) + return PROTEIN; + if ("carbohydrate".equals(codeString)) + return CARBOHYDRATE; + if ("fiber".equals(codeString)) + return FIBER; + if ("water".equals(codeString)) + return WATER; + throw new FHIRException("Unknown EntformulaAdditive code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LIPID: return "lipid"; + case PROTEIN: return "protein"; + case CARBOHYDRATE: return "carbohydrate"; + case FIBER: return "fiber"; + case WATER: return "water"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/entformula-additive"; + } + public String getDefinition() { + switch (this) { + case LIPID: return ""; + case PROTEIN: return ""; + case CARBOHYDRATE: return ""; + case FIBER: return ""; + case WATER: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LIPID: return "Modular lipid enteral formula component"; + case PROTEIN: return "Modular protein enteral formula component"; + case CARBOHYDRATE: return "Modular carbohydrate enteral formula component"; + case FIBER: return "Modular fiber enteral formula component"; + case WATER: return "Added water"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditiveEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditiveEnumFactory.java new file mode 100644 index 00000000000..b9619745be1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EntformulaAdditiveEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class EntformulaAdditiveEnumFactory implements EnumFactory { + + public EntformulaAdditive fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lipid".equals(codeString)) + return EntformulaAdditive.LIPID; + if ("protein".equals(codeString)) + return EntformulaAdditive.PROTEIN; + if ("carbohydrate".equals(codeString)) + return EntformulaAdditive.CARBOHYDRATE; + if ("fiber".equals(codeString)) + return EntformulaAdditive.FIBER; + if ("water".equals(codeString)) + return EntformulaAdditive.WATER; + throw new IllegalArgumentException("Unknown EntformulaAdditive code '"+codeString+"'"); + } + + public String toCode(EntformulaAdditive code) { + if (code == EntformulaAdditive.LIPID) + return "lipid"; + if (code == EntformulaAdditive.PROTEIN) + return "protein"; + if (code == EntformulaAdditive.CARBOHYDRATE) + return "carbohydrate"; + if (code == EntformulaAdditive.FIBER) + return "fiber"; + if (code == EntformulaAdditive.WATER) + return "water"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategory.java new file mode 100644 index 00000000000..d945c8d0d8f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FlagCategory { + + /** + * Flags related to the subject's dietary needs. + */ + DIET, + /** + * Flags related to the patient's medications. + */ + DRUG, + /** + * Flags related to performing laboratory tests and related processes (e.g. phlebotomy). + */ + LAB, + /** + * Flags related to administrative and financial processes. + */ + ADMIN, + /** + * Flags related to coming into contact with the patient. + */ + CONTACT, + /** + * added to help the parsers + */ + NULL; + public static FlagCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return DIET; + if ("drug".equals(codeString)) + return DRUG; + if ("lab".equals(codeString)) + return LAB; + if ("admin".equals(codeString)) + return ADMIN; + if ("contact".equals(codeString)) + return CONTACT; + throw new FHIRException("Unknown FlagCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIET: return "diet"; + case DRUG: return "drug"; + case LAB: return "lab"; + case ADMIN: return "admin"; + case CONTACT: return "contact"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/flag-category"; + } + public String getDefinition() { + switch (this) { + case DIET: return "Flags related to the subject's dietary needs."; + case DRUG: return "Flags related to the patient's medications."; + case LAB: return "Flags related to performing laboratory tests and related processes (e.g. phlebotomy)."; + case ADMIN: return "Flags related to administrative and financial processes."; + case CONTACT: return "Flags related to coming into contact with the patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIET: return "Diet"; + case DRUG: return "Drug"; + case LAB: return "Lab"; + case ADMIN: return "Administrative"; + case CONTACT: return "Subject contact"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategoryEnumFactory.java new file mode 100644 index 00000000000..0e25b6432ed --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagCategoryEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class FlagCategoryEnumFactory implements EnumFactory { + + public FlagCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return FlagCategory.DIET; + if ("drug".equals(codeString)) + return FlagCategory.DRUG; + if ("lab".equals(codeString)) + return FlagCategory.LAB; + if ("admin".equals(codeString)) + return FlagCategory.ADMIN; + if ("contact".equals(codeString)) + return FlagCategory.CONTACT; + throw new IllegalArgumentException("Unknown FlagCategory code '"+codeString+"'"); + } + + public String toCode(FlagCategory code) { + if (code == FlagCategory.DIET) + return "diet"; + if (code == FlagCategory.DRUG) + return "drug"; + if (code == FlagCategory.LAB) + return "lab"; + if (code == FlagCategory.ADMIN) + return "admin"; + if (code == FlagCategory.CONTACT) + return "contact"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriority.java new file mode 100644 index 00000000000..ef3f7d23f8e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriority.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FlagPriority { + + /** + * No alarm. + */ + PN, + /** + * Low priority. + */ + PL, + /** + * Medium priority. + */ + PM, + /** + * High priority. + */ + PH, + /** + * added to help the parsers + */ + NULL; + public static FlagPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PN".equals(codeString)) + return PN; + if ("PL".equals(codeString)) + return PL; + if ("PM".equals(codeString)) + return PM; + if ("PH".equals(codeString)) + return PH; + throw new FHIRException("Unknown FlagPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PN: return "PN"; + case PL: return "PL"; + case PM: return "PM"; + case PH: return "PH"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/flag-priority-code"; + } + public String getDefinition() { + switch (this) { + case PN: return "No alarm."; + case PL: return "Low priority."; + case PM: return "Medium priority."; + case PH: return "High priority."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PN: return "No alarm"; + case PL: return "Low priority"; + case PM: return "Medium priority"; + case PH: return "High priority"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriorityEnumFactory.java new file mode 100644 index 00000000000..2c1d4e6c23f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FlagPriorityEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class FlagPriorityEnumFactory implements EnumFactory { + + public FlagPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PN".equals(codeString)) + return FlagPriority.PN; + if ("PL".equals(codeString)) + return FlagPriority.PL; + if ("PM".equals(codeString)) + return FlagPriority.PM; + if ("PH".equals(codeString)) + return FlagPriority.PH; + throw new IllegalArgumentException("Unknown FlagPriority code '"+codeString+"'"); + } + + public String toCode(FlagPriority code) { + if (code == FlagPriority.PN) + return "PN"; + if (code == FlagPriority.PL) + return "PL"; + if (code == FlagPriority.PM) + return "PM"; + if (code == FlagPriority.PH) + return "PH"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditions.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditions.java new file mode 100644 index 00000000000..af84d8e5f40 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditions.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FmConditions { + + /** + * Headache + */ + _123987, + /** + * added to help the parsers + */ + NULL; + public static FmConditions fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123987".equals(codeString)) + return _123987; + throw new FHIRException("Unknown FmConditions code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _123987: return "123987"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fm-conditions"; + } + public String getDefinition() { + switch (this) { + case _123987: return "Headache"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _123987: return "Headache"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditionsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditionsEnumFactory.java new file mode 100644 index 00000000000..ecb3d59936e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FmConditionsEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class FmConditionsEnumFactory implements EnumFactory { + + public FmConditions fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123987".equals(codeString)) + return FmConditions._123987; + throw new IllegalArgumentException("Unknown FmConditions code '"+codeString+"'"); + } + + public String toCode(FmConditions code) { + if (code == FmConditions._123987) + return "123987"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Forms.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Forms.java new file mode 100644 index 00000000000..ab8dfa750e7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Forms.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Forms { + + /** + * null + */ + _1, + /** + * null + */ + _2, + /** + * added to help the parsers + */ + NULL; + public static Forms fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + throw new FHIRException("Unknown Forms code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/forms-codes"; + } + public String getDefinition() { + switch (this) { + case _1: return ""; + case _2: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FormsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FormsEnumFactory.java new file mode 100644 index 00000000000..85fefa2141c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FormsEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class FormsEnumFactory implements EnumFactory { + + public Forms fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return Forms._1; + if ("2".equals(codeString)) + return Forms._2; + throw new IllegalArgumentException("Unknown Forms code '"+codeString+"'"); + } + + public String toCode(Forms code) { + if (code == Forms._1) + return "1"; + if (code == Forms._2) + return "2"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Fundsreserve.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Fundsreserve.java new file mode 100644 index 00000000000..22af98b33ea --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Fundsreserve.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Fundsreserve { + + /** + * null + */ + PATIENT, + /** + * null + */ + PROVIDER, + /** + * null + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static Fundsreserve fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("provider".equals(codeString)) + return PROVIDER; + if ("none".equals(codeString)) + return NONE; + throw new FHIRException("Unknown Fundsreserve code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PROVIDER: return "provider"; + case NONE: return "none"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fundsreserve"; + } + public String getDefinition() { + switch (this) { + case PATIENT: return ""; + case PROVIDER: return ""; + case NONE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "patient"; + case PROVIDER: return "provider"; + case NONE: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FundsreserveEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FundsreserveEnumFactory.java new file mode 100644 index 00000000000..2ae2efd59bc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/FundsreserveEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class FundsreserveEnumFactory implements EnumFactory { + + public Fundsreserve fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return Fundsreserve.PATIENT; + if ("provider".equals(codeString)) + return Fundsreserve.PROVIDER; + if ("none".equals(codeString)) + return Fundsreserve.NONE; + throw new IllegalArgumentException("Unknown Fundsreserve code '"+codeString+"'"); + } + + public String toCode(Fundsreserve code) { + if (code == Fundsreserve.PATIENT) + return "patient"; + if (code == Fundsreserve.PROVIDER) + return "provider"; + if (code == Fundsreserve.NONE) + return "none"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatus.java new file mode 100644 index 00000000000..36182212a60 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalAcceptanceStatus { + + /** + * Stakeholder supports pursuit of the goal + */ + AGREE, + /** + * Stakeholder is not in support of the pursuit of the goal + */ + DISAGREE, + /** + * Stakeholder has not yet made a decision on whether they support the goal + */ + PENDING, + /** + * added to help the parsers + */ + NULL; + public static GoalAcceptanceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("agree".equals(codeString)) + return AGREE; + if ("disagree".equals(codeString)) + return DISAGREE; + if ("pending".equals(codeString)) + return PENDING; + throw new FHIRException("Unknown GoalAcceptanceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AGREE: return "agree"; + case DISAGREE: return "disagree"; + case PENDING: return "pending"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-acceptance-status"; + } + public String getDefinition() { + switch (this) { + case AGREE: return "Stakeholder supports pursuit of the goal"; + case DISAGREE: return "Stakeholder is not in support of the pursuit of the goal"; + case PENDING: return "Stakeholder has not yet made a decision on whether they support the goal"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AGREE: return "Agree"; + case DISAGREE: return "Disagree"; + case PENDING: return "Pending"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatusEnumFactory.java new file mode 100644 index 00000000000..149ac522789 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalAcceptanceStatusEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class GoalAcceptanceStatusEnumFactory implements EnumFactory { + + public GoalAcceptanceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("agree".equals(codeString)) + return GoalAcceptanceStatus.AGREE; + if ("disagree".equals(codeString)) + return GoalAcceptanceStatus.DISAGREE; + if ("pending".equals(codeString)) + return GoalAcceptanceStatus.PENDING; + throw new IllegalArgumentException("Unknown GoalAcceptanceStatus code '"+codeString+"'"); + } + + public String toCode(GoalAcceptanceStatus code) { + if (code == GoalAcceptanceStatus.AGREE) + return "agree"; + if (code == GoalAcceptanceStatus.DISAGREE) + return "disagree"; + if (code == GoalAcceptanceStatus.PENDING) + return "pending"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategory.java new file mode 100644 index 00000000000..31b0f467db2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalCategory { + + /** + * Goals related to the consumption of food and/or beverages. + */ + DIETARY, + /** + * Goals related to the personal protection of the subject. + */ + SAFETY, + /** + * Goals related to the manner in which the subject acts. + */ + BEHAVIORAL, + /** + * Goals related to the practice of nursing or established by nurses. + */ + NURSING, + /** + * Goals related to the mobility and motor capability of the subject. + */ + PHYSIOTHERAPY, + /** + * added to help the parsers + */ + NULL; + public static GoalCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("dietary".equals(codeString)) + return DIETARY; + if ("safety".equals(codeString)) + return SAFETY; + if ("behavioral".equals(codeString)) + return BEHAVIORAL; + if ("nursing".equals(codeString)) + return NURSING; + if ("physiotherapy".equals(codeString)) + return PHYSIOTHERAPY; + throw new FHIRException("Unknown GoalCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIETARY: return "dietary"; + case SAFETY: return "safety"; + case BEHAVIORAL: return "behavioral"; + case NURSING: return "nursing"; + case PHYSIOTHERAPY: return "physiotherapy"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-category"; + } + public String getDefinition() { + switch (this) { + case DIETARY: return "Goals related to the consumption of food and/or beverages."; + case SAFETY: return "Goals related to the personal protection of the subject."; + case BEHAVIORAL: return "Goals related to the manner in which the subject acts."; + case NURSING: return "Goals related to the practice of nursing or established by nurses."; + case PHYSIOTHERAPY: return "Goals related to the mobility and motor capability of the subject."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIETARY: return "dietary"; + case SAFETY: return "safety"; + case BEHAVIORAL: return "behavioral"; + case NURSING: return "nursing"; + case PHYSIOTHERAPY: return "physiotherapy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategoryEnumFactory.java new file mode 100644 index 00000000000..55c18024db2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalCategoryEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class GoalCategoryEnumFactory implements EnumFactory { + + public GoalCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("dietary".equals(codeString)) + return GoalCategory.DIETARY; + if ("safety".equals(codeString)) + return GoalCategory.SAFETY; + if ("behavioral".equals(codeString)) + return GoalCategory.BEHAVIORAL; + if ("nursing".equals(codeString)) + return GoalCategory.NURSING; + if ("physiotherapy".equals(codeString)) + return GoalCategory.PHYSIOTHERAPY; + throw new IllegalArgumentException("Unknown GoalCategory code '"+codeString+"'"); + } + + public String toCode(GoalCategory code) { + if (code == GoalCategory.DIETARY) + return "dietary"; + if (code == GoalCategory.SAFETY) + return "safety"; + if (code == GoalCategory.BEHAVIORAL) + return "behavioral"; + if (code == GoalCategory.NURSING) + return "nursing"; + if (code == GoalCategory.PHYSIOTHERAPY) + return "physiotherapy"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriority.java new file mode 100644 index 00000000000..4d80219872e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalPriority { + + /** + * Indicates that the goal is of considerable importance and should be a primary focus of care delivery. + */ + HIGH, + /** + * Indicates that the goal has a reasonable degree of importance and that concrete action should be taken towards the goal. Attainment is not as critical as high-priority goals. + */ + MEDIUM, + /** + * The goal is desirable but is not sufficiently important to devote significant resources to. Achievement of the goal may be sought when incidental to achieving other goals. + */ + LOW, + /** + * added to help the parsers + */ + NULL; + public static GoalPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return HIGH; + if ("medium".equals(codeString)) + return MEDIUM; + if ("low".equals(codeString)) + return LOW; + throw new FHIRException("Unknown GoalPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HIGH: return "high"; + case MEDIUM: return "medium"; + case LOW: return "low"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-priority"; + } + public String getDefinition() { + switch (this) { + case HIGH: return "Indicates that the goal is of considerable importance and should be a primary focus of care delivery."; + case MEDIUM: return "Indicates that the goal has a reasonable degree of importance and that concrete action should be taken towards the goal. Attainment is not as critical as high-priority goals."; + case LOW: return "The goal is desirable but is not sufficiently important to devote significant resources to. Achievement of the goal may be sought when incidental to achieving other goals."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HIGH: return "high"; + case MEDIUM: return "medium"; + case LOW: return "low"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriorityEnumFactory.java new file mode 100644 index 00000000000..f5dc5d3cef2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalPriorityEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class GoalPriorityEnumFactory implements EnumFactory { + + public GoalPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return GoalPriority.HIGH; + if ("medium".equals(codeString)) + return GoalPriority.MEDIUM; + if ("low".equals(codeString)) + return GoalPriority.LOW; + throw new IllegalArgumentException("Unknown GoalPriority code '"+codeString+"'"); + } + + public String toCode(GoalPriority code) { + if (code == GoalPriority.HIGH) + return "high"; + if (code == GoalPriority.MEDIUM) + return "medium"; + if (code == GoalPriority.LOW) + return "low"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipType.java new file mode 100644 index 00000000000..8b11ed699eb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalRelationshipType { + + /** + * Indicates that the target goal is one which must be met before striving for the current goal + */ + PREDECESSOR, + /** + * Indicates that the target goal is a desired objective once the current goal is met + */ + SUCCESSOR, + /** + * Indicates that this goal has been replaced by the target goal + */ + REPLACEMENT, + /** + * Indicates that the target goal is considered to be a "piece" of attaining this goal. + */ + COMPONENT, + /** + * Indicates that the relationship is not covered by one of the pre-defined codes. (An extension may convey more information about the meaning of the relationship.) + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static GoalRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("predecessor".equals(codeString)) + return PREDECESSOR; + if ("successor".equals(codeString)) + return SUCCESSOR; + if ("replacement".equals(codeString)) + return REPLACEMENT; + if ("component".equals(codeString)) + return COMPONENT; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown GoalRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREDECESSOR: return "predecessor"; + case SUCCESSOR: return "successor"; + case REPLACEMENT: return "replacement"; + case COMPONENT: return "component"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-relationship-type"; + } + public String getDefinition() { + switch (this) { + case PREDECESSOR: return "Indicates that the target goal is one which must be met before striving for the current goal"; + case SUCCESSOR: return "Indicates that the target goal is a desired objective once the current goal is met"; + case REPLACEMENT: return "Indicates that this goal has been replaced by the target goal"; + case COMPONENT: return "Indicates that the target goal is considered to be a \"piece\" of attaining this goal."; + case OTHER: return "Indicates that the relationship is not covered by one of the pre-defined codes. (An extension may convey more information about the meaning of the relationship.)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREDECESSOR: return "Predecessor"; + case SUCCESSOR: return "Successor"; + case REPLACEMENT: return "Replacement"; + case COMPONENT: return "Component"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..038ef40a33c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalRelationshipTypeEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class GoalRelationshipTypeEnumFactory implements EnumFactory { + + public GoalRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("predecessor".equals(codeString)) + return GoalRelationshipType.PREDECESSOR; + if ("successor".equals(codeString)) + return GoalRelationshipType.SUCCESSOR; + if ("replacement".equals(codeString)) + return GoalRelationshipType.REPLACEMENT; + if ("component".equals(codeString)) + return GoalRelationshipType.COMPONENT; + if ("other".equals(codeString)) + return GoalRelationshipType.OTHER; + throw new IllegalArgumentException("Unknown GoalRelationshipType code '"+codeString+"'"); + } + + public String toCode(GoalRelationshipType code) { + if (code == GoalRelationshipType.PREDECESSOR) + return "predecessor"; + if (code == GoalRelationshipType.SUCCESSOR) + return "successor"; + if (code == GoalRelationshipType.REPLACEMENT) + return "replacement"; + if (code == GoalRelationshipType.COMPONENT) + return "component"; + if (code == GoalRelationshipType.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReason.java new file mode 100644 index 00000000000..3c34c94ac11 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReason.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalStatusReason { + + /** + * Goal suspended or ended because of a surgical procedure. + */ + SURGERY, + /** + * Goal suspended or ended because of a significant life event (marital change, bereavement, etc.). + */ + LIFEEVENT, + /** + * Goal has been superseded by a new goal. + */ + REPLACED, + /** + * Patient wishes the goal to be set aside, at least temporarily. + */ + PATIENTREQUEST, + /** + * added to help the parsers + */ + NULL; + public static GoalStatusReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("surgery".equals(codeString)) + return SURGERY; + if ("life-event".equals(codeString)) + return LIFEEVENT; + if ("replaced".equals(codeString)) + return REPLACED; + if ("patient-request".equals(codeString)) + return PATIENTREQUEST; + throw new FHIRException("Unknown GoalStatusReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SURGERY: return "surgery"; + case LIFEEVENT: return "life-event"; + case REPLACED: return "replaced"; + case PATIENTREQUEST: return "patient-request"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-status-reason"; + } + public String getDefinition() { + switch (this) { + case SURGERY: return "Goal suspended or ended because of a surgical procedure."; + case LIFEEVENT: return "Goal suspended or ended because of a significant life event (marital change, bereavement, etc.)."; + case REPLACED: return "Goal has been superseded by a new goal."; + case PATIENTREQUEST: return "Patient wishes the goal to be set aside, at least temporarily."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SURGERY: return "surgery"; + case LIFEEVENT: return "life event"; + case REPLACED: return "replaced"; + case PATIENTREQUEST: return "patient request"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReasonEnumFactory.java new file mode 100644 index 00000000000..916390f2a60 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/GoalStatusReasonEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class GoalStatusReasonEnumFactory implements EnumFactory { + + public GoalStatusReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("surgery".equals(codeString)) + return GoalStatusReason.SURGERY; + if ("life-event".equals(codeString)) + return GoalStatusReason.LIFEEVENT; + if ("replaced".equals(codeString)) + return GoalStatusReason.REPLACED; + if ("patient-request".equals(codeString)) + return GoalStatusReason.PATIENTREQUEST; + throw new IllegalArgumentException("Unknown GoalStatusReason code '"+codeString+"'"); + } + + public String toCode(GoalStatusReason code) { + if (code == GoalStatusReason.SURGERY) + return "surgery"; + if (code == GoalStatusReason.LIFEEVENT) + return "life-event"; + if (code == GoalStatusReason.REPLACED) + return "replaced"; + if (code == GoalStatusReason.PATIENTREQUEST) + return "patient-request"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterion.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterion.java new file mode 100644 index 00000000000..2acfe623df3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterion.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImmunizationRecommendationDateCriterion { + + /** + * Date the next dose is considered due. + */ + DUE, + /** + * At the recommended date. + */ + RECOMMENDED, + /** + * As early as possible. + */ + EARLIEST, + /** + * Date the next dose is considered overdue. + */ + OVERDUE, + /** + * The latest date the next dose is to be given. + */ + LATEST, + /** + * added to help the parsers + */ + NULL; + public static ImmunizationRecommendationDateCriterion fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return DUE; + if ("recommended".equals(codeString)) + return RECOMMENDED; + if ("earliest".equals(codeString)) + return EARLIEST; + if ("overdue".equals(codeString)) + return OVERDUE; + if ("latest".equals(codeString)) + return LATEST; + throw new FHIRException("Unknown ImmunizationRecommendationDateCriterion code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DUE: return "due"; + case RECOMMENDED: return "recommended"; + case EARLIEST: return "earliest"; + case OVERDUE: return "overdue"; + case LATEST: return "latest"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/immunization-recommendation-date-criterion"; + } + public String getDefinition() { + switch (this) { + case DUE: return "Date the next dose is considered due."; + case RECOMMENDED: return "At the recommended date."; + case EARLIEST: return "As early as possible."; + case OVERDUE: return "Date the next dose is considered overdue."; + case LATEST: return "The latest date the next dose is to be given."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DUE: return "Due"; + case RECOMMENDED: return "Recommended"; + case EARLIEST: return "Earliest Date"; + case OVERDUE: return "Past Due Date"; + case LATEST: return "Latest"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterionEnumFactory.java new file mode 100644 index 00000000000..17a096b95ea --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationDateCriterionEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ImmunizationRecommendationDateCriterionEnumFactory implements EnumFactory { + + public ImmunizationRecommendationDateCriterion fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return ImmunizationRecommendationDateCriterion.DUE; + if ("recommended".equals(codeString)) + return ImmunizationRecommendationDateCriterion.RECOMMENDED; + if ("earliest".equals(codeString)) + return ImmunizationRecommendationDateCriterion.EARLIEST; + if ("overdue".equals(codeString)) + return ImmunizationRecommendationDateCriterion.OVERDUE; + if ("latest".equals(codeString)) + return ImmunizationRecommendationDateCriterion.LATEST; + throw new IllegalArgumentException("Unknown ImmunizationRecommendationDateCriterion code '"+codeString+"'"); + } + + public String toCode(ImmunizationRecommendationDateCriterion code) { + if (code == ImmunizationRecommendationDateCriterion.DUE) + return "due"; + if (code == ImmunizationRecommendationDateCriterion.RECOMMENDED) + return "recommended"; + if (code == ImmunizationRecommendationDateCriterion.EARLIEST) + return "earliest"; + if (code == ImmunizationRecommendationDateCriterion.OVERDUE) + return "overdue"; + if (code == ImmunizationRecommendationDateCriterion.LATEST) + return "latest"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatus.java new file mode 100644 index 00000000000..7858752bbb8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImmunizationRecommendationStatus { + + /** + * The patient is due for their next vaccination. + */ + DUE, + /** + * The patient is considered overdue for their next vaccination. + */ + OVERDUE, + /** + * added to help the parsers + */ + NULL; + public static ImmunizationRecommendationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return DUE; + if ("overdue".equals(codeString)) + return OVERDUE; + throw new FHIRException("Unknown ImmunizationRecommendationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DUE: return "due"; + case OVERDUE: return "overdue"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/immunization-recommendation-status"; + } + public String getDefinition() { + switch (this) { + case DUE: return "The patient is due for their next vaccination."; + case OVERDUE: return "The patient is considered overdue for their next vaccination."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DUE: return "Due"; + case OVERDUE: return "Overdue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatusEnumFactory.java new file mode 100644 index 00000000000..60bfa8a1180 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ImmunizationRecommendationStatusEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ImmunizationRecommendationStatusEnumFactory implements EnumFactory { + + public ImmunizationRecommendationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return ImmunizationRecommendationStatus.DUE; + if ("overdue".equals(codeString)) + return ImmunizationRecommendationStatus.OVERDUE; + throw new IllegalArgumentException("Unknown ImmunizationRecommendationStatus code '"+codeString+"'"); + } + + public String toCode(ImmunizationRecommendationStatus code) { + if (code == ImmunizationRecommendationStatus.DUE) + return "due"; + if (code == ImmunizationRecommendationStatus.OVERDUE) + return "overdue"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Intervention.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Intervention.java new file mode 100644 index 00000000000..3c3c70933a4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Intervention.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Intervention { + + /** + * Unknown + */ + UNKNOWN, + /** + * Other + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Intervention fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Intervention code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNKNOWN: return "unknown"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/intervention"; + } + public String getDefinition() { + switch (this) { + case UNKNOWN: return "Unknown"; + case OTHER: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNKNOWN: return "Unknown"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/InterventionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/InterventionEnumFactory.java new file mode 100644 index 00000000000..5ed01ec470e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/InterventionEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class InterventionEnumFactory implements EnumFactory { + + public Intervention fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return Intervention.UNKNOWN; + if ("other".equals(codeString)) + return Intervention.OTHER; + throw new IllegalArgumentException("Unknown Intervention code '"+codeString+"'"); + } + + public String toCode(Intervention code) { + if (code == Intervention.UNKNOWN) + return "unknown"; + if (code == Intervention.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReason.java new file mode 100644 index 00000000000..425f690dddb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReason.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListEmptyReason { + + /** + * Clinical judgment that there are no known items for this list after reasonable investigation. Note that this a positive statement by a clinical user, and not a default position asserted by a computer system in the lack of other information. Example uses: * For allergies: the patient or patient's agent/guardian has asserted that he/she is not aware of any allergies (NKA - nil known allergies) * For medications: the patient or patient's agent/guardian has asserted that the patient is known to be taking no medications * For diagnoses, problems and procedures: the patient or patient's agent/guardian has asserted that there is no known event to record. + */ + NILKNOWN, + /** + * The investigation to find out whether there are items for this list has not occurred. + */ + NOTASKED, + /** + * The content of the list was not provided due to privacy or confidentiality concerns. Note that it should not be assumed that this means that the particular information in question was withheld due to its contents - it can also be a policy decision. + */ + WITHHELD, + /** + * Information to populate this list cannot be obtained; e.g. unconscious patient. + */ + UNAVAILABLE, + /** + * The work to populate this list has not yet begun. + */ + NOTSTARTED, + /** + * This list has now closed or has ceased to be relevant or useful. + */ + CLOSED, + /** + * added to help the parsers + */ + NULL; + public static ListEmptyReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("nilknown".equals(codeString)) + return NILKNOWN; + if ("notasked".equals(codeString)) + return NOTASKED; + if ("withheld".equals(codeString)) + return WITHHELD; + if ("unavailable".equals(codeString)) + return UNAVAILABLE; + if ("notstarted".equals(codeString)) + return NOTSTARTED; + if ("closed".equals(codeString)) + return CLOSED; + throw new FHIRException("Unknown ListEmptyReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NILKNOWN: return "nilknown"; + case NOTASKED: return "notasked"; + case WITHHELD: return "withheld"; + case UNAVAILABLE: return "unavailable"; + case NOTSTARTED: return "notstarted"; + case CLOSED: return "closed"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-empty-reason"; + } + public String getDefinition() { + switch (this) { + case NILKNOWN: return "Clinical judgment that there are no known items for this list after reasonable investigation. Note that this a positive statement by a clinical user, and not a default position asserted by a computer system in the lack of other information. Example uses: * For allergies: the patient or patient's agent/guardian has asserted that he/she is not aware of any allergies (NKA - nil known allergies) * For medications: the patient or patient's agent/guardian has asserted that the patient is known to be taking no medications * For diagnoses, problems and procedures: the patient or patient's agent/guardian has asserted that there is no known event to record."; + case NOTASKED: return "The investigation to find out whether there are items for this list has not occurred."; + case WITHHELD: return "The content of the list was not provided due to privacy or confidentiality concerns. Note that it should not be assumed that this means that the particular information in question was withheld due to its contents - it can also be a policy decision."; + case UNAVAILABLE: return "Information to populate this list cannot be obtained; e.g. unconscious patient."; + case NOTSTARTED: return "The work to populate this list has not yet begun."; + case CLOSED: return "This list has now closed or has ceased to be relevant or useful."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NILKNOWN: return "Nil Known"; + case NOTASKED: return "Not Asked"; + case WITHHELD: return "Information Withheld"; + case UNAVAILABLE: return "Unavailable"; + case NOTSTARTED: return "Not Started"; + case CLOSED: return "Closed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReasonEnumFactory.java new file mode 100644 index 00000000000..aaf9869aa29 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListEmptyReasonEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ListEmptyReasonEnumFactory implements EnumFactory { + + public ListEmptyReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("nilknown".equals(codeString)) + return ListEmptyReason.NILKNOWN; + if ("notasked".equals(codeString)) + return ListEmptyReason.NOTASKED; + if ("withheld".equals(codeString)) + return ListEmptyReason.WITHHELD; + if ("unavailable".equals(codeString)) + return ListEmptyReason.UNAVAILABLE; + if ("notstarted".equals(codeString)) + return ListEmptyReason.NOTSTARTED; + if ("closed".equals(codeString)) + return ListEmptyReason.CLOSED; + throw new IllegalArgumentException("Unknown ListEmptyReason code '"+codeString+"'"); + } + + public String toCode(ListEmptyReason code) { + if (code == ListEmptyReason.NILKNOWN) + return "nilknown"; + if (code == ListEmptyReason.NOTASKED) + return "notasked"; + if (code == ListEmptyReason.WITHHELD) + return "withheld"; + if (code == ListEmptyReason.UNAVAILABLE) + return "unavailable"; + if (code == ListEmptyReason.NOTSTARTED) + return "notstarted"; + if (code == ListEmptyReason.CLOSED) + return "closed"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodes.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodes.java new file mode 100644 index 00000000000..61b0fba6107 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodes.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListExampleCodes { + + /** + * A list of alerts for the patient. + */ + ALERTS, + /** + * A list of part adverse reactions. + */ + ADVERSERXNS, + /** + * A list of Allergies for the patient. + */ + ALLERGIES, + /** + * A list of medication statements for the patient. + */ + MEDICATIONS, + /** + * A list of problems that the patient is known of have (or have had in the past). + */ + PROBLEMS, + /** + * A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list). + */ + WORKLIST, + /** + * A list of items waiting for an event (perhaps a surgical patient waiting list). + */ + WAITING, + /** + * A set of protocols to be followed. + */ + PROTOCOLS, + /** + * A set of care plans that apply in a particular context of care. + */ + PLANS, + /** + * added to help the parsers + */ + NULL; + public static ListExampleCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alerts".equals(codeString)) + return ALERTS; + if ("adverserxns".equals(codeString)) + return ADVERSERXNS; + if ("allergies".equals(codeString)) + return ALLERGIES; + if ("medications".equals(codeString)) + return MEDICATIONS; + if ("problems".equals(codeString)) + return PROBLEMS; + if ("worklist".equals(codeString)) + return WORKLIST; + if ("waiting".equals(codeString)) + return WAITING; + if ("protocols".equals(codeString)) + return PROTOCOLS; + if ("plans".equals(codeString)) + return PLANS; + throw new FHIRException("Unknown ListExampleCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALERTS: return "alerts"; + case ADVERSERXNS: return "adverserxns"; + case ALLERGIES: return "allergies"; + case MEDICATIONS: return "medications"; + case PROBLEMS: return "problems"; + case WORKLIST: return "worklist"; + case WAITING: return "waiting"; + case PROTOCOLS: return "protocols"; + case PLANS: return "plans"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-example-use-codes"; + } + public String getDefinition() { + switch (this) { + case ALERTS: return "A list of alerts for the patient."; + case ADVERSERXNS: return "A list of part adverse reactions."; + case ALLERGIES: return "A list of Allergies for the patient."; + case MEDICATIONS: return "A list of medication statements for the patient."; + case PROBLEMS: return "A list of problems that the patient is known of have (or have had in the past)."; + case WORKLIST: return "A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list)."; + case WAITING: return "A list of items waiting for an event (perhaps a surgical patient waiting list)."; + case PROTOCOLS: return "A set of protocols to be followed."; + case PLANS: return "A set of care plans that apply in a particular context of care."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALERTS: return "Alerts"; + case ADVERSERXNS: return "Adverse Reactions"; + case ALLERGIES: return "Allergies"; + case MEDICATIONS: return "Medication List"; + case PROBLEMS: return "Problem List"; + case WORKLIST: return "Worklist"; + case WAITING: return "Waiting List"; + case PROTOCOLS: return "Protocols"; + case PLANS: return "Care Plans"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodesEnumFactory.java new file mode 100644 index 00000000000..31f10bf9634 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListExampleCodesEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ListExampleCodesEnumFactory implements EnumFactory { + + public ListExampleCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alerts".equals(codeString)) + return ListExampleCodes.ALERTS; + if ("adverserxns".equals(codeString)) + return ListExampleCodes.ADVERSERXNS; + if ("allergies".equals(codeString)) + return ListExampleCodes.ALLERGIES; + if ("medications".equals(codeString)) + return ListExampleCodes.MEDICATIONS; + if ("problems".equals(codeString)) + return ListExampleCodes.PROBLEMS; + if ("worklist".equals(codeString)) + return ListExampleCodes.WORKLIST; + if ("waiting".equals(codeString)) + return ListExampleCodes.WAITING; + if ("protocols".equals(codeString)) + return ListExampleCodes.PROTOCOLS; + if ("plans".equals(codeString)) + return ListExampleCodes.PLANS; + throw new IllegalArgumentException("Unknown ListExampleCodes code '"+codeString+"'"); + } + + public String toCode(ListExampleCodes code) { + if (code == ListExampleCodes.ALERTS) + return "alerts"; + if (code == ListExampleCodes.ADVERSERXNS) + return "adverserxns"; + if (code == ListExampleCodes.ALLERGIES) + return "allergies"; + if (code == ListExampleCodes.MEDICATIONS) + return "medications"; + if (code == ListExampleCodes.PROBLEMS) + return "problems"; + if (code == ListExampleCodes.WORKLIST) + return "worklist"; + if (code == ListExampleCodes.WAITING) + return "waiting"; + if (code == ListExampleCodes.PROTOCOLS) + return "protocols"; + if (code == ListExampleCodes.PLANS) + return "plans"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlag.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlag.java new file mode 100644 index 00000000000..03f444e16e1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlag.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListItemFlag { + + /** + * No change has been made to the status of this medicine item. + */ + _01, + /** + * The medicine item has changed. The change may be described in an extension (not defined yet) + */ + _02, + /** + * The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition. + */ + _03, + /** + * A new medicine item has been prescribed + */ + _04, + /** + * Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines. + */ + _05, + /** + * Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures. + */ + _06, + /** + * added to help the parsers + */ + NULL; + public static ListItemFlag fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return _01; + if ("02".equals(codeString)) + return _02; + if ("03".equals(codeString)) + return _03; + if ("04".equals(codeString)) + return _04; + if ("05".equals(codeString)) + return _05; + if ("06".equals(codeString)) + return _06; + throw new FHIRException("Unknown ListItemFlag code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _01: return "01"; + case _02: return "02"; + case _03: return "03"; + case _04: return "04"; + case _05: return "05"; + case _06: return "06"; + default: return "?"; + } + } + public String getSystem() { + return "urn:oid:1.2.36.1.2001.1001.101.104.16592"; + } + public String getDefinition() { + switch (this) { + case _01: return "No change has been made to the status of this medicine item."; + case _02: return "The medicine item has changed. The change may be described in an extension (not defined yet)"; + case _03: return "The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition."; + case _04: return "A new medicine item has been prescribed"; + case _05: return "Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines."; + case _06: return "Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _01: return "Unchanged"; + case _02: return "Changed"; + case _03: return "Cancelled"; + case _04: return "Prescribed"; + case _05: return "Ceased"; + case _06: return "Suspended"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlagEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlagEnumFactory.java new file mode 100644 index 00000000000..c3c1dee2906 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListItemFlagEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ListItemFlagEnumFactory implements EnumFactory { + + public ListItemFlag fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return ListItemFlag._01; + if ("02".equals(codeString)) + return ListItemFlag._02; + if ("03".equals(codeString)) + return ListItemFlag._03; + if ("04".equals(codeString)) + return ListItemFlag._04; + if ("05".equals(codeString)) + return ListItemFlag._05; + if ("06".equals(codeString)) + return ListItemFlag._06; + throw new IllegalArgumentException("Unknown ListItemFlag code '"+codeString+"'"); + } + + public String toCode(ListItemFlag code) { + if (code == ListItemFlag._01) + return "01"; + if (code == ListItemFlag._02) + return "02"; + if (code == ListItemFlag._03) + return "03"; + if (code == ListItemFlag._04) + return "04"; + if (code == ListItemFlag._05) + return "05"; + if (code == ListItemFlag._06) + return "06"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrder.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrder.java new file mode 100644 index 00000000000..5a0b57f1eae --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrder.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListOrder { + + /** + * The list was sorted by a user. The criteria the user used are not specified. + */ + USER, + /** + * The list was sorted by the system. The criteria the user used are not specified; define additional codes to specify a particular order (or use other defined codes). + */ + SYSTEM, + /** + * The list is sorted by the data of the event. This can be used when the list has items which are dates with past or future events. + */ + EVENTDATE, + /** + * The list is sorted by the date the item was added to the list. Note that the date added to the list is not explicit in the list itself. + */ + ENTRYDATE, + /** + * The list is sorted by priority. The exact method in which priority has been determined is not specified. + */ + PRIORITY, + /** + * The list is sorted alphabetically by an unspecified property of the items in the list. + */ + ALPHABETIC, + /** + * The list is sorted categorically by an unspecified property of the items in the list. + */ + CATEGORY, + /** + * The list is sorted by patient, with items for each patient grouped together. + */ + PATIENT, + /** + * added to help the parsers + */ + NULL; + public static ListOrder fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("user".equals(codeString)) + return USER; + if ("system".equals(codeString)) + return SYSTEM; + if ("event-date".equals(codeString)) + return EVENTDATE; + if ("entry-date".equals(codeString)) + return ENTRYDATE; + if ("priority".equals(codeString)) + return PRIORITY; + if ("alphabetic".equals(codeString)) + return ALPHABETIC; + if ("category".equals(codeString)) + return CATEGORY; + if ("patient".equals(codeString)) + return PATIENT; + throw new FHIRException("Unknown ListOrder code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USER: return "user"; + case SYSTEM: return "system"; + case EVENTDATE: return "event-date"; + case ENTRYDATE: return "entry-date"; + case PRIORITY: return "priority"; + case ALPHABETIC: return "alphabetic"; + case CATEGORY: return "category"; + case PATIENT: return "patient"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-order"; + } + public String getDefinition() { + switch (this) { + case USER: return "The list was sorted by a user. The criteria the user used are not specified."; + case SYSTEM: return "The list was sorted by the system. The criteria the user used are not specified; define additional codes to specify a particular order (or use other defined codes)."; + case EVENTDATE: return "The list is sorted by the data of the event. This can be used when the list has items which are dates with past or future events."; + case ENTRYDATE: return "The list is sorted by the date the item was added to the list. Note that the date added to the list is not explicit in the list itself."; + case PRIORITY: return "The list is sorted by priority. The exact method in which priority has been determined is not specified."; + case ALPHABETIC: return "The list is sorted alphabetically by an unspecified property of the items in the list."; + case CATEGORY: return "The list is sorted categorically by an unspecified property of the items in the list."; + case PATIENT: return "The list is sorted by patient, with items for each patient grouped together."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USER: return "Sorted by User"; + case SYSTEM: return "Sorted by System"; + case EVENTDATE: return "Sorted by Event Date"; + case ENTRYDATE: return "Sorted by Item Date"; + case PRIORITY: return "Sorted by Priority"; + case ALPHABETIC: return "Sorted Alphabetically"; + case CATEGORY: return "Sorted by Category"; + case PATIENT: return "Sorted by Patient"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrderEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrderEnumFactory.java new file mode 100644 index 00000000000..299521cf94c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ListOrderEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ListOrderEnumFactory implements EnumFactory { + + public ListOrder fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("user".equals(codeString)) + return ListOrder.USER; + if ("system".equals(codeString)) + return ListOrder.SYSTEM; + if ("event-date".equals(codeString)) + return ListOrder.EVENTDATE; + if ("entry-date".equals(codeString)) + return ListOrder.ENTRYDATE; + if ("priority".equals(codeString)) + return ListOrder.PRIORITY; + if ("alphabetic".equals(codeString)) + return ListOrder.ALPHABETIC; + if ("category".equals(codeString)) + return ListOrder.CATEGORY; + if ("patient".equals(codeString)) + return ListOrder.PATIENT; + throw new IllegalArgumentException("Unknown ListOrder code '"+codeString+"'"); + } + + public String toCode(ListOrder code) { + if (code == ListOrder.USER) + return "user"; + if (code == ListOrder.SYSTEM) + return "system"; + if (code == ListOrder.EVENTDATE) + return "event-date"; + if (code == ListOrder.ENTRYDATE) + return "entry-date"; + if (code == ListOrder.PRIORITY) + return "priority"; + if (code == ListOrder.ALPHABETIC) + return "alphabetic"; + if (code == ListOrder.CATEGORY) + return "category"; + if (code == ListOrder.PATIENT) + return "patient"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalType.java new file mode 100644 index 00000000000..d4f56206173 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalType.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LocationPhysicalType { + + /** + * Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space. + */ + BU, + /** + * A Wing within a Building, this often contains levels, rooms and corridors. + */ + WI, + /** + * A Level in a multi-level Building/Structure. + */ + LVL, + /** + * Any corridor within a Building, that is not within. + */ + CO, + /** + * A space that is allocated as a room, it may have walls/roof etc., but does not require these. + */ + RO, + /** + * A space that is allocated for sleeping/laying on. + */ + BD, + /** + * A means of transportation. + */ + VE, + /** + * A residential dwelling. Usually used to reference a location that a person/patient may reside. + */ + HO, + /** + * A container that can store goods, equipment, medications or other items. + */ + CA, + /** + * A defined path to travel between 2 points that has a known name. + */ + RD, + /** + * A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health), Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy). + */ + JDN, + /** + * A defined boundary, such as a state, region, country, county + */ + AREA, + /** + * added to help the parsers + */ + NULL; + public static LocationPhysicalType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("bu".equals(codeString)) + return BU; + if ("wi".equals(codeString)) + return WI; + if ("lvl".equals(codeString)) + return LVL; + if ("co".equals(codeString)) + return CO; + if ("ro".equals(codeString)) + return RO; + if ("bd".equals(codeString)) + return BD; + if ("ve".equals(codeString)) + return VE; + if ("ho".equals(codeString)) + return HO; + if ("ca".equals(codeString)) + return CA; + if ("rd".equals(codeString)) + return RD; + if ("jdn".equals(codeString)) + return JDN; + if ("area".equals(codeString)) + return AREA; + throw new FHIRException("Unknown LocationPhysicalType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BU: return "bu"; + case WI: return "wi"; + case LVL: return "lvl"; + case CO: return "co"; + case RO: return "ro"; + case BD: return "bd"; + case VE: return "ve"; + case HO: return "ho"; + case CA: return "ca"; + case RD: return "rd"; + case JDN: return "jdn"; + case AREA: return "area"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/location-physical-type"; + } + public String getDefinition() { + switch (this) { + case BU: return "Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space."; + case WI: return "A Wing within a Building, this often contains levels, rooms and corridors."; + case LVL: return "A Level in a multi-level Building/Structure."; + case CO: return "Any corridor within a Building, that is not within."; + case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these."; + case BD: return "A space that is allocated for sleeping/laying on."; + case VE: return "A means of transportation."; + case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside."; + case CA: return "A container that can store goods, equipment, medications or other items."; + case RD: return "A defined path to travel between 2 points that has a known name."; + case JDN: return "A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health), Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy)."; + case AREA: return "A defined boundary, such as a state, region, country, county"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BU: return "Building"; + case WI: return "Wing"; + case LVL: return "Level"; + case CO: return "Corridor"; + case RO: return "Room"; + case BD: return "Bed"; + case VE: return "Vehicle"; + case HO: return "House"; + case CA: return "Cabinet"; + case RD: return "Road"; + case JDN: return "Jurisdiction"; + case AREA: return "Area"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalTypeEnumFactory.java new file mode 100644 index 00000000000..8b2a62235d1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/LocationPhysicalTypeEnumFactory.java @@ -0,0 +1,99 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class LocationPhysicalTypeEnumFactory implements EnumFactory { + + public LocationPhysicalType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("bu".equals(codeString)) + return LocationPhysicalType.BU; + if ("wi".equals(codeString)) + return LocationPhysicalType.WI; + if ("lvl".equals(codeString)) + return LocationPhysicalType.LVL; + if ("co".equals(codeString)) + return LocationPhysicalType.CO; + if ("ro".equals(codeString)) + return LocationPhysicalType.RO; + if ("bd".equals(codeString)) + return LocationPhysicalType.BD; + if ("ve".equals(codeString)) + return LocationPhysicalType.VE; + if ("ho".equals(codeString)) + return LocationPhysicalType.HO; + if ("ca".equals(codeString)) + return LocationPhysicalType.CA; + if ("rd".equals(codeString)) + return LocationPhysicalType.RD; + if ("jdn".equals(codeString)) + return LocationPhysicalType.JDN; + if ("area".equals(codeString)) + return LocationPhysicalType.AREA; + throw new IllegalArgumentException("Unknown LocationPhysicalType code '"+codeString+"'"); + } + + public String toCode(LocationPhysicalType code) { + if (code == LocationPhysicalType.BU) + return "bu"; + if (code == LocationPhysicalType.WI) + return "wi"; + if (code == LocationPhysicalType.LVL) + return "lvl"; + if (code == LocationPhysicalType.CO) + return "co"; + if (code == LocationPhysicalType.RO) + return "ro"; + if (code == LocationPhysicalType.BD) + return "bd"; + if (code == LocationPhysicalType.VE) + return "ve"; + if (code == LocationPhysicalType.HO) + return "ho"; + if (code == LocationPhysicalType.CA) + return "ca"; + if (code == LocationPhysicalType.RD) + return "rd"; + if (code == LocationPhysicalType.JDN) + return "jdn"; + if (code == LocationPhysicalType.AREA) + return "area"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounter.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounter.java new file mode 100644 index 00000000000..9f3b0fc9da0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounter.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageReasonEncounter { + + /** + * The patient has been admitted. + */ + ADMIT, + /** + * The patient has been discharged. + */ + DISCHARGE, + /** + * The patient has temporarily left the institution. + */ + ABSENT, + /** + * The patient has returned from a temporary absence. + */ + RETURN, + /** + * The patient has been moved to a new location. + */ + MOVED, + /** + * Encounter details have been updated (e.g. to correct a coding error). + */ + EDIT, + /** + * added to help the parsers + */ + NULL; + public static MessageReasonEncounter fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admit".equals(codeString)) + return ADMIT; + if ("discharge".equals(codeString)) + return DISCHARGE; + if ("absent".equals(codeString)) + return ABSENT; + if ("return".equals(codeString)) + return RETURN; + if ("moved".equals(codeString)) + return MOVED; + if ("edit".equals(codeString)) + return EDIT; + throw new FHIRException("Unknown MessageReasonEncounter code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADMIT: return "admit"; + case DISCHARGE: return "discharge"; + case ABSENT: return "absent"; + case RETURN: return "return"; + case MOVED: return "moved"; + case EDIT: return "edit"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-reasons-encounter"; + } + public String getDefinition() { + switch (this) { + case ADMIT: return "The patient has been admitted."; + case DISCHARGE: return "The patient has been discharged."; + case ABSENT: return "The patient has temporarily left the institution."; + case RETURN: return "The patient has returned from a temporary absence."; + case MOVED: return "The patient has been moved to a new location."; + case EDIT: return "Encounter details have been updated (e.g. to correct a coding error)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADMIT: return "Admit"; + case DISCHARGE: return "Discharge"; + case ABSENT: return "Absent"; + case RETURN: return "Returned"; + case MOVED: return "Moved"; + case EDIT: return "Edit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounterEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounterEnumFactory.java new file mode 100644 index 00000000000..f3761b584aa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageReasonEncounterEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class MessageReasonEncounterEnumFactory implements EnumFactory { + + public MessageReasonEncounter fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admit".equals(codeString)) + return MessageReasonEncounter.ADMIT; + if ("discharge".equals(codeString)) + return MessageReasonEncounter.DISCHARGE; + if ("absent".equals(codeString)) + return MessageReasonEncounter.ABSENT; + if ("return".equals(codeString)) + return MessageReasonEncounter.RETURN; + if ("moved".equals(codeString)) + return MessageReasonEncounter.MOVED; + if ("edit".equals(codeString)) + return MessageReasonEncounter.EDIT; + throw new IllegalArgumentException("Unknown MessageReasonEncounter code '"+codeString+"'"); + } + + public String toCode(MessageReasonEncounter code) { + if (code == MessageReasonEncounter.ADMIT) + return "admit"; + if (code == MessageReasonEncounter.DISCHARGE) + return "discharge"; + if (code == MessageReasonEncounter.ABSENT) + return "absent"; + if (code == MessageReasonEncounter.RETURN) + return "return"; + if (code == MessageReasonEncounter.MOVED) + return "moved"; + if (code == MessageReasonEncounter.EDIT) + return "edit"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransport.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransport.java new file mode 100644 index 00000000000..0df4e622459 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransport.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageTransport { + + /** + * The application sends or receives messages using HTTP POST (may be over http: or https:). + */ + HTTP, + /** + * The application sends or receives messages using File Transfer Protocol. + */ + FTP, + /** + * The application sends or receives messages using HL7's Minimal Lower Level Protocol. + */ + MLLP, + /** + * added to help the parsers + */ + NULL; + public static MessageTransport fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("http".equals(codeString)) + return HTTP; + if ("ftp".equals(codeString)) + return FTP; + if ("mllp".equals(codeString)) + return MLLP; + throw new FHIRException("Unknown MessageTransport code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HTTP: return "http"; + case FTP: return "ftp"; + case MLLP: return "mllp"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-transport"; + } + public String getDefinition() { + switch (this) { + case HTTP: return "The application sends or receives messages using HTTP POST (may be over http: or https:)."; + case FTP: return "The application sends or receives messages using File Transfer Protocol."; + case MLLP: return "The application sends or receives messages using HL7's Minimal Lower Level Protocol."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HTTP: return "HTTP"; + case FTP: return "FTP"; + case MLLP: return "MLLP"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransportEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransportEnumFactory.java new file mode 100644 index 00000000000..ae090b92e69 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MessageTransportEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class MessageTransportEnumFactory implements EnumFactory { + + public MessageTransport fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("http".equals(codeString)) + return MessageTransport.HTTP; + if ("ftp".equals(codeString)) + return MessageTransport.FTP; + if ("mllp".equals(codeString)) + return MessageTransport.MLLP; + throw new IllegalArgumentException("Unknown MessageTransport code '"+codeString+"'"); + } + + public String toCode(MessageTransport code) { + if (code == MessageTransport.HTTP) + return "http"; + if (code == MessageTransport.FTP) + return "ftp"; + if (code == MessageTransport.MLLP) + return "mllp"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReason.java new file mode 100644 index 00000000000..2171eece4b6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReason.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MissingToothReason { + + /** + * Extraction + */ + E, + /** + * Congenital + */ + C, + /** + * Unknown + */ + U, + /** + * Other + */ + O, + /** + * added to help the parsers + */ + NULL; + public static MissingToothReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("C".equals(codeString)) + return C; + if ("U".equals(codeString)) + return U; + if ("O".equals(codeString)) + return O; + throw new FHIRException("Unknown MissingToothReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case C: return "C"; + case U: return "U"; + case O: return "O"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/missingtoothreason"; + } + public String getDefinition() { + switch (this) { + case E: return "Extraction"; + case C: return "Congenital"; + case U: return "Unknown"; + case O: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "E"; + case C: return "C"; + case U: return "U"; + case O: return "O"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReasonEnumFactory.java new file mode 100644 index 00000000000..8499fae4c87 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/MissingToothReasonEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class MissingToothReasonEnumFactory implements EnumFactory { + + public MissingToothReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return MissingToothReason.E; + if ("C".equals(codeString)) + return MissingToothReason.C; + if ("U".equals(codeString)) + return MissingToothReason.U; + if ("O".equals(codeString)) + return MissingToothReason.O; + throw new IllegalArgumentException("Unknown MissingToothReason code '"+codeString+"'"); + } + + public String toCode(MissingToothReason code) { + if (code == MissingToothReason.E) + return "E"; + if (code == MissingToothReason.C) + return "C"; + if (code == MissingToothReason.U) + return "U"; + if (code == MissingToothReason.O) + return "O"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycle.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycle.java new file mode 100644 index 00000000000..0cf3db4bb30 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycle.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObjectLifecycle { + + /** + * Origination / Creation + */ + _1, + /** + * Import / Copy from original + */ + _2, + /** + * Amendment + */ + _3, + /** + * Verification + */ + _4, + /** + * Translation + */ + _5, + /** + * Access / Use + */ + _6, + /** + * De-identification + */ + _7, + /** + * Aggregation, summarization, derivation + */ + _8, + /** + * Report + */ + _9, + /** + * Export / Copy to target + */ + _10, + /** + * Disclosure + */ + _11, + /** + * Receipt of disclosure + */ + _12, + /** + * Archiving + */ + _13, + /** + * Logical deletion + */ + _14, + /** + * Permanent erasure / Physical destruction + */ + _15, + /** + * added to help the parsers + */ + NULL; + public static ObjectLifecycle fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + throw new FHIRException("Unknown ObjectLifecycle code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/object-lifecycle"; + } + public String getDefinition() { + switch (this) { + case _1: return "Origination / Creation"; + case _2: return "Import / Copy from original"; + case _3: return "Amendment"; + case _4: return "Verification"; + case _5: return "Translation"; + case _6: return "Access / Use"; + case _7: return "De-identification"; + case _8: return "Aggregation, summarization, derivation"; + case _9: return "Report"; + case _10: return "Export / Copy to target"; + case _11: return "Disclosure"; + case _12: return "Receipt of disclosure"; + case _13: return "Archiving"; + case _14: return "Logical deletion"; + case _15: return "Permanent erasure / Physical destruction"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Origination / Creation"; + case _2: return "Import / Copy from original"; + case _3: return "Amendment"; + case _4: return "Verification"; + case _5: return "Translation"; + case _6: return "Access / Use"; + case _7: return "De-identification"; + case _8: return "Aggregation, summarization, derivation"; + case _9: return "Report"; + case _10: return "Export / Copy to target"; + case _11: return "Disclosure"; + case _12: return "Receipt of disclosure"; + case _13: return "Archiving"; + case _14: return "Logical deletion"; + case _15: return "Permanent erasure / Physical destruction"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycleEnumFactory.java new file mode 100644 index 00000000000..e031aadb1fd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectLifecycleEnumFactory.java @@ -0,0 +1,111 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ObjectLifecycleEnumFactory implements EnumFactory { + + public ObjectLifecycle fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ObjectLifecycle._1; + if ("2".equals(codeString)) + return ObjectLifecycle._2; + if ("3".equals(codeString)) + return ObjectLifecycle._3; + if ("4".equals(codeString)) + return ObjectLifecycle._4; + if ("5".equals(codeString)) + return ObjectLifecycle._5; + if ("6".equals(codeString)) + return ObjectLifecycle._6; + if ("7".equals(codeString)) + return ObjectLifecycle._7; + if ("8".equals(codeString)) + return ObjectLifecycle._8; + if ("9".equals(codeString)) + return ObjectLifecycle._9; + if ("10".equals(codeString)) + return ObjectLifecycle._10; + if ("11".equals(codeString)) + return ObjectLifecycle._11; + if ("12".equals(codeString)) + return ObjectLifecycle._12; + if ("13".equals(codeString)) + return ObjectLifecycle._13; + if ("14".equals(codeString)) + return ObjectLifecycle._14; + if ("15".equals(codeString)) + return ObjectLifecycle._15; + throw new IllegalArgumentException("Unknown ObjectLifecycle code '"+codeString+"'"); + } + + public String toCode(ObjectLifecycle code) { + if (code == ObjectLifecycle._1) + return "1"; + if (code == ObjectLifecycle._2) + return "2"; + if (code == ObjectLifecycle._3) + return "3"; + if (code == ObjectLifecycle._4) + return "4"; + if (code == ObjectLifecycle._5) + return "5"; + if (code == ObjectLifecycle._6) + return "6"; + if (code == ObjectLifecycle._7) + return "7"; + if (code == ObjectLifecycle._8) + return "8"; + if (code == ObjectLifecycle._9) + return "9"; + if (code == ObjectLifecycle._10) + return "10"; + if (code == ObjectLifecycle._11) + return "11"; + if (code == ObjectLifecycle._12) + return "12"; + if (code == ObjectLifecycle._13) + return "13"; + if (code == ObjectLifecycle._14) + return "14"; + if (code == ObjectLifecycle._15) + return "15"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRole.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRole.java new file mode 100644 index 00000000000..c2a3dd052fa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRole.java @@ -0,0 +1,285 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObjectRole { + + /** + * This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal. + */ + _1, + /** + * This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location. + */ + _2, + /** + * This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere. + */ + _3, + /** + * A logical object related to a health record event. This is any healthcare specific resource (object) not restricted to FHIR defined Resources. + */ + _4, + /** + * This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc. + */ + _5, + /** + * A human participant not otherwise identified by some other category. + */ + _6, + /** + * (deprecated) + */ + _7, + /** + * Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work. + */ + _8, + /** + * A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place. + */ + _9, + /** + * Insurance company, or any other organization who accepts responsibility for paying for the healthcare event. + */ + _10, + /** + * A person or active system object involved in the event with a security role. + */ + _11, + /** + * A person or system object involved in the event with the authority to modify security roles of other objects. + */ + _12, + /** + * A passive object, such as a role table, that is relevant to the event. + */ + _13, + /** + * (deprecated) Relevant to certain RBAC security methodologies. + */ + _14, + /** + * Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note, the distinction between practitioners and the doctor that actually provided the care to the patient. + */ + _15, + /** + * The source or destination for data transfer, when it does not match some other role. + */ + _16, + /** + * A source or destination for data transfer that acts as an archive, database, or similar role. + */ + _17, + /** + * An object that holds schedule information. This could be an appointment book, availability information, etc. + */ + _18, + /** + * An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal. + */ + _19, + /** + * An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS. + */ + _20, + /** + * A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP. + */ + _21, + /** + * (Deprecated) + */ + _22, + /** + * An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects. + */ + _23, + /** + * The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important. + */ + _24, + /** + * added to help the parsers + */ + NULL; + public static ObjectRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + throw new FHIRException("Unknown ObjectRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/object-role"; + } + public String getDefinition() { + switch (this) { + case _1: return "This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal."; + case _2: return "This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location."; + case _3: return "This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere."; + case _4: return "A logical object related to a health record event. This is any healthcare specific resource (object) not restricted to FHIR defined Resources."; + case _5: return "This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc."; + case _6: return "A human participant not otherwise identified by some other category."; + case _7: return "(deprecated)"; + case _8: return "Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work."; + case _9: return "A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place."; + case _10: return "Insurance company, or any other organization who accepts responsibility for paying for the healthcare event."; + case _11: return "A person or active system object involved in the event with a security role."; + case _12: return "A person or system object involved in the event with the authority to modify security roles of other objects."; + case _13: return "A passive object, such as a role table, that is relevant to the event."; + case _14: return "(deprecated) Relevant to certain RBAC security methodologies."; + case _15: return "Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note, the distinction between practitioners and the doctor that actually provided the care to the patient."; + case _16: return "The source or destination for data transfer, when it does not match some other role."; + case _17: return "A source or destination for data transfer that acts as an archive, database, or similar role."; + case _18: return "An object that holds schedule information. This could be an appointment book, availability information, etc."; + case _19: return "An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal."; + case _20: return "An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS."; + case _21: return "A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP."; + case _22: return "(Deprecated)"; + case _23: return "An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects."; + case _24: return "The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Patient"; + case _2: return "Location"; + case _3: return "Report"; + case _4: return "Domain Resource"; + case _5: return "Master file"; + case _6: return "User"; + case _7: return "List"; + case _8: return "Doctor"; + case _9: return "Subscriber"; + case _10: return "Guarantor"; + case _11: return "Security User Entity"; + case _12: return "Security User Group"; + case _13: return "Security Resource"; + case _14: return "Security Granularity Definition"; + case _15: return "Practitioner"; + case _16: return "Data Destination"; + case _17: return "Data Repository"; + case _18: return "Schedule"; + case _19: return "Customer"; + case _20: return "Job"; + case _21: return "Job Stream"; + case _22: return "Table"; + case _23: return "Routing Criteria"; + case _24: return "Query"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRoleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRoleEnumFactory.java new file mode 100644 index 00000000000..c791536435a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectRoleEnumFactory.java @@ -0,0 +1,147 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ObjectRoleEnumFactory implements EnumFactory { + + public ObjectRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ObjectRole._1; + if ("2".equals(codeString)) + return ObjectRole._2; + if ("3".equals(codeString)) + return ObjectRole._3; + if ("4".equals(codeString)) + return ObjectRole._4; + if ("5".equals(codeString)) + return ObjectRole._5; + if ("6".equals(codeString)) + return ObjectRole._6; + if ("7".equals(codeString)) + return ObjectRole._7; + if ("8".equals(codeString)) + return ObjectRole._8; + if ("9".equals(codeString)) + return ObjectRole._9; + if ("10".equals(codeString)) + return ObjectRole._10; + if ("11".equals(codeString)) + return ObjectRole._11; + if ("12".equals(codeString)) + return ObjectRole._12; + if ("13".equals(codeString)) + return ObjectRole._13; + if ("14".equals(codeString)) + return ObjectRole._14; + if ("15".equals(codeString)) + return ObjectRole._15; + if ("16".equals(codeString)) + return ObjectRole._16; + if ("17".equals(codeString)) + return ObjectRole._17; + if ("18".equals(codeString)) + return ObjectRole._18; + if ("19".equals(codeString)) + return ObjectRole._19; + if ("20".equals(codeString)) + return ObjectRole._20; + if ("21".equals(codeString)) + return ObjectRole._21; + if ("22".equals(codeString)) + return ObjectRole._22; + if ("23".equals(codeString)) + return ObjectRole._23; + if ("24".equals(codeString)) + return ObjectRole._24; + throw new IllegalArgumentException("Unknown ObjectRole code '"+codeString+"'"); + } + + public String toCode(ObjectRole code) { + if (code == ObjectRole._1) + return "1"; + if (code == ObjectRole._2) + return "2"; + if (code == ObjectRole._3) + return "3"; + if (code == ObjectRole._4) + return "4"; + if (code == ObjectRole._5) + return "5"; + if (code == ObjectRole._6) + return "6"; + if (code == ObjectRole._7) + return "7"; + if (code == ObjectRole._8) + return "8"; + if (code == ObjectRole._9) + return "9"; + if (code == ObjectRole._10) + return "10"; + if (code == ObjectRole._11) + return "11"; + if (code == ObjectRole._12) + return "12"; + if (code == ObjectRole._13) + return "13"; + if (code == ObjectRole._14) + return "14"; + if (code == ObjectRole._15) + return "15"; + if (code == ObjectRole._16) + return "16"; + if (code == ObjectRole._17) + return "17"; + if (code == ObjectRole._18) + return "18"; + if (code == ObjectRole._19) + return "19"; + if (code == ObjectRole._20) + return "20"; + if (code == ObjectRole._21) + return "21"; + if (code == ObjectRole._22) + return "22"; + if (code == ObjectRole._23) + return "23"; + if (code == ObjectRole._24) + return "24"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectType.java new file mode 100644 index 00000000000..46371654e9a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObjectType { + + /** + * Person + */ + _1, + /** + * System Object + */ + _2, + /** + * Organization + */ + _3, + /** + * Other + */ + _4, + /** + * added to help the parsers + */ + NULL; + public static ObjectType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + throw new FHIRException("Unknown ObjectType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/object-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "Person"; + case _2: return "System Object"; + case _3: return "Organization"; + case _4: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Person"; + case _2: return "System Object"; + case _3: return "Organization"; + case _4: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectTypeEnumFactory.java new file mode 100644 index 00000000000..4a1dd50011d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObjectTypeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ObjectTypeEnumFactory implements EnumFactory { + + public ObjectType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ObjectType._1; + if ("2".equals(codeString)) + return ObjectType._2; + if ("3".equals(codeString)) + return ObjectType._3; + if ("4".equals(codeString)) + return ObjectType._4; + throw new IllegalArgumentException("Unknown ObjectType code '"+codeString+"'"); + } + + public String toCode(ObjectType code) { + if (code == ObjectType._1) + return "1"; + if (code == ObjectType._2) + return "2"; + if (code == ObjectType._3) + return "3"; + if (code == ObjectType._4) + return "4"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategory.java new file mode 100644 index 00000000000..17c193815c2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategory.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObservationCategory { + + /** + * The Social History Observations define the patient's occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation. + */ + SOCIALHISTORY, + /** + * Clinical observations measure the body's basic functions such as such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area. + */ + VITALSIGNS, + /** + * Observations generated by imaging. The scope includes observations, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine. + */ + IMAGING, + /** + * The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology, microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory. + */ + LABORATORY, + /** + * Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding lab and imaging (e.g. cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure, such as where a gastroenterologist reports the size of a polyp observed during a colonoscopy. + */ + PROCEDURE, + /** + * Assessment tool/survey instrument observations (e.g. Apgar Scores, Montreal Cognitive Assessment (MoCA)) + */ + SURVEY, + /** + * Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body. + */ + EXAM, + /** + * Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy) + */ + THERAPY, + /** + * added to help the parsers + */ + NULL; + public static ObservationCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("social-history".equals(codeString)) + return SOCIALHISTORY; + if ("vital-signs".equals(codeString)) + return VITALSIGNS; + if ("imaging".equals(codeString)) + return IMAGING; + if ("laboratory".equals(codeString)) + return LABORATORY; + if ("procedure".equals(codeString)) + return PROCEDURE; + if ("survey".equals(codeString)) + return SURVEY; + if ("exam".equals(codeString)) + return EXAM; + if ("therapy".equals(codeString)) + return THERAPY; + throw new FHIRException("Unknown ObservationCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOCIALHISTORY: return "social-history"; + case VITALSIGNS: return "vital-signs"; + case IMAGING: return "imaging"; + case LABORATORY: return "laboratory"; + case PROCEDURE: return "procedure"; + case SURVEY: return "survey"; + case EXAM: return "exam"; + case THERAPY: return "therapy"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/observation-category"; + } + public String getDefinition() { + switch (this) { + case SOCIALHISTORY: return "The Social History Observations define the patient's occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation."; + case VITALSIGNS: return " Clinical observations measure the body's basic functions such as such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area."; + case IMAGING: return "Observations generated by imaging. The scope includes observations, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine."; + case LABORATORY: return "The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology, microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory."; + case PROCEDURE: return "Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding lab and imaging (e.g. cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure, such as where a gastroenterologist reports the size of a polyp observed during a colonoscopy."; + case SURVEY: return "Assessment tool/survey instrument observations (e.g. Apgar Scores, Montreal Cognitive Assessment (MoCA))"; + case EXAM: return "Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body."; + case THERAPY: return "Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOCIALHISTORY: return "Social History"; + case VITALSIGNS: return "Vital Signs"; + case IMAGING: return "Imaging"; + case LABORATORY: return "Laboratory"; + case PROCEDURE: return "Procedure"; + case SURVEY: return "Survey"; + case EXAM: return "Exam"; + case THERAPY: return "Therapy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategoryEnumFactory.java new file mode 100644 index 00000000000..b3912d14956 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ObservationCategoryEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ObservationCategoryEnumFactory implements EnumFactory { + + public ObservationCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("social-history".equals(codeString)) + return ObservationCategory.SOCIALHISTORY; + if ("vital-signs".equals(codeString)) + return ObservationCategory.VITALSIGNS; + if ("imaging".equals(codeString)) + return ObservationCategory.IMAGING; + if ("laboratory".equals(codeString)) + return ObservationCategory.LABORATORY; + if ("procedure".equals(codeString)) + return ObservationCategory.PROCEDURE; + if ("survey".equals(codeString)) + return ObservationCategory.SURVEY; + if ("exam".equals(codeString)) + return ObservationCategory.EXAM; + if ("therapy".equals(codeString)) + return ObservationCategory.THERAPY; + throw new IllegalArgumentException("Unknown ObservationCategory code '"+codeString+"'"); + } + + public String toCode(ObservationCategory code) { + if (code == ObservationCategory.SOCIALHISTORY) + return "social-history"; + if (code == ObservationCategory.VITALSIGNS) + return "vital-signs"; + if (code == ObservationCategory.IMAGING) + return "imaging"; + if (code == ObservationCategory.LABORATORY) + return "laboratory"; + if (code == ObservationCategory.PROCEDURE) + return "procedure"; + if (code == ObservationCategory.SURVEY) + return "survey"; + if (code == ObservationCategory.EXAM) + return "exam"; + if (code == ObservationCategory.THERAPY) + return "therapy"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcome.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcome.java new file mode 100644 index 00000000000..3fb8c952ae0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcome.java @@ -0,0 +1,510 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OperationOutcome { + + /** + * null + */ + MSGAUTHREQUIRED, + /** + * null + */ + MSGBADFORMAT, + /** + * null + */ + MSGBADSYNTAX, + /** + * null + */ + MSGCANTPARSECONTENT, + /** + * null + */ + MSGCANTPARSEROOT, + /** + * null + */ + MSGCREATED, + /** + * null + */ + MSGDATEFORMAT, + /** + * null + */ + MSGDELETED, + /** + * null + */ + MSGDELETEDDONE, + /** + * null + */ + MSGDELETEDID, + /** + * null + */ + MSGDUPLICATEID, + /** + * null + */ + MSGERRORPARSING, + /** + * null + */ + MSGIDINVALID, + /** + * null + */ + MSGIDTOOLONG, + /** + * null + */ + MSGINVALIDID, + /** + * null + */ + MSGJSONOBJECT, + /** + * null + */ + MSGLOCALFAIL, + /** + * null + */ + MSGNOMATCH, + /** + * null + */ + MSGNOEXIST, + /** + * null + */ + MSGNOMODULE, + /** + * null + */ + MSGNOSUMMARY, + /** + * null + */ + MSGOPNOTALLOWED, + /** + * null + */ + MSGPARAMCHAINED, + /** + * null + */ + MSGPARAMNOREPEAT, + /** + * null + */ + MSGPARAMUNKNOWN, + /** + * null + */ + MSGPARAMINVALID, + /** + * null + */ + MSGPARAMMODIFIERINVALID, + /** + * null + */ + MSGRESOURCEEXAMPLEPROTECTED, + /** + * null + */ + MSGRESOURCEIDFAIL, + /** + * null + */ + MSGRESOURCENOTALLOWED, + /** + * null + */ + MSGRESOURCEREQUIRED, + /** + * null + */ + MSGRESOURCEIDMISMATCH, + /** + * null + */ + MSGRESOURCEIDMISSING, + /** + * null + */ + MSGRESOURCETYPEMISMATCH, + /** + * null + */ + MSGSORTUNKNOWN, + /** + * null + */ + MSGTRANSACTIONDUPLICATEID, + /** + * null + */ + MSGTRANSACTIONMISSINGID, + /** + * null + */ + MSGUNHANDLEDNODETYPE, + /** + * null + */ + MSGUNKNOWNCONTENT, + /** + * null + */ + MSGUNKNOWNOPERATION, + /** + * null + */ + MSGUNKNOWNTYPE, + /** + * null + */ + MSGUPDATED, + /** + * null + */ + MSGVERSIONAWARE, + /** + * null + */ + MSGVERSIONAWARECONFLICT, + /** + * null + */ + MSGVERSIONAWAREURL, + /** + * null + */ + MSGWRONGNS, + /** + * null + */ + SEARCHMULTIPLE, + /** + * null + */ + UPDATEMULTIPLEMATCHES, + /** + * null + */ + SEARCHNONE, + /** + * added to help the parsers + */ + NULL; + public static OperationOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MSG_AUTH_REQUIRED".equals(codeString)) + return MSGAUTHREQUIRED; + if ("MSG_BAD_FORMAT".equals(codeString)) + return MSGBADFORMAT; + if ("MSG_BAD_SYNTAX".equals(codeString)) + return MSGBADSYNTAX; + if ("MSG_CANT_PARSE_CONTENT".equals(codeString)) + return MSGCANTPARSECONTENT; + if ("MSG_CANT_PARSE_ROOT".equals(codeString)) + return MSGCANTPARSEROOT; + if ("MSG_CREATED".equals(codeString)) + return MSGCREATED; + if ("MSG_DATE_FORMAT".equals(codeString)) + return MSGDATEFORMAT; + if ("MSG_DELETED".equals(codeString)) + return MSGDELETED; + if ("MSG_DELETED_DONE".equals(codeString)) + return MSGDELETEDDONE; + if ("MSG_DELETED_ID".equals(codeString)) + return MSGDELETEDID; + if ("MSG_DUPLICATE_ID".equals(codeString)) + return MSGDUPLICATEID; + if ("MSG_ERROR_PARSING".equals(codeString)) + return MSGERRORPARSING; + if ("MSG_ID_INVALID".equals(codeString)) + return MSGIDINVALID; + if ("MSG_ID_TOO_LONG".equals(codeString)) + return MSGIDTOOLONG; + if ("MSG_INVALID_ID".equals(codeString)) + return MSGINVALIDID; + if ("MSG_JSON_OBJECT".equals(codeString)) + return MSGJSONOBJECT; + if ("MSG_LOCAL_FAIL".equals(codeString)) + return MSGLOCALFAIL; + if ("MSG_NO_MATCH".equals(codeString)) + return MSGNOMATCH; + if ("MSG_NO_EXIST".equals(codeString)) + return MSGNOEXIST; + if ("MSG_NO_MODULE".equals(codeString)) + return MSGNOMODULE; + if ("MSG_NO_SUMMARY".equals(codeString)) + return MSGNOSUMMARY; + if ("MSG_OP_NOT_ALLOWED".equals(codeString)) + return MSGOPNOTALLOWED; + if ("MSG_PARAM_CHAINED".equals(codeString)) + return MSGPARAMCHAINED; + if ("MSG_PARAM_NO_REPEAT".equals(codeString)) + return MSGPARAMNOREPEAT; + if ("MSG_PARAM_UNKNOWN".equals(codeString)) + return MSGPARAMUNKNOWN; + if ("MSG_PARAM_INVALID".equals(codeString)) + return MSGPARAMINVALID; + if ("MSG_PARAM_MODIFIER_INVALID".equals(codeString)) + return MSGPARAMMODIFIERINVALID; + if ("MSG_RESOURCE_EXAMPLE_PROTECTED".equals(codeString)) + return MSGRESOURCEEXAMPLEPROTECTED; + if ("MSG_RESOURCE_ID_FAIL".equals(codeString)) + return MSGRESOURCEIDFAIL; + if ("MSG_RESOURCE_NOT_ALLOWED".equals(codeString)) + return MSGRESOURCENOTALLOWED; + if ("MSG_RESOURCE_REQUIRED".equals(codeString)) + return MSGRESOURCEREQUIRED; + if ("MSG_RESOURCE_ID_MISMATCH".equals(codeString)) + return MSGRESOURCEIDMISMATCH; + if ("MSG_RESOURCE_ID_MISSING".equals(codeString)) + return MSGRESOURCEIDMISSING; + if ("MSG_RESOURCE_TYPE_MISMATCH".equals(codeString)) + return MSGRESOURCETYPEMISMATCH; + if ("MSG_SORT_UNKNOWN".equals(codeString)) + return MSGSORTUNKNOWN; + if ("MSG_TRANSACTION_DUPLICATE_ID".equals(codeString)) + return MSGTRANSACTIONDUPLICATEID; + if ("MSG_TRANSACTION_MISSING_ID".equals(codeString)) + return MSGTRANSACTIONMISSINGID; + if ("MSG_UNHANDLED_NODE_TYPE".equals(codeString)) + return MSGUNHANDLEDNODETYPE; + if ("MSG_UNKNOWN_CONTENT".equals(codeString)) + return MSGUNKNOWNCONTENT; + if ("MSG_UNKNOWN_OPERATION".equals(codeString)) + return MSGUNKNOWNOPERATION; + if ("MSG_UNKNOWN_TYPE".equals(codeString)) + return MSGUNKNOWNTYPE; + if ("MSG_UPDATED".equals(codeString)) + return MSGUPDATED; + if ("MSG_VERSION_AWARE".equals(codeString)) + return MSGVERSIONAWARE; + if ("MSG_VERSION_AWARE_CONFLICT".equals(codeString)) + return MSGVERSIONAWARECONFLICT; + if ("MSG_VERSION_AWARE_URL".equals(codeString)) + return MSGVERSIONAWAREURL; + if ("MSG_WRONG_NS".equals(codeString)) + return MSGWRONGNS; + if ("SEARCH_MULTIPLE".equals(codeString)) + return SEARCHMULTIPLE; + if ("UPDATE_MULTIPLE_MATCHES".equals(codeString)) + return UPDATEMULTIPLEMATCHES; + if ("SEARCH_NONE".equals(codeString)) + return SEARCHNONE; + throw new FHIRException("Unknown OperationOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MSGAUTHREQUIRED: return "MSG_AUTH_REQUIRED"; + case MSGBADFORMAT: return "MSG_BAD_FORMAT"; + case MSGBADSYNTAX: return "MSG_BAD_SYNTAX"; + case MSGCANTPARSECONTENT: return "MSG_CANT_PARSE_CONTENT"; + case MSGCANTPARSEROOT: return "MSG_CANT_PARSE_ROOT"; + case MSGCREATED: return "MSG_CREATED"; + case MSGDATEFORMAT: return "MSG_DATE_FORMAT"; + case MSGDELETED: return "MSG_DELETED"; + case MSGDELETEDDONE: return "MSG_DELETED_DONE"; + case MSGDELETEDID: return "MSG_DELETED_ID"; + case MSGDUPLICATEID: return "MSG_DUPLICATE_ID"; + case MSGERRORPARSING: return "MSG_ERROR_PARSING"; + case MSGIDINVALID: return "MSG_ID_INVALID"; + case MSGIDTOOLONG: return "MSG_ID_TOO_LONG"; + case MSGINVALIDID: return "MSG_INVALID_ID"; + case MSGJSONOBJECT: return "MSG_JSON_OBJECT"; + case MSGLOCALFAIL: return "MSG_LOCAL_FAIL"; + case MSGNOMATCH: return "MSG_NO_MATCH"; + case MSGNOEXIST: return "MSG_NO_EXIST"; + case MSGNOMODULE: return "MSG_NO_MODULE"; + case MSGNOSUMMARY: return "MSG_NO_SUMMARY"; + case MSGOPNOTALLOWED: return "MSG_OP_NOT_ALLOWED"; + case MSGPARAMCHAINED: return "MSG_PARAM_CHAINED"; + case MSGPARAMNOREPEAT: return "MSG_PARAM_NO_REPEAT"; + case MSGPARAMUNKNOWN: return "MSG_PARAM_UNKNOWN"; + case MSGPARAMINVALID: return "MSG_PARAM_INVALID"; + case MSGPARAMMODIFIERINVALID: return "MSG_PARAM_MODIFIER_INVALID"; + case MSGRESOURCEEXAMPLEPROTECTED: return "MSG_RESOURCE_EXAMPLE_PROTECTED"; + case MSGRESOURCEIDFAIL: return "MSG_RESOURCE_ID_FAIL"; + case MSGRESOURCENOTALLOWED: return "MSG_RESOURCE_NOT_ALLOWED"; + case MSGRESOURCEREQUIRED: return "MSG_RESOURCE_REQUIRED"; + case MSGRESOURCEIDMISMATCH: return "MSG_RESOURCE_ID_MISMATCH"; + case MSGRESOURCEIDMISSING: return "MSG_RESOURCE_ID_MISSING"; + case MSGRESOURCETYPEMISMATCH: return "MSG_RESOURCE_TYPE_MISMATCH"; + case MSGSORTUNKNOWN: return "MSG_SORT_UNKNOWN"; + case MSGTRANSACTIONDUPLICATEID: return "MSG_TRANSACTION_DUPLICATE_ID"; + case MSGTRANSACTIONMISSINGID: return "MSG_TRANSACTION_MISSING_ID"; + case MSGUNHANDLEDNODETYPE: return "MSG_UNHANDLED_NODE_TYPE"; + case MSGUNKNOWNCONTENT: return "MSG_UNKNOWN_CONTENT"; + case MSGUNKNOWNOPERATION: return "MSG_UNKNOWN_OPERATION"; + case MSGUNKNOWNTYPE: return "MSG_UNKNOWN_TYPE"; + case MSGUPDATED: return "MSG_UPDATED"; + case MSGVERSIONAWARE: return "MSG_VERSION_AWARE"; + case MSGVERSIONAWARECONFLICT: return "MSG_VERSION_AWARE_CONFLICT"; + case MSGVERSIONAWAREURL: return "MSG_VERSION_AWARE_URL"; + case MSGWRONGNS: return "MSG_WRONG_NS"; + case SEARCHMULTIPLE: return "SEARCH_MULTIPLE"; + case UPDATEMULTIPLEMATCHES: return "UPDATE_MULTIPLE_MATCHES"; + case SEARCHNONE: return "SEARCH_NONE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/operation-outcome"; + } + public String getDefinition() { + switch (this) { + case MSGAUTHREQUIRED: return ""; + case MSGBADFORMAT: return ""; + case MSGBADSYNTAX: return ""; + case MSGCANTPARSECONTENT: return ""; + case MSGCANTPARSEROOT: return ""; + case MSGCREATED: return ""; + case MSGDATEFORMAT: return ""; + case MSGDELETED: return ""; + case MSGDELETEDDONE: return ""; + case MSGDELETEDID: return ""; + case MSGDUPLICATEID: return ""; + case MSGERRORPARSING: return ""; + case MSGIDINVALID: return ""; + case MSGIDTOOLONG: return ""; + case MSGINVALIDID: return ""; + case MSGJSONOBJECT: return ""; + case MSGLOCALFAIL: return ""; + case MSGNOMATCH: return ""; + case MSGNOEXIST: return ""; + case MSGNOMODULE: return ""; + case MSGNOSUMMARY: return ""; + case MSGOPNOTALLOWED: return ""; + case MSGPARAMCHAINED: return ""; + case MSGPARAMNOREPEAT: return ""; + case MSGPARAMUNKNOWN: return ""; + case MSGPARAMINVALID: return ""; + case MSGPARAMMODIFIERINVALID: return ""; + case MSGRESOURCEEXAMPLEPROTECTED: return ""; + case MSGRESOURCEIDFAIL: return ""; + case MSGRESOURCENOTALLOWED: return ""; + case MSGRESOURCEREQUIRED: return ""; + case MSGRESOURCEIDMISMATCH: return ""; + case MSGRESOURCEIDMISSING: return ""; + case MSGRESOURCETYPEMISMATCH: return ""; + case MSGSORTUNKNOWN: return ""; + case MSGTRANSACTIONDUPLICATEID: return ""; + case MSGTRANSACTIONMISSINGID: return ""; + case MSGUNHANDLEDNODETYPE: return ""; + case MSGUNKNOWNCONTENT: return ""; + case MSGUNKNOWNOPERATION: return ""; + case MSGUNKNOWNTYPE: return ""; + case MSGUPDATED: return ""; + case MSGVERSIONAWARE: return ""; + case MSGVERSIONAWARECONFLICT: return ""; + case MSGVERSIONAWAREURL: return ""; + case MSGWRONGNS: return ""; + case SEARCHMULTIPLE: return ""; + case UPDATEMULTIPLEMATCHES: return ""; + case SEARCHNONE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MSGAUTHREQUIRED: return "You must authenticate before you can use this service"; + case MSGBADFORMAT: return "Bad Syntax: \"%s\" must be a %s'"; + case MSGBADSYNTAX: return "Bad Syntax in %s"; + case MSGCANTPARSECONTENT: return "Unable to parse feed (entry content type = \"%s\")"; + case MSGCANTPARSEROOT: return "Unable to parse feed (root element name = \"%s\")"; + case MSGCREATED: return "New resource created"; + case MSGDATEFORMAT: return "The Date value %s is not in the correct format (Xml Date Format required)"; + case MSGDELETED: return "This resource has been deleted"; + case MSGDELETEDDONE: return "Resource deleted"; + case MSGDELETEDID: return "The resource \"%s\" has been deleted"; + case MSGDUPLICATEID: return "Duplicate Id %s for resource type %s"; + case MSGERRORPARSING: return "Error parsing resource Xml (%s)"; + case MSGIDINVALID: return "Id \"%s\" has an invalid character \"%s\""; + case MSGIDTOOLONG: return "Id \"%s\" too long (length limit 36)"; + case MSGINVALIDID: return "Id not accepted"; + case MSGJSONOBJECT: return "Json Source for a resource should start with an object"; + case MSGLOCALFAIL: return "Unable to resolve local reference to resource %s"; + case MSGNOMATCH: return "No Resource found matching the query \"%s\""; + case MSGNOEXIST: return "Resource Id \"%s\" does not exist"; + case MSGNOMODULE: return "No module could be found to handle the request \"%s\""; + case MSGNOSUMMARY: return "No Summary for this resource"; + case MSGOPNOTALLOWED: return "Operation %s not allowed for resource %s (due to local configuration)"; + case MSGPARAMCHAINED: return "Unknown chained parameter name \"%s\""; + case MSGPARAMNOREPEAT: return "Parameter \"%s\" is not allowed to repeat"; + case MSGPARAMUNKNOWN: return "Parameter \"%s\" not understood"; + case MSGPARAMINVALID: return "Parameter \"%s\" content is invalid"; + case MSGPARAMMODIFIERINVALID: return "Parameter \"%s\" modifier is invalid"; + case MSGRESOURCEEXAMPLEPROTECTED: return "Resources with identity \"example\" cannot be deleted (for testing/training purposes)"; + case MSGRESOURCEIDFAIL: return "unable to allocate resource id"; + case MSGRESOURCENOTALLOWED: return "Not allowed to submit a resource for this operation"; + case MSGRESOURCEREQUIRED: return "A resource is required"; + case MSGRESOURCEIDMISMATCH: return "Resource Id Mismatch"; + case MSGRESOURCEIDMISSING: return "Resource Id Missing"; + case MSGRESOURCETYPEMISMATCH: return "Resource Type Mismatch"; + case MSGSORTUNKNOWN: return "Unknown sort parameter name \"%s\""; + case MSGTRANSACTIONDUPLICATEID: return "Duplicate Identifier in transaction: %s"; + case MSGTRANSACTIONMISSINGID: return "Missing Identifier in transaction - an entry.id must be provided"; + case MSGUNHANDLEDNODETYPE: return "Unhandled xml node type \"%s\""; + case MSGUNKNOWNCONTENT: return "Unknown Content (%s) at %s"; + case MSGUNKNOWNOPERATION: return "unknown FHIR http operation"; + case MSGUNKNOWNTYPE: return "Resource Type \"%s\" not recognised"; + case MSGUPDATED: return "existing resource updated"; + case MSGVERSIONAWARE: return "Version aware updates are required for this resource"; + case MSGVERSIONAWARECONFLICT: return "Update Conflict (server current version = \"%s\", client version referenced = \"%s\")"; + case MSGVERSIONAWAREURL: return "Version specific URL not recognised"; + case MSGWRONGNS: return "This does not appear to be a FHIR element or resource (wrong namespace \"%s\")"; + case SEARCHMULTIPLE: return "Error: Multiple matches exist for %s search parameters \"%s\""; + case UPDATEMULTIPLEMATCHES: return "Error: Multiple matches exist for the conditional update"; + case SEARCHNONE: return "Error: no processable search found for %s search parameters \"%s\""; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcomeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcomeEnumFactory.java new file mode 100644 index 00000000000..16832bf25ce --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OperationOutcomeEnumFactory.java @@ -0,0 +1,247 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class OperationOutcomeEnumFactory implements EnumFactory { + + public OperationOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MSG_AUTH_REQUIRED".equals(codeString)) + return OperationOutcome.MSGAUTHREQUIRED; + if ("MSG_BAD_FORMAT".equals(codeString)) + return OperationOutcome.MSGBADFORMAT; + if ("MSG_BAD_SYNTAX".equals(codeString)) + return OperationOutcome.MSGBADSYNTAX; + if ("MSG_CANT_PARSE_CONTENT".equals(codeString)) + return OperationOutcome.MSGCANTPARSECONTENT; + if ("MSG_CANT_PARSE_ROOT".equals(codeString)) + return OperationOutcome.MSGCANTPARSEROOT; + if ("MSG_CREATED".equals(codeString)) + return OperationOutcome.MSGCREATED; + if ("MSG_DATE_FORMAT".equals(codeString)) + return OperationOutcome.MSGDATEFORMAT; + if ("MSG_DELETED".equals(codeString)) + return OperationOutcome.MSGDELETED; + if ("MSG_DELETED_DONE".equals(codeString)) + return OperationOutcome.MSGDELETEDDONE; + if ("MSG_DELETED_ID".equals(codeString)) + return OperationOutcome.MSGDELETEDID; + if ("MSG_DUPLICATE_ID".equals(codeString)) + return OperationOutcome.MSGDUPLICATEID; + if ("MSG_ERROR_PARSING".equals(codeString)) + return OperationOutcome.MSGERRORPARSING; + if ("MSG_ID_INVALID".equals(codeString)) + return OperationOutcome.MSGIDINVALID; + if ("MSG_ID_TOO_LONG".equals(codeString)) + return OperationOutcome.MSGIDTOOLONG; + if ("MSG_INVALID_ID".equals(codeString)) + return OperationOutcome.MSGINVALIDID; + if ("MSG_JSON_OBJECT".equals(codeString)) + return OperationOutcome.MSGJSONOBJECT; + if ("MSG_LOCAL_FAIL".equals(codeString)) + return OperationOutcome.MSGLOCALFAIL; + if ("MSG_NO_MATCH".equals(codeString)) + return OperationOutcome.MSGNOMATCH; + if ("MSG_NO_EXIST".equals(codeString)) + return OperationOutcome.MSGNOEXIST; + if ("MSG_NO_MODULE".equals(codeString)) + return OperationOutcome.MSGNOMODULE; + if ("MSG_NO_SUMMARY".equals(codeString)) + return OperationOutcome.MSGNOSUMMARY; + if ("MSG_OP_NOT_ALLOWED".equals(codeString)) + return OperationOutcome.MSGOPNOTALLOWED; + if ("MSG_PARAM_CHAINED".equals(codeString)) + return OperationOutcome.MSGPARAMCHAINED; + if ("MSG_PARAM_NO_REPEAT".equals(codeString)) + return OperationOutcome.MSGPARAMNOREPEAT; + if ("MSG_PARAM_UNKNOWN".equals(codeString)) + return OperationOutcome.MSGPARAMUNKNOWN; + if ("MSG_PARAM_INVALID".equals(codeString)) + return OperationOutcome.MSGPARAMINVALID; + if ("MSG_PARAM_MODIFIER_INVALID".equals(codeString)) + return OperationOutcome.MSGPARAMMODIFIERINVALID; + if ("MSG_RESOURCE_EXAMPLE_PROTECTED".equals(codeString)) + return OperationOutcome.MSGRESOURCEEXAMPLEPROTECTED; + if ("MSG_RESOURCE_ID_FAIL".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDFAIL; + if ("MSG_RESOURCE_NOT_ALLOWED".equals(codeString)) + return OperationOutcome.MSGRESOURCENOTALLOWED; + if ("MSG_RESOURCE_REQUIRED".equals(codeString)) + return OperationOutcome.MSGRESOURCEREQUIRED; + if ("MSG_RESOURCE_ID_MISMATCH".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDMISMATCH; + if ("MSG_RESOURCE_ID_MISSING".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDMISSING; + if ("MSG_RESOURCE_TYPE_MISMATCH".equals(codeString)) + return OperationOutcome.MSGRESOURCETYPEMISMATCH; + if ("MSG_SORT_UNKNOWN".equals(codeString)) + return OperationOutcome.MSGSORTUNKNOWN; + if ("MSG_TRANSACTION_DUPLICATE_ID".equals(codeString)) + return OperationOutcome.MSGTRANSACTIONDUPLICATEID; + if ("MSG_TRANSACTION_MISSING_ID".equals(codeString)) + return OperationOutcome.MSGTRANSACTIONMISSINGID; + if ("MSG_UNHANDLED_NODE_TYPE".equals(codeString)) + return OperationOutcome.MSGUNHANDLEDNODETYPE; + if ("MSG_UNKNOWN_CONTENT".equals(codeString)) + return OperationOutcome.MSGUNKNOWNCONTENT; + if ("MSG_UNKNOWN_OPERATION".equals(codeString)) + return OperationOutcome.MSGUNKNOWNOPERATION; + if ("MSG_UNKNOWN_TYPE".equals(codeString)) + return OperationOutcome.MSGUNKNOWNTYPE; + if ("MSG_UPDATED".equals(codeString)) + return OperationOutcome.MSGUPDATED; + if ("MSG_VERSION_AWARE".equals(codeString)) + return OperationOutcome.MSGVERSIONAWARE; + if ("MSG_VERSION_AWARE_CONFLICT".equals(codeString)) + return OperationOutcome.MSGVERSIONAWARECONFLICT; + if ("MSG_VERSION_AWARE_URL".equals(codeString)) + return OperationOutcome.MSGVERSIONAWAREURL; + if ("MSG_WRONG_NS".equals(codeString)) + return OperationOutcome.MSGWRONGNS; + if ("SEARCH_MULTIPLE".equals(codeString)) + return OperationOutcome.SEARCHMULTIPLE; + if ("UPDATE_MULTIPLE_MATCHES".equals(codeString)) + return OperationOutcome.UPDATEMULTIPLEMATCHES; + if ("SEARCH_NONE".equals(codeString)) + return OperationOutcome.SEARCHNONE; + throw new IllegalArgumentException("Unknown OperationOutcome code '"+codeString+"'"); + } + + public String toCode(OperationOutcome code) { + if (code == OperationOutcome.MSGAUTHREQUIRED) + return "MSG_AUTH_REQUIRED"; + if (code == OperationOutcome.MSGBADFORMAT) + return "MSG_BAD_FORMAT"; + if (code == OperationOutcome.MSGBADSYNTAX) + return "MSG_BAD_SYNTAX"; + if (code == OperationOutcome.MSGCANTPARSECONTENT) + return "MSG_CANT_PARSE_CONTENT"; + if (code == OperationOutcome.MSGCANTPARSEROOT) + return "MSG_CANT_PARSE_ROOT"; + if (code == OperationOutcome.MSGCREATED) + return "MSG_CREATED"; + if (code == OperationOutcome.MSGDATEFORMAT) + return "MSG_DATE_FORMAT"; + if (code == OperationOutcome.MSGDELETED) + return "MSG_DELETED"; + if (code == OperationOutcome.MSGDELETEDDONE) + return "MSG_DELETED_DONE"; + if (code == OperationOutcome.MSGDELETEDID) + return "MSG_DELETED_ID"; + if (code == OperationOutcome.MSGDUPLICATEID) + return "MSG_DUPLICATE_ID"; + if (code == OperationOutcome.MSGERRORPARSING) + return "MSG_ERROR_PARSING"; + if (code == OperationOutcome.MSGIDINVALID) + return "MSG_ID_INVALID"; + if (code == OperationOutcome.MSGIDTOOLONG) + return "MSG_ID_TOO_LONG"; + if (code == OperationOutcome.MSGINVALIDID) + return "MSG_INVALID_ID"; + if (code == OperationOutcome.MSGJSONOBJECT) + return "MSG_JSON_OBJECT"; + if (code == OperationOutcome.MSGLOCALFAIL) + return "MSG_LOCAL_FAIL"; + if (code == OperationOutcome.MSGNOMATCH) + return "MSG_NO_MATCH"; + if (code == OperationOutcome.MSGNOEXIST) + return "MSG_NO_EXIST"; + if (code == OperationOutcome.MSGNOMODULE) + return "MSG_NO_MODULE"; + if (code == OperationOutcome.MSGNOSUMMARY) + return "MSG_NO_SUMMARY"; + if (code == OperationOutcome.MSGOPNOTALLOWED) + return "MSG_OP_NOT_ALLOWED"; + if (code == OperationOutcome.MSGPARAMCHAINED) + return "MSG_PARAM_CHAINED"; + if (code == OperationOutcome.MSGPARAMNOREPEAT) + return "MSG_PARAM_NO_REPEAT"; + if (code == OperationOutcome.MSGPARAMUNKNOWN) + return "MSG_PARAM_UNKNOWN"; + if (code == OperationOutcome.MSGPARAMINVALID) + return "MSG_PARAM_INVALID"; + if (code == OperationOutcome.MSGPARAMMODIFIERINVALID) + return "MSG_PARAM_MODIFIER_INVALID"; + if (code == OperationOutcome.MSGRESOURCEEXAMPLEPROTECTED) + return "MSG_RESOURCE_EXAMPLE_PROTECTED"; + if (code == OperationOutcome.MSGRESOURCEIDFAIL) + return "MSG_RESOURCE_ID_FAIL"; + if (code == OperationOutcome.MSGRESOURCENOTALLOWED) + return "MSG_RESOURCE_NOT_ALLOWED"; + if (code == OperationOutcome.MSGRESOURCEREQUIRED) + return "MSG_RESOURCE_REQUIRED"; + if (code == OperationOutcome.MSGRESOURCEIDMISMATCH) + return "MSG_RESOURCE_ID_MISMATCH"; + if (code == OperationOutcome.MSGRESOURCEIDMISSING) + return "MSG_RESOURCE_ID_MISSING"; + if (code == OperationOutcome.MSGRESOURCETYPEMISMATCH) + return "MSG_RESOURCE_TYPE_MISMATCH"; + if (code == OperationOutcome.MSGSORTUNKNOWN) + return "MSG_SORT_UNKNOWN"; + if (code == OperationOutcome.MSGTRANSACTIONDUPLICATEID) + return "MSG_TRANSACTION_DUPLICATE_ID"; + if (code == OperationOutcome.MSGTRANSACTIONMISSINGID) + return "MSG_TRANSACTION_MISSING_ID"; + if (code == OperationOutcome.MSGUNHANDLEDNODETYPE) + return "MSG_UNHANDLED_NODE_TYPE"; + if (code == OperationOutcome.MSGUNKNOWNCONTENT) + return "MSG_UNKNOWN_CONTENT"; + if (code == OperationOutcome.MSGUNKNOWNOPERATION) + return "MSG_UNKNOWN_OPERATION"; + if (code == OperationOutcome.MSGUNKNOWNTYPE) + return "MSG_UNKNOWN_TYPE"; + if (code == OperationOutcome.MSGUPDATED) + return "MSG_UPDATED"; + if (code == OperationOutcome.MSGVERSIONAWARE) + return "MSG_VERSION_AWARE"; + if (code == OperationOutcome.MSGVERSIONAWARECONFLICT) + return "MSG_VERSION_AWARE_CONFLICT"; + if (code == OperationOutcome.MSGVERSIONAWAREURL) + return "MSG_VERSION_AWARE_URL"; + if (code == OperationOutcome.MSGWRONGNS) + return "MSG_WRONG_NS"; + if (code == OperationOutcome.SEARCHMULTIPLE) + return "SEARCH_MULTIPLE"; + if (code == OperationOutcome.UPDATEMULTIPLEMATCHES) + return "UPDATE_MULTIPLE_MATCHES"; + if (code == OperationOutcome.SEARCHNONE) + return "SEARCH_NONE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterial.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterial.java new file mode 100644 index 00000000000..22e1c8417ef --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterial.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OralProsthodonticMaterial { + + /** + * Fixed Bridge + */ + _1, + /** + * Maryland Bridge + */ + _2, + /** + * Denture Acrylic + */ + _3, + /** + * Denture Chrome Cobalt + */ + _4, + /** + * added to help the parsers + */ + NULL; + public static OralProsthodonticMaterial fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + throw new FHIRException("Unknown OralProsthodonticMaterial code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-oralprostho"; + } + public String getDefinition() { + switch (this) { + case _1: return "Fixed Bridge"; + case _2: return "Maryland Bridge"; + case _3: return "Denture Acrylic"; + case _4: return "Denture Chrome Cobalt"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Fixed Bridge"; + case _2: return "Maryland Bridge"; + case _3: return "Denture Acrylic"; + case _4: return "Denture Chrome Cobalt"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterialEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterialEnumFactory.java new file mode 100644 index 00000000000..6e5a65bb52d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OralProsthodonticMaterialEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class OralProsthodonticMaterialEnumFactory implements EnumFactory { + + public OralProsthodonticMaterial fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return OralProsthodonticMaterial._1; + if ("2".equals(codeString)) + return OralProsthodonticMaterial._2; + if ("3".equals(codeString)) + return OralProsthodonticMaterial._3; + if ("4".equals(codeString)) + return OralProsthodonticMaterial._4; + throw new IllegalArgumentException("Unknown OralProsthodonticMaterial code '"+codeString+"'"); + } + + public String toCode(OralProsthodonticMaterial code) { + if (code == OralProsthodonticMaterial._1) + return "1"; + if (code == OralProsthodonticMaterial._2) + return "2"; + if (code == OralProsthodonticMaterial._3) + return "3"; + if (code == OralProsthodonticMaterial._4) + return "4"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationType.java new file mode 100644 index 00000000000..43c1c2557fd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationType.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OrganizationType { + + /** + * An organization that provides healthcare services. + */ + PROV, + /** + * A department or ward within a hospital (Generally is not applicable to top level organizations) + */ + DEPT, + /** + * An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department). + */ + TEAM, + /** + * A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government. + */ + GOVT, + /** + * A company that provides insurance to its subscribers that may include healthcare related policies. + */ + INS, + /** + * An educational institution that provides education or research facilities. + */ + EDU, + /** + * An organization that is identified as a part of a religious institution. + */ + RELI, + /** + * An organization that is identified as a Pharmaceutical/Clinical Research Sponsor. + */ + CRS, + /** + * An un-incorporated community group. + */ + CG, + /** + * An organization that is a registered business or corporation but not identified by other types. + */ + BUS, + /** + * Other type of organization not already specified. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static OrganizationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prov".equals(codeString)) + return PROV; + if ("dept".equals(codeString)) + return DEPT; + if ("team".equals(codeString)) + return TEAM; + if ("govt".equals(codeString)) + return GOVT; + if ("ins".equals(codeString)) + return INS; + if ("edu".equals(codeString)) + return EDU; + if ("reli".equals(codeString)) + return RELI; + if ("crs".equals(codeString)) + return CRS; + if ("cg".equals(codeString)) + return CG; + if ("bus".equals(codeString)) + return BUS; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown OrganizationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROV: return "prov"; + case DEPT: return "dept"; + case TEAM: return "team"; + case GOVT: return "govt"; + case INS: return "ins"; + case EDU: return "edu"; + case RELI: return "reli"; + case CRS: return "crs"; + case CG: return "cg"; + case BUS: return "bus"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/organization-type"; + } + public String getDefinition() { + switch (this) { + case PROV: return "An organization that provides healthcare services."; + case DEPT: return "A department or ward within a hospital (Generally is not applicable to top level organizations)"; + case TEAM: return "An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department)."; + case GOVT: return "A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government."; + case INS: return "A company that provides insurance to its subscribers that may include healthcare related policies."; + case EDU: return "An educational institution that provides education or research facilities."; + case RELI: return "An organization that is identified as a part of a religious institution."; + case CRS: return "An organization that is identified as a Pharmaceutical/Clinical Research Sponsor."; + case CG: return "An un-incorporated community group."; + case BUS: return "An organization that is a registered business or corporation but not identified by other types."; + case OTHER: return "Other type of organization not already specified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROV: return "Healthcare Provider"; + case DEPT: return "Hospital Department"; + case TEAM: return "Organizational team"; + case GOVT: return "Government"; + case INS: return "Insurance Company"; + case EDU: return "Educational Institute"; + case RELI: return "Religious Institution"; + case CRS: return "Clinical Research Sponsor"; + case CG: return "Community Group"; + case BUS: return "Non-Healthcare Business or Corporation"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationTypeEnumFactory.java new file mode 100644 index 00000000000..1e388298c11 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/OrganizationTypeEnumFactory.java @@ -0,0 +1,95 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class OrganizationTypeEnumFactory implements EnumFactory { + + public OrganizationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prov".equals(codeString)) + return OrganizationType.PROV; + if ("dept".equals(codeString)) + return OrganizationType.DEPT; + if ("team".equals(codeString)) + return OrganizationType.TEAM; + if ("govt".equals(codeString)) + return OrganizationType.GOVT; + if ("ins".equals(codeString)) + return OrganizationType.INS; + if ("edu".equals(codeString)) + return OrganizationType.EDU; + if ("reli".equals(codeString)) + return OrganizationType.RELI; + if ("crs".equals(codeString)) + return OrganizationType.CRS; + if ("cg".equals(codeString)) + return OrganizationType.CG; + if ("bus".equals(codeString)) + return OrganizationType.BUS; + if ("other".equals(codeString)) + return OrganizationType.OTHER; + throw new IllegalArgumentException("Unknown OrganizationType code '"+codeString+"'"); + } + + public String toCode(OrganizationType code) { + if (code == OrganizationType.PROV) + return "prov"; + if (code == OrganizationType.DEPT) + return "dept"; + if (code == OrganizationType.TEAM) + return "team"; + if (code == OrganizationType.GOVT) + return "govt"; + if (code == OrganizationType.INS) + return "ins"; + if (code == OrganizationType.EDU) + return "edu"; + if (code == OrganizationType.RELI) + return "reli"; + if (code == OrganizationType.CRS) + return "crs"; + if (code == OrganizationType.CG) + return "cg"; + if (code == OrganizationType.BUS) + return "bus"; + if (code == OrganizationType.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationship.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationship.java new file mode 100644 index 00000000000..3e20b6ebfc3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationship.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PatientContactRelationship { + + /** + * Contact for use in case of emergency. + */ + EMERGENCY, + /** + * null + */ + FAMILY, + /** + * null + */ + GUARDIAN, + /** + * null + */ + FRIEND, + /** + * null + */ + PARTNER, + /** + * Contact for matters related to the patients occupation/employment. + */ + WORK, + /** + * (Non)professional caregiver + */ + CAREGIVER, + /** + * Contact that acts on behalf of the patient + */ + AGENT, + /** + * Contact for financial matters + */ + GUARANTOR, + /** + * For animals, the owner of the animal + */ + OWNER, + /** + * Parent of the patient + */ + PARENT, + /** + * added to help the parsers + */ + NULL; + public static PatientContactRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("emergency".equals(codeString)) + return EMERGENCY; + if ("family".equals(codeString)) + return FAMILY; + if ("guardian".equals(codeString)) + return GUARDIAN; + if ("friend".equals(codeString)) + return FRIEND; + if ("partner".equals(codeString)) + return PARTNER; + if ("work".equals(codeString)) + return WORK; + if ("caregiver".equals(codeString)) + return CAREGIVER; + if ("agent".equals(codeString)) + return AGENT; + if ("guarantor".equals(codeString)) + return GUARANTOR; + if ("owner".equals(codeString)) + return OWNER; + if ("parent".equals(codeString)) + return PARENT; + throw new FHIRException("Unknown PatientContactRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EMERGENCY: return "emergency"; + case FAMILY: return "family"; + case GUARDIAN: return "guardian"; + case FRIEND: return "friend"; + case PARTNER: return "partner"; + case WORK: return "work"; + case CAREGIVER: return "caregiver"; + case AGENT: return "agent"; + case GUARANTOR: return "guarantor"; + case OWNER: return "owner"; + case PARENT: return "parent"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/patient-contact-relationship"; + } + public String getDefinition() { + switch (this) { + case EMERGENCY: return "Contact for use in case of emergency."; + case FAMILY: return ""; + case GUARDIAN: return ""; + case FRIEND: return ""; + case PARTNER: return ""; + case WORK: return "Contact for matters related to the patients occupation/employment."; + case CAREGIVER: return "(Non)professional caregiver"; + case AGENT: return "Contact that acts on behalf of the patient"; + case GUARANTOR: return "Contact for financial matters"; + case OWNER: return "For animals, the owner of the animal"; + case PARENT: return "Parent of the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EMERGENCY: return "Emergency"; + case FAMILY: return "Family"; + case GUARDIAN: return "Guardian"; + case FRIEND: return "Friend"; + case PARTNER: return "Partner"; + case WORK: return "Work"; + case CAREGIVER: return "Caregiver"; + case AGENT: return "Agent"; + case GUARANTOR: return "Guarantor"; + case OWNER: return "Owner of animal"; + case PARENT: return "Parent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationshipEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationshipEnumFactory.java new file mode 100644 index 00000000000..b0e187c7058 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientContactRelationshipEnumFactory.java @@ -0,0 +1,95 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PatientContactRelationshipEnumFactory implements EnumFactory { + + public PatientContactRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("emergency".equals(codeString)) + return PatientContactRelationship.EMERGENCY; + if ("family".equals(codeString)) + return PatientContactRelationship.FAMILY; + if ("guardian".equals(codeString)) + return PatientContactRelationship.GUARDIAN; + if ("friend".equals(codeString)) + return PatientContactRelationship.FRIEND; + if ("partner".equals(codeString)) + return PatientContactRelationship.PARTNER; + if ("work".equals(codeString)) + return PatientContactRelationship.WORK; + if ("caregiver".equals(codeString)) + return PatientContactRelationship.CAREGIVER; + if ("agent".equals(codeString)) + return PatientContactRelationship.AGENT; + if ("guarantor".equals(codeString)) + return PatientContactRelationship.GUARANTOR; + if ("owner".equals(codeString)) + return PatientContactRelationship.OWNER; + if ("parent".equals(codeString)) + return PatientContactRelationship.PARENT; + throw new IllegalArgumentException("Unknown PatientContactRelationship code '"+codeString+"'"); + } + + public String toCode(PatientContactRelationship code) { + if (code == PatientContactRelationship.EMERGENCY) + return "emergency"; + if (code == PatientContactRelationship.FAMILY) + return "family"; + if (code == PatientContactRelationship.GUARDIAN) + return "guardian"; + if (code == PatientContactRelationship.FRIEND) + return "friend"; + if (code == PatientContactRelationship.PARTNER) + return "partner"; + if (code == PatientContactRelationship.WORK) + return "work"; + if (code == PatientContactRelationship.CAREGIVER) + return "caregiver"; + if (code == PatientContactRelationship.AGENT) + return "agent"; + if (code == PatientContactRelationship.GUARANTOR) + return "guarantor"; + if (code == PatientContactRelationship.OWNER) + return "owner"; + if (code == PatientContactRelationship.PARENT) + return "parent"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatch.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatch.java new file mode 100644 index 00000000000..98e7828c222 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatch.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PatientMpiMatch { + + /** + * This record meets the MPI criteria to be automatically considered as a full match. + */ + CERTAIN, + /** + * This record is a close match, but not a certain match. Additional review (e.g. by a human) may be required before using this as a match. + */ + PROBABLE, + /** + * This record may be a matching one. Additional review (e.g. by a human) SHOULD be performed before using this as a match. + */ + POSSIBLE, + /** + * This record is known not to be a match. Note that usually non-matching records are not returned, but in some cases records previously or likely considered as a match may specifically be negated by the MPI. + */ + CERTAINLYNOT, + /** + * added to help the parsers + */ + NULL; + public static PatientMpiMatch fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("certain".equals(codeString)) + return CERTAIN; + if ("probable".equals(codeString)) + return PROBABLE; + if ("possible".equals(codeString)) + return POSSIBLE; + if ("certainly-not".equals(codeString)) + return CERTAINLYNOT; + throw new FHIRException("Unknown PatientMpiMatch code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CERTAIN: return "certain"; + case PROBABLE: return "probable"; + case POSSIBLE: return "possible"; + case CERTAINLYNOT: return "certainly-not"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/patient-mpi-match"; + } + public String getDefinition() { + switch (this) { + case CERTAIN: return "This record meets the MPI criteria to be automatically considered as a full match."; + case PROBABLE: return "This record is a close match, but not a certain match. Additional review (e.g. by a human) may be required before using this as a match."; + case POSSIBLE: return "This record may be a matching one. Additional review (e.g. by a human) SHOULD be performed before using this as a match."; + case CERTAINLYNOT: return "This record is known not to be a match. Note that usually non-matching records are not returned, but in some cases records previously or likely considered as a match may specifically be negated by the MPI."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CERTAIN: return "Certain Match"; + case PROBABLE: return "Probable Match"; + case POSSIBLE: return "Possible Match"; + case CERTAINLYNOT: return "Certainly Not a Match"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatchEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatchEnumFactory.java new file mode 100644 index 00000000000..33d644a170c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PatientMpiMatchEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PatientMpiMatchEnumFactory implements EnumFactory { + + public PatientMpiMatch fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("certain".equals(codeString)) + return PatientMpiMatch.CERTAIN; + if ("probable".equals(codeString)) + return PatientMpiMatch.PROBABLE; + if ("possible".equals(codeString)) + return PatientMpiMatch.POSSIBLE; + if ("certainly-not".equals(codeString)) + return PatientMpiMatch.CERTAINLYNOT; + throw new IllegalArgumentException("Unknown PatientMpiMatch code '"+codeString+"'"); + } + + public String toCode(PatientMpiMatch code) { + if (code == PatientMpiMatch.CERTAIN) + return "certain"; + if (code == PatientMpiMatch.PROBABLE) + return "probable"; + if (code == PatientMpiMatch.POSSIBLE) + return "possible"; + if (code == PatientMpiMatch.CERTAINLYNOT) + return "certainly-not"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Payeetype.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Payeetype.java new file mode 100644 index 00000000000..29e82211017 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Payeetype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Payeetype { + + /** + * null + */ + SUBSCRIBER, + /** + * null + */ + PROVIDER, + /** + * null + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Payeetype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subscriber".equals(codeString)) + return SUBSCRIBER; + if ("provider".equals(codeString)) + return PROVIDER; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Payeetype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUBSCRIBER: return "subscriber"; + case PROVIDER: return "provider"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/payeetype"; + } + public String getDefinition() { + switch (this) { + case SUBSCRIBER: return ""; + case PROVIDER: return ""; + case OTHER: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUBSCRIBER: return "subscriber"; + case PROVIDER: return "provider"; + case OTHER: return "other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PayeetypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PayeetypeEnumFactory.java new file mode 100644 index 00000000000..d301c4bc5b4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PayeetypeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PayeetypeEnumFactory implements EnumFactory { + + public Payeetype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subscriber".equals(codeString)) + return Payeetype.SUBSCRIBER; + if ("provider".equals(codeString)) + return Payeetype.PROVIDER; + if ("other".equals(codeString)) + return Payeetype.OTHER; + throw new IllegalArgumentException("Unknown Payeetype code '"+codeString+"'"); + } + + public String toCode(Payeetype code) { + if (code == Payeetype.SUBSCRIBER) + return "subscriber"; + if (code == Payeetype.PROVIDER) + return "provider"; + if (code == Payeetype.OTHER) + return "other"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatus.java new file mode 100644 index 00000000000..2c45c2280b3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PaymentStatus { + + /** + * null + */ + PAID, + /** + * null + */ + CLEARED, + /** + * added to help the parsers + */ + NULL; + public static PaymentStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("paid".equals(codeString)) + return PAID; + if ("cleared".equals(codeString)) + return CLEARED; + throw new FHIRException("Unknown PaymentStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAID: return "paid"; + case CLEARED: return "cleared"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/paymentstatus"; + } + public String getDefinition() { + switch (this) { + case PAID: return ""; + case CLEARED: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAID: return "paid"; + case CLEARED: return "cleared"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatusEnumFactory.java new file mode 100644 index 00000000000..ef075f092cf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentStatusEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PaymentStatusEnumFactory implements EnumFactory { + + public PaymentStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("paid".equals(codeString)) + return PaymentStatus.PAID; + if ("cleared".equals(codeString)) + return PaymentStatus.CLEARED; + throw new IllegalArgumentException("Unknown PaymentStatus code '"+codeString+"'"); + } + + public String toCode(PaymentStatus code) { + if (code == PaymentStatus.PAID) + return "paid"; + if (code == PaymentStatus.CLEARED) + return "cleared"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentType.java new file mode 100644 index 00000000000..7642e66185f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PaymentType { + + /** + * null + */ + PAYMENT, + /** + * null + */ + ADJUSTMENT, + /** + * null + */ + ADVANCE, + /** + * added to help the parsers + */ + NULL; + public static PaymentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("payment".equals(codeString)) + return PAYMENT; + if ("adjustment".equals(codeString)) + return ADJUSTMENT; + if ("advance".equals(codeString)) + return ADVANCE; + throw new FHIRException("Unknown PaymentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAYMENT: return "payment"; + case ADJUSTMENT: return "adjustment"; + case ADVANCE: return "advance"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/payment-type"; + } + public String getDefinition() { + switch (this) { + case PAYMENT: return ""; + case ADJUSTMENT: return ""; + case ADVANCE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAYMENT: return "payment"; + case ADJUSTMENT: return "adjustment"; + case ADVANCE: return "advance"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentTypeEnumFactory.java new file mode 100644 index 00000000000..b64b93fbf46 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PaymentTypeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PaymentTypeEnumFactory implements EnumFactory { + + public PaymentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("payment".equals(codeString)) + return PaymentType.PAYMENT; + if ("adjustment".equals(codeString)) + return PaymentType.ADJUSTMENT; + if ("advance".equals(codeString)) + return PaymentType.ADVANCE; + throw new IllegalArgumentException("Unknown PaymentType code '"+codeString+"'"); + } + + public String toCode(PaymentType code) { + if (code == PaymentType.PAYMENT) + return "payment"; + if (code == PaymentType.ADJUSTMENT) + return "adjustment"; + if (code == PaymentType.ADVANCE) + return "advance"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRole.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRole.java new file mode 100644 index 00000000000..38d039303d6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRole.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PractitionerRole { + + /** + * null + */ + DOCTOR, + /** + * null + */ + NURSE, + /** + * null + */ + PHARMACIST, + /** + * null + */ + RESEARCHER, + /** + * null + */ + TEACHER, + /** + * null + */ + ICT, + /** + * added to help the parsers + */ + NULL; + public static PractitionerRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("doctor".equals(codeString)) + return DOCTOR; + if ("nurse".equals(codeString)) + return NURSE; + if ("pharmacist".equals(codeString)) + return PHARMACIST; + if ("researcher".equals(codeString)) + return RESEARCHER; + if ("teacher".equals(codeString)) + return TEACHER; + if ("ict".equals(codeString)) + return ICT; + throw new FHIRException("Unknown PractitionerRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCTOR: return "doctor"; + case NURSE: return "nurse"; + case PHARMACIST: return "pharmacist"; + case RESEARCHER: return "researcher"; + case TEACHER: return "teacher"; + case ICT: return "ict"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/practitioner-role"; + } + public String getDefinition() { + switch (this) { + case DOCTOR: return ""; + case NURSE: return ""; + case PHARMACIST: return ""; + case RESEARCHER: return ""; + case TEACHER: return ""; + case ICT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCTOR: return "Doctor"; + case NURSE: return "Nurse"; + case PHARMACIST: return "Pharmacist"; + case RESEARCHER: return "Researcher"; + case TEACHER: return "Teacher/educator"; + case ICT: return "ICT professional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRoleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRoleEnumFactory.java new file mode 100644 index 00000000000..46feb8b76e7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerRoleEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PractitionerRoleEnumFactory implements EnumFactory { + + public PractitionerRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("doctor".equals(codeString)) + return PractitionerRole.DOCTOR; + if ("nurse".equals(codeString)) + return PractitionerRole.NURSE; + if ("pharmacist".equals(codeString)) + return PractitionerRole.PHARMACIST; + if ("researcher".equals(codeString)) + return PractitionerRole.RESEARCHER; + if ("teacher".equals(codeString)) + return PractitionerRole.TEACHER; + if ("ict".equals(codeString)) + return PractitionerRole.ICT; + throw new IllegalArgumentException("Unknown PractitionerRole code '"+codeString+"'"); + } + + public String toCode(PractitionerRole code) { + if (code == PractitionerRole.DOCTOR) + return "doctor"; + if (code == PractitionerRole.NURSE) + return "nurse"; + if (code == PractitionerRole.PHARMACIST) + return "pharmacist"; + if (code == PractitionerRole.RESEARCHER) + return "researcher"; + if (code == PractitionerRole.TEACHER) + return "teacher"; + if (code == PractitionerRole.ICT) + return "ict"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialty.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialty.java new file mode 100644 index 00000000000..35c65f145bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialty.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PractitionerSpecialty { + + /** + * null + */ + CARDIO, + /** + * null + */ + DENT, + /** + * null + */ + DIETARY, + /** + * null + */ + MIDW, + /** + * null + */ + SYSARCH, + /** + * added to help the parsers + */ + NULL; + public static PractitionerSpecialty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cardio".equals(codeString)) + return CARDIO; + if ("dent".equals(codeString)) + return DENT; + if ("dietary".equals(codeString)) + return DIETARY; + if ("midw".equals(codeString)) + return MIDW; + if ("sysarch".equals(codeString)) + return SYSARCH; + throw new FHIRException("Unknown PractitionerSpecialty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CARDIO: return "cardio"; + case DENT: return "dent"; + case DIETARY: return "dietary"; + case MIDW: return "midw"; + case SYSARCH: return "sysarch"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/practitioner-specialty"; + } + public String getDefinition() { + switch (this) { + case CARDIO: return ""; + case DENT: return ""; + case DIETARY: return ""; + case MIDW: return ""; + case SYSARCH: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CARDIO: return "Cardiologist"; + case DENT: return "Dentist"; + case DIETARY: return "Dietary consultant"; + case MIDW: return "Midwife"; + case SYSARCH: return "Systems architect"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialtyEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialtyEnumFactory.java new file mode 100644 index 00000000000..87ccebde630 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/PractitionerSpecialtyEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class PractitionerSpecialtyEnumFactory implements EnumFactory { + + public PractitionerSpecialty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cardio".equals(codeString)) + return PractitionerSpecialty.CARDIO; + if ("dent".equals(codeString)) + return PractitionerSpecialty.DENT; + if ("dietary".equals(codeString)) + return PractitionerSpecialty.DIETARY; + if ("midw".equals(codeString)) + return PractitionerSpecialty.MIDW; + if ("sysarch".equals(codeString)) + return PractitionerSpecialty.SYSARCH; + throw new IllegalArgumentException("Unknown PractitionerSpecialty code '"+codeString+"'"); + } + + public String toCode(PractitionerSpecialty code) { + if (code == PractitionerSpecialty.CARDIO) + return "cardio"; + if (code == PractitionerSpecialty.DENT) + return "dent"; + if (code == PractitionerSpecialty.DIETARY) + return "dietary"; + if (code == PractitionerSpecialty.MIDW) + return "midw"; + if (code == PractitionerSpecialty.SYSARCH) + return "sysarch"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodes.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodes.java new file mode 100644 index 00000000000..9eed9846fa9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodes.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcedureProgressStatusCodes { + + /** + * A patient is in the Operating Room. + */ + A, + /** + * The patient is prepared for a procedure. + */ + B, + /** + * The patient is under anesthesia. + */ + C, + /** + * null + */ + D, + /** + * null + */ + E, + /** + * The patient is in the recovery room. + */ + F, + /** + * added to help the parsers + */ + NULL; + public static ProcedureProgressStatusCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + if ("d".equals(codeString)) + return D; + if ("e".equals(codeString)) + return E; + if ("f".equals(codeString)) + return F; + throw new FHIRException("Unknown ProcedureProgressStatusCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + case D: return "d"; + case E: return "e"; + case F: return "f"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/procedure-progress-status-code"; + } + public String getDefinition() { + switch (this) { + case A: return "A patient is in the Operating Room."; + case B: return "The patient is prepared for a procedure."; + case C: return "The patient is under anesthesia."; + case D: return ""; + case E: return ""; + case F: return "The patient is in the recovery room."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "In Operating Room"; + case B: return "Prepared"; + case C: return "Anesthesia induced"; + case D: return "Opened (skin)"; + case E: return "Closed (skin)"; + case F: return "In Recovery Room"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodesEnumFactory.java new file mode 100644 index 00000000000..62549249f78 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureProgressStatusCodesEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProcedureProgressStatusCodesEnumFactory implements EnumFactory { + + public ProcedureProgressStatusCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ProcedureProgressStatusCodes.A; + if ("b".equals(codeString)) + return ProcedureProgressStatusCodes.B; + if ("c".equals(codeString)) + return ProcedureProgressStatusCodes.C; + if ("d".equals(codeString)) + return ProcedureProgressStatusCodes.D; + if ("e".equals(codeString)) + return ProcedureProgressStatusCodes.E; + if ("f".equals(codeString)) + return ProcedureProgressStatusCodes.F; + throw new IllegalArgumentException("Unknown ProcedureProgressStatusCodes code '"+codeString+"'"); + } + + public String toCode(ProcedureProgressStatusCodes code) { + if (code == ProcedureProgressStatusCodes.A) + return "a"; + if (code == ProcedureProgressStatusCodes.B) + return "b"; + if (code == ProcedureProgressStatusCodes.C) + return "c"; + if (code == ProcedureProgressStatusCodes.D) + return "d"; + if (code == ProcedureProgressStatusCodes.E) + return "e"; + if (code == ProcedureProgressStatusCodes.F) + return "f"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipType.java new file mode 100644 index 00000000000..38637cd50b0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcedureRelationshipType { + + /** + * This procedure had to be performed because of the related one. + */ + CAUSEDBY, + /** + * This procedure caused the related one to be performed. + */ + BECAUSEOF, + /** + * added to help the parsers + */ + NULL; + public static ProcedureRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("caused-by".equals(codeString)) + return CAUSEDBY; + if ("because-of".equals(codeString)) + return BECAUSEOF; + throw new FHIRException("Unknown ProcedureRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CAUSEDBY: return "caused-by"; + case BECAUSEOF: return "because-of"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/procedure-relationship-type"; + } + public String getDefinition() { + switch (this) { + case CAUSEDBY: return "This procedure had to be performed because of the related one."; + case BECAUSEOF: return "This procedure caused the related one to be performed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CAUSEDBY: return "Caused By"; + case BECAUSEOF: return "Because Of"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..278dc6c64c3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcedureRelationshipTypeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProcedureRelationshipTypeEnumFactory implements EnumFactory { + + public ProcedureRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("caused-by".equals(codeString)) + return ProcedureRelationshipType.CAUSEDBY; + if ("because-of".equals(codeString)) + return ProcedureRelationshipType.BECAUSEOF; + throw new IllegalArgumentException("Unknown ProcedureRelationshipType code '"+codeString+"'"); + } + + public String toCode(ProcedureRelationshipType code) { + if (code == ProcedureRelationshipType.CAUSEDBY) + return "caused-by"; + if (code == ProcedureRelationshipType.BECAUSEOF) + return "because-of"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcome.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcome.java new file mode 100644 index 00000000000..5c4c809d056 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcome.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcessOutcome { + + /** + * null + */ + COMPLETE, + /** + * null + */ + PENDED, + /** + * null + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static ProcessOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("pended".equals(codeString)) + return PENDED; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown ProcessOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PENDED: return "pended"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/processoutcomecodes"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return ""; + case PENDED: return ""; + case ERROR: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "complete"; + case PENDED: return "pended"; + case ERROR: return "error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcomeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcomeEnumFactory.java new file mode 100644 index 00000000000..e9ee8facda0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessOutcomeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProcessOutcomeEnumFactory implements EnumFactory { + + public ProcessOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return ProcessOutcome.COMPLETE; + if ("pended".equals(codeString)) + return ProcessOutcome.PENDED; + if ("error".equals(codeString)) + return ProcessOutcome.ERROR; + throw new IllegalArgumentException("Unknown ProcessOutcome code '"+codeString+"'"); + } + + public String toCode(ProcessOutcome code) { + if (code == ProcessOutcome.COMPLETE) + return "complete"; + if (code == ProcessOutcome.PENDED) + return "pended"; + if (code == ProcessOutcome.ERROR) + return "error"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriority.java new file mode 100644 index 00000000000..3749c2262aa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcessPriority { + + /** + * Immediately in real time. + */ + STAT, + /** + * With best effort. + */ + NORMAL, + /** + * Later, when possible. + */ + DEFERRED, + /** + * added to help the parsers + */ + NULL; + public static ProcessPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("stat".equals(codeString)) + return STAT; + if ("normal".equals(codeString)) + return NORMAL; + if ("deferred".equals(codeString)) + return DEFERRED; + throw new FHIRException("Unknown ProcessPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STAT: return "stat"; + case NORMAL: return "normal"; + case DEFERRED: return "deferred"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/processpriority"; + } + public String getDefinition() { + switch (this) { + case STAT: return "Immediately in real time."; + case NORMAL: return "With best effort."; + case DEFERRED: return "Later, when possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STAT: return "Immediate"; + case NORMAL: return "Normal"; + case DEFERRED: return "Deferred"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriorityEnumFactory.java new file mode 100644 index 00000000000..bf655a93330 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProcessPriorityEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProcessPriorityEnumFactory implements EnumFactory { + + public ProcessPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("stat".equals(codeString)) + return ProcessPriority.STAT; + if ("normal".equals(codeString)) + return ProcessPriority.NORMAL; + if ("deferred".equals(codeString)) + return ProcessPriority.DEFERRED; + throw new IllegalArgumentException("Unknown ProcessPriority code '"+codeString+"'"); + } + + public String toCode(ProcessPriority code) { + if (code == ProcessPriority.STAT) + return "stat"; + if (code == ProcessPriority.NORMAL) + return "normal"; + if (code == ProcessPriority.DEFERRED) + return "deferred"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRole.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRole.java new file mode 100644 index 00000000000..cfff980f3ae --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRole.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProvenanceAgentRole { + + /** + * A person entering the data into the originating system + */ + ENTERER, + /** + * A person, animal, organization or device that who actually and principally carries out the activity + */ + PERFORMER, + /** + * A party that originates the resource and therefore has responsibility for the information given in the resource and ownership of this resource + */ + AUTHOR, + /** + * A person who verifies the correctness and appropriateness of activity + */ + VERIFIER, + /** + * The person authenticated the content and accepted legal responsibility for its content + */ + LEGAL, + /** + * A verifier who attests to the accuracy of the resource + */ + ATTESTER, + /** + * A person who reported information that contributed to the resource + */ + INFORMANT, + /** + * The entity that is accountable for maintaining a true an accurate copy of the original record + */ + CUSTODIAN, + /** + * A device that operates independently of an author on custodian's algorithms for data extraction of existing information for purpose of generating a new artifact. + */ + ASSEMBLER, + /** + * A device used by an author to record new information, which may also be used by the author to select existing information for aggregation with newly recorded information for the purpose of generating a new artifact. + */ + COMPOSER, + /** + * added to help the parsers + */ + NULL; + public static ProvenanceAgentRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("enterer".equals(codeString)) + return ENTERER; + if ("performer".equals(codeString)) + return PERFORMER; + if ("author".equals(codeString)) + return AUTHOR; + if ("verifier".equals(codeString)) + return VERIFIER; + if ("legal".equals(codeString)) + return LEGAL; + if ("attester".equals(codeString)) + return ATTESTER; + if ("informant".equals(codeString)) + return INFORMANT; + if ("custodian".equals(codeString)) + return CUSTODIAN; + if ("assembler".equals(codeString)) + return ASSEMBLER; + if ("composer".equals(codeString)) + return COMPOSER; + throw new FHIRException("Unknown ProvenanceAgentRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ENTERER: return "enterer"; + case PERFORMER: return "performer"; + case AUTHOR: return "author"; + case VERIFIER: return "verifier"; + case LEGAL: return "legal"; + case ATTESTER: return "attester"; + case INFORMANT: return "informant"; + case CUSTODIAN: return "custodian"; + case ASSEMBLER: return "assembler"; + case COMPOSER: return "composer"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/provenance-participant-role"; + } + public String getDefinition() { + switch (this) { + case ENTERER: return "A person entering the data into the originating system"; + case PERFORMER: return "A person, animal, organization or device that who actually and principally carries out the activity"; + case AUTHOR: return "A party that originates the resource and therefore has responsibility for the information given in the resource and ownership of this resource"; + case VERIFIER: return "A person who verifies the correctness and appropriateness of activity"; + case LEGAL: return "The person authenticated the content and accepted legal responsibility for its content"; + case ATTESTER: return "A verifier who attests to the accuracy of the resource"; + case INFORMANT: return "A person who reported information that contributed to the resource"; + case CUSTODIAN: return "The entity that is accountable for maintaining a true an accurate copy of the original record"; + case ASSEMBLER: return "A device that operates independently of an author on custodian's algorithms for data extraction of existing information for purpose of generating a new artifact."; + case COMPOSER: return "A device used by an author to record new information, which may also be used by the author to select existing information for aggregation with newly recorded information for the purpose of generating a new artifact."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ENTERER: return "Enterer"; + case PERFORMER: return "Performer"; + case AUTHOR: return "Author"; + case VERIFIER: return "Verifier"; + case LEGAL: return "Legal Authenticator"; + case ATTESTER: return "Attester"; + case INFORMANT: return "Informant"; + case CUSTODIAN: return "Custodian"; + case ASSEMBLER: return "Assembler"; + case COMPOSER: return "Composer"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRoleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRoleEnumFactory.java new file mode 100644 index 00000000000..a9e0dfe4513 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentRoleEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProvenanceAgentRoleEnumFactory implements EnumFactory { + + public ProvenanceAgentRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("enterer".equals(codeString)) + return ProvenanceAgentRole.ENTERER; + if ("performer".equals(codeString)) + return ProvenanceAgentRole.PERFORMER; + if ("author".equals(codeString)) + return ProvenanceAgentRole.AUTHOR; + if ("verifier".equals(codeString)) + return ProvenanceAgentRole.VERIFIER; + if ("legal".equals(codeString)) + return ProvenanceAgentRole.LEGAL; + if ("attester".equals(codeString)) + return ProvenanceAgentRole.ATTESTER; + if ("informant".equals(codeString)) + return ProvenanceAgentRole.INFORMANT; + if ("custodian".equals(codeString)) + return ProvenanceAgentRole.CUSTODIAN; + if ("assembler".equals(codeString)) + return ProvenanceAgentRole.ASSEMBLER; + if ("composer".equals(codeString)) + return ProvenanceAgentRole.COMPOSER; + throw new IllegalArgumentException("Unknown ProvenanceAgentRole code '"+codeString+"'"); + } + + public String toCode(ProvenanceAgentRole code) { + if (code == ProvenanceAgentRole.ENTERER) + return "enterer"; + if (code == ProvenanceAgentRole.PERFORMER) + return "performer"; + if (code == ProvenanceAgentRole.AUTHOR) + return "author"; + if (code == ProvenanceAgentRole.VERIFIER) + return "verifier"; + if (code == ProvenanceAgentRole.LEGAL) + return "legal"; + if (code == ProvenanceAgentRole.ATTESTER) + return "attester"; + if (code == ProvenanceAgentRole.INFORMANT) + return "informant"; + if (code == ProvenanceAgentRole.CUSTODIAN) + return "custodian"; + if (code == ProvenanceAgentRole.ASSEMBLER) + return "assembler"; + if (code == ProvenanceAgentRole.COMPOSER) + return "composer"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentType.java new file mode 100644 index 00000000000..bb3e57082e2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentType.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProvenanceAgentType { + + /** + * The participant is a person acting on their on behalf or on behalf of the patient rather than as an practitioner for an organization. I.e. "not a healthcare provider". + */ + PERSON, + /** + * The participant is a practitioner, a person (provider) who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * The participant is an organization. + */ + ORGANIZATION, + /** + * The participant is a software application including services, algorithms, etc. + */ + SOFTWARE, + /** + * The participant is the patient, a person or animal receiving care or other health-related services. + */ + PATIENT, + /** + * The participant is a device, an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. + */ + DEVICE, + /** + * The participant is a related person, a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static ProvenanceAgentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("organization".equals(codeString)) + return ORGANIZATION; + if ("software".equals(codeString)) + return SOFTWARE; + if ("patient".equals(codeString)) + return PATIENT; + if ("device".equals(codeString)) + return DEVICE; + if ("related-person".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown ProvenanceAgentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case PRACTITIONER: return "practitioner"; + case ORGANIZATION: return "organization"; + case SOFTWARE: return "software"; + case PATIENT: return "patient"; + case DEVICE: return "device"; + case RELATEDPERSON: return "related-person"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/provenance-participant-type"; + } + public String getDefinition() { + switch (this) { + case PERSON: return "The participant is a person acting on their on behalf or on behalf of the patient rather than as an practitioner for an organization. I.e. \"not a healthcare provider\"."; + case PRACTITIONER: return "The participant is a practitioner, a person (provider) who is directly or indirectly involved in the provisioning of healthcare."; + case ORGANIZATION: return "The participant is an organization."; + case SOFTWARE: return "The participant is a software application including services, algorithms, etc."; + case PATIENT: return "The participant is the patient, a person or animal receiving care or other health-related services."; + case DEVICE: return "The participant is a device, an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health."; + case RELATEDPERSON: return "The participant is a related person, a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case ORGANIZATION: return "Organization"; + case SOFTWARE: return "Software"; + case PATIENT: return "Patient"; + case DEVICE: return "Device"; + case RELATEDPERSON: return "Related Person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentTypeEnumFactory.java new file mode 100644 index 00000000000..334fd40e6a6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ProvenanceAgentTypeEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ProvenanceAgentTypeEnumFactory implements EnumFactory { + + public ProvenanceAgentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return ProvenanceAgentType.PERSON; + if ("practitioner".equals(codeString)) + return ProvenanceAgentType.PRACTITIONER; + if ("organization".equals(codeString)) + return ProvenanceAgentType.ORGANIZATION; + if ("software".equals(codeString)) + return ProvenanceAgentType.SOFTWARE; + if ("patient".equals(codeString)) + return ProvenanceAgentType.PATIENT; + if ("device".equals(codeString)) + return ProvenanceAgentType.DEVICE; + if ("related-person".equals(codeString)) + return ProvenanceAgentType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown ProvenanceAgentType code '"+codeString+"'"); + } + + public String toCode(ProvenanceAgentType code) { + if (code == ProvenanceAgentType.PERSON) + return "person"; + if (code == ProvenanceAgentType.PRACTITIONER) + return "practitioner"; + if (code == ProvenanceAgentType.ORGANIZATION) + return "organization"; + if (code == ProvenanceAgentType.SOFTWARE) + return "software"; + if (code == ProvenanceAgentType.PATIENT) + return "patient"; + if (code == ProvenanceAgentType.DEVICE) + return "device"; + if (code == ProvenanceAgentType.RELATEDPERSON) + return "related-person"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccurs.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccurs.java new file mode 100644 index 00000000000..7580bae9765 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccurs.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionMaxOccurs { + + /** + * Element can repeat an unlimited number of times + */ + ASTERISK, + /** + * added to help the parsers + */ + NULL; + public static QuestionMaxOccurs fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("*".equals(codeString)) + return ASTERISK; + throw new FHIRException("Unknown QuestionMaxOccurs code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASTERISK: return "*"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/question-max-occurs"; + } + public String getDefinition() { + switch (this) { + case ASTERISK: return "Element can repeat an unlimited number of times"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASTERISK: return "Repeating"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccursEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccursEnumFactory.java new file mode 100644 index 00000000000..f0ba5def24e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionMaxOccursEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class QuestionMaxOccursEnumFactory implements EnumFactory { + + public QuestionMaxOccurs fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("*".equals(codeString)) + return QuestionMaxOccurs.ASTERISK; + throw new IllegalArgumentException("Unknown QuestionMaxOccurs code '"+codeString+"'"); + } + + public String toCode(QuestionMaxOccurs code) { + if (code == QuestionMaxOccurs.ASTERISK) + return "*"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategory.java new file mode 100644 index 00000000000..0452ba6302a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategory.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireDisplayCategory { + + /** + * The text provides guidances on how to populate or use a portion of the questionnaire (or the questionnaire as a whole). + */ + INSTRUCTIONS, + /** + * The text indicates the units of measure associated with the parent question. + */ + UNITS, + /** + * The text provides guidance on how the information should be or will be handled from a security/confidentiality/access control perspective when completed + */ + SECURITY, + /** + * A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure. + */ + LOOKUP, + /** + * A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others. + */ + RADIOBUTTON, + /** + * A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis. + */ + SLIDER, + /** + * A control where a list of numeric or other ordered values can be scrolled through via arrows. + */ + SPINNER, + /** + * A control where a user can type in their answer freely. + */ + TEXTBOX, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireDisplayCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instructions".equals(codeString)) + return INSTRUCTIONS; + if ("units".equals(codeString)) + return UNITS; + if ("security".equals(codeString)) + return SECURITY; + if ("lookup".equals(codeString)) + return LOOKUP; + if ("radio-button".equals(codeString)) + return RADIOBUTTON; + if ("slider".equals(codeString)) + return SLIDER; + if ("spinner".equals(codeString)) + return SPINNER; + if ("text-box".equals(codeString)) + return TEXTBOX; + throw new FHIRException("Unknown QuestionnaireDisplayCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTRUCTIONS: return "instructions"; + case UNITS: return "units"; + case SECURITY: return "security"; + case LOOKUP: return "lookup"; + case RADIOBUTTON: return "radio-button"; + case SLIDER: return "slider"; + case SPINNER: return "spinner"; + case TEXTBOX: return "text-box"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-display-category"; + } + public String getDefinition() { + switch (this) { + case INSTRUCTIONS: return "The text provides guidances on how to populate or use a portion of the questionnaire (or the questionnaire as a whole)."; + case UNITS: return "The text indicates the units of measure associated with the parent question."; + case SECURITY: return "The text provides guidance on how the information should be or will be handled from a security/confidentiality/access control perspective when completed"; + case LOOKUP: return "A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure."; + case RADIOBUTTON: return "A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others."; + case SLIDER: return "A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis."; + case SPINNER: return "A control where a list of numeric or other ordered values can be scrolled through via arrows."; + case TEXTBOX: return "A control where a user can type in their answer freely."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTRUCTIONS: return "Instructions"; + case UNITS: return "Units"; + case SECURITY: return "Security"; + case LOOKUP: return "Lookup"; + case RADIOBUTTON: return "Radio Button"; + case SLIDER: return "Slider"; + case SPINNER: return "Spinner"; + case TEXTBOX: return "Text Box"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategoryEnumFactory.java new file mode 100644 index 00000000000..460b0ea3e36 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireDisplayCategoryEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class QuestionnaireDisplayCategoryEnumFactory implements EnumFactory { + + public QuestionnaireDisplayCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instructions".equals(codeString)) + return QuestionnaireDisplayCategory.INSTRUCTIONS; + if ("units".equals(codeString)) + return QuestionnaireDisplayCategory.UNITS; + if ("security".equals(codeString)) + return QuestionnaireDisplayCategory.SECURITY; + if ("lookup".equals(codeString)) + return QuestionnaireDisplayCategory.LOOKUP; + if ("radio-button".equals(codeString)) + return QuestionnaireDisplayCategory.RADIOBUTTON; + if ("slider".equals(codeString)) + return QuestionnaireDisplayCategory.SLIDER; + if ("spinner".equals(codeString)) + return QuestionnaireDisplayCategory.SPINNER; + if ("text-box".equals(codeString)) + return QuestionnaireDisplayCategory.TEXTBOX; + throw new IllegalArgumentException("Unknown QuestionnaireDisplayCategory code '"+codeString+"'"); + } + + public String toCode(QuestionnaireDisplayCategory code) { + if (code == QuestionnaireDisplayCategory.INSTRUCTIONS) + return "instructions"; + if (code == QuestionnaireDisplayCategory.UNITS) + return "units"; + if (code == QuestionnaireDisplayCategory.SECURITY) + return "security"; + if (code == QuestionnaireDisplayCategory.LOOKUP) + return "lookup"; + if (code == QuestionnaireDisplayCategory.RADIOBUTTON) + return "radio-button"; + if (code == QuestionnaireDisplayCategory.SLIDER) + return "slider"; + if (code == QuestionnaireDisplayCategory.SPINNER) + return "spinner"; + if (code == QuestionnaireDisplayCategory.TEXTBOX) + return "text-box"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControl.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControl.java new file mode 100644 index 00000000000..760b20ce5c5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControl.java @@ -0,0 +1,267 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireItemControl { + + /** + * UI controls relevant to organizing groups of questions + */ + GROUP, + /** + * Questions within the group should be listed sequentially + */ + LIST, + /** + * Questions within the group are rows in the table with possible answers as columns + */ + TABLE, + /** + * The group is to be continuously visible at the top of the questionnaire + */ + HEADER, + /** + * The group is to be continuously visible at the bottom of the questionnaire + */ + FOOTER, + /** + * UI controls relevant to rendering questionnaire text items + */ + TEXT, + /** + * Text is displayed as a paragraph in a sequential position between sibling items (default behavior) + */ + INLINE, + /** + * Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter) + */ + PROMPT, + /** + * Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure + */ + UNIT, + /** + * Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound. E.g. 'Strongly diagree' + */ + LOWER, + /** + * Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound. E.g. 'Strongly agree' + */ + UPPER, + /** + * Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item + */ + FLYOVER, + /** + * Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within) + */ + HELP, + /** + * UI controls relevant to capturing question data + */ + QUESTION, + /** + * A control which provides a list of potential matches based on text entered into a control. Used for large choice sets where text-matching is an appropriate discovery mechanism. + */ + AUTOCOMPLETE, + /** + * A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field. + */ + DROPDOWN, + /** + * A control where choices are listed with a box beside them. The box can be toggled to select or de-select a given choice. Multiple selections may be possible. + */ + CHECKBOX, + /** + * A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure. + */ + LOOKUP, + /** + * A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others. + */ + RADIOBUTTON, + /** + * A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis. + */ + SLIDER, + /** + * A control where a list of numeric or other ordered values can be scrolled through via arrows. + */ + SPINNER, + /** + * A control where a user can type in their answer freely. + */ + TEXTBOX, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireItemControl fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("list".equals(codeString)) + return LIST; + if ("table".equals(codeString)) + return TABLE; + if ("header".equals(codeString)) + return HEADER; + if ("footer".equals(codeString)) + return FOOTER; + if ("text".equals(codeString)) + return TEXT; + if ("inline".equals(codeString)) + return INLINE; + if ("prompt".equals(codeString)) + return PROMPT; + if ("unit".equals(codeString)) + return UNIT; + if ("lower".equals(codeString)) + return LOWER; + if ("upper".equals(codeString)) + return UPPER; + if ("flyover".equals(codeString)) + return FLYOVER; + if ("help".equals(codeString)) + return HELP; + if ("question".equals(codeString)) + return QUESTION; + if ("autocomplete".equals(codeString)) + return AUTOCOMPLETE; + if ("drop-down".equals(codeString)) + return DROPDOWN; + if ("check-box".equals(codeString)) + return CHECKBOX; + if ("lookup".equals(codeString)) + return LOOKUP; + if ("radio-button".equals(codeString)) + return RADIOBUTTON; + if ("slider".equals(codeString)) + return SLIDER; + if ("spinner".equals(codeString)) + return SPINNER; + if ("text-box".equals(codeString)) + return TEXTBOX; + throw new FHIRException("Unknown QuestionnaireItemControl code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case LIST: return "list"; + case TABLE: return "table"; + case HEADER: return "header"; + case FOOTER: return "footer"; + case TEXT: return "text"; + case INLINE: return "inline"; + case PROMPT: return "prompt"; + case UNIT: return "unit"; + case LOWER: return "lower"; + case UPPER: return "upper"; + case FLYOVER: return "flyover"; + case HELP: return "help"; + case QUESTION: return "question"; + case AUTOCOMPLETE: return "autocomplete"; + case DROPDOWN: return "drop-down"; + case CHECKBOX: return "check-box"; + case LOOKUP: return "lookup"; + case RADIOBUTTON: return "radio-button"; + case SLIDER: return "slider"; + case SPINNER: return "spinner"; + case TEXTBOX: return "text-box"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-item-control"; + } + public String getDefinition() { + switch (this) { + case GROUP: return "UI controls relevant to organizing groups of questions"; + case LIST: return "Questions within the group should be listed sequentially"; + case TABLE: return "Questions within the group are rows in the table with possible answers as columns"; + case HEADER: return "The group is to be continuously visible at the top of the questionnaire"; + case FOOTER: return "The group is to be continuously visible at the bottom of the questionnaire"; + case TEXT: return "UI controls relevant to rendering questionnaire text items"; + case INLINE: return "Text is displayed as a paragraph in a sequential position between sibling items (default behavior)"; + case PROMPT: return "Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter)"; + case UNIT: return "Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure"; + case LOWER: return "Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound. E.g. 'Strongly diagree'"; + case UPPER: return "Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound. E.g. 'Strongly agree'"; + case FLYOVER: return "Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item"; + case HELP: return "Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within)"; + case QUESTION: return "UI controls relevant to capturing question data"; + case AUTOCOMPLETE: return "A control which provides a list of potential matches based on text entered into a control. Used for large choice sets where text-matching is an appropriate discovery mechanism."; + case DROPDOWN: return "A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field."; + case CHECKBOX: return "A control where choices are listed with a box beside them. The box can be toggled to select or de-select a given choice. Multiple selections may be possible."; + case LOOKUP: return "A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure."; + case RADIOBUTTON: return "A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others."; + case SLIDER: return "A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis."; + case SPINNER: return "A control where a list of numeric or other ordered values can be scrolled through via arrows."; + case TEXTBOX: return "A control where a user can type in their answer freely."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "group"; + case LIST: return "List"; + case TABLE: return "Table"; + case HEADER: return "Header"; + case FOOTER: return "Footer"; + case TEXT: return "text"; + case INLINE: return "In-line"; + case PROMPT: return "In-line"; + case UNIT: return "Unit"; + case LOWER: return "Lower-bound"; + case UPPER: return "Upper-bound"; + case FLYOVER: return "Fly-over"; + case HELP: return "Help-Button"; + case QUESTION: return "question"; + case AUTOCOMPLETE: return "Auto-complete"; + case DROPDOWN: return "Drop down"; + case CHECKBOX: return "Check-box"; + case LOOKUP: return "Lookup"; + case RADIOBUTTON: return "Radio Button"; + case SLIDER: return "Slider"; + case SPINNER: return "Spinner"; + case TEXTBOX: return "Text Box"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControlEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControlEnumFactory.java new file mode 100644 index 00000000000..2b55c57d8aa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/QuestionnaireItemControlEnumFactory.java @@ -0,0 +1,139 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class QuestionnaireItemControlEnumFactory implements EnumFactory { + + public QuestionnaireItemControl fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return QuestionnaireItemControl.GROUP; + if ("list".equals(codeString)) + return QuestionnaireItemControl.LIST; + if ("table".equals(codeString)) + return QuestionnaireItemControl.TABLE; + if ("header".equals(codeString)) + return QuestionnaireItemControl.HEADER; + if ("footer".equals(codeString)) + return QuestionnaireItemControl.FOOTER; + if ("text".equals(codeString)) + return QuestionnaireItemControl.TEXT; + if ("inline".equals(codeString)) + return QuestionnaireItemControl.INLINE; + if ("prompt".equals(codeString)) + return QuestionnaireItemControl.PROMPT; + if ("unit".equals(codeString)) + return QuestionnaireItemControl.UNIT; + if ("lower".equals(codeString)) + return QuestionnaireItemControl.LOWER; + if ("upper".equals(codeString)) + return QuestionnaireItemControl.UPPER; + if ("flyover".equals(codeString)) + return QuestionnaireItemControl.FLYOVER; + if ("help".equals(codeString)) + return QuestionnaireItemControl.HELP; + if ("question".equals(codeString)) + return QuestionnaireItemControl.QUESTION; + if ("autocomplete".equals(codeString)) + return QuestionnaireItemControl.AUTOCOMPLETE; + if ("drop-down".equals(codeString)) + return QuestionnaireItemControl.DROPDOWN; + if ("check-box".equals(codeString)) + return QuestionnaireItemControl.CHECKBOX; + if ("lookup".equals(codeString)) + return QuestionnaireItemControl.LOOKUP; + if ("radio-button".equals(codeString)) + return QuestionnaireItemControl.RADIOBUTTON; + if ("slider".equals(codeString)) + return QuestionnaireItemControl.SLIDER; + if ("spinner".equals(codeString)) + return QuestionnaireItemControl.SPINNER; + if ("text-box".equals(codeString)) + return QuestionnaireItemControl.TEXTBOX; + throw new IllegalArgumentException("Unknown QuestionnaireItemControl code '"+codeString+"'"); + } + + public String toCode(QuestionnaireItemControl code) { + if (code == QuestionnaireItemControl.GROUP) + return "group"; + if (code == QuestionnaireItemControl.LIST) + return "list"; + if (code == QuestionnaireItemControl.TABLE) + return "table"; + if (code == QuestionnaireItemControl.HEADER) + return "header"; + if (code == QuestionnaireItemControl.FOOTER) + return "footer"; + if (code == QuestionnaireItemControl.TEXT) + return "text"; + if (code == QuestionnaireItemControl.INLINE) + return "inline"; + if (code == QuestionnaireItemControl.PROMPT) + return "prompt"; + if (code == QuestionnaireItemControl.UNIT) + return "unit"; + if (code == QuestionnaireItemControl.LOWER) + return "lower"; + if (code == QuestionnaireItemControl.UPPER) + return "upper"; + if (code == QuestionnaireItemControl.FLYOVER) + return "flyover"; + if (code == QuestionnaireItemControl.HELP) + return "help"; + if (code == QuestionnaireItemControl.QUESTION) + return "question"; + if (code == QuestionnaireItemControl.AUTOCOMPLETE) + return "autocomplete"; + if (code == QuestionnaireItemControl.DROPDOWN) + return "drop-down"; + if (code == QuestionnaireItemControl.CHECKBOX) + return "check-box"; + if (code == QuestionnaireItemControl.LOOKUP) + return "lookup"; + if (code == QuestionnaireItemControl.RADIOBUTTON) + return "radio-button"; + if (code == QuestionnaireItemControl.SLIDER) + return "slider"; + if (code == QuestionnaireItemControl.SPINNER) + return "spinner"; + if (code == QuestionnaireItemControl.TEXTBOX) + return "text-box"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodes.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodes.java new file mode 100644 index 00000000000..fddfea5b7e1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodes.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReasonMedicationGivenCodes { + + /** + * No reason known. + */ + A, + /** + * The administration was following an ordered protocol. + */ + B, + /** + * The administration was needed to treat an emergency. + */ + C, + /** + * added to help the parsers + */ + NULL; + public static ReasonMedicationGivenCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + throw new FHIRException("Unknown ReasonMedicationGivenCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reason-medication-given"; + } + public String getDefinition() { + switch (this) { + case A: return "No reason known."; + case B: return "The administration was following an ordered protocol."; + case C: return "The administration was needed to treat an emergency."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "None"; + case B: return "Given as Ordered"; + case C: return "Emergency"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodesEnumFactory.java new file mode 100644 index 00000000000..4a00be8df99 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationGivenCodesEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ReasonMedicationGivenCodesEnumFactory implements EnumFactory { + + public ReasonMedicationGivenCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ReasonMedicationGivenCodes.A; + if ("b".equals(codeString)) + return ReasonMedicationGivenCodes.B; + if ("c".equals(codeString)) + return ReasonMedicationGivenCodes.C; + throw new IllegalArgumentException("Unknown ReasonMedicationGivenCodes code '"+codeString+"'"); + } + + public String toCode(ReasonMedicationGivenCodes code) { + if (code == ReasonMedicationGivenCodes.A) + return "a"; + if (code == ReasonMedicationGivenCodes.B) + return "b"; + if (code == ReasonMedicationGivenCodes.C) + return "c"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodes.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodes.java new file mode 100644 index 00000000000..38c9df59f1e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodes.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReasonMedicationNotGivenCodes { + + /** + * No reason known. + */ + A, + /** + * The patient was not available when the dose was scheduled. + */ + B, + /** + * The patient was asleep when the dose was scheduled. + */ + C, + /** + * The patient was given the medication and immediately vomited it back. + */ + D, + /** + * added to help the parsers + */ + NULL; + public static ReasonMedicationNotGivenCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + if ("d".equals(codeString)) + return D; + throw new FHIRException("Unknown ReasonMedicationNotGivenCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + case D: return "d"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reason-medication-not-given"; + } + public String getDefinition() { + switch (this) { + case A: return "No reason known."; + case B: return "The patient was not available when the dose was scheduled."; + case C: return "The patient was asleep when the dose was scheduled."; + case D: return "The patient was given the medication and immediately vomited it back."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "None"; + case B: return "Away"; + case C: return "Asleep"; + case D: return "Vomit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodesEnumFactory.java new file mode 100644 index 00000000000..7038f3e1d3f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ReasonMedicationNotGivenCodesEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ReasonMedicationNotGivenCodesEnumFactory implements EnumFactory { + + public ReasonMedicationNotGivenCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ReasonMedicationNotGivenCodes.A; + if ("b".equals(codeString)) + return ReasonMedicationNotGivenCodes.B; + if ("c".equals(codeString)) + return ReasonMedicationNotGivenCodes.C; + if ("d".equals(codeString)) + return ReasonMedicationNotGivenCodes.D; + throw new IllegalArgumentException("Unknown ReasonMedicationNotGivenCodes code '"+codeString+"'"); + } + + public String toCode(ReasonMedicationNotGivenCodes code) { + if (code == ReasonMedicationNotGivenCodes.A) + return "a"; + if (code == ReasonMedicationNotGivenCodes.B) + return "b"; + if (code == ReasonMedicationNotGivenCodes.C) + return "c"; + if (code == ReasonMedicationNotGivenCodes.D) + return "d"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Relationship.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Relationship.java new file mode 100644 index 00000000000..68c1573067d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Relationship.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Relationship { + + /** + * null + */ + _1, + /** + * null + */ + _2, + /** + * null + */ + _3, + /** + * null + */ + _4, + /** + * null + */ + _5, + /** + * added to help the parsers + */ + NULL; + public static Relationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + throw new FHIRException("Unknown Relationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/relationship"; + } + public String getDefinition() { + switch (this) { + case _1: return ""; + case _2: return ""; + case _3: return ""; + case _4: return ""; + case _5: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RelationshipEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RelationshipEnumFactory.java new file mode 100644 index 00000000000..064208d88de --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RelationshipEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class RelationshipEnumFactory implements EnumFactory { + + public Relationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return Relationship._1; + if ("2".equals(codeString)) + return Relationship._2; + if ("3".equals(codeString)) + return Relationship._3; + if ("4".equals(codeString)) + return Relationship._4; + if ("5".equals(codeString)) + return Relationship._5; + throw new IllegalArgumentException("Unknown Relationship code '"+codeString+"'"); + } + + public String toCode(Relationship code) { + if (code == Relationship._1) + return "1"; + if (code == Relationship._2) + return "2"; + if (code == Relationship._3) + return "3"; + if (code == Relationship._4) + return "4"; + if (code == Relationship._5) + return "5"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationMode.java new file mode 100644 index 00000000000..0ea0ff3ffa2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceValidationMode { + + /** + * The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints). + */ + CREATE, + /** + * The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate). + */ + UPDATE, + /** + * The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules). + */ + DELETE, + /** + * added to help the parsers + */ + NULL; + public static ResourceValidationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("delete".equals(codeString)) + return DELETE; + throw new FHIRException("Unknown ResourceValidationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case DELETE: return "delete"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-validation-mode"; + } + public String getDefinition() { + switch (this) { + case CREATE: return "The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints)."; + case UPDATE: return "The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate)."; + case DELETE: return "The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Validate for Create"; + case UPDATE: return "Validate for Update"; + case DELETE: return "Validate for Delete"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationModeEnumFactory.java new file mode 100644 index 00000000000..bfa5544c08c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ResourceValidationModeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ResourceValidationModeEnumFactory implements EnumFactory { + + public ResourceValidationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return ResourceValidationMode.CREATE; + if ("update".equals(codeString)) + return ResourceValidationMode.UPDATE; + if ("delete".equals(codeString)) + return ResourceValidationMode.DELETE; + throw new IllegalArgumentException("Unknown ResourceValidationMode code '"+codeString+"'"); + } + + public String toCode(ResourceValidationMode code) { + if (code == ResourceValidationMode.CREATE) + return "create"; + if (code == ResourceValidationMode.UPDATE) + return "update"; + if (code == ResourceValidationMode.DELETE) + return "delete"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityService.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityService.java new file mode 100644 index 00000000000..93d87f162f9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityService.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RestfulSecurityService { + + /** + * Oauth (unspecified version see oauth.net). + */ + OAUTH, + /** + * OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org/). + */ + SMARTONFHIR, + /** + * Microsoft NTLM Authentication. + */ + NTLM, + /** + * Basic authentication defined in HTTP specification. + */ + BASIC, + /** + * see http://www.ietf.org/rfc/rfc4120.txt. + */ + KERBEROS, + /** + * SSL where client must have a certificate registered with the server. + */ + CERTIFICATES, + /** + * added to help the parsers + */ + NULL; + public static RestfulSecurityService fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OAuth".equals(codeString)) + return OAUTH; + if ("SMART-on-FHIR".equals(codeString)) + return SMARTONFHIR; + if ("NTLM".equals(codeString)) + return NTLM; + if ("Basic".equals(codeString)) + return BASIC; + if ("Kerberos".equals(codeString)) + return KERBEROS; + if ("Certificates".equals(codeString)) + return CERTIFICATES; + throw new FHIRException("Unknown RestfulSecurityService code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OAUTH: return "OAuth"; + case SMARTONFHIR: return "SMART-on-FHIR"; + case NTLM: return "NTLM"; + case BASIC: return "Basic"; + case KERBEROS: return "Kerberos"; + case CERTIFICATES: return "Certificates"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/restful-security-service"; + } + public String getDefinition() { + switch (this) { + case OAUTH: return "Oauth (unspecified version see oauth.net)."; + case SMARTONFHIR: return "OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org/)."; + case NTLM: return "Microsoft NTLM Authentication."; + case BASIC: return "Basic authentication defined in HTTP specification."; + case KERBEROS: return "see http://www.ietf.org/rfc/rfc4120.txt."; + case CERTIFICATES: return "SSL where client must have a certificate registered with the server."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OAUTH: return "OAuth"; + case SMARTONFHIR: return "SMART-on-FHIR"; + case NTLM: return "NTLM"; + case BASIC: return "Basic"; + case KERBEROS: return "Kerberos"; + case CERTIFICATES: return "Certificates"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityServiceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityServiceEnumFactory.java new file mode 100644 index 00000000000..7e1f6840e52 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RestfulSecurityServiceEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class RestfulSecurityServiceEnumFactory implements EnumFactory { + + public RestfulSecurityService fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OAuth".equals(codeString)) + return RestfulSecurityService.OAUTH; + if ("SMART-on-FHIR".equals(codeString)) + return RestfulSecurityService.SMARTONFHIR; + if ("NTLM".equals(codeString)) + return RestfulSecurityService.NTLM; + if ("Basic".equals(codeString)) + return RestfulSecurityService.BASIC; + if ("Kerberos".equals(codeString)) + return RestfulSecurityService.KERBEROS; + if ("Certificates".equals(codeString)) + return RestfulSecurityService.CERTIFICATES; + throw new IllegalArgumentException("Unknown RestfulSecurityService code '"+codeString+"'"); + } + + public String toCode(RestfulSecurityService code) { + if (code == RestfulSecurityService.OAUTH) + return "OAuth"; + if (code == RestfulSecurityService.SMARTONFHIR) + return "SMART-on-FHIR"; + if (code == RestfulSecurityService.NTLM) + return "NTLM"; + if (code == RestfulSecurityService.BASIC) + return "Basic"; + if (code == RestfulSecurityService.KERBEROS) + return "Kerberos"; + if (code == RestfulSecurityService.CERTIFICATES) + return "Certificates"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbability.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbability.java new file mode 100644 index 00000000000..7311f5fda75 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbability.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RiskProbability { + + /** + * The specified outcome is exceptionally unlikely. + */ + NEGLIGIBLE, + /** + * The specified outcome is possible but unlikely. + */ + LOW, + /** + * The specified outcome has a reasonable likelihood of occurrence. + */ + MODERATE, + /** + * The specified outcome is more likely to occur than not. + */ + HIGH, + /** + * The specified outcome is effectively guaranteed. + */ + CERTAIN, + /** + * added to help the parsers + */ + NULL; + public static RiskProbability fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("negligible".equals(codeString)) + return NEGLIGIBLE; + if ("low".equals(codeString)) + return LOW; + if ("moderate".equals(codeString)) + return MODERATE; + if ("high".equals(codeString)) + return HIGH; + if ("certain".equals(codeString)) + return CERTAIN; + throw new FHIRException("Unknown RiskProbability code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NEGLIGIBLE: return "negligible"; + case LOW: return "low"; + case MODERATE: return "moderate"; + case HIGH: return "high"; + case CERTAIN: return "certain"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/risk-probability"; + } + public String getDefinition() { + switch (this) { + case NEGLIGIBLE: return "The specified outcome is exceptionally unlikely."; + case LOW: return "The specified outcome is possible but unlikely."; + case MODERATE: return "The specified outcome has a reasonable likelihood of occurrence."; + case HIGH: return "The specified outcome is more likely to occur than not."; + case CERTAIN: return "The specified outcome is effectively guaranteed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NEGLIGIBLE: return "Negligible likelihood"; + case LOW: return "Low likelihood"; + case MODERATE: return "Moderate likelihood"; + case HIGH: return "High likelihood"; + case CERTAIN: return "Certain"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbabilityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbabilityEnumFactory.java new file mode 100644 index 00000000000..2d3003660c5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RiskProbabilityEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class RiskProbabilityEnumFactory implements EnumFactory { + + public RiskProbability fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("negligible".equals(codeString)) + return RiskProbability.NEGLIGIBLE; + if ("low".equals(codeString)) + return RiskProbability.LOW; + if ("moderate".equals(codeString)) + return RiskProbability.MODERATE; + if ("high".equals(codeString)) + return RiskProbability.HIGH; + if ("certain".equals(codeString)) + return RiskProbability.CERTAIN; + throw new IllegalArgumentException("Unknown RiskProbability code '"+codeString+"'"); + } + + public String toCode(RiskProbability code) { + if (code == RiskProbability.NEGLIGIBLE) + return "negligible"; + if (code == RiskProbability.LOW) + return "low"; + if (code == RiskProbability.MODERATE) + return "moderate"; + if (code == RiskProbability.HIGH) + return "high"; + if (code == RiskProbability.CERTAIN) + return "certain"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Ruleset.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Ruleset.java new file mode 100644 index 00000000000..a5c434fc6e2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Ruleset.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Ruleset { + + /** + * null + */ + X124010, + /** + * null + */ + X125010, + /** + * null + */ + X127010, + /** + * null + */ + CDANETV2, + /** + * null + */ + CDANETV4, + /** + * null + */ + CPHA3, + /** + * added to help the parsers + */ + NULL; + public static Ruleset fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("x12-4010".equals(codeString)) + return X124010; + if ("x12-5010".equals(codeString)) + return X125010; + if ("x12-7010".equals(codeString)) + return X127010; + if ("cdanet-v2".equals(codeString)) + return CDANETV2; + if ("cdanet-v4".equals(codeString)) + return CDANETV4; + if ("cpha-3".equals(codeString)) + return CPHA3; + throw new FHIRException("Unknown Ruleset code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case X124010: return "x12-4010"; + case X125010: return "x12-5010"; + case X127010: return "x12-7010"; + case CDANETV2: return "cdanet-v2"; + case CDANETV4: return "cdanet-v4"; + case CPHA3: return "cpha-3"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ruleset"; + } + public String getDefinition() { + switch (this) { + case X124010: return ""; + case X125010: return ""; + case X127010: return ""; + case CDANETV2: return ""; + case CDANETV4: return ""; + case CPHA3: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case X124010: return "x12-4010"; + case X125010: return "x12-5010"; + case X127010: return "x12-7010"; + case CDANETV2: return "cdanet-v2"; + case CDANETV4: return "cdanet-v4"; + case CPHA3: return "cpha-3"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RulesetEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RulesetEnumFactory.java new file mode 100644 index 00000000000..10e4eeaaf2f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/RulesetEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class RulesetEnumFactory implements EnumFactory { + + public Ruleset fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("x12-4010".equals(codeString)) + return Ruleset.X124010; + if ("x12-5010".equals(codeString)) + return Ruleset.X125010; + if ("x12-7010".equals(codeString)) + return Ruleset.X127010; + if ("cdanet-v2".equals(codeString)) + return Ruleset.CDANETV2; + if ("cdanet-v4".equals(codeString)) + return Ruleset.CDANETV4; + if ("cpha-3".equals(codeString)) + return Ruleset.CPHA3; + throw new IllegalArgumentException("Unknown Ruleset code '"+codeString+"'"); + } + + public String toCode(Ruleset code) { + if (code == Ruleset.X124010) + return "x12-4010"; + if (code == Ruleset.X125010) + return "x12-5010"; + if (code == Ruleset.X127010) + return "x12-7010"; + if (code == Ruleset.CDANETV2) + return "cdanet-v2"; + if (code == Ruleset.CDANETV4) + return "cdanet-v4"; + if (code == Ruleset.CPHA3) + return "cpha-3"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacy.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacy.java new file mode 100644 index 00000000000..6d476025d43 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacy.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServicePharmacy { + + /** + * Smoking cessation + */ + SMOKECESS, + /** + * Flu Shot + */ + FLUSHOT, + /** + * added to help the parsers + */ + NULL; + public static ServicePharmacy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("smokecess".equals(codeString)) + return SMOKECESS; + if ("flushot".equals(codeString)) + return FLUSHOT; + throw new FHIRException("Unknown ServicePharmacy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SMOKECESS: return "smokecess"; + case FLUSHOT: return "flushot"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-pharmaservice"; + } + public String getDefinition() { + switch (this) { + case SMOKECESS: return "Smoking cessation"; + case FLUSHOT: return "Flu Shot"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SMOKECESS: return "Smoking cessation"; + case FLUSHOT: return "Flu Shot"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacyEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacyEnumFactory.java new file mode 100644 index 00000000000..21f71a6f350 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServicePharmacyEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ServicePharmacyEnumFactory implements EnumFactory { + + public ServicePharmacy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("smokecess".equals(codeString)) + return ServicePharmacy.SMOKECESS; + if ("flushot".equals(codeString)) + return ServicePharmacy.FLUSHOT; + throw new IllegalArgumentException("Unknown ServicePharmacy code '"+codeString+"'"); + } + + public String toCode(ServicePharmacy code) { + if (code == ServicePharmacy.SMOKECESS) + return "smokecess"; + if (code == ServicePharmacy.FLUSHOT) + return "flushot"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProduct.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProduct.java new file mode 100644 index 00000000000..a59378b4ab1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProduct.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceProduct { + + /** + * Exam + */ + EXAM, + /** + * Flu shot + */ + FLUSHOT, + /** + * added to help the parsers + */ + NULL; + public static ServiceProduct fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("exam".equals(codeString)) + return EXAM; + if ("flushot".equals(codeString)) + return FLUSHOT; + throw new FHIRException("Unknown ServiceProduct code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EXAM: return "exam"; + case FLUSHOT: return "flushot"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-serviceproduct"; + } + public String getDefinition() { + switch (this) { + case EXAM: return "Exam"; + case FLUSHOT: return "Flu shot"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EXAM: return "Exam"; + case FLUSHOT: return "Flu shot"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProductEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProductEnumFactory.java new file mode 100644 index 00000000000..f4878857edc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProductEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ServiceProductEnumFactory implements EnumFactory { + + public ServiceProduct fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("exam".equals(codeString)) + return ServiceProduct.EXAM; + if ("flushot".equals(codeString)) + return ServiceProduct.FLUSHOT; + throw new IllegalArgumentException("Unknown ServiceProduct code '"+codeString+"'"); + } + + public String toCode(ServiceProduct code) { + if (code == ServiceProduct.EXAM) + return "exam"; + if (code == ServiceProduct.FLUSHOT) + return "flushot"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditions.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditions.java new file mode 100644 index 00000000000..850d6c36f97 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditions.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceProvisionConditions { + + /** + * This service is available for no patient cost. + */ + FREE, + /** + * There are discounts available on this service for qualifying patients. + */ + DISC, + /** + * Fees apply for this service. + */ + COST, + /** + * added to help the parsers + */ + NULL; + public static ServiceProvisionConditions fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("free".equals(codeString)) + return FREE; + if ("disc".equals(codeString)) + return DISC; + if ("cost".equals(codeString)) + return COST; + throw new FHIRException("Unknown ServiceProvisionConditions code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FREE: return "free"; + case DISC: return "disc"; + case COST: return "cost"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-provision-conditions"; + } + public String getDefinition() { + switch (this) { + case FREE: return "This service is available for no patient cost."; + case DISC: return "There are discounts available on this service for qualifying patients."; + case COST: return "Fees apply for this service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FREE: return "Free"; + case DISC: return "Discounts Available"; + case COST: return "Fees apply"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditionsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditionsEnumFactory.java new file mode 100644 index 00000000000..3193e78350c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceProvisionConditionsEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ServiceProvisionConditionsEnumFactory implements EnumFactory { + + public ServiceProvisionConditions fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("free".equals(codeString)) + return ServiceProvisionConditions.FREE; + if ("disc".equals(codeString)) + return ServiceProvisionConditions.DISC; + if ("cost".equals(codeString)) + return ServiceProvisionConditions.COST; + throw new IllegalArgumentException("Unknown ServiceProvisionConditions code '"+codeString+"'"); + } + + public String toCode(ServiceProvisionConditions code) { + if (code == ServiceProvisionConditions.FREE) + return "free"; + if (code == ServiceProvisionConditions.DISC) + return "disc"; + if (code == ServiceProvisionConditions.COST) + return "cost"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethod.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethod.java new file mode 100644 index 00000000000..0f3d5347594 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethod.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceReferralMethod { + + /** + * Referrals may be accepted by fax. + */ + FAX, + /** + * Referrals may be accepted over the phone from a practitioner. + */ + PHONE, + /** + * Referrals may be accepted via a secure messaging system. To determine the types of secure messaging systems supported, refer to the identifiers collection. Callers will need to understand the specific identifier system used to know that they are able to transmit messages. + */ + ELEC, + /** + * Referrals may be accepted via a secure email. To send please enrypt with the services public key. + */ + SEMAIL, + /** + * Referrals may be accepted via regular postage (or hand delivered). + */ + MAIL, + /** + * added to help the parsers + */ + NULL; + public static ServiceReferralMethod fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fax".equals(codeString)) + return FAX; + if ("phone".equals(codeString)) + return PHONE; + if ("elec".equals(codeString)) + return ELEC; + if ("semail".equals(codeString)) + return SEMAIL; + if ("mail".equals(codeString)) + return MAIL; + throw new FHIRException("Unknown ServiceReferralMethod code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FAX: return "fax"; + case PHONE: return "phone"; + case ELEC: return "elec"; + case SEMAIL: return "semail"; + case MAIL: return "mail"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-referral-method"; + } + public String getDefinition() { + switch (this) { + case FAX: return "Referrals may be accepted by fax."; + case PHONE: return "Referrals may be accepted over the phone from a practitioner."; + case ELEC: return "Referrals may be accepted via a secure messaging system. To determine the types of secure messaging systems supported, refer to the identifiers collection. Callers will need to understand the specific identifier system used to know that they are able to transmit messages."; + case SEMAIL: return "Referrals may be accepted via a secure email. To send please enrypt with the services public key."; + case MAIL: return "Referrals may be accepted via regular postage (or hand delivered)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FAX: return "Fax"; + case PHONE: return "Phone"; + case ELEC: return "Secure Messaging"; + case SEMAIL: return "Secure Email"; + case MAIL: return "Mail"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethodEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethodEnumFactory.java new file mode 100644 index 00000000000..efff5cb719e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceReferralMethodEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ServiceReferralMethodEnumFactory implements EnumFactory { + + public ServiceReferralMethod fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fax".equals(codeString)) + return ServiceReferralMethod.FAX; + if ("phone".equals(codeString)) + return ServiceReferralMethod.PHONE; + if ("elec".equals(codeString)) + return ServiceReferralMethod.ELEC; + if ("semail".equals(codeString)) + return ServiceReferralMethod.SEMAIL; + if ("mail".equals(codeString)) + return ServiceReferralMethod.MAIL; + throw new IllegalArgumentException("Unknown ServiceReferralMethod code '"+codeString+"'"); + } + + public String toCode(ServiceReferralMethod code) { + if (code == ServiceReferralMethod.FAX) + return "fax"; + if (code == ServiceReferralMethod.PHONE) + return "phone"; + if (code == ServiceReferralMethod.ELEC) + return "elec"; + if (code == ServiceReferralMethod.SEMAIL) + return "semail"; + if (code == ServiceReferralMethod.MAIL) + return "mail"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUscls.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUscls.java new file mode 100644 index 00000000000..f9dcbd08c85 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUscls.java @@ -0,0 +1,240 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceUscls { + + /** + * Exam, comp, primary + */ + _1101, + /** + * Exam, comp, mixed + */ + _1102, + /** + * Exam, comp, permanent + */ + _1103, + /** + * Exam, recall + */ + _1201, + /** + * Exam, emergency + */ + _1205, + /** + * Radiograph, series (12) + */ + _2101, + /** + * Radiograph, series (16) + */ + _2102, + /** + * Radiograph, bytewing + */ + _2141, + /** + * Radiograph, panoramic + */ + _2601, + /** + * Polishing, 1 unit + */ + _11101, + /** + * Polishing, 2 unit + */ + _11102, + /** + * Polishing, 3 unit + */ + _11103, + /** + * Polishing, 4 unit + */ + _11104, + /** + * Amalgam, 1 surface + */ + _21211, + /** + * Amalgam, 2 surface + */ + _21212, + /** + * Crown, PFM + */ + _27211, + /** + * Lab, commercial + */ + _99111, + /** + * Lab, in office + */ + _99333, + /** + * Expense + */ + _99555, + /** + * added to help the parsers + */ + NULL; + public static ServiceUscls fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1101".equals(codeString)) + return _1101; + if ("1102".equals(codeString)) + return _1102; + if ("1103".equals(codeString)) + return _1103; + if ("1201".equals(codeString)) + return _1201; + if ("1205".equals(codeString)) + return _1205; + if ("2101".equals(codeString)) + return _2101; + if ("2102".equals(codeString)) + return _2102; + if ("2141".equals(codeString)) + return _2141; + if ("2601".equals(codeString)) + return _2601; + if ("11101".equals(codeString)) + return _11101; + if ("11102".equals(codeString)) + return _11102; + if ("11103".equals(codeString)) + return _11103; + if ("11104".equals(codeString)) + return _11104; + if ("21211".equals(codeString)) + return _21211; + if ("21212".equals(codeString)) + return _21212; + if ("27211".equals(codeString)) + return _27211; + if ("99111".equals(codeString)) + return _99111; + if ("99333".equals(codeString)) + return _99333; + if ("99555".equals(codeString)) + return _99555; + throw new FHIRException("Unknown ServiceUscls code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1101: return "1101"; + case _1102: return "1102"; + case _1103: return "1103"; + case _1201: return "1201"; + case _1205: return "1205"; + case _2101: return "2101"; + case _2102: return "2102"; + case _2141: return "2141"; + case _2601: return "2601"; + case _11101: return "11101"; + case _11102: return "11102"; + case _11103: return "11103"; + case _11104: return "11104"; + case _21211: return "21211"; + case _21212: return "21212"; + case _27211: return "27211"; + case _99111: return "99111"; + case _99333: return "99333"; + case _99555: return "99555"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-USCLS"; + } + public String getDefinition() { + switch (this) { + case _1101: return "Exam, comp, primary"; + case _1102: return "Exam, comp, mixed"; + case _1103: return "Exam, comp, permanent"; + case _1201: return "Exam, recall"; + case _1205: return "Exam, emergency"; + case _2101: return "Radiograph, series (12)"; + case _2102: return "Radiograph, series (16)"; + case _2141: return "Radiograph, bytewing"; + case _2601: return "Radiograph, panoramic"; + case _11101: return "Polishing, 1 unit"; + case _11102: return "Polishing, 2 unit"; + case _11103: return "Polishing, 3 unit"; + case _11104: return "Polishing, 4 unit"; + case _21211: return "Amalgam, 1 surface"; + case _21212: return "Amalgam, 2 surface"; + case _27211: return "Crown, PFM"; + case _99111: return "Lab, commercial"; + case _99333: return "Lab, in office"; + case _99555: return "Expense"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1101: return "Exam, comp, primary"; + case _1102: return "Exam, comp, mixed"; + case _1103: return "Exam, comp, permanent"; + case _1201: return "Exam, recall"; + case _1205: return "Exam, emergency"; + case _2101: return "Radiograph, series (12)"; + case _2102: return "Radiograph, series (16)"; + case _2141: return "Radiograph, bytewing"; + case _2601: return "Radiograph, panoramic"; + case _11101: return "Polishing, 1 unit"; + case _11102: return "Polishing, 2 unit"; + case _11103: return "Polishing, 3 unit"; + case _11104: return "Polishing, 4 unit"; + case _21211: return "Amalgam, 1 surface"; + case _21212: return "Amalgam, 2 surface"; + case _27211: return "Crown, PFM"; + case _99111: return "Lab, commercial"; + case _99333: return "Lab, in office"; + case _99555: return "Expense"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUsclsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUsclsEnumFactory.java new file mode 100644 index 00000000000..4e69406685e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ServiceUsclsEnumFactory.java @@ -0,0 +1,127 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ServiceUsclsEnumFactory implements EnumFactory { + + public ServiceUscls fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1101".equals(codeString)) + return ServiceUscls._1101; + if ("1102".equals(codeString)) + return ServiceUscls._1102; + if ("1103".equals(codeString)) + return ServiceUscls._1103; + if ("1201".equals(codeString)) + return ServiceUscls._1201; + if ("1205".equals(codeString)) + return ServiceUscls._1205; + if ("2101".equals(codeString)) + return ServiceUscls._2101; + if ("2102".equals(codeString)) + return ServiceUscls._2102; + if ("2141".equals(codeString)) + return ServiceUscls._2141; + if ("2601".equals(codeString)) + return ServiceUscls._2601; + if ("11101".equals(codeString)) + return ServiceUscls._11101; + if ("11102".equals(codeString)) + return ServiceUscls._11102; + if ("11103".equals(codeString)) + return ServiceUscls._11103; + if ("11104".equals(codeString)) + return ServiceUscls._11104; + if ("21211".equals(codeString)) + return ServiceUscls._21211; + if ("21212".equals(codeString)) + return ServiceUscls._21212; + if ("27211".equals(codeString)) + return ServiceUscls._27211; + if ("99111".equals(codeString)) + return ServiceUscls._99111; + if ("99333".equals(codeString)) + return ServiceUscls._99333; + if ("99555".equals(codeString)) + return ServiceUscls._99555; + throw new IllegalArgumentException("Unknown ServiceUscls code '"+codeString+"'"); + } + + public String toCode(ServiceUscls code) { + if (code == ServiceUscls._1101) + return "1101"; + if (code == ServiceUscls._1102) + return "1102"; + if (code == ServiceUscls._1103) + return "1103"; + if (code == ServiceUscls._1201) + return "1201"; + if (code == ServiceUscls._1205) + return "1205"; + if (code == ServiceUscls._2101) + return "2101"; + if (code == ServiceUscls._2102) + return "2102"; + if (code == ServiceUscls._2141) + return "2141"; + if (code == ServiceUscls._2601) + return "2601"; + if (code == ServiceUscls._11101) + return "11101"; + if (code == ServiceUscls._11102) + return "11102"; + if (code == ServiceUscls._11103) + return "11103"; + if (code == ServiceUscls._11104) + return "11104"; + if (code == ServiceUscls._21211) + return "21211"; + if (code == ServiceUscls._21212) + return "21212"; + if (code == ServiceUscls._27211) + return "27211"; + if (code == ServiceUscls._99111) + return "99111"; + if (code == ServiceUscls._99333) + return "99333"; + if (code == ServiceUscls._99555) + return "99555"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureType.java new file mode 100644 index 00000000000..3c22b7ac1f7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureType.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SignatureType { + + /** + * the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document. + */ + OID_1_2_840_10065_1_12_1_1, + /** + * the signature of a health information document coauthor. There can be multiple coauthors of a health information document. + */ + OID_1_2_840_10065_1_12_1_2, + /** + * the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.) + */ + OID_1_2_840_10065_1_12_1_3, + /** + * the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format. + */ + OID_1_2_840_10065_1_12_1_4, + /** + * a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.) + */ + OID_1_2_840_10065_1_12_1_5, + /** + * a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.) + */ + OID_1_2_840_10065_1_12_1_6, + /** + * the signature of an individual consenting to what is described in a health information document. + */ + OID_1_2_840_10065_1_12_1_7, + /** + * the signature of a witness to any other signature. + */ + OID_1_2_840_10065_1_12_1_8, + /** + * the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.) + */ + OID_1_2_840_10065_1_12_1_9, + /** + * the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.) + */ + OID_1_2_840_10065_1_12_1_10, + /** + * the signature of an individual who has witnessed the health care provider counselling a patient. + */ + OID_1_2_840_10065_1_12_1_11, + /** + * the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment. + */ + OID_1_2_840_10065_1_12_1_12, + /** + * the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.) + */ + OID_1_2_840_10065_1_12_1_13, + /** + * the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.) + */ + OID_1_2_840_10065_1_12_1_14, + /** + * the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand. + */ + OID_1_2_840_10065_1_12_1_15, + /** + * the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document. + */ + OID_1_2_840_10065_1_12_1_16, + /** + * the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record. + */ + OID_1_2_840_10065_1_12_1_17, + /** + * the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute. + */ + OID_1_2_840_10065_1_12_1_18, + /** + * added to help the parsers + */ + NULL; + public static SignatureType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return OID_1_2_840_10065_1_12_1_17; + if ("1.2.840.10065.1.12.1.18".equals(codeString)) + return OID_1_2_840_10065_1_12_1_18; + throw new FHIRException("Unknown SignatureType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "1.2.840.10065.1.12.1.1"; + case OID_1_2_840_10065_1_12_1_2: return "1.2.840.10065.1.12.1.2"; + case OID_1_2_840_10065_1_12_1_3: return "1.2.840.10065.1.12.1.3"; + case OID_1_2_840_10065_1_12_1_4: return "1.2.840.10065.1.12.1.4"; + case OID_1_2_840_10065_1_12_1_5: return "1.2.840.10065.1.12.1.5"; + case OID_1_2_840_10065_1_12_1_6: return "1.2.840.10065.1.12.1.6"; + case OID_1_2_840_10065_1_12_1_7: return "1.2.840.10065.1.12.1.7"; + case OID_1_2_840_10065_1_12_1_8: return "1.2.840.10065.1.12.1.8"; + case OID_1_2_840_10065_1_12_1_9: return "1.2.840.10065.1.12.1.9"; + case OID_1_2_840_10065_1_12_1_10: return "1.2.840.10065.1.12.1.10"; + case OID_1_2_840_10065_1_12_1_11: return "1.2.840.10065.1.12.1.11"; + case OID_1_2_840_10065_1_12_1_12: return "1.2.840.10065.1.12.1.12"; + case OID_1_2_840_10065_1_12_1_13: return "1.2.840.10065.1.12.1.13"; + case OID_1_2_840_10065_1_12_1_14: return "1.2.840.10065.1.12.1.14"; + case OID_1_2_840_10065_1_12_1_15: return "1.2.840.10065.1.12.1.15"; + case OID_1_2_840_10065_1_12_1_16: return "1.2.840.10065.1.12.1.16"; + case OID_1_2_840_10065_1_12_1_17: return "1.2.840.10065.1.12.1.17"; + case OID_1_2_840_10065_1_12_1_18: return "1.2.840.10065.1.12.1.18"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/valueset-signature-type"; + } + public String getDefinition() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document."; + case OID_1_2_840_10065_1_12_1_2: return "the signature of a health information document coauthor. There can be multiple coauthors of a health information document."; + case OID_1_2_840_10065_1_12_1_3: return "the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.)"; + case OID_1_2_840_10065_1_12_1_4: return "the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format."; + case OID_1_2_840_10065_1_12_1_5: return "a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.)"; + case OID_1_2_840_10065_1_12_1_6: return "a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.)"; + case OID_1_2_840_10065_1_12_1_7: return "the signature of an individual consenting to what is described in a health information document."; + case OID_1_2_840_10065_1_12_1_8: return "the signature of a witness to any other signature."; + case OID_1_2_840_10065_1_12_1_9: return "the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.)"; + case OID_1_2_840_10065_1_12_1_10: return "the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.)"; + case OID_1_2_840_10065_1_12_1_11: return "the signature of an individual who has witnessed the health care provider counselling a patient."; + case OID_1_2_840_10065_1_12_1_12: return "the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment."; + case OID_1_2_840_10065_1_12_1_13: return "the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.)"; + case OID_1_2_840_10065_1_12_1_14: return "the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.)"; + case OID_1_2_840_10065_1_12_1_15: return "the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand."; + case OID_1_2_840_10065_1_12_1_16: return "the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document."; + case OID_1_2_840_10065_1_12_1_17: return "the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record."; + case OID_1_2_840_10065_1_12_1_18: return "the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "Author's Signature"; + case OID_1_2_840_10065_1_12_1_2: return "Coauthor's Signature"; + case OID_1_2_840_10065_1_12_1_3: return "Co-participant's Signature"; + case OID_1_2_840_10065_1_12_1_4: return "Transcriptionist/Recorder Signature"; + case OID_1_2_840_10065_1_12_1_5: return "Verification Signature"; + case OID_1_2_840_10065_1_12_1_6: return "Validation Sianature"; + case OID_1_2_840_10065_1_12_1_7: return "Consent Signature"; + case OID_1_2_840_10065_1_12_1_8: return "Signature Witness Signature"; + case OID_1_2_840_10065_1_12_1_9: return "Event Witness Signature"; + case OID_1_2_840_10065_1_12_1_10: return "Identity Witness Signature"; + case OID_1_2_840_10065_1_12_1_11: return "Consent Witness Signature"; + case OID_1_2_840_10065_1_12_1_12: return "Interpreter Signature"; + case OID_1_2_840_10065_1_12_1_13: return "Review Signature"; + case OID_1_2_840_10065_1_12_1_14: return "Source Signature"; + case OID_1_2_840_10065_1_12_1_15: return "Addendum Signature"; + case OID_1_2_840_10065_1_12_1_16: return "Modification Signature"; + case OID_1_2_840_10065_1_12_1_17: return "Administrative (Error/Edit) Signature"; + case OID_1_2_840_10065_1_12_1_18: return "Timestamp Signature"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureTypeEnumFactory.java new file mode 100644 index 00000000000..4255279b945 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SignatureTypeEnumFactory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SignatureTypeEnumFactory implements EnumFactory { + + public SignatureType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_17; + if ("1.2.840.10065.1.12.1.18".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_18; + throw new IllegalArgumentException("Unknown SignatureType code '"+codeString+"'"); + } + + public String toCode(SignatureType code) { + if (code == SignatureType.OID_1_2_840_10065_1_12_1_1) + return "1.2.840.10065.1.12.1.1"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_2) + return "1.2.840.10065.1.12.1.2"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_3) + return "1.2.840.10065.1.12.1.3"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_4) + return "1.2.840.10065.1.12.1.4"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_5) + return "1.2.840.10065.1.12.1.5"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_6) + return "1.2.840.10065.1.12.1.6"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_7) + return "1.2.840.10065.1.12.1.7"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_8) + return "1.2.840.10065.1.12.1.8"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_9) + return "1.2.840.10065.1.12.1.9"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_10) + return "1.2.840.10065.1.12.1.10"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_11) + return "1.2.840.10065.1.12.1.11"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_12) + return "1.2.840.10065.1.12.1.12"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_13) + return "1.2.840.10065.1.12.1.13"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_14) + return "1.2.840.10065.1.12.1.14"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_15) + return "1.2.840.10065.1.12.1.15"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_16) + return "1.2.840.10065.1.12.1.16"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_17) + return "1.2.840.10065.1.12.1.17"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_18) + return "1.2.840.10065.1.12.1.18"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTag.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTag.java new file mode 100644 index 00000000000..ac74d8cd50c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTag.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubscriptionTag { + + /** + * The message has been queued for processing on a destination systems. + */ + QUEUED, + /** + * The message has been delivered to its intended recipient. + */ + DELIVERED, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionTag fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("queued".equals(codeString)) + return QUEUED; + if ("delivered".equals(codeString)) + return DELIVERED; + throw new FHIRException("Unknown SubscriptionTag code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case QUEUED: return "queued"; + case DELIVERED: return "delivered"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/subscription-tag"; + } + public String getDefinition() { + switch (this) { + case QUEUED: return "The message has been queued for processing on a destination systems."; + case DELIVERED: return "The message has been delivered to its intended recipient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case QUEUED: return "Queued"; + case DELIVERED: return "Delivered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTagEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTagEnumFactory.java new file mode 100644 index 00000000000..85eba8a47cf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubscriptionTagEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SubscriptionTagEnumFactory implements EnumFactory { + + public SubscriptionTag fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("queued".equals(codeString)) + return SubscriptionTag.QUEUED; + if ("delivered".equals(codeString)) + return SubscriptionTag.DELIVERED; + throw new IllegalArgumentException("Unknown SubscriptionTag code '"+codeString+"'"); + } + + public String toCode(SubscriptionTag code) { + if (code == SubscriptionTag.QUEUED) + return "queued"; + if (code == SubscriptionTag.DELIVERED) + return "delivered"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategory.java new file mode 100644 index 00000000000..53d3eb435ac --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategory.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubstanceCategory { + + /** + * A substance that causes an allergic reaction. + */ + ALLERGEN, + /** + * A substance that is produced by or extracted from a biological source. + */ + BIOLOGICAL, + /** + * A substance that comes directly from a human or an animal (e.g. blood, urine, feces, tears, etc.). + */ + BODY, + /** + * Any organic or inorganic substance of a particular molecular identity, including -- (i) any combination of such substances occurring in whole or in part as a result of a chemical reaction or occurring in nature and (ii) any element or uncombined radical (http://www.epa.gov/opptintr/import-export/pubs/importguide.pdf). + */ + CHEMICAL, + /** + * A food, dietary ingredient, or dietary supplement for human or animal. + */ + FOOD, + /** + * A substance intended for use in the diagnosis, cure, mitigation, treatment, or prevention of disease in man or other animals (Federal Food Drug and Cosmetic Act). + */ + DRUG, + /** + * A finished product which is not normally ingested, absorbed or injected (e.g. steel, iron, wood, plastic and paper). + */ + MATERIAL, + /** + * added to help the parsers + */ + NULL; + public static SubstanceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergen".equals(codeString)) + return ALLERGEN; + if ("biological".equals(codeString)) + return BIOLOGICAL; + if ("body".equals(codeString)) + return BODY; + if ("chemical".equals(codeString)) + return CHEMICAL; + if ("food".equals(codeString)) + return FOOD; + if ("drug".equals(codeString)) + return DRUG; + if ("material".equals(codeString)) + return MATERIAL; + throw new FHIRException("Unknown SubstanceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALLERGEN: return "allergen"; + case BIOLOGICAL: return "biological"; + case BODY: return "body"; + case CHEMICAL: return "chemical"; + case FOOD: return "food"; + case DRUG: return "drug"; + case MATERIAL: return "material"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/substance-category"; + } + public String getDefinition() { + switch (this) { + case ALLERGEN: return "A substance that causes an allergic reaction."; + case BIOLOGICAL: return "A substance that is produced by or extracted from a biological source."; + case BODY: return "A substance that comes directly from a human or an animal (e.g. blood, urine, feces, tears, etc.)."; + case CHEMICAL: return "Any organic or inorganic substance of a particular molecular identity, including -- (i) any combination of such substances occurring in whole or in part as a result of a chemical reaction or occurring in nature and (ii) any element or uncombined radical (http://www.epa.gov/opptintr/import-export/pubs/importguide.pdf)."; + case FOOD: return "A food, dietary ingredient, or dietary supplement for human or animal."; + case DRUG: return "A substance intended for use in the diagnosis, cure, mitigation, treatment, or prevention of disease in man or other animals (Federal Food Drug and Cosmetic Act)."; + case MATERIAL: return "A finished product which is not normally ingested, absorbed or injected (e.g. steel, iron, wood, plastic and paper)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALLERGEN: return "Allergen"; + case BIOLOGICAL: return "Biological Substance"; + case BODY: return "Body Substance"; + case CHEMICAL: return "Chemical"; + case FOOD: return "Dietary Substance"; + case DRUG: return "Drug or Medicament"; + case MATERIAL: return "Material"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategoryEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategoryEnumFactory.java new file mode 100644 index 00000000000..c11c7c04aa8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SubstanceCategoryEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SubstanceCategoryEnumFactory implements EnumFactory { + + public SubstanceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergen".equals(codeString)) + return SubstanceCategory.ALLERGEN; + if ("biological".equals(codeString)) + return SubstanceCategory.BIOLOGICAL; + if ("body".equals(codeString)) + return SubstanceCategory.BODY; + if ("chemical".equals(codeString)) + return SubstanceCategory.CHEMICAL; + if ("food".equals(codeString)) + return SubstanceCategory.FOOD; + if ("drug".equals(codeString)) + return SubstanceCategory.DRUG; + if ("material".equals(codeString)) + return SubstanceCategory.MATERIAL; + throw new IllegalArgumentException("Unknown SubstanceCategory code '"+codeString+"'"); + } + + public String toCode(SubstanceCategory code) { + if (code == SubstanceCategory.ALLERGEN) + return "allergen"; + if (code == SubstanceCategory.BIOLOGICAL) + return "biological"; + if (code == SubstanceCategory.BODY) + return "body"; + if (code == SubstanceCategory.CHEMICAL) + return "chemical"; + if (code == SubstanceCategory.FOOD) + return "food"; + if (code == SubstanceCategory.DRUG) + return "drug"; + if (code == SubstanceCategory.MATERIAL) + return "material"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryType.java new file mode 100644 index 00000000000..22fe92832ae --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplydeliveryType { + + /** + * Supply is a kind of medication. + */ + MEDICATION, + /** + * What is supplied (or requested) is a device. + */ + DEVICE, + /** + * added to help the parsers + */ + NULL; + public static SupplydeliveryType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("medication".equals(codeString)) + return MEDICATION; + if ("device".equals(codeString)) + return DEVICE; + throw new FHIRException("Unknown SupplydeliveryType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEDICATION: return "medication"; + case DEVICE: return "device"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supply-item-type"; + } + public String getDefinition() { + switch (this) { + case MEDICATION: return "Supply is a kind of medication."; + case DEVICE: return "What is supplied (or requested) is a device."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEDICATION: return "Medication"; + case DEVICE: return "Device"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryTypeEnumFactory.java new file mode 100644 index 00000000000..73e3b49af6d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplydeliveryTypeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SupplydeliveryTypeEnumFactory implements EnumFactory { + + public SupplydeliveryType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("medication".equals(codeString)) + return SupplydeliveryType.MEDICATION; + if ("device".equals(codeString)) + return SupplydeliveryType.DEVICE; + throw new IllegalArgumentException("Unknown SupplydeliveryType code '"+codeString+"'"); + } + + public String toCode(SupplydeliveryType code) { + if (code == SupplydeliveryType.MEDICATION) + return "medication"; + if (code == SupplydeliveryType.DEVICE) + return "device"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKind.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKind.java new file mode 100644 index 00000000000..357ec61f2da --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKind.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplyrequestKind { + + /** + * Supply is stored and requested from central supply. + */ + CENTRAL, + /** + * Supply is not onsite and must be requested from an outside vendor using a non-stock requisition. + */ + NONSTOCK, + /** + * added to help the parsers + */ + NULL; + public static SupplyrequestKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("central".equals(codeString)) + return CENTRAL; + if ("nonstock".equals(codeString)) + return NONSTOCK; + throw new FHIRException("Unknown SupplyrequestKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CENTRAL: return "central"; + case NONSTOCK: return "nonstock"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supply-kind"; + } + public String getDefinition() { + switch (this) { + case CENTRAL: return "Supply is stored and requested from central supply."; + case NONSTOCK: return "Supply is not onsite and must be requested from an outside vendor using a non-stock requisition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CENTRAL: return "Central Supply"; + case NONSTOCK: return "Non-Stock"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKindEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKindEnumFactory.java new file mode 100644 index 00000000000..3889ebc3b52 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestKindEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SupplyrequestKindEnumFactory implements EnumFactory { + + public SupplyrequestKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("central".equals(codeString)) + return SupplyrequestKind.CENTRAL; + if ("nonstock".equals(codeString)) + return SupplyrequestKind.NONSTOCK; + throw new IllegalArgumentException("Unknown SupplyrequestKind code '"+codeString+"'"); + } + + public String toCode(SupplyrequestKind code) { + if (code == SupplyrequestKind.CENTRAL) + return "central"; + if (code == SupplyrequestKind.NONSTOCK) + return "nonstock"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReason.java new file mode 100644 index 00000000000..d757e55599c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReason.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplyrequestReason { + + /** + * The supply has been requested for use in direct patient care. + */ + PATIENTCARE, + /** + * The supply has been requested for for creating or replenishing ward stock. + */ + WARDSTOCK, + /** + * added to help the parsers + */ + NULL; + public static SupplyrequestReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-care".equals(codeString)) + return PATIENTCARE; + if ("ward-stock".equals(codeString)) + return WARDSTOCK; + throw new FHIRException("Unknown SupplyrequestReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENTCARE: return "patient-care"; + case WARDSTOCK: return "ward-stock"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supplyrequest-reason"; + } + public String getDefinition() { + switch (this) { + case PATIENTCARE: return "The supply has been requested for use in direct patient care."; + case WARDSTOCK: return "The supply has been requested for for creating or replenishing ward stock."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENTCARE: return "Patient Care"; + case WARDSTOCK: return "Ward Stock"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReasonEnumFactory.java new file mode 100644 index 00000000000..322f390730d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SupplyrequestReasonEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SupplyrequestReasonEnumFactory implements EnumFactory { + + public SupplyrequestReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-care".equals(codeString)) + return SupplyrequestReason.PATIENTCARE; + if ("ward-stock".equals(codeString)) + return SupplyrequestReason.WARDSTOCK; + throw new IllegalArgumentException("Unknown SupplyrequestReason code '"+codeString+"'"); + } + + public String toCode(SupplyrequestReason code) { + if (code == SupplyrequestReason.PATIENTCARE) + return "patient-care"; + if (code == SupplyrequestReason.WARDSTOCK) + return "ward-stock"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Surface.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Surface.java new file mode 100644 index 00000000000..9a77c9398f0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Surface.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Surface { + + /** + * The surface of a tooth that is closest to the midline (middle) of the face. + */ + M, + /** + * The chewing surface of posterior teeth. + */ + O, + /** + * The biting edge of anterior teeth. + */ + I, + /** + * The surface of a tooth that faces away from the midline of the face. + */ + D, + /** + * The surface of a posterior tooth facing the cheeks. + */ + B, + /** + * The surface of a tooth facing the lips. + */ + V, + /** + * The surface of a tooth facing the tongue. + */ + L, + /** + * The Mesioclusal surfaces of a tooth. + */ + MO, + /** + * The Distoclusal surfaces of a tooth. + */ + DO, + /** + * The Distoincisal surfaces of a tooth. + */ + DI, + /** + * The Mesioclusodistal surfaces of a tooth. + */ + MOD, + /** + * added to help the parsers + */ + NULL; + public static Surface fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return M; + if ("O".equals(codeString)) + return O; + if ("I".equals(codeString)) + return I; + if ("D".equals(codeString)) + return D; + if ("B".equals(codeString)) + return B; + if ("V".equals(codeString)) + return V; + if ("L".equals(codeString)) + return L; + if ("MO".equals(codeString)) + return MO; + if ("DO".equals(codeString)) + return DO; + if ("DI".equals(codeString)) + return DI; + if ("MOD".equals(codeString)) + return MOD; + throw new FHIRException("Unknown Surface code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case M: return "M"; + case O: return "O"; + case I: return "I"; + case D: return "D"; + case B: return "B"; + case V: return "V"; + case L: return "L"; + case MO: return "MO"; + case DO: return "DO"; + case DI: return "DI"; + case MOD: return "MOD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/FDI-surface"; + } + public String getDefinition() { + switch (this) { + case M: return "The surface of a tooth that is closest to the midline (middle) of the face."; + case O: return "The chewing surface of posterior teeth."; + case I: return "The biting edge of anterior teeth."; + case D: return "The surface of a tooth that faces away from the midline of the face."; + case B: return "The surface of a posterior tooth facing the cheeks."; + case V: return "The surface of a tooth facing the lips."; + case L: return "The surface of a tooth facing the tongue."; + case MO: return "The Mesioclusal surfaces of a tooth."; + case DO: return "The Distoclusal surfaces of a tooth."; + case DI: return "The Distoincisal surfaces of a tooth."; + case MOD: return "The Mesioclusodistal surfaces of a tooth."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case M: return "Mesial"; + case O: return "Occlusal"; + case I: return "Incisal"; + case D: return "Distal"; + case B: return "Buccal"; + case V: return "Ventral"; + case L: return "Lingual"; + case MO: return "Mesioclusal"; + case DO: return "Distoclusal"; + case DI: return "Distoincisal"; + case MOD: return "Mesioclusodistal"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SurfaceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SurfaceEnumFactory.java new file mode 100644 index 00000000000..414c4f5b39a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/SurfaceEnumFactory.java @@ -0,0 +1,95 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class SurfaceEnumFactory implements EnumFactory { + + public Surface fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return Surface.M; + if ("O".equals(codeString)) + return Surface.O; + if ("I".equals(codeString)) + return Surface.I; + if ("D".equals(codeString)) + return Surface.D; + if ("B".equals(codeString)) + return Surface.B; + if ("V".equals(codeString)) + return Surface.V; + if ("L".equals(codeString)) + return Surface.L; + if ("MO".equals(codeString)) + return Surface.MO; + if ("DO".equals(codeString)) + return Surface.DO; + if ("DI".equals(codeString)) + return Surface.DI; + if ("MOD".equals(codeString)) + return Surface.MOD; + throw new IllegalArgumentException("Unknown Surface code '"+codeString+"'"); + } + + public String toCode(Surface code) { + if (code == Surface.M) + return "M"; + if (code == Surface.O) + return "O"; + if (code == Surface.I) + return "I"; + if (code == Surface.D) + return "D"; + if (code == Surface.B) + return "B"; + if (code == Surface.V) + return "V"; + if (code == Surface.L) + return "L"; + if (code == Surface.MO) + return "MO"; + if (code == Surface.DO) + return "DO"; + if (code == Surface.DI) + return "DI"; + if (code == Surface.MOD) + return "MOD"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Teeth.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Teeth.java new file mode 100644 index 00000000000..055b597e4c6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Teeth.java @@ -0,0 +1,357 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Teeth { + + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _11, + /** + * Upper Right Tooth 2 from the central axis, permanent dentition. + */ + _12, + /** + * Upper Right Tooth 3 from the central axis, permanent dentition. + */ + _13, + /** + * Upper Right Tooth 4 from the central axis, permanent dentition. + */ + _14, + /** + * Upper Right Tooth 5 from the central axis, permanent dentition. + */ + _15, + /** + * Upper Right Tooth 6 from the central axis, permanent dentition. + */ + _16, + /** + * Upper Right Tooth 7 from the central axis, permanent dentition. + */ + _17, + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _18, + /** + * Upper Left Tooth 1 from the central axis, permanent dentition. + */ + _21, + /** + * Upper Left Tooth 2 from the central axis, permanent dentition. + */ + _22, + /** + * Upper Left Tooth 3 from the central axis, permanent dentition. + */ + _23, + /** + * Upper Left Tooth 4 from the central axis, permanent dentition. + */ + _24, + /** + * Upper Left Tooth 5 from the central axis, permanent dentition. + */ + _25, + /** + * Upper Left Tooth 6 from the central axis, permanent dentition. + */ + _26, + /** + * Upper Left Tooth 7 from the central axis, permanent dentition. + */ + _27, + /** + * Upper Left Tooth 8 from the central axis, permanent dentition. + */ + _28, + /** + * Lower Left Tooth 1 from the central axis, permanent dentition. + */ + _31, + /** + * Lower Left Tooth 2 from the central axis, permanent dentition. + */ + _32, + /** + * Lower Left Tooth 3 from the central axis, permanent dentition. + */ + _33, + /** + * Lower Left Tooth 4 from the central axis, permanent dentition. + */ + _34, + /** + * Lower Left Tooth 5 from the central axis, permanent dentition. + */ + _35, + /** + * Lower Left Tooth 6 from the central axis, permanent dentition. + */ + _36, + /** + * Lower Left Tooth 7 from the central axis, permanent dentition. + */ + _37, + /** + * Lower Left Tooth 8 from the central axis, permanent dentition. + */ + _38, + /** + * Lower Right Tooth 1 from the central axis, permanent dentition. + */ + _41, + /** + * Lower Right Tooth 2 from the central axis, permanent dentition. + */ + _42, + /** + * Lower Right Tooth 3 from the central axis, permanent dentition. + */ + _43, + /** + * Lower Right Tooth 4 from the central axis, permanent dentition. + */ + _44, + /** + * Lower Right Tooth 5 from the central axis, permanent dentition. + */ + _45, + /** + * Lower Right Tooth 6 from the central axis, permanent dentition. + */ + _46, + /** + * Lower Right Tooth 7 from the central axis, permanent dentition. + */ + _47, + /** + * Lower Right Tooth 8 from the central axis, permanent dentition. + */ + _48, + /** + * added to help the parsers + */ + NULL; + public static Teeth fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("33".equals(codeString)) + return _33; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + throw new FHIRException("Unknown Teeth code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-fdi"; + } + public String getDefinition() { + switch (this) { + case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; + case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; + case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; + case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; + case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; + case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; + case _18: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; + case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; + case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; + case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; + case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; + case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; + case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; + case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; + case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; + case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; + case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; + case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; + case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; + case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; + case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; + case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; + case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; + case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; + case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; + case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; + case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; + case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; + case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; + case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TeethEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TeethEnumFactory.java new file mode 100644 index 00000000000..68a7ff20463 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TeethEnumFactory.java @@ -0,0 +1,179 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class TeethEnumFactory implements EnumFactory { + + public Teeth fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("11".equals(codeString)) + return Teeth._11; + if ("12".equals(codeString)) + return Teeth._12; + if ("13".equals(codeString)) + return Teeth._13; + if ("14".equals(codeString)) + return Teeth._14; + if ("15".equals(codeString)) + return Teeth._15; + if ("16".equals(codeString)) + return Teeth._16; + if ("17".equals(codeString)) + return Teeth._17; + if ("18".equals(codeString)) + return Teeth._18; + if ("21".equals(codeString)) + return Teeth._21; + if ("22".equals(codeString)) + return Teeth._22; + if ("23".equals(codeString)) + return Teeth._23; + if ("24".equals(codeString)) + return Teeth._24; + if ("25".equals(codeString)) + return Teeth._25; + if ("26".equals(codeString)) + return Teeth._26; + if ("27".equals(codeString)) + return Teeth._27; + if ("28".equals(codeString)) + return Teeth._28; + if ("31".equals(codeString)) + return Teeth._31; + if ("32".equals(codeString)) + return Teeth._32; + if ("33".equals(codeString)) + return Teeth._33; + if ("34".equals(codeString)) + return Teeth._34; + if ("35".equals(codeString)) + return Teeth._35; + if ("36".equals(codeString)) + return Teeth._36; + if ("37".equals(codeString)) + return Teeth._37; + if ("38".equals(codeString)) + return Teeth._38; + if ("41".equals(codeString)) + return Teeth._41; + if ("42".equals(codeString)) + return Teeth._42; + if ("43".equals(codeString)) + return Teeth._43; + if ("44".equals(codeString)) + return Teeth._44; + if ("45".equals(codeString)) + return Teeth._45; + if ("46".equals(codeString)) + return Teeth._46; + if ("47".equals(codeString)) + return Teeth._47; + if ("48".equals(codeString)) + return Teeth._48; + throw new IllegalArgumentException("Unknown Teeth code '"+codeString+"'"); + } + + public String toCode(Teeth code) { + if (code == Teeth._11) + return "11"; + if (code == Teeth._12) + return "12"; + if (code == Teeth._13) + return "13"; + if (code == Teeth._14) + return "14"; + if (code == Teeth._15) + return "15"; + if (code == Teeth._16) + return "16"; + if (code == Teeth._17) + return "17"; + if (code == Teeth._18) + return "18"; + if (code == Teeth._21) + return "21"; + if (code == Teeth._22) + return "22"; + if (code == Teeth._23) + return "23"; + if (code == Teeth._24) + return "24"; + if (code == Teeth._25) + return "25"; + if (code == Teeth._26) + return "26"; + if (code == Teeth._27) + return "27"; + if (code == Teeth._28) + return "28"; + if (code == Teeth._31) + return "31"; + if (code == Teeth._32) + return "32"; + if (code == Teeth._33) + return "33"; + if (code == Teeth._34) + return "34"; + if (code == Teeth._35) + return "35"; + if (code == Teeth._36) + return "36"; + if (code == Teeth._37) + return "37"; + if (code == Teeth._38) + return "38"; + if (code == Teeth._41) + return "41"; + if (code == Teeth._42) + return "42"; + if (code == Teeth._43) + return "43"; + if (code == Teeth._44) + return "44"; + if (code == Teeth._45) + return "45"; + if (code == Teeth._46) + return "46"; + if (code == Teeth._47) + return "47"; + if (code == Teeth._48) + return "48"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodes.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodes.java new file mode 100644 index 00000000000..9232d42f7d1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodes.java @@ -0,0 +1,285 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TestscriptOperationCodes { + + /** + * Read the current state of the resource. + */ + READ, + /** + * Read the state of a specific version of the resource. + */ + VREAD, + /** + * Update an existing resource by its id (or create it if it is new). + */ + UPDATE, + /** + * Delete a resource. + */ + DELETE, + /** + * Retrieve the update history for a particular resource or resource type. + */ + HISTORY, + /** + * Create a new resource with a server assigned id. + */ + CREATE, + /** + * Search based on some filter criteria. + */ + SEARCH, + /** + * Update, create or delete a set of resources as a single transaction. + */ + TRANSACTION, + /** + * Get a conformance statement for the system. + */ + CONFORMANCE, + /** + * Closure Table Maintenance. + */ + CLOSURE, + /** + * Generate a Document. + */ + DOCUMENT, + /** + * Fetch Encounter/Patient Record. + */ + EVERYTHING, + /** + * Value Set Expansion. + */ + EXPAND, + /** + * Find a functional list. + */ + FIND, + /** + * Concept Look Up. + */ + LOOKUP, + /** + * Access a list of profiles, tags, and security labels. + */ + META, + /** + * Add profiles, tags, and security labels to a resource. + */ + METAADD, + /** + * Delete profiles, tags, and security labels for a resource. + */ + METADELETE, + /** + * Populate Questionnaire. + */ + POPULATE, + /** + * Process Message. + */ + PROCESSMESSAGE, + /** + * Build Questionnaire. + */ + QUESTIONNAIRE, + /** + * Concept Translation. + */ + TRANSLATE, + /** + * Validate a resource. + */ + VALIDATE, + /** + * Value Set based Validation. + */ + VALIDATECODE, + /** + * added to help the parsers + */ + NULL; + public static TestscriptOperationCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return READ; + if ("vread".equals(codeString)) + return VREAD; + if ("update".equals(codeString)) + return UPDATE; + if ("delete".equals(codeString)) + return DELETE; + if ("history".equals(codeString)) + return HISTORY; + if ("create".equals(codeString)) + return CREATE; + if ("search".equals(codeString)) + return SEARCH; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("conformance".equals(codeString)) + return CONFORMANCE; + if ("closure".equals(codeString)) + return CLOSURE; + if ("document".equals(codeString)) + return DOCUMENT; + if ("everything".equals(codeString)) + return EVERYTHING; + if ("expand".equals(codeString)) + return EXPAND; + if ("find".equals(codeString)) + return FIND; + if ("lookup".equals(codeString)) + return LOOKUP; + if ("meta".equals(codeString)) + return META; + if ("meta-add".equals(codeString)) + return METAADD; + if ("meta-delete".equals(codeString)) + return METADELETE; + if ("populate".equals(codeString)) + return POPULATE; + if ("process-message".equals(codeString)) + return PROCESSMESSAGE; + if ("questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("translate".equals(codeString)) + return TRANSLATE; + if ("validate".equals(codeString)) + return VALIDATE; + if ("validate-code".equals(codeString)) + return VALIDATECODE; + throw new FHIRException("Unknown TestscriptOperationCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case DELETE: return "delete"; + case HISTORY: return "history"; + case CREATE: return "create"; + case SEARCH: return "search"; + case TRANSACTION: return "transaction"; + case CONFORMANCE: return "conformance"; + case CLOSURE: return "closure"; + case DOCUMENT: return "document"; + case EVERYTHING: return "everything"; + case EXPAND: return "expand"; + case FIND: return "find"; + case LOOKUP: return "lookup"; + case META: return "meta"; + case METAADD: return "meta-add"; + case METADELETE: return "meta-delete"; + case POPULATE: return "populate"; + case PROCESSMESSAGE: return "process-message"; + case QUESTIONNAIRE: return "questionnaire"; + case TRANSLATE: return "translate"; + case VALIDATE: return "validate"; + case VALIDATECODE: return "validate-code"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/testscript-operation-codes"; + } + public String getDefinition() { + switch (this) { + case READ: return "Read the current state of the resource."; + case VREAD: return "Read the state of a specific version of the resource."; + case UPDATE: return "Update an existing resource by its id (or create it if it is new)."; + case DELETE: return "Delete a resource."; + case HISTORY: return "Retrieve the update history for a particular resource or resource type."; + case CREATE: return "Create a new resource with a server assigned id."; + case SEARCH: return "Search based on some filter criteria."; + case TRANSACTION: return "Update, create or delete a set of resources as a single transaction."; + case CONFORMANCE: return "Get a conformance statement for the system."; + case CLOSURE: return "Closure Table Maintenance."; + case DOCUMENT: return "Generate a Document."; + case EVERYTHING: return "Fetch Encounter/Patient Record."; + case EXPAND: return "Value Set Expansion."; + case FIND: return "Find a functional list."; + case LOOKUP: return "Concept Look Up."; + case META: return "Access a list of profiles, tags, and security labels."; + case METAADD: return "Add profiles, tags, and security labels to a resource."; + case METADELETE: return "Delete profiles, tags, and security labels for a resource."; + case POPULATE: return "Populate Questionnaire."; + case PROCESSMESSAGE: return "Process Message."; + case QUESTIONNAIRE: return "Build Questionnaire."; + case TRANSLATE: return "Concept Translation."; + case VALIDATE: return "Validate a resource."; + case VALIDATECODE: return "Value Set based Validation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case READ: return "Read"; + case VREAD: return "Version Read"; + case UPDATE: return "Update"; + case DELETE: return "Delete"; + case HISTORY: return "History"; + case CREATE: return "Create"; + case SEARCH: return "Search"; + case TRANSACTION: return "Transaction"; + case CONFORMANCE: return "Conformance"; + case CLOSURE: return "$closure"; + case DOCUMENT: return "$document"; + case EVERYTHING: return "$everything"; + case EXPAND: return "$expand"; + case FIND: return "$find"; + case LOOKUP: return "$lookup"; + case META: return "$meta"; + case METAADD: return "$meta-add"; + case METADELETE: return "$meta-delete"; + case POPULATE: return "$populate"; + case PROCESSMESSAGE: return "$process-message"; + case QUESTIONNAIRE: return "$questionnaire"; + case TRANSLATE: return "$translate"; + case VALIDATE: return "$validate"; + case VALIDATECODE: return "$validate-code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodesEnumFactory.java new file mode 100644 index 00000000000..a4483d088d9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/TestscriptOperationCodesEnumFactory.java @@ -0,0 +1,147 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class TestscriptOperationCodesEnumFactory implements EnumFactory { + + public TestscriptOperationCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return TestscriptOperationCodes.READ; + if ("vread".equals(codeString)) + return TestscriptOperationCodes.VREAD; + if ("update".equals(codeString)) + return TestscriptOperationCodes.UPDATE; + if ("delete".equals(codeString)) + return TestscriptOperationCodes.DELETE; + if ("history".equals(codeString)) + return TestscriptOperationCodes.HISTORY; + if ("create".equals(codeString)) + return TestscriptOperationCodes.CREATE; + if ("search".equals(codeString)) + return TestscriptOperationCodes.SEARCH; + if ("transaction".equals(codeString)) + return TestscriptOperationCodes.TRANSACTION; + if ("conformance".equals(codeString)) + return TestscriptOperationCodes.CONFORMANCE; + if ("closure".equals(codeString)) + return TestscriptOperationCodes.CLOSURE; + if ("document".equals(codeString)) + return TestscriptOperationCodes.DOCUMENT; + if ("everything".equals(codeString)) + return TestscriptOperationCodes.EVERYTHING; + if ("expand".equals(codeString)) + return TestscriptOperationCodes.EXPAND; + if ("find".equals(codeString)) + return TestscriptOperationCodes.FIND; + if ("lookup".equals(codeString)) + return TestscriptOperationCodes.LOOKUP; + if ("meta".equals(codeString)) + return TestscriptOperationCodes.META; + if ("meta-add".equals(codeString)) + return TestscriptOperationCodes.METAADD; + if ("meta-delete".equals(codeString)) + return TestscriptOperationCodes.METADELETE; + if ("populate".equals(codeString)) + return TestscriptOperationCodes.POPULATE; + if ("process-message".equals(codeString)) + return TestscriptOperationCodes.PROCESSMESSAGE; + if ("questionnaire".equals(codeString)) + return TestscriptOperationCodes.QUESTIONNAIRE; + if ("translate".equals(codeString)) + return TestscriptOperationCodes.TRANSLATE; + if ("validate".equals(codeString)) + return TestscriptOperationCodes.VALIDATE; + if ("validate-code".equals(codeString)) + return TestscriptOperationCodes.VALIDATECODE; + throw new IllegalArgumentException("Unknown TestscriptOperationCodes code '"+codeString+"'"); + } + + public String toCode(TestscriptOperationCodes code) { + if (code == TestscriptOperationCodes.READ) + return "read"; + if (code == TestscriptOperationCodes.VREAD) + return "vread"; + if (code == TestscriptOperationCodes.UPDATE) + return "update"; + if (code == TestscriptOperationCodes.DELETE) + return "delete"; + if (code == TestscriptOperationCodes.HISTORY) + return "history"; + if (code == TestscriptOperationCodes.CREATE) + return "create"; + if (code == TestscriptOperationCodes.SEARCH) + return "search"; + if (code == TestscriptOperationCodes.TRANSACTION) + return "transaction"; + if (code == TestscriptOperationCodes.CONFORMANCE) + return "conformance"; + if (code == TestscriptOperationCodes.CLOSURE) + return "closure"; + if (code == TestscriptOperationCodes.DOCUMENT) + return "document"; + if (code == TestscriptOperationCodes.EVERYTHING) + return "everything"; + if (code == TestscriptOperationCodes.EXPAND) + return "expand"; + if (code == TestscriptOperationCodes.FIND) + return "find"; + if (code == TestscriptOperationCodes.LOOKUP) + return "lookup"; + if (code == TestscriptOperationCodes.META) + return "meta"; + if (code == TestscriptOperationCodes.METAADD) + return "meta-add"; + if (code == TestscriptOperationCodes.METADELETE) + return "meta-delete"; + if (code == TestscriptOperationCodes.POPULATE) + return "populate"; + if (code == TestscriptOperationCodes.PROCESSMESSAGE) + return "process-message"; + if (code == TestscriptOperationCodes.QUESTIONNAIRE) + return "questionnaire"; + if (code == TestscriptOperationCodes.TRANSLATE) + return "translate"; + if (code == TestscriptOperationCodes.VALIDATE) + return "validate"; + if (code == TestscriptOperationCodes.VALIDATECODE) + return "validate-code"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Tooth.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Tooth.java new file mode 100644 index 00000000000..dc3c9a60158 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Tooth.java @@ -0,0 +1,438 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Tooth { + + /** + * null + */ + _0, + /** + * Permanent teeth Maxillary right. + */ + _1, + /** + * Permanent teeth Maxillary left. + */ + _2, + /** + * Permanent teeth Mandibular right. + */ + _3, + /** + * Permanent teeth Mandibular left. + */ + _4, + /** + * Deciduous teeth Maxillary right. + */ + _5, + /** + * Deciduous teeth Maxillary left. + */ + _6, + /** + * Deciduous teeth Mandibular right. + */ + _7, + /** + * Deciduous teeth Mandibular left. + */ + _8, + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _11, + /** + * Upper Right Tooth 2 from the central axis, permanent dentition. + */ + _12, + /** + * Upper Right Tooth 3 from the central axis, permanent dentition. + */ + _13, + /** + * Upper Right Tooth 4 from the central axis, permanent dentition. + */ + _14, + /** + * Upper Right Tooth 5 from the central axis, permanent dentition. + */ + _15, + /** + * Upper Right Tooth 6 from the central axis, permanent dentition. + */ + _16, + /** + * Upper Right Tooth 7 from the central axis, permanent dentition. + */ + _17, + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _18, + /** + * Upper Left Tooth 1 from the central axis, permanent dentition. + */ + _21, + /** + * Upper Left Tooth 2 from the central axis, permanent dentition. + */ + _22, + /** + * Upper Left Tooth 3 from the central axis, permanent dentition. + */ + _23, + /** + * Upper Left Tooth 4 from the central axis, permanent dentition. + */ + _24, + /** + * Upper Left Tooth 5 from the central axis, permanent dentition. + */ + _25, + /** + * Upper Left Tooth 6 from the central axis, permanent dentition. + */ + _26, + /** + * Upper Left Tooth 7 from the central axis, permanent dentition. + */ + _27, + /** + * Upper Left Tooth 8 from the central axis, permanent dentition. + */ + _28, + /** + * Lower Left Tooth 1 from the central axis, permanent dentition. + */ + _31, + /** + * Lower Left Tooth 2 from the central axis, permanent dentition. + */ + _32, + /** + * Lower Left Tooth 3 from the central axis, permanent dentition. + */ + _33, + /** + * Lower Left Tooth 4 from the central axis, permanent dentition. + */ + _34, + /** + * Lower Left Tooth 5 from the central axis, permanent dentition. + */ + _35, + /** + * Lower Left Tooth 6 from the central axis, permanent dentition. + */ + _36, + /** + * Lower Left Tooth 7 from the central axis, permanent dentition. + */ + _37, + /** + * Lower Left Tooth 8 from the central axis, permanent dentition. + */ + _38, + /** + * Lower Right Tooth 1 from the central axis, permanent dentition. + */ + _41, + /** + * Lower Right Tooth 2 from the central axis, permanent dentition. + */ + _42, + /** + * Lower Right Tooth 3 from the central axis, permanent dentition. + */ + _43, + /** + * Lower Right Tooth 4 from the central axis, permanent dentition. + */ + _44, + /** + * Lower Right Tooth 5 from the central axis, permanent dentition. + */ + _45, + /** + * Lower Right Tooth 6 from the central axis, permanent dentition. + */ + _46, + /** + * Lower Right Tooth 7 from the central axis, permanent dentition. + */ + _47, + /** + * Lower Right Tooth 8 from the central axis, permanent dentition. + */ + _48, + /** + * added to help the parsers + */ + NULL; + public static Tooth fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return _0; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("33".equals(codeString)) + return _33; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + throw new FHIRException("Unknown Tooth code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0: return "0"; + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-surface"; + } + public String getDefinition() { + switch (this) { + case _0: return ""; + case _1: return "Permanent teeth Maxillary right."; + case _2: return "Permanent teeth Maxillary left."; + case _3: return "Permanent teeth Mandibular right."; + case _4: return "Permanent teeth Mandibular left."; + case _5: return "Deciduous teeth Maxillary right."; + case _6: return "Deciduous teeth Maxillary left."; + case _7: return "Deciduous teeth Mandibular right."; + case _8: return "Deciduous teeth Mandibular left."; + case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; + case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; + case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; + case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; + case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; + case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; + case _18: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; + case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; + case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; + case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; + case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; + case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; + case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; + case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; + case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; + case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; + case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; + case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; + case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; + case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; + case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; + case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; + case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; + case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; + case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; + case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; + case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; + case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; + case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; + case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0: return "0"; + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ToothEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ToothEnumFactory.java new file mode 100644 index 00000000000..e0db5ef0111 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/ToothEnumFactory.java @@ -0,0 +1,215 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class ToothEnumFactory implements EnumFactory { + + public Tooth fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return Tooth._0; + if ("1".equals(codeString)) + return Tooth._1; + if ("2".equals(codeString)) + return Tooth._2; + if ("3".equals(codeString)) + return Tooth._3; + if ("4".equals(codeString)) + return Tooth._4; + if ("5".equals(codeString)) + return Tooth._5; + if ("6".equals(codeString)) + return Tooth._6; + if ("7".equals(codeString)) + return Tooth._7; + if ("8".equals(codeString)) + return Tooth._8; + if ("11".equals(codeString)) + return Tooth._11; + if ("12".equals(codeString)) + return Tooth._12; + if ("13".equals(codeString)) + return Tooth._13; + if ("14".equals(codeString)) + return Tooth._14; + if ("15".equals(codeString)) + return Tooth._15; + if ("16".equals(codeString)) + return Tooth._16; + if ("17".equals(codeString)) + return Tooth._17; + if ("18".equals(codeString)) + return Tooth._18; + if ("21".equals(codeString)) + return Tooth._21; + if ("22".equals(codeString)) + return Tooth._22; + if ("23".equals(codeString)) + return Tooth._23; + if ("24".equals(codeString)) + return Tooth._24; + if ("25".equals(codeString)) + return Tooth._25; + if ("26".equals(codeString)) + return Tooth._26; + if ("27".equals(codeString)) + return Tooth._27; + if ("28".equals(codeString)) + return Tooth._28; + if ("31".equals(codeString)) + return Tooth._31; + if ("32".equals(codeString)) + return Tooth._32; + if ("33".equals(codeString)) + return Tooth._33; + if ("34".equals(codeString)) + return Tooth._34; + if ("35".equals(codeString)) + return Tooth._35; + if ("36".equals(codeString)) + return Tooth._36; + if ("37".equals(codeString)) + return Tooth._37; + if ("38".equals(codeString)) + return Tooth._38; + if ("41".equals(codeString)) + return Tooth._41; + if ("42".equals(codeString)) + return Tooth._42; + if ("43".equals(codeString)) + return Tooth._43; + if ("44".equals(codeString)) + return Tooth._44; + if ("45".equals(codeString)) + return Tooth._45; + if ("46".equals(codeString)) + return Tooth._46; + if ("47".equals(codeString)) + return Tooth._47; + if ("48".equals(codeString)) + return Tooth._48; + throw new IllegalArgumentException("Unknown Tooth code '"+codeString+"'"); + } + + public String toCode(Tooth code) { + if (code == Tooth._0) + return "0"; + if (code == Tooth._1) + return "1"; + if (code == Tooth._2) + return "2"; + if (code == Tooth._3) + return "3"; + if (code == Tooth._4) + return "4"; + if (code == Tooth._5) + return "5"; + if (code == Tooth._6) + return "6"; + if (code == Tooth._7) + return "7"; + if (code == Tooth._8) + return "8"; + if (code == Tooth._11) + return "11"; + if (code == Tooth._12) + return "12"; + if (code == Tooth._13) + return "13"; + if (code == Tooth._14) + return "14"; + if (code == Tooth._15) + return "15"; + if (code == Tooth._16) + return "16"; + if (code == Tooth._17) + return "17"; + if (code == Tooth._18) + return "18"; + if (code == Tooth._21) + return "21"; + if (code == Tooth._22) + return "22"; + if (code == Tooth._23) + return "23"; + if (code == Tooth._24) + return "24"; + if (code == Tooth._25) + return "25"; + if (code == Tooth._26) + return "26"; + if (code == Tooth._27) + return "27"; + if (code == Tooth._28) + return "28"; + if (code == Tooth._31) + return "31"; + if (code == Tooth._32) + return "32"; + if (code == Tooth._33) + return "33"; + if (code == Tooth._34) + return "34"; + if (code == Tooth._35) + return "35"; + if (code == Tooth._36) + return "36"; + if (code == Tooth._37) + return "37"; + if (code == Tooth._38) + return "38"; + if (code == Tooth._41) + return "41"; + if (code == Tooth._42) + return "42"; + if (code == Tooth._43) + return "43"; + if (code == Tooth._44) + return "44"; + if (code == Tooth._45) + return "45"; + if (code == Tooth._46) + return "46"; + if (code == Tooth._47) + return "47"; + if (code == Tooth._48) + return "48"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Udi.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Udi.java new file mode 100644 index 00000000000..64c31ada2a9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/Udi.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Udi { + + /** + * Example DI in GS1 format. + */ + _01_123456789, + /** + * added to help the parsers + */ + NULL; + public static Udi fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("{01}123456789".equals(codeString)) + return _01_123456789; + throw new FHIRException("Unknown Udi code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _01_123456789: return "{01}123456789"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-udi"; + } + public String getDefinition() { + switch (this) { + case _01_123456789: return "Example DI in GS1 format."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _01_123456789: return "{01}123456789"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/UdiEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/UdiEnumFactory.java new file mode 100644 index 00000000000..0225f5e75ba --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/UdiEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class UdiEnumFactory implements EnumFactory { + + public Udi fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("{01}123456789".equals(codeString)) + return Udi._01_123456789; + throw new IllegalArgumentException("Unknown Udi code '"+codeString+"'"); + } + + public String toCode(Udi code) { + if (code == Udi._01_123456789) + return "{01}123456789"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementCondition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementCondition.java new file mode 100644 index 00000000000..ade321757e9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementCondition.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementCondition { + + /** + * Always send an acknowledgement. + */ + AL, + /** + * Send an acknowledgement for error/reject conditions only. + */ + ER, + /** + * Never send an acknowledgement. + */ + NE, + /** + * Send an acknowledgement for successful completions only. + */ + SU, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementCondition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AL".equals(codeString)) + return AL; + if ("ER".equals(codeString)) + return ER; + if ("NE".equals(codeString)) + return NE; + if ("SU".equals(codeString)) + return SU; + throw new FHIRException("Unknown V3AcknowledgementCondition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AL: return "AL"; + case ER: return "ER"; + case NE: return "NE"; + case SU: return "SU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementCondition"; + } + public String getDefinition() { + switch (this) { + case AL: return "Always send an acknowledgement."; + case ER: return "Send an acknowledgement for error/reject conditions only."; + case NE: return "Never send an acknowledgement."; + case SU: return "Send an acknowledgement for successful completions only."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AL: return "Always"; + case ER: return "Error/reject only"; + case NE: return "Never"; + case SU: return "Successful only"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementConditionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementConditionEnumFactory.java new file mode 100644 index 00000000000..a5d41738239 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementConditionEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AcknowledgementConditionEnumFactory implements EnumFactory { + + public V3AcknowledgementCondition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AL".equals(codeString)) + return V3AcknowledgementCondition.AL; + if ("ER".equals(codeString)) + return V3AcknowledgementCondition.ER; + if ("NE".equals(codeString)) + return V3AcknowledgementCondition.NE; + if ("SU".equals(codeString)) + return V3AcknowledgementCondition.SU; + throw new IllegalArgumentException("Unknown V3AcknowledgementCondition code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementCondition code) { + if (code == V3AcknowledgementCondition.AL) + return "AL"; + if (code == V3AcknowledgementCondition.ER) + return "ER"; + if (code == V3AcknowledgementCondition.NE) + return "NE"; + if (code == V3AcknowledgementCondition.SU) + return "SU"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCode.java new file mode 100644 index 00000000000..5690ff1070f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCode.java @@ -0,0 +1,321 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementDetailCode { + + /** + * Refelects rejections because elements of the communication are not supported in the current context. + */ + _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE, + /** + * The interaction (or: this version of the interaction) is not supported. + */ + NS200, + /** + * The Processing ID is not supported. + */ + NS202, + /** + * The Version ID is not supported. + */ + NS203, + /** + * The processing mode is not supported. + */ + NS250, + /** + * The Device.id of the sender is unknown. + */ + NS260, + /** + * The receiver requires information in the attentionLine classes for routing purposes. + */ + NS261, + /** + * An internal software component (database, application, queue mechanism, etc.) has failed, leading to inability to process the message. + */ + INTERR, + /** + * Rejection: The message can't be stored by the receiver due to an unspecified internal application issue. The message was neither processed nor stored by the receiving application. + */ + NOSTORE, + /** + * Error: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is unavailable. + */ + RTEDEST, + /** + * The destination of this message is unknown to the receiving application. The receiving application in the message does not match the application which received the message. The message was neither routed, processed nor stored by the receiving application. + */ + RTUDEST, + /** + * Warning: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is (temporarily) unavailable. The receiving application will forward the message as soon as the destination can be reached again. + */ + RTWDEST, + /** + * Reflects errors in the syntax or structure of the communication. + */ + SYN, + /** + * The attribute contained data of the wrong data type, e.g. a numeric attribute contained "FOO". + */ + SYN102, + /** + * Description: Required association or attribute missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message. + */ + SYN105, + /** + * Required association missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message. + */ + SYN100, + /** + * A required attribute is missing in a class. + */ + SYN101, + /** + * Description: The number of repetitions of a group of association or attributes is less than the required minimum for the standard or of one of the conformance profiles or templates identified in the message. + */ + SYN114, + /** + * Description: A coded attribute or datatype property violates one of the terminology constraints specified in the standard or one of the conformance profiles or templates declared by the instance. + */ + SYN106, + /** + * An attribute value was compared against the corresponding code system, and no match was found. + */ + SYN103, + /** + * An attribute value referenced a code system that is not valid for an attribute constrained to CNE. + */ + SYN104, + /** + * Description: A coded attribute is referencing a code that has been deprecated by the owning code system. + */ + SYN107, + /** + * Description: The number of repetitions of a (group of) association(s) or attribute(s) exceeds the limits of the standard or of one of the conformance profiles or templates identified in the message. + */ + SYN108, + /** + * The number of repetitions of a (group of) association(s) exceeds the limits of the standard or of one of the conformance profiles identified in the message. + */ + SYN110, + /** + * The number of repetitions of an attribute exceeds the limits of the standard or of one of the conformance profiles identified in the message. + */ + SYN112, + /** + * Description: An attribute or association identified as mandatory in a specification or declared conformance profile or template has been specified with a null flavor. + */ + SYN109, + /** + * Description: The value of an attribute or property differs from the fixed value asserted in the standard or one of the conformance profiles or templates declared in the message. + */ + SYN111, + /** + * Description: A formal constraint asserted in the standard or one of the conformance profiles or templates declared in the message has been violated. + */ + SYN113, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementDetailCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AcknowledgementDetailNotSupportedCode".equals(codeString)) + return _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE; + if ("NS200".equals(codeString)) + return NS200; + if ("NS202".equals(codeString)) + return NS202; + if ("NS203".equals(codeString)) + return NS203; + if ("NS250".equals(codeString)) + return NS250; + if ("NS260".equals(codeString)) + return NS260; + if ("NS261".equals(codeString)) + return NS261; + if ("INTERR".equals(codeString)) + return INTERR; + if ("NOSTORE".equals(codeString)) + return NOSTORE; + if ("RTEDEST".equals(codeString)) + return RTEDEST; + if ("RTUDEST".equals(codeString)) + return RTUDEST; + if ("RTWDEST".equals(codeString)) + return RTWDEST; + if ("SYN".equals(codeString)) + return SYN; + if ("SYN102".equals(codeString)) + return SYN102; + if ("SYN105".equals(codeString)) + return SYN105; + if ("SYN100".equals(codeString)) + return SYN100; + if ("SYN101".equals(codeString)) + return SYN101; + if ("SYN114".equals(codeString)) + return SYN114; + if ("SYN106".equals(codeString)) + return SYN106; + if ("SYN103".equals(codeString)) + return SYN103; + if ("SYN104".equals(codeString)) + return SYN104; + if ("SYN107".equals(codeString)) + return SYN107; + if ("SYN108".equals(codeString)) + return SYN108; + if ("SYN110".equals(codeString)) + return SYN110; + if ("SYN112".equals(codeString)) + return SYN112; + if ("SYN109".equals(codeString)) + return SYN109; + if ("SYN111".equals(codeString)) + return SYN111; + if ("SYN113".equals(codeString)) + return SYN113; + throw new FHIRException("Unknown V3AcknowledgementDetailCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "_AcknowledgementDetailNotSupportedCode"; + case NS200: return "NS200"; + case NS202: return "NS202"; + case NS203: return "NS203"; + case NS250: return "NS250"; + case NS260: return "NS260"; + case NS261: return "NS261"; + case INTERR: return "INTERR"; + case NOSTORE: return "NOSTORE"; + case RTEDEST: return "RTEDEST"; + case RTUDEST: return "RTUDEST"; + case RTWDEST: return "RTWDEST"; + case SYN: return "SYN"; + case SYN102: return "SYN102"; + case SYN105: return "SYN105"; + case SYN100: return "SYN100"; + case SYN101: return "SYN101"; + case SYN114: return "SYN114"; + case SYN106: return "SYN106"; + case SYN103: return "SYN103"; + case SYN104: return "SYN104"; + case SYN107: return "SYN107"; + case SYN108: return "SYN108"; + case SYN110: return "SYN110"; + case SYN112: return "SYN112"; + case SYN109: return "SYN109"; + case SYN111: return "SYN111"; + case SYN113: return "SYN113"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementDetailCode"; + } + public String getDefinition() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "Refelects rejections because elements of the communication are not supported in the current context."; + case NS200: return "The interaction (or: this version of the interaction) is not supported."; + case NS202: return "The Processing ID is not supported."; + case NS203: return "The Version ID is not supported."; + case NS250: return "The processing mode is not supported."; + case NS260: return "The Device.id of the sender is unknown."; + case NS261: return "The receiver requires information in the attentionLine classes for routing purposes."; + case INTERR: return "An internal software component (database, application, queue mechanism, etc.) has failed, leading to inability to process the message."; + case NOSTORE: return "Rejection: The message can't be stored by the receiver due to an unspecified internal application issue. The message was neither processed nor stored by the receiving application."; + case RTEDEST: return "Error: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is unavailable."; + case RTUDEST: return "The destination of this message is unknown to the receiving application. The receiving application in the message does not match the application which received the message. The message was neither routed, processed nor stored by the receiving application."; + case RTWDEST: return "Warning: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is (temporarily) unavailable. The receiving application will forward the message as soon as the destination can be reached again."; + case SYN: return "Reflects errors in the syntax or structure of the communication."; + case SYN102: return "The attribute contained data of the wrong data type, e.g. a numeric attribute contained \"FOO\"."; + case SYN105: return "Description: Required association or attribute missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message."; + case SYN100: return "Required association missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message."; + case SYN101: return "A required attribute is missing in a class."; + case SYN114: return "Description: The number of repetitions of a group of association or attributes is less than the required minimum for the standard or of one of the conformance profiles or templates identified in the message."; + case SYN106: return "Description: A coded attribute or datatype property violates one of the terminology constraints specified in the standard or one of the conformance profiles or templates declared by the instance."; + case SYN103: return "An attribute value was compared against the corresponding code system, and no match was found."; + case SYN104: return "An attribute value referenced a code system that is not valid for an attribute constrained to CNE."; + case SYN107: return "Description: A coded attribute is referencing a code that has been deprecated by the owning code system."; + case SYN108: return "Description: The number of repetitions of a (group of) association(s) or attribute(s) exceeds the limits of the standard or of one of the conformance profiles or templates identified in the message."; + case SYN110: return "The number of repetitions of a (group of) association(s) exceeds the limits of the standard or of one of the conformance profiles identified in the message."; + case SYN112: return "The number of repetitions of an attribute exceeds the limits of the standard or of one of the conformance profiles identified in the message."; + case SYN109: return "Description: An attribute or association identified as mandatory in a specification or declared conformance profile or template has been specified with a null flavor."; + case SYN111: return "Description: The value of an attribute or property differs from the fixed value asserted in the standard or one of the conformance profiles or templates declared in the message."; + case SYN113: return "Description: A formal constraint asserted in the standard or one of the conformance profiles or templates declared in the message has been violated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "AcknowledgementDetailNotSupportedCode"; + case NS200: return "Unsupported interaction"; + case NS202: return "Unsupported processing id"; + case NS203: return "Unsupported version id"; + case NS250: return "Unsupported processing Mode"; + case NS260: return "Unknown sender"; + case NS261: return "Unrecognized attentionline"; + case INTERR: return "Internal system error"; + case NOSTORE: return "No storage space for message."; + case RTEDEST: return "Message routing error, destination unreachable."; + case RTUDEST: return "Error: Message routing error, unknown destination."; + case RTWDEST: return "Message routing warning, destination unreachable."; + case SYN: return "Syntax error"; + case SYN102: return "Data type error"; + case SYN105: return "Required element missing"; + case SYN100: return "Required association missing"; + case SYN101: return "Required attribute missing"; + case SYN114: return "Insufficient repetitions"; + case SYN106: return "Terminology error"; + case SYN103: return "Value not found in code system"; + case SYN104: return "Invalid code system in CNE"; + case SYN107: return "Deprecated code"; + case SYN108: return "Number of repetitions exceeds limit"; + case SYN110: return "Number of association repetitions exceeds limit"; + case SYN112: return "Number of attribute repetitions exceeds limit"; + case SYN109: return "Mandatory element with null value"; + case SYN111: return "Value does not match fixed value"; + case SYN113: return "Formal constraint violation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCodeEnumFactory.java new file mode 100644 index 00000000000..ed4314b16f4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailCodeEnumFactory.java @@ -0,0 +1,163 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AcknowledgementDetailCodeEnumFactory implements EnumFactory { + + public V3AcknowledgementDetailCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AcknowledgementDetailNotSupportedCode".equals(codeString)) + return V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE; + if ("NS200".equals(codeString)) + return V3AcknowledgementDetailCode.NS200; + if ("NS202".equals(codeString)) + return V3AcknowledgementDetailCode.NS202; + if ("NS203".equals(codeString)) + return V3AcknowledgementDetailCode.NS203; + if ("NS250".equals(codeString)) + return V3AcknowledgementDetailCode.NS250; + if ("NS260".equals(codeString)) + return V3AcknowledgementDetailCode.NS260; + if ("NS261".equals(codeString)) + return V3AcknowledgementDetailCode.NS261; + if ("INTERR".equals(codeString)) + return V3AcknowledgementDetailCode.INTERR; + if ("NOSTORE".equals(codeString)) + return V3AcknowledgementDetailCode.NOSTORE; + if ("RTEDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTEDEST; + if ("RTUDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTUDEST; + if ("RTWDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTWDEST; + if ("SYN".equals(codeString)) + return V3AcknowledgementDetailCode.SYN; + if ("SYN102".equals(codeString)) + return V3AcknowledgementDetailCode.SYN102; + if ("SYN105".equals(codeString)) + return V3AcknowledgementDetailCode.SYN105; + if ("SYN100".equals(codeString)) + return V3AcknowledgementDetailCode.SYN100; + if ("SYN101".equals(codeString)) + return V3AcknowledgementDetailCode.SYN101; + if ("SYN114".equals(codeString)) + return V3AcknowledgementDetailCode.SYN114; + if ("SYN106".equals(codeString)) + return V3AcknowledgementDetailCode.SYN106; + if ("SYN103".equals(codeString)) + return V3AcknowledgementDetailCode.SYN103; + if ("SYN104".equals(codeString)) + return V3AcknowledgementDetailCode.SYN104; + if ("SYN107".equals(codeString)) + return V3AcknowledgementDetailCode.SYN107; + if ("SYN108".equals(codeString)) + return V3AcknowledgementDetailCode.SYN108; + if ("SYN110".equals(codeString)) + return V3AcknowledgementDetailCode.SYN110; + if ("SYN112".equals(codeString)) + return V3AcknowledgementDetailCode.SYN112; + if ("SYN109".equals(codeString)) + return V3AcknowledgementDetailCode.SYN109; + if ("SYN111".equals(codeString)) + return V3AcknowledgementDetailCode.SYN111; + if ("SYN113".equals(codeString)) + return V3AcknowledgementDetailCode.SYN113; + throw new IllegalArgumentException("Unknown V3AcknowledgementDetailCode code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementDetailCode code) { + if (code == V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE) + return "_AcknowledgementDetailNotSupportedCode"; + if (code == V3AcknowledgementDetailCode.NS200) + return "NS200"; + if (code == V3AcknowledgementDetailCode.NS202) + return "NS202"; + if (code == V3AcknowledgementDetailCode.NS203) + return "NS203"; + if (code == V3AcknowledgementDetailCode.NS250) + return "NS250"; + if (code == V3AcknowledgementDetailCode.NS260) + return "NS260"; + if (code == V3AcknowledgementDetailCode.NS261) + return "NS261"; + if (code == V3AcknowledgementDetailCode.INTERR) + return "INTERR"; + if (code == V3AcknowledgementDetailCode.NOSTORE) + return "NOSTORE"; + if (code == V3AcknowledgementDetailCode.RTEDEST) + return "RTEDEST"; + if (code == V3AcknowledgementDetailCode.RTUDEST) + return "RTUDEST"; + if (code == V3AcknowledgementDetailCode.RTWDEST) + return "RTWDEST"; + if (code == V3AcknowledgementDetailCode.SYN) + return "SYN"; + if (code == V3AcknowledgementDetailCode.SYN102) + return "SYN102"; + if (code == V3AcknowledgementDetailCode.SYN105) + return "SYN105"; + if (code == V3AcknowledgementDetailCode.SYN100) + return "SYN100"; + if (code == V3AcknowledgementDetailCode.SYN101) + return "SYN101"; + if (code == V3AcknowledgementDetailCode.SYN114) + return "SYN114"; + if (code == V3AcknowledgementDetailCode.SYN106) + return "SYN106"; + if (code == V3AcknowledgementDetailCode.SYN103) + return "SYN103"; + if (code == V3AcknowledgementDetailCode.SYN104) + return "SYN104"; + if (code == V3AcknowledgementDetailCode.SYN107) + return "SYN107"; + if (code == V3AcknowledgementDetailCode.SYN108) + return "SYN108"; + if (code == V3AcknowledgementDetailCode.SYN110) + return "SYN110"; + if (code == V3AcknowledgementDetailCode.SYN112) + return "SYN112"; + if (code == V3AcknowledgementDetailCode.SYN109) + return "SYN109"; + if (code == V3AcknowledgementDetailCode.SYN111) + return "SYN111"; + if (code == V3AcknowledgementDetailCode.SYN113) + return "SYN113"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailType.java new file mode 100644 index 00000000000..f2ca263b3d6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailType.java @@ -0,0 +1,135 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementDetailType { + + /** + * Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction. Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. + + + Example:Unable to find specified patient. + */ + E, + /** + * Definition: The message relates to an issue which has no bearing on the successful processing of the request. Information issues cannot be overridden by specifying a management. + + + Example: A Patient's coverage will expire in 5 days. + */ + I, + /** + * Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect. Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. + + + Example: + + + Unexpected additional repetitions of phone number have been ignored. + */ + W, + /** + * null + */ + ERR, + /** + * null + */ + INFO, + /** + * null + */ + WARN, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementDetailType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("I".equals(codeString)) + return I; + if ("W".equals(codeString)) + return W; + if ("ERR".equals(codeString)) + return ERR; + if ("INFO".equals(codeString)) + return INFO; + if ("WARN".equals(codeString)) + return WARN; + throw new FHIRException("Unknown V3AcknowledgementDetailType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case I: return "I"; + case W: return "W"; + case ERR: return "ERR"; + case INFO: return "INFO"; + case WARN: return "WARN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementDetailType"; + } + public String getDefinition() { + switch (this) { + case E: return "Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction. Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. \r\n\n \n Example:Unable to find specified patient."; + case I: return "Definition: The message relates to an issue which has no bearing on the successful processing of the request. Information issues cannot be overridden by specifying a management.\r\n\n \n Example: A Patient's coverage will expire in 5 days."; + case W: return "Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect. Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. \r\n\n \n Example:\n \r\n\n Unexpected additional repetitions of phone number have been ignored."; + case ERR: return ""; + case INFO: return ""; + case WARN: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "Error"; + case I: return "Information"; + case W: return "Warning"; + case ERR: return "ERR"; + case INFO: return "INFO"; + case WARN: return "WARN"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailTypeEnumFactory.java new file mode 100644 index 00000000000..b4b6cebf3db --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementDetailTypeEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AcknowledgementDetailTypeEnumFactory implements EnumFactory { + + public V3AcknowledgementDetailType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3AcknowledgementDetailType.E; + if ("I".equals(codeString)) + return V3AcknowledgementDetailType.I; + if ("W".equals(codeString)) + return V3AcknowledgementDetailType.W; + if ("ERR".equals(codeString)) + return V3AcknowledgementDetailType.ERR; + if ("INFO".equals(codeString)) + return V3AcknowledgementDetailType.INFO; + if ("WARN".equals(codeString)) + return V3AcknowledgementDetailType.WARN; + throw new IllegalArgumentException("Unknown V3AcknowledgementDetailType code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementDetailType code) { + if (code == V3AcknowledgementDetailType.E) + return "E"; + if (code == V3AcknowledgementDetailType.I) + return "I"; + if (code == V3AcknowledgementDetailType.W) + return "W"; + if (code == V3AcknowledgementDetailType.ERR) + return "ERR"; + if (code == V3AcknowledgementDetailType.INFO) + return "INFO"; + if (code == V3AcknowledgementDetailType.WARN) + return "WARN"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementType.java new file mode 100644 index 00000000000..46082d1500d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementType { + + /** + * Receiving application successfully processed message. + */ + AA, + /** + * Receiving application found error in processing message. Sending error response with additional error detail information. + */ + AE, + /** + * Receiving application failed to process message for reason unrelated to content or format. Original message sender must decide on whether to automatically send message again. + */ + AR, + /** + * Receiving message handling service accepts responsibility for passing message onto receiving application. + */ + CA, + /** + * Receiving message handling service cannot accept message for any other reason (e.g. message sequence number, etc.). + */ + CE, + /** + * Receiving message handling service rejects message if interaction identifier, version or processing mode is incompatible with known receiving application role information. + */ + CR, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AA".equals(codeString)) + return AA; + if ("AE".equals(codeString)) + return AE; + if ("AR".equals(codeString)) + return AR; + if ("CA".equals(codeString)) + return CA; + if ("CE".equals(codeString)) + return CE; + if ("CR".equals(codeString)) + return CR; + throw new FHIRException("Unknown V3AcknowledgementType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AA: return "AA"; + case AE: return "AE"; + case AR: return "AR"; + case CA: return "CA"; + case CE: return "CE"; + case CR: return "CR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementType"; + } + public String getDefinition() { + switch (this) { + case AA: return "Receiving application successfully processed message."; + case AE: return "Receiving application found error in processing message. Sending error response with additional error detail information."; + case AR: return "Receiving application failed to process message for reason unrelated to content or format. Original message sender must decide on whether to automatically send message again."; + case CA: return "Receiving message handling service accepts responsibility for passing message onto receiving application."; + case CE: return "Receiving message handling service cannot accept message for any other reason (e.g. message sequence number, etc.)."; + case CR: return "Receiving message handling service rejects message if interaction identifier, version or processing mode is incompatible with known receiving application role information."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AA: return "Application Acknowledgement Accept"; + case AE: return "Application Acknowledgement Error"; + case AR: return "Application Acknowledgement Reject"; + case CA: return "Accept Acknowledgement Commit Accept"; + case CE: return "Accept Acknowledgement Commit Error"; + case CR: return "Accept Acknowledgement Commit Reject"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementTypeEnumFactory.java new file mode 100644 index 00000000000..1006dddd5c9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AcknowledgementTypeEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AcknowledgementTypeEnumFactory implements EnumFactory { + + public V3AcknowledgementType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AA".equals(codeString)) + return V3AcknowledgementType.AA; + if ("AE".equals(codeString)) + return V3AcknowledgementType.AE; + if ("AR".equals(codeString)) + return V3AcknowledgementType.AR; + if ("CA".equals(codeString)) + return V3AcknowledgementType.CA; + if ("CE".equals(codeString)) + return V3AcknowledgementType.CE; + if ("CR".equals(codeString)) + return V3AcknowledgementType.CR; + throw new IllegalArgumentException("Unknown V3AcknowledgementType code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementType code) { + if (code == V3AcknowledgementType.AA) + return "AA"; + if (code == V3AcknowledgementType.AE) + return "AE"; + if (code == V3AcknowledgementType.AR) + return "AR"; + if (code == V3AcknowledgementType.CA) + return "CA"; + if (code == V3AcknowledgementType.CE) + return "CE"; + if (code == V3AcknowledgementType.CR) + return "CR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClass.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClass.java new file mode 100644 index 00000000000..48619584e2b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClass.java @@ -0,0 +1,1760 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActClass { + + /** + * A record of something that is being done, has been done, can be done, or is intended or requested to be done. + + + Examples:The kinds of acts that are common in health care are (1) a clinical observation, (2) an assessment of health condition (such as problems and diagnoses), (3) healthcare goals, (4) treatment services (such as medication, surgery, physical and psychological therapy), (5) assisting, monitoring or attending, (6) training and education services to patients and their next of kin, (7) and notary services (such as advanced directives or living will), (8) editing and maintaining documents, and many others. + + + Discussion and Rationale: Acts are the pivot of the RIM; all domain information and processes are represented primarily in Acts. Any profession or business, including healthcare, is primarily constituted of intentional and occasionally non-intentional actions, performed and recorded by responsible actors. An Act-instance is a record of such an action. + + Acts connect to Entities in their Roles through Participations and connect to other Acts through ActRelationships. Participations are the authors, performers and other responsible parties as well as subjects and beneficiaries (which includes tools and material used in the performance of the act, which are also subjects). The moodCode distinguishes between Acts that are meant as factual records, vs. records of intended or ordered services, and the other modalities in which act can appear. + + One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who "owns" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances. + + In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements. + + Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as "speech-acts" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press]. + + An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category "sequel"). + + Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information. + */ + ACT, + /** + * Used to group a set of acts sharing a common context. Organizer structures can nest within other context structures - such as where a document is contained within a folder, or a folder is contained within an EHR extract. + */ + _ACTCLASSRECORDORGANIZER, + /** + * A context representing a grouped commitment of information to the EHR. It is considered the unit of modification of the record, the unit of transmission in record extracts, and the unit of attestation by authorizing clinicians. + + A composition represents part of a patient record originating from a single interaction between an authenticator and the record. + + Unless otherwise stated all statements within a composition have the same authenticator, apply to the same patient and were recorded in a single session of use of a single application. + + A composition contains organizers and entries. + */ + COMPOSITION, + /** + * The notion of a document comes particularly from the paper world, where it corresponds to the contents recorded on discrete pieces of paper. In the electronic world, a document is a kind of composition that bears resemblance to their paper world counter-parts. Documents typically are meant to be human-readable. + + HL7's notion of document differs from that described in the W3C XML Recommendation, in which a document refers specifically to the contents that fall between the root element's start-tag and end-tag. Not all XML documents are HL7 documents. + */ + DOC, + /** + * A clinical document is a documentation of clinical observations and services, with the following characteristics: + + + + Persistence - A clinical document continues to exist in an unaltered state, for a time period defined by local and regulatory requirements; + + + + Stewardship - A clinical document is maintained by a person or organization entrusted with its care; + + + + Potential for authentication - A clinical document is an assemblage of information that is intended to be legally authenticated; + + + + Wholeness - Authentication of a clinical document applies to the whole and does not apply to portions of the document without the full context of the document; + + + + Human readability - A clinical document is human readable. + */ + DOCCLIN, + /** + * A clinical document that conforms to Level One of the HL7 Clinical Document Architecture (CDA) + */ + CDALVLONE, + /** + * Description: Container of clinical statements. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or "container tree". + + The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R. + */ + CONTAINER, + /** + * A group of entries within a composition or topic that have a common characteristic - for example, Examination, Diagnosis, Management OR Subjective, Objective, Analysis, Plan. + + The distinction from Topic relates to value sets. For Category there is a bounded list of things like "Examination", "Diagnosis" or SOAP categories. For Topic the list is wide open to any clinical condition or reason for a part of an encounter. + + A CATEGORY MAY CONTAIN ENTRIES. + */ + CATEGORY, + /** + * A context that distinguishes the body of a document from the document header. This is seen, for instance, in HTML documents, which have discrete and elements. + */ + DOCBODY, + /** + * A context that subdivides the body of a document. Document sections are typically used for human navigation, to give a reader a clue as to the expected content. Document sections are used to organize and provide consistency to the contents of a document body. Document sections can contain document sections and can contain entries. + */ + DOCSECT, + /** + * A group of entries within a composition that are related to a common clinical theme - such as a specific disorder or problem, prevention, screening and provision of contraceptive services. + + A topic may contain categories and entries. + */ + TOPIC, + /** + * This context represents the part of a patient record conveyed in a single communication. It is drawn from a providing system for the purposes of communication to a requesting process (which might be another repository, a client application or a middleware service such as an electronic guideline engine), and supporting the faithful inclusion of the communicated data in the receiving system. + + An extract may be the entirety of the patient record as held by the sender or it may be a part of that record (e.g. changes since a specified date). + + An extract contains folders or compositions. + + An extract cannot contain another extract. + */ + EXTRACT, + /** + * A context that comprises all compositions. The EHR is an extract that includes the entire chart. + + + NOTE: In an exchange scenario, an EHR is a specialization of an extract. + */ + EHR, + /** + * A context representing the high-level organization of an extract e.g. to group parts of the record by episode, care team, clinical specialty, clinical condition, or source application. Internationally, this kind of organizing structure is used variably: in some centers and systems the folder is treated as an informal compartmentalization of the overall health record; in others it might represent a significant legal portion of the EHR relating to the originating enterprise or team. + + A folder contains compositions. + + Folders may be nested within folders. + */ + FOLDER, + /** + * Definition: An ACT that organizes a set of component acts into a semantic grouping that share a particular context such as timeframe, patient, etc. + + + UsageNotes: The focus in a GROUPER act is the grouping of the contained acts. For example "a request to group" (RQO), "a type of grouping that is allowed to occur" (DEF), etc. + + Unlike WorkingList, which represents a dynamic, shared, continuously updated collection to provide a "view" of a set of objects, GROUPER collections tend to be static and simply indicate a shared set of semantics. Note that sharing of semantics can be achieved using ACT as well. However, with GROUPER, the sole semantic is of grouping. + */ + GROUPER, + /** + * Description:An ACT that organizes a set of component acts into a semantic grouping that have a shared subject. The subject may be either a subject participation (SBJ), subject act relationship (SUBJ), or child participation/act relationship types. + + + Discussion: The focus in a CLUSTER act is the grouping of the contained acts. For example "a request to cluster" (RQO), "a type of cluster that is allowed to occur" (DEF), etc. + + + Examples: + + + + + Radiologic investigations that might include administration of a dye, followed by radiographic observations; + + + + "Isolate cluster" which includes all testing and specimen processing performed on a specific isolate; + + + + a set of actions to perform at a particular stage in a clinical trial. + */ + CLUSTER, + /** + * An accommodation is a service provided for a Person or other LivingSubject in which a place is provided for the subject to reside for a period of time. Commonly used to track the provision of ward, private and semi-private accommodations for a patient. + */ + ACCM, + /** + * A financial account established to track the net result of financial acts. + */ + ACCT, + /** + * A unit of work, a grouper of work items as defined by the system performing that work. Typically some laboratory order fulfillers communicate references to accessions in their communications regarding laboratory orders. Often one or more specimens are related to an accession such that in some environments the accession number is taken as an identifier for a specimen (group). + */ + ACSN, + /** + * A transformation process where a requested invoice is transformed into an agreed invoice. Represents the adjudication processing of an invoice (claim). Adjudication results can be adjudicated as submitted, with adjustments or refused. + + Adjudication results comprise 2 components: the adjudication processing results and a restated (or adjudicated) invoice or claim + */ + ADJUD, + /** + * An act representing a system action such as the change of state of another act or the initiation of a query. All control acts represent trigger events in the HL7 context. ControlActs may occur in different moods. + */ + CACT, + /** + * Sender asks addressee to do something depending on the focal Act of the payload. An example is "fulfill this order". Addressee has responsibilities to either reject the message or to act on it in an appropriate way (specified by the specific receiver responsibilities for the interaction). + */ + ACTN, + /** + * Sender sends payload to addressee as information. Addressee does not have responsibilities beyond serving addressee's own interest (i.e., read and memorize if you see fit). This is equivalent to an FYI on a memo. + */ + INFO, + /** + * Description: Sender transmits a status change pertaining to the focal act of the payload. This status of the focal act is the final state of the state transition. This can be either a request or an event, according to the mood of the control act. + */ + STC, + /** + * An agreement of obligation between two or more parties that is subject to contractual law and enforcement. + */ + CNTRCT, + /** + * A contract whose value is measured in monetary terms. + */ + FCNTRCT, + /** + * When used in the EVN mood, this concept means with respect to a covered party: + + + + A health care insurance policy or plan that is contractually binding between two or more parties; or + + + + A health care program, usually administered by government entities, that provides coverage to persons determined eligible under the terms of the program. + + + + + + When used in the definition (DEF) mood, COV means potential coverage for a patient who may or may not be a covered party. + + + + The concept's meaning is fully specified by the choice of ActCoverageTypeCode (abstract) ActProgramCode or ActInsurancePolicyCode. + */ + COV, + /** + * Definition: A worry that tends to persist over time and has as its subject a state or process. The subject of the worry has the potential to require intervention or management. + + + Examples: an observation result, procedure, substance administration, equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, allergy, and acute or chronic illness. + */ + CONC, + /** + * A public health case is a Concern about an observation or event that has a specific significance for public health. The creation of a PublicHealthCase initiates the tracking of the object of concern. The decision to track is related to but somewhat independent of the underlying event or observation. + + + UsageNotes: Typically a Public Health Case involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. + + A public health case definition (Act.moodCode = "definition") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case. + */ + HCASE, + /** + * An Outbreak is a concern resulting from a series of public health cases. + + + UsageNotes: The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak and its ending date is the last date of onset among the cases assigned to the outbreak. The effectiveTime attribute is used to convey the relevant dates for the case. An outbreak definition (Act.moodCode = "definition" includes the criteria for the number, types and occurrence pattern of cases necessary to declare an outbreak and to judge the severity of an outbreak. + */ + OUTBR, + /** + * The Consent class represents informed consents and all similar medico-legal transactions between the patient (or his legal guardian) and the provider. Examples are informed consent for surgical procedures, informed consent for clinical trials, advanced beneficiary notice, against medical advice decline from service, release of information agreement, etc. + + The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act. + + The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public. + + Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed. + */ + CONS, + /** + * An Act where a container is registered either via an automated sensor, such as a barcode reader, or by manual receipt + */ + CONTREG, + /** + * An identified point during a clinical trial at which one or more actions are scheduled to be performed (definition mood), or are actually performed (event mood). The actions may or may not involve an encounter between the subject and a healthcare professional. + */ + CTTEVENT, + /** + * An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable. + + Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples: + */ + DISPACT, + /** + * An interaction between entities that provides opportunity for transmission of a physical, chemical, or biological agent from an exposure source entity to an exposure target entity. + + + Examples: The following examples are provided to indicate what interactions are considered exposures rather than other types of Acts: + + + + A patient accidentally receives three times the recommended dose of their medication due to a dosing error. + + + + This is a substance administration. Public health and/or safety authorities may also be interested in documenting this with an associated exposure. + + + + + + A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive. + + + + There are several substance administrations in this example. Public health and/or safety authorities may also be interested in documenting this with associated exposures. + + + + + + In a busy medical ward, a patient is receiving chemotherapy for a lymphoma. Unfortunately, the IV infusion bag containing the medicine splits, spraying cytotoxic medication over the patient being treated and the patient in the adjacent bed. + + + + There are three substance administrations in this example. The first is the intended one (IV infusion) with its associated (implicit) exposure. There is an incident with an associated substance administration to the same patient involving the medication sprayed over the patient as well as an associated exposure. Additionally, the incident includes a substance administration involving the spraying of medication on the adjacent patient, also with an associated exposure. + + + + + + A patient who is a refugee from a war-torn African nation arrives in a busy inner city A&E department suffering from a cough with bloody sputum. Not understanding the registration and triage process, they sit in the waiting room for several hours before it is noticed that they have not booked in. As soon as they are being processed, it is suspected that they are suffering from TB. Vulnerable (immunosuppressed) patients who were sharing the waiting room with this patient may have been exposed to the tubercule bacillus, and must be traced for investigation. + + + + This is an exposure (or possibly multiple exposures) in the waiting room involving the refugee and everyone else in the waiting room during the period. There might also be a number of known or presumed substance administrations (coughing) via several possible routes. The substance administrations are only hypotheses until confirmed by further testing. + + + + + + A patient who has received an elective total hip replacement procedure suffers a prolonged stay in hospital, due to contracting an MRSA infection in the surgical wound site after the surgery. + + + + This is an exposure to MRSA. Although there was some sort of substance administration, it's possible the exact mechanism for introduction of the MRSA into the wound will not be identified. + + + + + + Routine maintenance of the X-ray machines at a local hospital reveals a serious breach of the shielding on one of the machines. Patients who have undergone investigations using that machine in the last month are likely to have been exposed to significantly higher doses of X-rays than was intended, and must be tracked for possible adverse effects. + + + + There has been an exposure of each patient who used the machine in the past 30 days. Some patients may have had substance administrations. + + + + + + A new member of staff is employed in the laundry processing room of a small cottage hospital, and a misreading of the instructions for adding detergents results in fifty times the usual concentration of cleaning materials being added to a batch of hospital bedding. As a result, several patients have been exposed to very high levels of detergents still present in the "clean" bedding, and have experienced dermatological reactions to this. + + + + There has been an incident with multiple exposures to several patients. Although there are substance administrations involving the application of the detergent to the skin of the patients, it is expected that the substance administrations would not be directly documented. + + + + + + Seven patients who are residents in a health care facility for the elderly mentally ill have developed respiratory problems. After several months of various tests having been performed and various medications prescribed to these patients, the problem is traced to their being "sensitive" to a new fungicide used in the wall plaster of the ward where these patients reside. + + + + The patients have been continuously exposed to the fungicide. Although there have been continuous substance administrations (via breathing) this would not normally be documented as a substance administration. + + + + + + A patient with osteoarthritis of the knees is treated symptomatically using analgesia, paracetamol (acetaminophen) 1g up to four times a day for pain relief. His GP does not realize that the patient has, 20 years previously (while at college) had severe alcohol addiction problems, and now, although this is completely under control, his liver has suffered significantly, leaving him more sensitive to hepatic toxicity from paracetamol use. Later that year, the patient returns with a noticeable level of jaundice. Paracetamol is immediately withdrawn and alternative solutions for the knee pain are sought. The jaundice gradually subsides with conservative management, but referral to the gastroenterologist is required for advice and monitoring. + + + + There is a substance administration with an associated exposure. The exposure component is based on the relative toxic level of the substance to a patient with a compromised liver function. + + + + + + A patient goes to their GP complaining of abdominal pain, having been discharged from the local hospital ten days' previously after an emergency appendectomy. The GP can find nothing particularly amiss, and presumes it is post operative surgical pain that will resolve. The patient returns a fortnight later, when the GP prescribes further analgesia, but does decide to request an outpatient surgical follow-up appointment. At this post-surgical outpatient review, the registrar decides to order an ultrasound, which, when performed three weeks later, shows a small faint inexplicable mass. A laparoscopy is then performed, as a day case procedure, and a piece of a surgical swab is removed from the patient's abdominal cavity. Thankfully, a full recovery then takes place. + + + + This is a procedural sequelae. There may be an Incident recorded for this also. + + + + + + A patient is slightly late for a regular pacemaker battery check in the Cardiology department of the local hospital. They are hurrying down the second floor corridor. A sudden summer squall has recently passed over the area, and rain has come in through an open corridor window leaving a small puddle on the corridor floor. In their haste, the patient slips in the puddle and falls so badly that they have to be taken to the A&E department, where it is discovered on investigation they have slightly torn the cruciate ligament in their left knee. + + + + This is not an exposure. There has been an incident. + + + + + + + Usage Notes: This class deals only with opportunity and not the outcome of the exposure; i.e. not all exposed parties will necessarily experience actual harm or benefit. + + Exposure differs from Substance Administration by the absence of the participation of a performer in the act. + + The following participations SHOULD be used with the following participations to distinguish the specific entities: + + + + The exposed entity participates via the "exposure target" (EXPTRGT) participation. + + + + An entity that has carried the agent transmitted in the exposure participates via the "exposure source" (EXSRC) participation. For example: + + + + a person or animal who carried an infectious disease and interacts (EXSRC) with another person or animal (EXPTRGT) transmitting the disease agent; + + + + a place or other environment (EXSRC) and a person or animal (EXPTRGT) who is exposed in the presence of this environment. + + + + + + When it is unknown whether a participating entity is the source of the agent (EXSRC) or the target of the transmission (EXPTRGT), the "exposure participant" (EXPART) is used. + + + + The physical (including energy), chemical or biological substance which is participating in the exposure uses the "exposure agent" (EXPAGNT) participation. There are at least three scenarios: + + + + the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or + + + + the player of the Role that participates as EXPAGNT is a mixture known to contain the chemical, radiological or biological substance of interest; or + + + + the player of the Role that participates as a EXPAGNT is known to carry the agent (i.e., the player is a fomite, vector, etc.). + + + + + + The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation. + + + Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error). + */ + EXPOS, + /** + * Description: + + + An acquisition exposure act describes the proximity (location and time) through which the participating entity was potentially exposed to a physical (including energy), chemical or biological agent from another entity. The acquisition exposure act is used in conjunction with transmission exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion. + + + Constraints: The Acquisition Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPSRC (exposure source) participation must never be associated with the Transmission Exposure either directly or via context conduction. + */ + AEXPOS, + /** + * Description: + + + A transmission exposure act describes the proximity (time and location) over which the participating source entity was capable of transmitting a physical (including energy), chemical or biological substance agent to another entity. The transmission exposure act is used in conjunction with acquisition exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion. + + + Constraints: The Transmission Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPTRGT (exposure target) participation must never be associated with the Transmission Exposure either directly or via context conduction. + */ + TEXPOS, + /** + * An event that occurred outside of the control of one or more of the parties involved. Includes the concept of an accident. + */ + INC, + /** + * The act of transmitting information and understanding about a topic to a subject where the participation association must be SBJ. + + + Discussion: This act may be used to request that a patient or provider be informed about an Act, or to indicate that a person was informed about a particular act. + */ + INFRM, + /** + * Represents concepts related to invoice processing in health care + */ + INVE, + /** + * Working list collects a dynamic list of individual instances of Act via ActRelationship which reflects the need of an individual worker, team of workers, or an organization to manage lists of acts for many different clinical and administrative reasons. Examples of working lists include problem lists, goal lists, allergy lists, and to-do lists. + */ + LIST, + /** + * An officially or unofficially instituted program to track acts of a particular type or categorization. + */ + MPROT, + /** + * Description:An act that is intended to result in new information about a subject. The main difference between Observations and other Acts is that Observations have a value attribute. The code attribute of Observation and the value attribute of Observation must be considered in combination to determine the semantics of the observation. + + + Discussion: + + + Structurally, many observations are name-value-pairs, where the Observation.code (inherited from Act) is the name and the Observation.value is the value of the property. Such a construct is also known as a variable (a named feature that can assume a value) hence, the Observation class is always used to hold generic name-value-pairs or variables, even though the variable valuation may not be the result of an elaborate observation method. It may be a simple answer to a question or it may be an assertion or setting of a parameter. + + As with all Act statements, Observation statements describe what was done, and in the case of Observations, this includes a description of what was actually observed (results or answers); and those results or answers are part of the observation and not split off into other objects. + + The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology. + + An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations. + + Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. + + Clinical documents commonly have Subjective and Objective findings, both of which are kinds of Observations. In addition, clinical documents commonly contain Assessments, which are also kinds of Observations. Thus, the establishment of a diagnosis is an Observation. + + + Examples: + + + + + Recording the results of a Family History Assessment + + + + Laboratory test and associated result + + + + Physical exam test and associated result + + + + Device temperature + + + + Soil lead level + */ + OBS, + /** + * Regions of Interest (ROI) within a subject Act. Primarily used for making secondary observations on a subset of a subject observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present. + */ + _ACTCLASSROI, + /** + * A Region of Interest (ROI) specified for a multidimensional observation, such as an Observation Series (OBSSER). The ROI is specified using a set of observation criteria, each delineating the boundary of the region in one of the dimensions in the multidimensional observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type subject (SUBJ), which must always be present. Each of the boundary criteria observations is connected with the ROI using ActRelationships of type "has component" (COMP). In each boundary criterion, the Act.code names the dimension and the Observation.value specifies the range of values inside the region. Typically the bounded dimension is continuous, and so the Observation.value will be an interval (IVL) data type. The Observation.value need not be specified if the respective dimension is only named but not constrained. For example, an ROI for the QT interval of a certain beat in ECG Lead II would contain 2 boundary criteria, one naming the interval in time (constrained), and the other naming the interval in ECG Lead II (only named, but not constrained). + */ + ROIBND, + /** + * A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g., to specify the location of a radiologic finding in an image or to specify the site of a physical finding by "circling" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present. + */ + ROIOVL, + /** + * The spatial relationship of a subject whether human, other animal, or plant, to a frame of reference such as gravity or a collection device. + */ + _SUBJECTPHYSICALPOSITION, + /** + * Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + _SUBJECTBODYPOSITION, + /** + * Lying on the left side. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + LLD, + /** + * Lying with the front or ventral surface downward; lying face down. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + PRN, + /** + * Lying on the right side. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + RLD, + /** + * A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SFWL, + /** + * Resting the body on the buttocks, typically with upper torso erect or semi erect. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SIT, + /** + * To be stationary, upright, vertical, on one's legs. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + STN, + /** + * Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SUP, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + RTRD, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + TRD, + /** + * An observation identifying a potential adverse outcome as a result of an Act or combination of Acts. + + + Examples: Detection of a drug-drug interaction; Identification of a late-submission for an invoice; Requesting discharge for a patient who does not meet hospital-defined discharge criteria. + + + Discussion: This class is commonly used for identifying 'business rule' or 'process' problems that may result in a refusal to carry out a particular request. In some circumstances it may be possible to 'bypass' a problem by modifying the request to acknowledge the issue and/or by providing some form of mitigation. + + + Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id). + */ + ALRT, + /** + * Definition: An observation that is composed of a set of observations. These observations typically have a logical or practical grouping for generally accepted clinical or functional purposes, such as observations that are run together because of automation. A battery can define required and optional component observations and, in some cases, will define complex rules that determine whether or not a particular observation is made. BATTERY is a constraint on the Observation class in that it is understood to always be composed of component observations. + + + UsageNotes: The focus in a BATTERY is that it is composed of individual observations. In request (RQO) mood, a battery is a request to perform the component observations. In event (EVN) mood a battery is a reporting of associated set of observation events. In definition mood a battery is the definition of the associated set of observations. + + + Examples: Vital signs, Full blood count, Chemistry panel. + */ + BATTERY, + /** + * The set of actions that define an experiment to assess the effectiveness and/or safety of a biopharmaceutical product (food, drug, device, etc.). In definition mood, this set of actions is often embodied in a clinical trial protocol; in event mood, this designates the aggregate act of applying the actions to one or more subjects. + */ + CLNTRL, + /** + * An instance of Observation of a Condition at a point in time that includes any Observations or Procedures associated with that Condition as well as links to previous instances of Condition Node for the same Condition + + + + Deprecation Comment: + This concept has been deprecated because an alternative structure for tracking the evolution of a problem has been presented and adopted by the Care Provision Work Group. + */ + CNOD, + /** + * An observable finding or state that persists over time and tends to require intervention or management, and, therefore, distinguished from an Observation made at a point in time; may exist before an Observation of the Condition is made or after interventions to manage the Condition are undertaken. Examples: equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, chronic illness + */ + COND, + /** + * A public health case is an Observation representing a condition or event that has a specific significance for public health. Typically it involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. An outbreak involving multiple individuals may be considered as a type of public health case. A public health case definition (Act.moodCode = "definition") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. There are also case definitions for outbreaks. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case. + */ + CASE, + /** + * An outbreak represents a series of public health cases. The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak, and its ending date is the last date of onset among the cases assigned to the outbreak. + */ + OUTB, + /** + * Class for holding attributes unique to diagnostic images. + */ + DGIMG, + /** + * Description:An observation of genomic phenomena. + */ + GEN, + /** + * Description:A determinant peptide in a polypeptide as described by polypeptide. + */ + DETPOL, + /** + * Description:An expression level of genes/proteins or other expressed genomic entities. + */ + EXP, + /** + * Description:The position of a gene (or other significant sequence) on the genome. + */ + LOC, + /** + * Description:A genomic phenomenon that is expressed externally in the organism. + */ + PHN, + /** + * Description:A polypeptide resulting from the translation of a gene. + */ + POL, + /** + * Description:A sequence of biomolecule like the DNA, RNA, protein and the like. + */ + SEQ, + /** + * Description:A variation in a sequence as described by BioSequence. + */ + SEQVAR, + /** + * An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government. + */ + INVSTG, + /** + * Container for Correlated Observation Sequences sharing a common frame of reference. All Observations of the same cd must be comparable and relative to the common frame of reference. For example, a 3-channel ECG device records a 12-lead ECG in 4 steps (3 leads at a time). Each of the separate 3-channel recordings would be in their own "OBSCOR". And, all 4 OBSCOR would be contained in one OBSSER because all the times are relative to the same origin (beginning of the recording) and all the ECG signals were from a fixed set of electrodes. + */ + OBSSER, + /** + * Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index. E.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads. + */ + OBSCOR, + /** + * An observation denoting the physical location of a person or thing based on a reference coordinate system. + */ + POS, + /** + * Description:An observation representing the degree to which the assignment of the spatial coordinates, based on a matching algorithm by a geocoding engine against a reference spatial database, matches true or accepted values. + */ + POSACC, + /** + * Description:An observation representing one of a set of numerical values used to determine the position of a place. The name of the coordinate value is determined by the reference coordinate system. + */ + POSCOORD, + /** + * An observation on a specimen in a laboratory environment that may affect processing, analysis or result interpretation + */ + SPCOBS, + /** + * An act which describes the process whereby a 'verifying party' validates either the existence of the Role attested to by some Credential or the actual Vetting act and its details. + */ + VERIF, + /** + * An Act that of taking on whole or partial responsibility for, or attention to, safety and well-being of a subject of care. + + + Discussion: A care provision event may exist without any other care actions taking place. For example, when a patient is assigned to the care of a particular health professional. + + In request (RQO) mood care provision communicates a referral, which is a request: + + + + from one party (linked as a participant of type author (AUT)), + + + + to another party (linked as a participant of type performer (PRF), + + + + to take responsibility for a scope specified by the code attribute, + + + + for an entity (linked as a participant of type subject (SBJ)). + + + + The scope of the care for which responsibility is taken is identified by code attribute. + + In event (EVN) mood care provision indicates the effective time interval of a specified scope of responsibility by a performer (PRF) or set of performers (PRF) for a subject (SBJ). + + + Examples: + + + + + Referral from GP to a specialist. + + + + Assignment of a patient or group of patients to the case list of a health professional. + + + + Assignment of inpatients to the care of particular nurses for a working shift. + */ + PCPR, + /** + * An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g., traffic accident), office visit, occupational therapy, telephone call. + */ + ENC, + /** + * Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by one party on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + */ + POLICY, + /** + * Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by a jurisdiction on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries. + */ + JURISPOL, + /** + * Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed by an organization on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A clinical or research protocols imposed by a payer, a malpractice insurer, or an institution to which a provider must adhere. A mandate imposed by a denominational institution for a provider to provide or withhold certain information from the patient about treatment options. + */ + ORGPOL, + /** + * Description:An ethical or clinical obligation, requirement, rule, or expectation imposed or strongly encouraged by organizations that oversee particular clinical domains or provider certification which define the boundaries within which a provider may practice and which may have legal basis or ramifications on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide. + */ + SCOPOL, + /** + * Description:A requirement, rule, or expectation typically documented as guidelines, protocols, or formularies imposed or strongly encouraged by an organization that oversees or has authority over the practices within a domain, and which may have legal basis or ramifications on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A payer may require a prescribing provider to adhere to formulary guidelines. An institution may adopt clinical guidelines and protocols and implement these within its electronic health record and decision support systems. + */ + STDPOL, + /** + * An Act whose immediate and primary outcome (post-condition) is the alteration of the physical condition of the subject. + + + Examples: : Procedures may involve the disruption of some body surface (e.g. an incision in a surgical procedure), but they also include conservative procedures such as reduction of a luxated join, chiropractic treatment, massage, balneotherapy, acupuncture, shiatsu, etc. Outside of clinical medicine, procedures may be such things as alteration of environments (e.g. straightening rivers, draining swamps, building dams) or the repair or change of machinery etc. + */ + PROC, + /** + * The act of introducing or otherwise applying a substance to the subject. + + + Discussion: The effect of the substance is typically established on a biochemical basis, however, that is not a requirement. For example, radiotherapy can largely be described in the same way, especially if it is a systemic therapy such as radio-iodine. This class also includes the application of chemical treatments to an area. + + + Examples: Chemotherapy protocol; Drug prescription; Vaccination record + */ + SBADM, + /** + * Description: The act of removing a substance from the subject. + */ + SBEXT, + /** + * A procedure for obtaining a specimen from a source entity. + */ + SPECCOLLECT, + /** + * Represents the act of maintaining information about the registration of its associated registered subject. The subject can be either an Act or a Role, and includes subjects such as lab exam definitions, drug protocol definitions, prescriptions, persons, patients, practitioners, and equipment. + + The registration may have a unique identifier - separate from the unique identification of the subject - as well as a core set of related participations and act relationships that characterize the registration event and aid in the disposition of the subject information by a receiving system. + */ + REG, + /** + * The act of examining and evaluating the subject, usually another act. For example, "This prescription needs to be reviewed in 2 months." + */ + REV, + /** + * A procedure or treatment performed on a specimen to prepare it for analysis + */ + SPCTRT, + /** + * Supply orders and deliveries are simple Acts that focus on the delivered product. The product is associated with the Supply Act via Participation.typeCode="product". With general Supply Acts, the precise identification of the Material (manufacturer, serial numbers, etc.) is important. Most of the detailed information about the Supply should be represented using the Material class. If delivery needs to be scheduled, tracked, and billed separately, one can associate a Transportation Act with the Supply Act. Pharmacy dispense services are represented as Supply Acts, associated with a SubstanceAdministration Act. The SubstanceAdministration class represents the administration of medication, while dispensing is supply. + */ + SPLY, + /** + * Diet services are supply services, with some aspects resembling Medication services: the detail of the diet is given as a description of the Material associated via Participation.typeCode="product". Medically relevant diet types may be communicated in the Diet.code attribute using domain ActDietCode, however, the detail of the food supplied and the various combinations of dishes should be communicated as Material instances. + + + Deprecation Note + + + + Class: Use either the Supply class (if dealing with what should be given to the patient) or SubstanceAdministration class (if dealing with what the patient should consume) + + + energyQuantity: This quantity can be conveyed by using a Content relationship with a quantity attribute expressing the calories + + + carbohydrateQuantity:This quantity can be conveyed using a Content relationship to an Entity with a code of carbohydrate and a quantity attribute on the content relationship. + */ + DIET, + /** + * The act of putting something away for safe keeping. The "something" may be physical object such as a specimen, or information, such as observations regarding a specimen. + */ + STORE, + /** + * Definition: Indicates that the subject Act has undergone or should undergo substitution of a type indicated by Act.code. + + Rationale: Used to specify "allowed" substitution when creating orders, "actual" susbstitution when sending events, as well as the reason for the substitution and who was responsible for it. + */ + SUBST, + /** + * Definition: The act of transferring information without the intent of imparting understanding about a topic to the subject that is the recipient or holder of the transferred information where the participation association must be RCV or HLD. + */ + TRFR, + /** + * Transportation is the moving of a payload (people or material) from a location of origin to a destination location. Thus, any transport service has the three target instances of type payload, origin, and destination, besides the targets that are generally used for any service (i.e., performer, device, etc.) + */ + TRNS, + /** + * A sub-class of Act representing any transaction between two accounts whose value is measured in monetary terms. + + In the "intent" mood, communicates a request for a transaction to be initiated, or communicates a transfer of value between two accounts. + + In the "event" mood, communicates the posting of a transaction to an account. + */ + XACT, + /** + * ActClassContainer + */ + _ACTCLASSCONTAINER, + /** + * This context represents the information acquired and recorded for an observation, a clinical statement such as a portion of the patient's history or an inference or assertion, or an action that might be intended or has actually been performed. This class may represent both the actual data describing the observation, inference, or action, and optionally the details supporting the clinical reasoning process such as a reference to an electronic guideline, decision support system, or other knowledge reference. + */ + ENTRY, + /** + * Organizer of entries. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or "organizer tree". + + The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R. + */ + ORGANIZER, + /** + * null + */ + DOCCNTNT, + /** + * null + */ + DOCLIST, + /** + * null + */ + DOCLSTITM, + /** + * null + */ + DOCPARA, + /** + * null + */ + DOCTBL, + /** + * null + */ + LINKHTML, + /** + * null + */ + LOCALATTR, + /** + * null + */ + LOCALMRKP, + /** + * null + */ + ORDERED, + /** + * null + */ + REFR, + /** + * null + */ + TBLCOL, + /** + * null + */ + TBLCOLGP, + /** + * null + */ + TBLDATA, + /** + * null + */ + TBLHDR, + /** + * null + */ + TBLROW, + /** + * null + */ + TBODY, + /** + * null + */ + TFOOT, + /** + * null + */ + THEAD, + /** + * null + */ + UNORDERED, + /** + * added to help the parsers + */ + NULL; + public static V3ActClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ACT".equals(codeString)) + return ACT; + if ("_ActClassRecordOrganizer".equals(codeString)) + return _ACTCLASSRECORDORGANIZER; + if ("COMPOSITION".equals(codeString)) + return COMPOSITION; + if ("DOC".equals(codeString)) + return DOC; + if ("DOCCLIN".equals(codeString)) + return DOCCLIN; + if ("CDALVLONE".equals(codeString)) + return CDALVLONE; + if ("CONTAINER".equals(codeString)) + return CONTAINER; + if ("CATEGORY".equals(codeString)) + return CATEGORY; + if ("DOCBODY".equals(codeString)) + return DOCBODY; + if ("DOCSECT".equals(codeString)) + return DOCSECT; + if ("TOPIC".equals(codeString)) + return TOPIC; + if ("EXTRACT".equals(codeString)) + return EXTRACT; + if ("EHR".equals(codeString)) + return EHR; + if ("FOLDER".equals(codeString)) + return FOLDER; + if ("GROUPER".equals(codeString)) + return GROUPER; + if ("CLUSTER".equals(codeString)) + return CLUSTER; + if ("ACCM".equals(codeString)) + return ACCM; + if ("ACCT".equals(codeString)) + return ACCT; + if ("ACSN".equals(codeString)) + return ACSN; + if ("ADJUD".equals(codeString)) + return ADJUD; + if ("CACT".equals(codeString)) + return CACT; + if ("ACTN".equals(codeString)) + return ACTN; + if ("INFO".equals(codeString)) + return INFO; + if ("STC".equals(codeString)) + return STC; + if ("CNTRCT".equals(codeString)) + return CNTRCT; + if ("FCNTRCT".equals(codeString)) + return FCNTRCT; + if ("COV".equals(codeString)) + return COV; + if ("CONC".equals(codeString)) + return CONC; + if ("HCASE".equals(codeString)) + return HCASE; + if ("OUTBR".equals(codeString)) + return OUTBR; + if ("CONS".equals(codeString)) + return CONS; + if ("CONTREG".equals(codeString)) + return CONTREG; + if ("CTTEVENT".equals(codeString)) + return CTTEVENT; + if ("DISPACT".equals(codeString)) + return DISPACT; + if ("EXPOS".equals(codeString)) + return EXPOS; + if ("AEXPOS".equals(codeString)) + return AEXPOS; + if ("TEXPOS".equals(codeString)) + return TEXPOS; + if ("INC".equals(codeString)) + return INC; + if ("INFRM".equals(codeString)) + return INFRM; + if ("INVE".equals(codeString)) + return INVE; + if ("LIST".equals(codeString)) + return LIST; + if ("MPROT".equals(codeString)) + return MPROT; + if ("OBS".equals(codeString)) + return OBS; + if ("_ActClassROI".equals(codeString)) + return _ACTCLASSROI; + if ("ROIBND".equals(codeString)) + return ROIBND; + if ("ROIOVL".equals(codeString)) + return ROIOVL; + if ("_SubjectPhysicalPosition".equals(codeString)) + return _SUBJECTPHYSICALPOSITION; + if ("_SubjectBodyPosition".equals(codeString)) + return _SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return LLD; + if ("PRN".equals(codeString)) + return PRN; + if ("RLD".equals(codeString)) + return RLD; + if ("SFWL".equals(codeString)) + return SFWL; + if ("SIT".equals(codeString)) + return SIT; + if ("STN".equals(codeString)) + return STN; + if ("SUP".equals(codeString)) + return SUP; + if ("RTRD".equals(codeString)) + return RTRD; + if ("TRD".equals(codeString)) + return TRD; + if ("ALRT".equals(codeString)) + return ALRT; + if ("BATTERY".equals(codeString)) + return BATTERY; + if ("CLNTRL".equals(codeString)) + return CLNTRL; + if ("CNOD".equals(codeString)) + return CNOD; + if ("COND".equals(codeString)) + return COND; + if ("CASE".equals(codeString)) + return CASE; + if ("OUTB".equals(codeString)) + return OUTB; + if ("DGIMG".equals(codeString)) + return DGIMG; + if ("GEN".equals(codeString)) + return GEN; + if ("DETPOL".equals(codeString)) + return DETPOL; + if ("EXP".equals(codeString)) + return EXP; + if ("LOC".equals(codeString)) + return LOC; + if ("PHN".equals(codeString)) + return PHN; + if ("POL".equals(codeString)) + return POL; + if ("SEQ".equals(codeString)) + return SEQ; + if ("SEQVAR".equals(codeString)) + return SEQVAR; + if ("INVSTG".equals(codeString)) + return INVSTG; + if ("OBSSER".equals(codeString)) + return OBSSER; + if ("OBSCOR".equals(codeString)) + return OBSCOR; + if ("POS".equals(codeString)) + return POS; + if ("POSACC".equals(codeString)) + return POSACC; + if ("POSCOORD".equals(codeString)) + return POSCOORD; + if ("SPCOBS".equals(codeString)) + return SPCOBS; + if ("VERIF".equals(codeString)) + return VERIF; + if ("PCPR".equals(codeString)) + return PCPR; + if ("ENC".equals(codeString)) + return ENC; + if ("POLICY".equals(codeString)) + return POLICY; + if ("JURISPOL".equals(codeString)) + return JURISPOL; + if ("ORGPOL".equals(codeString)) + return ORGPOL; + if ("SCOPOL".equals(codeString)) + return SCOPOL; + if ("STDPOL".equals(codeString)) + return STDPOL; + if ("PROC".equals(codeString)) + return PROC; + if ("SBADM".equals(codeString)) + return SBADM; + if ("SBEXT".equals(codeString)) + return SBEXT; + if ("SPECCOLLECT".equals(codeString)) + return SPECCOLLECT; + if ("REG".equals(codeString)) + return REG; + if ("REV".equals(codeString)) + return REV; + if ("SPCTRT".equals(codeString)) + return SPCTRT; + if ("SPLY".equals(codeString)) + return SPLY; + if ("DIET".equals(codeString)) + return DIET; + if ("STORE".equals(codeString)) + return STORE; + if ("SUBST".equals(codeString)) + return SUBST; + if ("TRFR".equals(codeString)) + return TRFR; + if ("TRNS".equals(codeString)) + return TRNS; + if ("XACT".equals(codeString)) + return XACT; + if ("_ActClassContainer".equals(codeString)) + return _ACTCLASSCONTAINER; + if ("ENTRY".equals(codeString)) + return ENTRY; + if ("ORGANIZER".equals(codeString)) + return ORGANIZER; + if ("DOCCNTNT".equals(codeString)) + return DOCCNTNT; + if ("DOCLIST".equals(codeString)) + return DOCLIST; + if ("DOCLSTITM".equals(codeString)) + return DOCLSTITM; + if ("DOCPARA".equals(codeString)) + return DOCPARA; + if ("DOCTBL".equals(codeString)) + return DOCTBL; + if ("LINKHTML".equals(codeString)) + return LINKHTML; + if ("LOCALATTR".equals(codeString)) + return LOCALATTR; + if ("LOCALMRKP".equals(codeString)) + return LOCALMRKP; + if ("ordered".equals(codeString)) + return ORDERED; + if ("REFR".equals(codeString)) + return REFR; + if ("TBLCOL".equals(codeString)) + return TBLCOL; + if ("TBLCOLGP".equals(codeString)) + return TBLCOLGP; + if ("TBLDATA".equals(codeString)) + return TBLDATA; + if ("TBLHDR".equals(codeString)) + return TBLHDR; + if ("TBLROW".equals(codeString)) + return TBLROW; + if ("tbody".equals(codeString)) + return TBODY; + if ("tfoot".equals(codeString)) + return TFOOT; + if ("thead".equals(codeString)) + return THEAD; + if ("unordered".equals(codeString)) + return UNORDERED; + throw new FHIRException("Unknown V3ActClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACT: return "ACT"; + case _ACTCLASSRECORDORGANIZER: return "_ActClassRecordOrganizer"; + case COMPOSITION: return "COMPOSITION"; + case DOC: return "DOC"; + case DOCCLIN: return "DOCCLIN"; + case CDALVLONE: return "CDALVLONE"; + case CONTAINER: return "CONTAINER"; + case CATEGORY: return "CATEGORY"; + case DOCBODY: return "DOCBODY"; + case DOCSECT: return "DOCSECT"; + case TOPIC: return "TOPIC"; + case EXTRACT: return "EXTRACT"; + case EHR: return "EHR"; + case FOLDER: return "FOLDER"; + case GROUPER: return "GROUPER"; + case CLUSTER: return "CLUSTER"; + case ACCM: return "ACCM"; + case ACCT: return "ACCT"; + case ACSN: return "ACSN"; + case ADJUD: return "ADJUD"; + case CACT: return "CACT"; + case ACTN: return "ACTN"; + case INFO: return "INFO"; + case STC: return "STC"; + case CNTRCT: return "CNTRCT"; + case FCNTRCT: return "FCNTRCT"; + case COV: return "COV"; + case CONC: return "CONC"; + case HCASE: return "HCASE"; + case OUTBR: return "OUTBR"; + case CONS: return "CONS"; + case CONTREG: return "CONTREG"; + case CTTEVENT: return "CTTEVENT"; + case DISPACT: return "DISPACT"; + case EXPOS: return "EXPOS"; + case AEXPOS: return "AEXPOS"; + case TEXPOS: return "TEXPOS"; + case INC: return "INC"; + case INFRM: return "INFRM"; + case INVE: return "INVE"; + case LIST: return "LIST"; + case MPROT: return "MPROT"; + case OBS: return "OBS"; + case _ACTCLASSROI: return "_ActClassROI"; + case ROIBND: return "ROIBND"; + case ROIOVL: return "ROIOVL"; + case _SUBJECTPHYSICALPOSITION: return "_SubjectPhysicalPosition"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "LLD"; + case PRN: return "PRN"; + case RLD: return "RLD"; + case SFWL: return "SFWL"; + case SIT: return "SIT"; + case STN: return "STN"; + case SUP: return "SUP"; + case RTRD: return "RTRD"; + case TRD: return "TRD"; + case ALRT: return "ALRT"; + case BATTERY: return "BATTERY"; + case CLNTRL: return "CLNTRL"; + case CNOD: return "CNOD"; + case COND: return "COND"; + case CASE: return "CASE"; + case OUTB: return "OUTB"; + case DGIMG: return "DGIMG"; + case GEN: return "GEN"; + case DETPOL: return "DETPOL"; + case EXP: return "EXP"; + case LOC: return "LOC"; + case PHN: return "PHN"; + case POL: return "POL"; + case SEQ: return "SEQ"; + case SEQVAR: return "SEQVAR"; + case INVSTG: return "INVSTG"; + case OBSSER: return "OBSSER"; + case OBSCOR: return "OBSCOR"; + case POS: return "POS"; + case POSACC: return "POSACC"; + case POSCOORD: return "POSCOORD"; + case SPCOBS: return "SPCOBS"; + case VERIF: return "VERIF"; + case PCPR: return "PCPR"; + case ENC: return "ENC"; + case POLICY: return "POLICY"; + case JURISPOL: return "JURISPOL"; + case ORGPOL: return "ORGPOL"; + case SCOPOL: return "SCOPOL"; + case STDPOL: return "STDPOL"; + case PROC: return "PROC"; + case SBADM: return "SBADM"; + case SBEXT: return "SBEXT"; + case SPECCOLLECT: return "SPECCOLLECT"; + case REG: return "REG"; + case REV: return "REV"; + case SPCTRT: return "SPCTRT"; + case SPLY: return "SPLY"; + case DIET: return "DIET"; + case STORE: return "STORE"; + case SUBST: return "SUBST"; + case TRFR: return "TRFR"; + case TRNS: return "TRNS"; + case XACT: return "XACT"; + case _ACTCLASSCONTAINER: return "_ActClassContainer"; + case ENTRY: return "ENTRY"; + case ORGANIZER: return "ORGANIZER"; + case DOCCNTNT: return "DOCCNTNT"; + case DOCLIST: return "DOCLIST"; + case DOCLSTITM: return "DOCLSTITM"; + case DOCPARA: return "DOCPARA"; + case DOCTBL: return "DOCTBL"; + case LINKHTML: return "LINKHTML"; + case LOCALATTR: return "LOCALATTR"; + case LOCALMRKP: return "LOCALMRKP"; + case ORDERED: return "ordered"; + case REFR: return "REFR"; + case TBLCOL: return "TBLCOL"; + case TBLCOLGP: return "TBLCOLGP"; + case TBLDATA: return "TBLDATA"; + case TBLHDR: return "TBLHDR"; + case TBLROW: return "TBLROW"; + case TBODY: return "tbody"; + case TFOOT: return "tfoot"; + case THEAD: return "thead"; + case UNORDERED: return "unordered"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActClass"; + } + public String getDefinition() { + switch (this) { + case ACT: return "A record of something that is being done, has been done, can be done, or is intended or requested to be done.\r\n\n \n Examples:The kinds of acts that are common in health care are (1) a clinical observation, (2) an assessment of health condition (such as problems and diagnoses), (3) healthcare goals, (4) treatment services (such as medication, surgery, physical and psychological therapy), (5) assisting, monitoring or attending, (6) training and education services to patients and their next of kin, (7) and notary services (such as advanced directives or living will), (8) editing and maintaining documents, and many others.\r\n\n \n Discussion and Rationale: Acts are the pivot of the RIM; all domain information and processes are represented primarily in Acts. Any profession or business, including healthcare, is primarily constituted of intentional and occasionally non-intentional actions, performed and recorded by responsible actors. An Act-instance is a record of such an action.\r\n\n Acts connect to Entities in their Roles through Participations and connect to other Acts through ActRelationships. Participations are the authors, performers and other responsible parties as well as subjects and beneficiaries (which includes tools and material used in the performance of the act, which are also subjects). The moodCode distinguishes between Acts that are meant as factual records, vs. records of intended or ordered services, and the other modalities in which act can appear.\r\n\n One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who \"owns\" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances.\r\n\n In this sense, an Act-instance represents a \"statement\" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but \"a faithful record of what clinicians have heard, seen, thought, and done.\" Rector and Nowlan go on saying that \"the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view.\" Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements.\r\n\n Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as \"speech-acts\" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press].\r\n\n An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category \"sequel\").\r\n\n Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent \"objective state of affairs\" or \"real processes\" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information."; + case _ACTCLASSRECORDORGANIZER: return "Used to group a set of acts sharing a common context. Organizer structures can nest within other context structures - such as where a document is contained within a folder, or a folder is contained within an EHR extract."; + case COMPOSITION: return "A context representing a grouped commitment of information to the EHR. It is considered the unit of modification of the record, the unit of transmission in record extracts, and the unit of attestation by authorizing clinicians.\r\n\n A composition represents part of a patient record originating from a single interaction between an authenticator and the record.\r\n\n Unless otherwise stated all statements within a composition have the same authenticator, apply to the same patient and were recorded in a single session of use of a single application.\r\n\n A composition contains organizers and entries."; + case DOC: return "The notion of a document comes particularly from the paper world, where it corresponds to the contents recorded on discrete pieces of paper. In the electronic world, a document is a kind of composition that bears resemblance to their paper world counter-parts. Documents typically are meant to be human-readable.\r\n\n HL7's notion of document differs from that described in the W3C XML Recommendation, in which a document refers specifically to the contents that fall between the root element's start-tag and end-tag. Not all XML documents are HL7 documents."; + case DOCCLIN: return "A clinical document is a documentation of clinical observations and services, with the following characteristics:\r\n\n \n \n Persistence - A clinical document continues to exist in an unaltered state, for a time period defined by local and regulatory requirements; \r\n\n \n \n Stewardship - A clinical document is maintained by a person or organization entrusted with its care; \r\n\n \n \n Potential for authentication - A clinical document is an assemblage of information that is intended to be legally authenticated; \r\n\n \n \n Wholeness - Authentication of a clinical document applies to the whole and does not apply to portions of the document without the full context of the document;\r\n\n \n \n Human readability - A clinical document is human readable."; + case CDALVLONE: return "A clinical document that conforms to Level One of the HL7 Clinical Document Architecture (CDA)"; + case CONTAINER: return "Description: Container of clinical statements. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or \"container tree\".\r\n\n The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R."; + case CATEGORY: return "A group of entries within a composition or topic that have a common characteristic - for example, Examination, Diagnosis, Management OR Subjective, Objective, Analysis, Plan.\r\n\n The distinction from Topic relates to value sets. For Category there is a bounded list of things like \"Examination\", \"Diagnosis\" or SOAP categories. For Topic the list is wide open to any clinical condition or reason for a part of an encounter.\r\n\n A CATEGORY MAY CONTAIN ENTRIES."; + case DOCBODY: return "A context that distinguishes the body of a document from the document header. This is seen, for instance, in HTML documents, which have discrete and elements."; + case DOCSECT: return "A context that subdivides the body of a document. Document sections are typically used for human navigation, to give a reader a clue as to the expected content. Document sections are used to organize and provide consistency to the contents of a document body. Document sections can contain document sections and can contain entries."; + case TOPIC: return "A group of entries within a composition that are related to a common clinical theme - such as a specific disorder or problem, prevention, screening and provision of contraceptive services.\r\n\n A topic may contain categories and entries."; + case EXTRACT: return "This context represents the part of a patient record conveyed in a single communication. It is drawn from a providing system for the purposes of communication to a requesting process (which might be another repository, a client application or a middleware service such as an electronic guideline engine), and supporting the faithful inclusion of the communicated data in the receiving system.\r\n\n An extract may be the entirety of the patient record as held by the sender or it may be a part of that record (e.g. changes since a specified date).\r\n\n An extract contains folders or compositions.\r\n\n An extract cannot contain another extract."; + case EHR: return "A context that comprises all compositions. The EHR is an extract that includes the entire chart.\r\n\n \n NOTE: In an exchange scenario, an EHR is a specialization of an extract."; + case FOLDER: return "A context representing the high-level organization of an extract e.g. to group parts of the record by episode, care team, clinical specialty, clinical condition, or source application. Internationally, this kind of organizing structure is used variably: in some centers and systems the folder is treated as an informal compartmentalization of the overall health record; in others it might represent a significant legal portion of the EHR relating to the originating enterprise or team.\r\n\n A folder contains compositions.\r\n\n Folders may be nested within folders."; + case GROUPER: return "Definition: An ACT that organizes a set of component acts into a semantic grouping that share a particular context such as timeframe, patient, etc.\r\n\n \n UsageNotes: The focus in a GROUPER act is the grouping of the contained acts. For example \"a request to group\" (RQO), \"a type of grouping that is allowed to occur\" (DEF), etc.\r\n\n Unlike WorkingList, which represents a dynamic, shared, continuously updated collection to provide a \"view\" of a set of objects, GROUPER collections tend to be static and simply indicate a shared set of semantics. Note that sharing of semantics can be achieved using ACT as well. However, with GROUPER, the sole semantic is of grouping."; + case CLUSTER: return "Description:An ACT that organizes a set of component acts into a semantic grouping that have a shared subject. The subject may be either a subject participation (SBJ), subject act relationship (SUBJ), or child participation/act relationship types.\r\n\n \n Discussion: The focus in a CLUSTER act is the grouping of the contained acts. For example \"a request to cluster\" (RQO), \"a type of cluster that is allowed to occur\" (DEF), etc.\r\n\n \n Examples: \n \r\n\n \n \n Radiologic investigations that might include administration of a dye, followed by radiographic observations;\r\n\n \n \n \"Isolate cluster\" which includes all testing and specimen processing performed on a specific isolate;\r\n\n \n \n a set of actions to perform at a particular stage in a clinical trial."; + case ACCM: return "An accommodation is a service provided for a Person or other LivingSubject in which a place is provided for the subject to reside for a period of time. Commonly used to track the provision of ward, private and semi-private accommodations for a patient."; + case ACCT: return "A financial account established to track the net result of financial acts."; + case ACSN: return "A unit of work, a grouper of work items as defined by the system performing that work. Typically some laboratory order fulfillers communicate references to accessions in their communications regarding laboratory orders. Often one or more specimens are related to an accession such that in some environments the accession number is taken as an identifier for a specimen (group)."; + case ADJUD: return "A transformation process where a requested invoice is transformed into an agreed invoice. Represents the adjudication processing of an invoice (claim). Adjudication results can be adjudicated as submitted, with adjustments or refused.\r\n\n Adjudication results comprise 2 components: the adjudication processing results and a restated (or adjudicated) invoice or claim"; + case CACT: return "An act representing a system action such as the change of state of another act or the initiation of a query. All control acts represent trigger events in the HL7 context. ControlActs may occur in different moods."; + case ACTN: return "Sender asks addressee to do something depending on the focal Act of the payload. An example is \"fulfill this order\". Addressee has responsibilities to either reject the message or to act on it in an appropriate way (specified by the specific receiver responsibilities for the interaction)."; + case INFO: return "Sender sends payload to addressee as information. Addressee does not have responsibilities beyond serving addressee's own interest (i.e., read and memorize if you see fit). This is equivalent to an FYI on a memo."; + case STC: return "Description: Sender transmits a status change pertaining to the focal act of the payload. This status of the focal act is the final state of the state transition. This can be either a request or an event, according to the mood of the control act."; + case CNTRCT: return "An agreement of obligation between two or more parties that is subject to contractual law and enforcement."; + case FCNTRCT: return "A contract whose value is measured in monetary terms."; + case COV: return "When used in the EVN mood, this concept means with respect to a covered party:\r\n\n \n \n A health care insurance policy or plan that is contractually binding between two or more parties; or \r\n\n \n \n A health care program, usually administered by government entities, that provides coverage to persons determined eligible under the terms of the program.\r\n\n \n \n \n \n When used in the definition (DEF) mood, COV means potential coverage for a patient who may or may not be a covered party.\r\n\n \n \n The concept's meaning is fully specified by the choice of ActCoverageTypeCode (abstract) ActProgramCode or ActInsurancePolicyCode."; + case CONC: return "Definition: A worry that tends to persist over time and has as its subject a state or process. The subject of the worry has the potential to require intervention or management.\r\n\n \n Examples: an observation result, procedure, substance administration, equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, allergy, and acute or chronic illness."; + case HCASE: return "A public health case is a Concern about an observation or event that has a specific significance for public health. The creation of a PublicHealthCase initiates the tracking of the object of concern. The decision to track is related to but somewhat independent of the underlying event or observation.\r\n\n \n UsageNotes: Typically a Public Health Case involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health.\r\n\n A public health case definition (Act.moodCode = \"definition\") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case."; + case OUTBR: return "An Outbreak is a concern resulting from a series of public health cases.\r\n\n \n UsageNotes: The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak and its ending date is the last date of onset among the cases assigned to the outbreak. The effectiveTime attribute is used to convey the relevant dates for the case. An outbreak definition (Act.moodCode = \"definition\" includes the criteria for the number, types and occurrence pattern of cases necessary to declare an outbreak and to judge the severity of an outbreak."; + case CONS: return "The Consent class represents informed consents and all similar medico-legal transactions between the patient (or his legal guardian) and the provider. Examples are informed consent for surgical procedures, informed consent for clinical trials, advanced beneficiary notice, against medical advice decline from service, release of information agreement, etc.\r\n\n The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act.\r\n\n The \"signatures\" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of \"performer\", the healthcare provider informing the patient, and \"consenter\", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public.\r\n\n Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed."; + case CONTREG: return "An Act where a container is registered either via an automated sensor, such as a barcode reader, or by manual receipt"; + case CTTEVENT: return "An identified point during a clinical trial at which one or more actions are scheduled to be performed (definition mood), or are actually performed (event mood). The actions may or may not involve an encounter between the subject and a healthcare professional."; + case DISPACT: return "An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable.\r\n\n Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples:"; + case EXPOS: return "An interaction between entities that provides opportunity for transmission of a physical, chemical, or biological agent from an exposure source entity to an exposure target entity.\r\n\n \n Examples: The following examples are provided to indicate what interactions are considered exposures rather than other types of Acts:\r\n\n \n \n A patient accidentally receives three times the recommended dose of their medication due to a dosing error. \r\n\n \n \n This is a substance administration. Public health and/or safety authorities may also be interested in documenting this with an associated exposure.\r\n\n \n \n \n \n A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore \"exposed\" to a medicine that there was no therapeutic indication for them to receive. \r\n\n \n \n There are several substance administrations in this example. Public health and/or safety authorities may also be interested in documenting this with associated exposures.\r\n\n \n \n \n \n In a busy medical ward, a patient is receiving chemotherapy for a lymphoma. Unfortunately, the IV infusion bag containing the medicine splits, spraying cytotoxic medication over the patient being treated and the patient in the adjacent bed. \r\n\n \n \n There are three substance administrations in this example. The first is the intended one (IV infusion) with its associated (implicit) exposure. There is an incident with an associated substance administration to the same patient involving the medication sprayed over the patient as well as an associated exposure. Additionally, the incident includes a substance administration involving the spraying of medication on the adjacent patient, also with an associated exposure.\r\n\n \n \n \n \n A patient who is a refugee from a war-torn African nation arrives in a busy inner city A&E department suffering from a cough with bloody sputum. Not understanding the registration and triage process, they sit in the waiting room for several hours before it is noticed that they have not booked in. As soon as they are being processed, it is suspected that they are suffering from TB. Vulnerable (immunosuppressed) patients who were sharing the waiting room with this patient may have been exposed to the tubercule bacillus, and must be traced for investigation. \r\n\n \n \n This is an exposure (or possibly multiple exposures) in the waiting room involving the refugee and everyone else in the waiting room during the period. There might also be a number of known or presumed substance administrations (coughing) via several possible routes. The substance administrations are only hypotheses until confirmed by further testing.\r\n\n \n \n \n \n A patient who has received an elective total hip replacement procedure suffers a prolonged stay in hospital, due to contracting an MRSA infection in the surgical wound site after the surgery. \r\n\n \n \n This is an exposure to MRSA. Although there was some sort of substance administration, it's possible the exact mechanism for introduction of the MRSA into the wound will not be identified.\r\n\n \n \n \n \n Routine maintenance of the X-ray machines at a local hospital reveals a serious breach of the shielding on one of the machines. Patients who have undergone investigations using that machine in the last month are likely to have been exposed to significantly higher doses of X-rays than was intended, and must be tracked for possible adverse effects. \r\n\n \n \n There has been an exposure of each patient who used the machine in the past 30 days. Some patients may have had substance administrations.\r\n\n \n \n \n \n A new member of staff is employed in the laundry processing room of a small cottage hospital, and a misreading of the instructions for adding detergents results in fifty times the usual concentration of cleaning materials being added to a batch of hospital bedding. As a result, several patients have been exposed to very high levels of detergents still present in the \"clean\" bedding, and have experienced dermatological reactions to this. \r\n\n \n \n There has been an incident with multiple exposures to several patients. Although there are substance administrations involving the application of the detergent to the skin of the patients, it is expected that the substance administrations would not be directly documented.\r\n\n \n \n \n \n Seven patients who are residents in a health care facility for the elderly mentally ill have developed respiratory problems. After several months of various tests having been performed and various medications prescribed to these patients, the problem is traced to their being \"sensitive\" to a new fungicide used in the wall plaster of the ward where these patients reside.\r\n\n \n \n The patients have been continuously exposed to the fungicide. Although there have been continuous substance administrations (via breathing) this would not normally be documented as a substance administration.\r\n\n \n \n \n \n A patient with osteoarthritis of the knees is treated symptomatically using analgesia, paracetamol (acetaminophen) 1g up to four times a day for pain relief. His GP does not realize that the patient has, 20 years previously (while at college) had severe alcohol addiction problems, and now, although this is completely under control, his liver has suffered significantly, leaving him more sensitive to hepatic toxicity from paracetamol use. Later that year, the patient returns with a noticeable level of jaundice. Paracetamol is immediately withdrawn and alternative solutions for the knee pain are sought. The jaundice gradually subsides with conservative management, but referral to the gastroenterologist is required for advice and monitoring. \r\n\n \n \n There is a substance administration with an associated exposure. The exposure component is based on the relative toxic level of the substance to a patient with a compromised liver function.\r\n\n \n \n \n \n A patient goes to their GP complaining of abdominal pain, having been discharged from the local hospital ten days' previously after an emergency appendectomy. The GP can find nothing particularly amiss, and presumes it is post operative surgical pain that will resolve. The patient returns a fortnight later, when the GP prescribes further analgesia, but does decide to request an outpatient surgical follow-up appointment. At this post-surgical outpatient review, the registrar decides to order an ultrasound, which, when performed three weeks later, shows a small faint inexplicable mass. A laparoscopy is then performed, as a day case procedure, and a piece of a surgical swab is removed from the patient's abdominal cavity. Thankfully, a full recovery then takes place. \r\n\n \n \n This is a procedural sequelae. There may be an Incident recorded for this also.\r\n\n \n \n \n \n A patient is slightly late for a regular pacemaker battery check in the Cardiology department of the local hospital. They are hurrying down the second floor corridor. A sudden summer squall has recently passed over the area, and rain has come in through an open corridor window leaving a small puddle on the corridor floor. In their haste, the patient slips in the puddle and falls so badly that they have to be taken to the A&E department, where it is discovered on investigation they have slightly torn the cruciate ligament in their left knee. \r\n\n \n \n This is not an exposure. There has been an incident. \r\n\n \n \n \n \n \n Usage Notes: This class deals only with opportunity and not the outcome of the exposure; i.e. not all exposed parties will necessarily experience actual harm or benefit.\r\n\n Exposure differs from Substance Administration by the absence of the participation of a performer in the act. \r\n\n The following participations SHOULD be used with the following participations to distinguish the specific entities:\r\n\n \n \n The exposed entity participates via the \"exposure target\" (EXPTRGT) participation.\r\n\n \n \n An entity that has carried the agent transmitted in the exposure participates via the \"exposure source\" (EXSRC) participation. For example: \r\n\n \n \n a person or animal who carried an infectious disease and interacts (EXSRC) with another person or animal (EXPTRGT) transmitting the disease agent;\r\n\n \n \n a place or other environment (EXSRC) and a person or animal (EXPTRGT) who is exposed in the presence of this environment.\r\n\n \n \n \n \n When it is unknown whether a participating entity is the source of the agent (EXSRC) or the target of the transmission (EXPTRGT), the \"exposure participant\" (EXPART) is used.\r\n\n \n \n The physical (including energy), chemical or biological substance which is participating in the exposure uses the \"exposure agent\" (EXPAGNT) participation. There are at least three scenarios:\r\n\n \n \n the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or \r\n\n \n \n the player of the Role that participates as EXPAGNT is a mixture known to contain the chemical, radiological or biological substance of interest; or \r\n\n \n \n the player of the Role that participates as a EXPAGNT is known to carry the agent (i.e., the player is a fomite, vector, etc.).\r\n\n \n \n \n \n The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation.\r\n\n \n Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error)."; + case AEXPOS: return "Description: \n \r\n\n An acquisition exposure act describes the proximity (location and time) through which the participating entity was potentially exposed to a physical (including energy), chemical or biological agent from another entity. The acquisition exposure act is used in conjunction with transmission exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion.\r\n\n \n Constraints: The Acquisition Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPSRC (exposure source) participation must never be associated with the Transmission Exposure either directly or via context conduction."; + case TEXPOS: return "Description: \n \r\n\n A transmission exposure act describes the proximity (time and location) over which the participating source entity was capable of transmitting a physical (including energy), chemical or biological substance agent to another entity. The transmission exposure act is used in conjunction with acquisition exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion.\r\n\n \n Constraints: The Transmission Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPTRGT (exposure target) participation must never be associated with the Transmission Exposure either directly or via context conduction."; + case INC: return "An event that occurred outside of the control of one or more of the parties involved. Includes the concept of an accident."; + case INFRM: return "The act of transmitting information and understanding about a topic to a subject where the participation association must be SBJ.\r\n\n \n Discussion: This act may be used to request that a patient or provider be informed about an Act, or to indicate that a person was informed about a particular act."; + case INVE: return "Represents concepts related to invoice processing in health care"; + case LIST: return "Working list collects a dynamic list of individual instances of Act via ActRelationship which reflects the need of an individual worker, team of workers, or an organization to manage lists of acts for many different clinical and administrative reasons. Examples of working lists include problem lists, goal lists, allergy lists, and to-do lists."; + case MPROT: return "An officially or unofficially instituted program to track acts of a particular type or categorization."; + case OBS: return "Description:An act that is intended to result in new information about a subject. The main difference between Observations and other Acts is that Observations have a value attribute. The code attribute of Observation and the value attribute of Observation must be considered in combination to determine the semantics of the observation.\r\n\n \n Discussion:\n \r\n\n Structurally, many observations are name-value-pairs, where the Observation.code (inherited from Act) is the name and the Observation.value is the value of the property. Such a construct is also known as a variable (a named feature that can assume a value) hence, the Observation class is always used to hold generic name-value-pairs or variables, even though the variable valuation may not be the result of an elaborate observation method. It may be a simple answer to a question or it may be an assertion or setting of a parameter.\r\n\n As with all Act statements, Observation statements describe what was done, and in the case of Observations, this includes a description of what was actually observed (results or answers); and those results or answers are part of the observation and not split off into other objects. \r\n\n The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology.\r\n\n An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations.\r\n\n Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. \r\n\n Clinical documents commonly have Subjective and Objective findings, both of which are kinds of Observations. In addition, clinical documents commonly contain Assessments, which are also kinds of Observations. Thus, the establishment of a diagnosis is an Observation. \r\n\n \n Examples:\n \r\n\n \n \n Recording the results of a Family History Assessment\r\n\n \n \n Laboratory test and associated result\r\n\n \n \n Physical exam test and associated result\r\n\n \n \n Device temperature\r\n\n \n \n Soil lead level"; + case _ACTCLASSROI: return "Regions of Interest (ROI) within a subject Act. Primarily used for making secondary observations on a subset of a subject observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type \"subject\" (SUBJ), which must always be present."; + case ROIBND: return "A Region of Interest (ROI) specified for a multidimensional observation, such as an Observation Series (OBSSER). The ROI is specified using a set of observation criteria, each delineating the boundary of the region in one of the dimensions in the multidimensional observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type subject (SUBJ), which must always be present. Each of the boundary criteria observations is connected with the ROI using ActRelationships of type \"has component\" (COMP). In each boundary criterion, the Act.code names the dimension and the Observation.value specifies the range of values inside the region. Typically the bounded dimension is continuous, and so the Observation.value will be an interval (IVL) data type. The Observation.value need not be specified if the respective dimension is only named but not constrained. For example, an ROI for the QT interval of a certain beat in ECG Lead II would contain 2 boundary criteria, one naming the interval in time (constrained), and the other naming the interval in ECG Lead II (only named, but not constrained)."; + case ROIOVL: return "A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g., to specify the location of a radiologic finding in an image or to specify the site of a physical finding by \"circling\" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type \"subject\" (SUBJ), which must always be present."; + case _SUBJECTPHYSICALPOSITION: return "The spatial relationship of a subject whether human, other animal, or plant, to a frame of reference such as gravity or a collection device."; + case _SUBJECTBODYPOSITION: return "Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case LLD: return "Lying on the left side.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case PRN: return "Lying with the front or ventral surface downward; lying face down.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case RLD: return "Lying on the right side.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SFWL: return "A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SIT: return "Resting the body on the buttocks, typically with upper torso erect or semi erect.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case STN: return "To be stationary, upright, vertical, on one's legs.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SUP: return "Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case RTRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case TRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case ALRT: return "An observation identifying a potential adverse outcome as a result of an Act or combination of Acts.\r\n\n \n Examples: Detection of a drug-drug interaction; Identification of a late-submission for an invoice; Requesting discharge for a patient who does not meet hospital-defined discharge criteria.\r\n\n \n Discussion: This class is commonly used for identifying 'business rule' or 'process' problems that may result in a refusal to carry out a particular request. In some circumstances it may be possible to 'bypass' a problem by modifying the request to acknowledge the issue and/or by providing some form of mitigation.\r\n\n \n Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id)."; + case BATTERY: return "Definition: An observation that is composed of a set of observations. These observations typically have a logical or practical grouping for generally accepted clinical or functional purposes, such as observations that are run together because of automation. A battery can define required and optional component observations and, in some cases, will define complex rules that determine whether or not a particular observation is made. BATTERY is a constraint on the Observation class in that it is understood to always be composed of component observations.\r\n\n \n UsageNotes: The focus in a BATTERY is that it is composed of individual observations. In request (RQO) mood, a battery is a request to perform the component observations. In event (EVN) mood a battery is a reporting of associated set of observation events. In definition mood a battery is the definition of the associated set of observations.\r\n\n \n Examples: Vital signs, Full blood count, Chemistry panel."; + case CLNTRL: return "The set of actions that define an experiment to assess the effectiveness and/or safety of a biopharmaceutical product (food, drug, device, etc.). In definition mood, this set of actions is often embodied in a clinical trial protocol; in event mood, this designates the aggregate act of applying the actions to one or more subjects."; + case CNOD: return "An instance of Observation of a Condition at a point in time that includes any Observations or Procedures associated with that Condition as well as links to previous instances of Condition Node for the same Condition\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because an alternative structure for tracking the evolution of a problem has been presented and adopted by the Care Provision Work Group."; + case COND: return "An observable finding or state that persists over time and tends to require intervention or management, and, therefore, distinguished from an Observation made at a point in time; may exist before an Observation of the Condition is made or after interventions to manage the Condition are undertaken. Examples: equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, chronic illness"; + case CASE: return "A public health case is an Observation representing a condition or event that has a specific significance for public health. Typically it involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. An outbreak involving multiple individuals may be considered as a type of public health case. A public health case definition (Act.moodCode = \"definition\") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. There are also case definitions for outbreaks. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case."; + case OUTB: return "An outbreak represents a series of public health cases. The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak, and its ending date is the last date of onset among the cases assigned to the outbreak."; + case DGIMG: return "Class for holding attributes unique to diagnostic images."; + case GEN: return "Description:An observation of genomic phenomena."; + case DETPOL: return "Description:A determinant peptide in a polypeptide as described by polypeptide."; + case EXP: return "Description:An expression level of genes/proteins or other expressed genomic entities."; + case LOC: return "Description:The position of a gene (or other significant sequence) on the genome."; + case PHN: return "Description:A genomic phenomenon that is expressed externally in the organism."; + case POL: return "Description:A polypeptide resulting from the translation of a gene."; + case SEQ: return "Description:A sequence of biomolecule like the DNA, RNA, protein and the like."; + case SEQVAR: return "Description:A variation in a sequence as described by BioSequence."; + case INVSTG: return "An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government."; + case OBSSER: return "Container for Correlated Observation Sequences sharing a common frame of reference. All Observations of the same cd must be comparable and relative to the common frame of reference. For example, a 3-channel ECG device records a 12-lead ECG in 4 steps (3 leads at a time). Each of the separate 3-channel recordings would be in their own \"OBSCOR\". And, all 4 OBSCOR would be contained in one OBSSER because all the times are relative to the same origin (beginning of the recording) and all the ECG signals were from a fixed set of electrodes."; + case OBSCOR: return "Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index. E.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads."; + case POS: return "An observation denoting the physical location of a person or thing based on a reference coordinate system."; + case POSACC: return "Description:An observation representing the degree to which the assignment of the spatial coordinates, based on a matching algorithm by a geocoding engine against a reference spatial database, matches true or accepted values."; + case POSCOORD: return "Description:An observation representing one of a set of numerical values used to determine the position of a place. The name of the coordinate value is determined by the reference coordinate system."; + case SPCOBS: return "An observation on a specimen in a laboratory environment that may affect processing, analysis or result interpretation"; + case VERIF: return "An act which describes the process whereby a 'verifying party' validates either the existence of the Role attested to by some Credential or the actual Vetting act and its details."; + case PCPR: return "An Act that of taking on whole or partial responsibility for, or attention to, safety and well-being of a subject of care. \r\n\n \n Discussion: A care provision event may exist without any other care actions taking place. For example, when a patient is assigned to the care of a particular health professional.\r\n\n In request (RQO) mood care provision communicates a referral, which is a request:\r\n\n \n \n from one party (linked as a participant of type author (AUT)),\r\n\n \n \n to another party (linked as a participant of type performer (PRF),\r\n\n \n \n to take responsibility for a scope specified by the code attribute, \r\n\n \n \n for an entity (linked as a participant of type subject (SBJ)).\r\n\n \n \n The scope of the care for which responsibility is taken is identified by code attribute.\r\n\n In event (EVN) mood care provision indicates the effective time interval of a specified scope of responsibility by a performer (PRF) or set of performers (PRF) for a subject (SBJ).\r\n\n \n Examples:\n \r\n\n \n \n Referral from GP to a specialist.\r\n\n \n \n Assignment of a patient or group of patients to the case list of a health professional.\r\n\n \n \n Assignment of inpatients to the care of particular nurses for a working shift."; + case ENC: return "An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g., traffic accident), office visit, occupational therapy, telephone call."; + case POLICY: return "Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by one party on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed"; + case JURISPOL: return "Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by a jurisdiction on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries."; + case ORGPOL: return "Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed by an organization on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A clinical or research protocols imposed by a payer, a malpractice insurer, or an institution to which a provider must adhere. A mandate imposed by a denominational institution for a provider to provide or withhold certain information from the patient about treatment options."; + case SCOPOL: return "Description:An ethical or clinical obligation, requirement, rule, or expectation imposed or strongly encouraged by organizations that oversee particular clinical domains or provider certification which define the boundaries within which a provider may practice and which may have legal basis or ramifications on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide."; + case STDPOL: return "Description:A requirement, rule, or expectation typically documented as guidelines, protocols, or formularies imposed or strongly encouraged by an organization that oversees or has authority over the practices within a domain, and which may have legal basis or ramifications on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A payer may require a prescribing provider to adhere to formulary guidelines. An institution may adopt clinical guidelines and protocols and implement these within its electronic health record and decision support systems."; + case PROC: return "An Act whose immediate and primary outcome (post-condition) is the alteration of the physical condition of the subject.\r\n\n \n Examples: : Procedures may involve the disruption of some body surface (e.g. an incision in a surgical procedure), but they also include conservative procedures such as reduction of a luxated join, chiropractic treatment, massage, balneotherapy, acupuncture, shiatsu, etc. Outside of clinical medicine, procedures may be such things as alteration of environments (e.g. straightening rivers, draining swamps, building dams) or the repair or change of machinery etc."; + case SBADM: return "The act of introducing or otherwise applying a substance to the subject.\r\n\n \n Discussion: The effect of the substance is typically established on a biochemical basis, however, that is not a requirement. For example, radiotherapy can largely be described in the same way, especially if it is a systemic therapy such as radio-iodine. This class also includes the application of chemical treatments to an area.\r\n\n \n Examples: Chemotherapy protocol; Drug prescription; Vaccination record"; + case SBEXT: return "Description: The act of removing a substance from the subject."; + case SPECCOLLECT: return "A procedure for obtaining a specimen from a source entity."; + case REG: return "Represents the act of maintaining information about the registration of its associated registered subject. The subject can be either an Act or a Role, and includes subjects such as lab exam definitions, drug protocol definitions, prescriptions, persons, patients, practitioners, and equipment.\r\n\n The registration may have a unique identifier - separate from the unique identification of the subject - as well as a core set of related participations and act relationships that characterize the registration event and aid in the disposition of the subject information by a receiving system."; + case REV: return "The act of examining and evaluating the subject, usually another act. For example, \"This prescription needs to be reviewed in 2 months.\""; + case SPCTRT: return "A procedure or treatment performed on a specimen to prepare it for analysis"; + case SPLY: return "Supply orders and deliveries are simple Acts that focus on the delivered product. The product is associated with the Supply Act via Participation.typeCode=\"product\". With general Supply Acts, the precise identification of the Material (manufacturer, serial numbers, etc.) is important. Most of the detailed information about the Supply should be represented using the Material class. If delivery needs to be scheduled, tracked, and billed separately, one can associate a Transportation Act with the Supply Act. Pharmacy dispense services are represented as Supply Acts, associated with a SubstanceAdministration Act. The SubstanceAdministration class represents the administration of medication, while dispensing is supply."; + case DIET: return "Diet services are supply services, with some aspects resembling Medication services: the detail of the diet is given as a description of the Material associated via Participation.typeCode=\"product\". Medically relevant diet types may be communicated in the Diet.code attribute using domain ActDietCode, however, the detail of the food supplied and the various combinations of dishes should be communicated as Material instances.\r\n\n \n Deprecation Note\n \r\n\n \n Class: Use either the Supply class (if dealing with what should be given to the patient) or SubstanceAdministration class (if dealing with what the patient should consume)\r\n\n \n energyQuantity: This quantity can be conveyed by using a Content relationship with a quantity attribute expressing the calories\r\n\n \n carbohydrateQuantity:This quantity can be conveyed using a Content relationship to an Entity with a code of carbohydrate and a quantity attribute on the content relationship."; + case STORE: return "The act of putting something away for safe keeping. The \"something\" may be physical object such as a specimen, or information, such as observations regarding a specimen."; + case SUBST: return "Definition: Indicates that the subject Act has undergone or should undergo substitution of a type indicated by Act.code.\r\n\n Rationale: Used to specify \"allowed\" substitution when creating orders, \"actual\" susbstitution when sending events, as well as the reason for the substitution and who was responsible for it."; + case TRFR: return "Definition: The act of transferring information without the intent of imparting understanding about a topic to the subject that is the recipient or holder of the transferred information where the participation association must be RCV or HLD."; + case TRNS: return "Transportation is the moving of a payload (people or material) from a location of origin to a destination location. Thus, any transport service has the three target instances of type payload, origin, and destination, besides the targets that are generally used for any service (i.e., performer, device, etc.)"; + case XACT: return "A sub-class of Act representing any transaction between two accounts whose value is measured in monetary terms.\r\n\n In the \"intent\" mood, communicates a request for a transaction to be initiated, or communicates a transfer of value between two accounts.\r\n\n In the \"event\" mood, communicates the posting of a transaction to an account."; + case _ACTCLASSCONTAINER: return "ActClassContainer"; + case ENTRY: return "This context represents the information acquired and recorded for an observation, a clinical statement such as a portion of the patient's history or an inference or assertion, or an action that might be intended or has actually been performed. This class may represent both the actual data describing the observation, inference, or action, and optionally the details supporting the clinical reasoning process such as a reference to an electronic guideline, decision support system, or other knowledge reference."; + case ORGANIZER: return "Organizer of entries. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or \"organizer tree\".\r\n\n The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R."; + case DOCCNTNT: return ""; + case DOCLIST: return ""; + case DOCLSTITM: return ""; + case DOCPARA: return ""; + case DOCTBL: return ""; + case LINKHTML: return ""; + case LOCALATTR: return ""; + case LOCALMRKP: return ""; + case ORDERED: return ""; + case REFR: return ""; + case TBLCOL: return ""; + case TBLCOLGP: return ""; + case TBLDATA: return ""; + case TBLHDR: return ""; + case TBLROW: return ""; + case TBODY: return ""; + case TFOOT: return ""; + case THEAD: return ""; + case UNORDERED: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACT: return "act"; + case _ACTCLASSRECORDORGANIZER: return "record organizer"; + case COMPOSITION: return "composition"; + case DOC: return "document"; + case DOCCLIN: return "clinical document"; + case CDALVLONE: return "CDA Level One clinical document"; + case CONTAINER: return "record container"; + case CATEGORY: return "category"; + case DOCBODY: return "document body"; + case DOCSECT: return "document section"; + case TOPIC: return "topic"; + case EXTRACT: return "extract"; + case EHR: return "electronic health record"; + case FOLDER: return "folder"; + case GROUPER: return "grouper"; + case CLUSTER: return "Cluster"; + case ACCM: return "accommodation"; + case ACCT: return "account"; + case ACSN: return "accession"; + case ADJUD: return "financial adjudication"; + case CACT: return "control act"; + case ACTN: return "action"; + case INFO: return "information"; + case STC: return "state transition control"; + case CNTRCT: return "contract"; + case FCNTRCT: return "financial contract"; + case COV: return "coverage"; + case CONC: return "concern"; + case HCASE: return "public health case"; + case OUTBR: return "outbreak"; + case CONS: return "consent"; + case CONTREG: return "container registration"; + case CTTEVENT: return "clinical trial timepoint event"; + case DISPACT: return "disciplinary action"; + case EXPOS: return "exposure"; + case AEXPOS: return "acquisition exposure"; + case TEXPOS: return "transmission exposure"; + case INC: return "incident"; + case INFRM: return "inform"; + case INVE: return "invoice element"; + case LIST: return "working list"; + case MPROT: return "monitoring program"; + case OBS: return "observation"; + case _ACTCLASSROI: return "ActClassROI"; + case ROIBND: return "bounded ROI"; + case ROIOVL: return "overlay ROI"; + case _SUBJECTPHYSICALPOSITION: return "subject physical position"; + case _SUBJECTBODYPOSITION: return "subject body position"; + case LLD: return "left lateral decubitus"; + case PRN: return "prone"; + case RLD: return "right lateral decubitus"; + case SFWL: return "Semi-Fowler's"; + case SIT: return "sitting"; + case STN: return "standing"; + case SUP: return "supine"; + case RTRD: return "reverse trendelenburg"; + case TRD: return "trendelenburg"; + case ALRT: return "detected issue"; + case BATTERY: return "battery"; + case CLNTRL: return "clinical trial"; + case CNOD: return "Condition Node"; + case COND: return "Condition"; + case CASE: return "public health case"; + case OUTB: return "outbreak"; + case DGIMG: return "diagnostic image"; + case GEN: return "genomic observation"; + case DETPOL: return "determinant peptide"; + case EXP: return "expression level"; + case LOC: return "locus"; + case PHN: return "phenotype"; + case POL: return "polypeptide"; + case SEQ: return "bio sequence"; + case SEQVAR: return "bio sequence variation"; + case INVSTG: return "investigation"; + case OBSSER: return "observation series"; + case OBSCOR: return "correlated observation sequences"; + case POS: return "position"; + case POSACC: return "position accuracy"; + case POSCOORD: return "position coordinate"; + case SPCOBS: return "specimen observation"; + case VERIF: return "Verification"; + case PCPR: return "care provision"; + case ENC: return "encounter"; + case POLICY: return "policy"; + case JURISPOL: return "jurisdictional policy"; + case ORGPOL: return "organizational policy"; + case SCOPOL: return "scope of practice policy"; + case STDPOL: return "standard of practice policy"; + case PROC: return "procedure"; + case SBADM: return "substance administration"; + case SBEXT: return "Substance Extraction"; + case SPECCOLLECT: return "Specimen Collection"; + case REG: return "registration"; + case REV: return "review"; + case SPCTRT: return "specimen treatment"; + case SPLY: return "supply"; + case DIET: return "diet"; + case STORE: return "storage"; + case SUBST: return "Substitution"; + case TRFR: return "transfer"; + case TRNS: return "transportation"; + case XACT: return "financial transaction"; + case _ACTCLASSCONTAINER: return "ActClassContainer"; + case ENTRY: return "entry"; + case ORGANIZER: return "organizer"; + case DOCCNTNT: return "DOCCNTNT"; + case DOCLIST: return "DOCLIST"; + case DOCLSTITM: return "DOCLSTITM"; + case DOCPARA: return "DOCPARA"; + case DOCTBL: return "DOCTBL"; + case LINKHTML: return "LINKHTML"; + case LOCALATTR: return "LOCALATTR"; + case LOCALMRKP: return "LOCALMRKP"; + case ORDERED: return "ordered"; + case REFR: return "REFR"; + case TBLCOL: return "TBLCOL"; + case TBLCOLGP: return "TBLCOLGP"; + case TBLDATA: return "TBLDATA"; + case TBLHDR: return "TBLHDR"; + case TBLROW: return "TBLROW"; + case TBODY: return "tbody"; + case TFOOT: return "tfoot"; + case THEAD: return "thead"; + case UNORDERED: return "unordered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClassEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClassEnumFactory.java new file mode 100644 index 00000000000..3b84a8c91c8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActClassEnumFactory.java @@ -0,0 +1,547 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActClassEnumFactory implements EnumFactory { + + public V3ActClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ACT".equals(codeString)) + return V3ActClass.ACT; + if ("_ActClassRecordOrganizer".equals(codeString)) + return V3ActClass._ACTCLASSRECORDORGANIZER; + if ("COMPOSITION".equals(codeString)) + return V3ActClass.COMPOSITION; + if ("DOC".equals(codeString)) + return V3ActClass.DOC; + if ("DOCCLIN".equals(codeString)) + return V3ActClass.DOCCLIN; + if ("CDALVLONE".equals(codeString)) + return V3ActClass.CDALVLONE; + if ("CONTAINER".equals(codeString)) + return V3ActClass.CONTAINER; + if ("CATEGORY".equals(codeString)) + return V3ActClass.CATEGORY; + if ("DOCBODY".equals(codeString)) + return V3ActClass.DOCBODY; + if ("DOCSECT".equals(codeString)) + return V3ActClass.DOCSECT; + if ("TOPIC".equals(codeString)) + return V3ActClass.TOPIC; + if ("EXTRACT".equals(codeString)) + return V3ActClass.EXTRACT; + if ("EHR".equals(codeString)) + return V3ActClass.EHR; + if ("FOLDER".equals(codeString)) + return V3ActClass.FOLDER; + if ("GROUPER".equals(codeString)) + return V3ActClass.GROUPER; + if ("CLUSTER".equals(codeString)) + return V3ActClass.CLUSTER; + if ("ACCM".equals(codeString)) + return V3ActClass.ACCM; + if ("ACCT".equals(codeString)) + return V3ActClass.ACCT; + if ("ACSN".equals(codeString)) + return V3ActClass.ACSN; + if ("ADJUD".equals(codeString)) + return V3ActClass.ADJUD; + if ("CACT".equals(codeString)) + return V3ActClass.CACT; + if ("ACTN".equals(codeString)) + return V3ActClass.ACTN; + if ("INFO".equals(codeString)) + return V3ActClass.INFO; + if ("STC".equals(codeString)) + return V3ActClass.STC; + if ("CNTRCT".equals(codeString)) + return V3ActClass.CNTRCT; + if ("FCNTRCT".equals(codeString)) + return V3ActClass.FCNTRCT; + if ("COV".equals(codeString)) + return V3ActClass.COV; + if ("CONC".equals(codeString)) + return V3ActClass.CONC; + if ("HCASE".equals(codeString)) + return V3ActClass.HCASE; + if ("OUTBR".equals(codeString)) + return V3ActClass.OUTBR; + if ("CONS".equals(codeString)) + return V3ActClass.CONS; + if ("CONTREG".equals(codeString)) + return V3ActClass.CONTREG; + if ("CTTEVENT".equals(codeString)) + return V3ActClass.CTTEVENT; + if ("DISPACT".equals(codeString)) + return V3ActClass.DISPACT; + if ("EXPOS".equals(codeString)) + return V3ActClass.EXPOS; + if ("AEXPOS".equals(codeString)) + return V3ActClass.AEXPOS; + if ("TEXPOS".equals(codeString)) + return V3ActClass.TEXPOS; + if ("INC".equals(codeString)) + return V3ActClass.INC; + if ("INFRM".equals(codeString)) + return V3ActClass.INFRM; + if ("INVE".equals(codeString)) + return V3ActClass.INVE; + if ("LIST".equals(codeString)) + return V3ActClass.LIST; + if ("MPROT".equals(codeString)) + return V3ActClass.MPROT; + if ("OBS".equals(codeString)) + return V3ActClass.OBS; + if ("_ActClassROI".equals(codeString)) + return V3ActClass._ACTCLASSROI; + if ("ROIBND".equals(codeString)) + return V3ActClass.ROIBND; + if ("ROIOVL".equals(codeString)) + return V3ActClass.ROIOVL; + if ("_SubjectPhysicalPosition".equals(codeString)) + return V3ActClass._SUBJECTPHYSICALPOSITION; + if ("_SubjectBodyPosition".equals(codeString)) + return V3ActClass._SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return V3ActClass.LLD; + if ("PRN".equals(codeString)) + return V3ActClass.PRN; + if ("RLD".equals(codeString)) + return V3ActClass.RLD; + if ("SFWL".equals(codeString)) + return V3ActClass.SFWL; + if ("SIT".equals(codeString)) + return V3ActClass.SIT; + if ("STN".equals(codeString)) + return V3ActClass.STN; + if ("SUP".equals(codeString)) + return V3ActClass.SUP; + if ("RTRD".equals(codeString)) + return V3ActClass.RTRD; + if ("TRD".equals(codeString)) + return V3ActClass.TRD; + if ("ALRT".equals(codeString)) + return V3ActClass.ALRT; + if ("BATTERY".equals(codeString)) + return V3ActClass.BATTERY; + if ("CLNTRL".equals(codeString)) + return V3ActClass.CLNTRL; + if ("CNOD".equals(codeString)) + return V3ActClass.CNOD; + if ("COND".equals(codeString)) + return V3ActClass.COND; + if ("CASE".equals(codeString)) + return V3ActClass.CASE; + if ("OUTB".equals(codeString)) + return V3ActClass.OUTB; + if ("DGIMG".equals(codeString)) + return V3ActClass.DGIMG; + if ("GEN".equals(codeString)) + return V3ActClass.GEN; + if ("DETPOL".equals(codeString)) + return V3ActClass.DETPOL; + if ("EXP".equals(codeString)) + return V3ActClass.EXP; + if ("LOC".equals(codeString)) + return V3ActClass.LOC; + if ("PHN".equals(codeString)) + return V3ActClass.PHN; + if ("POL".equals(codeString)) + return V3ActClass.POL; + if ("SEQ".equals(codeString)) + return V3ActClass.SEQ; + if ("SEQVAR".equals(codeString)) + return V3ActClass.SEQVAR; + if ("INVSTG".equals(codeString)) + return V3ActClass.INVSTG; + if ("OBSSER".equals(codeString)) + return V3ActClass.OBSSER; + if ("OBSCOR".equals(codeString)) + return V3ActClass.OBSCOR; + if ("POS".equals(codeString)) + return V3ActClass.POS; + if ("POSACC".equals(codeString)) + return V3ActClass.POSACC; + if ("POSCOORD".equals(codeString)) + return V3ActClass.POSCOORD; + if ("SPCOBS".equals(codeString)) + return V3ActClass.SPCOBS; + if ("VERIF".equals(codeString)) + return V3ActClass.VERIF; + if ("PCPR".equals(codeString)) + return V3ActClass.PCPR; + if ("ENC".equals(codeString)) + return V3ActClass.ENC; + if ("POLICY".equals(codeString)) + return V3ActClass.POLICY; + if ("JURISPOL".equals(codeString)) + return V3ActClass.JURISPOL; + if ("ORGPOL".equals(codeString)) + return V3ActClass.ORGPOL; + if ("SCOPOL".equals(codeString)) + return V3ActClass.SCOPOL; + if ("STDPOL".equals(codeString)) + return V3ActClass.STDPOL; + if ("PROC".equals(codeString)) + return V3ActClass.PROC; + if ("SBADM".equals(codeString)) + return V3ActClass.SBADM; + if ("SBEXT".equals(codeString)) + return V3ActClass.SBEXT; + if ("SPECCOLLECT".equals(codeString)) + return V3ActClass.SPECCOLLECT; + if ("REG".equals(codeString)) + return V3ActClass.REG; + if ("REV".equals(codeString)) + return V3ActClass.REV; + if ("SPCTRT".equals(codeString)) + return V3ActClass.SPCTRT; + if ("SPLY".equals(codeString)) + return V3ActClass.SPLY; + if ("DIET".equals(codeString)) + return V3ActClass.DIET; + if ("STORE".equals(codeString)) + return V3ActClass.STORE; + if ("SUBST".equals(codeString)) + return V3ActClass.SUBST; + if ("TRFR".equals(codeString)) + return V3ActClass.TRFR; + if ("TRNS".equals(codeString)) + return V3ActClass.TRNS; + if ("XACT".equals(codeString)) + return V3ActClass.XACT; + if ("_ActClassContainer".equals(codeString)) + return V3ActClass._ACTCLASSCONTAINER; + if ("ENTRY".equals(codeString)) + return V3ActClass.ENTRY; + if ("ORGANIZER".equals(codeString)) + return V3ActClass.ORGANIZER; + if ("DOCCNTNT".equals(codeString)) + return V3ActClass.DOCCNTNT; + if ("DOCLIST".equals(codeString)) + return V3ActClass.DOCLIST; + if ("DOCLSTITM".equals(codeString)) + return V3ActClass.DOCLSTITM; + if ("DOCPARA".equals(codeString)) + return V3ActClass.DOCPARA; + if ("DOCTBL".equals(codeString)) + return V3ActClass.DOCTBL; + if ("LINKHTML".equals(codeString)) + return V3ActClass.LINKHTML; + if ("LOCALATTR".equals(codeString)) + return V3ActClass.LOCALATTR; + if ("LOCALMRKP".equals(codeString)) + return V3ActClass.LOCALMRKP; + if ("ordered".equals(codeString)) + return V3ActClass.ORDERED; + if ("REFR".equals(codeString)) + return V3ActClass.REFR; + if ("TBLCOL".equals(codeString)) + return V3ActClass.TBLCOL; + if ("TBLCOLGP".equals(codeString)) + return V3ActClass.TBLCOLGP; + if ("TBLDATA".equals(codeString)) + return V3ActClass.TBLDATA; + if ("TBLHDR".equals(codeString)) + return V3ActClass.TBLHDR; + if ("TBLROW".equals(codeString)) + return V3ActClass.TBLROW; + if ("tbody".equals(codeString)) + return V3ActClass.TBODY; + if ("tfoot".equals(codeString)) + return V3ActClass.TFOOT; + if ("thead".equals(codeString)) + return V3ActClass.THEAD; + if ("unordered".equals(codeString)) + return V3ActClass.UNORDERED; + throw new IllegalArgumentException("Unknown V3ActClass code '"+codeString+"'"); + } + + public String toCode(V3ActClass code) { + if (code == V3ActClass.ACT) + return "ACT"; + if (code == V3ActClass._ACTCLASSRECORDORGANIZER) + return "_ActClassRecordOrganizer"; + if (code == V3ActClass.COMPOSITION) + return "COMPOSITION"; + if (code == V3ActClass.DOC) + return "DOC"; + if (code == V3ActClass.DOCCLIN) + return "DOCCLIN"; + if (code == V3ActClass.CDALVLONE) + return "CDALVLONE"; + if (code == V3ActClass.CONTAINER) + return "CONTAINER"; + if (code == V3ActClass.CATEGORY) + return "CATEGORY"; + if (code == V3ActClass.DOCBODY) + return "DOCBODY"; + if (code == V3ActClass.DOCSECT) + return "DOCSECT"; + if (code == V3ActClass.TOPIC) + return "TOPIC"; + if (code == V3ActClass.EXTRACT) + return "EXTRACT"; + if (code == V3ActClass.EHR) + return "EHR"; + if (code == V3ActClass.FOLDER) + return "FOLDER"; + if (code == V3ActClass.GROUPER) + return "GROUPER"; + if (code == V3ActClass.CLUSTER) + return "CLUSTER"; + if (code == V3ActClass.ACCM) + return "ACCM"; + if (code == V3ActClass.ACCT) + return "ACCT"; + if (code == V3ActClass.ACSN) + return "ACSN"; + if (code == V3ActClass.ADJUD) + return "ADJUD"; + if (code == V3ActClass.CACT) + return "CACT"; + if (code == V3ActClass.ACTN) + return "ACTN"; + if (code == V3ActClass.INFO) + return "INFO"; + if (code == V3ActClass.STC) + return "STC"; + if (code == V3ActClass.CNTRCT) + return "CNTRCT"; + if (code == V3ActClass.FCNTRCT) + return "FCNTRCT"; + if (code == V3ActClass.COV) + return "COV"; + if (code == V3ActClass.CONC) + return "CONC"; + if (code == V3ActClass.HCASE) + return "HCASE"; + if (code == V3ActClass.OUTBR) + return "OUTBR"; + if (code == V3ActClass.CONS) + return "CONS"; + if (code == V3ActClass.CONTREG) + return "CONTREG"; + if (code == V3ActClass.CTTEVENT) + return "CTTEVENT"; + if (code == V3ActClass.DISPACT) + return "DISPACT"; + if (code == V3ActClass.EXPOS) + return "EXPOS"; + if (code == V3ActClass.AEXPOS) + return "AEXPOS"; + if (code == V3ActClass.TEXPOS) + return "TEXPOS"; + if (code == V3ActClass.INC) + return "INC"; + if (code == V3ActClass.INFRM) + return "INFRM"; + if (code == V3ActClass.INVE) + return "INVE"; + if (code == V3ActClass.LIST) + return "LIST"; + if (code == V3ActClass.MPROT) + return "MPROT"; + if (code == V3ActClass.OBS) + return "OBS"; + if (code == V3ActClass._ACTCLASSROI) + return "_ActClassROI"; + if (code == V3ActClass.ROIBND) + return "ROIBND"; + if (code == V3ActClass.ROIOVL) + return "ROIOVL"; + if (code == V3ActClass._SUBJECTPHYSICALPOSITION) + return "_SubjectPhysicalPosition"; + if (code == V3ActClass._SUBJECTBODYPOSITION) + return "_SubjectBodyPosition"; + if (code == V3ActClass.LLD) + return "LLD"; + if (code == V3ActClass.PRN) + return "PRN"; + if (code == V3ActClass.RLD) + return "RLD"; + if (code == V3ActClass.SFWL) + return "SFWL"; + if (code == V3ActClass.SIT) + return "SIT"; + if (code == V3ActClass.STN) + return "STN"; + if (code == V3ActClass.SUP) + return "SUP"; + if (code == V3ActClass.RTRD) + return "RTRD"; + if (code == V3ActClass.TRD) + return "TRD"; + if (code == V3ActClass.ALRT) + return "ALRT"; + if (code == V3ActClass.BATTERY) + return "BATTERY"; + if (code == V3ActClass.CLNTRL) + return "CLNTRL"; + if (code == V3ActClass.CNOD) + return "CNOD"; + if (code == V3ActClass.COND) + return "COND"; + if (code == V3ActClass.CASE) + return "CASE"; + if (code == V3ActClass.OUTB) + return "OUTB"; + if (code == V3ActClass.DGIMG) + return "DGIMG"; + if (code == V3ActClass.GEN) + return "GEN"; + if (code == V3ActClass.DETPOL) + return "DETPOL"; + if (code == V3ActClass.EXP) + return "EXP"; + if (code == V3ActClass.LOC) + return "LOC"; + if (code == V3ActClass.PHN) + return "PHN"; + if (code == V3ActClass.POL) + return "POL"; + if (code == V3ActClass.SEQ) + return "SEQ"; + if (code == V3ActClass.SEQVAR) + return "SEQVAR"; + if (code == V3ActClass.INVSTG) + return "INVSTG"; + if (code == V3ActClass.OBSSER) + return "OBSSER"; + if (code == V3ActClass.OBSCOR) + return "OBSCOR"; + if (code == V3ActClass.POS) + return "POS"; + if (code == V3ActClass.POSACC) + return "POSACC"; + if (code == V3ActClass.POSCOORD) + return "POSCOORD"; + if (code == V3ActClass.SPCOBS) + return "SPCOBS"; + if (code == V3ActClass.VERIF) + return "VERIF"; + if (code == V3ActClass.PCPR) + return "PCPR"; + if (code == V3ActClass.ENC) + return "ENC"; + if (code == V3ActClass.POLICY) + return "POLICY"; + if (code == V3ActClass.JURISPOL) + return "JURISPOL"; + if (code == V3ActClass.ORGPOL) + return "ORGPOL"; + if (code == V3ActClass.SCOPOL) + return "SCOPOL"; + if (code == V3ActClass.STDPOL) + return "STDPOL"; + if (code == V3ActClass.PROC) + return "PROC"; + if (code == V3ActClass.SBADM) + return "SBADM"; + if (code == V3ActClass.SBEXT) + return "SBEXT"; + if (code == V3ActClass.SPECCOLLECT) + return "SPECCOLLECT"; + if (code == V3ActClass.REG) + return "REG"; + if (code == V3ActClass.REV) + return "REV"; + if (code == V3ActClass.SPCTRT) + return "SPCTRT"; + if (code == V3ActClass.SPLY) + return "SPLY"; + if (code == V3ActClass.DIET) + return "DIET"; + if (code == V3ActClass.STORE) + return "STORE"; + if (code == V3ActClass.SUBST) + return "SUBST"; + if (code == V3ActClass.TRFR) + return "TRFR"; + if (code == V3ActClass.TRNS) + return "TRNS"; + if (code == V3ActClass.XACT) + return "XACT"; + if (code == V3ActClass._ACTCLASSCONTAINER) + return "_ActClassContainer"; + if (code == V3ActClass.ENTRY) + return "ENTRY"; + if (code == V3ActClass.ORGANIZER) + return "ORGANIZER"; + if (code == V3ActClass.DOCCNTNT) + return "DOCCNTNT"; + if (code == V3ActClass.DOCLIST) + return "DOCLIST"; + if (code == V3ActClass.DOCLSTITM) + return "DOCLSTITM"; + if (code == V3ActClass.DOCPARA) + return "DOCPARA"; + if (code == V3ActClass.DOCTBL) + return "DOCTBL"; + if (code == V3ActClass.LINKHTML) + return "LINKHTML"; + if (code == V3ActClass.LOCALATTR) + return "LOCALATTR"; + if (code == V3ActClass.LOCALMRKP) + return "LOCALMRKP"; + if (code == V3ActClass.ORDERED) + return "ordered"; + if (code == V3ActClass.REFR) + return "REFR"; + if (code == V3ActClass.TBLCOL) + return "TBLCOL"; + if (code == V3ActClass.TBLCOLGP) + return "TBLCOLGP"; + if (code == V3ActClass.TBLDATA) + return "TBLDATA"; + if (code == V3ActClass.TBLHDR) + return "TBLHDR"; + if (code == V3ActClass.TBLROW) + return "TBLROW"; + if (code == V3ActClass.TBODY) + return "tbody"; + if (code == V3ActClass.TFOOT) + return "tfoot"; + if (code == V3ActClass.THEAD) + return "thead"; + if (code == V3ActClass.UNORDERED) + return "unordered"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCode.java new file mode 100644 index 00000000000..c657cd0bfcd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCode.java @@ -0,0 +1,10298 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActCode { + + /** + * An account represents a grouping of financial transactions that are tracked and reported together with a single balance. Examples of account codes (types) are Patient billing accounts (collection of charges), Cost centers; Cash. + */ + _ACTACCOUNTCODE, + /** + * An account for collecting charges, reversals, adjustments and payments, including deductibles, copayments, coinsurance (financial transactions) credited or debited to the account receivable account for a patient's encounter. + */ + ACCTRECEIVABLE, + /** + * Cash + */ + CASH, + /** + * Description: Types of advance payment to be made on a plastic card usually issued by a financial institution used of purchasing services and/or products. + */ + CC, + /** + * American Express + */ + AE, + /** + * Diner's Club + */ + DN, + /** + * Discover Card + */ + DV, + /** + * Master Card + */ + MC, + /** + * Visa + */ + V, + /** + * An account representing charges and credits (financial transactions) for a patient's encounter. + */ + PBILLACCT, + /** + * Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results. + */ + _ACTADJUDICATIONCODE, + /** + * Catagorization of grouping criteria for the associated transactions and/or summary (totals, subtotals). + */ + _ACTADJUDICATIONGROUPCODE, + /** + * Transaction counts and value totals by Contract Identifier. + */ + CONT, + /** + * Transaction counts and value totals for each calendar day within the date range specified. + */ + DAY, + /** + * Transaction counts and value totals by service location (e.g clinic). + */ + LOC, + /** + * Transaction counts and value totals for each calendar month within the date range specified. + */ + MONTH, + /** + * Transaction counts and value totals for the date range specified. + */ + PERIOD, + /** + * Transaction counts and value totals by Provider Identifier. + */ + PROV, + /** + * Transaction counts and value totals for each calendar week within the date range specified. + */ + WEEK, + /** + * Transaction counts and value totals for each calendar year within the date range specified. + */ + YEAR, + /** + * The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges). + + Also includes the concept 'Adjudicate as zero' and items not covered under a particular Policy. + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + AA, + /** + * The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges) without changing the amount. + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + ANF, + /** + * The invoice element has passed through the adjudication process but payment is refused due to one or more reasons. + + Includes items such as patient not covered, or invoice element is not constructed according to payer rules (e.g. 'invoice submitted too late'). + + If one invoice element line item in the invoice element structure is rejected, the remaining line items may not be adjudicated and the complete group is treated as rejected. + + A refused invoice element can be forwarded to the next payer (for Coordination of Benefits) or modified and resubmitted to refusing payer. + + Invoice element cannot be reversed (nullified) as there is nothing to reverse. + + Recommend that the invoice element is not saved for DUR (Drug Utilization Reporting). + */ + AR, + /** + * The invoice element was/will be paid exactly as submitted, without financial adjustment(s). + + If the dollar amount stays the same, but the billing codes have been amended or financial adjustments have been applied through the adjudication process, the invoice element is treated as "Adjudicated with Adjustment". + + If information items are included in the adjudication results that do not affect the monetary amounts paid, then this is still Adjudicated as Submitted (e.g. 'reached Plan Maximum on this Claim'). + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + AS, + /** + * Actions to be carried out by the recipient of the Adjudication Result information. + */ + _ACTADJUDICATIONRESULTACTIONCODE, + /** + * The adjudication result associated is to be displayed to the receiver of the adjudication result. + */ + DISPLAY, + /** + * The adjudication result associated is to be printed on the specified form, which is then provided to the covered party. + */ + FORM, + /** + * Definition:An identifying modifier code for healthcare interventions or procedures. + */ + _ACTBILLABLEMODIFIERCODE, + /** + * Description:CPT modifier codes are found in Appendix A of CPT 2000 Standard Edition. + */ + CPTM, + /** + * Description:HCPCS Level II (HCFA-assigned) and Carrier-assigned (Level III) modifiers are reported in Appendix A of CPT 2000 Standard Edition and in the Medicare Bulletin. + */ + HCPCSA, + /** + * The type of provision(s) made for reimbursing for the deliver of healthcare services and/or goods provided by a Provider, over a specified period. + */ + _ACTBILLINGARRANGEMENTCODE, + /** + * A billing arrangement where a Provider charges a lump sum to provide a prescribed group (volume) of services to a single patient which occur over a period of time. Services included in the block may vary. + + This billing arrangement is also known as Program of Care for some specific Payors and Program Fees for other Payors. + */ + BLK, + /** + * A billing arrangement where the payment made to a Provider is determined by analyzing one or more demographic attributes about the persons/patients who are enrolled with the Provider (in their practice). + */ + CAP, + /** + * A billing arrangement where a Provider charges a lump sum to provide a particular volume of one or more interventions/procedures or groups of interventions/procedures. + */ + CONTF, + /** + * A billing arrangement where a Provider charges for non-clinical items. This includes interest in arrears, mileage, etc. Clinical content is not included in Invoices submitted with this type of billing arrangement. + */ + FINBILL, + /** + * A billing arrangement where funding is based on a list of individuals registered as patients of the Provider. + */ + ROST, + /** + * A billing arrangement where a Provider charges a sum to provide a group (volume) of interventions/procedures to one or more patients within a defined period of time, typically on the same date. Interventions/procedures included in the session may vary. + */ + SESS, + /** + * A billing arrangement where a Provider charges a separate fee for each intervention/procedure/event or product. + + Fee for Service is used when an individual intervention/procedure/event is used for billing purposes. In other words, fees are associated with the intervention/procedure/event. For example, a specific CCI (Canadian Classification of Interventions) code has an associated fee and is used for billing purposes. + */ + FFS, + /** + * A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets) + */ + FFPS, + /** + * A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + FFCS, + /** + * A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + TFS, + /** + * Type of bounded ROI. + */ + _ACTBOUNDEDROICODE, + /** + * A fully specified bounded Region of Interest (ROI) delineates a ROI in which only those dimensions participate that are specified by boundary criteria, whereas all other dimensions are excluded. For example a ROI to mark an episode of "ST elevation" in a subset of the EKG leads V2, V3, and V4 would include 4 boundaries, one each for time, V2, V3, and V4. + */ + ROIFS, + /** + * A partially specified bounded Region of Interest (ROI) specifies a ROI in which at least all values in the dimensions specified by the boundary criteria participate. For example, if an episode of ventricular fibrillations (VFib) is observed, it usually doesn't make sense to exclude any EKG leads from the observation and the partially specified ROI would contain only one boundary for time indicating the time interval where VFib was observed. + */ + ROIPS, + /** + * Description:The type and scope of responsibility taken-on by the performer of the Act for a specific subject of care. + */ + _ACTCAREPROVISIONCODE, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by a credentialing agency, i.e. government or non-government agency. Failure in executing this Act may result in loss of credential to the person or organization who participates as performer of the Act. Excludes employment agreements. + + + Example:Hospital license; physician license; clinic accreditation. + */ + _ACTCREDENTIALEDCARECODE, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing individuals. + */ + _ACTCREDENTIALEDCAREPROVISIONPERSONCODE, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CACC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAIC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CANC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CBGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCCC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CDEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CDRC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CEMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CFPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CIMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CMGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board + */ + CNEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNQC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COTC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPHC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPRC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPYC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CROC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CRPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CSUC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CTSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CURC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CVSC, + /** + * Description:Scope of responsibility taken-on for physician care of a patient as defined by a governmental licensing agency. + */ + LGPC, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing programs within organizations. + */ + _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AALC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AAMC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ABHC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ACAC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ACHC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AHOC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ALTC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AOSC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CACS, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CAMI, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CAST, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CBAR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CCAD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CCAR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDEP, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDGD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDIA, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CEPI, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CFEL, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHFC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHRO, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHYP, + /** + * Description:. + */ + CMIH, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CMSC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + COJR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CONC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + COPD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CORT, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPAD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPND, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPST, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSDM, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSIC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSLD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSPT, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CTBU, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CVDC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CWMA, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CWOH, + /** + * Domain provides codes that qualify the ActEncounterClass (ENC) + */ + _ACTENCOUNTERCODE, + /** + * A comprehensive term for health care provided in a healthcare facility (e.g. a practitioneraTMs office, clinic setting, or hospital) on a nonresident basis. The term ambulatory usually implies that the patient has come to the location and is not assigned to a bed. Sometimes referred to as an outpatient encounter. + */ + AMB, + /** + * A patient encounter that takes place at a dedicated healthcare service delivery location where the patient receives immediate evaluation and treatment, provided until the patient can be discharged or responsibility for the patient's care is transferred elsewhere (for example, the patient could be admitted as an inpatient or transferred to another facility.) + */ + EMER, + /** + * A patient encounter that takes place both outside a dedicated service delivery location and outside a patient's residence. Example locations might include an accident site and at a supermarket. + */ + FLD, + /** + * Healthcare encounter that takes place in the residence of the patient or a designee + */ + HH, + /** + * A patient encounter where a patient is admitted by a hospital or equivalent facility, assigned to a location where patients generally stay at least overnight and provided with room, board, and continuous nursing service. + */ + IMP, + /** + * An acute inpatient encounter. + */ + ACUTE, + /** + * Any category of inpatient encounter except 'acute' + */ + NONAC, + /** + * A patient encounter where patient is scheduled or planned to receive service delivery in the future, and the patient is given a pre-admission account number. When the patient comes back for subsequent service, the pre-admission encounter is selected and is encapsulated into the service registration, and a new account number is generated. + + + Usage Note: This is intended to be used in advance of encounter types such as ambulatory, inpatient encounter, virtual, etc. + */ + PRENC, + /** + * An encounter where the patient is admitted to a health care facility for a predetermined length of time, usually less than 24 hours. + */ + SS, + /** + * A patient encounter where the patient and the practitioner(s) are not in the same physical location. Examples include telephone conference, email exchange, robotic surgery, and televideo conference. + */ + VR, + /** + * General category of medical service provided to the patient during their encounter. + */ + _ACTMEDICALSERVICECODE, + /** + * Provision of Alternate Level of Care to a patient in an acute bed. Patient is waiting for placement in a long-term care facility and is unable to return home. + */ + ALC, + /** + * Provision of diagnosis and treatment of diseases and disorders affecting the heart + */ + CARD, + /** + * Provision of recurring care for chronic illness. + */ + CHR, + /** + * Provision of treatment for oral health and/or dental surgery. + */ + DNTL, + /** + * Provision of treatment for drug abuse. + */ + DRGRHB, + /** + * General care performed by a general practitioner or family doctor as a responsible provider for a patient. + */ + GENRL, + /** + * Provision of diagnostic and/or therapeutic treatment. + */ + MED, + /** + * Provision of care of women during pregnancy, childbirth and immediate postpartum period. Also known as Maternity. + */ + OBS, + /** + * Provision of treatment and/or diagnosis related to tumors and/or cancer. + */ + ONC, + /** + * Provision of care for patients who are living or dying from an advanced illness. + */ + PALL, + /** + * Provision of diagnosis and treatment of diseases and disorders affecting children. + */ + PED, + /** + * Pharmaceutical care performed by a pharmacist. + */ + PHAR, + /** + * Provision of treatment for physical injury. + */ + PHYRHB, + /** + * Provision of treatment of psychiatric disorder relating to mental illness. + */ + PSYCH, + /** + * Provision of surgical treatment. + */ + SURG, + /** + * Description: Coded types of attachments included to support a healthcare claim. + */ + _ACTCLAIMATTACHMENTCATEGORYCODE, + /** + * Description: Automobile Information Attachment + */ + AUTOATTCH, + /** + * Description: Document Attachment + */ + DOCUMENT, + /** + * Description: Health Record Attachment + */ + HEALTHREC, + /** + * Description: Image Attachment + */ + IMG, + /** + * Description: Lab Results Attachment + */ + LABRESULTS, + /** + * Description: Digital Model Attachment + */ + MODEL, + /** + * Description: Work Injury related additional Information Attachment + */ + WIATTCH, + /** + * Description: Digital X-Ray Attachment + */ + XRAY, + /** + * Definition: The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research. + */ + _ACTCONSENTTYPE, + /** + * Definition: Consent to have healthcare information collected in an electronic health record. This entails that the information may be used in analysis, modified, updated. + */ + ICOL, + /** + * Definition: Consent to have collected healthcare information disclosed. + */ + IDSCL, + /** + * Definition: Consent to access healthcare information. + */ + INFA, + /** + * Definition: Consent to access or "read" only, which entails that the information is not to be copied, screen printed, saved, emailed, stored, re-disclosed or altered in any way. This level ensures that data which is masked or to which access is restricted will not be. + + + Example: Opened and then emailed or screen printed for use outside of the consent directive purpose. + */ + INFAO, + /** + * Definition: Consent to access and save only, which entails that access to the saved copy will remain locked. + */ + INFASO, + /** + * Definition: Information re-disclosed without the patient's consent. + */ + IRDSCL, + /** + * Definition: Consent to have healthcare information in an electronic health record accessed for research purposes. + */ + RESEARCH, + /** + * Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance. + */ + RSDID, + /** + * Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent. + + + Example:: Where there is a need to inform the subject of potential health issues. + */ + RSREID, + /** + * Constrains the ActCode to the domain of Container Registration + */ + _ACTCONTAINERREGISTRATIONCODE, + /** + * Used by one system to inform another that it has received a container. + */ + ID, + /** + * Used by one system to inform another that the container is in position for specimen transfer (e.g., container removal from track, pipetting, etc.). + */ + IP, + /** + * Used by one system to inform another that the container has been released from that system. + */ + L, + /** + * Used by one system to inform another that the container did not arrive at its next expected location. + */ + M, + /** + * Used by one system to inform another that the specific container is being processed by the equipment. It is useful as a response to a query about Container Status, when the specific step of the process is not relevant. + */ + O, + /** + * Status is used by one system to inform another that the processing has been completed, but the container has not been released from that system. + */ + R, + /** + * Used by one system to inform another that the container is no longer available within the scope of the system (e.g., tube broken or discarded). + */ + X, + /** + * An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g., time skew) or the position of the body while measuring blood pressure. + + Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure). + */ + _ACTCONTROLVARIABLE, + /** + * Specifies whether or not automatic repeat testing is to be initiated on specimens. + */ + AUTO, + /** + * A baseline value for the measured test that is inherently contained in the diluent. In the calculation of the actual result for the measured test, this baseline value is normally considered. + */ + ENDC, + /** + * Specifies whether or not further testing may be automatically or manually initiated on specimens. + */ + REFLEX, + /** + * Response to an insurance coverage eligibility query or authorization request. + */ + _ACTCOVERAGECONFIRMATIONCODE, + /** + * Indication of authorization for healthcare service(s) and/or product(s). If authorization is approved, funds are set aside. + */ + _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE, + /** + * Authorization approved and funds have been set aside to pay for specified healthcare service(s) and/or product(s) within defined criteria for the authorization. + */ + AUTH, + /** + * Authorization for specified healthcare service(s) and/or product(s) denied. + */ + NAUTH, + /** + * Indication of eligibility coverage for healthcare service(s) and/or product(s). + */ + _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE, + /** + * Insurance coverage is in effect for healthcare service(s) and/or product(s). + */ + ELG, + /** + * Insurance coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility. + */ + NELG, + /** + * Criteria that are applicable to the authorized coverage. + */ + _ACTCOVERAGELIMITCODE, + /** + * Maximum amount paid or maximum number of services/products covered; or maximum amount or number covered during a specified time period under the policy or program. + */ + _ACTCOVERAGEQUANTITYLIMITCODE, + /** + * Codes representing the time period during which coverage is available; or financial participation requirements are in effect. + */ + COVPRD, + /** + * Definition: Maximum amount paid by payer or covered party; or maximum number of services or products covered under the policy or program during a covered party's lifetime. + */ + LFEMX, + /** + * Maximum net amount that will be covered for the product or service specified. + */ + NETAMT, + /** + * Definition: Maximum amount paid by payer or covered party; or maximum number of services/products covered under the policy or program by time period specified by the effective time on the act. + */ + PRDMX, + /** + * Maximum unit price that will be covered for the authorized product or service. + */ + UNITPRICE, + /** + * Maximum number of items that will be covered of the product or service specified. + */ + UNITQTY, + /** + * Definition: Codes representing the maximum coverate or financial participation requirements. + */ + COVMX, + /** + * Codes representing the types of covered parties that may receive covered benefits under a policy or program. + */ + _ACTCOVEREDPARTYLIMITCODE, + /** + * Definition: Set of codes indicating the type of insurance policy or program that pays for the cost of benefits provided to covered parties. + */ + _ACTCOVERAGETYPECODE, + /** + * Set of codes indicating the type of insurance policy or other source of funds to cover healthcare costs. + */ + _ACTINSURANCEPOLICYCODE, + /** + * Private insurance policy that provides coverage in addition to other policies (e.g. in addition to a Public Healthcare insurance policy). + */ + EHCPOL, + /** + * Insurance policy that provides for an allotment of funds replenished on a periodic (e.g. annual) basis. The use of the funds under this policy is at the discretion of the covered party. + */ + HSAPOL, + /** + * Insurance policy for injuries sustained in an automobile accident. Will also typically covered non-named parties to the policy, such as pedestrians and passengers. + */ + AUTOPOL, + /** + * Definition: An automobile insurance policy under which the insurance company will cover the cost of damages to an automobile owned by the named insured that are caused by accident or intentionally by another party. + */ + COL, + /** + * Definition: An automobile insurance policy under which the insurance company will indemnify a loss for which another motorist is liable if that motorist is unable to pay because he or she is uninsured. Coverage under the policy applies to bodily injury damages only. Injuries to the covered party caused by a hit-and-run driver are also covered. + */ + UNINSMOT, + /** + * Insurance policy funded by a public health system such as a provincial or national health plan. Examples include BC MSP (British Columbia Medical Services Plan) OHIP (Ontario Health Insurance Plan), NHS (National Health Service). + */ + PUBLICPOL, + /** + * Definition: A public or government health program that administers and funds coverage for dental care to assist program eligible who meet financial and health status criteria. + */ + DENTPRG, + /** + * Definition: A public or government health program that administers and funds coverage for health and social services to assist program eligible who meet financial and health status criteria related to a particular disease. + + + Example: Reproductive health, sexually transmitted disease, and end renal disease programs. + */ + DISEASEPRG, + /** + * Definition: A program that provides low-income, uninsured, and underserved women access to timely, high-quality screening and diagnostic services, to detect breast and cervical cancer at the earliest stages. + + + Example: To improve women's access to screening for breast and cervical cancers, Congress passed the Breast and Cervical Cancer Mortality Prevention Act of 1990, which guided CDC in creating the National Breast and Cervical Cancer Early Detection Program (NBCCEDP), which provides access to critical breast and cervical cancer screening services for underserved women in the United States. An estimated 7 to 10% of U.S. women of screening age are eligible to receive NBCCEDP services. Federal guidelines establish an eligibility baseline to direct services to uninsured and underinsured women at or below 250% of federal poverty level; ages 18 to 64 for cervical screening; ages 40 to 64 for breast screening. + */ + CANPRG, + /** + * Definition: A public or government program that administers publicly funded coverage of kidney dialysis and kidney transplant services. + + Example: In the U.S., the Medicare End-stage Renal Disease program (ESRD), the National Kidney Foundation (NKF) American Kidney Fund (AKF) The Organ Transplant Fund. + */ + ENDRENAL, + /** + * Definition: Government administered and funded HIV-AIDS program for beneficiaries meeting financial and health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., the Ryan White program, which is administered by the Health Resources and Services Administration. + */ + HIVAIDS, + /** + * mandatory health program + */ + MANDPOL, + /** + * Definition: Government administered and funded mental health program for beneficiaries meeting financial and mental health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA). + */ + MENTPRG, + /** + * Definition: Government administered and funded program to support provision of care to underserved populations through safety net clinics. + + + Example: In the U.S., safety net providers such as federally qualified health centers (FQHC) receive funding under PHSA Section 330 grants administered by the Health Resources and Services Administration. + */ + SAFNET, + /** + * Definition: Government administered and funded substance use program for beneficiaries meeting financial, substance use behavior, and health status criteria. Beneficiaries may be required to enroll as a result of legal proceedings. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA). + */ + SUBPRG, + /** + * Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + */ + SUBSIDIZ, + /** + * Definition: A government health program that provides coverage through managed care contracts for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Discussion: The structure and business processes for underwriting and administering a subsidized managed care program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSIDMC, + /** + * Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria for a supplemental health policy or program such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Example: Supplemental health coverage program may cover the cost of a health program or policy financial participations, such as the copays and the premiums, and may provide coverage for services in addition to those covered under the supplemented health program or policy. In the U.S., Medicaid programs may pay the premium for a covered party who is also covered under the Medicare program or a private health policy. + + + Discussion: The structure and business processes for underwriting and administering a subsidized supplemental retiree health program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSUPP, + /** + * Insurance policy for injuries sustained in the work place or in the course of employment. + */ + WCBPOL, + /** + * Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g., whether the covered parties are jointly or severably insured. + + + Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType. + */ + _ACTINSURANCETYPECODE, + /** + * Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g., exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g., only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g., co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g., under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement). + */ + _ACTHEALTHINSURANCETYPECODE, + /** + * Definition: A health insurance policy that that covers benefits for dental services. + */ + DENTAL, + /** + * Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g., cancer, diabetes, or HIV-AIDS. + */ + DISEASE, + /** + * Definition: A health insurance policy that covers benefits for prescription drugs, pharmaceuticals, and supplies. + */ + DRUGPOL, + /** + * Definition: A health insurance policy that covers healthcare benefits by protecting covered parties from medical expenses arising from health conditions, sickness, or accidental injury as well as preventive care. Health insurance policies explicitly exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy. + + + Discussion: Health insurance policies are offered by health insurance plans that typically reimburse providers for covered services on a fee-for-service basis, that is, a fee that is the allowable amount that a provider may charge. This is in contrast to managed care plans, which typically prepay providers a per-member/per-month amount or capitation as reimbursement for all covered services rendered. Health insurance plans include indemnity and healthcare services plans. + */ + HIP, + /** + * Definition: An insurance policy that covers benefits for long-term care services people need when they no longer can care for themselves. This may be due to an accident, disability, prolonged illness or the simple process of aging. Long-term care services assist with activities of daily living including: + + + + Help at home with day-to-day activities, such as cooking, cleaning, bathing and dressing + + + + Care in the community, such as in an adult day care facility + + + + Supervised care provided in an assisted living facility + + + + Skilled care provided in a nursing home + */ + LTC, + /** + * Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well. + + Managed care policies specifically exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy. + + + Discussion: Managed care policies are offered by managed care plans that contract with selected providers or health care organizations to provide comprehensive health care at a discount to covered parties and coordinate the financing and delivery of health care. Managed care uses medical protocols and procedures agreed on by the medical profession to be cost effective, also known as medical practice guidelines. Providers are typically reimbursed for covered services by a capitated amount on a per member per month basis that may reflect difference in the health status and level of services anticipated to be needed by the member. + */ + MCPOL, + /** + * Definition: A policy for a health plan that has features of both an HMO and a FFS plan. Like an HMO, a POS plan encourages the use its HMO network to maintain discounted fees with participating providers, but recognizes that sometimes covered parties want to choose their own provider. The POS plan allows a covered party to use providers who are not part of the HMO network (non-participating providers). However, there is a greater cost associated with choosing these non-network providers. A covered party will usually pay deductibles and coinsurances that are substantially higher than the payments when he or she uses a plan provider. Use of non-participating providers often requires the covered party to pay the provider directly and then to file a claim for reimbursement, like in an FFS plan. + */ + POS, + /** + * Definition: A policy for a health plan that provides coverage for health care only through contracted or employed physicians and hospitals located in particular geographic or service areas. HMOs emphasize prevention and early detection of illness. Eligibility to enroll in an HMO is determined by where a covered party lives or works. + */ + HMO, + /** + * Definition: A network-based, managed care plan that allows a covered party to choose any health care provider. However, if care is received from a "preferred" (participating in-network) provider, there are generally higher benefit coverage and lower deductibles. + */ + PPO, + /** + * Definition: A health insurance policy that covers benefits for mental health services and prescriptions. + */ + MENTPOL, + /** + * Definition: A health insurance policy that covers benefits for substance use services. + */ + SUBPOL, + /** + * Definition: Set of codes for a policy that provides coverage for health care expenses arising from vision services. + + A health insurance policy that covers benefits for vision care services, prescriptions, and products. + */ + VISPOL, + /** + * Definition: An insurance policy that provides a regular payment to compensate for income lost due to the covered party's inability to work because of illness or injury. + */ + DIS, + /** + * Definition: An insurance policy under a benefit plan run by an employer or employee organization for the purpose of providing benefits other than pension-related to employees and their families. Typically provides health-related benefits, benefits for disability, disease or unemployment, or day care and scholarship benefits, among others. An employer sponsored health policy includes coverage of health care expenses arising from sickness or accidental injury, coverage for on-site medical clinics or for dental or vision benefits, which are typically provided under a separate policy. Coverage excludes health care expenses covered by accident or disability, workers' compensation, liability or automobile insurance. + */ + EWB, + /** + * Definition: An insurance policy that covers qualified benefits under a Flexible Benefit plan such as group medical insurance, long and short term disability income insurance, group term life insurance for employees only up to $50,000 face amount, specified disease coverage such as a cancer policy, dental and/or vision insurance, hospital indemnity insurance, accidental death and dismemberment insurance, a medical expense reimbursement plan and a dependent care reimbursement plan. + + + Discussion: See UnderwriterRoleTypeCode flexible benefit plan which is defined as a benefit plan that allows employees to choose from several life, health, disability, dental, and other insurance plans according to their individual needs. Also known as cafeteria plans. Authorized under Section 125 of the Revenue Act of 1978. + */ + FLEXP, + /** + * Definition: A policy under which the insurer agrees to pay a sum of money upon the occurrence of the covered partys death. In return, the policyholder agrees to pay a stipulated amount called a premium at regular intervals. Life insurance indemnifies the beneficiary for the loss of the insurable interest that a beneficiary has in the life of a covered party. For persons related by blood, a substantial interest established through love and affection, and for all other persons, a lawful and substantial economic interest in having the life of the insured continue. An insurable interest is required when purchasing life insurance on another person. Specific exclusions are often written into the contract to limit the liability of the insurer; for example claims resulting from suicide or relating to war, riot and civil commotion. + + + Discussion:A life insurance policy may be used by the covered party as a source of health care coverage in the case of a viatical settlement, which is the sale of a life insurance policy by the policy owner, before the policy matures. Such a sale, at a price discounted from the face amount of the policy but usually in excess of the premiums paid or current cash surrender value, provides the seller an immediate cash settlement. Generally, viatical settlements involve insured individuals with a life expectancy of less than two years. In countries without state-subsidized healthcare and high healthcare costs (e.g. United States), this is a practical way to pay extremely high health insurance premiums that severely ill people face. Some people are also familiar with life settlements, which are similar transactions but involve insureds with longer life expectancies (two to fifteen years). + */ + LIFE, + /** + * Definition: A policy that, after an initial premium or premiums, pays out a sum at pre-determined intervals. + + For example, a policy holder may pay $10,000, and in return receive $150 each month until he dies; or $1,000 for each of 14 years or death benefits if he dies before the full term of the annuity has elapsed. + */ + ANNU, + /** + * Definition: Life insurance under which the benefit is payable only if the insured dies during a specified period. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing. + */ + TLIFE, + /** + * Definition: Life insurance under which the benefit is payable upon the insuredaTMs death or diagnosis of a terminal illness. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing + */ + ULIFE, + /** + * Definition: A type of insurance that covers damage to or loss of the policyholderaTMs property by providing payments for damages to property damage or the injury or death of living subjects. The terms "casualty" and "liability" insurance are often used interchangeably. Both cover the policyholder's legal liability for damages caused to other persons and/or their property. + */ + PNC, + /** + * Definition: An agreement between two or more insurance companies by which the risk of loss is proportioned. Thus the risk of loss is spread and a disproportionately large loss under a single policy does not fall on one insurance company. Acceptance by an insurer, called a reinsurer, of all or part of the risk of loss of another insurance company. + + + Discussion: Reinsurance is a means by which an insurance company can protect itself against the risk of losses with other insurance companies. Individuals and corporations obtain insurance policies to provide protection for various risks (hurricanes, earthquakes, lawsuits, collisions, sickness and death, etc.). Reinsurers, in turn, provide insurance to insurance companies. + + For example, an HMO may purchase a reinsurance policy to protect itself from losing too much money from one insured's particularly expensive health care costs. An insurance company issuing an automobile liability policy, with a limit of $100,000 per accident may reinsure its liability in excess of $10,000. A fire insurance company which issues a large policy generally reinsures a portion of the risk with one or several other companies. Also called risk control insurance or stop-loss insurance. + */ + REI, + /** + * Definition: + + + + + A risk or part of a risk for which there is no normal insurance market available. + + + + Insurance written by unauthorized insurance companies. Surplus lines insurance is insurance placed with unauthorized insurance companies through licensed surplus lines agents or brokers. + */ + SURPL, + /** + * Definition: A form of insurance protection that provides additional liability coverage after the limits of your underlying policy are reached. An umbrella liability policy also protects you (the insured) in many situations not covered by the usual liability policies. + */ + UMBRL, + /** + * Definition: A set of codes used to indicate coverage under a program. A program is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health, financial, and demographic status. Programs are typically established or permitted by legislation with provisions for ongoing government oversight. Regulations may mandate the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency may be charged with implementing the program in accordance to the regulation. Risk of loss under a program in most cases would not meet what an underwriter would consider an insurable risk, i.e., the risk is not random in nature, not financially measurable, and likely requires subsidization with government funds. + + + Discussion: Programs do not have policy holders or subscribers. Program eligibles are enrolled based on health status, statutory eligibility, financial status, or age. Program eligibles who are covered parties under the program may be referred to as members, beneficiaries, eligibles, or recipients. Programs risk are underwritten by not for profit organizations such as governmental entities, and the beneficiaries typically do not pay for any or some portion of the cost of coverage. See CoveredPartyRoleType. + */ + _ACTPROGRAMTYPECODE, + /** + * Definition: A program that covers the cost of services provided directly to a beneficiary who typically has no other source of coverage without charge. + */ + CHAR, + /** + * Definition: A program that covers the cost of services provided to crime victims for injuries or losses related to the occurrence of a crime. + */ + CRIME, + /** + * Definition: An employee assistance program is run by an employer or employee organization for the purpose of providing benefits and covering all or part of the cost for employees to receive counseling, referrals, and advice in dealing with stressful issues in their lives. These may include substance abuse, bereavement, marital problems, weight issues, or general wellness issues. The services are usually provided by a third-party, rather than the company itself, and the company receives only summary statistical data from the service provider. Employee's names and services received are kept confidential. + */ + EAP, + /** + * Definition: A set of codes used to indicate a government program that is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health and financial status. Government programs are established or permitted by legislation with provisions for ongoing government oversight. Regulation mandates the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency is charged with implementing the program in accordance to the regulation + + + Example: Federal employee health benefit program in the U.S. + */ + GOVEMP, + /** + * Definition: A government program that provides health coverage to individuals who are considered medically uninsurable or high risk, and who have been denied health insurance due to a serious health condition. In certain cases, it also applies to those who have been quoted very high premiums a" again, due to a serious health condition. The pool charges premiums for coverage. Because the pool covers high-risk people, it incurs a higher level of claims than premiums can cover. The insurance industry pays into the pool to make up the difference and help it remain viable. + */ + HIRISK, + /** + * Definition: Services provided directly and through contracted and operated indigenous peoples health programs. + + + Example: Indian Health Service in the U.S. + */ + IND, + /** + * Definition: A government program that provides coverage for health services to military personnel, retirees, and dependents. A covered party who is a subscriber can choose from among Fee-for-Service (FFS) plans, and their Preferred Provider Organizations (PPO), or Plans offering a Point of Service (POS) Product, or Health Maintenance Organizations. + + + Example: In the U.S., TRICARE, CHAMPUS. + */ + MILITARY, + /** + * Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g., being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care. + */ + RETIRE, + /** + * Definition: A social service program funded by a public or governmental entity. + + + Example: Programs providing habilitation, food, lodging, medicine, transportation, equipment, devices, products, education, training, counseling, alteration of living or work space, and other resources to persons meeting eligibility criteria. + */ + SOCIAL, + /** + * Definition: Services provided directly and through contracted and operated veteran health programs. + */ + VET, + /** + * Codes dealing with the management of Detected Issue observations + */ + _ACTDETECTEDISSUEMANAGEMENTCODE, + /** + * Codes dealing with the management of Detected Issue observations for the administrative and patient administrative acts domains. + */ + _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE, + /** + * Authorization Issue Management Code + */ + _AUTHORIZATIONISSUEMANAGEMENTCODE, + /** + * Used to temporarily override normal authorization rules to gain access to data in a case of emergency. Use of this override code will typically be monitored, and a procedure to verify its proper use may be triggered when used. + */ + EMAUTH, + /** + * Description: Indicates that the permissions have been externally verified and the request should be processed. + */ + _21, + /** + * Confirmed drug therapy appropriate + */ + _1, + /** + * Consulted other supplier/pharmacy, therapy confirmed + */ + _19, + /** + * Assessed patient, therapy is appropriate + */ + _2, + /** + * Description: The patient has the appropriate indication or diagnosis for the action to be taken. + */ + _22, + /** + * Description: It has been confirmed that the appropriate pre-requisite therapy has been tried. + */ + _23, + /** + * Patient gave adequate explanation + */ + _3, + /** + * Consulted other supply source, therapy still appropriate + */ + _4, + /** + * Consulted prescriber, therapy confirmed + */ + _5, + /** + * Consulted prescriber and recommended change, prescriber declined + */ + _6, + /** + * Concurrent therapy triggering alert is no longer on-going or planned + */ + _7, + /** + * Confirmed supply action appropriate + */ + _14, + /** + * Patient's existing supply was lost/wasted + */ + _15, + /** + * Supply date is due to patient vacation + */ + _16, + /** + * Supply date is intended to carry patient over weekend + */ + _17, + /** + * Supply is intended for use during a leave of absence from an institution. + */ + _18, + /** + * Description: Supply is different than expected as an additional quantity has been supplied in a separate dispense. + */ + _20, + /** + * Order is performed as issued, but other action taken to mitigate potential adverse effects + */ + _8, + /** + * Provided education or training to the patient on appropriate therapy use + */ + _10, + /** + * Instituted an additional therapy to mitigate potential negative effects + */ + _11, + /** + * Suspended existing therapy that triggered interaction for the duration of this therapy + */ + _12, + /** + * Aborted existing therapy that triggered interaction. + */ + _13, + /** + * Arranged to monitor patient for adverse effects + */ + _9, + /** + * Concepts that identify the type or nature of exposure interaction. Examples include "household", "care giver", "intimate partner", "common space", "common substance", etc. to further describe the nature of interaction. + */ + _ACTEXPOSURECODE, + /** + * Description: Exposure participants' interaction occurred in a child care setting + */ + CHLDCARE, + /** + * Description: An interaction where the exposure participants traveled in/on the same vehicle (not necessarily concurrently, e.g. both are passengers of the same plane, but on different flights of that plane). + */ + CONVEYNC, + /** + * Description: Exposure participants' interaction occurred during the course of health care delivery or in a health care delivery setting, but did not involve the direct provision of care (e.g. a janitor cleaning a patient's hospital room). + */ + HLTHCARE, + /** + * Description: Exposure interaction occurred in context of one providing care for the other, i.e. a babysitter providing care for a child, a home-care aide providing assistance to a paraplegic. + */ + HOMECARE, + /** + * Description: Exposure participants' interaction occurred when both were patients being treated in the same (acute) health care delivery facility. + */ + HOSPPTNT, + /** + * Description: Exposure participants' interaction occurred when one visited the other who was a patient being treated in a health care delivery facility. + */ + HOSPVSTR, + /** + * Description: Exposure interaction occurred in context of domestic interaction, i.e. both participants reside in the same household. + */ + HOUSEHLD, + /** + * Description: Exposure participants' interaction occurred in the course of one or both participants being incarcerated at a correctional facility + */ + INMATE, + /** + * Description: Exposure interaction was intimate, i.e. participants are intimate companions (e.g. spouses, domestic partners). + */ + INTIMATE, + /** + * Description: Exposure participants' interaction occurred in the course of one or both participants being resident at a long term care facility (second participant may be a visitor, worker, resident or a physical place or object within the facility). + */ + LTRMCARE, + /** + * Description: An interaction where the exposure participants were both present in the same location/place/space. + */ + PLACE, + /** + * Description: Exposure participants' interaction occurred during the course of health care delivery by a provider (e.g. a physician treating a patient in her office). + */ + PTNTCARE, + /** + * Description: Exposure participants' interaction occurred in an academic setting (e.g., participants are fellow students, or student and teacher). + */ + SCHOOL2, + /** + * Description: An interaction where the exposure participants are social associates or members of the same extended family + */ + SOCIAL2, + /** + * Description: An interaction where the exposure participants shared or co-used a common substance (e.g. drugs, needles, or common food item). + */ + SUBSTNCE, + /** + * Description: An interaction where the exposure participants traveled together in/on the same vehicle/trip (e.g. concurrent co-passengers). + */ + TRAVINT, + /** + * Description: Exposure interaction occurred in a work setting, i.e. participants are co-workers. + */ + WORK2, + /** + * ActFinancialTransactionCode + */ + _ACTFINANCIALTRANSACTIONCODE, + /** + * A type of transaction that represents a charge for a service or product. Expressed in monetary terms. + */ + CHRG, + /** + * A type of transaction that represents a reversal of a previous charge for a service or product. Expressed in monetary terms. It has the opposite effect of a standard charge. + */ + REV, + /** + * Set of codes indicating the type of incident or accident. + */ + _ACTINCIDENTCODE, + /** + * Incident or accident as the result of a motor vehicle accident + */ + MVA, + /** + * Incident or accident is the result of a school place accident. + */ + SCHOOL, + /** + * Incident or accident is the result of a sporting accident. + */ + SPT, + /** + * Incident or accident is the result of a work place accident + */ + WPA, + /** + * Description: The type of health information to which the subject of the information or the subject's delegate consents or dissents. + */ + _ACTINFORMATIONACCESSCODE, + /** + * Description: Provide consent to collect, use, disclose, or access adverse drug reaction information for a patient. + */ + ACADR, + /** + * Description: Provide consent to collect, use, disclose, or access all information for a patient. + */ + ACALL, + /** + * Description: Provide consent to collect, use, disclose, or access allergy information for a patient. + */ + ACALLG, + /** + * Description: Provide consent to collect, use, disclose, or access informational consent information for a patient. + */ + ACCONS, + /** + * Description: Provide consent to collect, use, disclose, or access demographics information for a patient. + */ + ACDEMO, + /** + * Description: Provide consent to collect, use, disclose, or access diagnostic imaging information for a patient. + */ + ACDI, + /** + * Description: Provide consent to collect, use, disclose, or access immunization information for a patient. + */ + ACIMMUN, + /** + * Description: Provide consent to collect, use, disclose, or access lab test result information for a patient. + */ + ACLAB, + /** + * Description: Provide consent to collect, use, disclose, or access medical condition information for a patient. + */ + ACMED, + /** + * Definition: Provide consent to view or access medical condition information for a patient. + */ + ACMEDC, + /** + * Description:Provide consent to collect, use, disclose, or access mental health information for a patient. + */ + ACMEN, + /** + * Description: Provide consent to collect, use, disclose, or access common observation information for a patient. + */ + ACOBS, + /** + * Description: Provide consent to collect, use, disclose, or access coverage policy or program for a patient. + */ + ACPOLPRG, + /** + * Description: Provide consent to collect, use, disclose, or access provider information for a patient. + */ + ACPROV, + /** + * Description: Provide consent to collect, use, disclose, or access professional service information for a patient. + */ + ACPSERV, + /** + * Description:Provide consent to collect, use, disclose, or access substance abuse information for a patient. + */ + ACSUBSTAB, + /** + * Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information. + */ + _ACTINFORMATIONACCESSCONTEXTCODE, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with jurisdictional law, organizational policy, or a patient's consent directive, which may be implied, deemed, opt-in, opt-out, or explicit. + */ + INFAUT, + /** + * Authorization to collect, access, use, or disclose specified patient health information as explicitly consented to by the subject of the information or the subject's representative. + */ + INFCON, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with judicial system protocol, such as in the case of a subpoena or court order. + */ + INFCRT, + /** + * Authorization to collect, access, use, or disclose specified patient health information where deemed necessary to avert potential danger to other persons in accordance with jurisdictional law, organizational policy, or standards of practice. For example, disclosure about a person threatening violence. + */ + INFDNG, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with emergency information transfer protocol dictated by jurisdictional law, organization policy, or standards of practice. For example, sharing of health information during disaster response. + */ + INFEMER, + /** + * Authorization to collect, access, use, or disclose specified patient health information necessary to avert potential public welfare risk in accordance with jurisdictional law, organizational policy, or standards of practice. For example, reporting that a person is a victim of abuse or demonstrating suicidal tendencies. + */ + INFPWR, + /** + * Authorization to collect, access, use, or disclose specified patient health information for public health, welfare, and safety purposes in accordance with jurisdictional law, organizational policy, or standards of practice. For example, public health reporting of notifiable conditions. + */ + INFREG, + /** + * Definition:Indicates the set of information types which may be manipulated or referenced, such as for recommending access restrictions. + */ + _ACTINFORMATIONCATEGORYCODE, + /** + * Description: All patient information. + */ + ALLCAT, + /** + * Definition:All information pertaining to a patient's allergy and intolerance records. + */ + ALLGCAT, + /** + * Description: All information pertaining to a patient's adverse drug reactions. + */ + ARCAT, + /** + * Definition:All information pertaining to a patient's common observation records (height, weight, blood pressure, temperature, etc.). + */ + COBSCAT, + /** + * Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc). + */ + DEMOCAT, + /** + * Definition:All information pertaining to a patient's diagnostic image records (orders & results). + */ + DICAT, + /** + * Definition:All information pertaining to a patient's vaccination records. + */ + IMMUCAT, + /** + * Description: All information pertaining to a patient's lab test records (orders & results) + */ + LABCAT, + /** + * Definition:All information pertaining to a patient's medical condition records. + */ + MEDCCAT, + /** + * Description: All information pertaining to a patient's mental health records. + */ + MENCAT, + /** + * Definition:All information pertaining to a patient's professional service records (such as smoking cessation, counseling, medication review, mental health). + */ + PSVCCAT, + /** + * Definition:All information pertaining to a patient's medication records (orders, dispenses and other active medications). + */ + RXCAT, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + */ + _ACTINVOICEELEMENTCODE, + /** + * Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee and other cost elements such as bonus, retroactive adjustment and transaction fees. + */ + _ACTINVOICEADJUDICATIONPAYMENTCODE, + /** + * Codes representing adjustments to a Payment Advice such as retroactive, clawback, garnishee, etc. + */ + _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE, + /** + * Payment initiated by the payor as the result of adjudicating a submitted invoice that arrived to the payor from an electronic source that did not provide a conformant set of HL7 messages (e.g. web claim submission). + */ + ALEC, + /** + * Bonus payments based on performance, volume, etc. as agreed to by the payor. + */ + BONUS, + /** + * An amount still owing to the payor but the payment is 0$ and this cannot be settled until a future payment is made. + */ + CFWD, + /** + * Fees deducted on behalf of a payee for tuition and continuing education. + */ + EDU, + /** + * Fees deducted on behalf of a payee for charges based on a shorter payment frequency (i.e. next day versus biweekly payments. + */ + EPYMT, + /** + * Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee. + */ + GARN, + /** + * Payment is based on a payment intent for a previously submitted Invoice, based on formal adjudication results.. + */ + INVOICE, + /** + * Payment initiated by the payor as the result of adjudicating a paper (original, may have been faxed) invoice. + */ + PINV, + /** + * An amount that was owed to the payor as indicated, by a carry forward adjusment, in a previous payment advice + */ + PPRD, + /** + * Professional association fee that is collected by the payor from the practitioner/provider on behalf of the association + */ + PROA, + /** + * Retroactive adjustment such as fee rate adjustment due to contract negotiations. + */ + RECOV, + /** + * Bonus payments based on performance, volume, etc. as agreed to by the payor. + */ + RETRO, + /** + * Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee. + */ + TRAN, + /** + * Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee, etc. + */ + _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE, + /** + * Transaction counts and value totals by invoice type (e.g. RXDINV - Pharmacy Dispense) + */ + INVTYPE, + /** + * Transaction counts and value totals by each instance of an invoice payee. + */ + PAYEE, + /** + * Transaction counts and value totals by each instance of an invoice payor. + */ + PAYOR, + /** + * Transaction counts and value totals by each instance of a messaging application on a single processor. It is a registered identifier known to the receivers. + */ + SENDAPP, + /** + * Codes representing a service or product that is being invoiced (billed). The code can represent such concepts as "office visit", "drug X", "wheelchair" and other billable items such as taxes, service charges and discounts. + */ + _ACTINVOICEDETAILCODE, + /** + * An identifying data string for healthcare products. + */ + _ACTINVOICEDETAILCLINICALPRODUCTCODE, + /** + * Description:United Nations Standard Products and Services Classification, managed by Uniform Code Council (UCC): www.unspsc.org + */ + UNSPSC, + /** + * An identifying data string for A substance used as a medication or in the preparation of medication. + */ + _ACTINVOICEDETAILDRUGPRODUCTCODE, + /** + * Description:Global Trade Item Number is an identifier for trade items developed by GS1 (comprising the former EAN International and Uniform Code Council). + */ + GTIN, + /** + * Description:Universal Product Code is one of a wide variety of bar code languages widely used in the United States and Canada for items in stores. + */ + UPC, + /** + * The detail item codes to identify charges or changes to the total billing of a claim due to insurance rules and payments. + */ + _ACTINVOICEDETAILGENERICCODE, + /** + * The billable item codes to identify adjudicator specified components to the total billing of a claim. + */ + _ACTINVOICEDETAILGENERICADJUDICATORCODE, + /** + * That portion of the eligible charges which a covered party must pay for each service and/or product. It is a percentage of the eligible amount for the service/product that is typically charged after the covered party has met the policy deductible. This amount represents the covered party's coinsurance that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + COIN, + /** + * That portion of the eligible charges which a covered party must pay for each service and/or product. It is a defined amount per service/product of the eligible amount for the service/product. This amount represents the covered party's copayment that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + COPAYMENT, + /** + * That portion of the eligible charges which a covered party must pay in a particular period (e.g. annual) before the benefits are payable by the adjudicator. This amount represents the covered party's deductible that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + DEDUCTIBLE, + /** + * The guarantor, who may be the patient, pays the entire charge for a service. Reasons for such action may include: there is no insurance coverage for the service (e.g. cosmetic surgery); the patient wishes to self-pay for the service; or the insurer denies payment for the service due to contractual provisions such as the need for prior authorization. + */ + PAY, + /** + * That total amount of the eligible charges which a covered party must periodically pay for services and/or products prior to the Medicaid program providing any coverage. This amount represents the covered party's spend down that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results + */ + SPEND, + /** + * The covered party pays a percentage of the cost of covered services. + */ + COINS, + /** + * The billable item codes to identify modifications to a billable item charge. As for example after hours increase in the office visit fee. + */ + _ACTINVOICEDETAILGENERICMODIFIERCODE, + /** + * Premium paid on service fees in compensation for practicing outside of normal working hours. + */ + AFTHRS, + /** + * Premium paid on service fees in compensation for practicing in a remote location. + */ + ISOL, + /** + * Premium paid on service fees in compensation for practicing at a location other than normal working location. + */ + OOO, + /** + * The billable item codes to identify provider supplied charges or changes to the total billing of a claim. + */ + _ACTINVOICEDETAILGENERICPROVIDERCODE, + /** + * A charge to compensate the provider when a patient cancels an appointment with insufficient time for the provider to make another appointment with another patient. + */ + CANCAPT, + /** + * A reduction in the amount charged as a percentage of the amount. For example a 5% discount for volume purchase. + */ + DSC, + /** + * A premium on a service fee is requested because, due to extenuating circumstances, the service took an extraordinary amount of time or supplies. + */ + ESA, + /** + * Under agreement between the parties (payor and provider), a guaranteed level of income is established for the provider over a specific, pre-determined period of time. The normal course of business for the provider is submission of fee-for-service claims. Should the fee-for-service income during the specified period of time be less than the agreed to amount, a top-up amount is paid to the provider equal to the difference between the fee-for-service total and the guaranteed income amount for that period of time. The details of the agreement may specify (or not) a requirement for repayment to the payor in the event that the fee-for-service income exceeds the guaranteed amount. + */ + FFSTOP, + /** + * Anticipated or actual final fee associated with treating a patient. + */ + FNLFEE, + /** + * Anticipated or actual initial fee associated with treating a patient. + */ + FRSTFEE, + /** + * An increase in the amount charged as a percentage of the amount. For example, 12% markup on product cost. + */ + MARKUP, + /** + * A charge to compensate the provider when a patient does not show for an appointment. + */ + MISSAPT, + /** + * Anticipated or actual periodic fee associated with treating a patient. For example, expected billing cycle such as monthly, quarterly. The actual period (e.g. monthly, quarterly) is specified in the unit quantity of the Invoice Element. + */ + PERFEE, + /** + * The amount for a performance bonus that is being requested from a payor for the performance of certain services (childhood immunizations, influenza immunizations, mammograms, pap smears) on a sliding scale. That is, for 90% of childhood immunizations to a maximum of $2200/yr. An invoice is created at the end of the service period (one year) and a code is submitted indicating the percentage achieved and the dollar amount claimed. + */ + PERMBNS, + /** + * A charge is requested because the patient failed to pick up the item and it took an amount of time to return it to stock for future use. + */ + RESTOCK, + /** + * A charge to cover the cost of travel time and/or cost in conjuction with providing a service or product. It may be charged per kilometer or per hour based on the effective agreement. + */ + TRAVEL, + /** + * Premium paid on service fees in compensation for providing an expedited response to an urgent situation. + */ + URGENT, + /** + * The billable item codes to identify modifications to a billable item charge by a tax factor applied to the amount. As for example 7% provincial sales tax. + */ + _ACTINVOICEDETAILTAXCODE, + /** + * Federal tax on transactions such as the Goods and Services Tax (GST) + */ + FST, + /** + * Joint Federal/Provincial Sales Tax + */ + HST, + /** + * Tax levied by the provincial or state jurisdiction such as Provincial Sales Tax + */ + PST, + /** + * An identifying data string for medical facility accommodations. + */ + _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE, + /** + * Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type. + */ + _ACTENCOUNTERACCOMMODATIONCODE, + /** + * Description:Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type. + */ + _HL7ACCOMMODATIONCODE, + /** + * Accommodations used in the care of diseases that are transmitted through casual contact or respiratory transmission. + */ + I, + /** + * Accommodations in which there is only 1 bed. + */ + P, + /** + * Uniquely designed and elegantly decorated accommodations with many amenities available for an additional charge. + */ + S, + /** + * Accommodations in which there are 2 beds. + */ + SP, + /** + * Accommodations in which there are 3 or more beds. + */ + W, + /** + * An identifying data string for healthcare procedures. + */ + _ACTINVOICEDETAILCLINICALSERVICECODE, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + */ + _ACTINVOICEGROUPCODE, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + + The domain is only specified for an intermediate invoice element group (non-root or non-top level) for an Invoice. + */ + _ACTINVOICEINTERGROUPCODE, + /** + * A grouping of invoice element groups and details including the ones specifying the compound ingredients being invoiced. It may also contain generic detail items such as markup. + */ + CPNDDRGING, + /** + * A grouping of invoice element details including the one specifying an ingredient drug being invoiced. It may also contain generic detail items such as tax or markup. + */ + CPNDINDING, + /** + * A grouping of invoice element groups and details including the ones specifying the compound supplies being invoiced. It may also contain generic detail items such as markup. + */ + CPNDSUPING, + /** + * A grouping of invoice element details including the one specifying the drug being invoiced. It may also contain generic detail items such as markup. + */ + DRUGING, + /** + * A grouping of invoice element details including the ones specifying the frame fee and the frame dispensing cost that are being invoiced. + */ + FRAMEING, + /** + * A grouping of invoice element details including the ones specifying the lens fee and the lens dispensing cost that are being invoiced. + */ + LENSING, + /** + * A grouping of invoice element details including the one specifying the product (good or supply) being invoiced. It may also contain generic detail items such as tax or discount. + */ + PRDING, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + + Codes from this domain reflect the type of Invoice such as Pharmacy Dispense, Clinical Service and Clinical Product. The domain is only specified for the root (top level) invoice element group for an Invoice. + */ + _ACTINVOICEROOTGROUPCODE, + /** + * Clinical product invoice where the Invoice Grouping contains one or more billable item and is supported by clinical product(s). + + For example, a crutch or a wheelchair. + */ + CPINV, + /** + * Clinical Services Invoice which can be used to describe a single service, multiple services or repeated services. + + [1] Single Clinical services invoice where the Invoice Grouping contains one billable item and is supported by one clinical service. + + For example, a single service for an office visit or simple clinical procedure (e.g. knee mobilization). + + [2] Multiple Clinical services invoice where the Invoice Grouping contains more than one billable item, supported by one or more clinical services. The services can be distinct and over multiple dates, but for the same patient. This type of invoice includes a series of treatments which must be adjudicated together. + + For example, an adjustment and ultrasound for a chiropractic session where fees are associated for each of the services and adjudicated (invoiced) together. + + [3] Repeated Clinical services invoice where the Invoice Grouping contains one or more billable item, supported by the same clinical service repeated over a period of time. + + For example, the same Chiropractic adjustment (service or treatment) delivered on 3 separate occasions over a period of time at the discretion of the provider (e.g. month). + */ + CSINV, + /** + * A clinical Invoice Grouping consisting of one or more services and one or more product. Billing for these service(s) and product(s) are supported by multiple clinical billable events (acts). + + All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator. + + For example , a brace (product) invoiced together with the fitting (service). + */ + CSPINV, + /** + * Invoice Grouping without clinical justification. These will not require identification of participants and associations from a clinical context such as patient and provider. + + Examples are interest charges and mileage. + */ + FININV, + /** + * A clinical Invoice Grouping consisting of one or more oral health services. Billing for these service(s) are supported by multiple clinical billable events (acts). + + All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator. + */ + OHSINV, + /** + * HealthCare facility preferred accommodation invoice. + */ + PAINV, + /** + * Pharmacy dispense invoice for a compound. + */ + RXCINV, + /** + * Pharmacy dispense invoice not involving a compound + */ + RXDINV, + /** + * Clinical services invoice where the Invoice Group contains one billable item for multiple clinical services in one or more sessions. + */ + SBFINV, + /** + * Vision dispense invoice for up to 2 lens (left and right), frame and optional discount. Eye exams are invoiced as a clinical service invoice. + */ + VRXINV, + /** + * Identifies the different types of summary information that can be reported by queries dealing with Statement of Financial Activity (SOFA). The summary information is generally used to help resolve balance discrepancies between providers and payors. + */ + _ACTINVOICEELEMENTSUMMARYCODE, + /** + * Total counts and total net amounts adjudicated for all Invoice Groupings that were adjudicated within a time period based on the adjudication date of the Invoice Grouping. + */ + _INVOICEELEMENTADJUDICATED, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically. + */ + ADNFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically. + */ + ADNFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically. + */ + ADNFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically. + */ + ADNFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually. + */ + ADRFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually. + */ + ADRFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually. + */ + ADRFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually. + */ + ADRFSPMNCT, + /** + * Total counts and total net amounts paid for all Invoice Groupings that were paid within a time period based on the payment date. + */ + _INVOICEELEMENTPAID, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently cancelled in the specified period and submitted electronically. + */ + PDNFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPSPMNCT, + /** + * Total counts and total net amounts billed for all Invoice Groupings that were submitted within a time period. Adjudicated invoice elements are included. + */ + _INVOICEELEMENTSUBMITTED, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBBLELAT, + /** + * Identifies the total number of submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBBLELCT, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBNFELAT, + /** + * Identifies the total number of submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBNFELCT, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included. + */ + SBPDELAT, + /** + * Identifies the total number of submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included. + */ + SBPDELCT, + /** + * Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results. + */ + _ACTINVOICEOVERRIDECODE, + /** + * Insurance coverage problems have been encountered. Additional explanation information to be supplied. + */ + COVGE, + /** + * Electronic form with supporting or additional information to follow. + */ + EFORM, + /** + * Fax with supporting or additional information to follow. + */ + FAX, + /** + * The medical service was provided to a patient in good faith that they had medical coverage, although no evidence of coverage was available before service was rendered. + */ + GFTH, + /** + * Knowingly over the payor's published time limit for this invoice possibly due to a previous payor's delays in processing. Additional reason information will be supplied. + */ + LATE, + /** + * Manual review of the invoice is requested. Additional information to be supplied. This may be used in the case of an appeal. + */ + MANUAL, + /** + * The medical service and/or product was provided to a patient that has coverage in another jurisdiction. + */ + OOJ, + /** + * The service provided is required for orthodontic purposes. If the covered party has orthodontic coverage, then the service may be paid. + */ + ORTHO, + /** + * Paper documentation (or other physical format) with supporting or additional information to follow. + */ + PAPER, + /** + * Public Insurance has been exhausted. Invoice has not been sent to Public Insuror and therefore no Explanation Of Benefits (EOB) is provided with this Invoice submission. + */ + PIE, + /** + * Allows provider to explain lateness of invoice to a subsequent payor. + */ + PYRDELAY, + /** + * Rules of practice do not require a physician's referral for the provider to perform a billable service. + */ + REFNR, + /** + * The same service was delivered within a time period that would usually indicate a duplicate billing. However, the repeated service is a medical necessity and therefore not a duplicate. + */ + REPSERV, + /** + * The service provided is not related to another billed service. For example, 2 unrelated services provided on the same day to the same patient which may normally result in a refused payment for one of the items. + */ + UNRELAT, + /** + * The provider has received a verbal permission from an authoritative source to perform the service or supply the item being invoiced. + */ + VERBAUTH, + /** + * Provides codes associated with ActClass value of LIST (working list) + */ + _ACTLISTCODE, + /** + * ActObservationList + */ + _ACTOBSERVATIONLIST, + /** + * List of acts representing a care plan. The acts can be in a varierty of moods including event (EVN) to record acts that have been carried out as part of the care plan. + */ + CARELIST, + /** + * List of condition observations. + */ + CONDLIST, + /** + * List of intolerance observations. + */ + INTOLIST, + /** + * List of problem observations. + */ + PROBLIST, + /** + * List of risk factor observations. + */ + RISKLIST, + /** + * List of observations in goal mood. + */ + GOALLIST, + /** + * Codes used to identify different types of 'duration-based' working lists. Examples include "Continuous/Chronic", "Short-Term" and "As-Needed". + */ + _ACTTHERAPYDURATIONWORKINGLISTCODE, + /** + * Definition:A collection of concepts that identifies different types of 'duration-based' mediation working lists. + + + Examples:"Continuous/Chronic" "Short-Term" and "As Needed" + */ + _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE, + /** + * Definition:A list of medications which the patient is only expected to consume for the duration of the current order or limited set of orders and which is not expected to be renewed. + */ + ACU, + /** + * Definition:A list of medications which are expected to be continued beyond the present order and which the patient should be assumed to be taking unless explicitly stopped. + */ + CHRON, + /** + * Definition:A list of medications which the patient is intended to be administered only once. + */ + ONET, + /** + * Definition:A list of medications which the patient will consume intermittently based on the behavior of the condition for which the medication is indicated. + */ + PRN, + /** + * List of medications. + */ + MEDLIST, + /** + * List of current medications. + */ + CURMEDLIST, + /** + * List of discharge medications. + */ + DISCMEDLIST, + /** + * Historical list of medications. + */ + HISTMEDLIST, + /** + * Identifies types of monitoring programs + */ + _ACTMONITORINGPROTOCOLCODE, + /** + * A monitoring program that focuses on narcotics and/or commonly abused substances that are subject to legal restriction. + */ + CTLSUB, + /** + * Definition:A monitoring program that focuses on a drug which is under investigation and has not received regulatory approval for the condition being investigated + */ + INV, + /** + * Description:A drug that can be prescribed (and reimbursed) only if it meets certain criteria. + */ + LU, + /** + * Medicines designated in this way may be supplied for patient use without a prescription. The exact form of categorisation will vary in different realms. + */ + OTC, + /** + * Some form of prescription is required before the related medicine can be supplied for a patient. The exact form of regulation will vary in different realms. + */ + RX, + /** + * Definition:A drug that requires prior approval (to be reimbursed) before being dispensed + */ + SA, + /** + * Description:A drug that requires special access permission to be prescribed and dispensed. + */ + SAC, + /** + * Description:Concepts representing indications (reasons for clinical action) other than diagnosis and symptoms. + */ + _ACTNONOBSERVATIONINDICATIONCODE, + /** + * Description:Contrast agent required for imaging study. + */ + IND01, + /** + * Description:Provision of prescription or direction to consume a product for purposes of bowel clearance in preparation for a colonoscopy. + */ + IND02, + /** + * Description:Provision of medication as a preventative measure during a treatment or other period of increased risk. + */ + IND03, + /** + * Description:Provision of medication during pre-operative phase; e.g., antibiotics before dental surgery or bowel prep before colon surgery. + */ + IND04, + /** + * Description:Provision of medication for pregnancy --e.g., vitamins, antibiotic treatments for vaginal tract colonization, etc. + */ + IND05, + /** + * Identifies the type of verification investigation being undertaken with respect to the subject of the verification activity. + + + Examples: + + + + + Verification of eligibility for coverage under a policy or program - aka enrolled/covered by a policy or program + + + + Verification of record - e.g., person has record in an immunization registry + + + + Verification of enumeration - e.g. NPI + + + + Verification of Board Certification - provider specific + + + + Verification of Certification - e.g. JAHCO, NCQA, URAC + + + + Verification of Conformance - e.g. entity use with HIPAA, conformant to the CCHIT EHR system criteria + + + + Verification of Provider Credentials + + + + Verification of no adverse findings - e.g. on National Provider Data Bank, Health Integrity Protection Data Base (HIPDB) + */ + _ACTOBSERVATIONVERIFICATIONTYPE, + /** + * Definition:Indicates that the paper version of the record has, should be or is being verified against the electronic version. + */ + VFPAPER, + /** + * Code identifying the method or the movement of payment instructions. + + Codes are drawn from X12 data element 591 (PaymentMethodCode) + */ + _ACTPAYMENTCODE, + /** + * Automated Clearing House (ACH). + */ + ACH, + /** + * A written order to a bank to pay the amount specified from funds on deposit. + */ + CHK, + /** + * Electronic Funds Transfer (EFT) deposit into the payee's bank account + */ + DDP, + /** + * Non-Payment Data. + */ + NON, + /** + * Identifies types of dispensing events + */ + _ACTPHARMACYSUPPLYTYPE, + /** + * A fill providing sufficient supply for one day + */ + DF, + /** + * A supply action where there is no 'valid' order for the supplied medication. E.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription) + */ + EM, + /** + * An emergency supply where the expectation is that a formal order authorizing the supply will be provided at a later date. + */ + SO, + /** + * The initial fill against an order. (This includes initial fills against refill orders.) + */ + FF, + /** + * A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets). + */ + FFC, + /** + * A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) + */ + FFP, + /** + * A first fill where the strength supplied is less than the ordered strength. (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + FFSS, + /** + * A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance. + */ + TF, + /** + * A supply action to restock a smaller more local dispensary. + */ + FS, + /** + * A supply of a manufacturer sample + */ + MS, + /** + * A fill against an order that has already been filled (or partially filled) at least once. + */ + RF, + /** + * A supply action that provides sufficient material for a single dose. + */ + UD, + /** + * A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) + */ + RFC, + /** + * A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFCS, + /** + * The first fill against an order that has already been filled at least once at another facility. + */ + RFF, + /** + * The first fill against an order that has already been filled at least once at another facility and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFFS, + /** + * A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) + */ + RFP, + /** + * A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFPS, + /** + * A fill against an order that has already been filled (or partially filled) at least once and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFS, + /** + * A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided. + */ + TB, + /** + * A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + TBS, + /** + * A supply action that provides sufficient material for a single dose via multiple products. E.g. 2 50mg tablets for a 100mg unit dose. + */ + UDE, + /** + * Description:Types of policies that further specify the ActClassPolicy value set. + */ + _ACTPOLICYTYPE, + /** + * A policy deeming certain information to be private to an individual or organization. + + + Definition: A mandate, obligation, requirement, rule, or expectation relating to privacy. + + + Discussion: ActPrivacyPolicyType codes support the designation of the 1..* policies that are applicable to an Act such as a Consent Directive, a Role such as a VIP Patient, or an Entity such as a patient who is a minor. 1..* ActPrivacyPolicyType values may be associated with an Act or Role to indicate the policies that govern the assignment of an Act or Role confidentialityCode. Use of multiple ActPrivacyPolicyType values enables fine grain specification of applicable policies, but must be carefully assigned to ensure cogency and avoid creation of conflicting policy mandates. + + + Usage Note: Statutory title may be named in the ActClassPolicy Act Act.title to specify which privacy policy is being referenced. + */ + _ACTPRIVACYPOLICY, + /** + * Definition: Specifies the type of consent directive indicated by an ActClassPolicy e.g., a 3rd party authorization to disclose or consent for a substitute decision maker (SDM) or a notice of privacy policy. + + + Usage Note: ActConsentDirective codes are used to specify the type of Consent Directive to which a Consent Directive Act conforms. + */ + _ACTCONSENTDIRECTIVE, + /** + * This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations. + + + Definition: Opt-in to disclosure of health information for emergency only consent directive. + */ + EMRGONLY, + /** + * Acknowledgement of custodian notice of privacy practices. + + + Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified. + */ + NOPP, + /** + * This general consent directive permits disclosure of health information. Additional parameter may limit authorized users, purpose of use, user obligations, duration, or information types permitted to be disclosed, and impose uses obligations. + + + Definition: Opt-in to disclosure of health information consent directive. + */ + OPTIN, + /** + * This general consent directive prohibits disclosure of health information. Additional parameters may permit access to some information types by certain users, roles, purposes of use, durations and impose user obligations. + + + Definition: Opt-out of disclosure of health information consent directive. + */ + OPTOUT, + /** + * A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g., a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g., collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations. + + + Usage Note: Sensitivity codes are not useful for interoperability outside of a policy domain because sensitivity policies are typically localized and vary drastically across policy domains even for the same information category because of differing organizational business rules, security policies, and jurisdictional requirements. For example, an employee's sensitivity code would make little sense for use outside of a policy domain. 'Taboo' would rarely be useful outside of a policy domain unless there are jurisdictional requirements requiring that a provider disclose sensitive information to a patient directly. Sensitivity codes may be more appropriate in a legacy system's Master Files in order to notify those who access a patient's orders and observations about the sensitivity policies that apply. Newer systems may have a security engine that uses a sensitivity policy's criteria directly. The specializable InformationSensitivityPolicy Act.code may be useful in some scenarios if used in combination with a sensitivity identifier and/or Act.title. + */ + _INFORMATIONSENSITIVITYPOLICY, + /** + * Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as "constraints around appropriate disclosure of information about this Act, regardless of mood." + + + Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values. + */ + _ACTINFORMATIONSENSITIVITYPOLICY, + /** + * Policy for handling alcohol or drug-abuse information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to alcohol or drug-abuse information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + ETH, + /** + * Policy for handling genetic disease information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to genetic disease information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + GDIS, + /** + * Policy for handling HIV or AIDS information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to HIV or AIDS information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + HIV, + /** + * Policy for handling psychiatry information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to psychiatry information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PSY, + /** + * Policy for handling sickle cell disease information, which is afforded heightened confidentiality. Information handling protocols are based on organizational policies related to sickle cell disease information, which is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then the Act valued with this ActCode should be associated with an Act valued with any applicable laws from the ActPrivacyLaw code system. + */ + SCA, + /** + * Policy for handling sexual assault, abuse, or domestic violence information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexual assault, abuse, or domestic violence information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SDV, + /** + * Policy for handling sexuality and reproductive health information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexuality and reproductive health information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SEX, + /** + * Policy for handling sexually transmitted disease information, which will be afforded heightened confidentiality. + Information handling protocols based on organizational policies related to sexually transmitted disease information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + STD, + /** + * Policy for handling information not to be initially disclosed or discussed with patient except by a physician assigned to patient in this case. Information handling protocols based on organizational policies related to sensitive patient information that must be initially discussed with the patient by an attending physician before being disclosed to the patient. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + + + Open Issue: This definition conflates a rule and a characteristic, and there may be a similar issue with ts sibling codes. + */ + TBOO, + /** + * Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as "constraints around appropriate disclosure of information about this Act, regardless of mood." + + + Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values. + */ + SICKLE, + /** + * Types of sensitivity policies that may apply to a sensitive attribute on an Entity. + + + Usage Note: EntitySensitivity codes are used to convey a policy that is applicable to sensitive information conveyed by an entity attribute. May be used to bind a Role.confidentialityCode associated with an Entity per organizational policy. Role.confidentialityCode is defined in the RIM as "an indication of the appropriate disclosure of information about this Role with respect to the playing Entity." + */ + _ENTITYSENSITIVITYPOLICYTYPE, + /** + * Policy for handling all demographic information about an information subject, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to all demographic about an information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DEMO, + /** + * Policy for handling information related to an information subject's date of birth, which will be afforded heightened confidentiality.Policies may govern sensitivity of information related to an information subject's date of birth, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DOB, + /** + * Policy for handling information related to an information subject's gender and sexual orientation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's gender and sexual orientation, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + GENDER, + /** + * Policy for handling information related to an information subject's living arrangement, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's living arrangement, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + LIVARG, + /** + * Policy for handling information related to an information subject's marital status, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's marital status, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + MARST, + /** + * Policy for handling information related to an information subject's race, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's race, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + RACE, + /** + * Policy for handling information related to an information subject's religious affiliation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's religion, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + REL, + /** + * Types of sensitivity policies that apply to Roles. + + + Usage Notes: RoleSensitivity codes are used to bind information to a Role.confidentialityCode per organizational policy. Role.confidentialityCode is defined in the RIM as "an indication of the appropriate disclosure of information about this Role with respect to the playing Entity." + */ + _ROLEINFORMATIONSENSITIVITYPOLICY, + /** + * Policy for handling trade secrets such as financial information or intellectual property, which will be afforded heightened confidentiality. Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. + + + Usage Notes: No patient related information may ever be of this confidentiality level. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + B, + /** + * Policy for handling information related to an employer which is deemed classified to protect an employee who is the information subject, and which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to an employer, such as law enforcement or national security, the identity of which could impact the privacy, well-being, or safety of an information subject who is an employee. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + EMPL, + /** + * Policy for handling information related to the location of the information subject, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to the location of the information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + LOCIS, + /** + * Policy for handling information related to a provider of sensitive services, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to providers who deliver sensitive healthcare services in order to protect the privacy, well-being, and safety of the provider and of patients receiving sensitive services. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SSP, + /** + * Policy for handling information related to an adolescent, which will be afforded heightened confidentiality per applicable organizational or jurisdictional policy. An enterprise may have a policy that requires that adolescent patient information be provided heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: For use within an enterprise in which an adolescent is the information subject. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + ADOL, + /** + * Policy for handling information related to a celebrity (people of public interest (VIP), which will be afforded heightened confidentiality. Celebrities are people of public interest (VIP) about whose information an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive may include health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: For use within an enterprise in which the information subject is deemed a celebrity or very important person. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + CEL, + /** + * Policy for handling information related to a diagnosis, health condition or health problem, which will be afforded heightened confidentiality. Diagnostic, health condition or health problem related information may be deemed sensitive by organizational policy, and require heightened confidentiality. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to diagnostic, health condition or health problem related information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DIA, + /** + * Policy for handling information related to a drug, which will be afforded heightened confidentiality. Drug information may be deemed sensitive by organizational policy, and require heightened confidentiality. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to drug information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DRGIS, + /** + * Policy for handling information related to an employee, which will be afforded heightened confidentiality. When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: Policy for handling information related to an employee, which will be afforded heightened confidentiality. Description: When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + */ + EMP, + /** + * Policy for handling information reported by the patient about another person, e.g., a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g., family members may be deemed sensitive by default. The flag may be set or cleared on patient's request. + + + Usage Note: For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PDS, + /** + * For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to certain types of information designated by a patient as sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PRS, + /** + * This is the healthcare analog to the US Intelligence Community's concept of a Special Access Program. Compartment codes may be used in as a field value in an initiator's clearance to indicate permission to access and use an IT Resource with a security label having the same compartment value in security category label field. + + Map: Aligns with ISO 2382-8 definition of Compartment - "A division of data into isolated blocks with separate security controls for the purpose of reducing risk." + */ + COMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of human resources department or workflow. + */ + HRCOMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of a research project. + */ + RESCOMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of records management department or workflow. + */ + RMGTCOMPT, + /** + * A mandate, obligation, requirement, rule, or expectation conveyed as security metadata between senders and receivers required to establish the reliability, authenticity, and trustworthiness of their transactions. + + Trust security metadata are observation made about aspects of trust applicable to an IT resource (data, information object, service, or system capability). + + Trust applicable to IT resources is established and maintained in and among security domains, and may be comprised of observations about the domain's trust authority, trust framework, trust policy, trust interaction rules, means for assessing and monitoring adherence to trust policies, mechanisms that enforce trust, and quality and reliability measures of assurance in those mechanisms. [Based on ISO IEC 10181-1 and NIST SP 800-63-2] + + For example, identity proofing , level of assurance, and Trust Framework. + */ + ACTTRUSTPOLICYTYPE, + /** + * Type of security metadata about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRD, + /** + * Type of security metadata about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] + */ + TRSTAGRE, + /** + * Type of security metadata about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTASSUR, + /** + * Type of security metadata about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + */ + TRSTCERT, + /** + * Type of security metadata about a complete set of contracts, regulations, or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative] + */ + TRSTFWK, + /** + * Type of security metadata about a security architecture system component that supports enforcement of security policies. + */ + TRSTMEC, + /** + * Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed on benefit coverage under a policy or program by a sponsor, underwriter or payor on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A clinical protocol imposed by a payer to which a provider must adhere in order to be paid for providing the service. A formulary from which a provider must select prescribed drugs in order for the patient to incur a lower copay. + */ + COVPOL, + /** + * Types of security policies that further specify the ActClassPolicy value set. + + + Examples: + + + + obligation to encrypt + refrain from redisclosure without consent + */ + SECURITYPOLICY, + /** + * Conveys the mandated workflow action that an information custodian, receiver, or user must perform. + + + Usage Notes: Per ISO 22600-2, ObligationPolicy instances 'are event-triggered and define actions to be performed by manager agent'. Per HL7 Composite Security and Privacy Domain Analysis Model: This value set refers to the action required to receive the permission specified in the privacy rule. Per OASIS XACML, an obligation is an operation specified in a policy or policy that is performed in conjunction with the enforcement of an access control decision. + */ + OBLIGATIONPOLICY, + /** + * Custodian system must remove any information that could result in identifying the information subject. + */ + ANONY, + /** + * Custodian system must make available to an information subject upon request an accounting of certain disclosures of the individual’s protected health information over a period of time. Policy may dictate that the accounting include information about the information disclosed, the date of disclosure, the identification of the receiver, the purpose of the disclosure, the time in which the disclosing entity must provide a response and the time period for which accountings of disclosure can be requested. + */ + AOD, + /** + * Custodian system must monitor systems to ensure that all users are authorized to operate on information objects. + */ + AUDIT, + /** + * Custodian system must monitor and maintain retrievable log for each user and operation on information. + */ + AUDTR, + /** + * Custodian security system must retrieve, evaluate, and comply with the information handling directions of the Confidentiality Code associated with an information target. + */ + CPLYCC, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable information subject consent directives. + */ + CPLYCD, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable jurisdictional privacy policies associated with the target information. + */ + CPLYJPP, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable organizational privacy policies associated with the target information. + */ + CPLYOPP, + /** + * Custodian security system must retrieve, evaluate, and comply with the organizational security policies associated with the target information. + */ + CPLYOSP, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable policies associated with the target information. + */ + CPLYPOL, + /** + * Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. + */ + DEID, + /** + * Custodian system must remove target information from access after use. + */ + DELAU, + /** + * Custodian system must render information unreadable by algorithmically transforming plaintext into ciphertext. + + + + + Usage Notes: A mathematical transposition of a file or data stream so that it cannot be deciphered at the receiving end without the proper key. Encryption is a security feature that assures that only the parties who are supposed to be participating in a videoconference or data transfer are able to do so. It can include a password, public and private keys, or a complex combination of all. (Per Infoway.) + */ + ENCRYPT, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext when "at rest" or in storage. + */ + ENCRYPTR, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while "in transit" or being transported by any means. + */ + ENCRYPTT, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while in use such that operations permitted on the target information are limited by the license granted to the end user. + */ + ENCRYPTU, + /** + * Custodian system must require human review and approval for permission requested. + */ + HUAPRV, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext. User may be provided a key to decrypt per license or "shared secret". + */ + MASK, + /** + * Custodian must limit access and disclosure to the minimum information required to support an authorized user's purpose of use. + + + Usage Note: Limiting the information available for access and disclosure to that an authorized user or receiver "needs to know" in order to perform permitted workflow or purpose of use. + */ + MINEC, + /** + * Custodian must create and/or maintain human readable security label tags as required by policy. + + Map: Aligns with ISO 22600-3 Section A.3.4.3 description of privacy mark: "If present, the privacy-mark is not used for access control. The content of the privacy-mark may be defined by the security policy in force (identified by the security-policy-identifier) which may define a list of values to be used. Alternately, the value may be determined by the originator of the security-label." + */ + PRIVMARK, + /** + * Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject. + */ + PSEUD, + /** + * Custodian system must remove information, which is not authorized to be access, used, or disclosed from records made available to otherwise authorized users. + */ + REDACT, + /** + * Conveys prohibited actions which an information custodian, receiver, or user is not permitted to perform unless otherwise authorized or permitted under specified circumstances. + + + + + Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc. + */ + REFRAINPOLICY, + /** + * Prohibition on disclosure without information subject's authorization. + */ + NOAUTH, + /** + * Prohibition on collection or storage of the information. + */ + NOCOLLECT, + /** + * Prohibition on disclosure without organizational approved patient restriction. + */ + NODSCLCD, + /** + * Prohibition on disclosure without a consent directive from the information subject. + */ + NODSCLCDS, + /** + * Prohibition on Integration into other records. + */ + NOINTEGRATE, + /** + * Prohibition on disclosure except to entities on specific access list. + */ + NOLIST, + /** + * Prohibition on disclosure without an interagency service agreement or memorandum of understanding (MOU). + */ + NOMOU, + /** + * Prohibition on disclosure without organizational authorization. + */ + NOORGPOL, + /** + * Prohibition on disclosing information to patient, family or caregivers without attending provider's authorization. + + + Usage Note: The information may be labeled with the ActInformationSensitivity TBOO code, triggering application of this RefrainPolicy code as a handling caveat controlling access. + + Maps to FHIR NOPAT: Typically, this is used on an Alert resource, when the alert records information on patient abuse or non-compliance. + + FHIR print name is "keep information from patient". Maps to the French realm - code: INVISIBLE_PATIENT. + + + displayName: Document non visible par le patient + codingScheme: 1.2.250.1.213.1.1.4.13 + + French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone). + */ + NOPAT, + /** + * Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited. + */ + NOPERSISTP, + /** + * Prohibition on redisclosure without patient consent directive. + */ + NORDSCLCD, + /** + * Prohibition on redisclosure without a consent directive from the information subject. + */ + NORDSCLCDS, + /** + * Prohibition on disclosure without authorization under jurisdictional law. + */ + NORDSCLW, + /** + * Prohibition on associating de-identified or pseudonymized information with other information in a manner that could or does result in disclosing information intended to be masked. + */ + NORELINK, + /** + * Prohibition on use of the information beyond the purpose of use initially authorized. + */ + NOREUSE, + /** + * Prohibition on disclosure except to principals with access permission to specific VIP information. + */ + NOVIP, + /** + * Prohibition on disclosure except as permitted by the information originator. + */ + ORCON, + /** + * The method that a product is obtained for use by the subject of the supply act (e.g. patient). Product examples are consumable or durable goods. + */ + _ACTPRODUCTACQUISITIONCODE, + /** + * Temporary supply of a product without transfer of ownership for the product. + */ + LOAN, + /** + * Temporary supply of a product with financial compensation, without transfer of ownership for the product. + */ + RENT, + /** + * Transfer of ownership for a product. + */ + TRANSFER, + /** + * Transfer of ownership for a product for financial compensation. + */ + SALE, + /** + * Transportation of a specimen. + */ + _ACTSPECIMENTRANSPORTCODE, + /** + * Description:Specimen has been received by the participating organization/department. + */ + SREC, + /** + * Description:Specimen has been placed into storage at a participating location. + */ + SSTOR, + /** + * Description:Specimen has been put in transit to a participating receiver. + */ + STRAN, + /** + * Set of codes related to specimen treatments + */ + _ACTSPECIMENTREATMENTCODE, + /** + * The lowering of specimen pH through the addition of an acid + */ + ACID, + /** + * The act rendering alkaline by impregnating with an alkali; a conferring of alkaline qualities. + */ + ALK, + /** + * The removal of fibrin from whole blood or plasma through physical or chemical means + */ + DEFB, + /** + * The passage of a liquid through a filter, accomplished by gravity, pressure or vacuum (suction). + */ + FILT, + /** + * LDL Precipitation + */ + LDLP, + /** + * The act or process by which an acid and a base are combined in such proportions that the resulting compound is neutral. + */ + NEUT, + /** + * The addition of calcium back to a specimen after it was removed by chelating agents + */ + RECA, + /** + * The filtration of a colloidal substance through a semipermeable medium that allows only the passage of small molecules. + */ + UFIL, + /** + * Description: Describes the type of substance administration being performed. This should not be used to carry codes for identification of products. Use an associated role or entity to carry such information. + */ + _ACTSUBSTANCEADMINISTRATIONCODE, + /** + * The introduction of a drug into a subject with the intention of altering its biologic state with the intent of improving its health status. + */ + DRUG, + /** + * Description: The introduction of material into a subject with the intent of providing nutrition or other dietary supplements (e.g. minerals or vitamins). + */ + FD, + /** + * The introduction of an immunogen with the intent of stimulating an immune response, aimed at preventing subsequent infections by more viable agents. + */ + IMMUNIZ, + /** + * An additional immunization administration within a series intended to bolster or enhance immunity. + */ + BOOSTER, + /** + * The first immunization administration in a series intended to produce immunity + */ + INITIMMUNIZ, + /** + * Description: A task or action that a user may perform in a clinical information system (e.g., medication order entry, laboratory test results review, problem list entry). + */ + _ACTTASKCODE, + /** + * A clinician creates a request for a service to be performed for a given patient. + */ + OE, + /** + * A clinician creates a request for a laboratory test to be done for a given patient. + */ + LABOE, + /** + * A clinician creates a request for the administration of one or more medications to a given patient. + */ + MEDOE, + /** + * A person enters documentation about a given patient. + */ + PATDOC, + /** + * Description: A person reviews a list of known allergies of a given patient. + */ + ALLERLREV, + /** + * A clinician enters a clinical note about a given patient + */ + CLINNOTEE, + /** + * A clinician enters a diagnosis for a given patient. + */ + DIAGLISTE, + /** + * A person provides a discharge instruction to a patient. + */ + DISCHINSTE, + /** + * A clinician enters a discharge summary for a given patient. + */ + DISCHSUME, + /** + * A person provides a patient-specific education handout to a patient. + */ + PATEDUE, + /** + * A pathologist enters a report for a given patient. + */ + PATREPE, + /** + * A clinician enters a problem for a given patient. + */ + PROBLISTE, + /** + * A radiologist enters a report for a given patient. + */ + RADREPE, + /** + * Description: A person reviews a list of immunizations due or received for a given patient. + */ + IMMLREV, + /** + * Description: A person reviews a list of health care reminders for a given patient. + */ + REMLREV, + /** + * Description: A person reviews a list of wellness or preventive care reminders for a given patient. + */ + WELLREMLREV, + /** + * A person (e.g., clinician, the patient herself) reviews patient information in the electronic medical record. + */ + PATINFO, + /** + * Description: A person enters a known allergy for a given patient. + */ + ALLERLE, + /** + * A person reviews a recommendation/assessment provided automatically by a clinical decision support application for a given patient. + */ + CDSREV, + /** + * A person reviews a clinical note of a given patient. + */ + CLINNOTEREV, + /** + * A person reviews a discharge summary of a given patient. + */ + DISCHSUMREV, + /** + * A person reviews a list of diagnoses of a given patient. + */ + DIAGLISTREV, + /** + * Description: A person enters an immunization due or received for a given patient. + */ + IMMLE, + /** + * A person reviews a list of laboratory results of a given patient. + */ + LABRREV, + /** + * A person reviews a list of microbiology results of a given patient. + */ + MICRORREV, + /** + * A person reviews organisms of microbiology results of a given patient. + */ + MICROORGRREV, + /** + * A person reviews the sensitivity test of microbiology results of a given patient. + */ + MICROSENSRREV, + /** + * A person reviews a list of medication orders submitted to a given patient + */ + MLREV, + /** + * A clinician reviews a work list of medications to be administered to a given patient. + */ + MARWLREV, + /** + * A person reviews a list of orders submitted to a given patient. + */ + OREV, + /** + * A person reviews a pathology report of a given patient. + */ + PATREPREV, + /** + * A person reviews a list of problems of a given patient. + */ + PROBLISTREV, + /** + * A person reviews a radiology report of a given patient. + */ + RADREPREV, + /** + * Description: A person enters a health care reminder for a given patient. + */ + REMLE, + /** + * Description: A person enters a wellness or preventive care reminder for a given patient. + */ + WELLREMLE, + /** + * A person reviews a Risk Assessment Instrument report of a given patient. + */ + RISKASSESS, + /** + * A person reviews a Falls Risk Assessment Instrument report of a given patient. + */ + FALLRISK, + /** + * Characterizes how a transportation act was or will be carried out. + + + Examples: Via private transport, via public transit, via courier. + */ + _ACTTRANSPORTATIONMODECODE, + /** + * Definition: Characterizes how a patient was or will be transported to the site of a patient encounter. + + + Examples: Via ambulance, via public transit, on foot. + */ + _ACTPATIENTTRANSPORTATIONMODECODE, + /** + * pedestrian transport + */ + AFOOT, + /** + * ambulance transport + */ + AMBT, + /** + * fixed-wing ambulance transport + */ + AMBAIR, + /** + * ground ambulance transport + */ + AMBGRND, + /** + * helicopter ambulance transport + */ + AMBHELO, + /** + * law enforcement transport + */ + LAWENF, + /** + * private transport + */ + PRVTRN, + /** + * public transport + */ + PUBTRN, + /** + * Identifies the kinds of observations that can be performed + */ + _OBSERVATIONTYPE, + /** + * Identifies the type of observation that is made about a specimen that may affect its processing, analysis or further result interpretation + */ + _ACTSPECOBSCODE, + /** + * Describes the artificial blood identifier that is associated with the specimen. + */ + ARTBLD, + /** + * An observation that reports the dilution of a sample. + */ + DILUTION, + /** + * The dilution of a sample performed by automated equipment. The value is specified by the equipment + */ + AUTOHIGH, + /** + * The dilution of a sample performed by automated equipment. The value is specified by the equipment + */ + AUTOLOW, + /** + * The dilution of the specimen made prior to being loaded onto analytical equipment + */ + PRE, + /** + * The value of the dilution of a sample after it had been analyzed at a prior dilution value + */ + RERUN, + /** + * Domain provides codes that qualify the ActLabObsEnvfctsCode domain. (Environmental Factors) + */ + EVNFCTS, + /** + * An observation that relates to factors that may potentially cause interference with the observation + */ + INTFR, + /** + * The Fibrin Index of the specimen. In the case of only differentiating between Absent and Present, recommend using 0 and 1 + */ + FIBRIN, + /** + * An observation of the hemolysis index of the specimen in g/L + */ + HEMOLYSIS, + /** + * An observation that describes the icterus index of the specimen. It is recommended to use mMol/L of bilirubin + */ + ICTERUS, + /** + * An observation used to describe the Lipemia Index of the specimen. It is recommended to use the optical turbidity at 600 nm (in absorbance units). + */ + LIPEMIA, + /** + * An observation that reports the volume of a sample. + */ + VOLUME, + /** + * The available quantity of specimen. This is the current quantity minus any planned consumption (e.g., tests that are planned) + */ + AVAILABLE, + /** + * The quantity of specimen that is used each time the equipment uses this substance + */ + CONSUMPTION, + /** + * The current quantity of the specimen, i.e., initial quantity minus what has been actually used. + */ + CURRENT, + /** + * The initial quantity of the specimen in inventory + */ + INITIAL, + /** + * AnnotationType + */ + _ANNOTATIONTYPE, + /** + * Description:Provides a categorization for annotations recorded directly against the patient . + */ + _ACTPATIENTANNOTATIONTYPE, + /** + * Description:A note that is specific to a patient's diagnostic images, either historical, current or planned. + */ + ANNDI, + /** + * Description:A general or uncategorized note. + */ + ANNGEN, + /** + * A note that is specific to a patient's immunizations, either historical, current or planned. + */ + ANNIMM, + /** + * Description:A note that is specific to a patient's laboratory results, either historical, current or planned. + */ + ANNLAB, + /** + * Description:A note that is specific to a patient's medications, either historical, current or planned. + */ + ANNMED, + /** + * Description: None provided + */ + _GENETICOBSERVATIONTYPE, + /** + * Description: A DNA segment that contributes to phenotype/function. In the absence of demonstrated function a gene may be characterized by sequence, transcription or homology + */ + GENE, + /** + * Description: Observation codes which describe characteristics of the immunization material. + */ + _IMMUNIZATIONOBSERVATIONTYPE, + /** + * Description: Indicates the valid antigen count. + */ + OBSANTC, + /** + * Description: Indicates whether an antigen is valid or invalid. + */ + OBSANTV, + /** + * A code that is used to indicate the type of case safety report received from sender. The current code example reference is from the International Conference on Harmonisation (ICH) Expert Workgroup guideline on Clinical Safety Data Management: Data Elements for Transmission of Individual Case Safety Reports. The unknown/unavailable option allows the transmission of information from a secondary sender where the initial sender did not specify the type of report. + + Example concepts include: Spontaneous, Report from study, Other. + */ + _INDIVIDUALCASESAFETYREPORTTYPE, + /** + * Indicates that the ICSR is describing problems that a patient experienced after receiving a vaccine product. + */ + PATADVEVNT, + /** + * Indicates that the ICSR is describing a problem with the actual vaccine product such as physical defects (cloudy, particulate matter) or inability to confer immunity. + */ + VACPROBLEM, + /** + * Definition:The set of LOINC codes for the act of determining the period of time that has elapsed since an entity was born or created. + */ + _LOINCOBSERVATIONACTCONTEXTAGETYPE, + /** + * Definition:Estimated age. + */ + _216119, + /** + * Definition:Reported age. + */ + _216127, + /** + * Definition:Calculated age. + */ + _295535, + /** + * Definition:General specification of age with no implied method of determination. + */ + _305250, + /** + * Definition:Age at onset of associated adverse event; no implied method of determination. + */ + _309724, + /** + * MedicationObservationType + */ + _MEDICATIONOBSERVATIONTYPE, + /** + * Description:This observation represents an 'average' or 'expected' half-life typical of the product. + */ + REPHALFLIFE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, indicating whether it has one or more coatings such as sugar coating, film coating, or enteric coating. Only coatings to the external surface or the dosage form should be considered (for example, coatings to individual pellets or granules inside a capsule or tablet are excluded from consideration). + + + Constraints: The Observation.value must be a Boolean (BL) with true for the presence or false for the absence of one or more coatings on a solid dosage form. + */ + SPLCOATING, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the color or colors that most predominantly define the appearance of the dose form. SPLCOLOR is not an FDA specification for the actual color of solid dosage forms or the names of colors that can appear in labeling. + + + Constraints: The Observation.value must be a single coded value or a list of multiple coded values, specifying one or more distinct colors that approximate of the color(s) of distinct areas of the solid dosage form, such as the different sides of a tablet or one-part capsule, or the different halves of a two-part capsule. Bands on banded capsules, regardless of the color, are not considered when assigning an SPLCOLOR. Imprints on the dosage form, regardless of their color are not considered when assigning an SPLCOLOR. If more than one color exists on a particular side or half, then the most predominant color on that side or half is recorded. If the gelatin capsule shell is colorless and transparent, use the predominant color of the contents that appears through the colorless and transparent capsule shell. Colors can include: Black;Gray;White;Red;Pink;Purple;Green;Yellow;Orange;Brown;Blue;Turquoise. + */ + SPLCOLOR, + /** + * Description: A characteristic representing a single file reference that contains two or more views of the same dosage form of the product; in most cases this should represent front and back views of the dosage form, but occasionally additional views might be needed in order to capture all of the important physical characteristics of the dosage form. Any imprint and/or symbol should be clearly identifiable, and the viewer should not normally need to rotate the image in order to read it. Images that are submitted with SPL should be included in the same directory as the SPL file. + */ + SPLIMAGE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the alphanumeric text that appears on the solid dosage form, including text that is embossed, debossed, engraved or printed with ink. The presence of other non-textual distinguishing marks or symbols is recorded by SPLSYMBOL. + + + Examples: Included in SPLIMPRINT are alphanumeric text that appears on the bands of banded capsules and logos and other symbols that can be interpreted as letters or numbers. + + + Constraints: The Observation.value must be of type Character String (ST). Excluded from SPLIMPRINT are internal and external cut-outs in the form of alphanumeric text and the letter 'R' with a circle around it (when referring to a registered trademark) and the letters 'TM' (when referring to a 'trade mark'). To record text, begin on either side or part of the dosage form. Start at the top left and progress as one would normally read a book. Enter a semicolon to show separation between words or line divisions. + */ + SPLIMPRINT, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the number of equal pieces that the solid dosage form can be divided into using score line(s). + + + Example: One score line creating two equal pieces is given a value of 2, two parallel score lines creating three equal pieces is given a value of 3. + + + Constraints: Whether three parallel score lines create four equal pieces or two intersecting score lines create two equal pieces using one score line and four equal pieces using both score lines, both have the scoring value of 4. Solid dosage forms that are not scored are given a value of 1. Solid dosage forms that can only be divided into unequal pieces are given a null-value with nullFlavor other (OTH). + */ + SPLSCORING, + /** + * Description: A characteristic of an oral solid dosage form of a medicinal product, specifying the two dimensional representation of the solid dose form, in terms of the outside perimeter of a solid dosage form when the dosage form, resting on a flat surface, is viewed from directly above, including slight rounding of corners. SPLSHAPE does not include embossing, scoring, debossing, or internal cut-outs. SPLSHAPE is independent of the orientation of the imprint and logo. Shapes can include: Triangle (3 sided); Square; Round; Semicircle; Pentagon (5 sided); Diamond; Double circle; Bullet; Hexagon (6 sided); Rectangle; Gear; Capsule; Heptagon (7 sided); Trapezoid; Oval; Clover; Octagon (8 sided); Tear; Freeform. + */ + SPLSHAPE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g., 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter. + + + Example: SPLSIZE for a rectangular shaped tablet is the length and SPLSIZE for a round shaped tablet is the diameter. + */ + SPLSIZE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, to describe whether or not the medicinal product has a mark or symbol appearing on it for easy and definite recognition. Score lines, letters, numbers, and internal and external cut-outs are not considered marks or symbols. See SPLSCORING and SPLIMPRINT for these characteristics. + + + Constraints: The Observation.value must be a Boolean (BL) with true indicating the presence and false for the absence of marks or symbols. + + + Example: + */ + SPLSYMBOL, + /** + * Distinguishes the kinds of coded observations that could be the trigger for clinical issue detection. These are observations that are not measurable, but instead can be defined with codes. Coded observation types include: Allergy, Intolerance, Medical Condition, Pregnancy status, etc. + */ + _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE, + /** + * Code for the mechanism by which disease was acquired by the living subject involved in the public health case. Includes sexually transmitted, airborne, bloodborne, vectorborne, foodborne, zoonotic, nosocomial, mechanical, dermal, congenital, environmental exposure, indeterminate. + */ + _CASETRANSMISSIONMODE, + /** + * Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation. + */ + AIRTRNS, + /** + * Communication of an agent from one animal to another proximate animal. + */ + ANANTRNS, + /** + * Communication of an agent from an animal to a proximate person. + */ + ANHUMTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with any body fluid. + */ + BDYFLDTRNS, + /** + * Communication of an agent to a living subject through direct contact with blood or blood products whether the contact with blood is part of a therapeutic procedure or not. + */ + BLDTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject via agent migration through intact skin. + */ + DERMTRNS, + /** + * Communication of an agent from an environmental surface or source to a living subject by direct contact. + */ + ENVTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject through oral contact with material contaminated by person or animal fecal material. + */ + FECTRNS, + /** + * Communication of an agent from an non-living material to a living subject through direct contact. + */ + FOMTRNS, + /** + * Communication of an agent from a food source to a living subject via oral consumption. + */ + FOODTRNS, + /** + * Communication of an agent from a person to a proximate person. + */ + HUMHUMTRNS, + /** + * Communication of an agent to a living subject via an undetermined route. + */ + INDTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with mammalian milk or colostrum. + */ + LACTTRNS, + /** + * Communication of an agent from any entity to a living subject while the living subject is in the patient role in a healthcare facility. + */ + NOSTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject where the acquisition of the agent is not via the alimentary canal. + */ + PARTRNS, + /** + * Communication of an agent from a living subject to the progeny of that living subject via agent migration across the maternal-fetal placental membranes while in utero. + */ + PLACTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with genital or oral tissues as part of a sexual act. + */ + SEXTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with blood or blood products where the contact with blood is part of a therapeutic procedure. + */ + TRNSFTRNS, + /** + * Communication of an agent from a living subject acting as a required intermediary in the agent transmission process to a recipient living subject via direct contact. + */ + VECTRNS, + /** + * Communication of an agent from a contaminated water source to a living subject whether the water is ingested as a food or not. The route of entry of the water may be through any bodily orifice. + */ + WATTRNS, + /** + * Codes used to define various metadata aspects of a health quality measure. + */ + _OBSERVATIONQUALITYMEASUREATTRIBUTE, + /** + * Indicates that the observation is carrying out an aggregation calculation, contained in the value element. + */ + AGGREGATE, + /** + * Identifies the organization(s) who own the intellectual property represented by the eMeasure. + */ + COPY, + /** + * Summary of relevant clinical guidelines or other clinical recommendations supporting this eMeasure. + */ + CRS, + /** + * Description of individual terms, provided as needed. + */ + DEF, + /** + * Disclaimer information for the eMeasure. + */ + DISC, + /** + * The timestamp when the eMeasure was last packaged in the Measure Authoring Tool. + */ + FINALDT, + /** + * Used to allow measure developers to provide additional guidance for implementers to understand greater specificity than could be provided in the logic for data criteria. + */ + GUIDE, + /** + * Information on whether an increase or decrease in score is the preferred result +(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range). + */ + IDUR, + /** + * Describes the items counted by the measure (e.g., patients, encounters, procedures, etc.) + */ + ITMCNT, + /** + * A significant word that aids in discoverability. + */ + KEY, + /** + * The end date of the measurement period. + */ + MEDT, + /** + * The start date of the measurement period. + */ + MSD, + /** + * The method of adjusting for clinical severity and conditions present at the start of care that can influence patient outcomes for making valid comparisons of outcome measures across providers. Indicates whether an eMeasure is subject to the statistical process for reducing, removing, or clarifying the influences of confounding factors to allow more useful comparisons. + */ + MSRADJ, + /** + * Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). + + + Open Issue: The description does NOT align well with the definition used in the HQMF specfication; correct the MSGAGG definition, and the possible distinction of MSRAGG as a child of AGGREGATE. + */ + MSRAGG, + /** + * Information on whether an increase or decrease in score is the preferred result. This should reflect information on which way is better, an increase or decrease in score. + */ + MSRIMPROV, + /** + * The list of jurisdiction(s) for which the measure applies. + */ + MSRJUR, + /** + * Type of person or organization that is expected to report the issue. + */ + MSRRPTR, + /** + * The maximum time that may elapse following completion of the measure until the measure report must be sent to the receiver. + */ + MSRRPTTIME, + /** + * Indicates how the calculation is performed for the eMeasure +(e.g., proportion, continuous variable, ratio) + */ + MSRSCORE, + /** + * Location(s) in which care being measured is rendered + + Usage Note: MSRSET is used rather than RoleCode because the setting applies to what is being measured, as opposed to participating directly in the health quality measure documantion itself). + */ + MSRSET, + /** + * health quality measure topic type + */ + MSRTOPIC, + /** + * The time period for which the eMeasure applies. + */ + MSRTP, + /** + * Indicates whether the eMeasure is used to examine a process or an outcome over time +(e.g., Structure, Process, Outcome). + */ + MSRTYPE, + /** + * Succinct statement of the need for the measure. Usually includes statements pertaining to Importance criterion: impact, gap in care and evidence. + */ + RAT, + /** + * Identifies bibliographic citations or references to clinical practice guidelines, sources of evidence, or other relevant materials supporting the intent and rationale of the eMeasure. + */ + REF, + /** + * Comparison of results across strata can be used to show where disparities exist or where there is a need to expose differences in results. For example, Centers for Medicare & Medicaid Services (CMS) in the U.S. defines four required Supplemental Data Elements (payer, ethnicity, race, and gender), which are variables used to aggregate data into various subgroups. Additional supplemental data elements required for risk adjustment or other purposes of data aggregation can be included in the Supplemental Data Element section. + */ + SDE, + /** + * Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g., evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g., evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units]). + */ + STRAT, + /** + * Can be a URL or hyperlinks that link to the transmission formats that are specified for a particular reporting program. + */ + TRANF, + /** + * Usage notes. + */ + USE, + /** + * ObservationSequenceType + */ + _OBSERVATIONSEQUENCETYPE, + /** + * A sequence of values in the "absolute" time domain. This is the same time domain that all HL7 timestamps use. It is time as measured by the Gregorian calendar + */ + TIMEABSOLUTE, + /** + * A sequence of values in a "relative" time domain. The time is measured relative to the earliest effective time in the Observation Series containing this sequence. + */ + TIMERELATIVE, + /** + * ObservationSeriesType + */ + _OBSERVATIONSERIESTYPE, + /** + * ECGObservationSeriesType + */ + _ECGOBSERVATIONSERIESTYPE, + /** + * This Observation Series type contains waveforms of a "representative beat" (a.k.a. "median beat" or "average beat"). The waveform samples are measured in relative time, relative to the beginning of the beat as defined by the Observation Series effective time. The waveforms are not directly acquired from the subject, but rather algorithmically derived from the "rhythm" waveforms. + */ + REPRESENTATIVEBEAT, + /** + * This Observation type contains ECG "rhythm" waveforms. The waveform samples are measured in absolute time (a.k.a. "subject time" or "effective time"). These waveforms are usually "raw" with some minimal amount of noise reduction and baseline filtering applied. + */ + RHYTHM, + /** + * Description: Reporting codes that are related to an immunization event. + */ + _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE, + /** + * Description: The class room associated with the patient during the immunization event. + */ + CLSSRM, + /** + * Description: The school grade or level the patient was in when immunized. + */ + GRADE, + /** + * Description: The school the patient attended when immunized. + */ + SCHL, + /** + * Description: The school division or district associated with the patient during the immunization event. + */ + SCHLDIV, + /** + * Description: The patient's teacher when immunized. + */ + TEACHER, + /** + * Observation types for specifying criteria used to assert that a subject is included in a particular population. + */ + _POPULATIONINCLUSIONOBSERVATIONTYPE, + /** + * Criteria which specify subjects who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. + */ + DENEX, + /** + * Criteria which specify the removal of a subject, procedure or unit of measurement from the denominator, only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories: + + + Medical reasons + Patient (or subject) reasons + System reasons + */ + DENEXCEP, + /** + * Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). The denominator can be the same as the initial population, or it may be a subset of the initial population to further constrain it for the purpose of the eMeasure. Different measures within an eMeasure set may have different denominators. Continuous Variable eMeasures do not have a denominator, but instead define a measure population. + */ + DENOM, + /** + * Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). + */ + IPOP, + /** + * Criteria for specifying the patients to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods. + */ + IPPOP, + /** + * Criteria for specifying +the measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures. + */ + MSRPOPL, + /** + * Criteria for specifying subjects who should be removed from the eMeasure's Initial Population and Measure Population. Measure Population Exclusions are used in Continuous Variable measures to help narrow the Measure Population before determining the value(s) of the continuous variable(s). + */ + MSRPOPLEX, + /** + * Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + */ + NUMER, + /** + * Criteria for specifying instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures. + */ + NUMEX, + /** + * Types of observations that can be made about Preferences. + */ + _PREFERENCEOBSERVATIONTYPE, + /** + * An observation about how important a preference is to the target of the preference. + */ + PREFSTRENGTH, + /** + * Indicates that the observation is of an unexpected negative occurrence in the subject suspected to result from the subject's exposure to one or more agents. Observation values would be the symptom resulting from the reaction. + */ + ADVERSEREACTION, + /** + * Description:Refines classCode OBS to indicate an observation in which observation.value contains a finding or other nominalized statement, where the encoded information in Observation.value is not altered by Observation.code. For instance, observation.code="ASSERTION" and observation.value="fracture of femur present" is an assertion of a clinical finding of femur fracture. + */ + ASSERTION, + /** + * Definition:An observation that provides a characterization of the level of harm to an investigation subject as a result of a reaction or event. + */ + CASESER, + /** + * An observation that states whether the disease was likely acquired outside the jurisdiction of observation, and if so, the nature of the inter-jurisdictional relationship. + + + OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it. + */ + CDIO, + /** + * A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality. + */ + CRIT, + /** + * An observation that states the mechanism by which disease was acquired by the living subject involved in the public health case. + + + OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it. + */ + CTMO, + /** + * Includes all codes defining types of indications such as diagnosis, symptom and other indications such as contrast agents for lab tests. + */ + DX, + /** + * Admitting diagnosis are the diagnoses documented for administrative purposes as the basis for a hospital admission. + */ + ADMDX, + /** + * Discharge diagnosis are the diagnoses documented for administrative purposes as the time of hospital discharge. + */ + DISDX, + /** + * Intermediate diagnoses are those diagnoses documented for administrative purposes during the course of a hospital stay. + */ + INTDX, + /** + * The type of injury that the injury coding specifies. + */ + NOI, + /** + * Description: Accuracy determined as per the GIS tier code system. + */ + GISTIER, + /** + * Indicates that the observation is of a person’s living situation in a household including the household composition and circumstances. + */ + HHOBS, + /** + * There is a clinical issue for the therapy that makes continuation of the therapy inappropriate. + + + Open Issue: The definition of this code does not correctly represent the concept space of its specializations (children) + */ + ISSUE, + /** + * Identifies types of detectyed issues for Act class "ALRT" for the administrative and patient administrative acts domains. + */ + _ACTADMINISTRATIVEDETECTEDISSUECODE, + /** + * ActAdministrativeAuthorizationDetectedIssueCode + */ + _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE, + /** + * The requesting party has insufficient authorization to invoke the interaction. + */ + NAT, + /** + * Description: One or more records in the query response have been suppressed due to consent or privacy restrictions. + */ + SUPPRESSED, + /** + * Description:The specified element did not pass business-rule validation. + */ + VALIDAT, + /** + * The ID of the patient, order, etc., was not found. Used for transactions other than additions, e.g. transfer of a non-existent patient. + */ + KEY204, + /** + * The ID of the patient, order, etc., already exists. Used in response to addition transactions (Admit, New Order, etc.). + */ + KEY205, + /** + * There may be an issue with the patient complying with the intentions of the proposed therapy + */ + COMPLY, + /** + * The proposed therapy appears to duplicate an existing therapy + */ + DUPTHPY, + /** + * Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy, though the specific mechanisms of action vary. + */ + DUPTHPCLS, + /** + * Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy and uses the same mechanisms of action as the existing therapy. + */ + DUPTHPGEN, + /** + * Description:The proposed therapy is frequently misused or abused and therefore should be used with caution and/or monitoring. + */ + ABUSE, + /** + * Description:The request is suspected to have a fraudulent basis. + */ + FRAUD, + /** + * A similar or identical therapy was recently ordered by a different practitioner. + */ + PLYDOC, + /** + * This patient was recently supplied a similar or identical therapy from a different pharmacy or supplier. + */ + PLYPHRM, + /** + * Proposed dosage instructions for therapy differ from standard practice. + */ + DOSE, + /** + * Description:Proposed dosage is inappropriate due to patient's medical condition. + */ + DOSECOND, + /** + * Proposed length of therapy differs from standard practice. + */ + DOSEDUR, + /** + * Proposed length of therapy is longer than standard practice + */ + DOSEDURH, + /** + * Proposed length of therapy is longer than standard practice for the identified indication or diagnosis + */ + DOSEDURHIND, + /** + * Proposed length of therapy is shorter than that necessary for therapeutic effect + */ + DOSEDURL, + /** + * Proposed length of therapy is shorter than standard practice for the identified indication or diagnosis + */ + DOSEDURLIND, + /** + * Proposed dosage exceeds standard practice + */ + DOSEH, + /** + * Proposed dosage exceeds standard practice for the patient's age + */ + DOSEHINDA, + /** + * High Dose for Indication Alert + */ + DOSEHIND, + /** + * Proposed dosage exceeds standard practice for the patient's height or body surface area + */ + DOSEHINDSA, + /** + * Proposed dosage exceeds standard practice for the patient's weight + */ + DOSEHINDW, + /** + * Proposed dosage interval/timing differs from standard practice + */ + DOSEIVL, + /** + * Proposed dosage interval/timing differs from standard practice for the identified indication or diagnosis + */ + DOSEIVLIND, + /** + * Proposed dosage is below suggested therapeutic levels + */ + DOSEL, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's age + */ + DOSELINDA, + /** + * Low Dose for Indication Alert + */ + DOSELIND, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's height or body surface area + */ + DOSELINDSA, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's weight + */ + DOSELINDW, + /** + * Description:The maximum quantity of this drug allowed to be administered within a particular time-range (month, year, lifetime) has been reached or exceeded. + */ + MDOSE, + /** + * Proposed therapy may be inappropriate or contraindicated due to conditions or characteristics of the patient + */ + OBSA, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient age + */ + AGE, + /** + * Proposed therapy is outside of the standard practice for an adult patient. + */ + ADALRT, + /** + * Proposed therapy is outside of standard practice for a geriatric patient. + */ + GEALRT, + /** + * Proposed therapy is outside of the standard practice for a pediatric patient. + */ + PEALRT, + /** + * Proposed therapy may be inappropriate or contraindicated due to an existing/recent patient condition or diagnosis + */ + COND, + /** + * null + */ + HGHT, + /** + * Proposed therapy may be inappropriate or contraindicated when breast-feeding + */ + LACT, + /** + * Proposed therapy may be inappropriate or contraindicated during pregnancy + */ + PREG, + /** + * null + */ + WGHT, + /** + * Description:Proposed therapy may be inappropriate or contraindicated because of a common but non-patient specific reaction to the product. + + + Example:There is no record of a specific sensitivity for the patient, but the presence of the sensitivity is common and therefore caution is warranted. + */ + CREACT, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient genetic indicators. + */ + GEN, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient gender. + */ + GEND, + /** + * Proposed therapy may be inappropriate or contraindicated due to recent lab test results + */ + LAB, + /** + * Proposed therapy may be inappropriate or contraindicated based on the potential for a patient reaction to the proposed product + */ + REACT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to the proposed product. (Allergies are immune based reactions.) + */ + ALGY, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to the proposed product. (Intolerances are non-immune based sensitivities.) + */ + INT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a potential patient reaction to a cross-sensitivity related product. + */ + RREACT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to a cross-sensitivity related product. (Allergies are immune based reactions.) + */ + RALG, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded prior adverse reaction to a cross-sensitivity related product. + */ + RAR, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to a cross-sensitivity related product. (Intolerances are non-immune based sensitivities.) + */ + RINT, + /** + * Description:A local business rule relating multiple elements has been violated. + */ + BUS, + /** + * Description:The specified code is not valid against the list of codes allowed for the element. + */ + CODEINVAL, + /** + * Description:The specified code has been deprecated and should no longer be used. Select another code from the code system. + */ + CODEDEPREC, + /** + * Description:The element does not follow the formatting or type rules defined for the field. + */ + FORMAT, + /** + * Description:The request is missing elements or contains elements which cause it to not meet the legal standards for actioning. + */ + ILLEGAL, + /** + * Description:The length of the data specified falls out of the range defined for the element. + */ + LENRANGE, + /** + * Description:The length of the data specified is greater than the maximum length defined for the element. + */ + LENLONG, + /** + * Description:The length of the data specified is less than the minimum length defined for the element. + */ + LENSHORT, + /** + * Description:The specified element must be specified with a non-null value under certain conditions. In this case, the conditions are true but the element is still missing or null. + */ + MISSCOND, + /** + * Description:The specified element is mandatory and was not included in the instance. + */ + MISSMAND, + /** + * Description:More than one element with the same value exists in the set. Duplicates not permission in this set in a set. + */ + NODUPS, + /** + * Description: Element in submitted message will not persist in data storage based on detected issue. + */ + NOPERSIST, + /** + * Description:The number of repeating elements falls outside the range of the allowed number of repetitions. + */ + REPRANGE, + /** + * Description:The number of repeating elements is above the maximum number of repetitions allowed. + */ + MAXOCCURS, + /** + * Description:The number of repeating elements is below the minimum number of repetitions allowed. + */ + MINOCCURS, + /** + * ActAdministrativeRuleDetectedIssueCode + */ + _ACTADMINISTRATIVERULEDETECTEDISSUECODE, + /** + * Description: Metadata associated with the identification (e.g. name or gender) does not match the identification being verified. + */ + KEY206, + /** + * Description: One or more records in the query response have a status of 'obsolete'. + */ + OBSOLETE, + /** + * Identifies types of detected issues regarding the administration or supply of an item to a patient. + */ + _ACTSUPPLIEDITEMDETECTEDISSUECODE, + /** + * Administration of the proposed therapy may be inappropriate or contraindicated as proposed + */ + _ADMINISTRATIONDETECTEDISSUECODE, + /** + * AppropriatenessDetectedIssueCode + */ + _APPROPRIATENESSDETECTEDISSUECODE, + /** + * InteractionDetectedIssueCode + */ + _INTERACTIONDETECTEDISSUECODE, + /** + * Proposed therapy may interact with certain foods + */ + FOOD, + /** + * Proposed therapy may interact with an existing or recent therapeutic product + */ + TPROD, + /** + * Proposed therapy may interact with an existing or recent drug therapy + */ + DRG, + /** + * Proposed therapy may interact with existing or recent natural health product therapy + */ + NHP, + /** + * Proposed therapy may interact with a non-prescription drug (e.g. alcohol, tobacco, Aspirin) + */ + NONRX, + /** + * Definition:The same or similar treatment has previously been attempted with the patient without achieving a positive effect. + */ + PREVINEF, + /** + * Description:Proposed therapy may be contraindicated or ineffective based on an existing or recent drug therapy. + */ + DACT, + /** + * Description:Proposed therapy may be inappropriate or ineffective based on the proposed start or end time. + */ + TIME, + /** + * Definition:Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy. + */ + ALRTENDLATE, + /** + * Definition:Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition. + */ + ALRTSTRTLATE, + /** + * Proposed therapy may be inappropriate or ineffective based on the proposed start or end time. + */ + _TIMINGDETECTEDISSUECODE, + /** + * Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy + */ + ENDLATE, + /** + * Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition + */ + STRTLATE, + /** + * Supplying the product at this time may be inappropriate or indicate compliance issues with the associated therapy + */ + _SUPPLYDETECTEDISSUECODE, + /** + * Definition:The requested action has already been performed and so this request has no effect + */ + ALLDONE, + /** + * Definition:The therapy being performed is in some way out of alignment with the requested therapy. + */ + FULFIL, + /** + * Definition:The status of the request being fulfilled has changed such that it is no longer actionable. This may be because the request has expired, has already been completely fulfilled or has been otherwise stopped or disabled. (Not used for 'suspended' orders.) + */ + NOTACTN, + /** + * Definition:The therapy being performed is not sufficiently equivalent to the therapy which was requested. + */ + NOTEQUIV, + /** + * Definition:The therapy being performed is not generically equivalent (having the identical biological action) to the therapy which was requested. + */ + NOTEQUIVGEN, + /** + * Definition:The therapy being performed is not therapeutically equivalent (having the same overall patient effect) to the therapy which was requested. + */ + NOTEQUIVTHER, + /** + * Definition:The therapy is being performed at a time which diverges from the time the therapy was requested + */ + TIMING, + /** + * Definition:The therapy action is being performed outside the bounds of the time period requested + */ + INTERVAL, + /** + * Definition:The therapy action is being performed too soon after the previous occurrence based on the requested frequency + */ + MINFREQ, + /** + * Definition:There should be no actions taken in fulfillment of a request that has been held or suspended. + */ + HELD, + /** + * The patient is receiving a subsequent fill significantly later than would be expected based on the amount previously supplied and the therapy dosage instructions + */ + TOOLATE, + /** + * The patient is receiving a subsequent fill significantly earlier than would be expected based on the amount previously supplied and the therapy dosage instructions + */ + TOOSOON, + /** + * Description: While the record was accepted in the repository, there is a more recent version of a record of this type. + */ + HISTORIC, + /** + * Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. + */ + PATPREF, + /** + * Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. An alternate therapy meeting those constraints is available. + */ + PATPREFALT, + /** + * Categorization of types of observation that capture the main clinical knowledge subject which may be a medication, a laboratory test, a disease. + */ + KSUBJ, + /** + * Categorization of types of observation that capture a knowledge subtopic which might be treatment, etiology, or prognosis. + */ + KSUBT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to an agent. + */ + OINT, + /** + * Hypersensitivity to an agent caused by an immunologic response to an initial exposure + */ + ALG, + /** + * An allergy to a pharmaceutical product. + */ + DALG, + /** + * An allergy to a substance other than a drug or a food. E.g. Latex, pollen, etc. + */ + EALG, + /** + * An allergy to a substance generally consumed for nutritional purposes. + */ + FALG, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to a drug. + */ + DINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + DNAINT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to environmental conditions. + */ + EINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + ENAINT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to food. + */ + FINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + FNAINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + NAINT, + /** + * A subjective evaluation of the seriousness or intensity associated with another observation. + */ + SEV, + /** + * FDA label data + */ + _FDALABELDATA, + /** + * FDA label coating + */ + FDACOATING, + /** + * FDA label color + */ + FDACOLOR, + /** + * FDA label imprint code + */ + FDAIMPRINTCD, + /** + * FDA label logo + */ + FDALOGO, + /** + * FDA label scoring + */ + FDASCORING, + /** + * FDA label shape + */ + FDASHAPE, + /** + * FDA label size + */ + FDASIZE, + /** + * Shape of the region on the object being referenced + */ + _ROIOVERLAYSHAPE, + /** + * A circle defined by two (column,row) pairs. The first point is the center of the circle and the second point is a point on the perimeter of the circle. + */ + CIRCLE, + /** + * An ellipse defined by four (column,row) pairs, the first two points specifying the endpoints of the major axis and the second two points specifying the endpoints of the minor axis. + */ + ELLIPSE, + /** + * A single point denoted by a single (column,row) pair, or multiple points each denoted by a (column,row) pair. + */ + POINT, + /** + * A series of connected line segments with ordered vertices denoted by (column,row) pairs; if the first and last vertices are the same, it is a closed polygon. + */ + POLY, + /** + * Description:Indicates that result data has been corrected. + */ + C, + /** + * Code set to define specialized/allowed diets + */ + DIET, + /** + * A diet exclusively composed of oatmeal, semolina, or rice, to be extremely easy to eat and digest. + */ + BR, + /** + * A diet that uses carbohydrates sparingly. Typically with a restriction in daily energy content (e.g. 1600-2000 kcal). + */ + DM, + /** + * No enteral intake of foot or liquids whatsoever, no smoking. Typically 6 to 8 hours before anesthesia. + */ + FAST, + /** + * A diet consisting of a formula feeding, either for an infant or an adult, to provide nutrition either orally or through the gastrointestinal tract via tube, catheter or stoma. + */ + FORMULA, + /** + * Gluten free diet for celiac disease. + */ + GF, + /** + * A diet low in fat, particularly to patients with hepatic diseases. + */ + LF, + /** + * A low protein diet for patients with renal failure. + */ + LP, + /** + * A strictly liquid diet, that can be fully absorbed in the intestine, and therefore may not contain fiber. Used before enteral surgeries. + */ + LQ, + /** + * A diet low in sodium for patients with congestive heart failure and/or renal failure. + */ + LS, + /** + * A normal diet, i.e. no special preparations or restrictions for medical reasons. This is notwithstanding any preferences the patient might have regarding special foods, such as vegetarian, kosher, etc. + */ + N, + /** + * A no fat diet for acute hepatic diseases. + */ + NF, + /** + * Phenylketonuria diet. + */ + PAF, + /** + * Patient is supplied with parenteral nutrition, typically described in terms of i.v. medications. + */ + PAR, + /** + * A diet that seeks to reduce body fat, typically low energy content (800-1600 kcal). + */ + RD, + /** + * A diet that avoids ingredients that might cause digestion problems, e.g., avoid excessive fat, avoid too much fiber (cabbage, peas, beans). + */ + SCH, + /** + * A diet that is not intended to be complete but is added to other diets. + */ + SUPPLEMENT, + /** + * This is not really a diet, since it contains little nutritional value, but is essentially just water. Used before coloscopy examinations. + */ + T, + /** + * Diet with low content of the amino-acids valin, leucin, and isoleucin, for "maple syrup disease." + */ + VLI, + /** + * Definition: A public or government health program that administers and funds coverage for prescription drugs to assist program eligible who meet financial and health status criteria. + */ + DRUGPRG, + /** + * Description:Indicates that a result is complete. No further results are to come. This maps to the 'complete' state in the observation result status code. + */ + F, + /** + * Description:Indicates that a result is incomplete. There are further results to come. This maps to the 'active' state in the observation result status code. + */ + PRLMN, + /** + * An observation identifying security metadata about an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security metadata are used to name security labels. + + + Rationale: According to ISO/TS 22600-3:2009(E) A.9.1.7 SECURITY LABEL MATCHING, Security label matching compares the initiator's clearance to the target's security label. All of the following must be true for authorization to be granted: + + + The security policy identifiers shall be identical + The classification level of the initiator shall be greater than or equal to that of the target (that is, there shall be at least one value in the classification list of the clearance greater than or equal to the classification of the target), and + For each security category in the target label, there shall be a security category of the same type in the initiator's clearance and the initiator's classification level shall dominate that of the target. + + + Examples: SecurityObservationType security label fields include: + + + Confidentiality classification + Compartment category + Sensitivity category + Security mechanisms used to ensure data integrity or to perform authorized data transformation + Indicators of an IT resource completeness, veracity, reliability, trustworthiness, or provenance. + + + Usage Note: SecurityObservationType codes designate security label field types, which are valued with an applicable SecurityObservationValue code as the "security label tag". + */ + SECOBS, + /** + * Type of security metadata observation made about the category of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security category metadata is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: "A nonhierarchical grouping of sensitive information used to control access to data more finely than with hierarchical security classification alone." + + + Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g., privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199] + + + Examples: Types of security categories include: + + + Compartment: A division of data into isolated blocks with separate security controls for the purpose of reducing risk. (ISO 2382-8). A security label tag that "segments" an IT resource by indicating that access and use is restricted to members of a defined community or project. (HL7 Healthcare Classification System) + Sensitivity: The characteristic of an IT resource which implies its value or importance and may include its vulnerability. (ISO 7492-2) Privacy metadata for information perceived as undesirable to share. (HL7 Healthcare Classification System) + */ + SECCATOBS, + /** + * Type of security metadata observation made about the classification of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security classification is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: "The determination of which specific degree of protection against access the data or information requires, together with a designation of that degree of protection." Security classification metadata is based on an analysis of applicable policies and the risk of financial, reputational, or other harm that could result from unauthorized disclosure. + + + Rationale: A security classification observation may indicate that the confidentiality level indicated by an Act or Role confidentiality attribute has been overridden by the entity responsible for ascribing the SecurityClassificationObservationValue. This supports the business requirement for increasing or decreasing the level of confidentiality (classification or declassification) based on parameters beyond the original assignment of an Act or Role confidentiality. + + + Examples: Types of security classification include: HL7 Confidentiality Codes such as very restricted, unrestricted, and normal. Intelligence community examples include top secret, secret, and confidential. + + + Usage Note: Security classification observation type codes designate security label field types, which are valued with an applicable SecurityClassificationObservationValue code as the "security label tag". + */ + SECCLASSOBS, + /** + * Type of security metadata observation made about the control of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security control metadata convey instructions to users and receivers for secure distribution, transmission, and storage; dictate obligations or mandated actions; specify any action prohibited by refrain policy such as dissemination controls; and stipulate the permissible purpose of use of an IT resource. + + + Rationale: A security control observation supports requirement to specify applicable management, operational, and technical controls (i.e., safeguards or countermeasures) prescribed for an information system to protect the confidentiality, integrity, and availability of the system and its information. [FIPS 199] + + + Examples: Types of security control metadata include: + + + handling caveats + dissemination controls + obligations + refrain policies + purpose of use constraints + */ + SECCONOBS, + /** + * Type of security metadata observation made about the integrity of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. + + + Rationale: A security integrity observation supports the requirement to guard against improper information modification or destruction, and includes ensuring information non-repudiation and authenticity. (44 U.S.C., SEC. 3542) + + + Examples: Types of security integrity metadata include: + + + Integrity status, which indicates the completeness or workflow status of an IT resource (data, information object, service, or system capability) + Integrity confidence, which indicates the reliability and trustworthiness of an IT resource + Integrity control, which indicates pertinent handling caveats, obligations, refrain policies, and purpose of use for the resource + Data integrity, which indicate the security mechanisms used to ensure that the accuracy and consistency are preserved regardless of changes made (ISO/IEC DIS 2382-8) + Alteration integrity, which indicate the security mechanisms used for authorized transformations of the resource + Integrity provenance, which indicates the entity responsible for a report or assertion relayed "second-hand" about an IT resource + */ + SECINTOBS, + /** + * Type of security metadata observation made about the alteration integrity of an IT resource (data, information object, service, or system capability), which indicates the mechanism used for authorized transformations of the resource. + + + Examples: Types of security alteration integrity observation metadata, which may value the observation with a code used to indicate the mechanism used for authorized transformation of an IT resource, including: + + + translation + syntactic transformation + semantic mapping + redaction + masking + pseudonymization + anonymization + */ + SECALTINTOBS, + /** + * Type of security metadata observation made about the data integrity of an IT resource (data, information object, service, or system capability), which indicates the security mechanism used to preserve resource accuracy and consistency. Data integrity is defined by ISO 22600-23.3.21 as: "The property that data has not been altered or destroyed in an unauthorized manner", and by ISO/IEC 2382-8: The property of data whose accuracy and consistency are preserved regardless of changes made." + + + Examples: Types of security data integrity observation metadata, which may value the observation, include cryptographic hash function and digital signature. + */ + SECDATINTOBS, + /** + * Type of security metadata observation made about the integrity confidence of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. + + + Examples: Types of security integrity confidence observation metadata, which may value the observation, include highly reliable, uncertain reliability, and not reliable. + + + Usage Note: A security integrity confidence observation on an Act may indicate that a valued Act.uncertaintycode attribute has been overridden by the entity responsible for ascribing the SecurityIntegrityConfidenceObservationValue. This supports the business requirements for increasing or decreasing the assessment of the reliability or trustworthiness of an IT resource based on parameters beyond the original assignment of an Act statement level of uncertainty. + */ + SECINTCONOBS, + /** + * Type of security metadata observation made about the provenance integrity of an IT resource (data, information object, service, or system capability), which indicates the lifecycle completeness of an IT resource in terms of workflow status such as its creation, modification, suspension, and deletion; locations in which the resource has been collected or archived, from which it may be retrieved, and the history of its distribution and disclosure. Integrity provenance metadata about an IT resource may be used to assess its veracity, reliability, and trustworthiness. + + + Examples: Types of security integrity provenance observation metadata, which may value the observation about an IT resource, include: + + + completeness or workflow status, such as authentication + the entity responsible for original authoring or informing about an IT resource + the entity responsible for a report or assertion about an IT resource relayed “second-handâ€? + the entity responsible for excerpting, transforming, or compiling an IT resource + */ + SECINTPRVOBS, + /** + * Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that made assertions about the resource. The asserting entity may not be the original informant about the resource. + + + Examples: Types of security integrity provenance asserted by observation metadata, which may value the observation, including: + + + assertions about an IT resource by a patient + assertions about an IT resource by a clinician + assertions about an IT resource by a device + */ + SECINTPRVABOBS, + /** + * Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that reported the existence of the resource. The reporting entity may not be the original author of the resource. + + + Examples: Types of security integrity provenance reported by observation metadata, which may value the observation, include: + + + reports about an IT resource by a patient + reports about an IT resource by a clinician + reports about an IT resource by a device + */ + SECINTPRVRBOBS, + /** + * Type of security metadata observation made about the integrity status of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Indicates the completeness of an IT resource in terms of workflow status, which may impact users that are authorized to access and use the resource. + + + Examples: Types of security integrity status observation metadata, which may value the observation, include codes from the HL7 DocumentCompletion code system such as legally authenticated, in progress, and incomplete. + */ + SECINTSTOBS, + /** + * An observation identifying trust metadata about an IT resource (data, information object, service, or system capability), which may be used as a trust attribute to populate a computable trust policy, trust credential, trust assertion, or trust label field in a security label or trust policy, which are principally used for authentication, authorization, and access control decisions. + */ + SECTRSTOBS, + /** + * Type of security metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRDOBS, + /** + * Type of security metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] + */ + TRSTAGREOBS, + /** + * Type of security metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + + + For example, + + + + A Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. For example, a particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants. + A Certificate Practice Statement (CSP), which is a statement of the practices which an Authority employs in issuing and managing certificates. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.] + */ + TRSTCERTOBS, + /** + * Type of security metadata observation made about a complete set of contracts, regulations or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative] + */ + TRSTFWKOBS, + /** + * Type of security metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTLOAOBS, + /** + * Type of security metadata observation made about a security architecture system component that supports enforcement of security policies. + */ + TRSTMECOBS, + /** + * Definition: A government health program that provides coverage on a fee for service basis for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Discussion: The structure and business processes for underwriting and administering a subsidized fee for service program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSIDFFS, + /** + * Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well. + */ + WRKCOMP, + /** + * An identifying code for healthcare interventions/procedures. + */ + _ACTPROCEDURECODE, + /** + * Definition: An identifying code for billable services, as opposed to codes for similar services used to identify them for functional purposes. + */ + _ACTBILLABLESERVICECODE, + /** + * Domain provides the root for HL7-defined detailed or rich codes for the Act classes. + */ + _HL7DEFINEDACTCODES, + /** + * null + */ + COPAY, + /** + * null + */ + DEDUCT, + /** + * null + */ + DOSEIND, + /** + * null + */ + PRA, + /** + * The act of putting something away for safe keeping. The "something" may be physical object such as a specimen, or information, such as observations regarding a specimen. + */ + STORE, + /** + * added to help the parsers + */ + NULL; + public static V3ActCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccountCode".equals(codeString)) + return _ACTACCOUNTCODE; + if ("ACCTRECEIVABLE".equals(codeString)) + return ACCTRECEIVABLE; + if ("CASH".equals(codeString)) + return CASH; + if ("CC".equals(codeString)) + return CC; + if ("AE".equals(codeString)) + return AE; + if ("DN".equals(codeString)) + return DN; + if ("DV".equals(codeString)) + return DV; + if ("MC".equals(codeString)) + return MC; + if ("V".equals(codeString)) + return V; + if ("PBILLACCT".equals(codeString)) + return PBILLACCT; + if ("_ActAdjudicationCode".equals(codeString)) + return _ACTADJUDICATIONCODE; + if ("_ActAdjudicationGroupCode".equals(codeString)) + return _ACTADJUDICATIONGROUPCODE; + if ("CONT".equals(codeString)) + return CONT; + if ("DAY".equals(codeString)) + return DAY; + if ("LOC".equals(codeString)) + return LOC; + if ("MONTH".equals(codeString)) + return MONTH; + if ("PERIOD".equals(codeString)) + return PERIOD; + if ("PROV".equals(codeString)) + return PROV; + if ("WEEK".equals(codeString)) + return WEEK; + if ("YEAR".equals(codeString)) + return YEAR; + if ("AA".equals(codeString)) + return AA; + if ("ANF".equals(codeString)) + return ANF; + if ("AR".equals(codeString)) + return AR; + if ("AS".equals(codeString)) + return AS; + if ("_ActAdjudicationResultActionCode".equals(codeString)) + return _ACTADJUDICATIONRESULTACTIONCODE; + if ("DISPLAY".equals(codeString)) + return DISPLAY; + if ("FORM".equals(codeString)) + return FORM; + if ("_ActBillableModifierCode".equals(codeString)) + return _ACTBILLABLEMODIFIERCODE; + if ("CPTM".equals(codeString)) + return CPTM; + if ("HCPCSA".equals(codeString)) + return HCPCSA; + if ("_ActBillingArrangementCode".equals(codeString)) + return _ACTBILLINGARRANGEMENTCODE; + if ("BLK".equals(codeString)) + return BLK; + if ("CAP".equals(codeString)) + return CAP; + if ("CONTF".equals(codeString)) + return CONTF; + if ("FINBILL".equals(codeString)) + return FINBILL; + if ("ROST".equals(codeString)) + return ROST; + if ("SESS".equals(codeString)) + return SESS; + if ("FFS".equals(codeString)) + return FFS; + if ("FFPS".equals(codeString)) + return FFPS; + if ("FFCS".equals(codeString)) + return FFCS; + if ("TFS".equals(codeString)) + return TFS; + if ("_ActBoundedROICode".equals(codeString)) + return _ACTBOUNDEDROICODE; + if ("ROIFS".equals(codeString)) + return ROIFS; + if ("ROIPS".equals(codeString)) + return ROIPS; + if ("_ActCareProvisionCode".equals(codeString)) + return _ACTCAREPROVISIONCODE; + if ("_ActCredentialedCareCode".equals(codeString)) + return _ACTCREDENTIALEDCARECODE; + if ("_ActCredentialedCareProvisionPersonCode".equals(codeString)) + return _ACTCREDENTIALEDCAREPROVISIONPERSONCODE; + if ("CACC".equals(codeString)) + return CACC; + if ("CAIC".equals(codeString)) + return CAIC; + if ("CAMC".equals(codeString)) + return CAMC; + if ("CANC".equals(codeString)) + return CANC; + if ("CAPC".equals(codeString)) + return CAPC; + if ("CBGC".equals(codeString)) + return CBGC; + if ("CCCC".equals(codeString)) + return CCCC; + if ("CCGC".equals(codeString)) + return CCGC; + if ("CCPC".equals(codeString)) + return CCPC; + if ("CCSC".equals(codeString)) + return CCSC; + if ("CDEC".equals(codeString)) + return CDEC; + if ("CDRC".equals(codeString)) + return CDRC; + if ("CEMC".equals(codeString)) + return CEMC; + if ("CFPC".equals(codeString)) + return CFPC; + if ("CIMC".equals(codeString)) + return CIMC; + if ("CMGC".equals(codeString)) + return CMGC; + if ("CNEC".equals(codeString)) + return CNEC; + if ("CNMC".equals(codeString)) + return CNMC; + if ("CNQC".equals(codeString)) + return CNQC; + if ("CNSC".equals(codeString)) + return CNSC; + if ("COGC".equals(codeString)) + return COGC; + if ("COMC".equals(codeString)) + return COMC; + if ("COPC".equals(codeString)) + return COPC; + if ("COSC".equals(codeString)) + return COSC; + if ("COTC".equals(codeString)) + return COTC; + if ("CPEC".equals(codeString)) + return CPEC; + if ("CPGC".equals(codeString)) + return CPGC; + if ("CPHC".equals(codeString)) + return CPHC; + if ("CPRC".equals(codeString)) + return CPRC; + if ("CPSC".equals(codeString)) + return CPSC; + if ("CPYC".equals(codeString)) + return CPYC; + if ("CROC".equals(codeString)) + return CROC; + if ("CRPC".equals(codeString)) + return CRPC; + if ("CSUC".equals(codeString)) + return CSUC; + if ("CTSC".equals(codeString)) + return CTSC; + if ("CURC".equals(codeString)) + return CURC; + if ("CVSC".equals(codeString)) + return CVSC; + if ("LGPC".equals(codeString)) + return LGPC; + if ("_ActCredentialedCareProvisionProgramCode".equals(codeString)) + return _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE; + if ("AALC".equals(codeString)) + return AALC; + if ("AAMC".equals(codeString)) + return AAMC; + if ("ABHC".equals(codeString)) + return ABHC; + if ("ACAC".equals(codeString)) + return ACAC; + if ("ACHC".equals(codeString)) + return ACHC; + if ("AHOC".equals(codeString)) + return AHOC; + if ("ALTC".equals(codeString)) + return ALTC; + if ("AOSC".equals(codeString)) + return AOSC; + if ("CACS".equals(codeString)) + return CACS; + if ("CAMI".equals(codeString)) + return CAMI; + if ("CAST".equals(codeString)) + return CAST; + if ("CBAR".equals(codeString)) + return CBAR; + if ("CCAD".equals(codeString)) + return CCAD; + if ("CCAR".equals(codeString)) + return CCAR; + if ("CDEP".equals(codeString)) + return CDEP; + if ("CDGD".equals(codeString)) + return CDGD; + if ("CDIA".equals(codeString)) + return CDIA; + if ("CEPI".equals(codeString)) + return CEPI; + if ("CFEL".equals(codeString)) + return CFEL; + if ("CHFC".equals(codeString)) + return CHFC; + if ("CHRO".equals(codeString)) + return CHRO; + if ("CHYP".equals(codeString)) + return CHYP; + if ("CMIH".equals(codeString)) + return CMIH; + if ("CMSC".equals(codeString)) + return CMSC; + if ("COJR".equals(codeString)) + return COJR; + if ("CONC".equals(codeString)) + return CONC; + if ("COPD".equals(codeString)) + return COPD; + if ("CORT".equals(codeString)) + return CORT; + if ("CPAD".equals(codeString)) + return CPAD; + if ("CPND".equals(codeString)) + return CPND; + if ("CPST".equals(codeString)) + return CPST; + if ("CSDM".equals(codeString)) + return CSDM; + if ("CSIC".equals(codeString)) + return CSIC; + if ("CSLD".equals(codeString)) + return CSLD; + if ("CSPT".equals(codeString)) + return CSPT; + if ("CTBU".equals(codeString)) + return CTBU; + if ("CVDC".equals(codeString)) + return CVDC; + if ("CWMA".equals(codeString)) + return CWMA; + if ("CWOH".equals(codeString)) + return CWOH; + if ("_ActEncounterCode".equals(codeString)) + return _ACTENCOUNTERCODE; + if ("AMB".equals(codeString)) + return AMB; + if ("EMER".equals(codeString)) + return EMER; + if ("FLD".equals(codeString)) + return FLD; + if ("HH".equals(codeString)) + return HH; + if ("IMP".equals(codeString)) + return IMP; + if ("ACUTE".equals(codeString)) + return ACUTE; + if ("NONAC".equals(codeString)) + return NONAC; + if ("PRENC".equals(codeString)) + return PRENC; + if ("SS".equals(codeString)) + return SS; + if ("VR".equals(codeString)) + return VR; + if ("_ActMedicalServiceCode".equals(codeString)) + return _ACTMEDICALSERVICECODE; + if ("ALC".equals(codeString)) + return ALC; + if ("CARD".equals(codeString)) + return CARD; + if ("CHR".equals(codeString)) + return CHR; + if ("DNTL".equals(codeString)) + return DNTL; + if ("DRGRHB".equals(codeString)) + return DRGRHB; + if ("GENRL".equals(codeString)) + return GENRL; + if ("MED".equals(codeString)) + return MED; + if ("OBS".equals(codeString)) + return OBS; + if ("ONC".equals(codeString)) + return ONC; + if ("PALL".equals(codeString)) + return PALL; + if ("PED".equals(codeString)) + return PED; + if ("PHAR".equals(codeString)) + return PHAR; + if ("PHYRHB".equals(codeString)) + return PHYRHB; + if ("PSYCH".equals(codeString)) + return PSYCH; + if ("SURG".equals(codeString)) + return SURG; + if ("_ActClaimAttachmentCategoryCode".equals(codeString)) + return _ACTCLAIMATTACHMENTCATEGORYCODE; + if ("AUTOATTCH".equals(codeString)) + return AUTOATTCH; + if ("DOCUMENT".equals(codeString)) + return DOCUMENT; + if ("HEALTHREC".equals(codeString)) + return HEALTHREC; + if ("IMG".equals(codeString)) + return IMG; + if ("LABRESULTS".equals(codeString)) + return LABRESULTS; + if ("MODEL".equals(codeString)) + return MODEL; + if ("WIATTCH".equals(codeString)) + return WIATTCH; + if ("XRAY".equals(codeString)) + return XRAY; + if ("_ActConsentType".equals(codeString)) + return _ACTCONSENTTYPE; + if ("ICOL".equals(codeString)) + return ICOL; + if ("IDSCL".equals(codeString)) + return IDSCL; + if ("INFA".equals(codeString)) + return INFA; + if ("INFAO".equals(codeString)) + return INFAO; + if ("INFASO".equals(codeString)) + return INFASO; + if ("IRDSCL".equals(codeString)) + return IRDSCL; + if ("RESEARCH".equals(codeString)) + return RESEARCH; + if ("RSDID".equals(codeString)) + return RSDID; + if ("RSREID".equals(codeString)) + return RSREID; + if ("_ActContainerRegistrationCode".equals(codeString)) + return _ACTCONTAINERREGISTRATIONCODE; + if ("ID".equals(codeString)) + return ID; + if ("IP".equals(codeString)) + return IP; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("O".equals(codeString)) + return O; + if ("R".equals(codeString)) + return R; + if ("X".equals(codeString)) + return X; + if ("_ActControlVariable".equals(codeString)) + return _ACTCONTROLVARIABLE; + if ("AUTO".equals(codeString)) + return AUTO; + if ("ENDC".equals(codeString)) + return ENDC; + if ("REFLEX".equals(codeString)) + return REFLEX; + if ("_ActCoverageConfirmationCode".equals(codeString)) + return _ACTCOVERAGECONFIRMATIONCODE; + if ("_ActCoverageAuthorizationConfirmationCode".equals(codeString)) + return _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE; + if ("AUTH".equals(codeString)) + return AUTH; + if ("NAUTH".equals(codeString)) + return NAUTH; + if ("_ActCoverageEligibilityConfirmationCode".equals(codeString)) + return _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE; + if ("ELG".equals(codeString)) + return ELG; + if ("NELG".equals(codeString)) + return NELG; + if ("_ActCoverageLimitCode".equals(codeString)) + return _ACTCOVERAGELIMITCODE; + if ("_ActCoverageQuantityLimitCode".equals(codeString)) + return _ACTCOVERAGEQUANTITYLIMITCODE; + if ("COVPRD".equals(codeString)) + return COVPRD; + if ("LFEMX".equals(codeString)) + return LFEMX; + if ("NETAMT".equals(codeString)) + return NETAMT; + if ("PRDMX".equals(codeString)) + return PRDMX; + if ("UNITPRICE".equals(codeString)) + return UNITPRICE; + if ("UNITQTY".equals(codeString)) + return UNITQTY; + if ("COVMX".equals(codeString)) + return COVMX; + if ("_ActCoveredPartyLimitCode".equals(codeString)) + return _ACTCOVEREDPARTYLIMITCODE; + if ("_ActCoverageTypeCode".equals(codeString)) + return _ACTCOVERAGETYPECODE; + if ("_ActInsurancePolicyCode".equals(codeString)) + return _ACTINSURANCEPOLICYCODE; + if ("EHCPOL".equals(codeString)) + return EHCPOL; + if ("HSAPOL".equals(codeString)) + return HSAPOL; + if ("AUTOPOL".equals(codeString)) + return AUTOPOL; + if ("COL".equals(codeString)) + return COL; + if ("UNINSMOT".equals(codeString)) + return UNINSMOT; + if ("PUBLICPOL".equals(codeString)) + return PUBLICPOL; + if ("DENTPRG".equals(codeString)) + return DENTPRG; + if ("DISEASEPRG".equals(codeString)) + return DISEASEPRG; + if ("CANPRG".equals(codeString)) + return CANPRG; + if ("ENDRENAL".equals(codeString)) + return ENDRENAL; + if ("HIVAIDS".equals(codeString)) + return HIVAIDS; + if ("MANDPOL".equals(codeString)) + return MANDPOL; + if ("MENTPRG".equals(codeString)) + return MENTPRG; + if ("SAFNET".equals(codeString)) + return SAFNET; + if ("SUBPRG".equals(codeString)) + return SUBPRG; + if ("SUBSIDIZ".equals(codeString)) + return SUBSIDIZ; + if ("SUBSIDMC".equals(codeString)) + return SUBSIDMC; + if ("SUBSUPP".equals(codeString)) + return SUBSUPP; + if ("WCBPOL".equals(codeString)) + return WCBPOL; + if ("_ActInsuranceTypeCode".equals(codeString)) + return _ACTINSURANCETYPECODE; + if ("_ActHealthInsuranceTypeCode".equals(codeString)) + return _ACTHEALTHINSURANCETYPECODE; + if ("DENTAL".equals(codeString)) + return DENTAL; + if ("DISEASE".equals(codeString)) + return DISEASE; + if ("DRUGPOL".equals(codeString)) + return DRUGPOL; + if ("HIP".equals(codeString)) + return HIP; + if ("LTC".equals(codeString)) + return LTC; + if ("MCPOL".equals(codeString)) + return MCPOL; + if ("POS".equals(codeString)) + return POS; + if ("HMO".equals(codeString)) + return HMO; + if ("PPO".equals(codeString)) + return PPO; + if ("MENTPOL".equals(codeString)) + return MENTPOL; + if ("SUBPOL".equals(codeString)) + return SUBPOL; + if ("VISPOL".equals(codeString)) + return VISPOL; + if ("DIS".equals(codeString)) + return DIS; + if ("EWB".equals(codeString)) + return EWB; + if ("FLEXP".equals(codeString)) + return FLEXP; + if ("LIFE".equals(codeString)) + return LIFE; + if ("ANNU".equals(codeString)) + return ANNU; + if ("TLIFE".equals(codeString)) + return TLIFE; + if ("ULIFE".equals(codeString)) + return ULIFE; + if ("PNC".equals(codeString)) + return PNC; + if ("REI".equals(codeString)) + return REI; + if ("SURPL".equals(codeString)) + return SURPL; + if ("UMBRL".equals(codeString)) + return UMBRL; + if ("_ActProgramTypeCode".equals(codeString)) + return _ACTPROGRAMTYPECODE; + if ("CHAR".equals(codeString)) + return CHAR; + if ("CRIME".equals(codeString)) + return CRIME; + if ("EAP".equals(codeString)) + return EAP; + if ("GOVEMP".equals(codeString)) + return GOVEMP; + if ("HIRISK".equals(codeString)) + return HIRISK; + if ("IND".equals(codeString)) + return IND; + if ("MILITARY".equals(codeString)) + return MILITARY; + if ("RETIRE".equals(codeString)) + return RETIRE; + if ("SOCIAL".equals(codeString)) + return SOCIAL; + if ("VET".equals(codeString)) + return VET; + if ("_ActDetectedIssueManagementCode".equals(codeString)) + return _ACTDETECTEDISSUEMANAGEMENTCODE; + if ("_ActAdministrativeDetectedIssueManagementCode".equals(codeString)) + return _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE; + if ("_AuthorizationIssueManagementCode".equals(codeString)) + return _AUTHORIZATIONISSUEMANAGEMENTCODE; + if ("EMAUTH".equals(codeString)) + return EMAUTH; + if ("21".equals(codeString)) + return _21; + if ("1".equals(codeString)) + return _1; + if ("19".equals(codeString)) + return _19; + if ("2".equals(codeString)) + return _2; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("20".equals(codeString)) + return _20; + if ("8".equals(codeString)) + return _8; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("9".equals(codeString)) + return _9; + if ("_ActExposureCode".equals(codeString)) + return _ACTEXPOSURECODE; + if ("CHLDCARE".equals(codeString)) + return CHLDCARE; + if ("CONVEYNC".equals(codeString)) + return CONVEYNC; + if ("HLTHCARE".equals(codeString)) + return HLTHCARE; + if ("HOMECARE".equals(codeString)) + return HOMECARE; + if ("HOSPPTNT".equals(codeString)) + return HOSPPTNT; + if ("HOSPVSTR".equals(codeString)) + return HOSPVSTR; + if ("HOUSEHLD".equals(codeString)) + return HOUSEHLD; + if ("INMATE".equals(codeString)) + return INMATE; + if ("INTIMATE".equals(codeString)) + return INTIMATE; + if ("LTRMCARE".equals(codeString)) + return LTRMCARE; + if ("PLACE".equals(codeString)) + return PLACE; + if ("PTNTCARE".equals(codeString)) + return PTNTCARE; + if ("SCHOOL2".equals(codeString)) + return SCHOOL2; + if ("SOCIAL2".equals(codeString)) + return SOCIAL2; + if ("SUBSTNCE".equals(codeString)) + return SUBSTNCE; + if ("TRAVINT".equals(codeString)) + return TRAVINT; + if ("WORK2".equals(codeString)) + return WORK2; + if ("_ActFinancialTransactionCode".equals(codeString)) + return _ACTFINANCIALTRANSACTIONCODE; + if ("CHRG".equals(codeString)) + return CHRG; + if ("REV".equals(codeString)) + return REV; + if ("_ActIncidentCode".equals(codeString)) + return _ACTINCIDENTCODE; + if ("MVA".equals(codeString)) + return MVA; + if ("SCHOOL".equals(codeString)) + return SCHOOL; + if ("SPT".equals(codeString)) + return SPT; + if ("WPA".equals(codeString)) + return WPA; + if ("_ActInformationAccessCode".equals(codeString)) + return _ACTINFORMATIONACCESSCODE; + if ("ACADR".equals(codeString)) + return ACADR; + if ("ACALL".equals(codeString)) + return ACALL; + if ("ACALLG".equals(codeString)) + return ACALLG; + if ("ACCONS".equals(codeString)) + return ACCONS; + if ("ACDEMO".equals(codeString)) + return ACDEMO; + if ("ACDI".equals(codeString)) + return ACDI; + if ("ACIMMUN".equals(codeString)) + return ACIMMUN; + if ("ACLAB".equals(codeString)) + return ACLAB; + if ("ACMED".equals(codeString)) + return ACMED; + if ("ACMEDC".equals(codeString)) + return ACMEDC; + if ("ACMEN".equals(codeString)) + return ACMEN; + if ("ACOBS".equals(codeString)) + return ACOBS; + if ("ACPOLPRG".equals(codeString)) + return ACPOLPRG; + if ("ACPROV".equals(codeString)) + return ACPROV; + if ("ACPSERV".equals(codeString)) + return ACPSERV; + if ("ACSUBSTAB".equals(codeString)) + return ACSUBSTAB; + if ("_ActInformationAccessContextCode".equals(codeString)) + return _ACTINFORMATIONACCESSCONTEXTCODE; + if ("INFAUT".equals(codeString)) + return INFAUT; + if ("INFCON".equals(codeString)) + return INFCON; + if ("INFCRT".equals(codeString)) + return INFCRT; + if ("INFDNG".equals(codeString)) + return INFDNG; + if ("INFEMER".equals(codeString)) + return INFEMER; + if ("INFPWR".equals(codeString)) + return INFPWR; + if ("INFREG".equals(codeString)) + return INFREG; + if ("_ActInformationCategoryCode".equals(codeString)) + return _ACTINFORMATIONCATEGORYCODE; + if ("ALLCAT".equals(codeString)) + return ALLCAT; + if ("ALLGCAT".equals(codeString)) + return ALLGCAT; + if ("ARCAT".equals(codeString)) + return ARCAT; + if ("COBSCAT".equals(codeString)) + return COBSCAT; + if ("DEMOCAT".equals(codeString)) + return DEMOCAT; + if ("DICAT".equals(codeString)) + return DICAT; + if ("IMMUCAT".equals(codeString)) + return IMMUCAT; + if ("LABCAT".equals(codeString)) + return LABCAT; + if ("MEDCCAT".equals(codeString)) + return MEDCCAT; + if ("MENCAT".equals(codeString)) + return MENCAT; + if ("PSVCCAT".equals(codeString)) + return PSVCCAT; + if ("RXCAT".equals(codeString)) + return RXCAT; + if ("_ActInvoiceElementCode".equals(codeString)) + return _ACTINVOICEELEMENTCODE; + if ("_ActInvoiceAdjudicationPaymentCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTCODE; + if ("_ActInvoiceAdjudicationPaymentGroupCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE; + if ("ALEC".equals(codeString)) + return ALEC; + if ("BONUS".equals(codeString)) + return BONUS; + if ("CFWD".equals(codeString)) + return CFWD; + if ("EDU".equals(codeString)) + return EDU; + if ("EPYMT".equals(codeString)) + return EPYMT; + if ("GARN".equals(codeString)) + return GARN; + if ("INVOICE".equals(codeString)) + return INVOICE; + if ("PINV".equals(codeString)) + return PINV; + if ("PPRD".equals(codeString)) + return PPRD; + if ("PROA".equals(codeString)) + return PROA; + if ("RECOV".equals(codeString)) + return RECOV; + if ("RETRO".equals(codeString)) + return RETRO; + if ("TRAN".equals(codeString)) + return TRAN; + if ("_ActInvoiceAdjudicationPaymentSummaryCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE; + if ("INVTYPE".equals(codeString)) + return INVTYPE; + if ("PAYEE".equals(codeString)) + return PAYEE; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("SENDAPP".equals(codeString)) + return SENDAPP; + if ("_ActInvoiceDetailCode".equals(codeString)) + return _ACTINVOICEDETAILCODE; + if ("_ActInvoiceDetailClinicalProductCode".equals(codeString)) + return _ACTINVOICEDETAILCLINICALPRODUCTCODE; + if ("UNSPSC".equals(codeString)) + return UNSPSC; + if ("_ActInvoiceDetailDrugProductCode".equals(codeString)) + return _ACTINVOICEDETAILDRUGPRODUCTCODE; + if ("GTIN".equals(codeString)) + return GTIN; + if ("UPC".equals(codeString)) + return UPC; + if ("_ActInvoiceDetailGenericCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICCODE; + if ("_ActInvoiceDetailGenericAdjudicatorCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICADJUDICATORCODE; + if ("COIN".equals(codeString)) + return COIN; + if ("COPAYMENT".equals(codeString)) + return COPAYMENT; + if ("DEDUCTIBLE".equals(codeString)) + return DEDUCTIBLE; + if ("PAY".equals(codeString)) + return PAY; + if ("SPEND".equals(codeString)) + return SPEND; + if ("COINS".equals(codeString)) + return COINS; + if ("_ActInvoiceDetailGenericModifierCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICMODIFIERCODE; + if ("AFTHRS".equals(codeString)) + return AFTHRS; + if ("ISOL".equals(codeString)) + return ISOL; + if ("OOO".equals(codeString)) + return OOO; + if ("_ActInvoiceDetailGenericProviderCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICPROVIDERCODE; + if ("CANCAPT".equals(codeString)) + return CANCAPT; + if ("DSC".equals(codeString)) + return DSC; + if ("ESA".equals(codeString)) + return ESA; + if ("FFSTOP".equals(codeString)) + return FFSTOP; + if ("FNLFEE".equals(codeString)) + return FNLFEE; + if ("FRSTFEE".equals(codeString)) + return FRSTFEE; + if ("MARKUP".equals(codeString)) + return MARKUP; + if ("MISSAPT".equals(codeString)) + return MISSAPT; + if ("PERFEE".equals(codeString)) + return PERFEE; + if ("PERMBNS".equals(codeString)) + return PERMBNS; + if ("RESTOCK".equals(codeString)) + return RESTOCK; + if ("TRAVEL".equals(codeString)) + return TRAVEL; + if ("URGENT".equals(codeString)) + return URGENT; + if ("_ActInvoiceDetailTaxCode".equals(codeString)) + return _ACTINVOICEDETAILTAXCODE; + if ("FST".equals(codeString)) + return FST; + if ("HST".equals(codeString)) + return HST; + if ("PST".equals(codeString)) + return PST; + if ("_ActInvoiceDetailPreferredAccommodationCode".equals(codeString)) + return _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE; + if ("_ActEncounterAccommodationCode".equals(codeString)) + return _ACTENCOUNTERACCOMMODATIONCODE; + if ("_HL7AccommodationCode".equals(codeString)) + return _HL7ACCOMMODATIONCODE; + if ("I".equals(codeString)) + return I; + if ("P".equals(codeString)) + return P; + if ("S".equals(codeString)) + return S; + if ("SP".equals(codeString)) + return SP; + if ("W".equals(codeString)) + return W; + if ("_ActInvoiceDetailClinicalServiceCode".equals(codeString)) + return _ACTINVOICEDETAILCLINICALSERVICECODE; + if ("_ActInvoiceGroupCode".equals(codeString)) + return _ACTINVOICEGROUPCODE; + if ("_ActInvoiceInterGroupCode".equals(codeString)) + return _ACTINVOICEINTERGROUPCODE; + if ("CPNDDRGING".equals(codeString)) + return CPNDDRGING; + if ("CPNDINDING".equals(codeString)) + return CPNDINDING; + if ("CPNDSUPING".equals(codeString)) + return CPNDSUPING; + if ("DRUGING".equals(codeString)) + return DRUGING; + if ("FRAMEING".equals(codeString)) + return FRAMEING; + if ("LENSING".equals(codeString)) + return LENSING; + if ("PRDING".equals(codeString)) + return PRDING; + if ("_ActInvoiceRootGroupCode".equals(codeString)) + return _ACTINVOICEROOTGROUPCODE; + if ("CPINV".equals(codeString)) + return CPINV; + if ("CSINV".equals(codeString)) + return CSINV; + if ("CSPINV".equals(codeString)) + return CSPINV; + if ("FININV".equals(codeString)) + return FININV; + if ("OHSINV".equals(codeString)) + return OHSINV; + if ("PAINV".equals(codeString)) + return PAINV; + if ("RXCINV".equals(codeString)) + return RXCINV; + if ("RXDINV".equals(codeString)) + return RXDINV; + if ("SBFINV".equals(codeString)) + return SBFINV; + if ("VRXINV".equals(codeString)) + return VRXINV; + if ("_ActInvoiceElementSummaryCode".equals(codeString)) + return _ACTINVOICEELEMENTSUMMARYCODE; + if ("_InvoiceElementAdjudicated".equals(codeString)) + return _INVOICEELEMENTADJUDICATED; + if ("ADNFPPELAT".equals(codeString)) + return ADNFPPELAT; + if ("ADNFPPELCT".equals(codeString)) + return ADNFPPELCT; + if ("ADNFPPMNAT".equals(codeString)) + return ADNFPPMNAT; + if ("ADNFPPMNCT".equals(codeString)) + return ADNFPPMNCT; + if ("ADNFSPELAT".equals(codeString)) + return ADNFSPELAT; + if ("ADNFSPELCT".equals(codeString)) + return ADNFSPELCT; + if ("ADNFSPMNAT".equals(codeString)) + return ADNFSPMNAT; + if ("ADNFSPMNCT".equals(codeString)) + return ADNFSPMNCT; + if ("ADNPPPELAT".equals(codeString)) + return ADNPPPELAT; + if ("ADNPPPELCT".equals(codeString)) + return ADNPPPELCT; + if ("ADNPPPMNAT".equals(codeString)) + return ADNPPPMNAT; + if ("ADNPPPMNCT".equals(codeString)) + return ADNPPPMNCT; + if ("ADNPSPELAT".equals(codeString)) + return ADNPSPELAT; + if ("ADNPSPELCT".equals(codeString)) + return ADNPSPELCT; + if ("ADNPSPMNAT".equals(codeString)) + return ADNPSPMNAT; + if ("ADNPSPMNCT".equals(codeString)) + return ADNPSPMNCT; + if ("ADPPPPELAT".equals(codeString)) + return ADPPPPELAT; + if ("ADPPPPELCT".equals(codeString)) + return ADPPPPELCT; + if ("ADPPPPMNAT".equals(codeString)) + return ADPPPPMNAT; + if ("ADPPPPMNCT".equals(codeString)) + return ADPPPPMNCT; + if ("ADPPSPELAT".equals(codeString)) + return ADPPSPELAT; + if ("ADPPSPELCT".equals(codeString)) + return ADPPSPELCT; + if ("ADPPSPMNAT".equals(codeString)) + return ADPPSPMNAT; + if ("ADPPSPMNCT".equals(codeString)) + return ADPPSPMNCT; + if ("ADRFPPELAT".equals(codeString)) + return ADRFPPELAT; + if ("ADRFPPELCT".equals(codeString)) + return ADRFPPELCT; + if ("ADRFPPMNAT".equals(codeString)) + return ADRFPPMNAT; + if ("ADRFPPMNCT".equals(codeString)) + return ADRFPPMNCT; + if ("ADRFSPELAT".equals(codeString)) + return ADRFSPELAT; + if ("ADRFSPELCT".equals(codeString)) + return ADRFSPELCT; + if ("ADRFSPMNAT".equals(codeString)) + return ADRFSPMNAT; + if ("ADRFSPMNCT".equals(codeString)) + return ADRFSPMNCT; + if ("_InvoiceElementPaid".equals(codeString)) + return _INVOICEELEMENTPAID; + if ("PDNFPPELAT".equals(codeString)) + return PDNFPPELAT; + if ("PDNFPPELCT".equals(codeString)) + return PDNFPPELCT; + if ("PDNFPPMNAT".equals(codeString)) + return PDNFPPMNAT; + if ("PDNFPPMNCT".equals(codeString)) + return PDNFPPMNCT; + if ("PDNFSPELAT".equals(codeString)) + return PDNFSPELAT; + if ("PDNFSPELCT".equals(codeString)) + return PDNFSPELCT; + if ("PDNFSPMNAT".equals(codeString)) + return PDNFSPMNAT; + if ("PDNFSPMNCT".equals(codeString)) + return PDNFSPMNCT; + if ("PDNPPPELAT".equals(codeString)) + return PDNPPPELAT; + if ("PDNPPPELCT".equals(codeString)) + return PDNPPPELCT; + if ("PDNPPPMNAT".equals(codeString)) + return PDNPPPMNAT; + if ("PDNPPPMNCT".equals(codeString)) + return PDNPPPMNCT; + if ("PDNPSPELAT".equals(codeString)) + return PDNPSPELAT; + if ("PDNPSPELCT".equals(codeString)) + return PDNPSPELCT; + if ("PDNPSPMNAT".equals(codeString)) + return PDNPSPMNAT; + if ("PDNPSPMNCT".equals(codeString)) + return PDNPSPMNCT; + if ("PDPPPPELAT".equals(codeString)) + return PDPPPPELAT; + if ("PDPPPPELCT".equals(codeString)) + return PDPPPPELCT; + if ("PDPPPPMNAT".equals(codeString)) + return PDPPPPMNAT; + if ("PDPPPPMNCT".equals(codeString)) + return PDPPPPMNCT; + if ("PDPPSPELAT".equals(codeString)) + return PDPPSPELAT; + if ("PDPPSPELCT".equals(codeString)) + return PDPPSPELCT; + if ("PDPPSPMNAT".equals(codeString)) + return PDPPSPMNAT; + if ("PDPPSPMNCT".equals(codeString)) + return PDPPSPMNCT; + if ("_InvoiceElementSubmitted".equals(codeString)) + return _INVOICEELEMENTSUBMITTED; + if ("SBBLELAT".equals(codeString)) + return SBBLELAT; + if ("SBBLELCT".equals(codeString)) + return SBBLELCT; + if ("SBNFELAT".equals(codeString)) + return SBNFELAT; + if ("SBNFELCT".equals(codeString)) + return SBNFELCT; + if ("SBPDELAT".equals(codeString)) + return SBPDELAT; + if ("SBPDELCT".equals(codeString)) + return SBPDELCT; + if ("_ActInvoiceOverrideCode".equals(codeString)) + return _ACTINVOICEOVERRIDECODE; + if ("COVGE".equals(codeString)) + return COVGE; + if ("EFORM".equals(codeString)) + return EFORM; + if ("FAX".equals(codeString)) + return FAX; + if ("GFTH".equals(codeString)) + return GFTH; + if ("LATE".equals(codeString)) + return LATE; + if ("MANUAL".equals(codeString)) + return MANUAL; + if ("OOJ".equals(codeString)) + return OOJ; + if ("ORTHO".equals(codeString)) + return ORTHO; + if ("PAPER".equals(codeString)) + return PAPER; + if ("PIE".equals(codeString)) + return PIE; + if ("PYRDELAY".equals(codeString)) + return PYRDELAY; + if ("REFNR".equals(codeString)) + return REFNR; + if ("REPSERV".equals(codeString)) + return REPSERV; + if ("UNRELAT".equals(codeString)) + return UNRELAT; + if ("VERBAUTH".equals(codeString)) + return VERBAUTH; + if ("_ActListCode".equals(codeString)) + return _ACTLISTCODE; + if ("_ActObservationList".equals(codeString)) + return _ACTOBSERVATIONLIST; + if ("CARELIST".equals(codeString)) + return CARELIST; + if ("CONDLIST".equals(codeString)) + return CONDLIST; + if ("INTOLIST".equals(codeString)) + return INTOLIST; + if ("PROBLIST".equals(codeString)) + return PROBLIST; + if ("RISKLIST".equals(codeString)) + return RISKLIST; + if ("GOALLIST".equals(codeString)) + return GOALLIST; + if ("_ActTherapyDurationWorkingListCode".equals(codeString)) + return _ACTTHERAPYDURATIONWORKINGLISTCODE; + if ("_ActMedicationTherapyDurationWorkingListCode".equals(codeString)) + return _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE; + if ("ACU".equals(codeString)) + return ACU; + if ("CHRON".equals(codeString)) + return CHRON; + if ("ONET".equals(codeString)) + return ONET; + if ("PRN".equals(codeString)) + return PRN; + if ("MEDLIST".equals(codeString)) + return MEDLIST; + if ("CURMEDLIST".equals(codeString)) + return CURMEDLIST; + if ("DISCMEDLIST".equals(codeString)) + return DISCMEDLIST; + if ("HISTMEDLIST".equals(codeString)) + return HISTMEDLIST; + if ("_ActMonitoringProtocolCode".equals(codeString)) + return _ACTMONITORINGPROTOCOLCODE; + if ("CTLSUB".equals(codeString)) + return CTLSUB; + if ("INV".equals(codeString)) + return INV; + if ("LU".equals(codeString)) + return LU; + if ("OTC".equals(codeString)) + return OTC; + if ("RX".equals(codeString)) + return RX; + if ("SA".equals(codeString)) + return SA; + if ("SAC".equals(codeString)) + return SAC; + if ("_ActNonObservationIndicationCode".equals(codeString)) + return _ACTNONOBSERVATIONINDICATIONCODE; + if ("IND01".equals(codeString)) + return IND01; + if ("IND02".equals(codeString)) + return IND02; + if ("IND03".equals(codeString)) + return IND03; + if ("IND04".equals(codeString)) + return IND04; + if ("IND05".equals(codeString)) + return IND05; + if ("_ActObservationVerificationType".equals(codeString)) + return _ACTOBSERVATIONVERIFICATIONTYPE; + if ("VFPAPER".equals(codeString)) + return VFPAPER; + if ("_ActPaymentCode".equals(codeString)) + return _ACTPAYMENTCODE; + if ("ACH".equals(codeString)) + return ACH; + if ("CHK".equals(codeString)) + return CHK; + if ("DDP".equals(codeString)) + return DDP; + if ("NON".equals(codeString)) + return NON; + if ("_ActPharmacySupplyType".equals(codeString)) + return _ACTPHARMACYSUPPLYTYPE; + if ("DF".equals(codeString)) + return DF; + if ("EM".equals(codeString)) + return EM; + if ("SO".equals(codeString)) + return SO; + if ("FF".equals(codeString)) + return FF; + if ("FFC".equals(codeString)) + return FFC; + if ("FFP".equals(codeString)) + return FFP; + if ("FFSS".equals(codeString)) + return FFSS; + if ("TF".equals(codeString)) + return TF; + if ("FS".equals(codeString)) + return FS; + if ("MS".equals(codeString)) + return MS; + if ("RF".equals(codeString)) + return RF; + if ("UD".equals(codeString)) + return UD; + if ("RFC".equals(codeString)) + return RFC; + if ("RFCS".equals(codeString)) + return RFCS; + if ("RFF".equals(codeString)) + return RFF; + if ("RFFS".equals(codeString)) + return RFFS; + if ("RFP".equals(codeString)) + return RFP; + if ("RFPS".equals(codeString)) + return RFPS; + if ("RFS".equals(codeString)) + return RFS; + if ("TB".equals(codeString)) + return TB; + if ("TBS".equals(codeString)) + return TBS; + if ("UDE".equals(codeString)) + return UDE; + if ("_ActPolicyType".equals(codeString)) + return _ACTPOLICYTYPE; + if ("_ActPrivacyPolicy".equals(codeString)) + return _ACTPRIVACYPOLICY; + if ("_ActConsentDirective".equals(codeString)) + return _ACTCONSENTDIRECTIVE; + if ("EMRGONLY".equals(codeString)) + return EMRGONLY; + if ("NOPP".equals(codeString)) + return NOPP; + if ("OPTIN".equals(codeString)) + return OPTIN; + if ("OPTOUT".equals(codeString)) + return OPTOUT; + if ("_InformationSensitivityPolicy".equals(codeString)) + return _INFORMATIONSENSITIVITYPOLICY; + if ("_ActInformationSensitivityPolicy".equals(codeString)) + return _ACTINFORMATIONSENSITIVITYPOLICY; + if ("ETH".equals(codeString)) + return ETH; + if ("GDIS".equals(codeString)) + return GDIS; + if ("HIV".equals(codeString)) + return HIV; + if ("PSY".equals(codeString)) + return PSY; + if ("SCA".equals(codeString)) + return SCA; + if ("SDV".equals(codeString)) + return SDV; + if ("SEX".equals(codeString)) + return SEX; + if ("STD".equals(codeString)) + return STD; + if ("TBOO".equals(codeString)) + return TBOO; + if ("SICKLE".equals(codeString)) + return SICKLE; + if ("_EntitySensitivityPolicyType".equals(codeString)) + return _ENTITYSENSITIVITYPOLICYTYPE; + if ("DEMO".equals(codeString)) + return DEMO; + if ("DOB".equals(codeString)) + return DOB; + if ("GENDER".equals(codeString)) + return GENDER; + if ("LIVARG".equals(codeString)) + return LIVARG; + if ("MARST".equals(codeString)) + return MARST; + if ("RACE".equals(codeString)) + return RACE; + if ("REL".equals(codeString)) + return REL; + if ("_RoleInformationSensitivityPolicy".equals(codeString)) + return _ROLEINFORMATIONSENSITIVITYPOLICY; + if ("B".equals(codeString)) + return B; + if ("EMPL".equals(codeString)) + return EMPL; + if ("LOCIS".equals(codeString)) + return LOCIS; + if ("SSP".equals(codeString)) + return SSP; + if ("ADOL".equals(codeString)) + return ADOL; + if ("CEL".equals(codeString)) + return CEL; + if ("DIA".equals(codeString)) + return DIA; + if ("DRGIS".equals(codeString)) + return DRGIS; + if ("EMP".equals(codeString)) + return EMP; + if ("PDS".equals(codeString)) + return PDS; + if ("PRS".equals(codeString)) + return PRS; + if ("COMPT".equals(codeString)) + return COMPT; + if ("HRCOMPT".equals(codeString)) + return HRCOMPT; + if ("RESCOMPT".equals(codeString)) + return RESCOMPT; + if ("RMGTCOMPT".equals(codeString)) + return RMGTCOMPT; + if ("ActTrustPolicyType".equals(codeString)) + return ACTTRUSTPOLICYTYPE; + if ("TRSTACCRD".equals(codeString)) + return TRSTACCRD; + if ("TRSTAGRE".equals(codeString)) + return TRSTAGRE; + if ("TRSTASSUR".equals(codeString)) + return TRSTASSUR; + if ("TRSTCERT".equals(codeString)) + return TRSTCERT; + if ("TRSTFWK".equals(codeString)) + return TRSTFWK; + if ("TRSTMEC".equals(codeString)) + return TRSTMEC; + if ("COVPOL".equals(codeString)) + return COVPOL; + if ("SecurityPolicy".equals(codeString)) + return SECURITYPOLICY; + if ("ObligationPolicy".equals(codeString)) + return OBLIGATIONPOLICY; + if ("ANONY".equals(codeString)) + return ANONY; + if ("AOD".equals(codeString)) + return AOD; + if ("AUDIT".equals(codeString)) + return AUDIT; + if ("AUDTR".equals(codeString)) + return AUDTR; + if ("CPLYCC".equals(codeString)) + return CPLYCC; + if ("CPLYCD".equals(codeString)) + return CPLYCD; + if ("CPLYJPP".equals(codeString)) + return CPLYJPP; + if ("CPLYOPP".equals(codeString)) + return CPLYOPP; + if ("CPLYOSP".equals(codeString)) + return CPLYOSP; + if ("CPLYPOL".equals(codeString)) + return CPLYPOL; + if ("DEID".equals(codeString)) + return DEID; + if ("DELAU".equals(codeString)) + return DELAU; + if ("ENCRYPT".equals(codeString)) + return ENCRYPT; + if ("ENCRYPTR".equals(codeString)) + return ENCRYPTR; + if ("ENCRYPTT".equals(codeString)) + return ENCRYPTT; + if ("ENCRYPTU".equals(codeString)) + return ENCRYPTU; + if ("HUAPRV".equals(codeString)) + return HUAPRV; + if ("MASK".equals(codeString)) + return MASK; + if ("MINEC".equals(codeString)) + return MINEC; + if ("PRIVMARK".equals(codeString)) + return PRIVMARK; + if ("PSEUD".equals(codeString)) + return PSEUD; + if ("REDACT".equals(codeString)) + return REDACT; + if ("RefrainPolicy".equals(codeString)) + return REFRAINPOLICY; + if ("NOAUTH".equals(codeString)) + return NOAUTH; + if ("NOCOLLECT".equals(codeString)) + return NOCOLLECT; + if ("NODSCLCD".equals(codeString)) + return NODSCLCD; + if ("NODSCLCDS".equals(codeString)) + return NODSCLCDS; + if ("NOINTEGRATE".equals(codeString)) + return NOINTEGRATE; + if ("NOLIST".equals(codeString)) + return NOLIST; + if ("NOMOU".equals(codeString)) + return NOMOU; + if ("NOORGPOL".equals(codeString)) + return NOORGPOL; + if ("NOPAT".equals(codeString)) + return NOPAT; + if ("NOPERSISTP".equals(codeString)) + return NOPERSISTP; + if ("NORDSCLCD".equals(codeString)) + return NORDSCLCD; + if ("NORDSCLCDS".equals(codeString)) + return NORDSCLCDS; + if ("NORDSCLW".equals(codeString)) + return NORDSCLW; + if ("NORELINK".equals(codeString)) + return NORELINK; + if ("NOREUSE".equals(codeString)) + return NOREUSE; + if ("NOVIP".equals(codeString)) + return NOVIP; + if ("ORCON".equals(codeString)) + return ORCON; + if ("_ActProductAcquisitionCode".equals(codeString)) + return _ACTPRODUCTACQUISITIONCODE; + if ("LOAN".equals(codeString)) + return LOAN; + if ("RENT".equals(codeString)) + return RENT; + if ("TRANSFER".equals(codeString)) + return TRANSFER; + if ("SALE".equals(codeString)) + return SALE; + if ("_ActSpecimenTransportCode".equals(codeString)) + return _ACTSPECIMENTRANSPORTCODE; + if ("SREC".equals(codeString)) + return SREC; + if ("SSTOR".equals(codeString)) + return SSTOR; + if ("STRAN".equals(codeString)) + return STRAN; + if ("_ActSpecimenTreatmentCode".equals(codeString)) + return _ACTSPECIMENTREATMENTCODE; + if ("ACID".equals(codeString)) + return ACID; + if ("ALK".equals(codeString)) + return ALK; + if ("DEFB".equals(codeString)) + return DEFB; + if ("FILT".equals(codeString)) + return FILT; + if ("LDLP".equals(codeString)) + return LDLP; + if ("NEUT".equals(codeString)) + return NEUT; + if ("RECA".equals(codeString)) + return RECA; + if ("UFIL".equals(codeString)) + return UFIL; + if ("_ActSubstanceAdministrationCode".equals(codeString)) + return _ACTSUBSTANCEADMINISTRATIONCODE; + if ("DRUG".equals(codeString)) + return DRUG; + if ("FD".equals(codeString)) + return FD; + if ("IMMUNIZ".equals(codeString)) + return IMMUNIZ; + if ("BOOSTER".equals(codeString)) + return BOOSTER; + if ("INITIMMUNIZ".equals(codeString)) + return INITIMMUNIZ; + if ("_ActTaskCode".equals(codeString)) + return _ACTTASKCODE; + if ("OE".equals(codeString)) + return OE; + if ("LABOE".equals(codeString)) + return LABOE; + if ("MEDOE".equals(codeString)) + return MEDOE; + if ("PATDOC".equals(codeString)) + return PATDOC; + if ("ALLERLREV".equals(codeString)) + return ALLERLREV; + if ("CLINNOTEE".equals(codeString)) + return CLINNOTEE; + if ("DIAGLISTE".equals(codeString)) + return DIAGLISTE; + if ("DISCHINSTE".equals(codeString)) + return DISCHINSTE; + if ("DISCHSUME".equals(codeString)) + return DISCHSUME; + if ("PATEDUE".equals(codeString)) + return PATEDUE; + if ("PATREPE".equals(codeString)) + return PATREPE; + if ("PROBLISTE".equals(codeString)) + return PROBLISTE; + if ("RADREPE".equals(codeString)) + return RADREPE; + if ("IMMLREV".equals(codeString)) + return IMMLREV; + if ("REMLREV".equals(codeString)) + return REMLREV; + if ("WELLREMLREV".equals(codeString)) + return WELLREMLREV; + if ("PATINFO".equals(codeString)) + return PATINFO; + if ("ALLERLE".equals(codeString)) + return ALLERLE; + if ("CDSREV".equals(codeString)) + return CDSREV; + if ("CLINNOTEREV".equals(codeString)) + return CLINNOTEREV; + if ("DISCHSUMREV".equals(codeString)) + return DISCHSUMREV; + if ("DIAGLISTREV".equals(codeString)) + return DIAGLISTREV; + if ("IMMLE".equals(codeString)) + return IMMLE; + if ("LABRREV".equals(codeString)) + return LABRREV; + if ("MICRORREV".equals(codeString)) + return MICRORREV; + if ("MICROORGRREV".equals(codeString)) + return MICROORGRREV; + if ("MICROSENSRREV".equals(codeString)) + return MICROSENSRREV; + if ("MLREV".equals(codeString)) + return MLREV; + if ("MARWLREV".equals(codeString)) + return MARWLREV; + if ("OREV".equals(codeString)) + return OREV; + if ("PATREPREV".equals(codeString)) + return PATREPREV; + if ("PROBLISTREV".equals(codeString)) + return PROBLISTREV; + if ("RADREPREV".equals(codeString)) + return RADREPREV; + if ("REMLE".equals(codeString)) + return REMLE; + if ("WELLREMLE".equals(codeString)) + return WELLREMLE; + if ("RISKASSESS".equals(codeString)) + return RISKASSESS; + if ("FALLRISK".equals(codeString)) + return FALLRISK; + if ("_ActTransportationModeCode".equals(codeString)) + return _ACTTRANSPORTATIONMODECODE; + if ("_ActPatientTransportationModeCode".equals(codeString)) + return _ACTPATIENTTRANSPORTATIONMODECODE; + if ("AFOOT".equals(codeString)) + return AFOOT; + if ("AMBT".equals(codeString)) + return AMBT; + if ("AMBAIR".equals(codeString)) + return AMBAIR; + if ("AMBGRND".equals(codeString)) + return AMBGRND; + if ("AMBHELO".equals(codeString)) + return AMBHELO; + if ("LAWENF".equals(codeString)) + return LAWENF; + if ("PRVTRN".equals(codeString)) + return PRVTRN; + if ("PUBTRN".equals(codeString)) + return PUBTRN; + if ("_ObservationType".equals(codeString)) + return _OBSERVATIONTYPE; + if ("_ActSpecObsCode".equals(codeString)) + return _ACTSPECOBSCODE; + if ("ARTBLD".equals(codeString)) + return ARTBLD; + if ("DILUTION".equals(codeString)) + return DILUTION; + if ("AUTO-HIGH".equals(codeString)) + return AUTOHIGH; + if ("AUTO-LOW".equals(codeString)) + return AUTOLOW; + if ("PRE".equals(codeString)) + return PRE; + if ("RERUN".equals(codeString)) + return RERUN; + if ("EVNFCTS".equals(codeString)) + return EVNFCTS; + if ("INTFR".equals(codeString)) + return INTFR; + if ("FIBRIN".equals(codeString)) + return FIBRIN; + if ("HEMOLYSIS".equals(codeString)) + return HEMOLYSIS; + if ("ICTERUS".equals(codeString)) + return ICTERUS; + if ("LIPEMIA".equals(codeString)) + return LIPEMIA; + if ("VOLUME".equals(codeString)) + return VOLUME; + if ("AVAILABLE".equals(codeString)) + return AVAILABLE; + if ("CONSUMPTION".equals(codeString)) + return CONSUMPTION; + if ("CURRENT".equals(codeString)) + return CURRENT; + if ("INITIAL".equals(codeString)) + return INITIAL; + if ("_AnnotationType".equals(codeString)) + return _ANNOTATIONTYPE; + if ("_ActPatientAnnotationType".equals(codeString)) + return _ACTPATIENTANNOTATIONTYPE; + if ("ANNDI".equals(codeString)) + return ANNDI; + if ("ANNGEN".equals(codeString)) + return ANNGEN; + if ("ANNIMM".equals(codeString)) + return ANNIMM; + if ("ANNLAB".equals(codeString)) + return ANNLAB; + if ("ANNMED".equals(codeString)) + return ANNMED; + if ("_GeneticObservationType".equals(codeString)) + return _GENETICOBSERVATIONTYPE; + if ("GENE".equals(codeString)) + return GENE; + if ("_ImmunizationObservationType".equals(codeString)) + return _IMMUNIZATIONOBSERVATIONTYPE; + if ("OBSANTC".equals(codeString)) + return OBSANTC; + if ("OBSANTV".equals(codeString)) + return OBSANTV; + if ("_IndividualCaseSafetyReportType".equals(codeString)) + return _INDIVIDUALCASESAFETYREPORTTYPE; + if ("PAT_ADV_EVNT".equals(codeString)) + return PATADVEVNT; + if ("VAC_PROBLEM".equals(codeString)) + return VACPROBLEM; + if ("_LOINCObservationActContextAgeType".equals(codeString)) + return _LOINCOBSERVATIONACTCONTEXTAGETYPE; + if ("21611-9".equals(codeString)) + return _216119; + if ("21612-7".equals(codeString)) + return _216127; + if ("29553-5".equals(codeString)) + return _295535; + if ("30525-0".equals(codeString)) + return _305250; + if ("30972-4".equals(codeString)) + return _309724; + if ("_MedicationObservationType".equals(codeString)) + return _MEDICATIONOBSERVATIONTYPE; + if ("REP_HALF_LIFE".equals(codeString)) + return REPHALFLIFE; + if ("SPLCOATING".equals(codeString)) + return SPLCOATING; + if ("SPLCOLOR".equals(codeString)) + return SPLCOLOR; + if ("SPLIMAGE".equals(codeString)) + return SPLIMAGE; + if ("SPLIMPRINT".equals(codeString)) + return SPLIMPRINT; + if ("SPLSCORING".equals(codeString)) + return SPLSCORING; + if ("SPLSHAPE".equals(codeString)) + return SPLSHAPE; + if ("SPLSIZE".equals(codeString)) + return SPLSIZE; + if ("SPLSYMBOL".equals(codeString)) + return SPLSYMBOL; + if ("_ObservationIssueTriggerCodedObservationType".equals(codeString)) + return _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE; + if ("_CaseTransmissionMode".equals(codeString)) + return _CASETRANSMISSIONMODE; + if ("AIRTRNS".equals(codeString)) + return AIRTRNS; + if ("ANANTRNS".equals(codeString)) + return ANANTRNS; + if ("ANHUMTRNS".equals(codeString)) + return ANHUMTRNS; + if ("BDYFLDTRNS".equals(codeString)) + return BDYFLDTRNS; + if ("BLDTRNS".equals(codeString)) + return BLDTRNS; + if ("DERMTRNS".equals(codeString)) + return DERMTRNS; + if ("ENVTRNS".equals(codeString)) + return ENVTRNS; + if ("FECTRNS".equals(codeString)) + return FECTRNS; + if ("FOMTRNS".equals(codeString)) + return FOMTRNS; + if ("FOODTRNS".equals(codeString)) + return FOODTRNS; + if ("HUMHUMTRNS".equals(codeString)) + return HUMHUMTRNS; + if ("INDTRNS".equals(codeString)) + return INDTRNS; + if ("LACTTRNS".equals(codeString)) + return LACTTRNS; + if ("NOSTRNS".equals(codeString)) + return NOSTRNS; + if ("PARTRNS".equals(codeString)) + return PARTRNS; + if ("PLACTRNS".equals(codeString)) + return PLACTRNS; + if ("SEXTRNS".equals(codeString)) + return SEXTRNS; + if ("TRNSFTRNS".equals(codeString)) + return TRNSFTRNS; + if ("VECTRNS".equals(codeString)) + return VECTRNS; + if ("WATTRNS".equals(codeString)) + return WATTRNS; + if ("_ObservationQualityMeasureAttribute".equals(codeString)) + return _OBSERVATIONQUALITYMEASUREATTRIBUTE; + if ("AGGREGATE".equals(codeString)) + return AGGREGATE; + if ("COPY".equals(codeString)) + return COPY; + if ("CRS".equals(codeString)) + return CRS; + if ("DEF".equals(codeString)) + return DEF; + if ("DISC".equals(codeString)) + return DISC; + if ("FINALDT".equals(codeString)) + return FINALDT; + if ("GUIDE".equals(codeString)) + return GUIDE; + if ("IDUR".equals(codeString)) + return IDUR; + if ("ITMCNT".equals(codeString)) + return ITMCNT; + if ("KEY".equals(codeString)) + return KEY; + if ("MEDT".equals(codeString)) + return MEDT; + if ("MSD".equals(codeString)) + return MSD; + if ("MSRADJ".equals(codeString)) + return MSRADJ; + if ("MSRAGG".equals(codeString)) + return MSRAGG; + if ("MSRIMPROV".equals(codeString)) + return MSRIMPROV; + if ("MSRJUR".equals(codeString)) + return MSRJUR; + if ("MSRRPTR".equals(codeString)) + return MSRRPTR; + if ("MSRRPTTIME".equals(codeString)) + return MSRRPTTIME; + if ("MSRSCORE".equals(codeString)) + return MSRSCORE; + if ("MSRSET".equals(codeString)) + return MSRSET; + if ("MSRTOPIC".equals(codeString)) + return MSRTOPIC; + if ("MSRTP".equals(codeString)) + return MSRTP; + if ("MSRTYPE".equals(codeString)) + return MSRTYPE; + if ("RAT".equals(codeString)) + return RAT; + if ("REF".equals(codeString)) + return REF; + if ("SDE".equals(codeString)) + return SDE; + if ("STRAT".equals(codeString)) + return STRAT; + if ("TRANF".equals(codeString)) + return TRANF; + if ("USE".equals(codeString)) + return USE; + if ("_ObservationSequenceType".equals(codeString)) + return _OBSERVATIONSEQUENCETYPE; + if ("TIME_ABSOLUTE".equals(codeString)) + return TIMEABSOLUTE; + if ("TIME_RELATIVE".equals(codeString)) + return TIMERELATIVE; + if ("_ObservationSeriesType".equals(codeString)) + return _OBSERVATIONSERIESTYPE; + if ("_ECGObservationSeriesType".equals(codeString)) + return _ECGOBSERVATIONSERIESTYPE; + if ("REPRESENTATIVE_BEAT".equals(codeString)) + return REPRESENTATIVEBEAT; + if ("RHYTHM".equals(codeString)) + return RHYTHM; + if ("_PatientImmunizationRelatedObservationType".equals(codeString)) + return _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE; + if ("CLSSRM".equals(codeString)) + return CLSSRM; + if ("GRADE".equals(codeString)) + return GRADE; + if ("SCHL".equals(codeString)) + return SCHL; + if ("SCHLDIV".equals(codeString)) + return SCHLDIV; + if ("TEACHER".equals(codeString)) + return TEACHER; + if ("_PopulationInclusionObservationType".equals(codeString)) + return _POPULATIONINCLUSIONOBSERVATIONTYPE; + if ("DENEX".equals(codeString)) + return DENEX; + if ("DENEXCEP".equals(codeString)) + return DENEXCEP; + if ("DENOM".equals(codeString)) + return DENOM; + if ("IPOP".equals(codeString)) + return IPOP; + if ("IPPOP".equals(codeString)) + return IPPOP; + if ("MSRPOPL".equals(codeString)) + return MSRPOPL; + if ("MSRPOPLEX".equals(codeString)) + return MSRPOPLEX; + if ("NUMER".equals(codeString)) + return NUMER; + if ("NUMEX".equals(codeString)) + return NUMEX; + if ("_PreferenceObservationType".equals(codeString)) + return _PREFERENCEOBSERVATIONTYPE; + if ("PREFSTRENGTH".equals(codeString)) + return PREFSTRENGTH; + if ("ADVERSE_REACTION".equals(codeString)) + return ADVERSEREACTION; + if ("ASSERTION".equals(codeString)) + return ASSERTION; + if ("CASESER".equals(codeString)) + return CASESER; + if ("CDIO".equals(codeString)) + return CDIO; + if ("CRIT".equals(codeString)) + return CRIT; + if ("CTMO".equals(codeString)) + return CTMO; + if ("DX".equals(codeString)) + return DX; + if ("ADMDX".equals(codeString)) + return ADMDX; + if ("DISDX".equals(codeString)) + return DISDX; + if ("INTDX".equals(codeString)) + return INTDX; + if ("NOI".equals(codeString)) + return NOI; + if ("GISTIER".equals(codeString)) + return GISTIER; + if ("HHOBS".equals(codeString)) + return HHOBS; + if ("ISSUE".equals(codeString)) + return ISSUE; + if ("_ActAdministrativeDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVEDETECTEDISSUECODE; + if ("_ActAdministrativeAuthorizationDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE; + if ("NAT".equals(codeString)) + return NAT; + if ("SUPPRESSED".equals(codeString)) + return SUPPRESSED; + if ("VALIDAT".equals(codeString)) + return VALIDAT; + if ("KEY204".equals(codeString)) + return KEY204; + if ("KEY205".equals(codeString)) + return KEY205; + if ("COMPLY".equals(codeString)) + return COMPLY; + if ("DUPTHPY".equals(codeString)) + return DUPTHPY; + if ("DUPTHPCLS".equals(codeString)) + return DUPTHPCLS; + if ("DUPTHPGEN".equals(codeString)) + return DUPTHPGEN; + if ("ABUSE".equals(codeString)) + return ABUSE; + if ("FRAUD".equals(codeString)) + return FRAUD; + if ("PLYDOC".equals(codeString)) + return PLYDOC; + if ("PLYPHRM".equals(codeString)) + return PLYPHRM; + if ("DOSE".equals(codeString)) + return DOSE; + if ("DOSECOND".equals(codeString)) + return DOSECOND; + if ("DOSEDUR".equals(codeString)) + return DOSEDUR; + if ("DOSEDURH".equals(codeString)) + return DOSEDURH; + if ("DOSEDURHIND".equals(codeString)) + return DOSEDURHIND; + if ("DOSEDURL".equals(codeString)) + return DOSEDURL; + if ("DOSEDURLIND".equals(codeString)) + return DOSEDURLIND; + if ("DOSEH".equals(codeString)) + return DOSEH; + if ("DOSEHINDA".equals(codeString)) + return DOSEHINDA; + if ("DOSEHIND".equals(codeString)) + return DOSEHIND; + if ("DOSEHINDSA".equals(codeString)) + return DOSEHINDSA; + if ("DOSEHINDW".equals(codeString)) + return DOSEHINDW; + if ("DOSEIVL".equals(codeString)) + return DOSEIVL; + if ("DOSEIVLIND".equals(codeString)) + return DOSEIVLIND; + if ("DOSEL".equals(codeString)) + return DOSEL; + if ("DOSELINDA".equals(codeString)) + return DOSELINDA; + if ("DOSELIND".equals(codeString)) + return DOSELIND; + if ("DOSELINDSA".equals(codeString)) + return DOSELINDSA; + if ("DOSELINDW".equals(codeString)) + return DOSELINDW; + if ("MDOSE".equals(codeString)) + return MDOSE; + if ("OBSA".equals(codeString)) + return OBSA; + if ("AGE".equals(codeString)) + return AGE; + if ("ADALRT".equals(codeString)) + return ADALRT; + if ("GEALRT".equals(codeString)) + return GEALRT; + if ("PEALRT".equals(codeString)) + return PEALRT; + if ("COND".equals(codeString)) + return COND; + if ("HGHT".equals(codeString)) + return HGHT; + if ("LACT".equals(codeString)) + return LACT; + if ("PREG".equals(codeString)) + return PREG; + if ("WGHT".equals(codeString)) + return WGHT; + if ("CREACT".equals(codeString)) + return CREACT; + if ("GEN".equals(codeString)) + return GEN; + if ("GEND".equals(codeString)) + return GEND; + if ("LAB".equals(codeString)) + return LAB; + if ("REACT".equals(codeString)) + return REACT; + if ("ALGY".equals(codeString)) + return ALGY; + if ("INT".equals(codeString)) + return INT; + if ("RREACT".equals(codeString)) + return RREACT; + if ("RALG".equals(codeString)) + return RALG; + if ("RAR".equals(codeString)) + return RAR; + if ("RINT".equals(codeString)) + return RINT; + if ("BUS".equals(codeString)) + return BUS; + if ("CODE_INVAL".equals(codeString)) + return CODEINVAL; + if ("CODE_DEPREC".equals(codeString)) + return CODEDEPREC; + if ("FORMAT".equals(codeString)) + return FORMAT; + if ("ILLEGAL".equals(codeString)) + return ILLEGAL; + if ("LEN_RANGE".equals(codeString)) + return LENRANGE; + if ("LEN_LONG".equals(codeString)) + return LENLONG; + if ("LEN_SHORT".equals(codeString)) + return LENSHORT; + if ("MISSCOND".equals(codeString)) + return MISSCOND; + if ("MISSMAND".equals(codeString)) + return MISSMAND; + if ("NODUPS".equals(codeString)) + return NODUPS; + if ("NOPERSIST".equals(codeString)) + return NOPERSIST; + if ("REP_RANGE".equals(codeString)) + return REPRANGE; + if ("MAXOCCURS".equals(codeString)) + return MAXOCCURS; + if ("MINOCCURS".equals(codeString)) + return MINOCCURS; + if ("_ActAdministrativeRuleDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVERULEDETECTEDISSUECODE; + if ("KEY206".equals(codeString)) + return KEY206; + if ("OBSOLETE".equals(codeString)) + return OBSOLETE; + if ("_ActSuppliedItemDetectedIssueCode".equals(codeString)) + return _ACTSUPPLIEDITEMDETECTEDISSUECODE; + if ("_AdministrationDetectedIssueCode".equals(codeString)) + return _ADMINISTRATIONDETECTEDISSUECODE; + if ("_AppropriatenessDetectedIssueCode".equals(codeString)) + return _APPROPRIATENESSDETECTEDISSUECODE; + if ("_InteractionDetectedIssueCode".equals(codeString)) + return _INTERACTIONDETECTEDISSUECODE; + if ("FOOD".equals(codeString)) + return FOOD; + if ("TPROD".equals(codeString)) + return TPROD; + if ("DRG".equals(codeString)) + return DRG; + if ("NHP".equals(codeString)) + return NHP; + if ("NONRX".equals(codeString)) + return NONRX; + if ("PREVINEF".equals(codeString)) + return PREVINEF; + if ("DACT".equals(codeString)) + return DACT; + if ("TIME".equals(codeString)) + return TIME; + if ("ALRTENDLATE".equals(codeString)) + return ALRTENDLATE; + if ("ALRTSTRTLATE".equals(codeString)) + return ALRTSTRTLATE; + if ("_TimingDetectedIssueCode".equals(codeString)) + return _TIMINGDETECTEDISSUECODE; + if ("ENDLATE".equals(codeString)) + return ENDLATE; + if ("STRTLATE".equals(codeString)) + return STRTLATE; + if ("_SupplyDetectedIssueCode".equals(codeString)) + return _SUPPLYDETECTEDISSUECODE; + if ("ALLDONE".equals(codeString)) + return ALLDONE; + if ("FULFIL".equals(codeString)) + return FULFIL; + if ("NOTACTN".equals(codeString)) + return NOTACTN; + if ("NOTEQUIV".equals(codeString)) + return NOTEQUIV; + if ("NOTEQUIVGEN".equals(codeString)) + return NOTEQUIVGEN; + if ("NOTEQUIVTHER".equals(codeString)) + return NOTEQUIVTHER; + if ("TIMING".equals(codeString)) + return TIMING; + if ("INTERVAL".equals(codeString)) + return INTERVAL; + if ("MINFREQ".equals(codeString)) + return MINFREQ; + if ("HELD".equals(codeString)) + return HELD; + if ("TOOLATE".equals(codeString)) + return TOOLATE; + if ("TOOSOON".equals(codeString)) + return TOOSOON; + if ("HISTORIC".equals(codeString)) + return HISTORIC; + if ("PATPREF".equals(codeString)) + return PATPREF; + if ("PATPREFALT".equals(codeString)) + return PATPREFALT; + if ("KSUBJ".equals(codeString)) + return KSUBJ; + if ("KSUBT".equals(codeString)) + return KSUBT; + if ("OINT".equals(codeString)) + return OINT; + if ("ALG".equals(codeString)) + return ALG; + if ("DALG".equals(codeString)) + return DALG; + if ("EALG".equals(codeString)) + return EALG; + if ("FALG".equals(codeString)) + return FALG; + if ("DINT".equals(codeString)) + return DINT; + if ("DNAINT".equals(codeString)) + return DNAINT; + if ("EINT".equals(codeString)) + return EINT; + if ("ENAINT".equals(codeString)) + return ENAINT; + if ("FINT".equals(codeString)) + return FINT; + if ("FNAINT".equals(codeString)) + return FNAINT; + if ("NAINT".equals(codeString)) + return NAINT; + if ("SEV".equals(codeString)) + return SEV; + if ("_FDALabelData".equals(codeString)) + return _FDALABELDATA; + if ("FDACOATING".equals(codeString)) + return FDACOATING; + if ("FDACOLOR".equals(codeString)) + return FDACOLOR; + if ("FDAIMPRINTCD".equals(codeString)) + return FDAIMPRINTCD; + if ("FDALOGO".equals(codeString)) + return FDALOGO; + if ("FDASCORING".equals(codeString)) + return FDASCORING; + if ("FDASHAPE".equals(codeString)) + return FDASHAPE; + if ("FDASIZE".equals(codeString)) + return FDASIZE; + if ("_ROIOverlayShape".equals(codeString)) + return _ROIOVERLAYSHAPE; + if ("CIRCLE".equals(codeString)) + return CIRCLE; + if ("ELLIPSE".equals(codeString)) + return ELLIPSE; + if ("POINT".equals(codeString)) + return POINT; + if ("POLY".equals(codeString)) + return POLY; + if ("C".equals(codeString)) + return C; + if ("DIET".equals(codeString)) + return DIET; + if ("BR".equals(codeString)) + return BR; + if ("DM".equals(codeString)) + return DM; + if ("FAST".equals(codeString)) + return FAST; + if ("FORMULA".equals(codeString)) + return FORMULA; + if ("GF".equals(codeString)) + return GF; + if ("LF".equals(codeString)) + return LF; + if ("LP".equals(codeString)) + return LP; + if ("LQ".equals(codeString)) + return LQ; + if ("LS".equals(codeString)) + return LS; + if ("N".equals(codeString)) + return N; + if ("NF".equals(codeString)) + return NF; + if ("PAF".equals(codeString)) + return PAF; + if ("PAR".equals(codeString)) + return PAR; + if ("RD".equals(codeString)) + return RD; + if ("SCH".equals(codeString)) + return SCH; + if ("SUPPLEMENT".equals(codeString)) + return SUPPLEMENT; + if ("T".equals(codeString)) + return T; + if ("VLI".equals(codeString)) + return VLI; + if ("DRUGPRG".equals(codeString)) + return DRUGPRG; + if ("F".equals(codeString)) + return F; + if ("PRLMN".equals(codeString)) + return PRLMN; + if ("SECOBS".equals(codeString)) + return SECOBS; + if ("SECCATOBS".equals(codeString)) + return SECCATOBS; + if ("SECCLASSOBS".equals(codeString)) + return SECCLASSOBS; + if ("SECCONOBS".equals(codeString)) + return SECCONOBS; + if ("SECINTOBS".equals(codeString)) + return SECINTOBS; + if ("SECALTINTOBS".equals(codeString)) + return SECALTINTOBS; + if ("SECDATINTOBS".equals(codeString)) + return SECDATINTOBS; + if ("SECINTCONOBS".equals(codeString)) + return SECINTCONOBS; + if ("SECINTPRVOBS".equals(codeString)) + return SECINTPRVOBS; + if ("SECINTPRVABOBS".equals(codeString)) + return SECINTPRVABOBS; + if ("SECINTPRVRBOBS".equals(codeString)) + return SECINTPRVRBOBS; + if ("SECINTSTOBS".equals(codeString)) + return SECINTSTOBS; + if ("SECTRSTOBS".equals(codeString)) + return SECTRSTOBS; + if ("TRSTACCRDOBS".equals(codeString)) + return TRSTACCRDOBS; + if ("TRSTAGREOBS".equals(codeString)) + return TRSTAGREOBS; + if ("TRSTCERTOBS".equals(codeString)) + return TRSTCERTOBS; + if ("TRSTFWKOBS".equals(codeString)) + return TRSTFWKOBS; + if ("TRSTLOAOBS".equals(codeString)) + return TRSTLOAOBS; + if ("TRSTMECOBS".equals(codeString)) + return TRSTMECOBS; + if ("SUBSIDFFS".equals(codeString)) + return SUBSIDFFS; + if ("WRKCOMP".equals(codeString)) + return WRKCOMP; + if ("_ActProcedureCode".equals(codeString)) + return _ACTPROCEDURECODE; + if ("_ActBillableServiceCode".equals(codeString)) + return _ACTBILLABLESERVICECODE; + if ("_HL7DefinedActCodes".equals(codeString)) + return _HL7DEFINEDACTCODES; + if ("COPAY".equals(codeString)) + return COPAY; + if ("DEDUCT".equals(codeString)) + return DEDUCT; + if ("DOSEIND".equals(codeString)) + return DOSEIND; + if ("PRA".equals(codeString)) + return PRA; + if ("STORE".equals(codeString)) + return STORE; + throw new FHIRException("Unknown V3ActCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTACCOUNTCODE: return "_ActAccountCode"; + case ACCTRECEIVABLE: return "ACCTRECEIVABLE"; + case CASH: return "CASH"; + case CC: return "CC"; + case AE: return "AE"; + case DN: return "DN"; + case DV: return "DV"; + case MC: return "MC"; + case V: return "V"; + case PBILLACCT: return "PBILLACCT"; + case _ACTADJUDICATIONCODE: return "_ActAdjudicationCode"; + case _ACTADJUDICATIONGROUPCODE: return "_ActAdjudicationGroupCode"; + case CONT: return "CONT"; + case DAY: return "DAY"; + case LOC: return "LOC"; + case MONTH: return "MONTH"; + case PERIOD: return "PERIOD"; + case PROV: return "PROV"; + case WEEK: return "WEEK"; + case YEAR: return "YEAR"; + case AA: return "AA"; + case ANF: return "ANF"; + case AR: return "AR"; + case AS: return "AS"; + case _ACTADJUDICATIONRESULTACTIONCODE: return "_ActAdjudicationResultActionCode"; + case DISPLAY: return "DISPLAY"; + case FORM: return "FORM"; + case _ACTBILLABLEMODIFIERCODE: return "_ActBillableModifierCode"; + case CPTM: return "CPTM"; + case HCPCSA: return "HCPCSA"; + case _ACTBILLINGARRANGEMENTCODE: return "_ActBillingArrangementCode"; + case BLK: return "BLK"; + case CAP: return "CAP"; + case CONTF: return "CONTF"; + case FINBILL: return "FINBILL"; + case ROST: return "ROST"; + case SESS: return "SESS"; + case FFS: return "FFS"; + case FFPS: return "FFPS"; + case FFCS: return "FFCS"; + case TFS: return "TFS"; + case _ACTBOUNDEDROICODE: return "_ActBoundedROICode"; + case ROIFS: return "ROIFS"; + case ROIPS: return "ROIPS"; + case _ACTCAREPROVISIONCODE: return "_ActCareProvisionCode"; + case _ACTCREDENTIALEDCARECODE: return "_ActCredentialedCareCode"; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "_ActCredentialedCareProvisionPersonCode"; + case CACC: return "CACC"; + case CAIC: return "CAIC"; + case CAMC: return "CAMC"; + case CANC: return "CANC"; + case CAPC: return "CAPC"; + case CBGC: return "CBGC"; + case CCCC: return "CCCC"; + case CCGC: return "CCGC"; + case CCPC: return "CCPC"; + case CCSC: return "CCSC"; + case CDEC: return "CDEC"; + case CDRC: return "CDRC"; + case CEMC: return "CEMC"; + case CFPC: return "CFPC"; + case CIMC: return "CIMC"; + case CMGC: return "CMGC"; + case CNEC: return "CNEC"; + case CNMC: return "CNMC"; + case CNQC: return "CNQC"; + case CNSC: return "CNSC"; + case COGC: return "COGC"; + case COMC: return "COMC"; + case COPC: return "COPC"; + case COSC: return "COSC"; + case COTC: return "COTC"; + case CPEC: return "CPEC"; + case CPGC: return "CPGC"; + case CPHC: return "CPHC"; + case CPRC: return "CPRC"; + case CPSC: return "CPSC"; + case CPYC: return "CPYC"; + case CROC: return "CROC"; + case CRPC: return "CRPC"; + case CSUC: return "CSUC"; + case CTSC: return "CTSC"; + case CURC: return "CURC"; + case CVSC: return "CVSC"; + case LGPC: return "LGPC"; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "_ActCredentialedCareProvisionProgramCode"; + case AALC: return "AALC"; + case AAMC: return "AAMC"; + case ABHC: return "ABHC"; + case ACAC: return "ACAC"; + case ACHC: return "ACHC"; + case AHOC: return "AHOC"; + case ALTC: return "ALTC"; + case AOSC: return "AOSC"; + case CACS: return "CACS"; + case CAMI: return "CAMI"; + case CAST: return "CAST"; + case CBAR: return "CBAR"; + case CCAD: return "CCAD"; + case CCAR: return "CCAR"; + case CDEP: return "CDEP"; + case CDGD: return "CDGD"; + case CDIA: return "CDIA"; + case CEPI: return "CEPI"; + case CFEL: return "CFEL"; + case CHFC: return "CHFC"; + case CHRO: return "CHRO"; + case CHYP: return "CHYP"; + case CMIH: return "CMIH"; + case CMSC: return "CMSC"; + case COJR: return "COJR"; + case CONC: return "CONC"; + case COPD: return "COPD"; + case CORT: return "CORT"; + case CPAD: return "CPAD"; + case CPND: return "CPND"; + case CPST: return "CPST"; + case CSDM: return "CSDM"; + case CSIC: return "CSIC"; + case CSLD: return "CSLD"; + case CSPT: return "CSPT"; + case CTBU: return "CTBU"; + case CVDC: return "CVDC"; + case CWMA: return "CWMA"; + case CWOH: return "CWOH"; + case _ACTENCOUNTERCODE: return "_ActEncounterCode"; + case AMB: return "AMB"; + case EMER: return "EMER"; + case FLD: return "FLD"; + case HH: return "HH"; + case IMP: return "IMP"; + case ACUTE: return "ACUTE"; + case NONAC: return "NONAC"; + case PRENC: return "PRENC"; + case SS: return "SS"; + case VR: return "VR"; + case _ACTMEDICALSERVICECODE: return "_ActMedicalServiceCode"; + case ALC: return "ALC"; + case CARD: return "CARD"; + case CHR: return "CHR"; + case DNTL: return "DNTL"; + case DRGRHB: return "DRGRHB"; + case GENRL: return "GENRL"; + case MED: return "MED"; + case OBS: return "OBS"; + case ONC: return "ONC"; + case PALL: return "PALL"; + case PED: return "PED"; + case PHAR: return "PHAR"; + case PHYRHB: return "PHYRHB"; + case PSYCH: return "PSYCH"; + case SURG: return "SURG"; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "_ActClaimAttachmentCategoryCode"; + case AUTOATTCH: return "AUTOATTCH"; + case DOCUMENT: return "DOCUMENT"; + case HEALTHREC: return "HEALTHREC"; + case IMG: return "IMG"; + case LABRESULTS: return "LABRESULTS"; + case MODEL: return "MODEL"; + case WIATTCH: return "WIATTCH"; + case XRAY: return "XRAY"; + case _ACTCONSENTTYPE: return "_ActConsentType"; + case ICOL: return "ICOL"; + case IDSCL: return "IDSCL"; + case INFA: return "INFA"; + case INFAO: return "INFAO"; + case INFASO: return "INFASO"; + case IRDSCL: return "IRDSCL"; + case RESEARCH: return "RESEARCH"; + case RSDID: return "RSDID"; + case RSREID: return "RSREID"; + case _ACTCONTAINERREGISTRATIONCODE: return "_ActContainerRegistrationCode"; + case ID: return "ID"; + case IP: return "IP"; + case L: return "L"; + case M: return "M"; + case O: return "O"; + case R: return "R"; + case X: return "X"; + case _ACTCONTROLVARIABLE: return "_ActControlVariable"; + case AUTO: return "AUTO"; + case ENDC: return "ENDC"; + case REFLEX: return "REFLEX"; + case _ACTCOVERAGECONFIRMATIONCODE: return "_ActCoverageConfirmationCode"; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "_ActCoverageAuthorizationConfirmationCode"; + case AUTH: return "AUTH"; + case NAUTH: return "NAUTH"; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "_ActCoverageEligibilityConfirmationCode"; + case ELG: return "ELG"; + case NELG: return "NELG"; + case _ACTCOVERAGELIMITCODE: return "_ActCoverageLimitCode"; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "_ActCoverageQuantityLimitCode"; + case COVPRD: return "COVPRD"; + case LFEMX: return "LFEMX"; + case NETAMT: return "NETAMT"; + case PRDMX: return "PRDMX"; + case UNITPRICE: return "UNITPRICE"; + case UNITQTY: return "UNITQTY"; + case COVMX: return "COVMX"; + case _ACTCOVEREDPARTYLIMITCODE: return "_ActCoveredPartyLimitCode"; + case _ACTCOVERAGETYPECODE: return "_ActCoverageTypeCode"; + case _ACTINSURANCEPOLICYCODE: return "_ActInsurancePolicyCode"; + case EHCPOL: return "EHCPOL"; + case HSAPOL: return "HSAPOL"; + case AUTOPOL: return "AUTOPOL"; + case COL: return "COL"; + case UNINSMOT: return "UNINSMOT"; + case PUBLICPOL: return "PUBLICPOL"; + case DENTPRG: return "DENTPRG"; + case DISEASEPRG: return "DISEASEPRG"; + case CANPRG: return "CANPRG"; + case ENDRENAL: return "ENDRENAL"; + case HIVAIDS: return "HIVAIDS"; + case MANDPOL: return "MANDPOL"; + case MENTPRG: return "MENTPRG"; + case SAFNET: return "SAFNET"; + case SUBPRG: return "SUBPRG"; + case SUBSIDIZ: return "SUBSIDIZ"; + case SUBSIDMC: return "SUBSIDMC"; + case SUBSUPP: return "SUBSUPP"; + case WCBPOL: return "WCBPOL"; + case _ACTINSURANCETYPECODE: return "_ActInsuranceTypeCode"; + case _ACTHEALTHINSURANCETYPECODE: return "_ActHealthInsuranceTypeCode"; + case DENTAL: return "DENTAL"; + case DISEASE: return "DISEASE"; + case DRUGPOL: return "DRUGPOL"; + case HIP: return "HIP"; + case LTC: return "LTC"; + case MCPOL: return "MCPOL"; + case POS: return "POS"; + case HMO: return "HMO"; + case PPO: return "PPO"; + case MENTPOL: return "MENTPOL"; + case SUBPOL: return "SUBPOL"; + case VISPOL: return "VISPOL"; + case DIS: return "DIS"; + case EWB: return "EWB"; + case FLEXP: return "FLEXP"; + case LIFE: return "LIFE"; + case ANNU: return "ANNU"; + case TLIFE: return "TLIFE"; + case ULIFE: return "ULIFE"; + case PNC: return "PNC"; + case REI: return "REI"; + case SURPL: return "SURPL"; + case UMBRL: return "UMBRL"; + case _ACTPROGRAMTYPECODE: return "_ActProgramTypeCode"; + case CHAR: return "CHAR"; + case CRIME: return "CRIME"; + case EAP: return "EAP"; + case GOVEMP: return "GOVEMP"; + case HIRISK: return "HIRISK"; + case IND: return "IND"; + case MILITARY: return "MILITARY"; + case RETIRE: return "RETIRE"; + case SOCIAL: return "SOCIAL"; + case VET: return "VET"; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "_ActDetectedIssueManagementCode"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "_ActAdministrativeDetectedIssueManagementCode"; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "_AuthorizationIssueManagementCode"; + case EMAUTH: return "EMAUTH"; + case _21: return "21"; + case _1: return "1"; + case _19: return "19"; + case _2: return "2"; + case _22: return "22"; + case _23: return "23"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _20: return "20"; + case _8: return "8"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _9: return "9"; + case _ACTEXPOSURECODE: return "_ActExposureCode"; + case CHLDCARE: return "CHLDCARE"; + case CONVEYNC: return "CONVEYNC"; + case HLTHCARE: return "HLTHCARE"; + case HOMECARE: return "HOMECARE"; + case HOSPPTNT: return "HOSPPTNT"; + case HOSPVSTR: return "HOSPVSTR"; + case HOUSEHLD: return "HOUSEHLD"; + case INMATE: return "INMATE"; + case INTIMATE: return "INTIMATE"; + case LTRMCARE: return "LTRMCARE"; + case PLACE: return "PLACE"; + case PTNTCARE: return "PTNTCARE"; + case SCHOOL2: return "SCHOOL2"; + case SOCIAL2: return "SOCIAL2"; + case SUBSTNCE: return "SUBSTNCE"; + case TRAVINT: return "TRAVINT"; + case WORK2: return "WORK2"; + case _ACTFINANCIALTRANSACTIONCODE: return "_ActFinancialTransactionCode"; + case CHRG: return "CHRG"; + case REV: return "REV"; + case _ACTINCIDENTCODE: return "_ActIncidentCode"; + case MVA: return "MVA"; + case SCHOOL: return "SCHOOL"; + case SPT: return "SPT"; + case WPA: return "WPA"; + case _ACTINFORMATIONACCESSCODE: return "_ActInformationAccessCode"; + case ACADR: return "ACADR"; + case ACALL: return "ACALL"; + case ACALLG: return "ACALLG"; + case ACCONS: return "ACCONS"; + case ACDEMO: return "ACDEMO"; + case ACDI: return "ACDI"; + case ACIMMUN: return "ACIMMUN"; + case ACLAB: return "ACLAB"; + case ACMED: return "ACMED"; + case ACMEDC: return "ACMEDC"; + case ACMEN: return "ACMEN"; + case ACOBS: return "ACOBS"; + case ACPOLPRG: return "ACPOLPRG"; + case ACPROV: return "ACPROV"; + case ACPSERV: return "ACPSERV"; + case ACSUBSTAB: return "ACSUBSTAB"; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "_ActInformationAccessContextCode"; + case INFAUT: return "INFAUT"; + case INFCON: return "INFCON"; + case INFCRT: return "INFCRT"; + case INFDNG: return "INFDNG"; + case INFEMER: return "INFEMER"; + case INFPWR: return "INFPWR"; + case INFREG: return "INFREG"; + case _ACTINFORMATIONCATEGORYCODE: return "_ActInformationCategoryCode"; + case ALLCAT: return "ALLCAT"; + case ALLGCAT: return "ALLGCAT"; + case ARCAT: return "ARCAT"; + case COBSCAT: return "COBSCAT"; + case DEMOCAT: return "DEMOCAT"; + case DICAT: return "DICAT"; + case IMMUCAT: return "IMMUCAT"; + case LABCAT: return "LABCAT"; + case MEDCCAT: return "MEDCCAT"; + case MENCAT: return "MENCAT"; + case PSVCCAT: return "PSVCCAT"; + case RXCAT: return "RXCAT"; + case _ACTINVOICEELEMENTCODE: return "_ActInvoiceElementCode"; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "_ActInvoiceAdjudicationPaymentCode"; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "_ActInvoiceAdjudicationPaymentGroupCode"; + case ALEC: return "ALEC"; + case BONUS: return "BONUS"; + case CFWD: return "CFWD"; + case EDU: return "EDU"; + case EPYMT: return "EPYMT"; + case GARN: return "GARN"; + case INVOICE: return "INVOICE"; + case PINV: return "PINV"; + case PPRD: return "PPRD"; + case PROA: return "PROA"; + case RECOV: return "RECOV"; + case RETRO: return "RETRO"; + case TRAN: return "TRAN"; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "_ActInvoiceAdjudicationPaymentSummaryCode"; + case INVTYPE: return "INVTYPE"; + case PAYEE: return "PAYEE"; + case PAYOR: return "PAYOR"; + case SENDAPP: return "SENDAPP"; + case _ACTINVOICEDETAILCODE: return "_ActInvoiceDetailCode"; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "_ActInvoiceDetailClinicalProductCode"; + case UNSPSC: return "UNSPSC"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "_ActInvoiceDetailDrugProductCode"; + case GTIN: return "GTIN"; + case UPC: return "UPC"; + case _ACTINVOICEDETAILGENERICCODE: return "_ActInvoiceDetailGenericCode"; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "_ActInvoiceDetailGenericAdjudicatorCode"; + case COIN: return "COIN"; + case COPAYMENT: return "COPAYMENT"; + case DEDUCTIBLE: return "DEDUCTIBLE"; + case PAY: return "PAY"; + case SPEND: return "SPEND"; + case COINS: return "COINS"; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "_ActInvoiceDetailGenericModifierCode"; + case AFTHRS: return "AFTHRS"; + case ISOL: return "ISOL"; + case OOO: return "OOO"; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "_ActInvoiceDetailGenericProviderCode"; + case CANCAPT: return "CANCAPT"; + case DSC: return "DSC"; + case ESA: return "ESA"; + case FFSTOP: return "FFSTOP"; + case FNLFEE: return "FNLFEE"; + case FRSTFEE: return "FRSTFEE"; + case MARKUP: return "MARKUP"; + case MISSAPT: return "MISSAPT"; + case PERFEE: return "PERFEE"; + case PERMBNS: return "PERMBNS"; + case RESTOCK: return "RESTOCK"; + case TRAVEL: return "TRAVEL"; + case URGENT: return "URGENT"; + case _ACTINVOICEDETAILTAXCODE: return "_ActInvoiceDetailTaxCode"; + case FST: return "FST"; + case HST: return "HST"; + case PST: return "PST"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "_ActInvoiceDetailPreferredAccommodationCode"; + case _ACTENCOUNTERACCOMMODATIONCODE: return "_ActEncounterAccommodationCode"; + case _HL7ACCOMMODATIONCODE: return "_HL7AccommodationCode"; + case I: return "I"; + case P: return "P"; + case S: return "S"; + case SP: return "SP"; + case W: return "W"; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "_ActInvoiceDetailClinicalServiceCode"; + case _ACTINVOICEGROUPCODE: return "_ActInvoiceGroupCode"; + case _ACTINVOICEINTERGROUPCODE: return "_ActInvoiceInterGroupCode"; + case CPNDDRGING: return "CPNDDRGING"; + case CPNDINDING: return "CPNDINDING"; + case CPNDSUPING: return "CPNDSUPING"; + case DRUGING: return "DRUGING"; + case FRAMEING: return "FRAMEING"; + case LENSING: return "LENSING"; + case PRDING: return "PRDING"; + case _ACTINVOICEROOTGROUPCODE: return "_ActInvoiceRootGroupCode"; + case CPINV: return "CPINV"; + case CSINV: return "CSINV"; + case CSPINV: return "CSPINV"; + case FININV: return "FININV"; + case OHSINV: return "OHSINV"; + case PAINV: return "PAINV"; + case RXCINV: return "RXCINV"; + case RXDINV: return "RXDINV"; + case SBFINV: return "SBFINV"; + case VRXINV: return "VRXINV"; + case _ACTINVOICEELEMENTSUMMARYCODE: return "_ActInvoiceElementSummaryCode"; + case _INVOICEELEMENTADJUDICATED: return "_InvoiceElementAdjudicated"; + case ADNFPPELAT: return "ADNFPPELAT"; + case ADNFPPELCT: return "ADNFPPELCT"; + case ADNFPPMNAT: return "ADNFPPMNAT"; + case ADNFPPMNCT: return "ADNFPPMNCT"; + case ADNFSPELAT: return "ADNFSPELAT"; + case ADNFSPELCT: return "ADNFSPELCT"; + case ADNFSPMNAT: return "ADNFSPMNAT"; + case ADNFSPMNCT: return "ADNFSPMNCT"; + case ADNPPPELAT: return "ADNPPPELAT"; + case ADNPPPELCT: return "ADNPPPELCT"; + case ADNPPPMNAT: return "ADNPPPMNAT"; + case ADNPPPMNCT: return "ADNPPPMNCT"; + case ADNPSPELAT: return "ADNPSPELAT"; + case ADNPSPELCT: return "ADNPSPELCT"; + case ADNPSPMNAT: return "ADNPSPMNAT"; + case ADNPSPMNCT: return "ADNPSPMNCT"; + case ADPPPPELAT: return "ADPPPPELAT"; + case ADPPPPELCT: return "ADPPPPELCT"; + case ADPPPPMNAT: return "ADPPPPMNAT"; + case ADPPPPMNCT: return "ADPPPPMNCT"; + case ADPPSPELAT: return "ADPPSPELAT"; + case ADPPSPELCT: return "ADPPSPELCT"; + case ADPPSPMNAT: return "ADPPSPMNAT"; + case ADPPSPMNCT: return "ADPPSPMNCT"; + case ADRFPPELAT: return "ADRFPPELAT"; + case ADRFPPELCT: return "ADRFPPELCT"; + case ADRFPPMNAT: return "ADRFPPMNAT"; + case ADRFPPMNCT: return "ADRFPPMNCT"; + case ADRFSPELAT: return "ADRFSPELAT"; + case ADRFSPELCT: return "ADRFSPELCT"; + case ADRFSPMNAT: return "ADRFSPMNAT"; + case ADRFSPMNCT: return "ADRFSPMNCT"; + case _INVOICEELEMENTPAID: return "_InvoiceElementPaid"; + case PDNFPPELAT: return "PDNFPPELAT"; + case PDNFPPELCT: return "PDNFPPELCT"; + case PDNFPPMNAT: return "PDNFPPMNAT"; + case PDNFPPMNCT: return "PDNFPPMNCT"; + case PDNFSPELAT: return "PDNFSPELAT"; + case PDNFSPELCT: return "PDNFSPELCT"; + case PDNFSPMNAT: return "PDNFSPMNAT"; + case PDNFSPMNCT: return "PDNFSPMNCT"; + case PDNPPPELAT: return "PDNPPPELAT"; + case PDNPPPELCT: return "PDNPPPELCT"; + case PDNPPPMNAT: return "PDNPPPMNAT"; + case PDNPPPMNCT: return "PDNPPPMNCT"; + case PDNPSPELAT: return "PDNPSPELAT"; + case PDNPSPELCT: return "PDNPSPELCT"; + case PDNPSPMNAT: return "PDNPSPMNAT"; + case PDNPSPMNCT: return "PDNPSPMNCT"; + case PDPPPPELAT: return "PDPPPPELAT"; + case PDPPPPELCT: return "PDPPPPELCT"; + case PDPPPPMNAT: return "PDPPPPMNAT"; + case PDPPPPMNCT: return "PDPPPPMNCT"; + case PDPPSPELAT: return "PDPPSPELAT"; + case PDPPSPELCT: return "PDPPSPELCT"; + case PDPPSPMNAT: return "PDPPSPMNAT"; + case PDPPSPMNCT: return "PDPPSPMNCT"; + case _INVOICEELEMENTSUBMITTED: return "_InvoiceElementSubmitted"; + case SBBLELAT: return "SBBLELAT"; + case SBBLELCT: return "SBBLELCT"; + case SBNFELAT: return "SBNFELAT"; + case SBNFELCT: return "SBNFELCT"; + case SBPDELAT: return "SBPDELAT"; + case SBPDELCT: return "SBPDELCT"; + case _ACTINVOICEOVERRIDECODE: return "_ActInvoiceOverrideCode"; + case COVGE: return "COVGE"; + case EFORM: return "EFORM"; + case FAX: return "FAX"; + case GFTH: return "GFTH"; + case LATE: return "LATE"; + case MANUAL: return "MANUAL"; + case OOJ: return "OOJ"; + case ORTHO: return "ORTHO"; + case PAPER: return "PAPER"; + case PIE: return "PIE"; + case PYRDELAY: return "PYRDELAY"; + case REFNR: return "REFNR"; + case REPSERV: return "REPSERV"; + case UNRELAT: return "UNRELAT"; + case VERBAUTH: return "VERBAUTH"; + case _ACTLISTCODE: return "_ActListCode"; + case _ACTOBSERVATIONLIST: return "_ActObservationList"; + case CARELIST: return "CARELIST"; + case CONDLIST: return "CONDLIST"; + case INTOLIST: return "INTOLIST"; + case PROBLIST: return "PROBLIST"; + case RISKLIST: return "RISKLIST"; + case GOALLIST: return "GOALLIST"; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "_ActTherapyDurationWorkingListCode"; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "_ActMedicationTherapyDurationWorkingListCode"; + case ACU: return "ACU"; + case CHRON: return "CHRON"; + case ONET: return "ONET"; + case PRN: return "PRN"; + case MEDLIST: return "MEDLIST"; + case CURMEDLIST: return "CURMEDLIST"; + case DISCMEDLIST: return "DISCMEDLIST"; + case HISTMEDLIST: return "HISTMEDLIST"; + case _ACTMONITORINGPROTOCOLCODE: return "_ActMonitoringProtocolCode"; + case CTLSUB: return "CTLSUB"; + case INV: return "INV"; + case LU: return "LU"; + case OTC: return "OTC"; + case RX: return "RX"; + case SA: return "SA"; + case SAC: return "SAC"; + case _ACTNONOBSERVATIONINDICATIONCODE: return "_ActNonObservationIndicationCode"; + case IND01: return "IND01"; + case IND02: return "IND02"; + case IND03: return "IND03"; + case IND04: return "IND04"; + case IND05: return "IND05"; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "_ActObservationVerificationType"; + case VFPAPER: return "VFPAPER"; + case _ACTPAYMENTCODE: return "_ActPaymentCode"; + case ACH: return "ACH"; + case CHK: return "CHK"; + case DDP: return "DDP"; + case NON: return "NON"; + case _ACTPHARMACYSUPPLYTYPE: return "_ActPharmacySupplyType"; + case DF: return "DF"; + case EM: return "EM"; + case SO: return "SO"; + case FF: return "FF"; + case FFC: return "FFC"; + case FFP: return "FFP"; + case FFSS: return "FFSS"; + case TF: return "TF"; + case FS: return "FS"; + case MS: return "MS"; + case RF: return "RF"; + case UD: return "UD"; + case RFC: return "RFC"; + case RFCS: return "RFCS"; + case RFF: return "RFF"; + case RFFS: return "RFFS"; + case RFP: return "RFP"; + case RFPS: return "RFPS"; + case RFS: return "RFS"; + case TB: return "TB"; + case TBS: return "TBS"; + case UDE: return "UDE"; + case _ACTPOLICYTYPE: return "_ActPolicyType"; + case _ACTPRIVACYPOLICY: return "_ActPrivacyPolicy"; + case _ACTCONSENTDIRECTIVE: return "_ActConsentDirective"; + case EMRGONLY: return "EMRGONLY"; + case NOPP: return "NOPP"; + case OPTIN: return "OPTIN"; + case OPTOUT: return "OPTOUT"; + case _INFORMATIONSENSITIVITYPOLICY: return "_InformationSensitivityPolicy"; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "_ActInformationSensitivityPolicy"; + case ETH: return "ETH"; + case GDIS: return "GDIS"; + case HIV: return "HIV"; + case PSY: return "PSY"; + case SCA: return "SCA"; + case SDV: return "SDV"; + case SEX: return "SEX"; + case STD: return "STD"; + case TBOO: return "TBOO"; + case SICKLE: return "SICKLE"; + case _ENTITYSENSITIVITYPOLICYTYPE: return "_EntitySensitivityPolicyType"; + case DEMO: return "DEMO"; + case DOB: return "DOB"; + case GENDER: return "GENDER"; + case LIVARG: return "LIVARG"; + case MARST: return "MARST"; + case RACE: return "RACE"; + case REL: return "REL"; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "_RoleInformationSensitivityPolicy"; + case B: return "B"; + case EMPL: return "EMPL"; + case LOCIS: return "LOCIS"; + case SSP: return "SSP"; + case ADOL: return "ADOL"; + case CEL: return "CEL"; + case DIA: return "DIA"; + case DRGIS: return "DRGIS"; + case EMP: return "EMP"; + case PDS: return "PDS"; + case PRS: return "PRS"; + case COMPT: return "COMPT"; + case HRCOMPT: return "HRCOMPT"; + case RESCOMPT: return "RESCOMPT"; + case RMGTCOMPT: return "RMGTCOMPT"; + case ACTTRUSTPOLICYTYPE: return "ActTrustPolicyType"; + case TRSTACCRD: return "TRSTACCRD"; + case TRSTAGRE: return "TRSTAGRE"; + case TRSTASSUR: return "TRSTASSUR"; + case TRSTCERT: return "TRSTCERT"; + case TRSTFWK: return "TRSTFWK"; + case TRSTMEC: return "TRSTMEC"; + case COVPOL: return "COVPOL"; + case SECURITYPOLICY: return "SecurityPolicy"; + case OBLIGATIONPOLICY: return "ObligationPolicy"; + case ANONY: return "ANONY"; + case AOD: return "AOD"; + case AUDIT: return "AUDIT"; + case AUDTR: return "AUDTR"; + case CPLYCC: return "CPLYCC"; + case CPLYCD: return "CPLYCD"; + case CPLYJPP: return "CPLYJPP"; + case CPLYOPP: return "CPLYOPP"; + case CPLYOSP: return "CPLYOSP"; + case CPLYPOL: return "CPLYPOL"; + case DEID: return "DEID"; + case DELAU: return "DELAU"; + case ENCRYPT: return "ENCRYPT"; + case ENCRYPTR: return "ENCRYPTR"; + case ENCRYPTT: return "ENCRYPTT"; + case ENCRYPTU: return "ENCRYPTU"; + case HUAPRV: return "HUAPRV"; + case MASK: return "MASK"; + case MINEC: return "MINEC"; + case PRIVMARK: return "PRIVMARK"; + case PSEUD: return "PSEUD"; + case REDACT: return "REDACT"; + case REFRAINPOLICY: return "RefrainPolicy"; + case NOAUTH: return "NOAUTH"; + case NOCOLLECT: return "NOCOLLECT"; + case NODSCLCD: return "NODSCLCD"; + case NODSCLCDS: return "NODSCLCDS"; + case NOINTEGRATE: return "NOINTEGRATE"; + case NOLIST: return "NOLIST"; + case NOMOU: return "NOMOU"; + case NOORGPOL: return "NOORGPOL"; + case NOPAT: return "NOPAT"; + case NOPERSISTP: return "NOPERSISTP"; + case NORDSCLCD: return "NORDSCLCD"; + case NORDSCLCDS: return "NORDSCLCDS"; + case NORDSCLW: return "NORDSCLW"; + case NORELINK: return "NORELINK"; + case NOREUSE: return "NOREUSE"; + case NOVIP: return "NOVIP"; + case ORCON: return "ORCON"; + case _ACTPRODUCTACQUISITIONCODE: return "_ActProductAcquisitionCode"; + case LOAN: return "LOAN"; + case RENT: return "RENT"; + case TRANSFER: return "TRANSFER"; + case SALE: return "SALE"; + case _ACTSPECIMENTRANSPORTCODE: return "_ActSpecimenTransportCode"; + case SREC: return "SREC"; + case SSTOR: return "SSTOR"; + case STRAN: return "STRAN"; + case _ACTSPECIMENTREATMENTCODE: return "_ActSpecimenTreatmentCode"; + case ACID: return "ACID"; + case ALK: return "ALK"; + case DEFB: return "DEFB"; + case FILT: return "FILT"; + case LDLP: return "LDLP"; + case NEUT: return "NEUT"; + case RECA: return "RECA"; + case UFIL: return "UFIL"; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "_ActSubstanceAdministrationCode"; + case DRUG: return "DRUG"; + case FD: return "FD"; + case IMMUNIZ: return "IMMUNIZ"; + case BOOSTER: return "BOOSTER"; + case INITIMMUNIZ: return "INITIMMUNIZ"; + case _ACTTASKCODE: return "_ActTaskCode"; + case OE: return "OE"; + case LABOE: return "LABOE"; + case MEDOE: return "MEDOE"; + case PATDOC: return "PATDOC"; + case ALLERLREV: return "ALLERLREV"; + case CLINNOTEE: return "CLINNOTEE"; + case DIAGLISTE: return "DIAGLISTE"; + case DISCHINSTE: return "DISCHINSTE"; + case DISCHSUME: return "DISCHSUME"; + case PATEDUE: return "PATEDUE"; + case PATREPE: return "PATREPE"; + case PROBLISTE: return "PROBLISTE"; + case RADREPE: return "RADREPE"; + case IMMLREV: return "IMMLREV"; + case REMLREV: return "REMLREV"; + case WELLREMLREV: return "WELLREMLREV"; + case PATINFO: return "PATINFO"; + case ALLERLE: return "ALLERLE"; + case CDSREV: return "CDSREV"; + case CLINNOTEREV: return "CLINNOTEREV"; + case DISCHSUMREV: return "DISCHSUMREV"; + case DIAGLISTREV: return "DIAGLISTREV"; + case IMMLE: return "IMMLE"; + case LABRREV: return "LABRREV"; + case MICRORREV: return "MICRORREV"; + case MICROORGRREV: return "MICROORGRREV"; + case MICROSENSRREV: return "MICROSENSRREV"; + case MLREV: return "MLREV"; + case MARWLREV: return "MARWLREV"; + case OREV: return "OREV"; + case PATREPREV: return "PATREPREV"; + case PROBLISTREV: return "PROBLISTREV"; + case RADREPREV: return "RADREPREV"; + case REMLE: return "REMLE"; + case WELLREMLE: return "WELLREMLE"; + case RISKASSESS: return "RISKASSESS"; + case FALLRISK: return "FALLRISK"; + case _ACTTRANSPORTATIONMODECODE: return "_ActTransportationModeCode"; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "_ActPatientTransportationModeCode"; + case AFOOT: return "AFOOT"; + case AMBT: return "AMBT"; + case AMBAIR: return "AMBAIR"; + case AMBGRND: return "AMBGRND"; + case AMBHELO: return "AMBHELO"; + case LAWENF: return "LAWENF"; + case PRVTRN: return "PRVTRN"; + case PUBTRN: return "PUBTRN"; + case _OBSERVATIONTYPE: return "_ObservationType"; + case _ACTSPECOBSCODE: return "_ActSpecObsCode"; + case ARTBLD: return "ARTBLD"; + case DILUTION: return "DILUTION"; + case AUTOHIGH: return "AUTO-HIGH"; + case AUTOLOW: return "AUTO-LOW"; + case PRE: return "PRE"; + case RERUN: return "RERUN"; + case EVNFCTS: return "EVNFCTS"; + case INTFR: return "INTFR"; + case FIBRIN: return "FIBRIN"; + case HEMOLYSIS: return "HEMOLYSIS"; + case ICTERUS: return "ICTERUS"; + case LIPEMIA: return "LIPEMIA"; + case VOLUME: return "VOLUME"; + case AVAILABLE: return "AVAILABLE"; + case CONSUMPTION: return "CONSUMPTION"; + case CURRENT: return "CURRENT"; + case INITIAL: return "INITIAL"; + case _ANNOTATIONTYPE: return "_AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "_ActPatientAnnotationType"; + case ANNDI: return "ANNDI"; + case ANNGEN: return "ANNGEN"; + case ANNIMM: return "ANNIMM"; + case ANNLAB: return "ANNLAB"; + case ANNMED: return "ANNMED"; + case _GENETICOBSERVATIONTYPE: return "_GeneticObservationType"; + case GENE: return "GENE"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "_ImmunizationObservationType"; + case OBSANTC: return "OBSANTC"; + case OBSANTV: return "OBSANTV"; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "_IndividualCaseSafetyReportType"; + case PATADVEVNT: return "PAT_ADV_EVNT"; + case VACPROBLEM: return "VAC_PROBLEM"; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "_LOINCObservationActContextAgeType"; + case _216119: return "21611-9"; + case _216127: return "21612-7"; + case _295535: return "29553-5"; + case _305250: return "30525-0"; + case _309724: return "30972-4"; + case _MEDICATIONOBSERVATIONTYPE: return "_MedicationObservationType"; + case REPHALFLIFE: return "REP_HALF_LIFE"; + case SPLCOATING: return "SPLCOATING"; + case SPLCOLOR: return "SPLCOLOR"; + case SPLIMAGE: return "SPLIMAGE"; + case SPLIMPRINT: return "SPLIMPRINT"; + case SPLSCORING: return "SPLSCORING"; + case SPLSHAPE: return "SPLSHAPE"; + case SPLSIZE: return "SPLSIZE"; + case SPLSYMBOL: return "SPLSYMBOL"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "_ObservationIssueTriggerCodedObservationType"; + case _CASETRANSMISSIONMODE: return "_CaseTransmissionMode"; + case AIRTRNS: return "AIRTRNS"; + case ANANTRNS: return "ANANTRNS"; + case ANHUMTRNS: return "ANHUMTRNS"; + case BDYFLDTRNS: return "BDYFLDTRNS"; + case BLDTRNS: return "BLDTRNS"; + case DERMTRNS: return "DERMTRNS"; + case ENVTRNS: return "ENVTRNS"; + case FECTRNS: return "FECTRNS"; + case FOMTRNS: return "FOMTRNS"; + case FOODTRNS: return "FOODTRNS"; + case HUMHUMTRNS: return "HUMHUMTRNS"; + case INDTRNS: return "INDTRNS"; + case LACTTRNS: return "LACTTRNS"; + case NOSTRNS: return "NOSTRNS"; + case PARTRNS: return "PARTRNS"; + case PLACTRNS: return "PLACTRNS"; + case SEXTRNS: return "SEXTRNS"; + case TRNSFTRNS: return "TRNSFTRNS"; + case VECTRNS: return "VECTRNS"; + case WATTRNS: return "WATTRNS"; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "_ObservationQualityMeasureAttribute"; + case AGGREGATE: return "AGGREGATE"; + case COPY: return "COPY"; + case CRS: return "CRS"; + case DEF: return "DEF"; + case DISC: return "DISC"; + case FINALDT: return "FINALDT"; + case GUIDE: return "GUIDE"; + case IDUR: return "IDUR"; + case ITMCNT: return "ITMCNT"; + case KEY: return "KEY"; + case MEDT: return "MEDT"; + case MSD: return "MSD"; + case MSRADJ: return "MSRADJ"; + case MSRAGG: return "MSRAGG"; + case MSRIMPROV: return "MSRIMPROV"; + case MSRJUR: return "MSRJUR"; + case MSRRPTR: return "MSRRPTR"; + case MSRRPTTIME: return "MSRRPTTIME"; + case MSRSCORE: return "MSRSCORE"; + case MSRSET: return "MSRSET"; + case MSRTOPIC: return "MSRTOPIC"; + case MSRTP: return "MSRTP"; + case MSRTYPE: return "MSRTYPE"; + case RAT: return "RAT"; + case REF: return "REF"; + case SDE: return "SDE"; + case STRAT: return "STRAT"; + case TRANF: return "TRANF"; + case USE: return "USE"; + case _OBSERVATIONSEQUENCETYPE: return "_ObservationSequenceType"; + case TIMEABSOLUTE: return "TIME_ABSOLUTE"; + case TIMERELATIVE: return "TIME_RELATIVE"; + case _OBSERVATIONSERIESTYPE: return "_ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "_ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "REPRESENTATIVE_BEAT"; + case RHYTHM: return "RHYTHM"; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "_PatientImmunizationRelatedObservationType"; + case CLSSRM: return "CLSSRM"; + case GRADE: return "GRADE"; + case SCHL: return "SCHL"; + case SCHLDIV: return "SCHLDIV"; + case TEACHER: return "TEACHER"; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "_PopulationInclusionObservationType"; + case DENEX: return "DENEX"; + case DENEXCEP: return "DENEXCEP"; + case DENOM: return "DENOM"; + case IPOP: return "IPOP"; + case IPPOP: return "IPPOP"; + case MSRPOPL: return "MSRPOPL"; + case MSRPOPLEX: return "MSRPOPLEX"; + case NUMER: return "NUMER"; + case NUMEX: return "NUMEX"; + case _PREFERENCEOBSERVATIONTYPE: return "_PreferenceObservationType"; + case PREFSTRENGTH: return "PREFSTRENGTH"; + case ADVERSEREACTION: return "ADVERSE_REACTION"; + case ASSERTION: return "ASSERTION"; + case CASESER: return "CASESER"; + case CDIO: return "CDIO"; + case CRIT: return "CRIT"; + case CTMO: return "CTMO"; + case DX: return "DX"; + case ADMDX: return "ADMDX"; + case DISDX: return "DISDX"; + case INTDX: return "INTDX"; + case NOI: return "NOI"; + case GISTIER: return "GISTIER"; + case HHOBS: return "HHOBS"; + case ISSUE: return "ISSUE"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "_ActAdministrativeDetectedIssueCode"; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "_ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "NAT"; + case SUPPRESSED: return "SUPPRESSED"; + case VALIDAT: return "VALIDAT"; + case KEY204: return "KEY204"; + case KEY205: return "KEY205"; + case COMPLY: return "COMPLY"; + case DUPTHPY: return "DUPTHPY"; + case DUPTHPCLS: return "DUPTHPCLS"; + case DUPTHPGEN: return "DUPTHPGEN"; + case ABUSE: return "ABUSE"; + case FRAUD: return "FRAUD"; + case PLYDOC: return "PLYDOC"; + case PLYPHRM: return "PLYPHRM"; + case DOSE: return "DOSE"; + case DOSECOND: return "DOSECOND"; + case DOSEDUR: return "DOSEDUR"; + case DOSEDURH: return "DOSEDURH"; + case DOSEDURHIND: return "DOSEDURHIND"; + case DOSEDURL: return "DOSEDURL"; + case DOSEDURLIND: return "DOSEDURLIND"; + case DOSEH: return "DOSEH"; + case DOSEHINDA: return "DOSEHINDA"; + case DOSEHIND: return "DOSEHIND"; + case DOSEHINDSA: return "DOSEHINDSA"; + case DOSEHINDW: return "DOSEHINDW"; + case DOSEIVL: return "DOSEIVL"; + case DOSEIVLIND: return "DOSEIVLIND"; + case DOSEL: return "DOSEL"; + case DOSELINDA: return "DOSELINDA"; + case DOSELIND: return "DOSELIND"; + case DOSELINDSA: return "DOSELINDSA"; + case DOSELINDW: return "DOSELINDW"; + case MDOSE: return "MDOSE"; + case OBSA: return "OBSA"; + case AGE: return "AGE"; + case ADALRT: return "ADALRT"; + case GEALRT: return "GEALRT"; + case PEALRT: return "PEALRT"; + case COND: return "COND"; + case HGHT: return "HGHT"; + case LACT: return "LACT"; + case PREG: return "PREG"; + case WGHT: return "WGHT"; + case CREACT: return "CREACT"; + case GEN: return "GEN"; + case GEND: return "GEND"; + case LAB: return "LAB"; + case REACT: return "REACT"; + case ALGY: return "ALGY"; + case INT: return "INT"; + case RREACT: return "RREACT"; + case RALG: return "RALG"; + case RAR: return "RAR"; + case RINT: return "RINT"; + case BUS: return "BUS"; + case CODEINVAL: return "CODE_INVAL"; + case CODEDEPREC: return "CODE_DEPREC"; + case FORMAT: return "FORMAT"; + case ILLEGAL: return "ILLEGAL"; + case LENRANGE: return "LEN_RANGE"; + case LENLONG: return "LEN_LONG"; + case LENSHORT: return "LEN_SHORT"; + case MISSCOND: return "MISSCOND"; + case MISSMAND: return "MISSMAND"; + case NODUPS: return "NODUPS"; + case NOPERSIST: return "NOPERSIST"; + case REPRANGE: return "REP_RANGE"; + case MAXOCCURS: return "MAXOCCURS"; + case MINOCCURS: return "MINOCCURS"; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "_ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "KEY206"; + case OBSOLETE: return "OBSOLETE"; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "_ActSuppliedItemDetectedIssueCode"; + case _ADMINISTRATIONDETECTEDISSUECODE: return "_AdministrationDetectedIssueCode"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "_AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "_InteractionDetectedIssueCode"; + case FOOD: return "FOOD"; + case TPROD: return "TPROD"; + case DRG: return "DRG"; + case NHP: return "NHP"; + case NONRX: return "NONRX"; + case PREVINEF: return "PREVINEF"; + case DACT: return "DACT"; + case TIME: return "TIME"; + case ALRTENDLATE: return "ALRTENDLATE"; + case ALRTSTRTLATE: return "ALRTSTRTLATE"; + case _TIMINGDETECTEDISSUECODE: return "_TimingDetectedIssueCode"; + case ENDLATE: return "ENDLATE"; + case STRTLATE: return "STRTLATE"; + case _SUPPLYDETECTEDISSUECODE: return "_SupplyDetectedIssueCode"; + case ALLDONE: return "ALLDONE"; + case FULFIL: return "FULFIL"; + case NOTACTN: return "NOTACTN"; + case NOTEQUIV: return "NOTEQUIV"; + case NOTEQUIVGEN: return "NOTEQUIVGEN"; + case NOTEQUIVTHER: return "NOTEQUIVTHER"; + case TIMING: return "TIMING"; + case INTERVAL: return "INTERVAL"; + case MINFREQ: return "MINFREQ"; + case HELD: return "HELD"; + case TOOLATE: return "TOOLATE"; + case TOOSOON: return "TOOSOON"; + case HISTORIC: return "HISTORIC"; + case PATPREF: return "PATPREF"; + case PATPREFALT: return "PATPREFALT"; + case KSUBJ: return "KSUBJ"; + case KSUBT: return "KSUBT"; + case OINT: return "OINT"; + case ALG: return "ALG"; + case DALG: return "DALG"; + case EALG: return "EALG"; + case FALG: return "FALG"; + case DINT: return "DINT"; + case DNAINT: return "DNAINT"; + case EINT: return "EINT"; + case ENAINT: return "ENAINT"; + case FINT: return "FINT"; + case FNAINT: return "FNAINT"; + case NAINT: return "NAINT"; + case SEV: return "SEV"; + case _FDALABELDATA: return "_FDALabelData"; + case FDACOATING: return "FDACOATING"; + case FDACOLOR: return "FDACOLOR"; + case FDAIMPRINTCD: return "FDAIMPRINTCD"; + case FDALOGO: return "FDALOGO"; + case FDASCORING: return "FDASCORING"; + case FDASHAPE: return "FDASHAPE"; + case FDASIZE: return "FDASIZE"; + case _ROIOVERLAYSHAPE: return "_ROIOverlayShape"; + case CIRCLE: return "CIRCLE"; + case ELLIPSE: return "ELLIPSE"; + case POINT: return "POINT"; + case POLY: return "POLY"; + case C: return "C"; + case DIET: return "DIET"; + case BR: return "BR"; + case DM: return "DM"; + case FAST: return "FAST"; + case FORMULA: return "FORMULA"; + case GF: return "GF"; + case LF: return "LF"; + case LP: return "LP"; + case LQ: return "LQ"; + case LS: return "LS"; + case N: return "N"; + case NF: return "NF"; + case PAF: return "PAF"; + case PAR: return "PAR"; + case RD: return "RD"; + case SCH: return "SCH"; + case SUPPLEMENT: return "SUPPLEMENT"; + case T: return "T"; + case VLI: return "VLI"; + case DRUGPRG: return "DRUGPRG"; + case F: return "F"; + case PRLMN: return "PRLMN"; + case SECOBS: return "SECOBS"; + case SECCATOBS: return "SECCATOBS"; + case SECCLASSOBS: return "SECCLASSOBS"; + case SECCONOBS: return "SECCONOBS"; + case SECINTOBS: return "SECINTOBS"; + case SECALTINTOBS: return "SECALTINTOBS"; + case SECDATINTOBS: return "SECDATINTOBS"; + case SECINTCONOBS: return "SECINTCONOBS"; + case SECINTPRVOBS: return "SECINTPRVOBS"; + case SECINTPRVABOBS: return "SECINTPRVABOBS"; + case SECINTPRVRBOBS: return "SECINTPRVRBOBS"; + case SECINTSTOBS: return "SECINTSTOBS"; + case SECTRSTOBS: return "SECTRSTOBS"; + case TRSTACCRDOBS: return "TRSTACCRDOBS"; + case TRSTAGREOBS: return "TRSTAGREOBS"; + case TRSTCERTOBS: return "TRSTCERTOBS"; + case TRSTFWKOBS: return "TRSTFWKOBS"; + case TRSTLOAOBS: return "TRSTLOAOBS"; + case TRSTMECOBS: return "TRSTMECOBS"; + case SUBSIDFFS: return "SUBSIDFFS"; + case WRKCOMP: return "WRKCOMP"; + case _ACTPROCEDURECODE: return "_ActProcedureCode"; + case _ACTBILLABLESERVICECODE: return "_ActBillableServiceCode"; + case _HL7DEFINEDACTCODES: return "_HL7DefinedActCodes"; + case COPAY: return "COPAY"; + case DEDUCT: return "DEDUCT"; + case DOSEIND: return "DOSEIND"; + case PRA: return "PRA"; + case STORE: return "STORE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActCode"; + } + public String getDefinition() { + switch (this) { + case _ACTACCOUNTCODE: return "An account represents a grouping of financial transactions that are tracked and reported together with a single balance. Examples of account codes (types) are Patient billing accounts (collection of charges), Cost centers; Cash."; + case ACCTRECEIVABLE: return "An account for collecting charges, reversals, adjustments and payments, including deductibles, copayments, coinsurance (financial transactions) credited or debited to the account receivable account for a patient's encounter."; + case CASH: return "Cash"; + case CC: return "Description: Types of advance payment to be made on a plastic card usually issued by a financial institution used of purchasing services and/or products."; + case AE: return "American Express"; + case DN: return "Diner's Club"; + case DV: return "Discover Card"; + case MC: return "Master Card"; + case V: return "Visa"; + case PBILLACCT: return "An account representing charges and credits (financial transactions) for a patient's encounter."; + case _ACTADJUDICATIONCODE: return "Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results."; + case _ACTADJUDICATIONGROUPCODE: return "Catagorization of grouping criteria for the associated transactions and/or summary (totals, subtotals)."; + case CONT: return "Transaction counts and value totals by Contract Identifier."; + case DAY: return "Transaction counts and value totals for each calendar day within the date range specified."; + case LOC: return "Transaction counts and value totals by service location (e.g clinic)."; + case MONTH: return "Transaction counts and value totals for each calendar month within the date range specified."; + case PERIOD: return "Transaction counts and value totals for the date range specified."; + case PROV: return "Transaction counts and value totals by Provider Identifier."; + case WEEK: return "Transaction counts and value totals for each calendar week within the date range specified."; + case YEAR: return "Transaction counts and value totals for each calendar year within the date range specified."; + case AA: return "The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges). \r\n\n Also includes the concept 'Adjudicate as zero' and items not covered under a particular Policy. \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case ANF: return "The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges) without changing the amount. \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case AR: return "The invoice element has passed through the adjudication process but payment is refused due to one or more reasons.\r\n\n Includes items such as patient not covered, or invoice element is not constructed according to payer rules (e.g. 'invoice submitted too late').\r\n\n If one invoice element line item in the invoice element structure is rejected, the remaining line items may not be adjudicated and the complete group is treated as rejected.\r\n\n A refused invoice element can be forwarded to the next payer (for Coordination of Benefits) or modified and resubmitted to refusing payer.\r\n\n Invoice element cannot be reversed (nullified) as there is nothing to reverse. \r\n\n Recommend that the invoice element is not saved for DUR (Drug Utilization Reporting)."; + case AS: return "The invoice element was/will be paid exactly as submitted, without financial adjustment(s).\r\n\n If the dollar amount stays the same, but the billing codes have been amended or financial adjustments have been applied through the adjudication process, the invoice element is treated as \"Adjudicated with Adjustment\".\r\n\n If information items are included in the adjudication results that do not affect the monetary amounts paid, then this is still Adjudicated as Submitted (e.g. 'reached Plan Maximum on this Claim'). \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case _ACTADJUDICATIONRESULTACTIONCODE: return "Actions to be carried out by the recipient of the Adjudication Result information."; + case DISPLAY: return "The adjudication result associated is to be displayed to the receiver of the adjudication result."; + case FORM: return "The adjudication result associated is to be printed on the specified form, which is then provided to the covered party."; + case _ACTBILLABLEMODIFIERCODE: return "Definition:An identifying modifier code for healthcare interventions or procedures."; + case CPTM: return "Description:CPT modifier codes are found in Appendix A of CPT 2000 Standard Edition."; + case HCPCSA: return "Description:HCPCS Level II (HCFA-assigned) and Carrier-assigned (Level III) modifiers are reported in Appendix A of CPT 2000 Standard Edition and in the Medicare Bulletin."; + case _ACTBILLINGARRANGEMENTCODE: return "The type of provision(s) made for reimbursing for the deliver of healthcare services and/or goods provided by a Provider, over a specified period."; + case BLK: return "A billing arrangement where a Provider charges a lump sum to provide a prescribed group (volume) of services to a single patient which occur over a period of time. Services included in the block may vary. \r\n\n This billing arrangement is also known as Program of Care for some specific Payors and Program Fees for other Payors."; + case CAP: return "A billing arrangement where the payment made to a Provider is determined by analyzing one or more demographic attributes about the persons/patients who are enrolled with the Provider (in their practice)."; + case CONTF: return "A billing arrangement where a Provider charges a lump sum to provide a particular volume of one or more interventions/procedures or groups of interventions/procedures."; + case FINBILL: return "A billing arrangement where a Provider charges for non-clinical items. This includes interest in arrears, mileage, etc. Clinical content is not included in Invoices submitted with this type of billing arrangement."; + case ROST: return "A billing arrangement where funding is based on a list of individuals registered as patients of the Provider."; + case SESS: return "A billing arrangement where a Provider charges a sum to provide a group (volume) of interventions/procedures to one or more patients within a defined period of time, typically on the same date. Interventions/procedures included in the session may vary."; + case FFS: return "A billing arrangement where a Provider charges a separate fee for each intervention/procedure/event or product.\r\n\n Fee for Service is used when an individual intervention/procedure/event is used for billing purposes. In other words, fees are associated with the intervention/procedure/event. For example, a specific CCI (Canadian Classification of Interventions) code has an associated fee and is used for billing purposes."; + case FFPS: return "A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)"; + case FFCS: return "A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TFS: return "A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case _ACTBOUNDEDROICODE: return "Type of bounded ROI."; + case ROIFS: return "A fully specified bounded Region of Interest (ROI) delineates a ROI in which only those dimensions participate that are specified by boundary criteria, whereas all other dimensions are excluded. For example a ROI to mark an episode of \"ST elevation\" in a subset of the EKG leads V2, V3, and V4 would include 4 boundaries, one each for time, V2, V3, and V4."; + case ROIPS: return "A partially specified bounded Region of Interest (ROI) specifies a ROI in which at least all values in the dimensions specified by the boundary criteria participate. For example, if an episode of ventricular fibrillations (VFib) is observed, it usually doesn't make sense to exclude any EKG leads from the observation and the partially specified ROI would contain only one boundary for time indicating the time interval where VFib was observed."; + case _ACTCAREPROVISIONCODE: return "Description:The type and scope of responsibility taken-on by the performer of the Act for a specific subject of care."; + case _ACTCREDENTIALEDCARECODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by a credentialing agency, i.e. government or non-government agency. Failure in executing this Act may result in loss of credential to the person or organization who participates as performer of the Act. Excludes employment agreements.\r\n\n \n Example:Hospital license; physician license; clinic accreditation."; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing individuals."; + case CACC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAIC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CANC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CBGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCCC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CDEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CDRC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CEMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CFPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CIMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CMGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board"; + case CNMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNQC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COTC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPHC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPRC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPYC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CROC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CRPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CSUC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CTSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CURC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CVSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case LGPC: return "Description:Scope of responsibility taken-on for physician care of a patient as defined by a governmental licensing agency."; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing programs within organizations."; + case AALC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AAMC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ABHC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ACAC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ACHC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AHOC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ALTC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AOSC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case CACS: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CAMI: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CAST: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CBAR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CCAD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CCAR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDEP: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDGD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDIA: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CEPI: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CFEL: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHFC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHRO: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHYP: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CMIH: return "Description:."; + case CMSC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case COJR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CONC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case COPD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CORT: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPAD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPND: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPST: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSDM: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSIC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSLD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSPT: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CTBU: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CVDC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CWMA: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CWOH: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case _ACTENCOUNTERCODE: return "Domain provides codes that qualify the ActEncounterClass (ENC)"; + case AMB: return "A comprehensive term for health care provided in a healthcare facility (e.g. a practitioneraTMs office, clinic setting, or hospital) on a nonresident basis. The term ambulatory usually implies that the patient has come to the location and is not assigned to a bed. Sometimes referred to as an outpatient encounter."; + case EMER: return "A patient encounter that takes place at a dedicated healthcare service delivery location where the patient receives immediate evaluation and treatment, provided until the patient can be discharged or responsibility for the patient's care is transferred elsewhere (for example, the patient could be admitted as an inpatient or transferred to another facility.)"; + case FLD: return "A patient encounter that takes place both outside a dedicated service delivery location and outside a patient's residence. Example locations might include an accident site and at a supermarket."; + case HH: return "Healthcare encounter that takes place in the residence of the patient or a designee"; + case IMP: return "A patient encounter where a patient is admitted by a hospital or equivalent facility, assigned to a location where patients generally stay at least overnight and provided with room, board, and continuous nursing service."; + case ACUTE: return "An acute inpatient encounter."; + case NONAC: return "Any category of inpatient encounter except 'acute'"; + case PRENC: return "A patient encounter where patient is scheduled or planned to receive service delivery in the future, and the patient is given a pre-admission account number. When the patient comes back for subsequent service, the pre-admission encounter is selected and is encapsulated into the service registration, and a new account number is generated.\r\n\n \n Usage Note: This is intended to be used in advance of encounter types such as ambulatory, inpatient encounter, virtual, etc."; + case SS: return "An encounter where the patient is admitted to a health care facility for a predetermined length of time, usually less than 24 hours."; + case VR: return "A patient encounter where the patient and the practitioner(s) are not in the same physical location. Examples include telephone conference, email exchange, robotic surgery, and televideo conference."; + case _ACTMEDICALSERVICECODE: return "General category of medical service provided to the patient during their encounter."; + case ALC: return "Provision of Alternate Level of Care to a patient in an acute bed. Patient is waiting for placement in a long-term care facility and is unable to return home."; + case CARD: return "Provision of diagnosis and treatment of diseases and disorders affecting the heart"; + case CHR: return "Provision of recurring care for chronic illness."; + case DNTL: return "Provision of treatment for oral health and/or dental surgery."; + case DRGRHB: return "Provision of treatment for drug abuse."; + case GENRL: return "General care performed by a general practitioner or family doctor as a responsible provider for a patient."; + case MED: return "Provision of diagnostic and/or therapeutic treatment."; + case OBS: return "Provision of care of women during pregnancy, childbirth and immediate postpartum period. Also known as Maternity."; + case ONC: return "Provision of treatment and/or diagnosis related to tumors and/or cancer."; + case PALL: return "Provision of care for patients who are living or dying from an advanced illness."; + case PED: return "Provision of diagnosis and treatment of diseases and disorders affecting children."; + case PHAR: return "Pharmaceutical care performed by a pharmacist."; + case PHYRHB: return "Provision of treatment for physical injury."; + case PSYCH: return "Provision of treatment of psychiatric disorder relating to mental illness."; + case SURG: return "Provision of surgical treatment."; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "Description: Coded types of attachments included to support a healthcare claim."; + case AUTOATTCH: return "Description: Automobile Information Attachment"; + case DOCUMENT: return "Description: Document Attachment"; + case HEALTHREC: return "Description: Health Record Attachment"; + case IMG: return "Description: Image Attachment"; + case LABRESULTS: return "Description: Lab Results Attachment"; + case MODEL: return "Description: Digital Model Attachment"; + case WIATTCH: return "Description: Work Injury related additional Information Attachment"; + case XRAY: return "Description: Digital X-Ray Attachment"; + case _ACTCONSENTTYPE: return "Definition: The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research."; + case ICOL: return "Definition: Consent to have healthcare information collected in an electronic health record. This entails that the information may be used in analysis, modified, updated."; + case IDSCL: return "Definition: Consent to have collected healthcare information disclosed."; + case INFA: return "Definition: Consent to access healthcare information."; + case INFAO: return "Definition: Consent to access or \"read\" only, which entails that the information is not to be copied, screen printed, saved, emailed, stored, re-disclosed or altered in any way. This level ensures that data which is masked or to which access is restricted will not be.\r\n\n \n Example: Opened and then emailed or screen printed for use outside of the consent directive purpose."; + case INFASO: return "Definition: Consent to access and save only, which entails that access to the saved copy will remain locked."; + case IRDSCL: return "Definition: Information re-disclosed without the patient's consent."; + case RESEARCH: return "Definition: Consent to have healthcare information in an electronic health record accessed for research purposes."; + case RSDID: return "Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance."; + case RSREID: return "Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent.\r\n\n \n Example:: Where there is a need to inform the subject of potential health issues."; + case _ACTCONTAINERREGISTRATIONCODE: return "Constrains the ActCode to the domain of Container Registration"; + case ID: return "Used by one system to inform another that it has received a container."; + case IP: return "Used by one system to inform another that the container is in position for specimen transfer (e.g., container removal from track, pipetting, etc.)."; + case L: return "Used by one system to inform another that the container has been released from that system."; + case M: return "Used by one system to inform another that the container did not arrive at its next expected location."; + case O: return "Used by one system to inform another that the specific container is being processed by the equipment. It is useful as a response to a query about Container Status, when the specific step of the process is not relevant."; + case R: return "Status is used by one system to inform another that the processing has been completed, but the container has not been released from that system."; + case X: return "Used by one system to inform another that the container is no longer available within the scope of the system (e.g., tube broken or discarded)."; + case _ACTCONTROLVARIABLE: return "An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g., time skew) or the position of the body while measuring blood pressure.\r\n\n Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure)."; + case AUTO: return "Specifies whether or not automatic repeat testing is to be initiated on specimens."; + case ENDC: return "A baseline value for the measured test that is inherently contained in the diluent. In the calculation of the actual result for the measured test, this baseline value is normally considered."; + case REFLEX: return "Specifies whether or not further testing may be automatically or manually initiated on specimens."; + case _ACTCOVERAGECONFIRMATIONCODE: return "Response to an insurance coverage eligibility query or authorization request."; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "Indication of authorization for healthcare service(s) and/or product(s). If authorization is approved, funds are set aside."; + case AUTH: return "Authorization approved and funds have been set aside to pay for specified healthcare service(s) and/or product(s) within defined criteria for the authorization."; + case NAUTH: return "Authorization for specified healthcare service(s) and/or product(s) denied."; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "Indication of eligibility coverage for healthcare service(s) and/or product(s)."; + case ELG: return "Insurance coverage is in effect for healthcare service(s) and/or product(s)."; + case NELG: return "Insurance coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility."; + case _ACTCOVERAGELIMITCODE: return "Criteria that are applicable to the authorized coverage."; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "Maximum amount paid or maximum number of services/products covered; or maximum amount or number covered during a specified time period under the policy or program."; + case COVPRD: return "Codes representing the time period during which coverage is available; or financial participation requirements are in effect."; + case LFEMX: return "Definition: Maximum amount paid by payer or covered party; or maximum number of services or products covered under the policy or program during a covered party's lifetime."; + case NETAMT: return "Maximum net amount that will be covered for the product or service specified."; + case PRDMX: return "Definition: Maximum amount paid by payer or covered party; or maximum number of services/products covered under the policy or program by time period specified by the effective time on the act."; + case UNITPRICE: return "Maximum unit price that will be covered for the authorized product or service."; + case UNITQTY: return "Maximum number of items that will be covered of the product or service specified."; + case COVMX: return "Definition: Codes representing the maximum coverate or financial participation requirements."; + case _ACTCOVEREDPARTYLIMITCODE: return "Codes representing the types of covered parties that may receive covered benefits under a policy or program."; + case _ACTCOVERAGETYPECODE: return "Definition: Set of codes indicating the type of insurance policy or program that pays for the cost of benefits provided to covered parties."; + case _ACTINSURANCEPOLICYCODE: return "Set of codes indicating the type of insurance policy or other source of funds to cover healthcare costs."; + case EHCPOL: return "Private insurance policy that provides coverage in addition to other policies (e.g. in addition to a Public Healthcare insurance policy)."; + case HSAPOL: return "Insurance policy that provides for an allotment of funds replenished on a periodic (e.g. annual) basis. The use of the funds under this policy is at the discretion of the covered party."; + case AUTOPOL: return "Insurance policy for injuries sustained in an automobile accident. Will also typically covered non-named parties to the policy, such as pedestrians and passengers."; + case COL: return "Definition: An automobile insurance policy under which the insurance company will cover the cost of damages to an automobile owned by the named insured that are caused by accident or intentionally by another party."; + case UNINSMOT: return "Definition: An automobile insurance policy under which the insurance company will indemnify a loss for which another motorist is liable if that motorist is unable to pay because he or she is uninsured. Coverage under the policy applies to bodily injury damages only. Injuries to the covered party caused by a hit-and-run driver are also covered."; + case PUBLICPOL: return "Insurance policy funded by a public health system such as a provincial or national health plan. Examples include BC MSP (British Columbia Medical Services Plan) OHIP (Ontario Health Insurance Plan), NHS (National Health Service)."; + case DENTPRG: return "Definition: A public or government health program that administers and funds coverage for dental care to assist program eligible who meet financial and health status criteria."; + case DISEASEPRG: return "Definition: A public or government health program that administers and funds coverage for health and social services to assist program eligible who meet financial and health status criteria related to a particular disease.\r\n\n \n Example: Reproductive health, sexually transmitted disease, and end renal disease programs."; + case CANPRG: return "Definition: A program that provides low-income, uninsured, and underserved women access to timely, high-quality screening and diagnostic services, to detect breast and cervical cancer at the earliest stages.\r\n\n \n Example: To improve women's access to screening for breast and cervical cancers, Congress passed the Breast and Cervical Cancer Mortality Prevention Act of 1990, which guided CDC in creating the National Breast and Cervical Cancer Early Detection Program (NBCCEDP), which provides access to critical breast and cervical cancer screening services for underserved women in the United States. An estimated 7 to 10% of U.S. women of screening age are eligible to receive NBCCEDP services. Federal guidelines establish an eligibility baseline to direct services to uninsured and underinsured women at or below 250% of federal poverty level; ages 18 to 64 for cervical screening; ages 40 to 64 for breast screening."; + case ENDRENAL: return "Definition: A public or government program that administers publicly funded coverage of kidney dialysis and kidney transplant services.\r\n\n Example: In the U.S., the Medicare End-stage Renal Disease program (ESRD), the National Kidney Foundation (NKF) American Kidney Fund (AKF) The Organ Transplant Fund."; + case HIVAIDS: return "Definition: Government administered and funded HIV-AIDS program for beneficiaries meeting financial and health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., the Ryan White program, which is administered by the Health Resources and Services Administration."; + case MANDPOL: return "mandatory health program"; + case MENTPRG: return "Definition: Government administered and funded mental health program for beneficiaries meeting financial and mental health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA)."; + case SAFNET: return "Definition: Government administered and funded program to support provision of care to underserved populations through safety net clinics.\r\n\n \n Example: In the U.S., safety net providers such as federally qualified health centers (FQHC) receive funding under PHSA Section 330 grants administered by the Health Resources and Services Administration."; + case SUBPRG: return "Definition: Government administered and funded substance use program for beneficiaries meeting financial, substance use behavior, and health status criteria. Beneficiaries may be required to enroll as a result of legal proceedings. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA)."; + case SUBSIDIZ: return "Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds."; + case SUBSIDMC: return "Definition: A government health program that provides coverage through managed care contracts for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. \r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized managed care program is further specified by the Underwriter and Payer Role.class and Role.code."; + case SUBSUPP: return "Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria for a supplemental health policy or program such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds.\r\n\n \n Example: Supplemental health coverage program may cover the cost of a health program or policy financial participations, such as the copays and the premiums, and may provide coverage for services in addition to those covered under the supplemented health program or policy. In the U.S., Medicaid programs may pay the premium for a covered party who is also covered under the Medicare program or a private health policy.\r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized supplemental retiree health program is further specified by the Underwriter and Payer Role.class and Role.code."; + case WCBPOL: return "Insurance policy for injuries sustained in the work place or in the course of employment."; + case _ACTINSURANCETYPECODE: return "Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g., whether the covered parties are jointly or severably insured.\r\n\n \n Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType."; + case _ACTHEALTHINSURANCETYPECODE: return "Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g., exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g., only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g., co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g., under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement)."; + case DENTAL: return "Definition: A health insurance policy that that covers benefits for dental services."; + case DISEASE: return "Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g., cancer, diabetes, or HIV-AIDS."; + case DRUGPOL: return "Definition: A health insurance policy that covers benefits for prescription drugs, pharmaceuticals, and supplies."; + case HIP: return "Definition: A health insurance policy that covers healthcare benefits by protecting covered parties from medical expenses arising from health conditions, sickness, or accidental injury as well as preventive care. Health insurance policies explicitly exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy.\r\n\n \n Discussion: Health insurance policies are offered by health insurance plans that typically reimburse providers for covered services on a fee-for-service basis, that is, a fee that is the allowable amount that a provider may charge. This is in contrast to managed care plans, which typically prepay providers a per-member/per-month amount or capitation as reimbursement for all covered services rendered. Health insurance plans include indemnity and healthcare services plans."; + case LTC: return "Definition: An insurance policy that covers benefits for long-term care services people need when they no longer can care for themselves. This may be due to an accident, disability, prolonged illness or the simple process of aging. Long-term care services assist with activities of daily living including:\r\n\n \n \n Help at home with day-to-day activities, such as cooking, cleaning, bathing and dressing\r\n\n \n \n Care in the community, such as in an adult day care facility\r\n\n \n \n Supervised care provided in an assisted living facility\r\n\n \n \n Skilled care provided in a nursing home"; + case MCPOL: return "Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well.\r\n\n Managed care policies specifically exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy.\r\n\n \n Discussion: Managed care policies are offered by managed care plans that contract with selected providers or health care organizations to provide comprehensive health care at a discount to covered parties and coordinate the financing and delivery of health care. Managed care uses medical protocols and procedures agreed on by the medical profession to be cost effective, also known as medical practice guidelines. Providers are typically reimbursed for covered services by a capitated amount on a per member per month basis that may reflect difference in the health status and level of services anticipated to be needed by the member."; + case POS: return "Definition: A policy for a health plan that has features of both an HMO and a FFS plan. Like an HMO, a POS plan encourages the use its HMO network to maintain discounted fees with participating providers, but recognizes that sometimes covered parties want to choose their own provider. The POS plan allows a covered party to use providers who are not part of the HMO network (non-participating providers). However, there is a greater cost associated with choosing these non-network providers. A covered party will usually pay deductibles and coinsurances that are substantially higher than the payments when he or she uses a plan provider. Use of non-participating providers often requires the covered party to pay the provider directly and then to file a claim for reimbursement, like in an FFS plan."; + case HMO: return "Definition: A policy for a health plan that provides coverage for health care only through contracted or employed physicians and hospitals located in particular geographic or service areas. HMOs emphasize prevention and early detection of illness. Eligibility to enroll in an HMO is determined by where a covered party lives or works."; + case PPO: return "Definition: A network-based, managed care plan that allows a covered party to choose any health care provider. However, if care is received from a \"preferred\" (participating in-network) provider, there are generally higher benefit coverage and lower deductibles."; + case MENTPOL: return "Definition: A health insurance policy that covers benefits for mental health services and prescriptions."; + case SUBPOL: return "Definition: A health insurance policy that covers benefits for substance use services."; + case VISPOL: return "Definition: Set of codes for a policy that provides coverage for health care expenses arising from vision services.\r\n\n A health insurance policy that covers benefits for vision care services, prescriptions, and products."; + case DIS: return "Definition: An insurance policy that provides a regular payment to compensate for income lost due to the covered party's inability to work because of illness or injury."; + case EWB: return "Definition: An insurance policy under a benefit plan run by an employer or employee organization for the purpose of providing benefits other than pension-related to employees and their families. Typically provides health-related benefits, benefits for disability, disease or unemployment, or day care and scholarship benefits, among others. An employer sponsored health policy includes coverage of health care expenses arising from sickness or accidental injury, coverage for on-site medical clinics or for dental or vision benefits, which are typically provided under a separate policy. Coverage excludes health care expenses covered by accident or disability, workers' compensation, liability or automobile insurance."; + case FLEXP: return "Definition: An insurance policy that covers qualified benefits under a Flexible Benefit plan such as group medical insurance, long and short term disability income insurance, group term life insurance for employees only up to $50,000 face amount, specified disease coverage such as a cancer policy, dental and/or vision insurance, hospital indemnity insurance, accidental death and dismemberment insurance, a medical expense reimbursement plan and a dependent care reimbursement plan.\r\n\n \n Discussion: See UnderwriterRoleTypeCode flexible benefit plan which is defined as a benefit plan that allows employees to choose from several life, health, disability, dental, and other insurance plans according to their individual needs. Also known as cafeteria plans. Authorized under Section 125 of the Revenue Act of 1978."; + case LIFE: return "Definition: A policy under which the insurer agrees to pay a sum of money upon the occurrence of the covered partys death. In return, the policyholder agrees to pay a stipulated amount called a premium at regular intervals. Life insurance indemnifies the beneficiary for the loss of the insurable interest that a beneficiary has in the life of a covered party. For persons related by blood, a substantial interest established through love and affection, and for all other persons, a lawful and substantial economic interest in having the life of the insured continue. An insurable interest is required when purchasing life insurance on another person. Specific exclusions are often written into the contract to limit the liability of the insurer; for example claims resulting from suicide or relating to war, riot and civil commotion.\r\n\n \n Discussion:A life insurance policy may be used by the covered party as a source of health care coverage in the case of a viatical settlement, which is the sale of a life insurance policy by the policy owner, before the policy matures. Such a sale, at a price discounted from the face amount of the policy but usually in excess of the premiums paid or current cash surrender value, provides the seller an immediate cash settlement. Generally, viatical settlements involve insured individuals with a life expectancy of less than two years. In countries without state-subsidized healthcare and high healthcare costs (e.g. United States), this is a practical way to pay extremely high health insurance premiums that severely ill people face. Some people are also familiar with life settlements, which are similar transactions but involve insureds with longer life expectancies (two to fifteen years)."; + case ANNU: return "Definition: A policy that, after an initial premium or premiums, pays out a sum at pre-determined intervals.\r\n\n For example, a policy holder may pay $10,000, and in return receive $150 each month until he dies; or $1,000 for each of 14 years or death benefits if he dies before the full term of the annuity has elapsed."; + case TLIFE: return "Definition: Life insurance under which the benefit is payable only if the insured dies during a specified period. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing."; + case ULIFE: return "Definition: Life insurance under which the benefit is payable upon the insuredaTMs death or diagnosis of a terminal illness. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing"; + case PNC: return "Definition: A type of insurance that covers damage to or loss of the policyholderaTMs property by providing payments for damages to property damage or the injury or death of living subjects. The terms \"casualty\" and \"liability\" insurance are often used interchangeably. Both cover the policyholder's legal liability for damages caused to other persons and/or their property."; + case REI: return "Definition: An agreement between two or more insurance companies by which the risk of loss is proportioned. Thus the risk of loss is spread and a disproportionately large loss under a single policy does not fall on one insurance company. Acceptance by an insurer, called a reinsurer, of all or part of the risk of loss of another insurance company.\r\n\n \n Discussion: Reinsurance is a means by which an insurance company can protect itself against the risk of losses with other insurance companies. Individuals and corporations obtain insurance policies to provide protection for various risks (hurricanes, earthquakes, lawsuits, collisions, sickness and death, etc.). Reinsurers, in turn, provide insurance to insurance companies.\r\n\n For example, an HMO may purchase a reinsurance policy to protect itself from losing too much money from one insured's particularly expensive health care costs. An insurance company issuing an automobile liability policy, with a limit of $100,000 per accident may reinsure its liability in excess of $10,000. A fire insurance company which issues a large policy generally reinsures a portion of the risk with one or several other companies. Also called risk control insurance or stop-loss insurance."; + case SURPL: return "Definition: \n \r\n\n \n \n A risk or part of a risk for which there is no normal insurance market available.\r\n\n \n \n Insurance written by unauthorized insurance companies. Surplus lines insurance is insurance placed with unauthorized insurance companies through licensed surplus lines agents or brokers."; + case UMBRL: return "Definition: A form of insurance protection that provides additional liability coverage after the limits of your underlying policy are reached. An umbrella liability policy also protects you (the insured) in many situations not covered by the usual liability policies."; + case _ACTPROGRAMTYPECODE: return "Definition: A set of codes used to indicate coverage under a program. A program is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health, financial, and demographic status. Programs are typically established or permitted by legislation with provisions for ongoing government oversight. Regulations may mandate the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency may be charged with implementing the program in accordance to the regulation. Risk of loss under a program in most cases would not meet what an underwriter would consider an insurable risk, i.e., the risk is not random in nature, not financially measurable, and likely requires subsidization with government funds.\r\n\n \n Discussion: Programs do not have policy holders or subscribers. Program eligibles are enrolled based on health status, statutory eligibility, financial status, or age. Program eligibles who are covered parties under the program may be referred to as members, beneficiaries, eligibles, or recipients. Programs risk are underwritten by not for profit organizations such as governmental entities, and the beneficiaries typically do not pay for any or some portion of the cost of coverage. See CoveredPartyRoleType."; + case CHAR: return "Definition: A program that covers the cost of services provided directly to a beneficiary who typically has no other source of coverage without charge."; + case CRIME: return "Definition: A program that covers the cost of services provided to crime victims for injuries or losses related to the occurrence of a crime."; + case EAP: return "Definition: An employee assistance program is run by an employer or employee organization for the purpose of providing benefits and covering all or part of the cost for employees to receive counseling, referrals, and advice in dealing with stressful issues in their lives. These may include substance abuse, bereavement, marital problems, weight issues, or general wellness issues. The services are usually provided by a third-party, rather than the company itself, and the company receives only summary statistical data from the service provider. Employee's names and services received are kept confidential."; + case GOVEMP: return "Definition: A set of codes used to indicate a government program that is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health and financial status. Government programs are established or permitted by legislation with provisions for ongoing government oversight. Regulation mandates the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency is charged with implementing the program in accordance to the regulation\r\n\n \n Example: Federal employee health benefit program in the U.S."; + case HIRISK: return "Definition: A government program that provides health coverage to individuals who are considered medically uninsurable or high risk, and who have been denied health insurance due to a serious health condition. In certain cases, it also applies to those who have been quoted very high premiums a\" again, due to a serious health condition. The pool charges premiums for coverage. Because the pool covers high-risk people, it incurs a higher level of claims than premiums can cover. The insurance industry pays into the pool to make up the difference and help it remain viable."; + case IND: return "Definition: Services provided directly and through contracted and operated indigenous peoples health programs.\r\n\n \n Example: Indian Health Service in the U.S."; + case MILITARY: return "Definition: A government program that provides coverage for health services to military personnel, retirees, and dependents. A covered party who is a subscriber can choose from among Fee-for-Service (FFS) plans, and their Preferred Provider Organizations (PPO), or Plans offering a Point of Service (POS) Product, or Health Maintenance Organizations.\r\n\n \n Example: In the U.S., TRICARE, CHAMPUS."; + case RETIRE: return "Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g., being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care."; + case SOCIAL: return "Definition: A social service program funded by a public or governmental entity.\r\n\n \n Example: Programs providing habilitation, food, lodging, medicine, transportation, equipment, devices, products, education, training, counseling, alteration of living or work space, and other resources to persons meeting eligibility criteria."; + case VET: return "Definition: Services provided directly and through contracted and operated veteran health programs."; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "Codes dealing with the management of Detected Issue observations"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "Codes dealing with the management of Detected Issue observations for the administrative and patient administrative acts domains."; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "Authorization Issue Management Code"; + case EMAUTH: return "Used to temporarily override normal authorization rules to gain access to data in a case of emergency. Use of this override code will typically be monitored, and a procedure to verify its proper use may be triggered when used."; + case _21: return "Description: Indicates that the permissions have been externally verified and the request should be processed."; + case _1: return "Confirmed drug therapy appropriate"; + case _19: return "Consulted other supplier/pharmacy, therapy confirmed"; + case _2: return "Assessed patient, therapy is appropriate"; + case _22: return "Description: The patient has the appropriate indication or diagnosis for the action to be taken."; + case _23: return "Description: It has been confirmed that the appropriate pre-requisite therapy has been tried."; + case _3: return "Patient gave adequate explanation"; + case _4: return "Consulted other supply source, therapy still appropriate"; + case _5: return "Consulted prescriber, therapy confirmed"; + case _6: return "Consulted prescriber and recommended change, prescriber declined"; + case _7: return "Concurrent therapy triggering alert is no longer on-going or planned"; + case _14: return "Confirmed supply action appropriate"; + case _15: return "Patient's existing supply was lost/wasted"; + case _16: return "Supply date is due to patient vacation"; + case _17: return "Supply date is intended to carry patient over weekend"; + case _18: return "Supply is intended for use during a leave of absence from an institution."; + case _20: return "Description: Supply is different than expected as an additional quantity has been supplied in a separate dispense."; + case _8: return "Order is performed as issued, but other action taken to mitigate potential adverse effects"; + case _10: return "Provided education or training to the patient on appropriate therapy use"; + case _11: return "Instituted an additional therapy to mitigate potential negative effects"; + case _12: return "Suspended existing therapy that triggered interaction for the duration of this therapy"; + case _13: return "Aborted existing therapy that triggered interaction."; + case _9: return "Arranged to monitor patient for adverse effects"; + case _ACTEXPOSURECODE: return "Concepts that identify the type or nature of exposure interaction. Examples include \"household\", \"care giver\", \"intimate partner\", \"common space\", \"common substance\", etc. to further describe the nature of interaction."; + case CHLDCARE: return "Description: Exposure participants' interaction occurred in a child care setting"; + case CONVEYNC: return "Description: An interaction where the exposure participants traveled in/on the same vehicle (not necessarily concurrently, e.g. both are passengers of the same plane, but on different flights of that plane)."; + case HLTHCARE: return "Description: Exposure participants' interaction occurred during the course of health care delivery or in a health care delivery setting, but did not involve the direct provision of care (e.g. a janitor cleaning a patient's hospital room)."; + case HOMECARE: return "Description: Exposure interaction occurred in context of one providing care for the other, i.e. a babysitter providing care for a child, a home-care aide providing assistance to a paraplegic."; + case HOSPPTNT: return "Description: Exposure participants' interaction occurred when both were patients being treated in the same (acute) health care delivery facility."; + case HOSPVSTR: return "Description: Exposure participants' interaction occurred when one visited the other who was a patient being treated in a health care delivery facility."; + case HOUSEHLD: return "Description: Exposure interaction occurred in context of domestic interaction, i.e. both participants reside in the same household."; + case INMATE: return "Description: Exposure participants' interaction occurred in the course of one or both participants being incarcerated at a correctional facility"; + case INTIMATE: return "Description: Exposure interaction was intimate, i.e. participants are intimate companions (e.g. spouses, domestic partners)."; + case LTRMCARE: return "Description: Exposure participants' interaction occurred in the course of one or both participants being resident at a long term care facility (second participant may be a visitor, worker, resident or a physical place or object within the facility)."; + case PLACE: return "Description: An interaction where the exposure participants were both present in the same location/place/space."; + case PTNTCARE: return "Description: Exposure participants' interaction occurred during the course of health care delivery by a provider (e.g. a physician treating a patient in her office)."; + case SCHOOL2: return "Description: Exposure participants' interaction occurred in an academic setting (e.g., participants are fellow students, or student and teacher)."; + case SOCIAL2: return "Description: An interaction where the exposure participants are social associates or members of the same extended family"; + case SUBSTNCE: return "Description: An interaction where the exposure participants shared or co-used a common substance (e.g. drugs, needles, or common food item)."; + case TRAVINT: return "Description: An interaction where the exposure participants traveled together in/on the same vehicle/trip (e.g. concurrent co-passengers)."; + case WORK2: return "Description: Exposure interaction occurred in a work setting, i.e. participants are co-workers."; + case _ACTFINANCIALTRANSACTIONCODE: return "ActFinancialTransactionCode"; + case CHRG: return "A type of transaction that represents a charge for a service or product. Expressed in monetary terms."; + case REV: return "A type of transaction that represents a reversal of a previous charge for a service or product. Expressed in monetary terms. It has the opposite effect of a standard charge."; + case _ACTINCIDENTCODE: return "Set of codes indicating the type of incident or accident."; + case MVA: return "Incident or accident as the result of a motor vehicle accident"; + case SCHOOL: return "Incident or accident is the result of a school place accident."; + case SPT: return "Incident or accident is the result of a sporting accident."; + case WPA: return "Incident or accident is the result of a work place accident"; + case _ACTINFORMATIONACCESSCODE: return "Description: The type of health information to which the subject of the information or the subject's delegate consents or dissents."; + case ACADR: return "Description: Provide consent to collect, use, disclose, or access adverse drug reaction information for a patient."; + case ACALL: return "Description: Provide consent to collect, use, disclose, or access all information for a patient."; + case ACALLG: return "Description: Provide consent to collect, use, disclose, or access allergy information for a patient."; + case ACCONS: return "Description: Provide consent to collect, use, disclose, or access informational consent information for a patient."; + case ACDEMO: return "Description: Provide consent to collect, use, disclose, or access demographics information for a patient."; + case ACDI: return "Description: Provide consent to collect, use, disclose, or access diagnostic imaging information for a patient."; + case ACIMMUN: return "Description: Provide consent to collect, use, disclose, or access immunization information for a patient."; + case ACLAB: return "Description: Provide consent to collect, use, disclose, or access lab test result information for a patient."; + case ACMED: return "Description: Provide consent to collect, use, disclose, or access medical condition information for a patient."; + case ACMEDC: return "Definition: Provide consent to view or access medical condition information for a patient."; + case ACMEN: return "Description:Provide consent to collect, use, disclose, or access mental health information for a patient."; + case ACOBS: return "Description: Provide consent to collect, use, disclose, or access common observation information for a patient."; + case ACPOLPRG: return "Description: Provide consent to collect, use, disclose, or access coverage policy or program for a patient."; + case ACPROV: return "Description: Provide consent to collect, use, disclose, or access provider information for a patient."; + case ACPSERV: return "Description: Provide consent to collect, use, disclose, or access professional service information for a patient."; + case ACSUBSTAB: return "Description:Provide consent to collect, use, disclose, or access substance abuse information for a patient."; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information."; + case INFAUT: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with jurisdictional law, organizational policy, or a patient's consent directive, which may be implied, deemed, opt-in, opt-out, or explicit."; + case INFCON: return "Authorization to collect, access, use, or disclose specified patient health information as explicitly consented to by the subject of the information or the subject's representative."; + case INFCRT: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with judicial system protocol, such as in the case of a subpoena or court order."; + case INFDNG: return "Authorization to collect, access, use, or disclose specified patient health information where deemed necessary to avert potential danger to other persons in accordance with jurisdictional law, organizational policy, or standards of practice. For example, disclosure about a person threatening violence."; + case INFEMER: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with emergency information transfer protocol dictated by jurisdictional law, organization policy, or standards of practice. For example, sharing of health information during disaster response."; + case INFPWR: return "Authorization to collect, access, use, or disclose specified patient health information necessary to avert potential public welfare risk in accordance with jurisdictional law, organizational policy, or standards of practice. For example, reporting that a person is a victim of abuse or demonstrating suicidal tendencies."; + case INFREG: return "Authorization to collect, access, use, or disclose specified patient health information for public health, welfare, and safety purposes in accordance with jurisdictional law, organizational policy, or standards of practice. For example, public health reporting of notifiable conditions."; + case _ACTINFORMATIONCATEGORYCODE: return "Definition:Indicates the set of information types which may be manipulated or referenced, such as for recommending access restrictions."; + case ALLCAT: return "Description: All patient information."; + case ALLGCAT: return "Definition:All information pertaining to a patient's allergy and intolerance records."; + case ARCAT: return "Description: All information pertaining to a patient's adverse drug reactions."; + case COBSCAT: return "Definition:All information pertaining to a patient's common observation records (height, weight, blood pressure, temperature, etc.)."; + case DEMOCAT: return "Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc)."; + case DICAT: return "Definition:All information pertaining to a patient's diagnostic image records (orders & results)."; + case IMMUCAT: return "Definition:All information pertaining to a patient's vaccination records."; + case LABCAT: return "Description: All information pertaining to a patient's lab test records (orders & results)"; + case MEDCCAT: return "Definition:All information pertaining to a patient's medical condition records."; + case MENCAT: return "Description: All information pertaining to a patient's mental health records."; + case PSVCCAT: return "Definition:All information pertaining to a patient's professional service records (such as smoking cessation, counseling, medication review, mental health)."; + case RXCAT: return "Definition:All information pertaining to a patient's medication records (orders, dispenses and other active medications)."; + case _ACTINVOICEELEMENTCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results."; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee and other cost elements such as bonus, retroactive adjustment and transaction fees."; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "Codes representing adjustments to a Payment Advice such as retroactive, clawback, garnishee, etc."; + case ALEC: return "Payment initiated by the payor as the result of adjudicating a submitted invoice that arrived to the payor from an electronic source that did not provide a conformant set of HL7 messages (e.g. web claim submission)."; + case BONUS: return "Bonus payments based on performance, volume, etc. as agreed to by the payor."; + case CFWD: return "An amount still owing to the payor but the payment is 0$ and this cannot be settled until a future payment is made."; + case EDU: return "Fees deducted on behalf of a payee for tuition and continuing education."; + case EPYMT: return "Fees deducted on behalf of a payee for charges based on a shorter payment frequency (i.e. next day versus biweekly payments."; + case GARN: return "Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee."; + case INVOICE: return "Payment is based on a payment intent for a previously submitted Invoice, based on formal adjudication results.."; + case PINV: return "Payment initiated by the payor as the result of adjudicating a paper (original, may have been faxed) invoice."; + case PPRD: return "An amount that was owed to the payor as indicated, by a carry forward adjusment, in a previous payment advice"; + case PROA: return "Professional association fee that is collected by the payor from the practitioner/provider on behalf of the association"; + case RECOV: return "Retroactive adjustment such as fee rate adjustment due to contract negotiations."; + case RETRO: return "Bonus payments based on performance, volume, etc. as agreed to by the payor."; + case TRAN: return "Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee."; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee, etc."; + case INVTYPE: return "Transaction counts and value totals by invoice type (e.g. RXDINV - Pharmacy Dispense)"; + case PAYEE: return "Transaction counts and value totals by each instance of an invoice payee."; + case PAYOR: return "Transaction counts and value totals by each instance of an invoice payor."; + case SENDAPP: return "Transaction counts and value totals by each instance of a messaging application on a single processor. It is a registered identifier known to the receivers."; + case _ACTINVOICEDETAILCODE: return "Codes representing a service or product that is being invoiced (billed). The code can represent such concepts as \"office visit\", \"drug X\", \"wheelchair\" and other billable items such as taxes, service charges and discounts."; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "An identifying data string for healthcare products."; + case UNSPSC: return "Description:United Nations Standard Products and Services Classification, managed by Uniform Code Council (UCC): www.unspsc.org"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "An identifying data string for A substance used as a medication or in the preparation of medication."; + case GTIN: return "Description:Global Trade Item Number is an identifier for trade items developed by GS1 (comprising the former EAN International and Uniform Code Council)."; + case UPC: return "Description:Universal Product Code is one of a wide variety of bar code languages widely used in the United States and Canada for items in stores."; + case _ACTINVOICEDETAILGENERICCODE: return "The detail item codes to identify charges or changes to the total billing of a claim due to insurance rules and payments."; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "The billable item codes to identify adjudicator specified components to the total billing of a claim."; + case COIN: return "That portion of the eligible charges which a covered party must pay for each service and/or product. It is a percentage of the eligible amount for the service/product that is typically charged after the covered party has met the policy deductible. This amount represents the covered party's coinsurance that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case COPAYMENT: return "That portion of the eligible charges which a covered party must pay for each service and/or product. It is a defined amount per service/product of the eligible amount for the service/product. This amount represents the covered party's copayment that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case DEDUCTIBLE: return "That portion of the eligible charges which a covered party must pay in a particular period (e.g. annual) before the benefits are payable by the adjudicator. This amount represents the covered party's deductible that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case PAY: return "The guarantor, who may be the patient, pays the entire charge for a service. Reasons for such action may include: there is no insurance coverage for the service (e.g. cosmetic surgery); the patient wishes to self-pay for the service; or the insurer denies payment for the service due to contractual provisions such as the need for prior authorization."; + case SPEND: return "That total amount of the eligible charges which a covered party must periodically pay for services and/or products prior to the Medicaid program providing any coverage. This amount represents the covered party's spend down that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results"; + case COINS: return "The covered party pays a percentage of the cost of covered services."; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "The billable item codes to identify modifications to a billable item charge. As for example after hours increase in the office visit fee."; + case AFTHRS: return "Premium paid on service fees in compensation for practicing outside of normal working hours."; + case ISOL: return "Premium paid on service fees in compensation for practicing in a remote location."; + case OOO: return "Premium paid on service fees in compensation for practicing at a location other than normal working location."; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "The billable item codes to identify provider supplied charges or changes to the total billing of a claim."; + case CANCAPT: return "A charge to compensate the provider when a patient cancels an appointment with insufficient time for the provider to make another appointment with another patient."; + case DSC: return "A reduction in the amount charged as a percentage of the amount. For example a 5% discount for volume purchase."; + case ESA: return "A premium on a service fee is requested because, due to extenuating circumstances, the service took an extraordinary amount of time or supplies."; + case FFSTOP: return "Under agreement between the parties (payor and provider), a guaranteed level of income is established for the provider over a specific, pre-determined period of time. The normal course of business for the provider is submission of fee-for-service claims. Should the fee-for-service income during the specified period of time be less than the agreed to amount, a top-up amount is paid to the provider equal to the difference between the fee-for-service total and the guaranteed income amount for that period of time. The details of the agreement may specify (or not) a requirement for repayment to the payor in the event that the fee-for-service income exceeds the guaranteed amount."; + case FNLFEE: return "Anticipated or actual final fee associated with treating a patient."; + case FRSTFEE: return "Anticipated or actual initial fee associated with treating a patient."; + case MARKUP: return "An increase in the amount charged as a percentage of the amount. For example, 12% markup on product cost."; + case MISSAPT: return "A charge to compensate the provider when a patient does not show for an appointment."; + case PERFEE: return "Anticipated or actual periodic fee associated with treating a patient. For example, expected billing cycle such as monthly, quarterly. The actual period (e.g. monthly, quarterly) is specified in the unit quantity of the Invoice Element."; + case PERMBNS: return "The amount for a performance bonus that is being requested from a payor for the performance of certain services (childhood immunizations, influenza immunizations, mammograms, pap smears) on a sliding scale. That is, for 90% of childhood immunizations to a maximum of $2200/yr. An invoice is created at the end of the service period (one year) and a code is submitted indicating the percentage achieved and the dollar amount claimed."; + case RESTOCK: return "A charge is requested because the patient failed to pick up the item and it took an amount of time to return it to stock for future use."; + case TRAVEL: return "A charge to cover the cost of travel time and/or cost in conjuction with providing a service or product. It may be charged per kilometer or per hour based on the effective agreement."; + case URGENT: return "Premium paid on service fees in compensation for providing an expedited response to an urgent situation."; + case _ACTINVOICEDETAILTAXCODE: return "The billable item codes to identify modifications to a billable item charge by a tax factor applied to the amount. As for example 7% provincial sales tax."; + case FST: return "Federal tax on transactions such as the Goods and Services Tax (GST)"; + case HST: return "Joint Federal/Provincial Sales Tax"; + case PST: return "Tax levied by the provincial or state jurisdiction such as Provincial Sales Tax"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "An identifying data string for medical facility accommodations."; + case _ACTENCOUNTERACCOMMODATIONCODE: return "Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type."; + case _HL7ACCOMMODATIONCODE: return "Description:Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type."; + case I: return "Accommodations used in the care of diseases that are transmitted through casual contact or respiratory transmission."; + case P: return "Accommodations in which there is only 1 bed."; + case S: return "Uniquely designed and elegantly decorated accommodations with many amenities available for an additional charge."; + case SP: return "Accommodations in which there are 2 beds."; + case W: return "Accommodations in which there are 3 or more beds."; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "An identifying data string for healthcare procedures."; + case _ACTINVOICEGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements."; + case _ACTINVOICEINTERGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements.\r\n\n The domain is only specified for an intermediate invoice element group (non-root or non-top level) for an Invoice."; + case CPNDDRGING: return "A grouping of invoice element groups and details including the ones specifying the compound ingredients being invoiced. It may also contain generic detail items such as markup."; + case CPNDINDING: return "A grouping of invoice element details including the one specifying an ingredient drug being invoiced. It may also contain generic detail items such as tax or markup."; + case CPNDSUPING: return "A grouping of invoice element groups and details including the ones specifying the compound supplies being invoiced. It may also contain generic detail items such as markup."; + case DRUGING: return "A grouping of invoice element details including the one specifying the drug being invoiced. It may also contain generic detail items such as markup."; + case FRAMEING: return "A grouping of invoice element details including the ones specifying the frame fee and the frame dispensing cost that are being invoiced."; + case LENSING: return "A grouping of invoice element details including the ones specifying the lens fee and the lens dispensing cost that are being invoiced."; + case PRDING: return "A grouping of invoice element details including the one specifying the product (good or supply) being invoiced. It may also contain generic detail items such as tax or discount."; + case _ACTINVOICEROOTGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements.\r\n\n Codes from this domain reflect the type of Invoice such as Pharmacy Dispense, Clinical Service and Clinical Product. The domain is only specified for the root (top level) invoice element group for an Invoice."; + case CPINV: return "Clinical product invoice where the Invoice Grouping contains one or more billable item and is supported by clinical product(s).\r\n\n For example, a crutch or a wheelchair."; + case CSINV: return "Clinical Services Invoice which can be used to describe a single service, multiple services or repeated services.\r\n\n [1] Single Clinical services invoice where the Invoice Grouping contains one billable item and is supported by one clinical service.\r\n\n For example, a single service for an office visit or simple clinical procedure (e.g. knee mobilization).\r\n\n [2] Multiple Clinical services invoice where the Invoice Grouping contains more than one billable item, supported by one or more clinical services. The services can be distinct and over multiple dates, but for the same patient. This type of invoice includes a series of treatments which must be adjudicated together.\r\n\n For example, an adjustment and ultrasound for a chiropractic session where fees are associated for each of the services and adjudicated (invoiced) together.\r\n\n [3] Repeated Clinical services invoice where the Invoice Grouping contains one or more billable item, supported by the same clinical service repeated over a period of time.\r\n\n For example, the same Chiropractic adjustment (service or treatment) delivered on 3 separate occasions over a period of time at the discretion of the provider (e.g. month)."; + case CSPINV: return "A clinical Invoice Grouping consisting of one or more services and one or more product. Billing for these service(s) and product(s) are supported by multiple clinical billable events (acts).\r\n\n All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator.\r\n\n For example , a brace (product) invoiced together with the fitting (service)."; + case FININV: return "Invoice Grouping without clinical justification. These will not require identification of participants and associations from a clinical context such as patient and provider.\r\n\n Examples are interest charges and mileage."; + case OHSINV: return "A clinical Invoice Grouping consisting of one or more oral health services. Billing for these service(s) are supported by multiple clinical billable events (acts).\r\n\n All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator."; + case PAINV: return "HealthCare facility preferred accommodation invoice."; + case RXCINV: return "Pharmacy dispense invoice for a compound."; + case RXDINV: return "Pharmacy dispense invoice not involving a compound"; + case SBFINV: return "Clinical services invoice where the Invoice Group contains one billable item for multiple clinical services in one or more sessions."; + case VRXINV: return "Vision dispense invoice for up to 2 lens (left and right), frame and optional discount. Eye exams are invoiced as a clinical service invoice."; + case _ACTINVOICEELEMENTSUMMARYCODE: return "Identifies the different types of summary information that can be reported by queries dealing with Statement of Financial Activity (SOFA). The summary information is generally used to help resolve balance discrepancies between providers and payors."; + case _INVOICEELEMENTADJUDICATED: return "Total counts and total net amounts adjudicated for all Invoice Groupings that were adjudicated within a time period based on the adjudication date of the Invoice Grouping."; + case ADNFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically."; + case ADNFPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically."; + case ADNFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically."; + case ADNFSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically."; + case ADNFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADPPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADRFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically."; + case ADRFPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically."; + case ADRFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually."; + case ADRFPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually."; + case ADRFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically."; + case ADRFSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically."; + case ADRFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually."; + case ADRFSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually."; + case _INVOICEELEMENTPAID: return "Total counts and total net amounts paid for all Invoice Groupings that were paid within a time period based on the payment date."; + case PDNFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently cancelled in the specified period and submitted electronically."; + case PDNFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDPPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case _INVOICEELEMENTSUBMITTED: return "Total counts and total net amounts billed for all Invoice Groupings that were submitted within a time period. Adjudicated invoice elements are included."; + case SBBLELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBBLELCT: return "Identifies the total number of submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBNFELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBNFELCT: return "Identifies the total number of submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBPDELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included."; + case SBPDELCT: return "Identifies the total number of submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included."; + case _ACTINVOICEOVERRIDECODE: return "Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results."; + case COVGE: return "Insurance coverage problems have been encountered. Additional explanation information to be supplied."; + case EFORM: return "Electronic form with supporting or additional information to follow."; + case FAX: return "Fax with supporting or additional information to follow."; + case GFTH: return "The medical service was provided to a patient in good faith that they had medical coverage, although no evidence of coverage was available before service was rendered."; + case LATE: return "Knowingly over the payor's published time limit for this invoice possibly due to a previous payor's delays in processing. Additional reason information will be supplied."; + case MANUAL: return "Manual review of the invoice is requested. Additional information to be supplied. This may be used in the case of an appeal."; + case OOJ: return "The medical service and/or product was provided to a patient that has coverage in another jurisdiction."; + case ORTHO: return "The service provided is required for orthodontic purposes. If the covered party has orthodontic coverage, then the service may be paid."; + case PAPER: return "Paper documentation (or other physical format) with supporting or additional information to follow."; + case PIE: return "Public Insurance has been exhausted. Invoice has not been sent to Public Insuror and therefore no Explanation Of Benefits (EOB) is provided with this Invoice submission."; + case PYRDELAY: return "Allows provider to explain lateness of invoice to a subsequent payor."; + case REFNR: return "Rules of practice do not require a physician's referral for the provider to perform a billable service."; + case REPSERV: return "The same service was delivered within a time period that would usually indicate a duplicate billing. However, the repeated service is a medical necessity and therefore not a duplicate."; + case UNRELAT: return "The service provided is not related to another billed service. For example, 2 unrelated services provided on the same day to the same patient which may normally result in a refused payment for one of the items."; + case VERBAUTH: return "The provider has received a verbal permission from an authoritative source to perform the service or supply the item being invoiced."; + case _ACTLISTCODE: return "Provides codes associated with ActClass value of LIST (working list)"; + case _ACTOBSERVATIONLIST: return "ActObservationList"; + case CARELIST: return "List of acts representing a care plan. The acts can be in a varierty of moods including event (EVN) to record acts that have been carried out as part of the care plan."; + case CONDLIST: return "List of condition observations."; + case INTOLIST: return "List of intolerance observations."; + case PROBLIST: return "List of problem observations."; + case RISKLIST: return "List of risk factor observations."; + case GOALLIST: return "List of observations in goal mood."; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "Codes used to identify different types of 'duration-based' working lists. Examples include \"Continuous/Chronic\", \"Short-Term\" and \"As-Needed\"."; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "Definition:A collection of concepts that identifies different types of 'duration-based' mediation working lists.\r\n\n \n Examples:\"Continuous/Chronic\" \"Short-Term\" and \"As Needed\""; + case ACU: return "Definition:A list of medications which the patient is only expected to consume for the duration of the current order or limited set of orders and which is not expected to be renewed."; + case CHRON: return "Definition:A list of medications which are expected to be continued beyond the present order and which the patient should be assumed to be taking unless explicitly stopped."; + case ONET: return "Definition:A list of medications which the patient is intended to be administered only once."; + case PRN: return "Definition:A list of medications which the patient will consume intermittently based on the behavior of the condition for which the medication is indicated."; + case MEDLIST: return "List of medications."; + case CURMEDLIST: return "List of current medications."; + case DISCMEDLIST: return "List of discharge medications."; + case HISTMEDLIST: return "Historical list of medications."; + case _ACTMONITORINGPROTOCOLCODE: return "Identifies types of monitoring programs"; + case CTLSUB: return "A monitoring program that focuses on narcotics and/or commonly abused substances that are subject to legal restriction."; + case INV: return "Definition:A monitoring program that focuses on a drug which is under investigation and has not received regulatory approval for the condition being investigated"; + case LU: return "Description:A drug that can be prescribed (and reimbursed) only if it meets certain criteria."; + case OTC: return "Medicines designated in this way may be supplied for patient use without a prescription. The exact form of categorisation will vary in different realms."; + case RX: return "Some form of prescription is required before the related medicine can be supplied for a patient. The exact form of regulation will vary in different realms."; + case SA: return "Definition:A drug that requires prior approval (to be reimbursed) before being dispensed"; + case SAC: return "Description:A drug that requires special access permission to be prescribed and dispensed."; + case _ACTNONOBSERVATIONINDICATIONCODE: return "Description:Concepts representing indications (reasons for clinical action) other than diagnosis and symptoms."; + case IND01: return "Description:Contrast agent required for imaging study."; + case IND02: return "Description:Provision of prescription or direction to consume a product for purposes of bowel clearance in preparation for a colonoscopy."; + case IND03: return "Description:Provision of medication as a preventative measure during a treatment or other period of increased risk."; + case IND04: return "Description:Provision of medication during pre-operative phase; e.g., antibiotics before dental surgery or bowel prep before colon surgery."; + case IND05: return "Description:Provision of medication for pregnancy --e.g., vitamins, antibiotic treatments for vaginal tract colonization, etc."; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "Identifies the type of verification investigation being undertaken with respect to the subject of the verification activity.\r\n\n \n Examples:\n \r\n\n \n \n Verification of eligibility for coverage under a policy or program - aka enrolled/covered by a policy or program\r\n\n \n \n Verification of record - e.g., person has record in an immunization registry\r\n\n \n \n Verification of enumeration - e.g. NPI\r\n\n \n \n Verification of Board Certification - provider specific\r\n\n \n \n Verification of Certification - e.g. JAHCO, NCQA, URAC\r\n\n \n \n Verification of Conformance - e.g. entity use with HIPAA, conformant to the CCHIT EHR system criteria\r\n\n \n \n Verification of Provider Credentials\r\n\n \n \n Verification of no adverse findings - e.g. on National Provider Data Bank, Health Integrity Protection Data Base (HIPDB)"; + case VFPAPER: return "Definition:Indicates that the paper version of the record has, should be or is being verified against the electronic version."; + case _ACTPAYMENTCODE: return "Code identifying the method or the movement of payment instructions.\r\n\n Codes are drawn from X12 data element 591 (PaymentMethodCode)"; + case ACH: return "Automated Clearing House (ACH)."; + case CHK: return "A written order to a bank to pay the amount specified from funds on deposit."; + case DDP: return "Electronic Funds Transfer (EFT) deposit into the payee's bank account"; + case NON: return "Non-Payment Data."; + case _ACTPHARMACYSUPPLYTYPE: return "Identifies types of dispensing events"; + case DF: return "A fill providing sufficient supply for one day"; + case EM: return "A supply action where there is no 'valid' order for the supplied medication. E.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription)"; + case SO: return "An emergency supply where the expectation is that a formal order authorizing the supply will be provided at a later date."; + case FF: return "The initial fill against an order. (This includes initial fills against refill orders.)"; + case FFC: return "A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets)."; + case FFP: return "A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.)"; + case FFSS: return "A first fill where the strength supplied is less than the ordered strength. (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TF: return "A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance."; + case FS: return "A supply action to restock a smaller more local dispensary."; + case MS: return "A supply of a manufacturer sample"; + case RF: return "A fill against an order that has already been filled (or partially filled) at least once."; + case UD: return "A supply action that provides sufficient material for a single dose."; + case RFC: return "A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.)"; + case RFCS: return "A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFF: return "The first fill against an order that has already been filled at least once at another facility."; + case RFFS: return "The first fill against an order that has already been filled at least once at another facility and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFP: return "A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.)"; + case RFPS: return "A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFS: return "A fill against an order that has already been filled (or partially filled) at least once and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TB: return "A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided."; + case TBS: return "A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case UDE: return "A supply action that provides sufficient material for a single dose via multiple products. E.g. 2 50mg tablets for a 100mg unit dose."; + case _ACTPOLICYTYPE: return "Description:Types of policies that further specify the ActClassPolicy value set."; + case _ACTPRIVACYPOLICY: return "A policy deeming certain information to be private to an individual or organization.\r\n\n \n Definition: A mandate, obligation, requirement, rule, or expectation relating to privacy.\r\n\n \n Discussion: ActPrivacyPolicyType codes support the designation of the 1..* policies that are applicable to an Act such as a Consent Directive, a Role such as a VIP Patient, or an Entity such as a patient who is a minor. 1..* ActPrivacyPolicyType values may be associated with an Act or Role to indicate the policies that govern the assignment of an Act or Role confidentialityCode. Use of multiple ActPrivacyPolicyType values enables fine grain specification of applicable policies, but must be carefully assigned to ensure cogency and avoid creation of conflicting policy mandates.\r\n\n \n Usage Note: Statutory title may be named in the ActClassPolicy Act Act.title to specify which privacy policy is being referenced."; + case _ACTCONSENTDIRECTIVE: return "Definition: Specifies the type of consent directive indicated by an ActClassPolicy e.g., a 3rd party authorization to disclose or consent for a substitute decision maker (SDM) or a notice of privacy policy.\r\n\n \n Usage Note: ActConsentDirective codes are used to specify the type of Consent Directive to which a Consent Directive Act conforms."; + case EMRGONLY: return "This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations.\r\n\n \n Definition: Opt-in to disclosure of health information for emergency only consent directive."; + case NOPP: return "Acknowledgement of custodian notice of privacy practices.\r\n\n \n Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified."; + case OPTIN: return "This general consent directive permits disclosure of health information. Additional parameter may limit authorized users, purpose of use, user obligations, duration, or information types permitted to be disclosed, and impose uses obligations.\r\n\n \n Definition: Opt-in to disclosure of health information consent directive."; + case OPTOUT: return "This general consent directive prohibits disclosure of health information. Additional parameters may permit access to some information types by certain users, roles, purposes of use, durations and impose user obligations.\r\n\n \n Definition: Opt-out of disclosure of health information consent directive."; + case _INFORMATIONSENSITIVITYPOLICY: return "A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g., a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g., collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations.\r\n\n \n Usage Note: Sensitivity codes are not useful for interoperability outside of a policy domain because sensitivity policies are typically localized and vary drastically across policy domains even for the same information category because of differing organizational business rules, security policies, and jurisdictional requirements. For example, an employee's sensitivity code would make little sense for use outside of a policy domain. 'Taboo' would rarely be useful outside of a policy domain unless there are jurisdictional requirements requiring that a provider disclose sensitive information to a patient directly. Sensitivity codes may be more appropriate in a legacy system's Master Files in order to notify those who access a patient's orders and observations about the sensitivity policies that apply. Newer systems may have a security engine that uses a sensitivity policy's criteria directly. The specializable InformationSensitivityPolicy Act.code may be useful in some scenarios if used in combination with a sensitivity identifier and/or Act.title."; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as \"constraints around appropriate disclosure of information about this Act, regardless of mood.\"\r\n\n \n Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values."; + case ETH: return "Policy for handling alcohol or drug-abuse information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to alcohol or drug-abuse information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case GDIS: return "Policy for handling genetic disease information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to genetic disease information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case HIV: return "Policy for handling HIV or AIDS information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to HIV or AIDS information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case PSY: return "Policy for handling psychiatry information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to psychiatry information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SCA: return "Policy for handling sickle cell disease information, which is afforded heightened confidentiality. Information handling protocols are based on organizational policies related to sickle cell disease information, which is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then the Act valued with this ActCode should be associated with an Act valued with any applicable laws from the ActPrivacyLaw code system."; + case SDV: return "Policy for handling sexual assault, abuse, or domestic violence information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexual assault, abuse, or domestic violence information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SEX: return "Policy for handling sexuality and reproductive health information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexuality and reproductive health information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case STD: return "Policy for handling sexually transmitted disease information, which will be afforded heightened confidentiality.\n Information handling protocols based on organizational policies related to sexually transmitted disease information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case TBOO: return "Policy for handling information not to be initially disclosed or discussed with patient except by a physician assigned to patient in this case. Information handling protocols based on organizational policies related to sensitive patient information that must be initially discussed with the patient by an attending physician before being disclosed to the patient.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code.\r\n\n \n Open Issue: This definition conflates a rule and a characteristic, and there may be a similar issue with ts sibling codes."; + case SICKLE: return "Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as \"constraints around appropriate disclosure of information about this Act, regardless of mood.\"\r\n\n \n Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values."; + case _ENTITYSENSITIVITYPOLICYTYPE: return "Types of sensitivity policies that may apply to a sensitive attribute on an Entity.\r\n\n \n Usage Note: EntitySensitivity codes are used to convey a policy that is applicable to sensitive information conveyed by an entity attribute. May be used to bind a Role.confidentialityCode associated with an Entity per organizational policy. Role.confidentialityCode is defined in the RIM as \"an indication of the appropriate disclosure of information about this Role with respect to the playing Entity.\""; + case DEMO: return "Policy for handling all demographic information about an information subject, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to all demographic about an information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DOB: return "Policy for handling information related to an information subject's date of birth, which will be afforded heightened confidentiality.Policies may govern sensitivity of information related to an information subject's date of birth, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case GENDER: return "Policy for handling information related to an information subject's gender and sexual orientation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's gender and sexual orientation, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case LIVARG: return "Policy for handling information related to an information subject's living arrangement, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's living arrangement, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case MARST: return "Policy for handling information related to an information subject's marital status, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's marital status, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case RACE: return "Policy for handling information related to an information subject's race, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's race, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case REL: return "Policy for handling information related to an information subject's religious affiliation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's religion, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "Types of sensitivity policies that apply to Roles.\r\n\n \n Usage Notes: RoleSensitivity codes are used to bind information to a Role.confidentialityCode per organizational policy. Role.confidentialityCode is defined in the RIM as \"an indication of the appropriate disclosure of information about this Role with respect to the playing Entity.\""; + case B: return "Policy for handling trade secrets such as financial information or intellectual property, which will be afforded heightened confidentiality. Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality.\r\n\n \n Usage Notes: No patient related information may ever be of this confidentiality level. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case EMPL: return "Policy for handling information related to an employer which is deemed classified to protect an employee who is the information subject, and which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to an employer, such as law enforcement or national security, the identity of which could impact the privacy, well-being, or safety of an information subject who is an employee.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case LOCIS: return "Policy for handling information related to the location of the information subject, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to the location of the information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SSP: return "Policy for handling information related to a provider of sensitive services, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to providers who deliver sensitive healthcare services in order to protect the privacy, well-being, and safety of the provider and of patients receiving sensitive services.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case ADOL: return "Policy for handling information related to an adolescent, which will be afforded heightened confidentiality per applicable organizational or jurisdictional policy. An enterprise may have a policy that requires that adolescent patient information be provided heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: For use within an enterprise in which an adolescent is the information subject. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case CEL: return "Policy for handling information related to a celebrity (people of public interest (VIP), which will be afforded heightened confidentiality. Celebrities are people of public interest (VIP) about whose information an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive may include health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: For use within an enterprise in which the information subject is deemed a celebrity or very important person. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DIA: return "Policy for handling information related to a diagnosis, health condition or health problem, which will be afforded heightened confidentiality. Diagnostic, health condition or health problem related information may be deemed sensitive by organizational policy, and require heightened confidentiality.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to diagnostic, health condition or health problem related information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DRGIS: return "Policy for handling information related to a drug, which will be afforded heightened confidentiality. Drug information may be deemed sensitive by organizational policy, and require heightened confidentiality.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to drug information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case EMP: return "Policy for handling information related to an employee, which will be afforded heightened confidentiality. When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: Policy for handling information related to an employee, which will be afforded heightened confidentiality. Description: When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location."; + case PDS: return "Policy for handling information reported by the patient about another person, e.g., a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g., family members may be deemed sensitive by default. The flag may be set or cleared on patient's request. \r\n\n \n Usage Note: For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case PRS: return "For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to certain types of information designated by a patient as sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case COMPT: return "This is the healthcare analog to the US Intelligence Community's concept of a Special Access Program. Compartment codes may be used in as a field value in an initiator's clearance to indicate permission to access and use an IT Resource with a security label having the same compartment value in security category label field.\r\n\n Map: Aligns with ISO 2382-8 definition of Compartment - \"A division of data into isolated blocks with separate security controls for the purpose of reducing risk.\""; + case HRCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of human resources department or workflow."; + case RESCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of a research project."; + case RMGTCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of records management department or workflow."; + case ACTTRUSTPOLICYTYPE: return "A mandate, obligation, requirement, rule, or expectation conveyed as security metadata between senders and receivers required to establish the reliability, authenticity, and trustworthiness of their transactions.\r\n\n Trust security metadata are observation made about aspects of trust applicable to an IT resource (data, information object, service, or system capability).\r\n\n Trust applicable to IT resources is established and maintained in and among security domains, and may be comprised of observations about the domain's trust authority, trust framework, trust policy, trust interaction rules, means for assessing and monitoring adherence to trust policies, mechanisms that enforce trust, and quality and reliability measures of assurance in those mechanisms. [Based on ISO IEC 10181-1 and NIST SP 800-63-2]\r\n\n For example, identity proofing , level of assurance, and Trust Framework."; + case TRSTACCRD: return "Type of security metadata about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGRE: return "Type of security metadata about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]"; + case TRSTASSUR: return "Type of security metadata about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case TRSTCERT: return "Type of security metadata about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]"; + case TRSTFWK: return "Type of security metadata about a complete set of contracts, regulations, or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative]"; + case TRSTMEC: return "Type of security metadata about a security architecture system component that supports enforcement of security policies."; + case COVPOL: return "Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed on benefit coverage under a policy or program by a sponsor, underwriter or payor on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A clinical protocol imposed by a payer to which a provider must adhere in order to be paid for providing the service. A formulary from which a provider must select prescribed drugs in order for the patient to incur a lower copay."; + case SECURITYPOLICY: return "Types of security policies that further specify the ActClassPolicy value set.\r\n\n \n Examples:\n \r\n\n \n obligation to encrypt\n refrain from redisclosure without consent"; + case OBLIGATIONPOLICY: return "Conveys the mandated workflow action that an information custodian, receiver, or user must perform. \r\n\n \n Usage Notes: Per ISO 22600-2, ObligationPolicy instances 'are event-triggered and define actions to be performed by manager agent'. Per HL7 Composite Security and Privacy Domain Analysis Model: This value set refers to the action required to receive the permission specified in the privacy rule. Per OASIS XACML, an obligation is an operation specified in a policy or policy that is performed in conjunction with the enforcement of an access control decision."; + case ANONY: return "Custodian system must remove any information that could result in identifying the information subject."; + case AOD: return "Custodian system must make available to an information subject upon request an accounting of certain disclosures of the individual’s protected health information over a period of time. Policy may dictate that the accounting include information about the information disclosed, the date of disclosure, the identification of the receiver, the purpose of the disclosure, the time in which the disclosing entity must provide a response and the time period for which accountings of disclosure can be requested."; + case AUDIT: return "Custodian system must monitor systems to ensure that all users are authorized to operate on information objects."; + case AUDTR: return "Custodian system must monitor and maintain retrievable log for each user and operation on information."; + case CPLYCC: return "Custodian security system must retrieve, evaluate, and comply with the information handling directions of the Confidentiality Code associated with an information target."; + case CPLYCD: return "Custodian security system must retrieve, evaluate, and comply with applicable information subject consent directives."; + case CPLYJPP: return "Custodian security system must retrieve, evaluate, and comply with applicable jurisdictional privacy policies associated with the target information."; + case CPLYOPP: return "Custodian security system must retrieve, evaluate, and comply with applicable organizational privacy policies associated with the target information."; + case CPLYOSP: return "Custodian security system must retrieve, evaluate, and comply with the organizational security policies associated with the target information."; + case CPLYPOL: return "Custodian security system must retrieve, evaluate, and comply with applicable policies associated with the target information."; + case DEID: return "Custodian system must strip information of data that would allow the identification of the source of the information or the information subject."; + case DELAU: return "Custodian system must remove target information from access after use."; + case ENCRYPT: return "Custodian system must render information unreadable by algorithmically transforming plaintext into ciphertext. \r\n\n \r\n\n \n Usage Notes: A mathematical transposition of a file or data stream so that it cannot be deciphered at the receiving end without the proper key. Encryption is a security feature that assures that only the parties who are supposed to be participating in a videoconference or data transfer are able to do so. It can include a password, public and private keys, or a complex combination of all. (Per Infoway.)"; + case ENCRYPTR: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext when \"at rest\" or in storage."; + case ENCRYPTT: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while \"in transit\" or being transported by any means."; + case ENCRYPTU: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while in use such that operations permitted on the target information are limited by the license granted to the end user."; + case HUAPRV: return "Custodian system must require human review and approval for permission requested."; + case MASK: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext. User may be provided a key to decrypt per license or \"shared secret\"."; + case MINEC: return "Custodian must limit access and disclosure to the minimum information required to support an authorized user's purpose of use. \r\n\n \n Usage Note: Limiting the information available for access and disclosure to that an authorized user or receiver \"needs to know\" in order to perform permitted workflow or purpose of use."; + case PRIVMARK: return "Custodian must create and/or maintain human readable security label tags as required by policy.\r\n\n Map: Aligns with ISO 22600-3 Section A.3.4.3 description of privacy mark: \"If present, the privacy-mark is not used for access control. The content of the privacy-mark may be defined by the security policy in force (identified by the security-policy-identifier) which may define a list of values to be used. Alternately, the value may be determined by the originator of the security-label.\""; + case PSEUD: return "Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject."; + case REDACT: return "Custodian system must remove information, which is not authorized to be access, used, or disclosed from records made available to otherwise authorized users."; + case REFRAINPOLICY: return "Conveys prohibited actions which an information custodian, receiver, or user is not permitted to perform unless otherwise authorized or permitted under specified circumstances.\r\n\n \r\n\n \n Usage Notes: ISO 22600-2 species that a Refrain Policy \"defines actions the subjects must refrain from performing\". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc."; + case NOAUTH: return "Prohibition on disclosure without information subject's authorization."; + case NOCOLLECT: return "Prohibition on collection or storage of the information."; + case NODSCLCD: return "Prohibition on disclosure without organizational approved patient restriction."; + case NODSCLCDS: return "Prohibition on disclosure without a consent directive from the information subject."; + case NOINTEGRATE: return "Prohibition on Integration into other records."; + case NOLIST: return "Prohibition on disclosure except to entities on specific access list."; + case NOMOU: return "Prohibition on disclosure without an interagency service agreement or memorandum of understanding (MOU)."; + case NOORGPOL: return "Prohibition on disclosure without organizational authorization."; + case NOPAT: return "Prohibition on disclosing information to patient, family or caregivers without attending provider's authorization.\r\n\n \n Usage Note: The information may be labeled with the ActInformationSensitivity TBOO code, triggering application of this RefrainPolicy code as a handling caveat controlling access.\r\n\n Maps to FHIR NOPAT: Typically, this is used on an Alert resource, when the alert records information on patient abuse or non-compliance.\r\n\n FHIR print name is \"keep information from patient\". Maps to the French realm - code: INVISIBLE_PATIENT.\r\n\n \n displayName: Document non visible par le patient\n codingScheme: 1.2.250.1.213.1.1.4.13\n \n French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone)."; + case NOPERSISTP: return "Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited."; + case NORDSCLCD: return "Prohibition on redisclosure without patient consent directive."; + case NORDSCLCDS: return "Prohibition on redisclosure without a consent directive from the information subject."; + case NORDSCLW: return "Prohibition on disclosure without authorization under jurisdictional law."; + case NORELINK: return "Prohibition on associating de-identified or pseudonymized information with other information in a manner that could or does result in disclosing information intended to be masked."; + case NOREUSE: return "Prohibition on use of the information beyond the purpose of use initially authorized."; + case NOVIP: return "Prohibition on disclosure except to principals with access permission to specific VIP information."; + case ORCON: return "Prohibition on disclosure except as permitted by the information originator."; + case _ACTPRODUCTACQUISITIONCODE: return "The method that a product is obtained for use by the subject of the supply act (e.g. patient). Product examples are consumable or durable goods."; + case LOAN: return "Temporary supply of a product without transfer of ownership for the product."; + case RENT: return "Temporary supply of a product with financial compensation, without transfer of ownership for the product."; + case TRANSFER: return "Transfer of ownership for a product."; + case SALE: return "Transfer of ownership for a product for financial compensation."; + case _ACTSPECIMENTRANSPORTCODE: return "Transportation of a specimen."; + case SREC: return "Description:Specimen has been received by the participating organization/department."; + case SSTOR: return "Description:Specimen has been placed into storage at a participating location."; + case STRAN: return "Description:Specimen has been put in transit to a participating receiver."; + case _ACTSPECIMENTREATMENTCODE: return "Set of codes related to specimen treatments"; + case ACID: return "The lowering of specimen pH through the addition of an acid"; + case ALK: return "The act rendering alkaline by impregnating with an alkali; a conferring of alkaline qualities."; + case DEFB: return "The removal of fibrin from whole blood or plasma through physical or chemical means"; + case FILT: return "The passage of a liquid through a filter, accomplished by gravity, pressure or vacuum (suction)."; + case LDLP: return "LDL Precipitation"; + case NEUT: return "The act or process by which an acid and a base are combined in such proportions that the resulting compound is neutral."; + case RECA: return "The addition of calcium back to a specimen after it was removed by chelating agents"; + case UFIL: return "The filtration of a colloidal substance through a semipermeable medium that allows only the passage of small molecules."; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "Description: Describes the type of substance administration being performed. This should not be used to carry codes for identification of products. Use an associated role or entity to carry such information."; + case DRUG: return "The introduction of a drug into a subject with the intention of altering its biologic state with the intent of improving its health status."; + case FD: return "Description: The introduction of material into a subject with the intent of providing nutrition or other dietary supplements (e.g. minerals or vitamins)."; + case IMMUNIZ: return "The introduction of an immunogen with the intent of stimulating an immune response, aimed at preventing subsequent infections by more viable agents."; + case BOOSTER: return "An additional immunization administration within a series intended to bolster or enhance immunity."; + case INITIMMUNIZ: return "The first immunization administration in a series intended to produce immunity"; + case _ACTTASKCODE: return "Description: A task or action that a user may perform in a clinical information system (e.g., medication order entry, laboratory test results review, problem list entry)."; + case OE: return "A clinician creates a request for a service to be performed for a given patient."; + case LABOE: return "A clinician creates a request for a laboratory test to be done for a given patient."; + case MEDOE: return "A clinician creates a request for the administration of one or more medications to a given patient."; + case PATDOC: return "A person enters documentation about a given patient."; + case ALLERLREV: return "Description: A person reviews a list of known allergies of a given patient."; + case CLINNOTEE: return "A clinician enters a clinical note about a given patient"; + case DIAGLISTE: return "A clinician enters a diagnosis for a given patient."; + case DISCHINSTE: return "A person provides a discharge instruction to a patient."; + case DISCHSUME: return "A clinician enters a discharge summary for a given patient."; + case PATEDUE: return "A person provides a patient-specific education handout to a patient."; + case PATREPE: return "A pathologist enters a report for a given patient."; + case PROBLISTE: return "A clinician enters a problem for a given patient."; + case RADREPE: return "A radiologist enters a report for a given patient."; + case IMMLREV: return "Description: A person reviews a list of immunizations due or received for a given patient."; + case REMLREV: return "Description: A person reviews a list of health care reminders for a given patient."; + case WELLREMLREV: return "Description: A person reviews a list of wellness or preventive care reminders for a given patient."; + case PATINFO: return "A person (e.g., clinician, the patient herself) reviews patient information in the electronic medical record."; + case ALLERLE: return "Description: A person enters a known allergy for a given patient."; + case CDSREV: return "A person reviews a recommendation/assessment provided automatically by a clinical decision support application for a given patient."; + case CLINNOTEREV: return "A person reviews a clinical note of a given patient."; + case DISCHSUMREV: return "A person reviews a discharge summary of a given patient."; + case DIAGLISTREV: return "A person reviews a list of diagnoses of a given patient."; + case IMMLE: return "Description: A person enters an immunization due or received for a given patient."; + case LABRREV: return "A person reviews a list of laboratory results of a given patient."; + case MICRORREV: return "A person reviews a list of microbiology results of a given patient."; + case MICROORGRREV: return "A person reviews organisms of microbiology results of a given patient."; + case MICROSENSRREV: return "A person reviews the sensitivity test of microbiology results of a given patient."; + case MLREV: return "A person reviews a list of medication orders submitted to a given patient"; + case MARWLREV: return "A clinician reviews a work list of medications to be administered to a given patient."; + case OREV: return "A person reviews a list of orders submitted to a given patient."; + case PATREPREV: return "A person reviews a pathology report of a given patient."; + case PROBLISTREV: return "A person reviews a list of problems of a given patient."; + case RADREPREV: return "A person reviews a radiology report of a given patient."; + case REMLE: return "Description: A person enters a health care reminder for a given patient."; + case WELLREMLE: return "Description: A person enters a wellness or preventive care reminder for a given patient."; + case RISKASSESS: return "A person reviews a Risk Assessment Instrument report of a given patient."; + case FALLRISK: return "A person reviews a Falls Risk Assessment Instrument report of a given patient."; + case _ACTTRANSPORTATIONMODECODE: return "Characterizes how a transportation act was or will be carried out.\r\n\n \n Examples: Via private transport, via public transit, via courier."; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "Definition: Characterizes how a patient was or will be transported to the site of a patient encounter.\r\n\n \n Examples: Via ambulance, via public transit, on foot."; + case AFOOT: return "pedestrian transport"; + case AMBT: return "ambulance transport"; + case AMBAIR: return "fixed-wing ambulance transport"; + case AMBGRND: return "ground ambulance transport"; + case AMBHELO: return "helicopter ambulance transport"; + case LAWENF: return "law enforcement transport"; + case PRVTRN: return "private transport"; + case PUBTRN: return "public transport"; + case _OBSERVATIONTYPE: return "Identifies the kinds of observations that can be performed"; + case _ACTSPECOBSCODE: return "Identifies the type of observation that is made about a specimen that may affect its processing, analysis or further result interpretation"; + case ARTBLD: return "Describes the artificial blood identifier that is associated with the specimen."; + case DILUTION: return "An observation that reports the dilution of a sample."; + case AUTOHIGH: return "The dilution of a sample performed by automated equipment. The value is specified by the equipment"; + case AUTOLOW: return "The dilution of a sample performed by automated equipment. The value is specified by the equipment"; + case PRE: return "The dilution of the specimen made prior to being loaded onto analytical equipment"; + case RERUN: return "The value of the dilution of a sample after it had been analyzed at a prior dilution value"; + case EVNFCTS: return "Domain provides codes that qualify the ActLabObsEnvfctsCode domain. (Environmental Factors)"; + case INTFR: return "An observation that relates to factors that may potentially cause interference with the observation"; + case FIBRIN: return "The Fibrin Index of the specimen. In the case of only differentiating between Absent and Present, recommend using 0 and 1"; + case HEMOLYSIS: return "An observation of the hemolysis index of the specimen in g/L"; + case ICTERUS: return "An observation that describes the icterus index of the specimen. It is recommended to use mMol/L of bilirubin"; + case LIPEMIA: return "An observation used to describe the Lipemia Index of the specimen. It is recommended to use the optical turbidity at 600 nm (in absorbance units)."; + case VOLUME: return "An observation that reports the volume of a sample."; + case AVAILABLE: return "The available quantity of specimen. This is the current quantity minus any planned consumption (e.g., tests that are planned)"; + case CONSUMPTION: return "The quantity of specimen that is used each time the equipment uses this substance"; + case CURRENT: return "The current quantity of the specimen, i.e., initial quantity minus what has been actually used."; + case INITIAL: return "The initial quantity of the specimen in inventory"; + case _ANNOTATIONTYPE: return "AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "Description:Provides a categorization for annotations recorded directly against the patient ."; + case ANNDI: return "Description:A note that is specific to a patient's diagnostic images, either historical, current or planned."; + case ANNGEN: return "Description:A general or uncategorized note."; + case ANNIMM: return "A note that is specific to a patient's immunizations, either historical, current or planned."; + case ANNLAB: return "Description:A note that is specific to a patient's laboratory results, either historical, current or planned."; + case ANNMED: return "Description:A note that is specific to a patient's medications, either historical, current or planned."; + case _GENETICOBSERVATIONTYPE: return "Description: None provided"; + case GENE: return "Description: A DNA segment that contributes to phenotype/function. In the absence of demonstrated function a gene may be characterized by sequence, transcription or homology"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "Description: Observation codes which describe characteristics of the immunization material."; + case OBSANTC: return "Description: Indicates the valid antigen count."; + case OBSANTV: return "Description: Indicates whether an antigen is valid or invalid."; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "A code that is used to indicate the type of case safety report received from sender. The current code example reference is from the International Conference on Harmonisation (ICH) Expert Workgroup guideline on Clinical Safety Data Management: Data Elements for Transmission of Individual Case Safety Reports. The unknown/unavailable option allows the transmission of information from a secondary sender where the initial sender did not specify the type of report.\r\n\n Example concepts include: Spontaneous, Report from study, Other."; + case PATADVEVNT: return "Indicates that the ICSR is describing problems that a patient experienced after receiving a vaccine product."; + case VACPROBLEM: return "Indicates that the ICSR is describing a problem with the actual vaccine product such as physical defects (cloudy, particulate matter) or inability to confer immunity."; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "Definition:The set of LOINC codes for the act of determining the period of time that has elapsed since an entity was born or created."; + case _216119: return "Definition:Estimated age."; + case _216127: return "Definition:Reported age."; + case _295535: return "Definition:Calculated age."; + case _305250: return "Definition:General specification of age with no implied method of determination."; + case _309724: return "Definition:Age at onset of associated adverse event; no implied method of determination."; + case _MEDICATIONOBSERVATIONTYPE: return "MedicationObservationType"; + case REPHALFLIFE: return "Description:This observation represents an 'average' or 'expected' half-life typical of the product."; + case SPLCOATING: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, indicating whether it has one or more coatings such as sugar coating, film coating, or enteric coating. Only coatings to the external surface or the dosage form should be considered (for example, coatings to individual pellets or granules inside a capsule or tablet are excluded from consideration).\r\n\n \n Constraints: The Observation.value must be a Boolean (BL) with true for the presence or false for the absence of one or more coatings on a solid dosage form."; + case SPLCOLOR: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the color or colors that most predominantly define the appearance of the dose form. SPLCOLOR is not an FDA specification for the actual color of solid dosage forms or the names of colors that can appear in labeling.\r\n\n \n Constraints: The Observation.value must be a single coded value or a list of multiple coded values, specifying one or more distinct colors that approximate of the color(s) of distinct areas of the solid dosage form, such as the different sides of a tablet or one-part capsule, or the different halves of a two-part capsule. Bands on banded capsules, regardless of the color, are not considered when assigning an SPLCOLOR. Imprints on the dosage form, regardless of their color are not considered when assigning an SPLCOLOR. If more than one color exists on a particular side or half, then the most predominant color on that side or half is recorded. If the gelatin capsule shell is colorless and transparent, use the predominant color of the contents that appears through the colorless and transparent capsule shell. Colors can include: Black;Gray;White;Red;Pink;Purple;Green;Yellow;Orange;Brown;Blue;Turquoise."; + case SPLIMAGE: return "Description: A characteristic representing a single file reference that contains two or more views of the same dosage form of the product; in most cases this should represent front and back views of the dosage form, but occasionally additional views might be needed in order to capture all of the important physical characteristics of the dosage form. Any imprint and/or symbol should be clearly identifiable, and the viewer should not normally need to rotate the image in order to read it. Images that are submitted with SPL should be included in the same directory as the SPL file."; + case SPLIMPRINT: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the alphanumeric text that appears on the solid dosage form, including text that is embossed, debossed, engraved or printed with ink. The presence of other non-textual distinguishing marks or symbols is recorded by SPLSYMBOL.\r\n\n \n Examples: Included in SPLIMPRINT are alphanumeric text that appears on the bands of banded capsules and logos and other symbols that can be interpreted as letters or numbers.\r\n\n \n Constraints: The Observation.value must be of type Character String (ST). Excluded from SPLIMPRINT are internal and external cut-outs in the form of alphanumeric text and the letter 'R' with a circle around it (when referring to a registered trademark) and the letters 'TM' (when referring to a 'trade mark'). To record text, begin on either side or part of the dosage form. Start at the top left and progress as one would normally read a book. Enter a semicolon to show separation between words or line divisions."; + case SPLSCORING: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the number of equal pieces that the solid dosage form can be divided into using score line(s). \r\n\n \n Example: One score line creating two equal pieces is given a value of 2, two parallel score lines creating three equal pieces is given a value of 3.\r\n\n \n Constraints: Whether three parallel score lines create four equal pieces or two intersecting score lines create two equal pieces using one score line and four equal pieces using both score lines, both have the scoring value of 4. Solid dosage forms that are not scored are given a value of 1. Solid dosage forms that can only be divided into unequal pieces are given a null-value with nullFlavor other (OTH)."; + case SPLSHAPE: return "Description: A characteristic of an oral solid dosage form of a medicinal product, specifying the two dimensional representation of the solid dose form, in terms of the outside perimeter of a solid dosage form when the dosage form, resting on a flat surface, is viewed from directly above, including slight rounding of corners. SPLSHAPE does not include embossing, scoring, debossing, or internal cut-outs. SPLSHAPE is independent of the orientation of the imprint and logo. Shapes can include: Triangle (3 sided); Square; Round; Semicircle; Pentagon (5 sided); Diamond; Double circle; Bullet; Hexagon (6 sided); Rectangle; Gear; Capsule; Heptagon (7 sided); Trapezoid; Oval; Clover; Octagon (8 sided); Tear; Freeform."; + case SPLSIZE: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g., 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter.\r\n\n \n Example: SPLSIZE for a rectangular shaped tablet is the length and SPLSIZE for a round shaped tablet is the diameter."; + case SPLSYMBOL: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, to describe whether or not the medicinal product has a mark or symbol appearing on it for easy and definite recognition. Score lines, letters, numbers, and internal and external cut-outs are not considered marks or symbols. See SPLSCORING and SPLIMPRINT for these characteristics.\r\n\n \n Constraints: The Observation.value must be a Boolean (BL) with true indicating the presence and false for the absence of marks or symbols.\r\n\n \n Example:"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "Distinguishes the kinds of coded observations that could be the trigger for clinical issue detection. These are observations that are not measurable, but instead can be defined with codes. Coded observation types include: Allergy, Intolerance, Medical Condition, Pregnancy status, etc."; + case _CASETRANSMISSIONMODE: return "Code for the mechanism by which disease was acquired by the living subject involved in the public health case. Includes sexually transmitted, airborne, bloodborne, vectorborne, foodborne, zoonotic, nosocomial, mechanical, dermal, congenital, environmental exposure, indeterminate."; + case AIRTRNS: return "Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation."; + case ANANTRNS: return "Communication of an agent from one animal to another proximate animal."; + case ANHUMTRNS: return "Communication of an agent from an animal to a proximate person."; + case BDYFLDTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with any body fluid."; + case BLDTRNS: return "Communication of an agent to a living subject through direct contact with blood or blood products whether the contact with blood is part of a therapeutic procedure or not."; + case DERMTRNS: return "Communication of an agent from a living subject or environmental source to a living subject via agent migration through intact skin."; + case ENVTRNS: return "Communication of an agent from an environmental surface or source to a living subject by direct contact."; + case FECTRNS: return "Communication of an agent from a living subject or environmental source to a living subject through oral contact with material contaminated by person or animal fecal material."; + case FOMTRNS: return "Communication of an agent from an non-living material to a living subject through direct contact."; + case FOODTRNS: return "Communication of an agent from a food source to a living subject via oral consumption."; + case HUMHUMTRNS: return "Communication of an agent from a person to a proximate person."; + case INDTRNS: return "Communication of an agent to a living subject via an undetermined route."; + case LACTTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with mammalian milk or colostrum."; + case NOSTRNS: return "Communication of an agent from any entity to a living subject while the living subject is in the patient role in a healthcare facility."; + case PARTRNS: return "Communication of an agent from a living subject or environmental source to a living subject where the acquisition of the agent is not via the alimentary canal."; + case PLACTRNS: return "Communication of an agent from a living subject to the progeny of that living subject via agent migration across the maternal-fetal placental membranes while in utero."; + case SEXTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with genital or oral tissues as part of a sexual act."; + case TRNSFTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with blood or blood products where the contact with blood is part of a therapeutic procedure."; + case VECTRNS: return "Communication of an agent from a living subject acting as a required intermediary in the agent transmission process to a recipient living subject via direct contact."; + case WATTRNS: return "Communication of an agent from a contaminated water source to a living subject whether the water is ingested as a food or not. The route of entry of the water may be through any bodily orifice."; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "Codes used to define various metadata aspects of a health quality measure."; + case AGGREGATE: return "Indicates that the observation is carrying out an aggregation calculation, contained in the value element."; + case COPY: return "Identifies the organization(s) who own the intellectual property represented by the eMeasure."; + case CRS: return "Summary of relevant clinical guidelines or other clinical recommendations supporting this eMeasure."; + case DEF: return "Description of individual terms, provided as needed."; + case DISC: return "Disclaimer information for the eMeasure."; + case FINALDT: return "The timestamp when the eMeasure was last packaged in the Measure Authoring Tool."; + case GUIDE: return "Used to allow measure developers to provide additional guidance for implementers to understand greater specificity than could be provided in the logic for data criteria."; + case IDUR: return "Information on whether an increase or decrease in score is the preferred result \n(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range)."; + case ITMCNT: return "Describes the items counted by the measure (e.g., patients, encounters, procedures, etc.)"; + case KEY: return "A significant word that aids in discoverability."; + case MEDT: return "The end date of the measurement period."; + case MSD: return "The start date of the measurement period."; + case MSRADJ: return "The method of adjusting for clinical severity and conditions present at the start of care that can influence patient outcomes for making valid comparisons of outcome measures across providers. Indicates whether an eMeasure is subject to the statistical process for reducing, removing, or clarifying the influences of confounding factors to allow more useful comparisons."; + case MSRAGG: return "Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). \r\n\n \n Open Issue: The description does NOT align well with the definition used in the HQMF specfication; correct the MSGAGG definition, and the possible distinction of MSRAGG as a child of AGGREGATE."; + case MSRIMPROV: return "Information on whether an increase or decrease in score is the preferred result. This should reflect information on which way is better, an increase or decrease in score."; + case MSRJUR: return "The list of jurisdiction(s) for which the measure applies."; + case MSRRPTR: return "Type of person or organization that is expected to report the issue."; + case MSRRPTTIME: return "The maximum time that may elapse following completion of the measure until the measure report must be sent to the receiver."; + case MSRSCORE: return "Indicates how the calculation is performed for the eMeasure \n(e.g., proportion, continuous variable, ratio)"; + case MSRSET: return "Location(s) in which care being measured is rendered\r\n\n Usage Note: MSRSET is used rather than RoleCode because the setting applies to what is being measured, as opposed to participating directly in the health quality measure documantion itself)."; + case MSRTOPIC: return "health quality measure topic type"; + case MSRTP: return "The time period for which the eMeasure applies."; + case MSRTYPE: return "Indicates whether the eMeasure is used to examine a process or an outcome over time \n(e.g., Structure, Process, Outcome)."; + case RAT: return "Succinct statement of the need for the measure. Usually includes statements pertaining to Importance criterion: impact, gap in care and evidence."; + case REF: return "Identifies bibliographic citations or references to clinical practice guidelines, sources of evidence, or other relevant materials supporting the intent and rationale of the eMeasure."; + case SDE: return "Comparison of results across strata can be used to show where disparities exist or where there is a need to expose differences in results. For example, Centers for Medicare & Medicaid Services (CMS) in the U.S. defines four required Supplemental Data Elements (payer, ethnicity, race, and gender), which are variables used to aggregate data into various subgroups. Additional supplemental data elements required for risk adjustment or other purposes of data aggregation can be included in the Supplemental Data Element section."; + case STRAT: return "Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g., evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g., evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units])."; + case TRANF: return "Can be a URL or hyperlinks that link to the transmission formats that are specified for a particular reporting program."; + case USE: return "Usage notes."; + case _OBSERVATIONSEQUENCETYPE: return "ObservationSequenceType"; + case TIMEABSOLUTE: return "A sequence of values in the \"absolute\" time domain. This is the same time domain that all HL7 timestamps use. It is time as measured by the Gregorian calendar"; + case TIMERELATIVE: return "A sequence of values in a \"relative\" time domain. The time is measured relative to the earliest effective time in the Observation Series containing this sequence."; + case _OBSERVATIONSERIESTYPE: return "ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "This Observation Series type contains waveforms of a \"representative beat\" (a.k.a. \"median beat\" or \"average beat\"). The waveform samples are measured in relative time, relative to the beginning of the beat as defined by the Observation Series effective time. The waveforms are not directly acquired from the subject, but rather algorithmically derived from the \"rhythm\" waveforms."; + case RHYTHM: return "This Observation type contains ECG \"rhythm\" waveforms. The waveform samples are measured in absolute time (a.k.a. \"subject time\" or \"effective time\"). These waveforms are usually \"raw\" with some minimal amount of noise reduction and baseline filtering applied."; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "Description: Reporting codes that are related to an immunization event."; + case CLSSRM: return "Description: The class room associated with the patient during the immunization event."; + case GRADE: return "Description: The school grade or level the patient was in when immunized."; + case SCHL: return "Description: The school the patient attended when immunized."; + case SCHLDIV: return "Description: The school division or district associated with the patient during the immunization event."; + case TEACHER: return "Description: The patient's teacher when immunized."; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "Observation types for specifying criteria used to assert that a subject is included in a particular population."; + case DENEX: return "Criteria which specify subjects who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator."; + case DENEXCEP: return "Criteria which specify the removal of a subject, procedure or unit of measurement from the denominator, only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories:\r\n\n \n Medical reasons\n Patient (or subject) reasons\n System reasons"; + case DENOM: return "Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). The denominator can be the same as the initial population, or it may be a subset of the initial population to further constrain it for the purpose of the eMeasure. Different measures within an eMeasure set may have different denominators. Continuous Variable eMeasures do not have a denominator, but instead define a measure population."; + case IPOP: return "Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs)."; + case IPPOP: return "Criteria for specifying the patients to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods."; + case MSRPOPL: return "Criteria for specifying\nthe measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures."; + case MSRPOPLEX: return "Criteria for specifying subjects who should be removed from the eMeasure's Initial Population and Measure Population. Measure Population Exclusions are used in Continuous Variable measures to help narrow the Measure Population before determining the value(s) of the continuous variable(s)."; + case NUMER: return "Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period)."; + case NUMEX: return "Criteria for specifying instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures."; + case _PREFERENCEOBSERVATIONTYPE: return "Types of observations that can be made about Preferences."; + case PREFSTRENGTH: return "An observation about how important a preference is to the target of the preference."; + case ADVERSEREACTION: return "Indicates that the observation is of an unexpected negative occurrence in the subject suspected to result from the subject's exposure to one or more agents. Observation values would be the symptom resulting from the reaction."; + case ASSERTION: return "Description:Refines classCode OBS to indicate an observation in which observation.value contains a finding or other nominalized statement, where the encoded information in Observation.value is not altered by Observation.code. For instance, observation.code=\"ASSERTION\" and observation.value=\"fracture of femur present\" is an assertion of a clinical finding of femur fracture."; + case CASESER: return "Definition:An observation that provides a characterization of the level of harm to an investigation subject as a result of a reaction or event."; + case CDIO: return "An observation that states whether the disease was likely acquired outside the jurisdiction of observation, and if so, the nature of the inter-jurisdictional relationship.\r\n\n \n OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it."; + case CRIT: return "A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality."; + case CTMO: return "An observation that states the mechanism by which disease was acquired by the living subject involved in the public health case.\r\n\n \n OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it."; + case DX: return "Includes all codes defining types of indications such as diagnosis, symptom and other indications such as contrast agents for lab tests."; + case ADMDX: return "Admitting diagnosis are the diagnoses documented for administrative purposes as the basis for a hospital admission."; + case DISDX: return "Discharge diagnosis are the diagnoses documented for administrative purposes as the time of hospital discharge."; + case INTDX: return "Intermediate diagnoses are those diagnoses documented for administrative purposes during the course of a hospital stay."; + case NOI: return "The type of injury that the injury coding specifies."; + case GISTIER: return "Description: Accuracy determined as per the GIS tier code system."; + case HHOBS: return "Indicates that the observation is of a person’s living situation in a household including the household composition and circumstances."; + case ISSUE: return "There is a clinical issue for the therapy that makes continuation of the therapy inappropriate.\r\n\n \n Open Issue: The definition of this code does not correctly represent the concept space of its specializations (children)"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "Identifies types of detectyed issues for Act class \"ALRT\" for the administrative and patient administrative acts domains."; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "The requesting party has insufficient authorization to invoke the interaction."; + case SUPPRESSED: return "Description: One or more records in the query response have been suppressed due to consent or privacy restrictions."; + case VALIDAT: return "Description:The specified element did not pass business-rule validation."; + case KEY204: return "The ID of the patient, order, etc., was not found. Used for transactions other than additions, e.g. transfer of a non-existent patient."; + case KEY205: return "The ID of the patient, order, etc., already exists. Used in response to addition transactions (Admit, New Order, etc.)."; + case COMPLY: return "There may be an issue with the patient complying with the intentions of the proposed therapy"; + case DUPTHPY: return "The proposed therapy appears to duplicate an existing therapy"; + case DUPTHPCLS: return "Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy, though the specific mechanisms of action vary."; + case DUPTHPGEN: return "Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy and uses the same mechanisms of action as the existing therapy."; + case ABUSE: return "Description:The proposed therapy is frequently misused or abused and therefore should be used with caution and/or monitoring."; + case FRAUD: return "Description:The request is suspected to have a fraudulent basis."; + case PLYDOC: return "A similar or identical therapy was recently ordered by a different practitioner."; + case PLYPHRM: return "This patient was recently supplied a similar or identical therapy from a different pharmacy or supplier."; + case DOSE: return "Proposed dosage instructions for therapy differ from standard practice."; + case DOSECOND: return "Description:Proposed dosage is inappropriate due to patient's medical condition."; + case DOSEDUR: return "Proposed length of therapy differs from standard practice."; + case DOSEDURH: return "Proposed length of therapy is longer than standard practice"; + case DOSEDURHIND: return "Proposed length of therapy is longer than standard practice for the identified indication or diagnosis"; + case DOSEDURL: return "Proposed length of therapy is shorter than that necessary for therapeutic effect"; + case DOSEDURLIND: return "Proposed length of therapy is shorter than standard practice for the identified indication or diagnosis"; + case DOSEH: return "Proposed dosage exceeds standard practice"; + case DOSEHINDA: return "Proposed dosage exceeds standard practice for the patient's age"; + case DOSEHIND: return "High Dose for Indication Alert"; + case DOSEHINDSA: return "Proposed dosage exceeds standard practice for the patient's height or body surface area"; + case DOSEHINDW: return "Proposed dosage exceeds standard practice for the patient's weight"; + case DOSEIVL: return "Proposed dosage interval/timing differs from standard practice"; + case DOSEIVLIND: return "Proposed dosage interval/timing differs from standard practice for the identified indication or diagnosis"; + case DOSEL: return "Proposed dosage is below suggested therapeutic levels"; + case DOSELINDA: return "Proposed dosage is below suggested therapeutic levels for the patient's age"; + case DOSELIND: return "Low Dose for Indication Alert"; + case DOSELINDSA: return "Proposed dosage is below suggested therapeutic levels for the patient's height or body surface area"; + case DOSELINDW: return "Proposed dosage is below suggested therapeutic levels for the patient's weight"; + case MDOSE: return "Description:The maximum quantity of this drug allowed to be administered within a particular time-range (month, year, lifetime) has been reached or exceeded."; + case OBSA: return "Proposed therapy may be inappropriate or contraindicated due to conditions or characteristics of the patient"; + case AGE: return "Proposed therapy may be inappropriate or contraindicated due to patient age"; + case ADALRT: return "Proposed therapy is outside of the standard practice for an adult patient."; + case GEALRT: return "Proposed therapy is outside of standard practice for a geriatric patient."; + case PEALRT: return "Proposed therapy is outside of the standard practice for a pediatric patient."; + case COND: return "Proposed therapy may be inappropriate or contraindicated due to an existing/recent patient condition or diagnosis"; + case HGHT: return ""; + case LACT: return "Proposed therapy may be inappropriate or contraindicated when breast-feeding"; + case PREG: return "Proposed therapy may be inappropriate or contraindicated during pregnancy"; + case WGHT: return ""; + case CREACT: return "Description:Proposed therapy may be inappropriate or contraindicated because of a common but non-patient specific reaction to the product.\r\n\n \n Example:There is no record of a specific sensitivity for the patient, but the presence of the sensitivity is common and therefore caution is warranted."; + case GEN: return "Proposed therapy may be inappropriate or contraindicated due to patient genetic indicators."; + case GEND: return "Proposed therapy may be inappropriate or contraindicated due to patient gender."; + case LAB: return "Proposed therapy may be inappropriate or contraindicated due to recent lab test results"; + case REACT: return "Proposed therapy may be inappropriate or contraindicated based on the potential for a patient reaction to the proposed product"; + case ALGY: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to the proposed product. (Allergies are immune based reactions.)"; + case INT: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to the proposed product. (Intolerances are non-immune based sensitivities.)"; + case RREACT: return "Proposed therapy may be inappropriate or contraindicated because of a potential patient reaction to a cross-sensitivity related product."; + case RALG: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to a cross-sensitivity related product. (Allergies are immune based reactions.)"; + case RAR: return "Proposed therapy may be inappropriate or contraindicated because of a recorded prior adverse reaction to a cross-sensitivity related product."; + case RINT: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to a cross-sensitivity related product. (Intolerances are non-immune based sensitivities.)"; + case BUS: return "Description:A local business rule relating multiple elements has been violated."; + case CODEINVAL: return "Description:The specified code is not valid against the list of codes allowed for the element."; + case CODEDEPREC: return "Description:The specified code has been deprecated and should no longer be used. Select another code from the code system."; + case FORMAT: return "Description:The element does not follow the formatting or type rules defined for the field."; + case ILLEGAL: return "Description:The request is missing elements or contains elements which cause it to not meet the legal standards for actioning."; + case LENRANGE: return "Description:The length of the data specified falls out of the range defined for the element."; + case LENLONG: return "Description:The length of the data specified is greater than the maximum length defined for the element."; + case LENSHORT: return "Description:The length of the data specified is less than the minimum length defined for the element."; + case MISSCOND: return "Description:The specified element must be specified with a non-null value under certain conditions. In this case, the conditions are true but the element is still missing or null."; + case MISSMAND: return "Description:The specified element is mandatory and was not included in the instance."; + case NODUPS: return "Description:More than one element with the same value exists in the set. Duplicates not permission in this set in a set."; + case NOPERSIST: return "Description: Element in submitted message will not persist in data storage based on detected issue."; + case REPRANGE: return "Description:The number of repeating elements falls outside the range of the allowed number of repetitions."; + case MAXOCCURS: return "Description:The number of repeating elements is above the maximum number of repetitions allowed."; + case MINOCCURS: return "Description:The number of repeating elements is below the minimum number of repetitions allowed."; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "Description: Metadata associated with the identification (e.g. name or gender) does not match the identification being verified."; + case OBSOLETE: return "Description: One or more records in the query response have a status of 'obsolete'."; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "Identifies types of detected issues regarding the administration or supply of an item to a patient."; + case _ADMINISTRATIONDETECTEDISSUECODE: return "Administration of the proposed therapy may be inappropriate or contraindicated as proposed"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "InteractionDetectedIssueCode"; + case FOOD: return "Proposed therapy may interact with certain foods"; + case TPROD: return "Proposed therapy may interact with an existing or recent therapeutic product"; + case DRG: return "Proposed therapy may interact with an existing or recent drug therapy"; + case NHP: return "Proposed therapy may interact with existing or recent natural health product therapy"; + case NONRX: return "Proposed therapy may interact with a non-prescription drug (e.g. alcohol, tobacco, Aspirin)"; + case PREVINEF: return "Definition:The same or similar treatment has previously been attempted with the patient without achieving a positive effect."; + case DACT: return "Description:Proposed therapy may be contraindicated or ineffective based on an existing or recent drug therapy."; + case TIME: return "Description:Proposed therapy may be inappropriate or ineffective based on the proposed start or end time."; + case ALRTENDLATE: return "Definition:Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy."; + case ALRTSTRTLATE: return "Definition:Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition."; + case _TIMINGDETECTEDISSUECODE: return "Proposed therapy may be inappropriate or ineffective based on the proposed start or end time."; + case ENDLATE: return "Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy"; + case STRTLATE: return "Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition"; + case _SUPPLYDETECTEDISSUECODE: return "Supplying the product at this time may be inappropriate or indicate compliance issues with the associated therapy"; + case ALLDONE: return "Definition:The requested action has already been performed and so this request has no effect"; + case FULFIL: return "Definition:The therapy being performed is in some way out of alignment with the requested therapy."; + case NOTACTN: return "Definition:The status of the request being fulfilled has changed such that it is no longer actionable. This may be because the request has expired, has already been completely fulfilled or has been otherwise stopped or disabled. (Not used for 'suspended' orders.)"; + case NOTEQUIV: return "Definition:The therapy being performed is not sufficiently equivalent to the therapy which was requested."; + case NOTEQUIVGEN: return "Definition:The therapy being performed is not generically equivalent (having the identical biological action) to the therapy which was requested."; + case NOTEQUIVTHER: return "Definition:The therapy being performed is not therapeutically equivalent (having the same overall patient effect) to the therapy which was requested."; + case TIMING: return "Definition:The therapy is being performed at a time which diverges from the time the therapy was requested"; + case INTERVAL: return "Definition:The therapy action is being performed outside the bounds of the time period requested"; + case MINFREQ: return "Definition:The therapy action is being performed too soon after the previous occurrence based on the requested frequency"; + case HELD: return "Definition:There should be no actions taken in fulfillment of a request that has been held or suspended."; + case TOOLATE: return "The patient is receiving a subsequent fill significantly later than would be expected based on the amount previously supplied and the therapy dosage instructions"; + case TOOSOON: return "The patient is receiving a subsequent fill significantly earlier than would be expected based on the amount previously supplied and the therapy dosage instructions"; + case HISTORIC: return "Description: While the record was accepted in the repository, there is a more recent version of a record of this type."; + case PATPREF: return "Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record."; + case PATPREFALT: return "Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. An alternate therapy meeting those constraints is available."; + case KSUBJ: return "Categorization of types of observation that capture the main clinical knowledge subject which may be a medication, a laboratory test, a disease."; + case KSUBT: return "Categorization of types of observation that capture a knowledge subtopic which might be treatment, etiology, or prognosis."; + case OINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to an agent."; + case ALG: return "Hypersensitivity to an agent caused by an immunologic response to an initial exposure"; + case DALG: return "An allergy to a pharmaceutical product."; + case EALG: return "An allergy to a substance other than a drug or a food. E.g. Latex, pollen, etc."; + case FALG: return "An allergy to a substance generally consumed for nutritional purposes."; + case DINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to a drug."; + case DNAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case EINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to environmental conditions."; + case ENAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case FINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to food."; + case FNAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case NAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case SEV: return "A subjective evaluation of the seriousness or intensity associated with another observation."; + case _FDALABELDATA: return "FDA label data"; + case FDACOATING: return "FDA label coating"; + case FDACOLOR: return "FDA label color"; + case FDAIMPRINTCD: return "FDA label imprint code"; + case FDALOGO: return "FDA label logo"; + case FDASCORING: return "FDA label scoring"; + case FDASHAPE: return "FDA label shape"; + case FDASIZE: return "FDA label size"; + case _ROIOVERLAYSHAPE: return "Shape of the region on the object being referenced"; + case CIRCLE: return "A circle defined by two (column,row) pairs. The first point is the center of the circle and the second point is a point on the perimeter of the circle."; + case ELLIPSE: return "An ellipse defined by four (column,row) pairs, the first two points specifying the endpoints of the major axis and the second two points specifying the endpoints of the minor axis."; + case POINT: return "A single point denoted by a single (column,row) pair, or multiple points each denoted by a (column,row) pair."; + case POLY: return "A series of connected line segments with ordered vertices denoted by (column,row) pairs; if the first and last vertices are the same, it is a closed polygon."; + case C: return "Description:Indicates that result data has been corrected."; + case DIET: return "Code set to define specialized/allowed diets"; + case BR: return "A diet exclusively composed of oatmeal, semolina, or rice, to be extremely easy to eat and digest."; + case DM: return "A diet that uses carbohydrates sparingly. Typically with a restriction in daily energy content (e.g. 1600-2000 kcal)."; + case FAST: return "No enteral intake of foot or liquids whatsoever, no smoking. Typically 6 to 8 hours before anesthesia."; + case FORMULA: return "A diet consisting of a formula feeding, either for an infant or an adult, to provide nutrition either orally or through the gastrointestinal tract via tube, catheter or stoma."; + case GF: return "Gluten free diet for celiac disease."; + case LF: return "A diet low in fat, particularly to patients with hepatic diseases."; + case LP: return "A low protein diet for patients with renal failure."; + case LQ: return "A strictly liquid diet, that can be fully absorbed in the intestine, and therefore may not contain fiber. Used before enteral surgeries."; + case LS: return "A diet low in sodium for patients with congestive heart failure and/or renal failure."; + case N: return "A normal diet, i.e. no special preparations or restrictions for medical reasons. This is notwithstanding any preferences the patient might have regarding special foods, such as vegetarian, kosher, etc."; + case NF: return "A no fat diet for acute hepatic diseases."; + case PAF: return "Phenylketonuria diet."; + case PAR: return "Patient is supplied with parenteral nutrition, typically described in terms of i.v. medications."; + case RD: return "A diet that seeks to reduce body fat, typically low energy content (800-1600 kcal)."; + case SCH: return "A diet that avoids ingredients that might cause digestion problems, e.g., avoid excessive fat, avoid too much fiber (cabbage, peas, beans)."; + case SUPPLEMENT: return "A diet that is not intended to be complete but is added to other diets."; + case T: return "This is not really a diet, since it contains little nutritional value, but is essentially just water. Used before coloscopy examinations."; + case VLI: return "Diet with low content of the amino-acids valin, leucin, and isoleucin, for \"maple syrup disease.\""; + case DRUGPRG: return "Definition: A public or government health program that administers and funds coverage for prescription drugs to assist program eligible who meet financial and health status criteria."; + case F: return "Description:Indicates that a result is complete. No further results are to come. This maps to the 'complete' state in the observation result status code."; + case PRLMN: return "Description:Indicates that a result is incomplete. There are further results to come. This maps to the 'active' state in the observation result status code."; + case SECOBS: return "An observation identifying security metadata about an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security metadata are used to name security labels. \r\n\n \n Rationale: According to ISO/TS 22600-3:2009(E) A.9.1.7 SECURITY LABEL MATCHING, Security label matching compares the initiator's clearance to the target's security label. All of the following must be true for authorization to be granted:\r\n\n \n The security policy identifiers shall be identical\n The classification level of the initiator shall be greater than or equal to that of the target (that is, there shall be at least one value in the classification list of the clearance greater than or equal to the classification of the target), and \n For each security category in the target label, there shall be a security category of the same type in the initiator's clearance and the initiator's classification level shall dominate that of the target.\n \n \n Examples: SecurityObservationType security label fields include:\r\n\n \n Confidentiality classification\n Compartment category\n Sensitivity category\n Security mechanisms used to ensure data integrity or to perform authorized data transformation\n Indicators of an IT resource completeness, veracity, reliability, trustworthiness, or provenance.\n \n \n Usage Note: SecurityObservationType codes designate security label field types, which are valued with an applicable SecurityObservationValue code as the \"security label tag\"."; + case SECCATOBS: return "Type of security metadata observation made about the category of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security category metadata is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: \"A nonhierarchical grouping of sensitive information used to control access to data more finely than with hierarchical security classification alone.\"\r\n\n \n Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g., privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199]\r\n\n \n Examples: Types of security categories include:\r\n\n \n Compartment: A division of data into isolated blocks with separate security controls for the purpose of reducing risk. (ISO 2382-8). A security label tag that \"segments\" an IT resource by indicating that access and use is restricted to members of a defined community or project. (HL7 Healthcare Classification System) \n Sensitivity: The characteristic of an IT resource which implies its value or importance and may include its vulnerability. (ISO 7492-2) Privacy metadata for information perceived as undesirable to share. (HL7 Healthcare Classification System)"; + case SECCLASSOBS: return "Type of security metadata observation made about the classification of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security classification is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: \"The determination of which specific degree of protection against access the data or information requires, together with a designation of that degree of protection.\" Security classification metadata is based on an analysis of applicable policies and the risk of financial, reputational, or other harm that could result from unauthorized disclosure.\r\n\n \n Rationale: A security classification observation may indicate that the confidentiality level indicated by an Act or Role confidentiality attribute has been overridden by the entity responsible for ascribing the SecurityClassificationObservationValue. This supports the business requirement for increasing or decreasing the level of confidentiality (classification or declassification) based on parameters beyond the original assignment of an Act or Role confidentiality.\r\n\n \n Examples: Types of security classification include: HL7 Confidentiality Codes such as very restricted, unrestricted, and normal. Intelligence community examples include top secret, secret, and confidential.\r\n\n \n Usage Note: Security classification observation type codes designate security label field types, which are valued with an applicable SecurityClassificationObservationValue code as the \"security label tag\"."; + case SECCONOBS: return "Type of security metadata observation made about the control of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security control metadata convey instructions to users and receivers for secure distribution, transmission, and storage; dictate obligations or mandated actions; specify any action prohibited by refrain policy such as dissemination controls; and stipulate the permissible purpose of use of an IT resource. \r\n\n \n Rationale: A security control observation supports requirement to specify applicable management, operational, and technical controls (i.e., safeguards or countermeasures) prescribed for an information system to protect the confidentiality, integrity, and availability of the system and its information. [FIPS 199]\r\n\n \n Examples: Types of security control metadata include: \r\n\n \n handling caveats\n dissemination controls\n obligations\n refrain policies\n purpose of use constraints"; + case SECINTOBS: return "Type of security metadata observation made about the integrity of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions.\r\n\n \n Rationale: A security integrity observation supports the requirement to guard against improper information modification or destruction, and includes ensuring information non-repudiation and authenticity. (44 U.S.C., SEC. 3542)\r\n\n \n Examples: Types of security integrity metadata include: \r\n\n \n Integrity status, which indicates the completeness or workflow status of an IT resource (data, information object, service, or system capability)\n Integrity confidence, which indicates the reliability and trustworthiness of an IT resource\n Integrity control, which indicates pertinent handling caveats, obligations, refrain policies, and purpose of use for the resource\n Data integrity, which indicate the security mechanisms used to ensure that the accuracy and consistency are preserved regardless of changes made (ISO/IEC DIS 2382-8)\n Alteration integrity, which indicate the security mechanisms used for authorized transformations of the resource\n Integrity provenance, which indicates the entity responsible for a report or assertion relayed \"second-hand\" about an IT resource"; + case SECALTINTOBS: return "Type of security metadata observation made about the alteration integrity of an IT resource (data, information object, service, or system capability), which indicates the mechanism used for authorized transformations of the resource.\r\n\n \n Examples: Types of security alteration integrity observation metadata, which may value the observation with a code used to indicate the mechanism used for authorized transformation of an IT resource, including: \r\n\n \n translation\n syntactic transformation\n semantic mapping\n redaction\n masking\n pseudonymization\n anonymization"; + case SECDATINTOBS: return "Type of security metadata observation made about the data integrity of an IT resource (data, information object, service, or system capability), which indicates the security mechanism used to preserve resource accuracy and consistency. Data integrity is defined by ISO 22600-23.3.21 as: \"The property that data has not been altered or destroyed in an unauthorized manner\", and by ISO/IEC 2382-8: The property of data whose accuracy and consistency are preserved regardless of changes made.\"\r\n\n \n Examples: Types of security data integrity observation metadata, which may value the observation, include cryptographic hash function and digital signature."; + case SECINTCONOBS: return "Type of security metadata observation made about the integrity confidence of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions.\r\n\n \n Examples: Types of security integrity confidence observation metadata, which may value the observation, include highly reliable, uncertain reliability, and not reliable.\r\n\n \n Usage Note: A security integrity confidence observation on an Act may indicate that a valued Act.uncertaintycode attribute has been overridden by the entity responsible for ascribing the SecurityIntegrityConfidenceObservationValue. This supports the business requirements for increasing or decreasing the assessment of the reliability or trustworthiness of an IT resource based on parameters beyond the original assignment of an Act statement level of uncertainty."; + case SECINTPRVOBS: return "Type of security metadata observation made about the provenance integrity of an IT resource (data, information object, service, or system capability), which indicates the lifecycle completeness of an IT resource in terms of workflow status such as its creation, modification, suspension, and deletion; locations in which the resource has been collected or archived, from which it may be retrieved, and the history of its distribution and disclosure. Integrity provenance metadata about an IT resource may be used to assess its veracity, reliability, and trustworthiness.\r\n\n \n Examples: Types of security integrity provenance observation metadata, which may value the observation about an IT resource, include: \r\n\n \n completeness or workflow status, such as authentication\n the entity responsible for original authoring or informing about an IT resource\n the entity responsible for a report or assertion about an IT resource relayed “second-handâ€?\n the entity responsible for excerpting, transforming, or compiling an IT resource"; + case SECINTPRVABOBS: return "Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that made assertions about the resource. The asserting entity may not be the original informant about the resource.\r\n\n \n Examples: Types of security integrity provenance asserted by observation metadata, which may value the observation, including: \r\n\n \n assertions about an IT resource by a patient\n assertions about an IT resource by a clinician\n assertions about an IT resource by a device"; + case SECINTPRVRBOBS: return "Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that reported the existence of the resource. The reporting entity may not be the original author of the resource.\r\n\n \n Examples: Types of security integrity provenance reported by observation metadata, which may value the observation, include: \r\n\n \n reports about an IT resource by a patient\n reports about an IT resource by a clinician\n reports about an IT resource by a device"; + case SECINTSTOBS: return "Type of security metadata observation made about the integrity status of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Indicates the completeness of an IT resource in terms of workflow status, which may impact users that are authorized to access and use the resource.\r\n\n \n Examples: Types of security integrity status observation metadata, which may value the observation, include codes from the HL7 DocumentCompletion code system such as legally authenticated, in progress, and incomplete."; + case SECTRSTOBS: return "An observation identifying trust metadata about an IT resource (data, information object, service, or system capability), which may be used as a trust attribute to populate a computable trust policy, trust credential, trust assertion, or trust label field in a security label or trust policy, which are principally used for authentication, authorization, and access control decisions."; + case TRSTACCRDOBS: return "Type of security metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGREOBS: return "Type of security metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]"; + case TRSTCERTOBS: return "Type of security metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]\r\n\n \n For example,\n \r\n\n \n A Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. For example, a particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.\n A Certificate Practice Statement (CSP), which is a statement of the practices which an Authority employs in issuing and managing certificates. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.]"; + case TRSTFWKOBS: return "Type of security metadata observation made about a complete set of contracts, regulations or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative]"; + case TRSTLOAOBS: return "Type of security metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case TRSTMECOBS: return "Type of security metadata observation made about a security architecture system component that supports enforcement of security policies."; + case SUBSIDFFS: return "Definition: A government health program that provides coverage on a fee for service basis for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds.\r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized fee for service program is further specified by the Underwriter and Payer Role.class and Role.code."; + case WRKCOMP: return "Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well."; + case _ACTPROCEDURECODE: return "An identifying code for healthcare interventions/procedures."; + case _ACTBILLABLESERVICECODE: return "Definition: An identifying code for billable services, as opposed to codes for similar services used to identify them for functional purposes."; + case _HL7DEFINEDACTCODES: return "Domain provides the root for HL7-defined detailed or rich codes for the Act classes."; + case COPAY: return ""; + case DEDUCT: return ""; + case DOSEIND: return ""; + case PRA: return ""; + case STORE: return "The act of putting something away for safe keeping. The \"something\" may be physical object such as a specimen, or information, such as observations regarding a specimen."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTACCOUNTCODE: return "ActAccountCode"; + case ACCTRECEIVABLE: return "account receivable"; + case CASH: return "Cash"; + case CC: return "credit card"; + case AE: return "American Express"; + case DN: return "Diner's Club"; + case DV: return "Discover Card"; + case MC: return "Master Card"; + case V: return "Visa"; + case PBILLACCT: return "patient billing account"; + case _ACTADJUDICATIONCODE: return "ActAdjudicationCode"; + case _ACTADJUDICATIONGROUPCODE: return "ActAdjudicationGroupCode"; + case CONT: return "contract"; + case DAY: return "day"; + case LOC: return "location"; + case MONTH: return "month"; + case PERIOD: return "period"; + case PROV: return "provider"; + case WEEK: return "week"; + case YEAR: return "year"; + case AA: return "adjudicated with adjustments"; + case ANF: return "adjudicated with adjustments and no financial impact"; + case AR: return "adjudicated as refused"; + case AS: return "adjudicated as submitted"; + case _ACTADJUDICATIONRESULTACTIONCODE: return "ActAdjudicationResultActionCode"; + case DISPLAY: return "Display"; + case FORM: return "Print on Form"; + case _ACTBILLABLEMODIFIERCODE: return "ActBillableModifierCode"; + case CPTM: return "CPT modifier codes"; + case HCPCSA: return "HCPCS Level II and Carrier-assigned"; + case _ACTBILLINGARRANGEMENTCODE: return "ActBillingArrangementCode"; + case BLK: return "block funding"; + case CAP: return "capitation funding"; + case CONTF: return "contract funding"; + case FINBILL: return "financial"; + case ROST: return "roster funding"; + case SESS: return "sessional funding"; + case FFS: return "fee for service"; + case FFPS: return "first fill, part fill, partial strength"; + case FFCS: return "first fill complete, partial strength"; + case TFS: return "trial fill partial strength"; + case _ACTBOUNDEDROICODE: return "ActBoundedROICode"; + case ROIFS: return "fully specified ROI"; + case ROIPS: return "partially specified ROI"; + case _ACTCAREPROVISIONCODE: return "act care provision"; + case _ACTCREDENTIALEDCARECODE: return "act credentialed care"; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "act credentialed care provision peron"; + case CACC: return "certified anatomic pathology and clinical pathology care"; + case CAIC: return "certified allergy and immunology care"; + case CAMC: return "certified aerospace medicine care"; + case CANC: return "certified anesthesiology care"; + case CAPC: return "certified anatomic pathology care"; + case CBGC: return "certified clinical biochemical genetics care"; + case CCCC: return "certified clinical cytogenetics care"; + case CCGC: return "certified clinical genetics (M.D.) care"; + case CCPC: return "certified clinical pathology care"; + case CCSC: return "certified colon and rectal surgery care"; + case CDEC: return "certified dermatology care"; + case CDRC: return "certified diagnostic radiology care"; + case CEMC: return "certified emergency medicine care"; + case CFPC: return "certified family practice care"; + case CIMC: return "certified internal medicine care"; + case CMGC: return "certified clinical molecular genetics care"; + case CNEC: return "certified neurology care"; + case CNMC: return "certified nuclear medicine care"; + case CNQC: return "certified neurology with special qualifications in child neurology care"; + case CNSC: return "certified neurological surgery care"; + case COGC: return "certified obstetrics and gynecology care"; + case COMC: return "certified occupational medicine care"; + case COPC: return "certified ophthalmology care"; + case COSC: return "certified orthopaedic surgery care"; + case COTC: return "certified otolaryngology care"; + case CPEC: return "certified pediatrics care"; + case CPGC: return "certified Ph.D. medical genetics care"; + case CPHC: return "certified public health and general preventive medicine care"; + case CPRC: return "certified physical medicine and rehabilitation care"; + case CPSC: return "certified plastic surgery care"; + case CPYC: return "certified psychiatry care"; + case CROC: return "certified radiation oncology care"; + case CRPC: return "certified radiological physics care"; + case CSUC: return "certified surgery care"; + case CTSC: return "certified thoracic surgery care"; + case CURC: return "certified urology care"; + case CVSC: return "certified vascular surgery care"; + case LGPC: return "licensed general physician care"; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "act credentialed care provision program"; + case AALC: return "accredited assisted living care"; + case AAMC: return "accredited ambulatory care"; + case ABHC: return "accredited behavioral health care"; + case ACAC: return "accredited critical access hospital care"; + case ACHC: return "accredited hospital care"; + case AHOC: return "accredited home care"; + case ALTC: return "accredited long term care"; + case AOSC: return "accredited office-based surgery care"; + case CACS: return "certified acute coronary syndrome care"; + case CAMI: return "certified acute myocardial infarction care"; + case CAST: return "certified asthma care"; + case CBAR: return "certified bariatric surgery care"; + case CCAD: return "certified coronary artery disease care"; + case CCAR: return "certified cardiac care"; + case CDEP: return "certified depression care"; + case CDGD: return "certified digestive/gastrointestinal disorders care"; + case CDIA: return "certified diabetes care"; + case CEPI: return "certified epilepsy care"; + case CFEL: return "certified frail elderly care"; + case CHFC: return "certified heart failure care"; + case CHRO: return "certified high risk obstetrics care"; + case CHYP: return "certified hyperlipidemia care"; + case CMIH: return "certified migraine headache care"; + case CMSC: return "certified multiple sclerosis care"; + case COJR: return "certified orthopedic joint replacement care"; + case CONC: return "certified oncology care"; + case COPD: return "certified chronic obstructive pulmonary disease care"; + case CORT: return "certified organ transplant care"; + case CPAD: return "certified parkinsons disease care"; + case CPND: return "certified pneumonia disease care"; + case CPST: return "certified primary stroke center care"; + case CSDM: return "certified stroke disease management care"; + case CSIC: return "certified sickle cell care"; + case CSLD: return "certified sleep disorders care"; + case CSPT: return "certified spine treatment care"; + case CTBU: return "certified trauma/burn center care"; + case CVDC: return "certified vascular diseases care"; + case CWMA: return "certified wound management care"; + case CWOH: return "certified women's health care"; + case _ACTENCOUNTERCODE: return "ActEncounterCode"; + case AMB: return "ambulatory"; + case EMER: return "emergency"; + case FLD: return "field"; + case HH: return "home health"; + case IMP: return "inpatient encounter"; + case ACUTE: return "inpatient acute"; + case NONAC: return "inpatient non-acute"; + case PRENC: return "pre-admission"; + case SS: return "short stay"; + case VR: return "virtual"; + case _ACTMEDICALSERVICECODE: return "ActMedicalServiceCode"; + case ALC: return "Alternative Level of Care"; + case CARD: return "Cardiology"; + case CHR: return "Chronic"; + case DNTL: return "Dental"; + case DRGRHB: return "Drug Rehab"; + case GENRL: return "General"; + case MED: return "Medical"; + case OBS: return "Obstetrics"; + case ONC: return "Oncology"; + case PALL: return "Palliative"; + case PED: return "Pediatrics"; + case PHAR: return "Pharmaceutical"; + case PHYRHB: return "Physical Rehab"; + case PSYCH: return "Psychiatric"; + case SURG: return "Surgical"; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "ActClaimAttachmentCategoryCode"; + case AUTOATTCH: return "auto attachment"; + case DOCUMENT: return "document"; + case HEALTHREC: return "health record"; + case IMG: return "image attachment"; + case LABRESULTS: return "lab results"; + case MODEL: return "model"; + case WIATTCH: return "work injury report attachment"; + case XRAY: return "x-ray"; + case _ACTCONSENTTYPE: return "ActConsentType"; + case ICOL: return "information collection"; + case IDSCL: return "information disclosure"; + case INFA: return "information access"; + case INFAO: return "access only"; + case INFASO: return "access and save only"; + case IRDSCL: return "information redisclosure"; + case RESEARCH: return "research information access"; + case RSDID: return "de-identified information access"; + case RSREID: return "re-identifiable information access"; + case _ACTCONTAINERREGISTRATIONCODE: return "ActContainerRegistrationCode"; + case ID: return "Identified"; + case IP: return "In Position"; + case L: return "Left Equipment"; + case M: return "Missing"; + case O: return "In Process"; + case R: return "Process Completed"; + case X: return "Container Unavailable"; + case _ACTCONTROLVARIABLE: return "ActControlVariable"; + case AUTO: return "auto-repeat permission"; + case ENDC: return "endogenous content"; + case REFLEX: return "reflex permission"; + case _ACTCOVERAGECONFIRMATIONCODE: return "ActCoverageConfirmationCode"; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "ActCoverageAuthorizationConfirmationCode"; + case AUTH: return "Authorized"; + case NAUTH: return "Not Authorized"; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "ActCoverageEligibilityConfirmationCode"; + case ELG: return "Eligible"; + case NELG: return "Not Eligible"; + case _ACTCOVERAGELIMITCODE: return "ActCoverageLimitCode"; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "ActCoverageQuantityLimitCode"; + case COVPRD: return "coverage period"; + case LFEMX: return "life time maximum"; + case NETAMT: return "Net Amount"; + case PRDMX: return "period maximum"; + case UNITPRICE: return "Unit Price"; + case UNITQTY: return "Unit Quantity"; + case COVMX: return "coverage maximum"; + case _ACTCOVEREDPARTYLIMITCODE: return "ActCoveredPartyLimitCode"; + case _ACTCOVERAGETYPECODE: return "ActCoverageTypeCode"; + case _ACTINSURANCEPOLICYCODE: return "ActInsurancePolicyCode"; + case EHCPOL: return "extended healthcare"; + case HSAPOL: return "health spending account"; + case AUTOPOL: return "automobile"; + case COL: return "collision coverage policy"; + case UNINSMOT: return "uninsured motorist policy"; + case PUBLICPOL: return "public healthcare"; + case DENTPRG: return "dental program"; + case DISEASEPRG: return "public health program"; + case CANPRG: return "women's cancer detection program"; + case ENDRENAL: return "end renal program"; + case HIVAIDS: return "HIV-AIDS program"; + case MANDPOL: return "mandatory health program"; + case MENTPRG: return "mental health program"; + case SAFNET: return "safety net clinic program"; + case SUBPRG: return "substance use program"; + case SUBSIDIZ: return "subsidized health program"; + case SUBSIDMC: return "subsidized managed care program"; + case SUBSUPP: return "subsidized supplemental health program"; + case WCBPOL: return "worker's compensation"; + case _ACTINSURANCETYPECODE: return "ActInsuranceTypeCode"; + case _ACTHEALTHINSURANCETYPECODE: return "ActHealthInsuranceTypeCode"; + case DENTAL: return "dental care policy"; + case DISEASE: return "disease specific policy"; + case DRUGPOL: return "drug policy"; + case HIP: return "health insurance plan policy"; + case LTC: return "long term care policy"; + case MCPOL: return "managed care policy"; + case POS: return "point of service policy"; + case HMO: return "health maintenance organization policy"; + case PPO: return "preferred provider organization policy"; + case MENTPOL: return "mental health policy"; + case SUBPOL: return "substance use policy"; + case VISPOL: return "vision care policy"; + case DIS: return "disability insurance policy"; + case EWB: return "employee welfare benefit plan policy"; + case FLEXP: return "flexible benefit plan policy"; + case LIFE: return "life insurance policy"; + case ANNU: return "annuity policy"; + case TLIFE: return "term life insurance policy"; + case ULIFE: return "universal life insurance policy"; + case PNC: return "property and casualty insurance policy"; + case REI: return "reinsurance policy"; + case SURPL: return "surplus line insurance policy"; + case UMBRL: return "umbrella liability insurance policy"; + case _ACTPROGRAMTYPECODE: return "ActProgramTypeCode"; + case CHAR: return "charity program"; + case CRIME: return "crime victim program"; + case EAP: return "employee assistance program"; + case GOVEMP: return "government employee health program"; + case HIRISK: return "high risk pool program"; + case IND: return "indigenous peoples health program"; + case MILITARY: return "military health program"; + case RETIRE: return "retiree health program"; + case SOCIAL: return "social service program"; + case VET: return "veteran health program"; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "ActDetectedIssueManagementCode"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "ActAdministrativeDetectedIssueManagementCode"; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "Authorization Issue Management Code"; + case EMAUTH: return "emergency authorization override"; + case _21: return "authorization confirmed"; + case _1: return "Therapy Appropriate"; + case _19: return "Consulted Supplier"; + case _2: return "Assessed Patient"; + case _22: return "appropriate indication or diagnosis"; + case _23: return "prior therapy documented"; + case _3: return "Patient Explanation"; + case _4: return "Consulted Other Source"; + case _5: return "Consulted Prescriber"; + case _6: return "Prescriber Declined Change"; + case _7: return "Interacting Therapy No Longer Active/Planned"; + case _14: return "Supply Appropriate"; + case _15: return "Replacement"; + case _16: return "Vacation Supply"; + case _17: return "Weekend Supply"; + case _18: return "Leave of Absence"; + case _20: return "additional quantity on separate dispense"; + case _8: return "Other Action Taken"; + case _10: return "Provided Patient Education"; + case _11: return "Added Concurrent Therapy"; + case _12: return "Temporarily Suspended Concurrent Therapy"; + case _13: return "Stopped Concurrent Therapy"; + case _9: return "Instituted Ongoing Monitoring Program"; + case _ACTEXPOSURECODE: return "ActExposureCode"; + case CHLDCARE: return "Day care - Child care Interaction"; + case CONVEYNC: return "Common Conveyance Interaction"; + case HLTHCARE: return "Health Care Interaction - Not Patient Care"; + case HOMECARE: return "Care Giver Interaction"; + case HOSPPTNT: return "Hospital Patient Interaction"; + case HOSPVSTR: return "Hospital Visitor Interaction"; + case HOUSEHLD: return "Household Interaction"; + case INMATE: return "Inmate Interaction"; + case INTIMATE: return "Intimate Interaction"; + case LTRMCARE: return "Long Term Care Facility Interaction"; + case PLACE: return "Common Space Interaction"; + case PTNTCARE: return "Health Care Interaction - Patient Care"; + case SCHOOL2: return "School Interaction"; + case SOCIAL2: return "Social/Extended Family Interaction"; + case SUBSTNCE: return "Common Substance Interaction"; + case TRAVINT: return "Common Travel Interaction"; + case WORK2: return "Work Interaction"; + case _ACTFINANCIALTRANSACTIONCODE: return "ActFinancialTransactionCode"; + case CHRG: return "Standard Charge"; + case REV: return "Standard Charge Reversal"; + case _ACTINCIDENTCODE: return "ActIncidentCode"; + case MVA: return "Motor vehicle accident"; + case SCHOOL: return "School Accident"; + case SPT: return "Sporting Accident"; + case WPA: return "Workplace accident"; + case _ACTINFORMATIONACCESSCODE: return "ActInformationAccessCode"; + case ACADR: return "adverse drug reaction access"; + case ACALL: return "all access"; + case ACALLG: return "allergy access"; + case ACCONS: return "informational consent access"; + case ACDEMO: return "demographics access"; + case ACDI: return "diagnostic imaging access"; + case ACIMMUN: return "immunization access"; + case ACLAB: return "lab test result access"; + case ACMED: return "medication access"; + case ACMEDC: return "medical condition access"; + case ACMEN: return "mental health access"; + case ACOBS: return "common observations access"; + case ACPOLPRG: return "policy or program information access"; + case ACPROV: return "provider information access"; + case ACPSERV: return "professional service access"; + case ACSUBSTAB: return "substance abuse access"; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "ActInformationAccessContextCode"; + case INFAUT: return "authorized information transfer"; + case INFCON: return "after explicit consent"; + case INFCRT: return "only on court order"; + case INFDNG: return "only if danger to others"; + case INFEMER: return "only in an emergency"; + case INFPWR: return "only if public welfare risk"; + case INFREG: return "regulatory information transfer"; + case _ACTINFORMATIONCATEGORYCODE: return "ActInformationCategoryCode"; + case ALLCAT: return "all categories"; + case ALLGCAT: return "allergy category"; + case ARCAT: return "adverse drug reaction category"; + case COBSCAT: return "common observation category"; + case DEMOCAT: return "demographics category"; + case DICAT: return "diagnostic image category"; + case IMMUCAT: return "immunization category"; + case LABCAT: return "lab test category"; + case MEDCCAT: return "medical condition category"; + case MENCAT: return "mental health category"; + case PSVCCAT: return "professional service category"; + case RXCAT: return "medication category"; + case _ACTINVOICEELEMENTCODE: return "ActInvoiceElementCode"; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "ActInvoiceAdjudicationPaymentCode"; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "ActInvoiceAdjudicationPaymentGroupCode"; + case ALEC: return "alternate electronic"; + case BONUS: return "bonus"; + case CFWD: return "carry forward adjusment"; + case EDU: return "education fees"; + case EPYMT: return "early payment fee"; + case GARN: return "garnishee"; + case INVOICE: return "submitted invoice"; + case PINV: return "paper invoice"; + case PPRD: return "prior period adjustment"; + case PROA: return "professional association deduction"; + case RECOV: return "recovery"; + case RETRO: return "retro adjustment"; + case TRAN: return "transaction fee"; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "ActInvoiceAdjudicationPaymentSummaryCode"; + case INVTYPE: return "invoice type"; + case PAYEE: return "payee"; + case PAYOR: return "payor"; + case SENDAPP: return "sending application"; + case _ACTINVOICEDETAILCODE: return "ActInvoiceDetailCode"; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "ActInvoiceDetailClinicalProductCode"; + case UNSPSC: return "United Nations Standard Products and Services Classification"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "ActInvoiceDetailDrugProductCode"; + case GTIN: return "Global Trade Item Number"; + case UPC: return "Universal Product Code"; + case _ACTINVOICEDETAILGENERICCODE: return "ActInvoiceDetailGenericCode"; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "ActInvoiceDetailGenericAdjudicatorCode"; + case COIN: return "coinsurance"; + case COPAYMENT: return "patient co-pay"; + case DEDUCTIBLE: return "deductible"; + case PAY: return "payment"; + case SPEND: return "spend down"; + case COINS: return "co-insurance"; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "ActInvoiceDetailGenericModifierCode"; + case AFTHRS: return "non-normal hours"; + case ISOL: return "isolation allowance"; + case OOO: return "out of office"; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "ActInvoiceDetailGenericProviderCode"; + case CANCAPT: return "cancelled appointment"; + case DSC: return "discount"; + case ESA: return "extraordinary service assessment"; + case FFSTOP: return "fee for service top off"; + case FNLFEE: return "final fee"; + case FRSTFEE: return "first fee"; + case MARKUP: return "markup or up-charge"; + case MISSAPT: return "missed appointment"; + case PERFEE: return "periodic fee"; + case PERMBNS: return "performance bonus"; + case RESTOCK: return "restocking fee"; + case TRAVEL: return "travel"; + case URGENT: return "urgent"; + case _ACTINVOICEDETAILTAXCODE: return "ActInvoiceDetailTaxCode"; + case FST: return "federal sales tax"; + case HST: return "harmonized sales Tax"; + case PST: return "provincial/state sales tax"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "ActInvoiceDetailPreferredAccommodationCode"; + case _ACTENCOUNTERACCOMMODATIONCODE: return "ActEncounterAccommodationCode"; + case _HL7ACCOMMODATIONCODE: return "HL7AccommodationCode"; + case I: return "Isolation"; + case P: return "Private"; + case S: return "Suite"; + case SP: return "Semi-private"; + case W: return "Ward"; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "ActInvoiceDetailClinicalServiceCode"; + case _ACTINVOICEGROUPCODE: return "ActInvoiceGroupCode"; + case _ACTINVOICEINTERGROUPCODE: return "ActInvoiceInterGroupCode"; + case CPNDDRGING: return "compound drug invoice group"; + case CPNDINDING: return "compound ingredient invoice group"; + case CPNDSUPING: return "compound supply invoice group"; + case DRUGING: return "drug invoice group"; + case FRAMEING: return "frame invoice group"; + case LENSING: return "lens invoice group"; + case PRDING: return "product invoice group"; + case _ACTINVOICEROOTGROUPCODE: return "ActInvoiceRootGroupCode"; + case CPINV: return "clinical product invoice"; + case CSINV: return "clinical service invoice"; + case CSPINV: return "clinical service and product"; + case FININV: return "financial invoice"; + case OHSINV: return "oral health service"; + case PAINV: return "preferred accommodation invoice"; + case RXCINV: return "Rx compound invoice"; + case RXDINV: return "Rx dispense invoice"; + case SBFINV: return "sessional or block fee invoice"; + case VRXINV: return "vision dispense invoice"; + case _ACTINVOICEELEMENTSUMMARYCODE: return "ActInvoiceElementSummaryCode"; + case _INVOICEELEMENTADJUDICATED: return "InvoiceElementAdjudicated"; + case ADNFPPELAT: return "adjud. nullified prior-period electronic amount"; + case ADNFPPELCT: return "adjud. nullified prior-period electronic count"; + case ADNFPPMNAT: return "adjud. nullified prior-period manual amount"; + case ADNFPPMNCT: return "adjud. nullified prior-period manual count"; + case ADNFSPELAT: return "adjud. nullified same-period electronic amount"; + case ADNFSPELCT: return "adjud. nullified same-period electronic count"; + case ADNFSPMNAT: return "adjud. nullified same-period manual amount"; + case ADNFSPMNCT: return "adjud. nullified same-period manual count"; + case ADNPPPELAT: return "adjud. non-payee payable prior-period electronic amount"; + case ADNPPPELCT: return "adjud. non-payee payable prior-period electronic count"; + case ADNPPPMNAT: return "adjud. non-payee payable prior-period manual amount"; + case ADNPPPMNCT: return "adjud. non-payee payable prior-period manual count"; + case ADNPSPELAT: return "adjud. non-payee payable same-period electronic amount"; + case ADNPSPELCT: return "adjud. non-payee payable same-period electronic count"; + case ADNPSPMNAT: return "adjud. non-payee payable same-period manual amount"; + case ADNPSPMNCT: return "adjud. non-payee payable same-period manual count"; + case ADPPPPELAT: return "adjud. payee payable prior-period electronic amount"; + case ADPPPPELCT: return "adjud. payee payable prior-period electronic count"; + case ADPPPPMNAT: return "adjud. payee payable prior-period manual amout"; + case ADPPPPMNCT: return "adjud. payee payable prior-period manual count"; + case ADPPSPELAT: return "adjud. payee payable same-period electronic amount"; + case ADPPSPELCT: return "adjud. payee payable same-period electronic count"; + case ADPPSPMNAT: return "adjud. payee payable same-period manual amount"; + case ADPPSPMNCT: return "adjud. payee payable same-period manual count"; + case ADRFPPELAT: return "adjud. refused prior-period electronic amount"; + case ADRFPPELCT: return "adjud. refused prior-period electronic count"; + case ADRFPPMNAT: return "adjud. refused prior-period manual amount"; + case ADRFPPMNCT: return "adjud. refused prior-period manual count"; + case ADRFSPELAT: return "adjud. refused same-period electronic amount"; + case ADRFSPELCT: return "adjud. refused same-period electronic count"; + case ADRFSPMNAT: return "adjud. refused same-period manual amount"; + case ADRFSPMNCT: return "adjud. refused same-period manual count"; + case _INVOICEELEMENTPAID: return "InvoiceElementPaid"; + case PDNFPPELAT: return "paid nullified prior-period electronic amount"; + case PDNFPPELCT: return "paid nullified prior-period electronic count"; + case PDNFPPMNAT: return "paid nullified prior-period manual amount"; + case PDNFPPMNCT: return "paid nullified prior-period manual count"; + case PDNFSPELAT: return "paid nullified same-period electronic amount"; + case PDNFSPELCT: return "paid nullified same-period electronic count"; + case PDNFSPMNAT: return "paid nullified same-period manual amount"; + case PDNFSPMNCT: return "paid nullified same-period manual count"; + case PDNPPPELAT: return "paid non-payee payable prior-period electronic amount"; + case PDNPPPELCT: return "paid non-payee payable prior-period electronic count"; + case PDNPPPMNAT: return "paid non-payee payable prior-period manual amount"; + case PDNPPPMNCT: return "paid non-payee payable prior-period manual count"; + case PDNPSPELAT: return "paid non-payee payable same-period electronic amount"; + case PDNPSPELCT: return "paid non-payee payable same-period electronic count"; + case PDNPSPMNAT: return "paid non-payee payable same-period manual amount"; + case PDNPSPMNCT: return "paid non-payee payable same-period manual count"; + case PDPPPPELAT: return "paid payee payable prior-period electronic amount"; + case PDPPPPELCT: return "paid payee payable prior-period electronic count"; + case PDPPPPMNAT: return "paid payee payable prior-period manual amount"; + case PDPPPPMNCT: return "paid payee payable prior-period manual count"; + case PDPPSPELAT: return "paid payee payable same-period electronic amount"; + case PDPPSPELCT: return "paid payee payable same-period electronic count"; + case PDPPSPMNAT: return "paid payee payable same-period manual amount"; + case PDPPSPMNCT: return "paid payee payable same-period manual count"; + case _INVOICEELEMENTSUBMITTED: return "InvoiceElementSubmitted"; + case SBBLELAT: return "submitted billed electronic amount"; + case SBBLELCT: return "submitted billed electronic count"; + case SBNFELAT: return "submitted nullified electronic amount"; + case SBNFELCT: return "submitted cancelled electronic count"; + case SBPDELAT: return "submitted pending electronic amount"; + case SBPDELCT: return "submitted pending electronic count"; + case _ACTINVOICEOVERRIDECODE: return "ActInvoiceOverrideCode"; + case COVGE: return "coverage problem"; + case EFORM: return "electronic form to follow"; + case FAX: return "fax to follow"; + case GFTH: return "good faith indicator"; + case LATE: return "late invoice"; + case MANUAL: return "manual review"; + case OOJ: return "out of jurisdiction"; + case ORTHO: return "orthodontic service"; + case PAPER: return "paper documentation to follow"; + case PIE: return "public insurance exhausted"; + case PYRDELAY: return "delayed by a previous payor"; + case REFNR: return "referral not required"; + case REPSERV: return "repeated service"; + case UNRELAT: return "unrelated service"; + case VERBAUTH: return "verbal authorization"; + case _ACTLISTCODE: return "ActListCode"; + case _ACTOBSERVATIONLIST: return "ActObservationList"; + case CARELIST: return "care plan"; + case CONDLIST: return "condition list"; + case INTOLIST: return "intolerance list"; + case PROBLIST: return "problem list"; + case RISKLIST: return "risk factors"; + case GOALLIST: return "goal list"; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "ActTherapyDurationWorkingListCode"; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "act medication therapy duration working list"; + case ACU: return "short term/acute"; + case CHRON: return "continuous/chronic"; + case ONET: return "one time"; + case PRN: return "as needed"; + case MEDLIST: return "medication list"; + case CURMEDLIST: return "current medication list"; + case DISCMEDLIST: return "discharge medication list"; + case HISTMEDLIST: return "medication history"; + case _ACTMONITORINGPROTOCOLCODE: return "ActMonitoringProtocolCode"; + case CTLSUB: return "Controlled Substance"; + case INV: return "investigational"; + case LU: return "limited use"; + case OTC: return "non prescription medicine"; + case RX: return "prescription only medicine"; + case SA: return "special authorization"; + case SAC: return "special access"; + case _ACTNONOBSERVATIONINDICATIONCODE: return "ActNonObservationIndicationCode"; + case IND01: return "imaging study requiring contrast"; + case IND02: return "colonoscopy prep"; + case IND03: return "prophylaxis"; + case IND04: return "surgical prophylaxis"; + case IND05: return "pregnancy prophylaxis"; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "act observation verification"; + case VFPAPER: return "verify paper"; + case _ACTPAYMENTCODE: return "ActPaymentCode"; + case ACH: return "Automated Clearing House"; + case CHK: return "Cheque"; + case DDP: return "Direct Deposit"; + case NON: return "Non-Payment Data"; + case _ACTPHARMACYSUPPLYTYPE: return "ActPharmacySupplyType"; + case DF: return "Daily Fill"; + case EM: return "Emergency Supply"; + case SO: return "Script Owing"; + case FF: return "First Fill"; + case FFC: return "First Fill - Complete"; + case FFP: return "First Fill - Part Fill"; + case FFSS: return "first fill, partial strength"; + case TF: return "Trial Fill"; + case FS: return "Floor stock"; + case MS: return "Manufacturer Sample"; + case RF: return "Refill"; + case UD: return "Unit Dose"; + case RFC: return "Refill - Complete"; + case RFCS: return "refill complete partial strength"; + case RFF: return "Refill (First fill this facility)"; + case RFFS: return "refill partial strength (first fill this facility)"; + case RFP: return "Refill - Part Fill"; + case RFPS: return "refill part fill partial strength"; + case RFS: return "refill partial strength"; + case TB: return "Trial Balance"; + case TBS: return "trial balance partial strength"; + case UDE: return "unit dose equivalent"; + case _ACTPOLICYTYPE: return "ActPolicyType"; + case _ACTPRIVACYPOLICY: return "ActPrivacyPolicy"; + case _ACTCONSENTDIRECTIVE: return "ActConsentDirective"; + case EMRGONLY: return "emergency only"; + case NOPP: return "notice of privacy practices"; + case OPTIN: return "opt-in"; + case OPTOUT: return "op-out"; + case _INFORMATIONSENSITIVITYPOLICY: return "InformationSensitivityPolicy"; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "ActInformationSensitivityPolicy"; + case ETH: return "substance abuse information sensitivity"; + case GDIS: return "genetic disease information sensitivity"; + case HIV: return "HIV/AIDS information sensitivity"; + case PSY: return "psychiatry information sensitivity"; + case SCA: return "sickle cell anemia"; + case SDV: return "sexual assault, abuse, or domestic violence information sensitivity"; + case SEX: return "sexuality and reproductive health information sensitivity"; + case STD: return "sexually transmitted disease information sensitivity"; + case TBOO: return "taboo"; + case SICKLE: return "sickle cell"; + case _ENTITYSENSITIVITYPOLICYTYPE: return "EntityInformationSensitivityPolicy"; + case DEMO: return "all demographic information sensitivity"; + case DOB: return "date of birth information sensitivity"; + case GENDER: return "gender and sexual orientation information sensitivity"; + case LIVARG: return "living arrangement information sensitivity"; + case MARST: return "marital status information sensitivity"; + case RACE: return "race information sensitivity"; + case REL: return "religion information sensitivity"; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "RoleInformationSensitivityPolicy"; + case B: return "business information sensitivity"; + case EMPL: return "employer information sensitivity"; + case LOCIS: return "location information sensitivity"; + case SSP: return "sensitive service provider information sensitivity"; + case ADOL: return "adolescent information sensitivity"; + case CEL: return "celebrity information sensitivity"; + case DIA: return "diagnosis information sensitivity"; + case DRGIS: return "drug information sensitivity"; + case EMP: return "employee information sensitivity"; + case PDS: return "patient default sensitivity"; + case PRS: return "patient requested sensitivity"; + case COMPT: return "compartment"; + case HRCOMPT: return "human resource compartment"; + case RESCOMPT: return "research project compartment"; + case RMGTCOMPT: return "records management compartment"; + case ACTTRUSTPOLICYTYPE: return "trust policy"; + case TRSTACCRD: return "trust accreditation"; + case TRSTAGRE: return "trust agreement"; + case TRSTASSUR: return "trust assurance"; + case TRSTCERT: return "trust certificate"; + case TRSTFWK: return "trust framework"; + case TRSTMEC: return "trust mechanism"; + case COVPOL: return "benefit policy"; + case SECURITYPOLICY: return "security policy"; + case OBLIGATIONPOLICY: return "obligation policy"; + case ANONY: return "anonymize"; + case AOD: return "accounting of disclosure"; + case AUDIT: return "audit"; + case AUDTR: return "audit trail"; + case CPLYCC: return "comply with confidentiality code"; + case CPLYCD: return "comply with consent directive"; + case CPLYJPP: return "comply with jurisdictional privacy policy"; + case CPLYOPP: return "comply with organizational privacy policy"; + case CPLYOSP: return "comply with organizational security policy"; + case CPLYPOL: return "comply with policy"; + case DEID: return "deidentify"; + case DELAU: return "delete after use"; + case ENCRYPT: return "encrypt"; + case ENCRYPTR: return "encrypt at rest"; + case ENCRYPTT: return "encrypt in transit"; + case ENCRYPTU: return "encrypt in use"; + case HUAPRV: return "human approval"; + case MASK: return "mask"; + case MINEC: return "minimum necessary"; + case PRIVMARK: return "privacy mark"; + case PSEUD: return "pseudonymize"; + case REDACT: return "redact"; + case REFRAINPOLICY: return "refrain policy"; + case NOAUTH: return "no disclosure without subject authorization"; + case NOCOLLECT: return "no collection"; + case NODSCLCD: return "no disclosure without consent directive"; + case NODSCLCDS: return "no disclosure without information subject's consent directive"; + case NOINTEGRATE: return "no integration"; + case NOLIST: return "no unlisted entity disclosure"; + case NOMOU: return "no disclosure without MOU"; + case NOORGPOL: return "no disclosure without organizational authorization"; + case NOPAT: return "no disclosure to patient, family or caregivers without attending provider's authorization"; + case NOPERSISTP: return "no collection beyond purpose of use"; + case NORDSCLCD: return "no redisclosure without consent directive"; + case NORDSCLCDS: return "no redisclosure without information subject's consent directive"; + case NORDSCLW: return "no disclosure without jurisdictional authorization"; + case NORELINK: return "no relinking"; + case NOREUSE: return "no reuse beyond purpose of use"; + case NOVIP: return "no unauthorized VIP disclosure"; + case ORCON: return "no disclosure without originator authorization"; + case _ACTPRODUCTACQUISITIONCODE: return "ActProductAcquisitionCode"; + case LOAN: return "Loan"; + case RENT: return "Rent"; + case TRANSFER: return "Transfer"; + case SALE: return "Sale"; + case _ACTSPECIMENTRANSPORTCODE: return "ActSpecimenTransportCode"; + case SREC: return "specimen received"; + case SSTOR: return "specimen in storage"; + case STRAN: return "specimen in transit"; + case _ACTSPECIMENTREATMENTCODE: return "ActSpecimenTreatmentCode"; + case ACID: return "Acidification"; + case ALK: return "Alkalization"; + case DEFB: return "Defibrination"; + case FILT: return "Filtration"; + case LDLP: return "LDL Precipitation"; + case NEUT: return "Neutralization"; + case RECA: return "Recalcification"; + case UFIL: return "Ultrafiltration"; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "ActSubstanceAdministrationCode"; + case DRUG: return "Drug therapy"; + case FD: return "food"; + case IMMUNIZ: return "Immunization"; + case BOOSTER: return "Booster Immunization"; + case INITIMMUNIZ: return "Initial Immunization"; + case _ACTTASKCODE: return "ActTaskCode"; + case OE: return "order entry task"; + case LABOE: return "laboratory test order entry task"; + case MEDOE: return "medication order entry task"; + case PATDOC: return "patient documentation task"; + case ALLERLREV: return "allergy list review"; + case CLINNOTEE: return "clinical note entry task"; + case DIAGLISTE: return "diagnosis list entry task"; + case DISCHINSTE: return "discharge instruction entry"; + case DISCHSUME: return "discharge summary entry task"; + case PATEDUE: return "patient education entry"; + case PATREPE: return "pathology report entry task"; + case PROBLISTE: return "problem list entry task"; + case RADREPE: return "radiology report entry task"; + case IMMLREV: return "immunization list review"; + case REMLREV: return "reminder list review"; + case WELLREMLREV: return "wellness reminder list review"; + case PATINFO: return "patient information review task"; + case ALLERLE: return "allergy list entry"; + case CDSREV: return "clinical decision support intervention review"; + case CLINNOTEREV: return "clinical note review task"; + case DISCHSUMREV: return "discharge summary review task"; + case DIAGLISTREV: return "diagnosis list review task"; + case IMMLE: return "immunization list entry"; + case LABRREV: return "laboratory results review task"; + case MICRORREV: return "microbiology results review task"; + case MICROORGRREV: return "microbiology organisms results review task"; + case MICROSENSRREV: return "microbiology sensitivity test results review task"; + case MLREV: return "medication list review task"; + case MARWLREV: return "medication administration record work list review task"; + case OREV: return "orders review task"; + case PATREPREV: return "pathology report review task"; + case PROBLISTREV: return "problem list review task"; + case RADREPREV: return "radiology report review task"; + case REMLE: return "reminder list entry"; + case WELLREMLE: return "wellness reminder list entry"; + case RISKASSESS: return "risk assessment instrument task"; + case FALLRISK: return "falls risk assessment instrument task"; + case _ACTTRANSPORTATIONMODECODE: return "ActTransportationModeCode"; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "ActPatientTransportationModeCode"; + case AFOOT: return "pedestrian transport"; + case AMBT: return "ambulance transport"; + case AMBAIR: return "fixed-wing ambulance transport"; + case AMBGRND: return "ground ambulance transport"; + case AMBHELO: return "helicopter ambulance transport"; + case LAWENF: return "law enforcement transport"; + case PRVTRN: return "private transport"; + case PUBTRN: return "public transport"; + case _OBSERVATIONTYPE: return "ObservationType"; + case _ACTSPECOBSCODE: return "ActSpecObsCode"; + case ARTBLD: return "ActSpecObsArtBldCode"; + case DILUTION: return "ActSpecObsDilutionCode"; + case AUTOHIGH: return "Auto-High Dilution"; + case AUTOLOW: return "Auto-Low Dilution"; + case PRE: return "Pre-Dilution"; + case RERUN: return "Rerun Dilution"; + case EVNFCTS: return "ActSpecObsEvntfctsCode"; + case INTFR: return "ActSpecObsInterferenceCode"; + case FIBRIN: return "Fibrin"; + case HEMOLYSIS: return "Hemolysis"; + case ICTERUS: return "Icterus"; + case LIPEMIA: return "Lipemia"; + case VOLUME: return "ActSpecObsVolumeCode"; + case AVAILABLE: return "Available Volume"; + case CONSUMPTION: return "Consumption Volume"; + case CURRENT: return "Current Volume"; + case INITIAL: return "Initial Volume"; + case _ANNOTATIONTYPE: return "AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "ActPatientAnnotationType"; + case ANNDI: return "diagnostic image note"; + case ANNGEN: return "general note"; + case ANNIMM: return "immunization note"; + case ANNLAB: return "laboratory note"; + case ANNMED: return "medication note"; + case _GENETICOBSERVATIONTYPE: return "GeneticObservationType"; + case GENE: return "gene"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "ImmunizationObservationType"; + case OBSANTC: return "antigen count"; + case OBSANTV: return "antigen validity"; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "Individual Case Safety Report Type"; + case PATADVEVNT: return "patient adverse event"; + case VACPROBLEM: return "vaccine product problem"; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "LOINCObservationActContextAgeType"; + case _216119: return "age patient qn est"; + case _216127: return "age patient qn reported"; + case _295535: return "age patient qn calc"; + case _305250: return "age patient qn definition"; + case _309724: return "age at onset of adverse event"; + case _MEDICATIONOBSERVATIONTYPE: return "MedicationObservationType"; + case REPHALFLIFE: return "representative half-life"; + case SPLCOATING: return "coating"; + case SPLCOLOR: return "color"; + case SPLIMAGE: return "image"; + case SPLIMPRINT: return "imprint"; + case SPLSCORING: return "scoring"; + case SPLSHAPE: return "shape"; + case SPLSIZE: return "size"; + case SPLSYMBOL: return "symbol"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "ObservationIssueTriggerCodedObservationType"; + case _CASETRANSMISSIONMODE: return "case transmission mode"; + case AIRTRNS: return "airborne transmission"; + case ANANTRNS: return "animal to animal transmission"; + case ANHUMTRNS: return "animal to human transmission"; + case BDYFLDTRNS: return "body fluid contact transmission"; + case BLDTRNS: return "blood borne transmission"; + case DERMTRNS: return "transdermal transmission"; + case ENVTRNS: return "environmental exposure transmission"; + case FECTRNS: return "fecal-oral transmission"; + case FOMTRNS: return "fomite transmission"; + case FOODTRNS: return "food-borne transmission"; + case HUMHUMTRNS: return "human to human transmission"; + case INDTRNS: return "indeterminate disease transmission mode"; + case LACTTRNS: return "lactation transmission"; + case NOSTRNS: return "nosocomial transmission"; + case PARTRNS: return "parenteral transmission"; + case PLACTRNS: return "transplacental transmission"; + case SEXTRNS: return "sexual transmission"; + case TRNSFTRNS: return "transfusion transmission"; + case VECTRNS: return "vector-borne transmission"; + case WATTRNS: return "water-borne transmission"; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "ObservationQualityMeasureAttribute"; + case AGGREGATE: return "aggregate measure observation"; + case COPY: return "copyright"; + case CRS: return "clinical recommendation statement"; + case DEF: return "definition"; + case DISC: return "disclaimer"; + case FINALDT: return "finalized date/time"; + case GUIDE: return "guidance"; + case IDUR: return "improvement notation"; + case ITMCNT: return "items counted"; + case KEY: return "keyword"; + case MEDT: return "measurement end date"; + case MSD: return "measurement start date"; + case MSRADJ: return "risk adjustment"; + case MSRAGG: return "rate aggregation"; + case MSRIMPROV: return "health quality measure improvement notation"; + case MSRJUR: return "jurisdiction"; + case MSRRPTR: return "reporter type"; + case MSRRPTTIME: return "timeframe for reporting"; + case MSRSCORE: return "measure scoring"; + case MSRSET: return "health quality measure care setting"; + case MSRTOPIC: return "health quality measure topic type"; + case MSRTP: return "measurement period"; + case MSRTYPE: return "measure type"; + case RAT: return "rationale"; + case REF: return "reference"; + case SDE: return "supplemental data elements"; + case STRAT: return "stratification"; + case TRANF: return "transmission format"; + case USE: return "notice of use"; + case _OBSERVATIONSEQUENCETYPE: return "ObservationSequenceType"; + case TIMEABSOLUTE: return "absolute time sequence"; + case TIMERELATIVE: return "relative time sequence"; + case _OBSERVATIONSERIESTYPE: return "ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "ECG representative beat waveforms"; + case RHYTHM: return "ECG rhythm waveforms"; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "PatientImmunizationRelatedObservationType"; + case CLSSRM: return "classroom"; + case GRADE: return "grade"; + case SCHL: return "school"; + case SCHLDIV: return "school division"; + case TEACHER: return "teacher"; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "PopulationInclusionObservationType"; + case DENEX: return "denominator exclusions"; + case DENEXCEP: return "denominator exceptions"; + case DENOM: return "denominator"; + case IPOP: return "initial population"; + case IPPOP: return "initial patient population"; + case MSRPOPL: return "measure population"; + case MSRPOPLEX: return "measure population exclusions"; + case NUMER: return "numerator"; + case NUMEX: return "numerator exclusions"; + case _PREFERENCEOBSERVATIONTYPE: return "_PreferenceObservationType"; + case PREFSTRENGTH: return "preference strength"; + case ADVERSEREACTION: return "Adverse Reaction"; + case ASSERTION: return "Assertion"; + case CASESER: return "case seriousness criteria"; + case CDIO: return "case disease imported observation"; + case CRIT: return "criticality"; + case CTMO: return "case transmission mode observation"; + case DX: return "ObservationDiagnosisTypes"; + case ADMDX: return "admitting diagnosis"; + case DISDX: return "discharge diagnosis"; + case INTDX: return "intermediate diagnosis"; + case NOI: return "nature of injury"; + case GISTIER: return "GIS tier"; + case HHOBS: return "household situation observation"; + case ISSUE: return "detected issue"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "ActAdministrativeDetectedIssueCode"; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "Insufficient authorization"; + case SUPPRESSED: return "record suppressed"; + case VALIDAT: return "validation issue"; + case KEY204: return "Unknown key identifier"; + case KEY205: return "Duplicate key identifier"; + case COMPLY: return "Compliance Alert"; + case DUPTHPY: return "Duplicate Therapy Alert"; + case DUPTHPCLS: return "duplicate therapeutic alass alert"; + case DUPTHPGEN: return "duplicate generic alert"; + case ABUSE: return "commonly abused/misused alert"; + case FRAUD: return "potential fraud"; + case PLYDOC: return "Poly-orderer Alert"; + case PLYPHRM: return "Poly-supplier Alert"; + case DOSE: return "Dosage problem"; + case DOSECOND: return "dosage-condition alert"; + case DOSEDUR: return "Dose-Duration Alert"; + case DOSEDURH: return "Dose-Duration High Alert"; + case DOSEDURHIND: return "Dose-Duration High for Indication Alert"; + case DOSEDURL: return "Dose-Duration Low Alert"; + case DOSEDURLIND: return "Dose-Duration Low for Indication Alert"; + case DOSEH: return "High Dose Alert"; + case DOSEHINDA: return "High Dose for Age Alert"; + case DOSEHIND: return "High Dose for Indication Alert"; + case DOSEHINDSA: return "High Dose for Height/Surface Area Alert"; + case DOSEHINDW: return "High Dose for Weight Alert"; + case DOSEIVL: return "Dose-Interval Alert"; + case DOSEIVLIND: return "Dose-Interval for Indication Alert"; + case DOSEL: return "Low Dose Alert"; + case DOSELINDA: return "Low Dose for Age Alert"; + case DOSELIND: return "Low Dose for Indication Alert"; + case DOSELINDSA: return "Low Dose for Height/Surface Area Alert"; + case DOSELINDW: return "Low Dose for Weight Alert"; + case MDOSE: return "maximum dosage reached"; + case OBSA: return "Observation Alert"; + case AGE: return "Age Alert"; + case ADALRT: return "adult alert"; + case GEALRT: return "geriatric alert"; + case PEALRT: return "pediatric alert"; + case COND: return "Condition Alert"; + case HGHT: return "HGHT"; + case LACT: return "Lactation Alert"; + case PREG: return "Pregnancy Alert"; + case WGHT: return "WGHT"; + case CREACT: return "common reaction alert"; + case GEN: return "Genetic Alert"; + case GEND: return "Gender Alert"; + case LAB: return "Lab Alert"; + case REACT: return "Reaction Alert"; + case ALGY: return "Allergy Alert"; + case INT: return "Intolerance Alert"; + case RREACT: return "Related Reaction Alert"; + case RALG: return "Related Allergy Alert"; + case RAR: return "Related Prior Reaction Alert"; + case RINT: return "Related Intolerance Alert"; + case BUS: return "business constraint violation"; + case CODEINVAL: return "code is not valid"; + case CODEDEPREC: return "code has been deprecated"; + case FORMAT: return "invalid format"; + case ILLEGAL: return "illegal"; + case LENRANGE: return "length out of range"; + case LENLONG: return "length is too long"; + case LENSHORT: return "length is too short"; + case MISSCOND: return "conditional element missing"; + case MISSMAND: return "mandatory element missing"; + case NODUPS: return "duplicate values are not permitted"; + case NOPERSIST: return "element will not be persisted"; + case REPRANGE: return "repetitions out of range"; + case MAXOCCURS: return "repetitions above maximum"; + case MINOCCURS: return "repetitions below minimum"; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "non-matching identification"; + case OBSOLETE: return "obsolete record returned"; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "ActSuppliedItemDetectedIssueCode"; + case _ADMINISTRATIONDETECTEDISSUECODE: return "AdministrationDetectedIssueCode"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "InteractionDetectedIssueCode"; + case FOOD: return "Food Interaction Alert"; + case TPROD: return "Therapeutic Product Alert"; + case DRG: return "Drug Interaction Alert"; + case NHP: return "Natural Health Product Alert"; + case NONRX: return "Non-Prescription Interaction Alert"; + case PREVINEF: return "previously ineffective"; + case DACT: return "drug action detected issue"; + case TIME: return "timing detected issue"; + case ALRTENDLATE: return "end too late alert"; + case ALRTSTRTLATE: return "start too late alert"; + case _TIMINGDETECTEDISSUECODE: return "TimingDetectedIssueCode"; + case ENDLATE: return "End Too Late Alert"; + case STRTLATE: return "Start Too Late Alert"; + case _SUPPLYDETECTEDISSUECODE: return "SupplyDetectedIssueCode"; + case ALLDONE: return "already performed"; + case FULFIL: return "fulfillment alert"; + case NOTACTN: return "no longer actionable"; + case NOTEQUIV: return "not equivalent alert"; + case NOTEQUIVGEN: return "not generically equivalent alert"; + case NOTEQUIVTHER: return "not therapeutically equivalent alert"; + case TIMING: return "event timing incorrect alert"; + case INTERVAL: return "outside requested time"; + case MINFREQ: return "too soon within frequency based on the usage"; + case HELD: return "held/suspended alert"; + case TOOLATE: return "Refill Too Late Alert"; + case TOOSOON: return "Refill Too Soon Alert"; + case HISTORIC: return "record recorded as historical"; + case PATPREF: return "violates stated preferences"; + case PATPREFALT: return "violates stated preferences, alternate available"; + case KSUBJ: return "knowledge subject"; + case KSUBT: return "knowledge subtopic"; + case OINT: return "intolerance"; + case ALG: return "Allergy"; + case DALG: return "Drug Allergy"; + case EALG: return "Environmental Allergy"; + case FALG: return "Food Allergy"; + case DINT: return "Drug Intolerance"; + case DNAINT: return "Drug Non-Allergy Intolerance"; + case EINT: return "Environmental Intolerance"; + case ENAINT: return "Environmental Non-Allergy Intolerance"; + case FINT: return "Food Intolerance"; + case FNAINT: return "Food Non-Allergy Intolerance"; + case NAINT: return "Non-Allergy Intolerance"; + case SEV: return "Severity Observation"; + case _FDALABELDATA: return "FDALabelData"; + case FDACOATING: return "coating"; + case FDACOLOR: return "color"; + case FDAIMPRINTCD: return "imprint code"; + case FDALOGO: return "logo"; + case FDASCORING: return "scoring"; + case FDASHAPE: return "shape"; + case FDASIZE: return "size"; + case _ROIOVERLAYSHAPE: return "ROIOverlayShape"; + case CIRCLE: return "circle"; + case ELLIPSE: return "ellipse"; + case POINT: return "point"; + case POLY: return "polyline"; + case C: return "corrected"; + case DIET: return "Diet"; + case BR: return "breikost (GE)"; + case DM: return "diabetes mellitus diet"; + case FAST: return "fasting"; + case FORMULA: return "formula diet"; + case GF: return "gluten free"; + case LF: return "low fat"; + case LP: return "low protein"; + case LQ: return "liquid"; + case LS: return "low sodium"; + case N: return "normal diet"; + case NF: return "no fat"; + case PAF: return "phenylalanine free"; + case PAR: return "parenteral"; + case RD: return "reduction diet"; + case SCH: return "schonkost (GE)"; + case SUPPLEMENT: return "nutritional supplement"; + case T: return "tea only"; + case VLI: return "low valin, leucin, isoleucin"; + case DRUGPRG: return "drug program"; + case F: return "final"; + case PRLMN: return "preliminary"; + case SECOBS: return "SecurityObservationType"; + case SECCATOBS: return "security category observation"; + case SECCLASSOBS: return "security classification observation"; + case SECCONOBS: return "security control observation"; + case SECINTOBS: return "security integrity observation"; + case SECALTINTOBS: return "security alteration integrity observation"; + case SECDATINTOBS: return "security data integrity observation"; + case SECINTCONOBS: return "security integrity confidence observation"; + case SECINTPRVOBS: return "security integrity provenance observation"; + case SECINTPRVABOBS: return "security integrity provenance asserted by observation"; + case SECINTPRVRBOBS: return "security integrity provenance reported by observation"; + case SECINTSTOBS: return "security integrity status observation"; + case SECTRSTOBS: return "SECTRSTOBS"; + case TRSTACCRDOBS: return "trust accreditation observation"; + case TRSTAGREOBS: return "trust agreement observation"; + case TRSTCERTOBS: return "trust certificate observation"; + case TRSTFWKOBS: return "trust framework observation"; + case TRSTLOAOBS: return "trust assurance observation"; + case TRSTMECOBS: return "trust mechanism observation"; + case SUBSIDFFS: return "subsidized fee for service program"; + case WRKCOMP: return "(workers compensation program"; + case _ACTPROCEDURECODE: return "ActProcedureCode"; + case _ACTBILLABLESERVICECODE: return "ActBillableServiceCode"; + case _HL7DEFINEDACTCODES: return "HL7DefinedActCodes"; + case COPAY: return "COPAY"; + case DEDUCT: return "DEDUCT"; + case DOSEIND: return "DOSEIND"; + case PRA: return "PRA"; + case STORE: return "Storage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCodeEnumFactory.java new file mode 100644 index 00000000000..56cfda8a844 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActCodeEnumFactory.java @@ -0,0 +1,4335 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActCodeEnumFactory implements EnumFactory { + + public V3ActCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccountCode".equals(codeString)) + return V3ActCode._ACTACCOUNTCODE; + if ("ACCTRECEIVABLE".equals(codeString)) + return V3ActCode.ACCTRECEIVABLE; + if ("CASH".equals(codeString)) + return V3ActCode.CASH; + if ("CC".equals(codeString)) + return V3ActCode.CC; + if ("AE".equals(codeString)) + return V3ActCode.AE; + if ("DN".equals(codeString)) + return V3ActCode.DN; + if ("DV".equals(codeString)) + return V3ActCode.DV; + if ("MC".equals(codeString)) + return V3ActCode.MC; + if ("V".equals(codeString)) + return V3ActCode.V; + if ("PBILLACCT".equals(codeString)) + return V3ActCode.PBILLACCT; + if ("_ActAdjudicationCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONCODE; + if ("_ActAdjudicationGroupCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONGROUPCODE; + if ("CONT".equals(codeString)) + return V3ActCode.CONT; + if ("DAY".equals(codeString)) + return V3ActCode.DAY; + if ("LOC".equals(codeString)) + return V3ActCode.LOC; + if ("MONTH".equals(codeString)) + return V3ActCode.MONTH; + if ("PERIOD".equals(codeString)) + return V3ActCode.PERIOD; + if ("PROV".equals(codeString)) + return V3ActCode.PROV; + if ("WEEK".equals(codeString)) + return V3ActCode.WEEK; + if ("YEAR".equals(codeString)) + return V3ActCode.YEAR; + if ("AA".equals(codeString)) + return V3ActCode.AA; + if ("ANF".equals(codeString)) + return V3ActCode.ANF; + if ("AR".equals(codeString)) + return V3ActCode.AR; + if ("AS".equals(codeString)) + return V3ActCode.AS; + if ("_ActAdjudicationResultActionCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONRESULTACTIONCODE; + if ("DISPLAY".equals(codeString)) + return V3ActCode.DISPLAY; + if ("FORM".equals(codeString)) + return V3ActCode.FORM; + if ("_ActBillableModifierCode".equals(codeString)) + return V3ActCode._ACTBILLABLEMODIFIERCODE; + if ("CPTM".equals(codeString)) + return V3ActCode.CPTM; + if ("HCPCSA".equals(codeString)) + return V3ActCode.HCPCSA; + if ("_ActBillingArrangementCode".equals(codeString)) + return V3ActCode._ACTBILLINGARRANGEMENTCODE; + if ("BLK".equals(codeString)) + return V3ActCode.BLK; + if ("CAP".equals(codeString)) + return V3ActCode.CAP; + if ("CONTF".equals(codeString)) + return V3ActCode.CONTF; + if ("FINBILL".equals(codeString)) + return V3ActCode.FINBILL; + if ("ROST".equals(codeString)) + return V3ActCode.ROST; + if ("SESS".equals(codeString)) + return V3ActCode.SESS; + if ("FFS".equals(codeString)) + return V3ActCode.FFS; + if ("FFPS".equals(codeString)) + return V3ActCode.FFPS; + if ("FFCS".equals(codeString)) + return V3ActCode.FFCS; + if ("TFS".equals(codeString)) + return V3ActCode.TFS; + if ("_ActBoundedROICode".equals(codeString)) + return V3ActCode._ACTBOUNDEDROICODE; + if ("ROIFS".equals(codeString)) + return V3ActCode.ROIFS; + if ("ROIPS".equals(codeString)) + return V3ActCode.ROIPS; + if ("_ActCareProvisionCode".equals(codeString)) + return V3ActCode._ACTCAREPROVISIONCODE; + if ("_ActCredentialedCareCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCARECODE; + if ("_ActCredentialedCareProvisionPersonCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCAREPROVISIONPERSONCODE; + if ("CACC".equals(codeString)) + return V3ActCode.CACC; + if ("CAIC".equals(codeString)) + return V3ActCode.CAIC; + if ("CAMC".equals(codeString)) + return V3ActCode.CAMC; + if ("CANC".equals(codeString)) + return V3ActCode.CANC; + if ("CAPC".equals(codeString)) + return V3ActCode.CAPC; + if ("CBGC".equals(codeString)) + return V3ActCode.CBGC; + if ("CCCC".equals(codeString)) + return V3ActCode.CCCC; + if ("CCGC".equals(codeString)) + return V3ActCode.CCGC; + if ("CCPC".equals(codeString)) + return V3ActCode.CCPC; + if ("CCSC".equals(codeString)) + return V3ActCode.CCSC; + if ("CDEC".equals(codeString)) + return V3ActCode.CDEC; + if ("CDRC".equals(codeString)) + return V3ActCode.CDRC; + if ("CEMC".equals(codeString)) + return V3ActCode.CEMC; + if ("CFPC".equals(codeString)) + return V3ActCode.CFPC; + if ("CIMC".equals(codeString)) + return V3ActCode.CIMC; + if ("CMGC".equals(codeString)) + return V3ActCode.CMGC; + if ("CNEC".equals(codeString)) + return V3ActCode.CNEC; + if ("CNMC".equals(codeString)) + return V3ActCode.CNMC; + if ("CNQC".equals(codeString)) + return V3ActCode.CNQC; + if ("CNSC".equals(codeString)) + return V3ActCode.CNSC; + if ("COGC".equals(codeString)) + return V3ActCode.COGC; + if ("COMC".equals(codeString)) + return V3ActCode.COMC; + if ("COPC".equals(codeString)) + return V3ActCode.COPC; + if ("COSC".equals(codeString)) + return V3ActCode.COSC; + if ("COTC".equals(codeString)) + return V3ActCode.COTC; + if ("CPEC".equals(codeString)) + return V3ActCode.CPEC; + if ("CPGC".equals(codeString)) + return V3ActCode.CPGC; + if ("CPHC".equals(codeString)) + return V3ActCode.CPHC; + if ("CPRC".equals(codeString)) + return V3ActCode.CPRC; + if ("CPSC".equals(codeString)) + return V3ActCode.CPSC; + if ("CPYC".equals(codeString)) + return V3ActCode.CPYC; + if ("CROC".equals(codeString)) + return V3ActCode.CROC; + if ("CRPC".equals(codeString)) + return V3ActCode.CRPC; + if ("CSUC".equals(codeString)) + return V3ActCode.CSUC; + if ("CTSC".equals(codeString)) + return V3ActCode.CTSC; + if ("CURC".equals(codeString)) + return V3ActCode.CURC; + if ("CVSC".equals(codeString)) + return V3ActCode.CVSC; + if ("LGPC".equals(codeString)) + return V3ActCode.LGPC; + if ("_ActCredentialedCareProvisionProgramCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE; + if ("AALC".equals(codeString)) + return V3ActCode.AALC; + if ("AAMC".equals(codeString)) + return V3ActCode.AAMC; + if ("ABHC".equals(codeString)) + return V3ActCode.ABHC; + if ("ACAC".equals(codeString)) + return V3ActCode.ACAC; + if ("ACHC".equals(codeString)) + return V3ActCode.ACHC; + if ("AHOC".equals(codeString)) + return V3ActCode.AHOC; + if ("ALTC".equals(codeString)) + return V3ActCode.ALTC; + if ("AOSC".equals(codeString)) + return V3ActCode.AOSC; + if ("CACS".equals(codeString)) + return V3ActCode.CACS; + if ("CAMI".equals(codeString)) + return V3ActCode.CAMI; + if ("CAST".equals(codeString)) + return V3ActCode.CAST; + if ("CBAR".equals(codeString)) + return V3ActCode.CBAR; + if ("CCAD".equals(codeString)) + return V3ActCode.CCAD; + if ("CCAR".equals(codeString)) + return V3ActCode.CCAR; + if ("CDEP".equals(codeString)) + return V3ActCode.CDEP; + if ("CDGD".equals(codeString)) + return V3ActCode.CDGD; + if ("CDIA".equals(codeString)) + return V3ActCode.CDIA; + if ("CEPI".equals(codeString)) + return V3ActCode.CEPI; + if ("CFEL".equals(codeString)) + return V3ActCode.CFEL; + if ("CHFC".equals(codeString)) + return V3ActCode.CHFC; + if ("CHRO".equals(codeString)) + return V3ActCode.CHRO; + if ("CHYP".equals(codeString)) + return V3ActCode.CHYP; + if ("CMIH".equals(codeString)) + return V3ActCode.CMIH; + if ("CMSC".equals(codeString)) + return V3ActCode.CMSC; + if ("COJR".equals(codeString)) + return V3ActCode.COJR; + if ("CONC".equals(codeString)) + return V3ActCode.CONC; + if ("COPD".equals(codeString)) + return V3ActCode.COPD; + if ("CORT".equals(codeString)) + return V3ActCode.CORT; + if ("CPAD".equals(codeString)) + return V3ActCode.CPAD; + if ("CPND".equals(codeString)) + return V3ActCode.CPND; + if ("CPST".equals(codeString)) + return V3ActCode.CPST; + if ("CSDM".equals(codeString)) + return V3ActCode.CSDM; + if ("CSIC".equals(codeString)) + return V3ActCode.CSIC; + if ("CSLD".equals(codeString)) + return V3ActCode.CSLD; + if ("CSPT".equals(codeString)) + return V3ActCode.CSPT; + if ("CTBU".equals(codeString)) + return V3ActCode.CTBU; + if ("CVDC".equals(codeString)) + return V3ActCode.CVDC; + if ("CWMA".equals(codeString)) + return V3ActCode.CWMA; + if ("CWOH".equals(codeString)) + return V3ActCode.CWOH; + if ("_ActEncounterCode".equals(codeString)) + return V3ActCode._ACTENCOUNTERCODE; + if ("AMB".equals(codeString)) + return V3ActCode.AMB; + if ("EMER".equals(codeString)) + return V3ActCode.EMER; + if ("FLD".equals(codeString)) + return V3ActCode.FLD; + if ("HH".equals(codeString)) + return V3ActCode.HH; + if ("IMP".equals(codeString)) + return V3ActCode.IMP; + if ("ACUTE".equals(codeString)) + return V3ActCode.ACUTE; + if ("NONAC".equals(codeString)) + return V3ActCode.NONAC; + if ("PRENC".equals(codeString)) + return V3ActCode.PRENC; + if ("SS".equals(codeString)) + return V3ActCode.SS; + if ("VR".equals(codeString)) + return V3ActCode.VR; + if ("_ActMedicalServiceCode".equals(codeString)) + return V3ActCode._ACTMEDICALSERVICECODE; + if ("ALC".equals(codeString)) + return V3ActCode.ALC; + if ("CARD".equals(codeString)) + return V3ActCode.CARD; + if ("CHR".equals(codeString)) + return V3ActCode.CHR; + if ("DNTL".equals(codeString)) + return V3ActCode.DNTL; + if ("DRGRHB".equals(codeString)) + return V3ActCode.DRGRHB; + if ("GENRL".equals(codeString)) + return V3ActCode.GENRL; + if ("MED".equals(codeString)) + return V3ActCode.MED; + if ("OBS".equals(codeString)) + return V3ActCode.OBS; + if ("ONC".equals(codeString)) + return V3ActCode.ONC; + if ("PALL".equals(codeString)) + return V3ActCode.PALL; + if ("PED".equals(codeString)) + return V3ActCode.PED; + if ("PHAR".equals(codeString)) + return V3ActCode.PHAR; + if ("PHYRHB".equals(codeString)) + return V3ActCode.PHYRHB; + if ("PSYCH".equals(codeString)) + return V3ActCode.PSYCH; + if ("SURG".equals(codeString)) + return V3ActCode.SURG; + if ("_ActClaimAttachmentCategoryCode".equals(codeString)) + return V3ActCode._ACTCLAIMATTACHMENTCATEGORYCODE; + if ("AUTOATTCH".equals(codeString)) + return V3ActCode.AUTOATTCH; + if ("DOCUMENT".equals(codeString)) + return V3ActCode.DOCUMENT; + if ("HEALTHREC".equals(codeString)) + return V3ActCode.HEALTHREC; + if ("IMG".equals(codeString)) + return V3ActCode.IMG; + if ("LABRESULTS".equals(codeString)) + return V3ActCode.LABRESULTS; + if ("MODEL".equals(codeString)) + return V3ActCode.MODEL; + if ("WIATTCH".equals(codeString)) + return V3ActCode.WIATTCH; + if ("XRAY".equals(codeString)) + return V3ActCode.XRAY; + if ("_ActConsentType".equals(codeString)) + return V3ActCode._ACTCONSENTTYPE; + if ("ICOL".equals(codeString)) + return V3ActCode.ICOL; + if ("IDSCL".equals(codeString)) + return V3ActCode.IDSCL; + if ("INFA".equals(codeString)) + return V3ActCode.INFA; + if ("INFAO".equals(codeString)) + return V3ActCode.INFAO; + if ("INFASO".equals(codeString)) + return V3ActCode.INFASO; + if ("IRDSCL".equals(codeString)) + return V3ActCode.IRDSCL; + if ("RESEARCH".equals(codeString)) + return V3ActCode.RESEARCH; + if ("RSDID".equals(codeString)) + return V3ActCode.RSDID; + if ("RSREID".equals(codeString)) + return V3ActCode.RSREID; + if ("_ActContainerRegistrationCode".equals(codeString)) + return V3ActCode._ACTCONTAINERREGISTRATIONCODE; + if ("ID".equals(codeString)) + return V3ActCode.ID; + if ("IP".equals(codeString)) + return V3ActCode.IP; + if ("L".equals(codeString)) + return V3ActCode.L; + if ("M".equals(codeString)) + return V3ActCode.M; + if ("O".equals(codeString)) + return V3ActCode.O; + if ("R".equals(codeString)) + return V3ActCode.R; + if ("X".equals(codeString)) + return V3ActCode.X; + if ("_ActControlVariable".equals(codeString)) + return V3ActCode._ACTCONTROLVARIABLE; + if ("AUTO".equals(codeString)) + return V3ActCode.AUTO; + if ("ENDC".equals(codeString)) + return V3ActCode.ENDC; + if ("REFLEX".equals(codeString)) + return V3ActCode.REFLEX; + if ("_ActCoverageConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGECONFIRMATIONCODE; + if ("_ActCoverageAuthorizationConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE; + if ("AUTH".equals(codeString)) + return V3ActCode.AUTH; + if ("NAUTH".equals(codeString)) + return V3ActCode.NAUTH; + if ("_ActCoverageEligibilityConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE; + if ("ELG".equals(codeString)) + return V3ActCode.ELG; + if ("NELG".equals(codeString)) + return V3ActCode.NELG; + if ("_ActCoverageLimitCode".equals(codeString)) + return V3ActCode._ACTCOVERAGELIMITCODE; + if ("_ActCoverageQuantityLimitCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEQUANTITYLIMITCODE; + if ("COVPRD".equals(codeString)) + return V3ActCode.COVPRD; + if ("LFEMX".equals(codeString)) + return V3ActCode.LFEMX; + if ("NETAMT".equals(codeString)) + return V3ActCode.NETAMT; + if ("PRDMX".equals(codeString)) + return V3ActCode.PRDMX; + if ("UNITPRICE".equals(codeString)) + return V3ActCode.UNITPRICE; + if ("UNITQTY".equals(codeString)) + return V3ActCode.UNITQTY; + if ("COVMX".equals(codeString)) + return V3ActCode.COVMX; + if ("_ActCoveredPartyLimitCode".equals(codeString)) + return V3ActCode._ACTCOVEREDPARTYLIMITCODE; + if ("_ActCoverageTypeCode".equals(codeString)) + return V3ActCode._ACTCOVERAGETYPECODE; + if ("_ActInsurancePolicyCode".equals(codeString)) + return V3ActCode._ACTINSURANCEPOLICYCODE; + if ("EHCPOL".equals(codeString)) + return V3ActCode.EHCPOL; + if ("HSAPOL".equals(codeString)) + return V3ActCode.HSAPOL; + if ("AUTOPOL".equals(codeString)) + return V3ActCode.AUTOPOL; + if ("COL".equals(codeString)) + return V3ActCode.COL; + if ("UNINSMOT".equals(codeString)) + return V3ActCode.UNINSMOT; + if ("PUBLICPOL".equals(codeString)) + return V3ActCode.PUBLICPOL; + if ("DENTPRG".equals(codeString)) + return V3ActCode.DENTPRG; + if ("DISEASEPRG".equals(codeString)) + return V3ActCode.DISEASEPRG; + if ("CANPRG".equals(codeString)) + return V3ActCode.CANPRG; + if ("ENDRENAL".equals(codeString)) + return V3ActCode.ENDRENAL; + if ("HIVAIDS".equals(codeString)) + return V3ActCode.HIVAIDS; + if ("MANDPOL".equals(codeString)) + return V3ActCode.MANDPOL; + if ("MENTPRG".equals(codeString)) + return V3ActCode.MENTPRG; + if ("SAFNET".equals(codeString)) + return V3ActCode.SAFNET; + if ("SUBPRG".equals(codeString)) + return V3ActCode.SUBPRG; + if ("SUBSIDIZ".equals(codeString)) + return V3ActCode.SUBSIDIZ; + if ("SUBSIDMC".equals(codeString)) + return V3ActCode.SUBSIDMC; + if ("SUBSUPP".equals(codeString)) + return V3ActCode.SUBSUPP; + if ("WCBPOL".equals(codeString)) + return V3ActCode.WCBPOL; + if ("_ActInsuranceTypeCode".equals(codeString)) + return V3ActCode._ACTINSURANCETYPECODE; + if ("_ActHealthInsuranceTypeCode".equals(codeString)) + return V3ActCode._ACTHEALTHINSURANCETYPECODE; + if ("DENTAL".equals(codeString)) + return V3ActCode.DENTAL; + if ("DISEASE".equals(codeString)) + return V3ActCode.DISEASE; + if ("DRUGPOL".equals(codeString)) + return V3ActCode.DRUGPOL; + if ("HIP".equals(codeString)) + return V3ActCode.HIP; + if ("LTC".equals(codeString)) + return V3ActCode.LTC; + if ("MCPOL".equals(codeString)) + return V3ActCode.MCPOL; + if ("POS".equals(codeString)) + return V3ActCode.POS; + if ("HMO".equals(codeString)) + return V3ActCode.HMO; + if ("PPO".equals(codeString)) + return V3ActCode.PPO; + if ("MENTPOL".equals(codeString)) + return V3ActCode.MENTPOL; + if ("SUBPOL".equals(codeString)) + return V3ActCode.SUBPOL; + if ("VISPOL".equals(codeString)) + return V3ActCode.VISPOL; + if ("DIS".equals(codeString)) + return V3ActCode.DIS; + if ("EWB".equals(codeString)) + return V3ActCode.EWB; + if ("FLEXP".equals(codeString)) + return V3ActCode.FLEXP; + if ("LIFE".equals(codeString)) + return V3ActCode.LIFE; + if ("ANNU".equals(codeString)) + return V3ActCode.ANNU; + if ("TLIFE".equals(codeString)) + return V3ActCode.TLIFE; + if ("ULIFE".equals(codeString)) + return V3ActCode.ULIFE; + if ("PNC".equals(codeString)) + return V3ActCode.PNC; + if ("REI".equals(codeString)) + return V3ActCode.REI; + if ("SURPL".equals(codeString)) + return V3ActCode.SURPL; + if ("UMBRL".equals(codeString)) + return V3ActCode.UMBRL; + if ("_ActProgramTypeCode".equals(codeString)) + return V3ActCode._ACTPROGRAMTYPECODE; + if ("CHAR".equals(codeString)) + return V3ActCode.CHAR; + if ("CRIME".equals(codeString)) + return V3ActCode.CRIME; + if ("EAP".equals(codeString)) + return V3ActCode.EAP; + if ("GOVEMP".equals(codeString)) + return V3ActCode.GOVEMP; + if ("HIRISK".equals(codeString)) + return V3ActCode.HIRISK; + if ("IND".equals(codeString)) + return V3ActCode.IND; + if ("MILITARY".equals(codeString)) + return V3ActCode.MILITARY; + if ("RETIRE".equals(codeString)) + return V3ActCode.RETIRE; + if ("SOCIAL".equals(codeString)) + return V3ActCode.SOCIAL; + if ("VET".equals(codeString)) + return V3ActCode.VET; + if ("_ActDetectedIssueManagementCode".equals(codeString)) + return V3ActCode._ACTDETECTEDISSUEMANAGEMENTCODE; + if ("_ActAdministrativeDetectedIssueManagementCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE; + if ("_AuthorizationIssueManagementCode".equals(codeString)) + return V3ActCode._AUTHORIZATIONISSUEMANAGEMENTCODE; + if ("EMAUTH".equals(codeString)) + return V3ActCode.EMAUTH; + if ("21".equals(codeString)) + return V3ActCode._21; + if ("1".equals(codeString)) + return V3ActCode._1; + if ("19".equals(codeString)) + return V3ActCode._19; + if ("2".equals(codeString)) + return V3ActCode._2; + if ("22".equals(codeString)) + return V3ActCode._22; + if ("23".equals(codeString)) + return V3ActCode._23; + if ("3".equals(codeString)) + return V3ActCode._3; + if ("4".equals(codeString)) + return V3ActCode._4; + if ("5".equals(codeString)) + return V3ActCode._5; + if ("6".equals(codeString)) + return V3ActCode._6; + if ("7".equals(codeString)) + return V3ActCode._7; + if ("14".equals(codeString)) + return V3ActCode._14; + if ("15".equals(codeString)) + return V3ActCode._15; + if ("16".equals(codeString)) + return V3ActCode._16; + if ("17".equals(codeString)) + return V3ActCode._17; + if ("18".equals(codeString)) + return V3ActCode._18; + if ("20".equals(codeString)) + return V3ActCode._20; + if ("8".equals(codeString)) + return V3ActCode._8; + if ("10".equals(codeString)) + return V3ActCode._10; + if ("11".equals(codeString)) + return V3ActCode._11; + if ("12".equals(codeString)) + return V3ActCode._12; + if ("13".equals(codeString)) + return V3ActCode._13; + if ("9".equals(codeString)) + return V3ActCode._9; + if ("_ActExposureCode".equals(codeString)) + return V3ActCode._ACTEXPOSURECODE; + if ("CHLDCARE".equals(codeString)) + return V3ActCode.CHLDCARE; + if ("CONVEYNC".equals(codeString)) + return V3ActCode.CONVEYNC; + if ("HLTHCARE".equals(codeString)) + return V3ActCode.HLTHCARE; + if ("HOMECARE".equals(codeString)) + return V3ActCode.HOMECARE; + if ("HOSPPTNT".equals(codeString)) + return V3ActCode.HOSPPTNT; + if ("HOSPVSTR".equals(codeString)) + return V3ActCode.HOSPVSTR; + if ("HOUSEHLD".equals(codeString)) + return V3ActCode.HOUSEHLD; + if ("INMATE".equals(codeString)) + return V3ActCode.INMATE; + if ("INTIMATE".equals(codeString)) + return V3ActCode.INTIMATE; + if ("LTRMCARE".equals(codeString)) + return V3ActCode.LTRMCARE; + if ("PLACE".equals(codeString)) + return V3ActCode.PLACE; + if ("PTNTCARE".equals(codeString)) + return V3ActCode.PTNTCARE; + if ("SCHOOL2".equals(codeString)) + return V3ActCode.SCHOOL2; + if ("SOCIAL2".equals(codeString)) + return V3ActCode.SOCIAL2; + if ("SUBSTNCE".equals(codeString)) + return V3ActCode.SUBSTNCE; + if ("TRAVINT".equals(codeString)) + return V3ActCode.TRAVINT; + if ("WORK2".equals(codeString)) + return V3ActCode.WORK2; + if ("_ActFinancialTransactionCode".equals(codeString)) + return V3ActCode._ACTFINANCIALTRANSACTIONCODE; + if ("CHRG".equals(codeString)) + return V3ActCode.CHRG; + if ("REV".equals(codeString)) + return V3ActCode.REV; + if ("_ActIncidentCode".equals(codeString)) + return V3ActCode._ACTINCIDENTCODE; + if ("MVA".equals(codeString)) + return V3ActCode.MVA; + if ("SCHOOL".equals(codeString)) + return V3ActCode.SCHOOL; + if ("SPT".equals(codeString)) + return V3ActCode.SPT; + if ("WPA".equals(codeString)) + return V3ActCode.WPA; + if ("_ActInformationAccessCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONACCESSCODE; + if ("ACADR".equals(codeString)) + return V3ActCode.ACADR; + if ("ACALL".equals(codeString)) + return V3ActCode.ACALL; + if ("ACALLG".equals(codeString)) + return V3ActCode.ACALLG; + if ("ACCONS".equals(codeString)) + return V3ActCode.ACCONS; + if ("ACDEMO".equals(codeString)) + return V3ActCode.ACDEMO; + if ("ACDI".equals(codeString)) + return V3ActCode.ACDI; + if ("ACIMMUN".equals(codeString)) + return V3ActCode.ACIMMUN; + if ("ACLAB".equals(codeString)) + return V3ActCode.ACLAB; + if ("ACMED".equals(codeString)) + return V3ActCode.ACMED; + if ("ACMEDC".equals(codeString)) + return V3ActCode.ACMEDC; + if ("ACMEN".equals(codeString)) + return V3ActCode.ACMEN; + if ("ACOBS".equals(codeString)) + return V3ActCode.ACOBS; + if ("ACPOLPRG".equals(codeString)) + return V3ActCode.ACPOLPRG; + if ("ACPROV".equals(codeString)) + return V3ActCode.ACPROV; + if ("ACPSERV".equals(codeString)) + return V3ActCode.ACPSERV; + if ("ACSUBSTAB".equals(codeString)) + return V3ActCode.ACSUBSTAB; + if ("_ActInformationAccessContextCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONACCESSCONTEXTCODE; + if ("INFAUT".equals(codeString)) + return V3ActCode.INFAUT; + if ("INFCON".equals(codeString)) + return V3ActCode.INFCON; + if ("INFCRT".equals(codeString)) + return V3ActCode.INFCRT; + if ("INFDNG".equals(codeString)) + return V3ActCode.INFDNG; + if ("INFEMER".equals(codeString)) + return V3ActCode.INFEMER; + if ("INFPWR".equals(codeString)) + return V3ActCode.INFPWR; + if ("INFREG".equals(codeString)) + return V3ActCode.INFREG; + if ("_ActInformationCategoryCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONCATEGORYCODE; + if ("ALLCAT".equals(codeString)) + return V3ActCode.ALLCAT; + if ("ALLGCAT".equals(codeString)) + return V3ActCode.ALLGCAT; + if ("ARCAT".equals(codeString)) + return V3ActCode.ARCAT; + if ("COBSCAT".equals(codeString)) + return V3ActCode.COBSCAT; + if ("DEMOCAT".equals(codeString)) + return V3ActCode.DEMOCAT; + if ("DICAT".equals(codeString)) + return V3ActCode.DICAT; + if ("IMMUCAT".equals(codeString)) + return V3ActCode.IMMUCAT; + if ("LABCAT".equals(codeString)) + return V3ActCode.LABCAT; + if ("MEDCCAT".equals(codeString)) + return V3ActCode.MEDCCAT; + if ("MENCAT".equals(codeString)) + return V3ActCode.MENCAT; + if ("PSVCCAT".equals(codeString)) + return V3ActCode.PSVCCAT; + if ("RXCAT".equals(codeString)) + return V3ActCode.RXCAT; + if ("_ActInvoiceElementCode".equals(codeString)) + return V3ActCode._ACTINVOICEELEMENTCODE; + if ("_ActInvoiceAdjudicationPaymentCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTCODE; + if ("_ActInvoiceAdjudicationPaymentGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTGROUPCODE; + if ("ALEC".equals(codeString)) + return V3ActCode.ALEC; + if ("BONUS".equals(codeString)) + return V3ActCode.BONUS; + if ("CFWD".equals(codeString)) + return V3ActCode.CFWD; + if ("EDU".equals(codeString)) + return V3ActCode.EDU; + if ("EPYMT".equals(codeString)) + return V3ActCode.EPYMT; + if ("GARN".equals(codeString)) + return V3ActCode.GARN; + if ("INVOICE".equals(codeString)) + return V3ActCode.INVOICE; + if ("PINV".equals(codeString)) + return V3ActCode.PINV; + if ("PPRD".equals(codeString)) + return V3ActCode.PPRD; + if ("PROA".equals(codeString)) + return V3ActCode.PROA; + if ("RECOV".equals(codeString)) + return V3ActCode.RECOV; + if ("RETRO".equals(codeString)) + return V3ActCode.RETRO; + if ("TRAN".equals(codeString)) + return V3ActCode.TRAN; + if ("_ActInvoiceAdjudicationPaymentSummaryCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE; + if ("INVTYPE".equals(codeString)) + return V3ActCode.INVTYPE; + if ("PAYEE".equals(codeString)) + return V3ActCode.PAYEE; + if ("PAYOR".equals(codeString)) + return V3ActCode.PAYOR; + if ("SENDAPP".equals(codeString)) + return V3ActCode.SENDAPP; + if ("_ActInvoiceDetailCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCODE; + if ("_ActInvoiceDetailClinicalProductCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCLINICALPRODUCTCODE; + if ("UNSPSC".equals(codeString)) + return V3ActCode.UNSPSC; + if ("_ActInvoiceDetailDrugProductCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILDRUGPRODUCTCODE; + if ("GTIN".equals(codeString)) + return V3ActCode.GTIN; + if ("UPC".equals(codeString)) + return V3ActCode.UPC; + if ("_ActInvoiceDetailGenericCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICCODE; + if ("_ActInvoiceDetailGenericAdjudicatorCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICADJUDICATORCODE; + if ("COIN".equals(codeString)) + return V3ActCode.COIN; + if ("COPAYMENT".equals(codeString)) + return V3ActCode.COPAYMENT; + if ("DEDUCTIBLE".equals(codeString)) + return V3ActCode.DEDUCTIBLE; + if ("PAY".equals(codeString)) + return V3ActCode.PAY; + if ("SPEND".equals(codeString)) + return V3ActCode.SPEND; + if ("COINS".equals(codeString)) + return V3ActCode.COINS; + if ("_ActInvoiceDetailGenericModifierCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICMODIFIERCODE; + if ("AFTHRS".equals(codeString)) + return V3ActCode.AFTHRS; + if ("ISOL".equals(codeString)) + return V3ActCode.ISOL; + if ("OOO".equals(codeString)) + return V3ActCode.OOO; + if ("_ActInvoiceDetailGenericProviderCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICPROVIDERCODE; + if ("CANCAPT".equals(codeString)) + return V3ActCode.CANCAPT; + if ("DSC".equals(codeString)) + return V3ActCode.DSC; + if ("ESA".equals(codeString)) + return V3ActCode.ESA; + if ("FFSTOP".equals(codeString)) + return V3ActCode.FFSTOP; + if ("FNLFEE".equals(codeString)) + return V3ActCode.FNLFEE; + if ("FRSTFEE".equals(codeString)) + return V3ActCode.FRSTFEE; + if ("MARKUP".equals(codeString)) + return V3ActCode.MARKUP; + if ("MISSAPT".equals(codeString)) + return V3ActCode.MISSAPT; + if ("PERFEE".equals(codeString)) + return V3ActCode.PERFEE; + if ("PERMBNS".equals(codeString)) + return V3ActCode.PERMBNS; + if ("RESTOCK".equals(codeString)) + return V3ActCode.RESTOCK; + if ("TRAVEL".equals(codeString)) + return V3ActCode.TRAVEL; + if ("URGENT".equals(codeString)) + return V3ActCode.URGENT; + if ("_ActInvoiceDetailTaxCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILTAXCODE; + if ("FST".equals(codeString)) + return V3ActCode.FST; + if ("HST".equals(codeString)) + return V3ActCode.HST; + if ("PST".equals(codeString)) + return V3ActCode.PST; + if ("_ActInvoiceDetailPreferredAccommodationCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE; + if ("_ActEncounterAccommodationCode".equals(codeString)) + return V3ActCode._ACTENCOUNTERACCOMMODATIONCODE; + if ("_HL7AccommodationCode".equals(codeString)) + return V3ActCode._HL7ACCOMMODATIONCODE; + if ("I".equals(codeString)) + return V3ActCode.I; + if ("P".equals(codeString)) + return V3ActCode.P; + if ("S".equals(codeString)) + return V3ActCode.S; + if ("SP".equals(codeString)) + return V3ActCode.SP; + if ("W".equals(codeString)) + return V3ActCode.W; + if ("_ActInvoiceDetailClinicalServiceCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCLINICALSERVICECODE; + if ("_ActInvoiceGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEGROUPCODE; + if ("_ActInvoiceInterGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEINTERGROUPCODE; + if ("CPNDDRGING".equals(codeString)) + return V3ActCode.CPNDDRGING; + if ("CPNDINDING".equals(codeString)) + return V3ActCode.CPNDINDING; + if ("CPNDSUPING".equals(codeString)) + return V3ActCode.CPNDSUPING; + if ("DRUGING".equals(codeString)) + return V3ActCode.DRUGING; + if ("FRAMEING".equals(codeString)) + return V3ActCode.FRAMEING; + if ("LENSING".equals(codeString)) + return V3ActCode.LENSING; + if ("PRDING".equals(codeString)) + return V3ActCode.PRDING; + if ("_ActInvoiceRootGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEROOTGROUPCODE; + if ("CPINV".equals(codeString)) + return V3ActCode.CPINV; + if ("CSINV".equals(codeString)) + return V3ActCode.CSINV; + if ("CSPINV".equals(codeString)) + return V3ActCode.CSPINV; + if ("FININV".equals(codeString)) + return V3ActCode.FININV; + if ("OHSINV".equals(codeString)) + return V3ActCode.OHSINV; + if ("PAINV".equals(codeString)) + return V3ActCode.PAINV; + if ("RXCINV".equals(codeString)) + return V3ActCode.RXCINV; + if ("RXDINV".equals(codeString)) + return V3ActCode.RXDINV; + if ("SBFINV".equals(codeString)) + return V3ActCode.SBFINV; + if ("VRXINV".equals(codeString)) + return V3ActCode.VRXINV; + if ("_ActInvoiceElementSummaryCode".equals(codeString)) + return V3ActCode._ACTINVOICEELEMENTSUMMARYCODE; + if ("_InvoiceElementAdjudicated".equals(codeString)) + return V3ActCode._INVOICEELEMENTADJUDICATED; + if ("ADNFPPELAT".equals(codeString)) + return V3ActCode.ADNFPPELAT; + if ("ADNFPPELCT".equals(codeString)) + return V3ActCode.ADNFPPELCT; + if ("ADNFPPMNAT".equals(codeString)) + return V3ActCode.ADNFPPMNAT; + if ("ADNFPPMNCT".equals(codeString)) + return V3ActCode.ADNFPPMNCT; + if ("ADNFSPELAT".equals(codeString)) + return V3ActCode.ADNFSPELAT; + if ("ADNFSPELCT".equals(codeString)) + return V3ActCode.ADNFSPELCT; + if ("ADNFSPMNAT".equals(codeString)) + return V3ActCode.ADNFSPMNAT; + if ("ADNFSPMNCT".equals(codeString)) + return V3ActCode.ADNFSPMNCT; + if ("ADNPPPELAT".equals(codeString)) + return V3ActCode.ADNPPPELAT; + if ("ADNPPPELCT".equals(codeString)) + return V3ActCode.ADNPPPELCT; + if ("ADNPPPMNAT".equals(codeString)) + return V3ActCode.ADNPPPMNAT; + if ("ADNPPPMNCT".equals(codeString)) + return V3ActCode.ADNPPPMNCT; + if ("ADNPSPELAT".equals(codeString)) + return V3ActCode.ADNPSPELAT; + if ("ADNPSPELCT".equals(codeString)) + return V3ActCode.ADNPSPELCT; + if ("ADNPSPMNAT".equals(codeString)) + return V3ActCode.ADNPSPMNAT; + if ("ADNPSPMNCT".equals(codeString)) + return V3ActCode.ADNPSPMNCT; + if ("ADPPPPELAT".equals(codeString)) + return V3ActCode.ADPPPPELAT; + if ("ADPPPPELCT".equals(codeString)) + return V3ActCode.ADPPPPELCT; + if ("ADPPPPMNAT".equals(codeString)) + return V3ActCode.ADPPPPMNAT; + if ("ADPPPPMNCT".equals(codeString)) + return V3ActCode.ADPPPPMNCT; + if ("ADPPSPELAT".equals(codeString)) + return V3ActCode.ADPPSPELAT; + if ("ADPPSPELCT".equals(codeString)) + return V3ActCode.ADPPSPELCT; + if ("ADPPSPMNAT".equals(codeString)) + return V3ActCode.ADPPSPMNAT; + if ("ADPPSPMNCT".equals(codeString)) + return V3ActCode.ADPPSPMNCT; + if ("ADRFPPELAT".equals(codeString)) + return V3ActCode.ADRFPPELAT; + if ("ADRFPPELCT".equals(codeString)) + return V3ActCode.ADRFPPELCT; + if ("ADRFPPMNAT".equals(codeString)) + return V3ActCode.ADRFPPMNAT; + if ("ADRFPPMNCT".equals(codeString)) + return V3ActCode.ADRFPPMNCT; + if ("ADRFSPELAT".equals(codeString)) + return V3ActCode.ADRFSPELAT; + if ("ADRFSPELCT".equals(codeString)) + return V3ActCode.ADRFSPELCT; + if ("ADRFSPMNAT".equals(codeString)) + return V3ActCode.ADRFSPMNAT; + if ("ADRFSPMNCT".equals(codeString)) + return V3ActCode.ADRFSPMNCT; + if ("_InvoiceElementPaid".equals(codeString)) + return V3ActCode._INVOICEELEMENTPAID; + if ("PDNFPPELAT".equals(codeString)) + return V3ActCode.PDNFPPELAT; + if ("PDNFPPELCT".equals(codeString)) + return V3ActCode.PDNFPPELCT; + if ("PDNFPPMNAT".equals(codeString)) + return V3ActCode.PDNFPPMNAT; + if ("PDNFPPMNCT".equals(codeString)) + return V3ActCode.PDNFPPMNCT; + if ("PDNFSPELAT".equals(codeString)) + return V3ActCode.PDNFSPELAT; + if ("PDNFSPELCT".equals(codeString)) + return V3ActCode.PDNFSPELCT; + if ("PDNFSPMNAT".equals(codeString)) + return V3ActCode.PDNFSPMNAT; + if ("PDNFSPMNCT".equals(codeString)) + return V3ActCode.PDNFSPMNCT; + if ("PDNPPPELAT".equals(codeString)) + return V3ActCode.PDNPPPELAT; + if ("PDNPPPELCT".equals(codeString)) + return V3ActCode.PDNPPPELCT; + if ("PDNPPPMNAT".equals(codeString)) + return V3ActCode.PDNPPPMNAT; + if ("PDNPPPMNCT".equals(codeString)) + return V3ActCode.PDNPPPMNCT; + if ("PDNPSPELAT".equals(codeString)) + return V3ActCode.PDNPSPELAT; + if ("PDNPSPELCT".equals(codeString)) + return V3ActCode.PDNPSPELCT; + if ("PDNPSPMNAT".equals(codeString)) + return V3ActCode.PDNPSPMNAT; + if ("PDNPSPMNCT".equals(codeString)) + return V3ActCode.PDNPSPMNCT; + if ("PDPPPPELAT".equals(codeString)) + return V3ActCode.PDPPPPELAT; + if ("PDPPPPELCT".equals(codeString)) + return V3ActCode.PDPPPPELCT; + if ("PDPPPPMNAT".equals(codeString)) + return V3ActCode.PDPPPPMNAT; + if ("PDPPPPMNCT".equals(codeString)) + return V3ActCode.PDPPPPMNCT; + if ("PDPPSPELAT".equals(codeString)) + return V3ActCode.PDPPSPELAT; + if ("PDPPSPELCT".equals(codeString)) + return V3ActCode.PDPPSPELCT; + if ("PDPPSPMNAT".equals(codeString)) + return V3ActCode.PDPPSPMNAT; + if ("PDPPSPMNCT".equals(codeString)) + return V3ActCode.PDPPSPMNCT; + if ("_InvoiceElementSubmitted".equals(codeString)) + return V3ActCode._INVOICEELEMENTSUBMITTED; + if ("SBBLELAT".equals(codeString)) + return V3ActCode.SBBLELAT; + if ("SBBLELCT".equals(codeString)) + return V3ActCode.SBBLELCT; + if ("SBNFELAT".equals(codeString)) + return V3ActCode.SBNFELAT; + if ("SBNFELCT".equals(codeString)) + return V3ActCode.SBNFELCT; + if ("SBPDELAT".equals(codeString)) + return V3ActCode.SBPDELAT; + if ("SBPDELCT".equals(codeString)) + return V3ActCode.SBPDELCT; + if ("_ActInvoiceOverrideCode".equals(codeString)) + return V3ActCode._ACTINVOICEOVERRIDECODE; + if ("COVGE".equals(codeString)) + return V3ActCode.COVGE; + if ("EFORM".equals(codeString)) + return V3ActCode.EFORM; + if ("FAX".equals(codeString)) + return V3ActCode.FAX; + if ("GFTH".equals(codeString)) + return V3ActCode.GFTH; + if ("LATE".equals(codeString)) + return V3ActCode.LATE; + if ("MANUAL".equals(codeString)) + return V3ActCode.MANUAL; + if ("OOJ".equals(codeString)) + return V3ActCode.OOJ; + if ("ORTHO".equals(codeString)) + return V3ActCode.ORTHO; + if ("PAPER".equals(codeString)) + return V3ActCode.PAPER; + if ("PIE".equals(codeString)) + return V3ActCode.PIE; + if ("PYRDELAY".equals(codeString)) + return V3ActCode.PYRDELAY; + if ("REFNR".equals(codeString)) + return V3ActCode.REFNR; + if ("REPSERV".equals(codeString)) + return V3ActCode.REPSERV; + if ("UNRELAT".equals(codeString)) + return V3ActCode.UNRELAT; + if ("VERBAUTH".equals(codeString)) + return V3ActCode.VERBAUTH; + if ("_ActListCode".equals(codeString)) + return V3ActCode._ACTLISTCODE; + if ("_ActObservationList".equals(codeString)) + return V3ActCode._ACTOBSERVATIONLIST; + if ("CARELIST".equals(codeString)) + return V3ActCode.CARELIST; + if ("CONDLIST".equals(codeString)) + return V3ActCode.CONDLIST; + if ("INTOLIST".equals(codeString)) + return V3ActCode.INTOLIST; + if ("PROBLIST".equals(codeString)) + return V3ActCode.PROBLIST; + if ("RISKLIST".equals(codeString)) + return V3ActCode.RISKLIST; + if ("GOALLIST".equals(codeString)) + return V3ActCode.GOALLIST; + if ("_ActTherapyDurationWorkingListCode".equals(codeString)) + return V3ActCode._ACTTHERAPYDURATIONWORKINGLISTCODE; + if ("_ActMedicationTherapyDurationWorkingListCode".equals(codeString)) + return V3ActCode._ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE; + if ("ACU".equals(codeString)) + return V3ActCode.ACU; + if ("CHRON".equals(codeString)) + return V3ActCode.CHRON; + if ("ONET".equals(codeString)) + return V3ActCode.ONET; + if ("PRN".equals(codeString)) + return V3ActCode.PRN; + if ("MEDLIST".equals(codeString)) + return V3ActCode.MEDLIST; + if ("CURMEDLIST".equals(codeString)) + return V3ActCode.CURMEDLIST; + if ("DISCMEDLIST".equals(codeString)) + return V3ActCode.DISCMEDLIST; + if ("HISTMEDLIST".equals(codeString)) + return V3ActCode.HISTMEDLIST; + if ("_ActMonitoringProtocolCode".equals(codeString)) + return V3ActCode._ACTMONITORINGPROTOCOLCODE; + if ("CTLSUB".equals(codeString)) + return V3ActCode.CTLSUB; + if ("INV".equals(codeString)) + return V3ActCode.INV; + if ("LU".equals(codeString)) + return V3ActCode.LU; + if ("OTC".equals(codeString)) + return V3ActCode.OTC; + if ("RX".equals(codeString)) + return V3ActCode.RX; + if ("SA".equals(codeString)) + return V3ActCode.SA; + if ("SAC".equals(codeString)) + return V3ActCode.SAC; + if ("_ActNonObservationIndicationCode".equals(codeString)) + return V3ActCode._ACTNONOBSERVATIONINDICATIONCODE; + if ("IND01".equals(codeString)) + return V3ActCode.IND01; + if ("IND02".equals(codeString)) + return V3ActCode.IND02; + if ("IND03".equals(codeString)) + return V3ActCode.IND03; + if ("IND04".equals(codeString)) + return V3ActCode.IND04; + if ("IND05".equals(codeString)) + return V3ActCode.IND05; + if ("_ActObservationVerificationType".equals(codeString)) + return V3ActCode._ACTOBSERVATIONVERIFICATIONTYPE; + if ("VFPAPER".equals(codeString)) + return V3ActCode.VFPAPER; + if ("_ActPaymentCode".equals(codeString)) + return V3ActCode._ACTPAYMENTCODE; + if ("ACH".equals(codeString)) + return V3ActCode.ACH; + if ("CHK".equals(codeString)) + return V3ActCode.CHK; + if ("DDP".equals(codeString)) + return V3ActCode.DDP; + if ("NON".equals(codeString)) + return V3ActCode.NON; + if ("_ActPharmacySupplyType".equals(codeString)) + return V3ActCode._ACTPHARMACYSUPPLYTYPE; + if ("DF".equals(codeString)) + return V3ActCode.DF; + if ("EM".equals(codeString)) + return V3ActCode.EM; + if ("SO".equals(codeString)) + return V3ActCode.SO; + if ("FF".equals(codeString)) + return V3ActCode.FF; + if ("FFC".equals(codeString)) + return V3ActCode.FFC; + if ("FFP".equals(codeString)) + return V3ActCode.FFP; + if ("FFSS".equals(codeString)) + return V3ActCode.FFSS; + if ("TF".equals(codeString)) + return V3ActCode.TF; + if ("FS".equals(codeString)) + return V3ActCode.FS; + if ("MS".equals(codeString)) + return V3ActCode.MS; + if ("RF".equals(codeString)) + return V3ActCode.RF; + if ("UD".equals(codeString)) + return V3ActCode.UD; + if ("RFC".equals(codeString)) + return V3ActCode.RFC; + if ("RFCS".equals(codeString)) + return V3ActCode.RFCS; + if ("RFF".equals(codeString)) + return V3ActCode.RFF; + if ("RFFS".equals(codeString)) + return V3ActCode.RFFS; + if ("RFP".equals(codeString)) + return V3ActCode.RFP; + if ("RFPS".equals(codeString)) + return V3ActCode.RFPS; + if ("RFS".equals(codeString)) + return V3ActCode.RFS; + if ("TB".equals(codeString)) + return V3ActCode.TB; + if ("TBS".equals(codeString)) + return V3ActCode.TBS; + if ("UDE".equals(codeString)) + return V3ActCode.UDE; + if ("_ActPolicyType".equals(codeString)) + return V3ActCode._ACTPOLICYTYPE; + if ("_ActPrivacyPolicy".equals(codeString)) + return V3ActCode._ACTPRIVACYPOLICY; + if ("_ActConsentDirective".equals(codeString)) + return V3ActCode._ACTCONSENTDIRECTIVE; + if ("EMRGONLY".equals(codeString)) + return V3ActCode.EMRGONLY; + if ("NOPP".equals(codeString)) + return V3ActCode.NOPP; + if ("OPTIN".equals(codeString)) + return V3ActCode.OPTIN; + if ("OPTOUT".equals(codeString)) + return V3ActCode.OPTOUT; + if ("_InformationSensitivityPolicy".equals(codeString)) + return V3ActCode._INFORMATIONSENSITIVITYPOLICY; + if ("_ActInformationSensitivityPolicy".equals(codeString)) + return V3ActCode._ACTINFORMATIONSENSITIVITYPOLICY; + if ("ETH".equals(codeString)) + return V3ActCode.ETH; + if ("GDIS".equals(codeString)) + return V3ActCode.GDIS; + if ("HIV".equals(codeString)) + return V3ActCode.HIV; + if ("PSY".equals(codeString)) + return V3ActCode.PSY; + if ("SCA".equals(codeString)) + return V3ActCode.SCA; + if ("SDV".equals(codeString)) + return V3ActCode.SDV; + if ("SEX".equals(codeString)) + return V3ActCode.SEX; + if ("STD".equals(codeString)) + return V3ActCode.STD; + if ("TBOO".equals(codeString)) + return V3ActCode.TBOO; + if ("SICKLE".equals(codeString)) + return V3ActCode.SICKLE; + if ("_EntitySensitivityPolicyType".equals(codeString)) + return V3ActCode._ENTITYSENSITIVITYPOLICYTYPE; + if ("DEMO".equals(codeString)) + return V3ActCode.DEMO; + if ("DOB".equals(codeString)) + return V3ActCode.DOB; + if ("GENDER".equals(codeString)) + return V3ActCode.GENDER; + if ("LIVARG".equals(codeString)) + return V3ActCode.LIVARG; + if ("MARST".equals(codeString)) + return V3ActCode.MARST; + if ("RACE".equals(codeString)) + return V3ActCode.RACE; + if ("REL".equals(codeString)) + return V3ActCode.REL; + if ("_RoleInformationSensitivityPolicy".equals(codeString)) + return V3ActCode._ROLEINFORMATIONSENSITIVITYPOLICY; + if ("B".equals(codeString)) + return V3ActCode.B; + if ("EMPL".equals(codeString)) + return V3ActCode.EMPL; + if ("LOCIS".equals(codeString)) + return V3ActCode.LOCIS; + if ("SSP".equals(codeString)) + return V3ActCode.SSP; + if ("ADOL".equals(codeString)) + return V3ActCode.ADOL; + if ("CEL".equals(codeString)) + return V3ActCode.CEL; + if ("DIA".equals(codeString)) + return V3ActCode.DIA; + if ("DRGIS".equals(codeString)) + return V3ActCode.DRGIS; + if ("EMP".equals(codeString)) + return V3ActCode.EMP; + if ("PDS".equals(codeString)) + return V3ActCode.PDS; + if ("PRS".equals(codeString)) + return V3ActCode.PRS; + if ("COMPT".equals(codeString)) + return V3ActCode.COMPT; + if ("HRCOMPT".equals(codeString)) + return V3ActCode.HRCOMPT; + if ("RESCOMPT".equals(codeString)) + return V3ActCode.RESCOMPT; + if ("RMGTCOMPT".equals(codeString)) + return V3ActCode.RMGTCOMPT; + if ("ActTrustPolicyType".equals(codeString)) + return V3ActCode.ACTTRUSTPOLICYTYPE; + if ("TRSTACCRD".equals(codeString)) + return V3ActCode.TRSTACCRD; + if ("TRSTAGRE".equals(codeString)) + return V3ActCode.TRSTAGRE; + if ("TRSTASSUR".equals(codeString)) + return V3ActCode.TRSTASSUR; + if ("TRSTCERT".equals(codeString)) + return V3ActCode.TRSTCERT; + if ("TRSTFWK".equals(codeString)) + return V3ActCode.TRSTFWK; + if ("TRSTMEC".equals(codeString)) + return V3ActCode.TRSTMEC; + if ("COVPOL".equals(codeString)) + return V3ActCode.COVPOL; + if ("SecurityPolicy".equals(codeString)) + return V3ActCode.SECURITYPOLICY; + if ("ObligationPolicy".equals(codeString)) + return V3ActCode.OBLIGATIONPOLICY; + if ("ANONY".equals(codeString)) + return V3ActCode.ANONY; + if ("AOD".equals(codeString)) + return V3ActCode.AOD; + if ("AUDIT".equals(codeString)) + return V3ActCode.AUDIT; + if ("AUDTR".equals(codeString)) + return V3ActCode.AUDTR; + if ("CPLYCC".equals(codeString)) + return V3ActCode.CPLYCC; + if ("CPLYCD".equals(codeString)) + return V3ActCode.CPLYCD; + if ("CPLYJPP".equals(codeString)) + return V3ActCode.CPLYJPP; + if ("CPLYOPP".equals(codeString)) + return V3ActCode.CPLYOPP; + if ("CPLYOSP".equals(codeString)) + return V3ActCode.CPLYOSP; + if ("CPLYPOL".equals(codeString)) + return V3ActCode.CPLYPOL; + if ("DEID".equals(codeString)) + return V3ActCode.DEID; + if ("DELAU".equals(codeString)) + return V3ActCode.DELAU; + if ("ENCRYPT".equals(codeString)) + return V3ActCode.ENCRYPT; + if ("ENCRYPTR".equals(codeString)) + return V3ActCode.ENCRYPTR; + if ("ENCRYPTT".equals(codeString)) + return V3ActCode.ENCRYPTT; + if ("ENCRYPTU".equals(codeString)) + return V3ActCode.ENCRYPTU; + if ("HUAPRV".equals(codeString)) + return V3ActCode.HUAPRV; + if ("MASK".equals(codeString)) + return V3ActCode.MASK; + if ("MINEC".equals(codeString)) + return V3ActCode.MINEC; + if ("PRIVMARK".equals(codeString)) + return V3ActCode.PRIVMARK; + if ("PSEUD".equals(codeString)) + return V3ActCode.PSEUD; + if ("REDACT".equals(codeString)) + return V3ActCode.REDACT; + if ("RefrainPolicy".equals(codeString)) + return V3ActCode.REFRAINPOLICY; + if ("NOAUTH".equals(codeString)) + return V3ActCode.NOAUTH; + if ("NOCOLLECT".equals(codeString)) + return V3ActCode.NOCOLLECT; + if ("NODSCLCD".equals(codeString)) + return V3ActCode.NODSCLCD; + if ("NODSCLCDS".equals(codeString)) + return V3ActCode.NODSCLCDS; + if ("NOINTEGRATE".equals(codeString)) + return V3ActCode.NOINTEGRATE; + if ("NOLIST".equals(codeString)) + return V3ActCode.NOLIST; + if ("NOMOU".equals(codeString)) + return V3ActCode.NOMOU; + if ("NOORGPOL".equals(codeString)) + return V3ActCode.NOORGPOL; + if ("NOPAT".equals(codeString)) + return V3ActCode.NOPAT; + if ("NOPERSISTP".equals(codeString)) + return V3ActCode.NOPERSISTP; + if ("NORDSCLCD".equals(codeString)) + return V3ActCode.NORDSCLCD; + if ("NORDSCLCDS".equals(codeString)) + return V3ActCode.NORDSCLCDS; + if ("NORDSCLW".equals(codeString)) + return V3ActCode.NORDSCLW; + if ("NORELINK".equals(codeString)) + return V3ActCode.NORELINK; + if ("NOREUSE".equals(codeString)) + return V3ActCode.NOREUSE; + if ("NOVIP".equals(codeString)) + return V3ActCode.NOVIP; + if ("ORCON".equals(codeString)) + return V3ActCode.ORCON; + if ("_ActProductAcquisitionCode".equals(codeString)) + return V3ActCode._ACTPRODUCTACQUISITIONCODE; + if ("LOAN".equals(codeString)) + return V3ActCode.LOAN; + if ("RENT".equals(codeString)) + return V3ActCode.RENT; + if ("TRANSFER".equals(codeString)) + return V3ActCode.TRANSFER; + if ("SALE".equals(codeString)) + return V3ActCode.SALE; + if ("_ActSpecimenTransportCode".equals(codeString)) + return V3ActCode._ACTSPECIMENTRANSPORTCODE; + if ("SREC".equals(codeString)) + return V3ActCode.SREC; + if ("SSTOR".equals(codeString)) + return V3ActCode.SSTOR; + if ("STRAN".equals(codeString)) + return V3ActCode.STRAN; + if ("_ActSpecimenTreatmentCode".equals(codeString)) + return V3ActCode._ACTSPECIMENTREATMENTCODE; + if ("ACID".equals(codeString)) + return V3ActCode.ACID; + if ("ALK".equals(codeString)) + return V3ActCode.ALK; + if ("DEFB".equals(codeString)) + return V3ActCode.DEFB; + if ("FILT".equals(codeString)) + return V3ActCode.FILT; + if ("LDLP".equals(codeString)) + return V3ActCode.LDLP; + if ("NEUT".equals(codeString)) + return V3ActCode.NEUT; + if ("RECA".equals(codeString)) + return V3ActCode.RECA; + if ("UFIL".equals(codeString)) + return V3ActCode.UFIL; + if ("_ActSubstanceAdministrationCode".equals(codeString)) + return V3ActCode._ACTSUBSTANCEADMINISTRATIONCODE; + if ("DRUG".equals(codeString)) + return V3ActCode.DRUG; + if ("FD".equals(codeString)) + return V3ActCode.FD; + if ("IMMUNIZ".equals(codeString)) + return V3ActCode.IMMUNIZ; + if ("BOOSTER".equals(codeString)) + return V3ActCode.BOOSTER; + if ("INITIMMUNIZ".equals(codeString)) + return V3ActCode.INITIMMUNIZ; + if ("_ActTaskCode".equals(codeString)) + return V3ActCode._ACTTASKCODE; + if ("OE".equals(codeString)) + return V3ActCode.OE; + if ("LABOE".equals(codeString)) + return V3ActCode.LABOE; + if ("MEDOE".equals(codeString)) + return V3ActCode.MEDOE; + if ("PATDOC".equals(codeString)) + return V3ActCode.PATDOC; + if ("ALLERLREV".equals(codeString)) + return V3ActCode.ALLERLREV; + if ("CLINNOTEE".equals(codeString)) + return V3ActCode.CLINNOTEE; + if ("DIAGLISTE".equals(codeString)) + return V3ActCode.DIAGLISTE; + if ("DISCHINSTE".equals(codeString)) + return V3ActCode.DISCHINSTE; + if ("DISCHSUME".equals(codeString)) + return V3ActCode.DISCHSUME; + if ("PATEDUE".equals(codeString)) + return V3ActCode.PATEDUE; + if ("PATREPE".equals(codeString)) + return V3ActCode.PATREPE; + if ("PROBLISTE".equals(codeString)) + return V3ActCode.PROBLISTE; + if ("RADREPE".equals(codeString)) + return V3ActCode.RADREPE; + if ("IMMLREV".equals(codeString)) + return V3ActCode.IMMLREV; + if ("REMLREV".equals(codeString)) + return V3ActCode.REMLREV; + if ("WELLREMLREV".equals(codeString)) + return V3ActCode.WELLREMLREV; + if ("PATINFO".equals(codeString)) + return V3ActCode.PATINFO; + if ("ALLERLE".equals(codeString)) + return V3ActCode.ALLERLE; + if ("CDSREV".equals(codeString)) + return V3ActCode.CDSREV; + if ("CLINNOTEREV".equals(codeString)) + return V3ActCode.CLINNOTEREV; + if ("DISCHSUMREV".equals(codeString)) + return V3ActCode.DISCHSUMREV; + if ("DIAGLISTREV".equals(codeString)) + return V3ActCode.DIAGLISTREV; + if ("IMMLE".equals(codeString)) + return V3ActCode.IMMLE; + if ("LABRREV".equals(codeString)) + return V3ActCode.LABRREV; + if ("MICRORREV".equals(codeString)) + return V3ActCode.MICRORREV; + if ("MICROORGRREV".equals(codeString)) + return V3ActCode.MICROORGRREV; + if ("MICROSENSRREV".equals(codeString)) + return V3ActCode.MICROSENSRREV; + if ("MLREV".equals(codeString)) + return V3ActCode.MLREV; + if ("MARWLREV".equals(codeString)) + return V3ActCode.MARWLREV; + if ("OREV".equals(codeString)) + return V3ActCode.OREV; + if ("PATREPREV".equals(codeString)) + return V3ActCode.PATREPREV; + if ("PROBLISTREV".equals(codeString)) + return V3ActCode.PROBLISTREV; + if ("RADREPREV".equals(codeString)) + return V3ActCode.RADREPREV; + if ("REMLE".equals(codeString)) + return V3ActCode.REMLE; + if ("WELLREMLE".equals(codeString)) + return V3ActCode.WELLREMLE; + if ("RISKASSESS".equals(codeString)) + return V3ActCode.RISKASSESS; + if ("FALLRISK".equals(codeString)) + return V3ActCode.FALLRISK; + if ("_ActTransportationModeCode".equals(codeString)) + return V3ActCode._ACTTRANSPORTATIONMODECODE; + if ("_ActPatientTransportationModeCode".equals(codeString)) + return V3ActCode._ACTPATIENTTRANSPORTATIONMODECODE; + if ("AFOOT".equals(codeString)) + return V3ActCode.AFOOT; + if ("AMBT".equals(codeString)) + return V3ActCode.AMBT; + if ("AMBAIR".equals(codeString)) + return V3ActCode.AMBAIR; + if ("AMBGRND".equals(codeString)) + return V3ActCode.AMBGRND; + if ("AMBHELO".equals(codeString)) + return V3ActCode.AMBHELO; + if ("LAWENF".equals(codeString)) + return V3ActCode.LAWENF; + if ("PRVTRN".equals(codeString)) + return V3ActCode.PRVTRN; + if ("PUBTRN".equals(codeString)) + return V3ActCode.PUBTRN; + if ("_ObservationType".equals(codeString)) + return V3ActCode._OBSERVATIONTYPE; + if ("_ActSpecObsCode".equals(codeString)) + return V3ActCode._ACTSPECOBSCODE; + if ("ARTBLD".equals(codeString)) + return V3ActCode.ARTBLD; + if ("DILUTION".equals(codeString)) + return V3ActCode.DILUTION; + if ("AUTO-HIGH".equals(codeString)) + return V3ActCode.AUTOHIGH; + if ("AUTO-LOW".equals(codeString)) + return V3ActCode.AUTOLOW; + if ("PRE".equals(codeString)) + return V3ActCode.PRE; + if ("RERUN".equals(codeString)) + return V3ActCode.RERUN; + if ("EVNFCTS".equals(codeString)) + return V3ActCode.EVNFCTS; + if ("INTFR".equals(codeString)) + return V3ActCode.INTFR; + if ("FIBRIN".equals(codeString)) + return V3ActCode.FIBRIN; + if ("HEMOLYSIS".equals(codeString)) + return V3ActCode.HEMOLYSIS; + if ("ICTERUS".equals(codeString)) + return V3ActCode.ICTERUS; + if ("LIPEMIA".equals(codeString)) + return V3ActCode.LIPEMIA; + if ("VOLUME".equals(codeString)) + return V3ActCode.VOLUME; + if ("AVAILABLE".equals(codeString)) + return V3ActCode.AVAILABLE; + if ("CONSUMPTION".equals(codeString)) + return V3ActCode.CONSUMPTION; + if ("CURRENT".equals(codeString)) + return V3ActCode.CURRENT; + if ("INITIAL".equals(codeString)) + return V3ActCode.INITIAL; + if ("_AnnotationType".equals(codeString)) + return V3ActCode._ANNOTATIONTYPE; + if ("_ActPatientAnnotationType".equals(codeString)) + return V3ActCode._ACTPATIENTANNOTATIONTYPE; + if ("ANNDI".equals(codeString)) + return V3ActCode.ANNDI; + if ("ANNGEN".equals(codeString)) + return V3ActCode.ANNGEN; + if ("ANNIMM".equals(codeString)) + return V3ActCode.ANNIMM; + if ("ANNLAB".equals(codeString)) + return V3ActCode.ANNLAB; + if ("ANNMED".equals(codeString)) + return V3ActCode.ANNMED; + if ("_GeneticObservationType".equals(codeString)) + return V3ActCode._GENETICOBSERVATIONTYPE; + if ("GENE".equals(codeString)) + return V3ActCode.GENE; + if ("_ImmunizationObservationType".equals(codeString)) + return V3ActCode._IMMUNIZATIONOBSERVATIONTYPE; + if ("OBSANTC".equals(codeString)) + return V3ActCode.OBSANTC; + if ("OBSANTV".equals(codeString)) + return V3ActCode.OBSANTV; + if ("_IndividualCaseSafetyReportType".equals(codeString)) + return V3ActCode._INDIVIDUALCASESAFETYREPORTTYPE; + if ("PAT_ADV_EVNT".equals(codeString)) + return V3ActCode.PATADVEVNT; + if ("VAC_PROBLEM".equals(codeString)) + return V3ActCode.VACPROBLEM; + if ("_LOINCObservationActContextAgeType".equals(codeString)) + return V3ActCode._LOINCOBSERVATIONACTCONTEXTAGETYPE; + if ("21611-9".equals(codeString)) + return V3ActCode._216119; + if ("21612-7".equals(codeString)) + return V3ActCode._216127; + if ("29553-5".equals(codeString)) + return V3ActCode._295535; + if ("30525-0".equals(codeString)) + return V3ActCode._305250; + if ("30972-4".equals(codeString)) + return V3ActCode._309724; + if ("_MedicationObservationType".equals(codeString)) + return V3ActCode._MEDICATIONOBSERVATIONTYPE; + if ("REP_HALF_LIFE".equals(codeString)) + return V3ActCode.REPHALFLIFE; + if ("SPLCOATING".equals(codeString)) + return V3ActCode.SPLCOATING; + if ("SPLCOLOR".equals(codeString)) + return V3ActCode.SPLCOLOR; + if ("SPLIMAGE".equals(codeString)) + return V3ActCode.SPLIMAGE; + if ("SPLIMPRINT".equals(codeString)) + return V3ActCode.SPLIMPRINT; + if ("SPLSCORING".equals(codeString)) + return V3ActCode.SPLSCORING; + if ("SPLSHAPE".equals(codeString)) + return V3ActCode.SPLSHAPE; + if ("SPLSIZE".equals(codeString)) + return V3ActCode.SPLSIZE; + if ("SPLSYMBOL".equals(codeString)) + return V3ActCode.SPLSYMBOL; + if ("_ObservationIssueTriggerCodedObservationType".equals(codeString)) + return V3ActCode._OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE; + if ("_CaseTransmissionMode".equals(codeString)) + return V3ActCode._CASETRANSMISSIONMODE; + if ("AIRTRNS".equals(codeString)) + return V3ActCode.AIRTRNS; + if ("ANANTRNS".equals(codeString)) + return V3ActCode.ANANTRNS; + if ("ANHUMTRNS".equals(codeString)) + return V3ActCode.ANHUMTRNS; + if ("BDYFLDTRNS".equals(codeString)) + return V3ActCode.BDYFLDTRNS; + if ("BLDTRNS".equals(codeString)) + return V3ActCode.BLDTRNS; + if ("DERMTRNS".equals(codeString)) + return V3ActCode.DERMTRNS; + if ("ENVTRNS".equals(codeString)) + return V3ActCode.ENVTRNS; + if ("FECTRNS".equals(codeString)) + return V3ActCode.FECTRNS; + if ("FOMTRNS".equals(codeString)) + return V3ActCode.FOMTRNS; + if ("FOODTRNS".equals(codeString)) + return V3ActCode.FOODTRNS; + if ("HUMHUMTRNS".equals(codeString)) + return V3ActCode.HUMHUMTRNS; + if ("INDTRNS".equals(codeString)) + return V3ActCode.INDTRNS; + if ("LACTTRNS".equals(codeString)) + return V3ActCode.LACTTRNS; + if ("NOSTRNS".equals(codeString)) + return V3ActCode.NOSTRNS; + if ("PARTRNS".equals(codeString)) + return V3ActCode.PARTRNS; + if ("PLACTRNS".equals(codeString)) + return V3ActCode.PLACTRNS; + if ("SEXTRNS".equals(codeString)) + return V3ActCode.SEXTRNS; + if ("TRNSFTRNS".equals(codeString)) + return V3ActCode.TRNSFTRNS; + if ("VECTRNS".equals(codeString)) + return V3ActCode.VECTRNS; + if ("WATTRNS".equals(codeString)) + return V3ActCode.WATTRNS; + if ("_ObservationQualityMeasureAttribute".equals(codeString)) + return V3ActCode._OBSERVATIONQUALITYMEASUREATTRIBUTE; + if ("AGGREGATE".equals(codeString)) + return V3ActCode.AGGREGATE; + if ("COPY".equals(codeString)) + return V3ActCode.COPY; + if ("CRS".equals(codeString)) + return V3ActCode.CRS; + if ("DEF".equals(codeString)) + return V3ActCode.DEF; + if ("DISC".equals(codeString)) + return V3ActCode.DISC; + if ("FINALDT".equals(codeString)) + return V3ActCode.FINALDT; + if ("GUIDE".equals(codeString)) + return V3ActCode.GUIDE; + if ("IDUR".equals(codeString)) + return V3ActCode.IDUR; + if ("ITMCNT".equals(codeString)) + return V3ActCode.ITMCNT; + if ("KEY".equals(codeString)) + return V3ActCode.KEY; + if ("MEDT".equals(codeString)) + return V3ActCode.MEDT; + if ("MSD".equals(codeString)) + return V3ActCode.MSD; + if ("MSRADJ".equals(codeString)) + return V3ActCode.MSRADJ; + if ("MSRAGG".equals(codeString)) + return V3ActCode.MSRAGG; + if ("MSRIMPROV".equals(codeString)) + return V3ActCode.MSRIMPROV; + if ("MSRJUR".equals(codeString)) + return V3ActCode.MSRJUR; + if ("MSRRPTR".equals(codeString)) + return V3ActCode.MSRRPTR; + if ("MSRRPTTIME".equals(codeString)) + return V3ActCode.MSRRPTTIME; + if ("MSRSCORE".equals(codeString)) + return V3ActCode.MSRSCORE; + if ("MSRSET".equals(codeString)) + return V3ActCode.MSRSET; + if ("MSRTOPIC".equals(codeString)) + return V3ActCode.MSRTOPIC; + if ("MSRTP".equals(codeString)) + return V3ActCode.MSRTP; + if ("MSRTYPE".equals(codeString)) + return V3ActCode.MSRTYPE; + if ("RAT".equals(codeString)) + return V3ActCode.RAT; + if ("REF".equals(codeString)) + return V3ActCode.REF; + if ("SDE".equals(codeString)) + return V3ActCode.SDE; + if ("STRAT".equals(codeString)) + return V3ActCode.STRAT; + if ("TRANF".equals(codeString)) + return V3ActCode.TRANF; + if ("USE".equals(codeString)) + return V3ActCode.USE; + if ("_ObservationSequenceType".equals(codeString)) + return V3ActCode._OBSERVATIONSEQUENCETYPE; + if ("TIME_ABSOLUTE".equals(codeString)) + return V3ActCode.TIMEABSOLUTE; + if ("TIME_RELATIVE".equals(codeString)) + return V3ActCode.TIMERELATIVE; + if ("_ObservationSeriesType".equals(codeString)) + return V3ActCode._OBSERVATIONSERIESTYPE; + if ("_ECGObservationSeriesType".equals(codeString)) + return V3ActCode._ECGOBSERVATIONSERIESTYPE; + if ("REPRESENTATIVE_BEAT".equals(codeString)) + return V3ActCode.REPRESENTATIVEBEAT; + if ("RHYTHM".equals(codeString)) + return V3ActCode.RHYTHM; + if ("_PatientImmunizationRelatedObservationType".equals(codeString)) + return V3ActCode._PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE; + if ("CLSSRM".equals(codeString)) + return V3ActCode.CLSSRM; + if ("GRADE".equals(codeString)) + return V3ActCode.GRADE; + if ("SCHL".equals(codeString)) + return V3ActCode.SCHL; + if ("SCHLDIV".equals(codeString)) + return V3ActCode.SCHLDIV; + if ("TEACHER".equals(codeString)) + return V3ActCode.TEACHER; + if ("_PopulationInclusionObservationType".equals(codeString)) + return V3ActCode._POPULATIONINCLUSIONOBSERVATIONTYPE; + if ("DENEX".equals(codeString)) + return V3ActCode.DENEX; + if ("DENEXCEP".equals(codeString)) + return V3ActCode.DENEXCEP; + if ("DENOM".equals(codeString)) + return V3ActCode.DENOM; + if ("IPOP".equals(codeString)) + return V3ActCode.IPOP; + if ("IPPOP".equals(codeString)) + return V3ActCode.IPPOP; + if ("MSRPOPL".equals(codeString)) + return V3ActCode.MSRPOPL; + if ("MSRPOPLEX".equals(codeString)) + return V3ActCode.MSRPOPLEX; + if ("NUMER".equals(codeString)) + return V3ActCode.NUMER; + if ("NUMEX".equals(codeString)) + return V3ActCode.NUMEX; + if ("_PreferenceObservationType".equals(codeString)) + return V3ActCode._PREFERENCEOBSERVATIONTYPE; + if ("PREFSTRENGTH".equals(codeString)) + return V3ActCode.PREFSTRENGTH; + if ("ADVERSE_REACTION".equals(codeString)) + return V3ActCode.ADVERSEREACTION; + if ("ASSERTION".equals(codeString)) + return V3ActCode.ASSERTION; + if ("CASESER".equals(codeString)) + return V3ActCode.CASESER; + if ("CDIO".equals(codeString)) + return V3ActCode.CDIO; + if ("CRIT".equals(codeString)) + return V3ActCode.CRIT; + if ("CTMO".equals(codeString)) + return V3ActCode.CTMO; + if ("DX".equals(codeString)) + return V3ActCode.DX; + if ("ADMDX".equals(codeString)) + return V3ActCode.ADMDX; + if ("DISDX".equals(codeString)) + return V3ActCode.DISDX; + if ("INTDX".equals(codeString)) + return V3ActCode.INTDX; + if ("NOI".equals(codeString)) + return V3ActCode.NOI; + if ("GISTIER".equals(codeString)) + return V3ActCode.GISTIER; + if ("HHOBS".equals(codeString)) + return V3ActCode.HHOBS; + if ("ISSUE".equals(codeString)) + return V3ActCode.ISSUE; + if ("_ActAdministrativeDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEDETECTEDISSUECODE; + if ("_ActAdministrativeAuthorizationDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE; + if ("NAT".equals(codeString)) + return V3ActCode.NAT; + if ("SUPPRESSED".equals(codeString)) + return V3ActCode.SUPPRESSED; + if ("VALIDAT".equals(codeString)) + return V3ActCode.VALIDAT; + if ("KEY204".equals(codeString)) + return V3ActCode.KEY204; + if ("KEY205".equals(codeString)) + return V3ActCode.KEY205; + if ("COMPLY".equals(codeString)) + return V3ActCode.COMPLY; + if ("DUPTHPY".equals(codeString)) + return V3ActCode.DUPTHPY; + if ("DUPTHPCLS".equals(codeString)) + return V3ActCode.DUPTHPCLS; + if ("DUPTHPGEN".equals(codeString)) + return V3ActCode.DUPTHPGEN; + if ("ABUSE".equals(codeString)) + return V3ActCode.ABUSE; + if ("FRAUD".equals(codeString)) + return V3ActCode.FRAUD; + if ("PLYDOC".equals(codeString)) + return V3ActCode.PLYDOC; + if ("PLYPHRM".equals(codeString)) + return V3ActCode.PLYPHRM; + if ("DOSE".equals(codeString)) + return V3ActCode.DOSE; + if ("DOSECOND".equals(codeString)) + return V3ActCode.DOSECOND; + if ("DOSEDUR".equals(codeString)) + return V3ActCode.DOSEDUR; + if ("DOSEDURH".equals(codeString)) + return V3ActCode.DOSEDURH; + if ("DOSEDURHIND".equals(codeString)) + return V3ActCode.DOSEDURHIND; + if ("DOSEDURL".equals(codeString)) + return V3ActCode.DOSEDURL; + if ("DOSEDURLIND".equals(codeString)) + return V3ActCode.DOSEDURLIND; + if ("DOSEH".equals(codeString)) + return V3ActCode.DOSEH; + if ("DOSEHINDA".equals(codeString)) + return V3ActCode.DOSEHINDA; + if ("DOSEHIND".equals(codeString)) + return V3ActCode.DOSEHIND; + if ("DOSEHINDSA".equals(codeString)) + return V3ActCode.DOSEHINDSA; + if ("DOSEHINDW".equals(codeString)) + return V3ActCode.DOSEHINDW; + if ("DOSEIVL".equals(codeString)) + return V3ActCode.DOSEIVL; + if ("DOSEIVLIND".equals(codeString)) + return V3ActCode.DOSEIVLIND; + if ("DOSEL".equals(codeString)) + return V3ActCode.DOSEL; + if ("DOSELINDA".equals(codeString)) + return V3ActCode.DOSELINDA; + if ("DOSELIND".equals(codeString)) + return V3ActCode.DOSELIND; + if ("DOSELINDSA".equals(codeString)) + return V3ActCode.DOSELINDSA; + if ("DOSELINDW".equals(codeString)) + return V3ActCode.DOSELINDW; + if ("MDOSE".equals(codeString)) + return V3ActCode.MDOSE; + if ("OBSA".equals(codeString)) + return V3ActCode.OBSA; + if ("AGE".equals(codeString)) + return V3ActCode.AGE; + if ("ADALRT".equals(codeString)) + return V3ActCode.ADALRT; + if ("GEALRT".equals(codeString)) + return V3ActCode.GEALRT; + if ("PEALRT".equals(codeString)) + return V3ActCode.PEALRT; + if ("COND".equals(codeString)) + return V3ActCode.COND; + if ("HGHT".equals(codeString)) + return V3ActCode.HGHT; + if ("LACT".equals(codeString)) + return V3ActCode.LACT; + if ("PREG".equals(codeString)) + return V3ActCode.PREG; + if ("WGHT".equals(codeString)) + return V3ActCode.WGHT; + if ("CREACT".equals(codeString)) + return V3ActCode.CREACT; + if ("GEN".equals(codeString)) + return V3ActCode.GEN; + if ("GEND".equals(codeString)) + return V3ActCode.GEND; + if ("LAB".equals(codeString)) + return V3ActCode.LAB; + if ("REACT".equals(codeString)) + return V3ActCode.REACT; + if ("ALGY".equals(codeString)) + return V3ActCode.ALGY; + if ("INT".equals(codeString)) + return V3ActCode.INT; + if ("RREACT".equals(codeString)) + return V3ActCode.RREACT; + if ("RALG".equals(codeString)) + return V3ActCode.RALG; + if ("RAR".equals(codeString)) + return V3ActCode.RAR; + if ("RINT".equals(codeString)) + return V3ActCode.RINT; + if ("BUS".equals(codeString)) + return V3ActCode.BUS; + if ("CODE_INVAL".equals(codeString)) + return V3ActCode.CODEINVAL; + if ("CODE_DEPREC".equals(codeString)) + return V3ActCode.CODEDEPREC; + if ("FORMAT".equals(codeString)) + return V3ActCode.FORMAT; + if ("ILLEGAL".equals(codeString)) + return V3ActCode.ILLEGAL; + if ("LEN_RANGE".equals(codeString)) + return V3ActCode.LENRANGE; + if ("LEN_LONG".equals(codeString)) + return V3ActCode.LENLONG; + if ("LEN_SHORT".equals(codeString)) + return V3ActCode.LENSHORT; + if ("MISSCOND".equals(codeString)) + return V3ActCode.MISSCOND; + if ("MISSMAND".equals(codeString)) + return V3ActCode.MISSMAND; + if ("NODUPS".equals(codeString)) + return V3ActCode.NODUPS; + if ("NOPERSIST".equals(codeString)) + return V3ActCode.NOPERSIST; + if ("REP_RANGE".equals(codeString)) + return V3ActCode.REPRANGE; + if ("MAXOCCURS".equals(codeString)) + return V3ActCode.MAXOCCURS; + if ("MINOCCURS".equals(codeString)) + return V3ActCode.MINOCCURS; + if ("_ActAdministrativeRuleDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVERULEDETECTEDISSUECODE; + if ("KEY206".equals(codeString)) + return V3ActCode.KEY206; + if ("OBSOLETE".equals(codeString)) + return V3ActCode.OBSOLETE; + if ("_ActSuppliedItemDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTSUPPLIEDITEMDETECTEDISSUECODE; + if ("_AdministrationDetectedIssueCode".equals(codeString)) + return V3ActCode._ADMINISTRATIONDETECTEDISSUECODE; + if ("_AppropriatenessDetectedIssueCode".equals(codeString)) + return V3ActCode._APPROPRIATENESSDETECTEDISSUECODE; + if ("_InteractionDetectedIssueCode".equals(codeString)) + return V3ActCode._INTERACTIONDETECTEDISSUECODE; + if ("FOOD".equals(codeString)) + return V3ActCode.FOOD; + if ("TPROD".equals(codeString)) + return V3ActCode.TPROD; + if ("DRG".equals(codeString)) + return V3ActCode.DRG; + if ("NHP".equals(codeString)) + return V3ActCode.NHP; + if ("NONRX".equals(codeString)) + return V3ActCode.NONRX; + if ("PREVINEF".equals(codeString)) + return V3ActCode.PREVINEF; + if ("DACT".equals(codeString)) + return V3ActCode.DACT; + if ("TIME".equals(codeString)) + return V3ActCode.TIME; + if ("ALRTENDLATE".equals(codeString)) + return V3ActCode.ALRTENDLATE; + if ("ALRTSTRTLATE".equals(codeString)) + return V3ActCode.ALRTSTRTLATE; + if ("_TimingDetectedIssueCode".equals(codeString)) + return V3ActCode._TIMINGDETECTEDISSUECODE; + if ("ENDLATE".equals(codeString)) + return V3ActCode.ENDLATE; + if ("STRTLATE".equals(codeString)) + return V3ActCode.STRTLATE; + if ("_SupplyDetectedIssueCode".equals(codeString)) + return V3ActCode._SUPPLYDETECTEDISSUECODE; + if ("ALLDONE".equals(codeString)) + return V3ActCode.ALLDONE; + if ("FULFIL".equals(codeString)) + return V3ActCode.FULFIL; + if ("NOTACTN".equals(codeString)) + return V3ActCode.NOTACTN; + if ("NOTEQUIV".equals(codeString)) + return V3ActCode.NOTEQUIV; + if ("NOTEQUIVGEN".equals(codeString)) + return V3ActCode.NOTEQUIVGEN; + if ("NOTEQUIVTHER".equals(codeString)) + return V3ActCode.NOTEQUIVTHER; + if ("TIMING".equals(codeString)) + return V3ActCode.TIMING; + if ("INTERVAL".equals(codeString)) + return V3ActCode.INTERVAL; + if ("MINFREQ".equals(codeString)) + return V3ActCode.MINFREQ; + if ("HELD".equals(codeString)) + return V3ActCode.HELD; + if ("TOOLATE".equals(codeString)) + return V3ActCode.TOOLATE; + if ("TOOSOON".equals(codeString)) + return V3ActCode.TOOSOON; + if ("HISTORIC".equals(codeString)) + return V3ActCode.HISTORIC; + if ("PATPREF".equals(codeString)) + return V3ActCode.PATPREF; + if ("PATPREFALT".equals(codeString)) + return V3ActCode.PATPREFALT; + if ("KSUBJ".equals(codeString)) + return V3ActCode.KSUBJ; + if ("KSUBT".equals(codeString)) + return V3ActCode.KSUBT; + if ("OINT".equals(codeString)) + return V3ActCode.OINT; + if ("ALG".equals(codeString)) + return V3ActCode.ALG; + if ("DALG".equals(codeString)) + return V3ActCode.DALG; + if ("EALG".equals(codeString)) + return V3ActCode.EALG; + if ("FALG".equals(codeString)) + return V3ActCode.FALG; + if ("DINT".equals(codeString)) + return V3ActCode.DINT; + if ("DNAINT".equals(codeString)) + return V3ActCode.DNAINT; + if ("EINT".equals(codeString)) + return V3ActCode.EINT; + if ("ENAINT".equals(codeString)) + return V3ActCode.ENAINT; + if ("FINT".equals(codeString)) + return V3ActCode.FINT; + if ("FNAINT".equals(codeString)) + return V3ActCode.FNAINT; + if ("NAINT".equals(codeString)) + return V3ActCode.NAINT; + if ("SEV".equals(codeString)) + return V3ActCode.SEV; + if ("_FDALabelData".equals(codeString)) + return V3ActCode._FDALABELDATA; + if ("FDACOATING".equals(codeString)) + return V3ActCode.FDACOATING; + if ("FDACOLOR".equals(codeString)) + return V3ActCode.FDACOLOR; + if ("FDAIMPRINTCD".equals(codeString)) + return V3ActCode.FDAIMPRINTCD; + if ("FDALOGO".equals(codeString)) + return V3ActCode.FDALOGO; + if ("FDASCORING".equals(codeString)) + return V3ActCode.FDASCORING; + if ("FDASHAPE".equals(codeString)) + return V3ActCode.FDASHAPE; + if ("FDASIZE".equals(codeString)) + return V3ActCode.FDASIZE; + if ("_ROIOverlayShape".equals(codeString)) + return V3ActCode._ROIOVERLAYSHAPE; + if ("CIRCLE".equals(codeString)) + return V3ActCode.CIRCLE; + if ("ELLIPSE".equals(codeString)) + return V3ActCode.ELLIPSE; + if ("POINT".equals(codeString)) + return V3ActCode.POINT; + if ("POLY".equals(codeString)) + return V3ActCode.POLY; + if ("C".equals(codeString)) + return V3ActCode.C; + if ("DIET".equals(codeString)) + return V3ActCode.DIET; + if ("BR".equals(codeString)) + return V3ActCode.BR; + if ("DM".equals(codeString)) + return V3ActCode.DM; + if ("FAST".equals(codeString)) + return V3ActCode.FAST; + if ("FORMULA".equals(codeString)) + return V3ActCode.FORMULA; + if ("GF".equals(codeString)) + return V3ActCode.GF; + if ("LF".equals(codeString)) + return V3ActCode.LF; + if ("LP".equals(codeString)) + return V3ActCode.LP; + if ("LQ".equals(codeString)) + return V3ActCode.LQ; + if ("LS".equals(codeString)) + return V3ActCode.LS; + if ("N".equals(codeString)) + return V3ActCode.N; + if ("NF".equals(codeString)) + return V3ActCode.NF; + if ("PAF".equals(codeString)) + return V3ActCode.PAF; + if ("PAR".equals(codeString)) + return V3ActCode.PAR; + if ("RD".equals(codeString)) + return V3ActCode.RD; + if ("SCH".equals(codeString)) + return V3ActCode.SCH; + if ("SUPPLEMENT".equals(codeString)) + return V3ActCode.SUPPLEMENT; + if ("T".equals(codeString)) + return V3ActCode.T; + if ("VLI".equals(codeString)) + return V3ActCode.VLI; + if ("DRUGPRG".equals(codeString)) + return V3ActCode.DRUGPRG; + if ("F".equals(codeString)) + return V3ActCode.F; + if ("PRLMN".equals(codeString)) + return V3ActCode.PRLMN; + if ("SECOBS".equals(codeString)) + return V3ActCode.SECOBS; + if ("SECCATOBS".equals(codeString)) + return V3ActCode.SECCATOBS; + if ("SECCLASSOBS".equals(codeString)) + return V3ActCode.SECCLASSOBS; + if ("SECCONOBS".equals(codeString)) + return V3ActCode.SECCONOBS; + if ("SECINTOBS".equals(codeString)) + return V3ActCode.SECINTOBS; + if ("SECALTINTOBS".equals(codeString)) + return V3ActCode.SECALTINTOBS; + if ("SECDATINTOBS".equals(codeString)) + return V3ActCode.SECDATINTOBS; + if ("SECINTCONOBS".equals(codeString)) + return V3ActCode.SECINTCONOBS; + if ("SECINTPRVOBS".equals(codeString)) + return V3ActCode.SECINTPRVOBS; + if ("SECINTPRVABOBS".equals(codeString)) + return V3ActCode.SECINTPRVABOBS; + if ("SECINTPRVRBOBS".equals(codeString)) + return V3ActCode.SECINTPRVRBOBS; + if ("SECINTSTOBS".equals(codeString)) + return V3ActCode.SECINTSTOBS; + if ("SECTRSTOBS".equals(codeString)) + return V3ActCode.SECTRSTOBS; + if ("TRSTACCRDOBS".equals(codeString)) + return V3ActCode.TRSTACCRDOBS; + if ("TRSTAGREOBS".equals(codeString)) + return V3ActCode.TRSTAGREOBS; + if ("TRSTCERTOBS".equals(codeString)) + return V3ActCode.TRSTCERTOBS; + if ("TRSTFWKOBS".equals(codeString)) + return V3ActCode.TRSTFWKOBS; + if ("TRSTLOAOBS".equals(codeString)) + return V3ActCode.TRSTLOAOBS; + if ("TRSTMECOBS".equals(codeString)) + return V3ActCode.TRSTMECOBS; + if ("SUBSIDFFS".equals(codeString)) + return V3ActCode.SUBSIDFFS; + if ("WRKCOMP".equals(codeString)) + return V3ActCode.WRKCOMP; + if ("_ActProcedureCode".equals(codeString)) + return V3ActCode._ACTPROCEDURECODE; + if ("_ActBillableServiceCode".equals(codeString)) + return V3ActCode._ACTBILLABLESERVICECODE; + if ("_HL7DefinedActCodes".equals(codeString)) + return V3ActCode._HL7DEFINEDACTCODES; + if ("COPAY".equals(codeString)) + return V3ActCode.COPAY; + if ("DEDUCT".equals(codeString)) + return V3ActCode.DEDUCT; + if ("DOSEIND".equals(codeString)) + return V3ActCode.DOSEIND; + if ("PRA".equals(codeString)) + return V3ActCode.PRA; + if ("STORE".equals(codeString)) + return V3ActCode.STORE; + throw new IllegalArgumentException("Unknown V3ActCode code '"+codeString+"'"); + } + + public String toCode(V3ActCode code) { + if (code == V3ActCode._ACTACCOUNTCODE) + return "_ActAccountCode"; + if (code == V3ActCode.ACCTRECEIVABLE) + return "ACCTRECEIVABLE"; + if (code == V3ActCode.CASH) + return "CASH"; + if (code == V3ActCode.CC) + return "CC"; + if (code == V3ActCode.AE) + return "AE"; + if (code == V3ActCode.DN) + return "DN"; + if (code == V3ActCode.DV) + return "DV"; + if (code == V3ActCode.MC) + return "MC"; + if (code == V3ActCode.V) + return "V"; + if (code == V3ActCode.PBILLACCT) + return "PBILLACCT"; + if (code == V3ActCode._ACTADJUDICATIONCODE) + return "_ActAdjudicationCode"; + if (code == V3ActCode._ACTADJUDICATIONGROUPCODE) + return "_ActAdjudicationGroupCode"; + if (code == V3ActCode.CONT) + return "CONT"; + if (code == V3ActCode.DAY) + return "DAY"; + if (code == V3ActCode.LOC) + return "LOC"; + if (code == V3ActCode.MONTH) + return "MONTH"; + if (code == V3ActCode.PERIOD) + return "PERIOD"; + if (code == V3ActCode.PROV) + return "PROV"; + if (code == V3ActCode.WEEK) + return "WEEK"; + if (code == V3ActCode.YEAR) + return "YEAR"; + if (code == V3ActCode.AA) + return "AA"; + if (code == V3ActCode.ANF) + return "ANF"; + if (code == V3ActCode.AR) + return "AR"; + if (code == V3ActCode.AS) + return "AS"; + if (code == V3ActCode._ACTADJUDICATIONRESULTACTIONCODE) + return "_ActAdjudicationResultActionCode"; + if (code == V3ActCode.DISPLAY) + return "DISPLAY"; + if (code == V3ActCode.FORM) + return "FORM"; + if (code == V3ActCode._ACTBILLABLEMODIFIERCODE) + return "_ActBillableModifierCode"; + if (code == V3ActCode.CPTM) + return "CPTM"; + if (code == V3ActCode.HCPCSA) + return "HCPCSA"; + if (code == V3ActCode._ACTBILLINGARRANGEMENTCODE) + return "_ActBillingArrangementCode"; + if (code == V3ActCode.BLK) + return "BLK"; + if (code == V3ActCode.CAP) + return "CAP"; + if (code == V3ActCode.CONTF) + return "CONTF"; + if (code == V3ActCode.FINBILL) + return "FINBILL"; + if (code == V3ActCode.ROST) + return "ROST"; + if (code == V3ActCode.SESS) + return "SESS"; + if (code == V3ActCode.FFS) + return "FFS"; + if (code == V3ActCode.FFPS) + return "FFPS"; + if (code == V3ActCode.FFCS) + return "FFCS"; + if (code == V3ActCode.TFS) + return "TFS"; + if (code == V3ActCode._ACTBOUNDEDROICODE) + return "_ActBoundedROICode"; + if (code == V3ActCode.ROIFS) + return "ROIFS"; + if (code == V3ActCode.ROIPS) + return "ROIPS"; + if (code == V3ActCode._ACTCAREPROVISIONCODE) + return "_ActCareProvisionCode"; + if (code == V3ActCode._ACTCREDENTIALEDCARECODE) + return "_ActCredentialedCareCode"; + if (code == V3ActCode._ACTCREDENTIALEDCAREPROVISIONPERSONCODE) + return "_ActCredentialedCareProvisionPersonCode"; + if (code == V3ActCode.CACC) + return "CACC"; + if (code == V3ActCode.CAIC) + return "CAIC"; + if (code == V3ActCode.CAMC) + return "CAMC"; + if (code == V3ActCode.CANC) + return "CANC"; + if (code == V3ActCode.CAPC) + return "CAPC"; + if (code == V3ActCode.CBGC) + return "CBGC"; + if (code == V3ActCode.CCCC) + return "CCCC"; + if (code == V3ActCode.CCGC) + return "CCGC"; + if (code == V3ActCode.CCPC) + return "CCPC"; + if (code == V3ActCode.CCSC) + return "CCSC"; + if (code == V3ActCode.CDEC) + return "CDEC"; + if (code == V3ActCode.CDRC) + return "CDRC"; + if (code == V3ActCode.CEMC) + return "CEMC"; + if (code == V3ActCode.CFPC) + return "CFPC"; + if (code == V3ActCode.CIMC) + return "CIMC"; + if (code == V3ActCode.CMGC) + return "CMGC"; + if (code == V3ActCode.CNEC) + return "CNEC"; + if (code == V3ActCode.CNMC) + return "CNMC"; + if (code == V3ActCode.CNQC) + return "CNQC"; + if (code == V3ActCode.CNSC) + return "CNSC"; + if (code == V3ActCode.COGC) + return "COGC"; + if (code == V3ActCode.COMC) + return "COMC"; + if (code == V3ActCode.COPC) + return "COPC"; + if (code == V3ActCode.COSC) + return "COSC"; + if (code == V3ActCode.COTC) + return "COTC"; + if (code == V3ActCode.CPEC) + return "CPEC"; + if (code == V3ActCode.CPGC) + return "CPGC"; + if (code == V3ActCode.CPHC) + return "CPHC"; + if (code == V3ActCode.CPRC) + return "CPRC"; + if (code == V3ActCode.CPSC) + return "CPSC"; + if (code == V3ActCode.CPYC) + return "CPYC"; + if (code == V3ActCode.CROC) + return "CROC"; + if (code == V3ActCode.CRPC) + return "CRPC"; + if (code == V3ActCode.CSUC) + return "CSUC"; + if (code == V3ActCode.CTSC) + return "CTSC"; + if (code == V3ActCode.CURC) + return "CURC"; + if (code == V3ActCode.CVSC) + return "CVSC"; + if (code == V3ActCode.LGPC) + return "LGPC"; + if (code == V3ActCode._ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE) + return "_ActCredentialedCareProvisionProgramCode"; + if (code == V3ActCode.AALC) + return "AALC"; + if (code == V3ActCode.AAMC) + return "AAMC"; + if (code == V3ActCode.ABHC) + return "ABHC"; + if (code == V3ActCode.ACAC) + return "ACAC"; + if (code == V3ActCode.ACHC) + return "ACHC"; + if (code == V3ActCode.AHOC) + return "AHOC"; + if (code == V3ActCode.ALTC) + return "ALTC"; + if (code == V3ActCode.AOSC) + return "AOSC"; + if (code == V3ActCode.CACS) + return "CACS"; + if (code == V3ActCode.CAMI) + return "CAMI"; + if (code == V3ActCode.CAST) + return "CAST"; + if (code == V3ActCode.CBAR) + return "CBAR"; + if (code == V3ActCode.CCAD) + return "CCAD"; + if (code == V3ActCode.CCAR) + return "CCAR"; + if (code == V3ActCode.CDEP) + return "CDEP"; + if (code == V3ActCode.CDGD) + return "CDGD"; + if (code == V3ActCode.CDIA) + return "CDIA"; + if (code == V3ActCode.CEPI) + return "CEPI"; + if (code == V3ActCode.CFEL) + return "CFEL"; + if (code == V3ActCode.CHFC) + return "CHFC"; + if (code == V3ActCode.CHRO) + return "CHRO"; + if (code == V3ActCode.CHYP) + return "CHYP"; + if (code == V3ActCode.CMIH) + return "CMIH"; + if (code == V3ActCode.CMSC) + return "CMSC"; + if (code == V3ActCode.COJR) + return "COJR"; + if (code == V3ActCode.CONC) + return "CONC"; + if (code == V3ActCode.COPD) + return "COPD"; + if (code == V3ActCode.CORT) + return "CORT"; + if (code == V3ActCode.CPAD) + return "CPAD"; + if (code == V3ActCode.CPND) + return "CPND"; + if (code == V3ActCode.CPST) + return "CPST"; + if (code == V3ActCode.CSDM) + return "CSDM"; + if (code == V3ActCode.CSIC) + return "CSIC"; + if (code == V3ActCode.CSLD) + return "CSLD"; + if (code == V3ActCode.CSPT) + return "CSPT"; + if (code == V3ActCode.CTBU) + return "CTBU"; + if (code == V3ActCode.CVDC) + return "CVDC"; + if (code == V3ActCode.CWMA) + return "CWMA"; + if (code == V3ActCode.CWOH) + return "CWOH"; + if (code == V3ActCode._ACTENCOUNTERCODE) + return "_ActEncounterCode"; + if (code == V3ActCode.AMB) + return "AMB"; + if (code == V3ActCode.EMER) + return "EMER"; + if (code == V3ActCode.FLD) + return "FLD"; + if (code == V3ActCode.HH) + return "HH"; + if (code == V3ActCode.IMP) + return "IMP"; + if (code == V3ActCode.ACUTE) + return "ACUTE"; + if (code == V3ActCode.NONAC) + return "NONAC"; + if (code == V3ActCode.PRENC) + return "PRENC"; + if (code == V3ActCode.SS) + return "SS"; + if (code == V3ActCode.VR) + return "VR"; + if (code == V3ActCode._ACTMEDICALSERVICECODE) + return "_ActMedicalServiceCode"; + if (code == V3ActCode.ALC) + return "ALC"; + if (code == V3ActCode.CARD) + return "CARD"; + if (code == V3ActCode.CHR) + return "CHR"; + if (code == V3ActCode.DNTL) + return "DNTL"; + if (code == V3ActCode.DRGRHB) + return "DRGRHB"; + if (code == V3ActCode.GENRL) + return "GENRL"; + if (code == V3ActCode.MED) + return "MED"; + if (code == V3ActCode.OBS) + return "OBS"; + if (code == V3ActCode.ONC) + return "ONC"; + if (code == V3ActCode.PALL) + return "PALL"; + if (code == V3ActCode.PED) + return "PED"; + if (code == V3ActCode.PHAR) + return "PHAR"; + if (code == V3ActCode.PHYRHB) + return "PHYRHB"; + if (code == V3ActCode.PSYCH) + return "PSYCH"; + if (code == V3ActCode.SURG) + return "SURG"; + if (code == V3ActCode._ACTCLAIMATTACHMENTCATEGORYCODE) + return "_ActClaimAttachmentCategoryCode"; + if (code == V3ActCode.AUTOATTCH) + return "AUTOATTCH"; + if (code == V3ActCode.DOCUMENT) + return "DOCUMENT"; + if (code == V3ActCode.HEALTHREC) + return "HEALTHREC"; + if (code == V3ActCode.IMG) + return "IMG"; + if (code == V3ActCode.LABRESULTS) + return "LABRESULTS"; + if (code == V3ActCode.MODEL) + return "MODEL"; + if (code == V3ActCode.WIATTCH) + return "WIATTCH"; + if (code == V3ActCode.XRAY) + return "XRAY"; + if (code == V3ActCode._ACTCONSENTTYPE) + return "_ActConsentType"; + if (code == V3ActCode.ICOL) + return "ICOL"; + if (code == V3ActCode.IDSCL) + return "IDSCL"; + if (code == V3ActCode.INFA) + return "INFA"; + if (code == V3ActCode.INFAO) + return "INFAO"; + if (code == V3ActCode.INFASO) + return "INFASO"; + if (code == V3ActCode.IRDSCL) + return "IRDSCL"; + if (code == V3ActCode.RESEARCH) + return "RESEARCH"; + if (code == V3ActCode.RSDID) + return "RSDID"; + if (code == V3ActCode.RSREID) + return "RSREID"; + if (code == V3ActCode._ACTCONTAINERREGISTRATIONCODE) + return "_ActContainerRegistrationCode"; + if (code == V3ActCode.ID) + return "ID"; + if (code == V3ActCode.IP) + return "IP"; + if (code == V3ActCode.L) + return "L"; + if (code == V3ActCode.M) + return "M"; + if (code == V3ActCode.O) + return "O"; + if (code == V3ActCode.R) + return "R"; + if (code == V3ActCode.X) + return "X"; + if (code == V3ActCode._ACTCONTROLVARIABLE) + return "_ActControlVariable"; + if (code == V3ActCode.AUTO) + return "AUTO"; + if (code == V3ActCode.ENDC) + return "ENDC"; + if (code == V3ActCode.REFLEX) + return "REFLEX"; + if (code == V3ActCode._ACTCOVERAGECONFIRMATIONCODE) + return "_ActCoverageConfirmationCode"; + if (code == V3ActCode._ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE) + return "_ActCoverageAuthorizationConfirmationCode"; + if (code == V3ActCode.AUTH) + return "AUTH"; + if (code == V3ActCode.NAUTH) + return "NAUTH"; + if (code == V3ActCode._ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE) + return "_ActCoverageEligibilityConfirmationCode"; + if (code == V3ActCode.ELG) + return "ELG"; + if (code == V3ActCode.NELG) + return "NELG"; + if (code == V3ActCode._ACTCOVERAGELIMITCODE) + return "_ActCoverageLimitCode"; + if (code == V3ActCode._ACTCOVERAGEQUANTITYLIMITCODE) + return "_ActCoverageQuantityLimitCode"; + if (code == V3ActCode.COVPRD) + return "COVPRD"; + if (code == V3ActCode.LFEMX) + return "LFEMX"; + if (code == V3ActCode.NETAMT) + return "NETAMT"; + if (code == V3ActCode.PRDMX) + return "PRDMX"; + if (code == V3ActCode.UNITPRICE) + return "UNITPRICE"; + if (code == V3ActCode.UNITQTY) + return "UNITQTY"; + if (code == V3ActCode.COVMX) + return "COVMX"; + if (code == V3ActCode._ACTCOVEREDPARTYLIMITCODE) + return "_ActCoveredPartyLimitCode"; + if (code == V3ActCode._ACTCOVERAGETYPECODE) + return "_ActCoverageTypeCode"; + if (code == V3ActCode._ACTINSURANCEPOLICYCODE) + return "_ActInsurancePolicyCode"; + if (code == V3ActCode.EHCPOL) + return "EHCPOL"; + if (code == V3ActCode.HSAPOL) + return "HSAPOL"; + if (code == V3ActCode.AUTOPOL) + return "AUTOPOL"; + if (code == V3ActCode.COL) + return "COL"; + if (code == V3ActCode.UNINSMOT) + return "UNINSMOT"; + if (code == V3ActCode.PUBLICPOL) + return "PUBLICPOL"; + if (code == V3ActCode.DENTPRG) + return "DENTPRG"; + if (code == V3ActCode.DISEASEPRG) + return "DISEASEPRG"; + if (code == V3ActCode.CANPRG) + return "CANPRG"; + if (code == V3ActCode.ENDRENAL) + return "ENDRENAL"; + if (code == V3ActCode.HIVAIDS) + return "HIVAIDS"; + if (code == V3ActCode.MANDPOL) + return "MANDPOL"; + if (code == V3ActCode.MENTPRG) + return "MENTPRG"; + if (code == V3ActCode.SAFNET) + return "SAFNET"; + if (code == V3ActCode.SUBPRG) + return "SUBPRG"; + if (code == V3ActCode.SUBSIDIZ) + return "SUBSIDIZ"; + if (code == V3ActCode.SUBSIDMC) + return "SUBSIDMC"; + if (code == V3ActCode.SUBSUPP) + return "SUBSUPP"; + if (code == V3ActCode.WCBPOL) + return "WCBPOL"; + if (code == V3ActCode._ACTINSURANCETYPECODE) + return "_ActInsuranceTypeCode"; + if (code == V3ActCode._ACTHEALTHINSURANCETYPECODE) + return "_ActHealthInsuranceTypeCode"; + if (code == V3ActCode.DENTAL) + return "DENTAL"; + if (code == V3ActCode.DISEASE) + return "DISEASE"; + if (code == V3ActCode.DRUGPOL) + return "DRUGPOL"; + if (code == V3ActCode.HIP) + return "HIP"; + if (code == V3ActCode.LTC) + return "LTC"; + if (code == V3ActCode.MCPOL) + return "MCPOL"; + if (code == V3ActCode.POS) + return "POS"; + if (code == V3ActCode.HMO) + return "HMO"; + if (code == V3ActCode.PPO) + return "PPO"; + if (code == V3ActCode.MENTPOL) + return "MENTPOL"; + if (code == V3ActCode.SUBPOL) + return "SUBPOL"; + if (code == V3ActCode.VISPOL) + return "VISPOL"; + if (code == V3ActCode.DIS) + return "DIS"; + if (code == V3ActCode.EWB) + return "EWB"; + if (code == V3ActCode.FLEXP) + return "FLEXP"; + if (code == V3ActCode.LIFE) + return "LIFE"; + if (code == V3ActCode.ANNU) + return "ANNU"; + if (code == V3ActCode.TLIFE) + return "TLIFE"; + if (code == V3ActCode.ULIFE) + return "ULIFE"; + if (code == V3ActCode.PNC) + return "PNC"; + if (code == V3ActCode.REI) + return "REI"; + if (code == V3ActCode.SURPL) + return "SURPL"; + if (code == V3ActCode.UMBRL) + return "UMBRL"; + if (code == V3ActCode._ACTPROGRAMTYPECODE) + return "_ActProgramTypeCode"; + if (code == V3ActCode.CHAR) + return "CHAR"; + if (code == V3ActCode.CRIME) + return "CRIME"; + if (code == V3ActCode.EAP) + return "EAP"; + if (code == V3ActCode.GOVEMP) + return "GOVEMP"; + if (code == V3ActCode.HIRISK) + return "HIRISK"; + if (code == V3ActCode.IND) + return "IND"; + if (code == V3ActCode.MILITARY) + return "MILITARY"; + if (code == V3ActCode.RETIRE) + return "RETIRE"; + if (code == V3ActCode.SOCIAL) + return "SOCIAL"; + if (code == V3ActCode.VET) + return "VET"; + if (code == V3ActCode._ACTDETECTEDISSUEMANAGEMENTCODE) + return "_ActDetectedIssueManagementCode"; + if (code == V3ActCode._ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE) + return "_ActAdministrativeDetectedIssueManagementCode"; + if (code == V3ActCode._AUTHORIZATIONISSUEMANAGEMENTCODE) + return "_AuthorizationIssueManagementCode"; + if (code == V3ActCode.EMAUTH) + return "EMAUTH"; + if (code == V3ActCode._21) + return "21"; + if (code == V3ActCode._1) + return "1"; + if (code == V3ActCode._19) + return "19"; + if (code == V3ActCode._2) + return "2"; + if (code == V3ActCode._22) + return "22"; + if (code == V3ActCode._23) + return "23"; + if (code == V3ActCode._3) + return "3"; + if (code == V3ActCode._4) + return "4"; + if (code == V3ActCode._5) + return "5"; + if (code == V3ActCode._6) + return "6"; + if (code == V3ActCode._7) + return "7"; + if (code == V3ActCode._14) + return "14"; + if (code == V3ActCode._15) + return "15"; + if (code == V3ActCode._16) + return "16"; + if (code == V3ActCode._17) + return "17"; + if (code == V3ActCode._18) + return "18"; + if (code == V3ActCode._20) + return "20"; + if (code == V3ActCode._8) + return "8"; + if (code == V3ActCode._10) + return "10"; + if (code == V3ActCode._11) + return "11"; + if (code == V3ActCode._12) + return "12"; + if (code == V3ActCode._13) + return "13"; + if (code == V3ActCode._9) + return "9"; + if (code == V3ActCode._ACTEXPOSURECODE) + return "_ActExposureCode"; + if (code == V3ActCode.CHLDCARE) + return "CHLDCARE"; + if (code == V3ActCode.CONVEYNC) + return "CONVEYNC"; + if (code == V3ActCode.HLTHCARE) + return "HLTHCARE"; + if (code == V3ActCode.HOMECARE) + return "HOMECARE"; + if (code == V3ActCode.HOSPPTNT) + return "HOSPPTNT"; + if (code == V3ActCode.HOSPVSTR) + return "HOSPVSTR"; + if (code == V3ActCode.HOUSEHLD) + return "HOUSEHLD"; + if (code == V3ActCode.INMATE) + return "INMATE"; + if (code == V3ActCode.INTIMATE) + return "INTIMATE"; + if (code == V3ActCode.LTRMCARE) + return "LTRMCARE"; + if (code == V3ActCode.PLACE) + return "PLACE"; + if (code == V3ActCode.PTNTCARE) + return "PTNTCARE"; + if (code == V3ActCode.SCHOOL2) + return "SCHOOL2"; + if (code == V3ActCode.SOCIAL2) + return "SOCIAL2"; + if (code == V3ActCode.SUBSTNCE) + return "SUBSTNCE"; + if (code == V3ActCode.TRAVINT) + return "TRAVINT"; + if (code == V3ActCode.WORK2) + return "WORK2"; + if (code == V3ActCode._ACTFINANCIALTRANSACTIONCODE) + return "_ActFinancialTransactionCode"; + if (code == V3ActCode.CHRG) + return "CHRG"; + if (code == V3ActCode.REV) + return "REV"; + if (code == V3ActCode._ACTINCIDENTCODE) + return "_ActIncidentCode"; + if (code == V3ActCode.MVA) + return "MVA"; + if (code == V3ActCode.SCHOOL) + return "SCHOOL"; + if (code == V3ActCode.SPT) + return "SPT"; + if (code == V3ActCode.WPA) + return "WPA"; + if (code == V3ActCode._ACTINFORMATIONACCESSCODE) + return "_ActInformationAccessCode"; + if (code == V3ActCode.ACADR) + return "ACADR"; + if (code == V3ActCode.ACALL) + return "ACALL"; + if (code == V3ActCode.ACALLG) + return "ACALLG"; + if (code == V3ActCode.ACCONS) + return "ACCONS"; + if (code == V3ActCode.ACDEMO) + return "ACDEMO"; + if (code == V3ActCode.ACDI) + return "ACDI"; + if (code == V3ActCode.ACIMMUN) + return "ACIMMUN"; + if (code == V3ActCode.ACLAB) + return "ACLAB"; + if (code == V3ActCode.ACMED) + return "ACMED"; + if (code == V3ActCode.ACMEDC) + return "ACMEDC"; + if (code == V3ActCode.ACMEN) + return "ACMEN"; + if (code == V3ActCode.ACOBS) + return "ACOBS"; + if (code == V3ActCode.ACPOLPRG) + return "ACPOLPRG"; + if (code == V3ActCode.ACPROV) + return "ACPROV"; + if (code == V3ActCode.ACPSERV) + return "ACPSERV"; + if (code == V3ActCode.ACSUBSTAB) + return "ACSUBSTAB"; + if (code == V3ActCode._ACTINFORMATIONACCESSCONTEXTCODE) + return "_ActInformationAccessContextCode"; + if (code == V3ActCode.INFAUT) + return "INFAUT"; + if (code == V3ActCode.INFCON) + return "INFCON"; + if (code == V3ActCode.INFCRT) + return "INFCRT"; + if (code == V3ActCode.INFDNG) + return "INFDNG"; + if (code == V3ActCode.INFEMER) + return "INFEMER"; + if (code == V3ActCode.INFPWR) + return "INFPWR"; + if (code == V3ActCode.INFREG) + return "INFREG"; + if (code == V3ActCode._ACTINFORMATIONCATEGORYCODE) + return "_ActInformationCategoryCode"; + if (code == V3ActCode.ALLCAT) + return "ALLCAT"; + if (code == V3ActCode.ALLGCAT) + return "ALLGCAT"; + if (code == V3ActCode.ARCAT) + return "ARCAT"; + if (code == V3ActCode.COBSCAT) + return "COBSCAT"; + if (code == V3ActCode.DEMOCAT) + return "DEMOCAT"; + if (code == V3ActCode.DICAT) + return "DICAT"; + if (code == V3ActCode.IMMUCAT) + return "IMMUCAT"; + if (code == V3ActCode.LABCAT) + return "LABCAT"; + if (code == V3ActCode.MEDCCAT) + return "MEDCCAT"; + if (code == V3ActCode.MENCAT) + return "MENCAT"; + if (code == V3ActCode.PSVCCAT) + return "PSVCCAT"; + if (code == V3ActCode.RXCAT) + return "RXCAT"; + if (code == V3ActCode._ACTINVOICEELEMENTCODE) + return "_ActInvoiceElementCode"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTCODE) + return "_ActInvoiceAdjudicationPaymentCode"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTGROUPCODE) + return "_ActInvoiceAdjudicationPaymentGroupCode"; + if (code == V3ActCode.ALEC) + return "ALEC"; + if (code == V3ActCode.BONUS) + return "BONUS"; + if (code == V3ActCode.CFWD) + return "CFWD"; + if (code == V3ActCode.EDU) + return "EDU"; + if (code == V3ActCode.EPYMT) + return "EPYMT"; + if (code == V3ActCode.GARN) + return "GARN"; + if (code == V3ActCode.INVOICE) + return "INVOICE"; + if (code == V3ActCode.PINV) + return "PINV"; + if (code == V3ActCode.PPRD) + return "PPRD"; + if (code == V3ActCode.PROA) + return "PROA"; + if (code == V3ActCode.RECOV) + return "RECOV"; + if (code == V3ActCode.RETRO) + return "RETRO"; + if (code == V3ActCode.TRAN) + return "TRAN"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE) + return "_ActInvoiceAdjudicationPaymentSummaryCode"; + if (code == V3ActCode.INVTYPE) + return "INVTYPE"; + if (code == V3ActCode.PAYEE) + return "PAYEE"; + if (code == V3ActCode.PAYOR) + return "PAYOR"; + if (code == V3ActCode.SENDAPP) + return "SENDAPP"; + if (code == V3ActCode._ACTINVOICEDETAILCODE) + return "_ActInvoiceDetailCode"; + if (code == V3ActCode._ACTINVOICEDETAILCLINICALPRODUCTCODE) + return "_ActInvoiceDetailClinicalProductCode"; + if (code == V3ActCode.UNSPSC) + return "UNSPSC"; + if (code == V3ActCode._ACTINVOICEDETAILDRUGPRODUCTCODE) + return "_ActInvoiceDetailDrugProductCode"; + if (code == V3ActCode.GTIN) + return "GTIN"; + if (code == V3ActCode.UPC) + return "UPC"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICCODE) + return "_ActInvoiceDetailGenericCode"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICADJUDICATORCODE) + return "_ActInvoiceDetailGenericAdjudicatorCode"; + if (code == V3ActCode.COIN) + return "COIN"; + if (code == V3ActCode.COPAYMENT) + return "COPAYMENT"; + if (code == V3ActCode.DEDUCTIBLE) + return "DEDUCTIBLE"; + if (code == V3ActCode.PAY) + return "PAY"; + if (code == V3ActCode.SPEND) + return "SPEND"; + if (code == V3ActCode.COINS) + return "COINS"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICMODIFIERCODE) + return "_ActInvoiceDetailGenericModifierCode"; + if (code == V3ActCode.AFTHRS) + return "AFTHRS"; + if (code == V3ActCode.ISOL) + return "ISOL"; + if (code == V3ActCode.OOO) + return "OOO"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICPROVIDERCODE) + return "_ActInvoiceDetailGenericProviderCode"; + if (code == V3ActCode.CANCAPT) + return "CANCAPT"; + if (code == V3ActCode.DSC) + return "DSC"; + if (code == V3ActCode.ESA) + return "ESA"; + if (code == V3ActCode.FFSTOP) + return "FFSTOP"; + if (code == V3ActCode.FNLFEE) + return "FNLFEE"; + if (code == V3ActCode.FRSTFEE) + return "FRSTFEE"; + if (code == V3ActCode.MARKUP) + return "MARKUP"; + if (code == V3ActCode.MISSAPT) + return "MISSAPT"; + if (code == V3ActCode.PERFEE) + return "PERFEE"; + if (code == V3ActCode.PERMBNS) + return "PERMBNS"; + if (code == V3ActCode.RESTOCK) + return "RESTOCK"; + if (code == V3ActCode.TRAVEL) + return "TRAVEL"; + if (code == V3ActCode.URGENT) + return "URGENT"; + if (code == V3ActCode._ACTINVOICEDETAILTAXCODE) + return "_ActInvoiceDetailTaxCode"; + if (code == V3ActCode.FST) + return "FST"; + if (code == V3ActCode.HST) + return "HST"; + if (code == V3ActCode.PST) + return "PST"; + if (code == V3ActCode._ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE) + return "_ActInvoiceDetailPreferredAccommodationCode"; + if (code == V3ActCode._ACTENCOUNTERACCOMMODATIONCODE) + return "_ActEncounterAccommodationCode"; + if (code == V3ActCode._HL7ACCOMMODATIONCODE) + return "_HL7AccommodationCode"; + if (code == V3ActCode.I) + return "I"; + if (code == V3ActCode.P) + return "P"; + if (code == V3ActCode.S) + return "S"; + if (code == V3ActCode.SP) + return "SP"; + if (code == V3ActCode.W) + return "W"; + if (code == V3ActCode._ACTINVOICEDETAILCLINICALSERVICECODE) + return "_ActInvoiceDetailClinicalServiceCode"; + if (code == V3ActCode._ACTINVOICEGROUPCODE) + return "_ActInvoiceGroupCode"; + if (code == V3ActCode._ACTINVOICEINTERGROUPCODE) + return "_ActInvoiceInterGroupCode"; + if (code == V3ActCode.CPNDDRGING) + return "CPNDDRGING"; + if (code == V3ActCode.CPNDINDING) + return "CPNDINDING"; + if (code == V3ActCode.CPNDSUPING) + return "CPNDSUPING"; + if (code == V3ActCode.DRUGING) + return "DRUGING"; + if (code == V3ActCode.FRAMEING) + return "FRAMEING"; + if (code == V3ActCode.LENSING) + return "LENSING"; + if (code == V3ActCode.PRDING) + return "PRDING"; + if (code == V3ActCode._ACTINVOICEROOTGROUPCODE) + return "_ActInvoiceRootGroupCode"; + if (code == V3ActCode.CPINV) + return "CPINV"; + if (code == V3ActCode.CSINV) + return "CSINV"; + if (code == V3ActCode.CSPINV) + return "CSPINV"; + if (code == V3ActCode.FININV) + return "FININV"; + if (code == V3ActCode.OHSINV) + return "OHSINV"; + if (code == V3ActCode.PAINV) + return "PAINV"; + if (code == V3ActCode.RXCINV) + return "RXCINV"; + if (code == V3ActCode.RXDINV) + return "RXDINV"; + if (code == V3ActCode.SBFINV) + return "SBFINV"; + if (code == V3ActCode.VRXINV) + return "VRXINV"; + if (code == V3ActCode._ACTINVOICEELEMENTSUMMARYCODE) + return "_ActInvoiceElementSummaryCode"; + if (code == V3ActCode._INVOICEELEMENTADJUDICATED) + return "_InvoiceElementAdjudicated"; + if (code == V3ActCode.ADNFPPELAT) + return "ADNFPPELAT"; + if (code == V3ActCode.ADNFPPELCT) + return "ADNFPPELCT"; + if (code == V3ActCode.ADNFPPMNAT) + return "ADNFPPMNAT"; + if (code == V3ActCode.ADNFPPMNCT) + return "ADNFPPMNCT"; + if (code == V3ActCode.ADNFSPELAT) + return "ADNFSPELAT"; + if (code == V3ActCode.ADNFSPELCT) + return "ADNFSPELCT"; + if (code == V3ActCode.ADNFSPMNAT) + return "ADNFSPMNAT"; + if (code == V3ActCode.ADNFSPMNCT) + return "ADNFSPMNCT"; + if (code == V3ActCode.ADNPPPELAT) + return "ADNPPPELAT"; + if (code == V3ActCode.ADNPPPELCT) + return "ADNPPPELCT"; + if (code == V3ActCode.ADNPPPMNAT) + return "ADNPPPMNAT"; + if (code == V3ActCode.ADNPPPMNCT) + return "ADNPPPMNCT"; + if (code == V3ActCode.ADNPSPELAT) + return "ADNPSPELAT"; + if (code == V3ActCode.ADNPSPELCT) + return "ADNPSPELCT"; + if (code == V3ActCode.ADNPSPMNAT) + return "ADNPSPMNAT"; + if (code == V3ActCode.ADNPSPMNCT) + return "ADNPSPMNCT"; + if (code == V3ActCode.ADPPPPELAT) + return "ADPPPPELAT"; + if (code == V3ActCode.ADPPPPELCT) + return "ADPPPPELCT"; + if (code == V3ActCode.ADPPPPMNAT) + return "ADPPPPMNAT"; + if (code == V3ActCode.ADPPPPMNCT) + return "ADPPPPMNCT"; + if (code == V3ActCode.ADPPSPELAT) + return "ADPPSPELAT"; + if (code == V3ActCode.ADPPSPELCT) + return "ADPPSPELCT"; + if (code == V3ActCode.ADPPSPMNAT) + return "ADPPSPMNAT"; + if (code == V3ActCode.ADPPSPMNCT) + return "ADPPSPMNCT"; + if (code == V3ActCode.ADRFPPELAT) + return "ADRFPPELAT"; + if (code == V3ActCode.ADRFPPELCT) + return "ADRFPPELCT"; + if (code == V3ActCode.ADRFPPMNAT) + return "ADRFPPMNAT"; + if (code == V3ActCode.ADRFPPMNCT) + return "ADRFPPMNCT"; + if (code == V3ActCode.ADRFSPELAT) + return "ADRFSPELAT"; + if (code == V3ActCode.ADRFSPELCT) + return "ADRFSPELCT"; + if (code == V3ActCode.ADRFSPMNAT) + return "ADRFSPMNAT"; + if (code == V3ActCode.ADRFSPMNCT) + return "ADRFSPMNCT"; + if (code == V3ActCode._INVOICEELEMENTPAID) + return "_InvoiceElementPaid"; + if (code == V3ActCode.PDNFPPELAT) + return "PDNFPPELAT"; + if (code == V3ActCode.PDNFPPELCT) + return "PDNFPPELCT"; + if (code == V3ActCode.PDNFPPMNAT) + return "PDNFPPMNAT"; + if (code == V3ActCode.PDNFPPMNCT) + return "PDNFPPMNCT"; + if (code == V3ActCode.PDNFSPELAT) + return "PDNFSPELAT"; + if (code == V3ActCode.PDNFSPELCT) + return "PDNFSPELCT"; + if (code == V3ActCode.PDNFSPMNAT) + return "PDNFSPMNAT"; + if (code == V3ActCode.PDNFSPMNCT) + return "PDNFSPMNCT"; + if (code == V3ActCode.PDNPPPELAT) + return "PDNPPPELAT"; + if (code == V3ActCode.PDNPPPELCT) + return "PDNPPPELCT"; + if (code == V3ActCode.PDNPPPMNAT) + return "PDNPPPMNAT"; + if (code == V3ActCode.PDNPPPMNCT) + return "PDNPPPMNCT"; + if (code == V3ActCode.PDNPSPELAT) + return "PDNPSPELAT"; + if (code == V3ActCode.PDNPSPELCT) + return "PDNPSPELCT"; + if (code == V3ActCode.PDNPSPMNAT) + return "PDNPSPMNAT"; + if (code == V3ActCode.PDNPSPMNCT) + return "PDNPSPMNCT"; + if (code == V3ActCode.PDPPPPELAT) + return "PDPPPPELAT"; + if (code == V3ActCode.PDPPPPELCT) + return "PDPPPPELCT"; + if (code == V3ActCode.PDPPPPMNAT) + return "PDPPPPMNAT"; + if (code == V3ActCode.PDPPPPMNCT) + return "PDPPPPMNCT"; + if (code == V3ActCode.PDPPSPELAT) + return "PDPPSPELAT"; + if (code == V3ActCode.PDPPSPELCT) + return "PDPPSPELCT"; + if (code == V3ActCode.PDPPSPMNAT) + return "PDPPSPMNAT"; + if (code == V3ActCode.PDPPSPMNCT) + return "PDPPSPMNCT"; + if (code == V3ActCode._INVOICEELEMENTSUBMITTED) + return "_InvoiceElementSubmitted"; + if (code == V3ActCode.SBBLELAT) + return "SBBLELAT"; + if (code == V3ActCode.SBBLELCT) + return "SBBLELCT"; + if (code == V3ActCode.SBNFELAT) + return "SBNFELAT"; + if (code == V3ActCode.SBNFELCT) + return "SBNFELCT"; + if (code == V3ActCode.SBPDELAT) + return "SBPDELAT"; + if (code == V3ActCode.SBPDELCT) + return "SBPDELCT"; + if (code == V3ActCode._ACTINVOICEOVERRIDECODE) + return "_ActInvoiceOverrideCode"; + if (code == V3ActCode.COVGE) + return "COVGE"; + if (code == V3ActCode.EFORM) + return "EFORM"; + if (code == V3ActCode.FAX) + return "FAX"; + if (code == V3ActCode.GFTH) + return "GFTH"; + if (code == V3ActCode.LATE) + return "LATE"; + if (code == V3ActCode.MANUAL) + return "MANUAL"; + if (code == V3ActCode.OOJ) + return "OOJ"; + if (code == V3ActCode.ORTHO) + return "ORTHO"; + if (code == V3ActCode.PAPER) + return "PAPER"; + if (code == V3ActCode.PIE) + return "PIE"; + if (code == V3ActCode.PYRDELAY) + return "PYRDELAY"; + if (code == V3ActCode.REFNR) + return "REFNR"; + if (code == V3ActCode.REPSERV) + return "REPSERV"; + if (code == V3ActCode.UNRELAT) + return "UNRELAT"; + if (code == V3ActCode.VERBAUTH) + return "VERBAUTH"; + if (code == V3ActCode._ACTLISTCODE) + return "_ActListCode"; + if (code == V3ActCode._ACTOBSERVATIONLIST) + return "_ActObservationList"; + if (code == V3ActCode.CARELIST) + return "CARELIST"; + if (code == V3ActCode.CONDLIST) + return "CONDLIST"; + if (code == V3ActCode.INTOLIST) + return "INTOLIST"; + if (code == V3ActCode.PROBLIST) + return "PROBLIST"; + if (code == V3ActCode.RISKLIST) + return "RISKLIST"; + if (code == V3ActCode.GOALLIST) + return "GOALLIST"; + if (code == V3ActCode._ACTTHERAPYDURATIONWORKINGLISTCODE) + return "_ActTherapyDurationWorkingListCode"; + if (code == V3ActCode._ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE) + return "_ActMedicationTherapyDurationWorkingListCode"; + if (code == V3ActCode.ACU) + return "ACU"; + if (code == V3ActCode.CHRON) + return "CHRON"; + if (code == V3ActCode.ONET) + return "ONET"; + if (code == V3ActCode.PRN) + return "PRN"; + if (code == V3ActCode.MEDLIST) + return "MEDLIST"; + if (code == V3ActCode.CURMEDLIST) + return "CURMEDLIST"; + if (code == V3ActCode.DISCMEDLIST) + return "DISCMEDLIST"; + if (code == V3ActCode.HISTMEDLIST) + return "HISTMEDLIST"; + if (code == V3ActCode._ACTMONITORINGPROTOCOLCODE) + return "_ActMonitoringProtocolCode"; + if (code == V3ActCode.CTLSUB) + return "CTLSUB"; + if (code == V3ActCode.INV) + return "INV"; + if (code == V3ActCode.LU) + return "LU"; + if (code == V3ActCode.OTC) + return "OTC"; + if (code == V3ActCode.RX) + return "RX"; + if (code == V3ActCode.SA) + return "SA"; + if (code == V3ActCode.SAC) + return "SAC"; + if (code == V3ActCode._ACTNONOBSERVATIONINDICATIONCODE) + return "_ActNonObservationIndicationCode"; + if (code == V3ActCode.IND01) + return "IND01"; + if (code == V3ActCode.IND02) + return "IND02"; + if (code == V3ActCode.IND03) + return "IND03"; + if (code == V3ActCode.IND04) + return "IND04"; + if (code == V3ActCode.IND05) + return "IND05"; + if (code == V3ActCode._ACTOBSERVATIONVERIFICATIONTYPE) + return "_ActObservationVerificationType"; + if (code == V3ActCode.VFPAPER) + return "VFPAPER"; + if (code == V3ActCode._ACTPAYMENTCODE) + return "_ActPaymentCode"; + if (code == V3ActCode.ACH) + return "ACH"; + if (code == V3ActCode.CHK) + return "CHK"; + if (code == V3ActCode.DDP) + return "DDP"; + if (code == V3ActCode.NON) + return "NON"; + if (code == V3ActCode._ACTPHARMACYSUPPLYTYPE) + return "_ActPharmacySupplyType"; + if (code == V3ActCode.DF) + return "DF"; + if (code == V3ActCode.EM) + return "EM"; + if (code == V3ActCode.SO) + return "SO"; + if (code == V3ActCode.FF) + return "FF"; + if (code == V3ActCode.FFC) + return "FFC"; + if (code == V3ActCode.FFP) + return "FFP"; + if (code == V3ActCode.FFSS) + return "FFSS"; + if (code == V3ActCode.TF) + return "TF"; + if (code == V3ActCode.FS) + return "FS"; + if (code == V3ActCode.MS) + return "MS"; + if (code == V3ActCode.RF) + return "RF"; + if (code == V3ActCode.UD) + return "UD"; + if (code == V3ActCode.RFC) + return "RFC"; + if (code == V3ActCode.RFCS) + return "RFCS"; + if (code == V3ActCode.RFF) + return "RFF"; + if (code == V3ActCode.RFFS) + return "RFFS"; + if (code == V3ActCode.RFP) + return "RFP"; + if (code == V3ActCode.RFPS) + return "RFPS"; + if (code == V3ActCode.RFS) + return "RFS"; + if (code == V3ActCode.TB) + return "TB"; + if (code == V3ActCode.TBS) + return "TBS"; + if (code == V3ActCode.UDE) + return "UDE"; + if (code == V3ActCode._ACTPOLICYTYPE) + return "_ActPolicyType"; + if (code == V3ActCode._ACTPRIVACYPOLICY) + return "_ActPrivacyPolicy"; + if (code == V3ActCode._ACTCONSENTDIRECTIVE) + return "_ActConsentDirective"; + if (code == V3ActCode.EMRGONLY) + return "EMRGONLY"; + if (code == V3ActCode.NOPP) + return "NOPP"; + if (code == V3ActCode.OPTIN) + return "OPTIN"; + if (code == V3ActCode.OPTOUT) + return "OPTOUT"; + if (code == V3ActCode._INFORMATIONSENSITIVITYPOLICY) + return "_InformationSensitivityPolicy"; + if (code == V3ActCode._ACTINFORMATIONSENSITIVITYPOLICY) + return "_ActInformationSensitivityPolicy"; + if (code == V3ActCode.ETH) + return "ETH"; + if (code == V3ActCode.GDIS) + return "GDIS"; + if (code == V3ActCode.HIV) + return "HIV"; + if (code == V3ActCode.PSY) + return "PSY"; + if (code == V3ActCode.SCA) + return "SCA"; + if (code == V3ActCode.SDV) + return "SDV"; + if (code == V3ActCode.SEX) + return "SEX"; + if (code == V3ActCode.STD) + return "STD"; + if (code == V3ActCode.TBOO) + return "TBOO"; + if (code == V3ActCode.SICKLE) + return "SICKLE"; + if (code == V3ActCode._ENTITYSENSITIVITYPOLICYTYPE) + return "_EntitySensitivityPolicyType"; + if (code == V3ActCode.DEMO) + return "DEMO"; + if (code == V3ActCode.DOB) + return "DOB"; + if (code == V3ActCode.GENDER) + return "GENDER"; + if (code == V3ActCode.LIVARG) + return "LIVARG"; + if (code == V3ActCode.MARST) + return "MARST"; + if (code == V3ActCode.RACE) + return "RACE"; + if (code == V3ActCode.REL) + return "REL"; + if (code == V3ActCode._ROLEINFORMATIONSENSITIVITYPOLICY) + return "_RoleInformationSensitivityPolicy"; + if (code == V3ActCode.B) + return "B"; + if (code == V3ActCode.EMPL) + return "EMPL"; + if (code == V3ActCode.LOCIS) + return "LOCIS"; + if (code == V3ActCode.SSP) + return "SSP"; + if (code == V3ActCode.ADOL) + return "ADOL"; + if (code == V3ActCode.CEL) + return "CEL"; + if (code == V3ActCode.DIA) + return "DIA"; + if (code == V3ActCode.DRGIS) + return "DRGIS"; + if (code == V3ActCode.EMP) + return "EMP"; + if (code == V3ActCode.PDS) + return "PDS"; + if (code == V3ActCode.PRS) + return "PRS"; + if (code == V3ActCode.COMPT) + return "COMPT"; + if (code == V3ActCode.HRCOMPT) + return "HRCOMPT"; + if (code == V3ActCode.RESCOMPT) + return "RESCOMPT"; + if (code == V3ActCode.RMGTCOMPT) + return "RMGTCOMPT"; + if (code == V3ActCode.ACTTRUSTPOLICYTYPE) + return "ActTrustPolicyType"; + if (code == V3ActCode.TRSTACCRD) + return "TRSTACCRD"; + if (code == V3ActCode.TRSTAGRE) + return "TRSTAGRE"; + if (code == V3ActCode.TRSTASSUR) + return "TRSTASSUR"; + if (code == V3ActCode.TRSTCERT) + return "TRSTCERT"; + if (code == V3ActCode.TRSTFWK) + return "TRSTFWK"; + if (code == V3ActCode.TRSTMEC) + return "TRSTMEC"; + if (code == V3ActCode.COVPOL) + return "COVPOL"; + if (code == V3ActCode.SECURITYPOLICY) + return "SecurityPolicy"; + if (code == V3ActCode.OBLIGATIONPOLICY) + return "ObligationPolicy"; + if (code == V3ActCode.ANONY) + return "ANONY"; + if (code == V3ActCode.AOD) + return "AOD"; + if (code == V3ActCode.AUDIT) + return "AUDIT"; + if (code == V3ActCode.AUDTR) + return "AUDTR"; + if (code == V3ActCode.CPLYCC) + return "CPLYCC"; + if (code == V3ActCode.CPLYCD) + return "CPLYCD"; + if (code == V3ActCode.CPLYJPP) + return "CPLYJPP"; + if (code == V3ActCode.CPLYOPP) + return "CPLYOPP"; + if (code == V3ActCode.CPLYOSP) + return "CPLYOSP"; + if (code == V3ActCode.CPLYPOL) + return "CPLYPOL"; + if (code == V3ActCode.DEID) + return "DEID"; + if (code == V3ActCode.DELAU) + return "DELAU"; + if (code == V3ActCode.ENCRYPT) + return "ENCRYPT"; + if (code == V3ActCode.ENCRYPTR) + return "ENCRYPTR"; + if (code == V3ActCode.ENCRYPTT) + return "ENCRYPTT"; + if (code == V3ActCode.ENCRYPTU) + return "ENCRYPTU"; + if (code == V3ActCode.HUAPRV) + return "HUAPRV"; + if (code == V3ActCode.MASK) + return "MASK"; + if (code == V3ActCode.MINEC) + return "MINEC"; + if (code == V3ActCode.PRIVMARK) + return "PRIVMARK"; + if (code == V3ActCode.PSEUD) + return "PSEUD"; + if (code == V3ActCode.REDACT) + return "REDACT"; + if (code == V3ActCode.REFRAINPOLICY) + return "RefrainPolicy"; + if (code == V3ActCode.NOAUTH) + return "NOAUTH"; + if (code == V3ActCode.NOCOLLECT) + return "NOCOLLECT"; + if (code == V3ActCode.NODSCLCD) + return "NODSCLCD"; + if (code == V3ActCode.NODSCLCDS) + return "NODSCLCDS"; + if (code == V3ActCode.NOINTEGRATE) + return "NOINTEGRATE"; + if (code == V3ActCode.NOLIST) + return "NOLIST"; + if (code == V3ActCode.NOMOU) + return "NOMOU"; + if (code == V3ActCode.NOORGPOL) + return "NOORGPOL"; + if (code == V3ActCode.NOPAT) + return "NOPAT"; + if (code == V3ActCode.NOPERSISTP) + return "NOPERSISTP"; + if (code == V3ActCode.NORDSCLCD) + return "NORDSCLCD"; + if (code == V3ActCode.NORDSCLCDS) + return "NORDSCLCDS"; + if (code == V3ActCode.NORDSCLW) + return "NORDSCLW"; + if (code == V3ActCode.NORELINK) + return "NORELINK"; + if (code == V3ActCode.NOREUSE) + return "NOREUSE"; + if (code == V3ActCode.NOVIP) + return "NOVIP"; + if (code == V3ActCode.ORCON) + return "ORCON"; + if (code == V3ActCode._ACTPRODUCTACQUISITIONCODE) + return "_ActProductAcquisitionCode"; + if (code == V3ActCode.LOAN) + return "LOAN"; + if (code == V3ActCode.RENT) + return "RENT"; + if (code == V3ActCode.TRANSFER) + return "TRANSFER"; + if (code == V3ActCode.SALE) + return "SALE"; + if (code == V3ActCode._ACTSPECIMENTRANSPORTCODE) + return "_ActSpecimenTransportCode"; + if (code == V3ActCode.SREC) + return "SREC"; + if (code == V3ActCode.SSTOR) + return "SSTOR"; + if (code == V3ActCode.STRAN) + return "STRAN"; + if (code == V3ActCode._ACTSPECIMENTREATMENTCODE) + return "_ActSpecimenTreatmentCode"; + if (code == V3ActCode.ACID) + return "ACID"; + if (code == V3ActCode.ALK) + return "ALK"; + if (code == V3ActCode.DEFB) + return "DEFB"; + if (code == V3ActCode.FILT) + return "FILT"; + if (code == V3ActCode.LDLP) + return "LDLP"; + if (code == V3ActCode.NEUT) + return "NEUT"; + if (code == V3ActCode.RECA) + return "RECA"; + if (code == V3ActCode.UFIL) + return "UFIL"; + if (code == V3ActCode._ACTSUBSTANCEADMINISTRATIONCODE) + return "_ActSubstanceAdministrationCode"; + if (code == V3ActCode.DRUG) + return "DRUG"; + if (code == V3ActCode.FD) + return "FD"; + if (code == V3ActCode.IMMUNIZ) + return "IMMUNIZ"; + if (code == V3ActCode.BOOSTER) + return "BOOSTER"; + if (code == V3ActCode.INITIMMUNIZ) + return "INITIMMUNIZ"; + if (code == V3ActCode._ACTTASKCODE) + return "_ActTaskCode"; + if (code == V3ActCode.OE) + return "OE"; + if (code == V3ActCode.LABOE) + return "LABOE"; + if (code == V3ActCode.MEDOE) + return "MEDOE"; + if (code == V3ActCode.PATDOC) + return "PATDOC"; + if (code == V3ActCode.ALLERLREV) + return "ALLERLREV"; + if (code == V3ActCode.CLINNOTEE) + return "CLINNOTEE"; + if (code == V3ActCode.DIAGLISTE) + return "DIAGLISTE"; + if (code == V3ActCode.DISCHINSTE) + return "DISCHINSTE"; + if (code == V3ActCode.DISCHSUME) + return "DISCHSUME"; + if (code == V3ActCode.PATEDUE) + return "PATEDUE"; + if (code == V3ActCode.PATREPE) + return "PATREPE"; + if (code == V3ActCode.PROBLISTE) + return "PROBLISTE"; + if (code == V3ActCode.RADREPE) + return "RADREPE"; + if (code == V3ActCode.IMMLREV) + return "IMMLREV"; + if (code == V3ActCode.REMLREV) + return "REMLREV"; + if (code == V3ActCode.WELLREMLREV) + return "WELLREMLREV"; + if (code == V3ActCode.PATINFO) + return "PATINFO"; + if (code == V3ActCode.ALLERLE) + return "ALLERLE"; + if (code == V3ActCode.CDSREV) + return "CDSREV"; + if (code == V3ActCode.CLINNOTEREV) + return "CLINNOTEREV"; + if (code == V3ActCode.DISCHSUMREV) + return "DISCHSUMREV"; + if (code == V3ActCode.DIAGLISTREV) + return "DIAGLISTREV"; + if (code == V3ActCode.IMMLE) + return "IMMLE"; + if (code == V3ActCode.LABRREV) + return "LABRREV"; + if (code == V3ActCode.MICRORREV) + return "MICRORREV"; + if (code == V3ActCode.MICROORGRREV) + return "MICROORGRREV"; + if (code == V3ActCode.MICROSENSRREV) + return "MICROSENSRREV"; + if (code == V3ActCode.MLREV) + return "MLREV"; + if (code == V3ActCode.MARWLREV) + return "MARWLREV"; + if (code == V3ActCode.OREV) + return "OREV"; + if (code == V3ActCode.PATREPREV) + return "PATREPREV"; + if (code == V3ActCode.PROBLISTREV) + return "PROBLISTREV"; + if (code == V3ActCode.RADREPREV) + return "RADREPREV"; + if (code == V3ActCode.REMLE) + return "REMLE"; + if (code == V3ActCode.WELLREMLE) + return "WELLREMLE"; + if (code == V3ActCode.RISKASSESS) + return "RISKASSESS"; + if (code == V3ActCode.FALLRISK) + return "FALLRISK"; + if (code == V3ActCode._ACTTRANSPORTATIONMODECODE) + return "_ActTransportationModeCode"; + if (code == V3ActCode._ACTPATIENTTRANSPORTATIONMODECODE) + return "_ActPatientTransportationModeCode"; + if (code == V3ActCode.AFOOT) + return "AFOOT"; + if (code == V3ActCode.AMBT) + return "AMBT"; + if (code == V3ActCode.AMBAIR) + return "AMBAIR"; + if (code == V3ActCode.AMBGRND) + return "AMBGRND"; + if (code == V3ActCode.AMBHELO) + return "AMBHELO"; + if (code == V3ActCode.LAWENF) + return "LAWENF"; + if (code == V3ActCode.PRVTRN) + return "PRVTRN"; + if (code == V3ActCode.PUBTRN) + return "PUBTRN"; + if (code == V3ActCode._OBSERVATIONTYPE) + return "_ObservationType"; + if (code == V3ActCode._ACTSPECOBSCODE) + return "_ActSpecObsCode"; + if (code == V3ActCode.ARTBLD) + return "ARTBLD"; + if (code == V3ActCode.DILUTION) + return "DILUTION"; + if (code == V3ActCode.AUTOHIGH) + return "AUTO-HIGH"; + if (code == V3ActCode.AUTOLOW) + return "AUTO-LOW"; + if (code == V3ActCode.PRE) + return "PRE"; + if (code == V3ActCode.RERUN) + return "RERUN"; + if (code == V3ActCode.EVNFCTS) + return "EVNFCTS"; + if (code == V3ActCode.INTFR) + return "INTFR"; + if (code == V3ActCode.FIBRIN) + return "FIBRIN"; + if (code == V3ActCode.HEMOLYSIS) + return "HEMOLYSIS"; + if (code == V3ActCode.ICTERUS) + return "ICTERUS"; + if (code == V3ActCode.LIPEMIA) + return "LIPEMIA"; + if (code == V3ActCode.VOLUME) + return "VOLUME"; + if (code == V3ActCode.AVAILABLE) + return "AVAILABLE"; + if (code == V3ActCode.CONSUMPTION) + return "CONSUMPTION"; + if (code == V3ActCode.CURRENT) + return "CURRENT"; + if (code == V3ActCode.INITIAL) + return "INITIAL"; + if (code == V3ActCode._ANNOTATIONTYPE) + return "_AnnotationType"; + if (code == V3ActCode._ACTPATIENTANNOTATIONTYPE) + return "_ActPatientAnnotationType"; + if (code == V3ActCode.ANNDI) + return "ANNDI"; + if (code == V3ActCode.ANNGEN) + return "ANNGEN"; + if (code == V3ActCode.ANNIMM) + return "ANNIMM"; + if (code == V3ActCode.ANNLAB) + return "ANNLAB"; + if (code == V3ActCode.ANNMED) + return "ANNMED"; + if (code == V3ActCode._GENETICOBSERVATIONTYPE) + return "_GeneticObservationType"; + if (code == V3ActCode.GENE) + return "GENE"; + if (code == V3ActCode._IMMUNIZATIONOBSERVATIONTYPE) + return "_ImmunizationObservationType"; + if (code == V3ActCode.OBSANTC) + return "OBSANTC"; + if (code == V3ActCode.OBSANTV) + return "OBSANTV"; + if (code == V3ActCode._INDIVIDUALCASESAFETYREPORTTYPE) + return "_IndividualCaseSafetyReportType"; + if (code == V3ActCode.PATADVEVNT) + return "PAT_ADV_EVNT"; + if (code == V3ActCode.VACPROBLEM) + return "VAC_PROBLEM"; + if (code == V3ActCode._LOINCOBSERVATIONACTCONTEXTAGETYPE) + return "_LOINCObservationActContextAgeType"; + if (code == V3ActCode._216119) + return "21611-9"; + if (code == V3ActCode._216127) + return "21612-7"; + if (code == V3ActCode._295535) + return "29553-5"; + if (code == V3ActCode._305250) + return "30525-0"; + if (code == V3ActCode._309724) + return "30972-4"; + if (code == V3ActCode._MEDICATIONOBSERVATIONTYPE) + return "_MedicationObservationType"; + if (code == V3ActCode.REPHALFLIFE) + return "REP_HALF_LIFE"; + if (code == V3ActCode.SPLCOATING) + return "SPLCOATING"; + if (code == V3ActCode.SPLCOLOR) + return "SPLCOLOR"; + if (code == V3ActCode.SPLIMAGE) + return "SPLIMAGE"; + if (code == V3ActCode.SPLIMPRINT) + return "SPLIMPRINT"; + if (code == V3ActCode.SPLSCORING) + return "SPLSCORING"; + if (code == V3ActCode.SPLSHAPE) + return "SPLSHAPE"; + if (code == V3ActCode.SPLSIZE) + return "SPLSIZE"; + if (code == V3ActCode.SPLSYMBOL) + return "SPLSYMBOL"; + if (code == V3ActCode._OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE) + return "_ObservationIssueTriggerCodedObservationType"; + if (code == V3ActCode._CASETRANSMISSIONMODE) + return "_CaseTransmissionMode"; + if (code == V3ActCode.AIRTRNS) + return "AIRTRNS"; + if (code == V3ActCode.ANANTRNS) + return "ANANTRNS"; + if (code == V3ActCode.ANHUMTRNS) + return "ANHUMTRNS"; + if (code == V3ActCode.BDYFLDTRNS) + return "BDYFLDTRNS"; + if (code == V3ActCode.BLDTRNS) + return "BLDTRNS"; + if (code == V3ActCode.DERMTRNS) + return "DERMTRNS"; + if (code == V3ActCode.ENVTRNS) + return "ENVTRNS"; + if (code == V3ActCode.FECTRNS) + return "FECTRNS"; + if (code == V3ActCode.FOMTRNS) + return "FOMTRNS"; + if (code == V3ActCode.FOODTRNS) + return "FOODTRNS"; + if (code == V3ActCode.HUMHUMTRNS) + return "HUMHUMTRNS"; + if (code == V3ActCode.INDTRNS) + return "INDTRNS"; + if (code == V3ActCode.LACTTRNS) + return "LACTTRNS"; + if (code == V3ActCode.NOSTRNS) + return "NOSTRNS"; + if (code == V3ActCode.PARTRNS) + return "PARTRNS"; + if (code == V3ActCode.PLACTRNS) + return "PLACTRNS"; + if (code == V3ActCode.SEXTRNS) + return "SEXTRNS"; + if (code == V3ActCode.TRNSFTRNS) + return "TRNSFTRNS"; + if (code == V3ActCode.VECTRNS) + return "VECTRNS"; + if (code == V3ActCode.WATTRNS) + return "WATTRNS"; + if (code == V3ActCode._OBSERVATIONQUALITYMEASUREATTRIBUTE) + return "_ObservationQualityMeasureAttribute"; + if (code == V3ActCode.AGGREGATE) + return "AGGREGATE"; + if (code == V3ActCode.COPY) + return "COPY"; + if (code == V3ActCode.CRS) + return "CRS"; + if (code == V3ActCode.DEF) + return "DEF"; + if (code == V3ActCode.DISC) + return "DISC"; + if (code == V3ActCode.FINALDT) + return "FINALDT"; + if (code == V3ActCode.GUIDE) + return "GUIDE"; + if (code == V3ActCode.IDUR) + return "IDUR"; + if (code == V3ActCode.ITMCNT) + return "ITMCNT"; + if (code == V3ActCode.KEY) + return "KEY"; + if (code == V3ActCode.MEDT) + return "MEDT"; + if (code == V3ActCode.MSD) + return "MSD"; + if (code == V3ActCode.MSRADJ) + return "MSRADJ"; + if (code == V3ActCode.MSRAGG) + return "MSRAGG"; + if (code == V3ActCode.MSRIMPROV) + return "MSRIMPROV"; + if (code == V3ActCode.MSRJUR) + return "MSRJUR"; + if (code == V3ActCode.MSRRPTR) + return "MSRRPTR"; + if (code == V3ActCode.MSRRPTTIME) + return "MSRRPTTIME"; + if (code == V3ActCode.MSRSCORE) + return "MSRSCORE"; + if (code == V3ActCode.MSRSET) + return "MSRSET"; + if (code == V3ActCode.MSRTOPIC) + return "MSRTOPIC"; + if (code == V3ActCode.MSRTP) + return "MSRTP"; + if (code == V3ActCode.MSRTYPE) + return "MSRTYPE"; + if (code == V3ActCode.RAT) + return "RAT"; + if (code == V3ActCode.REF) + return "REF"; + if (code == V3ActCode.SDE) + return "SDE"; + if (code == V3ActCode.STRAT) + return "STRAT"; + if (code == V3ActCode.TRANF) + return "TRANF"; + if (code == V3ActCode.USE) + return "USE"; + if (code == V3ActCode._OBSERVATIONSEQUENCETYPE) + return "_ObservationSequenceType"; + if (code == V3ActCode.TIMEABSOLUTE) + return "TIME_ABSOLUTE"; + if (code == V3ActCode.TIMERELATIVE) + return "TIME_RELATIVE"; + if (code == V3ActCode._OBSERVATIONSERIESTYPE) + return "_ObservationSeriesType"; + if (code == V3ActCode._ECGOBSERVATIONSERIESTYPE) + return "_ECGObservationSeriesType"; + if (code == V3ActCode.REPRESENTATIVEBEAT) + return "REPRESENTATIVE_BEAT"; + if (code == V3ActCode.RHYTHM) + return "RHYTHM"; + if (code == V3ActCode._PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE) + return "_PatientImmunizationRelatedObservationType"; + if (code == V3ActCode.CLSSRM) + return "CLSSRM"; + if (code == V3ActCode.GRADE) + return "GRADE"; + if (code == V3ActCode.SCHL) + return "SCHL"; + if (code == V3ActCode.SCHLDIV) + return "SCHLDIV"; + if (code == V3ActCode.TEACHER) + return "TEACHER"; + if (code == V3ActCode._POPULATIONINCLUSIONOBSERVATIONTYPE) + return "_PopulationInclusionObservationType"; + if (code == V3ActCode.DENEX) + return "DENEX"; + if (code == V3ActCode.DENEXCEP) + return "DENEXCEP"; + if (code == V3ActCode.DENOM) + return "DENOM"; + if (code == V3ActCode.IPOP) + return "IPOP"; + if (code == V3ActCode.IPPOP) + return "IPPOP"; + if (code == V3ActCode.MSRPOPL) + return "MSRPOPL"; + if (code == V3ActCode.MSRPOPLEX) + return "MSRPOPLEX"; + if (code == V3ActCode.NUMER) + return "NUMER"; + if (code == V3ActCode.NUMEX) + return "NUMEX"; + if (code == V3ActCode._PREFERENCEOBSERVATIONTYPE) + return "_PreferenceObservationType"; + if (code == V3ActCode.PREFSTRENGTH) + return "PREFSTRENGTH"; + if (code == V3ActCode.ADVERSEREACTION) + return "ADVERSE_REACTION"; + if (code == V3ActCode.ASSERTION) + return "ASSERTION"; + if (code == V3ActCode.CASESER) + return "CASESER"; + if (code == V3ActCode.CDIO) + return "CDIO"; + if (code == V3ActCode.CRIT) + return "CRIT"; + if (code == V3ActCode.CTMO) + return "CTMO"; + if (code == V3ActCode.DX) + return "DX"; + if (code == V3ActCode.ADMDX) + return "ADMDX"; + if (code == V3ActCode.DISDX) + return "DISDX"; + if (code == V3ActCode.INTDX) + return "INTDX"; + if (code == V3ActCode.NOI) + return "NOI"; + if (code == V3ActCode.GISTIER) + return "GISTIER"; + if (code == V3ActCode.HHOBS) + return "HHOBS"; + if (code == V3ActCode.ISSUE) + return "ISSUE"; + if (code == V3ActCode._ACTADMINISTRATIVEDETECTEDISSUECODE) + return "_ActAdministrativeDetectedIssueCode"; + if (code == V3ActCode._ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE) + return "_ActAdministrativeAuthorizationDetectedIssueCode"; + if (code == V3ActCode.NAT) + return "NAT"; + if (code == V3ActCode.SUPPRESSED) + return "SUPPRESSED"; + if (code == V3ActCode.VALIDAT) + return "VALIDAT"; + if (code == V3ActCode.KEY204) + return "KEY204"; + if (code == V3ActCode.KEY205) + return "KEY205"; + if (code == V3ActCode.COMPLY) + return "COMPLY"; + if (code == V3ActCode.DUPTHPY) + return "DUPTHPY"; + if (code == V3ActCode.DUPTHPCLS) + return "DUPTHPCLS"; + if (code == V3ActCode.DUPTHPGEN) + return "DUPTHPGEN"; + if (code == V3ActCode.ABUSE) + return "ABUSE"; + if (code == V3ActCode.FRAUD) + return "FRAUD"; + if (code == V3ActCode.PLYDOC) + return "PLYDOC"; + if (code == V3ActCode.PLYPHRM) + return "PLYPHRM"; + if (code == V3ActCode.DOSE) + return "DOSE"; + if (code == V3ActCode.DOSECOND) + return "DOSECOND"; + if (code == V3ActCode.DOSEDUR) + return "DOSEDUR"; + if (code == V3ActCode.DOSEDURH) + return "DOSEDURH"; + if (code == V3ActCode.DOSEDURHIND) + return "DOSEDURHIND"; + if (code == V3ActCode.DOSEDURL) + return "DOSEDURL"; + if (code == V3ActCode.DOSEDURLIND) + return "DOSEDURLIND"; + if (code == V3ActCode.DOSEH) + return "DOSEH"; + if (code == V3ActCode.DOSEHINDA) + return "DOSEHINDA"; + if (code == V3ActCode.DOSEHIND) + return "DOSEHIND"; + if (code == V3ActCode.DOSEHINDSA) + return "DOSEHINDSA"; + if (code == V3ActCode.DOSEHINDW) + return "DOSEHINDW"; + if (code == V3ActCode.DOSEIVL) + return "DOSEIVL"; + if (code == V3ActCode.DOSEIVLIND) + return "DOSEIVLIND"; + if (code == V3ActCode.DOSEL) + return "DOSEL"; + if (code == V3ActCode.DOSELINDA) + return "DOSELINDA"; + if (code == V3ActCode.DOSELIND) + return "DOSELIND"; + if (code == V3ActCode.DOSELINDSA) + return "DOSELINDSA"; + if (code == V3ActCode.DOSELINDW) + return "DOSELINDW"; + if (code == V3ActCode.MDOSE) + return "MDOSE"; + if (code == V3ActCode.OBSA) + return "OBSA"; + if (code == V3ActCode.AGE) + return "AGE"; + if (code == V3ActCode.ADALRT) + return "ADALRT"; + if (code == V3ActCode.GEALRT) + return "GEALRT"; + if (code == V3ActCode.PEALRT) + return "PEALRT"; + if (code == V3ActCode.COND) + return "COND"; + if (code == V3ActCode.HGHT) + return "HGHT"; + if (code == V3ActCode.LACT) + return "LACT"; + if (code == V3ActCode.PREG) + return "PREG"; + if (code == V3ActCode.WGHT) + return "WGHT"; + if (code == V3ActCode.CREACT) + return "CREACT"; + if (code == V3ActCode.GEN) + return "GEN"; + if (code == V3ActCode.GEND) + return "GEND"; + if (code == V3ActCode.LAB) + return "LAB"; + if (code == V3ActCode.REACT) + return "REACT"; + if (code == V3ActCode.ALGY) + return "ALGY"; + if (code == V3ActCode.INT) + return "INT"; + if (code == V3ActCode.RREACT) + return "RREACT"; + if (code == V3ActCode.RALG) + return "RALG"; + if (code == V3ActCode.RAR) + return "RAR"; + if (code == V3ActCode.RINT) + return "RINT"; + if (code == V3ActCode.BUS) + return "BUS"; + if (code == V3ActCode.CODEINVAL) + return "CODE_INVAL"; + if (code == V3ActCode.CODEDEPREC) + return "CODE_DEPREC"; + if (code == V3ActCode.FORMAT) + return "FORMAT"; + if (code == V3ActCode.ILLEGAL) + return "ILLEGAL"; + if (code == V3ActCode.LENRANGE) + return "LEN_RANGE"; + if (code == V3ActCode.LENLONG) + return "LEN_LONG"; + if (code == V3ActCode.LENSHORT) + return "LEN_SHORT"; + if (code == V3ActCode.MISSCOND) + return "MISSCOND"; + if (code == V3ActCode.MISSMAND) + return "MISSMAND"; + if (code == V3ActCode.NODUPS) + return "NODUPS"; + if (code == V3ActCode.NOPERSIST) + return "NOPERSIST"; + if (code == V3ActCode.REPRANGE) + return "REP_RANGE"; + if (code == V3ActCode.MAXOCCURS) + return "MAXOCCURS"; + if (code == V3ActCode.MINOCCURS) + return "MINOCCURS"; + if (code == V3ActCode._ACTADMINISTRATIVERULEDETECTEDISSUECODE) + return "_ActAdministrativeRuleDetectedIssueCode"; + if (code == V3ActCode.KEY206) + return "KEY206"; + if (code == V3ActCode.OBSOLETE) + return "OBSOLETE"; + if (code == V3ActCode._ACTSUPPLIEDITEMDETECTEDISSUECODE) + return "_ActSuppliedItemDetectedIssueCode"; + if (code == V3ActCode._ADMINISTRATIONDETECTEDISSUECODE) + return "_AdministrationDetectedIssueCode"; + if (code == V3ActCode._APPROPRIATENESSDETECTEDISSUECODE) + return "_AppropriatenessDetectedIssueCode"; + if (code == V3ActCode._INTERACTIONDETECTEDISSUECODE) + return "_InteractionDetectedIssueCode"; + if (code == V3ActCode.FOOD) + return "FOOD"; + if (code == V3ActCode.TPROD) + return "TPROD"; + if (code == V3ActCode.DRG) + return "DRG"; + if (code == V3ActCode.NHP) + return "NHP"; + if (code == V3ActCode.NONRX) + return "NONRX"; + if (code == V3ActCode.PREVINEF) + return "PREVINEF"; + if (code == V3ActCode.DACT) + return "DACT"; + if (code == V3ActCode.TIME) + return "TIME"; + if (code == V3ActCode.ALRTENDLATE) + return "ALRTENDLATE"; + if (code == V3ActCode.ALRTSTRTLATE) + return "ALRTSTRTLATE"; + if (code == V3ActCode._TIMINGDETECTEDISSUECODE) + return "_TimingDetectedIssueCode"; + if (code == V3ActCode.ENDLATE) + return "ENDLATE"; + if (code == V3ActCode.STRTLATE) + return "STRTLATE"; + if (code == V3ActCode._SUPPLYDETECTEDISSUECODE) + return "_SupplyDetectedIssueCode"; + if (code == V3ActCode.ALLDONE) + return "ALLDONE"; + if (code == V3ActCode.FULFIL) + return "FULFIL"; + if (code == V3ActCode.NOTACTN) + return "NOTACTN"; + if (code == V3ActCode.NOTEQUIV) + return "NOTEQUIV"; + if (code == V3ActCode.NOTEQUIVGEN) + return "NOTEQUIVGEN"; + if (code == V3ActCode.NOTEQUIVTHER) + return "NOTEQUIVTHER"; + if (code == V3ActCode.TIMING) + return "TIMING"; + if (code == V3ActCode.INTERVAL) + return "INTERVAL"; + if (code == V3ActCode.MINFREQ) + return "MINFREQ"; + if (code == V3ActCode.HELD) + return "HELD"; + if (code == V3ActCode.TOOLATE) + return "TOOLATE"; + if (code == V3ActCode.TOOSOON) + return "TOOSOON"; + if (code == V3ActCode.HISTORIC) + return "HISTORIC"; + if (code == V3ActCode.PATPREF) + return "PATPREF"; + if (code == V3ActCode.PATPREFALT) + return "PATPREFALT"; + if (code == V3ActCode.KSUBJ) + return "KSUBJ"; + if (code == V3ActCode.KSUBT) + return "KSUBT"; + if (code == V3ActCode.OINT) + return "OINT"; + if (code == V3ActCode.ALG) + return "ALG"; + if (code == V3ActCode.DALG) + return "DALG"; + if (code == V3ActCode.EALG) + return "EALG"; + if (code == V3ActCode.FALG) + return "FALG"; + if (code == V3ActCode.DINT) + return "DINT"; + if (code == V3ActCode.DNAINT) + return "DNAINT"; + if (code == V3ActCode.EINT) + return "EINT"; + if (code == V3ActCode.ENAINT) + return "ENAINT"; + if (code == V3ActCode.FINT) + return "FINT"; + if (code == V3ActCode.FNAINT) + return "FNAINT"; + if (code == V3ActCode.NAINT) + return "NAINT"; + if (code == V3ActCode.SEV) + return "SEV"; + if (code == V3ActCode._FDALABELDATA) + return "_FDALabelData"; + if (code == V3ActCode.FDACOATING) + return "FDACOATING"; + if (code == V3ActCode.FDACOLOR) + return "FDACOLOR"; + if (code == V3ActCode.FDAIMPRINTCD) + return "FDAIMPRINTCD"; + if (code == V3ActCode.FDALOGO) + return "FDALOGO"; + if (code == V3ActCode.FDASCORING) + return "FDASCORING"; + if (code == V3ActCode.FDASHAPE) + return "FDASHAPE"; + if (code == V3ActCode.FDASIZE) + return "FDASIZE"; + if (code == V3ActCode._ROIOVERLAYSHAPE) + return "_ROIOverlayShape"; + if (code == V3ActCode.CIRCLE) + return "CIRCLE"; + if (code == V3ActCode.ELLIPSE) + return "ELLIPSE"; + if (code == V3ActCode.POINT) + return "POINT"; + if (code == V3ActCode.POLY) + return "POLY"; + if (code == V3ActCode.C) + return "C"; + if (code == V3ActCode.DIET) + return "DIET"; + if (code == V3ActCode.BR) + return "BR"; + if (code == V3ActCode.DM) + return "DM"; + if (code == V3ActCode.FAST) + return "FAST"; + if (code == V3ActCode.FORMULA) + return "FORMULA"; + if (code == V3ActCode.GF) + return "GF"; + if (code == V3ActCode.LF) + return "LF"; + if (code == V3ActCode.LP) + return "LP"; + if (code == V3ActCode.LQ) + return "LQ"; + if (code == V3ActCode.LS) + return "LS"; + if (code == V3ActCode.N) + return "N"; + if (code == V3ActCode.NF) + return "NF"; + if (code == V3ActCode.PAF) + return "PAF"; + if (code == V3ActCode.PAR) + return "PAR"; + if (code == V3ActCode.RD) + return "RD"; + if (code == V3ActCode.SCH) + return "SCH"; + if (code == V3ActCode.SUPPLEMENT) + return "SUPPLEMENT"; + if (code == V3ActCode.T) + return "T"; + if (code == V3ActCode.VLI) + return "VLI"; + if (code == V3ActCode.DRUGPRG) + return "DRUGPRG"; + if (code == V3ActCode.F) + return "F"; + if (code == V3ActCode.PRLMN) + return "PRLMN"; + if (code == V3ActCode.SECOBS) + return "SECOBS"; + if (code == V3ActCode.SECCATOBS) + return "SECCATOBS"; + if (code == V3ActCode.SECCLASSOBS) + return "SECCLASSOBS"; + if (code == V3ActCode.SECCONOBS) + return "SECCONOBS"; + if (code == V3ActCode.SECINTOBS) + return "SECINTOBS"; + if (code == V3ActCode.SECALTINTOBS) + return "SECALTINTOBS"; + if (code == V3ActCode.SECDATINTOBS) + return "SECDATINTOBS"; + if (code == V3ActCode.SECINTCONOBS) + return "SECINTCONOBS"; + if (code == V3ActCode.SECINTPRVOBS) + return "SECINTPRVOBS"; + if (code == V3ActCode.SECINTPRVABOBS) + return "SECINTPRVABOBS"; + if (code == V3ActCode.SECINTPRVRBOBS) + return "SECINTPRVRBOBS"; + if (code == V3ActCode.SECINTSTOBS) + return "SECINTSTOBS"; + if (code == V3ActCode.SECTRSTOBS) + return "SECTRSTOBS"; + if (code == V3ActCode.TRSTACCRDOBS) + return "TRSTACCRDOBS"; + if (code == V3ActCode.TRSTAGREOBS) + return "TRSTAGREOBS"; + if (code == V3ActCode.TRSTCERTOBS) + return "TRSTCERTOBS"; + if (code == V3ActCode.TRSTFWKOBS) + return "TRSTFWKOBS"; + if (code == V3ActCode.TRSTLOAOBS) + return "TRSTLOAOBS"; + if (code == V3ActCode.TRSTMECOBS) + return "TRSTMECOBS"; + if (code == V3ActCode.SUBSIDFFS) + return "SUBSIDFFS"; + if (code == V3ActCode.WRKCOMP) + return "WRKCOMP"; + if (code == V3ActCode._ACTPROCEDURECODE) + return "_ActProcedureCode"; + if (code == V3ActCode._ACTBILLABLESERVICECODE) + return "_ActBillableServiceCode"; + if (code == V3ActCode._HL7DEFINEDACTCODES) + return "_HL7DefinedActCodes"; + if (code == V3ActCode.COPAY) + return "COPAY"; + if (code == V3ActCode.DEDUCT) + return "DEDUCT"; + if (code == V3ActCode.DOSEIND) + return "DOSEIND"; + if (code == V3ActCode.PRA) + return "PRA"; + if (code == V3ActCode.STORE) + return "STORE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCode.java new file mode 100644 index 00000000000..9f2ab637d91 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActExposureLevelCode { + + /** + * A qualitative measure of the degree of exposure to the causative agent. This includes concepts such as "low", "medium" and "high". This quantifies how the quantity that was available to be administered to the target differs from typical or background levels of the substance. + */ + _ACTEXPOSURELEVELCODE, + /** + * Description: Exposure to an agent at a relatively high level above background. + */ + HIGH, + /** + * Description: Exposure to an agent at a relatively low level above background. + */ + LOW, + /** + * Description: Exposure to an agent at a relatively moderate level above background.A + */ + MEDIUM, + /** + * added to help the parsers + */ + NULL; + public static V3ActExposureLevelCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActExposureLevelCode".equals(codeString)) + return _ACTEXPOSURELEVELCODE; + if ("HIGH".equals(codeString)) + return HIGH; + if ("LOW".equals(codeString)) + return LOW; + if ("MEDIUM".equals(codeString)) + return MEDIUM; + throw new FHIRException("Unknown V3ActExposureLevelCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "_ActExposureLevelCode"; + case HIGH: return "HIGH"; + case LOW: return "LOW"; + case MEDIUM: return "MEDIUM"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActExposureLevelCode"; + } + public String getDefinition() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "A qualitative measure of the degree of exposure to the causative agent. This includes concepts such as \"low\", \"medium\" and \"high\". This quantifies how the quantity that was available to be administered to the target differs from typical or background levels of the substance."; + case HIGH: return "Description: Exposure to an agent at a relatively high level above background."; + case LOW: return "Description: Exposure to an agent at a relatively low level above background."; + case MEDIUM: return "Description: Exposure to an agent at a relatively moderate level above background.A"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "ActExposureLevelCode"; + case HIGH: return "high"; + case LOW: return "low"; + case MEDIUM: return "medium"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCodeEnumFactory.java new file mode 100644 index 00000000000..9788500c193 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActExposureLevelCodeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActExposureLevelCodeEnumFactory implements EnumFactory { + + public V3ActExposureLevelCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActExposureLevelCode".equals(codeString)) + return V3ActExposureLevelCode._ACTEXPOSURELEVELCODE; + if ("HIGH".equals(codeString)) + return V3ActExposureLevelCode.HIGH; + if ("LOW".equals(codeString)) + return V3ActExposureLevelCode.LOW; + if ("MEDIUM".equals(codeString)) + return V3ActExposureLevelCode.MEDIUM; + throw new IllegalArgumentException("Unknown V3ActExposureLevelCode code '"+codeString+"'"); + } + + public String toCode(V3ActExposureLevelCode code) { + if (code == V3ActExposureLevelCode._ACTEXPOSURELEVELCODE) + return "_ActExposureLevelCode"; + if (code == V3ActExposureLevelCode.HIGH) + return "HIGH"; + if (code == V3ActExposureLevelCode.LOW) + return "LOW"; + if (code == V3ActExposureLevelCode.MEDIUM) + return "MEDIUM"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifier.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifier.java new file mode 100644 index 00000000000..8905a4802ec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifier.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActInvoiceElementModifier { + + /** + * Electronic form with supporting information to follow. + */ + EFORM, + /** + * Fax with supporting information to follow. + */ + FAX, + /** + * Represents the last invoice from the perspective of the provider. + */ + LINV, + /** + * Paper documentation (or other physical format) with supporting information to follow. + */ + PAPER, + /** + * added to help the parsers + */ + NULL; + public static V3ActInvoiceElementModifier fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EFORM".equals(codeString)) + return EFORM; + if ("FAX".equals(codeString)) + return FAX; + if ("LINV".equals(codeString)) + return LINV; + if ("PAPER".equals(codeString)) + return PAPER; + throw new FHIRException("Unknown V3ActInvoiceElementModifier code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EFORM: return "EFORM"; + case FAX: return "FAX"; + case LINV: return "LINV"; + case PAPER: return "PAPER"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActInvoiceElementModifier"; + } + public String getDefinition() { + switch (this) { + case EFORM: return "Electronic form with supporting information to follow."; + case FAX: return "Fax with supporting information to follow."; + case LINV: return "Represents the last invoice from the perspective of the provider."; + case PAPER: return "Paper documentation (or other physical format) with supporting information to follow."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EFORM: return "Electronic Form To Follow"; + case FAX: return "Fax To Follow"; + case LINV: return "Last Invoice"; + case PAPER: return "Paper Documentation To Follow"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifierEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifierEnumFactory.java new file mode 100644 index 00000000000..4945cc2779e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActInvoiceElementModifierEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActInvoiceElementModifierEnumFactory implements EnumFactory { + + public V3ActInvoiceElementModifier fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EFORM".equals(codeString)) + return V3ActInvoiceElementModifier.EFORM; + if ("FAX".equals(codeString)) + return V3ActInvoiceElementModifier.FAX; + if ("LINV".equals(codeString)) + return V3ActInvoiceElementModifier.LINV; + if ("PAPER".equals(codeString)) + return V3ActInvoiceElementModifier.PAPER; + throw new IllegalArgumentException("Unknown V3ActInvoiceElementModifier code '"+codeString+"'"); + } + + public String toCode(V3ActInvoiceElementModifier code) { + if (code == V3ActInvoiceElementModifier.EFORM) + return "EFORM"; + if (code == V3ActInvoiceElementModifier.FAX) + return "FAX"; + if (code == V3ActInvoiceElementModifier.LINV) + return "LINV"; + if (code == V3ActInvoiceElementModifier.PAPER) + return "PAPER"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMood.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMood.java new file mode 100644 index 00000000000..ddfef6b1669 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMood.java @@ -0,0 +1,372 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActMood { + + /** + * These are moods describing activities as they progress in the business cycle, from defined, through planned and ordered to completed. + */ + _ACTMOODCOMPLETIONTRACK, + /** + * Definition: A possible act. + */ + _ACTMOODPOTENTIAL, + /** + * Definition: A definition of a kind of act that can occur . + + + OpenIssue: The semantic constructs embodied in DEF and CRT moods seem indistinguishable, and their uses can readily be determined by the context in which these are used. Therefore, this OpenIssue has been created to declare that it is likely that ActMood.DEF will be "retired" in the future in favor of the more general ActMood.CRT. + */ + DEF, + /** + * Definition: A kind of act that defines a permission that has been granted. + */ + PERM, + /** + * Definition: A kind of act that may occur during the specified time period. + */ + SLOT, + /** + * Definition: An act that actually happens (may be an ongoing act or a documentation of a past act). + */ + EVN, + /** + * Definition: An intention or plan for an act. + + + >UsageNotes: The final outcome of the intent, the act that is intended to occur, is always an event. However the final outcome may be reached indirectly via steps through other intents, such as promise, permission request, or an appointment that may lead to an actual event to occur. Alternatively, the intended act may never occur. + */ + INT, + /** + * Definition: A desire to have an act occur. + */ + _ACTMOODDESIRE, + /** + * Definition: A request (or order) for an act that is part of a defined request/fulfillment cycle. + + + UsageNotes: Use of an HL7 defined request/fulfillment framework is not required to use this mood code. + */ + _ACTMOODACTREQUEST, + /** + * Definition: A request act that is specialized for the appointment scheduling request/fulfillment cycle. An appointment request is fulfilled only and completely by an appointment (APT), i.e., all that the appointment request intends is to create an appointment (the actual act may well not happen if that is the professional decision during the appointment). + */ + ARQ, + /** + * Definition: A request for a permission to perform the act. Typically a payer (or possibly a supervisor) is being requested to give permission to perform the act. As opposed to the RQO, the requestee is not asked to perform or cause to perform the act but only to give the permission. + */ + PERMRQ, + /** + * Definition: A request act that is specialized for an event request/fulfillment cycle. + + + UsageNotes: The fulfillment cycle may involve intermediary fulfilling acts in moods such as PRMS, APT, or even another RQO before being fulfilled by the final event. + + + UsageNotes: The concepts of a "request" and an "order" are viewed as different, because there is an implication of a mandate associated with order. In practice, however, this distinction has no general functional value in the inter-operation of health care computing. "Orders" are commonly refused for a variety of clinical and business reasons, and the notion of a "request" obligates the recipient (the fulfiller) to respond to the sender (the author). Indeed, in many regions, including Australia and Europe, the common term used is "request." + + Thus, the concept embodies both notions, as there is no useful distinction to be made. If a mandate is to be associated with a request, this will be embodied in the "local" business rules applied to the transactions. Should HL7 desire to provide a distinction between these in the future, the individual concepts could be added as specializations of this concept. + + The critical distinction here, is the difference between this concept and an "intent", of which it is a specialization. An intent involves decisions by a single party, the author. A request, however, involves decisions by two parties, the author and the fulfiller, with an obligation on the part of the fulfiller to respond to the request indicating that the fulfiller will indeed fulfill the request. + */ + RQO, + /** + * Definition: A suggestion that an act might be performed. Not an explicit request, and professional responsibility may or may not be present. + */ + PRP, + /** + * Definition: A suggestion that an act should be performed with an acceptance of some degree of professional responsibility for the resulting act. Not an explicit request. . + + + UsageNotes: Where there is no clear definition or applicable concept of "professional responsibilityâ€?, RMD becomes indistinguishable from PRP. . + */ + RMD, + /** + * Definition: A commitment to perform an act (may be either solicited or unsolicited). The committer becomes responsible to the other party for executing the act, and, as a consequence, the other party may rely on the first party to perform or cause to perform the act. + + + UsageNotes: Commitments may be retracted or cancelled. + */ + PRMS, + /** + * Definition: An act that has been scheduled to be performed at a specific place and time. + */ + APT, + /** + * Definition: An act that expresses condition statements for other acts. + */ + _ACTMOODPREDICATE, + /** + * Deprecation Comment: + This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to "true" and use the desired mood for your criterion. + + + Definition: A condition that must be true for the source act to be considered. + */ + CRT, + /** + * Deprecation Comment: + This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to "true" and use the desired mood for your criterion. + + + Definition: A criterion (CRT) that has_match = an event (EVN). + */ + EVN_CRT, + /** + * A criterion expressed over goals (ActMood.GOL). + */ + GOL_CRT, + /** + * A criterion expressed over intents (ActMood.INT). + */ + INT_CRT, + /** + * A criterion expressed over promises (ActMood.PRMS). + */ + PRMS_CRT, + /** + * A criterion expressed over requests or orders (ActMood.RQO). + */ + RQO_CRT, + /** + * A criterion expressed over risks (ActMood.RSK). + */ + RSK_CRT, + /** + * Definition: An act that is considered to have some noteworthy likelihood of occurring in the future (has_match = event). + + + Examples:Prognosis of a condition, Expected date of discharge from hospital, patient will likely need an emergency decompression of the intracranial pressure by morning. + + + UsageNotes:INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with expectation, which is a prediction that something will happen in the future. GOL (goal) reflects a hope rather than a prediction. RSK (risk) reflects a potential negative event that may or may not be expected to happen. + */ + EXPEC, + /** + * Definition: An expectation that is considered to be desirable to occur in the future + + + Examples:Target weight below 80Kg, Stop smoking, Regain ability to walk, goal is to administer thrombolytics to candidate patients presenting with acute myocardial infarction. + + + UsageNotes: INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with goal which doesn't represent an intention to act, merely a hope for an eventual result. A goal is distinct from the intended actions to reach that goal. "I will reduce the dose of drug x to 20mg" is an intent. "I hope to be able to get the patient to the point where I can reduce the dose of drug x to 20mg" is a goal. EXPEC (expectation) reflects a prediction rather than a hope. RSK (risk) reflects a potential negative event rather than a hope. + */ + GOL, + /** + * Definition:An act that may occur in the future and which is regarded as undesirable + + + Examples:Increased risk of DVT, at risk for sub-acute bacterial endocarditis. + + + UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen. + */ + RSK, + /** + * Definition: One of a set of acts that specify an option for the property values that the parent act may have. Typically used in definitions or orders to describe alternatives. An option can only be used as a group, that is, all assigned values must be used together. The actual mood of the act is the same as the parent act, and they must be linked by an actrelationship with type = OPTN. + */ + OPT, + /** + * added to help the parsers + */ + NULL; + public static V3ActMood fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActMoodCompletionTrack".equals(codeString)) + return _ACTMOODCOMPLETIONTRACK; + if ("_ActMoodPotential".equals(codeString)) + return _ACTMOODPOTENTIAL; + if ("DEF".equals(codeString)) + return DEF; + if ("PERM".equals(codeString)) + return PERM; + if ("SLOT".equals(codeString)) + return SLOT; + if ("EVN".equals(codeString)) + return EVN; + if ("INT".equals(codeString)) + return INT; + if ("_ActMoodDesire".equals(codeString)) + return _ACTMOODDESIRE; + if ("_ActMoodActRequest".equals(codeString)) + return _ACTMOODACTREQUEST; + if ("ARQ".equals(codeString)) + return ARQ; + if ("PERMRQ".equals(codeString)) + return PERMRQ; + if ("RQO".equals(codeString)) + return RQO; + if ("PRP".equals(codeString)) + return PRP; + if ("RMD".equals(codeString)) + return RMD; + if ("PRMS".equals(codeString)) + return PRMS; + if ("APT".equals(codeString)) + return APT; + if ("_ActMoodPredicate".equals(codeString)) + return _ACTMOODPREDICATE; + if ("CRT".equals(codeString)) + return CRT; + if ("EVN.CRT".equals(codeString)) + return EVN_CRT; + if ("GOL.CRT".equals(codeString)) + return GOL_CRT; + if ("INT.CRT".equals(codeString)) + return INT_CRT; + if ("PRMS.CRT".equals(codeString)) + return PRMS_CRT; + if ("RQO.CRT".equals(codeString)) + return RQO_CRT; + if ("RSK.CRT".equals(codeString)) + return RSK_CRT; + if ("EXPEC".equals(codeString)) + return EXPEC; + if ("GOL".equals(codeString)) + return GOL; + if ("RSK".equals(codeString)) + return RSK; + if ("OPT".equals(codeString)) + return OPT; + throw new FHIRException("Unknown V3ActMood code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "_ActMoodCompletionTrack"; + case _ACTMOODPOTENTIAL: return "_ActMoodPotential"; + case DEF: return "DEF"; + case PERM: return "PERM"; + case SLOT: return "SLOT"; + case EVN: return "EVN"; + case INT: return "INT"; + case _ACTMOODDESIRE: return "_ActMoodDesire"; + case _ACTMOODACTREQUEST: return "_ActMoodActRequest"; + case ARQ: return "ARQ"; + case PERMRQ: return "PERMRQ"; + case RQO: return "RQO"; + case PRP: return "PRP"; + case RMD: return "RMD"; + case PRMS: return "PRMS"; + case APT: return "APT"; + case _ACTMOODPREDICATE: return "_ActMoodPredicate"; + case CRT: return "CRT"; + case EVN_CRT: return "EVN.CRT"; + case GOL_CRT: return "GOL.CRT"; + case INT_CRT: return "INT.CRT"; + case PRMS_CRT: return "PRMS.CRT"; + case RQO_CRT: return "RQO.CRT"; + case RSK_CRT: return "RSK.CRT"; + case EXPEC: return "EXPEC"; + case GOL: return "GOL"; + case RSK: return "RSK"; + case OPT: return "OPT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActMood"; + } + public String getDefinition() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "These are moods describing activities as they progress in the business cycle, from defined, through planned and ordered to completed."; + case _ACTMOODPOTENTIAL: return "Definition: A possible act."; + case DEF: return "Definition: A definition of a kind of act that can occur .\r\n\n \n OpenIssue: The semantic constructs embodied in DEF and CRT moods seem indistinguishable, and their uses can readily be determined by the context in which these are used. Therefore, this OpenIssue has been created to declare that it is likely that ActMood.DEF will be \"retired\" in the future in favor of the more general ActMood.CRT."; + case PERM: return "Definition: A kind of act that defines a permission that has been granted."; + case SLOT: return "Definition: A kind of act that may occur during the specified time period."; + case EVN: return "Definition: An act that actually happens (may be an ongoing act or a documentation of a past act)."; + case INT: return "Definition: An intention or plan for an act. \r\n\n \n >UsageNotes: The final outcome of the intent, the act that is intended to occur, is always an event. However the final outcome may be reached indirectly via steps through other intents, such as promise, permission request, or an appointment that may lead to an actual event to occur. Alternatively, the intended act may never occur."; + case _ACTMOODDESIRE: return "Definition: A desire to have an act occur."; + case _ACTMOODACTREQUEST: return "Definition: A request (or order) for an act that is part of a defined request/fulfillment cycle.\r\n\n \n UsageNotes: Use of an HL7 defined request/fulfillment framework is not required to use this mood code."; + case ARQ: return "Definition: A request act that is specialized for the appointment scheduling request/fulfillment cycle. An appointment request is fulfilled only and completely by an appointment (APT), i.e., all that the appointment request intends is to create an appointment (the actual act may well not happen if that is the professional decision during the appointment)."; + case PERMRQ: return "Definition: A request for a permission to perform the act. Typically a payer (or possibly a supervisor) is being requested to give permission to perform the act. As opposed to the RQO, the requestee is not asked to perform or cause to perform the act but only to give the permission."; + case RQO: return "Definition: A request act that is specialized for an event request/fulfillment cycle. \r\n\n \n UsageNotes: The fulfillment cycle may involve intermediary fulfilling acts in moods such as PRMS, APT, or even another RQO before being fulfilled by the final event. \r\n\n \n UsageNotes: The concepts of a \"request\" and an \"order\" are viewed as different, because there is an implication of a mandate associated with order. In practice, however, this distinction has no general functional value in the inter-operation of health care computing. \"Orders\" are commonly refused for a variety of clinical and business reasons, and the notion of a \"request\" obligates the recipient (the fulfiller) to respond to the sender (the author). Indeed, in many regions, including Australia and Europe, the common term used is \"request.\"\r\n\n Thus, the concept embodies both notions, as there is no useful distinction to be made. If a mandate is to be associated with a request, this will be embodied in the \"local\" business rules applied to the transactions. Should HL7 desire to provide a distinction between these in the future, the individual concepts could be added as specializations of this concept.\r\n\n The critical distinction here, is the difference between this concept and an \"intent\", of which it is a specialization. An intent involves decisions by a single party, the author. A request, however, involves decisions by two parties, the author and the fulfiller, with an obligation on the part of the fulfiller to respond to the request indicating that the fulfiller will indeed fulfill the request."; + case PRP: return "Definition: A suggestion that an act might be performed. Not an explicit request, and professional responsibility may or may not be present."; + case RMD: return "Definition: A suggestion that an act should be performed with an acceptance of some degree of professional responsibility for the resulting act. Not an explicit request. .\r\n\n \n UsageNotes: Where there is no clear definition or applicable concept of \"professional responsibilityâ€?, RMD becomes indistinguishable from PRP. ."; + case PRMS: return "Definition: A commitment to perform an act (may be either solicited or unsolicited). The committer becomes responsible to the other party for executing the act, and, as a consequence, the other party may rely on the first party to perform or cause to perform the act.\r\n\n \n UsageNotes: Commitments may be retracted or cancelled."; + case APT: return "Definition: An act that has been scheduled to be performed at a specific place and time."; + case _ACTMOODPREDICATE: return "Definition: An act that expresses condition statements for other acts."; + case CRT: return "Deprecation Comment: \n This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to \"true\" and use the desired mood for your criterion.\r\n\n \n Definition: A condition that must be true for the source act to be considered."; + case EVN_CRT: return "Deprecation Comment: \n This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to \"true\" and use the desired mood for your criterion.\r\n\n \n Definition: A criterion (CRT) that has_match = an event (EVN)."; + case GOL_CRT: return "A criterion expressed over goals (ActMood.GOL)."; + case INT_CRT: return "A criterion expressed over intents (ActMood.INT)."; + case PRMS_CRT: return "A criterion expressed over promises (ActMood.PRMS)."; + case RQO_CRT: return "A criterion expressed over requests or orders (ActMood.RQO)."; + case RSK_CRT: return "A criterion expressed over risks (ActMood.RSK)."; + case EXPEC: return "Definition: An act that is considered to have some noteworthy likelihood of occurring in the future (has_match = event).\r\n\n \n Examples:Prognosis of a condition, Expected date of discharge from hospital, patient will likely need an emergency decompression of the intracranial pressure by morning.\r\n\n \n UsageNotes:INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with expectation, which is a prediction that something will happen in the future. GOL (goal) reflects a hope rather than a prediction. RSK (risk) reflects a potential negative event that may or may not be expected to happen."; + case GOL: return "Definition: An expectation that is considered to be desirable to occur in the future \r\n\n \n Examples:Target weight below 80Kg, Stop smoking, Regain ability to walk, goal is to administer thrombolytics to candidate patients presenting with acute myocardial infarction.\r\n\n \n UsageNotes: INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with goal which doesn't represent an intention to act, merely a hope for an eventual result. A goal is distinct from the intended actions to reach that goal. \"I will reduce the dose of drug x to 20mg\" is an intent. \"I hope to be able to get the patient to the point where I can reduce the dose of drug x to 20mg\" is a goal. EXPEC (expectation) reflects a prediction rather than a hope. RSK (risk) reflects a potential negative event rather than a hope."; + case RSK: return "Definition:An act that may occur in the future and which is regarded as undesirable \r\n\n \n Examples:Increased risk of DVT, at risk for sub-acute bacterial endocarditis.\r\n\n \n UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen."; + case OPT: return "Definition: One of a set of acts that specify an option for the property values that the parent act may have. Typically used in definitions or orders to describe alternatives. An option can only be used as a group, that is, all assigned values must be used together. The actual mood of the act is the same as the parent act, and they must be linked by an actrelationship with type = OPTN."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "ActMoodCompletionTrack"; + case _ACTMOODPOTENTIAL: return "potential"; + case DEF: return "definition"; + case PERM: return "permission"; + case SLOT: return "resource slot"; + case EVN: return "event (occurrence)"; + case INT: return "intent"; + case _ACTMOODDESIRE: return "desire"; + case _ACTMOODACTREQUEST: return "act request"; + case ARQ: return "appointment request"; + case PERMRQ: return "permission request"; + case RQO: return "request"; + case PRP: return "proposal"; + case RMD: return "recommendation"; + case PRMS: return "promise"; + case APT: return "appointment"; + case _ACTMOODPREDICATE: return "ActMoodPredicate"; + case CRT: return "criterion"; + case EVN_CRT: return "event criterion"; + case GOL_CRT: return "goal criterion"; + case INT_CRT: return "intent criterion"; + case PRMS_CRT: return "promise criterion"; + case RQO_CRT: return "request criterion"; + case RSK_CRT: return "risk criterion"; + case EXPEC: return "expectation"; + case GOL: return "Goal"; + case RSK: return "risk"; + case OPT: return "option"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMoodEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMoodEnumFactory.java new file mode 100644 index 00000000000..253e6fbd629 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActMoodEnumFactory.java @@ -0,0 +1,163 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActMoodEnumFactory implements EnumFactory { + + public V3ActMood fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActMoodCompletionTrack".equals(codeString)) + return V3ActMood._ACTMOODCOMPLETIONTRACK; + if ("_ActMoodPotential".equals(codeString)) + return V3ActMood._ACTMOODPOTENTIAL; + if ("DEF".equals(codeString)) + return V3ActMood.DEF; + if ("PERM".equals(codeString)) + return V3ActMood.PERM; + if ("SLOT".equals(codeString)) + return V3ActMood.SLOT; + if ("EVN".equals(codeString)) + return V3ActMood.EVN; + if ("INT".equals(codeString)) + return V3ActMood.INT; + if ("_ActMoodDesire".equals(codeString)) + return V3ActMood._ACTMOODDESIRE; + if ("_ActMoodActRequest".equals(codeString)) + return V3ActMood._ACTMOODACTREQUEST; + if ("ARQ".equals(codeString)) + return V3ActMood.ARQ; + if ("PERMRQ".equals(codeString)) + return V3ActMood.PERMRQ; + if ("RQO".equals(codeString)) + return V3ActMood.RQO; + if ("PRP".equals(codeString)) + return V3ActMood.PRP; + if ("RMD".equals(codeString)) + return V3ActMood.RMD; + if ("PRMS".equals(codeString)) + return V3ActMood.PRMS; + if ("APT".equals(codeString)) + return V3ActMood.APT; + if ("_ActMoodPredicate".equals(codeString)) + return V3ActMood._ACTMOODPREDICATE; + if ("CRT".equals(codeString)) + return V3ActMood.CRT; + if ("EVN.CRT".equals(codeString)) + return V3ActMood.EVN_CRT; + if ("GOL.CRT".equals(codeString)) + return V3ActMood.GOL_CRT; + if ("INT.CRT".equals(codeString)) + return V3ActMood.INT_CRT; + if ("PRMS.CRT".equals(codeString)) + return V3ActMood.PRMS_CRT; + if ("RQO.CRT".equals(codeString)) + return V3ActMood.RQO_CRT; + if ("RSK.CRT".equals(codeString)) + return V3ActMood.RSK_CRT; + if ("EXPEC".equals(codeString)) + return V3ActMood.EXPEC; + if ("GOL".equals(codeString)) + return V3ActMood.GOL; + if ("RSK".equals(codeString)) + return V3ActMood.RSK; + if ("OPT".equals(codeString)) + return V3ActMood.OPT; + throw new IllegalArgumentException("Unknown V3ActMood code '"+codeString+"'"); + } + + public String toCode(V3ActMood code) { + if (code == V3ActMood._ACTMOODCOMPLETIONTRACK) + return "_ActMoodCompletionTrack"; + if (code == V3ActMood._ACTMOODPOTENTIAL) + return "_ActMoodPotential"; + if (code == V3ActMood.DEF) + return "DEF"; + if (code == V3ActMood.PERM) + return "PERM"; + if (code == V3ActMood.SLOT) + return "SLOT"; + if (code == V3ActMood.EVN) + return "EVN"; + if (code == V3ActMood.INT) + return "INT"; + if (code == V3ActMood._ACTMOODDESIRE) + return "_ActMoodDesire"; + if (code == V3ActMood._ACTMOODACTREQUEST) + return "_ActMoodActRequest"; + if (code == V3ActMood.ARQ) + return "ARQ"; + if (code == V3ActMood.PERMRQ) + return "PERMRQ"; + if (code == V3ActMood.RQO) + return "RQO"; + if (code == V3ActMood.PRP) + return "PRP"; + if (code == V3ActMood.RMD) + return "RMD"; + if (code == V3ActMood.PRMS) + return "PRMS"; + if (code == V3ActMood.APT) + return "APT"; + if (code == V3ActMood._ACTMOODPREDICATE) + return "_ActMoodPredicate"; + if (code == V3ActMood.CRT) + return "CRT"; + if (code == V3ActMood.EVN_CRT) + return "EVN.CRT"; + if (code == V3ActMood.GOL_CRT) + return "GOL.CRT"; + if (code == V3ActMood.INT_CRT) + return "INT.CRT"; + if (code == V3ActMood.PRMS_CRT) + return "PRMS.CRT"; + if (code == V3ActMood.RQO_CRT) + return "RQO.CRT"; + if (code == V3ActMood.RSK_CRT) + return "RSK.CRT"; + if (code == V3ActMood.EXPEC) + return "EXPEC"; + if (code == V3ActMood.GOL) + return "GOL"; + if (code == V3ActMood.RSK) + return "RSK"; + if (code == V3ActMood.OPT) + return "OPT"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriority.java new file mode 100644 index 00000000000..d1c8631758c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriority.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActPriority { + + /** + * As soon as possible, next highest priority after stat. + */ + A, + /** + * Filler should contact the placer as soon as results are available, even for preliminary results. (Was "C" in HL7 verion 2.3's reporting priority.) + */ + CR, + /** + * Filler should contact the placer (or target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CS, + /** + * Filler should contact the placer to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CSP, + /** + * Filler should contact the service recipient (target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CSR, + /** + * Beneficial to the patient but not essential for survival. + */ + EL, + /** + * An unforeseen combination of circumstances or the resulting state that calls for immediate action. + */ + EM, + /** + * Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation. + */ + P, + /** + * An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition. + */ + PRN, + /** + * Routine service, do at usual work hours. + */ + R, + /** + * A report should be prepared and sent as quickly as possible. + */ + RR, + /** + * With highest priority (e.g., emergency). + */ + S, + /** + * It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level). + */ + T, + /** + * Drug is to be used as directed by the prescriber. + */ + UD, + /** + * Calls for prompt action. + */ + UR, + /** + * added to help the parsers + */ + NULL; + public static V3ActPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("CR".equals(codeString)) + return CR; + if ("CS".equals(codeString)) + return CS; + if ("CSP".equals(codeString)) + return CSP; + if ("CSR".equals(codeString)) + return CSR; + if ("EL".equals(codeString)) + return EL; + if ("EM".equals(codeString)) + return EM; + if ("P".equals(codeString)) + return P; + if ("PRN".equals(codeString)) + return PRN; + if ("R".equals(codeString)) + return R; + if ("RR".equals(codeString)) + return RR; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("UD".equals(codeString)) + return UD; + if ("UR".equals(codeString)) + return UR; + throw new FHIRException("Unknown V3ActPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case CR: return "CR"; + case CS: return "CS"; + case CSP: return "CSP"; + case CSR: return "CSR"; + case EL: return "EL"; + case EM: return "EM"; + case P: return "P"; + case PRN: return "PRN"; + case R: return "R"; + case RR: return "RR"; + case S: return "S"; + case T: return "T"; + case UD: return "UD"; + case UR: return "UR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActPriority"; + } + public String getDefinition() { + switch (this) { + case A: return "As soon as possible, next highest priority after stat."; + case CR: return "Filler should contact the placer as soon as results are available, even for preliminary results. (Was \"C\" in HL7 verion 2.3's reporting priority.)"; + case CS: return "Filler should contact the placer (or target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case CSP: return "Filler should contact the placer to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case CSR: return "Filler should contact the service recipient (target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case EL: return "Beneficial to the patient but not essential for survival."; + case EM: return "An unforeseen combination of circumstances or the resulting state that calls for immediate action."; + case P: return "Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation."; + case PRN: return "An \"as needed\" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition."; + case R: return "Routine service, do at usual work hours."; + case RR: return "A report should be prepared and sent as quickly as possible."; + case S: return "With highest priority (e.g., emergency)."; + case T: return "It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level)."; + case UD: return "Drug is to be used as directed by the prescriber."; + case UR: return "Calls for prompt action."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "ASAP"; + case CR: return "callback results"; + case CS: return "callback for scheduling"; + case CSP: return "callback placer for scheduling"; + case CSR: return "contact recipient for scheduling"; + case EL: return "elective"; + case EM: return "emergency"; + case P: return "preop"; + case PRN: return "as needed"; + case R: return "routine"; + case RR: return "rush reporting"; + case S: return "stat"; + case T: return "timing critical"; + case UD: return "use as directed"; + case UR: return "urgent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriorityEnumFactory.java new file mode 100644 index 00000000000..7056a2ed575 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActPriorityEnumFactory.java @@ -0,0 +1,111 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActPriorityEnumFactory implements EnumFactory { + + public V3ActPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3ActPriority.A; + if ("CR".equals(codeString)) + return V3ActPriority.CR; + if ("CS".equals(codeString)) + return V3ActPriority.CS; + if ("CSP".equals(codeString)) + return V3ActPriority.CSP; + if ("CSR".equals(codeString)) + return V3ActPriority.CSR; + if ("EL".equals(codeString)) + return V3ActPriority.EL; + if ("EM".equals(codeString)) + return V3ActPriority.EM; + if ("P".equals(codeString)) + return V3ActPriority.P; + if ("PRN".equals(codeString)) + return V3ActPriority.PRN; + if ("R".equals(codeString)) + return V3ActPriority.R; + if ("RR".equals(codeString)) + return V3ActPriority.RR; + if ("S".equals(codeString)) + return V3ActPriority.S; + if ("T".equals(codeString)) + return V3ActPriority.T; + if ("UD".equals(codeString)) + return V3ActPriority.UD; + if ("UR".equals(codeString)) + return V3ActPriority.UR; + throw new IllegalArgumentException("Unknown V3ActPriority code '"+codeString+"'"); + } + + public String toCode(V3ActPriority code) { + if (code == V3ActPriority.A) + return "A"; + if (code == V3ActPriority.CR) + return "CR"; + if (code == V3ActPriority.CS) + return "CS"; + if (code == V3ActPriority.CSP) + return "CSP"; + if (code == V3ActPriority.CSR) + return "CSR"; + if (code == V3ActPriority.EL) + return "EL"; + if (code == V3ActPriority.EM) + return "EM"; + if (code == V3ActPriority.P) + return "P"; + if (code == V3ActPriority.PRN) + return "PRN"; + if (code == V3ActPriority.R) + return "R"; + if (code == V3ActPriority.RR) + return "RR"; + if (code == V3ActPriority.S) + return "S"; + if (code == V3ActPriority.T) + return "T"; + if (code == V3ActPriority.UD) + return "UD"; + if (code == V3ActPriority.UR) + return "UR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActReason.java new file mode 100644 index 00000000000..23c42482e53 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActReason.java @@ -0,0 +1,2527 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActReason { + + /** + * Identifies the reason the patient is assigned to this accommodation type + */ + _ACTACCOMMODATIONREASON, + /** + * Accommodation requested is not available. + */ + ACCREQNA, + /** + * Accommodation is assigned for floor convenience. + */ + FLRCNV, + /** + * Required for medical reasons(s). + */ + MEDNEC, + /** + * The Patient requested the action + */ + PAT, + /** + * Description:Codes used to specify reasons or criteria relating to coverage provided under a policy or program. May be used to convey reasons pertaining to coverage contractual provisions, including criteria for eligibility, coverage limitations, coverage maximums, or financial participation required of covered parties. + */ + _ACTCOVERAGEREASON, + /** + * Identifies the reason or rational for why a person is eligibile for benefits under an insurance policy or progam. + + + Examples: A person is a claimant under an automobile insurance policy are client deceased & adopted client has been given a new policy identifier. A new employee is eligible for health insurance as an employment benefit. A person meets a government program eligibility criteria for financial, age or health status. + */ + _ELIGIBILITYACTREASONCODE, + /** + * Identifies the reason or rational for why a person is not eligibile for benefits under an insurance policy. + + Examples are client deceased & adopted client has been given a new policy identifier. + */ + _ACTINELIGIBILITYREASON, + /** + * When a client has no contact with the health system for an extended period, coverage is suspended. Client will be reinstated to original start date upon proof of identification, residency etc. + + Example: Coverage may be suspended during a strike situation, when employer benefits for employees are not covered (i.e. not in effect). + */ + COVSUS, + /** + * Client deceased. + */ + DECSD, + /** + * Client was registered in error. + */ + REGERR, + /** + * Definition: Identifies the reason or rational for why a person is eligibile for benefits under an insurance policy or progam. + + + Examples: A person is a claimant under an automobile insurance policy are client deceased & adopted client has been given a new policy identifier. A new employee is eligible for health insurance as an employment benefit. A person meets a government program eligibility criteria for financial, age or health status. + */ + _COVERAGEELIGIBILITYREASON, + /** + * A person becomes eligible for a program based on age. + + + Example: In the U.S., a person who is 65 years of age or older is eligible for Medicare. + */ + AGE, + /** + * A person becomes eligible for insurance or a program because of crime related health condition or injury. + + + Example: A person is a claimant under the U.S. Crime Victims Compensation program. + */ + CRIME, + /** + * A person becomes a claimant under a disability income insurance policy or a disability rehabilitation program because of a health condition or injury which limits the person's ability to earn an income or function without institutionalization. + */ + DIS, + /** + * A person becomes eligible for insurance provided as an employment benefit based on employment status. + */ + EMPLOY, + /** + * A person becomes eligible for a program based on financial criteria. + + + Example: A person whose family income is below a financial threshold for eligibility for Medicaid or SCHIP. + */ + FINAN, + /** + * A person becomes eligible for a program because of a qualifying health condition or injury. + + + Examples: A person is determined to have a qualifying health conditions include pregnancy, HIV/AIDs, tuberculosis, end stage renal disease, breast or cervical cancer, or other condition requiring specialized health services, hospice, institutional or community based care provided under a program + */ + HEALTH, + /** + * A person becomes eligible for a program based on more than one criterion. + + + Examples: In the U.S., a child whose familiy income meets Medicaid financial thresholds and whose age is less than 18 is eligible for the Early and Periodic Screening, Diagnostic, and Treatment program (EPSDT). A person whose family income meets Medicaid financial thresholds and whose age is 65 years or older is eligible for Medicaid and Medicare, and are referred to as dual eligibles. + */ + MULTI, + /** + * A person becomes a claimant under a property and casualty insurance policy because of a related health condition or injury resulting from a circumstance covered under the terms of the policy. + + + Example: A person is a claimant under a homeowners insurance policy because of an injury sustained on the policyholderaTMs premises. + */ + PNC, + /** + * A person becomes eligible for a program based on statutory criteria. + + + Examples: A person is a member of an indigenous group, a veteran of military service, or in the U.S., a recipient of adoption assistance and foster care under Title IV-E of the Social Security. + */ + STATUTORY, + /** + * A person becomes a claimant under a motor vehicle accident insurance because of a motor vehicle accident related health condition or injury. + */ + VEHIC, + /** + * A person becomes eligible for insurance or a program because of a work related health condition or injury. + + + Example: A person is a claimant under the U.S. Black Lung Program. + */ + WORK, + /** + * Description:The rationale or purpose for an act relating to information management, such as archiving information for the purpose of complying with an enterprise data retention policy. + */ + _ACTINFORMATIONMANAGEMENTREASON, + /** + * Description:The rationale or purpose for an act relating to health information management, such as archiving information for the purpose of complying with an organization policy or jurisdictional law relating to data retention. + */ + _ACTHEALTHINFORMATIONMANAGEMENTREASON, + /** + * To perform one or more operations on information to which the patient has not consented as deemed necessary by authorized entities for providing care in the best interest of the patient; providing immediately needed health care for an emergent condition; or for protecting public or third party safety. + + + Usage Notes: Used to convey the reason that a provider or other entity may or has accessed personal healthcare information. Typically, this involves overriding the subject's consent directives. + */ + _ACTCONSENTINFORMATIONACCESSOVERRIDEREASON, + /** + * To perform one or more operations on information to which the patient has not consented by authorized entities for treating a condition which poses an immediate threat to the patient's health and which requires immediate medical intervention. + + + Usage Notes: The patient is unable to provide consent, but the provider determines they have an urgent healthcare related reason to access the record. + */ + OVRER, + /** + * To perform one or more operations on information to which the patient declined to consent for providing health care. + + + Usage Notes: The patient, while able to give consent, has not. However the provider believes it is in the patient's interest to access the record without patient consent. + */ + OVRPJ, + /** + * To perform one or more operations on information to which the patient has not consented for public safety reasons. + + + Usage Notes: The patient, while able to give consent, has not. However, the provider believes that access to masked patient information is justified because of concerns related to public safety. + */ + OVRPS, + /** + * To perform one or more operations on information to which the patient has not consented for third party safety. + + + Usage Notes: The patient, while able to give consent, has not. However, the provider believes that access to masked patient information is justified because of concerns related to the health and safety of one or more third parties. + */ + OVRTPS, + /** + * Reason for performing one or more operations on information, which may be permitted by source system's security policy in accordance with one or more privacy policies and consent directives. + + + Usage Notes: The rationale or purpose for an act relating to the management of personal health information, such as collecting personal health information for research or public health purposes. + */ + PURPOSEOFUSE, + /** + * To perform one or more operations on information for marketing services and products related to health care. + */ + HMARKT, + /** + * To perform one or more operations on information used for conducting administrative and contractual activities related to the provision of health care. + */ + HOPERAT, + /** + * To perform one or more operations on information used for cadaveric organ, eye or tissue donation. + */ + DONAT, + /** + * To perform one or more operations on information used for fraud detection and prevention processes. + */ + FRAUD, + /** + * To perform one or more operations on information used within government processes. + */ + GOV, + /** + * To perform one or more operations on information for conducting activities related to meeting accreditation criteria. + */ + HACCRED, + /** + * To perform one or more operations on information used for conducting activities required to meet a mandate. + */ + HCOMPL, + /** + * To perform one or more operations on information used for handling deceased patient matters. + */ + HDECD, + /** + * To perform one or more operation operations on information used to manage a patient directory. + + + Examples: + + + + facility + enterprise + payer + health information exchange patient directory + */ + HDIRECT, + /** + * To perform one or more operations on information for conducting activities required by legal proceeding. + */ + HLEGAL, + /** + * To perform one or more operations on information used for assessing results and comparative effectiveness achieved by health care practices and interventions. + */ + HOUTCOMS, + /** + * To perform one or more operations on information used for conducting activities to meet program accounting requirements. + */ + HPRGRP, + /** + * To perform one or more operations on information used for conducting administrative activities to improve health care quality. + */ + HQUALIMP, + /** + * To perform one or more operations on information to administer the electronic systems used for the delivery of health care. + */ + HSYSADMIN, + /** + * To perform one or more operations on information to administer health care coverage to an enrollee under a policy or program. + */ + MEMADMIN, + /** + * To perform one or more operations on information used for operational activities conducted to administer the delivery of health care to a patient. + */ + PATADMIN, + /** + * To perform one or more operations on information in processes related to ensuring the safety of health care. + */ + PATSFTY, + /** + * To perform one or more operations on information used for monitoring performance of recommended health care practices and interventions. + */ + PERFMSR, + /** + * To perform one or more operations on information used within the health records management process. + */ + RECORDMGT, + /** + * To perform one or more operations on information used in training and education. + */ + TRAIN, + /** + * To perform one or more operations on information for conducting financial or contractual activities related to payment for provision of health care. + */ + HPAYMT, + /** + * To perform one or more operations on information for provision of additional clinical evidence in support of a request for coverage or payment for health services. + */ + CLMATTCH, + /** + * To perform one or more operations on information for conducting prior authorization or predetermination of coverage for services. + */ + COVAUTH, + /** + * To perform one or more operations on information for conducting activities related to coverage under a program or policy. + */ + COVERAGE, + /** + * To perform one or more operations on information used for conducting eligibility determination for coverage in a program or policy. May entail review of financial status or disability assessment. + */ + ELIGDTRM, + /** + * To perform one or more operations on information used for conducting eligibility verification of coverage in a program or policy. May entail provider contacting coverage source (e.g., government health program such as workers compensation or health plan) for confirmation of enrollment, eligibility for specific services, and any applicable copays. + */ + ELIGVER, + /** + * To perform one or more operations on information used for enrolling a covered party in a program or policy. May entail recording of covered party's and any dependent's demographic information and benefit choices. + */ + ENROLLM, + /** + * To perform one or more operations on information about the amount remitted for a health care claim. + */ + REMITADV, + /** + * To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge. + */ + HRESCH, + /** + * To perform one or more operations on information for conducting scientific investigations in accordance with clinical trial protocols to obtain health care knowledge. + */ + CLINTRCH, + /** + * To perform one or more operations on information in response to a patient's request. + */ + PATRQT, + /** + * To perform one or more operations on information in response to a request by a family member authorized by the patient. + */ + FAMRQT, + /** + * To perform one or more operations on information in response to a request by a person appointed as the patient's legal representative. + */ + PWATRNY, + /** + * To perform one or more operations on information in response to a request by a person authorized by the patient. + */ + SUPNWK, + /** + * To perform one or more operations on information for conducting public health activities, such as the reporting of notifiable conditions. + */ + PUBHLTH, + /** + * To perform one or more operations on information used for provision of immediately needed health care to a population of living subjects located in a disaster zone. + */ + DISASTER, + /** + * To perform one or more operations on information used to prevent injury or disease to living subjects who may be the target of violence. + */ + THREAT, + /** + * To perform one or more operations on information for provision of health care. + */ + TREAT, + /** + * To perform one or more operations on information for provision of health care coordination. + */ + CAREMGT, + /** + * To perform health care as part of the clinical trial protocol. + */ + CLINTRL, + /** + * To perform one or more operations on information for provision of immediately needed health care for an emergent condition. + */ + ETREAT, + /** + * To perform one or more operations on information for provision of health care to a population of living subjects, e.g., needle exchange program. + */ + POPHLTH, + /** + * Description:The rationale or purpose for an act relating to the management of personal information, such as disclosing personal tax information for the purpose of complying with a court order. + */ + _ACTINFORMATIONPRIVACYREASON, + /** + * Description: + */ + MARKT, + /** + * Description:Administrative and contractual processes required to support an activity, product, or service + */ + OPERAT, + /** + * Definition:To provide information as a result of a subpoena. + */ + LEGAL, + /** + * Description:Operational activities conducted for the purposes of meeting of criteria defined by an accrediting entity for an activity, product, or service + */ + ACCRED, + /** + * Description:Operational activities required to meet a mandate related to an activity, product, or service + */ + COMPL, + /** + * Description:Operational activities conducted to administer information relating to entities involves with an activity, product, or service + */ + ENADMIN, + /** + * Description:Operational activities conducted for the purposes of assessing the results of an activity, product, or service + */ + OUTCOMS, + /** + * Description:Operational activities conducted to meet program accounting requirements related to an activity, product, or service + */ + PRGRPT, + /** + * Description:Operational activities conducted for the purposes of improving the quality of an activity, product, or service + */ + QUALIMP, + /** + * Description:Operational activities conducted to administer the electronic systems used for an activity, product, or service + */ + SYSADMN, + /** + * Description:Administrative, financial, and contractual processes related to payment for an activity, product, or service + */ + PAYMT, + /** + * Description:Investigative activities conducted for the purposes of obtaining knowledge + */ + RESCH, + /** + * Description:Provision of a service, product, or capability to an individual or organization + */ + SRVC, + /** + * Description: Types of reasons why a substance is invalid for use. + */ + _ACTINVALIDREASON, + /** + * Description: Storage conditions caused the substance to be ineffective. + */ + ADVSTORAGE, + /** + * Description: Cold chain was not maintained for the substance. + */ + COLDCHNBRK, + /** + * Description: The lot from which the substance was drawn was expired. + */ + EXPLOT, + /** + * The substance was administered outside of the recommended schedule or practice. + */ + OUTSIDESCHED, + /** + * Description: The substance was recalled by the manufacturer. + */ + PRODRECALL, + /** + * Domain specifies the codes used to describe reasons why a Provider is cancelling an Invoice or Invoice Grouping. + */ + _ACTINVOICECANCELREASON, + /** + * The covered party (patient) specified with the Invoice is not correct. + */ + INCCOVPTY, + /** + * The billing information, specified in the Invoice Elements, is not correct. This could include incorrect costing for items included in the Invoice. + */ + INCINVOICE, + /** + * The policy specified with the Invoice is not correct. For example, it may belong to another Adjudicator or Covered Party. + */ + INCPOLICY, + /** + * The provider specified with the Invoice is not correct. + */ + INCPROV, + /** + * A coded description of the reason for why a patient did not receive a scheduled immunization. + + (important for public health strategy + */ + _ACTNOIMMUNIZATIONREASON, + /** + * Definition:Testing has shown that the patient already has immunity to the agent targeted by the immunization. + */ + IMMUNE, + /** + * Definition:The patient currently has a medical condition for which the vaccine is contraindicated or for which precaution is warranted. + */ + MEDPREC, + /** + * Definition:There was no supply of the product on hand to perform the service. + */ + OSTOCK, + /** + * Definition:The patient or their guardian objects to receiving the vaccine. + */ + PATOBJ, + /** + * Definition:The patient or their guardian objects to receiving the vaccine because of philosophical beliefs. + */ + PHILISOP, + /** + * Definition:The patient or their guardian objects to receiving the vaccine on religious grounds. + */ + RELIG, + /** + * Definition:The intended vaccine has expired or is otherwise believed to no longer be effective. + + + Example:Due to temperature exposure. + */ + VACEFF, + /** + * Definition:The patient or their guardian objects to receiving the vaccine because of concerns over its safety. + */ + VACSAF, + /** + * Indicates why a fulfiller refused to fulfill a supply order, and considered it important to notify other providers of their decision. E.g. "Suspect fraud", "Possible abuse", "Contraindicated". + + (used when capturing 'refusal to fill' annotations) + */ + _ACTSUPPLYFULFILLMENTREFUSALREASON, + /** + * Definition:The order has been stopped by the prescriber but this fact has not necessarily captured electronically. + + + Example:A verbal stop, a fax, etc. + */ + FRR01, + /** + * Definition:Order has not been fulfilled within a reasonable amount of time, and may not be current. + */ + FRR02, + /** + * Definition:Data needed to safely act on the order which was expected to become available independent of the order is not yet available + + + Example:Lab results, diagnostic imaging, etc. + */ + FRR03, + /** + * Definition:Product not available or manufactured. Cannot supply. + */ + FRR04, + /** + * Definition:The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product. + */ + FRR05, + /** + * Definition:Fulfiller not able to provide appropriate care associated with fulfilling the order. + + + Example:Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc. + */ + FRR06, + /** + * Definition:Specifies the reason that an event occurred in a clinical research study. + */ + _CLINICALRESEARCHEVENTREASON, + /** + * Definition:The event occurred so that a test or observation performed at a prior event could be performed again due to conditions set forth in the protocol. + */ + RET, + /** + * Definition:The event occurred due to it being scheduled in the research protocol. + */ + SCH, + /** + * Definition:The event occurred in order to terminate the subject's participation in the study. + */ + TRM, + /** + * Definition:The event that occurred was initiated by a study participant (e.g. the subject or the investigator), and did not occur for protocol reasons. + */ + UNS, + /** + * Definition:SSpecifies the reason that a test was performed or observation collected in a clinical research study. + + + Note:This set of codes are not strictly reasons, but are used in the currently Normative standard. Future revisions of the specification will model these as ActRelationships and thes codes may subsequently be retired. Thus, these codes should not be used for new specifications. + */ + _CLINICALRESEARCHOBSERVATIONREASON, + /** + * Definition:The observation or test was neither defined or scheduled in the study protocol. + */ + NPT, + /** + * Definition:The observation or test occurred due to it being defined in the research protocol, and during an activity or event that was scheduled in the protocol. + */ + PPT, + /** + * :The observation or test occurred as defined in the research protocol, but at a point in time not specified in the study protocol. + */ + UPT, + /** + * Description:Indicates why the prescription should be suspended. + */ + _COMBINEDPHARMACYORDERSUSPENDREASONCODE, + /** + * Description:This therapy has been ordered as a backup to a preferred therapy. This order will be released when and if the preferred therapy is unsuccessful. + */ + ALTCHOICE, + /** + * Description:Clarification is required before the order can be acted upon. + */ + CLARIF, + /** + * Description:The current level of the medication in the patient's system is too high. The medication is suspended to allow the level to subside to a safer level. + */ + DRUGHIGH, + /** + * Description:The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. + */ + HOSPADM, + /** + * Description:The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. + */ + LABINT, + /** + * Description:Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. + */ + NONAVAIL, + /** + * Description:The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. + */ + PREG, + /** + * Description:The patient is believed to be allergic to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. + */ + SALG, + /** + * Description:The drug interacts with a short-term treatment that is more urgently required. This order will be resumed when the short-term treatment is complete. + */ + SDDI, + /** + * Description:Another short-term co-occurring therapy fulfills the same purpose as this therapy. This therapy will be resumed when the co-occuring therapy is complete. + */ + SDUPTHER, + /** + * Description:The patient is believed to have an intolerance to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. + */ + SINTOL, + /** + * Description:The drug is contraindicated for patients receiving surgery and the patient is scheduled to be admitted for surgery in the near future. The drug will be resumed when the patient has sufficiently recovered from the surgery. + */ + SURG, + /** + * Description:The patient was previously receiving a medication contraindicated with the current medication. The current medication will remain on hold until the prior medication has been cleansed from their system. + */ + WASHOUT, + /** + * Description:Identifies reasons for nullifying (retracting) a particular control act. + */ + _CONTROLACTNULLIFICATIONREASONCODE, + /** + * Description:The decision on which the recorded information was based was changed before the decision had an effect. + + + Example:Aborted prescription before patient left office, released prescription before suspend took effect. + */ + ALTD, + /** + * Description:The information was recorded incorrectly or was recorded in the wrong record. + */ + EIE, + /** + * Description: There is no match for the record in the database. + */ + NORECMTCH, + /** + * Description: Reasons to refuse a transaction to be undone. + */ + _CONTROLACTNULLIFICATIONREFUSALREASONTYPE, + /** + * The record is already in the requested state. + */ + INRQSTATE, + /** + * Description: There is no match. + */ + NOMATCH, + /** + * Description: There is no match for the product in the master file repository. + */ + NOPRODMTCH, + /** + * Description: There is no match for the service in the master file repository. + */ + NOSERMTCH, + /** + * Description: There is no match for the record and version. + */ + NOVERMTCH, + /** + * Description: There is no permission. + */ + NOPERM, + /** + * Definition:The user does not have permission + */ + NOUSERPERM, + /** + * Description: The agent does not have permission. + */ + NOAGNTPERM, + /** + * Description: The user does not have permission. + */ + NOUSRPERM, + /** + * Description: The record and version requested to update is not the current version. + */ + WRNGVER, + /** + * Identifies why a specific query, request, or other trigger event occurred. + */ + _CONTROLACTREASON, + /** + * Description:Indicates the reason the medication order should be aborted. + */ + _MEDICATIONORDERABORTREASONCODE, + /** + * Description:The medication is no longer being manufactured or is otherwise no longer available. + */ + DISCONT, + /** + * Description:The therapy has been found to not have the desired therapeutic benefit on the patient. + */ + INEFFECT, + /** + * Description:Monitoring the patient while taking the medication, the decision has been made that the therapy is no longer appropriate. + */ + MONIT, + /** + * Description:The underlying condition has been resolved or has evolved such that a different treatment is no longer needed. + */ + NOREQ, + /** + * Description:The product does not have (or no longer has) coverage under the patientaTMs insurance policy. + */ + NOTCOVER, + /** + * Description:The patient refused to take the product. + */ + PREFUS, + /** + * Description:The manufacturer or other agency has requested that stocks of a medication be removed from circulation. + */ + RECALL, + /** + * Description:Item in current order is no longer in use as requested and a new one has/will be created to replace it. + */ + REPLACE, + /** + * Description:The medication is being re-prescribed at a different dosage. + */ + DOSECHG, + /** + * Description:Current order was issued with incorrect data and a new order has/will be created to replace it. + */ + REPLACEFIX, + /** + * Description: { + + public V3ActReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccommodationReason".equals(codeString)) + return V3ActReason._ACTACCOMMODATIONREASON; + if ("ACCREQNA".equals(codeString)) + return V3ActReason.ACCREQNA; + if ("FLRCNV".equals(codeString)) + return V3ActReason.FLRCNV; + if ("MEDNEC".equals(codeString)) + return V3ActReason.MEDNEC; + if ("PAT".equals(codeString)) + return V3ActReason.PAT; + if ("_ActCoverageReason".equals(codeString)) + return V3ActReason._ACTCOVERAGEREASON; + if ("_EligibilityActReasonCode".equals(codeString)) + return V3ActReason._ELIGIBILITYACTREASONCODE; + if ("_ActIneligibilityReason".equals(codeString)) + return V3ActReason._ACTINELIGIBILITYREASON; + if ("COVSUS".equals(codeString)) + return V3ActReason.COVSUS; + if ("DECSD".equals(codeString)) + return V3ActReason.DECSD; + if ("REGERR".equals(codeString)) + return V3ActReason.REGERR; + if ("_CoverageEligibilityReason".equals(codeString)) + return V3ActReason._COVERAGEELIGIBILITYREASON; + if ("AGE".equals(codeString)) + return V3ActReason.AGE; + if ("CRIME".equals(codeString)) + return V3ActReason.CRIME; + if ("DIS".equals(codeString)) + return V3ActReason.DIS; + if ("EMPLOY".equals(codeString)) + return V3ActReason.EMPLOY; + if ("FINAN".equals(codeString)) + return V3ActReason.FINAN; + if ("HEALTH".equals(codeString)) + return V3ActReason.HEALTH; + if ("MULTI".equals(codeString)) + return V3ActReason.MULTI; + if ("PNC".equals(codeString)) + return V3ActReason.PNC; + if ("STATUTORY".equals(codeString)) + return V3ActReason.STATUTORY; + if ("VEHIC".equals(codeString)) + return V3ActReason.VEHIC; + if ("WORK".equals(codeString)) + return V3ActReason.WORK; + if ("_ActInformationManagementReason".equals(codeString)) + return V3ActReason._ACTINFORMATIONMANAGEMENTREASON; + if ("_ActHealthInformationManagementReason".equals(codeString)) + return V3ActReason._ACTHEALTHINFORMATIONMANAGEMENTREASON; + if ("_ActConsentInformationAccessOverrideReason".equals(codeString)) + return V3ActReason._ACTCONSENTINFORMATIONACCESSOVERRIDEREASON; + if ("OVRER".equals(codeString)) + return V3ActReason.OVRER; + if ("OVRPJ".equals(codeString)) + return V3ActReason.OVRPJ; + if ("OVRPS".equals(codeString)) + return V3ActReason.OVRPS; + if ("OVRTPS".equals(codeString)) + return V3ActReason.OVRTPS; + if ("PurposeOfUse".equals(codeString)) + return V3ActReason.PURPOSEOFUSE; + if ("HMARKT".equals(codeString)) + return V3ActReason.HMARKT; + if ("HOPERAT".equals(codeString)) + return V3ActReason.HOPERAT; + if ("DONAT".equals(codeString)) + return V3ActReason.DONAT; + if ("FRAUD".equals(codeString)) + return V3ActReason.FRAUD; + if ("GOV".equals(codeString)) + return V3ActReason.GOV; + if ("HACCRED".equals(codeString)) + return V3ActReason.HACCRED; + if ("HCOMPL".equals(codeString)) + return V3ActReason.HCOMPL; + if ("HDECD".equals(codeString)) + return V3ActReason.HDECD; + if ("HDIRECT".equals(codeString)) + return V3ActReason.HDIRECT; + if ("HLEGAL".equals(codeString)) + return V3ActReason.HLEGAL; + if ("HOUTCOMS".equals(codeString)) + return V3ActReason.HOUTCOMS; + if ("HPRGRP".equals(codeString)) + return V3ActReason.HPRGRP; + if ("HQUALIMP".equals(codeString)) + return V3ActReason.HQUALIMP; + if ("HSYSADMIN".equals(codeString)) + return V3ActReason.HSYSADMIN; + if ("MEMADMIN".equals(codeString)) + return V3ActReason.MEMADMIN; + if ("PATADMIN".equals(codeString)) + return V3ActReason.PATADMIN; + if ("PATSFTY".equals(codeString)) + return V3ActReason.PATSFTY; + if ("PERFMSR".equals(codeString)) + return V3ActReason.PERFMSR; + if ("RECORDMGT".equals(codeString)) + return V3ActReason.RECORDMGT; + if ("TRAIN".equals(codeString)) + return V3ActReason.TRAIN; + if ("HPAYMT".equals(codeString)) + return V3ActReason.HPAYMT; + if ("CLMATTCH".equals(codeString)) + return V3ActReason.CLMATTCH; + if ("COVAUTH".equals(codeString)) + return V3ActReason.COVAUTH; + if ("COVERAGE".equals(codeString)) + return V3ActReason.COVERAGE; + if ("ELIGDTRM".equals(codeString)) + return V3ActReason.ELIGDTRM; + if ("ELIGVER".equals(codeString)) + return V3ActReason.ELIGVER; + if ("ENROLLM".equals(codeString)) + return V3ActReason.ENROLLM; + if ("REMITADV".equals(codeString)) + return V3ActReason.REMITADV; + if ("HRESCH".equals(codeString)) + return V3ActReason.HRESCH; + if ("CLINTRCH".equals(codeString)) + return V3ActReason.CLINTRCH; + if ("PATRQT".equals(codeString)) + return V3ActReason.PATRQT; + if ("FAMRQT".equals(codeString)) + return V3ActReason.FAMRQT; + if ("PWATRNY".equals(codeString)) + return V3ActReason.PWATRNY; + if ("SUPNWK".equals(codeString)) + return V3ActReason.SUPNWK; + if ("PUBHLTH".equals(codeString)) + return V3ActReason.PUBHLTH; + if ("DISASTER".equals(codeString)) + return V3ActReason.DISASTER; + if ("THREAT".equals(codeString)) + return V3ActReason.THREAT; + if ("TREAT".equals(codeString)) + return V3ActReason.TREAT; + if ("CAREMGT".equals(codeString)) + return V3ActReason.CAREMGT; + if ("CLINTRL".equals(codeString)) + return V3ActReason.CLINTRL; + if ("ETREAT".equals(codeString)) + return V3ActReason.ETREAT; + if ("POPHLTH".equals(codeString)) + return V3ActReason.POPHLTH; + if ("_ActInformationPrivacyReason".equals(codeString)) + return V3ActReason._ACTINFORMATIONPRIVACYREASON; + if ("MARKT".equals(codeString)) + return V3ActReason.MARKT; + if ("OPERAT".equals(codeString)) + return V3ActReason.OPERAT; + if ("LEGAL".equals(codeString)) + return V3ActReason.LEGAL; + if ("ACCRED".equals(codeString)) + return V3ActReason.ACCRED; + if ("COMPL".equals(codeString)) + return V3ActReason.COMPL; + if ("ENADMIN".equals(codeString)) + return V3ActReason.ENADMIN; + if ("OUTCOMS".equals(codeString)) + return V3ActReason.OUTCOMS; + if ("PRGRPT".equals(codeString)) + return V3ActReason.PRGRPT; + if ("QUALIMP".equals(codeString)) + return V3ActReason.QUALIMP; + if ("SYSADMN".equals(codeString)) + return V3ActReason.SYSADMN; + if ("PAYMT".equals(codeString)) + return V3ActReason.PAYMT; + if ("RESCH".equals(codeString)) + return V3ActReason.RESCH; + if ("SRVC".equals(codeString)) + return V3ActReason.SRVC; + if ("_ActInvalidReason".equals(codeString)) + return V3ActReason._ACTINVALIDREASON; + if ("ADVSTORAGE".equals(codeString)) + return V3ActReason.ADVSTORAGE; + if ("COLDCHNBRK".equals(codeString)) + return V3ActReason.COLDCHNBRK; + if ("EXPLOT".equals(codeString)) + return V3ActReason.EXPLOT; + if ("OUTSIDESCHED".equals(codeString)) + return V3ActReason.OUTSIDESCHED; + if ("PRODRECALL".equals(codeString)) + return V3ActReason.PRODRECALL; + if ("_ActInvoiceCancelReason".equals(codeString)) + return V3ActReason._ACTINVOICECANCELREASON; + if ("INCCOVPTY".equals(codeString)) + return V3ActReason.INCCOVPTY; + if ("INCINVOICE".equals(codeString)) + return V3ActReason.INCINVOICE; + if ("INCPOLICY".equals(codeString)) + return V3ActReason.INCPOLICY; + if ("INCPROV".equals(codeString)) + return V3ActReason.INCPROV; + if ("_ActNoImmunizationReason".equals(codeString)) + return V3ActReason._ACTNOIMMUNIZATIONREASON; + if ("IMMUNE".equals(codeString)) + return V3ActReason.IMMUNE; + if ("MEDPREC".equals(codeString)) + return V3ActReason.MEDPREC; + if ("OSTOCK".equals(codeString)) + return V3ActReason.OSTOCK; + if ("PATOBJ".equals(codeString)) + return V3ActReason.PATOBJ; + if ("PHILISOP".equals(codeString)) + return V3ActReason.PHILISOP; + if ("RELIG".equals(codeString)) + return V3ActReason.RELIG; + if ("VACEFF".equals(codeString)) + return V3ActReason.VACEFF; + if ("VACSAF".equals(codeString)) + return V3ActReason.VACSAF; + if ("_ActSupplyFulfillmentRefusalReason".equals(codeString)) + return V3ActReason._ACTSUPPLYFULFILLMENTREFUSALREASON; + if ("FRR01".equals(codeString)) + return V3ActReason.FRR01; + if ("FRR02".equals(codeString)) + return V3ActReason.FRR02; + if ("FRR03".equals(codeString)) + return V3ActReason.FRR03; + if ("FRR04".equals(codeString)) + return V3ActReason.FRR04; + if ("FRR05".equals(codeString)) + return V3ActReason.FRR05; + if ("FRR06".equals(codeString)) + return V3ActReason.FRR06; + if ("_ClinicalResearchEventReason".equals(codeString)) + return V3ActReason._CLINICALRESEARCHEVENTREASON; + if ("RET".equals(codeString)) + return V3ActReason.RET; + if ("SCH".equals(codeString)) + return V3ActReason.SCH; + if ("TRM".equals(codeString)) + return V3ActReason.TRM; + if ("UNS".equals(codeString)) + return V3ActReason.UNS; + if ("_ClinicalResearchObservationReason".equals(codeString)) + return V3ActReason._CLINICALRESEARCHOBSERVATIONREASON; + if ("NPT".equals(codeString)) + return V3ActReason.NPT; + if ("PPT".equals(codeString)) + return V3ActReason.PPT; + if ("UPT".equals(codeString)) + return V3ActReason.UPT; + if ("_CombinedPharmacyOrderSuspendReasonCode".equals(codeString)) + return V3ActReason._COMBINEDPHARMACYORDERSUSPENDREASONCODE; + if ("ALTCHOICE".equals(codeString)) + return V3ActReason.ALTCHOICE; + if ("CLARIF".equals(codeString)) + return V3ActReason.CLARIF; + if ("DRUGHIGH".equals(codeString)) + return V3ActReason.DRUGHIGH; + if ("HOSPADM".equals(codeString)) + return V3ActReason.HOSPADM; + if ("LABINT".equals(codeString)) + return V3ActReason.LABINT; + if ("NON-AVAIL".equals(codeString)) + return V3ActReason.NONAVAIL; + if ("PREG".equals(codeString)) + return V3ActReason.PREG; + if ("SALG".equals(codeString)) + return V3ActReason.SALG; + if ("SDDI".equals(codeString)) + return V3ActReason.SDDI; + if ("SDUPTHER".equals(codeString)) + return V3ActReason.SDUPTHER; + if ("SINTOL".equals(codeString)) + return V3ActReason.SINTOL; + if ("SURG".equals(codeString)) + return V3ActReason.SURG; + if ("WASHOUT".equals(codeString)) + return V3ActReason.WASHOUT; + if ("_ControlActNullificationReasonCode".equals(codeString)) + return V3ActReason._CONTROLACTNULLIFICATIONREASONCODE; + if ("ALTD".equals(codeString)) + return V3ActReason.ALTD; + if ("EIE".equals(codeString)) + return V3ActReason.EIE; + if ("NORECMTCH".equals(codeString)) + return V3ActReason.NORECMTCH; + if ("_ControlActNullificationRefusalReasonType".equals(codeString)) + return V3ActReason._CONTROLACTNULLIFICATIONREFUSALREASONTYPE; + if ("INRQSTATE".equals(codeString)) + return V3ActReason.INRQSTATE; + if ("NOMATCH".equals(codeString)) + return V3ActReason.NOMATCH; + if ("NOPRODMTCH".equals(codeString)) + return V3ActReason.NOPRODMTCH; + if ("NOSERMTCH".equals(codeString)) + return V3ActReason.NOSERMTCH; + if ("NOVERMTCH".equals(codeString)) + return V3ActReason.NOVERMTCH; + if ("NOPERM".equals(codeString)) + return V3ActReason.NOPERM; + if ("NOUSERPERM".equals(codeString)) + return V3ActReason.NOUSERPERM; + if ("NOAGNTPERM".equals(codeString)) + return V3ActReason.NOAGNTPERM; + if ("NOUSRPERM".equals(codeString)) + return V3ActReason.NOUSRPERM; + if ("WRNGVER".equals(codeString)) + return V3ActReason.WRNGVER; + if ("_ControlActReason".equals(codeString)) + return V3ActReason._CONTROLACTREASON; + if ("_MedicationOrderAbortReasonCode".equals(codeString)) + return V3ActReason._MEDICATIONORDERABORTREASONCODE; + if ("DISCONT".equals(codeString)) + return V3ActReason.DISCONT; + if ("INEFFECT".equals(codeString)) + return V3ActReason.INEFFECT; + if ("MONIT".equals(codeString)) + return V3ActReason.MONIT; + if ("NOREQ".equals(codeString)) + return V3ActReason.NOREQ; + if ("NOTCOVER".equals(codeString)) + return V3ActReason.NOTCOVER; + if ("PREFUS".equals(codeString)) + return V3ActReason.PREFUS; + if ("RECALL".equals(codeString)) + return V3ActReason.RECALL; + if ("REPLACE".equals(codeString)) + return V3ActReason.REPLACE; + if ("DOSECHG".equals(codeString)) + return V3ActReason.DOSECHG; + if ("REPLACEFIX".equals(codeString)) + return V3ActReason.REPLACEFIX; + if ("UNABLE".equals(codeString)) + return V3ActReason.UNABLE; + if ("_MedicationOrderReleaseReasonCode".equals(codeString)) + return V3ActReason._MEDICATIONORDERRELEASEREASONCODE; + if ("HOLDDONE".equals(codeString)) + return V3ActReason.HOLDDONE; + if ("HOLDINAP".equals(codeString)) + return V3ActReason.HOLDINAP; + if ("_ModifyPrescriptionReasonType".equals(codeString)) + return V3ActReason._MODIFYPRESCRIPTIONREASONTYPE; + if ("ADMINERROR".equals(codeString)) + return V3ActReason.ADMINERROR; + if ("CLINMOD".equals(codeString)) + return V3ActReason.CLINMOD; + if ("_PharmacySupplyEventAbortReason".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYEVENTABORTREASON; + if ("CONTRA".equals(codeString)) + return V3ActReason.CONTRA; + if ("FOABORT".equals(codeString)) + return V3ActReason.FOABORT; + if ("FOSUSP".equals(codeString)) + return V3ActReason.FOSUSP; + if ("NOPICK".equals(codeString)) + return V3ActReason.NOPICK; + if ("PATDEC".equals(codeString)) + return V3ActReason.PATDEC; + if ("QUANTCHG".equals(codeString)) + return V3ActReason.QUANTCHG; + if ("_PharmacySupplyEventStockReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYEVENTSTOCKREASONCODE; + if ("FLRSTCK".equals(codeString)) + return V3ActReason.FLRSTCK; + if ("LTC".equals(codeString)) + return V3ActReason.LTC; + if ("OFFICE".equals(codeString)) + return V3ActReason.OFFICE; + if ("PHARM".equals(codeString)) + return V3ActReason.PHARM; + if ("PROG".equals(codeString)) + return V3ActReason.PROG; + if ("_PharmacySupplyRequestRenewalRefusalReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYREQUESTRENEWALREFUSALREASONCODE; + if ("ALREADYRX".equals(codeString)) + return V3ActReason.ALREADYRX; + if ("FAMPHYS".equals(codeString)) + return V3ActReason.FAMPHYS; + if ("MODIFY".equals(codeString)) + return V3ActReason.MODIFY; + if ("NEEDAPMT".equals(codeString)) + return V3ActReason.NEEDAPMT; + if ("NOTAVAIL".equals(codeString)) + return V3ActReason.NOTAVAIL; + if ("NOTPAT".equals(codeString)) + return V3ActReason.NOTPAT; + if ("ONHOLD".equals(codeString)) + return V3ActReason.ONHOLD; + if ("PRNA".equals(codeString)) + return V3ActReason.PRNA; + if ("STOPMED".equals(codeString)) + return V3ActReason.STOPMED; + if ("TOOEARLY".equals(codeString)) + return V3ActReason.TOOEARLY; + if ("_SupplyOrderAbortReasonCode".equals(codeString)) + return V3ActReason._SUPPLYORDERABORTREASONCODE; + if ("IMPROV".equals(codeString)) + return V3ActReason.IMPROV; + if ("INTOL".equals(codeString)) + return V3ActReason.INTOL; + if ("NEWSTR".equals(codeString)) + return V3ActReason.NEWSTR; + if ("NEWTHER".equals(codeString)) + return V3ActReason.NEWTHER; + if ("_GenericUpdateReasonCode".equals(codeString)) + return V3ActReason._GENERICUPDATEREASONCODE; + if ("CHGDATA".equals(codeString)) + return V3ActReason.CHGDATA; + if ("FIXDATA".equals(codeString)) + return V3ActReason.FIXDATA; + if ("MDATA".equals(codeString)) + return V3ActReason.MDATA; + if ("NEWDATA".equals(codeString)) + return V3ActReason.NEWDATA; + if ("UMDATA".equals(codeString)) + return V3ActReason.UMDATA; + if ("_PatientProfileQueryReasonCode".equals(codeString)) + return V3ActReason._PATIENTPROFILEQUERYREASONCODE; + if ("ADMREV".equals(codeString)) + return V3ActReason.ADMREV; + if ("PATCAR".equals(codeString)) + return V3ActReason.PATCAR; + if ("PATREQ".equals(codeString)) + return V3ActReason.PATREQ; + if ("PRCREV".equals(codeString)) + return V3ActReason.PRCREV; + if ("REGUL".equals(codeString)) + return V3ActReason.REGUL; + if ("RSRCH".equals(codeString)) + return V3ActReason.RSRCH; + if ("VALIDATION".equals(codeString)) + return V3ActReason.VALIDATION; + if ("_PharmacySupplyRequestFulfillerRevisionRefusalReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYREQUESTFULFILLERREVISIONREFUSALREASONCODE; + if ("LOCKED".equals(codeString)) + return V3ActReason.LOCKED; + if ("UNKWNTARGET".equals(codeString)) + return V3ActReason.UNKWNTARGET; + if ("_RefusalReasonCode".equals(codeString)) + return V3ActReason._REFUSALREASONCODE; + if ("_SchedulingActReason".equals(codeString)) + return V3ActReason._SCHEDULINGACTREASON; + if ("BLK".equals(codeString)) + return V3ActReason.BLK; + if ("DEC".equals(codeString)) + return V3ActReason.DEC; + if ("FIN".equals(codeString)) + return V3ActReason.FIN; + if ("MED".equals(codeString)) + return V3ActReason.MED; + if ("MTG".equals(codeString)) + return V3ActReason.MTG; + if ("PHY".equals(codeString)) + return V3ActReason.PHY; + if ("_StatusRevisionRefusalReasonCode".equals(codeString)) + return V3ActReason._STATUSREVISIONREFUSALREASONCODE; + if ("FILLED".equals(codeString)) + return V3ActReason.FILLED; + if ("_SubstanceAdministrationPermissionRefusalReasonCode".equals(codeString)) + return V3ActReason._SUBSTANCEADMINISTRATIONPERMISSIONREFUSALREASONCODE; + if ("PATINELIG".equals(codeString)) + return V3ActReason.PATINELIG; + if ("PROTUNMET".equals(codeString)) + return V3ActReason.PROTUNMET; + if ("PROVUNAUTH".equals(codeString)) + return V3ActReason.PROVUNAUTH; + if ("_SubstanceAdminSubstitutionNotAllowedReason".equals(codeString)) + return V3ActReason._SUBSTANCEADMINSUBSTITUTIONNOTALLOWEDREASON; + if ("ALGINT".equals(codeString)) + return V3ActReason.ALGINT; + if ("COMPCON".equals(codeString)) + return V3ActReason.COMPCON; + if ("THERCHAR".equals(codeString)) + return V3ActReason.THERCHAR; + if ("TRIAL".equals(codeString)) + return V3ActReason.TRIAL; + if ("_SubstanceAdminSubstitutionReason".equals(codeString)) + return V3ActReason._SUBSTANCEADMINSUBSTITUTIONREASON; + if ("CT".equals(codeString)) + return V3ActReason.CT; + if ("FP".equals(codeString)) + return V3ActReason.FP; + if ("OS".equals(codeString)) + return V3ActReason.OS; + if ("RR".equals(codeString)) + return V3ActReason.RR; + if ("_TransferActReason".equals(codeString)) + return V3ActReason._TRANSFERACTREASON; + if ("ER".equals(codeString)) + return V3ActReason.ER; + if ("RQ".equals(codeString)) + return V3ActReason.RQ; + if ("_ActBillableServiceReason".equals(codeString)) + return V3ActReason._ACTBILLABLESERVICEREASON; + if ("_ActBillableClinicalServiceReason".equals(codeString)) + return V3ActReason._ACTBILLABLECLINICALSERVICEREASON; + if ("BONUS".equals(codeString)) + return V3ActReason.BONUS; + if ("CHD".equals(codeString)) + return V3ActReason.CHD; + if ("DEP".equals(codeString)) + return V3ActReason.DEP; + if ("ECH".equals(codeString)) + return V3ActReason.ECH; + if ("EDU".equals(codeString)) + return V3ActReason.EDU; + if ("EMP".equals(codeString)) + return V3ActReason.EMP; + if ("ESP".equals(codeString)) + return V3ActReason.ESP; + if ("FAM".equals(codeString)) + return V3ActReason.FAM; + if ("IND".equals(codeString)) + return V3ActReason.IND; + if ("INVOICE".equals(codeString)) + return V3ActReason.INVOICE; + if ("PROA".equals(codeString)) + return V3ActReason.PROA; + if ("RECOV".equals(codeString)) + return V3ActReason.RECOV; + if ("RETRO".equals(codeString)) + return V3ActReason.RETRO; + if ("SPC".equals(codeString)) + return V3ActReason.SPC; + if ("SPO".equals(codeString)) + return V3ActReason.SPO; + if ("TRAN".equals(codeString)) + return V3ActReason.TRAN; + throw new IllegalArgumentException("Unknown V3ActReason code '"+codeString+"'"); + } + + public String toCode(V3ActReason code) { + if (code == V3ActReason._ACTACCOMMODATIONREASON) + return "_ActAccommodationReason"; + if (code == V3ActReason.ACCREQNA) + return "ACCREQNA"; + if (code == V3ActReason.FLRCNV) + return "FLRCNV"; + if (code == V3ActReason.MEDNEC) + return "MEDNEC"; + if (code == V3ActReason.PAT) + return "PAT"; + if (code == V3ActReason._ACTCOVERAGEREASON) + return "_ActCoverageReason"; + if (code == V3ActReason._ELIGIBILITYACTREASONCODE) + return "_EligibilityActReasonCode"; + if (code == V3ActReason._ACTINELIGIBILITYREASON) + return "_ActIneligibilityReason"; + if (code == V3ActReason.COVSUS) + return "COVSUS"; + if (code == V3ActReason.DECSD) + return "DECSD"; + if (code == V3ActReason.REGERR) + return "REGERR"; + if (code == V3ActReason._COVERAGEELIGIBILITYREASON) + return "_CoverageEligibilityReason"; + if (code == V3ActReason.AGE) + return "AGE"; + if (code == V3ActReason.CRIME) + return "CRIME"; + if (code == V3ActReason.DIS) + return "DIS"; + if (code == V3ActReason.EMPLOY) + return "EMPLOY"; + if (code == V3ActReason.FINAN) + return "FINAN"; + if (code == V3ActReason.HEALTH) + return "HEALTH"; + if (code == V3ActReason.MULTI) + return "MULTI"; + if (code == V3ActReason.PNC) + return "PNC"; + if (code == V3ActReason.STATUTORY) + return "STATUTORY"; + if (code == V3ActReason.VEHIC) + return "VEHIC"; + if (code == V3ActReason.WORK) + return "WORK"; + if (code == V3ActReason._ACTINFORMATIONMANAGEMENTREASON) + return "_ActInformationManagementReason"; + if (code == V3ActReason._ACTHEALTHINFORMATIONMANAGEMENTREASON) + return "_ActHealthInformationManagementReason"; + if (code == V3ActReason._ACTCONSENTINFORMATIONACCESSOVERRIDEREASON) + return "_ActConsentInformationAccessOverrideReason"; + if (code == V3ActReason.OVRER) + return "OVRER"; + if (code == V3ActReason.OVRPJ) + return "OVRPJ"; + if (code == V3ActReason.OVRPS) + return "OVRPS"; + if (code == V3ActReason.OVRTPS) + return "OVRTPS"; + if (code == V3ActReason.PURPOSEOFUSE) + return "PurposeOfUse"; + if (code == V3ActReason.HMARKT) + return "HMARKT"; + if (code == V3ActReason.HOPERAT) + return "HOPERAT"; + if (code == V3ActReason.DONAT) + return "DONAT"; + if (code == V3ActReason.FRAUD) + return "FRAUD"; + if (code == V3ActReason.GOV) + return "GOV"; + if (code == V3ActReason.HACCRED) + return "HACCRED"; + if (code == V3ActReason.HCOMPL) + return "HCOMPL"; + if (code == V3ActReason.HDECD) + return "HDECD"; + if (code == V3ActReason.HDIRECT) + return "HDIRECT"; + if (code == V3ActReason.HLEGAL) + return "HLEGAL"; + if (code == V3ActReason.HOUTCOMS) + return "HOUTCOMS"; + if (code == V3ActReason.HPRGRP) + return "HPRGRP"; + if (code == V3ActReason.HQUALIMP) + return "HQUALIMP"; + if (code == V3ActReason.HSYSADMIN) + return "HSYSADMIN"; + if (code == V3ActReason.MEMADMIN) + return "MEMADMIN"; + if (code == V3ActReason.PATADMIN) + return "PATADMIN"; + if (code == V3ActReason.PATSFTY) + return "PATSFTY"; + if (code == V3ActReason.PERFMSR) + return "PERFMSR"; + if (code == V3ActReason.RECORDMGT) + return "RECORDMGT"; + if (code == V3ActReason.TRAIN) + return "TRAIN"; + if (code == V3ActReason.HPAYMT) + return "HPAYMT"; + if (code == V3ActReason.CLMATTCH) + return "CLMATTCH"; + if (code == V3ActReason.COVAUTH) + return "COVAUTH"; + if (code == V3ActReason.COVERAGE) + return "COVERAGE"; + if (code == V3ActReason.ELIGDTRM) + return "ELIGDTRM"; + if (code == V3ActReason.ELIGVER) + return "ELIGVER"; + if (code == V3ActReason.ENROLLM) + return "ENROLLM"; + if (code == V3ActReason.REMITADV) + return "REMITADV"; + if (code == V3ActReason.HRESCH) + return "HRESCH"; + if (code == V3ActReason.CLINTRCH) + return "CLINTRCH"; + if (code == V3ActReason.PATRQT) + return "PATRQT"; + if (code == V3ActReason.FAMRQT) + return "FAMRQT"; + if (code == V3ActReason.PWATRNY) + return "PWATRNY"; + if (code == V3ActReason.SUPNWK) + return "SUPNWK"; + if (code == V3ActReason.PUBHLTH) + return "PUBHLTH"; + if (code == V3ActReason.DISASTER) + return "DISASTER"; + if (code == V3ActReason.THREAT) + return "THREAT"; + if (code == V3ActReason.TREAT) + return "TREAT"; + if (code == V3ActReason.CAREMGT) + return "CAREMGT"; + if (code == V3ActReason.CLINTRL) + return "CLINTRL"; + if (code == V3ActReason.ETREAT) + return "ETREAT"; + if (code == V3ActReason.POPHLTH) + return "POPHLTH"; + if (code == V3ActReason._ACTINFORMATIONPRIVACYREASON) + return "_ActInformationPrivacyReason"; + if (code == V3ActReason.MARKT) + return "MARKT"; + if (code == V3ActReason.OPERAT) + return "OPERAT"; + if (code == V3ActReason.LEGAL) + return "LEGAL"; + if (code == V3ActReason.ACCRED) + return "ACCRED"; + if (code == V3ActReason.COMPL) + return "COMPL"; + if (code == V3ActReason.ENADMIN) + return "ENADMIN"; + if (code == V3ActReason.OUTCOMS) + return "OUTCOMS"; + if (code == V3ActReason.PRGRPT) + return "PRGRPT"; + if (code == V3ActReason.QUALIMP) + return "QUALIMP"; + if (code == V3ActReason.SYSADMN) + return "SYSADMN"; + if (code == V3ActReason.PAYMT) + return "PAYMT"; + if (code == V3ActReason.RESCH) + return "RESCH"; + if (code == V3ActReason.SRVC) + return "SRVC"; + if (code == V3ActReason._ACTINVALIDREASON) + return "_ActInvalidReason"; + if (code == V3ActReason.ADVSTORAGE) + return "ADVSTORAGE"; + if (code == V3ActReason.COLDCHNBRK) + return "COLDCHNBRK"; + if (code == V3ActReason.EXPLOT) + return "EXPLOT"; + if (code == V3ActReason.OUTSIDESCHED) + return "OUTSIDESCHED"; + if (code == V3ActReason.PRODRECALL) + return "PRODRECALL"; + if (code == V3ActReason._ACTINVOICECANCELREASON) + return "_ActInvoiceCancelReason"; + if (code == V3ActReason.INCCOVPTY) + return "INCCOVPTY"; + if (code == V3ActReason.INCINVOICE) + return "INCINVOICE"; + if (code == V3ActReason.INCPOLICY) + return "INCPOLICY"; + if (code == V3ActReason.INCPROV) + return "INCPROV"; + if (code == V3ActReason._ACTNOIMMUNIZATIONREASON) + return "_ActNoImmunizationReason"; + if (code == V3ActReason.IMMUNE) + return "IMMUNE"; + if (code == V3ActReason.MEDPREC) + return "MEDPREC"; + if (code == V3ActReason.OSTOCK) + return "OSTOCK"; + if (code == V3ActReason.PATOBJ) + return "PATOBJ"; + if (code == V3ActReason.PHILISOP) + return "PHILISOP"; + if (code == V3ActReason.RELIG) + return "RELIG"; + if (code == V3ActReason.VACEFF) + return "VACEFF"; + if (code == V3ActReason.VACSAF) + return "VACSAF"; + if (code == V3ActReason._ACTSUPPLYFULFILLMENTREFUSALREASON) + return "_ActSupplyFulfillmentRefusalReason"; + if (code == V3ActReason.FRR01) + return "FRR01"; + if (code == V3ActReason.FRR02) + return "FRR02"; + if (code == V3ActReason.FRR03) + return "FRR03"; + if (code == V3ActReason.FRR04) + return "FRR04"; + if (code == V3ActReason.FRR05) + return "FRR05"; + if (code == V3ActReason.FRR06) + return "FRR06"; + if (code == V3ActReason._CLINICALRESEARCHEVENTREASON) + return "_ClinicalResearchEventReason"; + if (code == V3ActReason.RET) + return "RET"; + if (code == V3ActReason.SCH) + return "SCH"; + if (code == V3ActReason.TRM) + return "TRM"; + if (code == V3ActReason.UNS) + return "UNS"; + if (code == V3ActReason._CLINICALRESEARCHOBSERVATIONREASON) + return "_ClinicalResearchObservationReason"; + if (code == V3ActReason.NPT) + return "NPT"; + if (code == V3ActReason.PPT) + return "PPT"; + if (code == V3ActReason.UPT) + return "UPT"; + if (code == V3ActReason._COMBINEDPHARMACYORDERSUSPENDREASONCODE) + return "_CombinedPharmacyOrderSuspendReasonCode"; + if (code == V3ActReason.ALTCHOICE) + return "ALTCHOICE"; + if (code == V3ActReason.CLARIF) + return "CLARIF"; + if (code == V3ActReason.DRUGHIGH) + return "DRUGHIGH"; + if (code == V3ActReason.HOSPADM) + return "HOSPADM"; + if (code == V3ActReason.LABINT) + return "LABINT"; + if (code == V3ActReason.NONAVAIL) + return "NON-AVAIL"; + if (code == V3ActReason.PREG) + return "PREG"; + if (code == V3ActReason.SALG) + return "SALG"; + if (code == V3ActReason.SDDI) + return "SDDI"; + if (code == V3ActReason.SDUPTHER) + return "SDUPTHER"; + if (code == V3ActReason.SINTOL) + return "SINTOL"; + if (code == V3ActReason.SURG) + return "SURG"; + if (code == V3ActReason.WASHOUT) + return "WASHOUT"; + if (code == V3ActReason._CONTROLACTNULLIFICATIONREASONCODE) + return "_ControlActNullificationReasonCode"; + if (code == V3ActReason.ALTD) + return "ALTD"; + if (code == V3ActReason.EIE) + return "EIE"; + if (code == V3ActReason.NORECMTCH) + return "NORECMTCH"; + if (code == V3ActReason._CONTROLACTNULLIFICATIONREFUSALREASONTYPE) + return "_ControlActNullificationRefusalReasonType"; + if (code == V3ActReason.INRQSTATE) + return "INRQSTATE"; + if (code == V3ActReason.NOMATCH) + return "NOMATCH"; + if (code == V3ActReason.NOPRODMTCH) + return "NOPRODMTCH"; + if (code == V3ActReason.NOSERMTCH) + return "NOSERMTCH"; + if (code == V3ActReason.NOVERMTCH) + return "NOVERMTCH"; + if (code == V3ActReason.NOPERM) + return "NOPERM"; + if (code == V3ActReason.NOUSERPERM) + return "NOUSERPERM"; + if (code == V3ActReason.NOAGNTPERM) + return "NOAGNTPERM"; + if (code == V3ActReason.NOUSRPERM) + return "NOUSRPERM"; + if (code == V3ActReason.WRNGVER) + return "WRNGVER"; + if (code == V3ActReason._CONTROLACTREASON) + return "_ControlActReason"; + if (code == V3ActReason._MEDICATIONORDERABORTREASONCODE) + return "_MedicationOrderAbortReasonCode"; + if (code == V3ActReason.DISCONT) + return "DISCONT"; + if (code == V3ActReason.INEFFECT) + return "INEFFECT"; + if (code == V3ActReason.MONIT) + return "MONIT"; + if (code == V3ActReason.NOREQ) + return "NOREQ"; + if (code == V3ActReason.NOTCOVER) + return "NOTCOVER"; + if (code == V3ActReason.PREFUS) + return "PREFUS"; + if (code == V3ActReason.RECALL) + return "RECALL"; + if (code == V3ActReason.REPLACE) + return "REPLACE"; + if (code == V3ActReason.DOSECHG) + return "DOSECHG"; + if (code == V3ActReason.REPLACEFIX) + return "REPLACEFIX"; + if (code == V3ActReason.UNABLE) + return "UNABLE"; + if (code == V3ActReason._MEDICATIONORDERRELEASEREASONCODE) + return "_MedicationOrderReleaseReasonCode"; + if (code == V3ActReason.HOLDDONE) + return "HOLDDONE"; + if (code == V3ActReason.HOLDINAP) + return "HOLDINAP"; + if (code == V3ActReason._MODIFYPRESCRIPTIONREASONTYPE) + return "_ModifyPrescriptionReasonType"; + if (code == V3ActReason.ADMINERROR) + return "ADMINERROR"; + if (code == V3ActReason.CLINMOD) + return "CLINMOD"; + if (code == V3ActReason._PHARMACYSUPPLYEVENTABORTREASON) + return "_PharmacySupplyEventAbortReason"; + if (code == V3ActReason.CONTRA) + return "CONTRA"; + if (code == V3ActReason.FOABORT) + return "FOABORT"; + if (code == V3ActReason.FOSUSP) + return "FOSUSP"; + if (code == V3ActReason.NOPICK) + return "NOPICK"; + if (code == V3ActReason.PATDEC) + return "PATDEC"; + if (code == V3ActReason.QUANTCHG) + return "QUANTCHG"; + if (code == V3ActReason._PHARMACYSUPPLYEVENTSTOCKREASONCODE) + return "_PharmacySupplyEventStockReasonCode"; + if (code == V3ActReason.FLRSTCK) + return "FLRSTCK"; + if (code == V3ActReason.LTC) + return "LTC"; + if (code == V3ActReason.OFFICE) + return "OFFICE"; + if (code == V3ActReason.PHARM) + return "PHARM"; + if (code == V3ActReason.PROG) + return "PROG"; + if (code == V3ActReason._PHARMACYSUPPLYREQUESTRENEWALREFUSALREASONCODE) + return "_PharmacySupplyRequestRenewalRefusalReasonCode"; + if (code == V3ActReason.ALREADYRX) + return "ALREADYRX"; + if (code == V3ActReason.FAMPHYS) + return "FAMPHYS"; + if (code == V3ActReason.MODIFY) + return "MODIFY"; + if (code == V3ActReason.NEEDAPMT) + return "NEEDAPMT"; + if (code == V3ActReason.NOTAVAIL) + return "NOTAVAIL"; + if (code == V3ActReason.NOTPAT) + return "NOTPAT"; + if (code == V3ActReason.ONHOLD) + return "ONHOLD"; + if (code == V3ActReason.PRNA) + return "PRNA"; + if (code == V3ActReason.STOPMED) + return "STOPMED"; + if (code == V3ActReason.TOOEARLY) + return "TOOEARLY"; + if (code == V3ActReason._SUPPLYORDERABORTREASONCODE) + return "_SupplyOrderAbortReasonCode"; + if (code == V3ActReason.IMPROV) + return "IMPROV"; + if (code == V3ActReason.INTOL) + return "INTOL"; + if (code == V3ActReason.NEWSTR) + return "NEWSTR"; + if (code == V3ActReason.NEWTHER) + return "NEWTHER"; + if (code == V3ActReason._GENERICUPDATEREASONCODE) + return "_GenericUpdateReasonCode"; + if (code == V3ActReason.CHGDATA) + return "CHGDATA"; + if (code == V3ActReason.FIXDATA) + return "FIXDATA"; + if (code == V3ActReason.MDATA) + return "MDATA"; + if (code == V3ActReason.NEWDATA) + return "NEWDATA"; + if (code == V3ActReason.UMDATA) + return "UMDATA"; + if (code == V3ActReason._PATIENTPROFILEQUERYREASONCODE) + return "_PatientProfileQueryReasonCode"; + if (code == V3ActReason.ADMREV) + return "ADMREV"; + if (code == V3ActReason.PATCAR) + return "PATCAR"; + if (code == V3ActReason.PATREQ) + return "PATREQ"; + if (code == V3ActReason.PRCREV) + return "PRCREV"; + if (code == V3ActReason.REGUL) + return "REGUL"; + if (code == V3ActReason.RSRCH) + return "RSRCH"; + if (code == V3ActReason.VALIDATION) + return "VALIDATION"; + if (code == V3ActReason._PHARMACYSUPPLYREQUESTFULFILLERREVISIONREFUSALREASONCODE) + return "_PharmacySupplyRequestFulfillerRevisionRefusalReasonCode"; + if (code == V3ActReason.LOCKED) + return "LOCKED"; + if (code == V3ActReason.UNKWNTARGET) + return "UNKWNTARGET"; + if (code == V3ActReason._REFUSALREASONCODE) + return "_RefusalReasonCode"; + if (code == V3ActReason._SCHEDULINGACTREASON) + return "_SchedulingActReason"; + if (code == V3ActReason.BLK) + return "BLK"; + if (code == V3ActReason.DEC) + return "DEC"; + if (code == V3ActReason.FIN) + return "FIN"; + if (code == V3ActReason.MED) + return "MED"; + if (code == V3ActReason.MTG) + return "MTG"; + if (code == V3ActReason.PHY) + return "PHY"; + if (code == V3ActReason._STATUSREVISIONREFUSALREASONCODE) + return "_StatusRevisionRefusalReasonCode"; + if (code == V3ActReason.FILLED) + return "FILLED"; + if (code == V3ActReason._SUBSTANCEADMINISTRATIONPERMISSIONREFUSALREASONCODE) + return "_SubstanceAdministrationPermissionRefusalReasonCode"; + if (code == V3ActReason.PATINELIG) + return "PATINELIG"; + if (code == V3ActReason.PROTUNMET) + return "PROTUNMET"; + if (code == V3ActReason.PROVUNAUTH) + return "PROVUNAUTH"; + if (code == V3ActReason._SUBSTANCEADMINSUBSTITUTIONNOTALLOWEDREASON) + return "_SubstanceAdminSubstitutionNotAllowedReason"; + if (code == V3ActReason.ALGINT) + return "ALGINT"; + if (code == V3ActReason.COMPCON) + return "COMPCON"; + if (code == V3ActReason.THERCHAR) + return "THERCHAR"; + if (code == V3ActReason.TRIAL) + return "TRIAL"; + if (code == V3ActReason._SUBSTANCEADMINSUBSTITUTIONREASON) + return "_SubstanceAdminSubstitutionReason"; + if (code == V3ActReason.CT) + return "CT"; + if (code == V3ActReason.FP) + return "FP"; + if (code == V3ActReason.OS) + return "OS"; + if (code == V3ActReason.RR) + return "RR"; + if (code == V3ActReason._TRANSFERACTREASON) + return "_TransferActReason"; + if (code == V3ActReason.ER) + return "ER"; + if (code == V3ActReason.RQ) + return "RQ"; + if (code == V3ActReason._ACTBILLABLESERVICEREASON) + return "_ActBillableServiceReason"; + if (code == V3ActReason._ACTBILLABLECLINICALSERVICEREASON) + return "_ActBillableClinicalServiceReason"; + if (code == V3ActReason.BONUS) + return "BONUS"; + if (code == V3ActReason.CHD) + return "CHD"; + if (code == V3ActReason.DEP) + return "DEP"; + if (code == V3ActReason.ECH) + return "ECH"; + if (code == V3ActReason.EDU) + return "EDU"; + if (code == V3ActReason.EMP) + return "EMP"; + if (code == V3ActReason.ESP) + return "ESP"; + if (code == V3ActReason.FAM) + return "FAM"; + if (code == V3ActReason.IND) + return "IND"; + if (code == V3ActReason.INVOICE) + return "INVOICE"; + if (code == V3ActReason.PROA) + return "PROA"; + if (code == V3ActReason.RECOV) + return "RECOV"; + if (code == V3ActReason.RETRO) + return "RETRO"; + if (code == V3ActReason.SPC) + return "SPC"; + if (code == V3ActReason.SPO) + return "SPO"; + if (code == V3ActReason.TRAN) + return "TRAN"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpoint.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpoint.java new file mode 100644 index 00000000000..cca7a2aea42 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpoint.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipCheckpoint { + + /** + * Condition is tested every time before execution of the service (WHILE condition DO service). + */ + B, + /** + * Condition is tested at the end of a repeated service execution. The service is repeated only if the condition is true (DO service WHILE condition). + */ + E, + /** + * Condition is tested once before the service is executed (IF condition THEN service). + */ + S, + /** + * Condition must be true throughout the execution and the service is interrupted (asynchronously) as soon as the condition turns false (asynchronous WHILE loop). The service must be interruptible. + */ + T, + /** + * Condition is a loop checkpoint, i.e. it is a step of an activity plan and, if negative causes the containing loop to exit. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipCheckpoint fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ActRelationshipCheckpoint code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case E: return "E"; + case S: return "S"; + case T: return "T"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipCheckpoint"; + } + public String getDefinition() { + switch (this) { + case B: return "Condition is tested every time before execution of the service (WHILE condition DO service)."; + case E: return "Condition is tested at the end of a repeated service execution. The service is repeated only if the condition is true (DO service WHILE condition)."; + case S: return "Condition is tested once before the service is executed (IF condition THEN service)."; + case T: return "Condition must be true throughout the execution and the service is interrupted (asynchronously) as soon as the condition turns false (asynchronous WHILE loop). The service must be interruptible."; + case X: return "Condition is a loop checkpoint, i.e. it is a step of an activity plan and, if negative causes the containing loop to exit."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "beginning"; + case E: return "end"; + case S: return "entry"; + case T: return "through"; + case X: return "exit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpointEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpointEnumFactory.java new file mode 100644 index 00000000000..4cbdbf66ed2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipCheckpointEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActRelationshipCheckpointEnumFactory implements EnumFactory { + + public V3ActRelationshipCheckpoint fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ActRelationshipCheckpoint.B; + if ("E".equals(codeString)) + return V3ActRelationshipCheckpoint.E; + if ("S".equals(codeString)) + return V3ActRelationshipCheckpoint.S; + if ("T".equals(codeString)) + return V3ActRelationshipCheckpoint.T; + if ("X".equals(codeString)) + return V3ActRelationshipCheckpoint.X; + throw new IllegalArgumentException("Unknown V3ActRelationshipCheckpoint code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipCheckpoint code) { + if (code == V3ActRelationshipCheckpoint.B) + return "B"; + if (code == V3ActRelationshipCheckpoint.E) + return "E"; + if (code == V3ActRelationshipCheckpoint.S) + return "S"; + if (code == V3ActRelationshipCheckpoint.T) + return "T"; + if (code == V3ActRelationshipCheckpoint.X) + return "X"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoin.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoin.java new file mode 100644 index 00000000000..469094373d8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoin.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipJoin { + + /** + * Detach this branch from the other branches so it will not be resynchronized with the other branches. + */ + D, + /** + * When all other concurrent branches are terminated, interrupt and discontinue this branch. + */ + K, + /** + * Wait for this branch to terminate. + */ + W, + /** + * Wait for any one of the branches in the set of exclusive wait branches to terminate, then discontinue all the other exclusive wait branches. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipJoin fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("K".equals(codeString)) + return K; + if ("W".equals(codeString)) + return W; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ActRelationshipJoin code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case K: return "K"; + case W: return "W"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipJoin"; + } + public String getDefinition() { + switch (this) { + case D: return "Detach this branch from the other branches so it will not be resynchronized with the other branches."; + case K: return "When all other concurrent branches are terminated, interrupt and discontinue this branch."; + case W: return "Wait for this branch to terminate."; + case X: return "Wait for any one of the branches in the set of exclusive wait branches to terminate, then discontinue all the other exclusive wait branches."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "detached"; + case K: return "kill"; + case W: return "wait"; + case X: return "exclusive wait"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoinEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoinEnumFactory.java new file mode 100644 index 00000000000..fe5f862979f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipJoinEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActRelationshipJoinEnumFactory implements EnumFactory { + + public V3ActRelationshipJoin fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ActRelationshipJoin.D; + if ("K".equals(codeString)) + return V3ActRelationshipJoin.K; + if ("W".equals(codeString)) + return V3ActRelationshipJoin.W; + if ("X".equals(codeString)) + return V3ActRelationshipJoin.X; + throw new IllegalArgumentException("Unknown V3ActRelationshipJoin code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipJoin code) { + if (code == V3ActRelationshipJoin.D) + return "D"; + if (code == V3ActRelationshipJoin.K) + return "K"; + if (code == V3ActRelationshipJoin.W) + return "W"; + if (code == V3ActRelationshipJoin.X) + return "X"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplit.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplit.java new file mode 100644 index 00000000000..140f5b29932 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplit.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipSplit { + + /** + * The pre-condition associated with the branch is evaluated once and if true the branch may be entered. All other exclusive branches compete with each other and only one will be selected. This implements a COND, IF and CASE conditionals, or "XOR-split." The order in which the branches are considered may be specified in the priorityNumber attribute. + */ + E1, + /** + * A branch is selected as soon as the pre-condition associated with the branch evaluates to true. If the condition is false, the branch may be entered later, when the condition turns true. All other exclusive branches compete with each other and only one will be selected. Each waiting branch executes in parallel with the default join code wait (see below). The order in which the branches are considered may be specified in the Service_relationship.priority_nmb. + */ + EW, + /** + * A branch is executed if its associated preconditions permit. If associated preconditions do not permit, the branch is dropped. Inclusive branches are not suppressed and do not suppress other branches. + */ + I1, + /** + * A branch is executed as soon as its associated conditions permit. If the condition is false, the branch may be entered later, when the condition turns true. Inclusive branches are not suppressed and do not suppress other branches. Each waiting branch executes in parallel with the default join code wait (see below). + */ + IW, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipSplit fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E1".equals(codeString)) + return E1; + if ("EW".equals(codeString)) + return EW; + if ("I1".equals(codeString)) + return I1; + if ("IW".equals(codeString)) + return IW; + throw new FHIRException("Unknown V3ActRelationshipSplit code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E1: return "E1"; + case EW: return "EW"; + case I1: return "I1"; + case IW: return "IW"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipSplit"; + } + public String getDefinition() { + switch (this) { + case E1: return "The pre-condition associated with the branch is evaluated once and if true the branch may be entered. All other exclusive branches compete with each other and only one will be selected. This implements a COND, IF and CASE conditionals, or \"XOR-split.\" The order in which the branches are considered may be specified in the priorityNumber attribute."; + case EW: return "A branch is selected as soon as the pre-condition associated with the branch evaluates to true. If the condition is false, the branch may be entered later, when the condition turns true. All other exclusive branches compete with each other and only one will be selected. Each waiting branch executes in parallel with the default join code wait (see below). The order in which the branches are considered may be specified in the Service_relationship.priority_nmb."; + case I1: return "A branch is executed if its associated preconditions permit. If associated preconditions do not permit, the branch is dropped. Inclusive branches are not suppressed and do not suppress other branches."; + case IW: return "A branch is executed as soon as its associated conditions permit. If the condition is false, the branch may be entered later, when the condition turns true. Inclusive branches are not suppressed and do not suppress other branches. Each waiting branch executes in parallel with the default join code wait (see below)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E1: return "exclusive try once"; + case EW: return "exclusive wait"; + case I1: return "inclusive try once"; + case IW: return "inclusive wait"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplitEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplitEnumFactory.java new file mode 100644 index 00000000000..c06d331468e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSplitEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActRelationshipSplitEnumFactory implements EnumFactory { + + public V3ActRelationshipSplit fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E1".equals(codeString)) + return V3ActRelationshipSplit.E1; + if ("EW".equals(codeString)) + return V3ActRelationshipSplit.EW; + if ("I1".equals(codeString)) + return V3ActRelationshipSplit.I1; + if ("IW".equals(codeString)) + return V3ActRelationshipSplit.IW; + throw new IllegalArgumentException("Unknown V3ActRelationshipSplit code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipSplit code) { + if (code == V3ActRelationshipSplit.E1) + return "E1"; + if (code == V3ActRelationshipSplit.EW) + return "EW"; + if (code == V3ActRelationshipSplit.I1) + return "I1"; + if (code == V3ActRelationshipSplit.IW) + return "IW"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubset.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubset.java new file mode 100644 index 00000000000..95f2da95fbb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubset.java @@ -0,0 +1,197 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipSubset { + + /** + * Used to indicate that the participation is a filtered subset of the total participations of the same type owned by the Act. + + Used when there is a need to limit the participations to the first, the last, the next or some other filtered subset. + */ + _PARTICIPATIONSUBSET, + /** + * An occurrence that is scheduled to occur in the future. An Act whose effective time is greater than 'now', where 'now' is the time the instance is authored. + */ + FUTURE, + /** + * Represents a 'summary' of all acts that are scheduled to occur in the future (whose effective time is greater than 'now' where is the time the instance is authored.). The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. + */ + FUTSUM, + /** + * Restricted to the latest known occurrence that is scheduled to occur. The Act with the highest known effective time. + */ + LAST, + /** + * Restricted to the nearest recent known occurrence scheduled to occur in the future. The Act with the lowest effective time, still greater than 'now'. ('now' is the time the instance is authored.) + */ + NEXT, + /** + * An occurrence that occurred or was scheduled to occur in the past. An Act whose effective time is less than 'now'. ('now' is the time the instance is authored.) + */ + PAST, + /** + * Restricted to the earliest known occurrence that occurred or was scheduled to occur in the past. The Act with the lowest effective time. ('now' is the time the instance is authored.) + */ + FIRST, + /** + * Represents a 'summary' of all acts that previously occurred or were scheduled to occur. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. ('now' is the time the instance is authored.) + */ + PREVSUM, + /** + * Restricted to the most recent known occurrence that occurred or was scheduled to occur in the past. The Act with the most recent effective time, still less than 'now'. ('now' is the time the instance is authored.) + */ + RECENT, + /** + * Represents a 'summary' of all acts that have occurred or were scheduled to occur and which are scheduled to occur in the future. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. + */ + SUM, + /** + * ActRelationshipExpectedSubset + */ + ACTRELATIONSHIPEXPECTEDSUBSET, + /** + * ActRelationshipPastSubset + */ + ACTRELATIONSHIPPASTSUBSET, + /** + * The occurrence whose value attribute is greater than all other occurrences at the time the instance is created. + */ + MAX, + /** + * The occurrence whose value attribute is less than all other occurrences at the time the instance is created. + */ + MIN, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipSubset fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ParticipationSubset".equals(codeString)) + return _PARTICIPATIONSUBSET; + if ("FUTURE".equals(codeString)) + return FUTURE; + if ("FUTSUM".equals(codeString)) + return FUTSUM; + if ("LAST".equals(codeString)) + return LAST; + if ("NEXT".equals(codeString)) + return NEXT; + if ("PAST".equals(codeString)) + return PAST; + if ("FIRST".equals(codeString)) + return FIRST; + if ("PREVSUM".equals(codeString)) + return PREVSUM; + if ("RECENT".equals(codeString)) + return RECENT; + if ("SUM".equals(codeString)) + return SUM; + if ("ActRelationshipExpectedSubset".equals(codeString)) + return ACTRELATIONSHIPEXPECTEDSUBSET; + if ("ActRelationshipPastSubset".equals(codeString)) + return ACTRELATIONSHIPPASTSUBSET; + if ("MAX".equals(codeString)) + return MAX; + if ("MIN".equals(codeString)) + return MIN; + throw new FHIRException("Unknown V3ActRelationshipSubset code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _PARTICIPATIONSUBSET: return "_ParticipationSubset"; + case FUTURE: return "FUTURE"; + case FUTSUM: return "FUTSUM"; + case LAST: return "LAST"; + case NEXT: return "NEXT"; + case PAST: return "PAST"; + case FIRST: return "FIRST"; + case PREVSUM: return "PREVSUM"; + case RECENT: return "RECENT"; + case SUM: return "SUM"; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "MAX"; + case MIN: return "MIN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipSubset"; + } + public String getDefinition() { + switch (this) { + case _PARTICIPATIONSUBSET: return "Used to indicate that the participation is a filtered subset of the total participations of the same type owned by the Act. \r\n\n Used when there is a need to limit the participations to the first, the last, the next or some other filtered subset."; + case FUTURE: return "An occurrence that is scheduled to occur in the future. An Act whose effective time is greater than 'now', where 'now' is the time the instance is authored."; + case FUTSUM: return "Represents a 'summary' of all acts that are scheduled to occur in the future (whose effective time is greater than 'now' where is the time the instance is authored.). The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc."; + case LAST: return "Restricted to the latest known occurrence that is scheduled to occur. The Act with the highest known effective time."; + case NEXT: return "Restricted to the nearest recent known occurrence scheduled to occur in the future. The Act with the lowest effective time, still greater than 'now'. ('now' is the time the instance is authored.)"; + case PAST: return "An occurrence that occurred or was scheduled to occur in the past. An Act whose effective time is less than 'now'. ('now' is the time the instance is authored.)"; + case FIRST: return "Restricted to the earliest known occurrence that occurred or was scheduled to occur in the past. The Act with the lowest effective time. ('now' is the time the instance is authored.)"; + case PREVSUM: return "Represents a 'summary' of all acts that previously occurred or were scheduled to occur. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. ('now' is the time the instance is authored.)"; + case RECENT: return "Restricted to the most recent known occurrence that occurred or was scheduled to occur in the past. The Act with the most recent effective time, still less than 'now'. ('now' is the time the instance is authored.)"; + case SUM: return "Represents a 'summary' of all acts that have occurred or were scheduled to occur and which are scheduled to occur in the future. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc."; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "The occurrence whose value attribute is greater than all other occurrences at the time the instance is created."; + case MIN: return "The occurrence whose value attribute is less than all other occurrences at the time the instance is created."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _PARTICIPATIONSUBSET: return "ParticipationSubset"; + case FUTURE: return "expected future"; + case FUTSUM: return "future summary"; + case LAST: return "expected last"; + case NEXT: return "expected next"; + case PAST: return "previous"; + case FIRST: return "first known"; + case PREVSUM: return "previous summary"; + case RECENT: return "most recent"; + case SUM: return "summary"; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "maximum"; + case MIN: return "minimum"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubsetEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubsetEnumFactory.java new file mode 100644 index 00000000000..fd600939211 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipSubsetEnumFactory.java @@ -0,0 +1,107 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActRelationshipSubsetEnumFactory implements EnumFactory { + + public V3ActRelationshipSubset fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ParticipationSubset".equals(codeString)) + return V3ActRelationshipSubset._PARTICIPATIONSUBSET; + if ("FUTURE".equals(codeString)) + return V3ActRelationshipSubset.FUTURE; + if ("FUTSUM".equals(codeString)) + return V3ActRelationshipSubset.FUTSUM; + if ("LAST".equals(codeString)) + return V3ActRelationshipSubset.LAST; + if ("NEXT".equals(codeString)) + return V3ActRelationshipSubset.NEXT; + if ("PAST".equals(codeString)) + return V3ActRelationshipSubset.PAST; + if ("FIRST".equals(codeString)) + return V3ActRelationshipSubset.FIRST; + if ("PREVSUM".equals(codeString)) + return V3ActRelationshipSubset.PREVSUM; + if ("RECENT".equals(codeString)) + return V3ActRelationshipSubset.RECENT; + if ("SUM".equals(codeString)) + return V3ActRelationshipSubset.SUM; + if ("ActRelationshipExpectedSubset".equals(codeString)) + return V3ActRelationshipSubset.ACTRELATIONSHIPEXPECTEDSUBSET; + if ("ActRelationshipPastSubset".equals(codeString)) + return V3ActRelationshipSubset.ACTRELATIONSHIPPASTSUBSET; + if ("MAX".equals(codeString)) + return V3ActRelationshipSubset.MAX; + if ("MIN".equals(codeString)) + return V3ActRelationshipSubset.MIN; + throw new IllegalArgumentException("Unknown V3ActRelationshipSubset code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipSubset code) { + if (code == V3ActRelationshipSubset._PARTICIPATIONSUBSET) + return "_ParticipationSubset"; + if (code == V3ActRelationshipSubset.FUTURE) + return "FUTURE"; + if (code == V3ActRelationshipSubset.FUTSUM) + return "FUTSUM"; + if (code == V3ActRelationshipSubset.LAST) + return "LAST"; + if (code == V3ActRelationshipSubset.NEXT) + return "NEXT"; + if (code == V3ActRelationshipSubset.PAST) + return "PAST"; + if (code == V3ActRelationshipSubset.FIRST) + return "FIRST"; + if (code == V3ActRelationshipSubset.PREVSUM) + return "PREVSUM"; + if (code == V3ActRelationshipSubset.RECENT) + return "RECENT"; + if (code == V3ActRelationshipSubset.SUM) + return "SUM"; + if (code == V3ActRelationshipSubset.ACTRELATIONSHIPEXPECTEDSUBSET) + return "ActRelationshipExpectedSubset"; + if (code == V3ActRelationshipSubset.ACTRELATIONSHIPPASTSUBSET) + return "ActRelationshipPastSubset"; + if (code == V3ActRelationshipSubset.MAX) + return "MAX"; + if (code == V3ActRelationshipSubset.MIN) + return "MIN"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipType.java new file mode 100644 index 00000000000..a78097fc718 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipType.java @@ -0,0 +1,1538 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipType { + + /** + * Description: A directed association between a source Act and a target Act. + + + Usage Note: This code should never be transmitted in an instance as the value of ActRelationship.typeCode (attribute) + */ + ART, + /** + * ActClassTemporallyPertains + */ + _ACTCLASSTEMPORALLYPERTAINS, + /** + * Codes that describe the relationship between an Act and a financial instrument such as a financial transaction, account or invoice element. + */ + _ACTRELATIONSHIPACCOUNTING, + /** + * Expresses values for describing the relationship relationship between an InvoiceElement or InvoiceElementGroup and a billable act. + */ + _ACTRELATIONSHIPCOSTTRACKING, + /** + * A relationship that provides an ability to associate a financial transaction (target) as a charge to a clinical act (source). A clinical act may have a charge associated with the execution or delivery of the service. + + The financial transaction will define the charge (bill) for delivery or performance of the service. + + Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product. + */ + CHRG, + /** + * A relationship that provides an ability to associate a financial transaction (target) as a cost to a clinical act (source). A clinical act may have an inherit cost associated with the execution or delivery of the service. + + The financial transaction will define the cost of delivery or performance of the service. + + Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product. + */ + COST, + /** + * Expresses values for describing the relationship between a FinancialTransaction and an Account. + */ + _ACTRELATIONSHIPPOSTING, + /** + * A credit relationship ties a financial transaction (target) to an account (source). A credit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account credit will decrease the account balance. A non-asset account credit will decrease the account balance. + */ + CREDIT, + /** + * A debit relationship ties a financial transaction (target) to an account (source). A debit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account debit will increase the account balance. A non-asset account debit will decrease the account balance. + */ + DEBIT, + /** + * Specifies under what circumstances (target Act) the source-Act may, must, must not or has occurred + */ + _ACTRELATIONSHIPCONDITIONAL, + /** + * A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g., relative, absolute) is left as an open issue. The priorityNumber attribute could be used. + */ + CIND, + /** + * A requirement to be true before a service is performed. The target can be any service in criterion mood. For multiple pre-conditions a conjunction attribute (AND, OR, XOR) is applicable. + */ + PRCN, + /** + * Description: The reason or rationale for a service. A reason link is weaker than a trigger, it only suggests that some service may be or might have been a reason for some action, but not that this reason requires/required the action to be taken. Also, as opposed to the trigger, there is no strong timely relation between the reason and the action. As well as providing various types of information about the rationale for a service, the RSON act relationship is routinely used between a SBADM act and an OBS act to describe the indication for use of a medication. Child concepts may be used to describe types of indication. + + + Discussion: In prior releases, the code "SUGG" (suggests) was expressed as "an inversion of the reason link." That code has been retired in favor of the inversion indicator that is an attribute of ActRelationship. + */ + RSON, + /** + * Definition: The source act is performed to block the effects of the target act. This act relationship should be used when describing near miss type incidents where potential harm could have occurred, but the action described in the source act blocked the potential harmful effects of the incident actually occurring. + */ + BLOCK, + /** + * Description: The source act is intended to help establish the presence of a (an adverse) situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + DIAG, + /** + * Description: The source act is intented to provide immunity against the effects of the target act (the target act describes an infectious disease) + */ + IMM, + /** + * Description: The source act is intended to provide active immunity against the effects of the target act (the target act describes an infectious disease) + */ + ACTIMM, + /** + * Description: The source act is intended to provide passive immunity against the effects of the target act (the target act describes an infectious disease). + */ + PASSIMM, + /** + * The source act removes or lessens the occurrence or effect of the target act. + */ + MITGT, + /** + * Definition: The source act is performed to recover from the effects of the target act. + */ + RCVY, + /** + * Description: The source act is intended to reduce the risk of of an adverse situation to emerge as described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + PRYLX, + /** + * Description: The source act is intended to improve a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + TREAT, + /** + * Description: The source act is intended to offer an additional treatment for the management or cure of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. It is not a requirement that the non-adjunctive treatment is explicitly specified. + */ + ADJUNCT, + /** + * Description: The source act is intended to provide long term maintenance improvement or management of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + MTREAT, + /** + * Description: The source act is intended to provide palliation for the effects of the target act. + */ + PALLTREAT, + /** + * Description: The source act is intented to provide symptomatic relief for the effects of the target act. + */ + SYMP, + /** + * A pre-condition that if true should result in the source Act being executed. The target is in typically in criterion mood. When reported after the fact (i.e. the criterion has been met) it may be in Event mood. A delay between the trigger and the triggered action can be specified. + + + Discussion: This includes the concept of a required act for a service or financial instrument such as an insurance plan or policy. In such cases, the trigger is the occurrence of a specific condition such as coverage limits being exceeded. + */ + TRIG, + /** + * Abstract collector for ActRelationhsip types that relate two acts by their timing. + */ + _ACTRELATIONSHIPTEMPORALLYPERTAINS, + /** + * Abstract collector for ActRelationship types that relate two acts by their approximate timing. + */ + _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES, + /** + * A relationship in which the source act's effective time ends near the end of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is ENS + */ + ENE, + /** + * A relationship in which the source act's effective time ends with the end of the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + ECW, + /** + * A relationship in which the source act's effective time is the same as the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + CONCURRENT, + /** + * The source Act starts before the start of the target Act, and ends with the target Act. + + + UsageNote: Inverse code is SASECWE + */ + SBSECWE, + /** + * A relationship in which the source act's effective time ends near the start of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is ENE + */ + ENS, + /** + * The source Act ends when the target act starts (i.e. if we say "ActOne ECWS ActTwo", it means that ActOne ends when ActTwo starts, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SCWE + */ + ECWS, + /** + * A relationship in which the source act's effective time starts near the end of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is SNS + */ + SNE, + /** + * The source Act starts when the target act ends (i.e. if we say "ActOne SCWE ActTwo", it means that ActOne starts when ActTwo ends, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SBSECWS + */ + SCWE, + /** + * A relationship in which the source act's effective time starts near the start of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is SNE + */ + SNS, + /** + * A relationship in which the source act's effective time starts with the start of the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + SCW, + /** + * The source Act starts with.the target Act and ends before the end of the target Act. + + + UsageNote: Inverse code is SCWSEAE + */ + SCWSEBE, + /** + * The source Act starts with the target Act, and ends after the end of the target Act. + */ + SCWSEAE, + /** + * A relationship in which the source act ends after the target act starts. + + + UsageNote: Inverse code is SBE + */ + EAS, + /** + * A relationship in which the source act ends after the target act ends. + + + UsageNote: Inverse code is EBE + */ + EAE, + /** + * The source Act starts after start of the target Act and ends after end of the target Act. + + + UsageNote: Inverse code is SBSEBE + */ + SASEAE, + /** + * The source Act contains the end of the target Act. + + + UsageNote: Inverse code is EDU + */ + SBEEAE, + /** + * The source Act start after the start of the target Act, and contains the end of the target Act. + + + UsageNote: Inverse code is SBSEASEBE + */ + SASSBEEAS, + /** + * The source Act contains the time of the target Act. + + + UsageNote: Inverse code is DURING + */ + SBSEAE, + /** + * The source Act starts after the start of the target Act (i.e. if we say "ActOne SAS ActTwo", it means that ActOne starts after the start of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SBS + */ + SAS, + /** + * A relationship in which the source act starts after the target act ends. + + + UsageNote: Inverse code is EBS + */ + SAE, + /** + * A relationship in which the source act's effective time is wholly within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBSEAE + */ + DURING, + /** + * The source Act starts after start of the target Act, and ends with the target Act. + + + UsageNote: Inverse code is SBSECWE + */ + SASECWE, + /** + * A relationship in which the source act's effective time ends after or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is EBSORECWS + */ + EASORECWS, + /** + * A relationship in which the source act's effective time ends after or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is EBEORECW + */ + EAEORECW, + /** + * The source Act is independent of the time of the target Act. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + INDEPENDENT, + /** + * A relationship in which the source act's effective time starts after or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is SBEORSCWE + */ + SAEORSCWE, + /** + * A relationship in which the source act's effective time starts after or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is SBSORSCW + */ + SASORSCW, + /** + * A relationship in which the source act's effective time starts before or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is SAEORSCWE + */ + SBEORSCWE, + /** + * A relationship in which the source act's effective time overlaps the target act's effective time in any way. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + OVERLAP, + /** + * A relationship in which the source act ends within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBEEAE + */ + EDU, + /** + * The source Act contains the start of the target Act, and ends before the end of the target Act. + + + UsageNote: Inverse code is SASSBEEAS + */ + SBSEASEBE, + /** + * The source Act contains the start of the target Act. + + + UsageNote: Inverse code is SDU + */ + SBSEAS, + /** + * A relationship in which the source act starts within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBSEAS + */ + SDU, + /** + * The source Act starts before the end of the target Act (i.e. if we say "ActOne SBE ActTwo", it means that ActOne starts before the end of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is EAS + */ + SBE, + /** + * The source Act ends before the end of the target Act (i.e. if we say "ActOne EBE ActTwo", it means that ActOne ends before the end of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is EAE + */ + EBE, + /** + * The source Act starts before the start of the target Act, and ends before the end of the target Act. + + + UsageNote: Inverse code is SASEAE + */ + SBSEBE, + /** + * A relationship in which the source act's effective time ends before or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is EASORECWS + */ + EBSORECWS, + /** + * A relationship in which the source act ends before the target act starts. + + + UsageNote: Inverse code is SAE + */ + EBS, + /** + * A relationship in which the source act's effective time ends before or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is EAEORECW + */ + EBEORECW, + /** + * A relationship in which the source act's effective time starts before or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is SASORSCW + */ + SBSORSCW, + /** + * A relationship in which the source act begins before the target act begins. + + + UsageNote: Inverse code is SAS + */ + SBS, + /** + * A relationship in which the target act authorizes or certifies the source act. + */ + AUTH, + /** + * Description: An assertion that an act was the cause of another act.This is stronger and more specific than the support link. The source (cause) is typically an observation, but may be any act, while the target may be any act. + + + Examples: + + + + a growth of Staphylococcus aureus may be considered the cause of an abscess + contamination of the infusion bag was deemed to be the cause of the infection that the patient experienced + lack of staff on the shift was deemed to be a supporting factor (proximal factor) causing the patient safety incident where the patient fell out of bed because the bed-sides had not been put up which caused the night patient to fall out of bed + */ + CAUS, + /** + * The target act is a component of the source act, with no semantics regarding composition or aggregation implied. + */ + COMP, + /** + * A relationship from an Act to a Control Variable. For example, if a Device makes an Observation, this relates the Observation to its Control Variables documenting the device's settings that influenced the observation. + */ + CTRLV, + /** + * The target Acts are aggregated by the source Act. Target Acts may have independent existence, participate in multiple ActRelationships, and do not contribute to the meaning of the source. + + + UsageNotes: This explicitly represents the conventional notion of aggregation. The target Act is part of a collection of Acts (no implication is made of cardinality, a source of Acts may contain zero, one, or more member target Acts). + + It is expected that this will be primarily used with _ActClassRecordOrganizer, BATTERY, and LIST + */ + MBR, + /** + * A collection of sub-services as steps or subtasks performed for the source service. Services may be performed sequentially or concurrently. + + + UsageNotes: Sequence of steps may be indicated by use of _ActRelationshipTemporallyPertains, as well as via ActRelationship.sequenceNumber, ActRelationship.pauseQuantity, Target.priorityCode. + + + OpenIssue: Need Additional guidelines on when each approach should be used. + */ + STEP, + /** + * The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act entered into the source Act by means of the target Transportation act. + */ + ARR, + /** + * The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act departed from the source Act by means of the target Transportation act. + */ + DEP, + /** + * The source Act is a composite of the target Acts. The target Acts do not have an existence independent of the source Act. + + + UsageNote: In UML 1.1, this is a "composition" defined as: + "A form of aggregation with strong ownership and coincident lifetime as part of the whole. Parts with non-fixed multiplicity may be created after the composite itself, but once created they live and die with it (i.e., they share lifetimes). Such parts can also be explicitly removed before the death of the composite. Composition may be recursive." + */ + PART, + /** + * A relationship in which the source act is covered by or is under the authority of a target act. A financial instrument such as an Invoice Element is covered by one or more specific instances of an Insurance Policy. + */ + COVBY, + /** + * Associates a derived Act with its input parameters. E.G., an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts. + */ + DRIV, + /** + * Expresses an association that links two instances of the same act over time, indicating that the instance are part of the same episode, e.g. linking two condition nodes for episode of illness; linking two encounters for episode of encounter. + */ + ELNK, + /** + * Indicates that the target Act provides evidence in support of the action represented by the source Act. The target is not a 'reason' for the source act, but rather gives supporting information on why the source act is an appropriate course of action. Possible targets might be clinical trial results, journal articles, similar successful therapies, etc. + + + Rationale: Provides a mechanism for conveying clinical justification for non-approved or otherwise non-traditional therapies. + */ + EVID, + /** + * Description:The source act is aggravated by the target act. (Example "chest pain" EXACBY "exercise") + */ + EXACBY, + /** + * This is the inversion of support. Used to indicate that a given observation is explained by another observation or condition. + */ + EXPL, + /** + * the target act documents a set of circumstances (events, risks) which prevent successful completion, or degradation of quality of, the source Act. + + + UsageNote: This provides the semantics to document barriers to care + */ + INTF, + /** + * Items located + */ + ITEMSLOC, + /** + * A relationship that limits or restricts the source act by the elements of the target act. For example, an authorization may be limited by a financial amount (up to $500). Target Act must be in EVN.CRIT mood. + */ + LIMIT, + /** + * Definition: Indicates that the attributes and associations of the target act provide metadata (for example, identifiers, authorship, etc.) for the source act. + + + Constraint: Source act must have either a mood code that is not "EVN" (event) or its "isCriterion" attribute must set to "true". Target act must be an Act with a mood code of EVN and with isCriterionInd attribute set to "true". + */ + META, + /** + * An assertion that a new observation may be the manifestation of another existing observation or action. This assumption is attributed to the same actor who asserts the manifestation. This is stronger and more specific than an inverted support link. For example, an agitated appearance can be asserted to be the manifestation (effect) of a known hyperthyroxia. This expresses that one might not have realized a symptom if it would not be a common manifestation of a known condition. The target (cause) may be any service, while the source (manifestation) must be an observation. + */ + MFST, + /** + * Used to assign a "name" to a condition thread. Source is a condition node, target can be any service. + */ + NAME, + /** + * An observation that should follow or does actually follow as a result or consequence of a condition or action (sometimes called "post-conditional".) Target must be an observation as a goal, risk or any criterion. For complex outcomes a conjunction attribute (AND, OR, XOR) can be used. An outcome link is often inverted to describe an outcome assessment. + */ + OUTC, + /** + * The target act is a desired outcome of the source act. Source is any act (typically an intervention). Target must be an observation in criterion mood. + */ + _ACTRELATIONSIPOBJECTIVE, + /** + * A desired state that a service action aims to maintain. E.g., keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood. + */ + OBJC, + /** + * A desired outcome that a service action aims to meet finally. Source is any service (typically an intervention). Target must be an observation in criterion mood. + */ + OBJF, + /** + * A goal that one defines given a patient's health condition. Subsequently planned actions aim to meet that goal. Source is an observation or condition node, target must be an observation in goal mood. + */ + GOAL, + /** + * A noteworthy undesired outcome of a patient's condition that is either likely enough to become an issue or is less likely but dangerous enough to be addressed. + */ + RISK, + /** + * This is a very unspecific relationship from one item of clinical information to another. It does not judge about the role the pertinent information plays. + */ + PERT, + /** + * A relationship in which the target act is a predecessor instance to the source act. Generally each of these instances is similar, but no identical. In healthcare coverage it is used to link a claim item to a previous claim item that might have claimed for the same set of services. + */ + PREV, + /** + * A relationship in which the target act is referred to by the source act. This permits a simple reference relationship that distinguishes between the referent and the referee. + */ + REFR, + /** + * Indicates that the source act makes use of (or will make use of) the information content of the target act. + + + UsageNotes: A usage relationship only makes sense if the target act is authored and occurs independently of the source act. Otherwise a simpler relationship such as COMP would be appropriate. + + + Rationale: There is a need when defining a clinical trial protocol to indicate that the protocol makes use of other protocol or treatment specifications. This is stronger than the assertion of "references". References may exist without usage, and in a clinical trial protocol is common to assert both: what other specifications does this trial use and what other specifications does it merely reference. + */ + USE, + /** + * Reference ranges are essentially descriptors of a class of result values assumed to be "normal", "abnormal", or "critical." Those can vary by sex, age, or any other criterion. Source and target are observations, the target is in criterion mood. This link type can act as a trigger in case of alarms being triggered by critical results. + */ + REFV, + /** + * Description:The source act is wholly or partially alleviated by the target act. (Example "chest pain" RELVBY "sublingual nitroglycerin administration") + */ + RELVBY, + /** + * An act relationship indicating that the source act follows the target act. The source act should in principle represent the same kind of act as the target. Source and target need not have the same mood code (mood will often differ). The target of a sequel is called antecedent. Examples for sequel relationships are: revision, transformation, derivation from a prototype (as a specialization is a derivation of a generalization), followup, realization, instantiation. + */ + SEQL, + /** + * An addendum (source) to an existing service object (target), containing supplemental information. The addendum is itself an original service object linked to the supplemented service object. The supplemented service object remains in place and its content and status are unaltered. + */ + APND, + /** + * Indicates that the target observation(s) provide an initial reference for the source observation or observation group. + + + UsageConstraints: Both source and target must be Observations or specializations thereof. + */ + BSLN, + /** + * Description:The source act complies with, adheres to, conforms to, or is permissible under (in whole or in part) the policy, contract, agreement, law, conformance criteria, certification guidelines or requirement conveyed by the target act. + + Examples for compliance relationships are: audits of adherence with a security policy, certificate of conformance to system certification requirements, or consent directive in compliance with or permissible under a privacy policy. + */ + COMPLY, + /** + * The source act documents the target act. + */ + DOC, + /** + * The source act fulfills (in whole or in part) the target act. Source act must be in a mood equal or more actual than the target act. + */ + FLFS, + /** + * The source act is a single occurrence of a repeatable target act. The source and target act can be in any mood on the "completion track" but the source act must be as far as or further along the track than the target act (i.e., the occurrence of an intent can be an event but not vice versa). + */ + OCCR, + /** + * Relates either an appointment request or an appointment to the order for the service being scheduled. + */ + OREF, + /** + * Associates a specific time (and associated resources) with a scheduling request or other intent. + */ + SCH, + /** + * The generalization relationship can be used to express categorical knowledge about services (e.g., amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic). + */ + GEN, + /** + * A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a "goal distance" (e.g., goal to observation) can be "calculated" and need not be sent explicitly. + */ + GEVL, + /** + * Used to capture the link between a potential service ("master" or plan) and an actual service, where the actual service instantiates the potential service. The instantiation may override the master's defaults. + */ + INST, + /** + * Definition: Used to link a newer version or 'snapshot' of a business object (source) to an older version or 'snapshot' of the same business object (target). + + + Usage:The identifier of the Act should be the same for both source and target. If the identifiers are distinct, RPLC should be used instead. + + Name from source to target = "modifiesPrior" + + Name from target to source = "modifiesByNew" + */ + MOD, + /** + * A trigger-match links an actual service (e.g., an observation or procedure that took place) with a service in criterion mood. For example if the trigger is "observation of pain" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger. + */ + MTCH, + /** + * A relationship between a source Act that provides more detailed properties to the target Act. + + The source act thus is a specialization of the target act, but instead of mentioning all the inherited properties it only mentions new property bindings or refinements. + + The typical use case is to specify certain alternative variants of one kind of Act. The priorityNumber attribute is used to weigh refinements as preferred over other alternative refinements. + + Example: several routing options for a drug are specified as one SubstanceAdministration for the general treatment with attached refinements for the various routing options. + */ + OPTN, + /** + * Description:A relationship in which the target act is carried out to determine whether an effect attributed to the source act can be recreated. + */ + RCHAL, + /** + * A relationship between a source Act that seeks to reverse or undo the action of the prior target Act. + + Example: A posted financial transaction (e.g., a debit transaction) was applied in error and must be reversed (e.g., by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction. + + Constraints: the "completion track" mood of the target Act must be equally or more "actual" than the source act. I.e., when the target act is EVN the source act can be EVN, or any INT. If the target act is INT, the source act can be INT. + */ + REV, + /** + * A replacement source act replaces an existing target act. The state of the target act being replaced becomes obselete, but the act is typically still retained in the system for historical reference. The source and target must be of the same type. + */ + RPLC, + /** + * Definition: A new act that carries forward the intention of the original act, but does not completely replace it. The status of the predecessor act must be 'completed'. The original act is the target act and the successor is the source act. + */ + SUCC, + /** + * A condition thread relationship specifically links condition nodes together to form a condition thread. The source is the new condition node and the target links to the most recent node of the existing condition thread. + */ + UPDT, + /** + * The source is an excerpt from the target. + */ + XCRPT, + /** + * The source is a direct quote from the target. + */ + VRXCRPT, + /** + * Used when the target Act is a transformation of the source Act. (For instance, used to show that a CDA document is a transformation of a DICOM SR document.) + */ + XFRM, + /** + * Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g., to indicate a status post). + */ + SPRT, + /** + * A specialization of "has support" (SPRT), used to relate a secondary observation to a Region of Interest on a multidimensional observation, if the ROI specifies the true boundaries of the secondary observation as opposed to only marking the approximate area. For example, if the start and end of an ST elevation episode is visible in an EKG, this relation would indicate the ROI bounds the "ST elevation" observation -- the ROI defines the true beginning and ending of the episode. Conversely, if a ROI simply contains ST elevation, but it does not define the bounds (start and end) of the episode, the more general "has support" relation is used. Likewise, if a ROI on an image defines the true bounds of a "1st degree burn", the relation "has bounded support" is used; but if the ROI only points to the approximate area of the burn, the general "has support" relation is used. + */ + SPRTBND, + /** + * Relates an Act to its subject Act that the first Act is primarily concerned with. + + Examples + + + + The first Act may be a ControlAct manipulating the subject Act + + + + The first act is a region of interest (ROI) that defines a region within the subject Act. + + + + The first act is a reporting or notification Act, that echos the subject Act for a specific new purpose. + + + + Constraints + + An Act may have multiple subject acts. + + Rationale + + The ActRelationshipType "has subject" is similar to the ParticipationType "subject", Acts that primarily operate on physical subjects use the Participation, those Acts that primarily operate on other Acts (other information) use the ActRelationship. + */ + SUBJ, + /** + * The target observation qualifies (refines) the semantics of the source observation. + + + UsageNote: This is not intended to replace concept refinement and qualification via vocabulary. It is used when there are multiple components which together provide the complete understanding of the source Act. + */ + QUALF, + /** + * An act that contains summary values for a list or set of subordinate acts. For example, a summary of transactions for a particular accounting period. + */ + SUMM, + /** + * Description:Indicates that the target Act represents the result of the source observation Act. + + + FormalConstraint: Source Act must be an Observation or specialization there-of. Source Act must not have the value attribute specified + + + UsageNote: This relationship allows the result of an observation to be fully expressed as RIM acts as opposed to being embedded in the value attribute. For example, sending a Document act as the result of an imaging observation, sending a list of Procedures and/or other acts as the result of a medical history observation. + + The valueNegationInd attribute on the source Act has the same semantics of "negated finding" when it applies to the target of a VALUE ActRelationship as it does to the value attribute. On the other hand, if the ActRelationship.negationInd is true for a VALUE ActRelationship, that means the specified observation does not have the indicated value but does not imply a negated finding. Because the semantics are extremely close, it is recommended that Observation.valueNegationInd be used, not ActRelationship.negationInd. + + + OpenIssue: The implications of negationInd on ActRelationship and the valueNegationind on Observation. + */ + VALUE, + /** + * curative indication + */ + CURE, + /** + * adjunct curative indication + */ + CURE_ADJ, + /** + * adjunct mitigation + */ + MTGT_ADJ, + /** + * null + */ + RACT, + /** + * null + */ + SUGG, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ART".equals(codeString)) + return ART; + if ("_ActClassTemporallyPertains".equals(codeString)) + return _ACTCLASSTEMPORALLYPERTAINS; + if ("_ActRelationshipAccounting".equals(codeString)) + return _ACTRELATIONSHIPACCOUNTING; + if ("_ActRelationshipCostTracking".equals(codeString)) + return _ACTRELATIONSHIPCOSTTRACKING; + if ("CHRG".equals(codeString)) + return CHRG; + if ("COST".equals(codeString)) + return COST; + if ("_ActRelationshipPosting".equals(codeString)) + return _ACTRELATIONSHIPPOSTING; + if ("CREDIT".equals(codeString)) + return CREDIT; + if ("DEBIT".equals(codeString)) + return DEBIT; + if ("_ActRelationshipConditional".equals(codeString)) + return _ACTRELATIONSHIPCONDITIONAL; + if ("CIND".equals(codeString)) + return CIND; + if ("PRCN".equals(codeString)) + return PRCN; + if ("RSON".equals(codeString)) + return RSON; + if ("BLOCK".equals(codeString)) + return BLOCK; + if ("DIAG".equals(codeString)) + return DIAG; + if ("IMM".equals(codeString)) + return IMM; + if ("ACTIMM".equals(codeString)) + return ACTIMM; + if ("PASSIMM".equals(codeString)) + return PASSIMM; + if ("MITGT".equals(codeString)) + return MITGT; + if ("RCVY".equals(codeString)) + return RCVY; + if ("PRYLX".equals(codeString)) + return PRYLX; + if ("TREAT".equals(codeString)) + return TREAT; + if ("ADJUNCT".equals(codeString)) + return ADJUNCT; + if ("MTREAT".equals(codeString)) + return MTREAT; + if ("PALLTREAT".equals(codeString)) + return PALLTREAT; + if ("SYMP".equals(codeString)) + return SYMP; + if ("TRIG".equals(codeString)) + return TRIG; + if ("_ActRelationshipTemporallyPertains".equals(codeString)) + return _ACTRELATIONSHIPTEMPORALLYPERTAINS; + if ("_ActRelationshipTemporallyPertainsApproximates".equals(codeString)) + return _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES; + if ("ENE".equals(codeString)) + return ENE; + if ("ECW".equals(codeString)) + return ECW; + if ("CONCURRENT".equals(codeString)) + return CONCURRENT; + if ("SBSECWE".equals(codeString)) + return SBSECWE; + if ("ENS".equals(codeString)) + return ENS; + if ("ECWS".equals(codeString)) + return ECWS; + if ("SNE".equals(codeString)) + return SNE; + if ("SCWE".equals(codeString)) + return SCWE; + if ("SNS".equals(codeString)) + return SNS; + if ("SCW".equals(codeString)) + return SCW; + if ("SCWSEBE".equals(codeString)) + return SCWSEBE; + if ("SCWSEAE".equals(codeString)) + return SCWSEAE; + if ("EAS".equals(codeString)) + return EAS; + if ("EAE".equals(codeString)) + return EAE; + if ("SASEAE".equals(codeString)) + return SASEAE; + if ("SBEEAE".equals(codeString)) + return SBEEAE; + if ("SASSBEEAS".equals(codeString)) + return SASSBEEAS; + if ("SBSEAE".equals(codeString)) + return SBSEAE; + if ("SAS".equals(codeString)) + return SAS; + if ("SAE".equals(codeString)) + return SAE; + if ("DURING".equals(codeString)) + return DURING; + if ("SASECWE".equals(codeString)) + return SASECWE; + if ("EASORECWS".equals(codeString)) + return EASORECWS; + if ("EAEORECW".equals(codeString)) + return EAEORECW; + if ("INDEPENDENT".equals(codeString)) + return INDEPENDENT; + if ("SAEORSCWE".equals(codeString)) + return SAEORSCWE; + if ("SASORSCW".equals(codeString)) + return SASORSCW; + if ("SBEORSCWE".equals(codeString)) + return SBEORSCWE; + if ("OVERLAP".equals(codeString)) + return OVERLAP; + if ("EDU".equals(codeString)) + return EDU; + if ("SBSEASEBE".equals(codeString)) + return SBSEASEBE; + if ("SBSEAS".equals(codeString)) + return SBSEAS; + if ("SDU".equals(codeString)) + return SDU; + if ("SBE".equals(codeString)) + return SBE; + if ("EBE".equals(codeString)) + return EBE; + if ("SBSEBE".equals(codeString)) + return SBSEBE; + if ("EBSORECWS".equals(codeString)) + return EBSORECWS; + if ("EBS".equals(codeString)) + return EBS; + if ("EBEORECW".equals(codeString)) + return EBEORECW; + if ("SBSORSCW".equals(codeString)) + return SBSORSCW; + if ("SBS".equals(codeString)) + return SBS; + if ("AUTH".equals(codeString)) + return AUTH; + if ("CAUS".equals(codeString)) + return CAUS; + if ("COMP".equals(codeString)) + return COMP; + if ("CTRLV".equals(codeString)) + return CTRLV; + if ("MBR".equals(codeString)) + return MBR; + if ("STEP".equals(codeString)) + return STEP; + if ("ARR".equals(codeString)) + return ARR; + if ("DEP".equals(codeString)) + return DEP; + if ("PART".equals(codeString)) + return PART; + if ("COVBY".equals(codeString)) + return COVBY; + if ("DRIV".equals(codeString)) + return DRIV; + if ("ELNK".equals(codeString)) + return ELNK; + if ("EVID".equals(codeString)) + return EVID; + if ("EXACBY".equals(codeString)) + return EXACBY; + if ("EXPL".equals(codeString)) + return EXPL; + if ("INTF".equals(codeString)) + return INTF; + if ("ITEMSLOC".equals(codeString)) + return ITEMSLOC; + if ("LIMIT".equals(codeString)) + return LIMIT; + if ("META".equals(codeString)) + return META; + if ("MFST".equals(codeString)) + return MFST; + if ("NAME".equals(codeString)) + return NAME; + if ("OUTC".equals(codeString)) + return OUTC; + if ("_ActRelationsipObjective".equals(codeString)) + return _ACTRELATIONSIPOBJECTIVE; + if ("OBJC".equals(codeString)) + return OBJC; + if ("OBJF".equals(codeString)) + return OBJF; + if ("GOAL".equals(codeString)) + return GOAL; + if ("RISK".equals(codeString)) + return RISK; + if ("PERT".equals(codeString)) + return PERT; + if ("PREV".equals(codeString)) + return PREV; + if ("REFR".equals(codeString)) + return REFR; + if ("USE".equals(codeString)) + return USE; + if ("REFV".equals(codeString)) + return REFV; + if ("RELVBY".equals(codeString)) + return RELVBY; + if ("SEQL".equals(codeString)) + return SEQL; + if ("APND".equals(codeString)) + return APND; + if ("BSLN".equals(codeString)) + return BSLN; + if ("COMPLY".equals(codeString)) + return COMPLY; + if ("DOC".equals(codeString)) + return DOC; + if ("FLFS".equals(codeString)) + return FLFS; + if ("OCCR".equals(codeString)) + return OCCR; + if ("OREF".equals(codeString)) + return OREF; + if ("SCH".equals(codeString)) + return SCH; + if ("GEN".equals(codeString)) + return GEN; + if ("GEVL".equals(codeString)) + return GEVL; + if ("INST".equals(codeString)) + return INST; + if ("MOD".equals(codeString)) + return MOD; + if ("MTCH".equals(codeString)) + return MTCH; + if ("OPTN".equals(codeString)) + return OPTN; + if ("RCHAL".equals(codeString)) + return RCHAL; + if ("REV".equals(codeString)) + return REV; + if ("RPLC".equals(codeString)) + return RPLC; + if ("SUCC".equals(codeString)) + return SUCC; + if ("UPDT".equals(codeString)) + return UPDT; + if ("XCRPT".equals(codeString)) + return XCRPT; + if ("VRXCRPT".equals(codeString)) + return VRXCRPT; + if ("XFRM".equals(codeString)) + return XFRM; + if ("SPRT".equals(codeString)) + return SPRT; + if ("SPRTBND".equals(codeString)) + return SPRTBND; + if ("SUBJ".equals(codeString)) + return SUBJ; + if ("QUALF".equals(codeString)) + return QUALF; + if ("SUMM".equals(codeString)) + return SUMM; + if ("VALUE".equals(codeString)) + return VALUE; + if ("CURE".equals(codeString)) + return CURE; + if ("CURE.ADJ".equals(codeString)) + return CURE_ADJ; + if ("MTGT.ADJ".equals(codeString)) + return MTGT_ADJ; + if ("RACT".equals(codeString)) + return RACT; + if ("SUGG".equals(codeString)) + return SUGG; + throw new FHIRException("Unknown V3ActRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ART: return "ART"; + case _ACTCLASSTEMPORALLYPERTAINS: return "_ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "_ActRelationshipAccounting"; + case _ACTRELATIONSHIPCOSTTRACKING: return "_ActRelationshipCostTracking"; + case CHRG: return "CHRG"; + case COST: return "COST"; + case _ACTRELATIONSHIPPOSTING: return "_ActRelationshipPosting"; + case CREDIT: return "CREDIT"; + case DEBIT: return "DEBIT"; + case _ACTRELATIONSHIPCONDITIONAL: return "_ActRelationshipConditional"; + case CIND: return "CIND"; + case PRCN: return "PRCN"; + case RSON: return "RSON"; + case BLOCK: return "BLOCK"; + case DIAG: return "DIAG"; + case IMM: return "IMM"; + case ACTIMM: return "ACTIMM"; + case PASSIMM: return "PASSIMM"; + case MITGT: return "MITGT"; + case RCVY: return "RCVY"; + case PRYLX: return "PRYLX"; + case TREAT: return "TREAT"; + case ADJUNCT: return "ADJUNCT"; + case MTREAT: return "MTREAT"; + case PALLTREAT: return "PALLTREAT"; + case SYMP: return "SYMP"; + case TRIG: return "TRIG"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "_ActRelationshipTemporallyPertains"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "_ActRelationshipTemporallyPertainsApproximates"; + case ENE: return "ENE"; + case ECW: return "ECW"; + case CONCURRENT: return "CONCURRENT"; + case SBSECWE: return "SBSECWE"; + case ENS: return "ENS"; + case ECWS: return "ECWS"; + case SNE: return "SNE"; + case SCWE: return "SCWE"; + case SNS: return "SNS"; + case SCW: return "SCW"; + case SCWSEBE: return "SCWSEBE"; + case SCWSEAE: return "SCWSEAE"; + case EAS: return "EAS"; + case EAE: return "EAE"; + case SASEAE: return "SASEAE"; + case SBEEAE: return "SBEEAE"; + case SASSBEEAS: return "SASSBEEAS"; + case SBSEAE: return "SBSEAE"; + case SAS: return "SAS"; + case SAE: return "SAE"; + case DURING: return "DURING"; + case SASECWE: return "SASECWE"; + case EASORECWS: return "EASORECWS"; + case EAEORECW: return "EAEORECW"; + case INDEPENDENT: return "INDEPENDENT"; + case SAEORSCWE: return "SAEORSCWE"; + case SASORSCW: return "SASORSCW"; + case SBEORSCWE: return "SBEORSCWE"; + case OVERLAP: return "OVERLAP"; + case EDU: return "EDU"; + case SBSEASEBE: return "SBSEASEBE"; + case SBSEAS: return "SBSEAS"; + case SDU: return "SDU"; + case SBE: return "SBE"; + case EBE: return "EBE"; + case SBSEBE: return "SBSEBE"; + case EBSORECWS: return "EBSORECWS"; + case EBS: return "EBS"; + case EBEORECW: return "EBEORECW"; + case SBSORSCW: return "SBSORSCW"; + case SBS: return "SBS"; + case AUTH: return "AUTH"; + case CAUS: return "CAUS"; + case COMP: return "COMP"; + case CTRLV: return "CTRLV"; + case MBR: return "MBR"; + case STEP: return "STEP"; + case ARR: return "ARR"; + case DEP: return "DEP"; + case PART: return "PART"; + case COVBY: return "COVBY"; + case DRIV: return "DRIV"; + case ELNK: return "ELNK"; + case EVID: return "EVID"; + case EXACBY: return "EXACBY"; + case EXPL: return "EXPL"; + case INTF: return "INTF"; + case ITEMSLOC: return "ITEMSLOC"; + case LIMIT: return "LIMIT"; + case META: return "META"; + case MFST: return "MFST"; + case NAME: return "NAME"; + case OUTC: return "OUTC"; + case _ACTRELATIONSIPOBJECTIVE: return "_ActRelationsipObjective"; + case OBJC: return "OBJC"; + case OBJF: return "OBJF"; + case GOAL: return "GOAL"; + case RISK: return "RISK"; + case PERT: return "PERT"; + case PREV: return "PREV"; + case REFR: return "REFR"; + case USE: return "USE"; + case REFV: return "REFV"; + case RELVBY: return "RELVBY"; + case SEQL: return "SEQL"; + case APND: return "APND"; + case BSLN: return "BSLN"; + case COMPLY: return "COMPLY"; + case DOC: return "DOC"; + case FLFS: return "FLFS"; + case OCCR: return "OCCR"; + case OREF: return "OREF"; + case SCH: return "SCH"; + case GEN: return "GEN"; + case GEVL: return "GEVL"; + case INST: return "INST"; + case MOD: return "MOD"; + case MTCH: return "MTCH"; + case OPTN: return "OPTN"; + case RCHAL: return "RCHAL"; + case REV: return "REV"; + case RPLC: return "RPLC"; + case SUCC: return "SUCC"; + case UPDT: return "UPDT"; + case XCRPT: return "XCRPT"; + case VRXCRPT: return "VRXCRPT"; + case XFRM: return "XFRM"; + case SPRT: return "SPRT"; + case SPRTBND: return "SPRTBND"; + case SUBJ: return "SUBJ"; + case QUALF: return "QUALF"; + case SUMM: return "SUMM"; + case VALUE: return "VALUE"; + case CURE: return "CURE"; + case CURE_ADJ: return "CURE.ADJ"; + case MTGT_ADJ: return "MTGT.ADJ"; + case RACT: return "RACT"; + case SUGG: return "SUGG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipType"; + } + public String getDefinition() { + switch (this) { + case ART: return "Description: A directed association between a source Act and a target Act.\r\n\n \n Usage Note: This code should never be transmitted in an instance as the value of ActRelationship.typeCode (attribute)"; + case _ACTCLASSTEMPORALLYPERTAINS: return "ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "Codes that describe the relationship between an Act and a financial instrument such as a financial transaction, account or invoice element."; + case _ACTRELATIONSHIPCOSTTRACKING: return "Expresses values for describing the relationship relationship between an InvoiceElement or InvoiceElementGroup and a billable act."; + case CHRG: return "A relationship that provides an ability to associate a financial transaction (target) as a charge to a clinical act (source). A clinical act may have a charge associated with the execution or delivery of the service.\r\n\n The financial transaction will define the charge (bill) for delivery or performance of the service.\r\n\n Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product."; + case COST: return "A relationship that provides an ability to associate a financial transaction (target) as a cost to a clinical act (source). A clinical act may have an inherit cost associated with the execution or delivery of the service.\r\n\n The financial transaction will define the cost of delivery or performance of the service.\r\n\n Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product."; + case _ACTRELATIONSHIPPOSTING: return "Expresses values for describing the relationship between a FinancialTransaction and an Account."; + case CREDIT: return "A credit relationship ties a financial transaction (target) to an account (source). A credit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account credit will decrease the account balance. A non-asset account credit will decrease the account balance."; + case DEBIT: return "A debit relationship ties a financial transaction (target) to an account (source). A debit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account debit will increase the account balance. A non-asset account debit will decrease the account balance."; + case _ACTRELATIONSHIPCONDITIONAL: return "Specifies under what circumstances (target Act) the source-Act may, must, must not or has occurred"; + case CIND: return "A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g., relative, absolute) is left as an open issue. The priorityNumber attribute could be used."; + case PRCN: return "A requirement to be true before a service is performed. The target can be any service in criterion mood. For multiple pre-conditions a conjunction attribute (AND, OR, XOR) is applicable."; + case RSON: return "Description: The reason or rationale for a service. A reason link is weaker than a trigger, it only suggests that some service may be or might have been a reason for some action, but not that this reason requires/required the action to be taken. Also, as opposed to the trigger, there is no strong timely relation between the reason and the action. As well as providing various types of information about the rationale for a service, the RSON act relationship is routinely used between a SBADM act and an OBS act to describe the indication for use of a medication. Child concepts may be used to describe types of indication. \r\n\n \n Discussion: In prior releases, the code \"SUGG\" (suggests) was expressed as \"an inversion of the reason link.\" That code has been retired in favor of the inversion indicator that is an attribute of ActRelationship."; + case BLOCK: return "Definition: The source act is performed to block the effects of the target act. This act relationship should be used when describing near miss type incidents where potential harm could have occurred, but the action described in the source act blocked the potential harmful effects of the incident actually occurring."; + case DIAG: return "Description: The source act is intended to help establish the presence of a (an adverse) situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case IMM: return "Description: The source act is intented to provide immunity against the effects of the target act (the target act describes an infectious disease)"; + case ACTIMM: return "Description: The source act is intended to provide active immunity against the effects of the target act (the target act describes an infectious disease)"; + case PASSIMM: return "Description: The source act is intended to provide passive immunity against the effects of the target act (the target act describes an infectious disease)."; + case MITGT: return "The source act removes or lessens the occurrence or effect of the target act."; + case RCVY: return "Definition: The source act is performed to recover from the effects of the target act."; + case PRYLX: return "Description: The source act is intended to reduce the risk of of an adverse situation to emerge as described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case TREAT: return "Description: The source act is intended to improve a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case ADJUNCT: return "Description: The source act is intended to offer an additional treatment for the management or cure of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. It is not a requirement that the non-adjunctive treatment is explicitly specified."; + case MTREAT: return "Description: The source act is intended to provide long term maintenance improvement or management of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case PALLTREAT: return "Description: The source act is intended to provide palliation for the effects of the target act."; + case SYMP: return "Description: The source act is intented to provide symptomatic relief for the effects of the target act."; + case TRIG: return "A pre-condition that if true should result in the source Act being executed. The target is in typically in criterion mood. When reported after the fact (i.e. the criterion has been met) it may be in Event mood. A delay between the trigger and the triggered action can be specified.\r\n\n \n Discussion: This includes the concept of a required act for a service or financial instrument such as an insurance plan or policy. In such cases, the trigger is the occurrence of a specific condition such as coverage limits being exceeded."; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "Abstract collector for ActRelationhsip types that relate two acts by their timing."; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "Abstract collector for ActRelationship types that relate two acts by their approximate timing."; + case ENE: return "A relationship in which the source act's effective time ends near the end of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is ENS"; + case ECW: return "A relationship in which the source act's effective time ends with the end of the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case CONCURRENT: return "A relationship in which the source act's effective time is the same as the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SBSECWE: return "The source Act starts before the start of the target Act, and ends with the target Act.\r\n\n \n UsageNote: Inverse code is SASECWE"; + case ENS: return "A relationship in which the source act's effective time ends near the start of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is ENE"; + case ECWS: return "The source Act ends when the target act starts (i.e. if we say \"ActOne ECWS ActTwo\", it means that ActOne ends when ActTwo starts, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SCWE"; + case SNE: return "A relationship in which the source act's effective time starts near the end of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is SNS"; + case SCWE: return "The source Act starts when the target act ends (i.e. if we say \"ActOne SCWE ActTwo\", it means that ActOne starts when ActTwo ends, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SBSECWS"; + case SNS: return "A relationship in which the source act's effective time starts near the start of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is SNE"; + case SCW: return "A relationship in which the source act's effective time starts with the start of the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SCWSEBE: return "The source Act starts with.the target Act and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SCWSEAE"; + case SCWSEAE: return "The source Act starts with the target Act, and ends after the end of the target Act."; + case EAS: return "A relationship in which the source act ends after the target act starts.\r\n\n \n UsageNote: Inverse code is SBE"; + case EAE: return "A relationship in which the source act ends after the target act ends.\r\n\n \n UsageNote: Inverse code is EBE"; + case SASEAE: return "The source Act starts after start of the target Act and ends after end of the target Act.\r\n\n \n UsageNote: Inverse code is SBSEBE"; + case SBEEAE: return "The source Act contains the end of the target Act.\r\n\n \n UsageNote: Inverse code is EDU"; + case SASSBEEAS: return "The source Act start after the start of the target Act, and contains the end of the target Act.\r\n\n \n UsageNote: Inverse code is SBSEASEBE"; + case SBSEAE: return "The source Act contains the time of the target Act.\r\n\n \n UsageNote: Inverse code is DURING"; + case SAS: return "The source Act starts after the start of the target Act (i.e. if we say \"ActOne SAS ActTwo\", it means that ActOne starts after the start of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SBS"; + case SAE: return "A relationship in which the source act starts after the target act ends.\r\n\n \n UsageNote: Inverse code is EBS"; + case DURING: return "A relationship in which the source act's effective time is wholly within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBSEAE"; + case SASECWE: return "The source Act starts after start of the target Act, and ends with the target Act.\r\n\n \n UsageNote: Inverse code is SBSECWE"; + case EASORECWS: return "A relationship in which the source act's effective time ends after or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EBSORECWS"; + case EAEORECW: return "A relationship in which the source act's effective time ends after or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EBEORECW"; + case INDEPENDENT: return "The source Act is independent of the time of the target Act.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SAEORSCWE: return "A relationship in which the source act's effective time starts after or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SBEORSCWE"; + case SASORSCW: return "A relationship in which the source act's effective time starts after or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SBSORSCW"; + case SBEORSCWE: return "A relationship in which the source act's effective time starts before or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SAEORSCWE"; + case OVERLAP: return "A relationship in which the source act's effective time overlaps the target act's effective time in any way.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case EDU: return "A relationship in which the source act ends within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBEEAE"; + case SBSEASEBE: return "The source Act contains the start of the target Act, and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SASSBEEAS"; + case SBSEAS: return "The source Act contains the start of the target Act.\r\n\n \n UsageNote: Inverse code is SDU"; + case SDU: return "A relationship in which the source act starts within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBSEAS"; + case SBE: return "The source Act starts before the end of the target Act (i.e. if we say \"ActOne SBE ActTwo\", it means that ActOne starts before the end of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is EAS"; + case EBE: return "The source Act ends before the end of the target Act (i.e. if we say \"ActOne EBE ActTwo\", it means that ActOne ends before the end of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is EAE"; + case SBSEBE: return "The source Act starts before the start of the target Act, and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SASEAE"; + case EBSORECWS: return "A relationship in which the source act's effective time ends before or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EASORECWS"; + case EBS: return "A relationship in which the source act ends before the target act starts.\r\n\n \n UsageNote: Inverse code is SAE"; + case EBEORECW: return "A relationship in which the source act's effective time ends before or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EAEORECW"; + case SBSORSCW: return "A relationship in which the source act's effective time starts before or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SASORSCW"; + case SBS: return "A relationship in which the source act begins before the target act begins.\r\n\n \n UsageNote: Inverse code is SAS"; + case AUTH: return "A relationship in which the target act authorizes or certifies the source act."; + case CAUS: return "Description: An assertion that an act was the cause of another act.This is stronger and more specific than the support link. The source (cause) is typically an observation, but may be any act, while the target may be any act.\r\n\n \n Examples:\n \r\n\n \n a growth of Staphylococcus aureus may be considered the cause of an abscess\n contamination of the infusion bag was deemed to be the cause of the infection that the patient experienced\n lack of staff on the shift was deemed to be a supporting factor (proximal factor) causing the patient safety incident where the patient fell out of bed because the bed-sides had not been put up which caused the night patient to fall out of bed"; + case COMP: return "The target act is a component of the source act, with no semantics regarding composition or aggregation implied."; + case CTRLV: return "A relationship from an Act to a Control Variable. For example, if a Device makes an Observation, this relates the Observation to its Control Variables documenting the device's settings that influenced the observation."; + case MBR: return "The target Acts are aggregated by the source Act. Target Acts may have independent existence, participate in multiple ActRelationships, and do not contribute to the meaning of the source.\r\n\n \n UsageNotes: This explicitly represents the conventional notion of aggregation. The target Act is part of a collection of Acts (no implication is made of cardinality, a source of Acts may contain zero, one, or more member target Acts).\r\n\n It is expected that this will be primarily used with _ActClassRecordOrganizer, BATTERY, and LIST"; + case STEP: return "A collection of sub-services as steps or subtasks performed for the source service. Services may be performed sequentially or concurrently.\r\n\n \n UsageNotes: Sequence of steps may be indicated by use of _ActRelationshipTemporallyPertains, as well as via ActRelationship.sequenceNumber, ActRelationship.pauseQuantity, Target.priorityCode.\r\n\n \n OpenIssue: Need Additional guidelines on when each approach should be used."; + case ARR: return "The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act entered into the source Act by means of the target Transportation act."; + case DEP: return "The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act departed from the source Act by means of the target Transportation act."; + case PART: return "The source Act is a composite of the target Acts. The target Acts do not have an existence independent of the source Act.\r\n\n \n UsageNote: In UML 1.1, this is a \"composition\" defined as: \n \"A form of aggregation with strong ownership and coincident lifetime as part of the whole. Parts with non-fixed multiplicity may be created after the composite itself, but once created they live and die with it (i.e., they share lifetimes). Such parts can also be explicitly removed before the death of the composite. Composition may be recursive.\""; + case COVBY: return "A relationship in which the source act is covered by or is under the authority of a target act. A financial instrument such as an Invoice Element is covered by one or more specific instances of an Insurance Policy."; + case DRIV: return "Associates a derived Act with its input parameters. E.G., an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts."; + case ELNK: return "Expresses an association that links two instances of the same act over time, indicating that the instance are part of the same episode, e.g. linking two condition nodes for episode of illness; linking two encounters for episode of encounter."; + case EVID: return "Indicates that the target Act provides evidence in support of the action represented by the source Act. The target is not a 'reason' for the source act, but rather gives supporting information on why the source act is an appropriate course of action. Possible targets might be clinical trial results, journal articles, similar successful therapies, etc.\r\n\n \n Rationale: Provides a mechanism for conveying clinical justification for non-approved or otherwise non-traditional therapies."; + case EXACBY: return "Description:The source act is aggravated by the target act. (Example \"chest pain\" EXACBY \"exercise\")"; + case EXPL: return "This is the inversion of support. Used to indicate that a given observation is explained by another observation or condition."; + case INTF: return "the target act documents a set of circumstances (events, risks) which prevent successful completion, or degradation of quality of, the source Act.\r\n\n \n UsageNote: This provides the semantics to document barriers to care"; + case ITEMSLOC: return "Items located"; + case LIMIT: return "A relationship that limits or restricts the source act by the elements of the target act. For example, an authorization may be limited by a financial amount (up to $500). Target Act must be in EVN.CRIT mood."; + case META: return "Definition: Indicates that the attributes and associations of the target act provide metadata (for example, identifiers, authorship, etc.) for the source act.\r\n\n \n Constraint: Source act must have either a mood code that is not \"EVN\" (event) or its \"isCriterion\" attribute must set to \"true\". Target act must be an Act with a mood code of EVN and with isCriterionInd attribute set to \"true\"."; + case MFST: return "An assertion that a new observation may be the manifestation of another existing observation or action. This assumption is attributed to the same actor who asserts the manifestation. This is stronger and more specific than an inverted support link. For example, an agitated appearance can be asserted to be the manifestation (effect) of a known hyperthyroxia. This expresses that one might not have realized a symptom if it would not be a common manifestation of a known condition. The target (cause) may be any service, while the source (manifestation) must be an observation."; + case NAME: return "Used to assign a \"name\" to a condition thread. Source is a condition node, target can be any service."; + case OUTC: return "An observation that should follow or does actually follow as a result or consequence of a condition or action (sometimes called \"post-conditional\".) Target must be an observation as a goal, risk or any criterion. For complex outcomes a conjunction attribute (AND, OR, XOR) can be used. An outcome link is often inverted to describe an outcome assessment."; + case _ACTRELATIONSIPOBJECTIVE: return "The target act is a desired outcome of the source act. Source is any act (typically an intervention). Target must be an observation in criterion mood."; + case OBJC: return "A desired state that a service action aims to maintain. E.g., keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood."; + case OBJF: return "A desired outcome that a service action aims to meet finally. Source is any service (typically an intervention). Target must be an observation in criterion mood."; + case GOAL: return "A goal that one defines given a patient's health condition. Subsequently planned actions aim to meet that goal. Source is an observation or condition node, target must be an observation in goal mood."; + case RISK: return "A noteworthy undesired outcome of a patient's condition that is either likely enough to become an issue or is less likely but dangerous enough to be addressed."; + case PERT: return "This is a very unspecific relationship from one item of clinical information to another. It does not judge about the role the pertinent information plays."; + case PREV: return "A relationship in which the target act is a predecessor instance to the source act. Generally each of these instances is similar, but no identical. In healthcare coverage it is used to link a claim item to a previous claim item that might have claimed for the same set of services."; + case REFR: return "A relationship in which the target act is referred to by the source act. This permits a simple reference relationship that distinguishes between the referent and the referee."; + case USE: return "Indicates that the source act makes use of (or will make use of) the information content of the target act.\r\n\n \n UsageNotes: A usage relationship only makes sense if the target act is authored and occurs independently of the source act. Otherwise a simpler relationship such as COMP would be appropriate.\r\n\n \n Rationale: There is a need when defining a clinical trial protocol to indicate that the protocol makes use of other protocol or treatment specifications. This is stronger than the assertion of \"references\". References may exist without usage, and in a clinical trial protocol is common to assert both: what other specifications does this trial use and what other specifications does it merely reference."; + case REFV: return "Reference ranges are essentially descriptors of a class of result values assumed to be \"normal\", \"abnormal\", or \"critical.\" Those can vary by sex, age, or any other criterion. Source and target are observations, the target is in criterion mood. This link type can act as a trigger in case of alarms being triggered by critical results."; + case RELVBY: return "Description:The source act is wholly or partially alleviated by the target act. (Example \"chest pain\" RELVBY \"sublingual nitroglycerin administration\")"; + case SEQL: return "An act relationship indicating that the source act follows the target act. The source act should in principle represent the same kind of act as the target. Source and target need not have the same mood code (mood will often differ). The target of a sequel is called antecedent. Examples for sequel relationships are: revision, transformation, derivation from a prototype (as a specialization is a derivation of a generalization), followup, realization, instantiation."; + case APND: return "An addendum (source) to an existing service object (target), containing supplemental information. The addendum is itself an original service object linked to the supplemented service object. The supplemented service object remains in place and its content and status are unaltered."; + case BSLN: return "Indicates that the target observation(s) provide an initial reference for the source observation or observation group.\r\n\n \n UsageConstraints: Both source and target must be Observations or specializations thereof."; + case COMPLY: return "Description:The source act complies with, adheres to, conforms to, or is permissible under (in whole or in part) the policy, contract, agreement, law, conformance criteria, certification guidelines or requirement conveyed by the target act.\r\n\n Examples for compliance relationships are: audits of adherence with a security policy, certificate of conformance to system certification requirements, or consent directive in compliance with or permissible under a privacy policy."; + case DOC: return "The source act documents the target act."; + case FLFS: return "The source act fulfills (in whole or in part) the target act. Source act must be in a mood equal or more actual than the target act."; + case OCCR: return "The source act is a single occurrence of a repeatable target act. The source and target act can be in any mood on the \"completion track\" but the source act must be as far as or further along the track than the target act (i.e., the occurrence of an intent can be an event but not vice versa)."; + case OREF: return "Relates either an appointment request or an appointment to the order for the service being scheduled."; + case SCH: return "Associates a specific time (and associated resources) with a scheduling request or other intent."; + case GEN: return "The generalization relationship can be used to express categorical knowledge about services (e.g., amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic)."; + case GEVL: return "A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a \"goal distance\" (e.g., goal to observation) can be \"calculated\" and need not be sent explicitly."; + case INST: return "Used to capture the link between a potential service (\"master\" or plan) and an actual service, where the actual service instantiates the potential service. The instantiation may override the master's defaults."; + case MOD: return "Definition: Used to link a newer version or 'snapshot' of a business object (source) to an older version or 'snapshot' of the same business object (target).\r\n\n \n Usage:The identifier of the Act should be the same for both source and target. If the identifiers are distinct, RPLC should be used instead.\r\n\n Name from source to target = \"modifiesPrior\"\r\n\n Name from target to source = \"modifiesByNew\""; + case MTCH: return "A trigger-match links an actual service (e.g., an observation or procedure that took place) with a service in criterion mood. For example if the trigger is \"observation of pain\" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger."; + case OPTN: return "A relationship between a source Act that provides more detailed properties to the target Act.\r\n\n The source act thus is a specialization of the target act, but instead of mentioning all the inherited properties it only mentions new property bindings or refinements.\r\n\n The typical use case is to specify certain alternative variants of one kind of Act. The priorityNumber attribute is used to weigh refinements as preferred over other alternative refinements.\r\n\n Example: several routing options for a drug are specified as one SubstanceAdministration for the general treatment with attached refinements for the various routing options."; + case RCHAL: return "Description:A relationship in which the target act is carried out to determine whether an effect attributed to the source act can be recreated."; + case REV: return "A relationship between a source Act that seeks to reverse or undo the action of the prior target Act.\r\n\n Example: A posted financial transaction (e.g., a debit transaction) was applied in error and must be reversed (e.g., by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction.\r\n\n Constraints: the \"completion track\" mood of the target Act must be equally or more \"actual\" than the source act. I.e., when the target act is EVN the source act can be EVN, or any INT. If the target act is INT, the source act can be INT."; + case RPLC: return "A replacement source act replaces an existing target act. The state of the target act being replaced becomes obselete, but the act is typically still retained in the system for historical reference. The source and target must be of the same type."; + case SUCC: return "Definition: A new act that carries forward the intention of the original act, but does not completely replace it. The status of the predecessor act must be 'completed'. The original act is the target act and the successor is the source act."; + case UPDT: return "A condition thread relationship specifically links condition nodes together to form a condition thread. The source is the new condition node and the target links to the most recent node of the existing condition thread."; + case XCRPT: return "The source is an excerpt from the target."; + case VRXCRPT: return "The source is a direct quote from the target."; + case XFRM: return "Used when the target Act is a transformation of the source Act. (For instance, used to show that a CDA document is a transformation of a DICOM SR document.)"; + case SPRT: return "Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g., to indicate a status post)."; + case SPRTBND: return "A specialization of \"has support\" (SPRT), used to relate a secondary observation to a Region of Interest on a multidimensional observation, if the ROI specifies the true boundaries of the secondary observation as opposed to only marking the approximate area. For example, if the start and end of an ST elevation episode is visible in an EKG, this relation would indicate the ROI bounds the \"ST elevation\" observation -- the ROI defines the true beginning and ending of the episode. Conversely, if a ROI simply contains ST elevation, but it does not define the bounds (start and end) of the episode, the more general \"has support\" relation is used. Likewise, if a ROI on an image defines the true bounds of a \"1st degree burn\", the relation \"has bounded support\" is used; but if the ROI only points to the approximate area of the burn, the general \"has support\" relation is used."; + case SUBJ: return "Relates an Act to its subject Act that the first Act is primarily concerned with.\r\n\n Examples\r\n\n \n \n The first Act may be a ControlAct manipulating the subject Act \r\n\n \n \n The first act is a region of interest (ROI) that defines a region within the subject Act.\r\n\n \n \n The first act is a reporting or notification Act, that echos the subject Act for a specific new purpose.\r\n\n \n \n Constraints\r\n\n An Act may have multiple subject acts.\r\n\n Rationale\r\n\n The ActRelationshipType \"has subject\" is similar to the ParticipationType \"subject\", Acts that primarily operate on physical subjects use the Participation, those Acts that primarily operate on other Acts (other information) use the ActRelationship."; + case QUALF: return "The target observation qualifies (refines) the semantics of the source observation.\r\n\n \n UsageNote: This is not intended to replace concept refinement and qualification via vocabulary. It is used when there are multiple components which together provide the complete understanding of the source Act."; + case SUMM: return "An act that contains summary values for a list or set of subordinate acts. For example, a summary of transactions for a particular accounting period."; + case VALUE: return "Description:Indicates that the target Act represents the result of the source observation Act.\r\n\n \n FormalConstraint: Source Act must be an Observation or specialization there-of. Source Act must not have the value attribute specified\r\n\n \n UsageNote: This relationship allows the result of an observation to be fully expressed as RIM acts as opposed to being embedded in the value attribute. For example, sending a Document act as the result of an imaging observation, sending a list of Procedures and/or other acts as the result of a medical history observation.\r\n\n The valueNegationInd attribute on the source Act has the same semantics of \"negated finding\" when it applies to the target of a VALUE ActRelationship as it does to the value attribute. On the other hand, if the ActRelationship.negationInd is true for a VALUE ActRelationship, that means the specified observation does not have the indicated value but does not imply a negated finding. Because the semantics are extremely close, it is recommended that Observation.valueNegationInd be used, not ActRelationship.negationInd.\r\n\n \n OpenIssue: The implications of negationInd on ActRelationship and the valueNegationind on Observation."; + case CURE: return "curative indication"; + case CURE_ADJ: return "adjunct curative indication"; + case MTGT_ADJ: return "adjunct mitigation"; + case RACT: return ""; + case SUGG: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ART: return "act relationship type"; + case _ACTCLASSTEMPORALLYPERTAINS: return "ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "ActRelationshipAccounting"; + case _ACTRELATIONSHIPCOSTTRACKING: return "ActRelationshipCostTracking"; + case CHRG: return "has charge"; + case COST: return "has cost"; + case _ACTRELATIONSHIPPOSTING: return "ActRelationshipPosting"; + case CREDIT: return "has credit"; + case DEBIT: return "has debit"; + case _ACTRELATIONSHIPCONDITIONAL: return "ActRelationshipConditional"; + case CIND: return "has contra-indication"; + case PRCN: return "has pre-condition"; + case RSON: return "has reason"; + case BLOCK: return "blocks"; + case DIAG: return "diagnoses"; + case IMM: return "immunization against"; + case ACTIMM: return "active immunization against"; + case PASSIMM: return "passive immunization against"; + case MITGT: return "mitigates"; + case RCVY: return "recovers"; + case PRYLX: return "prophylaxis of"; + case TREAT: return "treats"; + case ADJUNCT: return "adjunctive treatment"; + case MTREAT: return "maintenance treatment"; + case PALLTREAT: return "palliates"; + case SYMP: return "symptomatic relief"; + case TRIG: return "has trigger"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "ActRelationshipTemporallyPertains"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "ActRelationshipTemporallyPertainsApproximates"; + case ENE: return "ends near end"; + case ECW: return "ends concurrent with"; + case CONCURRENT: return "concurrent with"; + case SBSECWE: return "starts before start of, ends with"; + case ENS: return "ends near start"; + case ECWS: return "ends concurrent with start of"; + case SNE: return "starts near end"; + case SCWE: return "starts concurrent with end of"; + case SNS: return "starts near start"; + case SCW: return "starts concurrent with"; + case SCWSEBE: return "starts with. ends before end of"; + case SCWSEAE: return "starts with, ends after end of"; + case EAS: return "ends after start of"; + case EAE: return "ends after end of"; + case SASEAE: return "starts after start of, ends after end of"; + case SBEEAE: return "contains end of"; + case SASSBEEAS: return "start after start of, contains end of"; + case SBSEAE: return "contains time of"; + case SAS: return "starts after start of"; + case SAE: return "starts after end of"; + case DURING: return "occurs during"; + case SASECWE: return "starts after start of, ends with"; + case EASORECWS: return "ends after or concurrent with start of"; + case EAEORECW: return "ends after or concurrent with end of"; + case INDEPENDENT: return "independent of time of"; + case SAEORSCWE: return "starts after or concurrent with end of"; + case SASORSCW: return "starts after or concurrent with start of"; + case SBEORSCWE: return "starts before or concurrent with end of"; + case OVERLAP: return "overlaps with"; + case EDU: return "ends during"; + case SBSEASEBE: return "contains start of, ends before end of"; + case SBSEAS: return "contains start of"; + case SDU: return "starts during"; + case SBE: return "starts before end of"; + case EBE: return "ends before end of"; + case SBSEBE: return "starts before start of, ends before end of"; + case EBSORECWS: return "ends before or concurrent with start of"; + case EBS: return "ends before start of"; + case EBEORECW: return "ends before or concurrent with end of"; + case SBSORSCW: return "starts before or concurrent with start of"; + case SBS: return "starts before start of"; + case AUTH: return "authorized by"; + case CAUS: return "is etiology for"; + case COMP: return "has component"; + case CTRLV: return "has control variable"; + case MBR: return "has member"; + case STEP: return "has step"; + case ARR: return "arrival"; + case DEP: return "departure"; + case PART: return "has part"; + case COVBY: return "covered by"; + case DRIV: return "is derived from"; + case ELNK: return "episodeLink"; + case EVID: return "provides evidence for"; + case EXACBY: return "exacerbated by"; + case EXPL: return "has explanation"; + case INTF: return "interfered by"; + case ITEMSLOC: return "items located"; + case LIMIT: return "limited by"; + case META: return "has metadata"; + case MFST: return "is manifestation of"; + case NAME: return "assigns name"; + case OUTC: return "has outcome"; + case _ACTRELATIONSIPOBJECTIVE: return "Act Relationsip Objective"; + case OBJC: return "has continuing objective"; + case OBJF: return "has final objective"; + case GOAL: return "has goal"; + case RISK: return "has risk"; + case PERT: return "has pertinent information"; + case PREV: return "has previous instance"; + case REFR: return "refers to"; + case USE: return "uses"; + case REFV: return "has reference values"; + case RELVBY: return "relieved by"; + case SEQL: return "is sequel"; + case APND: return "is appendage"; + case BSLN: return "has baseline"; + case COMPLY: return "complies with"; + case DOC: return "documents"; + case FLFS: return "fulfills"; + case OCCR: return "occurrence"; + case OREF: return "references order"; + case SCH: return "schedules request"; + case GEN: return "has generalization"; + case GEVL: return "evaluates (goal)"; + case INST: return "instantiates (master)"; + case MOD: return "modifies"; + case MTCH: return "matches (trigger)"; + case OPTN: return "has option"; + case RCHAL: return "re-challenge"; + case REV: return "reverses"; + case RPLC: return "replaces"; + case SUCC: return "succeeds"; + case UPDT: return "updates (condition)"; + case XCRPT: return "Excerpts"; + case VRXCRPT: return "Excerpt verbatim"; + case XFRM: return "transformation"; + case SPRT: return "has support"; + case SPRTBND: return "has bounded support"; + case SUBJ: return "has subject"; + case QUALF: return "has qualifier"; + case SUMM: return "summarized by"; + case VALUE: return "has value"; + case CURE: return "curative indication"; + case CURE_ADJ: return "adjunct curative indication"; + case MTGT_ADJ: return "adjunct mitigation"; + case RACT: return "RACT"; + case SUGG: return "SUGG"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..13648146fd4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActRelationshipTypeEnumFactory.java @@ -0,0 +1,599 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActRelationshipTypeEnumFactory implements EnumFactory { + + public V3ActRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ART".equals(codeString)) + return V3ActRelationshipType.ART; + if ("_ActClassTemporallyPertains".equals(codeString)) + return V3ActRelationshipType._ACTCLASSTEMPORALLYPERTAINS; + if ("_ActRelationshipAccounting".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPACCOUNTING; + if ("_ActRelationshipCostTracking".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPCOSTTRACKING; + if ("CHRG".equals(codeString)) + return V3ActRelationshipType.CHRG; + if ("COST".equals(codeString)) + return V3ActRelationshipType.COST; + if ("_ActRelationshipPosting".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPPOSTING; + if ("CREDIT".equals(codeString)) + return V3ActRelationshipType.CREDIT; + if ("DEBIT".equals(codeString)) + return V3ActRelationshipType.DEBIT; + if ("_ActRelationshipConditional".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPCONDITIONAL; + if ("CIND".equals(codeString)) + return V3ActRelationshipType.CIND; + if ("PRCN".equals(codeString)) + return V3ActRelationshipType.PRCN; + if ("RSON".equals(codeString)) + return V3ActRelationshipType.RSON; + if ("BLOCK".equals(codeString)) + return V3ActRelationshipType.BLOCK; + if ("DIAG".equals(codeString)) + return V3ActRelationshipType.DIAG; + if ("IMM".equals(codeString)) + return V3ActRelationshipType.IMM; + if ("ACTIMM".equals(codeString)) + return V3ActRelationshipType.ACTIMM; + if ("PASSIMM".equals(codeString)) + return V3ActRelationshipType.PASSIMM; + if ("MITGT".equals(codeString)) + return V3ActRelationshipType.MITGT; + if ("RCVY".equals(codeString)) + return V3ActRelationshipType.RCVY; + if ("PRYLX".equals(codeString)) + return V3ActRelationshipType.PRYLX; + if ("TREAT".equals(codeString)) + return V3ActRelationshipType.TREAT; + if ("ADJUNCT".equals(codeString)) + return V3ActRelationshipType.ADJUNCT; + if ("MTREAT".equals(codeString)) + return V3ActRelationshipType.MTREAT; + if ("PALLTREAT".equals(codeString)) + return V3ActRelationshipType.PALLTREAT; + if ("SYMP".equals(codeString)) + return V3ActRelationshipType.SYMP; + if ("TRIG".equals(codeString)) + return V3ActRelationshipType.TRIG; + if ("_ActRelationshipTemporallyPertains".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINS; + if ("_ActRelationshipTemporallyPertainsApproximates".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES; + if ("ENE".equals(codeString)) + return V3ActRelationshipType.ENE; + if ("ECW".equals(codeString)) + return V3ActRelationshipType.ECW; + if ("CONCURRENT".equals(codeString)) + return V3ActRelationshipType.CONCURRENT; + if ("SBSECWE".equals(codeString)) + return V3ActRelationshipType.SBSECWE; + if ("ENS".equals(codeString)) + return V3ActRelationshipType.ENS; + if ("ECWS".equals(codeString)) + return V3ActRelationshipType.ECWS; + if ("SNE".equals(codeString)) + return V3ActRelationshipType.SNE; + if ("SCWE".equals(codeString)) + return V3ActRelationshipType.SCWE; + if ("SNS".equals(codeString)) + return V3ActRelationshipType.SNS; + if ("SCW".equals(codeString)) + return V3ActRelationshipType.SCW; + if ("SCWSEBE".equals(codeString)) + return V3ActRelationshipType.SCWSEBE; + if ("SCWSEAE".equals(codeString)) + return V3ActRelationshipType.SCWSEAE; + if ("EAS".equals(codeString)) + return V3ActRelationshipType.EAS; + if ("EAE".equals(codeString)) + return V3ActRelationshipType.EAE; + if ("SASEAE".equals(codeString)) + return V3ActRelationshipType.SASEAE; + if ("SBEEAE".equals(codeString)) + return V3ActRelationshipType.SBEEAE; + if ("SASSBEEAS".equals(codeString)) + return V3ActRelationshipType.SASSBEEAS; + if ("SBSEAE".equals(codeString)) + return V3ActRelationshipType.SBSEAE; + if ("SAS".equals(codeString)) + return V3ActRelationshipType.SAS; + if ("SAE".equals(codeString)) + return V3ActRelationshipType.SAE; + if ("DURING".equals(codeString)) + return V3ActRelationshipType.DURING; + if ("SASECWE".equals(codeString)) + return V3ActRelationshipType.SASECWE; + if ("EASORECWS".equals(codeString)) + return V3ActRelationshipType.EASORECWS; + if ("EAEORECW".equals(codeString)) + return V3ActRelationshipType.EAEORECW; + if ("INDEPENDENT".equals(codeString)) + return V3ActRelationshipType.INDEPENDENT; + if ("SAEORSCWE".equals(codeString)) + return V3ActRelationshipType.SAEORSCWE; + if ("SASORSCW".equals(codeString)) + return V3ActRelationshipType.SASORSCW; + if ("SBEORSCWE".equals(codeString)) + return V3ActRelationshipType.SBEORSCWE; + if ("OVERLAP".equals(codeString)) + return V3ActRelationshipType.OVERLAP; + if ("EDU".equals(codeString)) + return V3ActRelationshipType.EDU; + if ("SBSEASEBE".equals(codeString)) + return V3ActRelationshipType.SBSEASEBE; + if ("SBSEAS".equals(codeString)) + return V3ActRelationshipType.SBSEAS; + if ("SDU".equals(codeString)) + return V3ActRelationshipType.SDU; + if ("SBE".equals(codeString)) + return V3ActRelationshipType.SBE; + if ("EBE".equals(codeString)) + return V3ActRelationshipType.EBE; + if ("SBSEBE".equals(codeString)) + return V3ActRelationshipType.SBSEBE; + if ("EBSORECWS".equals(codeString)) + return V3ActRelationshipType.EBSORECWS; + if ("EBS".equals(codeString)) + return V3ActRelationshipType.EBS; + if ("EBEORECW".equals(codeString)) + return V3ActRelationshipType.EBEORECW; + if ("SBSORSCW".equals(codeString)) + return V3ActRelationshipType.SBSORSCW; + if ("SBS".equals(codeString)) + return V3ActRelationshipType.SBS; + if ("AUTH".equals(codeString)) + return V3ActRelationshipType.AUTH; + if ("CAUS".equals(codeString)) + return V3ActRelationshipType.CAUS; + if ("COMP".equals(codeString)) + return V3ActRelationshipType.COMP; + if ("CTRLV".equals(codeString)) + return V3ActRelationshipType.CTRLV; + if ("MBR".equals(codeString)) + return V3ActRelationshipType.MBR; + if ("STEP".equals(codeString)) + return V3ActRelationshipType.STEP; + if ("ARR".equals(codeString)) + return V3ActRelationshipType.ARR; + if ("DEP".equals(codeString)) + return V3ActRelationshipType.DEP; + if ("PART".equals(codeString)) + return V3ActRelationshipType.PART; + if ("COVBY".equals(codeString)) + return V3ActRelationshipType.COVBY; + if ("DRIV".equals(codeString)) + return V3ActRelationshipType.DRIV; + if ("ELNK".equals(codeString)) + return V3ActRelationshipType.ELNK; + if ("EVID".equals(codeString)) + return V3ActRelationshipType.EVID; + if ("EXACBY".equals(codeString)) + return V3ActRelationshipType.EXACBY; + if ("EXPL".equals(codeString)) + return V3ActRelationshipType.EXPL; + if ("INTF".equals(codeString)) + return V3ActRelationshipType.INTF; + if ("ITEMSLOC".equals(codeString)) + return V3ActRelationshipType.ITEMSLOC; + if ("LIMIT".equals(codeString)) + return V3ActRelationshipType.LIMIT; + if ("META".equals(codeString)) + return V3ActRelationshipType.META; + if ("MFST".equals(codeString)) + return V3ActRelationshipType.MFST; + if ("NAME".equals(codeString)) + return V3ActRelationshipType.NAME; + if ("OUTC".equals(codeString)) + return V3ActRelationshipType.OUTC; + if ("_ActRelationsipObjective".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSIPOBJECTIVE; + if ("OBJC".equals(codeString)) + return V3ActRelationshipType.OBJC; + if ("OBJF".equals(codeString)) + return V3ActRelationshipType.OBJF; + if ("GOAL".equals(codeString)) + return V3ActRelationshipType.GOAL; + if ("RISK".equals(codeString)) + return V3ActRelationshipType.RISK; + if ("PERT".equals(codeString)) + return V3ActRelationshipType.PERT; + if ("PREV".equals(codeString)) + return V3ActRelationshipType.PREV; + if ("REFR".equals(codeString)) + return V3ActRelationshipType.REFR; + if ("USE".equals(codeString)) + return V3ActRelationshipType.USE; + if ("REFV".equals(codeString)) + return V3ActRelationshipType.REFV; + if ("RELVBY".equals(codeString)) + return V3ActRelationshipType.RELVBY; + if ("SEQL".equals(codeString)) + return V3ActRelationshipType.SEQL; + if ("APND".equals(codeString)) + return V3ActRelationshipType.APND; + if ("BSLN".equals(codeString)) + return V3ActRelationshipType.BSLN; + if ("COMPLY".equals(codeString)) + return V3ActRelationshipType.COMPLY; + if ("DOC".equals(codeString)) + return V3ActRelationshipType.DOC; + if ("FLFS".equals(codeString)) + return V3ActRelationshipType.FLFS; + if ("OCCR".equals(codeString)) + return V3ActRelationshipType.OCCR; + if ("OREF".equals(codeString)) + return V3ActRelationshipType.OREF; + if ("SCH".equals(codeString)) + return V3ActRelationshipType.SCH; + if ("GEN".equals(codeString)) + return V3ActRelationshipType.GEN; + if ("GEVL".equals(codeString)) + return V3ActRelationshipType.GEVL; + if ("INST".equals(codeString)) + return V3ActRelationshipType.INST; + if ("MOD".equals(codeString)) + return V3ActRelationshipType.MOD; + if ("MTCH".equals(codeString)) + return V3ActRelationshipType.MTCH; + if ("OPTN".equals(codeString)) + return V3ActRelationshipType.OPTN; + if ("RCHAL".equals(codeString)) + return V3ActRelationshipType.RCHAL; + if ("REV".equals(codeString)) + return V3ActRelationshipType.REV; + if ("RPLC".equals(codeString)) + return V3ActRelationshipType.RPLC; + if ("SUCC".equals(codeString)) + return V3ActRelationshipType.SUCC; + if ("UPDT".equals(codeString)) + return V3ActRelationshipType.UPDT; + if ("XCRPT".equals(codeString)) + return V3ActRelationshipType.XCRPT; + if ("VRXCRPT".equals(codeString)) + return V3ActRelationshipType.VRXCRPT; + if ("XFRM".equals(codeString)) + return V3ActRelationshipType.XFRM; + if ("SPRT".equals(codeString)) + return V3ActRelationshipType.SPRT; + if ("SPRTBND".equals(codeString)) + return V3ActRelationshipType.SPRTBND; + if ("SUBJ".equals(codeString)) + return V3ActRelationshipType.SUBJ; + if ("QUALF".equals(codeString)) + return V3ActRelationshipType.QUALF; + if ("SUMM".equals(codeString)) + return V3ActRelationshipType.SUMM; + if ("VALUE".equals(codeString)) + return V3ActRelationshipType.VALUE; + if ("CURE".equals(codeString)) + return V3ActRelationshipType.CURE; + if ("CURE.ADJ".equals(codeString)) + return V3ActRelationshipType.CURE_ADJ; + if ("MTGT.ADJ".equals(codeString)) + return V3ActRelationshipType.MTGT_ADJ; + if ("RACT".equals(codeString)) + return V3ActRelationshipType.RACT; + if ("SUGG".equals(codeString)) + return V3ActRelationshipType.SUGG; + throw new IllegalArgumentException("Unknown V3ActRelationshipType code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipType code) { + if (code == V3ActRelationshipType.ART) + return "ART"; + if (code == V3ActRelationshipType._ACTCLASSTEMPORALLYPERTAINS) + return "_ActClassTemporallyPertains"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPACCOUNTING) + return "_ActRelationshipAccounting"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPCOSTTRACKING) + return "_ActRelationshipCostTracking"; + if (code == V3ActRelationshipType.CHRG) + return "CHRG"; + if (code == V3ActRelationshipType.COST) + return "COST"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPPOSTING) + return "_ActRelationshipPosting"; + if (code == V3ActRelationshipType.CREDIT) + return "CREDIT"; + if (code == V3ActRelationshipType.DEBIT) + return "DEBIT"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPCONDITIONAL) + return "_ActRelationshipConditional"; + if (code == V3ActRelationshipType.CIND) + return "CIND"; + if (code == V3ActRelationshipType.PRCN) + return "PRCN"; + if (code == V3ActRelationshipType.RSON) + return "RSON"; + if (code == V3ActRelationshipType.BLOCK) + return "BLOCK"; + if (code == V3ActRelationshipType.DIAG) + return "DIAG"; + if (code == V3ActRelationshipType.IMM) + return "IMM"; + if (code == V3ActRelationshipType.ACTIMM) + return "ACTIMM"; + if (code == V3ActRelationshipType.PASSIMM) + return "PASSIMM"; + if (code == V3ActRelationshipType.MITGT) + return "MITGT"; + if (code == V3ActRelationshipType.RCVY) + return "RCVY"; + if (code == V3ActRelationshipType.PRYLX) + return "PRYLX"; + if (code == V3ActRelationshipType.TREAT) + return "TREAT"; + if (code == V3ActRelationshipType.ADJUNCT) + return "ADJUNCT"; + if (code == V3ActRelationshipType.MTREAT) + return "MTREAT"; + if (code == V3ActRelationshipType.PALLTREAT) + return "PALLTREAT"; + if (code == V3ActRelationshipType.SYMP) + return "SYMP"; + if (code == V3ActRelationshipType.TRIG) + return "TRIG"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINS) + return "_ActRelationshipTemporallyPertains"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES) + return "_ActRelationshipTemporallyPertainsApproximates"; + if (code == V3ActRelationshipType.ENE) + return "ENE"; + if (code == V3ActRelationshipType.ECW) + return "ECW"; + if (code == V3ActRelationshipType.CONCURRENT) + return "CONCURRENT"; + if (code == V3ActRelationshipType.SBSECWE) + return "SBSECWE"; + if (code == V3ActRelationshipType.ENS) + return "ENS"; + if (code == V3ActRelationshipType.ECWS) + return "ECWS"; + if (code == V3ActRelationshipType.SNE) + return "SNE"; + if (code == V3ActRelationshipType.SCWE) + return "SCWE"; + if (code == V3ActRelationshipType.SNS) + return "SNS"; + if (code == V3ActRelationshipType.SCW) + return "SCW"; + if (code == V3ActRelationshipType.SCWSEBE) + return "SCWSEBE"; + if (code == V3ActRelationshipType.SCWSEAE) + return "SCWSEAE"; + if (code == V3ActRelationshipType.EAS) + return "EAS"; + if (code == V3ActRelationshipType.EAE) + return "EAE"; + if (code == V3ActRelationshipType.SASEAE) + return "SASEAE"; + if (code == V3ActRelationshipType.SBEEAE) + return "SBEEAE"; + if (code == V3ActRelationshipType.SASSBEEAS) + return "SASSBEEAS"; + if (code == V3ActRelationshipType.SBSEAE) + return "SBSEAE"; + if (code == V3ActRelationshipType.SAS) + return "SAS"; + if (code == V3ActRelationshipType.SAE) + return "SAE"; + if (code == V3ActRelationshipType.DURING) + return "DURING"; + if (code == V3ActRelationshipType.SASECWE) + return "SASECWE"; + if (code == V3ActRelationshipType.EASORECWS) + return "EASORECWS"; + if (code == V3ActRelationshipType.EAEORECW) + return "EAEORECW"; + if (code == V3ActRelationshipType.INDEPENDENT) + return "INDEPENDENT"; + if (code == V3ActRelationshipType.SAEORSCWE) + return "SAEORSCWE"; + if (code == V3ActRelationshipType.SASORSCW) + return "SASORSCW"; + if (code == V3ActRelationshipType.SBEORSCWE) + return "SBEORSCWE"; + if (code == V3ActRelationshipType.OVERLAP) + return "OVERLAP"; + if (code == V3ActRelationshipType.EDU) + return "EDU"; + if (code == V3ActRelationshipType.SBSEASEBE) + return "SBSEASEBE"; + if (code == V3ActRelationshipType.SBSEAS) + return "SBSEAS"; + if (code == V3ActRelationshipType.SDU) + return "SDU"; + if (code == V3ActRelationshipType.SBE) + return "SBE"; + if (code == V3ActRelationshipType.EBE) + return "EBE"; + if (code == V3ActRelationshipType.SBSEBE) + return "SBSEBE"; + if (code == V3ActRelationshipType.EBSORECWS) + return "EBSORECWS"; + if (code == V3ActRelationshipType.EBS) + return "EBS"; + if (code == V3ActRelationshipType.EBEORECW) + return "EBEORECW"; + if (code == V3ActRelationshipType.SBSORSCW) + return "SBSORSCW"; + if (code == V3ActRelationshipType.SBS) + return "SBS"; + if (code == V3ActRelationshipType.AUTH) + return "AUTH"; + if (code == V3ActRelationshipType.CAUS) + return "CAUS"; + if (code == V3ActRelationshipType.COMP) + return "COMP"; + if (code == V3ActRelationshipType.CTRLV) + return "CTRLV"; + if (code == V3ActRelationshipType.MBR) + return "MBR"; + if (code == V3ActRelationshipType.STEP) + return "STEP"; + if (code == V3ActRelationshipType.ARR) + return "ARR"; + if (code == V3ActRelationshipType.DEP) + return "DEP"; + if (code == V3ActRelationshipType.PART) + return "PART"; + if (code == V3ActRelationshipType.COVBY) + return "COVBY"; + if (code == V3ActRelationshipType.DRIV) + return "DRIV"; + if (code == V3ActRelationshipType.ELNK) + return "ELNK"; + if (code == V3ActRelationshipType.EVID) + return "EVID"; + if (code == V3ActRelationshipType.EXACBY) + return "EXACBY"; + if (code == V3ActRelationshipType.EXPL) + return "EXPL"; + if (code == V3ActRelationshipType.INTF) + return "INTF"; + if (code == V3ActRelationshipType.ITEMSLOC) + return "ITEMSLOC"; + if (code == V3ActRelationshipType.LIMIT) + return "LIMIT"; + if (code == V3ActRelationshipType.META) + return "META"; + if (code == V3ActRelationshipType.MFST) + return "MFST"; + if (code == V3ActRelationshipType.NAME) + return "NAME"; + if (code == V3ActRelationshipType.OUTC) + return "OUTC"; + if (code == V3ActRelationshipType._ACTRELATIONSIPOBJECTIVE) + return "_ActRelationsipObjective"; + if (code == V3ActRelationshipType.OBJC) + return "OBJC"; + if (code == V3ActRelationshipType.OBJF) + return "OBJF"; + if (code == V3ActRelationshipType.GOAL) + return "GOAL"; + if (code == V3ActRelationshipType.RISK) + return "RISK"; + if (code == V3ActRelationshipType.PERT) + return "PERT"; + if (code == V3ActRelationshipType.PREV) + return "PREV"; + if (code == V3ActRelationshipType.REFR) + return "REFR"; + if (code == V3ActRelationshipType.USE) + return "USE"; + if (code == V3ActRelationshipType.REFV) + return "REFV"; + if (code == V3ActRelationshipType.RELVBY) + return "RELVBY"; + if (code == V3ActRelationshipType.SEQL) + return "SEQL"; + if (code == V3ActRelationshipType.APND) + return "APND"; + if (code == V3ActRelationshipType.BSLN) + return "BSLN"; + if (code == V3ActRelationshipType.COMPLY) + return "COMPLY"; + if (code == V3ActRelationshipType.DOC) + return "DOC"; + if (code == V3ActRelationshipType.FLFS) + return "FLFS"; + if (code == V3ActRelationshipType.OCCR) + return "OCCR"; + if (code == V3ActRelationshipType.OREF) + return "OREF"; + if (code == V3ActRelationshipType.SCH) + return "SCH"; + if (code == V3ActRelationshipType.GEN) + return "GEN"; + if (code == V3ActRelationshipType.GEVL) + return "GEVL"; + if (code == V3ActRelationshipType.INST) + return "INST"; + if (code == V3ActRelationshipType.MOD) + return "MOD"; + if (code == V3ActRelationshipType.MTCH) + return "MTCH"; + if (code == V3ActRelationshipType.OPTN) + return "OPTN"; + if (code == V3ActRelationshipType.RCHAL) + return "RCHAL"; + if (code == V3ActRelationshipType.REV) + return "REV"; + if (code == V3ActRelationshipType.RPLC) + return "RPLC"; + if (code == V3ActRelationshipType.SUCC) + return "SUCC"; + if (code == V3ActRelationshipType.UPDT) + return "UPDT"; + if (code == V3ActRelationshipType.XCRPT) + return "XCRPT"; + if (code == V3ActRelationshipType.VRXCRPT) + return "VRXCRPT"; + if (code == V3ActRelationshipType.XFRM) + return "XFRM"; + if (code == V3ActRelationshipType.SPRT) + return "SPRT"; + if (code == V3ActRelationshipType.SPRTBND) + return "SPRTBND"; + if (code == V3ActRelationshipType.SUBJ) + return "SUBJ"; + if (code == V3ActRelationshipType.QUALF) + return "QUALF"; + if (code == V3ActRelationshipType.SUMM) + return "SUMM"; + if (code == V3ActRelationshipType.VALUE) + return "VALUE"; + if (code == V3ActRelationshipType.CURE) + return "CURE"; + if (code == V3ActRelationshipType.CURE_ADJ) + return "CURE.ADJ"; + if (code == V3ActRelationshipType.MTGT_ADJ) + return "MTGT.ADJ"; + if (code == V3ActRelationshipType.RACT) + return "RACT"; + if (code == V3ActRelationshipType.SUGG) + return "SUGG"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSite.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSite.java new file mode 100644 index 00000000000..4b091dc6881 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSite.java @@ -0,0 +1,555 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActSite { + + /** + * An anatomical location on a human which can be the focus of an act. + */ + _HUMANACTSITE, + /** + * The set of body locations to or through which a drug product may be administered. + */ + _HUMANSUBSTANCEADMINISTRATIONSITE, + /** + * bilateral ears + */ + BE, + /** + * bilateral nares + */ + BN, + /** + * buttock + */ + BU, + /** + * left arm + */ + LA, + /** + * left anterior chest + */ + LAC, + /** + * left antecubital fossa + */ + LACF, + /** + * left deltoid + */ + LD, + /** + * left ear + */ + LE, + /** + * left external jugular + */ + LEJ, + /** + * left foot + */ + LF, + /** + * left gluteus medius + */ + LG, + /** + * left hand + */ + LH, + /** + * left internal jugular + */ + LIJ, + /** + * left lower abd quadrant + */ + LLAQ, + /** + * left lower forearm + */ + LLFA, + /** + * left mid forearm + */ + LMFA, + /** + * left naris + */ + LN, + /** + * left posterior chest + */ + LPC, + /** + * left subclavian + */ + LSC, + /** + * left thigh + */ + LT, + /** + * left upper arm + */ + LUA, + /** + * left upper abd quadrant + */ + LUAQ, + /** + * left upper forearm + */ + LUFA, + /** + * left ventragluteal + */ + LVG, + /** + * left vastus lateralis + */ + LVL, + /** + * right eye + */ + OD, + /** + * left eye + */ + OS, + /** + * bilateral eyes + */ + OU, + /** + * perianal + */ + PA, + /** + * perineal + */ + PERIN, + /** + * right arm + */ + RA, + /** + * right anterior chest + */ + RAC, + /** + * right antecubital fossa + */ + RACF, + /** + * right deltoid + */ + RD, + /** + * right ear + */ + RE, + /** + * right external jugular + */ + REJ, + /** + * right foot + */ + RF, + /** + * right gluteus medius + */ + RG, + /** + * right hand + */ + RH, + /** + * right internal jugular + */ + RIJ, + /** + * right lower abd quadrant + */ + RLAQ, + /** + * right lower forearm + */ + RLFA, + /** + * right mid forearm + */ + RMFA, + /** + * right naris + */ + RN, + /** + * right posterior chest + */ + RPC, + /** + * right subclavian + */ + RSC, + /** + * right thigh + */ + RT, + /** + * right upper arm + */ + RUA, + /** + * right upper abd quadrant + */ + RUAQ, + /** + * right upper forearm + */ + RUFA, + /** + * right ventragluteal + */ + RVG, + /** + * right vastus lateralis + */ + RVL, + /** + * added to help the parsers + */ + NULL; + public static V3ActSite fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_HumanActSite".equals(codeString)) + return _HUMANACTSITE; + if ("_HumanSubstanceAdministrationSite".equals(codeString)) + return _HUMANSUBSTANCEADMINISTRATIONSITE; + if ("BE".equals(codeString)) + return BE; + if ("BN".equals(codeString)) + return BN; + if ("BU".equals(codeString)) + return BU; + if ("LA".equals(codeString)) + return LA; + if ("LAC".equals(codeString)) + return LAC; + if ("LACF".equals(codeString)) + return LACF; + if ("LD".equals(codeString)) + return LD; + if ("LE".equals(codeString)) + return LE; + if ("LEJ".equals(codeString)) + return LEJ; + if ("LF".equals(codeString)) + return LF; + if ("LG".equals(codeString)) + return LG; + if ("LH".equals(codeString)) + return LH; + if ("LIJ".equals(codeString)) + return LIJ; + if ("LLAQ".equals(codeString)) + return LLAQ; + if ("LLFA".equals(codeString)) + return LLFA; + if ("LMFA".equals(codeString)) + return LMFA; + if ("LN".equals(codeString)) + return LN; + if ("LPC".equals(codeString)) + return LPC; + if ("LSC".equals(codeString)) + return LSC; + if ("LT".equals(codeString)) + return LT; + if ("LUA".equals(codeString)) + return LUA; + if ("LUAQ".equals(codeString)) + return LUAQ; + if ("LUFA".equals(codeString)) + return LUFA; + if ("LVG".equals(codeString)) + return LVG; + if ("LVL".equals(codeString)) + return LVL; + if ("OD".equals(codeString)) + return OD; + if ("OS".equals(codeString)) + return OS; + if ("OU".equals(codeString)) + return OU; + if ("PA".equals(codeString)) + return PA; + if ("PERIN".equals(codeString)) + return PERIN; + if ("RA".equals(codeString)) + return RA; + if ("RAC".equals(codeString)) + return RAC; + if ("RACF".equals(codeString)) + return RACF; + if ("RD".equals(codeString)) + return RD; + if ("RE".equals(codeString)) + return RE; + if ("REJ".equals(codeString)) + return REJ; + if ("RF".equals(codeString)) + return RF; + if ("RG".equals(codeString)) + return RG; + if ("RH".equals(codeString)) + return RH; + if ("RIJ".equals(codeString)) + return RIJ; + if ("RLAQ".equals(codeString)) + return RLAQ; + if ("RLFA".equals(codeString)) + return RLFA; + if ("RMFA".equals(codeString)) + return RMFA; + if ("RN".equals(codeString)) + return RN; + if ("RPC".equals(codeString)) + return RPC; + if ("RSC".equals(codeString)) + return RSC; + if ("RT".equals(codeString)) + return RT; + if ("RUA".equals(codeString)) + return RUA; + if ("RUAQ".equals(codeString)) + return RUAQ; + if ("RUFA".equals(codeString)) + return RUFA; + if ("RVG".equals(codeString)) + return RVG; + if ("RVL".equals(codeString)) + return RVL; + throw new FHIRException("Unknown V3ActSite code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _HUMANACTSITE: return "_HumanActSite"; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "_HumanSubstanceAdministrationSite"; + case BE: return "BE"; + case BN: return "BN"; + case BU: return "BU"; + case LA: return "LA"; + case LAC: return "LAC"; + case LACF: return "LACF"; + case LD: return "LD"; + case LE: return "LE"; + case LEJ: return "LEJ"; + case LF: return "LF"; + case LG: return "LG"; + case LH: return "LH"; + case LIJ: return "LIJ"; + case LLAQ: return "LLAQ"; + case LLFA: return "LLFA"; + case LMFA: return "LMFA"; + case LN: return "LN"; + case LPC: return "LPC"; + case LSC: return "LSC"; + case LT: return "LT"; + case LUA: return "LUA"; + case LUAQ: return "LUAQ"; + case LUFA: return "LUFA"; + case LVG: return "LVG"; + case LVL: return "LVL"; + case OD: return "OD"; + case OS: return "OS"; + case OU: return "OU"; + case PA: return "PA"; + case PERIN: return "PERIN"; + case RA: return "RA"; + case RAC: return "RAC"; + case RACF: return "RACF"; + case RD: return "RD"; + case RE: return "RE"; + case REJ: return "REJ"; + case RF: return "RF"; + case RG: return "RG"; + case RH: return "RH"; + case RIJ: return "RIJ"; + case RLAQ: return "RLAQ"; + case RLFA: return "RLFA"; + case RMFA: return "RMFA"; + case RN: return "RN"; + case RPC: return "RPC"; + case RSC: return "RSC"; + case RT: return "RT"; + case RUA: return "RUA"; + case RUAQ: return "RUAQ"; + case RUFA: return "RUFA"; + case RVG: return "RVG"; + case RVL: return "RVL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActSite"; + } + public String getDefinition() { + switch (this) { + case _HUMANACTSITE: return "An anatomical location on a human which can be the focus of an act."; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "The set of body locations to or through which a drug product may be administered."; + case BE: return "bilateral ears"; + case BN: return "bilateral nares"; + case BU: return "buttock"; + case LA: return "left arm"; + case LAC: return "left anterior chest"; + case LACF: return "left antecubital fossa"; + case LD: return "left deltoid"; + case LE: return "left ear"; + case LEJ: return "left external jugular"; + case LF: return "left foot"; + case LG: return "left gluteus medius"; + case LH: return "left hand"; + case LIJ: return "left internal jugular"; + case LLAQ: return "left lower abd quadrant"; + case LLFA: return "left lower forearm"; + case LMFA: return "left mid forearm"; + case LN: return "left naris"; + case LPC: return "left posterior chest"; + case LSC: return "left subclavian"; + case LT: return "left thigh"; + case LUA: return "left upper arm"; + case LUAQ: return "left upper abd quadrant"; + case LUFA: return "left upper forearm"; + case LVG: return "left ventragluteal"; + case LVL: return "left vastus lateralis"; + case OD: return "right eye"; + case OS: return "left eye"; + case OU: return "bilateral eyes"; + case PA: return "perianal"; + case PERIN: return "perineal"; + case RA: return "right arm"; + case RAC: return "right anterior chest"; + case RACF: return "right antecubital fossa"; + case RD: return "right deltoid"; + case RE: return "right ear"; + case REJ: return "right external jugular"; + case RF: return "right foot"; + case RG: return "right gluteus medius"; + case RH: return "right hand"; + case RIJ: return "right internal jugular"; + case RLAQ: return "right lower abd quadrant"; + case RLFA: return "right lower forearm"; + case RMFA: return "right mid forearm"; + case RN: return "right naris"; + case RPC: return "right posterior chest"; + case RSC: return "right subclavian"; + case RT: return "right thigh"; + case RUA: return "right upper arm"; + case RUAQ: return "right upper abd quadrant"; + case RUFA: return "right upper forearm"; + case RVG: return "right ventragluteal"; + case RVL: return "right vastus lateralis"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _HUMANACTSITE: return "HumanActSite"; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "HumanSubstanceAdministrationSite"; + case BE: return "bilateral ears"; + case BN: return "bilateral nares"; + case BU: return "buttock"; + case LA: return "left arm"; + case LAC: return "left anterior chest"; + case LACF: return "left antecubital fossa"; + case LD: return "left deltoid"; + case LE: return "left ear"; + case LEJ: return "left external jugular"; + case LF: return "left foot"; + case LG: return "left gluteus medius"; + case LH: return "left hand"; + case LIJ: return "left internal jugular"; + case LLAQ: return "left lower abd quadrant"; + case LLFA: return "left lower forearm"; + case LMFA: return "left mid forearm"; + case LN: return "left naris"; + case LPC: return "left posterior chest"; + case LSC: return "left subclavian"; + case LT: return "left thigh"; + case LUA: return "left upper arm"; + case LUAQ: return "left upper abd quadrant"; + case LUFA: return "left upper forearm"; + case LVG: return "left ventragluteal"; + case LVL: return "left vastus lateralis"; + case OD: return "right eye"; + case OS: return "left eye"; + case OU: return "bilateral eyes"; + case PA: return "perianal"; + case PERIN: return "perineal"; + case RA: return "right arm"; + case RAC: return "right anterior chest"; + case RACF: return "right antecubital fossa"; + case RD: return "right deltoid"; + case RE: return "right ear"; + case REJ: return "right external jugular"; + case RF: return "right foot"; + case RG: return "right gluteus medius"; + case RH: return "right hand"; + case RIJ: return "right internal jugular"; + case RLAQ: return "right lower abd quadrant"; + case RLFA: return "right lower forearm"; + case RMFA: return "right mid forearm"; + case RN: return "right naris"; + case RPC: return "right posterior chest"; + case RSC: return "right subclavian"; + case RT: return "right thigh"; + case RUA: return "right upper arm"; + case RUAQ: return "right upper abd quadrant"; + case RUFA: return "right upper forearm"; + case RVG: return "right ventragluteal"; + case RVL: return "right vastus lateralis"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSiteEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSiteEnumFactory.java new file mode 100644 index 00000000000..e34dc563448 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActSiteEnumFactory.java @@ -0,0 +1,267 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActSiteEnumFactory implements EnumFactory { + + public V3ActSite fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_HumanActSite".equals(codeString)) + return V3ActSite._HUMANACTSITE; + if ("_HumanSubstanceAdministrationSite".equals(codeString)) + return V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE; + if ("BE".equals(codeString)) + return V3ActSite.BE; + if ("BN".equals(codeString)) + return V3ActSite.BN; + if ("BU".equals(codeString)) + return V3ActSite.BU; + if ("LA".equals(codeString)) + return V3ActSite.LA; + if ("LAC".equals(codeString)) + return V3ActSite.LAC; + if ("LACF".equals(codeString)) + return V3ActSite.LACF; + if ("LD".equals(codeString)) + return V3ActSite.LD; + if ("LE".equals(codeString)) + return V3ActSite.LE; + if ("LEJ".equals(codeString)) + return V3ActSite.LEJ; + if ("LF".equals(codeString)) + return V3ActSite.LF; + if ("LG".equals(codeString)) + return V3ActSite.LG; + if ("LH".equals(codeString)) + return V3ActSite.LH; + if ("LIJ".equals(codeString)) + return V3ActSite.LIJ; + if ("LLAQ".equals(codeString)) + return V3ActSite.LLAQ; + if ("LLFA".equals(codeString)) + return V3ActSite.LLFA; + if ("LMFA".equals(codeString)) + return V3ActSite.LMFA; + if ("LN".equals(codeString)) + return V3ActSite.LN; + if ("LPC".equals(codeString)) + return V3ActSite.LPC; + if ("LSC".equals(codeString)) + return V3ActSite.LSC; + if ("LT".equals(codeString)) + return V3ActSite.LT; + if ("LUA".equals(codeString)) + return V3ActSite.LUA; + if ("LUAQ".equals(codeString)) + return V3ActSite.LUAQ; + if ("LUFA".equals(codeString)) + return V3ActSite.LUFA; + if ("LVG".equals(codeString)) + return V3ActSite.LVG; + if ("LVL".equals(codeString)) + return V3ActSite.LVL; + if ("OD".equals(codeString)) + return V3ActSite.OD; + if ("OS".equals(codeString)) + return V3ActSite.OS; + if ("OU".equals(codeString)) + return V3ActSite.OU; + if ("PA".equals(codeString)) + return V3ActSite.PA; + if ("PERIN".equals(codeString)) + return V3ActSite.PERIN; + if ("RA".equals(codeString)) + return V3ActSite.RA; + if ("RAC".equals(codeString)) + return V3ActSite.RAC; + if ("RACF".equals(codeString)) + return V3ActSite.RACF; + if ("RD".equals(codeString)) + return V3ActSite.RD; + if ("RE".equals(codeString)) + return V3ActSite.RE; + if ("REJ".equals(codeString)) + return V3ActSite.REJ; + if ("RF".equals(codeString)) + return V3ActSite.RF; + if ("RG".equals(codeString)) + return V3ActSite.RG; + if ("RH".equals(codeString)) + return V3ActSite.RH; + if ("RIJ".equals(codeString)) + return V3ActSite.RIJ; + if ("RLAQ".equals(codeString)) + return V3ActSite.RLAQ; + if ("RLFA".equals(codeString)) + return V3ActSite.RLFA; + if ("RMFA".equals(codeString)) + return V3ActSite.RMFA; + if ("RN".equals(codeString)) + return V3ActSite.RN; + if ("RPC".equals(codeString)) + return V3ActSite.RPC; + if ("RSC".equals(codeString)) + return V3ActSite.RSC; + if ("RT".equals(codeString)) + return V3ActSite.RT; + if ("RUA".equals(codeString)) + return V3ActSite.RUA; + if ("RUAQ".equals(codeString)) + return V3ActSite.RUAQ; + if ("RUFA".equals(codeString)) + return V3ActSite.RUFA; + if ("RVG".equals(codeString)) + return V3ActSite.RVG; + if ("RVL".equals(codeString)) + return V3ActSite.RVL; + throw new IllegalArgumentException("Unknown V3ActSite code '"+codeString+"'"); + } + + public String toCode(V3ActSite code) { + if (code == V3ActSite._HUMANACTSITE) + return "_HumanActSite"; + if (code == V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE) + return "_HumanSubstanceAdministrationSite"; + if (code == V3ActSite.BE) + return "BE"; + if (code == V3ActSite.BN) + return "BN"; + if (code == V3ActSite.BU) + return "BU"; + if (code == V3ActSite.LA) + return "LA"; + if (code == V3ActSite.LAC) + return "LAC"; + if (code == V3ActSite.LACF) + return "LACF"; + if (code == V3ActSite.LD) + return "LD"; + if (code == V3ActSite.LE) + return "LE"; + if (code == V3ActSite.LEJ) + return "LEJ"; + if (code == V3ActSite.LF) + return "LF"; + if (code == V3ActSite.LG) + return "LG"; + if (code == V3ActSite.LH) + return "LH"; + if (code == V3ActSite.LIJ) + return "LIJ"; + if (code == V3ActSite.LLAQ) + return "LLAQ"; + if (code == V3ActSite.LLFA) + return "LLFA"; + if (code == V3ActSite.LMFA) + return "LMFA"; + if (code == V3ActSite.LN) + return "LN"; + if (code == V3ActSite.LPC) + return "LPC"; + if (code == V3ActSite.LSC) + return "LSC"; + if (code == V3ActSite.LT) + return "LT"; + if (code == V3ActSite.LUA) + return "LUA"; + if (code == V3ActSite.LUAQ) + return "LUAQ"; + if (code == V3ActSite.LUFA) + return "LUFA"; + if (code == V3ActSite.LVG) + return "LVG"; + if (code == V3ActSite.LVL) + return "LVL"; + if (code == V3ActSite.OD) + return "OD"; + if (code == V3ActSite.OS) + return "OS"; + if (code == V3ActSite.OU) + return "OU"; + if (code == V3ActSite.PA) + return "PA"; + if (code == V3ActSite.PERIN) + return "PERIN"; + if (code == V3ActSite.RA) + return "RA"; + if (code == V3ActSite.RAC) + return "RAC"; + if (code == V3ActSite.RACF) + return "RACF"; + if (code == V3ActSite.RD) + return "RD"; + if (code == V3ActSite.RE) + return "RE"; + if (code == V3ActSite.REJ) + return "REJ"; + if (code == V3ActSite.RF) + return "RF"; + if (code == V3ActSite.RG) + return "RG"; + if (code == V3ActSite.RH) + return "RH"; + if (code == V3ActSite.RIJ) + return "RIJ"; + if (code == V3ActSite.RLAQ) + return "RLAQ"; + if (code == V3ActSite.RLFA) + return "RLFA"; + if (code == V3ActSite.RMFA) + return "RMFA"; + if (code == V3ActSite.RN) + return "RN"; + if (code == V3ActSite.RPC) + return "RPC"; + if (code == V3ActSite.RSC) + return "RSC"; + if (code == V3ActSite.RT) + return "RT"; + if (code == V3ActSite.RUA) + return "RUA"; + if (code == V3ActSite.RUAQ) + return "RUAQ"; + if (code == V3ActSite.RUFA) + return "RUFA"; + if (code == V3ActSite.RVG) + return "RVG"; + if (code == V3ActSite.RVL) + return "RVL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatus.java new file mode 100644 index 00000000000..f03133c621d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatus.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActStatus { + + /** + * Encompasses the expected states of an Act, but excludes "nullified" and "obsolete" which represent unusual terminal states for the life-cycle. + */ + NORMAL, + /** + * The Act has been terminated prior to the originally intended completion. + */ + ABORTED, + /** + * The Act can be performed or is being performed + */ + ACTIVE, + /** + * The Act has been abandoned before activation. + */ + CANCELLED, + /** + * An Act that has terminated normally after all of its constituents have been performed. + */ + COMPLETED, + /** + * An Act that is still in the preparatory stages has been put aside. No action can occur until the Act is released. + */ + HELD, + /** + * An Act that is in the preparatory stages and may not yet be acted upon + */ + NEW, + /** + * An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled. No further action should be taken against it until it is released + */ + SUSPENDED, + /** + * This Act instance was created in error and has been 'removed' and is treated as though it never existed. A record is retained for audit purposes only. + */ + NULLIFIED, + /** + * This Act instance has been replaced by a new instance. + */ + OBSOLETE, + /** + * added to help the parsers + */ + NULL; + public static V3ActStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("aborted".equals(codeString)) + return ABORTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("held".equals(codeString)) + return HELD; + if ("new".equals(codeString)) + return NEW; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("nullified".equals(codeString)) + return NULLIFIED; + if ("obsolete".equals(codeString)) + return OBSOLETE; + throw new FHIRException("Unknown V3ActStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ABORTED: return "aborted"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case HELD: return "held"; + case NEW: return "new"; + case SUSPENDED: return "suspended"; + case NULLIFIED: return "nullified"; + case OBSOLETE: return "obsolete"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "Encompasses the expected states of an Act, but excludes \"nullified\" and \"obsolete\" which represent unusual terminal states for the life-cycle."; + case ABORTED: return "The Act has been terminated prior to the originally intended completion."; + case ACTIVE: return "The Act can be performed or is being performed"; + case CANCELLED: return "The Act has been abandoned before activation."; + case COMPLETED: return "An Act that has terminated normally after all of its constituents have been performed."; + case HELD: return "An Act that is still in the preparatory stages has been put aside. No action can occur until the Act is released."; + case NEW: return "An Act that is in the preparatory stages and may not yet be acted upon"; + case SUSPENDED: return "An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled. No further action should be taken against it until it is released"; + case NULLIFIED: return "This Act instance was created in error and has been 'removed' and is treated as though it never existed. A record is retained for audit purposes only."; + case OBSOLETE: return "This Act instance has been replaced by a new instance."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ABORTED: return "aborted"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case HELD: return "held"; + case NEW: return "new"; + case SUSPENDED: return "suspended"; + case NULLIFIED: return "nullified"; + case OBSOLETE: return "obsolete"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatusEnumFactory.java new file mode 100644 index 00000000000..67eb37a366b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActStatusEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActStatusEnumFactory implements EnumFactory { + + public V3ActStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3ActStatus.NORMAL; + if ("aborted".equals(codeString)) + return V3ActStatus.ABORTED; + if ("active".equals(codeString)) + return V3ActStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3ActStatus.CANCELLED; + if ("completed".equals(codeString)) + return V3ActStatus.COMPLETED; + if ("held".equals(codeString)) + return V3ActStatus.HELD; + if ("new".equals(codeString)) + return V3ActStatus.NEW; + if ("suspended".equals(codeString)) + return V3ActStatus.SUSPENDED; + if ("nullified".equals(codeString)) + return V3ActStatus.NULLIFIED; + if ("obsolete".equals(codeString)) + return V3ActStatus.OBSOLETE; + throw new IllegalArgumentException("Unknown V3ActStatus code '"+codeString+"'"); + } + + public String toCode(V3ActStatus code) { + if (code == V3ActStatus.NORMAL) + return "normal"; + if (code == V3ActStatus.ABORTED) + return "aborted"; + if (code == V3ActStatus.ACTIVE) + return "active"; + if (code == V3ActStatus.CANCELLED) + return "cancelled"; + if (code == V3ActStatus.COMPLETED) + return "completed"; + if (code == V3ActStatus.HELD) + return "held"; + if (code == V3ActStatus.NEW) + return "new"; + if (code == V3ActStatus.SUSPENDED) + return "suspended"; + if (code == V3ActStatus.NULLIFIED) + return "nullified"; + if (code == V3ActStatus.OBSOLETE) + return "obsolete"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLaw.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLaw.java new file mode 100644 index 00000000000..d5a8af96954 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLaw.java @@ -0,0 +1,174 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActUSPrivacyLaw { + + /** + * Definition: A jurisdictional mandate in the U.S. relating to privacy. + + + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1. + */ + _ACTUSPRIVACYLAW, + /** + * 42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program. + + + Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + _42CFRPART2, + /** + * U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements. + + + Definition: U.S. federal laws governing research-related privacy policies. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + COMMONRULE, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law. + + + Definition: Notification of HIPAA Privacy Practices. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + HIPAANOPP, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes. + + + Definition: Authorization that must be obtained for disclosure of psychotherapy notes. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAAPSYNOTES, + /** + * Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan. + + + Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAASELFPAY, + /** + * Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfill the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes. + + + Definition: Title 38 Part 1 - §1.462 Confidentiality restrictions. + + +(a) General. The patient records to which §§1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b). + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + TITLE38SECTION7332, + /** + * added to help the parsers + */ + NULL; + public static V3ActUSPrivacyLaw fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActUSPrivacyLaw".equals(codeString)) + return _ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return _42CFRPART2; + if ("CommonRule".equals(codeString)) + return COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return TITLE38SECTION7332; + throw new FHIRException("Unknown V3ActUSPrivacyLaw code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTUSPRIVACYLAW: return "_ActUSPrivacyLaw"; + case _42CFRPART2: return "42CFRPart2"; + case COMMONRULE: return "CommonRule"; + case HIPAANOPP: return "HIPAANOPP"; + case HIPAAPSYNOTES: return "HIPAAPsyNotes"; + case HIPAASELFPAY: return "HIPAASelfPay"; + case TITLE38SECTION7332: return "Title38Section7332"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActUSPrivacyLaw"; + } + public String getDefinition() { + switch (this) { + case _ACTUSPRIVACYLAW: return "Definition: A jurisdictional mandate in the U.S. relating to privacy.\r\n\n \n Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1."; + case _42CFRPART2: return "42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program.\r\n\n \n Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case COMMONRULE: return "U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements.\r\n\n \n Definition: U.S. federal laws governing research-related privacy policies.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAANOPP: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law.\r\n\n \n Definition: Notification of HIPAA Privacy Practices.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAAPSYNOTES: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes.\r\n\n \n Definition: Authorization that must be obtained for disclosure of psychotherapy notes.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case HIPAASELFPAY: return "Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan.\r\n\n \n Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case TITLE38SECTION7332: return "Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfill the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes.\r\n\n \n Definition: Title 38 Part 1 - §1.462 Confidentiality restrictions.\r\n\n \n(a) General. The patient records to which §§1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b).\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTUSPRIVACYLAW: return "ActUSPrivacyLaw"; + case _42CFRPART2: return "42 CFR Part2"; + case COMMONRULE: return "Common Rule"; + case HIPAANOPP: return "HIPAA notice of privacy practices"; + case HIPAAPSYNOTES: return "HIPAA psychotherapy notes"; + case HIPAASELFPAY: return "HIPAA self-pay"; + case TITLE38SECTION7332: return "Title 38 Section 7332"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLawEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLawEnumFactory.java new file mode 100644 index 00000000000..64ca08eb5b3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUSPrivacyLawEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActUSPrivacyLawEnumFactory implements EnumFactory { + + public V3ActUSPrivacyLaw fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActUSPrivacyLaw".equals(codeString)) + return V3ActUSPrivacyLaw._ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return V3ActUSPrivacyLaw._42CFRPART2; + if ("CommonRule".equals(codeString)) + return V3ActUSPrivacyLaw.COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return V3ActUSPrivacyLaw.TITLE38SECTION7332; + throw new IllegalArgumentException("Unknown V3ActUSPrivacyLaw code '"+codeString+"'"); + } + + public String toCode(V3ActUSPrivacyLaw code) { + if (code == V3ActUSPrivacyLaw._ACTUSPRIVACYLAW) + return "_ActUSPrivacyLaw"; + if (code == V3ActUSPrivacyLaw._42CFRPART2) + return "42CFRPart2"; + if (code == V3ActUSPrivacyLaw.COMMONRULE) + return "CommonRule"; + if (code == V3ActUSPrivacyLaw.HIPAANOPP) + return "HIPAANOPP"; + if (code == V3ActUSPrivacyLaw.HIPAAPSYNOTES) + return "HIPAAPsyNotes"; + if (code == V3ActUSPrivacyLaw.HIPAASELFPAY) + return "HIPAASelfPay"; + if (code == V3ActUSPrivacyLaw.TITLE38SECTION7332) + return "Title38Section7332"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertainty.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertainty.java new file mode 100644 index 00000000000..a6c250ce1bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertainty.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActUncertainty { + + /** + * Specifies that the act statement is made without explicit tagging of uncertainty. This is the normal statement, meaning that it is not free of errors and uncertainty may still exist. + */ + N, + /** + * Specifies that the originator of the Act statement does not have full confidence in the applicability (i.e., in event mood: factual truth) of the statement. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3ActUncertainty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("N".equals(codeString)) + return N; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3ActUncertainty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case N: return "N"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActUncertainty"; + } + public String getDefinition() { + switch (this) { + case N: return "Specifies that the act statement is made without explicit tagging of uncertainty. This is the normal statement, meaning that it is not free of errors and uncertainty may still exist."; + case U: return "Specifies that the originator of the Act statement does not have full confidence in the applicability (i.e., in event mood: factual truth) of the statement."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case N: return "stated with no assertion of uncertainty"; + case U: return "stated with uncertainty"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertaintyEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertaintyEnumFactory.java new file mode 100644 index 00000000000..480453a71a2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ActUncertaintyEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ActUncertaintyEnumFactory implements EnumFactory { + + public V3ActUncertainty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("N".equals(codeString)) + return V3ActUncertainty.N; + if ("U".equals(codeString)) + return V3ActUncertainty.U; + throw new IllegalArgumentException("Unknown V3ActUncertainty code '"+codeString+"'"); + } + + public String toCode(V3ActUncertainty code) { + if (code == V3ActUncertainty.N) + return "N"; + if (code == V3ActUncertainty.U) + return "U"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartType.java new file mode 100644 index 00000000000..65dd7e4ffe4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartType.java @@ -0,0 +1,339 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AddressPartType { + + /** + * This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses). + */ + ADL, + /** + * Description: An address line is for either an additional locator, a delivery address or a street address. + */ + AL, + /** + * A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both. + */ + DAL, + /** + * Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both. + */ + SAL, + /** + * The numeric portion of a building number + */ + BNN, + /** + * The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building. + */ + BNR, + /** + * Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number + */ + BNS, + /** + * The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient + */ + CAR, + /** + * A geographic sub-unit delineated for demographic purposes. + */ + CEN, + /** + * Country + */ + CNT, + /** + * A sub-unit of a state or province. (49 of the United States of America use the term "county;" Louisiana uses the term "parish".) + */ + CPA, + /** + * The name of the city, town, village, or other community or delivery center + */ + CTY, + /** + * Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break. + */ + DEL, + /** + * Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc. + */ + DINST, + /** + * The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route. + */ + DINSTA, + /** + * A number, letter or name identifying a delivery installation. E.g., for Station A, the delivery installation qualifier would be 'A'. + */ + DINSTQ, + /** + * Direction (e.g., N, S, W, E) + */ + DIR, + /** + * Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc. + */ + DMOD, + /** + * Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number). + */ + DMODID, + /** + * A value that uniquely identifies the postal address. + */ + DPID, + /** + * Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets. + */ + INT, + /** + * A numbered box located in a post station. + */ + POB, + /** + * A subsection of a municipality + */ + PRE, + /** + * A sub-unit of a country with limited sovereignty in a federally organized country. + */ + STA, + /** + * The base name of a roadway or artery recognized by a municipality (excluding street type and direction) + */ + STB, + /** + * street name + */ + STR, + /** + * The designation given to the street. (e.g. Street, Avenue, Crescent, etc.) + */ + STTYP, + /** + * The number or name of a specific unit contained within a building or complex, as assigned by that building or complex. + */ + UNID, + /** + * Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor + */ + UNIT, + /** + * A postal code designating a region defined by the postal service. + */ + ZIP, + /** + * added to help the parsers + */ + NULL; + public static V3AddressPartType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADL".equals(codeString)) + return ADL; + if ("AL".equals(codeString)) + return AL; + if ("DAL".equals(codeString)) + return DAL; + if ("SAL".equals(codeString)) + return SAL; + if ("BNN".equals(codeString)) + return BNN; + if ("BNR".equals(codeString)) + return BNR; + if ("BNS".equals(codeString)) + return BNS; + if ("CAR".equals(codeString)) + return CAR; + if ("CEN".equals(codeString)) + return CEN; + if ("CNT".equals(codeString)) + return CNT; + if ("CPA".equals(codeString)) + return CPA; + if ("CTY".equals(codeString)) + return CTY; + if ("DEL".equals(codeString)) + return DEL; + if ("DINST".equals(codeString)) + return DINST; + if ("DINSTA".equals(codeString)) + return DINSTA; + if ("DINSTQ".equals(codeString)) + return DINSTQ; + if ("DIR".equals(codeString)) + return DIR; + if ("DMOD".equals(codeString)) + return DMOD; + if ("DMODID".equals(codeString)) + return DMODID; + if ("DPID".equals(codeString)) + return DPID; + if ("INT".equals(codeString)) + return INT; + if ("POB".equals(codeString)) + return POB; + if ("PRE".equals(codeString)) + return PRE; + if ("STA".equals(codeString)) + return STA; + if ("STB".equals(codeString)) + return STB; + if ("STR".equals(codeString)) + return STR; + if ("STTYP".equals(codeString)) + return STTYP; + if ("UNID".equals(codeString)) + return UNID; + if ("UNIT".equals(codeString)) + return UNIT; + if ("ZIP".equals(codeString)) + return ZIP; + throw new FHIRException("Unknown V3AddressPartType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADL: return "ADL"; + case AL: return "AL"; + case DAL: return "DAL"; + case SAL: return "SAL"; + case BNN: return "BNN"; + case BNR: return "BNR"; + case BNS: return "BNS"; + case CAR: return "CAR"; + case CEN: return "CEN"; + case CNT: return "CNT"; + case CPA: return "CPA"; + case CTY: return "CTY"; + case DEL: return "DEL"; + case DINST: return "DINST"; + case DINSTA: return "DINSTA"; + case DINSTQ: return "DINSTQ"; + case DIR: return "DIR"; + case DMOD: return "DMOD"; + case DMODID: return "DMODID"; + case DPID: return "DPID"; + case INT: return "INT"; + case POB: return "POB"; + case PRE: return "PRE"; + case STA: return "STA"; + case STB: return "STB"; + case STR: return "STR"; + case STTYP: return "STTYP"; + case UNID: return "UNID"; + case UNIT: return "UNIT"; + case ZIP: return "ZIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AddressPartType"; + } + public String getDefinition() { + switch (this) { + case ADL: return "This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., \"3rd floor, Appt. 342\"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch \"t.o.\" means \"opposite to\" for house boats located across the street facing houses)."; + case AL: return "Description: An address line is for either an additional locator, a delivery address or a street address."; + case DAL: return "A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."; + case SAL: return "Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."; + case BNN: return "The numeric portion of a building number"; + case BNR: return "The number of a building, house or lot alongside the street. Also known as \"primary street number\". This does not number the street but rather the building."; + case BNS: return "Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number"; + case CAR: return "The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient"; + case CEN: return "A geographic sub-unit delineated for demographic purposes."; + case CNT: return "Country"; + case CPA: return "A sub-unit of a state or province. (49 of the United States of America use the term \"county;\" Louisiana uses the term \"parish\".)"; + case CTY: return "The name of the city, town, village, or other community or delivery center"; + case DEL: return "Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."; + case DINST: return "Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."; + case DINSTA: return "The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."; + case DINSTQ: return "A number, letter or name identifying a delivery installation. E.g., for Station A, the delivery installation qualifier would be 'A'."; + case DIR: return "Direction (e.g., N, S, W, E)"; + case DMOD: return "Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."; + case DMODID: return "Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."; + case DPID: return "A value that uniquely identifies the postal address."; + case INT: return "Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets."; + case POB: return "A numbered box located in a post station."; + case PRE: return "A subsection of a municipality"; + case STA: return "A sub-unit of a country with limited sovereignty in a federally organized country."; + case STB: return "The base name of a roadway or artery recognized by a municipality (excluding street type and direction)"; + case STR: return "street name"; + case STTYP: return "The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)"; + case UNID: return "The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."; + case UNIT: return "Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor"; + case ZIP: return "A postal code designating a region defined by the postal service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADL: return "additional locator"; + case AL: return "address line"; + case DAL: return "delivery address line"; + case SAL: return "street address line"; + case BNN: return "building number numeric"; + case BNR: return "building number"; + case BNS: return "building number suffix"; + case CAR: return "care of"; + case CEN: return "census tract"; + case CNT: return "country"; + case CPA: return "county or parish"; + case CTY: return "municipality"; + case DEL: return "delimiter"; + case DINST: return "delivery installation type"; + case DINSTA: return "delivery installation area"; + case DINSTQ: return "delivery installation qualifier"; + case DIR: return "direction"; + case DMOD: return "delivery mode"; + case DMODID: return "delivery mode identifier"; + case DPID: return "delivery point identifier"; + case INT: return "intersection"; + case POB: return "post box"; + case PRE: return "precinct"; + case STA: return "state or province"; + case STB: return "street name base"; + case STR: return "street name"; + case STTYP: return "street type"; + case UNID: return "unit identifier"; + case UNIT: return "unit designator"; + case ZIP: return "postal code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartTypeEnumFactory.java new file mode 100644 index 00000000000..219a32b9ebb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressPartTypeEnumFactory.java @@ -0,0 +1,171 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AddressPartTypeEnumFactory implements EnumFactory { + + public V3AddressPartType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADL".equals(codeString)) + return V3AddressPartType.ADL; + if ("AL".equals(codeString)) + return V3AddressPartType.AL; + if ("DAL".equals(codeString)) + return V3AddressPartType.DAL; + if ("SAL".equals(codeString)) + return V3AddressPartType.SAL; + if ("BNN".equals(codeString)) + return V3AddressPartType.BNN; + if ("BNR".equals(codeString)) + return V3AddressPartType.BNR; + if ("BNS".equals(codeString)) + return V3AddressPartType.BNS; + if ("CAR".equals(codeString)) + return V3AddressPartType.CAR; + if ("CEN".equals(codeString)) + return V3AddressPartType.CEN; + if ("CNT".equals(codeString)) + return V3AddressPartType.CNT; + if ("CPA".equals(codeString)) + return V3AddressPartType.CPA; + if ("CTY".equals(codeString)) + return V3AddressPartType.CTY; + if ("DEL".equals(codeString)) + return V3AddressPartType.DEL; + if ("DINST".equals(codeString)) + return V3AddressPartType.DINST; + if ("DINSTA".equals(codeString)) + return V3AddressPartType.DINSTA; + if ("DINSTQ".equals(codeString)) + return V3AddressPartType.DINSTQ; + if ("DIR".equals(codeString)) + return V3AddressPartType.DIR; + if ("DMOD".equals(codeString)) + return V3AddressPartType.DMOD; + if ("DMODID".equals(codeString)) + return V3AddressPartType.DMODID; + if ("DPID".equals(codeString)) + return V3AddressPartType.DPID; + if ("INT".equals(codeString)) + return V3AddressPartType.INT; + if ("POB".equals(codeString)) + return V3AddressPartType.POB; + if ("PRE".equals(codeString)) + return V3AddressPartType.PRE; + if ("STA".equals(codeString)) + return V3AddressPartType.STA; + if ("STB".equals(codeString)) + return V3AddressPartType.STB; + if ("STR".equals(codeString)) + return V3AddressPartType.STR; + if ("STTYP".equals(codeString)) + return V3AddressPartType.STTYP; + if ("UNID".equals(codeString)) + return V3AddressPartType.UNID; + if ("UNIT".equals(codeString)) + return V3AddressPartType.UNIT; + if ("ZIP".equals(codeString)) + return V3AddressPartType.ZIP; + throw new IllegalArgumentException("Unknown V3AddressPartType code '"+codeString+"'"); + } + + public String toCode(V3AddressPartType code) { + if (code == V3AddressPartType.ADL) + return "ADL"; + if (code == V3AddressPartType.AL) + return "AL"; + if (code == V3AddressPartType.DAL) + return "DAL"; + if (code == V3AddressPartType.SAL) + return "SAL"; + if (code == V3AddressPartType.BNN) + return "BNN"; + if (code == V3AddressPartType.BNR) + return "BNR"; + if (code == V3AddressPartType.BNS) + return "BNS"; + if (code == V3AddressPartType.CAR) + return "CAR"; + if (code == V3AddressPartType.CEN) + return "CEN"; + if (code == V3AddressPartType.CNT) + return "CNT"; + if (code == V3AddressPartType.CPA) + return "CPA"; + if (code == V3AddressPartType.CTY) + return "CTY"; + if (code == V3AddressPartType.DEL) + return "DEL"; + if (code == V3AddressPartType.DINST) + return "DINST"; + if (code == V3AddressPartType.DINSTA) + return "DINSTA"; + if (code == V3AddressPartType.DINSTQ) + return "DINSTQ"; + if (code == V3AddressPartType.DIR) + return "DIR"; + if (code == V3AddressPartType.DMOD) + return "DMOD"; + if (code == V3AddressPartType.DMODID) + return "DMODID"; + if (code == V3AddressPartType.DPID) + return "DPID"; + if (code == V3AddressPartType.INT) + return "INT"; + if (code == V3AddressPartType.POB) + return "POB"; + if (code == V3AddressPartType.PRE) + return "PRE"; + if (code == V3AddressPartType.STA) + return "STA"; + if (code == V3AddressPartType.STB) + return "STB"; + if (code == V3AddressPartType.STR) + return "STR"; + if (code == V3AddressPartType.STTYP) + return "STTYP"; + if (code == V3AddressPartType.UNID) + return "UNID"; + if (code == V3AddressPartType.UNIT) + return "UNIT"; + if (code == V3AddressPartType.ZIP) + return "ZIP"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUse.java new file mode 100644 index 00000000000..8bb18416030 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUse.java @@ -0,0 +1,243 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AddressUse { + + /** + * Description: Address uses that can apply to both postal and telecommunication addresses. + */ + _GENERALADDRESSUSE, + /** + * Description: A flag indicating that the address is bad, in fact, useless. + */ + BAD, + /** + * Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description. + */ + CONF, + /** + * Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. + */ + H, + /** + * Description: The primary home, to reach a person after business hours. + */ + HP, + /** + * Description: A vacation home, to reach a person while on vacation. + */ + HV, + /** + * This address is no longer in use. + + + Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known. + */ + OLD, + /** + * Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information. + */ + TMP, + /** + * Description: An office address. First choice for business related contacts during business hours. + */ + WP, + /** + * Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'. + */ + DIR, + /** + * Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity. + */ + PUB, + /** + * Description: Address uses that only apply to postal addresses, not telecommunication addresses. + */ + _POSTALADDRESSUSE, + /** + * Description: Used primarily to visit an address. + */ + PHYS, + /** + * Description: Used to send mail. + */ + PST, + /** + * Description: Address uses that only apply to telecommunication addresses, not postal addresses. + */ + _TELECOMMUNICATIONADDRESSUSE, + /** + * Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement. + */ + AS, + /** + * Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes. + */ + EC, + /** + * Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. + */ + MC, + /** + * Description: A paging device suitable to solicit a callback or to leave a very short message. + */ + PG, + /** + * added to help the parsers + */ + NULL; + public static V3AddressUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneralAddressUse".equals(codeString)) + return _GENERALADDRESSUSE; + if ("BAD".equals(codeString)) + return BAD; + if ("CONF".equals(codeString)) + return CONF; + if ("H".equals(codeString)) + return H; + if ("HP".equals(codeString)) + return HP; + if ("HV".equals(codeString)) + return HV; + if ("OLD".equals(codeString)) + return OLD; + if ("TMP".equals(codeString)) + return TMP; + if ("WP".equals(codeString)) + return WP; + if ("DIR".equals(codeString)) + return DIR; + if ("PUB".equals(codeString)) + return PUB; + if ("_PostalAddressUse".equals(codeString)) + return _POSTALADDRESSUSE; + if ("PHYS".equals(codeString)) + return PHYS; + if ("PST".equals(codeString)) + return PST; + if ("_TelecommunicationAddressUse".equals(codeString)) + return _TELECOMMUNICATIONADDRESSUSE; + if ("AS".equals(codeString)) + return AS; + if ("EC".equals(codeString)) + return EC; + if ("MC".equals(codeString)) + return MC; + if ("PG".equals(codeString)) + return PG; + throw new FHIRException("Unknown V3AddressUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _GENERALADDRESSUSE: return "_GeneralAddressUse"; + case BAD: return "BAD"; + case CONF: return "CONF"; + case H: return "H"; + case HP: return "HP"; + case HV: return "HV"; + case OLD: return "OLD"; + case TMP: return "TMP"; + case WP: return "WP"; + case DIR: return "DIR"; + case PUB: return "PUB"; + case _POSTALADDRESSUSE: return "_PostalAddressUse"; + case PHYS: return "PHYS"; + case PST: return "PST"; + case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; + case AS: return "AS"; + case EC: return "EC"; + case MC: return "MC"; + case PG: return "PG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AddressUse"; + } + public String getDefinition() { + switch (this) { + case _GENERALADDRESSUSE: return "Description: Address uses that can apply to both postal and telecommunication addresses."; + case BAD: return "Description: A flag indicating that the address is bad, in fact, useless."; + case CONF: return "Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description."; + case H: return "Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available."; + case HP: return "Description: The primary home, to reach a person after business hours."; + case HV: return "Description: A vacation home, to reach a person while on vacation."; + case OLD: return "This address is no longer in use.\r\n\n \n Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known."; + case TMP: return "Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information."; + case WP: return "Description: An office address. First choice for business related contacts during business hours."; + case DIR: return "Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'."; + case PUB: return "Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity."; + case _POSTALADDRESSUSE: return "Description: Address uses that only apply to postal addresses, not telecommunication addresses."; + case PHYS: return "Description: Used primarily to visit an address."; + case PST: return "Description: Used to send mail."; + case _TELECOMMUNICATIONADDRESSUSE: return "Description: Address uses that only apply to telecommunication addresses, not postal addresses."; + case AS: return "Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement."; + case EC: return "Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes."; + case MC: return "Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business."; + case PG: return "Description: A paging device suitable to solicit a callback or to leave a very short message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _GENERALADDRESSUSE: return "_GeneralAddressUse"; + case BAD: return "bad address"; + case CONF: return "confidential address"; + case H: return "home address"; + case HP: return "primary home"; + case HV: return "vacation home"; + case OLD: return "no longer in use"; + case TMP: return "temporary address"; + case WP: return "work place"; + case DIR: return "direct"; + case PUB: return "public"; + case _POSTALADDRESSUSE: return "_PostalAddressUse"; + case PHYS: return "physical visit address"; + case PST: return "postal address"; + case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; + case AS: return "answering service"; + case EC: return "emergency contact"; + case MC: return "mobile contact)"; + case PG: return "pager"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUseEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUseEnumFactory.java new file mode 100644 index 00000000000..1ca30aee768 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AddressUseEnumFactory.java @@ -0,0 +1,127 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AddressUseEnumFactory implements EnumFactory { + + public V3AddressUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneralAddressUse".equals(codeString)) + return V3AddressUse._GENERALADDRESSUSE; + if ("BAD".equals(codeString)) + return V3AddressUse.BAD; + if ("CONF".equals(codeString)) + return V3AddressUse.CONF; + if ("H".equals(codeString)) + return V3AddressUse.H; + if ("HP".equals(codeString)) + return V3AddressUse.HP; + if ("HV".equals(codeString)) + return V3AddressUse.HV; + if ("OLD".equals(codeString)) + return V3AddressUse.OLD; + if ("TMP".equals(codeString)) + return V3AddressUse.TMP; + if ("WP".equals(codeString)) + return V3AddressUse.WP; + if ("DIR".equals(codeString)) + return V3AddressUse.DIR; + if ("PUB".equals(codeString)) + return V3AddressUse.PUB; + if ("_PostalAddressUse".equals(codeString)) + return V3AddressUse._POSTALADDRESSUSE; + if ("PHYS".equals(codeString)) + return V3AddressUse.PHYS; + if ("PST".equals(codeString)) + return V3AddressUse.PST; + if ("_TelecommunicationAddressUse".equals(codeString)) + return V3AddressUse._TELECOMMUNICATIONADDRESSUSE; + if ("AS".equals(codeString)) + return V3AddressUse.AS; + if ("EC".equals(codeString)) + return V3AddressUse.EC; + if ("MC".equals(codeString)) + return V3AddressUse.MC; + if ("PG".equals(codeString)) + return V3AddressUse.PG; + throw new IllegalArgumentException("Unknown V3AddressUse code '"+codeString+"'"); + } + + public String toCode(V3AddressUse code) { + if (code == V3AddressUse._GENERALADDRESSUSE) + return "_GeneralAddressUse"; + if (code == V3AddressUse.BAD) + return "BAD"; + if (code == V3AddressUse.CONF) + return "CONF"; + if (code == V3AddressUse.H) + return "H"; + if (code == V3AddressUse.HP) + return "HP"; + if (code == V3AddressUse.HV) + return "HV"; + if (code == V3AddressUse.OLD) + return "OLD"; + if (code == V3AddressUse.TMP) + return "TMP"; + if (code == V3AddressUse.WP) + return "WP"; + if (code == V3AddressUse.DIR) + return "DIR"; + if (code == V3AddressUse.PUB) + return "PUB"; + if (code == V3AddressUse._POSTALADDRESSUSE) + return "_PostalAddressUse"; + if (code == V3AddressUse.PHYS) + return "PHYS"; + if (code == V3AddressUse.PST) + return "PST"; + if (code == V3AddressUse._TELECOMMUNICATIONADDRESSUSE) + return "_TelecommunicationAddressUse"; + if (code == V3AddressUse.AS) + return "AS"; + if (code == V3AddressUse.EC) + return "EC"; + if (code == V3AddressUse.MC) + return "MC"; + if (code == V3AddressUse.PG) + return "PG"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGender.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGender.java new file mode 100644 index 00000000000..4d0bb4d358c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGender.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AdministrativeGender { + + /** + * Female + */ + F, + /** + * Male + */ + M, + /** + * The gender of a person could not be uniquely defined as male or female, such as hermaphrodite. + */ + UN, + /** + * added to help the parsers + */ + NULL; + public static V3AdministrativeGender fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("F".equals(codeString)) + return F; + if ("M".equals(codeString)) + return M; + if ("UN".equals(codeString)) + return UN; + throw new FHIRException("Unknown V3AdministrativeGender code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case F: return "F"; + case M: return "M"; + case UN: return "UN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AdministrativeGender"; + } + public String getDefinition() { + switch (this) { + case F: return "Female"; + case M: return "Male"; + case UN: return "The gender of a person could not be uniquely defined as male or female, such as hermaphrodite."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case F: return "Female"; + case M: return "Male"; + case UN: return "Undifferentiated"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGenderEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGenderEnumFactory.java new file mode 100644 index 00000000000..d36af6b7352 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AdministrativeGenderEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AdministrativeGenderEnumFactory implements EnumFactory { + + public V3AdministrativeGender fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("F".equals(codeString)) + return V3AdministrativeGender.F; + if ("M".equals(codeString)) + return V3AdministrativeGender.M; + if ("UN".equals(codeString)) + return V3AdministrativeGender.UN; + throw new IllegalArgumentException("Unknown V3AdministrativeGender code '"+codeString+"'"); + } + + public String toCode(V3AdministrativeGender code) { + if (code == V3AdministrativeGender.F) + return "F"; + if (code == V3AdministrativeGender.M) + return "M"; + if (code == V3AdministrativeGender.UN) + return "UN"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguages.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguages.java new file mode 100644 index 00000000000..d02ca9193d0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguages.java @@ -0,0 +1,2364 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AmericanIndianAlaskaNativeLanguages { + + /** + * Algic + */ + _ALGIC, + /** + * Algonquian + */ + _ALGONQUIAN, + /** + * Arapahoan + */ + _ARAPAHOAN, + /** + * ArapahoGrosVentre + */ + _ARAPAHOGROSVENTRE, + /** + * Arapaho + */ + XARP, + /** + * Gros Ventre + */ + XATS, + /** + * CreeMontagnais + */ + _CREEMONTAGNAIS, + /** + * Cree + */ + _CREE, + /** + * Western Cree + */ + XCRP, + /** + * EasternAlgonquin + */ + _EASTERNALGONQUIN, + /** + * Abenakian + */ + _ABENAKIAN, + /** + * Eastern Abenaki + */ + XAAQ, + /** + * Western Abenaki + */ + XABE, + /** + * Maliseet-Passamaquoddy + */ + XMAC, + /** + * Delawaran + */ + _DELAWARAN, + /** + * Unami Delaware + */ + XDEL, + /** + * Micmac + */ + XMIC, + /** + * Ojibwayan + */ + _OJIBWAYAN, + /** + * Southern Ojibwa + */ + XOJB, + /** + * Potawatami + */ + XPOT, + /** + * SaukFoxKickapoo + */ + _SAUKFOXKICKAPOO, + /** + * Kickapoo + */ + XKIC, + /** + * Mesquakie + */ + XSAC, + /** + * Shawnee + */ + XSJW, + /** + * Blackfoot + */ + XBLC, + /** + * Cheyenne + */ + XCHY, + /** + * Menominee + */ + XMEZ, + /** + * Ritwan + */ + _RITWAN, + /** + * Yurok + */ + XYUR, + /** + * Caddoan + */ + _CADDOAN, + /** + * NorthernCaddoan + */ + _NORTHERNCADDOAN, + /** + * Arikara + */ + XARI, + /** + * Pawnee + */ + XPAW, + /** + * Wichita + */ + XWIC, + /** + * SouthernCaddoan + */ + _SOUTHERNCADDOAN, + /** + * Caddo + */ + XCAD, + /** + * Chimakuan + */ + _CHIMAKUAN, + /** + * Quileute + */ + XQUI, + /** + * EskimoAleut + */ + _ESKIMOALEUT, + /** + * Aleut + */ + _ALEUT, + /** + * Aleut + */ + XALW, + /** + * Eskimoan + */ + _ESKIMOAN, + /** + * InuitInupiaq + */ + _INUITINUPIAQ, + /** + * North Alaskan Inuktitut + */ + XESI, + /** + * Northwest Alaska Inuktitut + */ + XESK, + /** + * SirenikskiYupik + */ + _SIRENIKSKIYUPIK, + /** + * Pacific Yupik Gulf + */ + XEMS, + /** + * Central Siberian Yupik + */ + XESS, + /** + * Central Alaskan Yupik + */ + XESU, + /** + * Hokan + */ + _HOKAN, + /** + * CochimiYuman + */ + _COCHIMIYUMAN, + /** + * Yuman + */ + _YUMAN, + /** + * DeltaCalifornia + */ + _DELTACALIFORNIA, + /** + * Diegueno + */ + _DIEGUENO, + /** + * Kumeyaay + */ + XDIH, + /** + * Cocopa + */ + XCOC, + /** + * Pai + */ + _PAI, + /** + * Havasupai + */ + XYUF, + /** + * River + */ + _RIVER, + /** + * Mohave + */ + XMOV, + /** + * Maricopa + */ + XMRC, + /** + * Quechan + */ + XYUM, + /** + * Palaihnihan + */ + _PALAIHNIHAN, + /** + * Achumawi + */ + XACH, + /** + * Atsugewi + */ + XATW, + /** + * Pomoan + */ + _POMOAN, + /** + * Kashaya + */ + XKJU, + /** + * Northeastern Pomo + */ + XPEF, + /** + * Southeastern Pomo + */ + XPEO, + /** + * Southern Pomo + */ + XPEQ, + /** + * Central Pomo + */ + XPOO, + /** + * Shasta + */ + _SHASTA, + /** + * Shasta + */ + XSHT, + /** + * Karok + */ + XKYH, + /** + * Washoe + */ + XWAS, + /** + * Iroquoian + */ + _IROQUOIAN, + /** + * NorthernIroquoian + */ + _NORTHERNIROQUOIAN, + /** + * Cayuga + */ + XCAY, + /** + * Mohawk + */ + XMOH, + /** + * Oneida + */ + XONE, + /** + * Onondaga + */ + XONO, + /** + * Seneca + */ + XSEE, + /** + * Tuscarora + */ + XTUS, + /** + * Cherokee + */ + XCER, + /** + * Keresan + */ + _KERESAN, + /** + * Rio Grande Keresan + */ + XKEE, + /** + * Acoma-Laguna + */ + XKJQ, + /** + * KiowaTanoan + */ + _KIOWATANOAN, + /** + * Tiwa + */ + _TIWA, + /** + * Northern Tiwa + */ + XTAO, + /** + * Southern Tiwa + */ + XTIX, + /** + * Kiowa + */ + XKIO, + /** + * Tewa + */ + XTEW, + /** + * Jemez + */ + XTOW, + /** + * Muskogean + */ + _MUSKOGEAN, + /** + * CentralMuskogean + */ + _CENTRALMUSKOGEAN, + /** + * Alabama + */ + XAKZ, + /** + * Koasati + */ + XCKU, + /** + * Mikasuki + */ + XMIK, + /** + * WesternMuskogean + */ + _WESTERNMUSKOGEAN, + /** + * Choctaw + */ + XCCT, + /** + * Chickasaw + */ + XCIC, + /** + * Creek + */ + XCRK, + /** + * Nadene + */ + _NADENE, + /** + * AthapaskanEyak + */ + _ATHAPASKANEYAK, + /** + * Athapaskan + */ + _ATHAPASKAN, + /** + * Apachean + */ + _APACHEAN, + /** + * EasternApachean + */ + _EASTERNAPACHEAN, + /** + * Jicarilla + */ + XAPJ, + /** + * Lipan + */ + XAPL, + /** + * WesternApachean + */ + _WESTERNAPACHEAN, + /** + * Mescalero-Chiricahua + */ + XAPM, + /** + * Western Apache + */ + XAPW, + /** + * Dine + */ + XNAV, + /** + * Kiowa Apache + */ + XAPK, + /** + * CentralAlaskaYukon + */ + _CENTRALALASKAYUKON, + /** + * KoyukonIngalik + */ + _KOYUKONINGALIK, + /** + * Holikachuk + */ + XHOI, + /** + * Degexit'an + */ + XING, + /** + * Koyukon + */ + XKOY, + /** + * KutchinHan + */ + _KUTCHINHAN, + /** + * Han + */ + XHAA, + /** + * Kutchin + */ + XKUC, + /** + * TananaTutchone + */ + _TANANATUTCHONE, + /** + * Tanana + */ + _TANANA, + /** + * Lower Tanana + */ + XTAA, + /** + * Upper Tanana + */ + XTAU, + /** + * Tanacross + */ + XTCB, + /** + * Upper Kuskokwim + */ + XKUU, + /** + * PacificCoastAthapaskan + */ + _PACIFICCOASTATHAPASKAN, + /** + * CaliforniaAthapaskan + */ + _CALIFORNIAATHAPASKAN, + /** + * Hupa + */ + XHUP, + /** + * Cahto + */ + XKTW, + /** + * OregonAthapaskan + */ + _OREGONATHAPASKAN, + /** + * Tolowa + */ + XTOL, + /** + * Tututni + */ + XTUU, + /** + * SouthernAlaska + */ + _SOUTHERNALASKA, + /** + * Ahtna + */ + XAHT, + /** + * Tanaina + */ + XTFN, + /** + * Eyak + */ + XEYA, + /** + * Tlingit + */ + XTLI, + /** + * Penutian + */ + _PENUTIAN, + /** + * Chinookan + */ + _CHINOOKAN, + /** + * UpperChinook + */ + _UPPERCHINOOK, + /** + * Kiksht + */ + XWAC, + /** + * Coosan + */ + _COOSAN, + /** + * Hanis + */ + XCOS, + /** + * Maiduan + */ + _MAIDUAN, + /** + * Northwest Maidu + */ + XMAI, + /** + * Northeast Maidu + */ + XNMU, + /** + * Nisenan + */ + XNSZ, + /** + * PlateauPenutian + */ + _PLATEAUPENUTIAN, + /** + * Sahaptian + */ + _SAHAPTIAN, + /** + * Umatilla + */ + XUMA, + /** + * Walla Walla + */ + XWAA, + /** + * Tenino + */ + XWAR, + /** + * Yakima + */ + XYAK, + /** + * Klamath-Modoc + */ + XKLA, + /** + * Nez Perce + */ + XNEZ, + /** + * Takelman + */ + _TAKELMAN, + /** + * Kalapuyan + */ + _KALAPUYAN, + /** + * Central Kalapuyan + */ + XKAL, + /** + * Tsimshianic + */ + _TSIMSHIANIC, + /** + * Coast Tsimshain + */ + XTSI, + /** + * Utian + */ + _UTIAN, + /** + * Miwokan + */ + _MIWOKAN, + /** + * EasternMiwok + */ + _EASTERNMIWOK, + /** + * Central Sierra Miwok + */ + XCSM, + /** + * Northern Sierra Miwok + */ + XNSQ, + /** + * Plains Miwok + */ + XPMW, + /** + * Southern Sierra Miwok + */ + XSKD, + /** + * WesternMiwok + */ + _WESTERNMIWOK, + /** + * Coast Miwok + */ + XCSI, + /** + * Lake Miwok + */ + XLMW, + /** + * Wintuan + */ + _WINTUAN, + /** + * Wintu-Nomlaki + */ + XWIT, + /** + * Yokutsan + */ + _YOKUTSAN, + /** + * Kings River + */ + XENH, + /** + * Gashowu + */ + XGSH, + /** + * Poso Creek + */ + XPYL, + /** + * Tule-Kaweah + */ + XTKH, + /** + * Pidgin + */ + _PIDGIN, + /** + * Chinook Wawa + */ + XCHH, + /** + * Salishan + */ + _SALISHAN, + /** + * CentralSalish + */ + _CENTRALSALISH, + /** + * Clallam + */ + XCLM, + /** + * Lushootseed + */ + XLUT, + /** + * Northern Straits + */ + XSTR, + /** + * InteriorSalish + */ + _INTERIORSALISH, + /** + * Columbian + */ + XCOL, + /** + * Coeur D'alene + */ + XCRD, + /** + * Kalispel + */ + XFLA, + /** + * Okanagan + */ + XOKA, + /** + * Tsamosan + */ + _TSAMOSAN, + /** + * Lower Chehalis + */ + XCEA, + /** + * Upper Chehalis + */ + XCJH, + /** + * Cowlitz + */ + XCOW, + /** + * Quinault + */ + XQUN, + /** + * SiouanCatawba + */ + _SIOUANCATAWBA, + /** + * Siouan + */ + _SIOUAN, + /** + * MississippiValley + */ + _MISSISSIPPIVALLEY, + /** + * ChiwereWinnebago + */ + _CHIWEREWINNEBAGO, + /** + * Chiwere + */ + XIOW, + /** + * Hocak + */ + XWIN, + /** + * Dakotan + */ + _DAKOTAN, + /** + * Assiniboine + */ + XASB, + /** + * Dakota + */ + XDHG, + /** + * Lakota + */ + XLKT, + /** + * Nakota + */ + XNKT, + /** + * Dhegiha + */ + _DHEGIHA, + /** + * Kansa + */ + XKAA, + /** + * Omaha-Ponca + */ + XOMA, + /** + * Osage + */ + XOSA, + /** + * Quapaw + */ + XQUA, + /** + * MissouriRiver + */ + _MISSOURIRIVER, + /** + * Crow + */ + XCRO, + /** + * Hidatsa + */ + XHID, + /** + * Mandan + */ + XMHQ, + /** + * UtoAztecan + */ + _UTOAZTECAN, + /** + * Numic + */ + _NUMIC, + /** + * CentralNumic + */ + _CENTRALNUMIC, + /** + * Comanche + */ + XCOM, + /** + * Panamint + */ + XPAR, + /** + * Shoshone + */ + XSHH, + /** + * SouthernNumic + */ + _SOUTHERNNUMIC, + /** + * Kawaiisu + */ + XKAW, + /** + * Ute-Southern Paiute + */ + XUTE, + /** + * WesternNumic + */ + _WESTERNNUMIC, + /** + * Mono + */ + XMON, + /** + * Northern Paiute-Bannock + */ + XPAO, + /** + * Takic + */ + _TAKIC, + /** + * Cupan + */ + _CUPAN, + /** + * Cahuilla + */ + XCHL, + /** + * Cupeno + */ + XCUP, + /** + * Luiseno + */ + XLUI, + /** + * SerranoGabrielino + */ + _SERRANOGABRIELINO, + /** + * Serrano + */ + XSER, + /** + * Taracahitan + */ + _TARACAHITAN, + /** + * Cahitan + */ + _CAHITAN, + /** + * Yaqui + */ + XYAQ, + /** + * Tepiman + */ + _TEPIMAN, + /** + * Papago-Pima + */ + XPAP, + /** + * Hopi + */ + XHOP, + /** + * Tubatululabal + */ + XTUB, + /** + * Wakashan + */ + _WAKASHAN, + /** + * Nootkan + */ + _NOOTKAN, + /** + * Makah + */ + XMYH, + /** + * Yukian + */ + _YUKIAN, + /** + * Wappo + */ + XWAO, + /** + * Yuki + */ + XYUK, + /** + * Haida + */ + XHAI, + /** + * Kootenai + */ + XKUN, + /** + * Plains Indian Sign Language + */ + XPSD, + /** + * Yuchi + */ + XYUC, + /** + * Zuni + */ + XZUN, + /** + * added to help the parsers + */ + NULL; + public static V3AmericanIndianAlaskaNativeLanguages fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Algic".equals(codeString)) + return _ALGIC; + if ("_Algonquian".equals(codeString)) + return _ALGONQUIAN; + if ("_Arapahoan".equals(codeString)) + return _ARAPAHOAN; + if ("_ArapahoGrosVentre".equals(codeString)) + return _ARAPAHOGROSVENTRE; + if ("x-ARP".equals(codeString)) + return XARP; + if ("x-ATS".equals(codeString)) + return XATS; + if ("_CreeMontagnais".equals(codeString)) + return _CREEMONTAGNAIS; + if ("_Cree".equals(codeString)) + return _CREE; + if ("x-CRP".equals(codeString)) + return XCRP; + if ("_EasternAlgonquin".equals(codeString)) + return _EASTERNALGONQUIN; + if ("_Abenakian".equals(codeString)) + return _ABENAKIAN; + if ("x-AAQ".equals(codeString)) + return XAAQ; + if ("x-ABE".equals(codeString)) + return XABE; + if ("x-MAC".equals(codeString)) + return XMAC; + if ("_Delawaran".equals(codeString)) + return _DELAWARAN; + if ("x-DEL".equals(codeString)) + return XDEL; + if ("x-MIC".equals(codeString)) + return XMIC; + if ("_Ojibwayan".equals(codeString)) + return _OJIBWAYAN; + if ("x-OJB".equals(codeString)) + return XOJB; + if ("x-POT".equals(codeString)) + return XPOT; + if ("_SaukFoxKickapoo".equals(codeString)) + return _SAUKFOXKICKAPOO; + if ("x-KIC".equals(codeString)) + return XKIC; + if ("x-SAC".equals(codeString)) + return XSAC; + if ("x-SJW".equals(codeString)) + return XSJW; + if ("x-BLC".equals(codeString)) + return XBLC; + if ("x-CHY".equals(codeString)) + return XCHY; + if ("x-MEZ".equals(codeString)) + return XMEZ; + if ("_Ritwan".equals(codeString)) + return _RITWAN; + if ("x-YUR".equals(codeString)) + return XYUR; + if ("_Caddoan".equals(codeString)) + return _CADDOAN; + if ("_NorthernCaddoan".equals(codeString)) + return _NORTHERNCADDOAN; + if ("x-ARI".equals(codeString)) + return XARI; + if ("x-PAW".equals(codeString)) + return XPAW; + if ("x-WIC".equals(codeString)) + return XWIC; + if ("_SouthernCaddoan".equals(codeString)) + return _SOUTHERNCADDOAN; + if ("x-CAD".equals(codeString)) + return XCAD; + if ("_Chimakuan".equals(codeString)) + return _CHIMAKUAN; + if ("x-QUI".equals(codeString)) + return XQUI; + if ("_EskimoAleut".equals(codeString)) + return _ESKIMOALEUT; + if ("_Aleut".equals(codeString)) + return _ALEUT; + if ("x-ALW".equals(codeString)) + return XALW; + if ("_Eskimoan".equals(codeString)) + return _ESKIMOAN; + if ("_InuitInupiaq".equals(codeString)) + return _INUITINUPIAQ; + if ("x-ESI".equals(codeString)) + return XESI; + if ("x-ESK".equals(codeString)) + return XESK; + if ("_SirenikskiYupik".equals(codeString)) + return _SIRENIKSKIYUPIK; + if ("x-EMS".equals(codeString)) + return XEMS; + if ("x-ESS".equals(codeString)) + return XESS; + if ("x-ESU".equals(codeString)) + return XESU; + if ("_Hokan".equals(codeString)) + return _HOKAN; + if ("_CochimiYuman".equals(codeString)) + return _COCHIMIYUMAN; + if ("_Yuman".equals(codeString)) + return _YUMAN; + if ("_DeltaCalifornia".equals(codeString)) + return _DELTACALIFORNIA; + if ("_Diegueno".equals(codeString)) + return _DIEGUENO; + if ("x-DIH".equals(codeString)) + return XDIH; + if ("x-COC".equals(codeString)) + return XCOC; + if ("_Pai".equals(codeString)) + return _PAI; + if ("x-YUF".equals(codeString)) + return XYUF; + if ("_River".equals(codeString)) + return _RIVER; + if ("x-MOV".equals(codeString)) + return XMOV; + if ("x-MRC".equals(codeString)) + return XMRC; + if ("x-YUM".equals(codeString)) + return XYUM; + if ("_Palaihnihan".equals(codeString)) + return _PALAIHNIHAN; + if ("x-ACH".equals(codeString)) + return XACH; + if ("x-ATW".equals(codeString)) + return XATW; + if ("_Pomoan".equals(codeString)) + return _POMOAN; + if ("x-KJU".equals(codeString)) + return XKJU; + if ("x-PEF".equals(codeString)) + return XPEF; + if ("x-PEO".equals(codeString)) + return XPEO; + if ("x-PEQ".equals(codeString)) + return XPEQ; + if ("x-POO".equals(codeString)) + return XPOO; + if ("_Shasta".equals(codeString)) + return _SHASTA; + if ("x-SHT".equals(codeString)) + return XSHT; + if ("x-KYH".equals(codeString)) + return XKYH; + if ("x-WAS".equals(codeString)) + return XWAS; + if ("_Iroquoian".equals(codeString)) + return _IROQUOIAN; + if ("_NorthernIroquoian".equals(codeString)) + return _NORTHERNIROQUOIAN; + if ("x-CAY".equals(codeString)) + return XCAY; + if ("x-MOH".equals(codeString)) + return XMOH; + if ("x-ONE".equals(codeString)) + return XONE; + if ("x-ONO".equals(codeString)) + return XONO; + if ("x-SEE".equals(codeString)) + return XSEE; + if ("x-TUS".equals(codeString)) + return XTUS; + if ("x-CER".equals(codeString)) + return XCER; + if ("_Keresan".equals(codeString)) + return _KERESAN; + if ("x-KEE".equals(codeString)) + return XKEE; + if ("x-KJQ".equals(codeString)) + return XKJQ; + if ("_KiowaTanoan".equals(codeString)) + return _KIOWATANOAN; + if ("_Tiwa".equals(codeString)) + return _TIWA; + if ("x-TAO".equals(codeString)) + return XTAO; + if ("x-TIX".equals(codeString)) + return XTIX; + if ("x-KIO".equals(codeString)) + return XKIO; + if ("x-TEW".equals(codeString)) + return XTEW; + if ("x-TOW".equals(codeString)) + return XTOW; + if ("_Muskogean".equals(codeString)) + return _MUSKOGEAN; + if ("_CentralMuskogean".equals(codeString)) + return _CENTRALMUSKOGEAN; + if ("x-AKZ".equals(codeString)) + return XAKZ; + if ("x-CKU".equals(codeString)) + return XCKU; + if ("x-MIK".equals(codeString)) + return XMIK; + if ("_WesternMuskogean".equals(codeString)) + return _WESTERNMUSKOGEAN; + if ("x-CCT".equals(codeString)) + return XCCT; + if ("x-CIC".equals(codeString)) + return XCIC; + if ("x-CRK".equals(codeString)) + return XCRK; + if ("_Nadene".equals(codeString)) + return _NADENE; + if ("_AthapaskanEyak".equals(codeString)) + return _ATHAPASKANEYAK; + if ("_Athapaskan".equals(codeString)) + return _ATHAPASKAN; + if ("_Apachean".equals(codeString)) + return _APACHEAN; + if ("_EasternApachean".equals(codeString)) + return _EASTERNAPACHEAN; + if ("x-APJ".equals(codeString)) + return XAPJ; + if ("x-APL".equals(codeString)) + return XAPL; + if ("_WesternApachean".equals(codeString)) + return _WESTERNAPACHEAN; + if ("x-APM".equals(codeString)) + return XAPM; + if ("x-APW".equals(codeString)) + return XAPW; + if ("x-NAV".equals(codeString)) + return XNAV; + if ("x-APK".equals(codeString)) + return XAPK; + if ("_CentralAlaskaYukon".equals(codeString)) + return _CENTRALALASKAYUKON; + if ("_KoyukonIngalik".equals(codeString)) + return _KOYUKONINGALIK; + if ("x-HOI".equals(codeString)) + return XHOI; + if ("x-ING".equals(codeString)) + return XING; + if ("x-KOY".equals(codeString)) + return XKOY; + if ("_KutchinHan".equals(codeString)) + return _KUTCHINHAN; + if ("x-HAA".equals(codeString)) + return XHAA; + if ("x-KUC".equals(codeString)) + return XKUC; + if ("_TananaTutchone".equals(codeString)) + return _TANANATUTCHONE; + if ("_Tanana".equals(codeString)) + return _TANANA; + if ("x-TAA".equals(codeString)) + return XTAA; + if ("x-TAU".equals(codeString)) + return XTAU; + if ("x-TCB".equals(codeString)) + return XTCB; + if ("x-KUU".equals(codeString)) + return XKUU; + if ("_PacificCoastAthapaskan".equals(codeString)) + return _PACIFICCOASTATHAPASKAN; + if ("_CaliforniaAthapaskan".equals(codeString)) + return _CALIFORNIAATHAPASKAN; + if ("x-HUP".equals(codeString)) + return XHUP; + if ("x-KTW".equals(codeString)) + return XKTW; + if ("_OregonAthapaskan".equals(codeString)) + return _OREGONATHAPASKAN; + if ("x-TOL".equals(codeString)) + return XTOL; + if ("x-TUU".equals(codeString)) + return XTUU; + if ("_SouthernAlaska".equals(codeString)) + return _SOUTHERNALASKA; + if ("x-AHT".equals(codeString)) + return XAHT; + if ("x-TFN".equals(codeString)) + return XTFN; + if ("x-EYA".equals(codeString)) + return XEYA; + if ("x-TLI".equals(codeString)) + return XTLI; + if ("_Penutian".equals(codeString)) + return _PENUTIAN; + if ("_Chinookan".equals(codeString)) + return _CHINOOKAN; + if ("_UpperChinook".equals(codeString)) + return _UPPERCHINOOK; + if ("x-WAC".equals(codeString)) + return XWAC; + if ("_Coosan".equals(codeString)) + return _COOSAN; + if ("x-COS".equals(codeString)) + return XCOS; + if ("_Maiduan".equals(codeString)) + return _MAIDUAN; + if ("x-MAI".equals(codeString)) + return XMAI; + if ("x-NMU".equals(codeString)) + return XNMU; + if ("x-NSZ".equals(codeString)) + return XNSZ; + if ("_PlateauPenutian".equals(codeString)) + return _PLATEAUPENUTIAN; + if ("_Sahaptian".equals(codeString)) + return _SAHAPTIAN; + if ("x-UMA".equals(codeString)) + return XUMA; + if ("x-WAA".equals(codeString)) + return XWAA; + if ("x-WAR".equals(codeString)) + return XWAR; + if ("x-YAK".equals(codeString)) + return XYAK; + if ("x-KLA".equals(codeString)) + return XKLA; + if ("x-NEZ".equals(codeString)) + return XNEZ; + if ("_Takelman".equals(codeString)) + return _TAKELMAN; + if ("_Kalapuyan".equals(codeString)) + return _KALAPUYAN; + if ("x-KAL".equals(codeString)) + return XKAL; + if ("_Tsimshianic".equals(codeString)) + return _TSIMSHIANIC; + if ("x-TSI".equals(codeString)) + return XTSI; + if ("_Utian".equals(codeString)) + return _UTIAN; + if ("_Miwokan".equals(codeString)) + return _MIWOKAN; + if ("_EasternMiwok".equals(codeString)) + return _EASTERNMIWOK; + if ("x-CSM".equals(codeString)) + return XCSM; + if ("x-NSQ".equals(codeString)) + return XNSQ; + if ("x-PMW".equals(codeString)) + return XPMW; + if ("x-SKD".equals(codeString)) + return XSKD; + if ("_WesternMiwok".equals(codeString)) + return _WESTERNMIWOK; + if ("x-CSI".equals(codeString)) + return XCSI; + if ("x-LMW".equals(codeString)) + return XLMW; + if ("_Wintuan".equals(codeString)) + return _WINTUAN; + if ("x-WIT".equals(codeString)) + return XWIT; + if ("_Yokutsan".equals(codeString)) + return _YOKUTSAN; + if ("x-ENH".equals(codeString)) + return XENH; + if ("x-GSH".equals(codeString)) + return XGSH; + if ("x-PYL".equals(codeString)) + return XPYL; + if ("x-TKH".equals(codeString)) + return XTKH; + if ("_Pidgin".equals(codeString)) + return _PIDGIN; + if ("x-CHH".equals(codeString)) + return XCHH; + if ("_Salishan".equals(codeString)) + return _SALISHAN; + if ("_CentralSalish".equals(codeString)) + return _CENTRALSALISH; + if ("x-CLM".equals(codeString)) + return XCLM; + if ("x-LUT".equals(codeString)) + return XLUT; + if ("x-STR".equals(codeString)) + return XSTR; + if ("_InteriorSalish".equals(codeString)) + return _INTERIORSALISH; + if ("x-COL".equals(codeString)) + return XCOL; + if ("x-CRD".equals(codeString)) + return XCRD; + if ("x-FLA".equals(codeString)) + return XFLA; + if ("x-OKA".equals(codeString)) + return XOKA; + if ("_Tsamosan".equals(codeString)) + return _TSAMOSAN; + if ("x-CEA".equals(codeString)) + return XCEA; + if ("x-CJH".equals(codeString)) + return XCJH; + if ("x-COW".equals(codeString)) + return XCOW; + if ("x-QUN".equals(codeString)) + return XQUN; + if ("_SiouanCatawba".equals(codeString)) + return _SIOUANCATAWBA; + if ("_Siouan".equals(codeString)) + return _SIOUAN; + if ("_MississippiValley".equals(codeString)) + return _MISSISSIPPIVALLEY; + if ("_ChiwereWinnebago".equals(codeString)) + return _CHIWEREWINNEBAGO; + if ("x-IOW".equals(codeString)) + return XIOW; + if ("x-WIN".equals(codeString)) + return XWIN; + if ("_Dakotan".equals(codeString)) + return _DAKOTAN; + if ("x-ASB".equals(codeString)) + return XASB; + if ("x-DHG".equals(codeString)) + return XDHG; + if ("x-LKT".equals(codeString)) + return XLKT; + if ("x-NKT".equals(codeString)) + return XNKT; + if ("_Dhegiha".equals(codeString)) + return _DHEGIHA; + if ("x-KAA".equals(codeString)) + return XKAA; + if ("x-OMA".equals(codeString)) + return XOMA; + if ("x-OSA".equals(codeString)) + return XOSA; + if ("x-QUA".equals(codeString)) + return XQUA; + if ("_MissouriRiver".equals(codeString)) + return _MISSOURIRIVER; + if ("x-CRO".equals(codeString)) + return XCRO; + if ("x-HID".equals(codeString)) + return XHID; + if ("x-MHQ".equals(codeString)) + return XMHQ; + if ("_UtoAztecan".equals(codeString)) + return _UTOAZTECAN; + if ("_Numic".equals(codeString)) + return _NUMIC; + if ("_CentralNumic".equals(codeString)) + return _CENTRALNUMIC; + if ("x-COM".equals(codeString)) + return XCOM; + if ("x-PAR".equals(codeString)) + return XPAR; + if ("x-SHH".equals(codeString)) + return XSHH; + if ("_SouthernNumic".equals(codeString)) + return _SOUTHERNNUMIC; + if ("x-KAW".equals(codeString)) + return XKAW; + if ("x-UTE".equals(codeString)) + return XUTE; + if ("_WesternNumic".equals(codeString)) + return _WESTERNNUMIC; + if ("x-MON".equals(codeString)) + return XMON; + if ("x-PAO".equals(codeString)) + return XPAO; + if ("_Takic".equals(codeString)) + return _TAKIC; + if ("_Cupan".equals(codeString)) + return _CUPAN; + if ("x-CHL".equals(codeString)) + return XCHL; + if ("x-CUP".equals(codeString)) + return XCUP; + if ("x-LUI".equals(codeString)) + return XLUI; + if ("_SerranoGabrielino".equals(codeString)) + return _SERRANOGABRIELINO; + if ("x-SER".equals(codeString)) + return XSER; + if ("_Taracahitan".equals(codeString)) + return _TARACAHITAN; + if ("_Cahitan".equals(codeString)) + return _CAHITAN; + if ("x-YAQ".equals(codeString)) + return XYAQ; + if ("_Tepiman".equals(codeString)) + return _TEPIMAN; + if ("x-PAP".equals(codeString)) + return XPAP; + if ("x-HOP".equals(codeString)) + return XHOP; + if ("x-TUB".equals(codeString)) + return XTUB; + if ("_Wakashan".equals(codeString)) + return _WAKASHAN; + if ("_Nootkan".equals(codeString)) + return _NOOTKAN; + if ("x-MYH".equals(codeString)) + return XMYH; + if ("_Yukian".equals(codeString)) + return _YUKIAN; + if ("x-WAO".equals(codeString)) + return XWAO; + if ("x-YUK".equals(codeString)) + return XYUK; + if ("x-HAI".equals(codeString)) + return XHAI; + if ("x-KUN".equals(codeString)) + return XKUN; + if ("x-PSD".equals(codeString)) + return XPSD; + if ("x-YUC".equals(codeString)) + return XYUC; + if ("x-ZUN".equals(codeString)) + return XZUN; + throw new FHIRException("Unknown V3AmericanIndianAlaskaNativeLanguages code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ALGIC: return "_Algic"; + case _ALGONQUIAN: return "_Algonquian"; + case _ARAPAHOAN: return "_Arapahoan"; + case _ARAPAHOGROSVENTRE: return "_ArapahoGrosVentre"; + case XARP: return "x-ARP"; + case XATS: return "x-ATS"; + case _CREEMONTAGNAIS: return "_CreeMontagnais"; + case _CREE: return "_Cree"; + case XCRP: return "x-CRP"; + case _EASTERNALGONQUIN: return "_EasternAlgonquin"; + case _ABENAKIAN: return "_Abenakian"; + case XAAQ: return "x-AAQ"; + case XABE: return "x-ABE"; + case XMAC: return "x-MAC"; + case _DELAWARAN: return "_Delawaran"; + case XDEL: return "x-DEL"; + case XMIC: return "x-MIC"; + case _OJIBWAYAN: return "_Ojibwayan"; + case XOJB: return "x-OJB"; + case XPOT: return "x-POT"; + case _SAUKFOXKICKAPOO: return "_SaukFoxKickapoo"; + case XKIC: return "x-KIC"; + case XSAC: return "x-SAC"; + case XSJW: return "x-SJW"; + case XBLC: return "x-BLC"; + case XCHY: return "x-CHY"; + case XMEZ: return "x-MEZ"; + case _RITWAN: return "_Ritwan"; + case XYUR: return "x-YUR"; + case _CADDOAN: return "_Caddoan"; + case _NORTHERNCADDOAN: return "_NorthernCaddoan"; + case XARI: return "x-ARI"; + case XPAW: return "x-PAW"; + case XWIC: return "x-WIC"; + case _SOUTHERNCADDOAN: return "_SouthernCaddoan"; + case XCAD: return "x-CAD"; + case _CHIMAKUAN: return "_Chimakuan"; + case XQUI: return "x-QUI"; + case _ESKIMOALEUT: return "_EskimoAleut"; + case _ALEUT: return "_Aleut"; + case XALW: return "x-ALW"; + case _ESKIMOAN: return "_Eskimoan"; + case _INUITINUPIAQ: return "_InuitInupiaq"; + case XESI: return "x-ESI"; + case XESK: return "x-ESK"; + case _SIRENIKSKIYUPIK: return "_SirenikskiYupik"; + case XEMS: return "x-EMS"; + case XESS: return "x-ESS"; + case XESU: return "x-ESU"; + case _HOKAN: return "_Hokan"; + case _COCHIMIYUMAN: return "_CochimiYuman"; + case _YUMAN: return "_Yuman"; + case _DELTACALIFORNIA: return "_DeltaCalifornia"; + case _DIEGUENO: return "_Diegueno"; + case XDIH: return "x-DIH"; + case XCOC: return "x-COC"; + case _PAI: return "_Pai"; + case XYUF: return "x-YUF"; + case _RIVER: return "_River"; + case XMOV: return "x-MOV"; + case XMRC: return "x-MRC"; + case XYUM: return "x-YUM"; + case _PALAIHNIHAN: return "_Palaihnihan"; + case XACH: return "x-ACH"; + case XATW: return "x-ATW"; + case _POMOAN: return "_Pomoan"; + case XKJU: return "x-KJU"; + case XPEF: return "x-PEF"; + case XPEO: return "x-PEO"; + case XPEQ: return "x-PEQ"; + case XPOO: return "x-POO"; + case _SHASTA: return "_Shasta"; + case XSHT: return "x-SHT"; + case XKYH: return "x-KYH"; + case XWAS: return "x-WAS"; + case _IROQUOIAN: return "_Iroquoian"; + case _NORTHERNIROQUOIAN: return "_NorthernIroquoian"; + case XCAY: return "x-CAY"; + case XMOH: return "x-MOH"; + case XONE: return "x-ONE"; + case XONO: return "x-ONO"; + case XSEE: return "x-SEE"; + case XTUS: return "x-TUS"; + case XCER: return "x-CER"; + case _KERESAN: return "_Keresan"; + case XKEE: return "x-KEE"; + case XKJQ: return "x-KJQ"; + case _KIOWATANOAN: return "_KiowaTanoan"; + case _TIWA: return "_Tiwa"; + case XTAO: return "x-TAO"; + case XTIX: return "x-TIX"; + case XKIO: return "x-KIO"; + case XTEW: return "x-TEW"; + case XTOW: return "x-TOW"; + case _MUSKOGEAN: return "_Muskogean"; + case _CENTRALMUSKOGEAN: return "_CentralMuskogean"; + case XAKZ: return "x-AKZ"; + case XCKU: return "x-CKU"; + case XMIK: return "x-MIK"; + case _WESTERNMUSKOGEAN: return "_WesternMuskogean"; + case XCCT: return "x-CCT"; + case XCIC: return "x-CIC"; + case XCRK: return "x-CRK"; + case _NADENE: return "_Nadene"; + case _ATHAPASKANEYAK: return "_AthapaskanEyak"; + case _ATHAPASKAN: return "_Athapaskan"; + case _APACHEAN: return "_Apachean"; + case _EASTERNAPACHEAN: return "_EasternApachean"; + case XAPJ: return "x-APJ"; + case XAPL: return "x-APL"; + case _WESTERNAPACHEAN: return "_WesternApachean"; + case XAPM: return "x-APM"; + case XAPW: return "x-APW"; + case XNAV: return "x-NAV"; + case XAPK: return "x-APK"; + case _CENTRALALASKAYUKON: return "_CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "_KoyukonIngalik"; + case XHOI: return "x-HOI"; + case XING: return "x-ING"; + case XKOY: return "x-KOY"; + case _KUTCHINHAN: return "_KutchinHan"; + case XHAA: return "x-HAA"; + case XKUC: return "x-KUC"; + case _TANANATUTCHONE: return "_TananaTutchone"; + case _TANANA: return "_Tanana"; + case XTAA: return "x-TAA"; + case XTAU: return "x-TAU"; + case XTCB: return "x-TCB"; + case XKUU: return "x-KUU"; + case _PACIFICCOASTATHAPASKAN: return "_PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "_CaliforniaAthapaskan"; + case XHUP: return "x-HUP"; + case XKTW: return "x-KTW"; + case _OREGONATHAPASKAN: return "_OregonAthapaskan"; + case XTOL: return "x-TOL"; + case XTUU: return "x-TUU"; + case _SOUTHERNALASKA: return "_SouthernAlaska"; + case XAHT: return "x-AHT"; + case XTFN: return "x-TFN"; + case XEYA: return "x-EYA"; + case XTLI: return "x-TLI"; + case _PENUTIAN: return "_Penutian"; + case _CHINOOKAN: return "_Chinookan"; + case _UPPERCHINOOK: return "_UpperChinook"; + case XWAC: return "x-WAC"; + case _COOSAN: return "_Coosan"; + case XCOS: return "x-COS"; + case _MAIDUAN: return "_Maiduan"; + case XMAI: return "x-MAI"; + case XNMU: return "x-NMU"; + case XNSZ: return "x-NSZ"; + case _PLATEAUPENUTIAN: return "_PlateauPenutian"; + case _SAHAPTIAN: return "_Sahaptian"; + case XUMA: return "x-UMA"; + case XWAA: return "x-WAA"; + case XWAR: return "x-WAR"; + case XYAK: return "x-YAK"; + case XKLA: return "x-KLA"; + case XNEZ: return "x-NEZ"; + case _TAKELMAN: return "_Takelman"; + case _KALAPUYAN: return "_Kalapuyan"; + case XKAL: return "x-KAL"; + case _TSIMSHIANIC: return "_Tsimshianic"; + case XTSI: return "x-TSI"; + case _UTIAN: return "_Utian"; + case _MIWOKAN: return "_Miwokan"; + case _EASTERNMIWOK: return "_EasternMiwok"; + case XCSM: return "x-CSM"; + case XNSQ: return "x-NSQ"; + case XPMW: return "x-PMW"; + case XSKD: return "x-SKD"; + case _WESTERNMIWOK: return "_WesternMiwok"; + case XCSI: return "x-CSI"; + case XLMW: return "x-LMW"; + case _WINTUAN: return "_Wintuan"; + case XWIT: return "x-WIT"; + case _YOKUTSAN: return "_Yokutsan"; + case XENH: return "x-ENH"; + case XGSH: return "x-GSH"; + case XPYL: return "x-PYL"; + case XTKH: return "x-TKH"; + case _PIDGIN: return "_Pidgin"; + case XCHH: return "x-CHH"; + case _SALISHAN: return "_Salishan"; + case _CENTRALSALISH: return "_CentralSalish"; + case XCLM: return "x-CLM"; + case XLUT: return "x-LUT"; + case XSTR: return "x-STR"; + case _INTERIORSALISH: return "_InteriorSalish"; + case XCOL: return "x-COL"; + case XCRD: return "x-CRD"; + case XFLA: return "x-FLA"; + case XOKA: return "x-OKA"; + case _TSAMOSAN: return "_Tsamosan"; + case XCEA: return "x-CEA"; + case XCJH: return "x-CJH"; + case XCOW: return "x-COW"; + case XQUN: return "x-QUN"; + case _SIOUANCATAWBA: return "_SiouanCatawba"; + case _SIOUAN: return "_Siouan"; + case _MISSISSIPPIVALLEY: return "_MississippiValley"; + case _CHIWEREWINNEBAGO: return "_ChiwereWinnebago"; + case XIOW: return "x-IOW"; + case XWIN: return "x-WIN"; + case _DAKOTAN: return "_Dakotan"; + case XASB: return "x-ASB"; + case XDHG: return "x-DHG"; + case XLKT: return "x-LKT"; + case XNKT: return "x-NKT"; + case _DHEGIHA: return "_Dhegiha"; + case XKAA: return "x-KAA"; + case XOMA: return "x-OMA"; + case XOSA: return "x-OSA"; + case XQUA: return "x-QUA"; + case _MISSOURIRIVER: return "_MissouriRiver"; + case XCRO: return "x-CRO"; + case XHID: return "x-HID"; + case XMHQ: return "x-MHQ"; + case _UTOAZTECAN: return "_UtoAztecan"; + case _NUMIC: return "_Numic"; + case _CENTRALNUMIC: return "_CentralNumic"; + case XCOM: return "x-COM"; + case XPAR: return "x-PAR"; + case XSHH: return "x-SHH"; + case _SOUTHERNNUMIC: return "_SouthernNumic"; + case XKAW: return "x-KAW"; + case XUTE: return "x-UTE"; + case _WESTERNNUMIC: return "_WesternNumic"; + case XMON: return "x-MON"; + case XPAO: return "x-PAO"; + case _TAKIC: return "_Takic"; + case _CUPAN: return "_Cupan"; + case XCHL: return "x-CHL"; + case XCUP: return "x-CUP"; + case XLUI: return "x-LUI"; + case _SERRANOGABRIELINO: return "_SerranoGabrielino"; + case XSER: return "x-SER"; + case _TARACAHITAN: return "_Taracahitan"; + case _CAHITAN: return "_Cahitan"; + case XYAQ: return "x-YAQ"; + case _TEPIMAN: return "_Tepiman"; + case XPAP: return "x-PAP"; + case XHOP: return "x-HOP"; + case XTUB: return "x-TUB"; + case _WAKASHAN: return "_Wakashan"; + case _NOOTKAN: return "_Nootkan"; + case XMYH: return "x-MYH"; + case _YUKIAN: return "_Yukian"; + case XWAO: return "x-WAO"; + case XYUK: return "x-YUK"; + case XHAI: return "x-HAI"; + case XKUN: return "x-KUN"; + case XPSD: return "x-PSD"; + case XYUC: return "x-YUC"; + case XZUN: return "x-ZUN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AmericanIndianAlaskaNativeLanguages"; + } + public String getDefinition() { + switch (this) { + case _ALGIC: return "Algic"; + case _ALGONQUIAN: return "Algonquian"; + case _ARAPAHOAN: return "Arapahoan"; + case _ARAPAHOGROSVENTRE: return "ArapahoGrosVentre"; + case XARP: return "Arapaho"; + case XATS: return "Gros Ventre"; + case _CREEMONTAGNAIS: return "CreeMontagnais"; + case _CREE: return "Cree"; + case XCRP: return "Western Cree"; + case _EASTERNALGONQUIN: return "EasternAlgonquin"; + case _ABENAKIAN: return "Abenakian"; + case XAAQ: return "Eastern Abenaki"; + case XABE: return "Western Abenaki"; + case XMAC: return "Maliseet-Passamaquoddy"; + case _DELAWARAN: return "Delawaran"; + case XDEL: return "Unami Delaware"; + case XMIC: return "Micmac"; + case _OJIBWAYAN: return "Ojibwayan"; + case XOJB: return "Southern Ojibwa"; + case XPOT: return "Potawatami"; + case _SAUKFOXKICKAPOO: return "SaukFoxKickapoo"; + case XKIC: return "Kickapoo"; + case XSAC: return "Mesquakie"; + case XSJW: return "Shawnee"; + case XBLC: return "Blackfoot"; + case XCHY: return "Cheyenne"; + case XMEZ: return "Menominee"; + case _RITWAN: return "Ritwan"; + case XYUR: return "Yurok"; + case _CADDOAN: return "Caddoan"; + case _NORTHERNCADDOAN: return "NorthernCaddoan"; + case XARI: return "Arikara"; + case XPAW: return "Pawnee"; + case XWIC: return "Wichita"; + case _SOUTHERNCADDOAN: return "SouthernCaddoan"; + case XCAD: return "Caddo"; + case _CHIMAKUAN: return "Chimakuan"; + case XQUI: return "Quileute"; + case _ESKIMOALEUT: return "EskimoAleut"; + case _ALEUT: return "Aleut"; + case XALW: return "Aleut"; + case _ESKIMOAN: return "Eskimoan"; + case _INUITINUPIAQ: return "InuitInupiaq"; + case XESI: return "North Alaskan Inuktitut"; + case XESK: return "Northwest Alaska Inuktitut"; + case _SIRENIKSKIYUPIK: return "SirenikskiYupik"; + case XEMS: return "Pacific Yupik Gulf"; + case XESS: return "Central Siberian Yupik"; + case XESU: return "Central Alaskan Yupik"; + case _HOKAN: return "Hokan"; + case _COCHIMIYUMAN: return "CochimiYuman"; + case _YUMAN: return "Yuman"; + case _DELTACALIFORNIA: return "DeltaCalifornia"; + case _DIEGUENO: return "Diegueno"; + case XDIH: return "Kumeyaay"; + case XCOC: return "Cocopa"; + case _PAI: return "Pai"; + case XYUF: return "Havasupai"; + case _RIVER: return "River"; + case XMOV: return "Mohave"; + case XMRC: return "Maricopa"; + case XYUM: return "Quechan"; + case _PALAIHNIHAN: return "Palaihnihan"; + case XACH: return "Achumawi"; + case XATW: return "Atsugewi"; + case _POMOAN: return "Pomoan"; + case XKJU: return "Kashaya"; + case XPEF: return "Northeastern Pomo"; + case XPEO: return "Southeastern Pomo"; + case XPEQ: return "Southern Pomo"; + case XPOO: return "Central Pomo"; + case _SHASTA: return "Shasta"; + case XSHT: return "Shasta"; + case XKYH: return "Karok"; + case XWAS: return "Washoe"; + case _IROQUOIAN: return "Iroquoian"; + case _NORTHERNIROQUOIAN: return "NorthernIroquoian"; + case XCAY: return "Cayuga"; + case XMOH: return "Mohawk"; + case XONE: return "Oneida"; + case XONO: return "Onondaga"; + case XSEE: return "Seneca"; + case XTUS: return "Tuscarora"; + case XCER: return "Cherokee"; + case _KERESAN: return "Keresan"; + case XKEE: return "Rio Grande Keresan"; + case XKJQ: return "Acoma-Laguna"; + case _KIOWATANOAN: return "KiowaTanoan"; + case _TIWA: return "Tiwa"; + case XTAO: return "Northern Tiwa"; + case XTIX: return "Southern Tiwa"; + case XKIO: return "Kiowa"; + case XTEW: return "Tewa"; + case XTOW: return "Jemez"; + case _MUSKOGEAN: return "Muskogean"; + case _CENTRALMUSKOGEAN: return "CentralMuskogean"; + case XAKZ: return "Alabama"; + case XCKU: return "Koasati"; + case XMIK: return "Mikasuki"; + case _WESTERNMUSKOGEAN: return "WesternMuskogean"; + case XCCT: return "Choctaw"; + case XCIC: return "Chickasaw"; + case XCRK: return "Creek"; + case _NADENE: return "Nadene"; + case _ATHAPASKANEYAK: return "AthapaskanEyak"; + case _ATHAPASKAN: return "Athapaskan"; + case _APACHEAN: return "Apachean"; + case _EASTERNAPACHEAN: return "EasternApachean"; + case XAPJ: return "Jicarilla"; + case XAPL: return "Lipan"; + case _WESTERNAPACHEAN: return "WesternApachean"; + case XAPM: return "Mescalero-Chiricahua"; + case XAPW: return "Western Apache"; + case XNAV: return "Dine"; + case XAPK: return "Kiowa Apache"; + case _CENTRALALASKAYUKON: return "CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "KoyukonIngalik"; + case XHOI: return "Holikachuk"; + case XING: return "Degexit'an"; + case XKOY: return "Koyukon"; + case _KUTCHINHAN: return "KutchinHan"; + case XHAA: return "Han"; + case XKUC: return "Kutchin"; + case _TANANATUTCHONE: return "TananaTutchone"; + case _TANANA: return "Tanana"; + case XTAA: return "Lower Tanana"; + case XTAU: return "Upper Tanana"; + case XTCB: return "Tanacross"; + case XKUU: return "Upper Kuskokwim"; + case _PACIFICCOASTATHAPASKAN: return "PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "CaliforniaAthapaskan"; + case XHUP: return "Hupa"; + case XKTW: return "Cahto"; + case _OREGONATHAPASKAN: return "OregonAthapaskan"; + case XTOL: return "Tolowa"; + case XTUU: return "Tututni"; + case _SOUTHERNALASKA: return "SouthernAlaska"; + case XAHT: return "Ahtna"; + case XTFN: return "Tanaina"; + case XEYA: return "Eyak"; + case XTLI: return "Tlingit"; + case _PENUTIAN: return "Penutian"; + case _CHINOOKAN: return "Chinookan"; + case _UPPERCHINOOK: return "UpperChinook"; + case XWAC: return "Kiksht"; + case _COOSAN: return "Coosan"; + case XCOS: return "Hanis"; + case _MAIDUAN: return "Maiduan"; + case XMAI: return "Northwest Maidu"; + case XNMU: return "Northeast Maidu"; + case XNSZ: return "Nisenan"; + case _PLATEAUPENUTIAN: return "PlateauPenutian"; + case _SAHAPTIAN: return "Sahaptian"; + case XUMA: return "Umatilla"; + case XWAA: return "Walla Walla"; + case XWAR: return "Tenino"; + case XYAK: return "Yakima"; + case XKLA: return "Klamath-Modoc"; + case XNEZ: return "Nez Perce"; + case _TAKELMAN: return "Takelman"; + case _KALAPUYAN: return "Kalapuyan"; + case XKAL: return "Central Kalapuyan"; + case _TSIMSHIANIC: return "Tsimshianic"; + case XTSI: return "Coast Tsimshain"; + case _UTIAN: return "Utian"; + case _MIWOKAN: return "Miwokan"; + case _EASTERNMIWOK: return "EasternMiwok"; + case XCSM: return "Central Sierra Miwok"; + case XNSQ: return "Northern Sierra Miwok"; + case XPMW: return "Plains Miwok"; + case XSKD: return "Southern Sierra Miwok"; + case _WESTERNMIWOK: return "WesternMiwok"; + case XCSI: return "Coast Miwok"; + case XLMW: return "Lake Miwok"; + case _WINTUAN: return "Wintuan"; + case XWIT: return "Wintu-Nomlaki"; + case _YOKUTSAN: return "Yokutsan"; + case XENH: return "Kings River"; + case XGSH: return "Gashowu"; + case XPYL: return "Poso Creek"; + case XTKH: return "Tule-Kaweah"; + case _PIDGIN: return "Pidgin"; + case XCHH: return "Chinook Wawa"; + case _SALISHAN: return "Salishan"; + case _CENTRALSALISH: return "CentralSalish"; + case XCLM: return "Clallam"; + case XLUT: return "Lushootseed"; + case XSTR: return "Northern Straits"; + case _INTERIORSALISH: return "InteriorSalish"; + case XCOL: return "Columbian"; + case XCRD: return "Coeur D'alene"; + case XFLA: return "Kalispel"; + case XOKA: return "Okanagan"; + case _TSAMOSAN: return "Tsamosan"; + case XCEA: return "Lower Chehalis"; + case XCJH: return "Upper Chehalis"; + case XCOW: return "Cowlitz"; + case XQUN: return "Quinault"; + case _SIOUANCATAWBA: return "SiouanCatawba"; + case _SIOUAN: return "Siouan"; + case _MISSISSIPPIVALLEY: return "MississippiValley"; + case _CHIWEREWINNEBAGO: return "ChiwereWinnebago"; + case XIOW: return "Chiwere"; + case XWIN: return "Hocak"; + case _DAKOTAN: return "Dakotan"; + case XASB: return "Assiniboine"; + case XDHG: return "Dakota"; + case XLKT: return "Lakota"; + case XNKT: return "Nakota"; + case _DHEGIHA: return "Dhegiha"; + case XKAA: return "Kansa"; + case XOMA: return "Omaha-Ponca"; + case XOSA: return "Osage"; + case XQUA: return "Quapaw"; + case _MISSOURIRIVER: return "MissouriRiver"; + case XCRO: return "Crow"; + case XHID: return "Hidatsa"; + case XMHQ: return "Mandan"; + case _UTOAZTECAN: return "UtoAztecan"; + case _NUMIC: return "Numic"; + case _CENTRALNUMIC: return "CentralNumic"; + case XCOM: return "Comanche"; + case XPAR: return "Panamint"; + case XSHH: return "Shoshone"; + case _SOUTHERNNUMIC: return "SouthernNumic"; + case XKAW: return "Kawaiisu"; + case XUTE: return "Ute-Southern Paiute"; + case _WESTERNNUMIC: return "WesternNumic"; + case XMON: return "Mono"; + case XPAO: return "Northern Paiute-Bannock"; + case _TAKIC: return "Takic"; + case _CUPAN: return "Cupan"; + case XCHL: return "Cahuilla"; + case XCUP: return "Cupeno"; + case XLUI: return "Luiseno"; + case _SERRANOGABRIELINO: return "SerranoGabrielino"; + case XSER: return "Serrano"; + case _TARACAHITAN: return "Taracahitan"; + case _CAHITAN: return "Cahitan"; + case XYAQ: return "Yaqui"; + case _TEPIMAN: return "Tepiman"; + case XPAP: return "Papago-Pima"; + case XHOP: return "Hopi"; + case XTUB: return "Tubatululabal"; + case _WAKASHAN: return "Wakashan"; + case _NOOTKAN: return "Nootkan"; + case XMYH: return "Makah"; + case _YUKIAN: return "Yukian"; + case XWAO: return "Wappo"; + case XYUK: return "Yuki"; + case XHAI: return "Haida"; + case XKUN: return "Kootenai"; + case XPSD: return "Plains Indian Sign Language"; + case XYUC: return "Yuchi"; + case XZUN: return "Zuni"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ALGIC: return "Algic"; + case _ALGONQUIAN: return "Algonquian"; + case _ARAPAHOAN: return "Arapahoan"; + case _ARAPAHOGROSVENTRE: return "ArapahoGrosVentre"; + case XARP: return "Arapaho"; + case XATS: return "Gros Ventre"; + case _CREEMONTAGNAIS: return "CreeMontagnais"; + case _CREE: return "Cree"; + case XCRP: return "Western Cree"; + case _EASTERNALGONQUIN: return "EasternAlgonquin"; + case _ABENAKIAN: return "Abenakian"; + case XAAQ: return "Eastern Abenaki"; + case XABE: return "Western Abenaki"; + case XMAC: return "Maliseet-Passamaquoddy"; + case _DELAWARAN: return "Delawaran"; + case XDEL: return "Unami Delaware"; + case XMIC: return "Micmac"; + case _OJIBWAYAN: return "Ojibwayan"; + case XOJB: return "Southern Ojibwa"; + case XPOT: return "Potawatami"; + case _SAUKFOXKICKAPOO: return "SaukFoxKickapoo"; + case XKIC: return "Kickapoo"; + case XSAC: return "Mesquakie"; + case XSJW: return "Shawnee"; + case XBLC: return "Blackfoot"; + case XCHY: return "Cheyenne"; + case XMEZ: return "Menominee"; + case _RITWAN: return "Ritwan"; + case XYUR: return "Yurok"; + case _CADDOAN: return "Caddoan"; + case _NORTHERNCADDOAN: return "NorthernCaddoan"; + case XARI: return "Arikara"; + case XPAW: return "Pawnee"; + case XWIC: return "Wichita"; + case _SOUTHERNCADDOAN: return "SouthernCaddoan"; + case XCAD: return "Caddo"; + case _CHIMAKUAN: return "Chimakuan"; + case XQUI: return "Quileute"; + case _ESKIMOALEUT: return "EskimoAleut"; + case _ALEUT: return "Aleut"; + case XALW: return "Aleut"; + case _ESKIMOAN: return "Eskimoan"; + case _INUITINUPIAQ: return "InuitInupiaq"; + case XESI: return "North Alaskan Inuktitut"; + case XESK: return "Northwest Alaska Inuktitut"; + case _SIRENIKSKIYUPIK: return "SirenikskiYupik"; + case XEMS: return "Pacific Yupik Gulf"; + case XESS: return "Central Siberian Yupik"; + case XESU: return "Central Alaskan Yupik"; + case _HOKAN: return "Hokan"; + case _COCHIMIYUMAN: return "CochimiYuman"; + case _YUMAN: return "Yuman"; + case _DELTACALIFORNIA: return "DeltaCalifornia"; + case _DIEGUENO: return "Diegueno"; + case XDIH: return "Kumeyaay"; + case XCOC: return "Cocopa"; + case _PAI: return "Pai"; + case XYUF: return "Havasupai"; + case _RIVER: return "River"; + case XMOV: return "Mohave"; + case XMRC: return "Maricopa"; + case XYUM: return "Quechan"; + case _PALAIHNIHAN: return "Palaihnihan"; + case XACH: return "Achumawi"; + case XATW: return "Atsugewi"; + case _POMOAN: return "Pomoan"; + case XKJU: return "Kashaya"; + case XPEF: return "Northeastern Pomo"; + case XPEO: return "Southeastern Pomo"; + case XPEQ: return "Southern Pomo"; + case XPOO: return "Central Pomo"; + case _SHASTA: return "Shasta"; + case XSHT: return "Shasta"; + case XKYH: return "Karok"; + case XWAS: return "Washoe"; + case _IROQUOIAN: return "Iroquoian"; + case _NORTHERNIROQUOIAN: return "NorthernIroquoian"; + case XCAY: return "Cayuga"; + case XMOH: return "Mohawk"; + case XONE: return "Oneida"; + case XONO: return "Onondaga"; + case XSEE: return "Seneca"; + case XTUS: return "Tuscarora"; + case XCER: return "Cherokee"; + case _KERESAN: return "Keresan"; + case XKEE: return "Rio Grande Keresan"; + case XKJQ: return "Acoma-Laguna"; + case _KIOWATANOAN: return "KiowaTanoan"; + case _TIWA: return "Tiwa"; + case XTAO: return "Northern Tiwa"; + case XTIX: return "Southern Tiwa"; + case XKIO: return "Kiowa"; + case XTEW: return "Tewa"; + case XTOW: return "Jemez"; + case _MUSKOGEAN: return "Muskogean"; + case _CENTRALMUSKOGEAN: return "CentralMuskogean"; + case XAKZ: return "Alabama"; + case XCKU: return "Koasati"; + case XMIK: return "Mikasuki"; + case _WESTERNMUSKOGEAN: return "WesternMuskogean"; + case XCCT: return "Choctaw"; + case XCIC: return "Chickasaw"; + case XCRK: return "Creek"; + case _NADENE: return "Nadene"; + case _ATHAPASKANEYAK: return "AthapaskanEyak"; + case _ATHAPASKAN: return "Athapaskan"; + case _APACHEAN: return "Apachean"; + case _EASTERNAPACHEAN: return "EasternApachean"; + case XAPJ: return "Jicarilla"; + case XAPL: return "Lipan"; + case _WESTERNAPACHEAN: return "WesternApachean"; + case XAPM: return "Mescalero-Chiricahua"; + case XAPW: return "Western Apache"; + case XNAV: return "Dine"; + case XAPK: return "Kiowa Apache"; + case _CENTRALALASKAYUKON: return "CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "KoyukonIngalik"; + case XHOI: return "Holikachuk"; + case XING: return "Degexit'an"; + case XKOY: return "Koyukon"; + case _KUTCHINHAN: return "KutchinHan"; + case XHAA: return "Han"; + case XKUC: return "Kutchin"; + case _TANANATUTCHONE: return "TananaTutchone"; + case _TANANA: return "Tanana"; + case XTAA: return "Lower Tanana"; + case XTAU: return "Upper Tanana"; + case XTCB: return "Tanacross"; + case XKUU: return "Upper Kuskokwim"; + case _PACIFICCOASTATHAPASKAN: return "PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "CaliforniaAthapaskan"; + case XHUP: return "Hupa"; + case XKTW: return "Cahto"; + case _OREGONATHAPASKAN: return "OregonAthapaskan"; + case XTOL: return "Tolowa"; + case XTUU: return "Tututni"; + case _SOUTHERNALASKA: return "SouthernAlaska"; + case XAHT: return "Ahtna"; + case XTFN: return "Tanaina"; + case XEYA: return "Eyak"; + case XTLI: return "Tlingit"; + case _PENUTIAN: return "Penutian"; + case _CHINOOKAN: return "Chinookan"; + case _UPPERCHINOOK: return "UpperChinook"; + case XWAC: return "Kiksht"; + case _COOSAN: return "Coosan"; + case XCOS: return "Hanis"; + case _MAIDUAN: return "Maiduan"; + case XMAI: return "Northwest Maidu"; + case XNMU: return "Northeast Maidu"; + case XNSZ: return "Nisenan"; + case _PLATEAUPENUTIAN: return "PlateauPenutian"; + case _SAHAPTIAN: return "Sahaptian"; + case XUMA: return "Umatilla"; + case XWAA: return "Walla Walla"; + case XWAR: return "Tenino"; + case XYAK: return "Yakima"; + case XKLA: return "Klamath-Modoc"; + case XNEZ: return "Nez Perce"; + case _TAKELMAN: return "Takelman"; + case _KALAPUYAN: return "Kalapuyan"; + case XKAL: return "Central Kalapuyan"; + case _TSIMSHIANIC: return "Tsimshianic"; + case XTSI: return "Coast Tsimshain"; + case _UTIAN: return "Utian"; + case _MIWOKAN: return "Miwokan"; + case _EASTERNMIWOK: return "EasternMiwok"; + case XCSM: return "Central Sierra Miwok"; + case XNSQ: return "Northern Sierra Miwok"; + case XPMW: return "Plains Miwok"; + case XSKD: return "Southern Sierra Miwok"; + case _WESTERNMIWOK: return "WesternMiwok"; + case XCSI: return "Coast Miwok"; + case XLMW: return "Lake Miwok"; + case _WINTUAN: return "Wintuan"; + case XWIT: return "Wintu-Nomlaki"; + case _YOKUTSAN: return "Yokutsan"; + case XENH: return "Kings River"; + case XGSH: return "Gashowu"; + case XPYL: return "Poso Creek"; + case XTKH: return "Tule-Kaweah"; + case _PIDGIN: return "Pidgin"; + case XCHH: return "Chinook Wawa"; + case _SALISHAN: return "Salishan"; + case _CENTRALSALISH: return "CentralSalish"; + case XCLM: return "Clallam"; + case XLUT: return "Lushootseed"; + case XSTR: return "Northern Straits"; + case _INTERIORSALISH: return "InteriorSalish"; + case XCOL: return "Columbian"; + case XCRD: return "Coeur D'alene"; + case XFLA: return "Kalispel"; + case XOKA: return "Okanagan"; + case _TSAMOSAN: return "Tsamosan"; + case XCEA: return "Lower Chehalis"; + case XCJH: return "Upper Chehalis"; + case XCOW: return "Cowlitz"; + case XQUN: return "Quinault"; + case _SIOUANCATAWBA: return "SiouanCatawba"; + case _SIOUAN: return "Siouan"; + case _MISSISSIPPIVALLEY: return "MississippiValley"; + case _CHIWEREWINNEBAGO: return "ChiwereWinnebago"; + case XIOW: return "Chiwere"; + case XWIN: return "Hocak"; + case _DAKOTAN: return "Dakotan"; + case XASB: return "Assiniboine"; + case XDHG: return "Dakota"; + case XLKT: return "Lakota"; + case XNKT: return "Nakota"; + case _DHEGIHA: return "Dhegiha"; + case XKAA: return "Kansa"; + case XOMA: return "Omaha-Ponca"; + case XOSA: return "Osage"; + case XQUA: return "Quapaw"; + case _MISSOURIRIVER: return "MissouriRiver"; + case XCRO: return "Crow"; + case XHID: return "Hidatsa"; + case XMHQ: return "Mandan"; + case _UTOAZTECAN: return "UtoAztecan"; + case _NUMIC: return "Numic"; + case _CENTRALNUMIC: return "CentralNumic"; + case XCOM: return "Comanche"; + case XPAR: return "Panamint"; + case XSHH: return "Shoshone"; + case _SOUTHERNNUMIC: return "SouthernNumic"; + case XKAW: return "Kawaiisu"; + case XUTE: return "Ute-Southern Paiute"; + case _WESTERNNUMIC: return "WesternNumic"; + case XMON: return "Mono"; + case XPAO: return "Northern Paiute-Bannock"; + case _TAKIC: return "Takic"; + case _CUPAN: return "Cupan"; + case XCHL: return "Cahuilla"; + case XCUP: return "Cupeno"; + case XLUI: return "Luiseno"; + case _SERRANOGABRIELINO: return "SerranoGabrielino"; + case XSER: return "Serrano"; + case _TARACAHITAN: return "Taracahitan"; + case _CAHITAN: return "Cahitan"; + case XYAQ: return "Yaqui"; + case _TEPIMAN: return "Tepiman"; + case XPAP: return "Papago-Pima"; + case XHOP: return "Hopi"; + case XTUB: return "Tubatululabal"; + case _WAKASHAN: return "Wakashan"; + case _NOOTKAN: return "Nootkan"; + case XMYH: return "Makah"; + case _YUKIAN: return "Yukian"; + case XWAO: return "Wappo"; + case XYUK: return "Yuki"; + case XHAI: return "Haida"; + case XKUN: return "Kootenai"; + case XPSD: return "Plains Indian Sign Language"; + case XYUC: return "Yuchi"; + case XZUN: return "Zuni"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java new file mode 100644 index 00000000000..064ce80413b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java @@ -0,0 +1,1071 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3AmericanIndianAlaskaNativeLanguagesEnumFactory implements EnumFactory { + + public V3AmericanIndianAlaskaNativeLanguages fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Algic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALGIC; + if ("_Algonquian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALGONQUIAN; + if ("_Arapahoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ARAPAHOAN; + if ("_ArapahoGrosVentre".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ARAPAHOGROSVENTRE; + if ("x-ARP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XARP; + if ("x-ATS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XATS; + if ("_CreeMontagnais".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CREEMONTAGNAIS; + if ("_Cree".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CREE; + if ("x-CRP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRP; + if ("_EasternAlgonquin".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNALGONQUIN; + if ("_Abenakian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ABENAKIAN; + if ("x-AAQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAAQ; + if ("x-ABE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XABE; + if ("x-MAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMAC; + if ("_Delawaran".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DELAWARAN; + if ("x-DEL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDEL; + if ("x-MIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMIC; + if ("_Ojibwayan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._OJIBWAYAN; + if ("x-OJB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOJB; + if ("x-POT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPOT; + if ("_SaukFoxKickapoo".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SAUKFOXKICKAPOO; + if ("x-KIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKIC; + if ("x-SAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSAC; + if ("x-SJW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSJW; + if ("x-BLC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XBLC; + if ("x-CHY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHY; + if ("x-MEZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMEZ; + if ("_Ritwan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._RITWAN; + if ("x-YUR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUR; + if ("_Caddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CADDOAN; + if ("_NorthernCaddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NORTHERNCADDOAN; + if ("x-ARI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XARI; + if ("x-PAW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAW; + if ("x-WIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIC; + if ("_SouthernCaddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNCADDOAN; + if ("x-CAD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCAD; + if ("_Chimakuan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHIMAKUAN; + if ("x-QUI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUI; + if ("_EskimoAleut".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ESKIMOALEUT; + if ("_Aleut".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALEUT; + if ("x-ALW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XALW; + if ("_Eskimoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ESKIMOAN; + if ("_InuitInupiaq".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._INUITINUPIAQ; + if ("x-ESI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESI; + if ("x-ESK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESK; + if ("_SirenikskiYupik".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIRENIKSKIYUPIK; + if ("x-EMS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XEMS; + if ("x-ESS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESS; + if ("x-ESU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESU; + if ("_Hokan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._HOKAN; + if ("_CochimiYuman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._COCHIMIYUMAN; + if ("_Yuman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YUMAN; + if ("_DeltaCalifornia".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DELTACALIFORNIA; + if ("_Diegueno".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DIEGUENO; + if ("x-DIH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDIH; + if ("x-COC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOC; + if ("_Pai".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PAI; + if ("x-YUF".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUF; + if ("_River".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._RIVER; + if ("x-MOV".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMOV; + if ("x-MRC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMRC; + if ("x-YUM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUM; + if ("_Palaihnihan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PALAIHNIHAN; + if ("x-ACH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XACH; + if ("x-ATW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XATW; + if ("_Pomoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._POMOAN; + if ("x-KJU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKJU; + if ("x-PEF".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEF; + if ("x-PEO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEO; + if ("x-PEQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEQ; + if ("x-POO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPOO; + if ("_Shasta".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SHASTA; + if ("x-SHT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSHT; + if ("x-KYH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKYH; + if ("x-WAS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAS; + if ("_Iroquoian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._IROQUOIAN; + if ("_NorthernIroquoian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NORTHERNIROQUOIAN; + if ("x-CAY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCAY; + if ("x-MOH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMOH; + if ("x-ONE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XONE; + if ("x-ONO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XONO; + if ("x-SEE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSEE; + if ("x-TUS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUS; + if ("x-CER".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCER; + if ("_Keresan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KERESAN; + if ("x-KEE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKEE; + if ("x-KJQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKJQ; + if ("_KiowaTanoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KIOWATANOAN; + if ("_Tiwa".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TIWA; + if ("x-TAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAO; + if ("x-TIX".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTIX; + if ("x-KIO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKIO; + if ("x-TEW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTEW; + if ("x-TOW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTOW; + if ("_Muskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MUSKOGEAN; + if ("_CentralMuskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALMUSKOGEAN; + if ("x-AKZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAKZ; + if ("x-CKU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCKU; + if ("x-MIK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMIK; + if ("_WesternMuskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNMUSKOGEAN; + if ("x-CCT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCCT; + if ("x-CIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCIC; + if ("x-CRK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRK; + if ("_Nadene".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NADENE; + if ("_AthapaskanEyak".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ATHAPASKANEYAK; + if ("_Athapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ATHAPASKAN; + if ("_Apachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._APACHEAN; + if ("_EasternApachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNAPACHEAN; + if ("x-APJ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPJ; + if ("x-APL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPL; + if ("_WesternApachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNAPACHEAN; + if ("x-APM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPM; + if ("x-APW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPW; + if ("x-NAV".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNAV; + if ("x-APK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPK; + if ("_CentralAlaskaYukon".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALALASKAYUKON; + if ("_KoyukonIngalik".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KOYUKONINGALIK; + if ("x-HOI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHOI; + if ("x-ING".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XING; + if ("x-KOY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKOY; + if ("_KutchinHan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KUTCHINHAN; + if ("x-HAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHAA; + if ("x-KUC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUC; + if ("_TananaTutchone".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TANANATUTCHONE; + if ("_Tanana".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TANANA; + if ("x-TAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAA; + if ("x-TAU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAU; + if ("x-TCB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTCB; + if ("x-KUU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUU; + if ("_PacificCoastAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PACIFICCOASTATHAPASKAN; + if ("_CaliforniaAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CALIFORNIAATHAPASKAN; + if ("x-HUP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHUP; + if ("x-KTW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKTW; + if ("_OregonAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._OREGONATHAPASKAN; + if ("x-TOL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTOL; + if ("x-TUU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUU; + if ("_SouthernAlaska".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNALASKA; + if ("x-AHT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAHT; + if ("x-TFN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTFN; + if ("x-EYA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XEYA; + if ("x-TLI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTLI; + if ("_Penutian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PENUTIAN; + if ("_Chinookan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHINOOKAN; + if ("_UpperChinook".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UPPERCHINOOK; + if ("x-WAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAC; + if ("_Coosan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._COOSAN; + if ("x-COS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOS; + if ("_Maiduan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MAIDUAN; + if ("x-MAI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMAI; + if ("x-NMU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNMU; + if ("x-NSZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNSZ; + if ("_PlateauPenutian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PLATEAUPENUTIAN; + if ("_Sahaptian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SAHAPTIAN; + if ("x-UMA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XUMA; + if ("x-WAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAA; + if ("x-WAR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAR; + if ("x-YAK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYAK; + if ("x-KLA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKLA; + if ("x-NEZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNEZ; + if ("_Takelman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TAKELMAN; + if ("_Kalapuyan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KALAPUYAN; + if ("x-KAL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAL; + if ("_Tsimshianic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TSIMSHIANIC; + if ("x-TSI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTSI; + if ("_Utian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UTIAN; + if ("_Miwokan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MIWOKAN; + if ("_EasternMiwok".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNMIWOK; + if ("x-CSM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCSM; + if ("x-NSQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNSQ; + if ("x-PMW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPMW; + if ("x-SKD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSKD; + if ("_WesternMiwok".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNMIWOK; + if ("x-CSI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCSI; + if ("x-LMW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLMW; + if ("_Wintuan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WINTUAN; + if ("x-WIT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIT; + if ("_Yokutsan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YOKUTSAN; + if ("x-ENH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XENH; + if ("x-GSH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XGSH; + if ("x-PYL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPYL; + if ("x-TKH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTKH; + if ("_Pidgin".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PIDGIN; + if ("x-CHH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHH; + if ("_Salishan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SALISHAN; + if ("_CentralSalish".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALSALISH; + if ("x-CLM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCLM; + if ("x-LUT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLUT; + if ("x-STR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSTR; + if ("_InteriorSalish".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._INTERIORSALISH; + if ("x-COL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOL; + if ("x-CRD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRD; + if ("x-FLA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XFLA; + if ("x-OKA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOKA; + if ("_Tsamosan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TSAMOSAN; + if ("x-CEA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCEA; + if ("x-CJH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCJH; + if ("x-COW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOW; + if ("x-QUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUN; + if ("_SiouanCatawba".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIOUANCATAWBA; + if ("_Siouan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIOUAN; + if ("_MississippiValley".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MISSISSIPPIVALLEY; + if ("_ChiwereWinnebago".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHIWEREWINNEBAGO; + if ("x-IOW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XIOW; + if ("x-WIN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIN; + if ("_Dakotan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DAKOTAN; + if ("x-ASB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XASB; + if ("x-DHG".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDHG; + if ("x-LKT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLKT; + if ("x-NKT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNKT; + if ("_Dhegiha".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DHEGIHA; + if ("x-KAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAA; + if ("x-OMA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOMA; + if ("x-OSA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOSA; + if ("x-QUA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUA; + if ("_MissouriRiver".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MISSOURIRIVER; + if ("x-CRO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRO; + if ("x-HID".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHID; + if ("x-MHQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMHQ; + if ("_UtoAztecan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UTOAZTECAN; + if ("_Numic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NUMIC; + if ("_CentralNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALNUMIC; + if ("x-COM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOM; + if ("x-PAR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAR; + if ("x-SHH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSHH; + if ("_SouthernNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNNUMIC; + if ("x-KAW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAW; + if ("x-UTE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XUTE; + if ("_WesternNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNNUMIC; + if ("x-MON".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMON; + if ("x-PAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAO; + if ("_Takic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TAKIC; + if ("_Cupan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CUPAN; + if ("x-CHL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHL; + if ("x-CUP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCUP; + if ("x-LUI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLUI; + if ("_SerranoGabrielino".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SERRANOGABRIELINO; + if ("x-SER".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSER; + if ("_Taracahitan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TARACAHITAN; + if ("_Cahitan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CAHITAN; + if ("x-YAQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYAQ; + if ("_Tepiman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TEPIMAN; + if ("x-PAP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAP; + if ("x-HOP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHOP; + if ("x-TUB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUB; + if ("_Wakashan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WAKASHAN; + if ("_Nootkan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NOOTKAN; + if ("x-MYH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMYH; + if ("_Yukian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YUKIAN; + if ("x-WAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAO; + if ("x-YUK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUK; + if ("x-HAI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHAI; + if ("x-KUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUN; + if ("x-PSD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPSD; + if ("x-YUC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUC; + if ("x-ZUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XZUN; + throw new IllegalArgumentException("Unknown V3AmericanIndianAlaskaNativeLanguages code '"+codeString+"'"); + } + + public String toCode(V3AmericanIndianAlaskaNativeLanguages code) { + if (code == V3AmericanIndianAlaskaNativeLanguages._ALGIC) + return "_Algic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ALGONQUIAN) + return "_Algonquian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ARAPAHOAN) + return "_Arapahoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ARAPAHOGROSVENTRE) + return "_ArapahoGrosVentre"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XARP) + return "x-ARP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XATS) + return "x-ATS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CREEMONTAGNAIS) + return "_CreeMontagnais"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CREE) + return "_Cree"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRP) + return "x-CRP"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNALGONQUIN) + return "_EasternAlgonquin"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ABENAKIAN) + return "_Abenakian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAAQ) + return "x-AAQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XABE) + return "x-ABE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMAC) + return "x-MAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DELAWARAN) + return "_Delawaran"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDEL) + return "x-DEL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMIC) + return "x-MIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._OJIBWAYAN) + return "_Ojibwayan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOJB) + return "x-OJB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPOT) + return "x-POT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SAUKFOXKICKAPOO) + return "_SaukFoxKickapoo"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKIC) + return "x-KIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSAC) + return "x-SAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSJW) + return "x-SJW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XBLC) + return "x-BLC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHY) + return "x-CHY"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMEZ) + return "x-MEZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._RITWAN) + return "_Ritwan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUR) + return "x-YUR"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CADDOAN) + return "_Caddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NORTHERNCADDOAN) + return "_NorthernCaddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XARI) + return "x-ARI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAW) + return "x-PAW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIC) + return "x-WIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNCADDOAN) + return "_SouthernCaddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCAD) + return "x-CAD"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHIMAKUAN) + return "_Chimakuan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUI) + return "x-QUI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ESKIMOALEUT) + return "_EskimoAleut"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ALEUT) + return "_Aleut"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XALW) + return "x-ALW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ESKIMOAN) + return "_Eskimoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._INUITINUPIAQ) + return "_InuitInupiaq"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESI) + return "x-ESI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESK) + return "x-ESK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIRENIKSKIYUPIK) + return "_SirenikskiYupik"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XEMS) + return "x-EMS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESS) + return "x-ESS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESU) + return "x-ESU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._HOKAN) + return "_Hokan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._COCHIMIYUMAN) + return "_CochimiYuman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YUMAN) + return "_Yuman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DELTACALIFORNIA) + return "_DeltaCalifornia"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DIEGUENO) + return "_Diegueno"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDIH) + return "x-DIH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOC) + return "x-COC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PAI) + return "_Pai"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUF) + return "x-YUF"; + if (code == V3AmericanIndianAlaskaNativeLanguages._RIVER) + return "_River"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMOV) + return "x-MOV"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMRC) + return "x-MRC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUM) + return "x-YUM"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PALAIHNIHAN) + return "_Palaihnihan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XACH) + return "x-ACH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XATW) + return "x-ATW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._POMOAN) + return "_Pomoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKJU) + return "x-KJU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEF) + return "x-PEF"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEO) + return "x-PEO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEQ) + return "x-PEQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPOO) + return "x-POO"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SHASTA) + return "_Shasta"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSHT) + return "x-SHT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKYH) + return "x-KYH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAS) + return "x-WAS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._IROQUOIAN) + return "_Iroquoian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NORTHERNIROQUOIAN) + return "_NorthernIroquoian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCAY) + return "x-CAY"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMOH) + return "x-MOH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XONE) + return "x-ONE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XONO) + return "x-ONO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSEE) + return "x-SEE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUS) + return "x-TUS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCER) + return "x-CER"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KERESAN) + return "_Keresan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKEE) + return "x-KEE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKJQ) + return "x-KJQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KIOWATANOAN) + return "_KiowaTanoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TIWA) + return "_Tiwa"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAO) + return "x-TAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTIX) + return "x-TIX"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKIO) + return "x-KIO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTEW) + return "x-TEW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTOW) + return "x-TOW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MUSKOGEAN) + return "_Muskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALMUSKOGEAN) + return "_CentralMuskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAKZ) + return "x-AKZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCKU) + return "x-CKU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMIK) + return "x-MIK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNMUSKOGEAN) + return "_WesternMuskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCCT) + return "x-CCT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCIC) + return "x-CIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRK) + return "x-CRK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NADENE) + return "_Nadene"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ATHAPASKANEYAK) + return "_AthapaskanEyak"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ATHAPASKAN) + return "_Athapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._APACHEAN) + return "_Apachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNAPACHEAN) + return "_EasternApachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPJ) + return "x-APJ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPL) + return "x-APL"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNAPACHEAN) + return "_WesternApachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPM) + return "x-APM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPW) + return "x-APW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNAV) + return "x-NAV"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPK) + return "x-APK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALALASKAYUKON) + return "_CentralAlaskaYukon"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KOYUKONINGALIK) + return "_KoyukonIngalik"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHOI) + return "x-HOI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XING) + return "x-ING"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKOY) + return "x-KOY"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KUTCHINHAN) + return "_KutchinHan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHAA) + return "x-HAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUC) + return "x-KUC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TANANATUTCHONE) + return "_TananaTutchone"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TANANA) + return "_Tanana"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAA) + return "x-TAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAU) + return "x-TAU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTCB) + return "x-TCB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUU) + return "x-KUU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PACIFICCOASTATHAPASKAN) + return "_PacificCoastAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CALIFORNIAATHAPASKAN) + return "_CaliforniaAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHUP) + return "x-HUP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKTW) + return "x-KTW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._OREGONATHAPASKAN) + return "_OregonAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTOL) + return "x-TOL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUU) + return "x-TUU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNALASKA) + return "_SouthernAlaska"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAHT) + return "x-AHT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTFN) + return "x-TFN"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XEYA) + return "x-EYA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTLI) + return "x-TLI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PENUTIAN) + return "_Penutian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHINOOKAN) + return "_Chinookan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UPPERCHINOOK) + return "_UpperChinook"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAC) + return "x-WAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._COOSAN) + return "_Coosan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOS) + return "x-COS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MAIDUAN) + return "_Maiduan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMAI) + return "x-MAI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNMU) + return "x-NMU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNSZ) + return "x-NSZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PLATEAUPENUTIAN) + return "_PlateauPenutian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SAHAPTIAN) + return "_Sahaptian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XUMA) + return "x-UMA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAA) + return "x-WAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAR) + return "x-WAR"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYAK) + return "x-YAK"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKLA) + return "x-KLA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNEZ) + return "x-NEZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TAKELMAN) + return "_Takelman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KALAPUYAN) + return "_Kalapuyan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAL) + return "x-KAL"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TSIMSHIANIC) + return "_Tsimshianic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTSI) + return "x-TSI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UTIAN) + return "_Utian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MIWOKAN) + return "_Miwokan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNMIWOK) + return "_EasternMiwok"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCSM) + return "x-CSM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNSQ) + return "x-NSQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPMW) + return "x-PMW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSKD) + return "x-SKD"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNMIWOK) + return "_WesternMiwok"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCSI) + return "x-CSI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLMW) + return "x-LMW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WINTUAN) + return "_Wintuan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIT) + return "x-WIT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YOKUTSAN) + return "_Yokutsan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XENH) + return "x-ENH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XGSH) + return "x-GSH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPYL) + return "x-PYL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTKH) + return "x-TKH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PIDGIN) + return "_Pidgin"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHH) + return "x-CHH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SALISHAN) + return "_Salishan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALSALISH) + return "_CentralSalish"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCLM) + return "x-CLM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLUT) + return "x-LUT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSTR) + return "x-STR"; + if (code == V3AmericanIndianAlaskaNativeLanguages._INTERIORSALISH) + return "_InteriorSalish"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOL) + return "x-COL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRD) + return "x-CRD"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XFLA) + return "x-FLA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOKA) + return "x-OKA"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TSAMOSAN) + return "_Tsamosan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCEA) + return "x-CEA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCJH) + return "x-CJH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOW) + return "x-COW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUN) + return "x-QUN"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIOUANCATAWBA) + return "_SiouanCatawba"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIOUAN) + return "_Siouan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MISSISSIPPIVALLEY) + return "_MississippiValley"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHIWEREWINNEBAGO) + return "_ChiwereWinnebago"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XIOW) + return "x-IOW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIN) + return "x-WIN"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DAKOTAN) + return "_Dakotan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XASB) + return "x-ASB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDHG) + return "x-DHG"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLKT) + return "x-LKT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNKT) + return "x-NKT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DHEGIHA) + return "_Dhegiha"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAA) + return "x-KAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOMA) + return "x-OMA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOSA) + return "x-OSA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUA) + return "x-QUA"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MISSOURIRIVER) + return "_MissouriRiver"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRO) + return "x-CRO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHID) + return "x-HID"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMHQ) + return "x-MHQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UTOAZTECAN) + return "_UtoAztecan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NUMIC) + return "_Numic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALNUMIC) + return "_CentralNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOM) + return "x-COM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAR) + return "x-PAR"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSHH) + return "x-SHH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNNUMIC) + return "_SouthernNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAW) + return "x-KAW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XUTE) + return "x-UTE"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNNUMIC) + return "_WesternNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMON) + return "x-MON"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAO) + return "x-PAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TAKIC) + return "_Takic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CUPAN) + return "_Cupan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHL) + return "x-CHL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCUP) + return "x-CUP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLUI) + return "x-LUI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SERRANOGABRIELINO) + return "_SerranoGabrielino"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSER) + return "x-SER"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TARACAHITAN) + return "_Taracahitan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CAHITAN) + return "_Cahitan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYAQ) + return "x-YAQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TEPIMAN) + return "_Tepiman"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAP) + return "x-PAP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHOP) + return "x-HOP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUB) + return "x-TUB"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WAKASHAN) + return "_Wakashan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NOOTKAN) + return "_Nootkan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMYH) + return "x-MYH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YUKIAN) + return "_Yukian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAO) + return "x-WAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUK) + return "x-YUK"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHAI) + return "x-HAI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUN) + return "x-KUN"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPSD) + return "x-PSD"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUC) + return "x-YUC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XZUN) + return "x-ZUN"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Calendar.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Calendar.java new file mode 100644 index 00000000000..158ebae6710 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Calendar.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Calendar { + + /** + * The Gregorian calendar is the calendar in effect in most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar. + */ + GREG, + /** + * added to help the parsers + */ + NULL; + public static V3Calendar fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return GREG; + throw new FHIRException("Unknown V3Calendar code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GREG: return "GREG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Calendar"; + } + public String getDefinition() { + switch (this) { + case GREG: return "The Gregorian calendar is the calendar in effect in most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GREG: return "Gregorian"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycle.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycle.java new file mode 100644 index 00000000000..5fd41f0738d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycle.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CalendarCycle { + + /** + * CalendarCycleOneLetter + */ + _CALENDARCYCLEONELETTER, + /** + * week (continuous) + */ + CW, + /** + * year + */ + CY, + /** + * day of the month + */ + D, + /** + * day of the week (begins with Monday) + */ + DW, + /** + * hour of the day + */ + H, + /** + * month of the year + */ + M, + /** + * minute of the hour + */ + N, + /** + * second of the minute + */ + S, + /** + * CalendarCycleTwoLetter + */ + _CALENDARCYCLETWOLETTER, + /** + * day (continuous) + */ + CD, + /** + * hour (continuous) + */ + CH, + /** + * month (continuous) + */ + CM, + /** + * minute (continuous) + */ + CN, + /** + * second (continuous) + */ + CS, + /** + * day of the year + */ + DY, + /** + * week of the year + */ + WY, + /** + * The week with the month's first Thursday in it (analagous to the ISO 8601 definition for week of the year). + */ + WM, + /** + * added to help the parsers + */ + NULL; + public static V3CalendarCycle fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_CalendarCycleOneLetter".equals(codeString)) + return _CALENDARCYCLEONELETTER; + if ("CW".equals(codeString)) + return CW; + if ("CY".equals(codeString)) + return CY; + if ("D".equals(codeString)) + return D; + if ("DW".equals(codeString)) + return DW; + if ("H".equals(codeString)) + return H; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("_CalendarCycleTwoLetter".equals(codeString)) + return _CALENDARCYCLETWOLETTER; + if ("CD".equals(codeString)) + return CD; + if ("CH".equals(codeString)) + return CH; + if ("CM".equals(codeString)) + return CM; + if ("CN".equals(codeString)) + return CN; + if ("CS".equals(codeString)) + return CS; + if ("DY".equals(codeString)) + return DY; + if ("WY".equals(codeString)) + return WY; + if ("WM".equals(codeString)) + return WM; + throw new FHIRException("Unknown V3CalendarCycle code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "_CalendarCycleOneLetter"; + case CW: return "CW"; + case CY: return "CY"; + case D: return "D"; + case DW: return "DW"; + case H: return "H"; + case M: return "M"; + case N: return "N"; + case S: return "S"; + case _CALENDARCYCLETWOLETTER: return "_CalendarCycleTwoLetter"; + case CD: return "CD"; + case CH: return "CH"; + case CM: return "CM"; + case CN: return "CN"; + case CS: return "CS"; + case DY: return "DY"; + case WY: return "WY"; + case WM: return "WM"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CalendarCycle"; + } + public String getDefinition() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "CalendarCycleOneLetter"; + case CW: return "week (continuous)"; + case CY: return "year"; + case D: return "day of the month"; + case DW: return "day of the week (begins with Monday)"; + case H: return "hour of the day"; + case M: return "month of the year"; + case N: return "minute of the hour"; + case S: return "second of the minute"; + case _CALENDARCYCLETWOLETTER: return "CalendarCycleTwoLetter"; + case CD: return "day (continuous)"; + case CH: return "hour (continuous)"; + case CM: return "month (continuous)"; + case CN: return "minute (continuous)"; + case CS: return "second (continuous)"; + case DY: return "day of the year"; + case WY: return "week of the year"; + case WM: return "The week with the month's first Thursday in it (analagous to the ISO 8601 definition for week of the year)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "CalendarCycleOneLetter"; + case CW: return "week (continuous)"; + case CY: return "year"; + case D: return "day of the month"; + case DW: return "day of the week (begins with Monday)"; + case H: return "hour of the day"; + case M: return "month of the year"; + case N: return "minute of the hour"; + case S: return "second of the minute"; + case _CALENDARCYCLETWOLETTER: return "CalendarCycleTwoLetter"; + case CD: return "day (continuous)"; + case CH: return "hour (continuous)"; + case CM: return "month (continuous)"; + case CN: return "minute (continuous)"; + case CS: return "second (continuous)"; + case DY: return "day of the year"; + case WY: return "week of the year"; + case WM: return "week of the month"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycleEnumFactory.java new file mode 100644 index 00000000000..306e70d0cbb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarCycleEnumFactory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CalendarCycleEnumFactory implements EnumFactory { + + public V3CalendarCycle fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_CalendarCycleOneLetter".equals(codeString)) + return V3CalendarCycle._CALENDARCYCLEONELETTER; + if ("CW".equals(codeString)) + return V3CalendarCycle.CW; + if ("CY".equals(codeString)) + return V3CalendarCycle.CY; + if ("D".equals(codeString)) + return V3CalendarCycle.D; + if ("DW".equals(codeString)) + return V3CalendarCycle.DW; + if ("H".equals(codeString)) + return V3CalendarCycle.H; + if ("M".equals(codeString)) + return V3CalendarCycle.M; + if ("N".equals(codeString)) + return V3CalendarCycle.N; + if ("S".equals(codeString)) + return V3CalendarCycle.S; + if ("_CalendarCycleTwoLetter".equals(codeString)) + return V3CalendarCycle._CALENDARCYCLETWOLETTER; + if ("CD".equals(codeString)) + return V3CalendarCycle.CD; + if ("CH".equals(codeString)) + return V3CalendarCycle.CH; + if ("CM".equals(codeString)) + return V3CalendarCycle.CM; + if ("CN".equals(codeString)) + return V3CalendarCycle.CN; + if ("CS".equals(codeString)) + return V3CalendarCycle.CS; + if ("DY".equals(codeString)) + return V3CalendarCycle.DY; + if ("WY".equals(codeString)) + return V3CalendarCycle.WY; + if ("WM".equals(codeString)) + return V3CalendarCycle.WM; + throw new IllegalArgumentException("Unknown V3CalendarCycle code '"+codeString+"'"); + } + + public String toCode(V3CalendarCycle code) { + if (code == V3CalendarCycle._CALENDARCYCLEONELETTER) + return "_CalendarCycleOneLetter"; + if (code == V3CalendarCycle.CW) + return "CW"; + if (code == V3CalendarCycle.CY) + return "CY"; + if (code == V3CalendarCycle.D) + return "D"; + if (code == V3CalendarCycle.DW) + return "DW"; + if (code == V3CalendarCycle.H) + return "H"; + if (code == V3CalendarCycle.M) + return "M"; + if (code == V3CalendarCycle.N) + return "N"; + if (code == V3CalendarCycle.S) + return "S"; + if (code == V3CalendarCycle._CALENDARCYCLETWOLETTER) + return "_CalendarCycleTwoLetter"; + if (code == V3CalendarCycle.CD) + return "CD"; + if (code == V3CalendarCycle.CH) + return "CH"; + if (code == V3CalendarCycle.CM) + return "CM"; + if (code == V3CalendarCycle.CN) + return "CN"; + if (code == V3CalendarCycle.CS) + return "CS"; + if (code == V3CalendarCycle.DY) + return "DY"; + if (code == V3CalendarCycle.WY) + return "WY"; + if (code == V3CalendarCycle.WM) + return "WM"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarEnumFactory.java new file mode 100644 index 00000000000..94339167879 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CalendarEnumFactory implements EnumFactory { + + public V3Calendar fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return V3Calendar.GREG; + throw new IllegalArgumentException("Unknown V3Calendar code '"+codeString+"'"); + } + + public String toCode(V3Calendar code) { + if (code == V3Calendar.GREG) + return "GREG"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarType.java new file mode 100644 index 00000000000..336cb3439c9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarType.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CalendarType { + + /** + * The Gregorian calendar is in effect in the most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar. + */ + GREG, + /** + * added to help the parsers + */ + NULL; + public static V3CalendarType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return GREG; + throw new FHIRException("Unknown V3CalendarType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GREG: return "GREG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CalendarType"; + } + public String getDefinition() { + switch (this) { + case GREG: return "The Gregorian calendar is in effect in the most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GREG: return "Gregorian"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarTypeEnumFactory.java new file mode 100644 index 00000000000..8130c31ad22 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CalendarTypeEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CalendarTypeEnumFactory implements EnumFactory { + + public V3CalendarType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return V3CalendarType.GREG; + throw new IllegalArgumentException("Unknown V3CalendarType code '"+codeString+"'"); + } + + public String toCode(V3CalendarType code) { + if (code == V3CalendarType.GREG) + return "GREG"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Charset.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Charset.java new file mode 100644 index 00000000000..a21f9116c41 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Charset.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Charset { + + /** + * HL7 is indifferent to the use of this Charset. + */ + EBCDIC, + /** + * Deprecated for HL7 use. + */ + ISO10646UCS2, + /** + * Deprecated for HL7 use. + */ + ISO10646UCS4, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88591, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88592, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88595, + /** + * HL7 is indifferent to the use of this Charset. + */ + JIS2022JP, + /** + * Required for HL7 use. + */ + USASCII, + /** + * HL7 is indifferent to the use of this Charset. + */ + UTF7, + /** + * Required for Unicode support. + */ + UTF8, + /** + * added to help the parsers + */ + NULL; + public static V3Charset fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EBCDIC".equals(codeString)) + return EBCDIC; + if ("ISO-10646-UCS-2".equals(codeString)) + return ISO10646UCS2; + if ("ISO-10646-UCS-4".equals(codeString)) + return ISO10646UCS4; + if ("ISO-8859-1".equals(codeString)) + return ISO88591; + if ("ISO-8859-2".equals(codeString)) + return ISO88592; + if ("ISO-8859-5".equals(codeString)) + return ISO88595; + if ("JIS-2022-JP".equals(codeString)) + return JIS2022JP; + if ("US-ASCII".equals(codeString)) + return USASCII; + if ("UTF-7".equals(codeString)) + return UTF7; + if ("UTF-8".equals(codeString)) + return UTF8; + throw new FHIRException("Unknown V3Charset code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EBCDIC: return "EBCDIC"; + case ISO10646UCS2: return "ISO-10646-UCS-2"; + case ISO10646UCS4: return "ISO-10646-UCS-4"; + case ISO88591: return "ISO-8859-1"; + case ISO88592: return "ISO-8859-2"; + case ISO88595: return "ISO-8859-5"; + case JIS2022JP: return "JIS-2022-JP"; + case USASCII: return "US-ASCII"; + case UTF7: return "UTF-7"; + case UTF8: return "UTF-8"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Charset"; + } + public String getDefinition() { + switch (this) { + case EBCDIC: return "HL7 is indifferent to the use of this Charset."; + case ISO10646UCS2: return "Deprecated for HL7 use."; + case ISO10646UCS4: return "Deprecated for HL7 use."; + case ISO88591: return "HL7 is indifferent to the use of this Charset."; + case ISO88592: return "HL7 is indifferent to the use of this Charset."; + case ISO88595: return "HL7 is indifferent to the use of this Charset."; + case JIS2022JP: return "HL7 is indifferent to the use of this Charset."; + case USASCII: return "Required for HL7 use."; + case UTF7: return "HL7 is indifferent to the use of this Charset."; + case UTF8: return "Required for Unicode support."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EBCDIC: return "EBCDIC"; + case ISO10646UCS2: return "ISO-10646-UCS-2"; + case ISO10646UCS4: return "ISO-10646-UCS-4"; + case ISO88591: return "ISO-8859-1"; + case ISO88592: return "ISO-8859-2"; + case ISO88595: return "ISO-8859-5"; + case JIS2022JP: return "JIS-2022-JP"; + case USASCII: return "US-ASCII"; + case UTF7: return "UTF-7"; + case UTF8: return "UTF-8"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CharsetEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CharsetEnumFactory.java new file mode 100644 index 00000000000..07967eba61b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CharsetEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CharsetEnumFactory implements EnumFactory { + + public V3Charset fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EBCDIC".equals(codeString)) + return V3Charset.EBCDIC; + if ("ISO-10646-UCS-2".equals(codeString)) + return V3Charset.ISO10646UCS2; + if ("ISO-10646-UCS-4".equals(codeString)) + return V3Charset.ISO10646UCS4; + if ("ISO-8859-1".equals(codeString)) + return V3Charset.ISO88591; + if ("ISO-8859-2".equals(codeString)) + return V3Charset.ISO88592; + if ("ISO-8859-5".equals(codeString)) + return V3Charset.ISO88595; + if ("JIS-2022-JP".equals(codeString)) + return V3Charset.JIS2022JP; + if ("US-ASCII".equals(codeString)) + return V3Charset.USASCII; + if ("UTF-7".equals(codeString)) + return V3Charset.UTF7; + if ("UTF-8".equals(codeString)) + return V3Charset.UTF8; + throw new IllegalArgumentException("Unknown V3Charset code '"+codeString+"'"); + } + + public String toCode(V3Charset code) { + if (code == V3Charset.EBCDIC) + return "EBCDIC"; + if (code == V3Charset.ISO10646UCS2) + return "ISO-10646-UCS-2"; + if (code == V3Charset.ISO10646UCS4) + return "ISO-10646-UCS-4"; + if (code == V3Charset.ISO88591) + return "ISO-8859-1"; + if (code == V3Charset.ISO88592) + return "ISO-8859-2"; + if (code == V3Charset.ISO88595) + return "ISO-8859-5"; + if (code == V3Charset.JIS2022JP) + return "JIS-2022-JP"; + if (code == V3Charset.USASCII) + return "US-ASCII"; + if (code == V3Charset.UTF7) + return "UTF-7"; + if (code == V3Charset.UTF8) + return "UTF-8"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationale.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationale.java new file mode 100644 index 00000000000..a7f43f90e2c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationale.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CodingRationale { + + /** + * Description: Originally produced code. + */ + O, + /** + * Originally produced code, required by the specification describing the use of the coded concept. + */ + OR, + /** + * Description: Post-coded from free text source + */ + P, + /** + * Post-coded from free text source, required by the specification describing the use of the coded concept. + */ + PR, + /** + * Description: Required standard code for HL7. + */ + R, + /** + * HL7 Specified or Mandated + */ + HL7, + /** + * Both HL7 mandated and the original code (precoordination) + */ + SH, + /** + * Source (or original) code + */ + SRC, + /** + * added to help the parsers + */ + NULL; + public static V3CodingRationale fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("O".equals(codeString)) + return O; + if ("OR".equals(codeString)) + return OR; + if ("P".equals(codeString)) + return P; + if ("PR".equals(codeString)) + return PR; + if ("R".equals(codeString)) + return R; + if ("HL7".equals(codeString)) + return HL7; + if ("SH".equals(codeString)) + return SH; + if ("SRC".equals(codeString)) + return SRC; + throw new FHIRException("Unknown V3CodingRationale code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case O: return "O"; + case OR: return "OR"; + case P: return "P"; + case PR: return "PR"; + case R: return "R"; + case HL7: return "HL7"; + case SH: return "SH"; + case SRC: return "SRC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CodingRationale"; + } + public String getDefinition() { + switch (this) { + case O: return "Description: Originally produced code."; + case OR: return "Originally produced code, required by the specification describing the use of the coded concept."; + case P: return "Description: Post-coded from free text source"; + case PR: return "Post-coded from free text source, required by the specification describing the use of the coded concept."; + case R: return "Description: Required standard code for HL7."; + case HL7: return "HL7 Specified or Mandated"; + case SH: return "Both HL7 mandated and the original code (precoordination)"; + case SRC: return "Source (or original) code"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case O: return "originally produced code"; + case OR: return "original and required"; + case P: return "post-coded"; + case PR: return "post-coded and required"; + case R: return "required"; + case HL7: return "HL7 Specified or Mandated"; + case SH: return "Both HL7 mandated and the original code"; + case SRC: return "Source (or original) code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationaleEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationaleEnumFactory.java new file mode 100644 index 00000000000..079f8060d1a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CodingRationaleEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CodingRationaleEnumFactory implements EnumFactory { + + public V3CodingRationale fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("O".equals(codeString)) + return V3CodingRationale.O; + if ("OR".equals(codeString)) + return V3CodingRationale.OR; + if ("P".equals(codeString)) + return V3CodingRationale.P; + if ("PR".equals(codeString)) + return V3CodingRationale.PR; + if ("R".equals(codeString)) + return V3CodingRationale.R; + if ("HL7".equals(codeString)) + return V3CodingRationale.HL7; + if ("SH".equals(codeString)) + return V3CodingRationale.SH; + if ("SRC".equals(codeString)) + return V3CodingRationale.SRC; + throw new IllegalArgumentException("Unknown V3CodingRationale code '"+codeString+"'"); + } + + public String toCode(V3CodingRationale code) { + if (code == V3CodingRationale.O) + return "O"; + if (code == V3CodingRationale.OR) + return "OR"; + if (code == V3CodingRationale.P) + return "P"; + if (code == V3CodingRationale.PR) + return "PR"; + if (code == V3CodingRationale.R) + return "R"; + if (code == V3CodingRationale.HL7) + return "HL7"; + if (code == V3CodingRationale.SH) + return "SH"; + if (code == V3CodingRationale.SRC) + return "SRC"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionType.java new file mode 100644 index 00000000000..3b53c67ea33 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CommunicationFunctionType { + + /** + * The entity is the receiver of the transmission. + */ + RCV, + /** + * The entity is the one to which the response or reply to the transmission should be sent. + */ + RSP, + /** + * The entity is the sender of the transmission. + */ + SND, + /** + * added to help the parsers + */ + NULL; + public static V3CommunicationFunctionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("RCV".equals(codeString)) + return RCV; + if ("RSP".equals(codeString)) + return RSP; + if ("SND".equals(codeString)) + return SND; + throw new FHIRException("Unknown V3CommunicationFunctionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RCV: return "RCV"; + case RSP: return "RSP"; + case SND: return "SND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CommunicationFunctionType"; + } + public String getDefinition() { + switch (this) { + case RCV: return "The entity is the receiver of the transmission."; + case RSP: return "The entity is the one to which the response or reply to the transmission should be sent."; + case SND: return "The entity is the sender of the transmission."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RCV: return "receiver"; + case RSP: return "respond to"; + case SND: return "sender"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionTypeEnumFactory.java new file mode 100644 index 00000000000..37d86f7feec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CommunicationFunctionTypeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CommunicationFunctionTypeEnumFactory implements EnumFactory { + + public V3CommunicationFunctionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("RCV".equals(codeString)) + return V3CommunicationFunctionType.RCV; + if ("RSP".equals(codeString)) + return V3CommunicationFunctionType.RSP; + if ("SND".equals(codeString)) + return V3CommunicationFunctionType.SND; + throw new IllegalArgumentException("Unknown V3CommunicationFunctionType code '"+codeString+"'"); + } + + public String toCode(V3CommunicationFunctionType code) { + if (code == V3CommunicationFunctionType.RCV) + return "RCV"; + if (code == V3CommunicationFunctionType.RSP) + return "RSP"; + if (code == V3CommunicationFunctionType.SND) + return "SND"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithm.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithm.java new file mode 100644 index 00000000000..ab0f31e5f01 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithm.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CompressionAlgorithm { + + /** + * bzip-2 compression format. See [http://www.bzip.org/] for more information. + */ + BZ, + /** + * The deflate compressed data format as specified in RFC 1951 [http://www.ietf.org/rfc/rfc1951.txt]. + */ + DF, + /** + * A compressed data format that is compatible with the widely used GZIP utility as specified in RFC 1952 [http://www.ietf.org/rfc/rfc1952.txt] (uses the deflate algorithm). + */ + GZ, + /** + * Original UNIX compress algorithm and file format using the LZC algorithm (a variant of LZW). Patent encumbered and less efficient than deflate. + */ + Z, + /** + * 7z compression file format. See [http://www.7-zip.org/7z.html] for more information. + */ + Z7, + /** + * A compressed data format that also uses the deflate algorithm. Specified as RFC 1950 [http://www.ietf.org/rfc/rfc1952.txt] + */ + ZL, + /** + * added to help the parsers + */ + NULL; + public static V3CompressionAlgorithm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BZ".equals(codeString)) + return BZ; + if ("DF".equals(codeString)) + return DF; + if ("GZ".equals(codeString)) + return GZ; + if ("Z".equals(codeString)) + return Z; + if ("Z7".equals(codeString)) + return Z7; + if ("ZL".equals(codeString)) + return ZL; + throw new FHIRException("Unknown V3CompressionAlgorithm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BZ: return "BZ"; + case DF: return "DF"; + case GZ: return "GZ"; + case Z: return "Z"; + case Z7: return "Z7"; + case ZL: return "ZL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CompressionAlgorithm"; + } + public String getDefinition() { + switch (this) { + case BZ: return "bzip-2 compression format. See [http://www.bzip.org/] for more information."; + case DF: return "The deflate compressed data format as specified in RFC 1951 [http://www.ietf.org/rfc/rfc1951.txt]."; + case GZ: return "A compressed data format that is compatible with the widely used GZIP utility as specified in RFC 1952 [http://www.ietf.org/rfc/rfc1952.txt] (uses the deflate algorithm)."; + case Z: return "Original UNIX compress algorithm and file format using the LZC algorithm (a variant of LZW). Patent encumbered and less efficient than deflate."; + case Z7: return "7z compression file format. See [http://www.7-zip.org/7z.html] for more information."; + case ZL: return "A compressed data format that also uses the deflate algorithm. Specified as RFC 1950 [http://www.ietf.org/rfc/rfc1952.txt]"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BZ: return "bzip"; + case DF: return "deflate"; + case GZ: return "gzip"; + case Z: return "compress"; + case Z7: return "Z7"; + case ZL: return "zlib"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithmEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithmEnumFactory.java new file mode 100644 index 00000000000..d05f3d4660a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3CompressionAlgorithmEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3CompressionAlgorithmEnumFactory implements EnumFactory { + + public V3CompressionAlgorithm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BZ".equals(codeString)) + return V3CompressionAlgorithm.BZ; + if ("DF".equals(codeString)) + return V3CompressionAlgorithm.DF; + if ("GZ".equals(codeString)) + return V3CompressionAlgorithm.GZ; + if ("Z".equals(codeString)) + return V3CompressionAlgorithm.Z; + if ("Z7".equals(codeString)) + return V3CompressionAlgorithm.Z7; + if ("ZL".equals(codeString)) + return V3CompressionAlgorithm.ZL; + throw new IllegalArgumentException("Unknown V3CompressionAlgorithm code '"+codeString+"'"); + } + + public String toCode(V3CompressionAlgorithm code) { + if (code == V3CompressionAlgorithm.BZ) + return "BZ"; + if (code == V3CompressionAlgorithm.DF) + return "DF"; + if (code == V3CompressionAlgorithm.GZ) + return "GZ"; + if (code == V3CompressionAlgorithm.Z) + return "Z"; + if (code == V3CompressionAlgorithm.Z7) + return "Z7"; + if (code == V3CompressionAlgorithm.ZL) + return "ZL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Confidentiality.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Confidentiality.java new file mode 100644 index 00000000000..3b1523d57bf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Confidentiality.java @@ -0,0 +1,339 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Confidentiality { + + /** + * A specializable code and its leaf codes used in Confidentiality value sets to value the Act.Confidentiality and Role.Confidentiality attribute in accordance with the definition for concept domain "Confidentiality". + */ + _CONFIDENTIALITY, + /** + * Definition: Privacy metadata indicating that the information has been de-identified, and there are mitigating circumstances that prevent re-identification, which minimize risk of harm from unauthorized disclosure. The information requires protection to maintain low sensitivity. + + + Examples: Includes anonymized, pseudonymized, or non-personally identifiable information such as HIPAA limited data sets. + + + Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management: RECORD_COMPONENTs that might need to be accessed by a wide range of administrative staff to manage the subject of care's access to health services. + + + Usage Note: This metadata indicates the receiver may have an obligation to comply with a data use agreement. + */ + L, + /** + * Definition: Privacy metadata indicating moderately sensitive information, which presents moderate risk of harm if disclosed without authorization. + + + Examples: Includes allergies of non-sensitive nature used inform food service; health information a patient authorizes to be used for marketing, released to a bank for a health credit card or savings account; or information in personal health record systems that are not governed under health privacy laws. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management: Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider range of personnel not all of whom are actively caring for the patient (e.g. radiology staff). + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with the receiver's terms of use or privacy policies. + */ + M, + /** + * Definition: Privacy metadata indicating that the information is typical, non-stigmatizing health information, which presents typical risk of harm if disclosed without authorization. + + + Examples: In the US, this includes what HIPAA identifies as the minimum necessary protected health information (PHI) given a covered purpose of use (treatment, payment, or operations). Includes typical, non-stigmatizing health information disclosed in an application for health, workers compensation, disability, or life insurance. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations. + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable jurisdictional privacy law or disclosure authorization. + */ + N, + /** + * Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment. + + + Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.. + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable, prevailing (default) jurisdictional privacy law or disclosure authorization.. + */ + R, + /** + * Definition: Privacy metadata indicating that the information is not classified as sensitive. + + + Examples: Includes publicly available information, e.g., business name, phone, email or physical address. + + + Usage Note: This metadata indicates that the receiver has no obligation to consider additional policies when making access control decisions. Note that in some jurisdictions, personally identifiable information must be protected as confidential, so it would not be appropriate to assign a confidentiality code of "unrestricted" to that information even if it is publicly available. + */ + U, + /** + * . Privacy metadata indicating that the information is extremely sensitive and likely stigmatizing health information that presents a very high risk if disclosed without authorization. This information must be kept in the highest confidence. + + + Examples: Includes information about a victim of abuse, patient requested information sensitivity, and taboo subjects relating to health status that must be discussed with the patient by an attending provider before sharing with the patient. May also include information held under “legal lock� or attorney-client privilege + + + Map: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject. + + + Usage Note: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject. + */ + V, + /** + * Description: By accessing subject / role and relationship based rights (These concepts are mutually exclusive, one and only one is required for a valid confidentiality coding.) + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYBYACCESSKIND, + /** + * Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related information may ever be of this confidentiality level. + + + Deprecation Comment: Replced by ActCode.B + */ + B, + /** + * Description: Only clinicians may see this item, billing and administration persons can not access this item without special permission. + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + D, + /** + * Description: Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor type code). + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + I, + /** + * Description: By information type, only for service catalog entries (multiples allowed). Not to be used with actual patient data! + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYBYINFOTYPE, + /** + * Description: Alcohol/drug-abuse related item + + + Deprecation Comment:Replced by ActCode.ETH + */ + ETH, + /** + * Description: HIV and AIDS related item + + + Deprecation Comment:Replced by ActCode.HIV + */ + HIV, + /** + * Description: Psychiatry related item + + + Deprecation Comment:Replced by ActCode.PSY + */ + PSY, + /** + * Description: Sexual assault / domestic violence related item + + + Deprecation Comment:Replced by ActCode.SDV + */ + SDV, + /** + * Description: Modifiers of role based access rights (multiple allowed) + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYMODIFIERS, + /** + * Description: Celebrities are people of public interest (VIP) including employees, whose information require special protection. + + + Deprecation Comment:Replced by ActCode.CEL + */ + C, + /** + * Description: + +Information for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared on patient's request. + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + S, + /** + * Description: Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only, example use is a new fatal diagnosis or finding, such as malignancy or HIV. + + + Deprecation Note:Replced by ActCode.TBOO + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3Confidentiality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Confidentiality".equals(codeString)) + return _CONFIDENTIALITY; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("U".equals(codeString)) + return U; + if ("V".equals(codeString)) + return V; + if ("_ConfidentialityByAccessKind".equals(codeString)) + return _CONFIDENTIALITYBYACCESSKIND; + if ("B".equals(codeString)) + return B; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("_ConfidentialityByInfoType".equals(codeString)) + return _CONFIDENTIALITYBYINFOTYPE; + if ("ETH".equals(codeString)) + return ETH; + if ("HIV".equals(codeString)) + return HIV; + if ("PSY".equals(codeString)) + return PSY; + if ("SDV".equals(codeString)) + return SDV; + if ("_ConfidentialityModifiers".equals(codeString)) + return _CONFIDENTIALITYMODIFIERS; + if ("C".equals(codeString)) + return C; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3Confidentiality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONFIDENTIALITY: return "_Confidentiality"; + case L: return "L"; + case M: return "M"; + case N: return "N"; + case R: return "R"; + case U: return "U"; + case V: return "V"; + case _CONFIDENTIALITYBYACCESSKIND: return "_ConfidentialityByAccessKind"; + case B: return "B"; + case D: return "D"; + case I: return "I"; + case _CONFIDENTIALITYBYINFOTYPE: return "_ConfidentialityByInfoType"; + case ETH: return "ETH"; + case HIV: return "HIV"; + case PSY: return "PSY"; + case SDV: return "SDV"; + case _CONFIDENTIALITYMODIFIERS: return "_ConfidentialityModifiers"; + case C: return "C"; + case S: return "S"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Confidentiality"; + } + public String getDefinition() { + switch (this) { + case _CONFIDENTIALITY: return "A specializable code and its leaf codes used in Confidentiality value sets to value the Act.Confidentiality and Role.Confidentiality attribute in accordance with the definition for concept domain \"Confidentiality\"."; + case L: return "Definition: Privacy metadata indicating that the information has been de-identified, and there are mitigating circumstances that prevent re-identification, which minimize risk of harm from unauthorized disclosure. The information requires protection to maintain low sensitivity.\r\n\n \n Examples: Includes anonymized, pseudonymized, or non-personally identifiable information such as HIPAA limited data sets.\r\n\n \n Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management: RECORD_COMPONENTs that might need to be accessed by a wide range of administrative staff to manage the subject of care's access to health services.\r\n\n \n Usage Note: This metadata indicates the receiver may have an obligation to comply with a data use agreement."; + case M: return "Definition: Privacy metadata indicating moderately sensitive information, which presents moderate risk of harm if disclosed without authorization.\r\n\n \n Examples: Includes allergies of non-sensitive nature used inform food service; health information a patient authorizes to be used for marketing, released to a bank for a health credit card or savings account; or information in personal health record systems that are not governed under health privacy laws.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management: Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider range of personnel not all of whom are actively caring for the patient (e.g. radiology staff).\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with the receiver's terms of use or privacy policies."; + case N: return "Definition: Privacy metadata indicating that the information is typical, non-stigmatizing health information, which presents typical risk of harm if disclosed without authorization.\r\n\n \n Examples: In the US, this includes what HIPAA identifies as the minimum necessary protected health information (PHI) given a covered purpose of use (treatment, payment, or operations). Includes typical, non-stigmatizing health information disclosed in an application for health, workers compensation, disability, or life insurance.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable jurisdictional privacy law or disclosure authorization."; + case R: return "Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment.\r\n\n \n Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations..\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable, prevailing (default) jurisdictional privacy law or disclosure authorization.."; + case U: return "Definition: Privacy metadata indicating that the information is not classified as sensitive.\r\n\n \n Examples: Includes publicly available information, e.g., business name, phone, email or physical address.\r\n\n \n Usage Note: This metadata indicates that the receiver has no obligation to consider additional policies when making access control decisions. Note that in some jurisdictions, personally identifiable information must be protected as confidential, so it would not be appropriate to assign a confidentiality code of \"unrestricted\" to that information even if it is publicly available."; + case V: return ". Privacy metadata indicating that the information is extremely sensitive and likely stigmatizing health information that presents a very high risk if disclosed without authorization. This information must be kept in the highest confidence. \r\n\n \n Examples: Includes information about a victim of abuse, patient requested information sensitivity, and taboo subjects relating to health status that must be discussed with the patient by an attending provider before sharing with the patient. May also include information held under “legal lock� or attorney-client privilege\r\n\n \n Map: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject.\r\n\n \n Usage Note: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject."; + case _CONFIDENTIALITYBYACCESSKIND: return "Description: By accessing subject / role and relationship based rights (These concepts are mutually exclusive, one and only one is required for a valid confidentiality coding.)\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case B: return "Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related information may ever be of this confidentiality level.\r\n\n \n Deprecation Comment: Replced by ActCode.B"; + case D: return "Description: Only clinicians may see this item, billing and administration persons can not access this item without special permission.\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case I: return "Description: Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor type code).\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case _CONFIDENTIALITYBYINFOTYPE: return "Description: By information type, only for service catalog entries (multiples allowed). Not to be used with actual patient data!\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case ETH: return "Description: Alcohol/drug-abuse related item\r\n\n \n Deprecation Comment:Replced by ActCode.ETH"; + case HIV: return "Description: HIV and AIDS related item\r\n\n \n Deprecation Comment:Replced by ActCode.HIV"; + case PSY: return "Description: Psychiatry related item\r\n\n \n Deprecation Comment:Replced by ActCode.PSY"; + case SDV: return "Description: Sexual assault / domestic violence related item\r\n\n \n Deprecation Comment:Replced by ActCode.SDV"; + case _CONFIDENTIALITYMODIFIERS: return "Description: Modifiers of role based access rights (multiple allowed)\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case C: return "Description: Celebrities are people of public interest (VIP) including employees, whose information require special protection.\r\n\n \n Deprecation Comment:Replced by ActCode.CEL"; + case S: return "Description: \n \r\nInformation for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared on patient's request.\n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case T: return "Description: Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only, example use is a new fatal diagnosis or finding, such as malignancy or HIV.\r\n\n \n Deprecation Note:Replced by ActCode.TBOO"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONFIDENTIALITY: return "Confidentiality"; + case L: return "low"; + case M: return "moderate"; + case N: return "normal"; + case R: return "restricted"; + case U: return "unrestricted"; + case V: return "very restricted"; + case _CONFIDENTIALITYBYACCESSKIND: return "ConfidentialityByAccessKind"; + case B: return "business"; + case D: return "clinician"; + case I: return "individual"; + case _CONFIDENTIALITYBYINFOTYPE: return "ConfidentialityByInfoType"; + case ETH: return "substance abuse related"; + case HIV: return "HIV related"; + case PSY: return "psychiatry relate"; + case SDV: return "sexual and domestic violence related"; + case _CONFIDENTIALITYMODIFIERS: return "ConfidentialityModifiers"; + case C: return "celebrity"; + case S: return "sensitive"; + case T: return "taboo"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ConfidentialityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ConfidentialityEnumFactory.java new file mode 100644 index 00000000000..cb5599e9d6f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ConfidentialityEnumFactory.java @@ -0,0 +1,131 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ConfidentialityEnumFactory implements EnumFactory { + + public V3Confidentiality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Confidentiality".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITY; + if ("L".equals(codeString)) + return V3Confidentiality.L; + if ("M".equals(codeString)) + return V3Confidentiality.M; + if ("N".equals(codeString)) + return V3Confidentiality.N; + if ("R".equals(codeString)) + return V3Confidentiality.R; + if ("U".equals(codeString)) + return V3Confidentiality.U; + if ("V".equals(codeString)) + return V3Confidentiality.V; + if ("_ConfidentialityByAccessKind".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYBYACCESSKIND; + if ("B".equals(codeString)) + return V3Confidentiality.B; + if ("D".equals(codeString)) + return V3Confidentiality.D; + if ("I".equals(codeString)) + return V3Confidentiality.I; + if ("_ConfidentialityByInfoType".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYBYINFOTYPE; + if ("ETH".equals(codeString)) + return V3Confidentiality.ETH; + if ("HIV".equals(codeString)) + return V3Confidentiality.HIV; + if ("PSY".equals(codeString)) + return V3Confidentiality.PSY; + if ("SDV".equals(codeString)) + return V3Confidentiality.SDV; + if ("_ConfidentialityModifiers".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYMODIFIERS; + if ("C".equals(codeString)) + return V3Confidentiality.C; + if ("S".equals(codeString)) + return V3Confidentiality.S; + if ("T".equals(codeString)) + return V3Confidentiality.T; + throw new IllegalArgumentException("Unknown V3Confidentiality code '"+codeString+"'"); + } + + public String toCode(V3Confidentiality code) { + if (code == V3Confidentiality._CONFIDENTIALITY) + return "_Confidentiality"; + if (code == V3Confidentiality.L) + return "L"; + if (code == V3Confidentiality.M) + return "M"; + if (code == V3Confidentiality.N) + return "N"; + if (code == V3Confidentiality.R) + return "R"; + if (code == V3Confidentiality.U) + return "U"; + if (code == V3Confidentiality.V) + return "V"; + if (code == V3Confidentiality._CONFIDENTIALITYBYACCESSKIND) + return "_ConfidentialityByAccessKind"; + if (code == V3Confidentiality.B) + return "B"; + if (code == V3Confidentiality.D) + return "D"; + if (code == V3Confidentiality.I) + return "I"; + if (code == V3Confidentiality._CONFIDENTIALITYBYINFOTYPE) + return "_ConfidentialityByInfoType"; + if (code == V3Confidentiality.ETH) + return "ETH"; + if (code == V3Confidentiality.HIV) + return "HIV"; + if (code == V3Confidentiality.PSY) + return "PSY"; + if (code == V3Confidentiality.SDV) + return "SDV"; + if (code == V3Confidentiality._CONFIDENTIALITYMODIFIERS) + return "_ConfidentialityModifiers"; + if (code == V3Confidentiality.C) + return "C"; + if (code == V3Confidentiality.S) + return "S"; + if (code == V3Confidentiality.T) + return "T"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCap.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCap.java new file mode 100644 index 00000000000..fd6daeecf8a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCap.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContainerCap { + + /** + * Cap types for medication containers + */ + _MEDICATIONCAP, + /** + * A cap designed to be difficult to open for children. Generally requires multiple simultaneous actions (e.g. squeeze and twist) to open. Used for products that may be dangerous if ingested or overdosed by children. + */ + CHILD, + /** + * A cap designed to be easily removed. For products intended to be opened by persons with limited strength or dexterity. + */ + EASY, + /** + * A non-reactive plastic film covering over the opening of a container. + */ + FILM, + /** + * A foil covering (type of foil not specified) over the opening of a container + */ + FOIL, + /** + * A non-threaded cap that forms a tight-fitting closure on a container by pushing the fitted end into the conatiner opening + */ + PUSH, + /** + * A threaded cap that is screwed onto the opening of a container + */ + SCR, + /** + * added to help the parsers + */ + NULL; + public static V3ContainerCap fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MedicationCap".equals(codeString)) + return _MEDICATIONCAP; + if ("CHILD".equals(codeString)) + return CHILD; + if ("EASY".equals(codeString)) + return EASY; + if ("FILM".equals(codeString)) + return FILM; + if ("FOIL".equals(codeString)) + return FOIL; + if ("PUSH".equals(codeString)) + return PUSH; + if ("SCR".equals(codeString)) + return SCR; + throw new FHIRException("Unknown V3ContainerCap code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _MEDICATIONCAP: return "_MedicationCap"; + case CHILD: return "CHILD"; + case EASY: return "EASY"; + case FILM: return "FILM"; + case FOIL: return "FOIL"; + case PUSH: return "PUSH"; + case SCR: return "SCR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContainerCap"; + } + public String getDefinition() { + switch (this) { + case _MEDICATIONCAP: return "Cap types for medication containers"; + case CHILD: return "A cap designed to be difficult to open for children. Generally requires multiple simultaneous actions (e.g. squeeze and twist) to open. Used for products that may be dangerous if ingested or overdosed by children."; + case EASY: return "A cap designed to be easily removed. For products intended to be opened by persons with limited strength or dexterity."; + case FILM: return "A non-reactive plastic film covering over the opening of a container."; + case FOIL: return "A foil covering (type of foil not specified) over the opening of a container"; + case PUSH: return "A non-threaded cap that forms a tight-fitting closure on a container by pushing the fitted end into the conatiner opening"; + case SCR: return "A threaded cap that is screwed onto the opening of a container"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _MEDICATIONCAP: return "MedicationCap"; + case CHILD: return "ChildProof"; + case EASY: return "EasyOpen"; + case FILM: return "Film"; + case FOIL: return "Foil"; + case PUSH: return "Push Cap"; + case SCR: return "Screw Cap"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCapEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCapEnumFactory.java new file mode 100644 index 00000000000..bfb3ea58496 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerCapEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ContainerCapEnumFactory implements EnumFactory { + + public V3ContainerCap fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MedicationCap".equals(codeString)) + return V3ContainerCap._MEDICATIONCAP; + if ("CHILD".equals(codeString)) + return V3ContainerCap.CHILD; + if ("EASY".equals(codeString)) + return V3ContainerCap.EASY; + if ("FILM".equals(codeString)) + return V3ContainerCap.FILM; + if ("FOIL".equals(codeString)) + return V3ContainerCap.FOIL; + if ("PUSH".equals(codeString)) + return V3ContainerCap.PUSH; + if ("SCR".equals(codeString)) + return V3ContainerCap.SCR; + throw new IllegalArgumentException("Unknown V3ContainerCap code '"+codeString+"'"); + } + + public String toCode(V3ContainerCap code) { + if (code == V3ContainerCap._MEDICATIONCAP) + return "_MedicationCap"; + if (code == V3ContainerCap.CHILD) + return "CHILD"; + if (code == V3ContainerCap.EASY) + return "EASY"; + if (code == V3ContainerCap.FILM) + return "FILM"; + if (code == V3ContainerCap.FOIL) + return "FOIL"; + if (code == V3ContainerCap.PUSH) + return "PUSH"; + if (code == V3ContainerCap.SCR) + return "SCR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparator.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparator.java new file mode 100644 index 00000000000..80d87171a99 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparator.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContainerSeparator { + + /** + * A gelatinous type of separator material. + */ + GEL, + /** + * No separator material is present in the container. + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static V3ContainerSeparator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GEL".equals(codeString)) + return GEL; + if ("NONE".equals(codeString)) + return NONE; + throw new FHIRException("Unknown V3ContainerSeparator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GEL: return "GEL"; + case NONE: return "NONE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContainerSeparator"; + } + public String getDefinition() { + switch (this) { + case GEL: return "A gelatinous type of separator material."; + case NONE: return "No separator material is present in the container."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GEL: return "Gel"; + case NONE: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparatorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparatorEnumFactory.java new file mode 100644 index 00000000000..e9dd90cdb23 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContainerSeparatorEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ContainerSeparatorEnumFactory implements EnumFactory { + + public V3ContainerSeparator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GEL".equals(codeString)) + return V3ContainerSeparator.GEL; + if ("NONE".equals(codeString)) + return V3ContainerSeparator.NONE; + throw new IllegalArgumentException("Unknown V3ContainerSeparator code '"+codeString+"'"); + } + + public String toCode(V3ContainerSeparator code) { + if (code == V3ContainerSeparator.GEL) + return "GEL"; + if (code == V3ContainerSeparator.NONE) + return "NONE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingMode.java new file mode 100644 index 00000000000..1fb3e333f56 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContentProcessingMode { + + /** + * Description:The content should be processed in a sequential fashion. + */ + SEQL, + /** + * Description:The content may be processed in any order. + */ + UNOR, + /** + * added to help the parsers + */ + NULL; + public static V3ContentProcessingMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return SEQL; + if ("UNOR".equals(codeString)) + return UNOR; + throw new FHIRException("Unknown V3ContentProcessingMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SEQL: return "SEQL"; + case UNOR: return "UNOR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContentProcessingMode"; + } + public String getDefinition() { + switch (this) { + case SEQL: return "Description:The content should be processed in a sequential fashion."; + case UNOR: return "Description:The content may be processed in any order."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SEQL: return "Sequential"; + case UNOR: return "Unordered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingModeEnumFactory.java new file mode 100644 index 00000000000..22d024c2bf1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContentProcessingModeEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ContentProcessingModeEnumFactory implements EnumFactory { + + public V3ContentProcessingMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return V3ContentProcessingMode.SEQL; + if ("UNOR".equals(codeString)) + return V3ContentProcessingMode.UNOR; + throw new IllegalArgumentException("Unknown V3ContentProcessingMode code '"+codeString+"'"); + } + + public String toCode(V3ContentProcessingMode code) { + if (code == V3ContentProcessingMode.SEQL) + return "SEQL"; + if (code == V3ContentProcessingMode.UNOR) + return "UNOR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControl.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControl.java new file mode 100644 index 00000000000..f8c47c9519f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControl.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContextControl { + + /** + * The association adds to the existing context associated with the Act. Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act. + */ + _CONTEXTCONTROLADDITIVE, + /** + * The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Non-Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated. + */ + AN, + /** + * The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated. + */ + AP, + /** + * The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd). + */ + _CONTEXTCONTROLNONPROPAGATING, + /** + * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Non-Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated. + */ + ON, + /** + * The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific. + */ + _CONTEXTCONTROLOVERRIDING, + /** + * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated. + */ + OP, + /** + * The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd). + */ + _CONTEXTCONTROLPROPAGATING, + /** + * added to help the parsers + */ + NULL; + public static V3ContextControl fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ContextControlAdditive".equals(codeString)) + return _CONTEXTCONTROLADDITIVE; + if ("AN".equals(codeString)) + return AN; + if ("AP".equals(codeString)) + return AP; + if ("_ContextControlNonPropagating".equals(codeString)) + return _CONTEXTCONTROLNONPROPAGATING; + if ("ON".equals(codeString)) + return ON; + if ("_ContextControlOverriding".equals(codeString)) + return _CONTEXTCONTROLOVERRIDING; + if ("OP".equals(codeString)) + return OP; + if ("_ContextControlPropagating".equals(codeString)) + return _CONTEXTCONTROLPROPAGATING; + throw new FHIRException("Unknown V3ContextControl code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "_ContextControlAdditive"; + case AN: return "AN"; + case AP: return "AP"; + case _CONTEXTCONTROLNONPROPAGATING: return "_ContextControlNonPropagating"; + case ON: return "ON"; + case _CONTEXTCONTROLOVERRIDING: return "_ContextControlOverriding"; + case OP: return "OP"; + case _CONTEXTCONTROLPROPAGATING: return "_ContextControlPropagating"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContextControl"; + } + public String getDefinition() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "The association adds to the existing context associated with the Act. Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act."; + case AN: return "The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Non-Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated."; + case AP: return "The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLNONPROPAGATING: return "The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd)."; + case ON: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Non-Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLOVERRIDING: return "The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific."; + case OP: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLPROPAGATING: return "The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "ContextControlAdditive"; + case AN: return "additive, non-propagating"; + case AP: return "additive, propagating"; + case _CONTEXTCONTROLNONPROPAGATING: return "ContextControlNonPropagating"; + case ON: return "overriding, non-propagating"; + case _CONTEXTCONTROLOVERRIDING: return "ContextControlOverriding"; + case OP: return "overriding, propagating"; + case _CONTEXTCONTROLPROPAGATING: return "ContextControlPropagating"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControlEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControlEnumFactory.java new file mode 100644 index 00000000000..6c692d00b0c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ContextControlEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ContextControlEnumFactory implements EnumFactory { + + public V3ContextControl fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ContextControlAdditive".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLADDITIVE; + if ("AN".equals(codeString)) + return V3ContextControl.AN; + if ("AP".equals(codeString)) + return V3ContextControl.AP; + if ("_ContextControlNonPropagating".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLNONPROPAGATING; + if ("ON".equals(codeString)) + return V3ContextControl.ON; + if ("_ContextControlOverriding".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLOVERRIDING; + if ("OP".equals(codeString)) + return V3ContextControl.OP; + if ("_ContextControlPropagating".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLPROPAGATING; + throw new IllegalArgumentException("Unknown V3ContextControl code '"+codeString+"'"); + } + + public String toCode(V3ContextControl code) { + if (code == V3ContextControl._CONTEXTCONTROLADDITIVE) + return "_ContextControlAdditive"; + if (code == V3ContextControl.AN) + return "AN"; + if (code == V3ContextControl.AP) + return "AP"; + if (code == V3ContextControl._CONTEXTCONTROLNONPROPAGATING) + return "_ContextControlNonPropagating"; + if (code == V3ContextControl.ON) + return "ON"; + if (code == V3ContextControl._CONTEXTCONTROLOVERRIDING) + return "_ContextControlOverriding"; + if (code == V3ContextControl.OP) + return "OP"; + if (code == V3ContextControl._CONTEXTCONTROLPROPAGATING) + return "_ContextControlPropagating"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperation.java new file mode 100644 index 00000000000..6952dbfe775 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperation.java @@ -0,0 +1,249 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DataOperation { + + /** + * Description:Act on an object or objects. + */ + OPERATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + CREATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + DELETE, + /** + * Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + EXECUTE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + READ, + /** + * Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + UPDATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + APPEND, + /** + * Description:Change the status of an object representing an Act. + */ + MODIFYSTATUS, + /** + * Description:Change the status of an object representing an Act to "aborted", i.e., terminated prior to the originally intended completion. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + ABORT, + /** + * Description:Change the status of an object representing an Act to "active", i.e., so it can be performed or is being performed, for the first time. (Contrast with REACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + ACTIVATE, + /** + * Description:Change the status of an object representing an Act to "cancelled", i.e., abandoned before activation. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + CANCEL, + /** + * Description:Change the status of an object representing an Act to "completed", i.e., terminated normally after all of its constituents have been performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + COMPLETE, + /** + * Description:Change the status of an object representing an Act to "held", i.e., put aside an Act that is still in preparatory stages. No action can occur until the Act is released. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + HOLD, + /** + * Description:Change the status of an object representing an Act to a normal state. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + JUMP, + /** + * Description:Change the status of an object representing an Act to "nullified", i.e., treat as though it never existed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + NULLIFY, + /** + * Description:Change the status of an object representing an Act to "obsolete" when it has been replaced by a new instance. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + OBSOLETE, + /** + * Description:Change the status of a formerly active object representing an Act to "active", i.e., so it can again be performed or is being performed. (Contrast with ACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + REACTIVATE, + /** + * Description:Change the status of an object representing an Act so it is no longer "held", i.e., allow action to occur. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + RELEASE, + /** + * Description:Change the status of a suspended object representing an Act to "active", i.e., so it can be performed or is being performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + RESUME, + /** + * Definition:Change the status of an object representing an Act to suspended, i.e., so it is temporarily not in service. + */ + SUSPEND, + /** + * added to help the parsers + */ + NULL; + public static V3DataOperation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OPERATE".equals(codeString)) + return OPERATE; + if ("CREATE".equals(codeString)) + return CREATE; + if ("DELETE".equals(codeString)) + return DELETE; + if ("EXECUTE".equals(codeString)) + return EXECUTE; + if ("READ".equals(codeString)) + return READ; + if ("UPDATE".equals(codeString)) + return UPDATE; + if ("APPEND".equals(codeString)) + return APPEND; + if ("MODIFYSTATUS".equals(codeString)) + return MODIFYSTATUS; + if ("ABORT".equals(codeString)) + return ABORT; + if ("ACTIVATE".equals(codeString)) + return ACTIVATE; + if ("CANCEL".equals(codeString)) + return CANCEL; + if ("COMPLETE".equals(codeString)) + return COMPLETE; + if ("HOLD".equals(codeString)) + return HOLD; + if ("JUMP".equals(codeString)) + return JUMP; + if ("NULLIFY".equals(codeString)) + return NULLIFY; + if ("OBSOLETE".equals(codeString)) + return OBSOLETE; + if ("REACTIVATE".equals(codeString)) + return REACTIVATE; + if ("RELEASE".equals(codeString)) + return RELEASE; + if ("RESUME".equals(codeString)) + return RESUME; + if ("SUSPEND".equals(codeString)) + return SUSPEND; + throw new FHIRException("Unknown V3DataOperation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OPERATE: return "OPERATE"; + case CREATE: return "CREATE"; + case DELETE: return "DELETE"; + case EXECUTE: return "EXECUTE"; + case READ: return "READ"; + case UPDATE: return "UPDATE"; + case APPEND: return "APPEND"; + case MODIFYSTATUS: return "MODIFYSTATUS"; + case ABORT: return "ABORT"; + case ACTIVATE: return "ACTIVATE"; + case CANCEL: return "CANCEL"; + case COMPLETE: return "COMPLETE"; + case HOLD: return "HOLD"; + case JUMP: return "JUMP"; + case NULLIFY: return "NULLIFY"; + case OBSOLETE: return "OBSOLETE"; + case REACTIVATE: return "REACTIVATE"; + case RELEASE: return "RELEASE"; + case RESUME: return "RESUME"; + case SUSPEND: return "SUSPEND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DataOperation"; + } + public String getDefinition() { + switch (this) { + case OPERATE: return "Description:Act on an object or objects."; + case CREATE: return "Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case DELETE: return "Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case EXECUTE: return "Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case READ: return "Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case UPDATE: return "Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case APPEND: return "Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case MODIFYSTATUS: return "Description:Change the status of an object representing an Act."; + case ABORT: return "Description:Change the status of an object representing an Act to \"aborted\", i.e., terminated prior to the originally intended completion. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case ACTIVATE: return "Description:Change the status of an object representing an Act to \"active\", i.e., so it can be performed or is being performed, for the first time. (Contrast with REACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case CANCEL: return "Description:Change the status of an object representing an Act to \"cancelled\", i.e., abandoned before activation. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case COMPLETE: return "Description:Change the status of an object representing an Act to \"completed\", i.e., terminated normally after all of its constituents have been performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case HOLD: return "Description:Change the status of an object representing an Act to \"held\", i.e., put aside an Act that is still in preparatory stages. No action can occur until the Act is released. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case JUMP: return "Description:Change the status of an object representing an Act to a normal state. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case NULLIFY: return "Description:Change the status of an object representing an Act to \"nullified\", i.e., treat as though it never existed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case OBSOLETE: return "Description:Change the status of an object representing an Act to \"obsolete\" when it has been replaced by a new instance. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case REACTIVATE: return "Description:Change the status of a formerly active object representing an Act to \"active\", i.e., so it can again be performed or is being performed. (Contrast with ACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case RELEASE: return "Description:Change the status of an object representing an Act so it is no longer \"held\", i.e., allow action to occur. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case RESUME: return "Description:Change the status of a suspended object representing an Act to \"active\", i.e., so it can be performed or is being performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case SUSPEND: return "Definition:Change the status of an object representing an Act to suspended, i.e., so it is temporarily not in service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OPERATE: return "operate"; + case CREATE: return "create"; + case DELETE: return "delete"; + case EXECUTE: return "execute"; + case READ: return "read"; + case UPDATE: return "revise"; + case APPEND: return "append"; + case MODIFYSTATUS: return "modify status"; + case ABORT: return "abort"; + case ACTIVATE: return "activate"; + case CANCEL: return "cancel"; + case COMPLETE: return "complete"; + case HOLD: return "hold"; + case JUMP: return "jump"; + case NULLIFY: return "nullify"; + case OBSOLETE: return "obsolete"; + case REACTIVATE: return "reactivate"; + case RELEASE: return "release"; + case RESUME: return "resume"; + case SUSPEND: return "suspend"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperationEnumFactory.java new file mode 100644 index 00000000000..f76d1197305 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DataOperationEnumFactory.java @@ -0,0 +1,131 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3DataOperationEnumFactory implements EnumFactory { + + public V3DataOperation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OPERATE".equals(codeString)) + return V3DataOperation.OPERATE; + if ("CREATE".equals(codeString)) + return V3DataOperation.CREATE; + if ("DELETE".equals(codeString)) + return V3DataOperation.DELETE; + if ("EXECUTE".equals(codeString)) + return V3DataOperation.EXECUTE; + if ("READ".equals(codeString)) + return V3DataOperation.READ; + if ("UPDATE".equals(codeString)) + return V3DataOperation.UPDATE; + if ("APPEND".equals(codeString)) + return V3DataOperation.APPEND; + if ("MODIFYSTATUS".equals(codeString)) + return V3DataOperation.MODIFYSTATUS; + if ("ABORT".equals(codeString)) + return V3DataOperation.ABORT; + if ("ACTIVATE".equals(codeString)) + return V3DataOperation.ACTIVATE; + if ("CANCEL".equals(codeString)) + return V3DataOperation.CANCEL; + if ("COMPLETE".equals(codeString)) + return V3DataOperation.COMPLETE; + if ("HOLD".equals(codeString)) + return V3DataOperation.HOLD; + if ("JUMP".equals(codeString)) + return V3DataOperation.JUMP; + if ("NULLIFY".equals(codeString)) + return V3DataOperation.NULLIFY; + if ("OBSOLETE".equals(codeString)) + return V3DataOperation.OBSOLETE; + if ("REACTIVATE".equals(codeString)) + return V3DataOperation.REACTIVATE; + if ("RELEASE".equals(codeString)) + return V3DataOperation.RELEASE; + if ("RESUME".equals(codeString)) + return V3DataOperation.RESUME; + if ("SUSPEND".equals(codeString)) + return V3DataOperation.SUSPEND; + throw new IllegalArgumentException("Unknown V3DataOperation code '"+codeString+"'"); + } + + public String toCode(V3DataOperation code) { + if (code == V3DataOperation.OPERATE) + return "OPERATE"; + if (code == V3DataOperation.CREATE) + return "CREATE"; + if (code == V3DataOperation.DELETE) + return "DELETE"; + if (code == V3DataOperation.EXECUTE) + return "EXECUTE"; + if (code == V3DataOperation.READ) + return "READ"; + if (code == V3DataOperation.UPDATE) + return "UPDATE"; + if (code == V3DataOperation.APPEND) + return "APPEND"; + if (code == V3DataOperation.MODIFYSTATUS) + return "MODIFYSTATUS"; + if (code == V3DataOperation.ABORT) + return "ABORT"; + if (code == V3DataOperation.ACTIVATE) + return "ACTIVATE"; + if (code == V3DataOperation.CANCEL) + return "CANCEL"; + if (code == V3DataOperation.COMPLETE) + return "COMPLETE"; + if (code == V3DataOperation.HOLD) + return "HOLD"; + if (code == V3DataOperation.JUMP) + return "JUMP"; + if (code == V3DataOperation.NULLIFY) + return "NULLIFY"; + if (code == V3DataOperation.OBSOLETE) + return "OBSOLETE"; + if (code == V3DataOperation.REACTIVATE) + return "REACTIVATE"; + if (code == V3DataOperation.RELEASE) + return "RELEASE"; + if (code == V3DataOperation.RESUME) + return "RESUME"; + if (code == V3DataOperation.SUSPEND) + return "SUSPEND"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevel.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevel.java new file mode 100644 index 00000000000..c328081ba3b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevel.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DeviceAlertLevel { + + /** + * Shut Down, Fix Problem and Re-initialize + */ + C, + /** + * No Corrective Action Needed + */ + N, + /** + * Corrective Action Required + */ + S, + /** + * Corrective Action Anticipated + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3DeviceAlertLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3DeviceAlertLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case N: return "N"; + case S: return "S"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DeviceAlertLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Shut Down, Fix Problem and Re-initialize"; + case N: return "No Corrective Action Needed"; + case S: return "Corrective Action Required"; + case W: return "Corrective Action Anticipated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Critical"; + case N: return "Normal"; + case S: return "Serious"; + case W: return "Warning"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevelEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevelEnumFactory.java new file mode 100644 index 00000000000..68d4f610a6e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DeviceAlertLevelEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3DeviceAlertLevelEnumFactory implements EnumFactory { + + public V3DeviceAlertLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3DeviceAlertLevel.C; + if ("N".equals(codeString)) + return V3DeviceAlertLevel.N; + if ("S".equals(codeString)) + return V3DeviceAlertLevel.S; + if ("W".equals(codeString)) + return V3DeviceAlertLevel.W; + throw new IllegalArgumentException("Unknown V3DeviceAlertLevel code '"+codeString+"'"); + } + + public String toCode(V3DeviceAlertLevel code) { + if (code == V3DeviceAlertLevel.C) + return "C"; + if (code == V3DeviceAlertLevel.N) + return "N"; + if (code == V3DeviceAlertLevel.S) + return "S"; + if (code == V3DeviceAlertLevel.W) + return "W"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletion.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletion.java new file mode 100644 index 00000000000..07d32d0b50e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletion.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DocumentCompletion { + + /** + * A completion status in which a document has been signed manually or electronically by one or more individuals who attest to its accuracy. No explicit determination is made that the assigned individual has performed the authentication. While the standard allows multiple instances of authentication, it would be typical to have a single instance of authentication, usually by the assigned individual. + */ + AU, + /** + * A completion status in which information has been orally recorded but not yet transcribed. + */ + DI, + /** + * A completion status in which document content, other than dictation, has been received but has not been translated into the final electronic format. Examples include paper documents, whether hand-written or typewritten, and intermediate electronic forms, such as voice to text. + */ + DO, + /** + * A completion status in which information is known to be missing from a transcribed document. + */ + IN, + /** + * A workflow status where the material has been assigned to personnel to perform the task of transcription. The document remains in this state until the document is transcribed. + */ + IP, + /** + * A completion status in which a document has been signed manually or electronically by the individual who is legally responsible for that document. This is the most mature state in the workflow progression. + */ + LA, + /** + * A completion status in which a document was created in error or was placed in the wrong chart. The document is no longer available. + */ + NU, + /** + * A completion status in which a document is transcribed but not authenticated. + */ + PA, + /** + * A completion status where the document is complete and there is no expectation that the document will be signed. + */ + UC, + /** + * added to help the parsers + */ + NULL; + public static V3DocumentCompletion fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AU".equals(codeString)) + return AU; + if ("DI".equals(codeString)) + return DI; + if ("DO".equals(codeString)) + return DO; + if ("IN".equals(codeString)) + return IN; + if ("IP".equals(codeString)) + return IP; + if ("LA".equals(codeString)) + return LA; + if ("NU".equals(codeString)) + return NU; + if ("PA".equals(codeString)) + return PA; + if ("UC".equals(codeString)) + return UC; + throw new FHIRException("Unknown V3DocumentCompletion code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AU: return "AU"; + case DI: return "DI"; + case DO: return "DO"; + case IN: return "IN"; + case IP: return "IP"; + case LA: return "LA"; + case NU: return "NU"; + case PA: return "PA"; + case UC: return "UC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DocumentCompletion"; + } + public String getDefinition() { + switch (this) { + case AU: return "A completion status in which a document has been signed manually or electronically by one or more individuals who attest to its accuracy. No explicit determination is made that the assigned individual has performed the authentication. While the standard allows multiple instances of authentication, it would be typical to have a single instance of authentication, usually by the assigned individual."; + case DI: return "A completion status in which information has been orally recorded but not yet transcribed."; + case DO: return "A completion status in which document content, other than dictation, has been received but has not been translated into the final electronic format. Examples include paper documents, whether hand-written or typewritten, and intermediate electronic forms, such as voice to text."; + case IN: return "A completion status in which information is known to be missing from a transcribed document."; + case IP: return "A workflow status where the material has been assigned to personnel to perform the task of transcription. The document remains in this state until the document is transcribed."; + case LA: return "A completion status in which a document has been signed manually or electronically by the individual who is legally responsible for that document. This is the most mature state in the workflow progression."; + case NU: return "A completion status in which a document was created in error or was placed in the wrong chart. The document is no longer available."; + case PA: return "A completion status in which a document is transcribed but not authenticated."; + case UC: return "A completion status where the document is complete and there is no expectation that the document will be signed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AU: return "authenticated"; + case DI: return "dictated"; + case DO: return "documented"; + case IN: return "incomplete"; + case IP: return "in progress"; + case LA: return "legally authenticated"; + case NU: return "nullified document"; + case PA: return "pre-authenticated"; + case UC: return "unsigned completed document"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletionEnumFactory.java new file mode 100644 index 00000000000..44d3fb764c5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentCompletionEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3DocumentCompletionEnumFactory implements EnumFactory { + + public V3DocumentCompletion fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AU".equals(codeString)) + return V3DocumentCompletion.AU; + if ("DI".equals(codeString)) + return V3DocumentCompletion.DI; + if ("DO".equals(codeString)) + return V3DocumentCompletion.DO; + if ("IN".equals(codeString)) + return V3DocumentCompletion.IN; + if ("IP".equals(codeString)) + return V3DocumentCompletion.IP; + if ("LA".equals(codeString)) + return V3DocumentCompletion.LA; + if ("NU".equals(codeString)) + return V3DocumentCompletion.NU; + if ("PA".equals(codeString)) + return V3DocumentCompletion.PA; + if ("UC".equals(codeString)) + return V3DocumentCompletion.UC; + throw new IllegalArgumentException("Unknown V3DocumentCompletion code '"+codeString+"'"); + } + + public String toCode(V3DocumentCompletion code) { + if (code == V3DocumentCompletion.AU) + return "AU"; + if (code == V3DocumentCompletion.DI) + return "DI"; + if (code == V3DocumentCompletion.DO) + return "DO"; + if (code == V3DocumentCompletion.IN) + return "IN"; + if (code == V3DocumentCompletion.IP) + return "IP"; + if (code == V3DocumentCompletion.LA) + return "LA"; + if (code == V3DocumentCompletion.NU) + return "NU"; + if (code == V3DocumentCompletion.PA) + return "PA"; + if (code == V3DocumentCompletion.UC) + return "UC"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorage.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorage.java new file mode 100644 index 00000000000..e814e3ccecf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorage.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DocumentStorage { + + /** + * A storage status in which a document is available on-line. + */ + AC, + /** + * A storage status in which a document is available on-line and is also stored off-line for long-term access. + */ + AA, + /** + * A storage status in which a document has been stored off-line for long-term access. + */ + AR, + /** + * A storage status in which a document is no longer available in this system. + */ + PU, + /** + * added to help the parsers + */ + NULL; + public static V3DocumentStorage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return AC; + if ("AA".equals(codeString)) + return AA; + if ("AR".equals(codeString)) + return AR; + if ("PU".equals(codeString)) + return PU; + throw new FHIRException("Unknown V3DocumentStorage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AC: return "AC"; + case AA: return "AA"; + case AR: return "AR"; + case PU: return "PU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DocumentStorage"; + } + public String getDefinition() { + switch (this) { + case AC: return "A storage status in which a document is available on-line."; + case AA: return "A storage status in which a document is available on-line and is also stored off-line for long-term access."; + case AR: return "A storage status in which a document has been stored off-line for long-term access."; + case PU: return "A storage status in which a document is no longer available in this system."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AC: return "active"; + case AA: return "active and archived"; + case AR: return "archived (not active)"; + case PU: return "purged"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorageEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorageEnumFactory.java new file mode 100644 index 00000000000..f4bb6a3c35f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3DocumentStorageEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3DocumentStorageEnumFactory implements EnumFactory { + + public V3DocumentStorage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return V3DocumentStorage.AC; + if ("AA".equals(codeString)) + return V3DocumentStorage.AA; + if ("AR".equals(codeString)) + return V3DocumentStorage.AR; + if ("PU".equals(codeString)) + return V3DocumentStorage.PU; + throw new IllegalArgumentException("Unknown V3DocumentStorage code '"+codeString+"'"); + } + + public String toCode(V3DocumentStorage code) { + if (code == V3DocumentStorage.AC) + return "AC"; + if (code == V3DocumentStorage.AA) + return "AA"; + if (code == V3DocumentStorage.AR) + return "AR"; + if (code == V3DocumentStorage.PU) + return "PU"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevel.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevel.java new file mode 100644 index 00000000000..12caca138e5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevel.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EducationLevel { + + /** + * Associate's or technical degree complete + */ + ASSOC, + /** + * College or baccalaureate degree complete + */ + BD, + /** + * Elementary School + */ + ELEM, + /** + * Graduate or professional Degree complete + */ + GD, + /** + * High School or secondary school degree complete + */ + HS, + /** + * Some post-baccalaureate education + */ + PB, + /** + * Doctoral or post graduate education + */ + POSTG, + /** + * Some College education + */ + SCOL, + /** + * Some secondary or high school education + */ + SEC, + /** + * added to help the parsers + */ + NULL; + public static V3EducationLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ASSOC".equals(codeString)) + return ASSOC; + if ("BD".equals(codeString)) + return BD; + if ("ELEM".equals(codeString)) + return ELEM; + if ("GD".equals(codeString)) + return GD; + if ("HS".equals(codeString)) + return HS; + if ("PB".equals(codeString)) + return PB; + if ("POSTG".equals(codeString)) + return POSTG; + if ("SCOL".equals(codeString)) + return SCOL; + if ("SEC".equals(codeString)) + return SEC; + throw new FHIRException("Unknown V3EducationLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASSOC: return "ASSOC"; + case BD: return "BD"; + case ELEM: return "ELEM"; + case GD: return "GD"; + case HS: return "HS"; + case PB: return "PB"; + case POSTG: return "POSTG"; + case SCOL: return "SCOL"; + case SEC: return "SEC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EducationLevel"; + } + public String getDefinition() { + switch (this) { + case ASSOC: return "Associate's or technical degree complete"; + case BD: return "College or baccalaureate degree complete"; + case ELEM: return "Elementary School"; + case GD: return "Graduate or professional Degree complete"; + case HS: return "High School or secondary school degree complete"; + case PB: return "Some post-baccalaureate education"; + case POSTG: return "Doctoral or post graduate education"; + case SCOL: return "Some College education"; + case SEC: return "Some secondary or high school education"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASSOC: return "Associate's or technical degree complete"; + case BD: return "College or baccalaureate degree complete"; + case ELEM: return "Elementary School"; + case GD: return "Graduate or professional Degree complete"; + case HS: return "High School or secondary school degree complete"; + case PB: return "Some post-baccalaureate education"; + case POSTG: return "Doctoral or post graduate education"; + case SCOL: return "Some College education"; + case SEC: return "Some secondary or high school education"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevelEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevelEnumFactory.java new file mode 100644 index 00000000000..e3eef2f9588 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EducationLevelEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EducationLevelEnumFactory implements EnumFactory { + + public V3EducationLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ASSOC".equals(codeString)) + return V3EducationLevel.ASSOC; + if ("BD".equals(codeString)) + return V3EducationLevel.BD; + if ("ELEM".equals(codeString)) + return V3EducationLevel.ELEM; + if ("GD".equals(codeString)) + return V3EducationLevel.GD; + if ("HS".equals(codeString)) + return V3EducationLevel.HS; + if ("PB".equals(codeString)) + return V3EducationLevel.PB; + if ("POSTG".equals(codeString)) + return V3EducationLevel.POSTG; + if ("SCOL".equals(codeString)) + return V3EducationLevel.SCOL; + if ("SEC".equals(codeString)) + return V3EducationLevel.SEC; + throw new IllegalArgumentException("Unknown V3EducationLevel code '"+codeString+"'"); + } + + public String toCode(V3EducationLevel code) { + if (code == V3EducationLevel.ASSOC) + return "ASSOC"; + if (code == V3EducationLevel.BD) + return "BD"; + if (code == V3EducationLevel.ELEM) + return "ELEM"; + if (code == V3EducationLevel.GD) + return "GD"; + if (code == V3EducationLevel.HS) + return "HS"; + if (code == V3EducationLevel.PB) + return "PB"; + if (code == V3EducationLevel.POSTG) + return "POSTG"; + if (code == V3EducationLevel.SCOL) + return "SCOL"; + if (code == V3EducationLevel.SEC) + return "SEC"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClass.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClass.java new file mode 100644 index 00000000000..d1f685dc179 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClass.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EmployeeJobClass { + + /** + * Employment in which the employee is expected to work at least a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week) + */ + FT, + /** + * Employment in which the employee is expected to work less than a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week) + */ + PT, + /** + * added to help the parsers + */ + NULL; + public static V3EmployeeJobClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FT".equals(codeString)) + return FT; + if ("PT".equals(codeString)) + return PT; + throw new FHIRException("Unknown V3EmployeeJobClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FT: return "FT"; + case PT: return "PT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EmployeeJobClass"; + } + public String getDefinition() { + switch (this) { + case FT: return "Employment in which the employee is expected to work at least a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week)"; + case PT: return "Employment in which the employee is expected to work less than a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FT: return "full-time"; + case PT: return "part-time"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClassEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClassEnumFactory.java new file mode 100644 index 00000000000..432fae732e5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EmployeeJobClassEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EmployeeJobClassEnumFactory implements EnumFactory { + + public V3EmployeeJobClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FT".equals(codeString)) + return V3EmployeeJobClass.FT; + if ("PT".equals(codeString)) + return V3EmployeeJobClass.PT; + throw new IllegalArgumentException("Unknown V3EmployeeJobClass code '"+codeString+"'"); + } + + public String toCode(V3EmployeeJobClass code) { + if (code == V3EmployeeJobClass.FT) + return "FT"; + if (code == V3EmployeeJobClass.PT) + return "PT"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSource.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSource.java new file mode 100644 index 00000000000..8c3cc270748 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSource.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EncounterAdmissionSource { + + /** + * emergency + */ + E, + /** + * labor and delivery + */ + LD, + /** + * newborn + */ + NB, + /** + * added to help the parsers + */ + NULL; + public static V3EncounterAdmissionSource fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("LD".equals(codeString)) + return LD; + if ("NB".equals(codeString)) + return NB; + throw new FHIRException("Unknown V3EncounterAdmissionSource code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case LD: return "LD"; + case NB: return "NB"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EncounterAdmissionSource"; + } + public String getDefinition() { + switch (this) { + case E: return "emergency"; + case LD: return "labor and delivery"; + case NB: return "newborn"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "emergency"; + case LD: return "labor and delivery"; + case NB: return "newborn"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSourceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSourceEnumFactory.java new file mode 100644 index 00000000000..ffa41644171 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterAdmissionSourceEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EncounterAdmissionSourceEnumFactory implements EnumFactory { + + public V3EncounterAdmissionSource fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3EncounterAdmissionSource.E; + if ("LD".equals(codeString)) + return V3EncounterAdmissionSource.LD; + if ("NB".equals(codeString)) + return V3EncounterAdmissionSource.NB; + throw new IllegalArgumentException("Unknown V3EncounterAdmissionSource code '"+codeString+"'"); + } + + public String toCode(V3EncounterAdmissionSource code) { + if (code == V3EncounterAdmissionSource.E) + return "E"; + if (code == V3EncounterAdmissionSource.LD) + return "LD"; + if (code == V3EncounterAdmissionSource.NB) + return "NB"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesy.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesy.java new file mode 100644 index 00000000000..3a126fedbdb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesy.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EncounterSpecialCourtesy { + + /** + * extended courtesy + */ + EXT, + /** + * normal courtesy + */ + NRM, + /** + * professional courtesy + */ + PRF, + /** + * Courtesies extended to the staff of the entity providing service. + */ + STF, + /** + * very important person + */ + VIP, + /** + * added to help the parsers + */ + NULL; + public static V3EncounterSpecialCourtesy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EXT".equals(codeString)) + return EXT; + if ("NRM".equals(codeString)) + return NRM; + if ("PRF".equals(codeString)) + return PRF; + if ("STF".equals(codeString)) + return STF; + if ("VIP".equals(codeString)) + return VIP; + throw new FHIRException("Unknown V3EncounterSpecialCourtesy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EXT: return "EXT"; + case NRM: return "NRM"; + case PRF: return "PRF"; + case STF: return "STF"; + case VIP: return "VIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EncounterSpecialCourtesy"; + } + public String getDefinition() { + switch (this) { + case EXT: return "extended courtesy"; + case NRM: return "normal courtesy"; + case PRF: return "professional courtesy"; + case STF: return "Courtesies extended to the staff of the entity providing service."; + case VIP: return "very important person"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EXT: return "extended courtesy"; + case NRM: return "normal courtesy"; + case PRF: return "professional courtesy"; + case STF: return "staff"; + case VIP: return "very important person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesyEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesyEnumFactory.java new file mode 100644 index 00000000000..1ac1e0d9d01 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EncounterSpecialCourtesyEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EncounterSpecialCourtesyEnumFactory implements EnumFactory { + + public V3EncounterSpecialCourtesy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EXT".equals(codeString)) + return V3EncounterSpecialCourtesy.EXT; + if ("NRM".equals(codeString)) + return V3EncounterSpecialCourtesy.NRM; + if ("PRF".equals(codeString)) + return V3EncounterSpecialCourtesy.PRF; + if ("STF".equals(codeString)) + return V3EncounterSpecialCourtesy.STF; + if ("VIP".equals(codeString)) + return V3EncounterSpecialCourtesy.VIP; + throw new IllegalArgumentException("Unknown V3EncounterSpecialCourtesy code '"+codeString+"'"); + } + + public String toCode(V3EncounterSpecialCourtesy code) { + if (code == V3EncounterSpecialCourtesy.EXT) + return "EXT"; + if (code == V3EncounterSpecialCourtesy.NRM) + return "NRM"; + if (code == V3EncounterSpecialCourtesy.PRF) + return "PRF"; + if (code == V3EncounterSpecialCourtesy.STF) + return "STF"; + if (code == V3EncounterSpecialCourtesy.VIP) + return "VIP"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClass.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClass.java new file mode 100644 index 00000000000..ee78fca80e7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClass.java @@ -0,0 +1,315 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityClass { + + /** + * Corresponds to the Entity class + */ + ENT, + /** + * A health chart included to serve as a document receiving entity in the management of medical records. + */ + HCE, + /** + * Anything that essentially has the property of life, independent of current state (a dead human corpse is still essentially a living subject). + */ + LIV, + /** + * A subtype of living subject that includes all living things except the species Homo Sapiens. + */ + NLIV, + /** + * A living subject from the animal kingdom. + */ + ANM, + /** + * All single celled living organisms including protozoa, bacteria, yeast, viruses, etc. + */ + MIC, + /** + * A living subject from the order of plants. + */ + PLNT, + /** + * A living subject of the species homo sapiens. + */ + PSN, + /** + * Any thing that has extension in space and mass, may be of living or non-living origin. + */ + MAT, + /** + * A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g., IUPAC codes. + */ + CHEM, + /** + * Naturally occurring, processed or manufactured entities that are primarily used as food for humans and animals. + */ + FOOD, + /** + * Corresponds to the ManufacturedMaterial class + */ + MMAT, + /** + * A container of other entities. + */ + CONT, + /** + * A type of container that can hold other containers or other holders. + */ + HOLD, + /** + * A subtype of ManufacturedMaterial used in an activity, without being substantially changed through that activity. The kind of device is identified by the code attribute inherited from Entity. + + + Usage: This includes durable (reusable) medical equipment as well as disposable equipment. + */ + DEV, + /** + * A physical artifact that stores information about the granting of authorization. + */ + CER, + /** + * Class to contain unique attributes of diagnostic imaging equipment. + */ + MODDV, + /** + * A social or legal structure formed by human beings. + */ + ORG, + /** + * An agency of the people of a state often assuming some authority over a certain matter. Includes government, governmental agencies, associations. + */ + PUB, + /** + * A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g., one of the United States of America or a French departement), counties or municipalities. Refine using, e.g., ISO country codes, FIPS-PUB state codes, etc. + */ + STATE, + /** + * A politically organized body of people bonded by territory and known as a nation. + */ + NAT, + /** + * A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant. + */ + PLC, + /** + * The territory of a city, town or other municipality. + */ + CITY, + /** + * The territory of a sovereign nation. + */ + COUNTRY, + /** + * The territory of a county, parish or other division of a state or province. + */ + COUNTY, + /** + * The territory of a state, province, department or other division of a sovereign country. + */ + PROVINCE, + /** + * A grouping of resources (personnel, material, or places) to be used for scheduling purposes. May be a pool of like-type resources, a team, or combination of personnel, material and places. + */ + RGRP, + /** + * added to help the parsers + */ + NULL; + public static V3EntityClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ENT".equals(codeString)) + return ENT; + if ("HCE".equals(codeString)) + return HCE; + if ("LIV".equals(codeString)) + return LIV; + if ("NLIV".equals(codeString)) + return NLIV; + if ("ANM".equals(codeString)) + return ANM; + if ("MIC".equals(codeString)) + return MIC; + if ("PLNT".equals(codeString)) + return PLNT; + if ("PSN".equals(codeString)) + return PSN; + if ("MAT".equals(codeString)) + return MAT; + if ("CHEM".equals(codeString)) + return CHEM; + if ("FOOD".equals(codeString)) + return FOOD; + if ("MMAT".equals(codeString)) + return MMAT; + if ("CONT".equals(codeString)) + return CONT; + if ("HOLD".equals(codeString)) + return HOLD; + if ("DEV".equals(codeString)) + return DEV; + if ("CER".equals(codeString)) + return CER; + if ("MODDV".equals(codeString)) + return MODDV; + if ("ORG".equals(codeString)) + return ORG; + if ("PUB".equals(codeString)) + return PUB; + if ("STATE".equals(codeString)) + return STATE; + if ("NAT".equals(codeString)) + return NAT; + if ("PLC".equals(codeString)) + return PLC; + if ("CITY".equals(codeString)) + return CITY; + if ("COUNTRY".equals(codeString)) + return COUNTRY; + if ("COUNTY".equals(codeString)) + return COUNTY; + if ("PROVINCE".equals(codeString)) + return PROVINCE; + if ("RGRP".equals(codeString)) + return RGRP; + throw new FHIRException("Unknown V3EntityClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ENT: return "ENT"; + case HCE: return "HCE"; + case LIV: return "LIV"; + case NLIV: return "NLIV"; + case ANM: return "ANM"; + case MIC: return "MIC"; + case PLNT: return "PLNT"; + case PSN: return "PSN"; + case MAT: return "MAT"; + case CHEM: return "CHEM"; + case FOOD: return "FOOD"; + case MMAT: return "MMAT"; + case CONT: return "CONT"; + case HOLD: return "HOLD"; + case DEV: return "DEV"; + case CER: return "CER"; + case MODDV: return "MODDV"; + case ORG: return "ORG"; + case PUB: return "PUB"; + case STATE: return "STATE"; + case NAT: return "NAT"; + case PLC: return "PLC"; + case CITY: return "CITY"; + case COUNTRY: return "COUNTRY"; + case COUNTY: return "COUNTY"; + case PROVINCE: return "PROVINCE"; + case RGRP: return "RGRP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityClass"; + } + public String getDefinition() { + switch (this) { + case ENT: return "Corresponds to the Entity class"; + case HCE: return "A health chart included to serve as a document receiving entity in the management of medical records."; + case LIV: return "Anything that essentially has the property of life, independent of current state (a dead human corpse is still essentially a living subject)."; + case NLIV: return "A subtype of living subject that includes all living things except the species Homo Sapiens."; + case ANM: return "A living subject from the animal kingdom."; + case MIC: return "All single celled living organisms including protozoa, bacteria, yeast, viruses, etc."; + case PLNT: return "A living subject from the order of plants."; + case PSN: return "A living subject of the species homo sapiens."; + case MAT: return "Any thing that has extension in space and mass, may be of living or non-living origin."; + case CHEM: return "A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g., IUPAC codes."; + case FOOD: return "Naturally occurring, processed or manufactured entities that are primarily used as food for humans and animals."; + case MMAT: return "Corresponds to the ManufacturedMaterial class"; + case CONT: return "A container of other entities."; + case HOLD: return "A type of container that can hold other containers or other holders."; + case DEV: return "A subtype of ManufacturedMaterial used in an activity, without being substantially changed through that activity. The kind of device is identified by the code attribute inherited from Entity.\r\n\n \n Usage: This includes durable (reusable) medical equipment as well as disposable equipment."; + case CER: return "A physical artifact that stores information about the granting of authorization."; + case MODDV: return "Class to contain unique attributes of diagnostic imaging equipment."; + case ORG: return "A social or legal structure formed by human beings."; + case PUB: return "An agency of the people of a state often assuming some authority over a certain matter. Includes government, governmental agencies, associations."; + case STATE: return "A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g., one of the United States of America or a French departement), counties or municipalities. Refine using, e.g., ISO country codes, FIPS-PUB state codes, etc."; + case NAT: return "A politically organized body of people bonded by territory and known as a nation."; + case PLC: return "A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant."; + case CITY: return "The territory of a city, town or other municipality."; + case COUNTRY: return "The territory of a sovereign nation."; + case COUNTY: return "The territory of a county, parish or other division of a state or province."; + case PROVINCE: return "The territory of a state, province, department or other division of a sovereign country."; + case RGRP: return "A grouping of resources (personnel, material, or places) to be used for scheduling purposes. May be a pool of like-type resources, a team, or combination of personnel, material and places."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ENT: return "entity"; + case HCE: return "health chart entity"; + case LIV: return "living subject"; + case NLIV: return "non-person living subject"; + case ANM: return "animal"; + case MIC: return "microorganism"; + case PLNT: return "plant"; + case PSN: return "person"; + case MAT: return "material"; + case CHEM: return "chemical substance"; + case FOOD: return "food"; + case MMAT: return "manufactured material"; + case CONT: return "container"; + case HOLD: return "holder"; + case DEV: return "device"; + case CER: return "certificate representation"; + case MODDV: return "imaging modality"; + case ORG: return "organization"; + case PUB: return "public institution"; + case STATE: return "state"; + case NAT: return "Nation"; + case PLC: return "place"; + case CITY: return "city or town"; + case COUNTRY: return "country"; + case COUNTY: return "county or parish"; + case PROVINCE: return "state or province"; + case RGRP: return "group"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClassEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClassEnumFactory.java new file mode 100644 index 00000000000..e28848e0866 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityClassEnumFactory.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityClassEnumFactory implements EnumFactory { + + public V3EntityClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ENT".equals(codeString)) + return V3EntityClass.ENT; + if ("HCE".equals(codeString)) + return V3EntityClass.HCE; + if ("LIV".equals(codeString)) + return V3EntityClass.LIV; + if ("NLIV".equals(codeString)) + return V3EntityClass.NLIV; + if ("ANM".equals(codeString)) + return V3EntityClass.ANM; + if ("MIC".equals(codeString)) + return V3EntityClass.MIC; + if ("PLNT".equals(codeString)) + return V3EntityClass.PLNT; + if ("PSN".equals(codeString)) + return V3EntityClass.PSN; + if ("MAT".equals(codeString)) + return V3EntityClass.MAT; + if ("CHEM".equals(codeString)) + return V3EntityClass.CHEM; + if ("FOOD".equals(codeString)) + return V3EntityClass.FOOD; + if ("MMAT".equals(codeString)) + return V3EntityClass.MMAT; + if ("CONT".equals(codeString)) + return V3EntityClass.CONT; + if ("HOLD".equals(codeString)) + return V3EntityClass.HOLD; + if ("DEV".equals(codeString)) + return V3EntityClass.DEV; + if ("CER".equals(codeString)) + return V3EntityClass.CER; + if ("MODDV".equals(codeString)) + return V3EntityClass.MODDV; + if ("ORG".equals(codeString)) + return V3EntityClass.ORG; + if ("PUB".equals(codeString)) + return V3EntityClass.PUB; + if ("STATE".equals(codeString)) + return V3EntityClass.STATE; + if ("NAT".equals(codeString)) + return V3EntityClass.NAT; + if ("PLC".equals(codeString)) + return V3EntityClass.PLC; + if ("CITY".equals(codeString)) + return V3EntityClass.CITY; + if ("COUNTRY".equals(codeString)) + return V3EntityClass.COUNTRY; + if ("COUNTY".equals(codeString)) + return V3EntityClass.COUNTY; + if ("PROVINCE".equals(codeString)) + return V3EntityClass.PROVINCE; + if ("RGRP".equals(codeString)) + return V3EntityClass.RGRP; + throw new IllegalArgumentException("Unknown V3EntityClass code '"+codeString+"'"); + } + + public String toCode(V3EntityClass code) { + if (code == V3EntityClass.ENT) + return "ENT"; + if (code == V3EntityClass.HCE) + return "HCE"; + if (code == V3EntityClass.LIV) + return "LIV"; + if (code == V3EntityClass.NLIV) + return "NLIV"; + if (code == V3EntityClass.ANM) + return "ANM"; + if (code == V3EntityClass.MIC) + return "MIC"; + if (code == V3EntityClass.PLNT) + return "PLNT"; + if (code == V3EntityClass.PSN) + return "PSN"; + if (code == V3EntityClass.MAT) + return "MAT"; + if (code == V3EntityClass.CHEM) + return "CHEM"; + if (code == V3EntityClass.FOOD) + return "FOOD"; + if (code == V3EntityClass.MMAT) + return "MMAT"; + if (code == V3EntityClass.CONT) + return "CONT"; + if (code == V3EntityClass.HOLD) + return "HOLD"; + if (code == V3EntityClass.DEV) + return "DEV"; + if (code == V3EntityClass.CER) + return "CER"; + if (code == V3EntityClass.MODDV) + return "MODDV"; + if (code == V3EntityClass.ORG) + return "ORG"; + if (code == V3EntityClass.PUB) + return "PUB"; + if (code == V3EntityClass.STATE) + return "STATE"; + if (code == V3EntityClass.NAT) + return "NAT"; + if (code == V3EntityClass.PLC) + return "PLC"; + if (code == V3EntityClass.CITY) + return "CITY"; + if (code == V3EntityClass.COUNTRY) + return "COUNTRY"; + if (code == V3EntityClass.COUNTY) + return "COUNTY"; + if (code == V3EntityClass.PROVINCE) + return "PROVINCE"; + if (code == V3EntityClass.RGRP) + return "RGRP"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCode.java new file mode 100644 index 00000000000..ebc65b63053 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCode.java @@ -0,0 +1,1382 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityCode { + + /** + * Types of Material for EntityClass "MAT" + */ + _MATERIALENTITYCLASSTYPE, + /** + * Material intended to hold another material for purpose of storage or transport. + */ + _CONTAINERENTITYTYPE, + /** + * A material intended to hold other materials for purposes of storage or transportation + */ + PKG, + /** + * A container having dimensions that adjust somewhat based on the amount and shape of the material placed within it. + */ + _NONRIGIDCONTAINERENTITYTYPE, + /** + * A pouched or pendulous container. + */ + BAG, + /** + * A paper + */ + PACKT, + /** + * A small bag or container made of a soft material. + */ + PCH, + /** + * A small bag or packet containing a small portion of a substance. + */ + SACH, + /** + * A container having a fixed and inflexible dimensions and volume + */ + _RIGIDCONTAINERENTITYTYPE, + /** + * Container intended to contain sufficient material for only one use. + */ + _INDIVIDUALPACKAGEENTITYTYPE, + /** + * A small sealed glass container that holds a measured amount of a medicinal substance. + */ + AMP, + /** + * Individually dosed ophthalmic solution. One time eye dropper dispenser. + */ + MINIM, + /** + * Individually dosed inhalation solution. + */ + NEBAMP, + /** + * A container either glass or plastic and a narrow neck, for storing liquid. + */ + OVUL, + /** + * A container intended to contain sufficient material for more than one use. (I.e. Material is intended to be removed from the container at more than one discrete time period.) + */ + _MULTIUSECONTAINERENTITYTYPE, + /** + * A container, typically rounded, either glass or plastic with a narrow neck and capable of storing liquid. + */ + BOT, + /** + * A bottle of yellow to brown color. Used to store light-sensitive materials + */ + BOTA, + /** + * A bottle with a cap designed to release the contained liquid in droplets of a specific size. + */ + BOTD, + /** + * A bottle made of glass + */ + BOTG, + /** + * A bottle made of plastic + */ + BOTP, + /** + * A bottle made of polyethylene + */ + BOTPLY, + /** + * A 6-sided container commonly made from paper or cardboard used for solid forms. + */ + BOX, + /** + * A metal container in which a material is hermetically sealed to enable storage over long periods. + */ + CAN, + /** + * A sealed container of liquid or powder intended to be loaded into a device. + */ + CART, + /** + * A pressurized metal container holding a substance released as a spray or aerosol. + */ + CNSTR, + /** + * A container of glass, earthenware, plastic, etc. Top of the container has a diameter of similar size to the diameter of the container as a whole + */ + JAR, + /** + * A deep vessel for holding liquids, with a handle and often with a spout or lip shape for pouring. + */ + JUG, + /** + * A lidded container made of thin sheet metal. + */ + TIN, + /** + * An open flat bottomed round container. + */ + TUB, + /** + * A long hollow rigid or flexible cylinder. Material is extruded by squeezing the container. + */ + TUBE, + /** + * A small cylindrical glass for holding liquid medicines. + */ + VIAL, + /** + * A bubblepack. Medications sealed individually, separated into doses. + */ + BLSTRPK, + /** + * A bubble pack card. Multiple individual/separated doses. + */ + CARD, + /** + * A container intended to contain sufficient material for more than one use, but grouped or organized to provide individual access to sufficient material for a single use. Often used to ensure that the proper type and amount of material is consumed/expended for each use. + */ + COMPPKG, + /** + * Rotatable dispenser. Eg. Birth control package. + */ + DIALPK, + /** + * Object that is thin, flat, and circular. Doses of medication often contained in bubbles on the disk. + */ + DISK, + /** + * Special packaging that will help patients take their medications on a regular basis. + */ + DOSET, + /** + * A continuous strip of plastic sectioned into individual pouches, each one containing the quantity of 1 or more medications intended to be administered at a specific time + */ + STRIP, + /** + * A container for a diverse collection of products intended to be used together for some purpose (e.g. Medicinal kits often contain a syringe, a needle and the injectable medication). + */ + KIT, + /** + * A kit in which the components are interconnected. + */ + SYSTM, + /** + * A device with direct or indirect therapeutic purpose. Values for EntityCode when EntityClass = "DEV" + */ + _MEDICALDEVICE, + /** + * A device used to allow access to a part of a body + */ + _ACCESSMEDICALDEVICE, + /** + * A hollow tube used to administer a substance into a vein, artery or body cavity + */ + LINE, + /** + * A line used to administer a substance into an artery + */ + IALINE, + /** + * A line used to administer a substance into a vein + */ + IVLINE, + /** + * A device intended to administer a substance to a subject + */ + _ADMINISTRATIONMEDICALDEVICE, + /** + * A device intended to administer liquid into a subject via a + */ + _INJECTIONMEDICALDEVICE, + /** + * Automatically injects medication. + */ + AINJ, + /** + * A device which can contain a cartridge for injection purposes. Eg. Insulin pen. + */ + PEN, + /** + * A barrel with a plunger. + */ + SYR, + /** + * A device used to apply a liquid or powder to a surface. + */ + APLCTR, + /** + * A small device used for inhaling medicine in the form of a vapour or gas in order to ease a respiratory condition such as asthma or to relieve nasal congestion. + */ + INH, + /** + * The device used to inhale the doses of medication contained in the disk form. + */ + DSKS, + /** + * The device used to inhale the doses of medication contained in the disk form. + */ + DSKUNH, + /** + * Asthma medication delivery device. + */ + TRBINH, + /** + * A device that is used to raise, compress, or transfer liquids or gases and is operated by a piston or similar mechanism. + */ + PMP, + /** + * Set of codes related to specimen additives + */ + _SPECIMENADDITIVEENTITY, + /** + * ACD Solution A of trisodium citrate, 22.0g/L; citric acid, 8.0 g/L; and dextrose 24.5 g/L. Used in Blood banking and histocompatibilty testing + */ + ACDA, + /** + * ACD Solution B of trisodium citrate, 13.2g/L; citric acid, 4.8 g/L; and dextrose 14.7 g/L. Used in Blood banking and histocompatibilty testing. + */ + ACDB, + /** + * 50% V/V acetic acid in water. Used as a urine preservative + */ + ACET, + /** + * Sodium Chloride 3.0g, Potassium Chloride 0.2g, Calcium Chloride 0.1g, Magnesium Chloride 0.1g, Monopotassium Phosphate 0.2g, Disodium Phosphate 1.15g, Sodium Thiogly collate 1.0g, Distilled Water 1 liter + */ + AMIES, + /** + * Any medium used to maintain bacterial viability (e.g. Stuart's, Cary-Blair, Amies) + */ + BACTM, + /** + * Formaldehyde 4% w/v; methyl alcohol 1% w/v; phosphate buffering salts. Tissue preservative + */ + BF10, + /** + * Powdered boric acid (usually 10 g) added to 24-hour urine collections as a preservative. + */ + BOR, + /** + * Picric acid, saturated aqueous solution (750.0 ml), 37-40% formalin (250.0 ml), glacial acetic acid (50.0 ml). Tissue preservative. + */ + BOUIN, + /** + * 50% skim milk in 0.01 M phosphate-buffered saline. Maintain virus viability + */ + BSKM, + /** + * A 3.2% solution of Sodium Citrate in water. Used as a blood preservative + */ + C32, + /** + * A 3.8% solution of Sodium Citrate in water. Used as a blood preservative + */ + C38, + /** + * A modification of buffered 10% formalin used as a general tissue preservative. + */ + CARS, + /** + * Sodium Thioglycollate 1.5 g, Disodium Hydrogen Phosphate 1.1 g, Sodium Chloride 5.0 g, Calcium Chloride 0.09 g, Agar 5.0 g, per Liter of Water + */ + CARY, + /** + * Any of a number of non-nutritive buffered media used to maintain Chlamydia viability during transportation to the laboratory + */ + CHLTM, + /** + * Buffered tri-sodium citrate solution with theophylline, adenosine and dipyridamole + */ + CTAD, + /** + * Potassium EDTA 15% solution in water + */ + EDTK15, + /** + * Potassium EDTA 7.5% solution in water + */ + EDTK75, + /** + * Sodium fluoride and Disodium EDTA + */ + EDTN, + /** + * Any of a number of non-nutritive buffered media used to maintain enteric bacterial viability during transportation to the laboratory + */ + ENT, + /** + * A 10% v/v solution in water of formalin( a 37% solution of formaldehyde and water). Used for tissue preservation. + */ + F10, + /** + * Thrombin plus soybean trypsin inhibitor. For use in identifying fibrn degredation products. + */ + FDP, + /** + * Sodium fluoride, 10mg added as a urine preservative. + */ + FL10, + /** + * Sodium fluoride, 100mg added as a urine preservative. + */ + FL100, + /** + * A solution of HCl containing 6moles of hydrogen ion/L. Used as a Urine Preservative. + */ + HCL6, + /** + * Ammonium heparin + */ + HEPA, + /** + * Lithium heparin salt + */ + HEPL, + /** + * Sodium heparin salt + */ + HEPN, + /** + * 6N Nitric acid used to preserve urine for heavy metal analysis. + */ + HNO3, + /** + * A transport medium formulated to maintain Bordetella pertussis viability. + */ + JKM, + /** + * 5% Glutaraldehyde, 4% Formaldehyde in 0.08M buffer. Tissue preservation + */ + KARN, + /** + * Potassium oxalate and sodium fluoride in a 1.25:1 ratio + */ + KOX, + /** + * Iodoacetate lithium salt + */ + LIA, + /** + * Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with HEPES buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to + */ + M4, + /** + * Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Gentamicin and amphotericin B are used to inhibit c + */ + M4RT, + /** + * Modified Hank's balanced salt solution supplemented with protein stabilizers, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to inhibit c + */ + M5, + /** + * 1M potassium citrate, pH 7.0 2.5 ml, 0.1M magnesium sulfate 5.0 ml, 0.1M N-ethyl malemide 5.0 ml, dH2O 87.5 ml, ammonium sulfate 55gm. Preserve antigens for Immunofluorescence procedures + */ + MICHTM, + /** + * A buffered medium with ammonium sulfate added to preserve antigens for Immunofluorescence procedures + */ + MMDTM, + /** + * Sodium fluoride + */ + NAF, + /** + * No additive. Specifically identifes the specimen as having no additives. + */ + NONE, + /** + * 0.12 g NaCl, 0.004 g MgSO, 0.004 g, CaCl, 0.142 g Na2HPO4 and 0.136 g KH2PO4 per liter of distilled water. Maintain Acanthaoemba viability. + */ + PAGE, + /** + * Phenol. Urine preservative + */ + PHENOL, + /** + * Polyvinyl alcohol + */ + PVA, + /** + * A transport medium formulated to maintain Bordetella pertussis viability. + */ + RLM, + /** + * Diatomaceous earth. For glucose determination blood samples + */ + SILICA, + /** + * Sodium polyanethol sulfonate in saline. Anticomplementary and antiphagocytic properties. Used in blood culture collection. + */ + SPS, + /** + * Polymer separator gel with clot activator + */ + SST, + /** + * Sodium Glycerophosphate 10.0g, Calcium Chloride 0.1g, Mercaptoacetic Acid 1.0ml, Distilled Water 1 liter + */ + STUTM, + /** + * Thrombin. Accelerates clotting. + */ + THROM, + /** + * 2-Isopropyl-5-methyl phenol. A preservative for 24 Hr Urine samples + */ + THYMOL, + /** + * A nutritive medium with a reducing agent (sodium thioglycolate) which, due to a chemical reaction, removes oxygen from the broth. + */ + THYO, + /** + * Also known as Methylbenzene; Toluol; Phenylmethane. A preservative for 24 Hr Urine samples + */ + TOLU, + /** + * A buffered salt solution with antifungal agents added for the collection and transport of Ureaplasma specimens. + */ + URETM, + /** + * Sucrose 74.6g, Potassium hydrogenphosphate 0.52g, L-glutamic acid 0.72g, Bovine serum albumin 5.0g, Gentamicin 50mg, Potassium dihydrogenphosphate 1.25g, L-15 medium 9.9L, Water to 10L. Maintain Virus viability. + */ + VIRTM, + /** + * 3.8% Citrate buffered to a pH of 5.5 for Westergren Sedimentation Rate + */ + WEST, + /** + * A manufactured product that is produced from the raw blood oi a donor with the intention of using it in a recipient transfusion. + */ + BLDPRD, + /** + * A Type of medicine that creates an immune protection without the recipient experiencing the disease. + */ + VCCNE, + /** + * A substance whose therapeutic effect is produced by chemical action within the body. + */ + _DRUGENTITY, + /** + * Any substance or mixture of substances manufactured, sold or represented for use in: (a) the diagnosis, treatment, mitigation or prevention of a disease, disorder, abnormal physical state, or its symptoms, in human beings or animals; (b) restoring, correcting or modifying organic functions in human beings or animals. + */ + _CLINICALDRUG, + /** + * Indicates types of allergy and intolerance agents which are non-drugs. (E.g. foods, latex, etc.) + */ + _NONDRUGAGENTENTITY, + /** + * egg + */ + NDA01, + /** + * fish + */ + NDA02, + /** + * lactose + */ + NDA03, + /** + * peanut + */ + NDA04, + /** + * soy + */ + NDA05, + /** + * sulfites + */ + NDA06, + /** + * wheat or gluten + */ + NDA07, + /** + * isocyanates + */ + NDA08, + /** + * solvents + */ + NDA09, + /** + * oils + */ + NDA10, + /** + * venoms + */ + NDA11, + /** + * latex + */ + NDA12, + /** + * shellfish + */ + NDA13, + /** + * strawberries + */ + NDA14, + /** + * tomatoes + */ + NDA15, + /** + * dust + */ + NDA16, + /** + * dust mites + */ + NDA17, + /** + * Further classifies entities of classCode ORG. + */ + _ORGANIZATIONENTITYTYPE, + /** + * The group of persons who occupy a single housing unit. + */ + HHOLD, + /** + * Codes identifying nation states. Allows for finer grained specification of Entity with classcode <= NAT + + + Example:ISO3166 country codes. + */ + NAT, + /** + * An organization that provides religious rites of worship. + */ + RELIG, + /** + * Types of places for EntityClass "PLC" + */ + _PLACEENTITYTYPE, + /** + * The location of a bed + */ + BED, + /** + * The location of a building + */ + BLDG, + /** + * The location of a floor of a building + */ + FLOOR, + /** + * The location of a room + */ + ROOM, + /** + * The location of a wing of a building (e.g. East Wing). The same room number for the same floor number can be distinguished by wing number in some situations + */ + WING, + /** + * Codes to characterize a Resource Group using categories that typify its membership and/or function + + . + + + Example: PractitionerGroup + */ + _RESOURCEGROUPENTITYTYPE, + /** + * PractitionerGroup + */ + PRAC, + /** + * added to help the parsers + */ + NULL; + public static V3EntityCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MaterialEntityClassType".equals(codeString)) + return _MATERIALENTITYCLASSTYPE; + if ("_ContainerEntityType".equals(codeString)) + return _CONTAINERENTITYTYPE; + if ("PKG".equals(codeString)) + return PKG; + if ("_NonRigidContainerEntityType".equals(codeString)) + return _NONRIGIDCONTAINERENTITYTYPE; + if ("BAG".equals(codeString)) + return BAG; + if ("PACKT".equals(codeString)) + return PACKT; + if ("PCH".equals(codeString)) + return PCH; + if ("SACH".equals(codeString)) + return SACH; + if ("_RigidContainerEntityType".equals(codeString)) + return _RIGIDCONTAINERENTITYTYPE; + if ("_IndividualPackageEntityType".equals(codeString)) + return _INDIVIDUALPACKAGEENTITYTYPE; + if ("AMP".equals(codeString)) + return AMP; + if ("MINIM".equals(codeString)) + return MINIM; + if ("NEBAMP".equals(codeString)) + return NEBAMP; + if ("OVUL".equals(codeString)) + return OVUL; + if ("_MultiUseContainerEntityType".equals(codeString)) + return _MULTIUSECONTAINERENTITYTYPE; + if ("BOT".equals(codeString)) + return BOT; + if ("BOTA".equals(codeString)) + return BOTA; + if ("BOTD".equals(codeString)) + return BOTD; + if ("BOTG".equals(codeString)) + return BOTG; + if ("BOTP".equals(codeString)) + return BOTP; + if ("BOTPLY".equals(codeString)) + return BOTPLY; + if ("BOX".equals(codeString)) + return BOX; + if ("CAN".equals(codeString)) + return CAN; + if ("CART".equals(codeString)) + return CART; + if ("CNSTR".equals(codeString)) + return CNSTR; + if ("JAR".equals(codeString)) + return JAR; + if ("JUG".equals(codeString)) + return JUG; + if ("TIN".equals(codeString)) + return TIN; + if ("TUB".equals(codeString)) + return TUB; + if ("TUBE".equals(codeString)) + return TUBE; + if ("VIAL".equals(codeString)) + return VIAL; + if ("BLSTRPK".equals(codeString)) + return BLSTRPK; + if ("CARD".equals(codeString)) + return CARD; + if ("COMPPKG".equals(codeString)) + return COMPPKG; + if ("DIALPK".equals(codeString)) + return DIALPK; + if ("DISK".equals(codeString)) + return DISK; + if ("DOSET".equals(codeString)) + return DOSET; + if ("STRIP".equals(codeString)) + return STRIP; + if ("KIT".equals(codeString)) + return KIT; + if ("SYSTM".equals(codeString)) + return SYSTM; + if ("_MedicalDevice".equals(codeString)) + return _MEDICALDEVICE; + if ("_AccessMedicalDevice".equals(codeString)) + return _ACCESSMEDICALDEVICE; + if ("LINE".equals(codeString)) + return LINE; + if ("IALINE".equals(codeString)) + return IALINE; + if ("IVLINE".equals(codeString)) + return IVLINE; + if ("_AdministrationMedicalDevice".equals(codeString)) + return _ADMINISTRATIONMEDICALDEVICE; + if ("_InjectionMedicalDevice".equals(codeString)) + return _INJECTIONMEDICALDEVICE; + if ("AINJ".equals(codeString)) + return AINJ; + if ("PEN".equals(codeString)) + return PEN; + if ("SYR".equals(codeString)) + return SYR; + if ("APLCTR".equals(codeString)) + return APLCTR; + if ("INH".equals(codeString)) + return INH; + if ("DSKS".equals(codeString)) + return DSKS; + if ("DSKUNH".equals(codeString)) + return DSKUNH; + if ("TRBINH".equals(codeString)) + return TRBINH; + if ("PMP".equals(codeString)) + return PMP; + if ("_SpecimenAdditiveEntity".equals(codeString)) + return _SPECIMENADDITIVEENTITY; + if ("ACDA".equals(codeString)) + return ACDA; + if ("ACDB".equals(codeString)) + return ACDB; + if ("ACET".equals(codeString)) + return ACET; + if ("AMIES".equals(codeString)) + return AMIES; + if ("BACTM".equals(codeString)) + return BACTM; + if ("BF10".equals(codeString)) + return BF10; + if ("BOR".equals(codeString)) + return BOR; + if ("BOUIN".equals(codeString)) + return BOUIN; + if ("BSKM".equals(codeString)) + return BSKM; + if ("C32".equals(codeString)) + return C32; + if ("C38".equals(codeString)) + return C38; + if ("CARS".equals(codeString)) + return CARS; + if ("CARY".equals(codeString)) + return CARY; + if ("CHLTM".equals(codeString)) + return CHLTM; + if ("CTAD".equals(codeString)) + return CTAD; + if ("EDTK15".equals(codeString)) + return EDTK15; + if ("EDTK75".equals(codeString)) + return EDTK75; + if ("EDTN".equals(codeString)) + return EDTN; + if ("ENT".equals(codeString)) + return ENT; + if ("F10".equals(codeString)) + return F10; + if ("FDP".equals(codeString)) + return FDP; + if ("FL10".equals(codeString)) + return FL10; + if ("FL100".equals(codeString)) + return FL100; + if ("HCL6".equals(codeString)) + return HCL6; + if ("HEPA".equals(codeString)) + return HEPA; + if ("HEPL".equals(codeString)) + return HEPL; + if ("HEPN".equals(codeString)) + return HEPN; + if ("HNO3".equals(codeString)) + return HNO3; + if ("JKM".equals(codeString)) + return JKM; + if ("KARN".equals(codeString)) + return KARN; + if ("KOX".equals(codeString)) + return KOX; + if ("LIA".equals(codeString)) + return LIA; + if ("M4".equals(codeString)) + return M4; + if ("M4RT".equals(codeString)) + return M4RT; + if ("M5".equals(codeString)) + return M5; + if ("MICHTM".equals(codeString)) + return MICHTM; + if ("MMDTM".equals(codeString)) + return MMDTM; + if ("NAF".equals(codeString)) + return NAF; + if ("NONE".equals(codeString)) + return NONE; + if ("PAGE".equals(codeString)) + return PAGE; + if ("PHENOL".equals(codeString)) + return PHENOL; + if ("PVA".equals(codeString)) + return PVA; + if ("RLM".equals(codeString)) + return RLM; + if ("SILICA".equals(codeString)) + return SILICA; + if ("SPS".equals(codeString)) + return SPS; + if ("SST".equals(codeString)) + return SST; + if ("STUTM".equals(codeString)) + return STUTM; + if ("THROM".equals(codeString)) + return THROM; + if ("THYMOL".equals(codeString)) + return THYMOL; + if ("THYO".equals(codeString)) + return THYO; + if ("TOLU".equals(codeString)) + return TOLU; + if ("URETM".equals(codeString)) + return URETM; + if ("VIRTM".equals(codeString)) + return VIRTM; + if ("WEST".equals(codeString)) + return WEST; + if ("BLDPRD".equals(codeString)) + return BLDPRD; + if ("VCCNE".equals(codeString)) + return VCCNE; + if ("_DrugEntity".equals(codeString)) + return _DRUGENTITY; + if ("_ClinicalDrug".equals(codeString)) + return _CLINICALDRUG; + if ("_NonDrugAgentEntity".equals(codeString)) + return _NONDRUGAGENTENTITY; + if ("NDA01".equals(codeString)) + return NDA01; + if ("NDA02".equals(codeString)) + return NDA02; + if ("NDA03".equals(codeString)) + return NDA03; + if ("NDA04".equals(codeString)) + return NDA04; + if ("NDA05".equals(codeString)) + return NDA05; + if ("NDA06".equals(codeString)) + return NDA06; + if ("NDA07".equals(codeString)) + return NDA07; + if ("NDA08".equals(codeString)) + return NDA08; + if ("NDA09".equals(codeString)) + return NDA09; + if ("NDA10".equals(codeString)) + return NDA10; + if ("NDA11".equals(codeString)) + return NDA11; + if ("NDA12".equals(codeString)) + return NDA12; + if ("NDA13".equals(codeString)) + return NDA13; + if ("NDA14".equals(codeString)) + return NDA14; + if ("NDA15".equals(codeString)) + return NDA15; + if ("NDA16".equals(codeString)) + return NDA16; + if ("NDA17".equals(codeString)) + return NDA17; + if ("_OrganizationEntityType".equals(codeString)) + return _ORGANIZATIONENTITYTYPE; + if ("HHOLD".equals(codeString)) + return HHOLD; + if ("NAT".equals(codeString)) + return NAT; + if ("RELIG".equals(codeString)) + return RELIG; + if ("_PlaceEntityType".equals(codeString)) + return _PLACEENTITYTYPE; + if ("BED".equals(codeString)) + return BED; + if ("BLDG".equals(codeString)) + return BLDG; + if ("FLOOR".equals(codeString)) + return FLOOR; + if ("ROOM".equals(codeString)) + return ROOM; + if ("WING".equals(codeString)) + return WING; + if ("_ResourceGroupEntityType".equals(codeString)) + return _RESOURCEGROUPENTITYTYPE; + if ("PRAC".equals(codeString)) + return PRAC; + throw new FHIRException("Unknown V3EntityCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "_MaterialEntityClassType"; + case _CONTAINERENTITYTYPE: return "_ContainerEntityType"; + case PKG: return "PKG"; + case _NONRIGIDCONTAINERENTITYTYPE: return "_NonRigidContainerEntityType"; + case BAG: return "BAG"; + case PACKT: return "PACKT"; + case PCH: return "PCH"; + case SACH: return "SACH"; + case _RIGIDCONTAINERENTITYTYPE: return "_RigidContainerEntityType"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "_IndividualPackageEntityType"; + case AMP: return "AMP"; + case MINIM: return "MINIM"; + case NEBAMP: return "NEBAMP"; + case OVUL: return "OVUL"; + case _MULTIUSECONTAINERENTITYTYPE: return "_MultiUseContainerEntityType"; + case BOT: return "BOT"; + case BOTA: return "BOTA"; + case BOTD: return "BOTD"; + case BOTG: return "BOTG"; + case BOTP: return "BOTP"; + case BOTPLY: return "BOTPLY"; + case BOX: return "BOX"; + case CAN: return "CAN"; + case CART: return "CART"; + case CNSTR: return "CNSTR"; + case JAR: return "JAR"; + case JUG: return "JUG"; + case TIN: return "TIN"; + case TUB: return "TUB"; + case TUBE: return "TUBE"; + case VIAL: return "VIAL"; + case BLSTRPK: return "BLSTRPK"; + case CARD: return "CARD"; + case COMPPKG: return "COMPPKG"; + case DIALPK: return "DIALPK"; + case DISK: return "DISK"; + case DOSET: return "DOSET"; + case STRIP: return "STRIP"; + case KIT: return "KIT"; + case SYSTM: return "SYSTM"; + case _MEDICALDEVICE: return "_MedicalDevice"; + case _ACCESSMEDICALDEVICE: return "_AccessMedicalDevice"; + case LINE: return "LINE"; + case IALINE: return "IALINE"; + case IVLINE: return "IVLINE"; + case _ADMINISTRATIONMEDICALDEVICE: return "_AdministrationMedicalDevice"; + case _INJECTIONMEDICALDEVICE: return "_InjectionMedicalDevice"; + case AINJ: return "AINJ"; + case PEN: return "PEN"; + case SYR: return "SYR"; + case APLCTR: return "APLCTR"; + case INH: return "INH"; + case DSKS: return "DSKS"; + case DSKUNH: return "DSKUNH"; + case TRBINH: return "TRBINH"; + case PMP: return "PMP"; + case _SPECIMENADDITIVEENTITY: return "_SpecimenAdditiveEntity"; + case ACDA: return "ACDA"; + case ACDB: return "ACDB"; + case ACET: return "ACET"; + case AMIES: return "AMIES"; + case BACTM: return "BACTM"; + case BF10: return "BF10"; + case BOR: return "BOR"; + case BOUIN: return "BOUIN"; + case BSKM: return "BSKM"; + case C32: return "C32"; + case C38: return "C38"; + case CARS: return "CARS"; + case CARY: return "CARY"; + case CHLTM: return "CHLTM"; + case CTAD: return "CTAD"; + case EDTK15: return "EDTK15"; + case EDTK75: return "EDTK75"; + case EDTN: return "EDTN"; + case ENT: return "ENT"; + case F10: return "F10"; + case FDP: return "FDP"; + case FL10: return "FL10"; + case FL100: return "FL100"; + case HCL6: return "HCL6"; + case HEPA: return "HEPA"; + case HEPL: return "HEPL"; + case HEPN: return "HEPN"; + case HNO3: return "HNO3"; + case JKM: return "JKM"; + case KARN: return "KARN"; + case KOX: return "KOX"; + case LIA: return "LIA"; + case M4: return "M4"; + case M4RT: return "M4RT"; + case M5: return "M5"; + case MICHTM: return "MICHTM"; + case MMDTM: return "MMDTM"; + case NAF: return "NAF"; + case NONE: return "NONE"; + case PAGE: return "PAGE"; + case PHENOL: return "PHENOL"; + case PVA: return "PVA"; + case RLM: return "RLM"; + case SILICA: return "SILICA"; + case SPS: return "SPS"; + case SST: return "SST"; + case STUTM: return "STUTM"; + case THROM: return "THROM"; + case THYMOL: return "THYMOL"; + case THYO: return "THYO"; + case TOLU: return "TOLU"; + case URETM: return "URETM"; + case VIRTM: return "VIRTM"; + case WEST: return "WEST"; + case BLDPRD: return "BLDPRD"; + case VCCNE: return "VCCNE"; + case _DRUGENTITY: return "_DrugEntity"; + case _CLINICALDRUG: return "_ClinicalDrug"; + case _NONDRUGAGENTENTITY: return "_NonDrugAgentEntity"; + case NDA01: return "NDA01"; + case NDA02: return "NDA02"; + case NDA03: return "NDA03"; + case NDA04: return "NDA04"; + case NDA05: return "NDA05"; + case NDA06: return "NDA06"; + case NDA07: return "NDA07"; + case NDA08: return "NDA08"; + case NDA09: return "NDA09"; + case NDA10: return "NDA10"; + case NDA11: return "NDA11"; + case NDA12: return "NDA12"; + case NDA13: return "NDA13"; + case NDA14: return "NDA14"; + case NDA15: return "NDA15"; + case NDA16: return "NDA16"; + case NDA17: return "NDA17"; + case _ORGANIZATIONENTITYTYPE: return "_OrganizationEntityType"; + case HHOLD: return "HHOLD"; + case NAT: return "NAT"; + case RELIG: return "RELIG"; + case _PLACEENTITYTYPE: return "_PlaceEntityType"; + case BED: return "BED"; + case BLDG: return "BLDG"; + case FLOOR: return "FLOOR"; + case ROOM: return "ROOM"; + case WING: return "WING"; + case _RESOURCEGROUPENTITYTYPE: return "_ResourceGroupEntityType"; + case PRAC: return "PRAC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityCode"; + } + public String getDefinition() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "Types of Material for EntityClass \"MAT\""; + case _CONTAINERENTITYTYPE: return "Material intended to hold another material for purpose of storage or transport."; + case PKG: return "A material intended to hold other materials for purposes of storage or transportation"; + case _NONRIGIDCONTAINERENTITYTYPE: return "A container having dimensions that adjust somewhat based on the amount and shape of the material placed within it."; + case BAG: return "A pouched or pendulous container."; + case PACKT: return "A paper"; + case PCH: return "A small bag or container made of a soft material."; + case SACH: return "A small bag or packet containing a small portion of a substance."; + case _RIGIDCONTAINERENTITYTYPE: return "A container having a fixed and inflexible dimensions and volume"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "Container intended to contain sufficient material for only one use."; + case AMP: return "A small sealed glass container that holds a measured amount of a medicinal substance."; + case MINIM: return "Individually dosed ophthalmic solution. One time eye dropper dispenser."; + case NEBAMP: return "Individually dosed inhalation solution."; + case OVUL: return "A container either glass or plastic and a narrow neck, for storing liquid."; + case _MULTIUSECONTAINERENTITYTYPE: return "A container intended to contain sufficient material for more than one use. (I.e. Material is intended to be removed from the container at more than one discrete time period.)"; + case BOT: return "A container, typically rounded, either glass or plastic with a narrow neck and capable of storing liquid."; + case BOTA: return "A bottle of yellow to brown color. Used to store light-sensitive materials"; + case BOTD: return "A bottle with a cap designed to release the contained liquid in droplets of a specific size."; + case BOTG: return "A bottle made of glass"; + case BOTP: return "A bottle made of plastic"; + case BOTPLY: return "A bottle made of polyethylene"; + case BOX: return "A 6-sided container commonly made from paper or cardboard used for solid forms."; + case CAN: return "A metal container in which a material is hermetically sealed to enable storage over long periods."; + case CART: return "A sealed container of liquid or powder intended to be loaded into a device."; + case CNSTR: return "A pressurized metal container holding a substance released as a spray or aerosol."; + case JAR: return "A container of glass, earthenware, plastic, etc. Top of the container has a diameter of similar size to the diameter of the container as a whole"; + case JUG: return "A deep vessel for holding liquids, with a handle and often with a spout or lip shape for pouring."; + case TIN: return "A lidded container made of thin sheet metal."; + case TUB: return "An open flat bottomed round container."; + case TUBE: return "A long hollow rigid or flexible cylinder. Material is extruded by squeezing the container."; + case VIAL: return "A small cylindrical glass for holding liquid medicines."; + case BLSTRPK: return "A bubblepack. Medications sealed individually, separated into doses."; + case CARD: return "A bubble pack card. Multiple individual/separated doses."; + case COMPPKG: return "A container intended to contain sufficient material for more than one use, but grouped or organized to provide individual access to sufficient material for a single use. Often used to ensure that the proper type and amount of material is consumed/expended for each use."; + case DIALPK: return "Rotatable dispenser. Eg. Birth control package."; + case DISK: return "Object that is thin, flat, and circular. Doses of medication often contained in bubbles on the disk."; + case DOSET: return "Special packaging that will help patients take their medications on a regular basis."; + case STRIP: return "A continuous strip of plastic sectioned into individual pouches, each one containing the quantity of 1 or more medications intended to be administered at a specific time"; + case KIT: return "A container for a diverse collection of products intended to be used together for some purpose (e.g. Medicinal kits often contain a syringe, a needle and the injectable medication)."; + case SYSTM: return "A kit in which the components are interconnected."; + case _MEDICALDEVICE: return "A device with direct or indirect therapeutic purpose. Values for EntityCode when EntityClass = \"DEV\""; + case _ACCESSMEDICALDEVICE: return "A device used to allow access to a part of a body"; + case LINE: return "A hollow tube used to administer a substance into a vein, artery or body cavity"; + case IALINE: return "A line used to administer a substance into an artery"; + case IVLINE: return "A line used to administer a substance into a vein"; + case _ADMINISTRATIONMEDICALDEVICE: return "A device intended to administer a substance to a subject"; + case _INJECTIONMEDICALDEVICE: return "A device intended to administer liquid into a subject via a"; + case AINJ: return "Automatically injects medication."; + case PEN: return "A device which can contain a cartridge for injection purposes. Eg. Insulin pen."; + case SYR: return "A barrel with a plunger."; + case APLCTR: return "A device used to apply a liquid or powder to a surface."; + case INH: return "A small device used for inhaling medicine in the form of a vapour or gas in order to ease a respiratory condition such as asthma or to relieve nasal congestion."; + case DSKS: return "The device used to inhale the doses of medication contained in the disk form."; + case DSKUNH: return "The device used to inhale the doses of medication contained in the disk form."; + case TRBINH: return "Asthma medication delivery device."; + case PMP: return "A device that is used to raise, compress, or transfer liquids or gases and is operated by a piston or similar mechanism."; + case _SPECIMENADDITIVEENTITY: return "Set of codes related to specimen additives"; + case ACDA: return "ACD Solution A of trisodium citrate, 22.0g/L; citric acid, 8.0 g/L; and dextrose 24.5 g/L. Used in Blood banking and histocompatibilty testing"; + case ACDB: return "ACD Solution B of trisodium citrate, 13.2g/L; citric acid, 4.8 g/L; and dextrose 14.7 g/L. Used in Blood banking and histocompatibilty testing."; + case ACET: return "50% V/V acetic acid in water. Used as a urine preservative"; + case AMIES: return "Sodium Chloride 3.0g, Potassium Chloride 0.2g, Calcium Chloride 0.1g, Magnesium Chloride 0.1g, Monopotassium Phosphate 0.2g, Disodium Phosphate 1.15g, Sodium Thiogly collate 1.0g, Distilled Water 1 liter"; + case BACTM: return "Any medium used to maintain bacterial viability (e.g. Stuart's, Cary-Blair, Amies)"; + case BF10: return "Formaldehyde 4% w/v; methyl alcohol 1% w/v; phosphate buffering salts. Tissue preservative"; + case BOR: return "Powdered boric acid (usually 10 g) added to 24-hour urine collections as a preservative."; + case BOUIN: return "Picric acid, saturated aqueous solution (750.0 ml), 37-40% formalin (250.0 ml), glacial acetic acid (50.0 ml). Tissue preservative."; + case BSKM: return "50% skim milk in 0.01 M phosphate-buffered saline. Maintain virus viability"; + case C32: return "A 3.2% solution of Sodium Citrate in water. Used as a blood preservative"; + case C38: return "A 3.8% solution of Sodium Citrate in water. Used as a blood preservative"; + case CARS: return "A modification of buffered 10% formalin used as a general tissue preservative."; + case CARY: return "Sodium Thioglycollate 1.5 g, Disodium Hydrogen Phosphate 1.1 g, Sodium Chloride 5.0 g, Calcium Chloride 0.09 g, Agar 5.0 g, per Liter of Water"; + case CHLTM: return "Any of a number of non-nutritive buffered media used to maintain Chlamydia viability during transportation to the laboratory"; + case CTAD: return "Buffered tri-sodium citrate solution with theophylline, adenosine and dipyridamole"; + case EDTK15: return "Potassium EDTA 15% solution in water"; + case EDTK75: return "Potassium EDTA 7.5% solution in water"; + case EDTN: return "Sodium fluoride and Disodium EDTA"; + case ENT: return "Any of a number of non-nutritive buffered media used to maintain enteric bacterial viability during transportation to the laboratory"; + case F10: return "A 10% v/v solution in water of formalin( a 37% solution of formaldehyde and water). Used for tissue preservation."; + case FDP: return "Thrombin plus soybean trypsin inhibitor. For use in identifying fibrn degredation products."; + case FL10: return "Sodium fluoride, 10mg added as a urine preservative."; + case FL100: return "Sodium fluoride, 100mg added as a urine preservative."; + case HCL6: return "A solution of HCl containing 6moles of hydrogen ion/L. Used as a Urine Preservative."; + case HEPA: return "Ammonium heparin"; + case HEPL: return "Lithium heparin salt"; + case HEPN: return "Sodium heparin salt"; + case HNO3: return "6N Nitric acid used to preserve urine for heavy metal analysis."; + case JKM: return "A transport medium formulated to maintain Bordetella pertussis viability."; + case KARN: return "5% Glutaraldehyde, 4% Formaldehyde in 0.08M buffer. Tissue preservation"; + case KOX: return "Potassium oxalate and sodium fluoride in a 1.25:1 ratio"; + case LIA: return "Iodoacetate lithium salt"; + case M4: return "Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with HEPES buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to"; + case M4RT: return "Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Gentamicin and amphotericin B are used to inhibit c"; + case M5: return "Modified Hank's balanced salt solution supplemented with protein stabilizers, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to inhibit c"; + case MICHTM: return "1M potassium citrate, pH 7.0 2.5 ml, 0.1M magnesium sulfate 5.0 ml, 0.1M N-ethyl malemide 5.0 ml, dH2O 87.5 ml, ammonium sulfate 55gm. Preserve antigens for Immunofluorescence procedures"; + case MMDTM: return "A buffered medium with ammonium sulfate added to preserve antigens for Immunofluorescence procedures"; + case NAF: return "Sodium fluoride"; + case NONE: return "No additive. Specifically identifes the specimen as having no additives."; + case PAGE: return "0.12 g NaCl, 0.004 g MgSO, 0.004 g, CaCl, 0.142 g Na2HPO4 and 0.136 g KH2PO4 per liter of distilled water. Maintain Acanthaoemba viability."; + case PHENOL: return "Phenol. Urine preservative"; + case PVA: return "Polyvinyl alcohol"; + case RLM: return "A transport medium formulated to maintain Bordetella pertussis viability."; + case SILICA: return "Diatomaceous earth. For glucose determination blood samples"; + case SPS: return "Sodium polyanethol sulfonate in saline. Anticomplementary and antiphagocytic properties. Used in blood culture collection."; + case SST: return "Polymer separator gel with clot activator"; + case STUTM: return "Sodium Glycerophosphate 10.0g, Calcium Chloride 0.1g, Mercaptoacetic Acid 1.0ml, Distilled Water 1 liter"; + case THROM: return "Thrombin. Accelerates clotting."; + case THYMOL: return "2-Isopropyl-5-methyl phenol. A preservative for 24 Hr Urine samples"; + case THYO: return "A nutritive medium with a reducing agent (sodium thioglycolate) which, due to a chemical reaction, removes oxygen from the broth."; + case TOLU: return "Also known as Methylbenzene; Toluol; Phenylmethane. A preservative for 24 Hr Urine samples"; + case URETM: return "A buffered salt solution with antifungal agents added for the collection and transport of Ureaplasma specimens."; + case VIRTM: return "Sucrose 74.6g, Potassium hydrogenphosphate 0.52g, L-glutamic acid 0.72g, Bovine serum albumin 5.0g, Gentamicin 50mg, Potassium dihydrogenphosphate 1.25g, L-15 medium 9.9L, Water to 10L. Maintain Virus viability."; + case WEST: return "3.8% Citrate buffered to a pH of 5.5 for Westergren Sedimentation Rate"; + case BLDPRD: return "A manufactured product that is produced from the raw blood oi a donor with the intention of using it in a recipient transfusion."; + case VCCNE: return "A Type of medicine that creates an immune protection without the recipient experiencing the disease."; + case _DRUGENTITY: return "A substance whose therapeutic effect is produced by chemical action within the body."; + case _CLINICALDRUG: return "Any substance or mixture of substances manufactured, sold or represented for use in: (a) the diagnosis, treatment, mitigation or prevention of a disease, disorder, abnormal physical state, or its symptoms, in human beings or animals; (b) restoring, correcting or modifying organic functions in human beings or animals."; + case _NONDRUGAGENTENTITY: return "Indicates types of allergy and intolerance agents which are non-drugs. (E.g. foods, latex, etc.)"; + case NDA01: return "egg"; + case NDA02: return "fish"; + case NDA03: return "lactose"; + case NDA04: return "peanut"; + case NDA05: return "soy"; + case NDA06: return "sulfites"; + case NDA07: return "wheat or gluten"; + case NDA08: return "isocyanates"; + case NDA09: return "solvents"; + case NDA10: return "oils"; + case NDA11: return "venoms"; + case NDA12: return "latex"; + case NDA13: return "shellfish"; + case NDA14: return "strawberries"; + case NDA15: return "tomatoes"; + case NDA16: return "dust"; + case NDA17: return "dust mites"; + case _ORGANIZATIONENTITYTYPE: return "Further classifies entities of classCode ORG."; + case HHOLD: return "The group of persons who occupy a single housing unit."; + case NAT: return "Codes identifying nation states. Allows for finer grained specification of Entity with classcode <= NAT\r\n\n \n Example:ISO3166 country codes."; + case RELIG: return "An organization that provides religious rites of worship."; + case _PLACEENTITYTYPE: return "Types of places for EntityClass \"PLC\""; + case BED: return "The location of a bed"; + case BLDG: return "The location of a building"; + case FLOOR: return "The location of a floor of a building"; + case ROOM: return "The location of a room"; + case WING: return "The location of a wing of a building (e.g. East Wing). The same room number for the same floor number can be distinguished by wing number in some situations"; + case _RESOURCEGROUPENTITYTYPE: return "Codes to characterize a Resource Group using categories that typify its membership and/or function\r\n\n .\r\n\n \n Example: PractitionerGroup"; + case PRAC: return "PractitionerGroup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "MaterialEntityClassType"; + case _CONTAINERENTITYTYPE: return "ContainerEntityType"; + case PKG: return "Package"; + case _NONRIGIDCONTAINERENTITYTYPE: return "NonRigidContainerEntityType"; + case BAG: return "Bag"; + case PACKT: return "Packet"; + case PCH: return "Pouch"; + case SACH: return "Sachet"; + case _RIGIDCONTAINERENTITYTYPE: return "RigidContainerEntityType"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "IndividualPackageEntityType"; + case AMP: return "Ampule"; + case MINIM: return "Minim"; + case NEBAMP: return "Nebuamp"; + case OVUL: return "Ovule"; + case _MULTIUSECONTAINERENTITYTYPE: return "MultiUseContainerEntityType"; + case BOT: return "Bottle"; + case BOTA: return "Amber Bottle"; + case BOTD: return "Dropper Bottle"; + case BOTG: return "Glass Bottle"; + case BOTP: return "Plastic Bottle"; + case BOTPLY: return "Polyethylene Bottle"; + case BOX: return "Box"; + case CAN: return "Can"; + case CART: return "Cartridge"; + case CNSTR: return "Canister"; + case JAR: return "Jar"; + case JUG: return "Jug"; + case TIN: return "Tin"; + case TUB: return "Tub"; + case TUBE: return "Tube"; + case VIAL: return "Vial"; + case BLSTRPK: return "Blister Pack"; + case CARD: return "Card"; + case COMPPKG: return "Compliance Package"; + case DIALPK: return "Dial Pack"; + case DISK: return "Disk"; + case DOSET: return "Dosette"; + case STRIP: return "Strip"; + case KIT: return "Kit"; + case SYSTM: return "System"; + case _MEDICALDEVICE: return "MedicalDevice"; + case _ACCESSMEDICALDEVICE: return "AccessMedicalDevice"; + case LINE: return "Line"; + case IALINE: return "Intra-arterial Line"; + case IVLINE: return "Intraveneous Line"; + case _ADMINISTRATIONMEDICALDEVICE: return "AdministrationMedicalDevice"; + case _INJECTIONMEDICALDEVICE: return "InjectionMedicalDevice"; + case AINJ: return "AutoInjector"; + case PEN: return "Pen"; + case SYR: return "Syringe"; + case APLCTR: return "Applicator"; + case INH: return "Inhaler"; + case DSKS: return "Diskus"; + case DSKUNH: return "Diskhaler"; + case TRBINH: return "Turbuhaler"; + case PMP: return "Pump"; + case _SPECIMENADDITIVEENTITY: return "SpecimenAdditiveEntity"; + case ACDA: return "ACD Solution A"; + case ACDB: return "ACD Solution B"; + case ACET: return "Acetic Acid"; + case AMIES: return "Amies transport medium"; + case BACTM: return "Bacterial Transport medium"; + case BF10: return "Buffered 10% formalin"; + case BOR: return "Boric Acid"; + case BOUIN: return "Bouin's solution"; + case BSKM: return "Buffered skim milk"; + case C32: return "3.2% Citrate"; + case C38: return "3.8% Citrate"; + case CARS: return "Carson's Modified 10% formalin"; + case CARY: return "Cary Blair Medium"; + case CHLTM: return "Chlamydia transport medium"; + case CTAD: return "CTAD"; + case EDTK15: return "Potassium/K EDTA 15%"; + case EDTK75: return "Potassium/K EDTA 7.5%"; + case EDTN: return "Sodium/Na EDTA"; + case ENT: return "Enteric bacteria transport medium"; + case F10: return "10% Formalin"; + case FDP: return "Thrombin NIH; soybean trypsin inhibitor"; + case FL10: return "Sodium Fluoride, 10mg"; + case FL100: return "Sodium Fluoride, 100mg"; + case HCL6: return "6N HCL"; + case HEPA: return "Ammonium heparin"; + case HEPL: return "Lithium/Li Heparin"; + case HEPN: return "Sodium/Na Heparin"; + case HNO3: return "Nitric Acid"; + case JKM: return "Jones Kendrick Medium"; + case KARN: return "Karnovsky's fixative"; + case KOX: return "Potassium Oxalate"; + case LIA: return "Lithium iodoacetate"; + case M4: return "M4"; + case M4RT: return "M4-RT"; + case M5: return "M5"; + case MICHTM: return "Michel's transport medium"; + case MMDTM: return "MMD transport medium"; + case NAF: return "Sodium Fluoride"; + case NONE: return "None"; + case PAGE: return "Page's Saline"; + case PHENOL: return "Phenol"; + case PVA: return "Polyvinylalcohol"; + case RLM: return "Reagan Lowe Medium"; + case SILICA: return "Siliceous earth"; + case SPS: return "Sodium polyanethol sulfonate 0.35% in 0.85% sodium chloride"; + case SST: return "Serum Separator Tube"; + case STUTM: return "Stuart transport medium"; + case THROM: return "Thrombin"; + case THYMOL: return "Thymol"; + case THYO: return "Thyoglycolate broth"; + case TOLU: return "Toluene"; + case URETM: return "Ureaplasma transport medium"; + case VIRTM: return "Viral Transport medium"; + case WEST: return "Buffered Citrate"; + case BLDPRD: return "Blood Product"; + case VCCNE: return "Vaccine"; + case _DRUGENTITY: return "DrugEntity"; + case _CLINICALDRUG: return "ClinicalDrug"; + case _NONDRUGAGENTENTITY: return "NonDrugAgentEntity"; + case NDA01: return "egg"; + case NDA02: return "fish"; + case NDA03: return "lactose"; + case NDA04: return "peanut"; + case NDA05: return "soy"; + case NDA06: return "sulfites"; + case NDA07: return "wheat or gluten"; + case NDA08: return "isocyanates"; + case NDA09: return "solvents"; + case NDA10: return "oils"; + case NDA11: return "venoms"; + case NDA12: return "latex"; + case NDA13: return "shellfish"; + case NDA14: return "strawberries"; + case NDA15: return "tomatoes"; + case NDA16: return "dust"; + case NDA17: return "dust mites"; + case _ORGANIZATIONENTITYTYPE: return "OrganizationEntityType"; + case HHOLD: return "household"; + case NAT: return "NationEntityType"; + case RELIG: return "religious institution"; + case _PLACEENTITYTYPE: return "PlaceEntityType"; + case BED: return "Bed Location"; + case BLDG: return "Building Location"; + case FLOOR: return "Floor Location"; + case ROOM: return "Room Location"; + case WING: return "Wing Location"; + case _RESOURCEGROUPENTITYTYPE: return "ResourceGroupEntityType"; + case PRAC: return "PractitionerGroup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCodeEnumFactory.java new file mode 100644 index 00000000000..a7230d54b62 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityCodeEnumFactory.java @@ -0,0 +1,631 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityCodeEnumFactory implements EnumFactory { + + public V3EntityCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MaterialEntityClassType".equals(codeString)) + return V3EntityCode._MATERIALENTITYCLASSTYPE; + if ("_ContainerEntityType".equals(codeString)) + return V3EntityCode._CONTAINERENTITYTYPE; + if ("PKG".equals(codeString)) + return V3EntityCode.PKG; + if ("_NonRigidContainerEntityType".equals(codeString)) + return V3EntityCode._NONRIGIDCONTAINERENTITYTYPE; + if ("BAG".equals(codeString)) + return V3EntityCode.BAG; + if ("PACKT".equals(codeString)) + return V3EntityCode.PACKT; + if ("PCH".equals(codeString)) + return V3EntityCode.PCH; + if ("SACH".equals(codeString)) + return V3EntityCode.SACH; + if ("_RigidContainerEntityType".equals(codeString)) + return V3EntityCode._RIGIDCONTAINERENTITYTYPE; + if ("_IndividualPackageEntityType".equals(codeString)) + return V3EntityCode._INDIVIDUALPACKAGEENTITYTYPE; + if ("AMP".equals(codeString)) + return V3EntityCode.AMP; + if ("MINIM".equals(codeString)) + return V3EntityCode.MINIM; + if ("NEBAMP".equals(codeString)) + return V3EntityCode.NEBAMP; + if ("OVUL".equals(codeString)) + return V3EntityCode.OVUL; + if ("_MultiUseContainerEntityType".equals(codeString)) + return V3EntityCode._MULTIUSECONTAINERENTITYTYPE; + if ("BOT".equals(codeString)) + return V3EntityCode.BOT; + if ("BOTA".equals(codeString)) + return V3EntityCode.BOTA; + if ("BOTD".equals(codeString)) + return V3EntityCode.BOTD; + if ("BOTG".equals(codeString)) + return V3EntityCode.BOTG; + if ("BOTP".equals(codeString)) + return V3EntityCode.BOTP; + if ("BOTPLY".equals(codeString)) + return V3EntityCode.BOTPLY; + if ("BOX".equals(codeString)) + return V3EntityCode.BOX; + if ("CAN".equals(codeString)) + return V3EntityCode.CAN; + if ("CART".equals(codeString)) + return V3EntityCode.CART; + if ("CNSTR".equals(codeString)) + return V3EntityCode.CNSTR; + if ("JAR".equals(codeString)) + return V3EntityCode.JAR; + if ("JUG".equals(codeString)) + return V3EntityCode.JUG; + if ("TIN".equals(codeString)) + return V3EntityCode.TIN; + if ("TUB".equals(codeString)) + return V3EntityCode.TUB; + if ("TUBE".equals(codeString)) + return V3EntityCode.TUBE; + if ("VIAL".equals(codeString)) + return V3EntityCode.VIAL; + if ("BLSTRPK".equals(codeString)) + return V3EntityCode.BLSTRPK; + if ("CARD".equals(codeString)) + return V3EntityCode.CARD; + if ("COMPPKG".equals(codeString)) + return V3EntityCode.COMPPKG; + if ("DIALPK".equals(codeString)) + return V3EntityCode.DIALPK; + if ("DISK".equals(codeString)) + return V3EntityCode.DISK; + if ("DOSET".equals(codeString)) + return V3EntityCode.DOSET; + if ("STRIP".equals(codeString)) + return V3EntityCode.STRIP; + if ("KIT".equals(codeString)) + return V3EntityCode.KIT; + if ("SYSTM".equals(codeString)) + return V3EntityCode.SYSTM; + if ("_MedicalDevice".equals(codeString)) + return V3EntityCode._MEDICALDEVICE; + if ("_AccessMedicalDevice".equals(codeString)) + return V3EntityCode._ACCESSMEDICALDEVICE; + if ("LINE".equals(codeString)) + return V3EntityCode.LINE; + if ("IALINE".equals(codeString)) + return V3EntityCode.IALINE; + if ("IVLINE".equals(codeString)) + return V3EntityCode.IVLINE; + if ("_AdministrationMedicalDevice".equals(codeString)) + return V3EntityCode._ADMINISTRATIONMEDICALDEVICE; + if ("_InjectionMedicalDevice".equals(codeString)) + return V3EntityCode._INJECTIONMEDICALDEVICE; + if ("AINJ".equals(codeString)) + return V3EntityCode.AINJ; + if ("PEN".equals(codeString)) + return V3EntityCode.PEN; + if ("SYR".equals(codeString)) + return V3EntityCode.SYR; + if ("APLCTR".equals(codeString)) + return V3EntityCode.APLCTR; + if ("INH".equals(codeString)) + return V3EntityCode.INH; + if ("DSKS".equals(codeString)) + return V3EntityCode.DSKS; + if ("DSKUNH".equals(codeString)) + return V3EntityCode.DSKUNH; + if ("TRBINH".equals(codeString)) + return V3EntityCode.TRBINH; + if ("PMP".equals(codeString)) + return V3EntityCode.PMP; + if ("_SpecimenAdditiveEntity".equals(codeString)) + return V3EntityCode._SPECIMENADDITIVEENTITY; + if ("ACDA".equals(codeString)) + return V3EntityCode.ACDA; + if ("ACDB".equals(codeString)) + return V3EntityCode.ACDB; + if ("ACET".equals(codeString)) + return V3EntityCode.ACET; + if ("AMIES".equals(codeString)) + return V3EntityCode.AMIES; + if ("BACTM".equals(codeString)) + return V3EntityCode.BACTM; + if ("BF10".equals(codeString)) + return V3EntityCode.BF10; + if ("BOR".equals(codeString)) + return V3EntityCode.BOR; + if ("BOUIN".equals(codeString)) + return V3EntityCode.BOUIN; + if ("BSKM".equals(codeString)) + return V3EntityCode.BSKM; + if ("C32".equals(codeString)) + return V3EntityCode.C32; + if ("C38".equals(codeString)) + return V3EntityCode.C38; + if ("CARS".equals(codeString)) + return V3EntityCode.CARS; + if ("CARY".equals(codeString)) + return V3EntityCode.CARY; + if ("CHLTM".equals(codeString)) + return V3EntityCode.CHLTM; + if ("CTAD".equals(codeString)) + return V3EntityCode.CTAD; + if ("EDTK15".equals(codeString)) + return V3EntityCode.EDTK15; + if ("EDTK75".equals(codeString)) + return V3EntityCode.EDTK75; + if ("EDTN".equals(codeString)) + return V3EntityCode.EDTN; + if ("ENT".equals(codeString)) + return V3EntityCode.ENT; + if ("F10".equals(codeString)) + return V3EntityCode.F10; + if ("FDP".equals(codeString)) + return V3EntityCode.FDP; + if ("FL10".equals(codeString)) + return V3EntityCode.FL10; + if ("FL100".equals(codeString)) + return V3EntityCode.FL100; + if ("HCL6".equals(codeString)) + return V3EntityCode.HCL6; + if ("HEPA".equals(codeString)) + return V3EntityCode.HEPA; + if ("HEPL".equals(codeString)) + return V3EntityCode.HEPL; + if ("HEPN".equals(codeString)) + return V3EntityCode.HEPN; + if ("HNO3".equals(codeString)) + return V3EntityCode.HNO3; + if ("JKM".equals(codeString)) + return V3EntityCode.JKM; + if ("KARN".equals(codeString)) + return V3EntityCode.KARN; + if ("KOX".equals(codeString)) + return V3EntityCode.KOX; + if ("LIA".equals(codeString)) + return V3EntityCode.LIA; + if ("M4".equals(codeString)) + return V3EntityCode.M4; + if ("M4RT".equals(codeString)) + return V3EntityCode.M4RT; + if ("M5".equals(codeString)) + return V3EntityCode.M5; + if ("MICHTM".equals(codeString)) + return V3EntityCode.MICHTM; + if ("MMDTM".equals(codeString)) + return V3EntityCode.MMDTM; + if ("NAF".equals(codeString)) + return V3EntityCode.NAF; + if ("NONE".equals(codeString)) + return V3EntityCode.NONE; + if ("PAGE".equals(codeString)) + return V3EntityCode.PAGE; + if ("PHENOL".equals(codeString)) + return V3EntityCode.PHENOL; + if ("PVA".equals(codeString)) + return V3EntityCode.PVA; + if ("RLM".equals(codeString)) + return V3EntityCode.RLM; + if ("SILICA".equals(codeString)) + return V3EntityCode.SILICA; + if ("SPS".equals(codeString)) + return V3EntityCode.SPS; + if ("SST".equals(codeString)) + return V3EntityCode.SST; + if ("STUTM".equals(codeString)) + return V3EntityCode.STUTM; + if ("THROM".equals(codeString)) + return V3EntityCode.THROM; + if ("THYMOL".equals(codeString)) + return V3EntityCode.THYMOL; + if ("THYO".equals(codeString)) + return V3EntityCode.THYO; + if ("TOLU".equals(codeString)) + return V3EntityCode.TOLU; + if ("URETM".equals(codeString)) + return V3EntityCode.URETM; + if ("VIRTM".equals(codeString)) + return V3EntityCode.VIRTM; + if ("WEST".equals(codeString)) + return V3EntityCode.WEST; + if ("BLDPRD".equals(codeString)) + return V3EntityCode.BLDPRD; + if ("VCCNE".equals(codeString)) + return V3EntityCode.VCCNE; + if ("_DrugEntity".equals(codeString)) + return V3EntityCode._DRUGENTITY; + if ("_ClinicalDrug".equals(codeString)) + return V3EntityCode._CLINICALDRUG; + if ("_NonDrugAgentEntity".equals(codeString)) + return V3EntityCode._NONDRUGAGENTENTITY; + if ("NDA01".equals(codeString)) + return V3EntityCode.NDA01; + if ("NDA02".equals(codeString)) + return V3EntityCode.NDA02; + if ("NDA03".equals(codeString)) + return V3EntityCode.NDA03; + if ("NDA04".equals(codeString)) + return V3EntityCode.NDA04; + if ("NDA05".equals(codeString)) + return V3EntityCode.NDA05; + if ("NDA06".equals(codeString)) + return V3EntityCode.NDA06; + if ("NDA07".equals(codeString)) + return V3EntityCode.NDA07; + if ("NDA08".equals(codeString)) + return V3EntityCode.NDA08; + if ("NDA09".equals(codeString)) + return V3EntityCode.NDA09; + if ("NDA10".equals(codeString)) + return V3EntityCode.NDA10; + if ("NDA11".equals(codeString)) + return V3EntityCode.NDA11; + if ("NDA12".equals(codeString)) + return V3EntityCode.NDA12; + if ("NDA13".equals(codeString)) + return V3EntityCode.NDA13; + if ("NDA14".equals(codeString)) + return V3EntityCode.NDA14; + if ("NDA15".equals(codeString)) + return V3EntityCode.NDA15; + if ("NDA16".equals(codeString)) + return V3EntityCode.NDA16; + if ("NDA17".equals(codeString)) + return V3EntityCode.NDA17; + if ("_OrganizationEntityType".equals(codeString)) + return V3EntityCode._ORGANIZATIONENTITYTYPE; + if ("HHOLD".equals(codeString)) + return V3EntityCode.HHOLD; + if ("NAT".equals(codeString)) + return V3EntityCode.NAT; + if ("RELIG".equals(codeString)) + return V3EntityCode.RELIG; + if ("_PlaceEntityType".equals(codeString)) + return V3EntityCode._PLACEENTITYTYPE; + if ("BED".equals(codeString)) + return V3EntityCode.BED; + if ("BLDG".equals(codeString)) + return V3EntityCode.BLDG; + if ("FLOOR".equals(codeString)) + return V3EntityCode.FLOOR; + if ("ROOM".equals(codeString)) + return V3EntityCode.ROOM; + if ("WING".equals(codeString)) + return V3EntityCode.WING; + if ("_ResourceGroupEntityType".equals(codeString)) + return V3EntityCode._RESOURCEGROUPENTITYTYPE; + if ("PRAC".equals(codeString)) + return V3EntityCode.PRAC; + throw new IllegalArgumentException("Unknown V3EntityCode code '"+codeString+"'"); + } + + public String toCode(V3EntityCode code) { + if (code == V3EntityCode._MATERIALENTITYCLASSTYPE) + return "_MaterialEntityClassType"; + if (code == V3EntityCode._CONTAINERENTITYTYPE) + return "_ContainerEntityType"; + if (code == V3EntityCode.PKG) + return "PKG"; + if (code == V3EntityCode._NONRIGIDCONTAINERENTITYTYPE) + return "_NonRigidContainerEntityType"; + if (code == V3EntityCode.BAG) + return "BAG"; + if (code == V3EntityCode.PACKT) + return "PACKT"; + if (code == V3EntityCode.PCH) + return "PCH"; + if (code == V3EntityCode.SACH) + return "SACH"; + if (code == V3EntityCode._RIGIDCONTAINERENTITYTYPE) + return "_RigidContainerEntityType"; + if (code == V3EntityCode._INDIVIDUALPACKAGEENTITYTYPE) + return "_IndividualPackageEntityType"; + if (code == V3EntityCode.AMP) + return "AMP"; + if (code == V3EntityCode.MINIM) + return "MINIM"; + if (code == V3EntityCode.NEBAMP) + return "NEBAMP"; + if (code == V3EntityCode.OVUL) + return "OVUL"; + if (code == V3EntityCode._MULTIUSECONTAINERENTITYTYPE) + return "_MultiUseContainerEntityType"; + if (code == V3EntityCode.BOT) + return "BOT"; + if (code == V3EntityCode.BOTA) + return "BOTA"; + if (code == V3EntityCode.BOTD) + return "BOTD"; + if (code == V3EntityCode.BOTG) + return "BOTG"; + if (code == V3EntityCode.BOTP) + return "BOTP"; + if (code == V3EntityCode.BOTPLY) + return "BOTPLY"; + if (code == V3EntityCode.BOX) + return "BOX"; + if (code == V3EntityCode.CAN) + return "CAN"; + if (code == V3EntityCode.CART) + return "CART"; + if (code == V3EntityCode.CNSTR) + return "CNSTR"; + if (code == V3EntityCode.JAR) + return "JAR"; + if (code == V3EntityCode.JUG) + return "JUG"; + if (code == V3EntityCode.TIN) + return "TIN"; + if (code == V3EntityCode.TUB) + return "TUB"; + if (code == V3EntityCode.TUBE) + return "TUBE"; + if (code == V3EntityCode.VIAL) + return "VIAL"; + if (code == V3EntityCode.BLSTRPK) + return "BLSTRPK"; + if (code == V3EntityCode.CARD) + return "CARD"; + if (code == V3EntityCode.COMPPKG) + return "COMPPKG"; + if (code == V3EntityCode.DIALPK) + return "DIALPK"; + if (code == V3EntityCode.DISK) + return "DISK"; + if (code == V3EntityCode.DOSET) + return "DOSET"; + if (code == V3EntityCode.STRIP) + return "STRIP"; + if (code == V3EntityCode.KIT) + return "KIT"; + if (code == V3EntityCode.SYSTM) + return "SYSTM"; + if (code == V3EntityCode._MEDICALDEVICE) + return "_MedicalDevice"; + if (code == V3EntityCode._ACCESSMEDICALDEVICE) + return "_AccessMedicalDevice"; + if (code == V3EntityCode.LINE) + return "LINE"; + if (code == V3EntityCode.IALINE) + return "IALINE"; + if (code == V3EntityCode.IVLINE) + return "IVLINE"; + if (code == V3EntityCode._ADMINISTRATIONMEDICALDEVICE) + return "_AdministrationMedicalDevice"; + if (code == V3EntityCode._INJECTIONMEDICALDEVICE) + return "_InjectionMedicalDevice"; + if (code == V3EntityCode.AINJ) + return "AINJ"; + if (code == V3EntityCode.PEN) + return "PEN"; + if (code == V3EntityCode.SYR) + return "SYR"; + if (code == V3EntityCode.APLCTR) + return "APLCTR"; + if (code == V3EntityCode.INH) + return "INH"; + if (code == V3EntityCode.DSKS) + return "DSKS"; + if (code == V3EntityCode.DSKUNH) + return "DSKUNH"; + if (code == V3EntityCode.TRBINH) + return "TRBINH"; + if (code == V3EntityCode.PMP) + return "PMP"; + if (code == V3EntityCode._SPECIMENADDITIVEENTITY) + return "_SpecimenAdditiveEntity"; + if (code == V3EntityCode.ACDA) + return "ACDA"; + if (code == V3EntityCode.ACDB) + return "ACDB"; + if (code == V3EntityCode.ACET) + return "ACET"; + if (code == V3EntityCode.AMIES) + return "AMIES"; + if (code == V3EntityCode.BACTM) + return "BACTM"; + if (code == V3EntityCode.BF10) + return "BF10"; + if (code == V3EntityCode.BOR) + return "BOR"; + if (code == V3EntityCode.BOUIN) + return "BOUIN"; + if (code == V3EntityCode.BSKM) + return "BSKM"; + if (code == V3EntityCode.C32) + return "C32"; + if (code == V3EntityCode.C38) + return "C38"; + if (code == V3EntityCode.CARS) + return "CARS"; + if (code == V3EntityCode.CARY) + return "CARY"; + if (code == V3EntityCode.CHLTM) + return "CHLTM"; + if (code == V3EntityCode.CTAD) + return "CTAD"; + if (code == V3EntityCode.EDTK15) + return "EDTK15"; + if (code == V3EntityCode.EDTK75) + return "EDTK75"; + if (code == V3EntityCode.EDTN) + return "EDTN"; + if (code == V3EntityCode.ENT) + return "ENT"; + if (code == V3EntityCode.F10) + return "F10"; + if (code == V3EntityCode.FDP) + return "FDP"; + if (code == V3EntityCode.FL10) + return "FL10"; + if (code == V3EntityCode.FL100) + return "FL100"; + if (code == V3EntityCode.HCL6) + return "HCL6"; + if (code == V3EntityCode.HEPA) + return "HEPA"; + if (code == V3EntityCode.HEPL) + return "HEPL"; + if (code == V3EntityCode.HEPN) + return "HEPN"; + if (code == V3EntityCode.HNO3) + return "HNO3"; + if (code == V3EntityCode.JKM) + return "JKM"; + if (code == V3EntityCode.KARN) + return "KARN"; + if (code == V3EntityCode.KOX) + return "KOX"; + if (code == V3EntityCode.LIA) + return "LIA"; + if (code == V3EntityCode.M4) + return "M4"; + if (code == V3EntityCode.M4RT) + return "M4RT"; + if (code == V3EntityCode.M5) + return "M5"; + if (code == V3EntityCode.MICHTM) + return "MICHTM"; + if (code == V3EntityCode.MMDTM) + return "MMDTM"; + if (code == V3EntityCode.NAF) + return "NAF"; + if (code == V3EntityCode.NONE) + return "NONE"; + if (code == V3EntityCode.PAGE) + return "PAGE"; + if (code == V3EntityCode.PHENOL) + return "PHENOL"; + if (code == V3EntityCode.PVA) + return "PVA"; + if (code == V3EntityCode.RLM) + return "RLM"; + if (code == V3EntityCode.SILICA) + return "SILICA"; + if (code == V3EntityCode.SPS) + return "SPS"; + if (code == V3EntityCode.SST) + return "SST"; + if (code == V3EntityCode.STUTM) + return "STUTM"; + if (code == V3EntityCode.THROM) + return "THROM"; + if (code == V3EntityCode.THYMOL) + return "THYMOL"; + if (code == V3EntityCode.THYO) + return "THYO"; + if (code == V3EntityCode.TOLU) + return "TOLU"; + if (code == V3EntityCode.URETM) + return "URETM"; + if (code == V3EntityCode.VIRTM) + return "VIRTM"; + if (code == V3EntityCode.WEST) + return "WEST"; + if (code == V3EntityCode.BLDPRD) + return "BLDPRD"; + if (code == V3EntityCode.VCCNE) + return "VCCNE"; + if (code == V3EntityCode._DRUGENTITY) + return "_DrugEntity"; + if (code == V3EntityCode._CLINICALDRUG) + return "_ClinicalDrug"; + if (code == V3EntityCode._NONDRUGAGENTENTITY) + return "_NonDrugAgentEntity"; + if (code == V3EntityCode.NDA01) + return "NDA01"; + if (code == V3EntityCode.NDA02) + return "NDA02"; + if (code == V3EntityCode.NDA03) + return "NDA03"; + if (code == V3EntityCode.NDA04) + return "NDA04"; + if (code == V3EntityCode.NDA05) + return "NDA05"; + if (code == V3EntityCode.NDA06) + return "NDA06"; + if (code == V3EntityCode.NDA07) + return "NDA07"; + if (code == V3EntityCode.NDA08) + return "NDA08"; + if (code == V3EntityCode.NDA09) + return "NDA09"; + if (code == V3EntityCode.NDA10) + return "NDA10"; + if (code == V3EntityCode.NDA11) + return "NDA11"; + if (code == V3EntityCode.NDA12) + return "NDA12"; + if (code == V3EntityCode.NDA13) + return "NDA13"; + if (code == V3EntityCode.NDA14) + return "NDA14"; + if (code == V3EntityCode.NDA15) + return "NDA15"; + if (code == V3EntityCode.NDA16) + return "NDA16"; + if (code == V3EntityCode.NDA17) + return "NDA17"; + if (code == V3EntityCode._ORGANIZATIONENTITYTYPE) + return "_OrganizationEntityType"; + if (code == V3EntityCode.HHOLD) + return "HHOLD"; + if (code == V3EntityCode.NAT) + return "NAT"; + if (code == V3EntityCode.RELIG) + return "RELIG"; + if (code == V3EntityCode._PLACEENTITYTYPE) + return "_PlaceEntityType"; + if (code == V3EntityCode.BED) + return "BED"; + if (code == V3EntityCode.BLDG) + return "BLDG"; + if (code == V3EntityCode.FLOOR) + return "FLOOR"; + if (code == V3EntityCode.ROOM) + return "ROOM"; + if (code == V3EntityCode.WING) + return "WING"; + if (code == V3EntityCode._RESOURCEGROUPENTITYTYPE) + return "_ResourceGroupEntityType"; + if (code == V3EntityCode.PRAC) + return "PRAC"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminer.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminer.java new file mode 100644 index 00000000000..2c617c117cc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminer.java @@ -0,0 +1,117 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityDeterminer { + + /** + * Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing). + + + Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose. + */ + INSTANCE, + /** + * A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing). While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals. + */ + GROUP, + /** + * Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing). + */ + KIND, + /** + * A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things. While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals. + */ + GROUPKIND, + /** + * The described quantified determiner indicates that the given Entity is taken as a general description of a specific amount of a thing. For example, QUANTIFIED_KIND of syringe (quantity = 3,) stands for exactly three syringes. + */ + QUANTIFIEDKIND, + /** + * added to help the parsers + */ + NULL; + public static V3EntityDeterminer fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("INSTANCE".equals(codeString)) + return INSTANCE; + if ("GROUP".equals(codeString)) + return GROUP; + if ("KIND".equals(codeString)) + return KIND; + if ("GROUPKIND".equals(codeString)) + return GROUPKIND; + if ("QUANTIFIED_KIND".equals(codeString)) + return QUANTIFIEDKIND; + throw new FHIRException("Unknown V3EntityDeterminer code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "INSTANCE"; + case GROUP: return "GROUP"; + case KIND: return "KIND"; + case GROUPKIND: return "GROUPKIND"; + case QUANTIFIEDKIND: return "QUANTIFIED_KIND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityDeterminer"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing).\r\n\n \n Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose."; + case GROUP: return "A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing). While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals."; + case KIND: return "Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing)."; + case GROUPKIND: return "A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things. While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals."; + case QUANTIFIEDKIND: return "The described quantified determiner indicates that the given Entity is taken as a general description of a specific amount of a thing. For example, QUANTIFIED_KIND of syringe (quantity = 3,) stands for exactly three syringes."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "specific"; + case GROUP: return "specific group"; + case KIND: return "described"; + case GROUPKIND: return "described group"; + case QUANTIFIEDKIND: return "described quantified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminerEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminerEnumFactory.java new file mode 100644 index 00000000000..30682a0ea62 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityDeterminerEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityDeterminerEnumFactory implements EnumFactory { + + public V3EntityDeterminer fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("INSTANCE".equals(codeString)) + return V3EntityDeterminer.INSTANCE; + if ("GROUP".equals(codeString)) + return V3EntityDeterminer.GROUP; + if ("KIND".equals(codeString)) + return V3EntityDeterminer.KIND; + if ("GROUPKIND".equals(codeString)) + return V3EntityDeterminer.GROUPKIND; + if ("QUANTIFIED_KIND".equals(codeString)) + return V3EntityDeterminer.QUANTIFIEDKIND; + throw new IllegalArgumentException("Unknown V3EntityDeterminer code '"+codeString+"'"); + } + + public String toCode(V3EntityDeterminer code) { + if (code == V3EntityDeterminer.INSTANCE) + return "INSTANCE"; + if (code == V3EntityDeterminer.GROUP) + return "GROUP"; + if (code == V3EntityDeterminer.KIND) + return "KIND"; + if (code == V3EntityDeterminer.GROUPKIND) + return "GROUPKIND"; + if (code == V3EntityDeterminer.QUANTIFIEDKIND) + return "QUANTIFIED_KIND"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandling.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandling.java new file mode 100644 index 00000000000..164ad434a0a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandling.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityHandling { + + /** + * Keep at ambient temperature, 22 +/- 2C + */ + AMB, + /** + * Critical to keep at body temperature 36-38C + */ + C37, + /** + * Critical ambient - must not be refrigerated or frozen. + */ + CAMB, + /** + * Critical. Do not expose to atmosphere. Do not uncap. + */ + CATM, + /** + * Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing. + */ + CFRZ, + /** + * Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing. + */ + CREF, + /** + * Deep Frozen -16 to -20C. + */ + DFRZ, + /** + * Keep in a dry environment + */ + DRY, + /** + * Keep frozen below 0 ?C + */ + FRZ, + /** + * Container is free of heavy metals, including lead. + */ + MTLF, + /** + * Keep in liquid nitrogen + */ + NTR, + /** + * Protect from light (eg. Wrap in aluminum foil). + */ + PRTL, + /** + * Do not shake + */ + PSA, + /** + * Protect against shock + */ + PSO, + /** + * Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence. + */ + REF, + /** + * Shake thoroughly before using + */ + SBU, + /** + * Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice. + */ + UFRZ, + /** + * Keep upright, do not turn upside down + */ + UPR, + /** + * added to help the parsers + */ + NULL; + public static V3EntityHandling fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMB".equals(codeString)) + return AMB; + if ("C37".equals(codeString)) + return C37; + if ("CAMB".equals(codeString)) + return CAMB; + if ("CATM".equals(codeString)) + return CATM; + if ("CFRZ".equals(codeString)) + return CFRZ; + if ("CREF".equals(codeString)) + return CREF; + if ("DFRZ".equals(codeString)) + return DFRZ; + if ("DRY".equals(codeString)) + return DRY; + if ("FRZ".equals(codeString)) + return FRZ; + if ("MTLF".equals(codeString)) + return MTLF; + if ("NTR".equals(codeString)) + return NTR; + if ("PRTL".equals(codeString)) + return PRTL; + if ("PSA".equals(codeString)) + return PSA; + if ("PSO".equals(codeString)) + return PSO; + if ("REF".equals(codeString)) + return REF; + if ("SBU".equals(codeString)) + return SBU; + if ("UFRZ".equals(codeString)) + return UFRZ; + if ("UPR".equals(codeString)) + return UPR; + throw new FHIRException("Unknown V3EntityHandling code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMB: return "AMB"; + case C37: return "C37"; + case CAMB: return "CAMB"; + case CATM: return "CATM"; + case CFRZ: return "CFRZ"; + case CREF: return "CREF"; + case DFRZ: return "DFRZ"; + case DRY: return "DRY"; + case FRZ: return "FRZ"; + case MTLF: return "MTLF"; + case NTR: return "NTR"; + case PRTL: return "PRTL"; + case PSA: return "PSA"; + case PSO: return "PSO"; + case REF: return "REF"; + case SBU: return "SBU"; + case UFRZ: return "UFRZ"; + case UPR: return "UPR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityHandling"; + } + public String getDefinition() { + switch (this) { + case AMB: return "Keep at ambient temperature, 22 +/- 2C"; + case C37: return "Critical to keep at body temperature 36-38C"; + case CAMB: return "Critical ambient - must not be refrigerated or frozen."; + case CATM: return "Critical. Do not expose to atmosphere. Do not uncap."; + case CFRZ: return "Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing."; + case CREF: return "Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing."; + case DFRZ: return "Deep Frozen -16 to -20C."; + case DRY: return "Keep in a dry environment"; + case FRZ: return "Keep frozen below 0 ?C"; + case MTLF: return "Container is free of heavy metals, including lead."; + case NTR: return "Keep in liquid nitrogen"; + case PRTL: return "Protect from light (eg. Wrap in aluminum foil)."; + case PSA: return "Do not shake"; + case PSO: return "Protect against shock"; + case REF: return "Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence."; + case SBU: return "Shake thoroughly before using"; + case UFRZ: return "Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice."; + case UPR: return "Keep upright, do not turn upside down"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMB: return "Ambient Temperature"; + case C37: return "Body Temperature"; + case CAMB: return "Critical Ambient temperature"; + case CATM: return "Protect from Air"; + case CFRZ: return "Critical frozen"; + case CREF: return "Critical refrigerated temperature"; + case DFRZ: return "Deep Frozen"; + case DRY: return "dry"; + case FRZ: return "frozen"; + case MTLF: return "Metal Free"; + case NTR: return "nitrogen"; + case PRTL: return "Protect from Light"; + case PSA: return "do not shake"; + case PSO: return "no shock"; + case REF: return "Refrigerated temperature"; + case SBU: return "Shake before use"; + case UFRZ: return "Ultra frozen"; + case UPR: return "upright"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandlingEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandlingEnumFactory.java new file mode 100644 index 00000000000..f423b7988d8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityHandlingEnumFactory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityHandlingEnumFactory implements EnumFactory { + + public V3EntityHandling fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMB".equals(codeString)) + return V3EntityHandling.AMB; + if ("C37".equals(codeString)) + return V3EntityHandling.C37; + if ("CAMB".equals(codeString)) + return V3EntityHandling.CAMB; + if ("CATM".equals(codeString)) + return V3EntityHandling.CATM; + if ("CFRZ".equals(codeString)) + return V3EntityHandling.CFRZ; + if ("CREF".equals(codeString)) + return V3EntityHandling.CREF; + if ("DFRZ".equals(codeString)) + return V3EntityHandling.DFRZ; + if ("DRY".equals(codeString)) + return V3EntityHandling.DRY; + if ("FRZ".equals(codeString)) + return V3EntityHandling.FRZ; + if ("MTLF".equals(codeString)) + return V3EntityHandling.MTLF; + if ("NTR".equals(codeString)) + return V3EntityHandling.NTR; + if ("PRTL".equals(codeString)) + return V3EntityHandling.PRTL; + if ("PSA".equals(codeString)) + return V3EntityHandling.PSA; + if ("PSO".equals(codeString)) + return V3EntityHandling.PSO; + if ("REF".equals(codeString)) + return V3EntityHandling.REF; + if ("SBU".equals(codeString)) + return V3EntityHandling.SBU; + if ("UFRZ".equals(codeString)) + return V3EntityHandling.UFRZ; + if ("UPR".equals(codeString)) + return V3EntityHandling.UPR; + throw new IllegalArgumentException("Unknown V3EntityHandling code '"+codeString+"'"); + } + + public String toCode(V3EntityHandling code) { + if (code == V3EntityHandling.AMB) + return "AMB"; + if (code == V3EntityHandling.C37) + return "C37"; + if (code == V3EntityHandling.CAMB) + return "CAMB"; + if (code == V3EntityHandling.CATM) + return "CATM"; + if (code == V3EntityHandling.CFRZ) + return "CFRZ"; + if (code == V3EntityHandling.CREF) + return "CREF"; + if (code == V3EntityHandling.DFRZ) + return "DFRZ"; + if (code == V3EntityHandling.DRY) + return "DRY"; + if (code == V3EntityHandling.FRZ) + return "FRZ"; + if (code == V3EntityHandling.MTLF) + return "MTLF"; + if (code == V3EntityHandling.NTR) + return "NTR"; + if (code == V3EntityHandling.PRTL) + return "PRTL"; + if (code == V3EntityHandling.PSA) + return "PSA"; + if (code == V3EntityHandling.PSO) + return "PSO"; + if (code == V3EntityHandling.REF) + return "REF"; + if (code == V3EntityHandling.SBU) + return "SBU"; + if (code == V3EntityHandling.UFRZ) + return "UFRZ"; + if (code == V3EntityHandling.UPR) + return "UPR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifier.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifier.java new file mode 100644 index 00000000000..2f2a2b19d79 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifier.java @@ -0,0 +1,444 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartQualifier { + + /** + * OrganizationNamePartQualifier + */ + _ORGANIZATIONNAMEPARTQUALIFIER, + /** + * Indicates that a prefix like "Dr." or a suffix like "M.D." or "Ph.D." is an academic title. + */ + AC, + /** + * The name the person was given at the time of adoption. + */ + AD, + /** + * A name that a person had shortly after being born. Usually for family names but may be used to mark given names at birth that may have changed later. + */ + BR, + /** + * A callme name is (usually a given name) that is preferred when a person is directly addressed. + */ + CL, + /** + * Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g., "Ph." could stand for "Philippe" or "Th." for "Thomas". + */ + IN, + /** + * For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + */ + LS, + /** + * In Europe and Asia, there are still people with nobility titles (aristocrats). German "von" is generally a nobility title, not a mere voorvoegsel. Others are "Earl of" or "His Majesty King of..." etc. Rarely used nowadays, but some systems do keep track of this. + */ + NB, + /** + * Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential suffices. + */ + PR, + /** + * The name assumed from the partner in a marital relationship (hence the "SP"). Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names. + */ + SP, + /** + * Indicates that a prefix or a suffix is a title that applies to the whole name, not just the adjacent name part. + */ + TITLE, + /** + * A Dutch "voorvoegsel" is something like "van" or "de" that might have indicated nobility in the past but no longer so. Similar prefixes exist in other languages such as Spanish, French or Portugese. + */ + VV, + /** + * Description: Medication Name Parts are a means of specifying a range of acceptable "official" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under "doseForm" or "route" or "strength" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated. + */ + PHARMACEUTICALENTITYNAMEPARTQUALIFIERS, + /** + * Description: This refers to the container if present in the medicinal product name. + + EXAMPLES: + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe + */ + CON, + /** + * Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products. + + EXAMPLES: + + + + For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen. + */ + DEV, + /** + * Description: This refers to a flavor of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'CoughCure Linctus Orange Flavor', the flavor part is "Orange" + For 'Wonderdrug Syrup Cherry Flavor', the flavor part is "Cherry" + */ + FLAV, + /** + * Description: This refers to the formulation of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is "Sugar Free" + For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is "gluten-free" + */ + FORMUL, + /** + * Description: This refers to the pharmaceutical form/ if present in the medicinal product name. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: Soft Capsules + + + + For Ludiomil 25mg-Filmtabletten: Filmtabletten + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection + */ + FRM, + /** + * Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. + + EXAMPLES: + + + + Agenerase + + + + Optaflu + + + + Ludiomil + */ + INV, + /** + * Description: This refers to the target population for the medicinal product if present in the medicinal product name + + + Examples: + + + + For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is "children" + For 'Adult Chesty Cough Syrup', the target population part is "adult" + */ + POPUL, + /** + * Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + EXAMPLES: + + + + For Agenerase: N/A + + + + For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season) + + + + For Ludiomil: N/A + */ + SCI, + /** + * Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: 50mg + + + + For Ludiomil 25mg-Filmtabletten: 25 mg + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A + */ + STR, + /** + * Description: This refers to a time or time period that may be specified in the text of the medicinal product name + + + Example: + + + + For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is "2008/2009 season" + */ + TIME, + /** + * Description: This refers to trademark/company element if present in the medicinal product name. + + EXAMPLES: + + + + for Insulin Human Winthrop Comb 15: Winthrop + */ + TMK, + /** + * Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + + + Examples: + + + + For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: "Heartburn Relief" + For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is "Soothing Coughs" + */ + USE, + /** + * PersonNamePartQualifier + */ + _PERSONNAMEPARTQUALIFIER, + /** + * PersonNamePartAffixTypes + */ + _PERSONNAMEPARTAFFIXTYPES, + /** + * PersonNamePartChangeQualifier + */ + _PERSONNAMEPARTCHANGEQUALIFIER, + /** + * PersonNamePartMiscQualifier + */ + _PERSONNAMEPARTMISCQUALIFIER, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartQualifier fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_OrganizationNamePartQualifier".equals(codeString)) + return _ORGANIZATIONNAMEPARTQUALIFIER; + if ("AC".equals(codeString)) + return AC; + if ("AD".equals(codeString)) + return AD; + if ("BR".equals(codeString)) + return BR; + if ("CL".equals(codeString)) + return CL; + if ("IN".equals(codeString)) + return IN; + if ("LS".equals(codeString)) + return LS; + if ("NB".equals(codeString)) + return NB; + if ("PR".equals(codeString)) + return PR; + if ("SP".equals(codeString)) + return SP; + if ("TITLE".equals(codeString)) + return TITLE; + if ("VV".equals(codeString)) + return VV; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return CON; + if ("DEV".equals(codeString)) + return DEV; + if ("FLAV".equals(codeString)) + return FLAV; + if ("FORMUL".equals(codeString)) + return FORMUL; + if ("FRM".equals(codeString)) + return FRM; + if ("INV".equals(codeString)) + return INV; + if ("POPUL".equals(codeString)) + return POPUL; + if ("SCI".equals(codeString)) + return SCI; + if ("STR".equals(codeString)) + return STR; + if ("TIME".equals(codeString)) + return TIME; + if ("TMK".equals(codeString)) + return TMK; + if ("USE".equals(codeString)) + return USE; + if ("_PersonNamePartQualifier".equals(codeString)) + return _PERSONNAMEPARTQUALIFIER; + if ("_PersonNamePartAffixTypes".equals(codeString)) + return _PERSONNAMEPARTAFFIXTYPES; + if ("_PersonNamePartChangeQualifier".equals(codeString)) + return _PERSONNAMEPARTCHANGEQUALIFIER; + if ("_PersonNamePartMiscQualifier".equals(codeString)) + return _PERSONNAMEPARTMISCQUALIFIER; + throw new FHIRException("Unknown V3EntityNamePartQualifier code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "_OrganizationNamePartQualifier"; + case AC: return "AC"; + case AD: return "AD"; + case BR: return "BR"; + case CL: return "CL"; + case IN: return "IN"; + case LS: return "LS"; + case NB: return "NB"; + case PR: return "PR"; + case SP: return "SP"; + case TITLE: return "TITLE"; + case VV: return "VV"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "CON"; + case DEV: return "DEV"; + case FLAV: return "FLAV"; + case FORMUL: return "FORMUL"; + case FRM: return "FRM"; + case INV: return "INV"; + case POPUL: return "POPUL"; + case SCI: return "SCI"; + case STR: return "STR"; + case TIME: return "TIME"; + case TMK: return "TMK"; + case USE: return "USE"; + case _PERSONNAMEPARTQUALIFIER: return "_PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "_PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "_PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "_PersonNamePartMiscQualifier"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartQualifier"; + } + public String getDefinition() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "OrganizationNamePartQualifier"; + case AC: return "Indicates that a prefix like \"Dr.\" or a suffix like \"M.D.\" or \"Ph.D.\" is an academic title."; + case AD: return "The name the person was given at the time of adoption."; + case BR: return "A name that a person had shortly after being born. Usually for family names but may be used to mark given names at birth that may have changed later."; + case CL: return "A callme name is (usually a given name) that is preferred when a person is directly addressed."; + case IN: return "Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g., \"Ph.\" could stand for \"Philippe\" or \"Th.\" for \"Thomas\"."; + case LS: return "For organizations a suffix indicating the legal status, e.g., \"Inc.\", \"Co.\", \"AG\", \"GmbH\", \"B.V.\" \"S.A.\", \"Ltd.\" etc."; + case NB: return "In Europe and Asia, there are still people with nobility titles (aristocrats). German \"von\" is generally a nobility title, not a mere voorvoegsel. Others are \"Earl of\" or \"His Majesty King of...\" etc. Rarely used nowadays, but some systems do keep track of this."; + case PR: return "Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential suffices."; + case SP: return "The name assumed from the partner in a marital relationship (hence the \"SP\"). Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names."; + case TITLE: return "Indicates that a prefix or a suffix is a title that applies to the whole name, not just the adjacent name part."; + case VV: return "A Dutch \"voorvoegsel\" is something like \"van\" or \"de\" that might have indicated nobility in the past but no longer so. Similar prefixes exist in other languages such as Spanish, French or Portugese."; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "Description: Medication Name Parts are a means of specifying a range of acceptable \"official\" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under \"doseForm\" or \"route\" or \"strength\" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated."; + case CON: return "Description: This refers to the container if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe"; + case DEV: return "Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products.\r\n\n EXAMPLES: \r\n\n \n \n For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen."; + case FLAV: return "Description: This refers to a flavor of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'CoughCure Linctus Orange Flavor', the flavor part is \"Orange\"\n For 'Wonderdrug Syrup Cherry Flavor', the flavor part is \"Cherry\""; + case FORMUL: return "Description: This refers to the formulation of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is \"Sugar Free\"\n For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is \"gluten-free\""; + case FRM: return "Description: This refers to the pharmaceutical form/ if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase 50 mg soft capsules: Soft Capsules\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: Filmtabletten\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection"; + case INV: return "Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. \r\n\n EXAMPLES: \r\n\n \n \n Agenerase\r\n\n \n \n Optaflu\r\n\n \n \n Ludiomil"; + case POPUL: return "Description: This refers to the target population for the medicinal product if present in the medicinal product name\r\n\n \n Examples:\n \r\n\n \n For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is \"children\"\n For 'Adult Chesty Cough Syrup', the target population part is \"adult\""; + case SCI: return "Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase: N/A\r\n\n \n \n For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season)\r\n\n \n \n For Ludiomil: N/A"; + case STR: return "Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required.\r\n\n EXAMPLES:\r\n\n \n \n For Agenerase 50 mg soft capsules: 50mg\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: 25 mg\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A"; + case TIME: return "Description: This refers to a time or time period that may be specified in the text of the medicinal product name\r\n\n \n Example:\n \r\n\n \n For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is \"2008/2009 season\""; + case TMK: return "Description: This refers to trademark/company element if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n for Insulin Human Winthrop Comb 15: Winthrop"; + case USE: return "Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\n\r\n\n \n Examples:\n \r\n\n \n For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: \"Heartburn Relief\"\n For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is \"Soothing Coughs\""; + case _PERSONNAMEPARTQUALIFIER: return "PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "PersonNamePartMiscQualifier"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "OrganizationNamePartQualifier"; + case AC: return "academic"; + case AD: return "adopted"; + case BR: return "birth"; + case CL: return "callme"; + case IN: return "initial"; + case LS: return "Legal status"; + case NB: return "nobility"; + case PR: return "professional"; + case SP: return "spouse"; + case TITLE: return "title"; + case VV: return "voorvoegsel"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "container name"; + case DEV: return "device name"; + case FLAV: return "FlavorName"; + case FORMUL: return "FormulationPartName"; + case FRM: return "form name"; + case INV: return "invented name"; + case POPUL: return "TargetPopulationName"; + case SCI: return "scientific name"; + case STR: return "strength name"; + case TIME: return "TimeOrPeriodName"; + case TMK: return "trademark name"; + case USE: return "intended use name"; + case _PERSONNAMEPARTQUALIFIER: return "PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "PersonNamePartMiscQualifier"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierEnumFactory.java new file mode 100644 index 00000000000..007b21e5345 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierEnumFactory.java @@ -0,0 +1,167 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNamePartQualifierEnumFactory implements EnumFactory { + + public V3EntityNamePartQualifier fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_OrganizationNamePartQualifier".equals(codeString)) + return V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER; + if ("AC".equals(codeString)) + return V3EntityNamePartQualifier.AC; + if ("AD".equals(codeString)) + return V3EntityNamePartQualifier.AD; + if ("BR".equals(codeString)) + return V3EntityNamePartQualifier.BR; + if ("CL".equals(codeString)) + return V3EntityNamePartQualifier.CL; + if ("IN".equals(codeString)) + return V3EntityNamePartQualifier.IN; + if ("LS".equals(codeString)) + return V3EntityNamePartQualifier.LS; + if ("NB".equals(codeString)) + return V3EntityNamePartQualifier.NB; + if ("PR".equals(codeString)) + return V3EntityNamePartQualifier.PR; + if ("SP".equals(codeString)) + return V3EntityNamePartQualifier.SP; + if ("TITLE".equals(codeString)) + return V3EntityNamePartQualifier.TITLE; + if ("VV".equals(codeString)) + return V3EntityNamePartQualifier.VV; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return V3EntityNamePartQualifier.CON; + if ("DEV".equals(codeString)) + return V3EntityNamePartQualifier.DEV; + if ("FLAV".equals(codeString)) + return V3EntityNamePartQualifier.FLAV; + if ("FORMUL".equals(codeString)) + return V3EntityNamePartQualifier.FORMUL; + if ("FRM".equals(codeString)) + return V3EntityNamePartQualifier.FRM; + if ("INV".equals(codeString)) + return V3EntityNamePartQualifier.INV; + if ("POPUL".equals(codeString)) + return V3EntityNamePartQualifier.POPUL; + if ("SCI".equals(codeString)) + return V3EntityNamePartQualifier.SCI; + if ("STR".equals(codeString)) + return V3EntityNamePartQualifier.STR; + if ("TIME".equals(codeString)) + return V3EntityNamePartQualifier.TIME; + if ("TMK".equals(codeString)) + return V3EntityNamePartQualifier.TMK; + if ("USE".equals(codeString)) + return V3EntityNamePartQualifier.USE; + if ("_PersonNamePartQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER; + if ("_PersonNamePartAffixTypes".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES; + if ("_PersonNamePartChangeQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER; + if ("_PersonNamePartMiscQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER; + throw new IllegalArgumentException("Unknown V3EntityNamePartQualifier code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartQualifier code) { + if (code == V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER) + return "_OrganizationNamePartQualifier"; + if (code == V3EntityNamePartQualifier.AC) + return "AC"; + if (code == V3EntityNamePartQualifier.AD) + return "AD"; + if (code == V3EntityNamePartQualifier.BR) + return "BR"; + if (code == V3EntityNamePartQualifier.CL) + return "CL"; + if (code == V3EntityNamePartQualifier.IN) + return "IN"; + if (code == V3EntityNamePartQualifier.LS) + return "LS"; + if (code == V3EntityNamePartQualifier.NB) + return "NB"; + if (code == V3EntityNamePartQualifier.PR) + return "PR"; + if (code == V3EntityNamePartQualifier.SP) + return "SP"; + if (code == V3EntityNamePartQualifier.TITLE) + return "TITLE"; + if (code == V3EntityNamePartQualifier.VV) + return "VV"; + if (code == V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS) + return "PharmaceuticalEntityNamePartQualifiers"; + if (code == V3EntityNamePartQualifier.CON) + return "CON"; + if (code == V3EntityNamePartQualifier.DEV) + return "DEV"; + if (code == V3EntityNamePartQualifier.FLAV) + return "FLAV"; + if (code == V3EntityNamePartQualifier.FORMUL) + return "FORMUL"; + if (code == V3EntityNamePartQualifier.FRM) + return "FRM"; + if (code == V3EntityNamePartQualifier.INV) + return "INV"; + if (code == V3EntityNamePartQualifier.POPUL) + return "POPUL"; + if (code == V3EntityNamePartQualifier.SCI) + return "SCI"; + if (code == V3EntityNamePartQualifier.STR) + return "STR"; + if (code == V3EntityNamePartQualifier.TIME) + return "TIME"; + if (code == V3EntityNamePartQualifier.TMK) + return "TMK"; + if (code == V3EntityNamePartQualifier.USE) + return "USE"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER) + return "_PersonNamePartQualifier"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES) + return "_PersonNamePartAffixTypes"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER) + return "_PersonNamePartChangeQualifier"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER) + return "_PersonNamePartMiscQualifier"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2.java new file mode 100644 index 00000000000..810ba63f565 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2.java @@ -0,0 +1,435 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartQualifierR2 { + + /** + * Description:A name part a person acquired. The name part may be acquired by adoption, or the person may have chosen to use the name part for some other reason. + + + Note: this differs from an Other/Psuedonym/Alias in that an acquired name part is acquired on a formal basis rather than an informal one (e.g. registered as part of the official name). + */ + AD, + /** + * Description:The name assumed from the partner in a marital relationship. Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names. + */ + SP, + /** + * Description:A name that a person was given at birth or established as a consequence of adoption. + + + Note: This is not used for temporary names assigned at birth such as "Baby of Smith" a" which is just a name with a use code of "TEMP". + */ + BR, + /** + * Description:Used to indicate which of the various name parts is used when interacting with the person. + */ + CL, + /** + * Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g., "Ph" could stand for "Philippe" or "Th" For "Thomas". + */ + IN, + /** + * Description:For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + */ + LS, + /** + * Description:Indicates that the name part is a middle name. + + + Usage Notes: In general, the english "middle name" concept is all of the given names after the first. This qualifier may be used to explicitly indicate which given names are considered to be middle names. The middle name qualifier may also be used with family names. This is a Scandinavian use case, matching the concept of "mellomnavn","mellannamn". Note that there are specific rules that indicate what names may be taken as a mellannamn in different Scandinavian countries. + */ + MID, + /** + * Description:A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). + */ + PFX, + /** + * Description: Medication Name Parts are a means of specifying a range of acceptable "official" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under "doseForm" or "route" or "strength" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated. + */ + PHARMACEUTICALENTITYNAMEPARTQUALIFIERS, + /** + * Description: This refers to the container if present in the medicinal product name. + + EXAMPLES: + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe + */ + CON, + /** + * Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products. + + EXAMPLES: + + + + For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen. + */ + DEV, + /** + * Description: This refers to a flavor of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'CoughCure Linctus Orange Flavor', the flavor part is "Orange" + For 'Wonderdrug Syrup Cherry Flavor', the flavor part is "Cherry" + */ + FLAV, + /** + * Description: This refers to the formulation of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is "Sugar Free" + For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is "gluten-free" + */ + FORMUL, + /** + * Description: This refers to the pharmaceutical form/ if present in the medicinal product name. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: Soft Capsules + + + + For Ludiomil 25mg-Filmtabletten: Filmtabletten + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection + */ + FRM, + /** + * Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. + + EXAMPLES: + + + + Agenerase + + + + Optaflu + + + + Ludiomil + */ + INV, + /** + * Description: This refers to the target population for the medicinal product if present in the medicinal product name + + + Examples: + + + + For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is "children" + For 'Adult Chesty Cough Syrup', the target population part is "adult" + */ + POPUL, + /** + * Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + EXAMPLES: + + + + For Agenerase: N/A + + + + For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season) + + + + For Ludiomil: N/A + */ + SCI, + /** + * Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: 50mg + + + + For Ludiomil 25mg-Filmtabletten: 25 mg + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A + */ + STR, + /** + * Description: This refers to a time or time period that may be specified in the text of the medicinal product name + + + Example: + + + + For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is "2008/2009 season" + */ + TIME, + /** + * Description: This refers to trademark/company element if present in the medicinal product name. + + EXAMPLES: + + + + for Insulin Human Winthrop Comb 15: Winthrop + */ + TMK, + /** + * Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + + + Examples: + + + + For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: "Heartburn Relief" + For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is "Soothing Coughs" + */ + USE, + /** + * Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). + */ + SFX, + /** + * Description:Extra information about the style of a title + */ + TITLESTYLES, + /** + * Description:Indicates that a title like "Dr.", "M.D." or "Ph.D." is an academic title. + */ + AC, + /** + * Description:A honorific such as "The Right Honourable" or "Weledelgeleerde Heer". + */ + HON, + /** + * Description:A nobility title such as Sir, Count, Grafin. + */ + NB, + /** + * Description:Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential titles. + */ + PR, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartQualifierR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return AD; + if ("SP".equals(codeString)) + return SP; + if ("BR".equals(codeString)) + return BR; + if ("CL".equals(codeString)) + return CL; + if ("IN".equals(codeString)) + return IN; + if ("LS".equals(codeString)) + return LS; + if ("MID".equals(codeString)) + return MID; + if ("PFX".equals(codeString)) + return PFX; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return CON; + if ("DEV".equals(codeString)) + return DEV; + if ("FLAV".equals(codeString)) + return FLAV; + if ("FORMUL".equals(codeString)) + return FORMUL; + if ("FRM".equals(codeString)) + return FRM; + if ("INV".equals(codeString)) + return INV; + if ("POPUL".equals(codeString)) + return POPUL; + if ("SCI".equals(codeString)) + return SCI; + if ("STR".equals(codeString)) + return STR; + if ("TIME".equals(codeString)) + return TIME; + if ("TMK".equals(codeString)) + return TMK; + if ("USE".equals(codeString)) + return USE; + if ("SFX".equals(codeString)) + return SFX; + if ("TitleStyles".equals(codeString)) + return TITLESTYLES; + if ("AC".equals(codeString)) + return AC; + if ("HON".equals(codeString)) + return HON; + if ("NB".equals(codeString)) + return NB; + if ("PR".equals(codeString)) + return PR; + throw new FHIRException("Unknown V3EntityNamePartQualifierR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AD: return "AD"; + case SP: return "SP"; + case BR: return "BR"; + case CL: return "CL"; + case IN: return "IN"; + case LS: return "LS"; + case MID: return "MID"; + case PFX: return "PFX"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "CON"; + case DEV: return "DEV"; + case FLAV: return "FLAV"; + case FORMUL: return "FORMUL"; + case FRM: return "FRM"; + case INV: return "INV"; + case POPUL: return "POPUL"; + case SCI: return "SCI"; + case STR: return "STR"; + case TIME: return "TIME"; + case TMK: return "TMK"; + case USE: return "USE"; + case SFX: return "SFX"; + case TITLESTYLES: return "TitleStyles"; + case AC: return "AC"; + case HON: return "HON"; + case NB: return "NB"; + case PR: return "PR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartQualifierR2"; + } + public String getDefinition() { + switch (this) { + case AD: return "Description:A name part a person acquired. The name part may be acquired by adoption, or the person may have chosen to use the name part for some other reason.\r\n\n \n Note: this differs from an Other/Psuedonym/Alias in that an acquired name part is acquired on a formal basis rather than an informal one (e.g. registered as part of the official name)."; + case SP: return "Description:The name assumed from the partner in a marital relationship. Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names."; + case BR: return "Description:A name that a person was given at birth or established as a consequence of adoption. \r\n\n \n Note: This is not used for temporary names assigned at birth such as \"Baby of Smith\" a\" which is just a name with a use code of \"TEMP\"."; + case CL: return "Description:Used to indicate which of the various name parts is used when interacting with the person."; + case IN: return "Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g., \"Ph\" could stand for \"Philippe\" or \"Th\" For \"Thomas\"."; + case LS: return "Description:For organizations a suffix indicating the legal status, e.g., \"Inc.\", \"Co.\", \"AG\", \"GmbH\", \"B.V.\" \"S.A.\", \"Ltd.\" etc."; + case MID: return "Description:Indicates that the name part is a middle name.\r\n\n \n Usage Notes: In general, the english \"middle name\" concept is all of the given names after the first. This qualifier may be used to explicitly indicate which given names are considered to be middle names. The middle name qualifier may also be used with family names. This is a Scandinavian use case, matching the concept of \"mellomnavn\",\"mellannamn\". Note that there are specific rules that indicate what names may be taken as a mellannamn in different Scandinavian countries."; + case PFX: return "Description:A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though)."; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "Description: Medication Name Parts are a means of specifying a range of acceptable \"official\" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under \"doseForm\" or \"route\" or \"strength\" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated."; + case CON: return "Description: This refers to the container if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe"; + case DEV: return "Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products.\r\n\n EXAMPLES: \r\n\n \n \n For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen."; + case FLAV: return "Description: This refers to a flavor of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'CoughCure Linctus Orange Flavor', the flavor part is \"Orange\"\n For 'Wonderdrug Syrup Cherry Flavor', the flavor part is \"Cherry\""; + case FORMUL: return "Description: This refers to the formulation of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is \"Sugar Free\"\n For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is \"gluten-free\""; + case FRM: return "Description: This refers to the pharmaceutical form/ if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase 50 mg soft capsules: Soft Capsules\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: Filmtabletten\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection"; + case INV: return "Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. \r\n\n EXAMPLES: \r\n\n \n \n Agenerase\r\n\n \n \n Optaflu\r\n\n \n \n Ludiomil"; + case POPUL: return "Description: This refers to the target population for the medicinal product if present in the medicinal product name\r\n\n \n Examples:\n \r\n\n \n For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is \"children\"\n For 'Adult Chesty Cough Syrup', the target population part is \"adult\""; + case SCI: return "Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase: N/A\r\n\n \n \n For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season)\r\n\n \n \n For Ludiomil: N/A"; + case STR: return "Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required.\r\n\n EXAMPLES:\r\n\n \n \n For Agenerase 50 mg soft capsules: 50mg\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: 25 mg\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A"; + case TIME: return "Description: This refers to a time or time period that may be specified in the text of the medicinal product name\r\n\n \n Example:\n \r\n\n \n For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is \"2008/2009 season\""; + case TMK: return "Description: This refers to trademark/company element if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n for Insulin Human Winthrop Comb 15: Winthrop"; + case USE: return "Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\n\r\n\n \n Examples:\n \r\n\n \n For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: \"Heartburn Relief\"\n For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is \"Soothing Coughs\""; + case SFX: return "Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though)."; + case TITLESTYLES: return "Description:Extra information about the style of a title"; + case AC: return "Description:Indicates that a title like \"Dr.\", \"M.D.\" or \"Ph.D.\" is an academic title."; + case HON: return "Description:A honorific such as \"The Right Honourable\" or \"Weledelgeleerde Heer\"."; + case NB: return "Description:A nobility title such as Sir, Count, Grafin."; + case PR: return "Description:Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential titles."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AD: return "acquired"; + case SP: return "spouse"; + case BR: return "birth"; + case CL: return "callme"; + case IN: return "initial"; + case LS: return "legal status"; + case MID: return "middle name"; + case PFX: return "prefix"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "container name"; + case DEV: return "device name"; + case FLAV: return "FlavorName"; + case FORMUL: return "FormulationPartName"; + case FRM: return "form name"; + case INV: return "invented name"; + case POPUL: return "TargetPopulationName"; + case SCI: return "scientific name"; + case STR: return "strength name"; + case TIME: return "TimeOrPeriodName"; + case TMK: return "trademark name"; + case USE: return "intended use name"; + case SFX: return "suffix"; + case TITLESTYLES: return "TitleStyles"; + case AC: return "academic"; + case HON: return "honorific"; + case NB: return "nobility"; + case PR: return "professional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2EnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2EnumFactory.java new file mode 100644 index 00000000000..b7b1a60519a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartQualifierR2EnumFactory.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNamePartQualifierR2EnumFactory implements EnumFactory { + + public V3EntityNamePartQualifierR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return V3EntityNamePartQualifierR2.AD; + if ("SP".equals(codeString)) + return V3EntityNamePartQualifierR2.SP; + if ("BR".equals(codeString)) + return V3EntityNamePartQualifierR2.BR; + if ("CL".equals(codeString)) + return V3EntityNamePartQualifierR2.CL; + if ("IN".equals(codeString)) + return V3EntityNamePartQualifierR2.IN; + if ("LS".equals(codeString)) + return V3EntityNamePartQualifierR2.LS; + if ("MID".equals(codeString)) + return V3EntityNamePartQualifierR2.MID; + if ("PFX".equals(codeString)) + return V3EntityNamePartQualifierR2.PFX; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return V3EntityNamePartQualifierR2.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return V3EntityNamePartQualifierR2.CON; + if ("DEV".equals(codeString)) + return V3EntityNamePartQualifierR2.DEV; + if ("FLAV".equals(codeString)) + return V3EntityNamePartQualifierR2.FLAV; + if ("FORMUL".equals(codeString)) + return V3EntityNamePartQualifierR2.FORMUL; + if ("FRM".equals(codeString)) + return V3EntityNamePartQualifierR2.FRM; + if ("INV".equals(codeString)) + return V3EntityNamePartQualifierR2.INV; + if ("POPUL".equals(codeString)) + return V3EntityNamePartQualifierR2.POPUL; + if ("SCI".equals(codeString)) + return V3EntityNamePartQualifierR2.SCI; + if ("STR".equals(codeString)) + return V3EntityNamePartQualifierR2.STR; + if ("TIME".equals(codeString)) + return V3EntityNamePartQualifierR2.TIME; + if ("TMK".equals(codeString)) + return V3EntityNamePartQualifierR2.TMK; + if ("USE".equals(codeString)) + return V3EntityNamePartQualifierR2.USE; + if ("SFX".equals(codeString)) + return V3EntityNamePartQualifierR2.SFX; + if ("TitleStyles".equals(codeString)) + return V3EntityNamePartQualifierR2.TITLESTYLES; + if ("AC".equals(codeString)) + return V3EntityNamePartQualifierR2.AC; + if ("HON".equals(codeString)) + return V3EntityNamePartQualifierR2.HON; + if ("NB".equals(codeString)) + return V3EntityNamePartQualifierR2.NB; + if ("PR".equals(codeString)) + return V3EntityNamePartQualifierR2.PR; + throw new IllegalArgumentException("Unknown V3EntityNamePartQualifierR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartQualifierR2 code) { + if (code == V3EntityNamePartQualifierR2.AD) + return "AD"; + if (code == V3EntityNamePartQualifierR2.SP) + return "SP"; + if (code == V3EntityNamePartQualifierR2.BR) + return "BR"; + if (code == V3EntityNamePartQualifierR2.CL) + return "CL"; + if (code == V3EntityNamePartQualifierR2.IN) + return "IN"; + if (code == V3EntityNamePartQualifierR2.LS) + return "LS"; + if (code == V3EntityNamePartQualifierR2.MID) + return "MID"; + if (code == V3EntityNamePartQualifierR2.PFX) + return "PFX"; + if (code == V3EntityNamePartQualifierR2.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS) + return "PharmaceuticalEntityNamePartQualifiers"; + if (code == V3EntityNamePartQualifierR2.CON) + return "CON"; + if (code == V3EntityNamePartQualifierR2.DEV) + return "DEV"; + if (code == V3EntityNamePartQualifierR2.FLAV) + return "FLAV"; + if (code == V3EntityNamePartQualifierR2.FORMUL) + return "FORMUL"; + if (code == V3EntityNamePartQualifierR2.FRM) + return "FRM"; + if (code == V3EntityNamePartQualifierR2.INV) + return "INV"; + if (code == V3EntityNamePartQualifierR2.POPUL) + return "POPUL"; + if (code == V3EntityNamePartQualifierR2.SCI) + return "SCI"; + if (code == V3EntityNamePartQualifierR2.STR) + return "STR"; + if (code == V3EntityNamePartQualifierR2.TIME) + return "TIME"; + if (code == V3EntityNamePartQualifierR2.TMK) + return "TMK"; + if (code == V3EntityNamePartQualifierR2.USE) + return "USE"; + if (code == V3EntityNamePartQualifierR2.SFX) + return "SFX"; + if (code == V3EntityNamePartQualifierR2.TITLESTYLES) + return "TitleStyles"; + if (code == V3EntityNamePartQualifierR2.AC) + return "AC"; + if (code == V3EntityNamePartQualifierR2.HON) + return "HON"; + if (code == V3EntityNamePartQualifierR2.NB) + return "NB"; + if (code == V3EntityNamePartQualifierR2.PR) + return "PR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartType.java new file mode 100644 index 00000000000..9690c6653a6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartType { + + /** + * A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space. + */ + DEL, + /** + * Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + */ + FAM, + /** + * Given name (don't call it "first name" since this given names do not always come first) + */ + GIV, + /** + * A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). Note that prefixes can be inverted. + */ + PFX, + /** + * Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). Suffices cannot be inverted. + */ + SFX, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return DEL; + if ("FAM".equals(codeString)) + return FAM; + if ("GIV".equals(codeString)) + return GIV; + if ("PFX".equals(codeString)) + return PFX; + if ("SFX".equals(codeString)) + return SFX; + throw new FHIRException("Unknown V3EntityNamePartType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DEL: return "DEL"; + case FAM: return "FAM"; + case GIV: return "GIV"; + case PFX: return "PFX"; + case SFX: return "SFX"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartType"; + } + public String getDefinition() { + switch (this) { + case DEL: return "A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space."; + case FAM: return "Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."; + case GIV: return "Given name (don't call it \"first name\" since this given names do not always come first)"; + case PFX: return "A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). Note that prefixes can be inverted."; + case SFX: return "Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). Suffices cannot be inverted."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DEL: return "delimiter"; + case FAM: return "family"; + case GIV: return "given"; + case PFX: return "prefix"; + case SFX: return "suffix"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeEnumFactory.java new file mode 100644 index 00000000000..792a43ce9ff --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNamePartTypeEnumFactory implements EnumFactory { + + public V3EntityNamePartType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return V3EntityNamePartType.DEL; + if ("FAM".equals(codeString)) + return V3EntityNamePartType.FAM; + if ("GIV".equals(codeString)) + return V3EntityNamePartType.GIV; + if ("PFX".equals(codeString)) + return V3EntityNamePartType.PFX; + if ("SFX".equals(codeString)) + return V3EntityNamePartType.SFX; + throw new IllegalArgumentException("Unknown V3EntityNamePartType code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartType code) { + if (code == V3EntityNamePartType.DEL) + return "DEL"; + if (code == V3EntityNamePartType.FAM) + return "FAM"; + if (code == V3EntityNamePartType.GIV) + return "GIV"; + if (code == V3EntityNamePartType.PFX) + return "PFX"; + if (code == V3EntityNamePartType.SFX) + return "SFX"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2.java new file mode 100644 index 00000000000..a9dd879dcc1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2.java @@ -0,0 +1,108 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartTypeR2 { + + /** + * Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space. + */ + DEL, + /** + * Description:Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + */ + FAM, + /** + * Description:Given name. Note: don't call it "first name" since the given names do not always come first. + */ + GIV, + /** + * Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc. + + + Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles. + */ + TITLE, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartTypeR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return DEL; + if ("FAM".equals(codeString)) + return FAM; + if ("GIV".equals(codeString)) + return GIV; + if ("TITLE".equals(codeString)) + return TITLE; + throw new FHIRException("Unknown V3EntityNamePartTypeR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DEL: return "DEL"; + case FAM: return "FAM"; + case GIV: return "GIV"; + case TITLE: return "TITLE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartTypeR2"; + } + public String getDefinition() { + switch (this) { + case DEL: return "Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space."; + case FAM: return "Description:Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."; + case GIV: return "Description:Given name. Note: don't call it \"first name\" since the given names do not always come first."; + case TITLE: return "Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc.\r\n\n \n Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DEL: return "delimiter"; + case FAM: return "family"; + case GIV: return "given"; + case TITLE: return "title"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2EnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2EnumFactory.java new file mode 100644 index 00000000000..2d991216820 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNamePartTypeR2EnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNamePartTypeR2EnumFactory implements EnumFactory { + + public V3EntityNamePartTypeR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return V3EntityNamePartTypeR2.DEL; + if ("FAM".equals(codeString)) + return V3EntityNamePartTypeR2.FAM; + if ("GIV".equals(codeString)) + return V3EntityNamePartTypeR2.GIV; + if ("TITLE".equals(codeString)) + return V3EntityNamePartTypeR2.TITLE; + throw new IllegalArgumentException("Unknown V3EntityNamePartTypeR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartTypeR2 code) { + if (code == V3EntityNamePartTypeR2.DEL) + return "DEL"; + if (code == V3EntityNamePartTypeR2.FAM) + return "FAM"; + if (code == V3EntityNamePartTypeR2.GIV) + return "GIV"; + if (code == V3EntityNamePartTypeR2.TITLE) + return "TITLE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUse.java new file mode 100644 index 00000000000..012382f1c0e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUse.java @@ -0,0 +1,206 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNameUse { + + /** + * Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.) + */ + _NAMEREPRESENTATIONUSE, + /** + * Alphabetic transcription of name (Japanese: romaji) + */ + ABC, + /** + * Ideographic representation of name (e.g., Japanese kanji, Chinese characters) + */ + IDE, + /** + * Syllabic transcription of name (e.g., Japanese kana, Korean hangul) + */ + SYL, + /** + * A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call "alias" may fit into this category. + */ + ASGN, + /** + * As recorded on a license, record, certificate, etc. (only if different from legal name) + */ + C, + /** + * e.g. Chief Red Cloud + */ + I, + /** + * Known as/conventional/the one you use + */ + L, + /** + * Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law. + */ + OR, + /** + * A self asserted name that the person is using or has used. + */ + P, + /** + * Includes writer's pseudonym, stage name, etc + */ + A, + /** + * e.g. Sister Mary Francis, Brother John + */ + R, + /** + * A name intended for use in searching or matching. + */ + SRCH, + /** + * A name spelled phonetically. + + There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion: + */ + PHON, + /** + * A name spelled according to the SoundEx algorithm. + */ + SNDX, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNameUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NameRepresentationUse".equals(codeString)) + return _NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return ABC; + if ("IDE".equals(codeString)) + return IDE; + if ("SYL".equals(codeString)) + return SYL; + if ("ASGN".equals(codeString)) + return ASGN; + if ("C".equals(codeString)) + return C; + if ("I".equals(codeString)) + return I; + if ("L".equals(codeString)) + return L; + if ("OR".equals(codeString)) + return OR; + if ("P".equals(codeString)) + return P; + if ("A".equals(codeString)) + return A; + if ("R".equals(codeString)) + return R; + if ("SRCH".equals(codeString)) + return SRCH; + if ("PHON".equals(codeString)) + return PHON; + if ("SNDX".equals(codeString)) + return SNDX; + throw new FHIRException("Unknown V3EntityNameUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "_NameRepresentationUse"; + case ABC: return "ABC"; + case IDE: return "IDE"; + case SYL: return "SYL"; + case ASGN: return "ASGN"; + case C: return "C"; + case I: return "I"; + case L: return "L"; + case OR: return "OR"; + case P: return "P"; + case A: return "A"; + case R: return "R"; + case SRCH: return "SRCH"; + case PHON: return "PHON"; + case SNDX: return "SNDX"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNameUse"; + } + public String getDefinition() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.)"; + case ABC: return "Alphabetic transcription of name (Japanese: romaji)"; + case IDE: return "Ideographic representation of name (e.g., Japanese kanji, Chinese characters)"; + case SYL: return "Syllabic transcription of name (e.g., Japanese kana, Korean hangul)"; + case ASGN: return "A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call \"alias\" may fit into this category."; + case C: return "As recorded on a license, record, certificate, etc. (only if different from legal name)"; + case I: return "e.g. Chief Red Cloud"; + case L: return "Known as/conventional/the one you use"; + case OR: return "Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law."; + case P: return "A self asserted name that the person is using or has used."; + case A: return "Includes writer's pseudonym, stage name, etc"; + case R: return "e.g. Sister Mary Francis, Brother John"; + case SRCH: return "A name intended for use in searching or matching."; + case PHON: return "A name spelled phonetically.\r\n\n There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion:"; + case SNDX: return "A name spelled according to the SoundEx algorithm."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "Alphabetic"; + case IDE: return "Ideographic"; + case SYL: return "Syllabic"; + case ASGN: return "assigned"; + case C: return "License"; + case I: return "Indigenous/Tribal"; + case L: return "Legal"; + case OR: return "official registry"; + case P: return "pseudonym"; + case A: return "Artist/Stage"; + case R: return "Religious"; + case SRCH: return "search"; + case PHON: return "phonetic"; + case SNDX: return "Soundex"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseEnumFactory.java new file mode 100644 index 00000000000..7b0729182ad --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseEnumFactory.java @@ -0,0 +1,111 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNameUseEnumFactory implements EnumFactory { + + public V3EntityNameUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NameRepresentationUse".equals(codeString)) + return V3EntityNameUse._NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return V3EntityNameUse.ABC; + if ("IDE".equals(codeString)) + return V3EntityNameUse.IDE; + if ("SYL".equals(codeString)) + return V3EntityNameUse.SYL; + if ("ASGN".equals(codeString)) + return V3EntityNameUse.ASGN; + if ("C".equals(codeString)) + return V3EntityNameUse.C; + if ("I".equals(codeString)) + return V3EntityNameUse.I; + if ("L".equals(codeString)) + return V3EntityNameUse.L; + if ("OR".equals(codeString)) + return V3EntityNameUse.OR; + if ("P".equals(codeString)) + return V3EntityNameUse.P; + if ("A".equals(codeString)) + return V3EntityNameUse.A; + if ("R".equals(codeString)) + return V3EntityNameUse.R; + if ("SRCH".equals(codeString)) + return V3EntityNameUse.SRCH; + if ("PHON".equals(codeString)) + return V3EntityNameUse.PHON; + if ("SNDX".equals(codeString)) + return V3EntityNameUse.SNDX; + throw new IllegalArgumentException("Unknown V3EntityNameUse code '"+codeString+"'"); + } + + public String toCode(V3EntityNameUse code) { + if (code == V3EntityNameUse._NAMEREPRESENTATIONUSE) + return "_NameRepresentationUse"; + if (code == V3EntityNameUse.ABC) + return "ABC"; + if (code == V3EntityNameUse.IDE) + return "IDE"; + if (code == V3EntityNameUse.SYL) + return "SYL"; + if (code == V3EntityNameUse.ASGN) + return "ASGN"; + if (code == V3EntityNameUse.C) + return "C"; + if (code == V3EntityNameUse.I) + return "I"; + if (code == V3EntityNameUse.L) + return "L"; + if (code == V3EntityNameUse.OR) + return "OR"; + if (code == V3EntityNameUse.P) + return "P"; + if (code == V3EntityNameUse.A) + return "A"; + if (code == V3EntityNameUse.R) + return "R"; + if (code == V3EntityNameUse.SRCH) + return "SRCH"; + if (code == V3EntityNameUse.PHON) + return "PHON"; + if (code == V3EntityNameUse.SNDX) + return "SNDX"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2.java new file mode 100644 index 00000000000..508ad068cb7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNameUseR2 { + + /** + * Description:A name that a person has assumed or has been assumed to them. + */ + ASSUMED, + /** + * Description:A name used in a Professional or Business context . Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms) + */ + A, + /** + * Description:Anonymous assigned name (used to protect a persons identity for privacy reasons) + */ + ANON, + /** + * Description:e.g . Chief Red Cloud + */ + I, + /** + * Description:A non-official name by which the person is sometimes known. (This may also be used to record informal names such as a nickname) + */ + P, + /** + * Description:A name assumed as part of a religious vocation . e.g . Sister Mary Francis, Brother John + */ + R, + /** + * Description:Known as/conventional/the one you normally use + */ + C, + /** + * Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store maiden names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically + */ + M, + /** + * Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g . use of Ideographic for formal communications.) + */ + NAMEREPRESENTATIONUSE, + /** + * Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji) + */ + ABC, + /** + * Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters) + */ + IDE, + /** + * Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul) + */ + SYL, + /** + * Description:This name is no longer in use (note: Names may also carry valid time ranges . This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known) + */ + OLD, + /** + * Description:This name should no longer be used when interacting with the person (i.e . in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled "Do Not Use" and other names in order to eliminate name parts that are common between the other name and a name labeled "Do Not Use". + */ + DN, + /** + * Description:The formal name as registered in an official (government) registry, but which name might not be commonly used . May correspond to the concept of legal name + */ + OR, + /** + * Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm. + */ + PHON, + /** + * Description:A name intended for use in searching or matching. This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses. + */ + SRCH, + /** + * Description:A temporary name. Note that a name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNameUseR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Assumed".equals(codeString)) + return ASSUMED; + if ("A".equals(codeString)) + return A; + if ("ANON".equals(codeString)) + return ANON; + if ("I".equals(codeString)) + return I; + if ("P".equals(codeString)) + return P; + if ("R".equals(codeString)) + return R; + if ("C".equals(codeString)) + return C; + if ("M".equals(codeString)) + return M; + if ("NameRepresentationUse".equals(codeString)) + return NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return ABC; + if ("IDE".equals(codeString)) + return IDE; + if ("SYL".equals(codeString)) + return SYL; + if ("OLD".equals(codeString)) + return OLD; + if ("DN".equals(codeString)) + return DN; + if ("OR".equals(codeString)) + return OR; + if ("PHON".equals(codeString)) + return PHON; + if ("SRCH".equals(codeString)) + return SRCH; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3EntityNameUseR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASSUMED: return "Assumed"; + case A: return "A"; + case ANON: return "ANON"; + case I: return "I"; + case P: return "P"; + case R: return "R"; + case C: return "C"; + case M: return "M"; + case NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "ABC"; + case IDE: return "IDE"; + case SYL: return "SYL"; + case OLD: return "OLD"; + case DN: return "DN"; + case OR: return "OR"; + case PHON: return "PHON"; + case SRCH: return "SRCH"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNameUseR2"; + } + public String getDefinition() { + switch (this) { + case ASSUMED: return "Description:A name that a person has assumed or has been assumed to them."; + case A: return "Description:A name used in a Professional or Business context . Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms)"; + case ANON: return "Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)"; + case I: return "Description:e.g . Chief Red Cloud"; + case P: return "Description:A non-official name by which the person is sometimes known. (This may also be used to record informal names such as a nickname)"; + case R: return "Description:A name assumed as part of a religious vocation . e.g . Sister Mary Francis, Brother John"; + case C: return "Description:Known as/conventional/the one you normally use"; + case M: return "Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store maiden names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically"; + case NAMEREPRESENTATIONUSE: return "Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g . use of Ideographic for formal communications.)"; + case ABC: return "Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)"; + case IDE: return "Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)"; + case SYL: return "Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)"; + case OLD: return "Description:This name is no longer in use (note: Names may also carry valid time ranges . This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known)"; + case DN: return "Description:This name should no longer be used when interacting with the person (i.e . in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled \"Do Not Use\" and other names in order to eliminate name parts that are common between the other name and a name labeled \"Do Not Use\"."; + case OR: return "Description:The formal name as registered in an official (government) registry, but which name might not be commonly used . May correspond to the concept of legal name"; + case PHON: return "Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm."; + case SRCH: return "Description:A name intended for use in searching or matching. This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses."; + case T: return "Description:A temporary name. Note that a name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASSUMED: return "Assumed"; + case A: return "business name"; + case ANON: return "Anonymous"; + case I: return "Indigenous/Tribal"; + case P: return "Other/Pseudonym/Alias"; + case R: return "religious"; + case C: return "customary"; + case M: return "maiden name"; + case NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "alphabetic"; + case IDE: return "ideographic"; + case SYL: return "syllabic"; + case OLD: return "no longer in use"; + case DN: return "do not use"; + case OR: return "official registry name"; + case PHON: return "phonetic"; + case SRCH: return "search"; + case T: return "temporary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2EnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2EnumFactory.java new file mode 100644 index 00000000000..f6d0501d603 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityNameUseR2EnumFactory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityNameUseR2EnumFactory implements EnumFactory { + + public V3EntityNameUseR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Assumed".equals(codeString)) + return V3EntityNameUseR2.ASSUMED; + if ("A".equals(codeString)) + return V3EntityNameUseR2.A; + if ("ANON".equals(codeString)) + return V3EntityNameUseR2.ANON; + if ("I".equals(codeString)) + return V3EntityNameUseR2.I; + if ("P".equals(codeString)) + return V3EntityNameUseR2.P; + if ("R".equals(codeString)) + return V3EntityNameUseR2.R; + if ("C".equals(codeString)) + return V3EntityNameUseR2.C; + if ("M".equals(codeString)) + return V3EntityNameUseR2.M; + if ("NameRepresentationUse".equals(codeString)) + return V3EntityNameUseR2.NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return V3EntityNameUseR2.ABC; + if ("IDE".equals(codeString)) + return V3EntityNameUseR2.IDE; + if ("SYL".equals(codeString)) + return V3EntityNameUseR2.SYL; + if ("OLD".equals(codeString)) + return V3EntityNameUseR2.OLD; + if ("DN".equals(codeString)) + return V3EntityNameUseR2.DN; + if ("OR".equals(codeString)) + return V3EntityNameUseR2.OR; + if ("PHON".equals(codeString)) + return V3EntityNameUseR2.PHON; + if ("SRCH".equals(codeString)) + return V3EntityNameUseR2.SRCH; + if ("T".equals(codeString)) + return V3EntityNameUseR2.T; + throw new IllegalArgumentException("Unknown V3EntityNameUseR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNameUseR2 code) { + if (code == V3EntityNameUseR2.ASSUMED) + return "Assumed"; + if (code == V3EntityNameUseR2.A) + return "A"; + if (code == V3EntityNameUseR2.ANON) + return "ANON"; + if (code == V3EntityNameUseR2.I) + return "I"; + if (code == V3EntityNameUseR2.P) + return "P"; + if (code == V3EntityNameUseR2.R) + return "R"; + if (code == V3EntityNameUseR2.C) + return "C"; + if (code == V3EntityNameUseR2.M) + return "M"; + if (code == V3EntityNameUseR2.NAMEREPRESENTATIONUSE) + return "NameRepresentationUse"; + if (code == V3EntityNameUseR2.ABC) + return "ABC"; + if (code == V3EntityNameUseR2.IDE) + return "IDE"; + if (code == V3EntityNameUseR2.SYL) + return "SYL"; + if (code == V3EntityNameUseR2.OLD) + return "OLD"; + if (code == V3EntityNameUseR2.DN) + return "DN"; + if (code == V3EntityNameUseR2.OR) + return "OR"; + if (code == V3EntityNameUseR2.PHON) + return "PHON"; + if (code == V3EntityNameUseR2.SRCH) + return "SRCH"; + if (code == V3EntityNameUseR2.T) + return "T"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRisk.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRisk.java new file mode 100644 index 00000000000..3512c87b97d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRisk.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityRisk { + + /** + * A danger that can be associated with certain living subjects, including humans. + */ + AGG, + /** + * The dangers associated with normal biological materials. I.e. potential risk of unknown infections. Routine biological materials from living subjects. + */ + BIO, + /** + * Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact. + */ + COR, + /** + * The entity is at risk for escaping from containment or control. + */ + ESC, + /** + * Material is highly inflammable and in certain mixtures (with air) may lead to explosions. Keep away from fire, sparks and excessive heat. + */ + IFL, + /** + * Material is an explosive mixture. Keep away from fire, sparks, and heat. + */ + EXP, + /** + * Material known to be infectious with human pathogenic microorganisms. Those who handle this material must take precautions for their protection. + */ + INF, + /** + * Material contains microorganisms that is an environmental hazard. Must be handled with special care. + */ + BHZ, + /** + * Material is solid and sharp (e.g., cannulas). Dispose in hard container. + */ + INJ, + /** + * Material is poisonous to humans and/or animals. Special care must be taken to avoid incorporation, even of small amounts. + */ + POI, + /** + * Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards. + */ + RAD, + /** + * added to help the parsers + */ + NULL; + public static V3EntityRisk fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AGG".equals(codeString)) + return AGG; + if ("BIO".equals(codeString)) + return BIO; + if ("COR".equals(codeString)) + return COR; + if ("ESC".equals(codeString)) + return ESC; + if ("IFL".equals(codeString)) + return IFL; + if ("EXP".equals(codeString)) + return EXP; + if ("INF".equals(codeString)) + return INF; + if ("BHZ".equals(codeString)) + return BHZ; + if ("INJ".equals(codeString)) + return INJ; + if ("POI".equals(codeString)) + return POI; + if ("RAD".equals(codeString)) + return RAD; + throw new FHIRException("Unknown V3EntityRisk code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AGG: return "AGG"; + case BIO: return "BIO"; + case COR: return "COR"; + case ESC: return "ESC"; + case IFL: return "IFL"; + case EXP: return "EXP"; + case INF: return "INF"; + case BHZ: return "BHZ"; + case INJ: return "INJ"; + case POI: return "POI"; + case RAD: return "RAD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityRisk"; + } + public String getDefinition() { + switch (this) { + case AGG: return "A danger that can be associated with certain living subjects, including humans."; + case BIO: return "The dangers associated with normal biological materials. I.e. potential risk of unknown infections. Routine biological materials from living subjects."; + case COR: return "Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact."; + case ESC: return "The entity is at risk for escaping from containment or control."; + case IFL: return "Material is highly inflammable and in certain mixtures (with air) may lead to explosions. Keep away from fire, sparks and excessive heat."; + case EXP: return "Material is an explosive mixture. Keep away from fire, sparks, and heat."; + case INF: return "Material known to be infectious with human pathogenic microorganisms. Those who handle this material must take precautions for their protection."; + case BHZ: return "Material contains microorganisms that is an environmental hazard. Must be handled with special care."; + case INJ: return "Material is solid and sharp (e.g., cannulas). Dispose in hard container."; + case POI: return "Material is poisonous to humans and/or animals. Special care must be taken to avoid incorporation, even of small amounts."; + case RAD: return "Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AGG: return "aggressive"; + case BIO: return "Biological"; + case COR: return "Corrosive"; + case ESC: return "Escape Risk"; + case IFL: return "inflammable"; + case EXP: return "explosive"; + case INF: return "infectious"; + case BHZ: return "biohazard"; + case INJ: return "injury hazard"; + case POI: return "poison"; + case RAD: return "radioactive"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRiskEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRiskEnumFactory.java new file mode 100644 index 00000000000..69e9603d38e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityRiskEnumFactory.java @@ -0,0 +1,95 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityRiskEnumFactory implements EnumFactory { + + public V3EntityRisk fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AGG".equals(codeString)) + return V3EntityRisk.AGG; + if ("BIO".equals(codeString)) + return V3EntityRisk.BIO; + if ("COR".equals(codeString)) + return V3EntityRisk.COR; + if ("ESC".equals(codeString)) + return V3EntityRisk.ESC; + if ("IFL".equals(codeString)) + return V3EntityRisk.IFL; + if ("EXP".equals(codeString)) + return V3EntityRisk.EXP; + if ("INF".equals(codeString)) + return V3EntityRisk.INF; + if ("BHZ".equals(codeString)) + return V3EntityRisk.BHZ; + if ("INJ".equals(codeString)) + return V3EntityRisk.INJ; + if ("POI".equals(codeString)) + return V3EntityRisk.POI; + if ("RAD".equals(codeString)) + return V3EntityRisk.RAD; + throw new IllegalArgumentException("Unknown V3EntityRisk code '"+codeString+"'"); + } + + public String toCode(V3EntityRisk code) { + if (code == V3EntityRisk.AGG) + return "AGG"; + if (code == V3EntityRisk.BIO) + return "BIO"; + if (code == V3EntityRisk.COR) + return "COR"; + if (code == V3EntityRisk.ESC) + return "ESC"; + if (code == V3EntityRisk.IFL) + return "IFL"; + if (code == V3EntityRisk.EXP) + return "EXP"; + if (code == V3EntityRisk.INF) + return "INF"; + if (code == V3EntityRisk.BHZ) + return "BHZ"; + if (code == V3EntityRisk.INJ) + return "INJ"; + if (code == V3EntityRisk.POI) + return "POI"; + if (code == V3EntityRisk.RAD) + return "RAD"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatus.java new file mode 100644 index 00000000000..c9fdff0f7e0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatus.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of an Entity record instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Entity record is currently active. + */ + ACTIVE, + /** + * Definition: The state representing the fact that the entity is inactive. + */ + INACTIVE, + /** + * The state representing the normal termination of an Entity record. + */ + TERMINATED, + /** + * The state representing the termination of an Entity record instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3EntityStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("terminated".equals(codeString)) + return TERMINATED; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3EntityStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of an Entity record instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Entity record is currently active."; + case INACTIVE: return "Definition: The state representing the fact that the entity is inactive."; + case TERMINATED: return "The state representing the normal termination of an Entity record."; + case NULLIFIED: return "The state representing the termination of an Entity record instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatusEnumFactory.java new file mode 100644 index 00000000000..11764464780 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EntityStatusEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EntityStatusEnumFactory implements EnumFactory { + + public V3EntityStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3EntityStatus.NORMAL; + if ("active".equals(codeString)) + return V3EntityStatus.ACTIVE; + if ("inactive".equals(codeString)) + return V3EntityStatus.INACTIVE; + if ("terminated".equals(codeString)) + return V3EntityStatus.TERMINATED; + if ("nullified".equals(codeString)) + return V3EntityStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3EntityStatus code '"+codeString+"'"); + } + + public String toCode(V3EntityStatus code) { + if (code == V3EntityStatus.NORMAL) + return "normal"; + if (code == V3EntityStatus.ACTIVE) + return "active"; + if (code == V3EntityStatus.INACTIVE) + return "inactive"; + if (code == V3EntityStatus.TERMINATED) + return "terminated"; + if (code == V3EntityStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevel.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevel.java new file mode 100644 index 00000000000..0298de851a9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevel.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EquipmentAlertLevel { + + /** + * Shut Down, Fix Problem and Re-init + */ + C, + /** + * No Corrective Action Needed + */ + N, + /** + * Corrective Action Required + */ + S, + /** + * Corrective Action Anticipated + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3EquipmentAlertLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3EquipmentAlertLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case N: return "N"; + case S: return "S"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EquipmentAlertLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Shut Down, Fix Problem and Re-init"; + case N: return "No Corrective Action Needed"; + case S: return "Corrective Action Required"; + case W: return "Corrective Action Anticipated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Critical"; + case N: return "Normal"; + case S: return "Serious"; + case W: return "Warning"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevelEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevelEnumFactory.java new file mode 100644 index 00000000000..ff1c86e98ae --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EquipmentAlertLevelEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EquipmentAlertLevelEnumFactory implements EnumFactory { + + public V3EquipmentAlertLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3EquipmentAlertLevel.C; + if ("N".equals(codeString)) + return V3EquipmentAlertLevel.N; + if ("S".equals(codeString)) + return V3EquipmentAlertLevel.S; + if ("W".equals(codeString)) + return V3EquipmentAlertLevel.W; + throw new IllegalArgumentException("Unknown V3EquipmentAlertLevel code '"+codeString+"'"); + } + + public String toCode(V3EquipmentAlertLevel code) { + if (code == V3EquipmentAlertLevel.C) + return "C"; + if (code == V3EquipmentAlertLevel.N) + return "N"; + if (code == V3EquipmentAlertLevel.S) + return "S"; + if (code == V3EquipmentAlertLevel.W) + return "W"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Ethnicity.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Ethnicity.java new file mode 100644 index 00000000000..d7747f7060b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Ethnicity.java @@ -0,0 +1,456 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Ethnicity { + + /** + * Hispanic or Latino + */ + _21352, + /** + * Spaniard + */ + _21378, + /** + * Andalusian + */ + _21386, + /** + * Asturian + */ + _21394, + /** + * Castillian + */ + _21402, + /** + * Catalonian + */ + _21410, + /** + * Belearic Islander + */ + _21428, + /** + * Gallego + */ + _21436, + /** + * Valencian + */ + _21444, + /** + * Canarian + */ + _21451, + /** + * Spanish Basque + */ + _21469, + /** + * Mexican + */ + _21485, + /** + * Mexican American + */ + _21493, + /** + * Mexicano + */ + _21501, + /** + * Chicano + */ + _21519, + /** + * La Raza + */ + _21527, + /** + * Mexican American Indian + */ + _21535, + /** + * Central American + */ + _21550, + /** + * Costa Rican + */ + _21568, + /** + * Guatemalan + */ + _21576, + /** + * Honduran + */ + _21584, + /** + * Nicaraguan + */ + _21592, + /** + * Panamanian + */ + _21600, + /** + * Salvadoran + */ + _21618, + /** + * Central American Indian + */ + _21626, + /** + * Canal Zone + */ + _21634, + /** + * South American + */ + _21659, + /** + * Argentinean + */ + _21667, + /** + * Bolivian + */ + _21675, + /** + * Chilean + */ + _21683, + /** + * Colombian + */ + _21691, + /** + * Ecuadorian + */ + _21709, + /** + * Paraguayan + */ + _21717, + /** + * Peruvian + */ + _21725, + /** + * Uruguayan + */ + _21733, + /** + * Venezuelan + */ + _21741, + /** + * South American Indian + */ + _21758, + /** + * Criollo + */ + _21766, + /** + * Latin American + */ + _21782, + /** + * Puerto Rican + */ + _21808, + /** + * Cuban + */ + _21824, + /** + * Dominican + */ + _21840, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of "not otherwise coded" term is deprecated. + */ + _21865, + /** + * added to help the parsers + */ + NULL; + public static V3Ethnicity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2135-2".equals(codeString)) + return _21352; + if ("2137-8".equals(codeString)) + return _21378; + if ("2138-6".equals(codeString)) + return _21386; + if ("2139-4".equals(codeString)) + return _21394; + if ("2140-2".equals(codeString)) + return _21402; + if ("2141-0".equals(codeString)) + return _21410; + if ("2142-8".equals(codeString)) + return _21428; + if ("2143-6".equals(codeString)) + return _21436; + if ("2144-4".equals(codeString)) + return _21444; + if ("2145-1".equals(codeString)) + return _21451; + if ("2146-9".equals(codeString)) + return _21469; + if ("2148-5".equals(codeString)) + return _21485; + if ("2149-3".equals(codeString)) + return _21493; + if ("2150-1".equals(codeString)) + return _21501; + if ("2151-9".equals(codeString)) + return _21519; + if ("2152-7".equals(codeString)) + return _21527; + if ("2153-5".equals(codeString)) + return _21535; + if ("2155-0".equals(codeString)) + return _21550; + if ("2156-8".equals(codeString)) + return _21568; + if ("2157-6".equals(codeString)) + return _21576; + if ("2158-4".equals(codeString)) + return _21584; + if ("2159-2".equals(codeString)) + return _21592; + if ("2160-0".equals(codeString)) + return _21600; + if ("2161-8".equals(codeString)) + return _21618; + if ("2162-6".equals(codeString)) + return _21626; + if ("2163-4".equals(codeString)) + return _21634; + if ("2165-9".equals(codeString)) + return _21659; + if ("2166-7".equals(codeString)) + return _21667; + if ("2167-5".equals(codeString)) + return _21675; + if ("2168-3".equals(codeString)) + return _21683; + if ("2169-1".equals(codeString)) + return _21691; + if ("2170-9".equals(codeString)) + return _21709; + if ("2171-7".equals(codeString)) + return _21717; + if ("2172-5".equals(codeString)) + return _21725; + if ("2173-3".equals(codeString)) + return _21733; + if ("2174-1".equals(codeString)) + return _21741; + if ("2175-8".equals(codeString)) + return _21758; + if ("2176-6".equals(codeString)) + return _21766; + if ("2178-2".equals(codeString)) + return _21782; + if ("2180-8".equals(codeString)) + return _21808; + if ("2182-4".equals(codeString)) + return _21824; + if ("2184-0".equals(codeString)) + return _21840; + if ("2186-5".equals(codeString)) + return _21865; + throw new FHIRException("Unknown V3Ethnicity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _21352: return "2135-2"; + case _21378: return "2137-8"; + case _21386: return "2138-6"; + case _21394: return "2139-4"; + case _21402: return "2140-2"; + case _21410: return "2141-0"; + case _21428: return "2142-8"; + case _21436: return "2143-6"; + case _21444: return "2144-4"; + case _21451: return "2145-1"; + case _21469: return "2146-9"; + case _21485: return "2148-5"; + case _21493: return "2149-3"; + case _21501: return "2150-1"; + case _21519: return "2151-9"; + case _21527: return "2152-7"; + case _21535: return "2153-5"; + case _21550: return "2155-0"; + case _21568: return "2156-8"; + case _21576: return "2157-6"; + case _21584: return "2158-4"; + case _21592: return "2159-2"; + case _21600: return "2160-0"; + case _21618: return "2161-8"; + case _21626: return "2162-6"; + case _21634: return "2163-4"; + case _21659: return "2165-9"; + case _21667: return "2166-7"; + case _21675: return "2167-5"; + case _21683: return "2168-3"; + case _21691: return "2169-1"; + case _21709: return "2170-9"; + case _21717: return "2171-7"; + case _21725: return "2172-5"; + case _21733: return "2173-3"; + case _21741: return "2174-1"; + case _21758: return "2175-8"; + case _21766: return "2176-6"; + case _21782: return "2178-2"; + case _21808: return "2180-8"; + case _21824: return "2182-4"; + case _21840: return "2184-0"; + case _21865: return "2186-5"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Ethnicity"; + } + public String getDefinition() { + switch (this) { + case _21352: return "Hispanic or Latino"; + case _21378: return "Spaniard"; + case _21386: return "Andalusian"; + case _21394: return "Asturian"; + case _21402: return "Castillian"; + case _21410: return "Catalonian"; + case _21428: return "Belearic Islander"; + case _21436: return "Gallego"; + case _21444: return "Valencian"; + case _21451: return "Canarian"; + case _21469: return "Spanish Basque"; + case _21485: return "Mexican"; + case _21493: return "Mexican American"; + case _21501: return "Mexicano"; + case _21519: return "Chicano"; + case _21527: return "La Raza"; + case _21535: return "Mexican American Indian"; + case _21550: return "Central American"; + case _21568: return "Costa Rican"; + case _21576: return "Guatemalan"; + case _21584: return "Honduran"; + case _21592: return "Nicaraguan"; + case _21600: return "Panamanian"; + case _21618: return "Salvadoran"; + case _21626: return "Central American Indian"; + case _21634: return "Canal Zone"; + case _21659: return "South American"; + case _21667: return "Argentinean"; + case _21675: return "Bolivian"; + case _21683: return "Chilean"; + case _21691: return "Colombian"; + case _21709: return "Ecuadorian"; + case _21717: return "Paraguayan"; + case _21725: return "Peruvian"; + case _21733: return "Uruguayan"; + case _21741: return "Venezuelan"; + case _21758: return "South American Indian"; + case _21766: return "Criollo"; + case _21782: return "Latin American"; + case _21808: return "Puerto Rican"; + case _21824: return "Cuban"; + case _21840: return "Dominican"; + case _21865: return "Note that this term remains in the table for completeness, even though within HL7, the notion of \"not otherwise coded\" term is deprecated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _21352: return "Hispanic or Latino"; + case _21378: return "Spaniard"; + case _21386: return "Andalusian"; + case _21394: return "Asturian"; + case _21402: return "Castillian"; + case _21410: return "Catalonian"; + case _21428: return "Belearic Islander"; + case _21436: return "Gallego"; + case _21444: return "Valencian"; + case _21451: return "Canarian"; + case _21469: return "Spanish Basque"; + case _21485: return "Mexican"; + case _21493: return "Mexican American"; + case _21501: return "Mexicano"; + case _21519: return "Chicano"; + case _21527: return "La Raza"; + case _21535: return "Mexican American Indian"; + case _21550: return "Central American"; + case _21568: return "Costa Rican"; + case _21576: return "Guatemalan"; + case _21584: return "Honduran"; + case _21592: return "Nicaraguan"; + case _21600: return "Panamanian"; + case _21618: return "Salvadoran"; + case _21626: return "Central American Indian"; + case _21634: return "Canal Zone"; + case _21659: return "South American"; + case _21667: return "Argentinean"; + case _21675: return "Bolivian"; + case _21683: return "Chilean"; + case _21691: return "Colombian"; + case _21709: return "Ecuadorian"; + case _21717: return "Paraguayan"; + case _21725: return "Peruvian"; + case _21733: return "Uruguayan"; + case _21741: return "Venezuelan"; + case _21758: return "South American Indian"; + case _21766: return "Criollo"; + case _21782: return "Latin American"; + case _21808: return "Puerto Rican"; + case _21824: return "Cuban"; + case _21840: return "Dominican"; + case _21865: return "Not Hispanic or Latino"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EthnicityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EthnicityEnumFactory.java new file mode 100644 index 00000000000..677938dcaba --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3EthnicityEnumFactory.java @@ -0,0 +1,223 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3EthnicityEnumFactory implements EnumFactory { + + public V3Ethnicity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2135-2".equals(codeString)) + return V3Ethnicity._21352; + if ("2137-8".equals(codeString)) + return V3Ethnicity._21378; + if ("2138-6".equals(codeString)) + return V3Ethnicity._21386; + if ("2139-4".equals(codeString)) + return V3Ethnicity._21394; + if ("2140-2".equals(codeString)) + return V3Ethnicity._21402; + if ("2141-0".equals(codeString)) + return V3Ethnicity._21410; + if ("2142-8".equals(codeString)) + return V3Ethnicity._21428; + if ("2143-6".equals(codeString)) + return V3Ethnicity._21436; + if ("2144-4".equals(codeString)) + return V3Ethnicity._21444; + if ("2145-1".equals(codeString)) + return V3Ethnicity._21451; + if ("2146-9".equals(codeString)) + return V3Ethnicity._21469; + if ("2148-5".equals(codeString)) + return V3Ethnicity._21485; + if ("2149-3".equals(codeString)) + return V3Ethnicity._21493; + if ("2150-1".equals(codeString)) + return V3Ethnicity._21501; + if ("2151-9".equals(codeString)) + return V3Ethnicity._21519; + if ("2152-7".equals(codeString)) + return V3Ethnicity._21527; + if ("2153-5".equals(codeString)) + return V3Ethnicity._21535; + if ("2155-0".equals(codeString)) + return V3Ethnicity._21550; + if ("2156-8".equals(codeString)) + return V3Ethnicity._21568; + if ("2157-6".equals(codeString)) + return V3Ethnicity._21576; + if ("2158-4".equals(codeString)) + return V3Ethnicity._21584; + if ("2159-2".equals(codeString)) + return V3Ethnicity._21592; + if ("2160-0".equals(codeString)) + return V3Ethnicity._21600; + if ("2161-8".equals(codeString)) + return V3Ethnicity._21618; + if ("2162-6".equals(codeString)) + return V3Ethnicity._21626; + if ("2163-4".equals(codeString)) + return V3Ethnicity._21634; + if ("2165-9".equals(codeString)) + return V3Ethnicity._21659; + if ("2166-7".equals(codeString)) + return V3Ethnicity._21667; + if ("2167-5".equals(codeString)) + return V3Ethnicity._21675; + if ("2168-3".equals(codeString)) + return V3Ethnicity._21683; + if ("2169-1".equals(codeString)) + return V3Ethnicity._21691; + if ("2170-9".equals(codeString)) + return V3Ethnicity._21709; + if ("2171-7".equals(codeString)) + return V3Ethnicity._21717; + if ("2172-5".equals(codeString)) + return V3Ethnicity._21725; + if ("2173-3".equals(codeString)) + return V3Ethnicity._21733; + if ("2174-1".equals(codeString)) + return V3Ethnicity._21741; + if ("2175-8".equals(codeString)) + return V3Ethnicity._21758; + if ("2176-6".equals(codeString)) + return V3Ethnicity._21766; + if ("2178-2".equals(codeString)) + return V3Ethnicity._21782; + if ("2180-8".equals(codeString)) + return V3Ethnicity._21808; + if ("2182-4".equals(codeString)) + return V3Ethnicity._21824; + if ("2184-0".equals(codeString)) + return V3Ethnicity._21840; + if ("2186-5".equals(codeString)) + return V3Ethnicity._21865; + throw new IllegalArgumentException("Unknown V3Ethnicity code '"+codeString+"'"); + } + + public String toCode(V3Ethnicity code) { + if (code == V3Ethnicity._21352) + return "2135-2"; + if (code == V3Ethnicity._21378) + return "2137-8"; + if (code == V3Ethnicity._21386) + return "2138-6"; + if (code == V3Ethnicity._21394) + return "2139-4"; + if (code == V3Ethnicity._21402) + return "2140-2"; + if (code == V3Ethnicity._21410) + return "2141-0"; + if (code == V3Ethnicity._21428) + return "2142-8"; + if (code == V3Ethnicity._21436) + return "2143-6"; + if (code == V3Ethnicity._21444) + return "2144-4"; + if (code == V3Ethnicity._21451) + return "2145-1"; + if (code == V3Ethnicity._21469) + return "2146-9"; + if (code == V3Ethnicity._21485) + return "2148-5"; + if (code == V3Ethnicity._21493) + return "2149-3"; + if (code == V3Ethnicity._21501) + return "2150-1"; + if (code == V3Ethnicity._21519) + return "2151-9"; + if (code == V3Ethnicity._21527) + return "2152-7"; + if (code == V3Ethnicity._21535) + return "2153-5"; + if (code == V3Ethnicity._21550) + return "2155-0"; + if (code == V3Ethnicity._21568) + return "2156-8"; + if (code == V3Ethnicity._21576) + return "2157-6"; + if (code == V3Ethnicity._21584) + return "2158-4"; + if (code == V3Ethnicity._21592) + return "2159-2"; + if (code == V3Ethnicity._21600) + return "2160-0"; + if (code == V3Ethnicity._21618) + return "2161-8"; + if (code == V3Ethnicity._21626) + return "2162-6"; + if (code == V3Ethnicity._21634) + return "2163-4"; + if (code == V3Ethnicity._21659) + return "2165-9"; + if (code == V3Ethnicity._21667) + return "2166-7"; + if (code == V3Ethnicity._21675) + return "2167-5"; + if (code == V3Ethnicity._21683) + return "2168-3"; + if (code == V3Ethnicity._21691) + return "2169-1"; + if (code == V3Ethnicity._21709) + return "2170-9"; + if (code == V3Ethnicity._21717) + return "2171-7"; + if (code == V3Ethnicity._21725) + return "2172-5"; + if (code == V3Ethnicity._21733) + return "2173-3"; + if (code == V3Ethnicity._21741) + return "2174-1"; + if (code == V3Ethnicity._21758) + return "2175-8"; + if (code == V3Ethnicity._21766) + return "2176-6"; + if (code == V3Ethnicity._21782) + return "2178-2"; + if (code == V3Ethnicity._21808) + return "2180-8"; + if (code == V3Ethnicity._21824) + return "2182-4"; + if (code == V3Ethnicity._21840) + return "2184-0"; + if (code == V3Ethnicity._21865) + return "2186-5"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureMode.java new file mode 100644 index 00000000000..f4361cbf4c0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureMode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ExposureMode { + + /** + * Code for the mechanism by which the exposure agent was exchanged or potentially exchanged by the participants involved in the exposure. + */ + _EXPOSUREMODE, + /** + * Description: Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation. + */ + AIRBORNE, + /** + * Description: Communication of an agent from a living subject or environmental source to a living subject through direct physical contact. + */ + CONTACT, + /** + * Description: Communication of an agent from a food source to a living subject via oral consumption. + */ + FOODBORNE, + /** + * Description: Communication of an agent to a living subject by contact and/or consumption via an aqueous medium + */ + WATERBORNE, + /** + * added to help the parsers + */ + NULL; + public static V3ExposureMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ExposureMode".equals(codeString)) + return _EXPOSUREMODE; + if ("AIRBORNE".equals(codeString)) + return AIRBORNE; + if ("CONTACT".equals(codeString)) + return CONTACT; + if ("FOODBORNE".equals(codeString)) + return FOODBORNE; + if ("WATERBORNE".equals(codeString)) + return WATERBORNE; + throw new FHIRException("Unknown V3ExposureMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _EXPOSUREMODE: return "_ExposureMode"; + case AIRBORNE: return "AIRBORNE"; + case CONTACT: return "CONTACT"; + case FOODBORNE: return "FOODBORNE"; + case WATERBORNE: return "WATERBORNE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ExposureMode"; + } + public String getDefinition() { + switch (this) { + case _EXPOSUREMODE: return "Code for the mechanism by which the exposure agent was exchanged or potentially exchanged by the participants involved in the exposure."; + case AIRBORNE: return "Description: Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation."; + case CONTACT: return "Description: Communication of an agent from a living subject or environmental source to a living subject through direct physical contact."; + case FOODBORNE: return "Description: Communication of an agent from a food source to a living subject via oral consumption."; + case WATERBORNE: return "Description: Communication of an agent to a living subject by contact and/or consumption via an aqueous medium"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _EXPOSUREMODE: return "ExposureMode"; + case AIRBORNE: return "airborne"; + case CONTACT: return "contact"; + case FOODBORNE: return "foodborne"; + case WATERBORNE: return "waterborne"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureModeEnumFactory.java new file mode 100644 index 00000000000..ce4a3b29372 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ExposureModeEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ExposureModeEnumFactory implements EnumFactory { + + public V3ExposureMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ExposureMode".equals(codeString)) + return V3ExposureMode._EXPOSUREMODE; + if ("AIRBORNE".equals(codeString)) + return V3ExposureMode.AIRBORNE; + if ("CONTACT".equals(codeString)) + return V3ExposureMode.CONTACT; + if ("FOODBORNE".equals(codeString)) + return V3ExposureMode.FOODBORNE; + if ("WATERBORNE".equals(codeString)) + return V3ExposureMode.WATERBORNE; + throw new IllegalArgumentException("Unknown V3ExposureMode code '"+codeString+"'"); + } + + public String toCode(V3ExposureMode code) { + if (code == V3ExposureMode._EXPOSUREMODE) + return "_ExposureMode"; + if (code == V3ExposureMode.AIRBORNE) + return "AIRBORNE"; + if (code == V3ExposureMode.CONTACT) + return "CONTACT"; + if (code == V3ExposureMode.FOODBORNE) + return "FOODBORNE"; + if (code == V3ExposureMode.WATERBORNE) + return "WATERBORNE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviation.java new file mode 100644 index 00000000000..9f4eedb75ec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviation.java @@ -0,0 +1,366 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3GTSAbbreviation { + + /** + * Every morning at institution specified times. + */ + AM, + /** + * Two times a day at institution specified time + */ + BID, + /** + * Regular business days (Monday to Friday excluding holidays) + */ + JB, + /** + * Regular weekends (Saturday and Sunday excluding holidays) + */ + JE, + /** + * Holidays + */ + JH, + /** + * Christian Holidays (Roman/Gregorian [Western] Tradition.) + */ + _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN, + /** + * Easter Sunday. The Easter date is a rather complex calculation based on Astronomical tables describing full moon dates. Details can be found at [http://www.assa.org.au/edm.html, and http://aa.usno.navy.mil/AA/faq/docs/easter.html]. Note that the Christian Orthodox Holidays are based on the Julian calendar. + */ + JHCHREAS, + /** + * Good Friday, is the Friday right before Easter Sunday. + */ + JHCHRGFR, + /** + * New Year's Day (January 1) + */ + JHCHRNEW, + /** + * Pentecost Sunday, is seven weeks after Easter (the 50th day of Easter). + */ + JHCHRPEN, + /** + * Christmas Eve (December 24) + */ + JHCHRXME, + /** + * Christmas Day (December 25) + */ + JHCHRXMS, + /** + * Description:The Netherlands National Holidays. + */ + JHNNL, + /** + * Description:Liberation day (May 5 every five years) + */ + JHNNLLD, + /** + * Description:Queen's day (April 30) + */ + JHNNLQD, + /** + * Description:Sinterklaas (December 5) + */ + JHNNLSK, + /** + * United States National Holidays (public holidays for federal employees established by U.S. Federal law 5 U.S.C. 6103). + */ + JHNUS, + /** + * Columbus Day, the second Monday in October. + */ + JHNUSCLM, + /** + * Independence Day (4th of July) + */ + JHNUSIND, + /** + * Alternative Monday after 4th of July Weekend [5 U.S.C. 6103(b)]. + */ + JHNUSIND1, + /** + * Alternative Friday before 4th of July Weekend [5 U.S.C. 6103(b)]. + */ + JHNUSIND5, + /** + * Labor Day, the first Monday in September. + */ + JHNUSLBR, + /** + * Memorial Day, the last Monday in May. + */ + JHNUSMEM, + /** + * Friday before Memorial Day Weekend + */ + JHNUSMEM5, + /** + * Saturday of Memorial Day Weekend + */ + JHNUSMEM6, + /** + * Dr. Martin Luther King, Jr. Day, the third Monday in January. + */ + JHNUSMLK, + /** + * Washington's Birthday (Presidential Day) the third Monday in February. + */ + JHNUSPRE, + /** + * Thanksgiving Day, the fourth Thursday in November. + */ + JHNUSTKS, + /** + * Friday after Thanksgiving. + */ + JHNUSTKS5, + /** + * Veteran's Day, November 11. + */ + JHNUSVET, + /** + * Every afternoon at institution specified times. + */ + PM, + /** + * Four times a day at institution specified time + */ + QID, + /** + * Three times a day at institution specified time + */ + TID, + /** + * added to help the parsers + */ + NULL; + public static V3GTSAbbreviation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AM".equals(codeString)) + return AM; + if ("BID".equals(codeString)) + return BID; + if ("JB".equals(codeString)) + return JB; + if ("JE".equals(codeString)) + return JE; + if ("JH".equals(codeString)) + return JH; + if ("_GTSAbbreviationHolidaysChristianRoman".equals(codeString)) + return _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN; + if ("JHCHREAS".equals(codeString)) + return JHCHREAS; + if ("JHCHRGFR".equals(codeString)) + return JHCHRGFR; + if ("JHCHRNEW".equals(codeString)) + return JHCHRNEW; + if ("JHCHRPEN".equals(codeString)) + return JHCHRPEN; + if ("JHCHRXME".equals(codeString)) + return JHCHRXME; + if ("JHCHRXMS".equals(codeString)) + return JHCHRXMS; + if ("JHNNL".equals(codeString)) + return JHNNL; + if ("JHNNLLD".equals(codeString)) + return JHNNLLD; + if ("JHNNLQD".equals(codeString)) + return JHNNLQD; + if ("JHNNLSK".equals(codeString)) + return JHNNLSK; + if ("JHNUS".equals(codeString)) + return JHNUS; + if ("JHNUSCLM".equals(codeString)) + return JHNUSCLM; + if ("JHNUSIND".equals(codeString)) + return JHNUSIND; + if ("JHNUSIND1".equals(codeString)) + return JHNUSIND1; + if ("JHNUSIND5".equals(codeString)) + return JHNUSIND5; + if ("JHNUSLBR".equals(codeString)) + return JHNUSLBR; + if ("JHNUSMEM".equals(codeString)) + return JHNUSMEM; + if ("JHNUSMEM5".equals(codeString)) + return JHNUSMEM5; + if ("JHNUSMEM6".equals(codeString)) + return JHNUSMEM6; + if ("JHNUSMLK".equals(codeString)) + return JHNUSMLK; + if ("JHNUSPRE".equals(codeString)) + return JHNUSPRE; + if ("JHNUSTKS".equals(codeString)) + return JHNUSTKS; + if ("JHNUSTKS5".equals(codeString)) + return JHNUSTKS5; + if ("JHNUSVET".equals(codeString)) + return JHNUSVET; + if ("PM".equals(codeString)) + return PM; + if ("QID".equals(codeString)) + return QID; + if ("TID".equals(codeString)) + return TID; + throw new FHIRException("Unknown V3GTSAbbreviation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AM: return "AM"; + case BID: return "BID"; + case JB: return "JB"; + case JE: return "JE"; + case JH: return "JH"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "_GTSAbbreviationHolidaysChristianRoman"; + case JHCHREAS: return "JHCHREAS"; + case JHCHRGFR: return "JHCHRGFR"; + case JHCHRNEW: return "JHCHRNEW"; + case JHCHRPEN: return "JHCHRPEN"; + case JHCHRXME: return "JHCHRXME"; + case JHCHRXMS: return "JHCHRXMS"; + case JHNNL: return "JHNNL"; + case JHNNLLD: return "JHNNLLD"; + case JHNNLQD: return "JHNNLQD"; + case JHNNLSK: return "JHNNLSK"; + case JHNUS: return "JHNUS"; + case JHNUSCLM: return "JHNUSCLM"; + case JHNUSIND: return "JHNUSIND"; + case JHNUSIND1: return "JHNUSIND1"; + case JHNUSIND5: return "JHNUSIND5"; + case JHNUSLBR: return "JHNUSLBR"; + case JHNUSMEM: return "JHNUSMEM"; + case JHNUSMEM5: return "JHNUSMEM5"; + case JHNUSMEM6: return "JHNUSMEM6"; + case JHNUSMLK: return "JHNUSMLK"; + case JHNUSPRE: return "JHNUSPRE"; + case JHNUSTKS: return "JHNUSTKS"; + case JHNUSTKS5: return "JHNUSTKS5"; + case JHNUSVET: return "JHNUSVET"; + case PM: return "PM"; + case QID: return "QID"; + case TID: return "TID"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/GTSAbbreviation"; + } + public String getDefinition() { + switch (this) { + case AM: return "Every morning at institution specified times."; + case BID: return "Two times a day at institution specified time"; + case JB: return "Regular business days (Monday to Friday excluding holidays)"; + case JE: return "Regular weekends (Saturday and Sunday excluding holidays)"; + case JH: return "Holidays"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "Christian Holidays (Roman/Gregorian [Western] Tradition.)"; + case JHCHREAS: return "Easter Sunday. The Easter date is a rather complex calculation based on Astronomical tables describing full moon dates. Details can be found at [http://www.assa.org.au/edm.html, and http://aa.usno.navy.mil/AA/faq/docs/easter.html]. Note that the Christian Orthodox Holidays are based on the Julian calendar."; + case JHCHRGFR: return "Good Friday, is the Friday right before Easter Sunday."; + case JHCHRNEW: return "New Year's Day (January 1)"; + case JHCHRPEN: return "Pentecost Sunday, is seven weeks after Easter (the 50th day of Easter)."; + case JHCHRXME: return "Christmas Eve (December 24)"; + case JHCHRXMS: return "Christmas Day (December 25)"; + case JHNNL: return "Description:The Netherlands National Holidays."; + case JHNNLLD: return "Description:Liberation day (May 5 every five years)"; + case JHNNLQD: return "Description:Queen's day (April 30)"; + case JHNNLSK: return "Description:Sinterklaas (December 5)"; + case JHNUS: return "United States National Holidays (public holidays for federal employees established by U.S. Federal law 5 U.S.C. 6103)."; + case JHNUSCLM: return "Columbus Day, the second Monday in October."; + case JHNUSIND: return "Independence Day (4th of July)"; + case JHNUSIND1: return "Alternative Monday after 4th of July Weekend [5 U.S.C. 6103(b)]."; + case JHNUSIND5: return "Alternative Friday before 4th of July Weekend [5 U.S.C. 6103(b)]."; + case JHNUSLBR: return "Labor Day, the first Monday in September."; + case JHNUSMEM: return "Memorial Day, the last Monday in May."; + case JHNUSMEM5: return "Friday before Memorial Day Weekend"; + case JHNUSMEM6: return "Saturday of Memorial Day Weekend"; + case JHNUSMLK: return "Dr. Martin Luther King, Jr. Day, the third Monday in January."; + case JHNUSPRE: return "Washington's Birthday (Presidential Day) the third Monday in February."; + case JHNUSTKS: return "Thanksgiving Day, the fourth Thursday in November."; + case JHNUSTKS5: return "Friday after Thanksgiving."; + case JHNUSVET: return "Veteran's Day, November 11."; + case PM: return "Every afternoon at institution specified times."; + case QID: return "Four times a day at institution specified time"; + case TID: return "Three times a day at institution specified time"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AM: return "AM"; + case BID: return "BID"; + case JB: return "JB"; + case JE: return "JE"; + case JH: return "GTSAbbreviationHolidays"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "GTSAbbreviationHolidaysChristianRoman"; + case JHCHREAS: return "JHCHREAS"; + case JHCHRGFR: return "JHCHRGFR"; + case JHCHRNEW: return "JHCHRNEW"; + case JHCHRPEN: return "JHCHRPEN"; + case JHCHRXME: return "JHCHRXME"; + case JHCHRXMS: return "JHCHRXMS"; + case JHNNL: return "The Netherlands National Holidays"; + case JHNNLLD: return "Liberation day (May 5 every five years)"; + case JHNNLQD: return "Queen's day (April 30)"; + case JHNNLSK: return "Sinterklaas (December 5)"; + case JHNUS: return "GTSAbbreviationHolidaysUSNational"; + case JHNUSCLM: return "JHNUSCLM"; + case JHNUSIND: return "JHNUSIND"; + case JHNUSIND1: return "JHNUSIND1"; + case JHNUSIND5: return "JHNUSIND5"; + case JHNUSLBR: return "JHNUSLBR"; + case JHNUSMEM: return "JHNUSMEM"; + case JHNUSMEM5: return "JHNUSMEM5"; + case JHNUSMEM6: return "JHNUSMEM6"; + case JHNUSMLK: return "JHNUSMLK"; + case JHNUSPRE: return "JHNUSPRE"; + case JHNUSTKS: return "JHNUSTKS"; + case JHNUSTKS5: return "JHNUSTKS5"; + case JHNUSVET: return "JHNUSVET"; + case PM: return "PM"; + case QID: return "QID"; + case TID: return "TID"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviationEnumFactory.java new file mode 100644 index 00000000000..97a91cfe89a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GTSAbbreviationEnumFactory.java @@ -0,0 +1,183 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3GTSAbbreviationEnumFactory implements EnumFactory { + + public V3GTSAbbreviation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AM".equals(codeString)) + return V3GTSAbbreviation.AM; + if ("BID".equals(codeString)) + return V3GTSAbbreviation.BID; + if ("JB".equals(codeString)) + return V3GTSAbbreviation.JB; + if ("JE".equals(codeString)) + return V3GTSAbbreviation.JE; + if ("JH".equals(codeString)) + return V3GTSAbbreviation.JH; + if ("_GTSAbbreviationHolidaysChristianRoman".equals(codeString)) + return V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN; + if ("JHCHREAS".equals(codeString)) + return V3GTSAbbreviation.JHCHREAS; + if ("JHCHRGFR".equals(codeString)) + return V3GTSAbbreviation.JHCHRGFR; + if ("JHCHRNEW".equals(codeString)) + return V3GTSAbbreviation.JHCHRNEW; + if ("JHCHRPEN".equals(codeString)) + return V3GTSAbbreviation.JHCHRPEN; + if ("JHCHRXME".equals(codeString)) + return V3GTSAbbreviation.JHCHRXME; + if ("JHCHRXMS".equals(codeString)) + return V3GTSAbbreviation.JHCHRXMS; + if ("JHNNL".equals(codeString)) + return V3GTSAbbreviation.JHNNL; + if ("JHNNLLD".equals(codeString)) + return V3GTSAbbreviation.JHNNLLD; + if ("JHNNLQD".equals(codeString)) + return V3GTSAbbreviation.JHNNLQD; + if ("JHNNLSK".equals(codeString)) + return V3GTSAbbreviation.JHNNLSK; + if ("JHNUS".equals(codeString)) + return V3GTSAbbreviation.JHNUS; + if ("JHNUSCLM".equals(codeString)) + return V3GTSAbbreviation.JHNUSCLM; + if ("JHNUSIND".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND; + if ("JHNUSIND1".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND1; + if ("JHNUSIND5".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND5; + if ("JHNUSLBR".equals(codeString)) + return V3GTSAbbreviation.JHNUSLBR; + if ("JHNUSMEM".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM; + if ("JHNUSMEM5".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM5; + if ("JHNUSMEM6".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM6; + if ("JHNUSMLK".equals(codeString)) + return V3GTSAbbreviation.JHNUSMLK; + if ("JHNUSPRE".equals(codeString)) + return V3GTSAbbreviation.JHNUSPRE; + if ("JHNUSTKS".equals(codeString)) + return V3GTSAbbreviation.JHNUSTKS; + if ("JHNUSTKS5".equals(codeString)) + return V3GTSAbbreviation.JHNUSTKS5; + if ("JHNUSVET".equals(codeString)) + return V3GTSAbbreviation.JHNUSVET; + if ("PM".equals(codeString)) + return V3GTSAbbreviation.PM; + if ("QID".equals(codeString)) + return V3GTSAbbreviation.QID; + if ("TID".equals(codeString)) + return V3GTSAbbreviation.TID; + throw new IllegalArgumentException("Unknown V3GTSAbbreviation code '"+codeString+"'"); + } + + public String toCode(V3GTSAbbreviation code) { + if (code == V3GTSAbbreviation.AM) + return "AM"; + if (code == V3GTSAbbreviation.BID) + return "BID"; + if (code == V3GTSAbbreviation.JB) + return "JB"; + if (code == V3GTSAbbreviation.JE) + return "JE"; + if (code == V3GTSAbbreviation.JH) + return "JH"; + if (code == V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN) + return "_GTSAbbreviationHolidaysChristianRoman"; + if (code == V3GTSAbbreviation.JHCHREAS) + return "JHCHREAS"; + if (code == V3GTSAbbreviation.JHCHRGFR) + return "JHCHRGFR"; + if (code == V3GTSAbbreviation.JHCHRNEW) + return "JHCHRNEW"; + if (code == V3GTSAbbreviation.JHCHRPEN) + return "JHCHRPEN"; + if (code == V3GTSAbbreviation.JHCHRXME) + return "JHCHRXME"; + if (code == V3GTSAbbreviation.JHCHRXMS) + return "JHCHRXMS"; + if (code == V3GTSAbbreviation.JHNNL) + return "JHNNL"; + if (code == V3GTSAbbreviation.JHNNLLD) + return "JHNNLLD"; + if (code == V3GTSAbbreviation.JHNNLQD) + return "JHNNLQD"; + if (code == V3GTSAbbreviation.JHNNLSK) + return "JHNNLSK"; + if (code == V3GTSAbbreviation.JHNUS) + return "JHNUS"; + if (code == V3GTSAbbreviation.JHNUSCLM) + return "JHNUSCLM"; + if (code == V3GTSAbbreviation.JHNUSIND) + return "JHNUSIND"; + if (code == V3GTSAbbreviation.JHNUSIND1) + return "JHNUSIND1"; + if (code == V3GTSAbbreviation.JHNUSIND5) + return "JHNUSIND5"; + if (code == V3GTSAbbreviation.JHNUSLBR) + return "JHNUSLBR"; + if (code == V3GTSAbbreviation.JHNUSMEM) + return "JHNUSMEM"; + if (code == V3GTSAbbreviation.JHNUSMEM5) + return "JHNUSMEM5"; + if (code == V3GTSAbbreviation.JHNUSMEM6) + return "JHNUSMEM6"; + if (code == V3GTSAbbreviation.JHNUSMLK) + return "JHNUSMLK"; + if (code == V3GTSAbbreviation.JHNUSPRE) + return "JHNUSPRE"; + if (code == V3GTSAbbreviation.JHNUSTKS) + return "JHNUSTKS"; + if (code == V3GTSAbbreviation.JHNUSTKS5) + return "JHNUSTKS5"; + if (code == V3GTSAbbreviation.JHNUSVET) + return "JHNUSVET"; + if (code == V3GTSAbbreviation.PM) + return "PM"; + if (code == V3GTSAbbreviation.QID) + return "QID"; + if (code == V3GTSAbbreviation.TID) + return "TID"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatus.java new file mode 100644 index 00000000000..c79b156e3d2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3GenderStatus { + + /** + * Reproductively intact + */ + I, + /** + * Reproductively neutered + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3GenderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3GenderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/GenderStatus"; + } + public String getDefinition() { + switch (this) { + case I: return "Reproductively intact"; + case N: return "Reproductively neutered"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "Intact"; + case N: return "Neutered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatusEnumFactory.java new file mode 100644 index 00000000000..55b2ac4191a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3GenderStatusEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3GenderStatusEnumFactory implements EnumFactory { + + public V3GenderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3GenderStatus.I; + if ("N".equals(codeString)) + return V3GenderStatus.N; + throw new IllegalArgumentException("Unknown V3GenderStatus code '"+codeString+"'"); + } + + public String toCode(V3GenderStatus code) { + if (code == V3GenderStatus.I) + return "I"; + if (code == V3GenderStatus.N) + return "N"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateMode.java new file mode 100644 index 00000000000..b3bf45d48bf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateMode.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3HL7UpdateMode { + + /** + * Description:The item was (or is to be) added, having not been present immediately before. (If it is already present, this may be treated as an error condition.) + */ + A, + /** + * Description:The item was (or is to be) either added or replaced. + */ + AR, + /** + * Description:The item was (or is to be) removed (sometimes referred to as deleted). If the item is part of a collection, delete any matching items. + */ + D, + /** + * Description:This item is part of the identifying information for this object. + */ + K, + /** + * Description:There was (or is to be) no change to the item. This is primarily used when this element has not changed, but other attributes in the instance have changed. + */ + N, + /** + * Description:The item existed previously and has (or is to be) revised. (If an item does not already exist, this may be treated as an error condition.) + */ + R, + /** + * Description:This item provides enough information to allow a processing system to locate the full applicable record by identifying the object. + */ + REF, + /** + * Description:Description:It is not specified whether or what kind of change has occurred to the item, or whether the item is present as a reference or identifying property. + */ + U, + /** + * These concepts apply when the element and/or message is updating a set of items. + */ + _SETUPDATEMODE, + /** + * Add the message element to the collection of items on the receiving system that correspond to the message element. + */ + ESA, + /** + * Change the item on the receiving system that corresponds to this message element; if a matching element does not exist, add a new one created with the values in the message. + */ + ESAC, + /** + * Change the item on the receiving system that corresponds to this message element; do not process if a matching element does not exist. + */ + ESC, + /** + * Delete the item on the receiving system that corresponds to this message element. + */ + ESD, + /** + * Description: AU: If this item exists, update it with these values. If it does not exist, create it with these values. If the item is part of the collection, update each item that matches this item, and if no items match, add a new item to the collection. + */ + AU, + /** + * Ignore this role, it is not relevant to the update. + */ + I, + /** + * Verify - this message element must match a value already in the receiving systems database in order to process the message. + */ + V, + /** + * added to help the parsers + */ + NULL; + public static V3HL7UpdateMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("AR".equals(codeString)) + return AR; + if ("D".equals(codeString)) + return D; + if ("K".equals(codeString)) + return K; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("REF".equals(codeString)) + return REF; + if ("U".equals(codeString)) + return U; + if ("_SetUpdateMode".equals(codeString)) + return _SETUPDATEMODE; + if ("ESA".equals(codeString)) + return ESA; + if ("ESAC".equals(codeString)) + return ESAC; + if ("ESC".equals(codeString)) + return ESC; + if ("ESD".equals(codeString)) + return ESD; + if ("AU".equals(codeString)) + return AU; + if ("I".equals(codeString)) + return I; + if ("V".equals(codeString)) + return V; + throw new FHIRException("Unknown V3HL7UpdateMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case AR: return "AR"; + case D: return "D"; + case K: return "K"; + case N: return "N"; + case R: return "R"; + case REF: return "REF"; + case U: return "U"; + case _SETUPDATEMODE: return "_SetUpdateMode"; + case ESA: return "ESA"; + case ESAC: return "ESAC"; + case ESC: return "ESC"; + case ESD: return "ESD"; + case AU: return "AU"; + case I: return "I"; + case V: return "V"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/HL7UpdateMode"; + } + public String getDefinition() { + switch (this) { + case A: return "Description:The item was (or is to be) added, having not been present immediately before. (If it is already present, this may be treated as an error condition.)"; + case AR: return "Description:The item was (or is to be) either added or replaced."; + case D: return "Description:The item was (or is to be) removed (sometimes referred to as deleted). If the item is part of a collection, delete any matching items."; + case K: return "Description:This item is part of the identifying information for this object."; + case N: return "Description:There was (or is to be) no change to the item. This is primarily used when this element has not changed, but other attributes in the instance have changed."; + case R: return "Description:The item existed previously and has (or is to be) revised. (If an item does not already exist, this may be treated as an error condition.)"; + case REF: return "Description:This item provides enough information to allow a processing system to locate the full applicable record by identifying the object."; + case U: return "Description:Description:It is not specified whether or what kind of change has occurred to the item, or whether the item is present as a reference or identifying property."; + case _SETUPDATEMODE: return "These concepts apply when the element and/or message is updating a set of items."; + case ESA: return "Add the message element to the collection of items on the receiving system that correspond to the message element."; + case ESAC: return "Change the item on the receiving system that corresponds to this message element; if a matching element does not exist, add a new one created with the values in the message."; + case ESC: return "Change the item on the receiving system that corresponds to this message element; do not process if a matching element does not exist."; + case ESD: return "Delete the item on the receiving system that corresponds to this message element."; + case AU: return "Description: AU: If this item exists, update it with these values. If it does not exist, create it with these values. If the item is part of the collection, update each item that matches this item, and if no items match, add a new item to the collection."; + case I: return "Ignore this role, it is not relevant to the update."; + case V: return "Verify - this message element must match a value already in the receiving systems database in order to process the message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Add"; + case AR: return "Add or Replace"; + case D: return "Remove"; + case K: return "Key"; + case N: return "No Change"; + case R: return "Replace"; + case REF: return "Reference"; + case U: return "Unknown"; + case _SETUPDATEMODE: return "SetUpdateMode"; + case ESA: return "Set Add"; + case ESAC: return "Set Add or Change"; + case ESC: return "Set Change"; + case ESD: return "Set Delete"; + case AU: return "Add or Update"; + case I: return "Ignore"; + case V: return "Verify"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateModeEnumFactory.java new file mode 100644 index 00000000000..444bad30328 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HL7UpdateModeEnumFactory.java @@ -0,0 +1,115 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3HL7UpdateModeEnumFactory implements EnumFactory { + + public V3HL7UpdateMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3HL7UpdateMode.A; + if ("AR".equals(codeString)) + return V3HL7UpdateMode.AR; + if ("D".equals(codeString)) + return V3HL7UpdateMode.D; + if ("K".equals(codeString)) + return V3HL7UpdateMode.K; + if ("N".equals(codeString)) + return V3HL7UpdateMode.N; + if ("R".equals(codeString)) + return V3HL7UpdateMode.R; + if ("REF".equals(codeString)) + return V3HL7UpdateMode.REF; + if ("U".equals(codeString)) + return V3HL7UpdateMode.U; + if ("_SetUpdateMode".equals(codeString)) + return V3HL7UpdateMode._SETUPDATEMODE; + if ("ESA".equals(codeString)) + return V3HL7UpdateMode.ESA; + if ("ESAC".equals(codeString)) + return V3HL7UpdateMode.ESAC; + if ("ESC".equals(codeString)) + return V3HL7UpdateMode.ESC; + if ("ESD".equals(codeString)) + return V3HL7UpdateMode.ESD; + if ("AU".equals(codeString)) + return V3HL7UpdateMode.AU; + if ("I".equals(codeString)) + return V3HL7UpdateMode.I; + if ("V".equals(codeString)) + return V3HL7UpdateMode.V; + throw new IllegalArgumentException("Unknown V3HL7UpdateMode code '"+codeString+"'"); + } + + public String toCode(V3HL7UpdateMode code) { + if (code == V3HL7UpdateMode.A) + return "A"; + if (code == V3HL7UpdateMode.AR) + return "AR"; + if (code == V3HL7UpdateMode.D) + return "D"; + if (code == V3HL7UpdateMode.K) + return "K"; + if (code == V3HL7UpdateMode.N) + return "N"; + if (code == V3HL7UpdateMode.R) + return "R"; + if (code == V3HL7UpdateMode.REF) + return "REF"; + if (code == V3HL7UpdateMode.U) + return "U"; + if (code == V3HL7UpdateMode._SETUPDATEMODE) + return "_SetUpdateMode"; + if (code == V3HL7UpdateMode.ESA) + return "ESA"; + if (code == V3HL7UpdateMode.ESAC) + return "ESAC"; + if (code == V3HL7UpdateMode.ESC) + return "ESC"; + if (code == V3HL7UpdateMode.ESD) + return "ESD"; + if (code == V3HL7UpdateMode.AU) + return "AU"; + if (code == V3HL7UpdateMode.I) + return "I"; + if (code == V3HL7UpdateMode.V) + return "V"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7Realm.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7Realm.java new file mode 100644 index 00000000000..894d952f363 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7Realm.java @@ -0,0 +1,474 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Hl7Realm { + + /** + * Description: Concepts that can be used as Binding Realms when creating Binding Statements. These codes are permitted to appear in the InfrastructureRoot.realmCode attribute. + */ + BINDINGREALMS, + /** + * Description: Realm codes for official HL7 organizational bodies. This includes both the HL7 International organization as well as all recognized international affiliates (past and present). These groups have the ability to bind vocabulary and develop artifacts. As well, they have the ability to have "ownership" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes. + */ + AFFILIATEREALMS, + /** + * Description: Realm code for use of Argentina + */ + AR, + /** + * Description: Realm code for use of Austria + */ + AT, + /** + * Description: Realm code for use of Australia + */ + AU, + /** + * Description: Realm code for use of Brazil + */ + BR, + /** + * Description: Realm code for use of Canada + */ + CA, + /** + * Description: Realm code for use of Switzerland + */ + CH, + /** + * Description: Realm code for use of Chile + */ + CL, + /** + * Description: Realm code for use of China + */ + CN, + /** + * Description: Realm code for use of Localized Version + */ + CO, + /** + * Description: Realm code for use of Czech Republic + */ + CZ, + /** + * Description: Realm code for use of Germany + */ + DE, + /** + * Description: Realm code for use of Denmark + */ + DK, + /** + * Description: Realm code for use of Spain + */ + ES, + /** + * Description: Realm code for use of Finland + */ + FI, + /** + * Description: Realm code for use of France + */ + FR, + /** + * Description: Realm code for use of Greece + */ + GR, + /** + * Description: Realm code for use of Croatia + */ + HR, + /** + * Description: Realm code for use of Ireland + */ + IE, + /** + * Description: Realm code for use of India + */ + IN, + /** + * Description: Realm code for use of Italy + */ + IT, + /** + * Description: Realm code for use of Japan + */ + JP, + /** + * Description: Realm code for use of Korea + */ + KR, + /** + * Description: Realm code for use of Lithuania + */ + LT, + /** + * Description: Realm code for use of Mexico + */ + MX, + /** + * Description: Realm code for use of The Netherlands + */ + NL, + /** + * Description: Realm code for use of New Zealand + */ + NZ, + /** + * Description: Realm code for use of Romania + */ + RO, + /** + * Description: Realm code for use of Russian Federation + */ + RU, + /** + * Description: Realm code for use of Sweden + */ + SE, + /** + * Description: Realm code for use of Localized Version + */ + SG, + /** + * Description: Realm code for use of Southern Africa + */ + SOA, + /** + * Description: Realm code for use of Turkey + */ + TR, + /** + * Description: Realm code for use of Taiwan + */ + TW, + /** + * Description: Realm code for use of United Kingdom + */ + UK, + /** + * Description: Realm code for use of United States of America + */ + US, + /** + * Description: Realm code for use of Universal realm or context, used in every instance + */ + UV, + /** + * Description: Realm code for use of Uruguay + */ + UY, + /** + * Description: Realm code for use of Unclassified Realm + */ + C1, + /** + * Description: Realm code for use of Great Britain + */ + GB, + /** + * Description: Realm code for use of Representative Realm + */ + R1, + /** + * Description: Realm code for use of Example Realm + */ + X1, + /** + * Description: Codes that can be used in the "realm" portion of HL7 v3 artifact identifiers. + */ + NAMESPACEREALMS, + /** + * Description: An artifact created for local use only. This realm namespace has no owning affiliate. Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace. Because of this, there is a significant likelihood of artifact identifier collisions. Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible. + */ + ZZ, + /** + * added to help the parsers + */ + NULL; + public static V3Hl7Realm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BindingRealms".equals(codeString)) + return BINDINGREALMS; + if ("AffiliateRealms".equals(codeString)) + return AFFILIATEREALMS; + if ("AR".equals(codeString)) + return AR; + if ("AT".equals(codeString)) + return AT; + if ("AU".equals(codeString)) + return AU; + if ("BR".equals(codeString)) + return BR; + if ("CA".equals(codeString)) + return CA; + if ("CH".equals(codeString)) + return CH; + if ("CL".equals(codeString)) + return CL; + if ("CN".equals(codeString)) + return CN; + if ("CO".equals(codeString)) + return CO; + if ("CZ".equals(codeString)) + return CZ; + if ("DE".equals(codeString)) + return DE; + if ("DK".equals(codeString)) + return DK; + if ("ES".equals(codeString)) + return ES; + if ("FI".equals(codeString)) + return FI; + if ("FR".equals(codeString)) + return FR; + if ("GR".equals(codeString)) + return GR; + if ("HR".equals(codeString)) + return HR; + if ("IE".equals(codeString)) + return IE; + if ("IN".equals(codeString)) + return IN; + if ("IT".equals(codeString)) + return IT; + if ("JP".equals(codeString)) + return JP; + if ("KR".equals(codeString)) + return KR; + if ("LT".equals(codeString)) + return LT; + if ("MX".equals(codeString)) + return MX; + if ("NL".equals(codeString)) + return NL; + if ("NZ".equals(codeString)) + return NZ; + if ("RO".equals(codeString)) + return RO; + if ("RU".equals(codeString)) + return RU; + if ("SE".equals(codeString)) + return SE; + if ("SG".equals(codeString)) + return SG; + if ("SOA".equals(codeString)) + return SOA; + if ("TR".equals(codeString)) + return TR; + if ("TW".equals(codeString)) + return TW; + if ("UK".equals(codeString)) + return UK; + if ("US".equals(codeString)) + return US; + if ("UV".equals(codeString)) + return UV; + if ("UY".equals(codeString)) + return UY; + if ("C1".equals(codeString)) + return C1; + if ("GB".equals(codeString)) + return GB; + if ("R1".equals(codeString)) + return R1; + if ("X1".equals(codeString)) + return X1; + if ("NamespaceRealms".equals(codeString)) + return NAMESPACEREALMS; + if ("ZZ".equals(codeString)) + return ZZ; + throw new FHIRException("Unknown V3Hl7Realm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BINDINGREALMS: return "BindingRealms"; + case AFFILIATEREALMS: return "AffiliateRealms"; + case AR: return "AR"; + case AT: return "AT"; + case AU: return "AU"; + case BR: return "BR"; + case CA: return "CA"; + case CH: return "CH"; + case CL: return "CL"; + case CN: return "CN"; + case CO: return "CO"; + case CZ: return "CZ"; + case DE: return "DE"; + case DK: return "DK"; + case ES: return "ES"; + case FI: return "FI"; + case FR: return "FR"; + case GR: return "GR"; + case HR: return "HR"; + case IE: return "IE"; + case IN: return "IN"; + case IT: return "IT"; + case JP: return "JP"; + case KR: return "KR"; + case LT: return "LT"; + case MX: return "MX"; + case NL: return "NL"; + case NZ: return "NZ"; + case RO: return "RO"; + case RU: return "RU"; + case SE: return "SE"; + case SG: return "SG"; + case SOA: return "SOA"; + case TR: return "TR"; + case TW: return "TW"; + case UK: return "UK"; + case US: return "US"; + case UV: return "UV"; + case UY: return "UY"; + case C1: return "C1"; + case GB: return "GB"; + case R1: return "R1"; + case X1: return "X1"; + case NAMESPACEREALMS: return "NamespaceRealms"; + case ZZ: return "ZZ"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/hl7Realm"; + } + public String getDefinition() { + switch (this) { + case BINDINGREALMS: return "Description: Concepts that can be used as Binding Realms when creating Binding Statements. These codes are permitted to appear in the InfrastructureRoot.realmCode attribute."; + case AFFILIATEREALMS: return "Description: Realm codes for official HL7 organizational bodies. This includes both the HL7 International organization as well as all recognized international affiliates (past and present). These groups have the ability to bind vocabulary and develop artifacts. As well, they have the ability to have \"ownership\" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes."; + case AR: return "Description: Realm code for use of Argentina"; + case AT: return "Description: Realm code for use of Austria"; + case AU: return "Description: Realm code for use of Australia"; + case BR: return "Description: Realm code for use of Brazil"; + case CA: return "Description: Realm code for use of Canada"; + case CH: return "Description: Realm code for use of Switzerland"; + case CL: return "Description: Realm code for use of Chile"; + case CN: return "Description: Realm code for use of China"; + case CO: return "Description: Realm code for use of Localized Version"; + case CZ: return "Description: Realm code for use of Czech Republic"; + case DE: return "Description: Realm code for use of Germany"; + case DK: return "Description: Realm code for use of Denmark"; + case ES: return "Description: Realm code for use of Spain"; + case FI: return "Description: Realm code for use of Finland"; + case FR: return "Description: Realm code for use of France"; + case GR: return "Description: Realm code for use of Greece"; + case HR: return "Description: Realm code for use of Croatia"; + case IE: return "Description: Realm code for use of Ireland"; + case IN: return "Description: Realm code for use of India"; + case IT: return "Description: Realm code for use of Italy"; + case JP: return "Description: Realm code for use of Japan"; + case KR: return "Description: Realm code for use of Korea"; + case LT: return "Description: Realm code for use of Lithuania"; + case MX: return "Description: Realm code for use of Mexico"; + case NL: return "Description: Realm code for use of The Netherlands"; + case NZ: return "Description: Realm code for use of New Zealand"; + case RO: return "Description: Realm code for use of Romania"; + case RU: return "Description: Realm code for use of Russian Federation"; + case SE: return "Description: Realm code for use of Sweden"; + case SG: return "Description: Realm code for use of Localized Version"; + case SOA: return "Description: Realm code for use of Southern Africa"; + case TR: return "Description: Realm code for use of Turkey"; + case TW: return "Description: Realm code for use of Taiwan"; + case UK: return "Description: Realm code for use of United Kingdom"; + case US: return "Description: Realm code for use of United States of America"; + case UV: return "Description: Realm code for use of Universal realm or context, used in every instance"; + case UY: return "Description: Realm code for use of Uruguay"; + case C1: return "Description: Realm code for use of Unclassified Realm"; + case GB: return "Description: Realm code for use of Great Britain"; + case R1: return "Description: Realm code for use of Representative Realm"; + case X1: return "Description: Realm code for use of Example Realm"; + case NAMESPACEREALMS: return "Description: Codes that can be used in the \"realm\" portion of HL7 v3 artifact identifiers."; + case ZZ: return "Description: An artifact created for local use only. This realm namespace has no owning affiliate. Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace. Because of this, there is a significant likelihood of artifact identifier collisions. Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BINDINGREALMS: return "binding realms"; + case AFFILIATEREALMS: return "Affiliate Realms"; + case AR: return "Argentina"; + case AT: return "Austria"; + case AU: return "Australia"; + case BR: return "Brazil"; + case CA: return "Canada"; + case CH: return "Switzerland"; + case CL: return "Chile"; + case CN: return "China"; + case CO: return "Columbia"; + case CZ: return "Czech Republic"; + case DE: return "Germany"; + case DK: return "Denmark"; + case ES: return "Spain"; + case FI: return "Finland"; + case FR: return "France"; + case GR: return "Greece"; + case HR: return "Croatia"; + case IE: return "Ireland"; + case IN: return "India"; + case IT: return "Italy"; + case JP: return "Japan"; + case KR: return "Korea"; + case LT: return "Lithuania"; + case MX: return "Mexico"; + case NL: return "The Netherlands"; + case NZ: return "New Zealand"; + case RO: return "Romania"; + case RU: return "Russian Federation"; + case SE: return "Sweden"; + case SG: return "Singapore"; + case SOA: return "Southern Africa"; + case TR: return "Turkey"; + case TW: return "Taiwan"; + case UK: return "United Kingdom"; + case US: return "United States of America"; + case UV: return "Universal"; + case UY: return "Uruguay"; + case C1: return "Unclassified Realm"; + case GB: return "Great Britain"; + case R1: return "Representative Realm"; + case X1: return "Example Realm"; + case NAMESPACEREALMS: return "namespace realms"; + case ZZ: return "Localized Version"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7RealmEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7RealmEnumFactory.java new file mode 100644 index 00000000000..7a879c3024c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7RealmEnumFactory.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3Hl7RealmEnumFactory implements EnumFactory { + + public V3Hl7Realm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BindingRealms".equals(codeString)) + return V3Hl7Realm.BINDINGREALMS; + if ("AffiliateRealms".equals(codeString)) + return V3Hl7Realm.AFFILIATEREALMS; + if ("AR".equals(codeString)) + return V3Hl7Realm.AR; + if ("AT".equals(codeString)) + return V3Hl7Realm.AT; + if ("AU".equals(codeString)) + return V3Hl7Realm.AU; + if ("BR".equals(codeString)) + return V3Hl7Realm.BR; + if ("CA".equals(codeString)) + return V3Hl7Realm.CA; + if ("CH".equals(codeString)) + return V3Hl7Realm.CH; + if ("CL".equals(codeString)) + return V3Hl7Realm.CL; + if ("CN".equals(codeString)) + return V3Hl7Realm.CN; + if ("CO".equals(codeString)) + return V3Hl7Realm.CO; + if ("CZ".equals(codeString)) + return V3Hl7Realm.CZ; + if ("DE".equals(codeString)) + return V3Hl7Realm.DE; + if ("DK".equals(codeString)) + return V3Hl7Realm.DK; + if ("ES".equals(codeString)) + return V3Hl7Realm.ES; + if ("FI".equals(codeString)) + return V3Hl7Realm.FI; + if ("FR".equals(codeString)) + return V3Hl7Realm.FR; + if ("GR".equals(codeString)) + return V3Hl7Realm.GR; + if ("HR".equals(codeString)) + return V3Hl7Realm.HR; + if ("IE".equals(codeString)) + return V3Hl7Realm.IE; + if ("IN".equals(codeString)) + return V3Hl7Realm.IN; + if ("IT".equals(codeString)) + return V3Hl7Realm.IT; + if ("JP".equals(codeString)) + return V3Hl7Realm.JP; + if ("KR".equals(codeString)) + return V3Hl7Realm.KR; + if ("LT".equals(codeString)) + return V3Hl7Realm.LT; + if ("MX".equals(codeString)) + return V3Hl7Realm.MX; + if ("NL".equals(codeString)) + return V3Hl7Realm.NL; + if ("NZ".equals(codeString)) + return V3Hl7Realm.NZ; + if ("RO".equals(codeString)) + return V3Hl7Realm.RO; + if ("RU".equals(codeString)) + return V3Hl7Realm.RU; + if ("SE".equals(codeString)) + return V3Hl7Realm.SE; + if ("SG".equals(codeString)) + return V3Hl7Realm.SG; + if ("SOA".equals(codeString)) + return V3Hl7Realm.SOA; + if ("TR".equals(codeString)) + return V3Hl7Realm.TR; + if ("TW".equals(codeString)) + return V3Hl7Realm.TW; + if ("UK".equals(codeString)) + return V3Hl7Realm.UK; + if ("US".equals(codeString)) + return V3Hl7Realm.US; + if ("UV".equals(codeString)) + return V3Hl7Realm.UV; + if ("UY".equals(codeString)) + return V3Hl7Realm.UY; + if ("C1".equals(codeString)) + return V3Hl7Realm.C1; + if ("GB".equals(codeString)) + return V3Hl7Realm.GB; + if ("R1".equals(codeString)) + return V3Hl7Realm.R1; + if ("X1".equals(codeString)) + return V3Hl7Realm.X1; + if ("NamespaceRealms".equals(codeString)) + return V3Hl7Realm.NAMESPACEREALMS; + if ("ZZ".equals(codeString)) + return V3Hl7Realm.ZZ; + throw new IllegalArgumentException("Unknown V3Hl7Realm code '"+codeString+"'"); + } + + public String toCode(V3Hl7Realm code) { + if (code == V3Hl7Realm.BINDINGREALMS) + return "BindingRealms"; + if (code == V3Hl7Realm.AFFILIATEREALMS) + return "AffiliateRealms"; + if (code == V3Hl7Realm.AR) + return "AR"; + if (code == V3Hl7Realm.AT) + return "AT"; + if (code == V3Hl7Realm.AU) + return "AU"; + if (code == V3Hl7Realm.BR) + return "BR"; + if (code == V3Hl7Realm.CA) + return "CA"; + if (code == V3Hl7Realm.CH) + return "CH"; + if (code == V3Hl7Realm.CL) + return "CL"; + if (code == V3Hl7Realm.CN) + return "CN"; + if (code == V3Hl7Realm.CO) + return "CO"; + if (code == V3Hl7Realm.CZ) + return "CZ"; + if (code == V3Hl7Realm.DE) + return "DE"; + if (code == V3Hl7Realm.DK) + return "DK"; + if (code == V3Hl7Realm.ES) + return "ES"; + if (code == V3Hl7Realm.FI) + return "FI"; + if (code == V3Hl7Realm.FR) + return "FR"; + if (code == V3Hl7Realm.GR) + return "GR"; + if (code == V3Hl7Realm.HR) + return "HR"; + if (code == V3Hl7Realm.IE) + return "IE"; + if (code == V3Hl7Realm.IN) + return "IN"; + if (code == V3Hl7Realm.IT) + return "IT"; + if (code == V3Hl7Realm.JP) + return "JP"; + if (code == V3Hl7Realm.KR) + return "KR"; + if (code == V3Hl7Realm.LT) + return "LT"; + if (code == V3Hl7Realm.MX) + return "MX"; + if (code == V3Hl7Realm.NL) + return "NL"; + if (code == V3Hl7Realm.NZ) + return "NZ"; + if (code == V3Hl7Realm.RO) + return "RO"; + if (code == V3Hl7Realm.RU) + return "RU"; + if (code == V3Hl7Realm.SE) + return "SE"; + if (code == V3Hl7Realm.SG) + return "SG"; + if (code == V3Hl7Realm.SOA) + return "SOA"; + if (code == V3Hl7Realm.TR) + return "TR"; + if (code == V3Hl7Realm.TW) + return "TW"; + if (code == V3Hl7Realm.UK) + return "UK"; + if (code == V3Hl7Realm.US) + return "US"; + if (code == V3Hl7Realm.UV) + return "UV"; + if (code == V3Hl7Realm.UY) + return "UY"; + if (code == V3Hl7Realm.C1) + return "C1"; + if (code == V3Hl7Realm.GB) + return "GB"; + if (code == V3Hl7Realm.R1) + return "R1"; + if (code == V3Hl7Realm.X1) + return "X1"; + if (code == V3Hl7Realm.NAMESPACEREALMS) + return "NamespaceRealms"; + if (code == V3Hl7Realm.ZZ) + return "ZZ"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3Conformance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3Conformance.java new file mode 100644 index 00000000000..1de342c1251 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3Conformance.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Hl7V3Conformance { + + /** + * Description: Implementers receiving this property must not raise an error if the data is received, but will not perform any useful function with the data. This conformance level is not used in profiles or other artifacts that are specific to the "sender" or "initiator" of a communication. + */ + I, + /** + * Description: All implementers are prohibited from transmitting this content, and may raise an error if they receive it. + */ + NP, + /** + * Description: All implementers must support this property. I.e. they must be able to transmit, or to receive and usefully handle the concept. + */ + R, + /** + * Description: The element is considered "required" (i.e. must be supported) from the perspective of systems that consume instances, but is "undetermined" for systems that generate instances. Used only as part of specifications that define both initiator and consumer expectations. + */ + RC, + /** + * Description: The element is considered "required" (i.e. must be supported) from the perspective of systems that generate instances, but is "undetermined" for systems that consume instances. Used only as part of specifications that define both initiator and consumer expectations. + */ + RI, + /** + * Description: The conformance expectations for this element have not yet been determined. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3Hl7V3Conformance fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("NP".equals(codeString)) + return NP; + if ("R".equals(codeString)) + return R; + if ("RC".equals(codeString)) + return RC; + if ("RI".equals(codeString)) + return RI; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3Hl7V3Conformance code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case NP: return "NP"; + case R: return "R"; + case RC: return "RC"; + case RI: return "RI"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/hl7V3Conformance"; + } + public String getDefinition() { + switch (this) { + case I: return "Description: Implementers receiving this property must not raise an error if the data is received, but will not perform any useful function with the data. This conformance level is not used in profiles or other artifacts that are specific to the \"sender\" or \"initiator\" of a communication."; + case NP: return "Description: All implementers are prohibited from transmitting this content, and may raise an error if they receive it."; + case R: return "Description: All implementers must support this property. I.e. they must be able to transmit, or to receive and usefully handle the concept."; + case RC: return "Description: The element is considered \"required\" (i.e. must be supported) from the perspective of systems that consume instances, but is \"undetermined\" for systems that generate instances. Used only as part of specifications that define both initiator and consumer expectations."; + case RI: return "Description: The element is considered \"required\" (i.e. must be supported) from the perspective of systems that generate instances, but is \"undetermined\" for systems that consume instances. Used only as part of specifications that define both initiator and consumer expectations."; + case U: return "Description: The conformance expectations for this element have not yet been determined."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "ignored"; + case NP: return "not permitted"; + case R: return "required"; + case RC: return "required for consumer"; + case RI: return "required for initiator"; + case U: return "undetermined"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3ConformanceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3ConformanceEnumFactory.java new file mode 100644 index 00000000000..0163fb78079 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Hl7V3ConformanceEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3Hl7V3ConformanceEnumFactory implements EnumFactory { + + public V3Hl7V3Conformance fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3Hl7V3Conformance.I; + if ("NP".equals(codeString)) + return V3Hl7V3Conformance.NP; + if ("R".equals(codeString)) + return V3Hl7V3Conformance.R; + if ("RC".equals(codeString)) + return V3Hl7V3Conformance.RC; + if ("RI".equals(codeString)) + return V3Hl7V3Conformance.RI; + if ("U".equals(codeString)) + return V3Hl7V3Conformance.U; + throw new IllegalArgumentException("Unknown V3Hl7V3Conformance code '"+codeString+"'"); + } + + public String toCode(V3Hl7V3Conformance code) { + if (code == V3Hl7V3Conformance.I) + return "I"; + if (code == V3Hl7V3Conformance.NP) + return "NP"; + if (code == V3Hl7V3Conformance.R) + return "R"; + if (code == V3Hl7V3Conformance.RC) + return "RC"; + if (code == V3Hl7V3Conformance.RI) + return "RI"; + if (code == V3Hl7V3Conformance.U) + return "U"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkType.java new file mode 100644 index 00000000000..4f10fa2f5cf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkType.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3HtmlLinkType { + + /** + * Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media). + */ + ALTERNATE, + /** + * Refers to a document serving as an appendix in a collection of documents. + */ + APPENDIX, + /** + * Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document. + */ + BOOKMARK, + /** + * Refers to a document serving as a chapter in a collection of documents. + */ + CHAPTER, + /** + * Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). + */ + CONTENTS, + /** + * Refers to a copyright statement for the current document. + */ + COPYRIGHT, + /** + * Refers to a document providing a glossary of terms that pertain to the current document. + */ + GLOSSARY, + /** + * Refers to a document offering help (more information, links to other sources of information, etc.). + */ + HELP, + /** + * Refers to a document providing an index for the current document. + */ + INDEX, + /** + * Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time. + */ + NEXT, + /** + * Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". + */ + PREV, + /** + * Refers to a document serving as a section in a collection of documents. + */ + SECTION, + /** + * Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection. + */ + START, + /** + * Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets. + */ + STYLESHEET, + /** + * Refers to a document serving as a subsection in a collection of documents. + */ + SUBSECTION, + /** + * added to help the parsers + */ + NULL; + public static V3HtmlLinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alternate".equals(codeString)) + return ALTERNATE; + if ("appendix".equals(codeString)) + return APPENDIX; + if ("bookmark".equals(codeString)) + return BOOKMARK; + if ("chapter".equals(codeString)) + return CHAPTER; + if ("contents".equals(codeString)) + return CONTENTS; + if ("copyright".equals(codeString)) + return COPYRIGHT; + if ("glossary".equals(codeString)) + return GLOSSARY; + if ("help".equals(codeString)) + return HELP; + if ("index".equals(codeString)) + return INDEX; + if ("next".equals(codeString)) + return NEXT; + if ("prev".equals(codeString)) + return PREV; + if ("section".equals(codeString)) + return SECTION; + if ("start".equals(codeString)) + return START; + if ("stylesheet".equals(codeString)) + return STYLESHEET; + if ("subsection".equals(codeString)) + return SUBSECTION; + throw new FHIRException("Unknown V3HtmlLinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALTERNATE: return "alternate"; + case APPENDIX: return "appendix"; + case BOOKMARK: return "bookmark"; + case CHAPTER: return "chapter"; + case CONTENTS: return "contents"; + case COPYRIGHT: return "copyright"; + case GLOSSARY: return "glossary"; + case HELP: return "help"; + case INDEX: return "index"; + case NEXT: return "next"; + case PREV: return "prev"; + case SECTION: return "section"; + case START: return "start"; + case STYLESHEET: return "stylesheet"; + case SUBSECTION: return "subsection"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/HtmlLinkType"; + } + public String getDefinition() { + switch (this) { + case ALTERNATE: return "Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media)."; + case APPENDIX: return "Refers to a document serving as an appendix in a collection of documents."; + case BOOKMARK: return "Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document."; + case CHAPTER: return "Refers to a document serving as a chapter in a collection of documents."; + case CONTENTS: return "Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from \"Table of Contents\")."; + case COPYRIGHT: return "Refers to a copyright statement for the current document."; + case GLOSSARY: return "Refers to a document providing a glossary of terms that pertain to the current document."; + case HELP: return "Refers to a document offering help (more information, links to other sources of information, etc.)."; + case INDEX: return "Refers to a document providing an index for the current document."; + case NEXT: return "Refers to the next document in a linear sequence of documents. User agents may choose to preload the \"next\" document, to reduce the perceived load time."; + case PREV: return "Refers to the previous document in an ordered series of documents. Some user agents also support the synonym \"Previous\"."; + case SECTION: return "Refers to a document serving as a section in a collection of documents."; + case START: return "Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection."; + case STYLESHEET: return "Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type \"Alternate\" for user-selectable alternate style sheets."; + case SUBSECTION: return "Refers to a document serving as a subsection in a collection of documents."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALTERNATE: return "alternate"; + case APPENDIX: return "appendix"; + case BOOKMARK: return "bookmark"; + case CHAPTER: return "chapter"; + case CONTENTS: return "contents"; + case COPYRIGHT: return "copyright"; + case GLOSSARY: return "glossary"; + case HELP: return "help"; + case INDEX: return "index"; + case NEXT: return "next"; + case PREV: return "prev"; + case SECTION: return "section"; + case START: return "start"; + case STYLESHEET: return "stylesheet"; + case SUBSECTION: return "subsection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkTypeEnumFactory.java new file mode 100644 index 00000000000..32058cc1f4f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3HtmlLinkTypeEnumFactory.java @@ -0,0 +1,111 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3HtmlLinkTypeEnumFactory implements EnumFactory { + + public V3HtmlLinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alternate".equals(codeString)) + return V3HtmlLinkType.ALTERNATE; + if ("appendix".equals(codeString)) + return V3HtmlLinkType.APPENDIX; + if ("bookmark".equals(codeString)) + return V3HtmlLinkType.BOOKMARK; + if ("chapter".equals(codeString)) + return V3HtmlLinkType.CHAPTER; + if ("contents".equals(codeString)) + return V3HtmlLinkType.CONTENTS; + if ("copyright".equals(codeString)) + return V3HtmlLinkType.COPYRIGHT; + if ("glossary".equals(codeString)) + return V3HtmlLinkType.GLOSSARY; + if ("help".equals(codeString)) + return V3HtmlLinkType.HELP; + if ("index".equals(codeString)) + return V3HtmlLinkType.INDEX; + if ("next".equals(codeString)) + return V3HtmlLinkType.NEXT; + if ("prev".equals(codeString)) + return V3HtmlLinkType.PREV; + if ("section".equals(codeString)) + return V3HtmlLinkType.SECTION; + if ("start".equals(codeString)) + return V3HtmlLinkType.START; + if ("stylesheet".equals(codeString)) + return V3HtmlLinkType.STYLESHEET; + if ("subsection".equals(codeString)) + return V3HtmlLinkType.SUBSECTION; + throw new IllegalArgumentException("Unknown V3HtmlLinkType code '"+codeString+"'"); + } + + public String toCode(V3HtmlLinkType code) { + if (code == V3HtmlLinkType.ALTERNATE) + return "alternate"; + if (code == V3HtmlLinkType.APPENDIX) + return "appendix"; + if (code == V3HtmlLinkType.BOOKMARK) + return "bookmark"; + if (code == V3HtmlLinkType.CHAPTER) + return "chapter"; + if (code == V3HtmlLinkType.CONTENTS) + return "contents"; + if (code == V3HtmlLinkType.COPYRIGHT) + return "copyright"; + if (code == V3HtmlLinkType.GLOSSARY) + return "glossary"; + if (code == V3HtmlLinkType.HELP) + return "help"; + if (code == V3HtmlLinkType.INDEX) + return "index"; + if (code == V3HtmlLinkType.NEXT) + return "next"; + if (code == V3HtmlLinkType.PREV) + return "prev"; + if (code == V3HtmlLinkType.SECTION) + return "section"; + if (code == V3HtmlLinkType.START) + return "start"; + if (code == V3HtmlLinkType.STYLESHEET) + return "stylesheet"; + if (code == V3HtmlLinkType.SUBSECTION) + return "subsection"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliability.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliability.java new file mode 100644 index 00000000000..85bf055ddba --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliability.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IdentifierReliability { + + /** + * Description: The identifier was issued by the system responsible for constructing the instance. + */ + ISS, + /** + * Description: The identifier was provided to the system that constructed the instance, but has not been verified. e.g. a Drivers license entered manually into a system by a user. + */ + UNV, + /** + * Description: The identifier was not issued by the system responsible for constructing the instance, but the system that captured the id has verified the identifier with the issuing authority, or with another system that has verified the identifier. + */ + VRF, + /** + * added to help the parsers + */ + NULL; + public static V3IdentifierReliability fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ISS".equals(codeString)) + return ISS; + if ("UNV".equals(codeString)) + return UNV; + if ("VRF".equals(codeString)) + return VRF; + throw new FHIRException("Unknown V3IdentifierReliability code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ISS: return "ISS"; + case UNV: return "UNV"; + case VRF: return "VRF"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IdentifierReliability"; + } + public String getDefinition() { + switch (this) { + case ISS: return "Description: The identifier was issued by the system responsible for constructing the instance."; + case UNV: return "Description: The identifier was provided to the system that constructed the instance, but has not been verified. e.g. a Drivers license entered manually into a system by a user."; + case VRF: return "Description: The identifier was not issued by the system responsible for constructing the instance, but the system that captured the id has verified the identifier with the issuing authority, or with another system that has verified the identifier."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ISS: return "Issued by System"; + case UNV: return "Unverified by system"; + case VRF: return "Verified by system"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliabilityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliabilityEnumFactory.java new file mode 100644 index 00000000000..31ff035daf9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierReliabilityEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3IdentifierReliabilityEnumFactory implements EnumFactory { + + public V3IdentifierReliability fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ISS".equals(codeString)) + return V3IdentifierReliability.ISS; + if ("UNV".equals(codeString)) + return V3IdentifierReliability.UNV; + if ("VRF".equals(codeString)) + return V3IdentifierReliability.VRF; + throw new IllegalArgumentException("Unknown V3IdentifierReliability code '"+codeString+"'"); + } + + public String toCode(V3IdentifierReliability code) { + if (code == V3IdentifierReliability.ISS) + return "ISS"; + if (code == V3IdentifierReliability.UNV) + return "UNV"; + if (code == V3IdentifierReliability.VRF) + return "VRF"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScope.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScope.java new file mode 100644 index 00000000000..ea28123183a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScope.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IdentifierScope { + + /** + * Description: An identifier whose scope is defined by the business practices associated with the object. In contrast to the other scope identifiers, the scope of the use of the id is not necessarily restricted to a single object, but may be reused for other objects closely associated with the object due to business practice. + */ + BUSN, + /** + * Description: The identifier associated with a particular object. It remains consistent as the object undergoes state transitions. + */ + OBJ, + /** + * Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. I.e. The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated). + + + NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes. + */ + VER, + /** + * Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. + + + Example The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated). + + + NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes. + */ + VW, + /** + * added to help the parsers + */ + NULL; + public static V3IdentifierScope fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BUSN".equals(codeString)) + return BUSN; + if ("OBJ".equals(codeString)) + return OBJ; + if ("VER".equals(codeString)) + return VER; + if ("VW".equals(codeString)) + return VW; + throw new FHIRException("Unknown V3IdentifierScope code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BUSN: return "BUSN"; + case OBJ: return "OBJ"; + case VER: return "VER"; + case VW: return "VW"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IdentifierScope"; + } + public String getDefinition() { + switch (this) { + case BUSN: return "Description: An identifier whose scope is defined by the business practices associated with the object. In contrast to the other scope identifiers, the scope of the use of the id is not necessarily restricted to a single object, but may be reused for other objects closely associated with the object due to business practice."; + case OBJ: return "Description: The identifier associated with a particular object. It remains consistent as the object undergoes state transitions."; + case VER: return "Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. I.e. The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated).\r\n\n \n NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes."; + case VW: return "Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object.\r\n\n \n Example The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated).\r\n\n \n NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BUSN: return "Business Identifier"; + case OBJ: return "Object Identifier"; + case VER: return "Version Identifier"; + case VW: return "View Specific Identifier"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScopeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScopeEnumFactory.java new file mode 100644 index 00000000000..3f6aa6bf7a0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IdentifierScopeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3IdentifierScopeEnumFactory implements EnumFactory { + + public V3IdentifierScope fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BUSN".equals(codeString)) + return V3IdentifierScope.BUSN; + if ("OBJ".equals(codeString)) + return V3IdentifierScope.OBJ; + if ("VER".equals(codeString)) + return V3IdentifierScope.VER; + if ("VW".equals(codeString)) + return V3IdentifierScope.VW; + throw new IllegalArgumentException("Unknown V3IdentifierScope code '"+codeString+"'"); + } + + public String toCode(V3IdentifierScope code) { + if (code == V3IdentifierScope.BUSN) + return "BUSN"; + if (code == V3IdentifierScope.OBJ) + return "OBJ"; + if (code == V3IdentifierScope.VER) + return "VER"; + if (code == V3IdentifierScope.VW) + return "VW"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithm.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithm.java new file mode 100644 index 00000000000..474df9e2c8b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithm.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IntegrityCheckAlgorithm { + + /** + * This algorithm is defined in FIPS PUB 180-1: Secure Hash Standard. As of April 17, 1995. + */ + SHA1, + /** + * This algorithm is defined in FIPS PUB 180-2: Secure Hash Standard. + */ + SHA256, + /** + * added to help the parsers + */ + NULL; + public static V3IntegrityCheckAlgorithm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHA-1".equals(codeString)) + return SHA1; + if ("SHA-256".equals(codeString)) + return SHA256; + throw new FHIRException("Unknown V3IntegrityCheckAlgorithm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SHA1: return "SHA-1"; + case SHA256: return "SHA-256"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IntegrityCheckAlgorithm"; + } + public String getDefinition() { + switch (this) { + case SHA1: return "This algorithm is defined in FIPS PUB 180-1: Secure Hash Standard. As of April 17, 1995."; + case SHA256: return "This algorithm is defined in FIPS PUB 180-2: Secure Hash Standard."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SHA1: return "secure hash algorithm - 1"; + case SHA256: return "secure hash algorithm - 256"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithmEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithmEnumFactory.java new file mode 100644 index 00000000000..d2c0277511b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3IntegrityCheckAlgorithmEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3IntegrityCheckAlgorithmEnumFactory implements EnumFactory { + + public V3IntegrityCheckAlgorithm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHA-1".equals(codeString)) + return V3IntegrityCheckAlgorithm.SHA1; + if ("SHA-256".equals(codeString)) + return V3IntegrityCheckAlgorithm.SHA256; + throw new IllegalArgumentException("Unknown V3IntegrityCheckAlgorithm code '"+codeString+"'"); + } + + public String toCode(V3IntegrityCheckAlgorithm code) { + if (code == V3IntegrityCheckAlgorithm.SHA1) + return "SHA-1"; + if (code == V3IntegrityCheckAlgorithm.SHA256) + return "SHA-256"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityMode.java new file mode 100644 index 00000000000..753b965f21d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityMode.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LanguageAbilityMode { + + /** + * Expressed signed + */ + ESGN, + /** + * Expressed spoken + */ + ESP, + /** + * Expressed written + */ + EWR, + /** + * Received signed + */ + RSGN, + /** + * Received spoken + */ + RSP, + /** + * Received written + */ + RWR, + /** + * added to help the parsers + */ + NULL; + public static V3LanguageAbilityMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ESGN".equals(codeString)) + return ESGN; + if ("ESP".equals(codeString)) + return ESP; + if ("EWR".equals(codeString)) + return EWR; + if ("RSGN".equals(codeString)) + return RSGN; + if ("RSP".equals(codeString)) + return RSP; + if ("RWR".equals(codeString)) + return RWR; + throw new FHIRException("Unknown V3LanguageAbilityMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ESGN: return "ESGN"; + case ESP: return "ESP"; + case EWR: return "EWR"; + case RSGN: return "RSGN"; + case RSP: return "RSP"; + case RWR: return "RWR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LanguageAbilityMode"; + } + public String getDefinition() { + switch (this) { + case ESGN: return "Expressed signed"; + case ESP: return "Expressed spoken"; + case EWR: return "Expressed written"; + case RSGN: return "Received signed"; + case RSP: return "Received spoken"; + case RWR: return "Received written"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ESGN: return "Expressed signed"; + case ESP: return "Expressed spoken"; + case EWR: return "Expressed written"; + case RSGN: return "Received signed"; + case RSP: return "Received spoken"; + case RWR: return "Received written"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityModeEnumFactory.java new file mode 100644 index 00000000000..5fe0e3625a6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityModeEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3LanguageAbilityModeEnumFactory implements EnumFactory { + + public V3LanguageAbilityMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ESGN".equals(codeString)) + return V3LanguageAbilityMode.ESGN; + if ("ESP".equals(codeString)) + return V3LanguageAbilityMode.ESP; + if ("EWR".equals(codeString)) + return V3LanguageAbilityMode.EWR; + if ("RSGN".equals(codeString)) + return V3LanguageAbilityMode.RSGN; + if ("RSP".equals(codeString)) + return V3LanguageAbilityMode.RSP; + if ("RWR".equals(codeString)) + return V3LanguageAbilityMode.RWR; + throw new IllegalArgumentException("Unknown V3LanguageAbilityMode code '"+codeString+"'"); + } + + public String toCode(V3LanguageAbilityMode code) { + if (code == V3LanguageAbilityMode.ESGN) + return "ESGN"; + if (code == V3LanguageAbilityMode.ESP) + return "ESP"; + if (code == V3LanguageAbilityMode.EWR) + return "EWR"; + if (code == V3LanguageAbilityMode.RSGN) + return "RSGN"; + if (code == V3LanguageAbilityMode.RSP) + return "RSP"; + if (code == V3LanguageAbilityMode.RWR) + return "RWR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiency.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiency.java new file mode 100644 index 00000000000..0ea5fe8ff2c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiency.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LanguageAbilityProficiency { + + /** + * Excellent + */ + E, + /** + * Fair + */ + F, + /** + * Good + */ + G, + /** + * Poor + */ + P, + /** + * added to help the parsers + */ + NULL; + public static V3LanguageAbilityProficiency fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("G".equals(codeString)) + return G; + if ("P".equals(codeString)) + return P; + throw new FHIRException("Unknown V3LanguageAbilityProficiency code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case F: return "F"; + case G: return "G"; + case P: return "P"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LanguageAbilityProficiency"; + } + public String getDefinition() { + switch (this) { + case E: return "Excellent"; + case F: return "Fair"; + case G: return "Good"; + case P: return "Poor"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "Excellent"; + case F: return "Fair"; + case G: return "Good"; + case P: return "Poor"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiencyEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiencyEnumFactory.java new file mode 100644 index 00000000000..861be79d832 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LanguageAbilityProficiencyEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3LanguageAbilityProficiencyEnumFactory implements EnumFactory { + + public V3LanguageAbilityProficiency fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3LanguageAbilityProficiency.E; + if ("F".equals(codeString)) + return V3LanguageAbilityProficiency.F; + if ("G".equals(codeString)) + return V3LanguageAbilityProficiency.G; + if ("P".equals(codeString)) + return V3LanguageAbilityProficiency.P; + throw new IllegalArgumentException("Unknown V3LanguageAbilityProficiency code '"+codeString+"'"); + } + + public String toCode(V3LanguageAbilityProficiency code) { + if (code == V3LanguageAbilityProficiency.E) + return "E"; + if (code == V3LanguageAbilityProficiency.F) + return "F"; + if (code == V3LanguageAbilityProficiency.G) + return "G"; + if (code == V3LanguageAbilityProficiency.P) + return "P"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangement.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangement.java new file mode 100644 index 00000000000..d6b12d2ed7f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangement.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LivingArrangement { + + /** + * Definition: Living arrangements lacking a permanent residence. + */ + HL, + /** + * Nomadic + */ + M, + /** + * Transient + */ + T, + /** + * Institution + */ + I, + /** + * Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided. + */ + CS, + /** + * Group Home + */ + G, + /** + * Nursing Home + */ + N, + /** + * Extended care facility + */ + X, + /** + * Definition: A living arrangement within a private residence for single family. + */ + PR, + /** + * Independent Household + */ + H, + /** + * Retirement Community + */ + R, + /** + * Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided. + */ + SL, + /** + * added to help the parsers + */ + NULL; + public static V3LivingArrangement fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("HL".equals(codeString)) + return HL; + if ("M".equals(codeString)) + return M; + if ("T".equals(codeString)) + return T; + if ("I".equals(codeString)) + return I; + if ("CS".equals(codeString)) + return CS; + if ("G".equals(codeString)) + return G; + if ("N".equals(codeString)) + return N; + if ("X".equals(codeString)) + return X; + if ("PR".equals(codeString)) + return PR; + if ("H".equals(codeString)) + return H; + if ("R".equals(codeString)) + return R; + if ("SL".equals(codeString)) + return SL; + throw new FHIRException("Unknown V3LivingArrangement code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HL: return "HL"; + case M: return "M"; + case T: return "T"; + case I: return "I"; + case CS: return "CS"; + case G: return "G"; + case N: return "N"; + case X: return "X"; + case PR: return "PR"; + case H: return "H"; + case R: return "R"; + case SL: return "SL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LivingArrangement"; + } + public String getDefinition() { + switch (this) { + case HL: return "Definition: Living arrangements lacking a permanent residence."; + case M: return "Nomadic"; + case T: return "Transient"; + case I: return "Institution"; + case CS: return "Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided."; + case G: return "Group Home"; + case N: return "Nursing Home"; + case X: return "Extended care facility"; + case PR: return "Definition: A living arrangement within a private residence for single family."; + case H: return "Independent Household"; + case R: return "Retirement Community"; + case SL: return "Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HL: return "homeless"; + case M: return "Nomadic"; + case T: return "Transient"; + case I: return "Institution"; + case CS: return "community shelter"; + case G: return "Group Home"; + case N: return "Nursing Home"; + case X: return "Extended care facility"; + case PR: return "private residence"; + case H: return "Independent Household"; + case R: return "Retirement Community"; + case SL: return "supported living"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangementEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangementEnumFactory.java new file mode 100644 index 00000000000..6bd27af3d26 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LivingArrangementEnumFactory.java @@ -0,0 +1,99 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3LivingArrangementEnumFactory implements EnumFactory { + + public V3LivingArrangement fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("HL".equals(codeString)) + return V3LivingArrangement.HL; + if ("M".equals(codeString)) + return V3LivingArrangement.M; + if ("T".equals(codeString)) + return V3LivingArrangement.T; + if ("I".equals(codeString)) + return V3LivingArrangement.I; + if ("CS".equals(codeString)) + return V3LivingArrangement.CS; + if ("G".equals(codeString)) + return V3LivingArrangement.G; + if ("N".equals(codeString)) + return V3LivingArrangement.N; + if ("X".equals(codeString)) + return V3LivingArrangement.X; + if ("PR".equals(codeString)) + return V3LivingArrangement.PR; + if ("H".equals(codeString)) + return V3LivingArrangement.H; + if ("R".equals(codeString)) + return V3LivingArrangement.R; + if ("SL".equals(codeString)) + return V3LivingArrangement.SL; + throw new IllegalArgumentException("Unknown V3LivingArrangement code '"+codeString+"'"); + } + + public String toCode(V3LivingArrangement code) { + if (code == V3LivingArrangement.HL) + return "HL"; + if (code == V3LivingArrangement.M) + return "M"; + if (code == V3LivingArrangement.T) + return "T"; + if (code == V3LivingArrangement.I) + return "I"; + if (code == V3LivingArrangement.CS) + return "CS"; + if (code == V3LivingArrangement.G) + return "G"; + if (code == V3LivingArrangement.N) + return "N"; + if (code == V3LivingArrangement.X) + return "X"; + if (code == V3LivingArrangement.PR) + return "PR"; + if (code == V3LivingArrangement.H) + return "H"; + if (code == V3LivingArrangement.R) + return "R"; + if (code == V3LivingArrangement.SL) + return "SL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnore.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnore.java new file mode 100644 index 00000000000..c8f509990ca --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnore.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LocalMarkupIgnore { + + /** + * all + */ + ALL, + /** + * markup + */ + MARKUP, + /** + * added to help the parsers + */ + NULL; + public static V3LocalMarkupIgnore fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return ALL; + if ("markup".equals(codeString)) + return MARKUP; + throw new FHIRException("Unknown V3LocalMarkupIgnore code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LocalMarkupIgnore"; + } + public String getDefinition() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnoreEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnoreEnumFactory.java new file mode 100644 index 00000000000..b137fbfb5d1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalMarkupIgnoreEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3LocalMarkupIgnoreEnumFactory implements EnumFactory { + + public V3LocalMarkupIgnore fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return V3LocalMarkupIgnore.ALL; + if ("markup".equals(codeString)) + return V3LocalMarkupIgnore.MARKUP; + throw new IllegalArgumentException("Unknown V3LocalMarkupIgnore code '"+codeString+"'"); + } + + public String toCode(V3LocalMarkupIgnore code) { + if (code == V3LocalMarkupIgnore.ALL) + return "all"; + if (code == V3LocalMarkupIgnore.MARKUP) + return "markup"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlState.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlState.java new file mode 100644 index 00000000000..2c5e091a8c2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlState.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LocalRemoteControlState { + + /** + * An equipment can either work autonomously ('Local' control state). + */ + L, + /** + * An equipment can be controlled by another system, e.g., LAS computer ('Remote' control state). + */ + R, + /** + * added to help the parsers + */ + NULL; + public static V3LocalRemoteControlState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("L".equals(codeString)) + return L; + if ("R".equals(codeString)) + return R; + throw new FHIRException("Unknown V3LocalRemoteControlState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case L: return "L"; + case R: return "R"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LocalRemoteControlState"; + } + public String getDefinition() { + switch (this) { + case L: return "An equipment can either work autonomously ('Local' control state)."; + case R: return "An equipment can be controlled by another system, e.g., LAS computer ('Remote' control state)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case L: return "Local"; + case R: return "Remote"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlStateEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlStateEnumFactory.java new file mode 100644 index 00000000000..4cd73bd10ce --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3LocalRemoteControlStateEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3LocalRemoteControlStateEnumFactory implements EnumFactory { + + public V3LocalRemoteControlState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("L".equals(codeString)) + return V3LocalRemoteControlState.L; + if ("R".equals(codeString)) + return V3LocalRemoteControlState.R; + throw new IllegalArgumentException("Unknown V3LocalRemoteControlState code '"+codeString+"'"); + } + + public String toCode(V3LocalRemoteControlState code) { + if (code == V3LocalRemoteControlState.L) + return "L"; + if (code == V3LocalRemoteControlState.R) + return "R"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatus.java new file mode 100644 index 00000000000..391e4694f9b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ManagedParticipationStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of a participation instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Participation is in progress. + */ + ACTIVE, + /** + * The terminal state resulting from cancellation of the Participation prior to activation. + */ + CANCELLED, + /** + * The terminal state representing the successful completion of the Participation. + */ + COMPLETED, + /** + * The state representing that fact that the Participation has not yet become active. + */ + PENDING, + /** + * The state representing the termination of a Participation instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3ManagedParticipationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("pending".equals(codeString)) + return PENDING; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3ManagedParticipationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ManagedParticipationStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of a participation instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Participation is in progress."; + case CANCELLED: return "The terminal state resulting from cancellation of the Participation prior to activation."; + case COMPLETED: return "The terminal state representing the successful completion of the Participation."; + case PENDING: return "The state representing that fact that the Participation has not yet become active."; + case NULLIFIED: return "The state representing the termination of a Participation instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatusEnumFactory.java new file mode 100644 index 00000000000..62e14808fcc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ManagedParticipationStatusEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ManagedParticipationStatusEnumFactory implements EnumFactory { + + public V3ManagedParticipationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3ManagedParticipationStatus.NORMAL; + if ("active".equals(codeString)) + return V3ManagedParticipationStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3ManagedParticipationStatus.CANCELLED; + if ("completed".equals(codeString)) + return V3ManagedParticipationStatus.COMPLETED; + if ("pending".equals(codeString)) + return V3ManagedParticipationStatus.PENDING; + if ("nullified".equals(codeString)) + return V3ManagedParticipationStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3ManagedParticipationStatus code '"+codeString+"'"); + } + + public String toCode(V3ManagedParticipationStatus code) { + if (code == V3ManagedParticipationStatus.NORMAL) + return "normal"; + if (code == V3ManagedParticipationStatus.ACTIVE) + return "active"; + if (code == V3ManagedParticipationStatus.CANCELLED) + return "cancelled"; + if (code == V3ManagedParticipationStatus.COMPLETED) + return "completed"; + if (code == V3ManagedParticipationStatus.PENDING) + return "pending"; + if (code == V3ManagedParticipationStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationship.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationship.java new file mode 100644 index 00000000000..3486616d497 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationship.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MapRelationship { + + /** + * The first concept is at a more abstract level than the second concept. For example, Hepatitis is broader than Hepatitis A, and endocrine disease is broader than Diabetes Mellitus. Broader than is the opposite of the narrower than relationship. + */ + BT, + /** + * The two concepts have identical meaning. + */ + E, + /** + * The first concept is at a more detailed level than the second concept. For example, Pennicillin G is narrower than Pennicillin, and vellus hair is narrower than hair. Narrower than is the opposite of broader than. + */ + NT, + /** + * added to help the parsers + */ + NULL; + public static V3MapRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BT".equals(codeString)) + return BT; + if ("E".equals(codeString)) + return E; + if ("NT".equals(codeString)) + return NT; + throw new FHIRException("Unknown V3MapRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BT: return "BT"; + case E: return "E"; + case NT: return "NT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MapRelationship"; + } + public String getDefinition() { + switch (this) { + case BT: return "The first concept is at a more abstract level than the second concept. For example, Hepatitis is broader than Hepatitis A, and endocrine disease is broader than Diabetes Mellitus. Broader than is the opposite of the narrower than relationship."; + case E: return "The two concepts have identical meaning."; + case NT: return "The first concept is at a more detailed level than the second concept. For example, Pennicillin G is narrower than Pennicillin, and vellus hair is narrower than hair. Narrower than is the opposite of broader than."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BT: return "Broader Than"; + case E: return "Exact"; + case NT: return "Narrower Than"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationshipEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationshipEnumFactory.java new file mode 100644 index 00000000000..6bd9b2624ca --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MapRelationshipEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3MapRelationshipEnumFactory implements EnumFactory { + + public V3MapRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BT".equals(codeString)) + return V3MapRelationship.BT; + if ("E".equals(codeString)) + return V3MapRelationship.E; + if ("NT".equals(codeString)) + return V3MapRelationship.NT; + throw new IllegalArgumentException("Unknown V3MapRelationship code '"+codeString+"'"); + } + + public String toCode(V3MapRelationship code) { + if (code == V3MapRelationship.BT) + return "BT"; + if (code == V3MapRelationship.E) + return "E"; + if (code == V3MapRelationship.NT) + return "NT"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatus.java new file mode 100644 index 00000000000..513c44205fd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatus.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MaritalStatus { + + /** + * Marriage contract has been declared null and to not have existed + */ + A, + /** + * Marriage contract has been declared dissolved and inactive + */ + D, + /** + * Subject to an Interlocutory Decree. + */ + I, + /** + * Legally Separated + */ + L, + /** + * A current marriage contract is active + */ + M, + /** + * More than 1 current spouse + */ + P, + /** + * No marriage contract has ever been entered + */ + S, + /** + * Person declares that a domestic partner relationship exists. + */ + T, + /** + * Currently not in a marriage contract. + */ + U, + /** + * The spouse has died + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3MaritalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("P".equals(codeString)) + return P; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("U".equals(codeString)) + return U; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3MaritalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case D: return "D"; + case I: return "I"; + case L: return "L"; + case M: return "M"; + case P: return "P"; + case S: return "S"; + case T: return "T"; + case U: return "U"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MaritalStatus"; + } + public String getDefinition() { + switch (this) { + case A: return "Marriage contract has been declared null and to not have existed"; + case D: return "Marriage contract has been declared dissolved and inactive"; + case I: return "Subject to an Interlocutory Decree."; + case L: return "Legally Separated"; + case M: return "A current marriage contract is active"; + case P: return "More than 1 current spouse"; + case S: return "No marriage contract has ever been entered"; + case T: return "Person declares that a domestic partner relationship exists."; + case U: return "Currently not in a marriage contract."; + case W: return "The spouse has died"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Annulled"; + case D: return "Divorced"; + case I: return "Interlocutory"; + case L: return "Legally Separated"; + case M: return "Married"; + case P: return "Polygamous"; + case S: return "Never Married"; + case T: return "Domestic partner"; + case U: return "unmarried"; + case W: return "Widowed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatusEnumFactory.java new file mode 100644 index 00000000000..0bac05be230 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MaritalStatusEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3MaritalStatusEnumFactory implements EnumFactory { + + public V3MaritalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3MaritalStatus.A; + if ("D".equals(codeString)) + return V3MaritalStatus.D; + if ("I".equals(codeString)) + return V3MaritalStatus.I; + if ("L".equals(codeString)) + return V3MaritalStatus.L; + if ("M".equals(codeString)) + return V3MaritalStatus.M; + if ("P".equals(codeString)) + return V3MaritalStatus.P; + if ("S".equals(codeString)) + return V3MaritalStatus.S; + if ("T".equals(codeString)) + return V3MaritalStatus.T; + if ("U".equals(codeString)) + return V3MaritalStatus.U; + if ("W".equals(codeString)) + return V3MaritalStatus.W; + throw new IllegalArgumentException("Unknown V3MaritalStatus code '"+codeString+"'"); + } + + public String toCode(V3MaritalStatus code) { + if (code == V3MaritalStatus.A) + return "A"; + if (code == V3MaritalStatus.D) + return "D"; + if (code == V3MaritalStatus.I) + return "I"; + if (code == V3MaritalStatus.L) + return "L"; + if (code == V3MaritalStatus.M) + return "M"; + if (code == V3MaritalStatus.P) + return "P"; + if (code == V3MaritalStatus.S) + return "S"; + if (code == V3MaritalStatus.T) + return "T"; + if (code == V3MaritalStatus.U) + return "U"; + if (code == V3MaritalStatus.W) + return "W"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriority.java new file mode 100644 index 00000000000..ac0a1c2d98b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MessageWaitingPriority { + + /** + * High priority messages are available + */ + H, + /** + * Low priority messages are available + */ + L, + /** + * Medium priority messages are available + */ + M, + /** + * added to help the parsers + */ + NULL; + public static V3MessageWaitingPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("H".equals(codeString)) + return H; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + throw new FHIRException("Unknown V3MessageWaitingPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case H: return "H"; + case L: return "L"; + case M: return "M"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MessageWaitingPriority"; + } + public String getDefinition() { + switch (this) { + case H: return "High priority messages are available"; + case L: return "Low priority messages are available"; + case M: return "Medium priority messages are available"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case H: return "High"; + case L: return "Low"; + case M: return "Medium"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriorityEnumFactory.java new file mode 100644 index 00000000000..1344bcbeb9a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3MessageWaitingPriorityEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3MessageWaitingPriorityEnumFactory implements EnumFactory { + + public V3MessageWaitingPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("H".equals(codeString)) + return V3MessageWaitingPriority.H; + if ("L".equals(codeString)) + return V3MessageWaitingPriority.L; + if ("M".equals(codeString)) + return V3MessageWaitingPriority.M; + throw new IllegalArgumentException("Unknown V3MessageWaitingPriority code '"+codeString+"'"); + } + + public String toCode(V3MessageWaitingPriority code) { + if (code == V3MessageWaitingPriority.H) + return "H"; + if (code == V3MessageWaitingPriority.L) + return "L"; + if (code == V3MessageWaitingPriority.M) + return "M"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicator.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicator.java new file mode 100644 index 00000000000..1d0b51ca2e6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicator.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ModifyIndicator { + + /** + * Modified subscription to a query server. + */ + M, + /** + * New subscription to a query server. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3ModifyIndicator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3ModifyIndicator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case M: return "M"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ModifyIndicator"; + } + public String getDefinition() { + switch (this) { + case M: return "Modified subscription to a query server."; + case N: return "New subscription to a query server."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case M: return "Modified subscription"; + case N: return "New subscription"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicatorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicatorEnumFactory.java new file mode 100644 index 00000000000..f68566dd828 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicatorEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ModifyIndicatorEnumFactory implements EnumFactory { + + public V3ModifyIndicator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return V3ModifyIndicator.M; + if ("N".equals(codeString)) + return V3ModifyIndicator.N; + throw new IllegalArgumentException("Unknown V3ModifyIndicator code '"+codeString+"'"); + } + + public String toCode(V3ModifyIndicator code) { + if (code == V3ModifyIndicator.M) + return "M"; + if (code == V3ModifyIndicator.N) + return "N"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavor.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavor.java new file mode 100644 index 00000000000..375999fee92 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavor.java @@ -0,0 +1,244 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3NullFlavor { + + /** + * Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value. + */ + NI, + /** + * Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable. + */ + INV, + /** + * Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression . + */ + DER, + /** + * Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g., concept not provided by required code system). + + + Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc. + + With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE. + */ + OTH, + /** + * Negative infinity of numbers. + */ + NINF, + /** + * Positive infinity of numbers. + */ + PINF, + /** + * Description: The actual value has not yet been encoded within the approved value domain. + + + Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM. + + + Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted. + + Data type properties such as original text and translations may be present when this null flavor is included. + */ + UNC, + /** + * There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information. + + Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail. + */ + MSK, + /** + * Known to have no proper value (e.g., last menstrual period for a male). + */ + NA, + /** + * Description:A proper value is applicable, but not known. + + + Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless: + + + Those properties themselves directly translate to a semantic of "unknown". (E.g. a local code sent as a translation that conveys 'unknown') + Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of "H" and a URL prefix of "tel:" to convey that it is the home phone number that is unknown.) + */ + UNK, + /** + * Information was sought but not found (e.g., patient was asked but didn't know) + */ + ASKU, + /** + * Information is not available at this time but it is expected that it will be available later. + */ + NAV, + /** + * This information has not been sought (e.g., patient was not asked) + */ + NASK, + /** + * Information is not available at this time (with no expectation regarding whether it will or will not be available in the future). + */ + NAVU, + /** + * Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water. + */ + QS, + /** + * The content is greater than zero, but too small to be quantified. + */ + TRC, + /** + * Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. + */ + NP, + /** + * added to help the parsers + */ + NULL; + public static V3NullFlavor fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NI".equals(codeString)) + return NI; + if ("INV".equals(codeString)) + return INV; + if ("DER".equals(codeString)) + return DER; + if ("OTH".equals(codeString)) + return OTH; + if ("NINF".equals(codeString)) + return NINF; + if ("PINF".equals(codeString)) + return PINF; + if ("UNC".equals(codeString)) + return UNC; + if ("MSK".equals(codeString)) + return MSK; + if ("NA".equals(codeString)) + return NA; + if ("UNK".equals(codeString)) + return UNK; + if ("ASKU".equals(codeString)) + return ASKU; + if ("NAV".equals(codeString)) + return NAV; + if ("NASK".equals(codeString)) + return NASK; + if ("NAVU".equals(codeString)) + return NAVU; + if ("QS".equals(codeString)) + return QS; + if ("TRC".equals(codeString)) + return TRC; + if ("NP".equals(codeString)) + return NP; + throw new FHIRException("Unknown V3NullFlavor code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NI: return "NI"; + case INV: return "INV"; + case DER: return "DER"; + case OTH: return "OTH"; + case NINF: return "NINF"; + case PINF: return "PINF"; + case UNC: return "UNC"; + case MSK: return "MSK"; + case NA: return "NA"; + case UNK: return "UNK"; + case ASKU: return "ASKU"; + case NAV: return "NAV"; + case NASK: return "NASK"; + case NAVU: return "NAVU"; + case QS: return "QS"; + case TRC: return "TRC"; + case NP: return "NP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/NullFlavor"; + } + public String getDefinition() { + switch (this) { + case NI: return "Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value."; + case INV: return "Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable."; + case DER: return "Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression ."; + case OTH: return "Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g., concept not provided by required code system).\r\n\n \n Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc.\r\n\n With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE."; + case NINF: return "Negative infinity of numbers."; + case PINF: return "Positive infinity of numbers."; + case UNC: return "Description: The actual value has not yet been encoded within the approved value domain.\r\n\n \n Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM.\r\n\n \n Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted.\r\n\n Data type properties such as original text and translations may be present when this null flavor is included."; + case MSK: return "There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information.\r\n\n Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail."; + case NA: return "Known to have no proper value (e.g., last menstrual period for a male)."; + case UNK: return "Description:A proper value is applicable, but not known.\r\n\n \n Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless:\r\n\n \n Those properties themselves directly translate to a semantic of \"unknown\". (E.g. a local code sent as a translation that conveys 'unknown')\n Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of \"H\" and a URL prefix of \"tel:\" to convey that it is the home phone number that is unknown.)"; + case ASKU: return "Information was sought but not found (e.g., patient was asked but didn't know)"; + case NAV: return "Information is not available at this time but it is expected that it will be available later."; + case NASK: return "This information has not been sought (e.g., patient was not asked)"; + case NAVU: return "Information is not available at this time (with no expectation regarding whether it will or will not be available in the future)."; + case QS: return "Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water."; + case TRC: return "The content is greater than zero, but too small to be quantified."; + case NP: return "Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NI: return "NoInformation"; + case INV: return "invalid"; + case DER: return "derived"; + case OTH: return "other"; + case NINF: return "negative infinity"; + case PINF: return "positive infinity"; + case UNC: return "un-encoded"; + case MSK: return "masked"; + case NA: return "not applicable"; + case UNK: return "unknown"; + case ASKU: return "asked but unknown"; + case NAV: return "temporarily unavailable"; + case NASK: return "not asked"; + case NAVU: return "Not available"; + case QS: return "Sufficient Quantity"; + case TRC: return "trace"; + case NP: return "not present"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavorEnumFactory.java new file mode 100644 index 00000000000..e4289a878b0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3NullFlavorEnumFactory.java @@ -0,0 +1,119 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3NullFlavorEnumFactory implements EnumFactory { + + public V3NullFlavor fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NI".equals(codeString)) + return V3NullFlavor.NI; + if ("INV".equals(codeString)) + return V3NullFlavor.INV; + if ("DER".equals(codeString)) + return V3NullFlavor.DER; + if ("OTH".equals(codeString)) + return V3NullFlavor.OTH; + if ("NINF".equals(codeString)) + return V3NullFlavor.NINF; + if ("PINF".equals(codeString)) + return V3NullFlavor.PINF; + if ("UNC".equals(codeString)) + return V3NullFlavor.UNC; + if ("MSK".equals(codeString)) + return V3NullFlavor.MSK; + if ("NA".equals(codeString)) + return V3NullFlavor.NA; + if ("UNK".equals(codeString)) + return V3NullFlavor.UNK; + if ("ASKU".equals(codeString)) + return V3NullFlavor.ASKU; + if ("NAV".equals(codeString)) + return V3NullFlavor.NAV; + if ("NASK".equals(codeString)) + return V3NullFlavor.NASK; + if ("NAVU".equals(codeString)) + return V3NullFlavor.NAVU; + if ("QS".equals(codeString)) + return V3NullFlavor.QS; + if ("TRC".equals(codeString)) + return V3NullFlavor.TRC; + if ("NP".equals(codeString)) + return V3NullFlavor.NP; + throw new IllegalArgumentException("Unknown V3NullFlavor code '"+codeString+"'"); + } + + public String toCode(V3NullFlavor code) { + if (code == V3NullFlavor.NI) + return "NI"; + if (code == V3NullFlavor.INV) + return "INV"; + if (code == V3NullFlavor.DER) + return "DER"; + if (code == V3NullFlavor.OTH) + return "OTH"; + if (code == V3NullFlavor.NINF) + return "NINF"; + if (code == V3NullFlavor.PINF) + return "PINF"; + if (code == V3NullFlavor.UNC) + return "UNC"; + if (code == V3NullFlavor.MSK) + return "MSK"; + if (code == V3NullFlavor.NA) + return "NA"; + if (code == V3NullFlavor.UNK) + return "UNK"; + if (code == V3NullFlavor.ASKU) + return "ASKU"; + if (code == V3NullFlavor.NAV) + return "NAV"; + if (code == V3NullFlavor.NASK) + return "NASK"; + if (code == V3NullFlavor.NAVU) + return "NAVU"; + if (code == V3NullFlavor.QS) + return "QS"; + if (code == V3NullFlavor.TRC) + return "TRC"; + if (code == V3NullFlavor.NP) + return "NP"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretation.java new file mode 100644 index 00000000000..c16a59944d8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretation.java @@ -0,0 +1,663 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationInterpretation { + + /** + * Codes that specify interpretation of genetic analysis, such as "positive", "negative", "carrier", "responsive", etc. + */ + _GENETICOBSERVATIONINTERPRETATION, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + */ + CAR, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This code is currently the same string as the print name for this concept and is inconsistent with the conventions being used for the other codes in the coding system, as it is a full word with initial capitalization, rather than an all upper case mnemonic. The recommendation from OO is to deprecate the code "Carrier" and to add "CAR" as the new active code representation for this concept. + */ + CARRIER, + /** + * Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed. + */ + _OBSERVATIONINTERPRETATIONCHANGE, + /** + * The current result or observation value has improved compared to the previous result or observation value (the change is significant as defined in the respective test procedure). + + [Note: This can be applied to quantitative or qualitative observations.] + */ + B, + /** + * The current result has decreased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure). + */ + D, + /** + * The current result has increased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure). + */ + U, + /** + * The current result or observation value has degraded compared to the previous result or observation value (the change is significant as defined in the respective test procedure). + + [Note: This can be applied to quantitative or qualitative observations.] + */ + W, + /** + * Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity. + */ + _OBSERVATIONINTERPRETATIONEXCEPTIONS, + /** + * The result is below the minimum detection limit (the test procedure or equipment is the limiting factor). + + Synonyms: Below analytical limit, low off scale. + */ + LESS_THAN, + /** + * The result is above the maximum quantifiable limit (the test procedure or equipment is the limiting factor). + + Synonyms: Above analytical limit, high off scale. + */ + GREATER_THAN, + /** + * A valid result cannot be obtained for the specified component / analyte due to the presence of anti-complementary substances in the sample. + */ + AC, + /** + * There is insufficient evidence that the species in question is a good target for therapy with the drug. A categorical interpretation is not possible. + + [Note: A MIC with "IE" and/or a comment may be reported (without an accompanying S, I or R-categorization).] + */ + IE, + /** + * A result cannot be considered valid for the specified component / analyte or organism due to failure in the quality control testing component. + */ + QCF, + /** + * A valid result cannot be obtained for the specified organism or cell line due to the presence of cytotoxic substances in the sample or culture. + */ + TOX, + /** + * Interpretation of normality or degree of abnormality (including critical or "alert" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed. + */ + _OBSERVATIONINTERPRETATIONNORMALITY, + /** + * The result or observation value is outside the reference range or expected norm (as defined for the respective test procedure). + + [Note: Typically applies to non-numeric results.] + */ + A, + /** + * The result or observation value is outside a reference range or expected norm at a level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + [Note: Typically applies to non-numeric results. Analogous to critical/panic limits for numeric results.] + */ + AA, + /** + * The result for a quantitative observation is above a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + Synonym: Above upper panic limits. + */ + HH, + /** + * The result for a quantitative observation is below a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + Synonym: Below lower panic limits. + */ + LL, + /** + * The result for a quantitative observation is above the upper limit of the reference range (as defined for the respective test procedure). + + Synonym: Above high normal + */ + H, + /** + * A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'H' and 'HH'.] + + + Deprecation Comment: The code 'H>' is being deprecated in order to align with the use of the code 'HU' for "Very high" in V2 Table 0078 "Interpretation Codes". + + [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead. + */ + H_, + /** + * A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician. + */ + HU, + /** + * The result for a quantitative observation is below the lower limit of the reference range (as defined for the respective test procedure). + + Synonym: Below low normal + */ + L, + /** + * A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'L' and 'LL'.] + + + Deprecation Comment: The code 'L<' is being deprecated in order to align with the use of the code 'LU' for "Very low" in V2 Table 0078 "Interpretation Codes". + + [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead. + */ + L_, + /** + * A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician. + */ + LU, + /** + * The result or observation value is within the reference range or expected norm (as defined for the respective test procedure). + + [Note: Applies to numeric or non-numeric results.] + */ + N, + /** + * Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed. + */ + _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY, + /** + * Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with uncertain therapeutic effect. Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as intermediate by applying the appropriate breakpoints in a defined phenotypic test system.] + + [Note 2: This class of susceptibility implies that an infection due to the isolate can be appropriately treated in body sites where the drugs are physiologically concentrated or when a high dosage of drug can be used.] + + [Note 3: This class also indicates a "buffer zone," to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.] + + [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + I, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012). + */ + MS, + /** + * A category used for isolates for which only a susceptible interpretive criterion has been designated because of the absence or rare occurrence of resistant strains. Isolates that have MICs above or zone diameters below the value indicated for the susceptible breakpoint should be reported as non-susceptible. + + NOTE 1: An isolate that is interpreted as non-susceptible does not necessarily mean that the isolate has a resistance mechanism. It is possible that isolates with MICs above the susceptible breakpoint that lack resistance mechanisms may be encountered within the wild-type distribution subsequent to the time the susceptible-only breakpoint is set. + + NOTE 2: For strains yielding results in the "nonsusceptible" category, organism identification and antimicrobial susceptibility test results should be confirmed. + + Synonym: decreased susceptibility. + */ + NS, + /** + * Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic failure. +Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.] + + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + R, + /** + * A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. + + + Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside. + + + Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found. + */ + SYNR, + /** + * Bacterial strain inhibited by in vitro concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic success. +Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.] + + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + S, + /** + * A category that includes isolates with antimicrobial agent minimum inhibitory concentrations (MICs) that approach usually attainable blood and tissue levels and for which response rates may be lower than for susceptible isolates. + + Reference: CLSI document M44-A2 2009 "Method for antifungal disk diffusion susceptibility testing of yeasts; approved guideline - second edition" - page 2. + */ + SDD, + /** + * A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. + + + Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside. + + + Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found. + */ + SYNS, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012). + */ + VS, + /** + * The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported. + + + Example: A positive result on a Hepatitis screening test. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. +These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. +Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + EX, + /** + * The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported. + + + Example: A positive result on a Hepatitis screening test. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + HX, + /** + * The numeric observation/test result is interpreted as being below the low threshold value for a particular protocol within which the result is being reported. + + Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3 + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + LX, + /** + * Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the "meaning" of the quantitative value for the same observation. + */ + OBSERVATIONINTERPRETATIONDETECTION, + /** + * The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure. + + + Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic structures, then "indeterminate" (i.e. "cannot be determined") is the appropriate response, not "equivocal". + */ + IND, + /** + * The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria. + */ + E, + /** + * An absence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure. + + [Note: Negative does not necessarily imply the complete absence of the specified item.] + */ + NEG, + /** + * The presence of the specified component / analyte, organism or clinical sign could not be determined within the limit of detection of the performed test or procedure. + */ + ND, + /** + * A presence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure. + */ + POS, + /** + * The measurement of the specified component / analyte, organism or clinical sign above the limit of detection of the performed test or procedure. + */ + DET, + /** + * Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed. + */ + OBSERVATIONINTERPRETATIONEXPECTATION, + /** + * This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Expected" (e.g., presence of drugs in a patient that is taking prescription medication for pain management). + */ + EXP, + /** + * This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Unexpected" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management). + */ + UNE, + /** + * Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test. + */ + REACTIVITYOBSERVATIONINTERPRETATION, + /** + * An absence finding used to indicate that the specified component / analyte did not react measurably with the reagent. + */ + NR, + /** + * A presence finding used to indicate that the specified component / analyte reacted with the reagent above the reliably measurable limit of the performed test. + */ + RR, + /** + * A weighted presence finding used to indicate that the specified component / analyte reacted with the reagent, but below the reliably measurable limit of the performed test. + */ + WR, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationInterpretation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneticObservationInterpretation".equals(codeString)) + return _GENETICOBSERVATIONINTERPRETATION; + if ("CAR".equals(codeString)) + return CAR; + if ("Carrier".equals(codeString)) + return CARRIER; + if ("_ObservationInterpretationChange".equals(codeString)) + return _OBSERVATIONINTERPRETATIONCHANGE; + if ("B".equals(codeString)) + return B; + if ("D".equals(codeString)) + return D; + if ("U".equals(codeString)) + return U; + if ("W".equals(codeString)) + return W; + if ("_ObservationInterpretationExceptions".equals(codeString)) + return _OBSERVATIONINTERPRETATIONEXCEPTIONS; + if ("<".equals(codeString)) + return LESS_THAN; + if (">".equals(codeString)) + return GREATER_THAN; + if ("AC".equals(codeString)) + return AC; + if ("IE".equals(codeString)) + return IE; + if ("QCF".equals(codeString)) + return QCF; + if ("TOX".equals(codeString)) + return TOX; + if ("_ObservationInterpretationNormality".equals(codeString)) + return _OBSERVATIONINTERPRETATIONNORMALITY; + if ("A".equals(codeString)) + return A; + if ("AA".equals(codeString)) + return AA; + if ("HH".equals(codeString)) + return HH; + if ("LL".equals(codeString)) + return LL; + if ("H".equals(codeString)) + return H; + if ("H>".equals(codeString)) + return H_; + if ("HU".equals(codeString)) + return HU; + if ("L".equals(codeString)) + return L; + if ("L<".equals(codeString)) + return L_; + if ("LU".equals(codeString)) + return LU; + if ("N".equals(codeString)) + return N; + if ("_ObservationInterpretationSusceptibility".equals(codeString)) + return _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY; + if ("I".equals(codeString)) + return I; + if ("MS".equals(codeString)) + return MS; + if ("NS".equals(codeString)) + return NS; + if ("R".equals(codeString)) + return R; + if ("SYN-R".equals(codeString)) + return SYNR; + if ("S".equals(codeString)) + return S; + if ("SDD".equals(codeString)) + return SDD; + if ("SYN-S".equals(codeString)) + return SYNS; + if ("VS".equals(codeString)) + return VS; + if ("EX".equals(codeString)) + return EX; + if ("HX".equals(codeString)) + return HX; + if ("LX".equals(codeString)) + return LX; + if ("ObservationInterpretationDetection".equals(codeString)) + return OBSERVATIONINTERPRETATIONDETECTION; + if ("IND".equals(codeString)) + return IND; + if ("E".equals(codeString)) + return E; + if ("NEG".equals(codeString)) + return NEG; + if ("ND".equals(codeString)) + return ND; + if ("POS".equals(codeString)) + return POS; + if ("DET".equals(codeString)) + return DET; + if ("ObservationInterpretationExpectation".equals(codeString)) + return OBSERVATIONINTERPRETATIONEXPECTATION; + if ("EXP".equals(codeString)) + return EXP; + if ("UNE".equals(codeString)) + return UNE; + if ("ReactivityObservationInterpretation".equals(codeString)) + return REACTIVITYOBSERVATIONINTERPRETATION; + if ("NR".equals(codeString)) + return NR; + if ("RR".equals(codeString)) + return RR; + if ("WR".equals(codeString)) + return WR; + throw new FHIRException("Unknown V3ObservationInterpretation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "_GeneticObservationInterpretation"; + case CAR: return "CAR"; + case CARRIER: return "Carrier"; + case _OBSERVATIONINTERPRETATIONCHANGE: return "_ObservationInterpretationChange"; + case B: return "B"; + case D: return "D"; + case U: return "U"; + case W: return "W"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "_ObservationInterpretationExceptions"; + case LESS_THAN: return "<"; + case GREATER_THAN: return ">"; + case AC: return "AC"; + case IE: return "IE"; + case QCF: return "QCF"; + case TOX: return "TOX"; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "_ObservationInterpretationNormality"; + case A: return "A"; + case AA: return "AA"; + case HH: return "HH"; + case LL: return "LL"; + case H: return "H"; + case H_: return "H>"; + case HU: return "HU"; + case L: return "L"; + case L_: return "L<"; + case LU: return "LU"; + case N: return "N"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "_ObservationInterpretationSusceptibility"; + case I: return "I"; + case MS: return "MS"; + case NS: return "NS"; + case R: return "R"; + case SYNR: return "SYN-R"; + case S: return "S"; + case SDD: return "SDD"; + case SYNS: return "SYN-S"; + case VS: return "VS"; + case EX: return "EX"; + case HX: return "HX"; + case LX: return "LX"; + case OBSERVATIONINTERPRETATIONDETECTION: return "ObservationInterpretationDetection"; + case IND: return "IND"; + case E: return "E"; + case NEG: return "NEG"; + case ND: return "ND"; + case POS: return "POS"; + case DET: return "DET"; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "ObservationInterpretationExpectation"; + case EXP: return "EXP"; + case UNE: return "UNE"; + case REACTIVITYOBSERVATIONINTERPRETATION: return "ReactivityObservationInterpretation"; + case NR: return "NR"; + case RR: return "RR"; + case WR: return "WR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationInterpretation"; + } + public String getDefinition() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "Codes that specify interpretation of genetic analysis, such as \"positive\", \"negative\", \"carrier\", \"responsive\", etc."; + case CAR: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder."; + case CARRIER: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This code is currently the same string as the print name for this concept and is inconsistent with the conventions being used for the other codes in the coding system, as it is a full word with initial capitalization, rather than an all upper case mnemonic. The recommendation from OO is to deprecate the code \"Carrier\" and to add \"CAR\" as the new active code representation for this concept."; + case _OBSERVATIONINTERPRETATIONCHANGE: return "Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed."; + case B: return "The current result or observation value has improved compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]"; + case D: return "The current result has decreased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure)."; + case U: return "The current result has increased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure)."; + case W: return "The current result or observation value has degraded compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity."; + case LESS_THAN: return "The result is below the minimum detection limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Below analytical limit, low off scale."; + case GREATER_THAN: return "The result is above the maximum quantifiable limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Above analytical limit, high off scale."; + case AC: return "A valid result cannot be obtained for the specified component / analyte due to the presence of anti-complementary substances in the sample."; + case IE: return "There is insufficient evidence that the species in question is a good target for therapy with the drug. A categorical interpretation is not possible.\r\n\n [Note: A MIC with \"IE\" and/or a comment may be reported (without an accompanying S, I or R-categorization).]"; + case QCF: return "A result cannot be considered valid for the specified component / analyte or organism due to failure in the quality control testing component."; + case TOX: return "A valid result cannot be obtained for the specified organism or cell line due to the presence of cytotoxic substances in the sample or culture."; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "Interpretation of normality or degree of abnormality (including critical or \"alert\" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed."; + case A: return "The result or observation value is outside the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results.]"; + case AA: return "The result or observation value is outside a reference range or expected norm at a level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results. Analogous to critical/panic limits for numeric results.]"; + case HH: return "The result for a quantitative observation is above a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Above upper panic limits."; + case LL: return "The result for a quantitative observation is below a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Below lower panic limits."; + case H: return "The result for a quantitative observation is above the upper limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Above high normal"; + case H_: return "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'H' and 'HH'.]\r\n\n \n Deprecation Comment: The code 'H>' is being deprecated in order to align with the use of the code 'HU' for \"Very high\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead."; + case HU: return "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician."; + case L: return "The result for a quantitative observation is below the lower limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Below low normal"; + case L_: return "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'L' and 'LL'.]\r\n\n \n Deprecation Comment: The code 'L<' is being deprecated in order to align with the use of the code 'LU' for \"Very low\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead."; + case LU: return "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician."; + case N: return "The result or observation value is within the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Applies to numeric or non-numeric results.]"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed."; + case I: return "Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with uncertain therapeutic effect. Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as intermediate by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This class of susceptibility implies that an infection due to the isolate can be appropriately treated in body sites where the drugs are physiologically concentrated or when a high dosage of drug can be used.]\r\n\n [Note 3: This class also indicates a \"buffer zone,\" to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.]\r\n\n [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case MS: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012)."; + case NS: return "A category used for isolates for which only a susceptible interpretive criterion has been designated because of the absence or rare occurrence of resistant strains. Isolates that have MICs above or zone diameters below the value indicated for the susceptible breakpoint should be reported as non-susceptible.\r\n\n NOTE 1: An isolate that is interpreted as non-susceptible does not necessarily mean that the isolate has a resistance mechanism. It is possible that isolates with MICs above the susceptible breakpoint that lack resistance mechanisms may be encountered within the wild-type distribution subsequent to the time the susceptible-only breakpoint is set. \r\n\n NOTE 2: For strains yielding results in the \"nonsusceptible\" category, organism identification and antimicrobial susceptibility test results should be confirmed.\r\n\n Synonym: decreased susceptibility."; + case R: return "Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic failure.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) \nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case SYNR: return "A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found."; + case S: return "Bacterial strain inhibited by in vitro concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic success.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nSynonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case SDD: return "A category that includes isolates with antimicrobial agent minimum inhibitory concentrations (MICs) that approach usually attainable blood and tissue levels and for which response rates may be lower than for susceptible isolates.\r\n\n Reference: CLSI document M44-A2 2009 \"Method for antifungal disk diffusion susceptibility testing of yeasts; approved guideline - second edition\" - page 2."; + case SYNS: return "A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found."; + case VS: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012)."; + case EX: return "The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects.\nThese concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes.\nMembers of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case HX: return "The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case LX: return "The numeric observation/test result is interpreted as being below the low threshold value for a particular protocol within which the result is being reported.\r\n\n Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case OBSERVATIONINTERPRETATIONDETECTION: return "Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the \"meaning\" of the quantitative value for the same observation."; + case IND: return "The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure.\r\n\n \n Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic structures, then \"indeterminate\" (i.e. \"cannot be determined\") is the appropriate response, not \"equivocal\"."; + case E: return "The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria."; + case NEG: return "An absence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure.\r\n\n [Note: Negative does not necessarily imply the complete absence of the specified item.]"; + case ND: return "The presence of the specified component / analyte, organism or clinical sign could not be determined within the limit of detection of the performed test or procedure."; + case POS: return "A presence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure."; + case DET: return "The measurement of the specified component / analyte, organism or clinical sign above the limit of detection of the performed test or procedure."; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed."; + case EXP: return "This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be \"Expected\" (e.g., presence of drugs in a patient that is taking prescription medication for pain management)."; + case UNE: return "This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be \"Unexpected\" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management)."; + case REACTIVITYOBSERVATIONINTERPRETATION: return "Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test."; + case NR: return "An absence finding used to indicate that the specified component / analyte did not react measurably with the reagent."; + case RR: return "A presence finding used to indicate that the specified component / analyte reacted with the reagent above the reliably measurable limit of the performed test."; + case WR: return "A weighted presence finding used to indicate that the specified component / analyte reacted with the reagent, but below the reliably measurable limit of the performed test."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "GeneticObservationInterpretation"; + case CAR: return "Carrier"; + case CARRIER: return "Carrier"; + case _OBSERVATIONINTERPRETATIONCHANGE: return "ObservationInterpretationChange"; + case B: return "Better"; + case D: return "Significant change down"; + case U: return "Significant change up"; + case W: return "Worse"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "ObservationInterpretationExceptions"; + case LESS_THAN: return "Off scale low"; + case GREATER_THAN: return "Off scale high"; + case AC: return "Anti-complementary substances present"; + case IE: return "Insufficient evidence"; + case QCF: return "Quality control failure"; + case TOX: return "Cytotoxic substance present"; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "ObservationInterpretationNormality"; + case A: return "Abnormal"; + case AA: return "Critical abnormal"; + case HH: return "Critical high"; + case LL: return "Critical low"; + case H: return "High"; + case H_: return "Significantly high"; + case HU: return "Significantly high"; + case L: return "Low"; + case L_: return "Significantly low"; + case LU: return "Significantly low"; + case N: return "Normal"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "ObservationInterpretationSusceptibility"; + case I: return "Intermediate"; + case MS: return "moderately susceptible"; + case NS: return "Non-susceptible"; + case R: return "Resistant"; + case SYNR: return "Synergy - resistant"; + case S: return "Susceptible"; + case SDD: return "Susceptible-dose dependent"; + case SYNS: return "Synergy - susceptible"; + case VS: return "very susceptible"; + case EX: return "outside threshold"; + case HX: return "above high threshold"; + case LX: return "below low threshold"; + case OBSERVATIONINTERPRETATIONDETECTION: return "ObservationInterpretationDetection"; + case IND: return "Indeterminate"; + case E: return "Equivocal"; + case NEG: return "Negative"; + case ND: return "Not detected"; + case POS: return "Positive"; + case DET: return "Detected"; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "ObservationInterpretationExpectation"; + case EXP: return "Expected"; + case UNE: return "Unexpected"; + case REACTIVITYOBSERVATIONINTERPRETATION: return "ReactivityObservationInterpretation"; + case NR: return "Non-reactive"; + case RR: return "Reactive"; + case WR: return "Weakly reactive"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretationEnumFactory.java new file mode 100644 index 00000000000..8514f74a667 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationInterpretationEnumFactory.java @@ -0,0 +1,267 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ObservationInterpretationEnumFactory implements EnumFactory { + + public V3ObservationInterpretation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneticObservationInterpretation".equals(codeString)) + return V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION; + if ("CAR".equals(codeString)) + return V3ObservationInterpretation.CAR; + if ("Carrier".equals(codeString)) + return V3ObservationInterpretation.CARRIER; + if ("_ObservationInterpretationChange".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE; + if ("B".equals(codeString)) + return V3ObservationInterpretation.B; + if ("D".equals(codeString)) + return V3ObservationInterpretation.D; + if ("U".equals(codeString)) + return V3ObservationInterpretation.U; + if ("W".equals(codeString)) + return V3ObservationInterpretation.W; + if ("_ObservationInterpretationExceptions".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS; + if ("<".equals(codeString)) + return V3ObservationInterpretation.LESS_THAN; + if (">".equals(codeString)) + return V3ObservationInterpretation.GREATER_THAN; + if ("AC".equals(codeString)) + return V3ObservationInterpretation.AC; + if ("IE".equals(codeString)) + return V3ObservationInterpretation.IE; + if ("QCF".equals(codeString)) + return V3ObservationInterpretation.QCF; + if ("TOX".equals(codeString)) + return V3ObservationInterpretation.TOX; + if ("_ObservationInterpretationNormality".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY; + if ("A".equals(codeString)) + return V3ObservationInterpretation.A; + if ("AA".equals(codeString)) + return V3ObservationInterpretation.AA; + if ("HH".equals(codeString)) + return V3ObservationInterpretation.HH; + if ("LL".equals(codeString)) + return V3ObservationInterpretation.LL; + if ("H".equals(codeString)) + return V3ObservationInterpretation.H; + if ("H>".equals(codeString)) + return V3ObservationInterpretation.H_; + if ("HU".equals(codeString)) + return V3ObservationInterpretation.HU; + if ("L".equals(codeString)) + return V3ObservationInterpretation.L; + if ("L<".equals(codeString)) + return V3ObservationInterpretation.L_; + if ("LU".equals(codeString)) + return V3ObservationInterpretation.LU; + if ("N".equals(codeString)) + return V3ObservationInterpretation.N; + if ("_ObservationInterpretationSusceptibility".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY; + if ("I".equals(codeString)) + return V3ObservationInterpretation.I; + if ("MS".equals(codeString)) + return V3ObservationInterpretation.MS; + if ("NS".equals(codeString)) + return V3ObservationInterpretation.NS; + if ("R".equals(codeString)) + return V3ObservationInterpretation.R; + if ("SYN-R".equals(codeString)) + return V3ObservationInterpretation.SYNR; + if ("S".equals(codeString)) + return V3ObservationInterpretation.S; + if ("SDD".equals(codeString)) + return V3ObservationInterpretation.SDD; + if ("SYN-S".equals(codeString)) + return V3ObservationInterpretation.SYNS; + if ("VS".equals(codeString)) + return V3ObservationInterpretation.VS; + if ("EX".equals(codeString)) + return V3ObservationInterpretation.EX; + if ("HX".equals(codeString)) + return V3ObservationInterpretation.HX; + if ("LX".equals(codeString)) + return V3ObservationInterpretation.LX; + if ("ObservationInterpretationDetection".equals(codeString)) + return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION; + if ("IND".equals(codeString)) + return V3ObservationInterpretation.IND; + if ("E".equals(codeString)) + return V3ObservationInterpretation.E; + if ("NEG".equals(codeString)) + return V3ObservationInterpretation.NEG; + if ("ND".equals(codeString)) + return V3ObservationInterpretation.ND; + if ("POS".equals(codeString)) + return V3ObservationInterpretation.POS; + if ("DET".equals(codeString)) + return V3ObservationInterpretation.DET; + if ("ObservationInterpretationExpectation".equals(codeString)) + return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION; + if ("EXP".equals(codeString)) + return V3ObservationInterpretation.EXP; + if ("UNE".equals(codeString)) + return V3ObservationInterpretation.UNE; + if ("ReactivityObservationInterpretation".equals(codeString)) + return V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION; + if ("NR".equals(codeString)) + return V3ObservationInterpretation.NR; + if ("RR".equals(codeString)) + return V3ObservationInterpretation.RR; + if ("WR".equals(codeString)) + return V3ObservationInterpretation.WR; + throw new IllegalArgumentException("Unknown V3ObservationInterpretation code '"+codeString+"'"); + } + + public String toCode(V3ObservationInterpretation code) { + if (code == V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION) + return "_GeneticObservationInterpretation"; + if (code == V3ObservationInterpretation.CAR) + return "CAR"; + if (code == V3ObservationInterpretation.CARRIER) + return "Carrier"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE) + return "_ObservationInterpretationChange"; + if (code == V3ObservationInterpretation.B) + return "B"; + if (code == V3ObservationInterpretation.D) + return "D"; + if (code == V3ObservationInterpretation.U) + return "U"; + if (code == V3ObservationInterpretation.W) + return "W"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS) + return "_ObservationInterpretationExceptions"; + if (code == V3ObservationInterpretation.LESS_THAN) + return "<"; + if (code == V3ObservationInterpretation.GREATER_THAN) + return ">"; + if (code == V3ObservationInterpretation.AC) + return "AC"; + if (code == V3ObservationInterpretation.IE) + return "IE"; + if (code == V3ObservationInterpretation.QCF) + return "QCF"; + if (code == V3ObservationInterpretation.TOX) + return "TOX"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY) + return "_ObservationInterpretationNormality"; + if (code == V3ObservationInterpretation.A) + return "A"; + if (code == V3ObservationInterpretation.AA) + return "AA"; + if (code == V3ObservationInterpretation.HH) + return "HH"; + if (code == V3ObservationInterpretation.LL) + return "LL"; + if (code == V3ObservationInterpretation.H) + return "H"; + if (code == V3ObservationInterpretation.H_) + return "H>"; + if (code == V3ObservationInterpretation.HU) + return "HU"; + if (code == V3ObservationInterpretation.L) + return "L"; + if (code == V3ObservationInterpretation.L_) + return "L<"; + if (code == V3ObservationInterpretation.LU) + return "LU"; + if (code == V3ObservationInterpretation.N) + return "N"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY) + return "_ObservationInterpretationSusceptibility"; + if (code == V3ObservationInterpretation.I) + return "I"; + if (code == V3ObservationInterpretation.MS) + return "MS"; + if (code == V3ObservationInterpretation.NS) + return "NS"; + if (code == V3ObservationInterpretation.R) + return "R"; + if (code == V3ObservationInterpretation.SYNR) + return "SYN-R"; + if (code == V3ObservationInterpretation.S) + return "S"; + if (code == V3ObservationInterpretation.SDD) + return "SDD"; + if (code == V3ObservationInterpretation.SYNS) + return "SYN-S"; + if (code == V3ObservationInterpretation.VS) + return "VS"; + if (code == V3ObservationInterpretation.EX) + return "EX"; + if (code == V3ObservationInterpretation.HX) + return "HX"; + if (code == V3ObservationInterpretation.LX) + return "LX"; + if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION) + return "ObservationInterpretationDetection"; + if (code == V3ObservationInterpretation.IND) + return "IND"; + if (code == V3ObservationInterpretation.E) + return "E"; + if (code == V3ObservationInterpretation.NEG) + return "NEG"; + if (code == V3ObservationInterpretation.ND) + return "ND"; + if (code == V3ObservationInterpretation.POS) + return "POS"; + if (code == V3ObservationInterpretation.DET) + return "DET"; + if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION) + return "ObservationInterpretationExpectation"; + if (code == V3ObservationInterpretation.EXP) + return "EXP"; + if (code == V3ObservationInterpretation.UNE) + return "UNE"; + if (code == V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION) + return "ReactivityObservationInterpretation"; + if (code == V3ObservationInterpretation.NR) + return "NR"; + if (code == V3ObservationInterpretation.RR) + return "RR"; + if (code == V3ObservationInterpretation.WR) + return "WR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethod.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethod.java new file mode 100644 index 00000000000..4359e973f71 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethod.java @@ -0,0 +1,2821 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationMethod { + + /** + * Provides codes for decision methods, initially for assessing the causality of events. + */ + _DECISIONOBSERVATIONMETHOD, + /** + * Reaching a decision through the application of an algorithm designed to weigh the different factors involved. + */ + ALGM, + /** + * Reaching a decision through the use of Bayesian statistical analysis. + */ + BYCL, + /** + * Reaching a decision by consideration of the totality of factors involved in order to reach a judgement. + */ + GINT, + /** + * A code that provides additional detail about the means or technique used to ascertain the genetic analysis. Example, PCR, Micro Array + */ + _GENETICOBSERVATIONMETHOD, + /** + * Description: Polymerase Chain Reaction + */ + PCR, + /** + * Provides additional detail about the aggregation methods used to compute the aggregated values for an observation. This is an abstract code. + */ + _OBSERVATIONMETHODAGGREGATE, + /** + * Average of non-null values in the referenced set of values + */ + AVERAGE, + /** + * Count of non-null values in the referenced set of values + */ + COUNT, + /** + * Largest of all non-null values in the referenced set of values. + */ + MAX, + /** + * The median of all non-null values in the referenced set of values. + */ + MEDIAN, + /** + * Smallest of all non-null values in the referenced set of values. + */ + MIN, + /** + * The most common value of all non-null values in the referenced set of values. + */ + MODE, + /** + * Standard Deviation of the values in the referenced set of values, computed over the population. + */ + STDEV_P, + /** + * Standard Deviation of the values in the referenced set of values, computed over a sample of the population. + */ + STDEV_S, + /** + * Sum of non-null values in the referenced set of values + */ + SUM, + /** + * Variance of the values in the referenced set of values, computed over the population. + */ + VARIANCE_P, + /** + * Variance of the values in the referenced set of values, computed over a sample of the population. + */ + VARIANCE_S, + /** + * VerificationMethod + */ + _VERIFICATIONMETHOD, + /** + * Verification by means of document. + + + Example: Fax, letter, attachment to e-mail. + */ + VDOC, + /** + * verification by means of a response to an electronic query + + + Example: query message to a Covered Party registry application or Coverage Administrator. + */ + VREG, + /** + * Verification by means of electronic token. + + + Example: smartcard, magnetic swipe card, RFID device. + */ + VTOKEN, + /** + * Verification by means of voice. + + + Example: By speaking with or calling the Coverage Administrator or Covered Party + */ + VVOICE, + /** + * Complement fixation + */ + _0001, + /** + * Computed axial tomography + */ + _0002, + /** + * Susceptibility, High Level Aminoglycoside Resistance agar test + */ + _0003, + /** + * Visual, Macroscopic observation + */ + _0004, + /** + * Computed, Magnetic resonance + */ + _0005, + /** + * Computed, Morphometry + */ + _0006, + /** + * Computed, Positron emission tomography + */ + _0007, + /** + * SAMHSA drug assay confirmation + */ + _0008, + /** + * SAMHSA drug assay screening + */ + _0009, + /** + * Serum Neutralization + */ + _0010, + /** + * Titration + */ + _0011, + /** + * Ultrasound + */ + _0012, + /** + * X-ray crystallography + */ + _0013, + /** + * Agglutination + */ + _0014, + /** + * Agglutination, Buffered acidified plate + */ + _0015, + /** + * Agglutination, Card + */ + _0016, + /** + * Agglutination, Hemagglutination + */ + _0017, + /** + * Agglutination, Hemagglutination inhibition + */ + _0018, + /** + * Agglutination, Latex + */ + _0019, + /** + * Agglutination, Plate + */ + _0020, + /** + * Agglutination, Rapid Plate + */ + _0021, + /** + * Agglutination, RBC + */ + _0022, + /** + * Agglutination, Rivanol + */ + _0023, + /** + * Agglutination, Tube + */ + _0024, + /** + * Bioassay + */ + _0025, + /** + * Bioassay, Animal Inoculation + */ + _0026, + /** + * Bioassay, Cytotoxicity + */ + _0027, + /** + * Bioassay, Embryo Infective Dose 50 + */ + _0028, + /** + * Bioassay, Embryo Lethal Dose 50 + */ + _0029, + /** + * Bioassay, Mouse intercerebral inoculation + */ + _0030, + /** + * Bioassay, qualitative + */ + _0031, + /** + * Bioassay, quantitative + */ + _0032, + /** + * Chemical + */ + _0033, + /** + * Chemical, Differential light absorption + */ + _0034, + /** + * Chemical, Dipstick + */ + _0035, + /** + * Chemical, Dipstick colorimetric laboratory test + */ + _0036, + /** + * Chemical, Test strip + */ + _0037, + /** + * Chromatography + */ + _0038, + /** + * Chromatography, Affinity + */ + _0039, + /** + * Chromatography, Gas liquid + */ + _0040, + /** + * Chromatography, High performance liquid + */ + _0041, + /** + * Chromatography, Liquid + */ + _0042, + /** + * Chromatography, Protein A affinity + */ + _0043, + /** + * Coagulation + */ + _0044, + /** + * Coagulation, Tilt tube + */ + _0045, + /** + * Coagulation, Tilt tube reptilase induced + */ + _0046, + /** + * Count, Automated + */ + _0047, + /** + * Count, Manual + */ + _0048, + /** + * Count, Platelet, Rees-Ecker + */ + _0049, + /** + * Culture, Aerobic + */ + _0050, + /** + * Culture, Anaerobic + */ + _0051, + /** + * Culture, Chicken Embryo + */ + _0052, + /** + * Culture, Delayed secondary enrichment + */ + _0053, + /** + * Culture, Microaerophilic + */ + _0054, + /** + * Culture, Quantitative microbial, cup + */ + _0055, + /** + * Culture, Quantitative microbial, droplet + */ + _0056, + /** + * Culture, Quantitative microbial, filter paper + */ + _0057, + /** + * Culture, Quantitative microbial, pad + */ + _0058, + /** + * Culture, Quantitative microbial, pour plate + */ + _0059, + /** + * Culture, Quantitative microbial, surface streak + */ + _0060, + /** + * Culture, Somatic Cell + */ + _0061, + /** + * Diffusion, Agar + */ + _0062, + /** + * Diffusion, Agar Gel Immunodiffusion + */ + _0063, + /** + * Electrophoresis + */ + _0064, + /** + * Electrophoresis, Agaorse gel + */ + _0065, + /** + * Electrophoresis, citrate agar + */ + _0066, + /** + * Electrophoresis, Immuno + */ + _0067, + /** + * Electrophoresis, Polyacrylamide gel + */ + _0068, + /** + * Electrophoresis, Starch gel + */ + _0069, + /** + * ELISA + */ + _0070, + /** + * ELISA, antigen capture + */ + _0071, + /** + * ELISA, avidin biotin peroxidase complex + */ + _0072, + /** + * ELISA, Kinetic + */ + _0073, + /** + * ELISA, peroxidase-antiperoxidase + */ + _0074, + /** + * Identification, API 20 Strep + */ + _0075, + /** + * Identification, API 20A + */ + _0076, + /** + * Identification, API 20C AUX + */ + _0077, + /** + * Identification, API 20E + */ + _0078, + /** + * Identification, API 20NE + */ + _0079, + /** + * Identification, API 50 CH + */ + _0080, + /** + * Identification, API An-IDENT + */ + _0081, + /** + * Identification, API Coryne + */ + _0082, + /** + * Identification, API Rapid 20E + */ + _0083, + /** + * Identification, API Staph + */ + _0084, + /** + * Identification, API ZYM + */ + _0085, + /** + * Identification, Bacterial + */ + _0086, + /** + * Identification, mini VIDAS + */ + _0087, + /** + * Identification, Phage susceptibility typing + */ + _0088, + /** + * Identification, Quad-FERM+ + */ + _0089, + /** + * Identification, RAPIDEC Staph + */ + _0090, + /** + * Identification, Staphaurex + */ + _0091, + /** + * Identification, VIDAS + */ + _0092, + /** + * Identification, Vitek + */ + _0093, + /** + * Identification, VITEK 2 + */ + _0094, + /** + * Immune stain + */ + _0095, + /** + * Immune stain, Immunofluorescent antibody, direct + */ + _0096, + /** + * Immune stain, Immunofluorescent antibody, indirect + */ + _0097, + /** + * Immune stain, Immunoperoxidase, Avidin-Biotin Complex + */ + _0098, + /** + * Immune stain, Immunoperoxidase, Peroxidase anti-peroxidase complex + */ + _0099, + /** + * Immune stain, Immunoperoxidase, Protein A-peroxidase complex + */ + _0100, + /** + * Immunoassay + */ + _0101, + /** + * Immunoassay, qualitative, multiple step + */ + _0102, + /** + * Immunoassay, qualitative, single step + */ + _0103, + /** + * Immunoassay, Radioimmunoassay + */ + _0104, + /** + * Immunoassay, semi-quantitative, multiple step + */ + _0105, + /** + * Immunoassay, semi-quantitative, single step + */ + _0106, + /** + * Microscopy + */ + _0107, + /** + * Microscopy, Darkfield + */ + _0108, + /** + * Microscopy, Electron + */ + _0109, + /** + * Microscopy, Electron microscopy tomography + */ + _0110, + /** + * Microscopy, Electron, negative stain + */ + _0111, + /** + * Microscopy, Electron, thick section transmission + */ + _0112, + /** + * Microscopy, Electron, thin section transmission + */ + _0113, + /** + * Microscopy, Light + */ + _0114, + /** + * Microscopy, Polarized light + */ + _0115, + /** + * Microscopy, Scanning electron + */ + _0116, + /** + * Microscopy, Transmission electron + */ + _0117, + /** + * Microscopy, Transparent tape direct examination + */ + _0118, + /** + * Molecular, 3 Self-Sustaining Sequence Replication + */ + _0119, + /** + * Molecular, Branched Chain DNA + */ + _0120, + /** + * Molecular, Hybridization Protection Assay + */ + _0121, + /** + * Molecular, Immune blot + */ + _0122, + /** + * Molecular, In-situ hybridization + */ + _0123, + /** + * Molecular, Ligase Chain Reaction + */ + _0124, + /** + * Molecular, Ligation Activated Transcription + */ + _0125, + /** + * Molecular, Nucleic Acid Probe + */ + _0126, + /** + * Molecular, Nucleic acid probe with amplification + + + + Rationale: Duplicate of code 0126. Use code 0126 instead. + */ + _0128, + /** + * Molecular, Nucleic acid probe with target amplification + */ + _0129, + /** + * Molecular, Nucleic acid reverse transcription + */ + _0130, + /** + * Molecular, Nucleic Acid Sequence Based Analysis + */ + _0131, + /** + * Molecular, Polymerase chain reaction + */ + _0132, + /** + * Molecular, Q-Beta Replicase or probe amplification category method + */ + _0133, + /** + * Molecular, Restriction Fragment Length Polymorphism + */ + _0134, + /** + * Molecular, Southern Blot + */ + _0135, + /** + * Molecular, Strand Displacement Amplification + */ + _0136, + /** + * Molecular, Transcription Mediated Amplification + */ + _0137, + /** + * Molecular, Western Blot + */ + _0138, + /** + * Precipitation, Flocculation + */ + _0139, + /** + * Precipitation, Immune precipitation + */ + _0140, + /** + * Precipitation, Milk ring test + */ + _0141, + /** + * Precipitation, Precipitin + */ + _0142, + /** + * Stain, Acid fast + */ + _0143, + /** + * Stain, Acid fast, fluorochrome + */ + _0144, + /** + * Stain, Acid fast, Kinyoun's cold carbolfuchsin + */ + _0145, + /** + * Stain, Acid fast, Ziehl-Neelsen + */ + _0146, + /** + * Stain, Acid phosphatase + */ + _0147, + /** + * Stain, Acridine orange + */ + _0148, + /** + * Stain, Active brilliant orange KH + */ + _0149, + /** + * Stain, Alazarin red S + */ + _0150, + /** + * Stain, Alcian blue + */ + _0151, + /** + * Stain, Alcian blue with Periodic acid Schiff + */ + _0152, + /** + * Stain, Argentaffin + */ + _0153, + /** + * Stain, Argentaffin silver + */ + _0154, + /** + * Stain, Azure-eosin + */ + _0155, + /** + * Stain, Basic Fuschin + */ + _0156, + /** + * Stain, Bennhold + */ + _0157, + /** + * Stain, Bennhold's Congo red + */ + _0158, + /** + * Stain, Bielschowsky + */ + _0159, + /** + * Stain, Bielschowsky's silver + */ + _0160, + /** + * Stain, Bleach + */ + _0161, + /** + * Stain, Bodian + */ + _0162, + /** + * Stain, Brown-Brenn + */ + _0163, + /** + * Stain, Butyrate-esterase + */ + _0164, + /** + * Stain, Calcofluor white fluorescent + */ + _0165, + /** + * Stain, Carbol-fuchsin + */ + _0166, + /** + * Stain, Carmine + */ + _0167, + /** + * Stain, Churukian-Schenk + */ + _0168, + /** + * Stain, Congo red + */ + _0169, + /** + * Stain, Cresyl echt violet + */ + _0170, + /** + * Stain, Crystal violet + */ + _0171, + /** + * Stain, De Galantha + */ + _0172, + /** + * Stain, Dieterle silver impregnation + */ + _0173, + /** + * Stain, Fite-Farco + */ + _0174, + /** + * Stain, Fontana-Masson silver + */ + _0175, + /** + * Stain, Fouchet + */ + _0176, + /** + * Stain, Gomori + */ + _0177, + /** + * Stain, Gomori methenamine silver + */ + _0178, + /** + * Stain, Gomori-Wheatly trichrome + */ + _0179, + /** + * Stain, Gridley + */ + _0180, + /** + * Stain, Grimelius silver + */ + _0181, + /** + * Stain, Grocott + */ + _0182, + /** + * Stain, Grocott methenamine silver + */ + _0183, + /** + * Stain, Hale's colloidal ferric oxide + */ + _0184, + /** + * Stain, Hale's colloidal iron + */ + _0185, + /** + * Stain, Hansel + */ + _0186, + /** + * Stain, Harris regressive hematoxylin and eosin + */ + _0187, + /** + * Stain, Hematoxylin and eosin + */ + _0188, + /** + * Stain, Highman + */ + _0189, + /** + * Stain, Holzer + */ + _0190, + /** + * Stain, Iron hematoxylin + */ + _0191, + /** + * Stain, Jones + */ + _0192, + /** + * Stain, Jones methenamine silver + */ + _0193, + /** + * Stain, Kossa + */ + _0194, + /** + * Stain, Lawson-Van Gieson + */ + _0195, + /** + * Stain, Loeffler methylene blue + */ + _0196, + /** + * Stain, Luxol fast blue with cresyl violet + */ + _0197, + /** + * Stain, Luxol fast blue with Periodic acid-Schiff + */ + _0198, + /** + * Stain, MacNeal's tetrachrome blood + */ + _0199, + /** + * Stain, Mallory-Heidenhain + */ + _0200, + /** + * Stain, Masson trichrome + */ + _0201, + /** + * Stain, Mayer mucicarmine + */ + _0202, + /** + * Stain, Mayers progressive hematoxylin and eosin + */ + _0203, + /** + * Stain, May-Grunwald Giemsa + */ + _0204, + /** + * Stain, Methyl green + */ + _0205, + /** + * Stain, Methyl green pyronin + */ + _0206, + /** + * Stain, Modified Gomori-Wheatly trichrome + */ + _0207, + /** + * Stain, Modified Masson trichrome + */ + _0208, + /** + * Stain, Modified trichrome + */ + _0209, + /** + * Stain, Movat pentachrome + */ + _0210, + /** + * Stain, Mucicarmine + */ + _0211, + /** + * Stain, Neutral red + */ + _0212, + /** + * Stain, Night blue + */ + _0213, + /** + * Stain, Non-specific esterase + */ + _0214, + /** + * Stain, Oil red-O + */ + _0215, + /** + * Stain, Orcein + */ + _0216, + /** + * Stain, Perls' + */ + _0217, + /** + * Stain, Phosphotungstic acid-hematoxylin + */ + _0218, + /** + * Stain, Potassium ferrocyanide + */ + _0219, + /** + * Stain, Prussian blue + */ + _0220, + /** + * Stain, Putchler modified Bennhold + */ + _0221, + /** + * Stain, Quinacrine fluorescent + */ + _0222, + /** + * Stain, Reticulin + */ + _0223, + /** + * Stain, Rhodamine + */ + _0224, + /** + * Stain, Safranin + */ + _0225, + /** + * Stain, Schmorl + */ + _0226, + /** + * Stain, Seiver-Munger + */ + _0227, + /** + * Stain, Silver + */ + _0228, + /** + * Stain, Specific esterase + */ + _0229, + /** + * Stain, Steiner silver + */ + _0230, + /** + * Stain, Sudan III + */ + _0231, + /** + * Stain, Sudan IVI + */ + _0232, + /** + * Stain, Sulfated alcian blue + */ + _0233, + /** + * Stain, Supravital + */ + _0234, + /** + * Stain, Thioflavine-S + */ + _0235, + /** + * Stain, Three micron Giemsa + */ + _0236, + /** + * Stain, Vassar-Culling + */ + _0237, + /** + * Stain, Vital + */ + _0238, + /** + * Stain, von Kossa + */ + _0239, + /** + * Susceptibility, Minimum bactericidal concentration, macrodilution + */ + _0243, + /** + * Susceptibility, Minimum bactericidal concentration, microdilution + */ + _0244, + /** + * Turbidometric + */ + _0247, + /** + * Turbidometric, Refractometric + */ + _0248, + /** + * Chromatography, Thin Layer + */ + _0249, + /** + * Immunoassay, enzyme-multiplied technique (EMIT) + */ + _0250, + /** + * Flow Cytometry + */ + _0251, + /** + * Radial Immunodiffusion + */ + _0252, + /** + * Immunoassay, Fluorescence Polarization + */ + _0253, + /** + * Electrophoresis, Immunofixation + */ + _0254, + /** + * Dialysis, Direct Equilibrium + */ + _0255, + /** + * Acid Elution, Kleihauer-Betke Method + */ + _0256, + /** + * Immunofluorescence, Anti-Complement + */ + _0257, + /** + * Gas Chromatography/Mass Spectroscopy + */ + _0258, + /** + * Light Scatter, Nephelometry + */ + _0259, + /** + * Immunoassay, IgE Antibody Test + */ + _0260, + /** + * Lymphocyte Microcytotoxicity Assay + */ + _0261, + /** + * Spectrophotometry + */ + _0262, + /** + * Spectrophotometry, Atomic Absorption + */ + _0263, + /** + * Electrochemical, Ion Selective Electrode + */ + _0264, + /** + * Chromatography, Gas + */ + _0265, + /** + * Isoelectric Focusing + */ + _0266, + /** + * Immunoassay, Chemiluminescent + */ + _0267, + /** + * Immunoassay, Microparticle Enzyme + */ + _0268, + /** + * Inductively-Coupled Plasma/Mass Spectrometry + */ + _0269, + /** + * Immunoassay, Immunoradiometric Assay + */ + _0270, + /** + * Coagulation, Photo Optical Clot Detection + */ + _0271, + /** + * Test methods designed to determine a microorganismaTMs susceptibility to being killed by an antibiotic. + */ + _0280, + /** + * Susceptibility, Antibiotic sensitivity, disk + */ + _0240, + /** + * Susceptibility, BACTEC susceptibility test + */ + _0241, + /** + * Susceptibility, Disk dilution + */ + _0242, + /** + * Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited. + */ + _0272, + /** + * Susceptibility, Minimum Inhibitory concentration, macrodilution + */ + _0245, + /** + * Susceptibility, Minimum Inhibitory concentration, microdilution + */ + _0246, + /** + * Viral Genotype Susceptibility + */ + _0273, + /** + * Viral Phenotype Susceptibility + */ + _0274, + /** + * Gradient Strip + */ + _0275, + /** + * Minimum Lethal Concentration (MLC) + */ + _0275A, + /** + * Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited. + */ + _0276, + /** + * Serum bactericidal titer + */ + _0277, + /** + * Agar screen + */ + _0278, + /** + * Disk induction + */ + _0279, + /** + * Molecular, Nucleic acid probe + */ + _0127, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationMethod fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DecisionObservationMethod".equals(codeString)) + return _DECISIONOBSERVATIONMETHOD; + if ("ALGM".equals(codeString)) + return ALGM; + if ("BYCL".equals(codeString)) + return BYCL; + if ("GINT".equals(codeString)) + return GINT; + if ("_GeneticObservationMethod".equals(codeString)) + return _GENETICOBSERVATIONMETHOD; + if ("PCR".equals(codeString)) + return PCR; + if ("_ObservationMethodAggregate".equals(codeString)) + return _OBSERVATIONMETHODAGGREGATE; + if ("AVERAGE".equals(codeString)) + return AVERAGE; + if ("COUNT".equals(codeString)) + return COUNT; + if ("MAX".equals(codeString)) + return MAX; + if ("MEDIAN".equals(codeString)) + return MEDIAN; + if ("MIN".equals(codeString)) + return MIN; + if ("MODE".equals(codeString)) + return MODE; + if ("STDEV.P".equals(codeString)) + return STDEV_P; + if ("STDEV.S".equals(codeString)) + return STDEV_S; + if ("SUM".equals(codeString)) + return SUM; + if ("VARIANCE.P".equals(codeString)) + return VARIANCE_P; + if ("VARIANCE.S".equals(codeString)) + return VARIANCE_S; + if ("_VerificationMethod".equals(codeString)) + return _VERIFICATIONMETHOD; + if ("VDOC".equals(codeString)) + return VDOC; + if ("VREG".equals(codeString)) + return VREG; + if ("VTOKEN".equals(codeString)) + return VTOKEN; + if ("VVOICE".equals(codeString)) + return VVOICE; + if ("0001".equals(codeString)) + return _0001; + if ("0002".equals(codeString)) + return _0002; + if ("0003".equals(codeString)) + return _0003; + if ("0004".equals(codeString)) + return _0004; + if ("0005".equals(codeString)) + return _0005; + if ("0006".equals(codeString)) + return _0006; + if ("0007".equals(codeString)) + return _0007; + if ("0008".equals(codeString)) + return _0008; + if ("0009".equals(codeString)) + return _0009; + if ("0010".equals(codeString)) + return _0010; + if ("0011".equals(codeString)) + return _0011; + if ("0012".equals(codeString)) + return _0012; + if ("0013".equals(codeString)) + return _0013; + if ("0014".equals(codeString)) + return _0014; + if ("0015".equals(codeString)) + return _0015; + if ("0016".equals(codeString)) + return _0016; + if ("0017".equals(codeString)) + return _0017; + if ("0018".equals(codeString)) + return _0018; + if ("0019".equals(codeString)) + return _0019; + if ("0020".equals(codeString)) + return _0020; + if ("0021".equals(codeString)) + return _0021; + if ("0022".equals(codeString)) + return _0022; + if ("0023".equals(codeString)) + return _0023; + if ("0024".equals(codeString)) + return _0024; + if ("0025".equals(codeString)) + return _0025; + if ("0026".equals(codeString)) + return _0026; + if ("0027".equals(codeString)) + return _0027; + if ("0028".equals(codeString)) + return _0028; + if ("0029".equals(codeString)) + return _0029; + if ("0030".equals(codeString)) + return _0030; + if ("0031".equals(codeString)) + return _0031; + if ("0032".equals(codeString)) + return _0032; + if ("0033".equals(codeString)) + return _0033; + if ("0034".equals(codeString)) + return _0034; + if ("0035".equals(codeString)) + return _0035; + if ("0036".equals(codeString)) + return _0036; + if ("0037".equals(codeString)) + return _0037; + if ("0038".equals(codeString)) + return _0038; + if ("0039".equals(codeString)) + return _0039; + if ("0040".equals(codeString)) + return _0040; + if ("0041".equals(codeString)) + return _0041; + if ("0042".equals(codeString)) + return _0042; + if ("0043".equals(codeString)) + return _0043; + if ("0044".equals(codeString)) + return _0044; + if ("0045".equals(codeString)) + return _0045; + if ("0046".equals(codeString)) + return _0046; + if ("0047".equals(codeString)) + return _0047; + if ("0048".equals(codeString)) + return _0048; + if ("0049".equals(codeString)) + return _0049; + if ("0050".equals(codeString)) + return _0050; + if ("0051".equals(codeString)) + return _0051; + if ("0052".equals(codeString)) + return _0052; + if ("0053".equals(codeString)) + return _0053; + if ("0054".equals(codeString)) + return _0054; + if ("0055".equals(codeString)) + return _0055; + if ("0056".equals(codeString)) + return _0056; + if ("0057".equals(codeString)) + return _0057; + if ("0058".equals(codeString)) + return _0058; + if ("0059".equals(codeString)) + return _0059; + if ("0060".equals(codeString)) + return _0060; + if ("0061".equals(codeString)) + return _0061; + if ("0062".equals(codeString)) + return _0062; + if ("0063".equals(codeString)) + return _0063; + if ("0064".equals(codeString)) + return _0064; + if ("0065".equals(codeString)) + return _0065; + if ("0066".equals(codeString)) + return _0066; + if ("0067".equals(codeString)) + return _0067; + if ("0068".equals(codeString)) + return _0068; + if ("0069".equals(codeString)) + return _0069; + if ("0070".equals(codeString)) + return _0070; + if ("0071".equals(codeString)) + return _0071; + if ("0072".equals(codeString)) + return _0072; + if ("0073".equals(codeString)) + return _0073; + if ("0074".equals(codeString)) + return _0074; + if ("0075".equals(codeString)) + return _0075; + if ("0076".equals(codeString)) + return _0076; + if ("0077".equals(codeString)) + return _0077; + if ("0078".equals(codeString)) + return _0078; + if ("0079".equals(codeString)) + return _0079; + if ("0080".equals(codeString)) + return _0080; + if ("0081".equals(codeString)) + return _0081; + if ("0082".equals(codeString)) + return _0082; + if ("0083".equals(codeString)) + return _0083; + if ("0084".equals(codeString)) + return _0084; + if ("0085".equals(codeString)) + return _0085; + if ("0086".equals(codeString)) + return _0086; + if ("0087".equals(codeString)) + return _0087; + if ("0088".equals(codeString)) + return _0088; + if ("0089".equals(codeString)) + return _0089; + if ("0090".equals(codeString)) + return _0090; + if ("0091".equals(codeString)) + return _0091; + if ("0092".equals(codeString)) + return _0092; + if ("0093".equals(codeString)) + return _0093; + if ("0094".equals(codeString)) + return _0094; + if ("0095".equals(codeString)) + return _0095; + if ("0096".equals(codeString)) + return _0096; + if ("0097".equals(codeString)) + return _0097; + if ("0098".equals(codeString)) + return _0098; + if ("0099".equals(codeString)) + return _0099; + if ("0100".equals(codeString)) + return _0100; + if ("0101".equals(codeString)) + return _0101; + if ("0102".equals(codeString)) + return _0102; + if ("0103".equals(codeString)) + return _0103; + if ("0104".equals(codeString)) + return _0104; + if ("0105".equals(codeString)) + return _0105; + if ("0106".equals(codeString)) + return _0106; + if ("0107".equals(codeString)) + return _0107; + if ("0108".equals(codeString)) + return _0108; + if ("0109".equals(codeString)) + return _0109; + if ("0110".equals(codeString)) + return _0110; + if ("0111".equals(codeString)) + return _0111; + if ("0112".equals(codeString)) + return _0112; + if ("0113".equals(codeString)) + return _0113; + if ("0114".equals(codeString)) + return _0114; + if ("0115".equals(codeString)) + return _0115; + if ("0116".equals(codeString)) + return _0116; + if ("0117".equals(codeString)) + return _0117; + if ("0118".equals(codeString)) + return _0118; + if ("0119".equals(codeString)) + return _0119; + if ("0120".equals(codeString)) + return _0120; + if ("0121".equals(codeString)) + return _0121; + if ("0122".equals(codeString)) + return _0122; + if ("0123".equals(codeString)) + return _0123; + if ("0124".equals(codeString)) + return _0124; + if ("0125".equals(codeString)) + return _0125; + if ("0126".equals(codeString)) + return _0126; + if ("0128".equals(codeString)) + return _0128; + if ("0129".equals(codeString)) + return _0129; + if ("0130".equals(codeString)) + return _0130; + if ("0131".equals(codeString)) + return _0131; + if ("0132".equals(codeString)) + return _0132; + if ("0133".equals(codeString)) + return _0133; + if ("0134".equals(codeString)) + return _0134; + if ("0135".equals(codeString)) + return _0135; + if ("0136".equals(codeString)) + return _0136; + if ("0137".equals(codeString)) + return _0137; + if ("0138".equals(codeString)) + return _0138; + if ("0139".equals(codeString)) + return _0139; + if ("0140".equals(codeString)) + return _0140; + if ("0141".equals(codeString)) + return _0141; + if ("0142".equals(codeString)) + return _0142; + if ("0143".equals(codeString)) + return _0143; + if ("0144".equals(codeString)) + return _0144; + if ("0145".equals(codeString)) + return _0145; + if ("0146".equals(codeString)) + return _0146; + if ("0147".equals(codeString)) + return _0147; + if ("0148".equals(codeString)) + return _0148; + if ("0149".equals(codeString)) + return _0149; + if ("0150".equals(codeString)) + return _0150; + if ("0151".equals(codeString)) + return _0151; + if ("0152".equals(codeString)) + return _0152; + if ("0153".equals(codeString)) + return _0153; + if ("0154".equals(codeString)) + return _0154; + if ("0155".equals(codeString)) + return _0155; + if ("0156".equals(codeString)) + return _0156; + if ("0157".equals(codeString)) + return _0157; + if ("0158".equals(codeString)) + return _0158; + if ("0159".equals(codeString)) + return _0159; + if ("0160".equals(codeString)) + return _0160; + if ("0161".equals(codeString)) + return _0161; + if ("0162".equals(codeString)) + return _0162; + if ("0163".equals(codeString)) + return _0163; + if ("0164".equals(codeString)) + return _0164; + if ("0165".equals(codeString)) + return _0165; + if ("0166".equals(codeString)) + return _0166; + if ("0167".equals(codeString)) + return _0167; + if ("0168".equals(codeString)) + return _0168; + if ("0169".equals(codeString)) + return _0169; + if ("0170".equals(codeString)) + return _0170; + if ("0171".equals(codeString)) + return _0171; + if ("0172".equals(codeString)) + return _0172; + if ("0173".equals(codeString)) + return _0173; + if ("0174".equals(codeString)) + return _0174; + if ("0175".equals(codeString)) + return _0175; + if ("0176".equals(codeString)) + return _0176; + if ("0177".equals(codeString)) + return _0177; + if ("0178".equals(codeString)) + return _0178; + if ("0179".equals(codeString)) + return _0179; + if ("0180".equals(codeString)) + return _0180; + if ("0181".equals(codeString)) + return _0181; + if ("0182".equals(codeString)) + return _0182; + if ("0183".equals(codeString)) + return _0183; + if ("0184".equals(codeString)) + return _0184; + if ("0185".equals(codeString)) + return _0185; + if ("0186".equals(codeString)) + return _0186; + if ("0187".equals(codeString)) + return _0187; + if ("0188".equals(codeString)) + return _0188; + if ("0189".equals(codeString)) + return _0189; + if ("0190".equals(codeString)) + return _0190; + if ("0191".equals(codeString)) + return _0191; + if ("0192".equals(codeString)) + return _0192; + if ("0193".equals(codeString)) + return _0193; + if ("0194".equals(codeString)) + return _0194; + if ("0195".equals(codeString)) + return _0195; + if ("0196".equals(codeString)) + return _0196; + if ("0197".equals(codeString)) + return _0197; + if ("0198".equals(codeString)) + return _0198; + if ("0199".equals(codeString)) + return _0199; + if ("0200".equals(codeString)) + return _0200; + if ("0201".equals(codeString)) + return _0201; + if ("0202".equals(codeString)) + return _0202; + if ("0203".equals(codeString)) + return _0203; + if ("0204".equals(codeString)) + return _0204; + if ("0205".equals(codeString)) + return _0205; + if ("0206".equals(codeString)) + return _0206; + if ("0207".equals(codeString)) + return _0207; + if ("0208".equals(codeString)) + return _0208; + if ("0209".equals(codeString)) + return _0209; + if ("0210".equals(codeString)) + return _0210; + if ("0211".equals(codeString)) + return _0211; + if ("0212".equals(codeString)) + return _0212; + if ("0213".equals(codeString)) + return _0213; + if ("0214".equals(codeString)) + return _0214; + if ("0215".equals(codeString)) + return _0215; + if ("0216".equals(codeString)) + return _0216; + if ("0217".equals(codeString)) + return _0217; + if ("0218".equals(codeString)) + return _0218; + if ("0219".equals(codeString)) + return _0219; + if ("0220".equals(codeString)) + return _0220; + if ("0221".equals(codeString)) + return _0221; + if ("0222".equals(codeString)) + return _0222; + if ("0223".equals(codeString)) + return _0223; + if ("0224".equals(codeString)) + return _0224; + if ("0225".equals(codeString)) + return _0225; + if ("0226".equals(codeString)) + return _0226; + if ("0227".equals(codeString)) + return _0227; + if ("0228".equals(codeString)) + return _0228; + if ("0229".equals(codeString)) + return _0229; + if ("0230".equals(codeString)) + return _0230; + if ("0231".equals(codeString)) + return _0231; + if ("0232".equals(codeString)) + return _0232; + if ("0233".equals(codeString)) + return _0233; + if ("0234".equals(codeString)) + return _0234; + if ("0235".equals(codeString)) + return _0235; + if ("0236".equals(codeString)) + return _0236; + if ("0237".equals(codeString)) + return _0237; + if ("0238".equals(codeString)) + return _0238; + if ("0239".equals(codeString)) + return _0239; + if ("0243".equals(codeString)) + return _0243; + if ("0244".equals(codeString)) + return _0244; + if ("0247".equals(codeString)) + return _0247; + if ("0248".equals(codeString)) + return _0248; + if ("0249".equals(codeString)) + return _0249; + if ("0250".equals(codeString)) + return _0250; + if ("0251".equals(codeString)) + return _0251; + if ("0252".equals(codeString)) + return _0252; + if ("0253".equals(codeString)) + return _0253; + if ("0254".equals(codeString)) + return _0254; + if ("0255".equals(codeString)) + return _0255; + if ("0256".equals(codeString)) + return _0256; + if ("0257".equals(codeString)) + return _0257; + if ("0258".equals(codeString)) + return _0258; + if ("0259".equals(codeString)) + return _0259; + if ("0260".equals(codeString)) + return _0260; + if ("0261".equals(codeString)) + return _0261; + if ("0262".equals(codeString)) + return _0262; + if ("0263".equals(codeString)) + return _0263; + if ("0264".equals(codeString)) + return _0264; + if ("0265".equals(codeString)) + return _0265; + if ("0266".equals(codeString)) + return _0266; + if ("0267".equals(codeString)) + return _0267; + if ("0268".equals(codeString)) + return _0268; + if ("0269".equals(codeString)) + return _0269; + if ("0270".equals(codeString)) + return _0270; + if ("0271".equals(codeString)) + return _0271; + if ("0280".equals(codeString)) + return _0280; + if ("0240".equals(codeString)) + return _0240; + if ("0241".equals(codeString)) + return _0241; + if ("0242".equals(codeString)) + return _0242; + if ("0272".equals(codeString)) + return _0272; + if ("0245".equals(codeString)) + return _0245; + if ("0246".equals(codeString)) + return _0246; + if ("0273".equals(codeString)) + return _0273; + if ("0274".equals(codeString)) + return _0274; + if ("0275".equals(codeString)) + return _0275; + if ("0275a".equals(codeString)) + return _0275A; + if ("0276".equals(codeString)) + return _0276; + if ("0277".equals(codeString)) + return _0277; + if ("0278".equals(codeString)) + return _0278; + if ("0279".equals(codeString)) + return _0279; + if ("0127".equals(codeString)) + return _0127; + throw new FHIRException("Unknown V3ObservationMethod code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "_DecisionObservationMethod"; + case ALGM: return "ALGM"; + case BYCL: return "BYCL"; + case GINT: return "GINT"; + case _GENETICOBSERVATIONMETHOD: return "_GeneticObservationMethod"; + case PCR: return "PCR"; + case _OBSERVATIONMETHODAGGREGATE: return "_ObservationMethodAggregate"; + case AVERAGE: return "AVERAGE"; + case COUNT: return "COUNT"; + case MAX: return "MAX"; + case MEDIAN: return "MEDIAN"; + case MIN: return "MIN"; + case MODE: return "MODE"; + case STDEV_P: return "STDEV.P"; + case STDEV_S: return "STDEV.S"; + case SUM: return "SUM"; + case VARIANCE_P: return "VARIANCE.P"; + case VARIANCE_S: return "VARIANCE.S"; + case _VERIFICATIONMETHOD: return "_VerificationMethod"; + case VDOC: return "VDOC"; + case VREG: return "VREG"; + case VTOKEN: return "VTOKEN"; + case VVOICE: return "VVOICE"; + case _0001: return "0001"; + case _0002: return "0002"; + case _0003: return "0003"; + case _0004: return "0004"; + case _0005: return "0005"; + case _0006: return "0006"; + case _0007: return "0007"; + case _0008: return "0008"; + case _0009: return "0009"; + case _0010: return "0010"; + case _0011: return "0011"; + case _0012: return "0012"; + case _0013: return "0013"; + case _0014: return "0014"; + case _0015: return "0015"; + case _0016: return "0016"; + case _0017: return "0017"; + case _0018: return "0018"; + case _0019: return "0019"; + case _0020: return "0020"; + case _0021: return "0021"; + case _0022: return "0022"; + case _0023: return "0023"; + case _0024: return "0024"; + case _0025: return "0025"; + case _0026: return "0026"; + case _0027: return "0027"; + case _0028: return "0028"; + case _0029: return "0029"; + case _0030: return "0030"; + case _0031: return "0031"; + case _0032: return "0032"; + case _0033: return "0033"; + case _0034: return "0034"; + case _0035: return "0035"; + case _0036: return "0036"; + case _0037: return "0037"; + case _0038: return "0038"; + case _0039: return "0039"; + case _0040: return "0040"; + case _0041: return "0041"; + case _0042: return "0042"; + case _0043: return "0043"; + case _0044: return "0044"; + case _0045: return "0045"; + case _0046: return "0046"; + case _0047: return "0047"; + case _0048: return "0048"; + case _0049: return "0049"; + case _0050: return "0050"; + case _0051: return "0051"; + case _0052: return "0052"; + case _0053: return "0053"; + case _0054: return "0054"; + case _0055: return "0055"; + case _0056: return "0056"; + case _0057: return "0057"; + case _0058: return "0058"; + case _0059: return "0059"; + case _0060: return "0060"; + case _0061: return "0061"; + case _0062: return "0062"; + case _0063: return "0063"; + case _0064: return "0064"; + case _0065: return "0065"; + case _0066: return "0066"; + case _0067: return "0067"; + case _0068: return "0068"; + case _0069: return "0069"; + case _0070: return "0070"; + case _0071: return "0071"; + case _0072: return "0072"; + case _0073: return "0073"; + case _0074: return "0074"; + case _0075: return "0075"; + case _0076: return "0076"; + case _0077: return "0077"; + case _0078: return "0078"; + case _0079: return "0079"; + case _0080: return "0080"; + case _0081: return "0081"; + case _0082: return "0082"; + case _0083: return "0083"; + case _0084: return "0084"; + case _0085: return "0085"; + case _0086: return "0086"; + case _0087: return "0087"; + case _0088: return "0088"; + case _0089: return "0089"; + case _0090: return "0090"; + case _0091: return "0091"; + case _0092: return "0092"; + case _0093: return "0093"; + case _0094: return "0094"; + case _0095: return "0095"; + case _0096: return "0096"; + case _0097: return "0097"; + case _0098: return "0098"; + case _0099: return "0099"; + case _0100: return "0100"; + case _0101: return "0101"; + case _0102: return "0102"; + case _0103: return "0103"; + case _0104: return "0104"; + case _0105: return "0105"; + case _0106: return "0106"; + case _0107: return "0107"; + case _0108: return "0108"; + case _0109: return "0109"; + case _0110: return "0110"; + case _0111: return "0111"; + case _0112: return "0112"; + case _0113: return "0113"; + case _0114: return "0114"; + case _0115: return "0115"; + case _0116: return "0116"; + case _0117: return "0117"; + case _0118: return "0118"; + case _0119: return "0119"; + case _0120: return "0120"; + case _0121: return "0121"; + case _0122: return "0122"; + case _0123: return "0123"; + case _0124: return "0124"; + case _0125: return "0125"; + case _0126: return "0126"; + case _0128: return "0128"; + case _0129: return "0129"; + case _0130: return "0130"; + case _0131: return "0131"; + case _0132: return "0132"; + case _0133: return "0133"; + case _0134: return "0134"; + case _0135: return "0135"; + case _0136: return "0136"; + case _0137: return "0137"; + case _0138: return "0138"; + case _0139: return "0139"; + case _0140: return "0140"; + case _0141: return "0141"; + case _0142: return "0142"; + case _0143: return "0143"; + case _0144: return "0144"; + case _0145: return "0145"; + case _0146: return "0146"; + case _0147: return "0147"; + case _0148: return "0148"; + case _0149: return "0149"; + case _0150: return "0150"; + case _0151: return "0151"; + case _0152: return "0152"; + case _0153: return "0153"; + case _0154: return "0154"; + case _0155: return "0155"; + case _0156: return "0156"; + case _0157: return "0157"; + case _0158: return "0158"; + case _0159: return "0159"; + case _0160: return "0160"; + case _0161: return "0161"; + case _0162: return "0162"; + case _0163: return "0163"; + case _0164: return "0164"; + case _0165: return "0165"; + case _0166: return "0166"; + case _0167: return "0167"; + case _0168: return "0168"; + case _0169: return "0169"; + case _0170: return "0170"; + case _0171: return "0171"; + case _0172: return "0172"; + case _0173: return "0173"; + case _0174: return "0174"; + case _0175: return "0175"; + case _0176: return "0176"; + case _0177: return "0177"; + case _0178: return "0178"; + case _0179: return "0179"; + case _0180: return "0180"; + case _0181: return "0181"; + case _0182: return "0182"; + case _0183: return "0183"; + case _0184: return "0184"; + case _0185: return "0185"; + case _0186: return "0186"; + case _0187: return "0187"; + case _0188: return "0188"; + case _0189: return "0189"; + case _0190: return "0190"; + case _0191: return "0191"; + case _0192: return "0192"; + case _0193: return "0193"; + case _0194: return "0194"; + case _0195: return "0195"; + case _0196: return "0196"; + case _0197: return "0197"; + case _0198: return "0198"; + case _0199: return "0199"; + case _0200: return "0200"; + case _0201: return "0201"; + case _0202: return "0202"; + case _0203: return "0203"; + case _0204: return "0204"; + case _0205: return "0205"; + case _0206: return "0206"; + case _0207: return "0207"; + case _0208: return "0208"; + case _0209: return "0209"; + case _0210: return "0210"; + case _0211: return "0211"; + case _0212: return "0212"; + case _0213: return "0213"; + case _0214: return "0214"; + case _0215: return "0215"; + case _0216: return "0216"; + case _0217: return "0217"; + case _0218: return "0218"; + case _0219: return "0219"; + case _0220: return "0220"; + case _0221: return "0221"; + case _0222: return "0222"; + case _0223: return "0223"; + case _0224: return "0224"; + case _0225: return "0225"; + case _0226: return "0226"; + case _0227: return "0227"; + case _0228: return "0228"; + case _0229: return "0229"; + case _0230: return "0230"; + case _0231: return "0231"; + case _0232: return "0232"; + case _0233: return "0233"; + case _0234: return "0234"; + case _0235: return "0235"; + case _0236: return "0236"; + case _0237: return "0237"; + case _0238: return "0238"; + case _0239: return "0239"; + case _0243: return "0243"; + case _0244: return "0244"; + case _0247: return "0247"; + case _0248: return "0248"; + case _0249: return "0249"; + case _0250: return "0250"; + case _0251: return "0251"; + case _0252: return "0252"; + case _0253: return "0253"; + case _0254: return "0254"; + case _0255: return "0255"; + case _0256: return "0256"; + case _0257: return "0257"; + case _0258: return "0258"; + case _0259: return "0259"; + case _0260: return "0260"; + case _0261: return "0261"; + case _0262: return "0262"; + case _0263: return "0263"; + case _0264: return "0264"; + case _0265: return "0265"; + case _0266: return "0266"; + case _0267: return "0267"; + case _0268: return "0268"; + case _0269: return "0269"; + case _0270: return "0270"; + case _0271: return "0271"; + case _0280: return "0280"; + case _0240: return "0240"; + case _0241: return "0241"; + case _0242: return "0242"; + case _0272: return "0272"; + case _0245: return "0245"; + case _0246: return "0246"; + case _0273: return "0273"; + case _0274: return "0274"; + case _0275: return "0275"; + case _0275A: return "0275a"; + case _0276: return "0276"; + case _0277: return "0277"; + case _0278: return "0278"; + case _0279: return "0279"; + case _0127: return "0127"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationMethod"; + } + public String getDefinition() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "Provides codes for decision methods, initially for assessing the causality of events."; + case ALGM: return "Reaching a decision through the application of an algorithm designed to weigh the different factors involved."; + case BYCL: return "Reaching a decision through the use of Bayesian statistical analysis."; + case GINT: return "Reaching a decision by consideration of the totality of factors involved in order to reach a judgement."; + case _GENETICOBSERVATIONMETHOD: return "A code that provides additional detail about the means or technique used to ascertain the genetic analysis. Example, PCR, Micro Array"; + case PCR: return "Description: Polymerase Chain Reaction"; + case _OBSERVATIONMETHODAGGREGATE: return "Provides additional detail about the aggregation methods used to compute the aggregated values for an observation. This is an abstract code."; + case AVERAGE: return "Average of non-null values in the referenced set of values"; + case COUNT: return "Count of non-null values in the referenced set of values"; + case MAX: return "Largest of all non-null values in the referenced set of values."; + case MEDIAN: return "The median of all non-null values in the referenced set of values."; + case MIN: return "Smallest of all non-null values in the referenced set of values."; + case MODE: return "The most common value of all non-null values in the referenced set of values."; + case STDEV_P: return "Standard Deviation of the values in the referenced set of values, computed over the population."; + case STDEV_S: return "Standard Deviation of the values in the referenced set of values, computed over a sample of the population."; + case SUM: return "Sum of non-null values in the referenced set of values"; + case VARIANCE_P: return "Variance of the values in the referenced set of values, computed over the population."; + case VARIANCE_S: return "Variance of the values in the referenced set of values, computed over a sample of the population."; + case _VERIFICATIONMETHOD: return "VerificationMethod"; + case VDOC: return "Verification by means of document.\r\n\n \n Example: Fax, letter, attachment to e-mail."; + case VREG: return "verification by means of a response to an electronic query\r\n\n \n Example: query message to a Covered Party registry application or Coverage Administrator."; + case VTOKEN: return "Verification by means of electronic token.\r\n\n \n Example: smartcard, magnetic swipe card, RFID device."; + case VVOICE: return "Verification by means of voice.\r\n\n \n Example: By speaking with or calling the Coverage Administrator or Covered Party"; + case _0001: return "Complement fixation"; + case _0002: return "Computed axial tomography"; + case _0003: return "Susceptibility, High Level Aminoglycoside Resistance agar test"; + case _0004: return "Visual, Macroscopic observation"; + case _0005: return "Computed, Magnetic resonance"; + case _0006: return "Computed, Morphometry"; + case _0007: return "Computed, Positron emission tomography"; + case _0008: return "SAMHSA drug assay confirmation"; + case _0009: return "SAMHSA drug assay screening"; + case _0010: return "Serum Neutralization"; + case _0011: return "Titration"; + case _0012: return "Ultrasound"; + case _0013: return "X-ray crystallography"; + case _0014: return "Agglutination"; + case _0015: return "Agglutination, Buffered acidified plate"; + case _0016: return "Agglutination, Card"; + case _0017: return "Agglutination, Hemagglutination"; + case _0018: return "Agglutination, Hemagglutination inhibition"; + case _0019: return "Agglutination, Latex"; + case _0020: return "Agglutination, Plate"; + case _0021: return "Agglutination, Rapid Plate"; + case _0022: return "Agglutination, RBC"; + case _0023: return "Agglutination, Rivanol"; + case _0024: return "Agglutination, Tube"; + case _0025: return "Bioassay"; + case _0026: return "Bioassay, Animal Inoculation"; + case _0027: return "Bioassay, Cytotoxicity"; + case _0028: return "Bioassay, Embryo Infective Dose 50"; + case _0029: return "Bioassay, Embryo Lethal Dose 50"; + case _0030: return "Bioassay, Mouse intercerebral inoculation"; + case _0031: return "Bioassay, qualitative"; + case _0032: return "Bioassay, quantitative"; + case _0033: return "Chemical"; + case _0034: return "Chemical, Differential light absorption"; + case _0035: return "Chemical, Dipstick"; + case _0036: return "Chemical, Dipstick colorimetric laboratory test"; + case _0037: return "Chemical, Test strip"; + case _0038: return "Chromatography"; + case _0039: return "Chromatography, Affinity"; + case _0040: return "Chromatography, Gas liquid"; + case _0041: return "Chromatography, High performance liquid"; + case _0042: return "Chromatography, Liquid"; + case _0043: return "Chromatography, Protein A affinity"; + case _0044: return "Coagulation"; + case _0045: return "Coagulation, Tilt tube"; + case _0046: return "Coagulation, Tilt tube reptilase induced"; + case _0047: return "Count, Automated"; + case _0048: return "Count, Manual"; + case _0049: return "Count, Platelet, Rees-Ecker"; + case _0050: return "Culture, Aerobic"; + case _0051: return "Culture, Anaerobic"; + case _0052: return "Culture, Chicken Embryo"; + case _0053: return "Culture, Delayed secondary enrichment"; + case _0054: return "Culture, Microaerophilic"; + case _0055: return "Culture, Quantitative microbial, cup"; + case _0056: return "Culture, Quantitative microbial, droplet"; + case _0057: return "Culture, Quantitative microbial, filter paper"; + case _0058: return "Culture, Quantitative microbial, pad"; + case _0059: return "Culture, Quantitative microbial, pour plate"; + case _0060: return "Culture, Quantitative microbial, surface streak"; + case _0061: return "Culture, Somatic Cell"; + case _0062: return "Diffusion, Agar"; + case _0063: return "Diffusion, Agar Gel Immunodiffusion"; + case _0064: return "Electrophoresis"; + case _0065: return "Electrophoresis, Agaorse gel"; + case _0066: return "Electrophoresis, citrate agar"; + case _0067: return "Electrophoresis, Immuno"; + case _0068: return "Electrophoresis, Polyacrylamide gel"; + case _0069: return "Electrophoresis, Starch gel"; + case _0070: return "ELISA"; + case _0071: return "ELISA, antigen capture"; + case _0072: return "ELISA, avidin biotin peroxidase complex"; + case _0073: return "ELISA, Kinetic"; + case _0074: return "ELISA, peroxidase-antiperoxidase"; + case _0075: return "Identification, API 20 Strep"; + case _0076: return "Identification, API 20A"; + case _0077: return "Identification, API 20C AUX"; + case _0078: return "Identification, API 20E"; + case _0079: return "Identification, API 20NE"; + case _0080: return "Identification, API 50 CH"; + case _0081: return "Identification, API An-IDENT"; + case _0082: return "Identification, API Coryne"; + case _0083: return "Identification, API Rapid 20E"; + case _0084: return "Identification, API Staph"; + case _0085: return "Identification, API ZYM"; + case _0086: return "Identification, Bacterial"; + case _0087: return "Identification, mini VIDAS"; + case _0088: return "Identification, Phage susceptibility typing"; + case _0089: return "Identification, Quad-FERM+"; + case _0090: return "Identification, RAPIDEC Staph"; + case _0091: return "Identification, Staphaurex"; + case _0092: return "Identification, VIDAS"; + case _0093: return "Identification, Vitek"; + case _0094: return "Identification, VITEK 2"; + case _0095: return "Immune stain"; + case _0096: return "Immune stain, Immunofluorescent antibody, direct"; + case _0097: return "Immune stain, Immunofluorescent antibody, indirect"; + case _0098: return "Immune stain, Immunoperoxidase, Avidin-Biotin Complex"; + case _0099: return "Immune stain, Immunoperoxidase, Peroxidase anti-peroxidase complex"; + case _0100: return "Immune stain, Immunoperoxidase, Protein A-peroxidase complex"; + case _0101: return "Immunoassay"; + case _0102: return "Immunoassay, qualitative, multiple step"; + case _0103: return "Immunoassay, qualitative, single step"; + case _0104: return "Immunoassay, Radioimmunoassay"; + case _0105: return "Immunoassay, semi-quantitative, multiple step"; + case _0106: return "Immunoassay, semi-quantitative, single step"; + case _0107: return "Microscopy"; + case _0108: return "Microscopy, Darkfield"; + case _0109: return "Microscopy, Electron"; + case _0110: return "Microscopy, Electron microscopy tomography"; + case _0111: return "Microscopy, Electron, negative stain"; + case _0112: return "Microscopy, Electron, thick section transmission"; + case _0113: return "Microscopy, Electron, thin section transmission"; + case _0114: return "Microscopy, Light"; + case _0115: return "Microscopy, Polarized light"; + case _0116: return "Microscopy, Scanning electron"; + case _0117: return "Microscopy, Transmission electron"; + case _0118: return "Microscopy, Transparent tape direct examination"; + case _0119: return "Molecular, 3 Self-Sustaining Sequence Replication"; + case _0120: return "Molecular, Branched Chain DNA"; + case _0121: return "Molecular, Hybridization Protection Assay"; + case _0122: return "Molecular, Immune blot"; + case _0123: return "Molecular, In-situ hybridization"; + case _0124: return "Molecular, Ligase Chain Reaction"; + case _0125: return "Molecular, Ligation Activated Transcription"; + case _0126: return "Molecular, Nucleic Acid Probe"; + case _0128: return "Molecular, Nucleic acid probe with amplification\r\n\n \r\n\n Rationale: Duplicate of code 0126. Use code 0126 instead."; + case _0129: return "Molecular, Nucleic acid probe with target amplification"; + case _0130: return "Molecular, Nucleic acid reverse transcription"; + case _0131: return "Molecular, Nucleic Acid Sequence Based Analysis"; + case _0132: return "Molecular, Polymerase chain reaction"; + case _0133: return "Molecular, Q-Beta Replicase or probe amplification category method"; + case _0134: return "Molecular, Restriction Fragment Length Polymorphism"; + case _0135: return "Molecular, Southern Blot"; + case _0136: return "Molecular, Strand Displacement Amplification"; + case _0137: return "Molecular, Transcription Mediated Amplification"; + case _0138: return "Molecular, Western Blot"; + case _0139: return "Precipitation, Flocculation"; + case _0140: return "Precipitation, Immune precipitation"; + case _0141: return "Precipitation, Milk ring test"; + case _0142: return "Precipitation, Precipitin"; + case _0143: return "Stain, Acid fast"; + case _0144: return "Stain, Acid fast, fluorochrome"; + case _0145: return "Stain, Acid fast, Kinyoun's cold carbolfuchsin"; + case _0146: return "Stain, Acid fast, Ziehl-Neelsen"; + case _0147: return "Stain, Acid phosphatase"; + case _0148: return "Stain, Acridine orange"; + case _0149: return "Stain, Active brilliant orange KH"; + case _0150: return "Stain, Alazarin red S"; + case _0151: return "Stain, Alcian blue"; + case _0152: return "Stain, Alcian blue with Periodic acid Schiff"; + case _0153: return "Stain, Argentaffin"; + case _0154: return "Stain, Argentaffin silver"; + case _0155: return "Stain, Azure-eosin"; + case _0156: return "Stain, Basic Fuschin"; + case _0157: return "Stain, Bennhold"; + case _0158: return "Stain, Bennhold's Congo red"; + case _0159: return "Stain, Bielschowsky"; + case _0160: return "Stain, Bielschowsky's silver"; + case _0161: return "Stain, Bleach"; + case _0162: return "Stain, Bodian"; + case _0163: return "Stain, Brown-Brenn"; + case _0164: return "Stain, Butyrate-esterase"; + case _0165: return "Stain, Calcofluor white fluorescent"; + case _0166: return "Stain, Carbol-fuchsin"; + case _0167: return "Stain, Carmine"; + case _0168: return "Stain, Churukian-Schenk"; + case _0169: return "Stain, Congo red"; + case _0170: return "Stain, Cresyl echt violet"; + case _0171: return "Stain, Crystal violet"; + case _0172: return "Stain, De Galantha"; + case _0173: return "Stain, Dieterle silver impregnation"; + case _0174: return "Stain, Fite-Farco"; + case _0175: return "Stain, Fontana-Masson silver"; + case _0176: return "Stain, Fouchet"; + case _0177: return "Stain, Gomori"; + case _0178: return "Stain, Gomori methenamine silver"; + case _0179: return "Stain, Gomori-Wheatly trichrome"; + case _0180: return "Stain, Gridley"; + case _0181: return "Stain, Grimelius silver"; + case _0182: return "Stain, Grocott"; + case _0183: return "Stain, Grocott methenamine silver"; + case _0184: return "Stain, Hale's colloidal ferric oxide"; + case _0185: return "Stain, Hale's colloidal iron"; + case _0186: return "Stain, Hansel"; + case _0187: return "Stain, Harris regressive hematoxylin and eosin"; + case _0188: return "Stain, Hematoxylin and eosin"; + case _0189: return "Stain, Highman"; + case _0190: return "Stain, Holzer"; + case _0191: return "Stain, Iron hematoxylin"; + case _0192: return "Stain, Jones"; + case _0193: return "Stain, Jones methenamine silver"; + case _0194: return "Stain, Kossa"; + case _0195: return "Stain, Lawson-Van Gieson"; + case _0196: return "Stain, Loeffler methylene blue"; + case _0197: return "Stain, Luxol fast blue with cresyl violet"; + case _0198: return "Stain, Luxol fast blue with Periodic acid-Schiff"; + case _0199: return "Stain, MacNeal's tetrachrome blood"; + case _0200: return "Stain, Mallory-Heidenhain"; + case _0201: return "Stain, Masson trichrome"; + case _0202: return "Stain, Mayer mucicarmine"; + case _0203: return "Stain, Mayers progressive hematoxylin and eosin"; + case _0204: return "Stain, May-Grunwald Giemsa"; + case _0205: return "Stain, Methyl green"; + case _0206: return "Stain, Methyl green pyronin"; + case _0207: return "Stain, Modified Gomori-Wheatly trichrome"; + case _0208: return "Stain, Modified Masson trichrome"; + case _0209: return "Stain, Modified trichrome"; + case _0210: return "Stain, Movat pentachrome"; + case _0211: return "Stain, Mucicarmine"; + case _0212: return "Stain, Neutral red"; + case _0213: return "Stain, Night blue"; + case _0214: return "Stain, Non-specific esterase"; + case _0215: return "Stain, Oil red-O"; + case _0216: return "Stain, Orcein"; + case _0217: return "Stain, Perls'"; + case _0218: return "Stain, Phosphotungstic acid-hematoxylin"; + case _0219: return "Stain, Potassium ferrocyanide"; + case _0220: return "Stain, Prussian blue"; + case _0221: return "Stain, Putchler modified Bennhold"; + case _0222: return "Stain, Quinacrine fluorescent"; + case _0223: return "Stain, Reticulin"; + case _0224: return "Stain, Rhodamine"; + case _0225: return "Stain, Safranin"; + case _0226: return "Stain, Schmorl"; + case _0227: return "Stain, Seiver-Munger"; + case _0228: return "Stain, Silver"; + case _0229: return "Stain, Specific esterase"; + case _0230: return "Stain, Steiner silver"; + case _0231: return "Stain, Sudan III"; + case _0232: return "Stain, Sudan IVI"; + case _0233: return "Stain, Sulfated alcian blue"; + case _0234: return "Stain, Supravital"; + case _0235: return "Stain, Thioflavine-S"; + case _0236: return "Stain, Three micron Giemsa"; + case _0237: return "Stain, Vassar-Culling"; + case _0238: return "Stain, Vital"; + case _0239: return "Stain, von Kossa"; + case _0243: return "Susceptibility, Minimum bactericidal concentration, macrodilution"; + case _0244: return "Susceptibility, Minimum bactericidal concentration, microdilution"; + case _0247: return "Turbidometric"; + case _0248: return "Turbidometric, Refractometric"; + case _0249: return "Chromatography, Thin Layer"; + case _0250: return "Immunoassay, enzyme-multiplied technique (EMIT)"; + case _0251: return "Flow Cytometry"; + case _0252: return "Radial Immunodiffusion"; + case _0253: return "Immunoassay, Fluorescence Polarization"; + case _0254: return "Electrophoresis, Immunofixation"; + case _0255: return "Dialysis, Direct Equilibrium"; + case _0256: return "Acid Elution, Kleihauer-Betke Method"; + case _0257: return "Immunofluorescence, Anti-Complement"; + case _0258: return "Gas Chromatography/Mass Spectroscopy"; + case _0259: return "Light Scatter, Nephelometry"; + case _0260: return "Immunoassay, IgE Antibody Test"; + case _0261: return "Lymphocyte Microcytotoxicity Assay"; + case _0262: return "Spectrophotometry"; + case _0263: return "Spectrophotometry, Atomic Absorption"; + case _0264: return "Electrochemical, Ion Selective Electrode"; + case _0265: return "Chromatography, Gas"; + case _0266: return "Isoelectric Focusing"; + case _0267: return "Immunoassay, Chemiluminescent"; + case _0268: return "Immunoassay, Microparticle Enzyme"; + case _0269: return "Inductively-Coupled Plasma/Mass Spectrometry"; + case _0270: return "Immunoassay, Immunoradiometric Assay"; + case _0271: return "Coagulation, Photo Optical Clot Detection"; + case _0280: return "Test methods designed to determine a microorganismaTMs susceptibility to being killed by an antibiotic."; + case _0240: return "Susceptibility, Antibiotic sensitivity, disk"; + case _0241: return "Susceptibility, BACTEC susceptibility test"; + case _0242: return "Susceptibility, Disk dilution"; + case _0272: return "Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited."; + case _0245: return "Susceptibility, Minimum Inhibitory concentration, macrodilution"; + case _0246: return "Susceptibility, Minimum Inhibitory concentration, microdilution"; + case _0273: return "Viral Genotype Susceptibility"; + case _0274: return "Viral Phenotype Susceptibility"; + case _0275: return "Gradient Strip"; + case _0275A: return "Minimum Lethal Concentration (MLC)"; + case _0276: return "Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited."; + case _0277: return "Serum bactericidal titer"; + case _0278: return "Agar screen"; + case _0279: return "Disk induction"; + case _0127: return "Molecular, Nucleic acid probe"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "DecisionObservationMethod"; + case ALGM: return "algorithm"; + case BYCL: return "bayesian calculation"; + case GINT: return "global introspection"; + case _GENETICOBSERVATIONMETHOD: return "GeneticObservationMethod"; + case PCR: return "PCR"; + case _OBSERVATIONMETHODAGGREGATE: return "observation method aggregate"; + case AVERAGE: return "average"; + case COUNT: return "count"; + case MAX: return "maxima"; + case MEDIAN: return "median"; + case MIN: return "minima"; + case MODE: return "mode"; + case STDEV_P: return "population standard deviation"; + case STDEV_S: return "sample standard deviation"; + case SUM: return "sum"; + case VARIANCE_P: return "population variance"; + case VARIANCE_S: return "sample variance"; + case _VERIFICATIONMETHOD: return "VerificationMethod"; + case VDOC: return "document verification"; + case VREG: return "registry verification"; + case VTOKEN: return "electronic token verification"; + case VVOICE: return "voice-based verification"; + case _0001: return "Complement fixation"; + case _0002: return "Computed axial tomography"; + case _0003: return "HLAR agar test"; + case _0004: return "Macroscopic observation"; + case _0005: return "Magnetic resonance"; + case _0006: return "Morphometry"; + case _0007: return "Positron emission tomography"; + case _0008: return "SAMHSA confirmation"; + case _0009: return "SAMHSA screening"; + case _0010: return "Serum Neutralization"; + case _0011: return "Titration"; + case _0012: return "Ultrasound"; + case _0013: return "X-ray crystallography"; + case _0014: return "Agglutination"; + case _0015: return "Buffered acidified plate agglutination"; + case _0016: return "Card agglutination"; + case _0017: return "Hemagglutination"; + case _0018: return "Hemagglutination inhibition"; + case _0019: return "Latex agglutination"; + case _0020: return "Plate agglutination"; + case _0021: return "Rapid agglutination"; + case _0022: return "RBC agglutination"; + case _0023: return "Rivanol agglutination"; + case _0024: return "Tube agglutination"; + case _0025: return "Bioassay"; + case _0026: return "Animal Inoculation"; + case _0027: return "Cytotoxicity"; + case _0028: return "Embryo infective dose 50"; + case _0029: return "Embryo lethal dose 50"; + case _0030: return "Mouse intercerebral inoculation"; + case _0031: return "Bioassay, qualitative"; + case _0032: return "Bioassay, quantitative"; + case _0033: return "Chemical method"; + case _0034: return "Differential light absorption chemical test"; + case _0035: return "Dipstick"; + case _0036: return "Dipstick colorimetric laboratory test"; + case _0037: return "Test strip"; + case _0038: return "Chromatography"; + case _0039: return "Affinity chromatography"; + case _0040: return "Gas liquid chromatography"; + case _0041: return "High performance liquid chromatography"; + case _0042: return "Liquid Chromatography"; + case _0043: return "Protein A affinity chromatography"; + case _0044: return "Coagulation"; + case _0045: return "Tilt tube coagulation time"; + case _0046: return "Tilt tube reptilase induced coagulation"; + case _0047: return "Automated count"; + case _0048: return "Manual cell count"; + case _0049: return "Platelet count, Rees-Ecker"; + case _0050: return "Aerobic Culture"; + case _0051: return "Anaerobic Culture"; + case _0052: return "Chicken embryo culture"; + case _0053: return "Delayed secondary enrichment"; + case _0054: return "Microaerophilic Culture"; + case _0055: return "Quantitative microbial culture, cup"; + case _0056: return "Quantitative microbial culture, droplet"; + case _0057: return "Quantitative microbial culture, filter paper"; + case _0058: return "Quantitative microbial culture, pad culture"; + case _0059: return "Quantitative microbial culture, pour plate"; + case _0060: return "Quantitative microbial culture, surface streak"; + case _0061: return "Somatic Cell culture"; + case _0062: return "Agar diffusion"; + case _0063: return "Agar Gel Immunodiffusion"; + case _0064: return "Electrophoresis"; + case _0065: return "Agaorse gel electrophoresis"; + case _0066: return "Electrophoresis, citrate agar"; + case _0067: return "Immunoelectrophoresis"; + case _0068: return "Polyacrylamide gel electrophoresis"; + case _0069: return "Starch gel electrophoresis"; + case _0070: return "ELISA"; + case _0071: return "ELISA, antigen capture"; + case _0072: return "ELISA, avidin biotin peroxidase complex"; + case _0073: return "Kinetic ELISA"; + case _0074: return "ELISA, peroxidase-antiperoxidase"; + case _0075: return "API 20 Strep"; + case _0076: return "API 20A"; + case _0077: return "API 20C AUX"; + case _0078: return "API 20E"; + case _0079: return "API 20NE"; + case _0080: return "API 50 CH"; + case _0081: return "API An-IDENT"; + case _0082: return "API Coryne"; + case _0083: return "API Rapid 20E"; + case _0084: return "API Staph"; + case _0085: return "API ZYM"; + case _0086: return "Bacterial identification"; + case _0087: return "mini VIDAS"; + case _0088: return "Phage susceptibility typing"; + case _0089: return "Quad-FERM+"; + case _0090: return "RAPIDEC Staph"; + case _0091: return "Staphaurex"; + case _0092: return "VIDAS"; + case _0093: return "Vitek"; + case _0094: return "VITEK 2"; + case _0095: return "Immune stain"; + case _0096: return "Immunofluorescent antibody, direct"; + case _0097: return "Immunofluorescent antibody, indirect"; + case _0098: return "Immunoperoxidase, Avidin-Biotin Complex"; + case _0099: return "Immunoperoxidase, Peroxidase anti-peroxidase complex"; + case _0100: return "Immunoperoxidase, Protein A-peroxidase complex"; + case _0101: return "Immunoassay"; + case _0102: return "Immunoassay, qualitative, multiple step"; + case _0103: return "Immunoassay, qualitative, single step"; + case _0104: return "Radioimmunoassay"; + case _0105: return "Immunoassay, semi-quantitative, multiple step"; + case _0106: return "Immunoassay, semi-quantitative, single step"; + case _0107: return "Microscopy"; + case _0108: return "Darkfield microscopy"; + case _0109: return "Electron microscopy"; + case _0110: return "Electron microscopy tomography"; + case _0111: return "Electron microscopy, negative stain"; + case _0112: return "Electron microscopy, thick section"; + case _0113: return "Electron microscopy, thin section"; + case _0114: return "Microscopy, Light"; + case _0115: return "Polarizing light microscopy"; + case _0116: return "Scanning electron microscopy"; + case _0117: return "Transmission electron microscopy"; + case _0118: return "Transparent tape direct examination"; + case _0119: return "3 Self-Sustaining Sequence Replication"; + case _0120: return "Branched Chain DNA"; + case _0121: return "Hybridization Protection Assay"; + case _0122: return "Immune blot"; + case _0123: return "In-situ hybridization"; + case _0124: return "Ligase Chain Reaction"; + case _0125: return "Ligation Activated Transcription"; + case _0126: return "Nucleic Acid Probe"; + case _0128: return "Nucleic acid probe with amplification"; + case _0129: return "Nucleic acid probe with target amplification"; + case _0130: return "Nucleic acid reverse transcription"; + case _0131: return "Nucleic Acid Sequence Based Analysis"; + case _0132: return "Polymerase chain reaction"; + case _0133: return "Q-Beta Replicase or probe amplification category method"; + case _0134: return "Restriction Fragment Length Polymorphism"; + case _0135: return "Southern Blot"; + case _0136: return "Strand Displacement Amplification"; + case _0137: return "Transcription Mediated Amplification"; + case _0138: return "Western Blot"; + case _0139: return "Flocculation"; + case _0140: return "Immune precipitation"; + case _0141: return "Milk ring test"; + case _0142: return "Precipitin"; + case _0143: return "Acid fast stain"; + case _0144: return "Acid fast stain, fluorochrome"; + case _0145: return "Acid fast stain, Kinyoun's cold carbolfuchsin"; + case _0146: return "Acid fast stain, Ziehl-Neelsen"; + case _0147: return "Acid phosphatase stain"; + case _0148: return "Acridine orange stain"; + case _0149: return "Active brilliant orange KH stain"; + case _0150: return "Alazarin red S stain"; + case _0151: return "Alcian blue stain"; + case _0152: return "Alcian blue with Periodic acid Schiff stain"; + case _0153: return "Argentaffin stain"; + case _0154: return "Argentaffin silver stain"; + case _0155: return "Azure-eosin stain"; + case _0156: return "Basic Fuschin stain"; + case _0157: return "Bennhold stain"; + case _0158: return "Bennhold's Congo red stain"; + case _0159: return "Bielschowsky stain"; + case _0160: return "Bielschowsky's silver stain"; + case _0161: return "Bleach stain"; + case _0162: return "Bodian stain"; + case _0163: return "Brown-Brenn stain"; + case _0164: return "Butyrate-esterase stain"; + case _0165: return "Calcofluor white fluorescent stain"; + case _0166: return "Carbol-fuchsin stain"; + case _0167: return "Carmine stain"; + case _0168: return "Churukian-Schenk stain"; + case _0169: return "Congo red stain"; + case _0170: return "Cresyl echt violet stain"; + case _0171: return "Crystal violet stain"; + case _0172: return "De Galantha stain"; + case _0173: return "Dieterle silver impregnation stain"; + case _0174: return "Fite-Farco stain"; + case _0175: return "Fontana-Masson silver stain"; + case _0176: return "Fouchet stain"; + case _0177: return "Gomori stain"; + case _0178: return "Gomori methenamine silver stain"; + case _0179: return "Gomori-Wheatly trichrome stain"; + case _0180: return "Gridley stain"; + case _0181: return "Grimelius silver stain"; + case _0182: return "Grocott stain"; + case _0183: return "Grocott methenamine silver stain"; + case _0184: return "Hale's colloidal ferric oxide stain"; + case _0185: return "Hale's colloidal iron stain"; + case _0186: return "Hansel stain"; + case _0187: return "Harris regressive hematoxylin and eosin stain"; + case _0188: return "Hematoxylin and eosin stain"; + case _0189: return "Highman stain"; + case _0190: return "Holzer stain"; + case _0191: return "Iron hematoxylin stain"; + case _0192: return "Jones stain"; + case _0193: return "Jones methenamine silver stain"; + case _0194: return "Kossa stain"; + case _0195: return "Lawson-Van Gieson stain"; + case _0196: return "Loeffler methylene blue stain"; + case _0197: return "Luxol fast blue with cresyl violet stain"; + case _0198: return "Luxol fast blue with Periodic acid-Schiff stain"; + case _0199: return "MacNeal's tetrachrome blood stain"; + case _0200: return "Mallory-Heidenhain stain"; + case _0201: return "Masson trichrome stain"; + case _0202: return "Mayer mucicarmine stain"; + case _0203: return "Mayers progressive hematoxylin and eosin stain"; + case _0204: return "May-Grunwald Giemsa stain"; + case _0205: return "Methyl green stain"; + case _0206: return "Methyl green pyronin stain"; + case _0207: return "Modified Gomori-Wheatly trichrome stain"; + case _0208: return "Modified Masson trichrome stain"; + case _0209: return "Modified trichrome stain"; + case _0210: return "Movat pentachrome stain"; + case _0211: return "Mucicarmine stain"; + case _0212: return "Neutral red stain"; + case _0213: return "Night blue stain"; + case _0214: return "Non-specific esterase stain"; + case _0215: return "Oil red-O stain"; + case _0216: return "Orcein stain"; + case _0217: return "Perls' stain"; + case _0218: return "Phosphotungstic acid-hematoxylin stain"; + case _0219: return "Potassium ferrocyanide stain"; + case _0220: return "Prussian blue stain"; + case _0221: return "Putchler modified Bennhold stain"; + case _0222: return "Quinacrine fluorescent stain"; + case _0223: return "Reticulin stain"; + case _0224: return "Rhodamine stain"; + case _0225: return "Safranin stain"; + case _0226: return "Schmorl stain"; + case _0227: return "Seiver-Munger stain"; + case _0228: return "Silver stain"; + case _0229: return "Specific esterase stain"; + case _0230: return "Steiner silver stain"; + case _0231: return "Sudan III stain"; + case _0232: return "Sudan IVI stain"; + case _0233: return "Sulfated alcian blue stain"; + case _0234: return "Supravital stain"; + case _0235: return "Thioflavine-S stain"; + case _0236: return "Three micron Giemsa stain"; + case _0237: return "Vassar-Culling stain"; + case _0238: return "Vital Stain"; + case _0239: return "von Kossa stain"; + case _0243: return "Minimum bactericidal concentration test, macrodilution"; + case _0244: return "Minimum bactericidal concentration test, microdilution"; + case _0247: return "Turbidometric"; + case _0248: return "Refractometric"; + case _0249: return "Thin layer chromatography (TLC)"; + case _0250: return "EMIT"; + case _0251: return "Flow cytometry (FC)"; + case _0252: return "Radial immunodiffusion (RID)"; + case _0253: return "Fluorescence polarization immunoassay (FPIA)"; + case _0254: return "Immunofixation electrophoresis (IFE)"; + case _0255: return "Equilibrium dialysis"; + case _0256: return "Kleihauer-Betke acid elution"; + case _0257: return "Anti-complement immunofluorescence (ACIF)"; + case _0258: return "GC/MS"; + case _0259: return "Nephelometry"; + case _0260: return "IgE immunoassay antibody"; + case _0261: return "Lymphocyte Microcytotoxicity Assay"; + case _0262: return "Spectrophotometry"; + case _0263: return "Atomic absorption spectrophotometry (AAS)"; + case _0264: return "Ion selective electrode (ISE)"; + case _0265: return "Gas chromatography (GC)"; + case _0266: return "Isoelectric focusing (IEF)"; + case _0267: return "Immunochemiluminescence"; + case _0268: return "Microparticle enzyme immunoassay (MEIA)"; + case _0269: return "ICP/MS"; + case _0270: return "Immunoradiometric assay (IRMA)"; + case _0271: return "Photo optical clot detection"; + case _0280: return "Susceptibility Testing"; + case _0240: return "Antibiotic sensitivity, disk"; + case _0241: return "BACTEC susceptibility test"; + case _0242: return "Disk dilution"; + case _0272: return "Minimum Inhibitory Concentration"; + case _0245: return "Minimum Inhibitory Concentration, macrodilution"; + case _0246: return "Minimum Inhibitory Concentration, microdilution"; + case _0273: return "Viral Genotype Susceptibility"; + case _0274: return "Viral Phenotype Susceptibility"; + case _0275: return "Gradient Strip"; + case _0275A: return "Minimum Lethal Concentration (MLC)"; + case _0276: return "Slow Mycobacteria Susceptibility"; + case _0277: return "Serum bactericidal titer"; + case _0278: return "Agar screen"; + case _0279: return "Disk induction"; + case _0127: return "Nucleic acid probe"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethodEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethodEnumFactory.java new file mode 100644 index 00000000000..6c2399b2c54 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationMethodEnumFactory.java @@ -0,0 +1,1267 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ObservationMethodEnumFactory implements EnumFactory { + + public V3ObservationMethod fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DecisionObservationMethod".equals(codeString)) + return V3ObservationMethod._DECISIONOBSERVATIONMETHOD; + if ("ALGM".equals(codeString)) + return V3ObservationMethod.ALGM; + if ("BYCL".equals(codeString)) + return V3ObservationMethod.BYCL; + if ("GINT".equals(codeString)) + return V3ObservationMethod.GINT; + if ("_GeneticObservationMethod".equals(codeString)) + return V3ObservationMethod._GENETICOBSERVATIONMETHOD; + if ("PCR".equals(codeString)) + return V3ObservationMethod.PCR; + if ("_ObservationMethodAggregate".equals(codeString)) + return V3ObservationMethod._OBSERVATIONMETHODAGGREGATE; + if ("AVERAGE".equals(codeString)) + return V3ObservationMethod.AVERAGE; + if ("COUNT".equals(codeString)) + return V3ObservationMethod.COUNT; + if ("MAX".equals(codeString)) + return V3ObservationMethod.MAX; + if ("MEDIAN".equals(codeString)) + return V3ObservationMethod.MEDIAN; + if ("MIN".equals(codeString)) + return V3ObservationMethod.MIN; + if ("MODE".equals(codeString)) + return V3ObservationMethod.MODE; + if ("STDEV.P".equals(codeString)) + return V3ObservationMethod.STDEV_P; + if ("STDEV.S".equals(codeString)) + return V3ObservationMethod.STDEV_S; + if ("SUM".equals(codeString)) + return V3ObservationMethod.SUM; + if ("VARIANCE.P".equals(codeString)) + return V3ObservationMethod.VARIANCE_P; + if ("VARIANCE.S".equals(codeString)) + return V3ObservationMethod.VARIANCE_S; + if ("_VerificationMethod".equals(codeString)) + return V3ObservationMethod._VERIFICATIONMETHOD; + if ("VDOC".equals(codeString)) + return V3ObservationMethod.VDOC; + if ("VREG".equals(codeString)) + return V3ObservationMethod.VREG; + if ("VTOKEN".equals(codeString)) + return V3ObservationMethod.VTOKEN; + if ("VVOICE".equals(codeString)) + return V3ObservationMethod.VVOICE; + if ("0001".equals(codeString)) + return V3ObservationMethod._0001; + if ("0002".equals(codeString)) + return V3ObservationMethod._0002; + if ("0003".equals(codeString)) + return V3ObservationMethod._0003; + if ("0004".equals(codeString)) + return V3ObservationMethod._0004; + if ("0005".equals(codeString)) + return V3ObservationMethod._0005; + if ("0006".equals(codeString)) + return V3ObservationMethod._0006; + if ("0007".equals(codeString)) + return V3ObservationMethod._0007; + if ("0008".equals(codeString)) + return V3ObservationMethod._0008; + if ("0009".equals(codeString)) + return V3ObservationMethod._0009; + if ("0010".equals(codeString)) + return V3ObservationMethod._0010; + if ("0011".equals(codeString)) + return V3ObservationMethod._0011; + if ("0012".equals(codeString)) + return V3ObservationMethod._0012; + if ("0013".equals(codeString)) + return V3ObservationMethod._0013; + if ("0014".equals(codeString)) + return V3ObservationMethod._0014; + if ("0015".equals(codeString)) + return V3ObservationMethod._0015; + if ("0016".equals(codeString)) + return V3ObservationMethod._0016; + if ("0017".equals(codeString)) + return V3ObservationMethod._0017; + if ("0018".equals(codeString)) + return V3ObservationMethod._0018; + if ("0019".equals(codeString)) + return V3ObservationMethod._0019; + if ("0020".equals(codeString)) + return V3ObservationMethod._0020; + if ("0021".equals(codeString)) + return V3ObservationMethod._0021; + if ("0022".equals(codeString)) + return V3ObservationMethod._0022; + if ("0023".equals(codeString)) + return V3ObservationMethod._0023; + if ("0024".equals(codeString)) + return V3ObservationMethod._0024; + if ("0025".equals(codeString)) + return V3ObservationMethod._0025; + if ("0026".equals(codeString)) + return V3ObservationMethod._0026; + if ("0027".equals(codeString)) + return V3ObservationMethod._0027; + if ("0028".equals(codeString)) + return V3ObservationMethod._0028; + if ("0029".equals(codeString)) + return V3ObservationMethod._0029; + if ("0030".equals(codeString)) + return V3ObservationMethod._0030; + if ("0031".equals(codeString)) + return V3ObservationMethod._0031; + if ("0032".equals(codeString)) + return V3ObservationMethod._0032; + if ("0033".equals(codeString)) + return V3ObservationMethod._0033; + if ("0034".equals(codeString)) + return V3ObservationMethod._0034; + if ("0035".equals(codeString)) + return V3ObservationMethod._0035; + if ("0036".equals(codeString)) + return V3ObservationMethod._0036; + if ("0037".equals(codeString)) + return V3ObservationMethod._0037; + if ("0038".equals(codeString)) + return V3ObservationMethod._0038; + if ("0039".equals(codeString)) + return V3ObservationMethod._0039; + if ("0040".equals(codeString)) + return V3ObservationMethod._0040; + if ("0041".equals(codeString)) + return V3ObservationMethod._0041; + if ("0042".equals(codeString)) + return V3ObservationMethod._0042; + if ("0043".equals(codeString)) + return V3ObservationMethod._0043; + if ("0044".equals(codeString)) + return V3ObservationMethod._0044; + if ("0045".equals(codeString)) + return V3ObservationMethod._0045; + if ("0046".equals(codeString)) + return V3ObservationMethod._0046; + if ("0047".equals(codeString)) + return V3ObservationMethod._0047; + if ("0048".equals(codeString)) + return V3ObservationMethod._0048; + if ("0049".equals(codeString)) + return V3ObservationMethod._0049; + if ("0050".equals(codeString)) + return V3ObservationMethod._0050; + if ("0051".equals(codeString)) + return V3ObservationMethod._0051; + if ("0052".equals(codeString)) + return V3ObservationMethod._0052; + if ("0053".equals(codeString)) + return V3ObservationMethod._0053; + if ("0054".equals(codeString)) + return V3ObservationMethod._0054; + if ("0055".equals(codeString)) + return V3ObservationMethod._0055; + if ("0056".equals(codeString)) + return V3ObservationMethod._0056; + if ("0057".equals(codeString)) + return V3ObservationMethod._0057; + if ("0058".equals(codeString)) + return V3ObservationMethod._0058; + if ("0059".equals(codeString)) + return V3ObservationMethod._0059; + if ("0060".equals(codeString)) + return V3ObservationMethod._0060; + if ("0061".equals(codeString)) + return V3ObservationMethod._0061; + if ("0062".equals(codeString)) + return V3ObservationMethod._0062; + if ("0063".equals(codeString)) + return V3ObservationMethod._0063; + if ("0064".equals(codeString)) + return V3ObservationMethod._0064; + if ("0065".equals(codeString)) + return V3ObservationMethod._0065; + if ("0066".equals(codeString)) + return V3ObservationMethod._0066; + if ("0067".equals(codeString)) + return V3ObservationMethod._0067; + if ("0068".equals(codeString)) + return V3ObservationMethod._0068; + if ("0069".equals(codeString)) + return V3ObservationMethod._0069; + if ("0070".equals(codeString)) + return V3ObservationMethod._0070; + if ("0071".equals(codeString)) + return V3ObservationMethod._0071; + if ("0072".equals(codeString)) + return V3ObservationMethod._0072; + if ("0073".equals(codeString)) + return V3ObservationMethod._0073; + if ("0074".equals(codeString)) + return V3ObservationMethod._0074; + if ("0075".equals(codeString)) + return V3ObservationMethod._0075; + if ("0076".equals(codeString)) + return V3ObservationMethod._0076; + if ("0077".equals(codeString)) + return V3ObservationMethod._0077; + if ("0078".equals(codeString)) + return V3ObservationMethod._0078; + if ("0079".equals(codeString)) + return V3ObservationMethod._0079; + if ("0080".equals(codeString)) + return V3ObservationMethod._0080; + if ("0081".equals(codeString)) + return V3ObservationMethod._0081; + if ("0082".equals(codeString)) + return V3ObservationMethod._0082; + if ("0083".equals(codeString)) + return V3ObservationMethod._0083; + if ("0084".equals(codeString)) + return V3ObservationMethod._0084; + if ("0085".equals(codeString)) + return V3ObservationMethod._0085; + if ("0086".equals(codeString)) + return V3ObservationMethod._0086; + if ("0087".equals(codeString)) + return V3ObservationMethod._0087; + if ("0088".equals(codeString)) + return V3ObservationMethod._0088; + if ("0089".equals(codeString)) + return V3ObservationMethod._0089; + if ("0090".equals(codeString)) + return V3ObservationMethod._0090; + if ("0091".equals(codeString)) + return V3ObservationMethod._0091; + if ("0092".equals(codeString)) + return V3ObservationMethod._0092; + if ("0093".equals(codeString)) + return V3ObservationMethod._0093; + if ("0094".equals(codeString)) + return V3ObservationMethod._0094; + if ("0095".equals(codeString)) + return V3ObservationMethod._0095; + if ("0096".equals(codeString)) + return V3ObservationMethod._0096; + if ("0097".equals(codeString)) + return V3ObservationMethod._0097; + if ("0098".equals(codeString)) + return V3ObservationMethod._0098; + if ("0099".equals(codeString)) + return V3ObservationMethod._0099; + if ("0100".equals(codeString)) + return V3ObservationMethod._0100; + if ("0101".equals(codeString)) + return V3ObservationMethod._0101; + if ("0102".equals(codeString)) + return V3ObservationMethod._0102; + if ("0103".equals(codeString)) + return V3ObservationMethod._0103; + if ("0104".equals(codeString)) + return V3ObservationMethod._0104; + if ("0105".equals(codeString)) + return V3ObservationMethod._0105; + if ("0106".equals(codeString)) + return V3ObservationMethod._0106; + if ("0107".equals(codeString)) + return V3ObservationMethod._0107; + if ("0108".equals(codeString)) + return V3ObservationMethod._0108; + if ("0109".equals(codeString)) + return V3ObservationMethod._0109; + if ("0110".equals(codeString)) + return V3ObservationMethod._0110; + if ("0111".equals(codeString)) + return V3ObservationMethod._0111; + if ("0112".equals(codeString)) + return V3ObservationMethod._0112; + if ("0113".equals(codeString)) + return V3ObservationMethod._0113; + if ("0114".equals(codeString)) + return V3ObservationMethod._0114; + if ("0115".equals(codeString)) + return V3ObservationMethod._0115; + if ("0116".equals(codeString)) + return V3ObservationMethod._0116; + if ("0117".equals(codeString)) + return V3ObservationMethod._0117; + if ("0118".equals(codeString)) + return V3ObservationMethod._0118; + if ("0119".equals(codeString)) + return V3ObservationMethod._0119; + if ("0120".equals(codeString)) + return V3ObservationMethod._0120; + if ("0121".equals(codeString)) + return V3ObservationMethod._0121; + if ("0122".equals(codeString)) + return V3ObservationMethod._0122; + if ("0123".equals(codeString)) + return V3ObservationMethod._0123; + if ("0124".equals(codeString)) + return V3ObservationMethod._0124; + if ("0125".equals(codeString)) + return V3ObservationMethod._0125; + if ("0126".equals(codeString)) + return V3ObservationMethod._0126; + if ("0128".equals(codeString)) + return V3ObservationMethod._0128; + if ("0129".equals(codeString)) + return V3ObservationMethod._0129; + if ("0130".equals(codeString)) + return V3ObservationMethod._0130; + if ("0131".equals(codeString)) + return V3ObservationMethod._0131; + if ("0132".equals(codeString)) + return V3ObservationMethod._0132; + if ("0133".equals(codeString)) + return V3ObservationMethod._0133; + if ("0134".equals(codeString)) + return V3ObservationMethod._0134; + if ("0135".equals(codeString)) + return V3ObservationMethod._0135; + if ("0136".equals(codeString)) + return V3ObservationMethod._0136; + if ("0137".equals(codeString)) + return V3ObservationMethod._0137; + if ("0138".equals(codeString)) + return V3ObservationMethod._0138; + if ("0139".equals(codeString)) + return V3ObservationMethod._0139; + if ("0140".equals(codeString)) + return V3ObservationMethod._0140; + if ("0141".equals(codeString)) + return V3ObservationMethod._0141; + if ("0142".equals(codeString)) + return V3ObservationMethod._0142; + if ("0143".equals(codeString)) + return V3ObservationMethod._0143; + if ("0144".equals(codeString)) + return V3ObservationMethod._0144; + if ("0145".equals(codeString)) + return V3ObservationMethod._0145; + if ("0146".equals(codeString)) + return V3ObservationMethod._0146; + if ("0147".equals(codeString)) + return V3ObservationMethod._0147; + if ("0148".equals(codeString)) + return V3ObservationMethod._0148; + if ("0149".equals(codeString)) + return V3ObservationMethod._0149; + if ("0150".equals(codeString)) + return V3ObservationMethod._0150; + if ("0151".equals(codeString)) + return V3ObservationMethod._0151; + if ("0152".equals(codeString)) + return V3ObservationMethod._0152; + if ("0153".equals(codeString)) + return V3ObservationMethod._0153; + if ("0154".equals(codeString)) + return V3ObservationMethod._0154; + if ("0155".equals(codeString)) + return V3ObservationMethod._0155; + if ("0156".equals(codeString)) + return V3ObservationMethod._0156; + if ("0157".equals(codeString)) + return V3ObservationMethod._0157; + if ("0158".equals(codeString)) + return V3ObservationMethod._0158; + if ("0159".equals(codeString)) + return V3ObservationMethod._0159; + if ("0160".equals(codeString)) + return V3ObservationMethod._0160; + if ("0161".equals(codeString)) + return V3ObservationMethod._0161; + if ("0162".equals(codeString)) + return V3ObservationMethod._0162; + if ("0163".equals(codeString)) + return V3ObservationMethod._0163; + if ("0164".equals(codeString)) + return V3ObservationMethod._0164; + if ("0165".equals(codeString)) + return V3ObservationMethod._0165; + if ("0166".equals(codeString)) + return V3ObservationMethod._0166; + if ("0167".equals(codeString)) + return V3ObservationMethod._0167; + if ("0168".equals(codeString)) + return V3ObservationMethod._0168; + if ("0169".equals(codeString)) + return V3ObservationMethod._0169; + if ("0170".equals(codeString)) + return V3ObservationMethod._0170; + if ("0171".equals(codeString)) + return V3ObservationMethod._0171; + if ("0172".equals(codeString)) + return V3ObservationMethod._0172; + if ("0173".equals(codeString)) + return V3ObservationMethod._0173; + if ("0174".equals(codeString)) + return V3ObservationMethod._0174; + if ("0175".equals(codeString)) + return V3ObservationMethod._0175; + if ("0176".equals(codeString)) + return V3ObservationMethod._0176; + if ("0177".equals(codeString)) + return V3ObservationMethod._0177; + if ("0178".equals(codeString)) + return V3ObservationMethod._0178; + if ("0179".equals(codeString)) + return V3ObservationMethod._0179; + if ("0180".equals(codeString)) + return V3ObservationMethod._0180; + if ("0181".equals(codeString)) + return V3ObservationMethod._0181; + if ("0182".equals(codeString)) + return V3ObservationMethod._0182; + if ("0183".equals(codeString)) + return V3ObservationMethod._0183; + if ("0184".equals(codeString)) + return V3ObservationMethod._0184; + if ("0185".equals(codeString)) + return V3ObservationMethod._0185; + if ("0186".equals(codeString)) + return V3ObservationMethod._0186; + if ("0187".equals(codeString)) + return V3ObservationMethod._0187; + if ("0188".equals(codeString)) + return V3ObservationMethod._0188; + if ("0189".equals(codeString)) + return V3ObservationMethod._0189; + if ("0190".equals(codeString)) + return V3ObservationMethod._0190; + if ("0191".equals(codeString)) + return V3ObservationMethod._0191; + if ("0192".equals(codeString)) + return V3ObservationMethod._0192; + if ("0193".equals(codeString)) + return V3ObservationMethod._0193; + if ("0194".equals(codeString)) + return V3ObservationMethod._0194; + if ("0195".equals(codeString)) + return V3ObservationMethod._0195; + if ("0196".equals(codeString)) + return V3ObservationMethod._0196; + if ("0197".equals(codeString)) + return V3ObservationMethod._0197; + if ("0198".equals(codeString)) + return V3ObservationMethod._0198; + if ("0199".equals(codeString)) + return V3ObservationMethod._0199; + if ("0200".equals(codeString)) + return V3ObservationMethod._0200; + if ("0201".equals(codeString)) + return V3ObservationMethod._0201; + if ("0202".equals(codeString)) + return V3ObservationMethod._0202; + if ("0203".equals(codeString)) + return V3ObservationMethod._0203; + if ("0204".equals(codeString)) + return V3ObservationMethod._0204; + if ("0205".equals(codeString)) + return V3ObservationMethod._0205; + if ("0206".equals(codeString)) + return V3ObservationMethod._0206; + if ("0207".equals(codeString)) + return V3ObservationMethod._0207; + if ("0208".equals(codeString)) + return V3ObservationMethod._0208; + if ("0209".equals(codeString)) + return V3ObservationMethod._0209; + if ("0210".equals(codeString)) + return V3ObservationMethod._0210; + if ("0211".equals(codeString)) + return V3ObservationMethod._0211; + if ("0212".equals(codeString)) + return V3ObservationMethod._0212; + if ("0213".equals(codeString)) + return V3ObservationMethod._0213; + if ("0214".equals(codeString)) + return V3ObservationMethod._0214; + if ("0215".equals(codeString)) + return V3ObservationMethod._0215; + if ("0216".equals(codeString)) + return V3ObservationMethod._0216; + if ("0217".equals(codeString)) + return V3ObservationMethod._0217; + if ("0218".equals(codeString)) + return V3ObservationMethod._0218; + if ("0219".equals(codeString)) + return V3ObservationMethod._0219; + if ("0220".equals(codeString)) + return V3ObservationMethod._0220; + if ("0221".equals(codeString)) + return V3ObservationMethod._0221; + if ("0222".equals(codeString)) + return V3ObservationMethod._0222; + if ("0223".equals(codeString)) + return V3ObservationMethod._0223; + if ("0224".equals(codeString)) + return V3ObservationMethod._0224; + if ("0225".equals(codeString)) + return V3ObservationMethod._0225; + if ("0226".equals(codeString)) + return V3ObservationMethod._0226; + if ("0227".equals(codeString)) + return V3ObservationMethod._0227; + if ("0228".equals(codeString)) + return V3ObservationMethod._0228; + if ("0229".equals(codeString)) + return V3ObservationMethod._0229; + if ("0230".equals(codeString)) + return V3ObservationMethod._0230; + if ("0231".equals(codeString)) + return V3ObservationMethod._0231; + if ("0232".equals(codeString)) + return V3ObservationMethod._0232; + if ("0233".equals(codeString)) + return V3ObservationMethod._0233; + if ("0234".equals(codeString)) + return V3ObservationMethod._0234; + if ("0235".equals(codeString)) + return V3ObservationMethod._0235; + if ("0236".equals(codeString)) + return V3ObservationMethod._0236; + if ("0237".equals(codeString)) + return V3ObservationMethod._0237; + if ("0238".equals(codeString)) + return V3ObservationMethod._0238; + if ("0239".equals(codeString)) + return V3ObservationMethod._0239; + if ("0243".equals(codeString)) + return V3ObservationMethod._0243; + if ("0244".equals(codeString)) + return V3ObservationMethod._0244; + if ("0247".equals(codeString)) + return V3ObservationMethod._0247; + if ("0248".equals(codeString)) + return V3ObservationMethod._0248; + if ("0249".equals(codeString)) + return V3ObservationMethod._0249; + if ("0250".equals(codeString)) + return V3ObservationMethod._0250; + if ("0251".equals(codeString)) + return V3ObservationMethod._0251; + if ("0252".equals(codeString)) + return V3ObservationMethod._0252; + if ("0253".equals(codeString)) + return V3ObservationMethod._0253; + if ("0254".equals(codeString)) + return V3ObservationMethod._0254; + if ("0255".equals(codeString)) + return V3ObservationMethod._0255; + if ("0256".equals(codeString)) + return V3ObservationMethod._0256; + if ("0257".equals(codeString)) + return V3ObservationMethod._0257; + if ("0258".equals(codeString)) + return V3ObservationMethod._0258; + if ("0259".equals(codeString)) + return V3ObservationMethod._0259; + if ("0260".equals(codeString)) + return V3ObservationMethod._0260; + if ("0261".equals(codeString)) + return V3ObservationMethod._0261; + if ("0262".equals(codeString)) + return V3ObservationMethod._0262; + if ("0263".equals(codeString)) + return V3ObservationMethod._0263; + if ("0264".equals(codeString)) + return V3ObservationMethod._0264; + if ("0265".equals(codeString)) + return V3ObservationMethod._0265; + if ("0266".equals(codeString)) + return V3ObservationMethod._0266; + if ("0267".equals(codeString)) + return V3ObservationMethod._0267; + if ("0268".equals(codeString)) + return V3ObservationMethod._0268; + if ("0269".equals(codeString)) + return V3ObservationMethod._0269; + if ("0270".equals(codeString)) + return V3ObservationMethod._0270; + if ("0271".equals(codeString)) + return V3ObservationMethod._0271; + if ("0280".equals(codeString)) + return V3ObservationMethod._0280; + if ("0240".equals(codeString)) + return V3ObservationMethod._0240; + if ("0241".equals(codeString)) + return V3ObservationMethod._0241; + if ("0242".equals(codeString)) + return V3ObservationMethod._0242; + if ("0272".equals(codeString)) + return V3ObservationMethod._0272; + if ("0245".equals(codeString)) + return V3ObservationMethod._0245; + if ("0246".equals(codeString)) + return V3ObservationMethod._0246; + if ("0273".equals(codeString)) + return V3ObservationMethod._0273; + if ("0274".equals(codeString)) + return V3ObservationMethod._0274; + if ("0275".equals(codeString)) + return V3ObservationMethod._0275; + if ("0275a".equals(codeString)) + return V3ObservationMethod._0275A; + if ("0276".equals(codeString)) + return V3ObservationMethod._0276; + if ("0277".equals(codeString)) + return V3ObservationMethod._0277; + if ("0278".equals(codeString)) + return V3ObservationMethod._0278; + if ("0279".equals(codeString)) + return V3ObservationMethod._0279; + if ("0127".equals(codeString)) + return V3ObservationMethod._0127; + throw new IllegalArgumentException("Unknown V3ObservationMethod code '"+codeString+"'"); + } + + public String toCode(V3ObservationMethod code) { + if (code == V3ObservationMethod._DECISIONOBSERVATIONMETHOD) + return "_DecisionObservationMethod"; + if (code == V3ObservationMethod.ALGM) + return "ALGM"; + if (code == V3ObservationMethod.BYCL) + return "BYCL"; + if (code == V3ObservationMethod.GINT) + return "GINT"; + if (code == V3ObservationMethod._GENETICOBSERVATIONMETHOD) + return "_GeneticObservationMethod"; + if (code == V3ObservationMethod.PCR) + return "PCR"; + if (code == V3ObservationMethod._OBSERVATIONMETHODAGGREGATE) + return "_ObservationMethodAggregate"; + if (code == V3ObservationMethod.AVERAGE) + return "AVERAGE"; + if (code == V3ObservationMethod.COUNT) + return "COUNT"; + if (code == V3ObservationMethod.MAX) + return "MAX"; + if (code == V3ObservationMethod.MEDIAN) + return "MEDIAN"; + if (code == V3ObservationMethod.MIN) + return "MIN"; + if (code == V3ObservationMethod.MODE) + return "MODE"; + if (code == V3ObservationMethod.STDEV_P) + return "STDEV.P"; + if (code == V3ObservationMethod.STDEV_S) + return "STDEV.S"; + if (code == V3ObservationMethod.SUM) + return "SUM"; + if (code == V3ObservationMethod.VARIANCE_P) + return "VARIANCE.P"; + if (code == V3ObservationMethod.VARIANCE_S) + return "VARIANCE.S"; + if (code == V3ObservationMethod._VERIFICATIONMETHOD) + return "_VerificationMethod"; + if (code == V3ObservationMethod.VDOC) + return "VDOC"; + if (code == V3ObservationMethod.VREG) + return "VREG"; + if (code == V3ObservationMethod.VTOKEN) + return "VTOKEN"; + if (code == V3ObservationMethod.VVOICE) + return "VVOICE"; + if (code == V3ObservationMethod._0001) + return "0001"; + if (code == V3ObservationMethod._0002) + return "0002"; + if (code == V3ObservationMethod._0003) + return "0003"; + if (code == V3ObservationMethod._0004) + return "0004"; + if (code == V3ObservationMethod._0005) + return "0005"; + if (code == V3ObservationMethod._0006) + return "0006"; + if (code == V3ObservationMethod._0007) + return "0007"; + if (code == V3ObservationMethod._0008) + return "0008"; + if (code == V3ObservationMethod._0009) + return "0009"; + if (code == V3ObservationMethod._0010) + return "0010"; + if (code == V3ObservationMethod._0011) + return "0011"; + if (code == V3ObservationMethod._0012) + return "0012"; + if (code == V3ObservationMethod._0013) + return "0013"; + if (code == V3ObservationMethod._0014) + return "0014"; + if (code == V3ObservationMethod._0015) + return "0015"; + if (code == V3ObservationMethod._0016) + return "0016"; + if (code == V3ObservationMethod._0017) + return "0017"; + if (code == V3ObservationMethod._0018) + return "0018"; + if (code == V3ObservationMethod._0019) + return "0019"; + if (code == V3ObservationMethod._0020) + return "0020"; + if (code == V3ObservationMethod._0021) + return "0021"; + if (code == V3ObservationMethod._0022) + return "0022"; + if (code == V3ObservationMethod._0023) + return "0023"; + if (code == V3ObservationMethod._0024) + return "0024"; + if (code == V3ObservationMethod._0025) + return "0025"; + if (code == V3ObservationMethod._0026) + return "0026"; + if (code == V3ObservationMethod._0027) + return "0027"; + if (code == V3ObservationMethod._0028) + return "0028"; + if (code == V3ObservationMethod._0029) + return "0029"; + if (code == V3ObservationMethod._0030) + return "0030"; + if (code == V3ObservationMethod._0031) + return "0031"; + if (code == V3ObservationMethod._0032) + return "0032"; + if (code == V3ObservationMethod._0033) + return "0033"; + if (code == V3ObservationMethod._0034) + return "0034"; + if (code == V3ObservationMethod._0035) + return "0035"; + if (code == V3ObservationMethod._0036) + return "0036"; + if (code == V3ObservationMethod._0037) + return "0037"; + if (code == V3ObservationMethod._0038) + return "0038"; + if (code == V3ObservationMethod._0039) + return "0039"; + if (code == V3ObservationMethod._0040) + return "0040"; + if (code == V3ObservationMethod._0041) + return "0041"; + if (code == V3ObservationMethod._0042) + return "0042"; + if (code == V3ObservationMethod._0043) + return "0043"; + if (code == V3ObservationMethod._0044) + return "0044"; + if (code == V3ObservationMethod._0045) + return "0045"; + if (code == V3ObservationMethod._0046) + return "0046"; + if (code == V3ObservationMethod._0047) + return "0047"; + if (code == V3ObservationMethod._0048) + return "0048"; + if (code == V3ObservationMethod._0049) + return "0049"; + if (code == V3ObservationMethod._0050) + return "0050"; + if (code == V3ObservationMethod._0051) + return "0051"; + if (code == V3ObservationMethod._0052) + return "0052"; + if (code == V3ObservationMethod._0053) + return "0053"; + if (code == V3ObservationMethod._0054) + return "0054"; + if (code == V3ObservationMethod._0055) + return "0055"; + if (code == V3ObservationMethod._0056) + return "0056"; + if (code == V3ObservationMethod._0057) + return "0057"; + if (code == V3ObservationMethod._0058) + return "0058"; + if (code == V3ObservationMethod._0059) + return "0059"; + if (code == V3ObservationMethod._0060) + return "0060"; + if (code == V3ObservationMethod._0061) + return "0061"; + if (code == V3ObservationMethod._0062) + return "0062"; + if (code == V3ObservationMethod._0063) + return "0063"; + if (code == V3ObservationMethod._0064) + return "0064"; + if (code == V3ObservationMethod._0065) + return "0065"; + if (code == V3ObservationMethod._0066) + return "0066"; + if (code == V3ObservationMethod._0067) + return "0067"; + if (code == V3ObservationMethod._0068) + return "0068"; + if (code == V3ObservationMethod._0069) + return "0069"; + if (code == V3ObservationMethod._0070) + return "0070"; + if (code == V3ObservationMethod._0071) + return "0071"; + if (code == V3ObservationMethod._0072) + return "0072"; + if (code == V3ObservationMethod._0073) + return "0073"; + if (code == V3ObservationMethod._0074) + return "0074"; + if (code == V3ObservationMethod._0075) + return "0075"; + if (code == V3ObservationMethod._0076) + return "0076"; + if (code == V3ObservationMethod._0077) + return "0077"; + if (code == V3ObservationMethod._0078) + return "0078"; + if (code == V3ObservationMethod._0079) + return "0079"; + if (code == V3ObservationMethod._0080) + return "0080"; + if (code == V3ObservationMethod._0081) + return "0081"; + if (code == V3ObservationMethod._0082) + return "0082"; + if (code == V3ObservationMethod._0083) + return "0083"; + if (code == V3ObservationMethod._0084) + return "0084"; + if (code == V3ObservationMethod._0085) + return "0085"; + if (code == V3ObservationMethod._0086) + return "0086"; + if (code == V3ObservationMethod._0087) + return "0087"; + if (code == V3ObservationMethod._0088) + return "0088"; + if (code == V3ObservationMethod._0089) + return "0089"; + if (code == V3ObservationMethod._0090) + return "0090"; + if (code == V3ObservationMethod._0091) + return "0091"; + if (code == V3ObservationMethod._0092) + return "0092"; + if (code == V3ObservationMethod._0093) + return "0093"; + if (code == V3ObservationMethod._0094) + return "0094"; + if (code == V3ObservationMethod._0095) + return "0095"; + if (code == V3ObservationMethod._0096) + return "0096"; + if (code == V3ObservationMethod._0097) + return "0097"; + if (code == V3ObservationMethod._0098) + return "0098"; + if (code == V3ObservationMethod._0099) + return "0099"; + if (code == V3ObservationMethod._0100) + return "0100"; + if (code == V3ObservationMethod._0101) + return "0101"; + if (code == V3ObservationMethod._0102) + return "0102"; + if (code == V3ObservationMethod._0103) + return "0103"; + if (code == V3ObservationMethod._0104) + return "0104"; + if (code == V3ObservationMethod._0105) + return "0105"; + if (code == V3ObservationMethod._0106) + return "0106"; + if (code == V3ObservationMethod._0107) + return "0107"; + if (code == V3ObservationMethod._0108) + return "0108"; + if (code == V3ObservationMethod._0109) + return "0109"; + if (code == V3ObservationMethod._0110) + return "0110"; + if (code == V3ObservationMethod._0111) + return "0111"; + if (code == V3ObservationMethod._0112) + return "0112"; + if (code == V3ObservationMethod._0113) + return "0113"; + if (code == V3ObservationMethod._0114) + return "0114"; + if (code == V3ObservationMethod._0115) + return "0115"; + if (code == V3ObservationMethod._0116) + return "0116"; + if (code == V3ObservationMethod._0117) + return "0117"; + if (code == V3ObservationMethod._0118) + return "0118"; + if (code == V3ObservationMethod._0119) + return "0119"; + if (code == V3ObservationMethod._0120) + return "0120"; + if (code == V3ObservationMethod._0121) + return "0121"; + if (code == V3ObservationMethod._0122) + return "0122"; + if (code == V3ObservationMethod._0123) + return "0123"; + if (code == V3ObservationMethod._0124) + return "0124"; + if (code == V3ObservationMethod._0125) + return "0125"; + if (code == V3ObservationMethod._0126) + return "0126"; + if (code == V3ObservationMethod._0128) + return "0128"; + if (code == V3ObservationMethod._0129) + return "0129"; + if (code == V3ObservationMethod._0130) + return "0130"; + if (code == V3ObservationMethod._0131) + return "0131"; + if (code == V3ObservationMethod._0132) + return "0132"; + if (code == V3ObservationMethod._0133) + return "0133"; + if (code == V3ObservationMethod._0134) + return "0134"; + if (code == V3ObservationMethod._0135) + return "0135"; + if (code == V3ObservationMethod._0136) + return "0136"; + if (code == V3ObservationMethod._0137) + return "0137"; + if (code == V3ObservationMethod._0138) + return "0138"; + if (code == V3ObservationMethod._0139) + return "0139"; + if (code == V3ObservationMethod._0140) + return "0140"; + if (code == V3ObservationMethod._0141) + return "0141"; + if (code == V3ObservationMethod._0142) + return "0142"; + if (code == V3ObservationMethod._0143) + return "0143"; + if (code == V3ObservationMethod._0144) + return "0144"; + if (code == V3ObservationMethod._0145) + return "0145"; + if (code == V3ObservationMethod._0146) + return "0146"; + if (code == V3ObservationMethod._0147) + return "0147"; + if (code == V3ObservationMethod._0148) + return "0148"; + if (code == V3ObservationMethod._0149) + return "0149"; + if (code == V3ObservationMethod._0150) + return "0150"; + if (code == V3ObservationMethod._0151) + return "0151"; + if (code == V3ObservationMethod._0152) + return "0152"; + if (code == V3ObservationMethod._0153) + return "0153"; + if (code == V3ObservationMethod._0154) + return "0154"; + if (code == V3ObservationMethod._0155) + return "0155"; + if (code == V3ObservationMethod._0156) + return "0156"; + if (code == V3ObservationMethod._0157) + return "0157"; + if (code == V3ObservationMethod._0158) + return "0158"; + if (code == V3ObservationMethod._0159) + return "0159"; + if (code == V3ObservationMethod._0160) + return "0160"; + if (code == V3ObservationMethod._0161) + return "0161"; + if (code == V3ObservationMethod._0162) + return "0162"; + if (code == V3ObservationMethod._0163) + return "0163"; + if (code == V3ObservationMethod._0164) + return "0164"; + if (code == V3ObservationMethod._0165) + return "0165"; + if (code == V3ObservationMethod._0166) + return "0166"; + if (code == V3ObservationMethod._0167) + return "0167"; + if (code == V3ObservationMethod._0168) + return "0168"; + if (code == V3ObservationMethod._0169) + return "0169"; + if (code == V3ObservationMethod._0170) + return "0170"; + if (code == V3ObservationMethod._0171) + return "0171"; + if (code == V3ObservationMethod._0172) + return "0172"; + if (code == V3ObservationMethod._0173) + return "0173"; + if (code == V3ObservationMethod._0174) + return "0174"; + if (code == V3ObservationMethod._0175) + return "0175"; + if (code == V3ObservationMethod._0176) + return "0176"; + if (code == V3ObservationMethod._0177) + return "0177"; + if (code == V3ObservationMethod._0178) + return "0178"; + if (code == V3ObservationMethod._0179) + return "0179"; + if (code == V3ObservationMethod._0180) + return "0180"; + if (code == V3ObservationMethod._0181) + return "0181"; + if (code == V3ObservationMethod._0182) + return "0182"; + if (code == V3ObservationMethod._0183) + return "0183"; + if (code == V3ObservationMethod._0184) + return "0184"; + if (code == V3ObservationMethod._0185) + return "0185"; + if (code == V3ObservationMethod._0186) + return "0186"; + if (code == V3ObservationMethod._0187) + return "0187"; + if (code == V3ObservationMethod._0188) + return "0188"; + if (code == V3ObservationMethod._0189) + return "0189"; + if (code == V3ObservationMethod._0190) + return "0190"; + if (code == V3ObservationMethod._0191) + return "0191"; + if (code == V3ObservationMethod._0192) + return "0192"; + if (code == V3ObservationMethod._0193) + return "0193"; + if (code == V3ObservationMethod._0194) + return "0194"; + if (code == V3ObservationMethod._0195) + return "0195"; + if (code == V3ObservationMethod._0196) + return "0196"; + if (code == V3ObservationMethod._0197) + return "0197"; + if (code == V3ObservationMethod._0198) + return "0198"; + if (code == V3ObservationMethod._0199) + return "0199"; + if (code == V3ObservationMethod._0200) + return "0200"; + if (code == V3ObservationMethod._0201) + return "0201"; + if (code == V3ObservationMethod._0202) + return "0202"; + if (code == V3ObservationMethod._0203) + return "0203"; + if (code == V3ObservationMethod._0204) + return "0204"; + if (code == V3ObservationMethod._0205) + return "0205"; + if (code == V3ObservationMethod._0206) + return "0206"; + if (code == V3ObservationMethod._0207) + return "0207"; + if (code == V3ObservationMethod._0208) + return "0208"; + if (code == V3ObservationMethod._0209) + return "0209"; + if (code == V3ObservationMethod._0210) + return "0210"; + if (code == V3ObservationMethod._0211) + return "0211"; + if (code == V3ObservationMethod._0212) + return "0212"; + if (code == V3ObservationMethod._0213) + return "0213"; + if (code == V3ObservationMethod._0214) + return "0214"; + if (code == V3ObservationMethod._0215) + return "0215"; + if (code == V3ObservationMethod._0216) + return "0216"; + if (code == V3ObservationMethod._0217) + return "0217"; + if (code == V3ObservationMethod._0218) + return "0218"; + if (code == V3ObservationMethod._0219) + return "0219"; + if (code == V3ObservationMethod._0220) + return "0220"; + if (code == V3ObservationMethod._0221) + return "0221"; + if (code == V3ObservationMethod._0222) + return "0222"; + if (code == V3ObservationMethod._0223) + return "0223"; + if (code == V3ObservationMethod._0224) + return "0224"; + if (code == V3ObservationMethod._0225) + return "0225"; + if (code == V3ObservationMethod._0226) + return "0226"; + if (code == V3ObservationMethod._0227) + return "0227"; + if (code == V3ObservationMethod._0228) + return "0228"; + if (code == V3ObservationMethod._0229) + return "0229"; + if (code == V3ObservationMethod._0230) + return "0230"; + if (code == V3ObservationMethod._0231) + return "0231"; + if (code == V3ObservationMethod._0232) + return "0232"; + if (code == V3ObservationMethod._0233) + return "0233"; + if (code == V3ObservationMethod._0234) + return "0234"; + if (code == V3ObservationMethod._0235) + return "0235"; + if (code == V3ObservationMethod._0236) + return "0236"; + if (code == V3ObservationMethod._0237) + return "0237"; + if (code == V3ObservationMethod._0238) + return "0238"; + if (code == V3ObservationMethod._0239) + return "0239"; + if (code == V3ObservationMethod._0243) + return "0243"; + if (code == V3ObservationMethod._0244) + return "0244"; + if (code == V3ObservationMethod._0247) + return "0247"; + if (code == V3ObservationMethod._0248) + return "0248"; + if (code == V3ObservationMethod._0249) + return "0249"; + if (code == V3ObservationMethod._0250) + return "0250"; + if (code == V3ObservationMethod._0251) + return "0251"; + if (code == V3ObservationMethod._0252) + return "0252"; + if (code == V3ObservationMethod._0253) + return "0253"; + if (code == V3ObservationMethod._0254) + return "0254"; + if (code == V3ObservationMethod._0255) + return "0255"; + if (code == V3ObservationMethod._0256) + return "0256"; + if (code == V3ObservationMethod._0257) + return "0257"; + if (code == V3ObservationMethod._0258) + return "0258"; + if (code == V3ObservationMethod._0259) + return "0259"; + if (code == V3ObservationMethod._0260) + return "0260"; + if (code == V3ObservationMethod._0261) + return "0261"; + if (code == V3ObservationMethod._0262) + return "0262"; + if (code == V3ObservationMethod._0263) + return "0263"; + if (code == V3ObservationMethod._0264) + return "0264"; + if (code == V3ObservationMethod._0265) + return "0265"; + if (code == V3ObservationMethod._0266) + return "0266"; + if (code == V3ObservationMethod._0267) + return "0267"; + if (code == V3ObservationMethod._0268) + return "0268"; + if (code == V3ObservationMethod._0269) + return "0269"; + if (code == V3ObservationMethod._0270) + return "0270"; + if (code == V3ObservationMethod._0271) + return "0271"; + if (code == V3ObservationMethod._0280) + return "0280"; + if (code == V3ObservationMethod._0240) + return "0240"; + if (code == V3ObservationMethod._0241) + return "0241"; + if (code == V3ObservationMethod._0242) + return "0242"; + if (code == V3ObservationMethod._0272) + return "0272"; + if (code == V3ObservationMethod._0245) + return "0245"; + if (code == V3ObservationMethod._0246) + return "0246"; + if (code == V3ObservationMethod._0273) + return "0273"; + if (code == V3ObservationMethod._0274) + return "0274"; + if (code == V3ObservationMethod._0275) + return "0275"; + if (code == V3ObservationMethod._0275A) + return "0275a"; + if (code == V3ObservationMethod._0276) + return "0276"; + if (code == V3ObservationMethod._0277) + return "0277"; + if (code == V3ObservationMethod._0278) + return "0278"; + if (code == V3ObservationMethod._0279) + return "0279"; + if (code == V3ObservationMethod._0127) + return "0127"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValue.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValue.java new file mode 100644 index 00000000000..bdfb91e2c38 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValue.java @@ -0,0 +1,2243 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationValue { + + /** + * Codes specify the category of observation, evidence, or document used to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values. + */ + _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE, + /** + * Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay stub; tax or income document; asset document; living expenses. + */ + _ACTFINANCIALSTATUSOBSERVATIONVALUE, + /** + * Codes specifying asset indicators used to assess or establish eligibility for coverage under a policy or program. + */ + ASSET, + /** + * Indicator of annuity ownership or status as beneficiary. + */ + ANNUITY, + /** + * Indicator of real property ownership, e.g., deed or real estate contract. + */ + PROP, + /** + * Indicator of retirement investment account ownership. + */ + RETACCT, + /** + * Indicator of status as trust beneficiary. + */ + TRUST, + /** + * Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay or pension check, child support payments received or provided, and taxes paid. + */ + INCOME, + /** + * Indicator of child support payments received or provided. + */ + CHILD, + /** + * Indicator of disability income replacement payment. + */ + DISABL, + /** + * Indicator of investment income, e.g., dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check. + */ + INVEST, + /** + * Indicator of paid employment, e.g., letter of hire, contract, employer letter; copy of pay check or pay stub. + */ + PAY, + /** + * Indicator of retirement payment, e.g., pension check. + */ + RETIRE, + /** + * Indicator of spousal or partner support payments received or provided; e.g., alimony payment; support stipulations in a divorce settlement. + */ + SPOUSAL, + /** + * Indicator of income supplement, e.g., gifting, parental income support; stipend, or grant. + */ + SUPPLE, + /** + * Indicator of tax obligation or payment, e.g., statement of taxable income. + */ + TAX, + /** + * Codes specifying living expense indicators used to assess or establish eligibility for coverage under a policy or program. + */ + LIVEXP, + /** + * Indicator of clothing expenses. + */ + CLOTH, + /** + * Indicator of transportation expenses. + */ + FOOD, + /** + * Indicator of health expenses; including medication costs, health service costs, financial participations, and health coverage premiums. + */ + HEALTH, + /** + * Indicator of housing expense, e.g., household appliances, fixtures, furnishings, and maintenance and repairs. + */ + HOUSE, + /** + * Indicator of legal expenses. + */ + LEGAL, + /** + * Indicator of mortgage amount, interest, and payments. + */ + MORTG, + /** + * Indicator of rental or lease payments. + */ + RENT, + /** + * Indicator of transportation expenses. + */ + SUNDRY, + /** + * Indicator of transportation expenses, e.g., vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs. + */ + TRANS, + /** + * Indicator of transportation expenses. + */ + UTIL, + /** + * Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g., certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate. + */ + ELSTAT, + /** + * Indicator of adoption. + */ + ADOPT, + /** + * Indicator of birth. + */ + BTHCERT, + /** + * Indicator of creditable coverage. + */ + CCOC, + /** + * Indicator of driving status. + */ + DRLIC, + /** + * Indicator of foster child status. + */ + FOSTER, + /** + * Indicator of status as covered member under a policy or program, e.g., member id card or coverage document. + */ + MEMBER, + /** + * Indicator of military status. + */ + MIL, + /** + * Indicator of marriage status. + */ + MRGCERT, + /** + * Indicator of citizenship. + */ + PASSPORT, + /** + * Indicator of student status. + */ + STUDENRL, + /** + * Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g., pregnancy, disability, drug use, mental health issues. + */ + HLSTAT, + /** + * Indication of disability. + */ + DISABLE, + /** + * Indication of drug use. + */ + DRUG, + /** + * Indication of IV drug use . + */ + IVDRG, + /** + * Non-clinical report of pregnancy. + */ + PGNT, + /** + * Code specifying observations related to living dependency, such as dependent upon spouse for activities of daily living. + */ + LIVDEP, + /** + * Continued living in private residence requires functional and health care assistance from one or more relatives. + */ + RELDEP, + /** + * Continued living in private residence requires functional and health care assistance from spouse or life partner. + */ + SPSDEP, + /** + * Continued living in private residence requires functional and health care assistance from one or more unrelated persons. + */ + URELDEP, + /** + * Code specifying observations related to living situation for a person in a private residence. + */ + LIVSIT, + /** + * Living alone. Maps to PD1-2 Living arrangement (IS) 00742 [A] + */ + ALONE, + /** + * Living with one or more dependent children requiring moderate supervision. + */ + DEPCHD, + /** + * Living with disabled spouse requiring functional and health care assistance + */ + DEPSPS, + /** + * Living with one or more dependent children requiring intensive supervision + */ + DEPYGCHD, + /** + * Living with family. Maps to PD1-2 Living arrangement (IS) 00742 [F] + */ + FAM, + /** + * Living with one or more relatives. Maps to PD1-2 Living arrangement (IS) 00742 [R] + */ + RELAT, + /** + * Living only with spouse or life partner. Maps to PD1-2 Living arrangement (IS) 00742 [S] + */ + SPS, + /** + * Living with one or more unrelated persons. + */ + UNREL, + /** + * Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. + */ + SOECSTAT, + /** + * Indication of abuse victim. + */ + ABUSE, + /** + * Indication of status as homeless. + */ + HMLESS, + /** + * Indication of status as illegal immigrant. + */ + ILGIM, + /** + * Indication of status as incarcerated. + */ + INCAR, + /** + * Indication of probation status. + */ + PROB, + /** + * Indication of refugee status. + */ + REFUG, + /** + * Indication of unemployed status. + */ + UNEMPL, + /** + * Indicates the result of a particular allergy test. E.g. Negative, Mild, Moderate, Severe + */ + _ALLERGYTESTVALUE, + /** + * Description:Patient exhibits no reaction to the challenge agent. + */ + A0, + /** + * Description:Patient exhibits a minimal reaction to the challenge agent. + */ + A1, + /** + * Description:Patient exhibits a mild reaction to the challenge agent. + */ + A2, + /** + * Description:Patient exhibits moderate reaction to the challenge agent. + */ + A3, + /** + * Description:Patient exhibits a severe reaction to the challenge agent. + */ + A4, + /** + * Description:Coded observation values for coverage limitations, for e.g., types of claims or types of parties covered under a policy or program. + */ + _COVERAGELIMITOBSERVATIONVALUE, + /** + * Description:Coded observation values for types of covered parties under a policy or program based on their personal relationships or employment status. + */ + _COVERAGELEVELOBSERVATIONVALUE, + /** + * Description:Child over an age as specified by coverage policy or program, e.g., student, differently abled, and income dependent. + */ + ADC, + /** + * Description:Dependent biological, adopted, foster child as specified by coverage policy or program. + */ + CHD, + /** + * Description:Person requiring functional and/or financial assistance from another person as specified by coverage policy or program. + */ + DEP, + /** + * Description:Persons registered as a family unit in a domestic partner registry as specified by law and by coverage policy or program. + */ + DP, + /** + * Description:An individual employed by an employer who receive remuneration in wages, salary, commission, tips, piece-rates, or pay-in-kind through the employeraTMs payment system (i.e., not a contractor) as specified by coverage policy or program. + */ + ECH, + /** + * Description:As specified by coverage policy or program. + */ + FLY, + /** + * Description:Person as specified by coverage policy or program. + */ + IND, + /** + * Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g., Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades + */ + SSP, + /** + * A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality. + */ + _CRITICALITYOBSERVATIONVALUE, + /** + * Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure. + */ + CRITH, + /** + * Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure. + */ + CRITL, + /** + * Unable to assess the worst case result of a future exposure. + */ + CRITU, + /** + * Description: The domain contains genetic analysis specific observation values, e.g. Homozygote, Heterozygote, etc. + */ + _GENETICOBSERVATIONVALUE, + /** + * Description: An individual having different alleles at one or more loci regarding a specific character + */ + HOMOZYGOTE, + /** + * Observation values used to indicate the type of scoring (e.g. proportion, ratio) used by a health quality measure. + */ + _OBSERVATIONMEASURESCORING, + /** + * A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g., Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration). + */ + COHORT, + /** + * A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g., mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics). + */ + CONTVAR, + /** + * A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g., percentage of eligible women with a mammogram performed in the last year). + */ + PROPOR, + /** + * A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g., the number of patients with central lines who develop infection divided by the number of central line days). + */ + RATIO, + /** + * Observation values used to indicate what kind of health quality measure is used. + */ + _OBSERVATIONMEASURETYPE, + /** + * A measure that is composed from one or more other measures and indicates an overall summary of those measures. + */ + COMPOSITE, + /** + * A measure related to the efficiency of medical treatment. + */ + EFFICIENCY, + /** + * A measure related to the level of patient engagement or patient experience of care. + */ + EXPERIENCE, + /** + * A measure that indicates the result of the performance (or non-performance) of a function or process. + */ + OUTCOME, + /** + * A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome. + */ + PROCESS, + /** + * A measure related to the extent of use of clinical resources or cost of care. + */ + RESOURCE, + /** + * A measure related to the structure of patient care. + */ + STRUCTURE, + /** + * Observation values used to assert various populations that a subject falls into. + */ + _OBSERVATIONPOPULATIONINCLUSION, + /** + * Patients who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. + */ + DENEX, + /** + * Denominator exceptions are those conditions that should remove a patient, procedure or unit of measurement from the denominator only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories: + + + Medical reasons + Patient reasons + System reasons + */ + DENEXCEP, + /** + * It can be the same as the initial patient population or a subset of the initial patient population to further constrain the population for the purpose of the eMeasure. Different measures within an eMeasure set may have different Denominators. Continuous Variable eMeasures do not have a Denominator, but instead define a Measure Population. + */ + DENOM, + /** + * The initial population refers to all entities to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. + */ + IP, + /** + * The initial patient population refers to all patients to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods. + */ + IPP, + /** + * Measure population is used only in continuous variable eMeasures. It is a narrative description of the eMeasure population. +(e.g., all patients seen in the Emergency Department during the measurement period). + */ + MSRPOPL, + /** + * Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + */ + NUMER, + /** + * Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.) + */ + NUMEX, + /** + * PartialCompletionScale + */ + _PARTIALCOMPLETIONSCALE, + /** + * Value for Act.partialCompletionCode attribute that implies 81-99% completion + */ + G, + /** + * Value for Act.partialCompletionCode attribute that implies 61-80% completion + */ + LE, + /** + * Value for Act.partialCompletionCode attribute that implies 41-60% completion + */ + ME, + /** + * Value for Act.partialCompletionCode attribute that implies 1-20% completion + */ + MI, + /** + * Value for Act.partialCompletionCode attribute that implies 0% completion + */ + N, + /** + * Value for Act.partialCompletionCode attribute that implies 21-40% completion + */ + S, + /** + * Observation values used to indicate security observation metadata. + */ + _SECURITYOBSERVATIONVALUE, + /** + * Abstract security observation values used to indicate security integrity metadata. + + + Examples: Codes conveying integrity status, integrity confidence, and provenance. + */ + _SECINTOBV, + /** + * Abstract security metadata observation values used to indicate mechanism used for authorized alteration of an IT resource (data, information object, service, or system capability) + */ + _SECALTINTOBV, + /** + * Security metadata observation values used to indicate the use of a more abstract version of the content, e.g., replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN. + */ + ABSTRED, + /** + * Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g., average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary. + */ + AGGRED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by used to indicate the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. No key to relink the data is retained. + */ + ANONYED, + /** + * Security metadata observation value used to indicate that the IT resource semantic content has been transformed from one encoding to another. + + + Usage Note: "MAP" code does not indicate the semantic fidelity of the transformed content. + + To indicate semantic fidelity for maps of HL7 to other code systems, this security alteration integrity observation may be further specified using an Act valued with Value Set: MapRelationship (2.16.840.1.113883.1.11.11052). + + Semantic fidelity of the mapped IT Resource may also be indicated using a SecurityIntegrityConfidenceObservation. + */ + MAPPED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by indicating the mechanism by which software systems can make data unintelligible (that is, as unreadable and unusable by algorithmically transforming plaintext into ciphertext) such that it can only be accessed or used by authorized users. An authorized user may be provided a key to decrypt per license or "shared secret". + + + Usage Note: "MASKED" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has been further encrypted, and may be accessed only by an authorized user or receiver to which a decryption key is provided. + */ + MASKED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability), by indicating the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject. + + + Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization + */ + PSEUDED, + /** + * Security metadata observation value used to indicate the mechanism by which software systems can filter an IT resource (data, information object, service, or system capability) to remove any portion of the resource that is not authorized to be access, used, or disclosed. + + + Usage Note: "REDACTED" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has filtered and not included in the content accessed or received. + */ + REDACTED, + /** + * Metadata observation used to indicate that some information has been removed from the source object when the view this object contains was constructed because of configuration options when the view was created. The content may not be suitable for use as the basis of a record update + + + Usage Note: This is not suitable to be used when information is removed for security reasons - see the code REDACTED for this use. + */ + SUBSETTED, + /** + * Security metadata observation value used to indicate that the IT resource syntax has been transformed from one syntactical representation to another. + + + Usage Note: "SYNTAC" code does not indicate the syntactical correctness of the syntactically transformed IT resource. + */ + SYNTAC, + /** + * Security metadata observation value used to indicate that the IT resource has been translated from one human language to another. + + + Usage Note: "TRSLT" does not indicate the fidelity of the translation or the languages translated. + + The fidelity of the IT Resource translation may be indicated using a SecurityIntegrityConfidenceObservation. + + To indicate languages, use the Value Set:HumanLanguage (2.16.840.1.113883.1.11.11526) + */ + TRSLT, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) which indicates that the resource only retains versions of an IT resource for access and use per applicable policy + + + Usage Note: When this code is used, expectation is that the system has removed historical versions of the data that falls outside the time period deemed to be the effective time of the applicable version. + */ + VERSIONED, + /** + * Abstract security observation values used to indicate data integrity metadata. + + + Examples: Codes conveying the mechanism used to preserve the accuracy and consistency of an IT resource such as a digital signature and a cryptographic hash function. + */ + _SECDATINTOBV, + /** + * Security metadata observation value used to indicate the mechanism by which software systems can establish that data was not modified in transit. + + + Rationale: This definition is intended to align with the ISO 22600-2 3.3.19 definition of cryptographic checkvalue: Information which is derived by performing a cryptographic transformation (see cryptography) on the data unit. The derivation of the checkvalue may be performed in one or more steps and is a result of a mathematical function of the key and a data unit. It is usually used to check the integrity of a data unit. + + + Examples: + + + + SHA-1 + SHA-2 (Secure Hash Algorithm) + */ + CRYTOHASH, + /** + * Security metadata observation value used to indicate the mechanism by which software systems use digital signature to establish that data has not been modified. + + + Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient. + */ + DIGSIG, + /** + * Abstract security observation value used to indicate integrity confidence metadata. + + + Examples: Codes conveying the level of reliability and trustworthiness of an IT resource. + */ + _SECINTCONOBV, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be very high. + */ + HRELIABLE, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be adequate. + */ + RELIABLE, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be uncertain. + */ + UNCERTREL, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be inadequate. + */ + UNRELIABLE, + /** + * Abstract security metadata observation value used to indicate the provenance of an IT resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity reporting an IT resource. + */ + _SECINTPRVOBV, + /** + * Abstract security provenance metadata observation value used to indicate the entity that asserted an IT resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity asserting the resource. + */ + _SECINTPRVABOBV, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a clinician. + */ + CLINAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a device. + */ + DEVAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a healthcare professional. + */ + HCPAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient acquaintance. + */ + PACQAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient. + */ + PATAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a payer. + */ + PAYAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a professional. + */ + PROAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a substitute decision maker. + */ + SDMAST, + /** + * Abstract security provenance metadata observation value used to indicate the entity that reported the resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity reporting an IT resource. + */ + _SECINTPRVRBOBV, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a clinician. + */ + CLINRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a device. + */ + DEVRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a healthcare professional. + */ + HCPRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient acquaintance. + */ + PACQRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient. + */ + PATRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a payer. + */ + PAYRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a professional. + */ + PRORPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a substitute decision maker. + */ + SDMRPT, + /** + * Observation value used to indicate aspects of trust applicable to an IT resource (data, information object, service, or system capability). + */ + SECTRSTOBV, + /** + * Values for security trust accreditation metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRDOBV, + /** + * Values for security trust agreement metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] +[ISO IEC 10181-1] + */ + TRSTAGREOBV, + /** + * Values for security trust certificate metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + + For example, a Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. A particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. Another example is Cross Certification with Federal Bridge. + */ + TRSTCERTOBV, + /** + * Values for security trust assurance metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTLOAOBV, + /** + * The value assigned as the indicator of the digital quality or reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + For example, the degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + */ + LOAAN, + /** + * Indicator of low digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Low authentication level of assurance indicates that the relying party may have little or no confidence in the asserted identity's validity. Level 1 requires little or no confidence in the asserted identity. No identity proofing is required at this level, but the authentication mechanism should provide some assurance that the same claimant is accessing the protected transaction or data. A wide range of available authentication technologies can be employed and any of the token methods of Levels 2, 3, or 4, including Personal Identification Numbers (PINs), may be used. To be authenticated, the claimant must prove control of the token through a secure authentication protocol. At Level 1, long-term shared authentication secrets may be revealed to verifiers. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN1, + /** + * Indicator of basic digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Basic authentication level of assurance indicates that the relying party may have some confidence in the asserted identity's validity. Level 2 requires confidence that the asserted identity is accurate. Level 2 provides for single-factor remote network authentication, including identity-proofing requirements for presentation of identifying materials or information. A wide range of available authentication technologies can be employed, including any of the token methods of Levels 3 or 4, as well as passwords. Successful authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, and online guessing attacks are prevented. +Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are required. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN2, + /** + * Indicator of medium digital quality or reliability of the digital reliability of verification and validation of the process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Medium authentication level of assurance indicates that the relying party may have high confidence in the asserted identity's validity. Level 3 is appropriate for transactions that need high confidence in the accuracy of the asserted identity. Level 3 provides multifactor remote network authentication. At this level, identity-proofing procedures require verification of identifying materials and information. Authentication is based on proof of possession of a key or password through a cryptographic protocol. Cryptographic strength mechanisms should protect the primary authentication token (a cryptographic key) against compromise by the protocol threats, including eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks. A minimum of two authentication factors is required. Three kinds of tokens may be used: + + + "soft" cryptographic token, which has the key stored on a general-purpose computer, + "hard" cryptographic token, which has the key stored on a special hardware device, and + "one-time password" device token, which has symmetric key stored on a personal hardware device that is a cryptographic module validated at FIPS 140-2 Level 1 or higher. Validation testing of cryptographic modules and algorithms for conformance to Federal Information Processing Standard (FIPS) 140-2, Security Requirements for Cryptographic Modules, is managed by NIST. + + Authentication requires that the claimant prove control of the token through a secure authentication protocol. The token must be unlocked with a password or biometric representation, or a password must be used in a secure authentication protocol, to establish two-factor authentication. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are used for all operations. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN3, + /** + * Indicator of high digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + High authentication level of assurance indicates that the relying party may have very high confidence in the asserted identity's validity. Level 4 is for transactions that need very high confidence in the accuracy of the asserted identity. Level 4 provides the highest practical assurance of remote network authentication. Authentication is based on proof of possession of a key through a cryptographic protocol. This level is similar to Level 3 except that only “hard� cryptographic tokens are allowed, cryptographic module validation requirements are strengthened, and subsequent critical data transfers must be authenticated via a key that is bound to the authentication process. The token should be a hardware cryptographic module validated at FIPS 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. This level requires a physical token, which cannot readily be copied, and operator authentication at Level 2 and higher, and ensures good, two-factor remote authentication. + + Level 4 requires strong cryptographic authentication of all parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks are prevented. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Strong approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN4, + /** + * The value assigned as the indicator of the digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + */ + LOAAP, + /** + * Indicator of the low digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Low authentication process level of assurance indicates that (1) long-term shared authentication secrets may be revealed to verifiers; and (2) assertions and assertion references require protection from manufacture/modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP1, + /** + * Indicator of the basic digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Basic authentication process level of assurance indicates that long-term shared authentication secrets are never revealed to any other party except Credential Service Provider (CSP). Sessions (temporary) shared secrets may be provided to independent verifiers by CSP. Long-term shared authentication secrets, if used, are never revealed to any other party except Verifiers operated by the Credential Service Provider (CSP); however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 1 requirements, assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP2, + /** + * Indicator of the medium digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Medium authentication process level of assurance indicates that the token can be unlocked with password, biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication. Long-term shared authentication secrets are never revealed to any party except the Claimant and Credential Service Provider (CSP). + + Authentication requires that the Claimant prove, through a secure authentication protocol, that he or she controls the token. The Claimant unlocks the token with a password or biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication (through proof of possession of a physical or software token in combination with some memorized secret knowledge). Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 2 requirements, assertions are protected against repudiation by the Verifier. + */ + LOAAP3, + /** + * Indicator of the high digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + High authentication process level of assurance indicates all sensitive data transfer are cryptographically authenticated using keys bound to the authentication process. Level 4 requires strong cryptographic authentication of all communicating parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the Claimant prove through a secure authentication protocol that he or she controls the token. All protocol threats at Level 3 are required to be prevented at Level 4. Protocols shall also be strongly resistant to man-in-the-middle attacks. Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. Approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP4, + /** + * The value assigned as the indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + */ + LOAAS, + /** + * Indicator of the low quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions and assertion references require protection from modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS1, + /** + * Indicator of the basic quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required for all assertion protocols. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS2, + /** + * Indicator of the medium quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions are protected against repudiation by the verifier. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS3, + /** + * Indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Strongly resistant to man-in-the-middle attacks. "Bearer" assertions are not used. "Holder-of-key" assertions may be used. RP maintains records of the assertions. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS4, + /** + * Indicator of the digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM, + /** + * Indicator of the low digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Little or no confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include weak identity binding to tokens and plaintext passwords or secrets not transmitted across a network. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM1, + /** + * Indicator of the basic digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Some confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verification must prove claimant controls the token; token resists online guessing, replay, session hijacking, and eavesdropping attacks; and token is at least weakly resistant to man-in-the middle attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM2, + /** + * Indicator of the medium digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. High confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Ownership of token verifiable through security authentication protocol and credential management protects against verifier impersonation attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM3, + /** + * Indicator of the high digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. Very high confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verifier can prove control of token through a secure protocol; credential management supports strong cryptographic authentication of all communication parties. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM4, + /** + * Indicator of the quality or reliability in the process of ascertaining that an individual is who he or she claims to be. + */ + LOAID, + /** + * Indicator of low digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires that a continuity of identity be maintained but does not require identity proofing. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID1, + /** + * Indicator of some digital quality or reliability in the process of ascertaining that that an individual is who he or she claims to be. Requires identity proofing via presentation of identifying material or information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID2, + /** + * Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID3, + /** + * Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID4, + /** + * Indicator of the digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR, + /** + * Indicator of low digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR1, + /** + * Indicator of basic digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR2, + /** + * Indicator of medium digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR3, + /** + * Indicator of high digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR4, + /** + * Indicator of the digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA, + /** + * Indicator of low digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA1, + /** + * Indicator of basic digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA2, + /** + * Indicator of medium digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA3, + /** + * Indicator of high digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization's security controls. [Based on NIST SP 800-63-2] + */ + LOARA4, + /** + * Indicator of the digital quality or reliability of single and multi-token authentication. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK, + /** + * Indicator of the low digital quality or reliability of single and multi-token authentication. Permits the use of any of the token methods of Levels 2, 3, or 4. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK1, + /** + * Indicator of the basic digital quality or reliability of single and multi-token authentication. Requires single factor authentication using memorized secret tokens, pre-registered knowledge tokens, look-up secret tokens, out of band tokens, or single factor one-time password devices. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK2, + /** + * Indicator of the medium digital quality or reliability of single and multi-token authentication. Requires two authentication factors. Provides multi-factor remote network authentication. Permits multi-factor software cryptographic token. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK3, + /** + * Indicator of the high digital quality or reliability of single and multi-token authentication. Requires token that is a hardware cryptographic module validated at validated at Federal Information Processing Standard (FIPS) 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. Level 4 token requirements can be met by using the PIV authentication key of a FIPS 201 compliant Personal Identity Verification (PIV) Card. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK4, + /** + * Values for security trust mechanism metadata observation made about a security architecture system component that supports enforcement of security policies. + */ + TRSTMECOBV, + /** + * Potential values for observations of severity. + */ + _SEVERITYOBSERVATION, + /** + * Indicates the condition may be life-threatening or has the potential to cause permanent injury. + */ + H, + /** + * Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subject. + */ + L, + /** + * Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury. + */ + M, + /** + * Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted. + */ + _SUBJECTBODYPOSITION, + /** + * Lying on the left side. + */ + LLD, + /** + * Lying with the front or ventral surface downward; lying face down. + */ + PRN, + /** + * Lying on the right side. + */ + RLD, + /** + * A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees. + */ + SFWL, + /** + * Resting the body on the buttocks, typically with upper torso erect or semi erect. + */ + SIT, + /** + * To be stationary, upright, vertical, on one's legs. + */ + STN, + /** + * supine + */ + SUP, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered. + */ + RTRD, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised. + */ + TRD, + /** + * Values for observations of verification act results + + + Examples: Verified, not verified, verified with warning. + */ + _VERIFICATIONOUTCOMEVALUE, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s). + */ + ACT, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s) - Pending Investigation + */ + ACTPEND, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s). + */ + ELG, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s). + */ + INACT, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Investigation. + */ + INPNDINV, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Eligibility Update. + */ + INPNDUPD, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility. + */ + NELG, + /** + * AnnotationValue + */ + _ANNOTATIONVALUE, + /** + * Description:Used in a patient care message to value simple clinical (non-lab) observations. + */ + _COMMONCLINICALOBSERVATIONVALUE, + /** + * This domain is established as a parent to a variety of value domains being defined to support the communication of Individual Case Safety Reports to regulatory bodies. Arguably, this aggregation is not taxonomically pure, but the grouping will facilitate the management of these domains. + */ + _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS, + /** + * Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.). E.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc. + */ + _INDICATIONVALUE, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationValue fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActCoverageAssessmentObservationValue".equals(codeString)) + return _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE; + if ("_ActFinancialStatusObservationValue".equals(codeString)) + return _ACTFINANCIALSTATUSOBSERVATIONVALUE; + if ("ASSET".equals(codeString)) + return ASSET; + if ("ANNUITY".equals(codeString)) + return ANNUITY; + if ("PROP".equals(codeString)) + return PROP; + if ("RETACCT".equals(codeString)) + return RETACCT; + if ("TRUST".equals(codeString)) + return TRUST; + if ("INCOME".equals(codeString)) + return INCOME; + if ("CHILD".equals(codeString)) + return CHILD; + if ("DISABL".equals(codeString)) + return DISABL; + if ("INVEST".equals(codeString)) + return INVEST; + if ("PAY".equals(codeString)) + return PAY; + if ("RETIRE".equals(codeString)) + return RETIRE; + if ("SPOUSAL".equals(codeString)) + return SPOUSAL; + if ("SUPPLE".equals(codeString)) + return SUPPLE; + if ("TAX".equals(codeString)) + return TAX; + if ("LIVEXP".equals(codeString)) + return LIVEXP; + if ("CLOTH".equals(codeString)) + return CLOTH; + if ("FOOD".equals(codeString)) + return FOOD; + if ("HEALTH".equals(codeString)) + return HEALTH; + if ("HOUSE".equals(codeString)) + return HOUSE; + if ("LEGAL".equals(codeString)) + return LEGAL; + if ("MORTG".equals(codeString)) + return MORTG; + if ("RENT".equals(codeString)) + return RENT; + if ("SUNDRY".equals(codeString)) + return SUNDRY; + if ("TRANS".equals(codeString)) + return TRANS; + if ("UTIL".equals(codeString)) + return UTIL; + if ("ELSTAT".equals(codeString)) + return ELSTAT; + if ("ADOPT".equals(codeString)) + return ADOPT; + if ("BTHCERT".equals(codeString)) + return BTHCERT; + if ("CCOC".equals(codeString)) + return CCOC; + if ("DRLIC".equals(codeString)) + return DRLIC; + if ("FOSTER".equals(codeString)) + return FOSTER; + if ("MEMBER".equals(codeString)) + return MEMBER; + if ("MIL".equals(codeString)) + return MIL; + if ("MRGCERT".equals(codeString)) + return MRGCERT; + if ("PASSPORT".equals(codeString)) + return PASSPORT; + if ("STUDENRL".equals(codeString)) + return STUDENRL; + if ("HLSTAT".equals(codeString)) + return HLSTAT; + if ("DISABLE".equals(codeString)) + return DISABLE; + if ("DRUG".equals(codeString)) + return DRUG; + if ("IVDRG".equals(codeString)) + return IVDRG; + if ("PGNT".equals(codeString)) + return PGNT; + if ("LIVDEP".equals(codeString)) + return LIVDEP; + if ("RELDEP".equals(codeString)) + return RELDEP; + if ("SPSDEP".equals(codeString)) + return SPSDEP; + if ("URELDEP".equals(codeString)) + return URELDEP; + if ("LIVSIT".equals(codeString)) + return LIVSIT; + if ("ALONE".equals(codeString)) + return ALONE; + if ("DEPCHD".equals(codeString)) + return DEPCHD; + if ("DEPSPS".equals(codeString)) + return DEPSPS; + if ("DEPYGCHD".equals(codeString)) + return DEPYGCHD; + if ("FAM".equals(codeString)) + return FAM; + if ("RELAT".equals(codeString)) + return RELAT; + if ("SPS".equals(codeString)) + return SPS; + if ("UNREL".equals(codeString)) + return UNREL; + if ("SOECSTAT".equals(codeString)) + return SOECSTAT; + if ("ABUSE".equals(codeString)) + return ABUSE; + if ("HMLESS".equals(codeString)) + return HMLESS; + if ("ILGIM".equals(codeString)) + return ILGIM; + if ("INCAR".equals(codeString)) + return INCAR; + if ("PROB".equals(codeString)) + return PROB; + if ("REFUG".equals(codeString)) + return REFUG; + if ("UNEMPL".equals(codeString)) + return UNEMPL; + if ("_AllergyTestValue".equals(codeString)) + return _ALLERGYTESTVALUE; + if ("A0".equals(codeString)) + return A0; + if ("A1".equals(codeString)) + return A1; + if ("A2".equals(codeString)) + return A2; + if ("A3".equals(codeString)) + return A3; + if ("A4".equals(codeString)) + return A4; + if ("_CoverageLimitObservationValue".equals(codeString)) + return _COVERAGELIMITOBSERVATIONVALUE; + if ("_CoverageLevelObservationValue".equals(codeString)) + return _COVERAGELEVELOBSERVATIONVALUE; + if ("ADC".equals(codeString)) + return ADC; + if ("CHD".equals(codeString)) + return CHD; + if ("DEP".equals(codeString)) + return DEP; + if ("DP".equals(codeString)) + return DP; + if ("ECH".equals(codeString)) + return ECH; + if ("FLY".equals(codeString)) + return FLY; + if ("IND".equals(codeString)) + return IND; + if ("SSP".equals(codeString)) + return SSP; + if ("_CriticalityObservationValue".equals(codeString)) + return _CRITICALITYOBSERVATIONVALUE; + if ("CRITH".equals(codeString)) + return CRITH; + if ("CRITL".equals(codeString)) + return CRITL; + if ("CRITU".equals(codeString)) + return CRITU; + if ("_GeneticObservationValue".equals(codeString)) + return _GENETICOBSERVATIONVALUE; + if ("Homozygote".equals(codeString)) + return HOMOZYGOTE; + if ("_ObservationMeasureScoring".equals(codeString)) + return _OBSERVATIONMEASURESCORING; + if ("COHORT".equals(codeString)) + return COHORT; + if ("CONTVAR".equals(codeString)) + return CONTVAR; + if ("PROPOR".equals(codeString)) + return PROPOR; + if ("RATIO".equals(codeString)) + return RATIO; + if ("_ObservationMeasureType".equals(codeString)) + return _OBSERVATIONMEASURETYPE; + if ("COMPOSITE".equals(codeString)) + return COMPOSITE; + if ("EFFICIENCY".equals(codeString)) + return EFFICIENCY; + if ("EXPERIENCE".equals(codeString)) + return EXPERIENCE; + if ("OUTCOME".equals(codeString)) + return OUTCOME; + if ("PROCESS".equals(codeString)) + return PROCESS; + if ("RESOURCE".equals(codeString)) + return RESOURCE; + if ("STRUCTURE".equals(codeString)) + return STRUCTURE; + if ("_ObservationPopulationInclusion".equals(codeString)) + return _OBSERVATIONPOPULATIONINCLUSION; + if ("DENEX".equals(codeString)) + return DENEX; + if ("DENEXCEP".equals(codeString)) + return DENEXCEP; + if ("DENOM".equals(codeString)) + return DENOM; + if ("IP".equals(codeString)) + return IP; + if ("IPP".equals(codeString)) + return IPP; + if ("MSRPOPL".equals(codeString)) + return MSRPOPL; + if ("NUMER".equals(codeString)) + return NUMER; + if ("NUMEX".equals(codeString)) + return NUMEX; + if ("_PartialCompletionScale".equals(codeString)) + return _PARTIALCOMPLETIONSCALE; + if ("G".equals(codeString)) + return G; + if ("LE".equals(codeString)) + return LE; + if ("ME".equals(codeString)) + return ME; + if ("MI".equals(codeString)) + return MI; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("_SecurityObservationValue".equals(codeString)) + return _SECURITYOBSERVATIONVALUE; + if ("_SECINTOBV".equals(codeString)) + return _SECINTOBV; + if ("_SECALTINTOBV".equals(codeString)) + return _SECALTINTOBV; + if ("ABSTRED".equals(codeString)) + return ABSTRED; + if ("AGGRED".equals(codeString)) + return AGGRED; + if ("ANONYED".equals(codeString)) + return ANONYED; + if ("MAPPED".equals(codeString)) + return MAPPED; + if ("MASKED".equals(codeString)) + return MASKED; + if ("PSEUDED".equals(codeString)) + return PSEUDED; + if ("REDACTED".equals(codeString)) + return REDACTED; + if ("SUBSETTED".equals(codeString)) + return SUBSETTED; + if ("SYNTAC".equals(codeString)) + return SYNTAC; + if ("TRSLT".equals(codeString)) + return TRSLT; + if ("VERSIONED".equals(codeString)) + return VERSIONED; + if ("_SECDATINTOBV".equals(codeString)) + return _SECDATINTOBV; + if ("CRYTOHASH".equals(codeString)) + return CRYTOHASH; + if ("DIGSIG".equals(codeString)) + return DIGSIG; + if ("_SECINTCONOBV".equals(codeString)) + return _SECINTCONOBV; + if ("HRELIABLE".equals(codeString)) + return HRELIABLE; + if ("RELIABLE".equals(codeString)) + return RELIABLE; + if ("UNCERTREL".equals(codeString)) + return UNCERTREL; + if ("UNRELIABLE".equals(codeString)) + return UNRELIABLE; + if ("_SECINTPRVOBV".equals(codeString)) + return _SECINTPRVOBV; + if ("_SECINTPRVABOBV".equals(codeString)) + return _SECINTPRVABOBV; + if ("CLINAST".equals(codeString)) + return CLINAST; + if ("DEVAST".equals(codeString)) + return DEVAST; + if ("HCPAST".equals(codeString)) + return HCPAST; + if ("PACQAST".equals(codeString)) + return PACQAST; + if ("PATAST".equals(codeString)) + return PATAST; + if ("PAYAST".equals(codeString)) + return PAYAST; + if ("PROAST".equals(codeString)) + return PROAST; + if ("SDMAST".equals(codeString)) + return SDMAST; + if ("_SECINTPRVRBOBV".equals(codeString)) + return _SECINTPRVRBOBV; + if ("CLINRPT".equals(codeString)) + return CLINRPT; + if ("DEVRPT".equals(codeString)) + return DEVRPT; + if ("HCPRPT".equals(codeString)) + return HCPRPT; + if ("PACQRPT".equals(codeString)) + return PACQRPT; + if ("PATRPT".equals(codeString)) + return PATRPT; + if ("PAYRPT".equals(codeString)) + return PAYRPT; + if ("PRORPT".equals(codeString)) + return PRORPT; + if ("SDMRPT".equals(codeString)) + return SDMRPT; + if ("SECTRSTOBV".equals(codeString)) + return SECTRSTOBV; + if ("TRSTACCRDOBV".equals(codeString)) + return TRSTACCRDOBV; + if ("TRSTAGREOBV".equals(codeString)) + return TRSTAGREOBV; + if ("TRSTCERTOBV".equals(codeString)) + return TRSTCERTOBV; + if ("TRSTLOAOBV".equals(codeString)) + return TRSTLOAOBV; + if ("LOAAN".equals(codeString)) + return LOAAN; + if ("LOAAN1".equals(codeString)) + return LOAAN1; + if ("LOAAN2".equals(codeString)) + return LOAAN2; + if ("LOAAN3".equals(codeString)) + return LOAAN3; + if ("LOAAN4".equals(codeString)) + return LOAAN4; + if ("LOAAP".equals(codeString)) + return LOAAP; + if ("LOAAP1".equals(codeString)) + return LOAAP1; + if ("LOAAP2".equals(codeString)) + return LOAAP2; + if ("LOAAP3".equals(codeString)) + return LOAAP3; + if ("LOAAP4".equals(codeString)) + return LOAAP4; + if ("LOAAS".equals(codeString)) + return LOAAS; + if ("LOAAS1".equals(codeString)) + return LOAAS1; + if ("LOAAS2".equals(codeString)) + return LOAAS2; + if ("LOAAS3".equals(codeString)) + return LOAAS3; + if ("LOAAS4".equals(codeString)) + return LOAAS4; + if ("LOACM".equals(codeString)) + return LOACM; + if ("LOACM1".equals(codeString)) + return LOACM1; + if ("LOACM2".equals(codeString)) + return LOACM2; + if ("LOACM3".equals(codeString)) + return LOACM3; + if ("LOACM4".equals(codeString)) + return LOACM4; + if ("LOAID".equals(codeString)) + return LOAID; + if ("LOAID1".equals(codeString)) + return LOAID1; + if ("LOAID2".equals(codeString)) + return LOAID2; + if ("LOAID3".equals(codeString)) + return LOAID3; + if ("LOAID4".equals(codeString)) + return LOAID4; + if ("LOANR".equals(codeString)) + return LOANR; + if ("LOANR1".equals(codeString)) + return LOANR1; + if ("LOANR2".equals(codeString)) + return LOANR2; + if ("LOANR3".equals(codeString)) + return LOANR3; + if ("LOANR4".equals(codeString)) + return LOANR4; + if ("LOARA".equals(codeString)) + return LOARA; + if ("LOARA1".equals(codeString)) + return LOARA1; + if ("LOARA2".equals(codeString)) + return LOARA2; + if ("LOARA3".equals(codeString)) + return LOARA3; + if ("LOARA4".equals(codeString)) + return LOARA4; + if ("LOATK".equals(codeString)) + return LOATK; + if ("LOATK1".equals(codeString)) + return LOATK1; + if ("LOATK2".equals(codeString)) + return LOATK2; + if ("LOATK3".equals(codeString)) + return LOATK3; + if ("LOATK4".equals(codeString)) + return LOATK4; + if ("TRSTMECOBV".equals(codeString)) + return TRSTMECOBV; + if ("_SeverityObservation".equals(codeString)) + return _SEVERITYOBSERVATION; + if ("H".equals(codeString)) + return H; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("_SubjectBodyPosition".equals(codeString)) + return _SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return LLD; + if ("PRN".equals(codeString)) + return PRN; + if ("RLD".equals(codeString)) + return RLD; + if ("SFWL".equals(codeString)) + return SFWL; + if ("SIT".equals(codeString)) + return SIT; + if ("STN".equals(codeString)) + return STN; + if ("SUP".equals(codeString)) + return SUP; + if ("RTRD".equals(codeString)) + return RTRD; + if ("TRD".equals(codeString)) + return TRD; + if ("_VerificationOutcomeValue".equals(codeString)) + return _VERIFICATIONOUTCOMEVALUE; + if ("ACT".equals(codeString)) + return ACT; + if ("ACTPEND".equals(codeString)) + return ACTPEND; + if ("ELG".equals(codeString)) + return ELG; + if ("INACT".equals(codeString)) + return INACT; + if ("INPNDINV".equals(codeString)) + return INPNDINV; + if ("INPNDUPD".equals(codeString)) + return INPNDUPD; + if ("NELG".equals(codeString)) + return NELG; + if ("_AnnotationValue".equals(codeString)) + return _ANNOTATIONVALUE; + if ("_CommonClinicalObservationValue".equals(codeString)) + return _COMMONCLINICALOBSERVATIONVALUE; + if ("_IndividualCaseSafetyReportValueDomains".equals(codeString)) + return _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS; + if ("_IndicationValue".equals(codeString)) + return _INDICATIONVALUE; + throw new FHIRException("Unknown V3ObservationValue code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "_ActCoverageAssessmentObservationValue"; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "_ActFinancialStatusObservationValue"; + case ASSET: return "ASSET"; + case ANNUITY: return "ANNUITY"; + case PROP: return "PROP"; + case RETACCT: return "RETACCT"; + case TRUST: return "TRUST"; + case INCOME: return "INCOME"; + case CHILD: return "CHILD"; + case DISABL: return "DISABL"; + case INVEST: return "INVEST"; + case PAY: return "PAY"; + case RETIRE: return "RETIRE"; + case SPOUSAL: return "SPOUSAL"; + case SUPPLE: return "SUPPLE"; + case TAX: return "TAX"; + case LIVEXP: return "LIVEXP"; + case CLOTH: return "CLOTH"; + case FOOD: return "FOOD"; + case HEALTH: return "HEALTH"; + case HOUSE: return "HOUSE"; + case LEGAL: return "LEGAL"; + case MORTG: return "MORTG"; + case RENT: return "RENT"; + case SUNDRY: return "SUNDRY"; + case TRANS: return "TRANS"; + case UTIL: return "UTIL"; + case ELSTAT: return "ELSTAT"; + case ADOPT: return "ADOPT"; + case BTHCERT: return "BTHCERT"; + case CCOC: return "CCOC"; + case DRLIC: return "DRLIC"; + case FOSTER: return "FOSTER"; + case MEMBER: return "MEMBER"; + case MIL: return "MIL"; + case MRGCERT: return "MRGCERT"; + case PASSPORT: return "PASSPORT"; + case STUDENRL: return "STUDENRL"; + case HLSTAT: return "HLSTAT"; + case DISABLE: return "DISABLE"; + case DRUG: return "DRUG"; + case IVDRG: return "IVDRG"; + case PGNT: return "PGNT"; + case LIVDEP: return "LIVDEP"; + case RELDEP: return "RELDEP"; + case SPSDEP: return "SPSDEP"; + case URELDEP: return "URELDEP"; + case LIVSIT: return "LIVSIT"; + case ALONE: return "ALONE"; + case DEPCHD: return "DEPCHD"; + case DEPSPS: return "DEPSPS"; + case DEPYGCHD: return "DEPYGCHD"; + case FAM: return "FAM"; + case RELAT: return "RELAT"; + case SPS: return "SPS"; + case UNREL: return "UNREL"; + case SOECSTAT: return "SOECSTAT"; + case ABUSE: return "ABUSE"; + case HMLESS: return "HMLESS"; + case ILGIM: return "ILGIM"; + case INCAR: return "INCAR"; + case PROB: return "PROB"; + case REFUG: return "REFUG"; + case UNEMPL: return "UNEMPL"; + case _ALLERGYTESTVALUE: return "_AllergyTestValue"; + case A0: return "A0"; + case A1: return "A1"; + case A2: return "A2"; + case A3: return "A3"; + case A4: return "A4"; + case _COVERAGELIMITOBSERVATIONVALUE: return "_CoverageLimitObservationValue"; + case _COVERAGELEVELOBSERVATIONVALUE: return "_CoverageLevelObservationValue"; + case ADC: return "ADC"; + case CHD: return "CHD"; + case DEP: return "DEP"; + case DP: return "DP"; + case ECH: return "ECH"; + case FLY: return "FLY"; + case IND: return "IND"; + case SSP: return "SSP"; + case _CRITICALITYOBSERVATIONVALUE: return "_CriticalityObservationValue"; + case CRITH: return "CRITH"; + case CRITL: return "CRITL"; + case CRITU: return "CRITU"; + case _GENETICOBSERVATIONVALUE: return "_GeneticObservationValue"; + case HOMOZYGOTE: return "Homozygote"; + case _OBSERVATIONMEASURESCORING: return "_ObservationMeasureScoring"; + case COHORT: return "COHORT"; + case CONTVAR: return "CONTVAR"; + case PROPOR: return "PROPOR"; + case RATIO: return "RATIO"; + case _OBSERVATIONMEASURETYPE: return "_ObservationMeasureType"; + case COMPOSITE: return "COMPOSITE"; + case EFFICIENCY: return "EFFICIENCY"; + case EXPERIENCE: return "EXPERIENCE"; + case OUTCOME: return "OUTCOME"; + case PROCESS: return "PROCESS"; + case RESOURCE: return "RESOURCE"; + case STRUCTURE: return "STRUCTURE"; + case _OBSERVATIONPOPULATIONINCLUSION: return "_ObservationPopulationInclusion"; + case DENEX: return "DENEX"; + case DENEXCEP: return "DENEXCEP"; + case DENOM: return "DENOM"; + case IP: return "IP"; + case IPP: return "IPP"; + case MSRPOPL: return "MSRPOPL"; + case NUMER: return "NUMER"; + case NUMEX: return "NUMEX"; + case _PARTIALCOMPLETIONSCALE: return "_PartialCompletionScale"; + case G: return "G"; + case LE: return "LE"; + case ME: return "ME"; + case MI: return "MI"; + case N: return "N"; + case S: return "S"; + case _SECURITYOBSERVATIONVALUE: return "_SecurityObservationValue"; + case _SECINTOBV: return "_SECINTOBV"; + case _SECALTINTOBV: return "_SECALTINTOBV"; + case ABSTRED: return "ABSTRED"; + case AGGRED: return "AGGRED"; + case ANONYED: return "ANONYED"; + case MAPPED: return "MAPPED"; + case MASKED: return "MASKED"; + case PSEUDED: return "PSEUDED"; + case REDACTED: return "REDACTED"; + case SUBSETTED: return "SUBSETTED"; + case SYNTAC: return "SYNTAC"; + case TRSLT: return "TRSLT"; + case VERSIONED: return "VERSIONED"; + case _SECDATINTOBV: return "_SECDATINTOBV"; + case CRYTOHASH: return "CRYTOHASH"; + case DIGSIG: return "DIGSIG"; + case _SECINTCONOBV: return "_SECINTCONOBV"; + case HRELIABLE: return "HRELIABLE"; + case RELIABLE: return "RELIABLE"; + case UNCERTREL: return "UNCERTREL"; + case UNRELIABLE: return "UNRELIABLE"; + case _SECINTPRVOBV: return "_SECINTPRVOBV"; + case _SECINTPRVABOBV: return "_SECINTPRVABOBV"; + case CLINAST: return "CLINAST"; + case DEVAST: return "DEVAST"; + case HCPAST: return "HCPAST"; + case PACQAST: return "PACQAST"; + case PATAST: return "PATAST"; + case PAYAST: return "PAYAST"; + case PROAST: return "PROAST"; + case SDMAST: return "SDMAST"; + case _SECINTPRVRBOBV: return "_SECINTPRVRBOBV"; + case CLINRPT: return "CLINRPT"; + case DEVRPT: return "DEVRPT"; + case HCPRPT: return "HCPRPT"; + case PACQRPT: return "PACQRPT"; + case PATRPT: return "PATRPT"; + case PAYRPT: return "PAYRPT"; + case PRORPT: return "PRORPT"; + case SDMRPT: return "SDMRPT"; + case SECTRSTOBV: return "SECTRSTOBV"; + case TRSTACCRDOBV: return "TRSTACCRDOBV"; + case TRSTAGREOBV: return "TRSTAGREOBV"; + case TRSTCERTOBV: return "TRSTCERTOBV"; + case TRSTLOAOBV: return "TRSTLOAOBV"; + case LOAAN: return "LOAAN"; + case LOAAN1: return "LOAAN1"; + case LOAAN2: return "LOAAN2"; + case LOAAN3: return "LOAAN3"; + case LOAAN4: return "LOAAN4"; + case LOAAP: return "LOAAP"; + case LOAAP1: return "LOAAP1"; + case LOAAP2: return "LOAAP2"; + case LOAAP3: return "LOAAP3"; + case LOAAP4: return "LOAAP4"; + case LOAAS: return "LOAAS"; + case LOAAS1: return "LOAAS1"; + case LOAAS2: return "LOAAS2"; + case LOAAS3: return "LOAAS3"; + case LOAAS4: return "LOAAS4"; + case LOACM: return "LOACM"; + case LOACM1: return "LOACM1"; + case LOACM2: return "LOACM2"; + case LOACM3: return "LOACM3"; + case LOACM4: return "LOACM4"; + case LOAID: return "LOAID"; + case LOAID1: return "LOAID1"; + case LOAID2: return "LOAID2"; + case LOAID3: return "LOAID3"; + case LOAID4: return "LOAID4"; + case LOANR: return "LOANR"; + case LOANR1: return "LOANR1"; + case LOANR2: return "LOANR2"; + case LOANR3: return "LOANR3"; + case LOANR4: return "LOANR4"; + case LOARA: return "LOARA"; + case LOARA1: return "LOARA1"; + case LOARA2: return "LOARA2"; + case LOARA3: return "LOARA3"; + case LOARA4: return "LOARA4"; + case LOATK: return "LOATK"; + case LOATK1: return "LOATK1"; + case LOATK2: return "LOATK2"; + case LOATK3: return "LOATK3"; + case LOATK4: return "LOATK4"; + case TRSTMECOBV: return "TRSTMECOBV"; + case _SEVERITYOBSERVATION: return "_SeverityObservation"; + case H: return "H"; + case L: return "L"; + case M: return "M"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "LLD"; + case PRN: return "PRN"; + case RLD: return "RLD"; + case SFWL: return "SFWL"; + case SIT: return "SIT"; + case STN: return "STN"; + case SUP: return "SUP"; + case RTRD: return "RTRD"; + case TRD: return "TRD"; + case _VERIFICATIONOUTCOMEVALUE: return "_VerificationOutcomeValue"; + case ACT: return "ACT"; + case ACTPEND: return "ACTPEND"; + case ELG: return "ELG"; + case INACT: return "INACT"; + case INPNDINV: return "INPNDINV"; + case INPNDUPD: return "INPNDUPD"; + case NELG: return "NELG"; + case _ANNOTATIONVALUE: return "_AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "_CommonClinicalObservationValue"; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "_IndividualCaseSafetyReportValueDomains"; + case _INDICATIONVALUE: return "_IndicationValue"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationValue"; + } + public String getDefinition() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "Codes specify the category of observation, evidence, or document used to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values."; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay stub; tax or income document; asset document; living expenses."; + case ASSET: return "Codes specifying asset indicators used to assess or establish eligibility for coverage under a policy or program."; + case ANNUITY: return "Indicator of annuity ownership or status as beneficiary."; + case PROP: return "Indicator of real property ownership, e.g., deed or real estate contract."; + case RETACCT: return "Indicator of retirement investment account ownership."; + case TRUST: return "Indicator of status as trust beneficiary."; + case INCOME: return "Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay or pension check, child support payments received or provided, and taxes paid."; + case CHILD: return "Indicator of child support payments received or provided."; + case DISABL: return "Indicator of disability income replacement payment."; + case INVEST: return "Indicator of investment income, e.g., dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check."; + case PAY: return "Indicator of paid employment, e.g., letter of hire, contract, employer letter; copy of pay check or pay stub."; + case RETIRE: return "Indicator of retirement payment, e.g., pension check."; + case SPOUSAL: return "Indicator of spousal or partner support payments received or provided; e.g., alimony payment; support stipulations in a divorce settlement."; + case SUPPLE: return "Indicator of income supplement, e.g., gifting, parental income support; stipend, or grant."; + case TAX: return "Indicator of tax obligation or payment, e.g., statement of taxable income."; + case LIVEXP: return "Codes specifying living expense indicators used to assess or establish eligibility for coverage under a policy or program."; + case CLOTH: return "Indicator of clothing expenses."; + case FOOD: return "Indicator of transportation expenses."; + case HEALTH: return "Indicator of health expenses; including medication costs, health service costs, financial participations, and health coverage premiums."; + case HOUSE: return "Indicator of housing expense, e.g., household appliances, fixtures, furnishings, and maintenance and repairs."; + case LEGAL: return "Indicator of legal expenses."; + case MORTG: return "Indicator of mortgage amount, interest, and payments."; + case RENT: return "Indicator of rental or lease payments."; + case SUNDRY: return "Indicator of transportation expenses."; + case TRANS: return "Indicator of transportation expenses, e.g., vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs."; + case UTIL: return "Indicator of transportation expenses."; + case ELSTAT: return "Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g., certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate."; + case ADOPT: return "Indicator of adoption."; + case BTHCERT: return "Indicator of birth."; + case CCOC: return "Indicator of creditable coverage."; + case DRLIC: return "Indicator of driving status."; + case FOSTER: return "Indicator of foster child status."; + case MEMBER: return "Indicator of status as covered member under a policy or program, e.g., member id card or coverage document."; + case MIL: return "Indicator of military status."; + case MRGCERT: return "Indicator of marriage status."; + case PASSPORT: return "Indicator of citizenship."; + case STUDENRL: return "Indicator of student status."; + case HLSTAT: return "Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g., pregnancy, disability, drug use, mental health issues."; + case DISABLE: return "Indication of disability."; + case DRUG: return "Indication of drug use."; + case IVDRG: return "Indication of IV drug use ."; + case PGNT: return "Non-clinical report of pregnancy."; + case LIVDEP: return "Code specifying observations related to living dependency, such as dependent upon spouse for activities of daily living."; + case RELDEP: return "Continued living in private residence requires functional and health care assistance from one or more relatives."; + case SPSDEP: return "Continued living in private residence requires functional and health care assistance from spouse or life partner."; + case URELDEP: return "Continued living in private residence requires functional and health care assistance from one or more unrelated persons."; + case LIVSIT: return "Code specifying observations related to living situation for a person in a private residence."; + case ALONE: return "Living alone. Maps to PD1-2 Living arrangement (IS) 00742 [A]"; + case DEPCHD: return "Living with one or more dependent children requiring moderate supervision."; + case DEPSPS: return "Living with disabled spouse requiring functional and health care assistance"; + case DEPYGCHD: return "Living with one or more dependent children requiring intensive supervision"; + case FAM: return "Living with family. Maps to PD1-2 Living arrangement (IS) 00742 [F]"; + case RELAT: return "Living with one or more relatives. Maps to PD1-2 Living arrangement (IS) 00742 [R]"; + case SPS: return "Living only with spouse or life partner. Maps to PD1-2 Living arrangement (IS) 00742 [S]"; + case UNREL: return "Living with one or more unrelated persons."; + case SOECSTAT: return "Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program."; + case ABUSE: return "Indication of abuse victim."; + case HMLESS: return "Indication of status as homeless."; + case ILGIM: return "Indication of status as illegal immigrant."; + case INCAR: return "Indication of status as incarcerated."; + case PROB: return "Indication of probation status."; + case REFUG: return "Indication of refugee status."; + case UNEMPL: return "Indication of unemployed status."; + case _ALLERGYTESTVALUE: return "Indicates the result of a particular allergy test. E.g. Negative, Mild, Moderate, Severe"; + case A0: return "Description:Patient exhibits no reaction to the challenge agent."; + case A1: return "Description:Patient exhibits a minimal reaction to the challenge agent."; + case A2: return "Description:Patient exhibits a mild reaction to the challenge agent."; + case A3: return "Description:Patient exhibits moderate reaction to the challenge agent."; + case A4: return "Description:Patient exhibits a severe reaction to the challenge agent."; + case _COVERAGELIMITOBSERVATIONVALUE: return "Description:Coded observation values for coverage limitations, for e.g., types of claims or types of parties covered under a policy or program."; + case _COVERAGELEVELOBSERVATIONVALUE: return "Description:Coded observation values for types of covered parties under a policy or program based on their personal relationships or employment status."; + case ADC: return "Description:Child over an age as specified by coverage policy or program, e.g., student, differently abled, and income dependent."; + case CHD: return "Description:Dependent biological, adopted, foster child as specified by coverage policy or program."; + case DEP: return "Description:Person requiring functional and/or financial assistance from another person as specified by coverage policy or program."; + case DP: return "Description:Persons registered as a family unit in a domestic partner registry as specified by law and by coverage policy or program."; + case ECH: return "Description:An individual employed by an employer who receive remuneration in wages, salary, commission, tips, piece-rates, or pay-in-kind through the employeraTMs payment system (i.e., not a contractor) as specified by coverage policy or program."; + case FLY: return "Description:As specified by coverage policy or program."; + case IND: return "Description:Person as specified by coverage policy or program."; + case SSP: return "Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g., Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades"; + case _CRITICALITYOBSERVATIONVALUE: return "A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality."; + case CRITH: return "Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure."; + case CRITL: return "Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure."; + case CRITU: return "Unable to assess the worst case result of a future exposure."; + case _GENETICOBSERVATIONVALUE: return "Description: The domain contains genetic analysis specific observation values, e.g. Homozygote, Heterozygote, etc."; + case HOMOZYGOTE: return "Description: An individual having different alleles at one or more loci regarding a specific character"; + case _OBSERVATIONMEASURESCORING: return "Observation values used to indicate the type of scoring (e.g. proportion, ratio) used by a health quality measure."; + case COHORT: return "A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g., Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration)."; + case CONTVAR: return "A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g., mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics)."; + case PROPOR: return "A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g., percentage of eligible women with a mammogram performed in the last year)."; + case RATIO: return "A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g., the number of patients with central lines who develop infection divided by the number of central line days)."; + case _OBSERVATIONMEASURETYPE: return "Observation values used to indicate what kind of health quality measure is used."; + case COMPOSITE: return "A measure that is composed from one or more other measures and indicates an overall summary of those measures."; + case EFFICIENCY: return "A measure related to the efficiency of medical treatment."; + case EXPERIENCE: return "A measure related to the level of patient engagement or patient experience of care."; + case OUTCOME: return "A measure that indicates the result of the performance (or non-performance) of a function or process."; + case PROCESS: return "A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome."; + case RESOURCE: return "A measure related to the extent of use of clinical resources or cost of care."; + case STRUCTURE: return "A measure related to the structure of patient care."; + case _OBSERVATIONPOPULATIONINCLUSION: return "Observation values used to assert various populations that a subject falls into."; + case DENEX: return "Patients who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator."; + case DENEXCEP: return "Denominator exceptions are those conditions that should remove a patient, procedure or unit of measurement from the denominator only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories:\r\n\n \n Medical reasons\n Patient reasons\n System reasons"; + case DENOM: return "It can be the same as the initial patient population or a subset of the initial patient population to further constrain the population for the purpose of the eMeasure. Different measures within an eMeasure set may have different Denominators. Continuous Variable eMeasures do not have a Denominator, but instead define a Measure Population."; + case IP: return "The initial population refers to all entities to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs."; + case IPP: return "The initial patient population refers to all patients to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods."; + case MSRPOPL: return "Measure population is used only in continuous variable eMeasures. It is a narrative description of the eMeasure population. \n(e.g., all patients seen in the Emergency Department during the measurement period)."; + case NUMER: return "Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period)."; + case NUMEX: return "Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.)"; + case _PARTIALCOMPLETIONSCALE: return "PartialCompletionScale"; + case G: return "Value for Act.partialCompletionCode attribute that implies 81-99% completion"; + case LE: return "Value for Act.partialCompletionCode attribute that implies 61-80% completion"; + case ME: return "Value for Act.partialCompletionCode attribute that implies 41-60% completion"; + case MI: return "Value for Act.partialCompletionCode attribute that implies 1-20% completion"; + case N: return "Value for Act.partialCompletionCode attribute that implies 0% completion"; + case S: return "Value for Act.partialCompletionCode attribute that implies 21-40% completion"; + case _SECURITYOBSERVATIONVALUE: return "Observation values used to indicate security observation metadata."; + case _SECINTOBV: return "Abstract security observation values used to indicate security integrity metadata.\r\n\n \n Examples: Codes conveying integrity status, integrity confidence, and provenance."; + case _SECALTINTOBV: return "Abstract security metadata observation values used to indicate mechanism used for authorized alteration of an IT resource (data, information object, service, or system capability)"; + case ABSTRED: return "Security metadata observation values used to indicate the use of a more abstract version of the content, e.g., replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN."; + case AGGRED: return "Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g., average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary."; + case ANONYED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by used to indicate the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. No key to relink the data is retained."; + case MAPPED: return "Security metadata observation value used to indicate that the IT resource semantic content has been transformed from one encoding to another.\r\n\n \n Usage Note: \"MAP\" code does not indicate the semantic fidelity of the transformed content.\r\n\n To indicate semantic fidelity for maps of HL7 to other code systems, this security alteration integrity observation may be further specified using an Act valued with Value Set: MapRelationship (2.16.840.1.113883.1.11.11052).\r\n\n Semantic fidelity of the mapped IT Resource may also be indicated using a SecurityIntegrityConfidenceObservation."; + case MASKED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by indicating the mechanism by which software systems can make data unintelligible (that is, as unreadable and unusable by algorithmically transforming plaintext into ciphertext) such that it can only be accessed or used by authorized users. An authorized user may be provided a key to decrypt per license or \"shared secret\".\r\n\n \n Usage Note: \"MASKED\" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has been further encrypted, and may be accessed only by an authorized user or receiver to which a decryption key is provided."; + case PSEUDED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability), by indicating the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject.\r\n\n \n Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization"; + case REDACTED: return "Security metadata observation value used to indicate the mechanism by which software systems can filter an IT resource (data, information object, service, or system capability) to remove any portion of the resource that is not authorized to be access, used, or disclosed.\r\n\n \n Usage Note: \"REDACTED\" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has filtered and not included in the content accessed or received."; + case SUBSETTED: return "Metadata observation used to indicate that some information has been removed from the source object when the view this object contains was constructed because of configuration options when the view was created. The content may not be suitable for use as the basis of a record update\r\n\n \n Usage Note: This is not suitable to be used when information is removed for security reasons - see the code REDACTED for this use."; + case SYNTAC: return "Security metadata observation value used to indicate that the IT resource syntax has been transformed from one syntactical representation to another. \r\n\n \n Usage Note: \"SYNTAC\" code does not indicate the syntactical correctness of the syntactically transformed IT resource."; + case TRSLT: return "Security metadata observation value used to indicate that the IT resource has been translated from one human language to another. \r\n\n \n Usage Note: \"TRSLT\" does not indicate the fidelity of the translation or the languages translated.\r\n\n The fidelity of the IT Resource translation may be indicated using a SecurityIntegrityConfidenceObservation.\r\n\n To indicate languages, use the Value Set:HumanLanguage (2.16.840.1.113883.1.11.11526)"; + case VERSIONED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) which indicates that the resource only retains versions of an IT resource for access and use per applicable policy\r\n\n \n Usage Note: When this code is used, expectation is that the system has removed historical versions of the data that falls outside the time period deemed to be the effective time of the applicable version."; + case _SECDATINTOBV: return "Abstract security observation values used to indicate data integrity metadata.\r\n\n \n Examples: Codes conveying the mechanism used to preserve the accuracy and consistency of an IT resource such as a digital signature and a cryptographic hash function."; + case CRYTOHASH: return "Security metadata observation value used to indicate the mechanism by which software systems can establish that data was not modified in transit.\r\n\n \n Rationale: This definition is intended to align with the ISO 22600-2 3.3.19 definition of cryptographic checkvalue: Information which is derived by performing a cryptographic transformation (see cryptography) on the data unit. The derivation of the checkvalue may be performed in one or more steps and is a result of a mathematical function of the key and a data unit. It is usually used to check the integrity of a data unit.\r\n\n \n Examples: \n \r\n\n \n SHA-1\n SHA-2 (Secure Hash Algorithm)"; + case DIGSIG: return "Security metadata observation value used to indicate the mechanism by which software systems use digital signature to establish that data has not been modified. \r\n\n \n Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient."; + case _SECINTCONOBV: return "Abstract security observation value used to indicate integrity confidence metadata.\r\n\n \n Examples: Codes conveying the level of reliability and trustworthiness of an IT resource."; + case HRELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be very high."; + case RELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be adequate."; + case UNCERTREL: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be uncertain."; + case UNRELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be inadequate."; + case _SECINTPRVOBV: return "Abstract security metadata observation value used to indicate the provenance of an IT resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity reporting an IT resource."; + case _SECINTPRVABOBV: return "Abstract security provenance metadata observation value used to indicate the entity that asserted an IT resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity asserting the resource."; + case CLINAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a clinician."; + case DEVAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a device."; + case HCPAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a healthcare professional."; + case PACQAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient acquaintance."; + case PATAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient."; + case PAYAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a payer."; + case PROAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a professional."; + case SDMAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a substitute decision maker."; + case _SECINTPRVRBOBV: return "Abstract security provenance metadata observation value used to indicate the entity that reported the resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity reporting an IT resource."; + case CLINRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a clinician."; + case DEVRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a device."; + case HCPRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a healthcare professional."; + case PACQRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient acquaintance."; + case PATRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient."; + case PAYRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a payer."; + case PRORPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a professional."; + case SDMRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a substitute decision maker."; + case SECTRSTOBV: return "Observation value used to indicate aspects of trust applicable to an IT resource (data, information object, service, or system capability)."; + case TRSTACCRDOBV: return "Values for security trust accreditation metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGREOBV: return "Values for security trust agreement metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]\n[ISO IEC 10181-1]"; + case TRSTCERTOBV: return "Values for security trust certificate metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]\r\n\n For example, a Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. A particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. Another example is Cross Certification with Federal Bridge."; + case TRSTLOAOBV: return "Values for security trust assurance metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case LOAAN: return "The value assigned as the indicator of the digital quality or reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2]\r\n\n For example, the degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]"; + case LOAAN1: return "Indicator of low digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] \r\n\n Low authentication level of assurance indicates that the relying party may have little or no confidence in the asserted identity's validity. Level 1 requires little or no confidence in the asserted identity. No identity proofing is required at this level, but the authentication mechanism should provide some assurance that the same claimant is accessing the protected transaction or data. A wide range of available authentication technologies can be employed and any of the token methods of Levels 2, 3, or 4, including Personal Identification Numbers (PINs), may be used. To be authenticated, the claimant must prove control of the token through a secure authentication protocol. At Level 1, long-term shared authentication secrets may be revealed to verifiers. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN2: return "Indicator of basic digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]\r\n\n Basic authentication level of assurance indicates that the relying party may have some confidence in the asserted identity's validity. Level 2 requires confidence that the asserted identity is accurate. Level 2 provides for single-factor remote network authentication, including identity-proofing requirements for presentation of identifying materials or information. A wide range of available authentication technologies can be employed, including any of the token methods of Levels 3 or 4, as well as passwords. Successful authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, and online guessing attacks are prevented. \nLong-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are required. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN3: return "Indicator of medium digital quality or reliability of the digital reliability of verification and validation of the process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] \r\n\n Medium authentication level of assurance indicates that the relying party may have high confidence in the asserted identity's validity. Level 3 is appropriate for transactions that need high confidence in the accuracy of the asserted identity. Level 3 provides multifactor remote network authentication. At this level, identity-proofing procedures require verification of identifying materials and information. Authentication is based on proof of possession of a key or password through a cryptographic protocol. Cryptographic strength mechanisms should protect the primary authentication token (a cryptographic key) against compromise by the protocol threats, including eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks. A minimum of two authentication factors is required. Three kinds of tokens may be used:\r\n\n \n \"soft\" cryptographic token, which has the key stored on a general-purpose computer, \n \"hard\" cryptographic token, which has the key stored on a special hardware device, and \n \"one-time password\" device token, which has symmetric key stored on a personal hardware device that is a cryptographic module validated at FIPS 140-2 Level 1 or higher. Validation testing of cryptographic modules and algorithms for conformance to Federal Information Processing Standard (FIPS) 140-2, Security Requirements for Cryptographic Modules, is managed by NIST.\n \n Authentication requires that the claimant prove control of the token through a secure authentication protocol. The token must be unlocked with a password or biometric representation, or a password must be used in a secure authentication protocol, to establish two-factor authentication. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are used for all operations. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN4: return "Indicator of high digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]\r\n\n High authentication level of assurance indicates that the relying party may have very high confidence in the asserted identity's validity. Level 4 is for transactions that need very high confidence in the accuracy of the asserted identity. Level 4 provides the highest practical assurance of remote network authentication. Authentication is based on proof of possession of a key through a cryptographic protocol. This level is similar to Level 3 except that only “hard� cryptographic tokens are allowed, cryptographic module validation requirements are strengthened, and subsequent critical data transfers must be authenticated via a key that is bound to the authentication process. The token should be a hardware cryptographic module validated at FIPS 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. This level requires a physical token, which cannot readily be copied, and operator authentication at Level 2 and higher, and ensures good, two-factor remote authentication.\r\n\n Level 4 requires strong cryptographic authentication of all parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks are prevented. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Strong approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP: return "The value assigned as the indicator of the digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]"; + case LOAAP1: return "Indicator of the low digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Low authentication process level of assurance indicates that (1) long-term shared authentication secrets may be revealed to verifiers; and (2) assertions and assertion references require protection from manufacture/modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP2: return "Indicator of the basic digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Basic authentication process level of assurance indicates that long-term shared authentication secrets are never revealed to any other party except Credential Service Provider (CSP). Sessions (temporary) shared secrets may be provided to independent verifiers by CSP. Long-term shared authentication secrets, if used, are never revealed to any other party except Verifiers operated by the Credential Service Provider (CSP); however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 1 requirements, assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP3: return "Indicator of the medium digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Medium authentication process level of assurance indicates that the token can be unlocked with password, biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication. Long-term shared authentication secrets are never revealed to any party except the Claimant and Credential Service Provider (CSP).\r\n\n Authentication requires that the Claimant prove, through a secure authentication protocol, that he or she controls the token. The Claimant unlocks the token with a password or biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication (through proof of possession of a physical or software token in combination with some memorized secret knowledge). Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 2 requirements, assertions are protected against repudiation by the Verifier."; + case LOAAP4: return "Indicator of the high digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n High authentication process level of assurance indicates all sensitive data transfer are cryptographically authenticated using keys bound to the authentication process. Level 4 requires strong cryptographic authentication of all communicating parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the Claimant prove through a secure authentication protocol that he or she controls the token. All protocol threats at Level 3 are required to be prevented at Level 4. Protocols shall also be strongly resistant to man-in-the-middle attacks. Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. Approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS: return "The value assigned as the indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes."; + case LOAAS1: return "Indicator of the low quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions and assertion references require protection from modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS2: return "Indicator of the basic quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required for all assertion protocols. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS3: return "Indicator of the medium quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions are protected against repudiation by the verifier. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS4: return "Indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Strongly resistant to man-in-the-middle attacks. \"Bearer\" assertions are not used. \"Holder-of-key\" assertions may be used. RP maintains records of the assertions. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOACM: return "Indicator of the digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM1: return "Indicator of the low digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Little or no confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include weak identity binding to tokens and plaintext passwords or secrets not transmitted across a network. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM2: return "Indicator of the basic digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Some confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verification must prove claimant controls the token; token resists online guessing, replay, session hijacking, and eavesdropping attacks; and token is at least weakly resistant to man-in-the middle attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM3: return "Indicator of the medium digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. High confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Ownership of token verifiable through security authentication protocol and credential management protects against verifier impersonation attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM4: return "Indicator of the high digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. Very high confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verifier can prove control of token through a secure protocol; credential management supports strong cryptographic authentication of all communication parties. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID: return "Indicator of the quality or reliability in the process of ascertaining that an individual is who he or she claims to be."; + case LOAID1: return "Indicator of low digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires that a continuity of identity be maintained but does not require identity proofing. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID2: return "Indicator of some digital quality or reliability in the process of ascertaining that that an individual is who he or she claims to be. Requires identity proofing via presentation of identifying material or information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID3: return "Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID4: return "Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOANR: return "Indicator of the digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR1: return "Indicator of low digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR2: return "Indicator of basic digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR3: return "Indicator of medium digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR4: return "Indicator of high digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOARA: return "Indicator of the digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA1: return "Indicator of low digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA2: return "Indicator of basic digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA3: return "Indicator of medium digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA4: return "Indicator of high digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization's security controls. [Based on NIST SP 800-63-2]"; + case LOATK: return "Indicator of the digital quality or reliability of single and multi-token authentication. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK1: return "Indicator of the low digital quality or reliability of single and multi-token authentication. Permits the use of any of the token methods of Levels 2, 3, or 4. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK2: return "Indicator of the basic digital quality or reliability of single and multi-token authentication. Requires single factor authentication using memorized secret tokens, pre-registered knowledge tokens, look-up secret tokens, out of band tokens, or single factor one-time password devices. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK3: return "Indicator of the medium digital quality or reliability of single and multi-token authentication. Requires two authentication factors. Provides multi-factor remote network authentication. Permits multi-factor software cryptographic token. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK4: return "Indicator of the high digital quality or reliability of single and multi-token authentication. Requires token that is a hardware cryptographic module validated at validated at Federal Information Processing Standard (FIPS) 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. Level 4 token requirements can be met by using the PIV authentication key of a FIPS 201 compliant Personal Identity Verification (PIV) Card. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case TRSTMECOBV: return "Values for security trust mechanism metadata observation made about a security architecture system component that supports enforcement of security policies."; + case _SEVERITYOBSERVATION: return "Potential values for observations of severity."; + case H: return "Indicates the condition may be life-threatening or has the potential to cause permanent injury."; + case L: return "Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subject."; + case M: return "Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury."; + case _SUBJECTBODYPOSITION: return "Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted."; + case LLD: return "Lying on the left side."; + case PRN: return "Lying with the front or ventral surface downward; lying face down."; + case RLD: return "Lying on the right side."; + case SFWL: return "A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees."; + case SIT: return "Resting the body on the buttocks, typically with upper torso erect or semi erect."; + case STN: return "To be stationary, upright, vertical, on one's legs."; + case SUP: return "supine"; + case RTRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered."; + case TRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised."; + case _VERIFICATIONOUTCOMEVALUE: return "Values for observations of verification act results\r\n\n \n Examples: Verified, not verified, verified with warning."; + case ACT: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s)."; + case ACTPEND: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s) - Pending Investigation"; + case ELG: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s)."; + case INACT: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s)."; + case INPNDINV: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Investigation."; + case INPNDUPD: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Eligibility Update."; + case NELG: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility."; + case _ANNOTATIONVALUE: return "AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "Description:Used in a patient care message to value simple clinical (non-lab) observations."; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "This domain is established as a parent to a variety of value domains being defined to support the communication of Individual Case Safety Reports to regulatory bodies. Arguably, this aggregation is not taxonomically pure, but the grouping will facilitate the management of these domains."; + case _INDICATIONVALUE: return "Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.). E.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "ActCoverageAssessmentObservationValue"; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "ActFinancialStatusObservationValue"; + case ASSET: return "asset"; + case ANNUITY: return "annuity"; + case PROP: return "real property"; + case RETACCT: return "retirement investment account"; + case TRUST: return "trust"; + case INCOME: return "income"; + case CHILD: return "child support"; + case DISABL: return "disability pay"; + case INVEST: return "investment income"; + case PAY: return "paid employment"; + case RETIRE: return "retirement pay"; + case SPOUSAL: return "spousal or partner support"; + case SUPPLE: return "income supplement"; + case TAX: return "tax obligation"; + case LIVEXP: return "living expense"; + case CLOTH: return "clothing expense"; + case FOOD: return "food expense"; + case HEALTH: return "health expense"; + case HOUSE: return "household expense"; + case LEGAL: return "legal expense"; + case MORTG: return "mortgage"; + case RENT: return "rent"; + case SUNDRY: return "sundry expense"; + case TRANS: return "transportation expense"; + case UTIL: return "utility expense"; + case ELSTAT: return "eligibility indicator"; + case ADOPT: return "adoption document"; + case BTHCERT: return "birth certificate"; + case CCOC: return "creditable coverage document"; + case DRLIC: return "driver license"; + case FOSTER: return "foster child document"; + case MEMBER: return "program or policy member"; + case MIL: return "military identification"; + case MRGCERT: return "marriage certificate"; + case PASSPORT: return "passport"; + case STUDENRL: return "student enrollment"; + case HLSTAT: return "health status"; + case DISABLE: return "disabled"; + case DRUG: return "drug use"; + case IVDRG: return "IV drug use"; + case PGNT: return "pregnant"; + case LIVDEP: return "living dependency"; + case RELDEP: return "relative dependent"; + case SPSDEP: return "spouse dependent"; + case URELDEP: return "unrelated person dependent"; + case LIVSIT: return "living situation"; + case ALONE: return "alone"; + case DEPCHD: return "dependent children"; + case DEPSPS: return "dependent spouse"; + case DEPYGCHD: return "dependent young children"; + case FAM: return "live with family"; + case RELAT: return "relative"; + case SPS: return "spouse only"; + case UNREL: return "unrelated person"; + case SOECSTAT: return "socio economic status"; + case ABUSE: return "abuse victim"; + case HMLESS: return "homeless"; + case ILGIM: return "illegal immigrant"; + case INCAR: return "incarcerated"; + case PROB: return "probation"; + case REFUG: return "refugee"; + case UNEMPL: return "unemployed"; + case _ALLERGYTESTVALUE: return "AllergyTestValue"; + case A0: return "no reaction"; + case A1: return "minimal reaction"; + case A2: return "mild reaction"; + case A3: return "moderate reaction"; + case A4: return "severe reaction"; + case _COVERAGELIMITOBSERVATIONVALUE: return "CoverageLimitObservationValue"; + case _COVERAGELEVELOBSERVATIONVALUE: return "CoverageLevelObservationValue"; + case ADC: return "adult child"; + case CHD: return "child"; + case DEP: return "dependent"; + case DP: return "domestic partner"; + case ECH: return "employee"; + case FLY: return "family coverage"; + case IND: return "individual"; + case SSP: return "same sex partner"; + case _CRITICALITYOBSERVATIONVALUE: return "CriticalityObservationValue"; + case CRITH: return "high criticality"; + case CRITL: return "low criticality"; + case CRITU: return "unable to assess criticality"; + case _GENETICOBSERVATIONVALUE: return "GeneticObservationValue"; + case HOMOZYGOTE: return "HOMO"; + case _OBSERVATIONMEASURESCORING: return "ObservationMeasureScoring"; + case COHORT: return "cohort measure scoring"; + case CONTVAR: return "continuous variable measure scoring"; + case PROPOR: return "proportion measure scoring"; + case RATIO: return "ratio measure scoring"; + case _OBSERVATIONMEASURETYPE: return "ObservationMeasureType"; + case COMPOSITE: return "composite measure type"; + case EFFICIENCY: return "efficiency measure type"; + case EXPERIENCE: return "experience measure type"; + case OUTCOME: return "outcome measure type"; + case PROCESS: return "process measure type"; + case RESOURCE: return "resource use measure type"; + case STRUCTURE: return "structure measure type"; + case _OBSERVATIONPOPULATIONINCLUSION: return "ObservationPopulationInclusion"; + case DENEX: return "denominator exclusions"; + case DENEXCEP: return "denominator exceptions"; + case DENOM: return "denominator"; + case IP: return "initial population"; + case IPP: return "initial patient population"; + case MSRPOPL: return "measure population"; + case NUMER: return "numerator"; + case NUMEX: return "numerator exclusions"; + case _PARTIALCOMPLETIONSCALE: return "PartialCompletionScale"; + case G: return "Great extent"; + case LE: return "Large extent"; + case ME: return "Medium extent"; + case MI: return "Minimal extent"; + case N: return "None"; + case S: return "Some extent"; + case _SECURITYOBSERVATIONVALUE: return "SecurityObservationValue"; + case _SECINTOBV: return "security integrity"; + case _SECALTINTOBV: return "alteration integrity"; + case ABSTRED: return "abstracted"; + case AGGRED: return "aggregated"; + case ANONYED: return "anonymized"; + case MAPPED: return "mapped"; + case MASKED: return "masked"; + case PSEUDED: return "pseudonymized"; + case REDACTED: return "redacted"; + case SUBSETTED: return "subsetted"; + case SYNTAC: return "syntactic transform"; + case TRSLT: return "translated"; + case VERSIONED: return "versioned"; + case _SECDATINTOBV: return "data integrity"; + case CRYTOHASH: return "cryptographic hash function"; + case DIGSIG: return "digital signature"; + case _SECINTCONOBV: return "integrity confidence"; + case HRELIABLE: return "highly reliable"; + case RELIABLE: return "reliable"; + case UNCERTREL: return "uncertain reliability"; + case UNRELIABLE: return "unreliable"; + case _SECINTPRVOBV: return "provenance"; + case _SECINTPRVABOBV: return "provenance asserted by"; + case CLINAST: return "clinician asserted"; + case DEVAST: return "device asserted"; + case HCPAST: return "healthcare professional asserted"; + case PACQAST: return "patient acquaintance asserted"; + case PATAST: return "patient asserted"; + case PAYAST: return "payer asserted"; + case PROAST: return "professional asserted"; + case SDMAST: return "substitute decision maker asserted"; + case _SECINTPRVRBOBV: return "provenance reported by"; + case CLINRPT: return "clinician reported"; + case DEVRPT: return "device reported"; + case HCPRPT: return "healthcare professional reported"; + case PACQRPT: return "patient acquaintance reported"; + case PATRPT: return "patient reported"; + case PAYRPT: return "payer reported"; + case PRORPT: return "professional reported"; + case SDMRPT: return "substitute decision maker reported"; + case SECTRSTOBV: return "security trust observation"; + case TRSTACCRDOBV: return "trust accreditation observation"; + case TRSTAGREOBV: return "trust agreement observation"; + case TRSTCERTOBV: return "trust certificate observation"; + case TRSTLOAOBV: return "trust assurance observation"; + case LOAAN: return "authentication level of assurance value"; + case LOAAN1: return "low authentication level of assurance"; + case LOAAN2: return "basic authentication level of assurance"; + case LOAAN3: return "medium authentication level of assurance"; + case LOAAN4: return "high authentication level of assurance"; + case LOAAP: return "authentication process level of assurance value"; + case LOAAP1: return "low authentication process level of assurance"; + case LOAAP2: return "basic authentication process level of assurance"; + case LOAAP3: return "medium authentication process level of assurance"; + case LOAAP4: return "high authentication process level of assurance"; + case LOAAS: return "assertion level of assurance value"; + case LOAAS1: return "low assertion level of assurance"; + case LOAAS2: return "basic assertion level of assurance"; + case LOAAS3: return "medium assertion level of assurance"; + case LOAAS4: return "high assertion level of assurance"; + case LOACM: return "token and credential management level of assurance value)"; + case LOACM1: return "low token and credential management level of assurance"; + case LOACM2: return "basic token and credential management level of assurance"; + case LOACM3: return "medium token and credential management level of assurance"; + case LOACM4: return "high token and credential management level of assurance"; + case LOAID: return "identity proofing level of assurance"; + case LOAID1: return "low identity proofing level of assurance"; + case LOAID2: return "basic identity proofing level of assurance"; + case LOAID3: return "medium identity proofing level of assurance"; + case LOAID4: return "high identity proofing level of assurance"; + case LOANR: return "non-repudiation level of assurance value"; + case LOANR1: return "low non-repudiation level of assurance"; + case LOANR2: return "basic non-repudiation level of assurance"; + case LOANR3: return "medium non-repudiation level of assurance"; + case LOANR4: return "high non-repudiation level of assurance"; + case LOARA: return "remote access level of assurance value"; + case LOARA1: return "low remote access level of assurance"; + case LOARA2: return "basic remote access level of assurance"; + case LOARA3: return "medium remote access level of assurance"; + case LOARA4: return "high remote access level of assurance"; + case LOATK: return "token level of assurance value"; + case LOATK1: return "low token level of assurance"; + case LOATK2: return "basic token level of assurance"; + case LOATK3: return "medium token level of assurance"; + case LOATK4: return "high token level of assurance"; + case TRSTMECOBV: return "none supplied 6"; + case _SEVERITYOBSERVATION: return "SeverityObservation"; + case H: return "High"; + case L: return "Low"; + case M: return "Moderate"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "left lateral decubitus"; + case PRN: return "prone"; + case RLD: return "right lateral decubitus"; + case SFWL: return "Semi-Fowler's"; + case SIT: return "sitting"; + case STN: return "standing"; + case SUP: return "supine"; + case RTRD: return "reverse trendelenburg"; + case TRD: return "trendelenburg"; + case _VERIFICATIONOUTCOMEVALUE: return "verification outcome"; + case ACT: return "active coverage"; + case ACTPEND: return "active - pending investigation"; + case ELG: return "eligible"; + case INACT: return "inactive"; + case INPNDINV: return "inactive - pending investigation"; + case INPNDUPD: return "inactive - pending eligibility update"; + case NELG: return "not eligible"; + case _ANNOTATIONVALUE: return "AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "common clinical observation"; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "Individual Case Safety Report Value Domains"; + case _INDICATIONVALUE: return "IndicationValue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValueEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValueEnumFactory.java new file mode 100644 index 00000000000..3a9b7916b5f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ObservationValueEnumFactory.java @@ -0,0 +1,963 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ObservationValueEnumFactory implements EnumFactory { + + public V3ObservationValue fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActCoverageAssessmentObservationValue".equals(codeString)) + return V3ObservationValue._ACTCOVERAGEASSESSMENTOBSERVATIONVALUE; + if ("_ActFinancialStatusObservationValue".equals(codeString)) + return V3ObservationValue._ACTFINANCIALSTATUSOBSERVATIONVALUE; + if ("ASSET".equals(codeString)) + return V3ObservationValue.ASSET; + if ("ANNUITY".equals(codeString)) + return V3ObservationValue.ANNUITY; + if ("PROP".equals(codeString)) + return V3ObservationValue.PROP; + if ("RETACCT".equals(codeString)) + return V3ObservationValue.RETACCT; + if ("TRUST".equals(codeString)) + return V3ObservationValue.TRUST; + if ("INCOME".equals(codeString)) + return V3ObservationValue.INCOME; + if ("CHILD".equals(codeString)) + return V3ObservationValue.CHILD; + if ("DISABL".equals(codeString)) + return V3ObservationValue.DISABL; + if ("INVEST".equals(codeString)) + return V3ObservationValue.INVEST; + if ("PAY".equals(codeString)) + return V3ObservationValue.PAY; + if ("RETIRE".equals(codeString)) + return V3ObservationValue.RETIRE; + if ("SPOUSAL".equals(codeString)) + return V3ObservationValue.SPOUSAL; + if ("SUPPLE".equals(codeString)) + return V3ObservationValue.SUPPLE; + if ("TAX".equals(codeString)) + return V3ObservationValue.TAX; + if ("LIVEXP".equals(codeString)) + return V3ObservationValue.LIVEXP; + if ("CLOTH".equals(codeString)) + return V3ObservationValue.CLOTH; + if ("FOOD".equals(codeString)) + return V3ObservationValue.FOOD; + if ("HEALTH".equals(codeString)) + return V3ObservationValue.HEALTH; + if ("HOUSE".equals(codeString)) + return V3ObservationValue.HOUSE; + if ("LEGAL".equals(codeString)) + return V3ObservationValue.LEGAL; + if ("MORTG".equals(codeString)) + return V3ObservationValue.MORTG; + if ("RENT".equals(codeString)) + return V3ObservationValue.RENT; + if ("SUNDRY".equals(codeString)) + return V3ObservationValue.SUNDRY; + if ("TRANS".equals(codeString)) + return V3ObservationValue.TRANS; + if ("UTIL".equals(codeString)) + return V3ObservationValue.UTIL; + if ("ELSTAT".equals(codeString)) + return V3ObservationValue.ELSTAT; + if ("ADOPT".equals(codeString)) + return V3ObservationValue.ADOPT; + if ("BTHCERT".equals(codeString)) + return V3ObservationValue.BTHCERT; + if ("CCOC".equals(codeString)) + return V3ObservationValue.CCOC; + if ("DRLIC".equals(codeString)) + return V3ObservationValue.DRLIC; + if ("FOSTER".equals(codeString)) + return V3ObservationValue.FOSTER; + if ("MEMBER".equals(codeString)) + return V3ObservationValue.MEMBER; + if ("MIL".equals(codeString)) + return V3ObservationValue.MIL; + if ("MRGCERT".equals(codeString)) + return V3ObservationValue.MRGCERT; + if ("PASSPORT".equals(codeString)) + return V3ObservationValue.PASSPORT; + if ("STUDENRL".equals(codeString)) + return V3ObservationValue.STUDENRL; + if ("HLSTAT".equals(codeString)) + return V3ObservationValue.HLSTAT; + if ("DISABLE".equals(codeString)) + return V3ObservationValue.DISABLE; + if ("DRUG".equals(codeString)) + return V3ObservationValue.DRUG; + if ("IVDRG".equals(codeString)) + return V3ObservationValue.IVDRG; + if ("PGNT".equals(codeString)) + return V3ObservationValue.PGNT; + if ("LIVDEP".equals(codeString)) + return V3ObservationValue.LIVDEP; + if ("RELDEP".equals(codeString)) + return V3ObservationValue.RELDEP; + if ("SPSDEP".equals(codeString)) + return V3ObservationValue.SPSDEP; + if ("URELDEP".equals(codeString)) + return V3ObservationValue.URELDEP; + if ("LIVSIT".equals(codeString)) + return V3ObservationValue.LIVSIT; + if ("ALONE".equals(codeString)) + return V3ObservationValue.ALONE; + if ("DEPCHD".equals(codeString)) + return V3ObservationValue.DEPCHD; + if ("DEPSPS".equals(codeString)) + return V3ObservationValue.DEPSPS; + if ("DEPYGCHD".equals(codeString)) + return V3ObservationValue.DEPYGCHD; + if ("FAM".equals(codeString)) + return V3ObservationValue.FAM; + if ("RELAT".equals(codeString)) + return V3ObservationValue.RELAT; + if ("SPS".equals(codeString)) + return V3ObservationValue.SPS; + if ("UNREL".equals(codeString)) + return V3ObservationValue.UNREL; + if ("SOECSTAT".equals(codeString)) + return V3ObservationValue.SOECSTAT; + if ("ABUSE".equals(codeString)) + return V3ObservationValue.ABUSE; + if ("HMLESS".equals(codeString)) + return V3ObservationValue.HMLESS; + if ("ILGIM".equals(codeString)) + return V3ObservationValue.ILGIM; + if ("INCAR".equals(codeString)) + return V3ObservationValue.INCAR; + if ("PROB".equals(codeString)) + return V3ObservationValue.PROB; + if ("REFUG".equals(codeString)) + return V3ObservationValue.REFUG; + if ("UNEMPL".equals(codeString)) + return V3ObservationValue.UNEMPL; + if ("_AllergyTestValue".equals(codeString)) + return V3ObservationValue._ALLERGYTESTVALUE; + if ("A0".equals(codeString)) + return V3ObservationValue.A0; + if ("A1".equals(codeString)) + return V3ObservationValue.A1; + if ("A2".equals(codeString)) + return V3ObservationValue.A2; + if ("A3".equals(codeString)) + return V3ObservationValue.A3; + if ("A4".equals(codeString)) + return V3ObservationValue.A4; + if ("_CoverageLimitObservationValue".equals(codeString)) + return V3ObservationValue._COVERAGELIMITOBSERVATIONVALUE; + if ("_CoverageLevelObservationValue".equals(codeString)) + return V3ObservationValue._COVERAGELEVELOBSERVATIONVALUE; + if ("ADC".equals(codeString)) + return V3ObservationValue.ADC; + if ("CHD".equals(codeString)) + return V3ObservationValue.CHD; + if ("DEP".equals(codeString)) + return V3ObservationValue.DEP; + if ("DP".equals(codeString)) + return V3ObservationValue.DP; + if ("ECH".equals(codeString)) + return V3ObservationValue.ECH; + if ("FLY".equals(codeString)) + return V3ObservationValue.FLY; + if ("IND".equals(codeString)) + return V3ObservationValue.IND; + if ("SSP".equals(codeString)) + return V3ObservationValue.SSP; + if ("_CriticalityObservationValue".equals(codeString)) + return V3ObservationValue._CRITICALITYOBSERVATIONVALUE; + if ("CRITH".equals(codeString)) + return V3ObservationValue.CRITH; + if ("CRITL".equals(codeString)) + return V3ObservationValue.CRITL; + if ("CRITU".equals(codeString)) + return V3ObservationValue.CRITU; + if ("_GeneticObservationValue".equals(codeString)) + return V3ObservationValue._GENETICOBSERVATIONVALUE; + if ("Homozygote".equals(codeString)) + return V3ObservationValue.HOMOZYGOTE; + if ("_ObservationMeasureScoring".equals(codeString)) + return V3ObservationValue._OBSERVATIONMEASURESCORING; + if ("COHORT".equals(codeString)) + return V3ObservationValue.COHORT; + if ("CONTVAR".equals(codeString)) + return V3ObservationValue.CONTVAR; + if ("PROPOR".equals(codeString)) + return V3ObservationValue.PROPOR; + if ("RATIO".equals(codeString)) + return V3ObservationValue.RATIO; + if ("_ObservationMeasureType".equals(codeString)) + return V3ObservationValue._OBSERVATIONMEASURETYPE; + if ("COMPOSITE".equals(codeString)) + return V3ObservationValue.COMPOSITE; + if ("EFFICIENCY".equals(codeString)) + return V3ObservationValue.EFFICIENCY; + if ("EXPERIENCE".equals(codeString)) + return V3ObservationValue.EXPERIENCE; + if ("OUTCOME".equals(codeString)) + return V3ObservationValue.OUTCOME; + if ("PROCESS".equals(codeString)) + return V3ObservationValue.PROCESS; + if ("RESOURCE".equals(codeString)) + return V3ObservationValue.RESOURCE; + if ("STRUCTURE".equals(codeString)) + return V3ObservationValue.STRUCTURE; + if ("_ObservationPopulationInclusion".equals(codeString)) + return V3ObservationValue._OBSERVATIONPOPULATIONINCLUSION; + if ("DENEX".equals(codeString)) + return V3ObservationValue.DENEX; + if ("DENEXCEP".equals(codeString)) + return V3ObservationValue.DENEXCEP; + if ("DENOM".equals(codeString)) + return V3ObservationValue.DENOM; + if ("IP".equals(codeString)) + return V3ObservationValue.IP; + if ("IPP".equals(codeString)) + return V3ObservationValue.IPP; + if ("MSRPOPL".equals(codeString)) + return V3ObservationValue.MSRPOPL; + if ("NUMER".equals(codeString)) + return V3ObservationValue.NUMER; + if ("NUMEX".equals(codeString)) + return V3ObservationValue.NUMEX; + if ("_PartialCompletionScale".equals(codeString)) + return V3ObservationValue._PARTIALCOMPLETIONSCALE; + if ("G".equals(codeString)) + return V3ObservationValue.G; + if ("LE".equals(codeString)) + return V3ObservationValue.LE; + if ("ME".equals(codeString)) + return V3ObservationValue.ME; + if ("MI".equals(codeString)) + return V3ObservationValue.MI; + if ("N".equals(codeString)) + return V3ObservationValue.N; + if ("S".equals(codeString)) + return V3ObservationValue.S; + if ("_SecurityObservationValue".equals(codeString)) + return V3ObservationValue._SECURITYOBSERVATIONVALUE; + if ("_SECINTOBV".equals(codeString)) + return V3ObservationValue._SECINTOBV; + if ("_SECALTINTOBV".equals(codeString)) + return V3ObservationValue._SECALTINTOBV; + if ("ABSTRED".equals(codeString)) + return V3ObservationValue.ABSTRED; + if ("AGGRED".equals(codeString)) + return V3ObservationValue.AGGRED; + if ("ANONYED".equals(codeString)) + return V3ObservationValue.ANONYED; + if ("MAPPED".equals(codeString)) + return V3ObservationValue.MAPPED; + if ("MASKED".equals(codeString)) + return V3ObservationValue.MASKED; + if ("PSEUDED".equals(codeString)) + return V3ObservationValue.PSEUDED; + if ("REDACTED".equals(codeString)) + return V3ObservationValue.REDACTED; + if ("SUBSETTED".equals(codeString)) + return V3ObservationValue.SUBSETTED; + if ("SYNTAC".equals(codeString)) + return V3ObservationValue.SYNTAC; + if ("TRSLT".equals(codeString)) + return V3ObservationValue.TRSLT; + if ("VERSIONED".equals(codeString)) + return V3ObservationValue.VERSIONED; + if ("_SECDATINTOBV".equals(codeString)) + return V3ObservationValue._SECDATINTOBV; + if ("CRYTOHASH".equals(codeString)) + return V3ObservationValue.CRYTOHASH; + if ("DIGSIG".equals(codeString)) + return V3ObservationValue.DIGSIG; + if ("_SECINTCONOBV".equals(codeString)) + return V3ObservationValue._SECINTCONOBV; + if ("HRELIABLE".equals(codeString)) + return V3ObservationValue.HRELIABLE; + if ("RELIABLE".equals(codeString)) + return V3ObservationValue.RELIABLE; + if ("UNCERTREL".equals(codeString)) + return V3ObservationValue.UNCERTREL; + if ("UNRELIABLE".equals(codeString)) + return V3ObservationValue.UNRELIABLE; + if ("_SECINTPRVOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVOBV; + if ("_SECINTPRVABOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVABOBV; + if ("CLINAST".equals(codeString)) + return V3ObservationValue.CLINAST; + if ("DEVAST".equals(codeString)) + return V3ObservationValue.DEVAST; + if ("HCPAST".equals(codeString)) + return V3ObservationValue.HCPAST; + if ("PACQAST".equals(codeString)) + return V3ObservationValue.PACQAST; + if ("PATAST".equals(codeString)) + return V3ObservationValue.PATAST; + if ("PAYAST".equals(codeString)) + return V3ObservationValue.PAYAST; + if ("PROAST".equals(codeString)) + return V3ObservationValue.PROAST; + if ("SDMAST".equals(codeString)) + return V3ObservationValue.SDMAST; + if ("_SECINTPRVRBOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVRBOBV; + if ("CLINRPT".equals(codeString)) + return V3ObservationValue.CLINRPT; + if ("DEVRPT".equals(codeString)) + return V3ObservationValue.DEVRPT; + if ("HCPRPT".equals(codeString)) + return V3ObservationValue.HCPRPT; + if ("PACQRPT".equals(codeString)) + return V3ObservationValue.PACQRPT; + if ("PATRPT".equals(codeString)) + return V3ObservationValue.PATRPT; + if ("PAYRPT".equals(codeString)) + return V3ObservationValue.PAYRPT; + if ("PRORPT".equals(codeString)) + return V3ObservationValue.PRORPT; + if ("SDMRPT".equals(codeString)) + return V3ObservationValue.SDMRPT; + if ("SECTRSTOBV".equals(codeString)) + return V3ObservationValue.SECTRSTOBV; + if ("TRSTACCRDOBV".equals(codeString)) + return V3ObservationValue.TRSTACCRDOBV; + if ("TRSTAGREOBV".equals(codeString)) + return V3ObservationValue.TRSTAGREOBV; + if ("TRSTCERTOBV".equals(codeString)) + return V3ObservationValue.TRSTCERTOBV; + if ("TRSTLOAOBV".equals(codeString)) + return V3ObservationValue.TRSTLOAOBV; + if ("LOAAN".equals(codeString)) + return V3ObservationValue.LOAAN; + if ("LOAAN1".equals(codeString)) + return V3ObservationValue.LOAAN1; + if ("LOAAN2".equals(codeString)) + return V3ObservationValue.LOAAN2; + if ("LOAAN3".equals(codeString)) + return V3ObservationValue.LOAAN3; + if ("LOAAN4".equals(codeString)) + return V3ObservationValue.LOAAN4; + if ("LOAAP".equals(codeString)) + return V3ObservationValue.LOAAP; + if ("LOAAP1".equals(codeString)) + return V3ObservationValue.LOAAP1; + if ("LOAAP2".equals(codeString)) + return V3ObservationValue.LOAAP2; + if ("LOAAP3".equals(codeString)) + return V3ObservationValue.LOAAP3; + if ("LOAAP4".equals(codeString)) + return V3ObservationValue.LOAAP4; + if ("LOAAS".equals(codeString)) + return V3ObservationValue.LOAAS; + if ("LOAAS1".equals(codeString)) + return V3ObservationValue.LOAAS1; + if ("LOAAS2".equals(codeString)) + return V3ObservationValue.LOAAS2; + if ("LOAAS3".equals(codeString)) + return V3ObservationValue.LOAAS3; + if ("LOAAS4".equals(codeString)) + return V3ObservationValue.LOAAS4; + if ("LOACM".equals(codeString)) + return V3ObservationValue.LOACM; + if ("LOACM1".equals(codeString)) + return V3ObservationValue.LOACM1; + if ("LOACM2".equals(codeString)) + return V3ObservationValue.LOACM2; + if ("LOACM3".equals(codeString)) + return V3ObservationValue.LOACM3; + if ("LOACM4".equals(codeString)) + return V3ObservationValue.LOACM4; + if ("LOAID".equals(codeString)) + return V3ObservationValue.LOAID; + if ("LOAID1".equals(codeString)) + return V3ObservationValue.LOAID1; + if ("LOAID2".equals(codeString)) + return V3ObservationValue.LOAID2; + if ("LOAID3".equals(codeString)) + return V3ObservationValue.LOAID3; + if ("LOAID4".equals(codeString)) + return V3ObservationValue.LOAID4; + if ("LOANR".equals(codeString)) + return V3ObservationValue.LOANR; + if ("LOANR1".equals(codeString)) + return V3ObservationValue.LOANR1; + if ("LOANR2".equals(codeString)) + return V3ObservationValue.LOANR2; + if ("LOANR3".equals(codeString)) + return V3ObservationValue.LOANR3; + if ("LOANR4".equals(codeString)) + return V3ObservationValue.LOANR4; + if ("LOARA".equals(codeString)) + return V3ObservationValue.LOARA; + if ("LOARA1".equals(codeString)) + return V3ObservationValue.LOARA1; + if ("LOARA2".equals(codeString)) + return V3ObservationValue.LOARA2; + if ("LOARA3".equals(codeString)) + return V3ObservationValue.LOARA3; + if ("LOARA4".equals(codeString)) + return V3ObservationValue.LOARA4; + if ("LOATK".equals(codeString)) + return V3ObservationValue.LOATK; + if ("LOATK1".equals(codeString)) + return V3ObservationValue.LOATK1; + if ("LOATK2".equals(codeString)) + return V3ObservationValue.LOATK2; + if ("LOATK3".equals(codeString)) + return V3ObservationValue.LOATK3; + if ("LOATK4".equals(codeString)) + return V3ObservationValue.LOATK4; + if ("TRSTMECOBV".equals(codeString)) + return V3ObservationValue.TRSTMECOBV; + if ("_SeverityObservation".equals(codeString)) + return V3ObservationValue._SEVERITYOBSERVATION; + if ("H".equals(codeString)) + return V3ObservationValue.H; + if ("L".equals(codeString)) + return V3ObservationValue.L; + if ("M".equals(codeString)) + return V3ObservationValue.M; + if ("_SubjectBodyPosition".equals(codeString)) + return V3ObservationValue._SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return V3ObservationValue.LLD; + if ("PRN".equals(codeString)) + return V3ObservationValue.PRN; + if ("RLD".equals(codeString)) + return V3ObservationValue.RLD; + if ("SFWL".equals(codeString)) + return V3ObservationValue.SFWL; + if ("SIT".equals(codeString)) + return V3ObservationValue.SIT; + if ("STN".equals(codeString)) + return V3ObservationValue.STN; + if ("SUP".equals(codeString)) + return V3ObservationValue.SUP; + if ("RTRD".equals(codeString)) + return V3ObservationValue.RTRD; + if ("TRD".equals(codeString)) + return V3ObservationValue.TRD; + if ("_VerificationOutcomeValue".equals(codeString)) + return V3ObservationValue._VERIFICATIONOUTCOMEVALUE; + if ("ACT".equals(codeString)) + return V3ObservationValue.ACT; + if ("ACTPEND".equals(codeString)) + return V3ObservationValue.ACTPEND; + if ("ELG".equals(codeString)) + return V3ObservationValue.ELG; + if ("INACT".equals(codeString)) + return V3ObservationValue.INACT; + if ("INPNDINV".equals(codeString)) + return V3ObservationValue.INPNDINV; + if ("INPNDUPD".equals(codeString)) + return V3ObservationValue.INPNDUPD; + if ("NELG".equals(codeString)) + return V3ObservationValue.NELG; + if ("_AnnotationValue".equals(codeString)) + return V3ObservationValue._ANNOTATIONVALUE; + if ("_CommonClinicalObservationValue".equals(codeString)) + return V3ObservationValue._COMMONCLINICALOBSERVATIONVALUE; + if ("_IndividualCaseSafetyReportValueDomains".equals(codeString)) + return V3ObservationValue._INDIVIDUALCASESAFETYREPORTVALUEDOMAINS; + if ("_IndicationValue".equals(codeString)) + return V3ObservationValue._INDICATIONVALUE; + throw new IllegalArgumentException("Unknown V3ObservationValue code '"+codeString+"'"); + } + + public String toCode(V3ObservationValue code) { + if (code == V3ObservationValue._ACTCOVERAGEASSESSMENTOBSERVATIONVALUE) + return "_ActCoverageAssessmentObservationValue"; + if (code == V3ObservationValue._ACTFINANCIALSTATUSOBSERVATIONVALUE) + return "_ActFinancialStatusObservationValue"; + if (code == V3ObservationValue.ASSET) + return "ASSET"; + if (code == V3ObservationValue.ANNUITY) + return "ANNUITY"; + if (code == V3ObservationValue.PROP) + return "PROP"; + if (code == V3ObservationValue.RETACCT) + return "RETACCT"; + if (code == V3ObservationValue.TRUST) + return "TRUST"; + if (code == V3ObservationValue.INCOME) + return "INCOME"; + if (code == V3ObservationValue.CHILD) + return "CHILD"; + if (code == V3ObservationValue.DISABL) + return "DISABL"; + if (code == V3ObservationValue.INVEST) + return "INVEST"; + if (code == V3ObservationValue.PAY) + return "PAY"; + if (code == V3ObservationValue.RETIRE) + return "RETIRE"; + if (code == V3ObservationValue.SPOUSAL) + return "SPOUSAL"; + if (code == V3ObservationValue.SUPPLE) + return "SUPPLE"; + if (code == V3ObservationValue.TAX) + return "TAX"; + if (code == V3ObservationValue.LIVEXP) + return "LIVEXP"; + if (code == V3ObservationValue.CLOTH) + return "CLOTH"; + if (code == V3ObservationValue.FOOD) + return "FOOD"; + if (code == V3ObservationValue.HEALTH) + return "HEALTH"; + if (code == V3ObservationValue.HOUSE) + return "HOUSE"; + if (code == V3ObservationValue.LEGAL) + return "LEGAL"; + if (code == V3ObservationValue.MORTG) + return "MORTG"; + if (code == V3ObservationValue.RENT) + return "RENT"; + if (code == V3ObservationValue.SUNDRY) + return "SUNDRY"; + if (code == V3ObservationValue.TRANS) + return "TRANS"; + if (code == V3ObservationValue.UTIL) + return "UTIL"; + if (code == V3ObservationValue.ELSTAT) + return "ELSTAT"; + if (code == V3ObservationValue.ADOPT) + return "ADOPT"; + if (code == V3ObservationValue.BTHCERT) + return "BTHCERT"; + if (code == V3ObservationValue.CCOC) + return "CCOC"; + if (code == V3ObservationValue.DRLIC) + return "DRLIC"; + if (code == V3ObservationValue.FOSTER) + return "FOSTER"; + if (code == V3ObservationValue.MEMBER) + return "MEMBER"; + if (code == V3ObservationValue.MIL) + return "MIL"; + if (code == V3ObservationValue.MRGCERT) + return "MRGCERT"; + if (code == V3ObservationValue.PASSPORT) + return "PASSPORT"; + if (code == V3ObservationValue.STUDENRL) + return "STUDENRL"; + if (code == V3ObservationValue.HLSTAT) + return "HLSTAT"; + if (code == V3ObservationValue.DISABLE) + return "DISABLE"; + if (code == V3ObservationValue.DRUG) + return "DRUG"; + if (code == V3ObservationValue.IVDRG) + return "IVDRG"; + if (code == V3ObservationValue.PGNT) + return "PGNT"; + if (code == V3ObservationValue.LIVDEP) + return "LIVDEP"; + if (code == V3ObservationValue.RELDEP) + return "RELDEP"; + if (code == V3ObservationValue.SPSDEP) + return "SPSDEP"; + if (code == V3ObservationValue.URELDEP) + return "URELDEP"; + if (code == V3ObservationValue.LIVSIT) + return "LIVSIT"; + if (code == V3ObservationValue.ALONE) + return "ALONE"; + if (code == V3ObservationValue.DEPCHD) + return "DEPCHD"; + if (code == V3ObservationValue.DEPSPS) + return "DEPSPS"; + if (code == V3ObservationValue.DEPYGCHD) + return "DEPYGCHD"; + if (code == V3ObservationValue.FAM) + return "FAM"; + if (code == V3ObservationValue.RELAT) + return "RELAT"; + if (code == V3ObservationValue.SPS) + return "SPS"; + if (code == V3ObservationValue.UNREL) + return "UNREL"; + if (code == V3ObservationValue.SOECSTAT) + return "SOECSTAT"; + if (code == V3ObservationValue.ABUSE) + return "ABUSE"; + if (code == V3ObservationValue.HMLESS) + return "HMLESS"; + if (code == V3ObservationValue.ILGIM) + return "ILGIM"; + if (code == V3ObservationValue.INCAR) + return "INCAR"; + if (code == V3ObservationValue.PROB) + return "PROB"; + if (code == V3ObservationValue.REFUG) + return "REFUG"; + if (code == V3ObservationValue.UNEMPL) + return "UNEMPL"; + if (code == V3ObservationValue._ALLERGYTESTVALUE) + return "_AllergyTestValue"; + if (code == V3ObservationValue.A0) + return "A0"; + if (code == V3ObservationValue.A1) + return "A1"; + if (code == V3ObservationValue.A2) + return "A2"; + if (code == V3ObservationValue.A3) + return "A3"; + if (code == V3ObservationValue.A4) + return "A4"; + if (code == V3ObservationValue._COVERAGELIMITOBSERVATIONVALUE) + return "_CoverageLimitObservationValue"; + if (code == V3ObservationValue._COVERAGELEVELOBSERVATIONVALUE) + return "_CoverageLevelObservationValue"; + if (code == V3ObservationValue.ADC) + return "ADC"; + if (code == V3ObservationValue.CHD) + return "CHD"; + if (code == V3ObservationValue.DEP) + return "DEP"; + if (code == V3ObservationValue.DP) + return "DP"; + if (code == V3ObservationValue.ECH) + return "ECH"; + if (code == V3ObservationValue.FLY) + return "FLY"; + if (code == V3ObservationValue.IND) + return "IND"; + if (code == V3ObservationValue.SSP) + return "SSP"; + if (code == V3ObservationValue._CRITICALITYOBSERVATIONVALUE) + return "_CriticalityObservationValue"; + if (code == V3ObservationValue.CRITH) + return "CRITH"; + if (code == V3ObservationValue.CRITL) + return "CRITL"; + if (code == V3ObservationValue.CRITU) + return "CRITU"; + if (code == V3ObservationValue._GENETICOBSERVATIONVALUE) + return "_GeneticObservationValue"; + if (code == V3ObservationValue.HOMOZYGOTE) + return "Homozygote"; + if (code == V3ObservationValue._OBSERVATIONMEASURESCORING) + return "_ObservationMeasureScoring"; + if (code == V3ObservationValue.COHORT) + return "COHORT"; + if (code == V3ObservationValue.CONTVAR) + return "CONTVAR"; + if (code == V3ObservationValue.PROPOR) + return "PROPOR"; + if (code == V3ObservationValue.RATIO) + return "RATIO"; + if (code == V3ObservationValue._OBSERVATIONMEASURETYPE) + return "_ObservationMeasureType"; + if (code == V3ObservationValue.COMPOSITE) + return "COMPOSITE"; + if (code == V3ObservationValue.EFFICIENCY) + return "EFFICIENCY"; + if (code == V3ObservationValue.EXPERIENCE) + return "EXPERIENCE"; + if (code == V3ObservationValue.OUTCOME) + return "OUTCOME"; + if (code == V3ObservationValue.PROCESS) + return "PROCESS"; + if (code == V3ObservationValue.RESOURCE) + return "RESOURCE"; + if (code == V3ObservationValue.STRUCTURE) + return "STRUCTURE"; + if (code == V3ObservationValue._OBSERVATIONPOPULATIONINCLUSION) + return "_ObservationPopulationInclusion"; + if (code == V3ObservationValue.DENEX) + return "DENEX"; + if (code == V3ObservationValue.DENEXCEP) + return "DENEXCEP"; + if (code == V3ObservationValue.DENOM) + return "DENOM"; + if (code == V3ObservationValue.IP) + return "IP"; + if (code == V3ObservationValue.IPP) + return "IPP"; + if (code == V3ObservationValue.MSRPOPL) + return "MSRPOPL"; + if (code == V3ObservationValue.NUMER) + return "NUMER"; + if (code == V3ObservationValue.NUMEX) + return "NUMEX"; + if (code == V3ObservationValue._PARTIALCOMPLETIONSCALE) + return "_PartialCompletionScale"; + if (code == V3ObservationValue.G) + return "G"; + if (code == V3ObservationValue.LE) + return "LE"; + if (code == V3ObservationValue.ME) + return "ME"; + if (code == V3ObservationValue.MI) + return "MI"; + if (code == V3ObservationValue.N) + return "N"; + if (code == V3ObservationValue.S) + return "S"; + if (code == V3ObservationValue._SECURITYOBSERVATIONVALUE) + return "_SecurityObservationValue"; + if (code == V3ObservationValue._SECINTOBV) + return "_SECINTOBV"; + if (code == V3ObservationValue._SECALTINTOBV) + return "_SECALTINTOBV"; + if (code == V3ObservationValue.ABSTRED) + return "ABSTRED"; + if (code == V3ObservationValue.AGGRED) + return "AGGRED"; + if (code == V3ObservationValue.ANONYED) + return "ANONYED"; + if (code == V3ObservationValue.MAPPED) + return "MAPPED"; + if (code == V3ObservationValue.MASKED) + return "MASKED"; + if (code == V3ObservationValue.PSEUDED) + return "PSEUDED"; + if (code == V3ObservationValue.REDACTED) + return "REDACTED"; + if (code == V3ObservationValue.SUBSETTED) + return "SUBSETTED"; + if (code == V3ObservationValue.SYNTAC) + return "SYNTAC"; + if (code == V3ObservationValue.TRSLT) + return "TRSLT"; + if (code == V3ObservationValue.VERSIONED) + return "VERSIONED"; + if (code == V3ObservationValue._SECDATINTOBV) + return "_SECDATINTOBV"; + if (code == V3ObservationValue.CRYTOHASH) + return "CRYTOHASH"; + if (code == V3ObservationValue.DIGSIG) + return "DIGSIG"; + if (code == V3ObservationValue._SECINTCONOBV) + return "_SECINTCONOBV"; + if (code == V3ObservationValue.HRELIABLE) + return "HRELIABLE"; + if (code == V3ObservationValue.RELIABLE) + return "RELIABLE"; + if (code == V3ObservationValue.UNCERTREL) + return "UNCERTREL"; + if (code == V3ObservationValue.UNRELIABLE) + return "UNRELIABLE"; + if (code == V3ObservationValue._SECINTPRVOBV) + return "_SECINTPRVOBV"; + if (code == V3ObservationValue._SECINTPRVABOBV) + return "_SECINTPRVABOBV"; + if (code == V3ObservationValue.CLINAST) + return "CLINAST"; + if (code == V3ObservationValue.DEVAST) + return "DEVAST"; + if (code == V3ObservationValue.HCPAST) + return "HCPAST"; + if (code == V3ObservationValue.PACQAST) + return "PACQAST"; + if (code == V3ObservationValue.PATAST) + return "PATAST"; + if (code == V3ObservationValue.PAYAST) + return "PAYAST"; + if (code == V3ObservationValue.PROAST) + return "PROAST"; + if (code == V3ObservationValue.SDMAST) + return "SDMAST"; + if (code == V3ObservationValue._SECINTPRVRBOBV) + return "_SECINTPRVRBOBV"; + if (code == V3ObservationValue.CLINRPT) + return "CLINRPT"; + if (code == V3ObservationValue.DEVRPT) + return "DEVRPT"; + if (code == V3ObservationValue.HCPRPT) + return "HCPRPT"; + if (code == V3ObservationValue.PACQRPT) + return "PACQRPT"; + if (code == V3ObservationValue.PATRPT) + return "PATRPT"; + if (code == V3ObservationValue.PAYRPT) + return "PAYRPT"; + if (code == V3ObservationValue.PRORPT) + return "PRORPT"; + if (code == V3ObservationValue.SDMRPT) + return "SDMRPT"; + if (code == V3ObservationValue.SECTRSTOBV) + return "SECTRSTOBV"; + if (code == V3ObservationValue.TRSTACCRDOBV) + return "TRSTACCRDOBV"; + if (code == V3ObservationValue.TRSTAGREOBV) + return "TRSTAGREOBV"; + if (code == V3ObservationValue.TRSTCERTOBV) + return "TRSTCERTOBV"; + if (code == V3ObservationValue.TRSTLOAOBV) + return "TRSTLOAOBV"; + if (code == V3ObservationValue.LOAAN) + return "LOAAN"; + if (code == V3ObservationValue.LOAAN1) + return "LOAAN1"; + if (code == V3ObservationValue.LOAAN2) + return "LOAAN2"; + if (code == V3ObservationValue.LOAAN3) + return "LOAAN3"; + if (code == V3ObservationValue.LOAAN4) + return "LOAAN4"; + if (code == V3ObservationValue.LOAAP) + return "LOAAP"; + if (code == V3ObservationValue.LOAAP1) + return "LOAAP1"; + if (code == V3ObservationValue.LOAAP2) + return "LOAAP2"; + if (code == V3ObservationValue.LOAAP3) + return "LOAAP3"; + if (code == V3ObservationValue.LOAAP4) + return "LOAAP4"; + if (code == V3ObservationValue.LOAAS) + return "LOAAS"; + if (code == V3ObservationValue.LOAAS1) + return "LOAAS1"; + if (code == V3ObservationValue.LOAAS2) + return "LOAAS2"; + if (code == V3ObservationValue.LOAAS3) + return "LOAAS3"; + if (code == V3ObservationValue.LOAAS4) + return "LOAAS4"; + if (code == V3ObservationValue.LOACM) + return "LOACM"; + if (code == V3ObservationValue.LOACM1) + return "LOACM1"; + if (code == V3ObservationValue.LOACM2) + return "LOACM2"; + if (code == V3ObservationValue.LOACM3) + return "LOACM3"; + if (code == V3ObservationValue.LOACM4) + return "LOACM4"; + if (code == V3ObservationValue.LOAID) + return "LOAID"; + if (code == V3ObservationValue.LOAID1) + return "LOAID1"; + if (code == V3ObservationValue.LOAID2) + return "LOAID2"; + if (code == V3ObservationValue.LOAID3) + return "LOAID3"; + if (code == V3ObservationValue.LOAID4) + return "LOAID4"; + if (code == V3ObservationValue.LOANR) + return "LOANR"; + if (code == V3ObservationValue.LOANR1) + return "LOANR1"; + if (code == V3ObservationValue.LOANR2) + return "LOANR2"; + if (code == V3ObservationValue.LOANR3) + return "LOANR3"; + if (code == V3ObservationValue.LOANR4) + return "LOANR4"; + if (code == V3ObservationValue.LOARA) + return "LOARA"; + if (code == V3ObservationValue.LOARA1) + return "LOARA1"; + if (code == V3ObservationValue.LOARA2) + return "LOARA2"; + if (code == V3ObservationValue.LOARA3) + return "LOARA3"; + if (code == V3ObservationValue.LOARA4) + return "LOARA4"; + if (code == V3ObservationValue.LOATK) + return "LOATK"; + if (code == V3ObservationValue.LOATK1) + return "LOATK1"; + if (code == V3ObservationValue.LOATK2) + return "LOATK2"; + if (code == V3ObservationValue.LOATK3) + return "LOATK3"; + if (code == V3ObservationValue.LOATK4) + return "LOATK4"; + if (code == V3ObservationValue.TRSTMECOBV) + return "TRSTMECOBV"; + if (code == V3ObservationValue._SEVERITYOBSERVATION) + return "_SeverityObservation"; + if (code == V3ObservationValue.H) + return "H"; + if (code == V3ObservationValue.L) + return "L"; + if (code == V3ObservationValue.M) + return "M"; + if (code == V3ObservationValue._SUBJECTBODYPOSITION) + return "_SubjectBodyPosition"; + if (code == V3ObservationValue.LLD) + return "LLD"; + if (code == V3ObservationValue.PRN) + return "PRN"; + if (code == V3ObservationValue.RLD) + return "RLD"; + if (code == V3ObservationValue.SFWL) + return "SFWL"; + if (code == V3ObservationValue.SIT) + return "SIT"; + if (code == V3ObservationValue.STN) + return "STN"; + if (code == V3ObservationValue.SUP) + return "SUP"; + if (code == V3ObservationValue.RTRD) + return "RTRD"; + if (code == V3ObservationValue.TRD) + return "TRD"; + if (code == V3ObservationValue._VERIFICATIONOUTCOMEVALUE) + return "_VerificationOutcomeValue"; + if (code == V3ObservationValue.ACT) + return "ACT"; + if (code == V3ObservationValue.ACTPEND) + return "ACTPEND"; + if (code == V3ObservationValue.ELG) + return "ELG"; + if (code == V3ObservationValue.INACT) + return "INACT"; + if (code == V3ObservationValue.INPNDINV) + return "INPNDINV"; + if (code == V3ObservationValue.INPNDUPD) + return "INPNDUPD"; + if (code == V3ObservationValue.NELG) + return "NELG"; + if (code == V3ObservationValue._ANNOTATIONVALUE) + return "_AnnotationValue"; + if (code == V3ObservationValue._COMMONCLINICALOBSERVATIONVALUE) + return "_CommonClinicalObservationValue"; + if (code == V3ObservationValue._INDIVIDUALCASESAFETYREPORTVALUEDOMAINS) + return "_IndividualCaseSafetyReportValueDomains"; + if (code == V3ObservationValue._INDICATIONVALUE) + return "_IndicationValue"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugForm.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugForm.java new file mode 100644 index 00000000000..b9bd6ea1266 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugForm.java @@ -0,0 +1,1518 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3OrderableDrugForm { + + /** + * AdministrableDrugForm + */ + _ADMINISTRABLEDRUGFORM, + /** + * Applicatorful + */ + APPFUL, + /** + * Drops + */ + DROP, + /** + * Nasal Drops + */ + NDROP, + /** + * Ophthalmic Drops + */ + OPDROP, + /** + * Oral Drops + */ + ORDROP, + /** + * Otic Drops + */ + OTDROP, + /** + * Puff + */ + PUFF, + /** + * Scoops + */ + SCOOP, + /** + * Sprays + */ + SPRY, + /** + * DispensableDrugForm + */ + _DISPENSABLEDRUGFORM, + /** + * Any elastic aeriform fluid in which the molecules are separated from one another and have free paths. + */ + _GASDRUGFORM, + /** + * Gas for Inhalation + */ + GASINHL, + /** + * GasLiquidMixture + */ + _GASLIQUIDMIXTURE, + /** + * Aerosol + */ + AER, + /** + * Breath Activated Inhaler + */ + BAINHL, + /** + * Inhalant Solution + */ + INHLSOL, + /** + * Metered Dose Inhaler + */ + MDINHL, + /** + * Nasal Spray + */ + NASSPRY, + /** + * Dermal Spray + */ + DERMSPRY, + /** + * Foam + */ + FOAM, + /** + * Foam with Applicator + */ + FOAMAPL, + /** + * Rectal foam + */ + RECFORM, + /** + * Vaginal foam + */ + VAGFOAM, + /** + * Vaginal foam with applicator + */ + VAGFOAMAPL, + /** + * Rectal Spray + */ + RECSPRY, + /** + * Vaginal Spray + */ + VAGSPRY, + /** + * GasSolidSpray + */ + _GASSOLIDSPRAY, + /** + * Inhalant + */ + INHL, + /** + * Breath Activated Powder Inhaler + */ + BAINHLPWD, + /** + * Inhalant Powder + */ + INHLPWD, + /** + * Metered Dose Powder Inhaler + */ + MDINHLPWD, + /** + * Nasal Inhalant + */ + NASINHL, + /** + * Oral Inhalant + */ + ORINHL, + /** + * Powder Spray + */ + PWDSPRY, + /** + * Spray with Adaptor + */ + SPRYADAPT, + /** + * A state of substance that is an intermediate one entered into as matter goes from solid to gas; liquids are also intermediate in that they have neither the orderliness of a crystal nor the randomness of a gas. (Note: This term should not be used to describe solutions, only pure chemicals in their liquid state.) + */ + _LIQUID, + /** + * Liquid Cleanser + */ + LIQCLN, + /** + * Medicated Liquid Soap + */ + LIQSOAP, + /** + * A liquid soap or detergent used to clean the hair and scalp and is often used as a vehicle for dermatologic agents. + */ + SHMP, + /** + * An unctuous, combustible substance which is liquid, or easily liquefiable, on warming, and is soluble in ether but insoluble in water. Such substances, depending on their origin, are classified as animal, mineral, or vegetable oils. + */ + OIL, + /** + * Topical Oil + */ + TOPOIL, + /** + * A liquid preparation that contains one or more chemical substances dissolved, i.e., molecularly dispersed, in a suitable solvent or mixture of mutually miscible solvents. + */ + SOL, + /** + * Intraperitoneal Solution + */ + IPSOL, + /** + * A sterile solution intended to bathe or flush open wounds or body cavities; they're used topically, never parenterally. + */ + IRSOL, + /** + * A liquid preparation, intended for the irrigative cleansing of the vagina, that is prepared from powders, liquid solutions, or liquid concentrates and contains one or more chemical substances dissolved in a suitable solvent or mutually miscible solvents. + */ + DOUCHE, + /** + * A rectal preparation for therapeutic, diagnostic, or nutritive purposes. + */ + ENEMA, + /** + * Ophthalmic Irrigation Solution + */ + OPIRSOL, + /** + * Intravenous Solution + */ + IVSOL, + /** + * Oral Solution + */ + ORALSOL, + /** + * A clear, pleasantly flavored, sweetened hydroalcoholic liquid containing dissolved medicinal agents; it is intended for oral use. + */ + ELIXIR, + /** + * An aqueous solution which is most often used for its deodorant, refreshing, or antiseptic effect. + */ + RINSE, + /** + * An oral solution containing high concentrations of sucrose or other sugars; the term has also been used to include any other liquid dosage form prepared in a sweet and viscid vehicle, including oral suspensions. + */ + SYRUP, + /** + * Rectal Solution + */ + RECSOL, + /** + * Topical Solution + */ + TOPSOL, + /** + * A solution or mixture of various substances in oil, alcoholic solutions of soap, or emulsions intended for external application. + */ + LIN, + /** + * Mucous Membrane Topical Solution + */ + MUCTOPSOL, + /** + * Tincture + */ + TINC, + /** + * A two-phase system in which one liquid is dispersed throughout another liquid in the form of small droplets. + */ + _LIQUIDLIQUIDEMULSION, + /** + * A semisolid dosage form containing one or more drug substances dissolved or dispersed in a suitable base; more recently, the term has been restricted to products consisting of oil-in-water emulsions or aqueous microcrystalline dispersions of long chain fatty acids or alcohols that are water washable and more cosmetically and aesthetically acceptable. + */ + CRM, + /** + * Nasal Cream + */ + NASCRM, + /** + * Ophthalmic Cream + */ + OPCRM, + /** + * Oral Cream + */ + ORCRM, + /** + * Otic Cream + */ + OTCRM, + /** + * Rectal Cream + */ + RECCRM, + /** + * Topical Cream + */ + TOPCRM, + /** + * Vaginal Cream + */ + VAGCRM, + /** + * Vaginal Cream with Applicator + */ + VAGCRMAPL, + /** + * The term "lotion" has been used to categorize many topical suspensions, solutions and emulsions intended for application to the skin. + */ + LTN, + /** + * Topical Lotion + */ + TOPLTN, + /** + * A semisolid preparation intended for external application to the skin or mucous membranes. + */ + OINT, + /** + * Nasal Ointment + */ + NASOINT, + /** + * Ointment with Applicator + */ + OINTAPL, + /** + * Ophthalmic Ointment + */ + OPOINT, + /** + * Otic Ointment + */ + OTOINT, + /** + * Rectal Ointment + */ + RECOINT, + /** + * Topical Ointment + */ + TOPOINT, + /** + * Vaginal Ointment + */ + VAGOINT, + /** + * Vaginal Ointment with Applicator + */ + VAGOINTAPL, + /** + * A liquid preparation which consists of solid particles dispersed throughout a liquid phase in which the particles are not soluble. + */ + _LIQUIDSOLIDSUSPENSION, + /** + * A semisolid system consisting of either suspensions made up of small inorganic particles or large organic molecules interpenetrated by a liquid. + */ + GEL, + /** + * Gel with Applicator + */ + GELAPL, + /** + * Nasal Gel + */ + NASGEL, + /** + * Ophthalmic Gel + */ + OPGEL, + /** + * Otic Gel + */ + OTGEL, + /** + * Topical Gel + */ + TOPGEL, + /** + * Urethral Gel + */ + URETHGEL, + /** + * Vaginal Gel + */ + VAGGEL, + /** + * Vaginal Gel with Applicator + */ + VGELAPL, + /** + * A semisolid dosage form that contains one or more drug substances intended for topical application. + */ + PASTE, + /** + * Pudding + */ + PUD, + /** + * A paste formulation intended to clean and/or polish the teeth, and which may contain certain additional agents. + */ + TPASTE, + /** + * Suspension + */ + SUSP, + /** + * Intrathecal Suspension + */ + ITSUSP, + /** + * Ophthalmic Suspension + */ + OPSUSP, + /** + * Oral Suspension + */ + ORSUSP, + /** + * Extended-Release Suspension + */ + ERSUSP, + /** + * 12 Hour Extended-Release Suspension + */ + ERSUSP12, + /** + * 24 Hour Extended Release Suspension + */ + ERSUSP24, + /** + * Otic Suspension + */ + OTSUSP, + /** + * Rectal Suspension + */ + RECSUSP, + /** + * SolidDrugForm + */ + _SOLIDDRUGFORM, + /** + * Bar + */ + BAR, + /** + * Bar Soap + */ + BARSOAP, + /** + * Medicated Bar Soap + */ + MEDBAR, + /** + * A solid dosage form usually in the form of a rectangle that is meant to be chewed. + */ + CHEWBAR, + /** + * A solid dosage form in the shape of a small ball. + */ + BEAD, + /** + * Cake + */ + CAKE, + /** + * A substance that serves to produce solid union between two surfaces. + */ + CEMENT, + /** + * A naturally produced angular solid of definite form in which the ultimate units from which it is built up are systematically arranged; they are usually evenly spaced on a regular space lattice. + */ + CRYS, + /** + * A circular plate-like organ or structure. + */ + DISK, + /** + * Flakes + */ + FLAKE, + /** + * A small particle or grain. + */ + GRAN, + /** + * A sweetened and flavored insoluble plastic material of various shapes which when chewed, releases a drug substance into the oral cavity. + */ + GUM, + /** + * Pad + */ + PAD, + /** + * Medicated Pad + */ + MEDPAD, + /** + * A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g., the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied. + */ + PATCH, + /** + * Transdermal Patch + */ + TPATCH, + /** + * 16 Hour Transdermal Patch + */ + TPATH16, + /** + * 24 Hour Transdermal Patch + */ + TPATH24, + /** + * Biweekly Transdermal Patch + */ + TPATH2WK, + /** + * 72 Hour Transdermal Patch + */ + TPATH72, + /** + * Weekly Transdermal Patch + */ + TPATHWK, + /** + * A small sterile solid mass consisting of a highly purified drug (with or without excipients) made by the formation of granules, or by compression and molding. + */ + PELLET, + /** + * A small, round solid dosage form containing a medicinal agent intended for oral administration. + */ + PILL, + /** + * A solid dosage form in which the drug is enclosed within either a hard or soft soluble container or "shell" made from a suitable form of gelatin. + */ + CAP, + /** + * Oral Capsule + */ + ORCAP, + /** + * Enteric Coated Capsule + */ + ENTCAP, + /** + * Extended Release Enteric Coated Capsule + */ + ERENTCAP, + /** + * A solid dosage form in which the drug is enclosed within either a hard or soft soluble container made from a suitable form of gelatin, and which releases a drug (or drugs) in such a manner to allow a reduction in dosing frequency as compared to that drug (or drugs) presented as a conventional dosage form. + */ + ERCAP, + /** + * 12 Hour Extended Release Capsule + */ + ERCAP12, + /** + * 24 Hour Extended Release Capsule + */ + ERCAP24, + /** + * Rationale: Duplicate of code ERENTCAP. Use code ERENTCAP instead. + */ + ERECCAP, + /** + * A solid dosage form containing medicinal substances with or without suitable diluents. + */ + TAB, + /** + * Oral Tablet + */ + ORTAB, + /** + * Buccal Tablet + */ + BUCTAB, + /** + * Sustained Release Buccal Tablet + */ + SRBUCTAB, + /** + * Caplet + */ + CAPLET, + /** + * A solid dosage form containing medicinal substances with or without suitable diluents that is intended to be chewed, producing a pleasant tasting residue in the oral cavity that is easily swallowed and does not leave a bitter or unpleasant after-taste. + */ + CHEWTAB, + /** + * Coated Particles Tablet + */ + CPTAB, + /** + * A solid dosage form containing medicinal substances which disintegrates rapidly, usually within a matter of seconds, when placed upon the tongue. + */ + DISINTAB, + /** + * Delayed Release Tablet + */ + DRTAB, + /** + * Enteric Coated Tablet + */ + ECTAB, + /** + * Extended Release Enteric Coated Tablet + */ + ERECTAB, + /** + * A solid dosage form containing a drug which allows at least a reduction in dosing frequency as compared to that drug presented in conventional dosage form. + */ + ERTAB, + /** + * 12 Hour Extended Release Tablet + */ + ERTAB12, + /** + * 24 Hour Extended Release Tablet + */ + ERTAB24, + /** + * A solid preparation containing one or more medicaments, usually in a flavored, sweetened base which is intended to dissolve or disintegrate slowly in the mouth. + */ + ORTROCHE, + /** + * Sublingual Tablet + */ + SLTAB, + /** + * Vaginal Tablet + */ + VAGTAB, + /** + * An intimate mixture of dry, finely divided drugs and/or chemicals that may be intended for internal or external use. + */ + POWD, + /** + * Topical Powder + */ + TOPPWD, + /** + * Rectal Powder + */ + RECPWD, + /** + * Vaginal Powder + */ + VAGPWD, + /** + * A solid body of various weights and shapes, adapted for introduction into the rectal, vaginal, or urethral orifice of the human body; they usually melt, soften, or dissolve at body temperature. + */ + SUPP, + /** + * Rectal Suppository + */ + RECSUPP, + /** + * Urethral suppository + */ + URETHSUPP, + /** + * Vaginal Suppository + */ + VAGSUPP, + /** + * A wad of absorbent material usually wound around one end of a small stick and used for applying medication or for removing material from an area. + */ + SWAB, + /** + * Medicated swab + */ + MEDSWAB, + /** + * A thin slice of material containing a medicinal agent. + */ + WAFER, + /** + * added to help the parsers + */ + NULL; + public static V3OrderableDrugForm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AdministrableDrugForm".equals(codeString)) + return _ADMINISTRABLEDRUGFORM; + if ("APPFUL".equals(codeString)) + return APPFUL; + if ("DROP".equals(codeString)) + return DROP; + if ("NDROP".equals(codeString)) + return NDROP; + if ("OPDROP".equals(codeString)) + return OPDROP; + if ("ORDROP".equals(codeString)) + return ORDROP; + if ("OTDROP".equals(codeString)) + return OTDROP; + if ("PUFF".equals(codeString)) + return PUFF; + if ("SCOOP".equals(codeString)) + return SCOOP; + if ("SPRY".equals(codeString)) + return SPRY; + if ("_DispensableDrugForm".equals(codeString)) + return _DISPENSABLEDRUGFORM; + if ("_GasDrugForm".equals(codeString)) + return _GASDRUGFORM; + if ("GASINHL".equals(codeString)) + return GASINHL; + if ("_GasLiquidMixture".equals(codeString)) + return _GASLIQUIDMIXTURE; + if ("AER".equals(codeString)) + return AER; + if ("BAINHL".equals(codeString)) + return BAINHL; + if ("INHLSOL".equals(codeString)) + return INHLSOL; + if ("MDINHL".equals(codeString)) + return MDINHL; + if ("NASSPRY".equals(codeString)) + return NASSPRY; + if ("DERMSPRY".equals(codeString)) + return DERMSPRY; + if ("FOAM".equals(codeString)) + return FOAM; + if ("FOAMAPL".equals(codeString)) + return FOAMAPL; + if ("RECFORM".equals(codeString)) + return RECFORM; + if ("VAGFOAM".equals(codeString)) + return VAGFOAM; + if ("VAGFOAMAPL".equals(codeString)) + return VAGFOAMAPL; + if ("RECSPRY".equals(codeString)) + return RECSPRY; + if ("VAGSPRY".equals(codeString)) + return VAGSPRY; + if ("_GasSolidSpray".equals(codeString)) + return _GASSOLIDSPRAY; + if ("INHL".equals(codeString)) + return INHL; + if ("BAINHLPWD".equals(codeString)) + return BAINHLPWD; + if ("INHLPWD".equals(codeString)) + return INHLPWD; + if ("MDINHLPWD".equals(codeString)) + return MDINHLPWD; + if ("NASINHL".equals(codeString)) + return NASINHL; + if ("ORINHL".equals(codeString)) + return ORINHL; + if ("PWDSPRY".equals(codeString)) + return PWDSPRY; + if ("SPRYADAPT".equals(codeString)) + return SPRYADAPT; + if ("_Liquid".equals(codeString)) + return _LIQUID; + if ("LIQCLN".equals(codeString)) + return LIQCLN; + if ("LIQSOAP".equals(codeString)) + return LIQSOAP; + if ("SHMP".equals(codeString)) + return SHMP; + if ("OIL".equals(codeString)) + return OIL; + if ("TOPOIL".equals(codeString)) + return TOPOIL; + if ("SOL".equals(codeString)) + return SOL; + if ("IPSOL".equals(codeString)) + return IPSOL; + if ("IRSOL".equals(codeString)) + return IRSOL; + if ("DOUCHE".equals(codeString)) + return DOUCHE; + if ("ENEMA".equals(codeString)) + return ENEMA; + if ("OPIRSOL".equals(codeString)) + return OPIRSOL; + if ("IVSOL".equals(codeString)) + return IVSOL; + if ("ORALSOL".equals(codeString)) + return ORALSOL; + if ("ELIXIR".equals(codeString)) + return ELIXIR; + if ("RINSE".equals(codeString)) + return RINSE; + if ("SYRUP".equals(codeString)) + return SYRUP; + if ("RECSOL".equals(codeString)) + return RECSOL; + if ("TOPSOL".equals(codeString)) + return TOPSOL; + if ("LIN".equals(codeString)) + return LIN; + if ("MUCTOPSOL".equals(codeString)) + return MUCTOPSOL; + if ("TINC".equals(codeString)) + return TINC; + if ("_LiquidLiquidEmulsion".equals(codeString)) + return _LIQUIDLIQUIDEMULSION; + if ("CRM".equals(codeString)) + return CRM; + if ("NASCRM".equals(codeString)) + return NASCRM; + if ("OPCRM".equals(codeString)) + return OPCRM; + if ("ORCRM".equals(codeString)) + return ORCRM; + if ("OTCRM".equals(codeString)) + return OTCRM; + if ("RECCRM".equals(codeString)) + return RECCRM; + if ("TOPCRM".equals(codeString)) + return TOPCRM; + if ("VAGCRM".equals(codeString)) + return VAGCRM; + if ("VAGCRMAPL".equals(codeString)) + return VAGCRMAPL; + if ("LTN".equals(codeString)) + return LTN; + if ("TOPLTN".equals(codeString)) + return TOPLTN; + if ("OINT".equals(codeString)) + return OINT; + if ("NASOINT".equals(codeString)) + return NASOINT; + if ("OINTAPL".equals(codeString)) + return OINTAPL; + if ("OPOINT".equals(codeString)) + return OPOINT; + if ("OTOINT".equals(codeString)) + return OTOINT; + if ("RECOINT".equals(codeString)) + return RECOINT; + if ("TOPOINT".equals(codeString)) + return TOPOINT; + if ("VAGOINT".equals(codeString)) + return VAGOINT; + if ("VAGOINTAPL".equals(codeString)) + return VAGOINTAPL; + if ("_LiquidSolidSuspension".equals(codeString)) + return _LIQUIDSOLIDSUSPENSION; + if ("GEL".equals(codeString)) + return GEL; + if ("GELAPL".equals(codeString)) + return GELAPL; + if ("NASGEL".equals(codeString)) + return NASGEL; + if ("OPGEL".equals(codeString)) + return OPGEL; + if ("OTGEL".equals(codeString)) + return OTGEL; + if ("TOPGEL".equals(codeString)) + return TOPGEL; + if ("URETHGEL".equals(codeString)) + return URETHGEL; + if ("VAGGEL".equals(codeString)) + return VAGGEL; + if ("VGELAPL".equals(codeString)) + return VGELAPL; + if ("PASTE".equals(codeString)) + return PASTE; + if ("PUD".equals(codeString)) + return PUD; + if ("TPASTE".equals(codeString)) + return TPASTE; + if ("SUSP".equals(codeString)) + return SUSP; + if ("ITSUSP".equals(codeString)) + return ITSUSP; + if ("OPSUSP".equals(codeString)) + return OPSUSP; + if ("ORSUSP".equals(codeString)) + return ORSUSP; + if ("ERSUSP".equals(codeString)) + return ERSUSP; + if ("ERSUSP12".equals(codeString)) + return ERSUSP12; + if ("ERSUSP24".equals(codeString)) + return ERSUSP24; + if ("OTSUSP".equals(codeString)) + return OTSUSP; + if ("RECSUSP".equals(codeString)) + return RECSUSP; + if ("_SolidDrugForm".equals(codeString)) + return _SOLIDDRUGFORM; + if ("BAR".equals(codeString)) + return BAR; + if ("BARSOAP".equals(codeString)) + return BARSOAP; + if ("MEDBAR".equals(codeString)) + return MEDBAR; + if ("CHEWBAR".equals(codeString)) + return CHEWBAR; + if ("BEAD".equals(codeString)) + return BEAD; + if ("CAKE".equals(codeString)) + return CAKE; + if ("CEMENT".equals(codeString)) + return CEMENT; + if ("CRYS".equals(codeString)) + return CRYS; + if ("DISK".equals(codeString)) + return DISK; + if ("FLAKE".equals(codeString)) + return FLAKE; + if ("GRAN".equals(codeString)) + return GRAN; + if ("GUM".equals(codeString)) + return GUM; + if ("PAD".equals(codeString)) + return PAD; + if ("MEDPAD".equals(codeString)) + return MEDPAD; + if ("PATCH".equals(codeString)) + return PATCH; + if ("TPATCH".equals(codeString)) + return TPATCH; + if ("TPATH16".equals(codeString)) + return TPATH16; + if ("TPATH24".equals(codeString)) + return TPATH24; + if ("TPATH2WK".equals(codeString)) + return TPATH2WK; + if ("TPATH72".equals(codeString)) + return TPATH72; + if ("TPATHWK".equals(codeString)) + return TPATHWK; + if ("PELLET".equals(codeString)) + return PELLET; + if ("PILL".equals(codeString)) + return PILL; + if ("CAP".equals(codeString)) + return CAP; + if ("ORCAP".equals(codeString)) + return ORCAP; + if ("ENTCAP".equals(codeString)) + return ENTCAP; + if ("ERENTCAP".equals(codeString)) + return ERENTCAP; + if ("ERCAP".equals(codeString)) + return ERCAP; + if ("ERCAP12".equals(codeString)) + return ERCAP12; + if ("ERCAP24".equals(codeString)) + return ERCAP24; + if ("ERECCAP".equals(codeString)) + return ERECCAP; + if ("TAB".equals(codeString)) + return TAB; + if ("ORTAB".equals(codeString)) + return ORTAB; + if ("BUCTAB".equals(codeString)) + return BUCTAB; + if ("SRBUCTAB".equals(codeString)) + return SRBUCTAB; + if ("CAPLET".equals(codeString)) + return CAPLET; + if ("CHEWTAB".equals(codeString)) + return CHEWTAB; + if ("CPTAB".equals(codeString)) + return CPTAB; + if ("DISINTAB".equals(codeString)) + return DISINTAB; + if ("DRTAB".equals(codeString)) + return DRTAB; + if ("ECTAB".equals(codeString)) + return ECTAB; + if ("ERECTAB".equals(codeString)) + return ERECTAB; + if ("ERTAB".equals(codeString)) + return ERTAB; + if ("ERTAB12".equals(codeString)) + return ERTAB12; + if ("ERTAB24".equals(codeString)) + return ERTAB24; + if ("ORTROCHE".equals(codeString)) + return ORTROCHE; + if ("SLTAB".equals(codeString)) + return SLTAB; + if ("VAGTAB".equals(codeString)) + return VAGTAB; + if ("POWD".equals(codeString)) + return POWD; + if ("TOPPWD".equals(codeString)) + return TOPPWD; + if ("RECPWD".equals(codeString)) + return RECPWD; + if ("VAGPWD".equals(codeString)) + return VAGPWD; + if ("SUPP".equals(codeString)) + return SUPP; + if ("RECSUPP".equals(codeString)) + return RECSUPP; + if ("URETHSUPP".equals(codeString)) + return URETHSUPP; + if ("VAGSUPP".equals(codeString)) + return VAGSUPP; + if ("SWAB".equals(codeString)) + return SWAB; + if ("MEDSWAB".equals(codeString)) + return MEDSWAB; + if ("WAFER".equals(codeString)) + return WAFER; + throw new FHIRException("Unknown V3OrderableDrugForm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "_AdministrableDrugForm"; + case APPFUL: return "APPFUL"; + case DROP: return "DROP"; + case NDROP: return "NDROP"; + case OPDROP: return "OPDROP"; + case ORDROP: return "ORDROP"; + case OTDROP: return "OTDROP"; + case PUFF: return "PUFF"; + case SCOOP: return "SCOOP"; + case SPRY: return "SPRY"; + case _DISPENSABLEDRUGFORM: return "_DispensableDrugForm"; + case _GASDRUGFORM: return "_GasDrugForm"; + case GASINHL: return "GASINHL"; + case _GASLIQUIDMIXTURE: return "_GasLiquidMixture"; + case AER: return "AER"; + case BAINHL: return "BAINHL"; + case INHLSOL: return "INHLSOL"; + case MDINHL: return "MDINHL"; + case NASSPRY: return "NASSPRY"; + case DERMSPRY: return "DERMSPRY"; + case FOAM: return "FOAM"; + case FOAMAPL: return "FOAMAPL"; + case RECFORM: return "RECFORM"; + case VAGFOAM: return "VAGFOAM"; + case VAGFOAMAPL: return "VAGFOAMAPL"; + case RECSPRY: return "RECSPRY"; + case VAGSPRY: return "VAGSPRY"; + case _GASSOLIDSPRAY: return "_GasSolidSpray"; + case INHL: return "INHL"; + case BAINHLPWD: return "BAINHLPWD"; + case INHLPWD: return "INHLPWD"; + case MDINHLPWD: return "MDINHLPWD"; + case NASINHL: return "NASINHL"; + case ORINHL: return "ORINHL"; + case PWDSPRY: return "PWDSPRY"; + case SPRYADAPT: return "SPRYADAPT"; + case _LIQUID: return "_Liquid"; + case LIQCLN: return "LIQCLN"; + case LIQSOAP: return "LIQSOAP"; + case SHMP: return "SHMP"; + case OIL: return "OIL"; + case TOPOIL: return "TOPOIL"; + case SOL: return "SOL"; + case IPSOL: return "IPSOL"; + case IRSOL: return "IRSOL"; + case DOUCHE: return "DOUCHE"; + case ENEMA: return "ENEMA"; + case OPIRSOL: return "OPIRSOL"; + case IVSOL: return "IVSOL"; + case ORALSOL: return "ORALSOL"; + case ELIXIR: return "ELIXIR"; + case RINSE: return "RINSE"; + case SYRUP: return "SYRUP"; + case RECSOL: return "RECSOL"; + case TOPSOL: return "TOPSOL"; + case LIN: return "LIN"; + case MUCTOPSOL: return "MUCTOPSOL"; + case TINC: return "TINC"; + case _LIQUIDLIQUIDEMULSION: return "_LiquidLiquidEmulsion"; + case CRM: return "CRM"; + case NASCRM: return "NASCRM"; + case OPCRM: return "OPCRM"; + case ORCRM: return "ORCRM"; + case OTCRM: return "OTCRM"; + case RECCRM: return "RECCRM"; + case TOPCRM: return "TOPCRM"; + case VAGCRM: return "VAGCRM"; + case VAGCRMAPL: return "VAGCRMAPL"; + case LTN: return "LTN"; + case TOPLTN: return "TOPLTN"; + case OINT: return "OINT"; + case NASOINT: return "NASOINT"; + case OINTAPL: return "OINTAPL"; + case OPOINT: return "OPOINT"; + case OTOINT: return "OTOINT"; + case RECOINT: return "RECOINT"; + case TOPOINT: return "TOPOINT"; + case VAGOINT: return "VAGOINT"; + case VAGOINTAPL: return "VAGOINTAPL"; + case _LIQUIDSOLIDSUSPENSION: return "_LiquidSolidSuspension"; + case GEL: return "GEL"; + case GELAPL: return "GELAPL"; + case NASGEL: return "NASGEL"; + case OPGEL: return "OPGEL"; + case OTGEL: return "OTGEL"; + case TOPGEL: return "TOPGEL"; + case URETHGEL: return "URETHGEL"; + case VAGGEL: return "VAGGEL"; + case VGELAPL: return "VGELAPL"; + case PASTE: return "PASTE"; + case PUD: return "PUD"; + case TPASTE: return "TPASTE"; + case SUSP: return "SUSP"; + case ITSUSP: return "ITSUSP"; + case OPSUSP: return "OPSUSP"; + case ORSUSP: return "ORSUSP"; + case ERSUSP: return "ERSUSP"; + case ERSUSP12: return "ERSUSP12"; + case ERSUSP24: return "ERSUSP24"; + case OTSUSP: return "OTSUSP"; + case RECSUSP: return "RECSUSP"; + case _SOLIDDRUGFORM: return "_SolidDrugForm"; + case BAR: return "BAR"; + case BARSOAP: return "BARSOAP"; + case MEDBAR: return "MEDBAR"; + case CHEWBAR: return "CHEWBAR"; + case BEAD: return "BEAD"; + case CAKE: return "CAKE"; + case CEMENT: return "CEMENT"; + case CRYS: return "CRYS"; + case DISK: return "DISK"; + case FLAKE: return "FLAKE"; + case GRAN: return "GRAN"; + case GUM: return "GUM"; + case PAD: return "PAD"; + case MEDPAD: return "MEDPAD"; + case PATCH: return "PATCH"; + case TPATCH: return "TPATCH"; + case TPATH16: return "TPATH16"; + case TPATH24: return "TPATH24"; + case TPATH2WK: return "TPATH2WK"; + case TPATH72: return "TPATH72"; + case TPATHWK: return "TPATHWK"; + case PELLET: return "PELLET"; + case PILL: return "PILL"; + case CAP: return "CAP"; + case ORCAP: return "ORCAP"; + case ENTCAP: return "ENTCAP"; + case ERENTCAP: return "ERENTCAP"; + case ERCAP: return "ERCAP"; + case ERCAP12: return "ERCAP12"; + case ERCAP24: return "ERCAP24"; + case ERECCAP: return "ERECCAP"; + case TAB: return "TAB"; + case ORTAB: return "ORTAB"; + case BUCTAB: return "BUCTAB"; + case SRBUCTAB: return "SRBUCTAB"; + case CAPLET: return "CAPLET"; + case CHEWTAB: return "CHEWTAB"; + case CPTAB: return "CPTAB"; + case DISINTAB: return "DISINTAB"; + case DRTAB: return "DRTAB"; + case ECTAB: return "ECTAB"; + case ERECTAB: return "ERECTAB"; + case ERTAB: return "ERTAB"; + case ERTAB12: return "ERTAB12"; + case ERTAB24: return "ERTAB24"; + case ORTROCHE: return "ORTROCHE"; + case SLTAB: return "SLTAB"; + case VAGTAB: return "VAGTAB"; + case POWD: return "POWD"; + case TOPPWD: return "TOPPWD"; + case RECPWD: return "RECPWD"; + case VAGPWD: return "VAGPWD"; + case SUPP: return "SUPP"; + case RECSUPP: return "RECSUPP"; + case URETHSUPP: return "URETHSUPP"; + case VAGSUPP: return "VAGSUPP"; + case SWAB: return "SWAB"; + case MEDSWAB: return "MEDSWAB"; + case WAFER: return "WAFER"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/orderableDrugForm"; + } + public String getDefinition() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "AdministrableDrugForm"; + case APPFUL: return "Applicatorful"; + case DROP: return "Drops"; + case NDROP: return "Nasal Drops"; + case OPDROP: return "Ophthalmic Drops"; + case ORDROP: return "Oral Drops"; + case OTDROP: return "Otic Drops"; + case PUFF: return "Puff"; + case SCOOP: return "Scoops"; + case SPRY: return "Sprays"; + case _DISPENSABLEDRUGFORM: return "DispensableDrugForm"; + case _GASDRUGFORM: return "Any elastic aeriform fluid in which the molecules are separated from one another and have free paths."; + case GASINHL: return "Gas for Inhalation"; + case _GASLIQUIDMIXTURE: return "GasLiquidMixture"; + case AER: return "Aerosol"; + case BAINHL: return "Breath Activated Inhaler"; + case INHLSOL: return "Inhalant Solution"; + case MDINHL: return "Metered Dose Inhaler"; + case NASSPRY: return "Nasal Spray"; + case DERMSPRY: return "Dermal Spray"; + case FOAM: return "Foam"; + case FOAMAPL: return "Foam with Applicator"; + case RECFORM: return "Rectal foam"; + case VAGFOAM: return "Vaginal foam"; + case VAGFOAMAPL: return "Vaginal foam with applicator"; + case RECSPRY: return "Rectal Spray"; + case VAGSPRY: return "Vaginal Spray"; + case _GASSOLIDSPRAY: return "GasSolidSpray"; + case INHL: return "Inhalant"; + case BAINHLPWD: return "Breath Activated Powder Inhaler"; + case INHLPWD: return "Inhalant Powder"; + case MDINHLPWD: return "Metered Dose Powder Inhaler"; + case NASINHL: return "Nasal Inhalant"; + case ORINHL: return "Oral Inhalant"; + case PWDSPRY: return "Powder Spray"; + case SPRYADAPT: return "Spray with Adaptor"; + case _LIQUID: return "A state of substance that is an intermediate one entered into as matter goes from solid to gas; liquids are also intermediate in that they have neither the orderliness of a crystal nor the randomness of a gas. (Note: This term should not be used to describe solutions, only pure chemicals in their liquid state.)"; + case LIQCLN: return "Liquid Cleanser"; + case LIQSOAP: return "Medicated Liquid Soap"; + case SHMP: return "A liquid soap or detergent used to clean the hair and scalp and is often used as a vehicle for dermatologic agents."; + case OIL: return "An unctuous, combustible substance which is liquid, or easily liquefiable, on warming, and is soluble in ether but insoluble in water. Such substances, depending on their origin, are classified as animal, mineral, or vegetable oils."; + case TOPOIL: return "Topical Oil"; + case SOL: return "A liquid preparation that contains one or more chemical substances dissolved, i.e., molecularly dispersed, in a suitable solvent or mixture of mutually miscible solvents."; + case IPSOL: return "Intraperitoneal Solution"; + case IRSOL: return "A sterile solution intended to bathe or flush open wounds or body cavities; they're used topically, never parenterally."; + case DOUCHE: return "A liquid preparation, intended for the irrigative cleansing of the vagina, that is prepared from powders, liquid solutions, or liquid concentrates and contains one or more chemical substances dissolved in a suitable solvent or mutually miscible solvents."; + case ENEMA: return "A rectal preparation for therapeutic, diagnostic, or nutritive purposes."; + case OPIRSOL: return "Ophthalmic Irrigation Solution"; + case IVSOL: return "Intravenous Solution"; + case ORALSOL: return "Oral Solution"; + case ELIXIR: return "A clear, pleasantly flavored, sweetened hydroalcoholic liquid containing dissolved medicinal agents; it is intended for oral use."; + case RINSE: return "An aqueous solution which is most often used for its deodorant, refreshing, or antiseptic effect."; + case SYRUP: return "An oral solution containing high concentrations of sucrose or other sugars; the term has also been used to include any other liquid dosage form prepared in a sweet and viscid vehicle, including oral suspensions."; + case RECSOL: return "Rectal Solution"; + case TOPSOL: return "Topical Solution"; + case LIN: return "A solution or mixture of various substances in oil, alcoholic solutions of soap, or emulsions intended for external application."; + case MUCTOPSOL: return "Mucous Membrane Topical Solution"; + case TINC: return "Tincture"; + case _LIQUIDLIQUIDEMULSION: return "A two-phase system in which one liquid is dispersed throughout another liquid in the form of small droplets."; + case CRM: return "A semisolid dosage form containing one or more drug substances dissolved or dispersed in a suitable base; more recently, the term has been restricted to products consisting of oil-in-water emulsions or aqueous microcrystalline dispersions of long chain fatty acids or alcohols that are water washable and more cosmetically and aesthetically acceptable."; + case NASCRM: return "Nasal Cream"; + case OPCRM: return "Ophthalmic Cream"; + case ORCRM: return "Oral Cream"; + case OTCRM: return "Otic Cream"; + case RECCRM: return "Rectal Cream"; + case TOPCRM: return "Topical Cream"; + case VAGCRM: return "Vaginal Cream"; + case VAGCRMAPL: return "Vaginal Cream with Applicator"; + case LTN: return "The term \"lotion\" has been used to categorize many topical suspensions, solutions and emulsions intended for application to the skin."; + case TOPLTN: return "Topical Lotion"; + case OINT: return "A semisolid preparation intended for external application to the skin or mucous membranes."; + case NASOINT: return "Nasal Ointment"; + case OINTAPL: return "Ointment with Applicator"; + case OPOINT: return "Ophthalmic Ointment"; + case OTOINT: return "Otic Ointment"; + case RECOINT: return "Rectal Ointment"; + case TOPOINT: return "Topical Ointment"; + case VAGOINT: return "Vaginal Ointment"; + case VAGOINTAPL: return "Vaginal Ointment with Applicator"; + case _LIQUIDSOLIDSUSPENSION: return "A liquid preparation which consists of solid particles dispersed throughout a liquid phase in which the particles are not soluble."; + case GEL: return "A semisolid system consisting of either suspensions made up of small inorganic particles or large organic molecules interpenetrated by a liquid."; + case GELAPL: return "Gel with Applicator"; + case NASGEL: return "Nasal Gel"; + case OPGEL: return "Ophthalmic Gel"; + case OTGEL: return "Otic Gel"; + case TOPGEL: return "Topical Gel"; + case URETHGEL: return "Urethral Gel"; + case VAGGEL: return "Vaginal Gel"; + case VGELAPL: return "Vaginal Gel with Applicator"; + case PASTE: return "A semisolid dosage form that contains one or more drug substances intended for topical application."; + case PUD: return "Pudding"; + case TPASTE: return "A paste formulation intended to clean and/or polish the teeth, and which may contain certain additional agents."; + case SUSP: return "Suspension"; + case ITSUSP: return "Intrathecal Suspension"; + case OPSUSP: return "Ophthalmic Suspension"; + case ORSUSP: return "Oral Suspension"; + case ERSUSP: return "Extended-Release Suspension"; + case ERSUSP12: return "12 Hour Extended-Release Suspension"; + case ERSUSP24: return "24 Hour Extended Release Suspension"; + case OTSUSP: return "Otic Suspension"; + case RECSUSP: return "Rectal Suspension"; + case _SOLIDDRUGFORM: return "SolidDrugForm"; + case BAR: return "Bar"; + case BARSOAP: return "Bar Soap"; + case MEDBAR: return "Medicated Bar Soap"; + case CHEWBAR: return "A solid dosage form usually in the form of a rectangle that is meant to be chewed."; + case BEAD: return "A solid dosage form in the shape of a small ball."; + case CAKE: return "Cake"; + case CEMENT: return "A substance that serves to produce solid union between two surfaces."; + case CRYS: return "A naturally produced angular solid of definite form in which the ultimate units from which it is built up are systematically arranged; they are usually evenly spaced on a regular space lattice."; + case DISK: return "A circular plate-like organ or structure."; + case FLAKE: return "Flakes"; + case GRAN: return "A small particle or grain."; + case GUM: return "A sweetened and flavored insoluble plastic material of various shapes which when chewed, releases a drug substance into the oral cavity."; + case PAD: return "Pad"; + case MEDPAD: return "Medicated Pad"; + case PATCH: return "A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g., the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied."; + case TPATCH: return "Transdermal Patch"; + case TPATH16: return "16 Hour Transdermal Patch"; + case TPATH24: return "24 Hour Transdermal Patch"; + case TPATH2WK: return "Biweekly Transdermal Patch"; + case TPATH72: return "72 Hour Transdermal Patch"; + case TPATHWK: return "Weekly Transdermal Patch"; + case PELLET: return "A small sterile solid mass consisting of a highly purified drug (with or without excipients) made by the formation of granules, or by compression and molding."; + case PILL: return "A small, round solid dosage form containing a medicinal agent intended for oral administration."; + case CAP: return "A solid dosage form in which the drug is enclosed within either a hard or soft soluble container or \"shell\" made from a suitable form of gelatin."; + case ORCAP: return "Oral Capsule"; + case ENTCAP: return "Enteric Coated Capsule"; + case ERENTCAP: return "Extended Release Enteric Coated Capsule"; + case ERCAP: return "A solid dosage form in which the drug is enclosed within either a hard or soft soluble container made from a suitable form of gelatin, and which releases a drug (or drugs) in such a manner to allow a reduction in dosing frequency as compared to that drug (or drugs) presented as a conventional dosage form."; + case ERCAP12: return "12 Hour Extended Release Capsule"; + case ERCAP24: return "24 Hour Extended Release Capsule"; + case ERECCAP: return "Rationale: Duplicate of code ERENTCAP. Use code ERENTCAP instead."; + case TAB: return "A solid dosage form containing medicinal substances with or without suitable diluents."; + case ORTAB: return "Oral Tablet"; + case BUCTAB: return "Buccal Tablet"; + case SRBUCTAB: return "Sustained Release Buccal Tablet"; + case CAPLET: return "Caplet"; + case CHEWTAB: return "A solid dosage form containing medicinal substances with or without suitable diluents that is intended to be chewed, producing a pleasant tasting residue in the oral cavity that is easily swallowed and does not leave a bitter or unpleasant after-taste."; + case CPTAB: return "Coated Particles Tablet"; + case DISINTAB: return "A solid dosage form containing medicinal substances which disintegrates rapidly, usually within a matter of seconds, when placed upon the tongue."; + case DRTAB: return "Delayed Release Tablet"; + case ECTAB: return "Enteric Coated Tablet"; + case ERECTAB: return "Extended Release Enteric Coated Tablet"; + case ERTAB: return "A solid dosage form containing a drug which allows at least a reduction in dosing frequency as compared to that drug presented in conventional dosage form."; + case ERTAB12: return "12 Hour Extended Release Tablet"; + case ERTAB24: return "24 Hour Extended Release Tablet"; + case ORTROCHE: return "A solid preparation containing one or more medicaments, usually in a flavored, sweetened base which is intended to dissolve or disintegrate slowly in the mouth."; + case SLTAB: return "Sublingual Tablet"; + case VAGTAB: return "Vaginal Tablet"; + case POWD: return "An intimate mixture of dry, finely divided drugs and/or chemicals that may be intended for internal or external use."; + case TOPPWD: return "Topical Powder"; + case RECPWD: return "Rectal Powder"; + case VAGPWD: return "Vaginal Powder"; + case SUPP: return "A solid body of various weights and shapes, adapted for introduction into the rectal, vaginal, or urethral orifice of the human body; they usually melt, soften, or dissolve at body temperature."; + case RECSUPP: return "Rectal Suppository"; + case URETHSUPP: return "Urethral suppository"; + case VAGSUPP: return "Vaginal Suppository"; + case SWAB: return "A wad of absorbent material usually wound around one end of a small stick and used for applying medication or for removing material from an area."; + case MEDSWAB: return "Medicated swab"; + case WAFER: return "A thin slice of material containing a medicinal agent."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "AdministrableDrugForm"; + case APPFUL: return "Applicatorful"; + case DROP: return "Drops"; + case NDROP: return "Nasal Drops"; + case OPDROP: return "Ophthalmic Drops"; + case ORDROP: return "Oral Drops"; + case OTDROP: return "Otic Drops"; + case PUFF: return "Puff"; + case SCOOP: return "Scoops"; + case SPRY: return "Sprays"; + case _DISPENSABLEDRUGFORM: return "DispensableDrugForm"; + case _GASDRUGFORM: return "GasDrugForm"; + case GASINHL: return "Gas for Inhalation"; + case _GASLIQUIDMIXTURE: return "GasLiquidMixture"; + case AER: return "Aerosol"; + case BAINHL: return "Breath Activated Inhaler"; + case INHLSOL: return "Inhalant Solution"; + case MDINHL: return "Metered Dose Inhaler"; + case NASSPRY: return "Nasal Spray"; + case DERMSPRY: return "Dermal Spray"; + case FOAM: return "Foam"; + case FOAMAPL: return "Foam with Applicator"; + case RECFORM: return "Rectal foam"; + case VAGFOAM: return "Vaginal foam"; + case VAGFOAMAPL: return "Vaginal foam with applicator"; + case RECSPRY: return "Rectal Spray"; + case VAGSPRY: return "Vaginal Spray"; + case _GASSOLIDSPRAY: return "GasSolidSpray"; + case INHL: return "Inhalant"; + case BAINHLPWD: return "Breath Activated Powder Inhaler"; + case INHLPWD: return "Inhalant Powder"; + case MDINHLPWD: return "Metered Dose Powder Inhaler"; + case NASINHL: return "Nasal Inhalant"; + case ORINHL: return "Oral Inhalant"; + case PWDSPRY: return "Powder Spray"; + case SPRYADAPT: return "Spray with Adaptor"; + case _LIQUID: return "Liquid"; + case LIQCLN: return "Liquid Cleanser"; + case LIQSOAP: return "Medicated Liquid Soap"; + case SHMP: return "Shampoo"; + case OIL: return "Oil"; + case TOPOIL: return "Topical Oil"; + case SOL: return "Solution"; + case IPSOL: return "Intraperitoneal Solution"; + case IRSOL: return "Irrigation Solution"; + case DOUCHE: return "Douche"; + case ENEMA: return "Enema"; + case OPIRSOL: return "Ophthalmic Irrigation Solution"; + case IVSOL: return "Intravenous Solution"; + case ORALSOL: return "Oral Solution"; + case ELIXIR: return "Elixir"; + case RINSE: return "Mouthwash/Rinse"; + case SYRUP: return "Syrup"; + case RECSOL: return "Rectal Solution"; + case TOPSOL: return "Topical Solution"; + case LIN: return "Liniment"; + case MUCTOPSOL: return "Mucous Membrane Topical Solution"; + case TINC: return "Tincture"; + case _LIQUIDLIQUIDEMULSION: return "LiquidLiquidEmulsion"; + case CRM: return "Cream"; + case NASCRM: return "Nasal Cream"; + case OPCRM: return "Ophthalmic Cream"; + case ORCRM: return "Oral Cream"; + case OTCRM: return "Otic Cream"; + case RECCRM: return "Rectal Cream"; + case TOPCRM: return "Topical Cream"; + case VAGCRM: return "Vaginal Cream"; + case VAGCRMAPL: return "Vaginal Cream with Applicator"; + case LTN: return "Lotion"; + case TOPLTN: return "Topical Lotion"; + case OINT: return "Ointment"; + case NASOINT: return "Nasal Ointment"; + case OINTAPL: return "Ointment with Applicator"; + case OPOINT: return "Ophthalmic Ointment"; + case OTOINT: return "Otic Ointment"; + case RECOINT: return "Rectal Ointment"; + case TOPOINT: return "Topical Ointment"; + case VAGOINT: return "Vaginal Ointment"; + case VAGOINTAPL: return "Vaginal Ointment with Applicator"; + case _LIQUIDSOLIDSUSPENSION: return "LiquidSolidSuspension"; + case GEL: return "Gel"; + case GELAPL: return "Gel with Applicator"; + case NASGEL: return "Nasal Gel"; + case OPGEL: return "Ophthalmic Gel"; + case OTGEL: return "Otic Gel"; + case TOPGEL: return "Topical Gel"; + case URETHGEL: return "Urethral Gel"; + case VAGGEL: return "Vaginal Gel"; + case VGELAPL: return "Vaginal Gel with Applicator"; + case PASTE: return "Paste"; + case PUD: return "Pudding"; + case TPASTE: return "Toothpaste"; + case SUSP: return "Suspension"; + case ITSUSP: return "Intrathecal Suspension"; + case OPSUSP: return "Ophthalmic Suspension"; + case ORSUSP: return "Oral Suspension"; + case ERSUSP: return "Extended-Release Suspension"; + case ERSUSP12: return "12 Hour Extended-Release Suspension"; + case ERSUSP24: return "24 Hour Extended Release Suspension"; + case OTSUSP: return "Otic Suspension"; + case RECSUSP: return "Rectal Suspension"; + case _SOLIDDRUGFORM: return "SolidDrugForm"; + case BAR: return "Bar"; + case BARSOAP: return "Bar Soap"; + case MEDBAR: return "Medicated Bar Soap"; + case CHEWBAR: return "Chewable Bar"; + case BEAD: return "Beads"; + case CAKE: return "Cake"; + case CEMENT: return "Cement"; + case CRYS: return "Crystals"; + case DISK: return "Disk"; + case FLAKE: return "Flakes"; + case GRAN: return "Granules"; + case GUM: return "ChewingGum"; + case PAD: return "Pad"; + case MEDPAD: return "Medicated Pad"; + case PATCH: return "Patch"; + case TPATCH: return "Transdermal Patch"; + case TPATH16: return "16 Hour Transdermal Patch"; + case TPATH24: return "24 Hour Transdermal Patch"; + case TPATH2WK: return "Biweekly Transdermal Patch"; + case TPATH72: return "72 Hour Transdermal Patch"; + case TPATHWK: return "Weekly Transdermal Patch"; + case PELLET: return "Pellet"; + case PILL: return "Pill"; + case CAP: return "Capsule"; + case ORCAP: return "Oral Capsule"; + case ENTCAP: return "Enteric Coated Capsule"; + case ERENTCAP: return "Extended Release Enteric Coated Capsule"; + case ERCAP: return "Extended Release Capsule"; + case ERCAP12: return "12 Hour Extended Release Capsule"; + case ERCAP24: return "24 Hour Extended Release Capsule"; + case ERECCAP: return "Extended Release Enteric Coated Capsule"; + case TAB: return "Tablet"; + case ORTAB: return "Oral Tablet"; + case BUCTAB: return "Buccal Tablet"; + case SRBUCTAB: return "Sustained Release Buccal Tablet"; + case CAPLET: return "Caplet"; + case CHEWTAB: return "Chewable Tablet"; + case CPTAB: return "Coated Particles Tablet"; + case DISINTAB: return "Disintegrating Tablet"; + case DRTAB: return "Delayed Release Tablet"; + case ECTAB: return "Enteric Coated Tablet"; + case ERECTAB: return "Extended Release Enteric Coated Tablet"; + case ERTAB: return "Extended Release Tablet"; + case ERTAB12: return "12 Hour Extended Release Tablet"; + case ERTAB24: return "24 Hour Extended Release Tablet"; + case ORTROCHE: return "Lozenge/Oral Troche"; + case SLTAB: return "Sublingual Tablet"; + case VAGTAB: return "Vaginal Tablet"; + case POWD: return "Powder"; + case TOPPWD: return "Topical Powder"; + case RECPWD: return "Rectal Powder"; + case VAGPWD: return "Vaginal Powder"; + case SUPP: return "Suppository"; + case RECSUPP: return "Rectal Suppository"; + case URETHSUPP: return "Urethral suppository"; + case VAGSUPP: return "Vaginal Suppository"; + case SWAB: return "Swab"; + case MEDSWAB: return "Medicated swab"; + case WAFER: return "Wafer"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugFormEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugFormEnumFactory.java new file mode 100644 index 00000000000..2c6e740c05e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3OrderableDrugFormEnumFactory.java @@ -0,0 +1,695 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3OrderableDrugFormEnumFactory implements EnumFactory { + + public V3OrderableDrugForm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AdministrableDrugForm".equals(codeString)) + return V3OrderableDrugForm._ADMINISTRABLEDRUGFORM; + if ("APPFUL".equals(codeString)) + return V3OrderableDrugForm.APPFUL; + if ("DROP".equals(codeString)) + return V3OrderableDrugForm.DROP; + if ("NDROP".equals(codeString)) + return V3OrderableDrugForm.NDROP; + if ("OPDROP".equals(codeString)) + return V3OrderableDrugForm.OPDROP; + if ("ORDROP".equals(codeString)) + return V3OrderableDrugForm.ORDROP; + if ("OTDROP".equals(codeString)) + return V3OrderableDrugForm.OTDROP; + if ("PUFF".equals(codeString)) + return V3OrderableDrugForm.PUFF; + if ("SCOOP".equals(codeString)) + return V3OrderableDrugForm.SCOOP; + if ("SPRY".equals(codeString)) + return V3OrderableDrugForm.SPRY; + if ("_DispensableDrugForm".equals(codeString)) + return V3OrderableDrugForm._DISPENSABLEDRUGFORM; + if ("_GasDrugForm".equals(codeString)) + return V3OrderableDrugForm._GASDRUGFORM; + if ("GASINHL".equals(codeString)) + return V3OrderableDrugForm.GASINHL; + if ("_GasLiquidMixture".equals(codeString)) + return V3OrderableDrugForm._GASLIQUIDMIXTURE; + if ("AER".equals(codeString)) + return V3OrderableDrugForm.AER; + if ("BAINHL".equals(codeString)) + return V3OrderableDrugForm.BAINHL; + if ("INHLSOL".equals(codeString)) + return V3OrderableDrugForm.INHLSOL; + if ("MDINHL".equals(codeString)) + return V3OrderableDrugForm.MDINHL; + if ("NASSPRY".equals(codeString)) + return V3OrderableDrugForm.NASSPRY; + if ("DERMSPRY".equals(codeString)) + return V3OrderableDrugForm.DERMSPRY; + if ("FOAM".equals(codeString)) + return V3OrderableDrugForm.FOAM; + if ("FOAMAPL".equals(codeString)) + return V3OrderableDrugForm.FOAMAPL; + if ("RECFORM".equals(codeString)) + return V3OrderableDrugForm.RECFORM; + if ("VAGFOAM".equals(codeString)) + return V3OrderableDrugForm.VAGFOAM; + if ("VAGFOAMAPL".equals(codeString)) + return V3OrderableDrugForm.VAGFOAMAPL; + if ("RECSPRY".equals(codeString)) + return V3OrderableDrugForm.RECSPRY; + if ("VAGSPRY".equals(codeString)) + return V3OrderableDrugForm.VAGSPRY; + if ("_GasSolidSpray".equals(codeString)) + return V3OrderableDrugForm._GASSOLIDSPRAY; + if ("INHL".equals(codeString)) + return V3OrderableDrugForm.INHL; + if ("BAINHLPWD".equals(codeString)) + return V3OrderableDrugForm.BAINHLPWD; + if ("INHLPWD".equals(codeString)) + return V3OrderableDrugForm.INHLPWD; + if ("MDINHLPWD".equals(codeString)) + return V3OrderableDrugForm.MDINHLPWD; + if ("NASINHL".equals(codeString)) + return V3OrderableDrugForm.NASINHL; + if ("ORINHL".equals(codeString)) + return V3OrderableDrugForm.ORINHL; + if ("PWDSPRY".equals(codeString)) + return V3OrderableDrugForm.PWDSPRY; + if ("SPRYADAPT".equals(codeString)) + return V3OrderableDrugForm.SPRYADAPT; + if ("_Liquid".equals(codeString)) + return V3OrderableDrugForm._LIQUID; + if ("LIQCLN".equals(codeString)) + return V3OrderableDrugForm.LIQCLN; + if ("LIQSOAP".equals(codeString)) + return V3OrderableDrugForm.LIQSOAP; + if ("SHMP".equals(codeString)) + return V3OrderableDrugForm.SHMP; + if ("OIL".equals(codeString)) + return V3OrderableDrugForm.OIL; + if ("TOPOIL".equals(codeString)) + return V3OrderableDrugForm.TOPOIL; + if ("SOL".equals(codeString)) + return V3OrderableDrugForm.SOL; + if ("IPSOL".equals(codeString)) + return V3OrderableDrugForm.IPSOL; + if ("IRSOL".equals(codeString)) + return V3OrderableDrugForm.IRSOL; + if ("DOUCHE".equals(codeString)) + return V3OrderableDrugForm.DOUCHE; + if ("ENEMA".equals(codeString)) + return V3OrderableDrugForm.ENEMA; + if ("OPIRSOL".equals(codeString)) + return V3OrderableDrugForm.OPIRSOL; + if ("IVSOL".equals(codeString)) + return V3OrderableDrugForm.IVSOL; + if ("ORALSOL".equals(codeString)) + return V3OrderableDrugForm.ORALSOL; + if ("ELIXIR".equals(codeString)) + return V3OrderableDrugForm.ELIXIR; + if ("RINSE".equals(codeString)) + return V3OrderableDrugForm.RINSE; + if ("SYRUP".equals(codeString)) + return V3OrderableDrugForm.SYRUP; + if ("RECSOL".equals(codeString)) + return V3OrderableDrugForm.RECSOL; + if ("TOPSOL".equals(codeString)) + return V3OrderableDrugForm.TOPSOL; + if ("LIN".equals(codeString)) + return V3OrderableDrugForm.LIN; + if ("MUCTOPSOL".equals(codeString)) + return V3OrderableDrugForm.MUCTOPSOL; + if ("TINC".equals(codeString)) + return V3OrderableDrugForm.TINC; + if ("_LiquidLiquidEmulsion".equals(codeString)) + return V3OrderableDrugForm._LIQUIDLIQUIDEMULSION; + if ("CRM".equals(codeString)) + return V3OrderableDrugForm.CRM; + if ("NASCRM".equals(codeString)) + return V3OrderableDrugForm.NASCRM; + if ("OPCRM".equals(codeString)) + return V3OrderableDrugForm.OPCRM; + if ("ORCRM".equals(codeString)) + return V3OrderableDrugForm.ORCRM; + if ("OTCRM".equals(codeString)) + return V3OrderableDrugForm.OTCRM; + if ("RECCRM".equals(codeString)) + return V3OrderableDrugForm.RECCRM; + if ("TOPCRM".equals(codeString)) + return V3OrderableDrugForm.TOPCRM; + if ("VAGCRM".equals(codeString)) + return V3OrderableDrugForm.VAGCRM; + if ("VAGCRMAPL".equals(codeString)) + return V3OrderableDrugForm.VAGCRMAPL; + if ("LTN".equals(codeString)) + return V3OrderableDrugForm.LTN; + if ("TOPLTN".equals(codeString)) + return V3OrderableDrugForm.TOPLTN; + if ("OINT".equals(codeString)) + return V3OrderableDrugForm.OINT; + if ("NASOINT".equals(codeString)) + return V3OrderableDrugForm.NASOINT; + if ("OINTAPL".equals(codeString)) + return V3OrderableDrugForm.OINTAPL; + if ("OPOINT".equals(codeString)) + return V3OrderableDrugForm.OPOINT; + if ("OTOINT".equals(codeString)) + return V3OrderableDrugForm.OTOINT; + if ("RECOINT".equals(codeString)) + return V3OrderableDrugForm.RECOINT; + if ("TOPOINT".equals(codeString)) + return V3OrderableDrugForm.TOPOINT; + if ("VAGOINT".equals(codeString)) + return V3OrderableDrugForm.VAGOINT; + if ("VAGOINTAPL".equals(codeString)) + return V3OrderableDrugForm.VAGOINTAPL; + if ("_LiquidSolidSuspension".equals(codeString)) + return V3OrderableDrugForm._LIQUIDSOLIDSUSPENSION; + if ("GEL".equals(codeString)) + return V3OrderableDrugForm.GEL; + if ("GELAPL".equals(codeString)) + return V3OrderableDrugForm.GELAPL; + if ("NASGEL".equals(codeString)) + return V3OrderableDrugForm.NASGEL; + if ("OPGEL".equals(codeString)) + return V3OrderableDrugForm.OPGEL; + if ("OTGEL".equals(codeString)) + return V3OrderableDrugForm.OTGEL; + if ("TOPGEL".equals(codeString)) + return V3OrderableDrugForm.TOPGEL; + if ("URETHGEL".equals(codeString)) + return V3OrderableDrugForm.URETHGEL; + if ("VAGGEL".equals(codeString)) + return V3OrderableDrugForm.VAGGEL; + if ("VGELAPL".equals(codeString)) + return V3OrderableDrugForm.VGELAPL; + if ("PASTE".equals(codeString)) + return V3OrderableDrugForm.PASTE; + if ("PUD".equals(codeString)) + return V3OrderableDrugForm.PUD; + if ("TPASTE".equals(codeString)) + return V3OrderableDrugForm.TPASTE; + if ("SUSP".equals(codeString)) + return V3OrderableDrugForm.SUSP; + if ("ITSUSP".equals(codeString)) + return V3OrderableDrugForm.ITSUSP; + if ("OPSUSP".equals(codeString)) + return V3OrderableDrugForm.OPSUSP; + if ("ORSUSP".equals(codeString)) + return V3OrderableDrugForm.ORSUSP; + if ("ERSUSP".equals(codeString)) + return V3OrderableDrugForm.ERSUSP; + if ("ERSUSP12".equals(codeString)) + return V3OrderableDrugForm.ERSUSP12; + if ("ERSUSP24".equals(codeString)) + return V3OrderableDrugForm.ERSUSP24; + if ("OTSUSP".equals(codeString)) + return V3OrderableDrugForm.OTSUSP; + if ("RECSUSP".equals(codeString)) + return V3OrderableDrugForm.RECSUSP; + if ("_SolidDrugForm".equals(codeString)) + return V3OrderableDrugForm._SOLIDDRUGFORM; + if ("BAR".equals(codeString)) + return V3OrderableDrugForm.BAR; + if ("BARSOAP".equals(codeString)) + return V3OrderableDrugForm.BARSOAP; + if ("MEDBAR".equals(codeString)) + return V3OrderableDrugForm.MEDBAR; + if ("CHEWBAR".equals(codeString)) + return V3OrderableDrugForm.CHEWBAR; + if ("BEAD".equals(codeString)) + return V3OrderableDrugForm.BEAD; + if ("CAKE".equals(codeString)) + return V3OrderableDrugForm.CAKE; + if ("CEMENT".equals(codeString)) + return V3OrderableDrugForm.CEMENT; + if ("CRYS".equals(codeString)) + return V3OrderableDrugForm.CRYS; + if ("DISK".equals(codeString)) + return V3OrderableDrugForm.DISK; + if ("FLAKE".equals(codeString)) + return V3OrderableDrugForm.FLAKE; + if ("GRAN".equals(codeString)) + return V3OrderableDrugForm.GRAN; + if ("GUM".equals(codeString)) + return V3OrderableDrugForm.GUM; + if ("PAD".equals(codeString)) + return V3OrderableDrugForm.PAD; + if ("MEDPAD".equals(codeString)) + return V3OrderableDrugForm.MEDPAD; + if ("PATCH".equals(codeString)) + return V3OrderableDrugForm.PATCH; + if ("TPATCH".equals(codeString)) + return V3OrderableDrugForm.TPATCH; + if ("TPATH16".equals(codeString)) + return V3OrderableDrugForm.TPATH16; + if ("TPATH24".equals(codeString)) + return V3OrderableDrugForm.TPATH24; + if ("TPATH2WK".equals(codeString)) + return V3OrderableDrugForm.TPATH2WK; + if ("TPATH72".equals(codeString)) + return V3OrderableDrugForm.TPATH72; + if ("TPATHWK".equals(codeString)) + return V3OrderableDrugForm.TPATHWK; + if ("PELLET".equals(codeString)) + return V3OrderableDrugForm.PELLET; + if ("PILL".equals(codeString)) + return V3OrderableDrugForm.PILL; + if ("CAP".equals(codeString)) + return V3OrderableDrugForm.CAP; + if ("ORCAP".equals(codeString)) + return V3OrderableDrugForm.ORCAP; + if ("ENTCAP".equals(codeString)) + return V3OrderableDrugForm.ENTCAP; + if ("ERENTCAP".equals(codeString)) + return V3OrderableDrugForm.ERENTCAP; + if ("ERCAP".equals(codeString)) + return V3OrderableDrugForm.ERCAP; + if ("ERCAP12".equals(codeString)) + return V3OrderableDrugForm.ERCAP12; + if ("ERCAP24".equals(codeString)) + return V3OrderableDrugForm.ERCAP24; + if ("ERECCAP".equals(codeString)) + return V3OrderableDrugForm.ERECCAP; + if ("TAB".equals(codeString)) + return V3OrderableDrugForm.TAB; + if ("ORTAB".equals(codeString)) + return V3OrderableDrugForm.ORTAB; + if ("BUCTAB".equals(codeString)) + return V3OrderableDrugForm.BUCTAB; + if ("SRBUCTAB".equals(codeString)) + return V3OrderableDrugForm.SRBUCTAB; + if ("CAPLET".equals(codeString)) + return V3OrderableDrugForm.CAPLET; + if ("CHEWTAB".equals(codeString)) + return V3OrderableDrugForm.CHEWTAB; + if ("CPTAB".equals(codeString)) + return V3OrderableDrugForm.CPTAB; + if ("DISINTAB".equals(codeString)) + return V3OrderableDrugForm.DISINTAB; + if ("DRTAB".equals(codeString)) + return V3OrderableDrugForm.DRTAB; + if ("ECTAB".equals(codeString)) + return V3OrderableDrugForm.ECTAB; + if ("ERECTAB".equals(codeString)) + return V3OrderableDrugForm.ERECTAB; + if ("ERTAB".equals(codeString)) + return V3OrderableDrugForm.ERTAB; + if ("ERTAB12".equals(codeString)) + return V3OrderableDrugForm.ERTAB12; + if ("ERTAB24".equals(codeString)) + return V3OrderableDrugForm.ERTAB24; + if ("ORTROCHE".equals(codeString)) + return V3OrderableDrugForm.ORTROCHE; + if ("SLTAB".equals(codeString)) + return V3OrderableDrugForm.SLTAB; + if ("VAGTAB".equals(codeString)) + return V3OrderableDrugForm.VAGTAB; + if ("POWD".equals(codeString)) + return V3OrderableDrugForm.POWD; + if ("TOPPWD".equals(codeString)) + return V3OrderableDrugForm.TOPPWD; + if ("RECPWD".equals(codeString)) + return V3OrderableDrugForm.RECPWD; + if ("VAGPWD".equals(codeString)) + return V3OrderableDrugForm.VAGPWD; + if ("SUPP".equals(codeString)) + return V3OrderableDrugForm.SUPP; + if ("RECSUPP".equals(codeString)) + return V3OrderableDrugForm.RECSUPP; + if ("URETHSUPP".equals(codeString)) + return V3OrderableDrugForm.URETHSUPP; + if ("VAGSUPP".equals(codeString)) + return V3OrderableDrugForm.VAGSUPP; + if ("SWAB".equals(codeString)) + return V3OrderableDrugForm.SWAB; + if ("MEDSWAB".equals(codeString)) + return V3OrderableDrugForm.MEDSWAB; + if ("WAFER".equals(codeString)) + return V3OrderableDrugForm.WAFER; + throw new IllegalArgumentException("Unknown V3OrderableDrugForm code '"+codeString+"'"); + } + + public String toCode(V3OrderableDrugForm code) { + if (code == V3OrderableDrugForm._ADMINISTRABLEDRUGFORM) + return "_AdministrableDrugForm"; + if (code == V3OrderableDrugForm.APPFUL) + return "APPFUL"; + if (code == V3OrderableDrugForm.DROP) + return "DROP"; + if (code == V3OrderableDrugForm.NDROP) + return "NDROP"; + if (code == V3OrderableDrugForm.OPDROP) + return "OPDROP"; + if (code == V3OrderableDrugForm.ORDROP) + return "ORDROP"; + if (code == V3OrderableDrugForm.OTDROP) + return "OTDROP"; + if (code == V3OrderableDrugForm.PUFF) + return "PUFF"; + if (code == V3OrderableDrugForm.SCOOP) + return "SCOOP"; + if (code == V3OrderableDrugForm.SPRY) + return "SPRY"; + if (code == V3OrderableDrugForm._DISPENSABLEDRUGFORM) + return "_DispensableDrugForm"; + if (code == V3OrderableDrugForm._GASDRUGFORM) + return "_GasDrugForm"; + if (code == V3OrderableDrugForm.GASINHL) + return "GASINHL"; + if (code == V3OrderableDrugForm._GASLIQUIDMIXTURE) + return "_GasLiquidMixture"; + if (code == V3OrderableDrugForm.AER) + return "AER"; + if (code == V3OrderableDrugForm.BAINHL) + return "BAINHL"; + if (code == V3OrderableDrugForm.INHLSOL) + return "INHLSOL"; + if (code == V3OrderableDrugForm.MDINHL) + return "MDINHL"; + if (code == V3OrderableDrugForm.NASSPRY) + return "NASSPRY"; + if (code == V3OrderableDrugForm.DERMSPRY) + return "DERMSPRY"; + if (code == V3OrderableDrugForm.FOAM) + return "FOAM"; + if (code == V3OrderableDrugForm.FOAMAPL) + return "FOAMAPL"; + if (code == V3OrderableDrugForm.RECFORM) + return "RECFORM"; + if (code == V3OrderableDrugForm.VAGFOAM) + return "VAGFOAM"; + if (code == V3OrderableDrugForm.VAGFOAMAPL) + return "VAGFOAMAPL"; + if (code == V3OrderableDrugForm.RECSPRY) + return "RECSPRY"; + if (code == V3OrderableDrugForm.VAGSPRY) + return "VAGSPRY"; + if (code == V3OrderableDrugForm._GASSOLIDSPRAY) + return "_GasSolidSpray"; + if (code == V3OrderableDrugForm.INHL) + return "INHL"; + if (code == V3OrderableDrugForm.BAINHLPWD) + return "BAINHLPWD"; + if (code == V3OrderableDrugForm.INHLPWD) + return "INHLPWD"; + if (code == V3OrderableDrugForm.MDINHLPWD) + return "MDINHLPWD"; + if (code == V3OrderableDrugForm.NASINHL) + return "NASINHL"; + if (code == V3OrderableDrugForm.ORINHL) + return "ORINHL"; + if (code == V3OrderableDrugForm.PWDSPRY) + return "PWDSPRY"; + if (code == V3OrderableDrugForm.SPRYADAPT) + return "SPRYADAPT"; + if (code == V3OrderableDrugForm._LIQUID) + return "_Liquid"; + if (code == V3OrderableDrugForm.LIQCLN) + return "LIQCLN"; + if (code == V3OrderableDrugForm.LIQSOAP) + return "LIQSOAP"; + if (code == V3OrderableDrugForm.SHMP) + return "SHMP"; + if (code == V3OrderableDrugForm.OIL) + return "OIL"; + if (code == V3OrderableDrugForm.TOPOIL) + return "TOPOIL"; + if (code == V3OrderableDrugForm.SOL) + return "SOL"; + if (code == V3OrderableDrugForm.IPSOL) + return "IPSOL"; + if (code == V3OrderableDrugForm.IRSOL) + return "IRSOL"; + if (code == V3OrderableDrugForm.DOUCHE) + return "DOUCHE"; + if (code == V3OrderableDrugForm.ENEMA) + return "ENEMA"; + if (code == V3OrderableDrugForm.OPIRSOL) + return "OPIRSOL"; + if (code == V3OrderableDrugForm.IVSOL) + return "IVSOL"; + if (code == V3OrderableDrugForm.ORALSOL) + return "ORALSOL"; + if (code == V3OrderableDrugForm.ELIXIR) + return "ELIXIR"; + if (code == V3OrderableDrugForm.RINSE) + return "RINSE"; + if (code == V3OrderableDrugForm.SYRUP) + return "SYRUP"; + if (code == V3OrderableDrugForm.RECSOL) + return "RECSOL"; + if (code == V3OrderableDrugForm.TOPSOL) + return "TOPSOL"; + if (code == V3OrderableDrugForm.LIN) + return "LIN"; + if (code == V3OrderableDrugForm.MUCTOPSOL) + return "MUCTOPSOL"; + if (code == V3OrderableDrugForm.TINC) + return "TINC"; + if (code == V3OrderableDrugForm._LIQUIDLIQUIDEMULSION) + return "_LiquidLiquidEmulsion"; + if (code == V3OrderableDrugForm.CRM) + return "CRM"; + if (code == V3OrderableDrugForm.NASCRM) + return "NASCRM"; + if (code == V3OrderableDrugForm.OPCRM) + return "OPCRM"; + if (code == V3OrderableDrugForm.ORCRM) + return "ORCRM"; + if (code == V3OrderableDrugForm.OTCRM) + return "OTCRM"; + if (code == V3OrderableDrugForm.RECCRM) + return "RECCRM"; + if (code == V3OrderableDrugForm.TOPCRM) + return "TOPCRM"; + if (code == V3OrderableDrugForm.VAGCRM) + return "VAGCRM"; + if (code == V3OrderableDrugForm.VAGCRMAPL) + return "VAGCRMAPL"; + if (code == V3OrderableDrugForm.LTN) + return "LTN"; + if (code == V3OrderableDrugForm.TOPLTN) + return "TOPLTN"; + if (code == V3OrderableDrugForm.OINT) + return "OINT"; + if (code == V3OrderableDrugForm.NASOINT) + return "NASOINT"; + if (code == V3OrderableDrugForm.OINTAPL) + return "OINTAPL"; + if (code == V3OrderableDrugForm.OPOINT) + return "OPOINT"; + if (code == V3OrderableDrugForm.OTOINT) + return "OTOINT"; + if (code == V3OrderableDrugForm.RECOINT) + return "RECOINT"; + if (code == V3OrderableDrugForm.TOPOINT) + return "TOPOINT"; + if (code == V3OrderableDrugForm.VAGOINT) + return "VAGOINT"; + if (code == V3OrderableDrugForm.VAGOINTAPL) + return "VAGOINTAPL"; + if (code == V3OrderableDrugForm._LIQUIDSOLIDSUSPENSION) + return "_LiquidSolidSuspension"; + if (code == V3OrderableDrugForm.GEL) + return "GEL"; + if (code == V3OrderableDrugForm.GELAPL) + return "GELAPL"; + if (code == V3OrderableDrugForm.NASGEL) + return "NASGEL"; + if (code == V3OrderableDrugForm.OPGEL) + return "OPGEL"; + if (code == V3OrderableDrugForm.OTGEL) + return "OTGEL"; + if (code == V3OrderableDrugForm.TOPGEL) + return "TOPGEL"; + if (code == V3OrderableDrugForm.URETHGEL) + return "URETHGEL"; + if (code == V3OrderableDrugForm.VAGGEL) + return "VAGGEL"; + if (code == V3OrderableDrugForm.VGELAPL) + return "VGELAPL"; + if (code == V3OrderableDrugForm.PASTE) + return "PASTE"; + if (code == V3OrderableDrugForm.PUD) + return "PUD"; + if (code == V3OrderableDrugForm.TPASTE) + return "TPASTE"; + if (code == V3OrderableDrugForm.SUSP) + return "SUSP"; + if (code == V3OrderableDrugForm.ITSUSP) + return "ITSUSP"; + if (code == V3OrderableDrugForm.OPSUSP) + return "OPSUSP"; + if (code == V3OrderableDrugForm.ORSUSP) + return "ORSUSP"; + if (code == V3OrderableDrugForm.ERSUSP) + return "ERSUSP"; + if (code == V3OrderableDrugForm.ERSUSP12) + return "ERSUSP12"; + if (code == V3OrderableDrugForm.ERSUSP24) + return "ERSUSP24"; + if (code == V3OrderableDrugForm.OTSUSP) + return "OTSUSP"; + if (code == V3OrderableDrugForm.RECSUSP) + return "RECSUSP"; + if (code == V3OrderableDrugForm._SOLIDDRUGFORM) + return "_SolidDrugForm"; + if (code == V3OrderableDrugForm.BAR) + return "BAR"; + if (code == V3OrderableDrugForm.BARSOAP) + return "BARSOAP"; + if (code == V3OrderableDrugForm.MEDBAR) + return "MEDBAR"; + if (code == V3OrderableDrugForm.CHEWBAR) + return "CHEWBAR"; + if (code == V3OrderableDrugForm.BEAD) + return "BEAD"; + if (code == V3OrderableDrugForm.CAKE) + return "CAKE"; + if (code == V3OrderableDrugForm.CEMENT) + return "CEMENT"; + if (code == V3OrderableDrugForm.CRYS) + return "CRYS"; + if (code == V3OrderableDrugForm.DISK) + return "DISK"; + if (code == V3OrderableDrugForm.FLAKE) + return "FLAKE"; + if (code == V3OrderableDrugForm.GRAN) + return "GRAN"; + if (code == V3OrderableDrugForm.GUM) + return "GUM"; + if (code == V3OrderableDrugForm.PAD) + return "PAD"; + if (code == V3OrderableDrugForm.MEDPAD) + return "MEDPAD"; + if (code == V3OrderableDrugForm.PATCH) + return "PATCH"; + if (code == V3OrderableDrugForm.TPATCH) + return "TPATCH"; + if (code == V3OrderableDrugForm.TPATH16) + return "TPATH16"; + if (code == V3OrderableDrugForm.TPATH24) + return "TPATH24"; + if (code == V3OrderableDrugForm.TPATH2WK) + return "TPATH2WK"; + if (code == V3OrderableDrugForm.TPATH72) + return "TPATH72"; + if (code == V3OrderableDrugForm.TPATHWK) + return "TPATHWK"; + if (code == V3OrderableDrugForm.PELLET) + return "PELLET"; + if (code == V3OrderableDrugForm.PILL) + return "PILL"; + if (code == V3OrderableDrugForm.CAP) + return "CAP"; + if (code == V3OrderableDrugForm.ORCAP) + return "ORCAP"; + if (code == V3OrderableDrugForm.ENTCAP) + return "ENTCAP"; + if (code == V3OrderableDrugForm.ERENTCAP) + return "ERENTCAP"; + if (code == V3OrderableDrugForm.ERCAP) + return "ERCAP"; + if (code == V3OrderableDrugForm.ERCAP12) + return "ERCAP12"; + if (code == V3OrderableDrugForm.ERCAP24) + return "ERCAP24"; + if (code == V3OrderableDrugForm.ERECCAP) + return "ERECCAP"; + if (code == V3OrderableDrugForm.TAB) + return "TAB"; + if (code == V3OrderableDrugForm.ORTAB) + return "ORTAB"; + if (code == V3OrderableDrugForm.BUCTAB) + return "BUCTAB"; + if (code == V3OrderableDrugForm.SRBUCTAB) + return "SRBUCTAB"; + if (code == V3OrderableDrugForm.CAPLET) + return "CAPLET"; + if (code == V3OrderableDrugForm.CHEWTAB) + return "CHEWTAB"; + if (code == V3OrderableDrugForm.CPTAB) + return "CPTAB"; + if (code == V3OrderableDrugForm.DISINTAB) + return "DISINTAB"; + if (code == V3OrderableDrugForm.DRTAB) + return "DRTAB"; + if (code == V3OrderableDrugForm.ECTAB) + return "ECTAB"; + if (code == V3OrderableDrugForm.ERECTAB) + return "ERECTAB"; + if (code == V3OrderableDrugForm.ERTAB) + return "ERTAB"; + if (code == V3OrderableDrugForm.ERTAB12) + return "ERTAB12"; + if (code == V3OrderableDrugForm.ERTAB24) + return "ERTAB24"; + if (code == V3OrderableDrugForm.ORTROCHE) + return "ORTROCHE"; + if (code == V3OrderableDrugForm.SLTAB) + return "SLTAB"; + if (code == V3OrderableDrugForm.VAGTAB) + return "VAGTAB"; + if (code == V3OrderableDrugForm.POWD) + return "POWD"; + if (code == V3OrderableDrugForm.TOPPWD) + return "TOPPWD"; + if (code == V3OrderableDrugForm.RECPWD) + return "RECPWD"; + if (code == V3OrderableDrugForm.VAGPWD) + return "VAGPWD"; + if (code == V3OrderableDrugForm.SUPP) + return "SUPP"; + if (code == V3OrderableDrugForm.RECSUPP) + return "RECSUPP"; + if (code == V3OrderableDrugForm.URETHSUPP) + return "URETHSUPP"; + if (code == V3OrderableDrugForm.VAGSUPP) + return "VAGSUPP"; + if (code == V3OrderableDrugForm.SWAB) + return "SWAB"; + if (code == V3OrderableDrugForm.MEDSWAB) + return "MEDSWAB"; + if (code == V3OrderableDrugForm.WAFER) + return "WAFER"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationFunction.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationFunction.java new file mode 100644 index 00000000000..d853f6f4452 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationFunction.java @@ -0,0 +1,520 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationFunction { + + /** + * This code is used to specify the exact function an actor is authorized to have in a service in all necessary detail. + */ + _AUTHORIZEDPARTICIPATIONFUNCTION, + /** + * This code is used to specify the exact function an actor is authorized to have as a receiver of information that is the subject of a consent directive or consent override. + */ + _AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION, + /** + * Description:Caregiver authorized to receive patient health information. + */ + AUCG, + /** + * Description:Provider with legitimate relationship authorized to receive patient health information. + */ + AULR, + /** + * Description:Member of care team authorized to receive patient health information. + */ + AUTM, + /** + * Description:Entities within specified work area authorized to receive patient health information. + */ + AUWA, + /** + * This code is used to specify the exact function an actor is authorized to have in authoring a consent directive. + */ + _CONSENTERPARTICIPATIONFUNCTION, + /** + * Description:Legal guardian of the subject of consent authorized to author a consent directive for the subject of consent. + */ + GRDCON, + /** + * Description:Person authorized with healthcare power of attorney to author a consent directive for the subject of consent. + */ + POACON, + /** + * Description:Personal representative of the subject of consent authorized to author a consent directive for the subject of consent. + */ + PRCON, + /** + * Definition:Provider authorized to mask information to protect the patient, a third party, or to ensure that the provider has consulted with the patient prior to release of this information. + */ + PROMSK, + /** + * Description:Subject of consent authorized to author a consent directive. + */ + SUBCON, + /** + * This code is used to specify the exact function an actor is authorized to have in authoring a consent override. + */ + _OVERRIDERPARTICIPATIONFUNCTION, + /** + * Description:Entity authorized to override a consent directive. + */ + AUCOV, + /** + * Description:Entity authorized to override a consent directive or privacy policy in an emergency. + */ + AUEMROV, + /** + * Definition: Set of codes indicating the manner in which sponsors, underwriters, and payers participate in a policy or program. + */ + _COVERAGEPARTICIPATIONFUNCTION, + /** + * Definition: Set of codes indicating the manner in which payors participate in a policy or program. { + + public V3ParticipationFunction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AuthorizedParticipationFunction".equals(codeString)) + return V3ParticipationFunction._AUTHORIZEDPARTICIPATIONFUNCTION; + if ("_AuthorizedReceiverParticipationFunction".equals(codeString)) + return V3ParticipationFunction._AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION; + if ("AUCG".equals(codeString)) + return V3ParticipationFunction.AUCG; + if ("AULR".equals(codeString)) + return V3ParticipationFunction.AULR; + if ("AUTM".equals(codeString)) + return V3ParticipationFunction.AUTM; + if ("AUWA".equals(codeString)) + return V3ParticipationFunction.AUWA; + if ("_ConsenterParticipationFunction".equals(codeString)) + return V3ParticipationFunction._CONSENTERPARTICIPATIONFUNCTION; + if ("GRDCON".equals(codeString)) + return V3ParticipationFunction.GRDCON; + if ("POACON".equals(codeString)) + return V3ParticipationFunction.POACON; + if ("PRCON".equals(codeString)) + return V3ParticipationFunction.PRCON; + if ("PROMSK".equals(codeString)) + return V3ParticipationFunction.PROMSK; + if ("SUBCON".equals(codeString)) + return V3ParticipationFunction.SUBCON; + if ("_OverriderParticipationFunction".equals(codeString)) + return V3ParticipationFunction._OVERRIDERPARTICIPATIONFUNCTION; + if ("AUCOV".equals(codeString)) + return V3ParticipationFunction.AUCOV; + if ("AUEMROV".equals(codeString)) + return V3ParticipationFunction.AUEMROV; + if ("_CoverageParticipationFunction".equals(codeString)) + return V3ParticipationFunction._COVERAGEPARTICIPATIONFUNCTION; + if ("_PayorParticipationFunction".equals(codeString)) + return V3ParticipationFunction._PAYORPARTICIPATIONFUNCTION; + if ("CLMADJ".equals(codeString)) + return V3ParticipationFunction.CLMADJ; + if ("ENROLL".equals(codeString)) + return V3ParticipationFunction.ENROLL; + if ("FFSMGT".equals(codeString)) + return V3ParticipationFunction.FFSMGT; + if ("MCMGT".equals(codeString)) + return V3ParticipationFunction.MCMGT; + if ("PROVMGT".equals(codeString)) + return V3ParticipationFunction.PROVMGT; + if ("UMGT".equals(codeString)) + return V3ParticipationFunction.UMGT; + if ("_SponsorParticipationFunction".equals(codeString)) + return V3ParticipationFunction._SPONSORPARTICIPATIONFUNCTION; + if ("FULINRD".equals(codeString)) + return V3ParticipationFunction.FULINRD; + if ("SELFINRD".equals(codeString)) + return V3ParticipationFunction.SELFINRD; + if ("_UnderwriterParticipationFunction".equals(codeString)) + return V3ParticipationFunction._UNDERWRITERPARTICIPATIONFUNCTION; + if ("PAYORCNTR".equals(codeString)) + return V3ParticipationFunction.PAYORCNTR; + if ("REINS".equals(codeString)) + return V3ParticipationFunction.REINS; + if ("RETROCES".equals(codeString)) + return V3ParticipationFunction.RETROCES; + if ("SUBCTRT".equals(codeString)) + return V3ParticipationFunction.SUBCTRT; + if ("UNDERWRTNG".equals(codeString)) + return V3ParticipationFunction.UNDERWRTNG; + if ("ADMPHYS".equals(codeString)) + return V3ParticipationFunction.ADMPHYS; + if ("ANEST".equals(codeString)) + return V3ParticipationFunction.ANEST; + if ("ANRS".equals(codeString)) + return V3ParticipationFunction.ANRS; + if ("ASSEMBLER".equals(codeString)) + return V3ParticipationFunction.ASSEMBLER; + if ("ATTPHYS".equals(codeString)) + return V3ParticipationFunction.ATTPHYS; + if ("COMPOSER".equals(codeString)) + return V3ParticipationFunction.COMPOSER; + if ("DISPHYS".equals(codeString)) + return V3ParticipationFunction.DISPHYS; + if ("FASST".equals(codeString)) + return V3ParticipationFunction.FASST; + if ("MDWF".equals(codeString)) + return V3ParticipationFunction.MDWF; + if ("NASST".equals(codeString)) + return V3ParticipationFunction.NASST; + if ("PCP".equals(codeString)) + return V3ParticipationFunction.PCP; + if ("PRISURG".equals(codeString)) + return V3ParticipationFunction.PRISURG; + if ("REVIEWER".equals(codeString)) + return V3ParticipationFunction.REVIEWER; + if ("RNDPHYS".equals(codeString)) + return V3ParticipationFunction.RNDPHYS; + if ("SASST".equals(codeString)) + return V3ParticipationFunction.SASST; + if ("SNRS".equals(codeString)) + return V3ParticipationFunction.SNRS; + if ("TASST".equals(codeString)) + return V3ParticipationFunction.TASST; + throw new IllegalArgumentException("Unknown V3ParticipationFunction code '"+codeString+"'"); + } + + public String toCode(V3ParticipationFunction code) { + if (code == V3ParticipationFunction._AUTHORIZEDPARTICIPATIONFUNCTION) + return "_AuthorizedParticipationFunction"; + if (code == V3ParticipationFunction._AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION) + return "_AuthorizedReceiverParticipationFunction"; + if (code == V3ParticipationFunction.AUCG) + return "AUCG"; + if (code == V3ParticipationFunction.AULR) + return "AULR"; + if (code == V3ParticipationFunction.AUTM) + return "AUTM"; + if (code == V3ParticipationFunction.AUWA) + return "AUWA"; + if (code == V3ParticipationFunction._CONSENTERPARTICIPATIONFUNCTION) + return "_ConsenterParticipationFunction"; + if (code == V3ParticipationFunction.GRDCON) + return "GRDCON"; + if (code == V3ParticipationFunction.POACON) + return "POACON"; + if (code == V3ParticipationFunction.PRCON) + return "PRCON"; + if (code == V3ParticipationFunction.PROMSK) + return "PROMSK"; + if (code == V3ParticipationFunction.SUBCON) + return "SUBCON"; + if (code == V3ParticipationFunction._OVERRIDERPARTICIPATIONFUNCTION) + return "_OverriderParticipationFunction"; + if (code == V3ParticipationFunction.AUCOV) + return "AUCOV"; + if (code == V3ParticipationFunction.AUEMROV) + return "AUEMROV"; + if (code == V3ParticipationFunction._COVERAGEPARTICIPATIONFUNCTION) + return "_CoverageParticipationFunction"; + if (code == V3ParticipationFunction._PAYORPARTICIPATIONFUNCTION) + return "_PayorParticipationFunction"; + if (code == V3ParticipationFunction.CLMADJ) + return "CLMADJ"; + if (code == V3ParticipationFunction.ENROLL) + return "ENROLL"; + if (code == V3ParticipationFunction.FFSMGT) + return "FFSMGT"; + if (code == V3ParticipationFunction.MCMGT) + return "MCMGT"; + if (code == V3ParticipationFunction.PROVMGT) + return "PROVMGT"; + if (code == V3ParticipationFunction.UMGT) + return "UMGT"; + if (code == V3ParticipationFunction._SPONSORPARTICIPATIONFUNCTION) + return "_SponsorParticipationFunction"; + if (code == V3ParticipationFunction.FULINRD) + return "FULINRD"; + if (code == V3ParticipationFunction.SELFINRD) + return "SELFINRD"; + if (code == V3ParticipationFunction._UNDERWRITERPARTICIPATIONFUNCTION) + return "_UnderwriterParticipationFunction"; + if (code == V3ParticipationFunction.PAYORCNTR) + return "PAYORCNTR"; + if (code == V3ParticipationFunction.REINS) + return "REINS"; + if (code == V3ParticipationFunction.RETROCES) + return "RETROCES"; + if (code == V3ParticipationFunction.SUBCTRT) + return "SUBCTRT"; + if (code == V3ParticipationFunction.UNDERWRTNG) + return "UNDERWRTNG"; + if (code == V3ParticipationFunction.ADMPHYS) + return "ADMPHYS"; + if (code == V3ParticipationFunction.ANEST) + return "ANEST"; + if (code == V3ParticipationFunction.ANRS) + return "ANRS"; + if (code == V3ParticipationFunction.ASSEMBLER) + return "ASSEMBLER"; + if (code == V3ParticipationFunction.ATTPHYS) + return "ATTPHYS"; + if (code == V3ParticipationFunction.COMPOSER) + return "COMPOSER"; + if (code == V3ParticipationFunction.DISPHYS) + return "DISPHYS"; + if (code == V3ParticipationFunction.FASST) + return "FASST"; + if (code == V3ParticipationFunction.MDWF) + return "MDWF"; + if (code == V3ParticipationFunction.NASST) + return "NASST"; + if (code == V3ParticipationFunction.PCP) + return "PCP"; + if (code == V3ParticipationFunction.PRISURG) + return "PRISURG"; + if (code == V3ParticipationFunction.REVIEWER) + return "REVIEWER"; + if (code == V3ParticipationFunction.RNDPHYS) + return "RNDPHYS"; + if (code == V3ParticipationFunction.SASST) + return "SASST"; + if (code == V3ParticipationFunction.SNRS) + return "SNRS"; + if (code == V3ParticipationFunction.TASST) + return "TASST"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationMode.java new file mode 100644 index 00000000000..b2e81971137 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationMode.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationMode { + + /** + * Participation by non-human-languaged based electronic signal + */ + ELECTRONIC, + /** + * Participation by direct action where subject and actor are in the same location. (The participation involves more than communication.) + */ + PHYSICAL, + /** + * Participation by direct action where subject and actor are in separate locations, and the actions of the actor are transmitted by electronic or mechanical means. (The participation involves more than communication.) + */ + REMOTE, + /** + * Participation by voice communication + */ + VERBAL, + /** + * Participation by pre-recorded voice. Communication is limited to one direction (from the recorder to recipient). + */ + DICTATE, + /** + * Participation by voice communication where parties speak to each other directly. + */ + FACE, + /** + * Participation by voice communication where the voices of the communicating parties are transported over an electronic medium + */ + PHONE, + /** + * Participation by voice and visual communication where the voices and images of the communicating parties are transported over an electronic medium + */ + VIDEOCONF, + /** + * Participation by human language recorded on a physical material + */ + WRITTEN, + /** + * Participation by text or diagrams printed on paper that have been transmitted over a fax device + */ + FAXWRIT, + /** + * Participation by text or diagrams printed on paper or other recording medium + */ + HANDWRIT, + /** + * Participation by text or diagrams printed on paper transmitted physically (e.g. by courier service, postal service). + */ + MAILWRIT, + /** + * Participation by text or diagrams submitted by computer network, e.g. online survey. + */ + ONLINEWRIT, + /** + * Participation by text or diagrams transmitted over an electronic mail system. + */ + EMAILWRIT, + /** + * Participation by text or diagrams printed on paper or other recording medium where the recording was performed using a typewriter, typesetter, computer or similar mechanism. + */ + TYPEWRIT, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ELECTRONIC".equals(codeString)) + return ELECTRONIC; + if ("PHYSICAL".equals(codeString)) + return PHYSICAL; + if ("REMOTE".equals(codeString)) + return REMOTE; + if ("VERBAL".equals(codeString)) + return VERBAL; + if ("DICTATE".equals(codeString)) + return DICTATE; + if ("FACE".equals(codeString)) + return FACE; + if ("PHONE".equals(codeString)) + return PHONE; + if ("VIDEOCONF".equals(codeString)) + return VIDEOCONF; + if ("WRITTEN".equals(codeString)) + return WRITTEN; + if ("FAXWRIT".equals(codeString)) + return FAXWRIT; + if ("HANDWRIT".equals(codeString)) + return HANDWRIT; + if ("MAILWRIT".equals(codeString)) + return MAILWRIT; + if ("ONLINEWRIT".equals(codeString)) + return ONLINEWRIT; + if ("EMAILWRIT".equals(codeString)) + return EMAILWRIT; + if ("TYPEWRIT".equals(codeString)) + return TYPEWRIT; + throw new FHIRException("Unknown V3ParticipationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ELECTRONIC: return "ELECTRONIC"; + case PHYSICAL: return "PHYSICAL"; + case REMOTE: return "REMOTE"; + case VERBAL: return "VERBAL"; + case DICTATE: return "DICTATE"; + case FACE: return "FACE"; + case PHONE: return "PHONE"; + case VIDEOCONF: return "VIDEOCONF"; + case WRITTEN: return "WRITTEN"; + case FAXWRIT: return "FAXWRIT"; + case HANDWRIT: return "HANDWRIT"; + case MAILWRIT: return "MAILWRIT"; + case ONLINEWRIT: return "ONLINEWRIT"; + case EMAILWRIT: return "EMAILWRIT"; + case TYPEWRIT: return "TYPEWRIT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationMode"; + } + public String getDefinition() { + switch (this) { + case ELECTRONIC: return "Participation by non-human-languaged based electronic signal"; + case PHYSICAL: return "Participation by direct action where subject and actor are in the same location. (The participation involves more than communication.)"; + case REMOTE: return "Participation by direct action where subject and actor are in separate locations, and the actions of the actor are transmitted by electronic or mechanical means. (The participation involves more than communication.)"; + case VERBAL: return "Participation by voice communication"; + case DICTATE: return "Participation by pre-recorded voice. Communication is limited to one direction (from the recorder to recipient)."; + case FACE: return "Participation by voice communication where parties speak to each other directly."; + case PHONE: return "Participation by voice communication where the voices of the communicating parties are transported over an electronic medium"; + case VIDEOCONF: return "Participation by voice and visual communication where the voices and images of the communicating parties are transported over an electronic medium"; + case WRITTEN: return "Participation by human language recorded on a physical material"; + case FAXWRIT: return "Participation by text or diagrams printed on paper that have been transmitted over a fax device"; + case HANDWRIT: return "Participation by text or diagrams printed on paper or other recording medium"; + case MAILWRIT: return "Participation by text or diagrams printed on paper transmitted physically (e.g. by courier service, postal service)."; + case ONLINEWRIT: return "Participation by text or diagrams submitted by computer network, e.g. online survey."; + case EMAILWRIT: return "Participation by text or diagrams transmitted over an electronic mail system."; + case TYPEWRIT: return "Participation by text or diagrams printed on paper or other recording medium where the recording was performed using a typewriter, typesetter, computer or similar mechanism."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ELECTRONIC: return "electronic data"; + case PHYSICAL: return "physical presence"; + case REMOTE: return "remote presence"; + case VERBAL: return "verbal"; + case DICTATE: return "dictated"; + case FACE: return "face-to-face"; + case PHONE: return "telephone"; + case VIDEOCONF: return "videoconferencing"; + case WRITTEN: return "written"; + case FAXWRIT: return "telefax"; + case HANDWRIT: return "handwritten"; + case MAILWRIT: return "mail"; + case ONLINEWRIT: return "online written"; + case EMAILWRIT: return "email"; + case TYPEWRIT: return "typewritten"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationModeEnumFactory.java new file mode 100644 index 00000000000..5457825947d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationModeEnumFactory.java @@ -0,0 +1,111 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ParticipationModeEnumFactory implements EnumFactory { + + public V3ParticipationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ELECTRONIC".equals(codeString)) + return V3ParticipationMode.ELECTRONIC; + if ("PHYSICAL".equals(codeString)) + return V3ParticipationMode.PHYSICAL; + if ("REMOTE".equals(codeString)) + return V3ParticipationMode.REMOTE; + if ("VERBAL".equals(codeString)) + return V3ParticipationMode.VERBAL; + if ("DICTATE".equals(codeString)) + return V3ParticipationMode.DICTATE; + if ("FACE".equals(codeString)) + return V3ParticipationMode.FACE; + if ("PHONE".equals(codeString)) + return V3ParticipationMode.PHONE; + if ("VIDEOCONF".equals(codeString)) + return V3ParticipationMode.VIDEOCONF; + if ("WRITTEN".equals(codeString)) + return V3ParticipationMode.WRITTEN; + if ("FAXWRIT".equals(codeString)) + return V3ParticipationMode.FAXWRIT; + if ("HANDWRIT".equals(codeString)) + return V3ParticipationMode.HANDWRIT; + if ("MAILWRIT".equals(codeString)) + return V3ParticipationMode.MAILWRIT; + if ("ONLINEWRIT".equals(codeString)) + return V3ParticipationMode.ONLINEWRIT; + if ("EMAILWRIT".equals(codeString)) + return V3ParticipationMode.EMAILWRIT; + if ("TYPEWRIT".equals(codeString)) + return V3ParticipationMode.TYPEWRIT; + throw new IllegalArgumentException("Unknown V3ParticipationMode code '"+codeString+"'"); + } + + public String toCode(V3ParticipationMode code) { + if (code == V3ParticipationMode.ELECTRONIC) + return "ELECTRONIC"; + if (code == V3ParticipationMode.PHYSICAL) + return "PHYSICAL"; + if (code == V3ParticipationMode.REMOTE) + return "REMOTE"; + if (code == V3ParticipationMode.VERBAL) + return "VERBAL"; + if (code == V3ParticipationMode.DICTATE) + return "DICTATE"; + if (code == V3ParticipationMode.FACE) + return "FACE"; + if (code == V3ParticipationMode.PHONE) + return "PHONE"; + if (code == V3ParticipationMode.VIDEOCONF) + return "VIDEOCONF"; + if (code == V3ParticipationMode.WRITTEN) + return "WRITTEN"; + if (code == V3ParticipationMode.FAXWRIT) + return "FAXWRIT"; + if (code == V3ParticipationMode.HANDWRIT) + return "HANDWRIT"; + if (code == V3ParticipationMode.MAILWRIT) + return "MAILWRIT"; + if (code == V3ParticipationMode.ONLINEWRIT) + return "ONLINEWRIT"; + if (code == V3ParticipationMode.EMAILWRIT) + return "EMAILWRIT"; + if (code == V3ParticipationMode.TYPEWRIT) + return "TYPEWRIT"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignature.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignature.java new file mode 100644 index 00000000000..ece57de37e1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignature.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationSignature { + + /** + * The particpant intends to provide a signature. + */ + I, + /** + * Signature has been affixed, either written on file, or electronic (incl. digital) signature in Participation.signatureText. + */ + S, + /** + * A signature for the service is required of this actor. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationSignature fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("S".equals(codeString)) + return S; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ParticipationSignature code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case S: return "S"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationSignature"; + } + public String getDefinition() { + switch (this) { + case I: return "The particpant intends to provide a signature."; + case S: return "Signature has been affixed, either written on file, or electronic (incl. digital) signature in Participation.signatureText."; + case X: return "A signature for the service is required of this actor."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "intended"; + case S: return "signed"; + case X: return "required"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignatureEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignatureEnumFactory.java new file mode 100644 index 00000000000..33ac0992ad6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationSignatureEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ParticipationSignatureEnumFactory implements EnumFactory { + + public V3ParticipationSignature fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3ParticipationSignature.I; + if ("S".equals(codeString)) + return V3ParticipationSignature.S; + if ("X".equals(codeString)) + return V3ParticipationSignature.X; + throw new IllegalArgumentException("Unknown V3ParticipationSignature code '"+codeString+"'"); + } + + public String toCode(V3ParticipationSignature code) { + if (code == V3ParticipationSignature.I) + return "I"; + if (code == V3ParticipationSignature.S) + return "S"; + if (code == V3ParticipationSignature.X) + return "X"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationType.java new file mode 100644 index 00000000000..677581f2129 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationType.java @@ -0,0 +1,668 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationType { + + /** + * Indicates that the target of the participation is involved in some manner in the act, but does not qualify how. + */ + PART, + /** + * Participations related, but not primary to an act. The Referring, Admitting, and Discharging practitioners must be the same person as those authoring the ControlAct event for their respective trigger events. + */ + _PARTICIPATIONANCILLARY, + /** + * The practitioner who is responsible for admitting a patient to a patient encounter. + */ + ADM, + /** + * The practitioner that has responsibility for overseeing a patient's care during a patient encounter. + */ + ATND, + /** + * A person or organization who should be contacted for follow-up questions about the act in place of the author. + */ + CALLBCK, + /** + * An advisor participating in the service by performing evaluations and making recommendations. + */ + CON, + /** + * The practitioner who is responsible for the discharge of a patient from a patient encounter. + */ + DIS, + /** + * Only with Transportation services. A person who escorts the patient. + */ + ESC, + /** + * A person having referred the subject of the service to the performer (referring physician). Typically, a referring physician will receive a report. + */ + REF, + /** + * Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g., consultant), information that the Act itself seeks to reveal (e.g., informant of clinical history), or information about what Act was performed (e.g., informant witness). + */ + _PARTICIPATIONINFORMATIONGENERATOR, + /** + * Definition: A party that originates the Act and therefore has responsibility for the information given in the Act and ownership of this Act. + + + Example: the report writer, the person writing the act definition, the guideline author, the placer of an order, the EKG cart (device) creating a report etc. Every Act should have an author. Authorship is regardless of mood always actual authorship. + + Examples of such policies might include: + + + + The author and anyone they explicitly delegate may update the report; + + + + All administrators within the same clinic may cancel and reschedule appointments created by other administrators within that clinic; + + + + A party that is neither an author nor a party who is extended authorship maintenance rights by policy, may only amend, reverse, override, replace, or follow up in other ways on this Act, whereby the Act remains intact and is linked to another Act authored by that other party. + */ + AUT, + /** + * A source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject. + */ + INF, + /** + * An entity entering the data into the originating system. The data entry entity is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text transcribed into electronic form. + */ + TRANS, + /** + * A person entering the data into the originating system. The data entry person is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text. + */ + ENT, + /** + * Only with service events. A person witnessing the action happening without doing anything. A witness is not necessarily aware, much less approves of anything stated in the service event. Example for a witness is students watching an operation or an advanced directive witness. + */ + WIT, + /** + * An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g., who maintains the report or the master service catalog item, etc.). + */ + CST, + /** + * Target participant that is substantially present in the act and which is directly involved in the action (includes consumed material, devices, etc.). + */ + DIR, + /** + * The target of an Observation action. Links an observation to a Role whose player is the substance or most specific component entity (material, micro-organism, etc.) being measured within the subject. + + + Examples: A "plasma porcelain substance concentration" has analyte a Role with player substance Entity "porcelain". + + + UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for "plasma porcelain" the scoper could be "Plasma". + */ + ALY, + /** + * In an obstetric service, the baby. + */ + BBY, + /** + * The catalyst of a chemical reaction, such as an enzyme or a platinum surface. In biochemical reactions, connects the enzyme with the molecular interaction + */ + CAT, + /** + * Participant material that is taken up, diminished, altered, or disappears in the act. + */ + CSM, + /** + * Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g., heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service. + */ + TPA, + /** + * Participant used in performing the act without being substantially affected by the act (i.e. durable or inert with respect to that particular service). + + + Examples: monitoring equipment, tools, but also access/drainage lines, prostheses, pace maker, etc. + */ + DEV, + /** + * A device that changes ownership due to the service, e.g., a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service. + */ + NRD, + /** + * A device that does not change ownership due to the service, i.e., a surgical instrument or tool or an endoscope. The distinction between reuseable and non-reuseable must be made in order to know whether material must be re-stocked. + */ + RDV, + /** + * In some organ transplantation services and rarely in transfusion services a donor will be a target participant in the service. However, in most cases transplantation is decomposed in three services: explantation, transport, and implantation. The identity of the donor (recipient) is often irrelevant for the explantation (implantation) service. + */ + DON, + /** + * Description: The entity playing the associated role is the physical (including energy), chemical or biological substance that is participating in the exposure. For example in communicable diseases, the associated playing entity is the disease causing pathogen. + */ + EXPAGNT, + /** + * Description:Direct participation in an exposure act where it is unknown that the participant is the source or subject of the exposure. If the participant is known to be the contact of an exposure then the SBJ participation type should be used. If the participant is known to be the source then the EXSRC participation type should be used. + */ + EXPART, + /** + * Description: The entity playing the associated role is the target (contact) of exposure. + */ + EXPTRGT, + /** + * Description:The entity playing the associated role is the source of exposure. + */ + EXSRC, + /** + * Participant material that is brought forth (produced) in the act (e.g., specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g., in supply services the product is taken from a stock). + */ + PRD, + /** + * The principle target on which the action happens. + + + Examples: The patient in physical examination, a specimen in a lab observation. May also be a patient's family member (teaching) or a device or room (cleaning, disinfecting, housekeeping). + + + UsageNotes: Not all direct targets are subjects. Consumables and devices used as tools for an act are not subjects. However, a device may be a subject of a maintenance action. + */ + SBJ, + /** + * The subject of non-clinical (e.g. laboratory) observation services is a specimen. + */ + SPC, + /** + * Target that is not substantially present in the act and which is not directly affected by the act, but which will be a focus of the record or documentation of the act. + */ + IND, + /** + * Target on behalf of whom the service happens, but that is not necessarily present in the service. Can occur together with direct target to indicate that a target is both, as in the case where the patient is the indirect beneficiary of a service rendered to a family member, e.g. counseling or given home care instructions. This concept includes a participant, such as a covered party, who derives benefits from a service act covered by a coverage act. + + Note that the semantic role of the intended recipient who benefits from the happening denoted by the verb in the clause. Thus, a patient who has no coverage under a policy or program may be a beneficiary of a health service while not being the beneficiary of coverage for that service. + */ + BEN, + /** + * Definition: A factor, such as a microorganism, chemical substance, or form of radiation, whose presence, excessive presence, or (in deficiency diseases) relative absence is essential, in whole or in part, for the occurrence of a condition. + + Constraint: The use of this participation is limited to observations. + */ + CAGNT, + /** + * The target participation for an individual in a health care coverage act in which the target role is either the policy holder of the coverage, or a covered party under the coverage. + */ + COV, + /** + * The target person or organization contractually recognized by the issuer as a participant who has assumed fiscal responsibility for another personaTMs financial obligations by guaranteeing to pay for amounts owed to a particular account + + + Example:The subscriber of the patientaTMs health insurance policy signs a contract with the provider to be fiscally responsible for the patient billing account balance amount owed. + */ + GUAR, + /** + * Participant who posses an instrument such as a financial contract (insurance policy) usually based on some agreement with the author. + */ + HLD, + /** + * The record target indicates whose medical record holds the documentation of this act. This is especially important when the subject of a service is not the patient himself. + */ + RCT, + /** + * The person (or organization) who receives the product of an Act. + */ + RCV, + /** + * A party, who may or should receive or who has recieved the Act or subsequent or derivative information of that Act. Information recipient is inert, i.e., independent of mood." Rationale: this is a generalization of a too diverse family that the definition can't be any more specific, and the concept is abstract so one of the specializations should be used. + */ + IRCP, + /** + * An information recipient to notify for urgent matters about this Act. (e.g., in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill). + */ + NOT, + /** + * Information recipient to whom an act statement is primarily directed. E.g., a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary. + */ + PRCP, + /** + * A participant (e.g. provider) who has referred the subject of an act (e.g. patient). + + Typically, a referred by participant will provide a report (e.g. referral). + */ + REFB, + /** + * The person who receives the patient + */ + REFT, + /** + * A secondary information recipient, who receives copies (e.g., a primary care provider receiving copies of results as ordered by specialist). + */ + TRC, + /** + * The facility where the service is done. May be a static building (or room therein) or a moving location (e.g., ambulance, helicopter, aircraft, train, truck, ship, etc.) + */ + LOC, + /** + * The destination for services. May be a static building (or room therein) or a movable facility (e.g., ship). + */ + DST, + /** + * A location where data about an Act was entered. + */ + ELOC, + /** + * The location of origin for services. May be a static building (or room therein) or a movable facility (e.g., ship). + */ + ORG, + /** + * Some services take place at multiple concurrent locations (e.g., telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered "remote." + */ + RML, + /** + * For services, an intermediate location that specifies a path between origin an destination. + */ + VIA, + /** + * Definition: A person, non-person living subject, organization or device that who actually and principally carries out the action. Device should only be assigned as a performer in circumstances where the device is performing independent of human intervention. Need not be the principal responsible actor. + + + Exampe: A surgery resident operating under supervision of attending surgeon, a search and rescue dog locating survivors, an electronic laboratory analyzer or the laboratory discipline requested to perform a laboratory test. The performer may also be the patient in self-care, e.g. fingerstick blood sugar. The traditional order filler is a performer. This information should accompany every service event. + + + Note: that existing HL7 designs assign an organization as the playing entity of the Role that is the performer. These designs should be revised in subsequent releases to make this the scooping entity for the role involved. + */ + PRF, + /** + * Distributes material used in or generated during the act. + */ + DIST, + /** + * The principal or primary performer of the act. + */ + PPRF, + /** + * A person assisting in an act through his substantial presence and involvement This includes: assistants, technicians, associates, or whatever the job titles may be. + */ + SPRF, + /** + * The person or organization that has primary responsibility for the act. The responsible party is not necessarily present in an action, but is accountable for the action through the power to delegate, and the duty to review actions with the performing actor after the fact. This responsibility may be ethical, legal, contractual, fiscal, or fiduciary in nature. + + + Example: A person who is the head of a biochemical laboratory; a sponsor for a policy or government program. + */ + RESP, + /** + * A person who verifies the correctness and appropriateness of the service (plan, order, event, etc.) and hence takes on accountability. + */ + VRF, + /** + * A verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate the act. An example would be a resident physician who sees a patient and dictates a note, then later signs it. Their signature constitutes an authentication. + */ + AUTHEN, + /** + * A verifier who legally authenticates the accuracy of an act. An example would be a staff physician who sees a patient and dictates a note, then later signs it. Their signature constitutes a legal authentication. + */ + LA, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PART".equals(codeString)) + return PART; + if ("_ParticipationAncillary".equals(codeString)) + return _PARTICIPATIONANCILLARY; + if ("ADM".equals(codeString)) + return ADM; + if ("ATND".equals(codeString)) + return ATND; + if ("CALLBCK".equals(codeString)) + return CALLBCK; + if ("CON".equals(codeString)) + return CON; + if ("DIS".equals(codeString)) + return DIS; + if ("ESC".equals(codeString)) + return ESC; + if ("REF".equals(codeString)) + return REF; + if ("_ParticipationInformationGenerator".equals(codeString)) + return _PARTICIPATIONINFORMATIONGENERATOR; + if ("AUT".equals(codeString)) + return AUT; + if ("INF".equals(codeString)) + return INF; + if ("TRANS".equals(codeString)) + return TRANS; + if ("ENT".equals(codeString)) + return ENT; + if ("WIT".equals(codeString)) + return WIT; + if ("CST".equals(codeString)) + return CST; + if ("DIR".equals(codeString)) + return DIR; + if ("ALY".equals(codeString)) + return ALY; + if ("BBY".equals(codeString)) + return BBY; + if ("CAT".equals(codeString)) + return CAT; + if ("CSM".equals(codeString)) + return CSM; + if ("TPA".equals(codeString)) + return TPA; + if ("DEV".equals(codeString)) + return DEV; + if ("NRD".equals(codeString)) + return NRD; + if ("RDV".equals(codeString)) + return RDV; + if ("DON".equals(codeString)) + return DON; + if ("EXPAGNT".equals(codeString)) + return EXPAGNT; + if ("EXPART".equals(codeString)) + return EXPART; + if ("EXPTRGT".equals(codeString)) + return EXPTRGT; + if ("EXSRC".equals(codeString)) + return EXSRC; + if ("PRD".equals(codeString)) + return PRD; + if ("SBJ".equals(codeString)) + return SBJ; + if ("SPC".equals(codeString)) + return SPC; + if ("IND".equals(codeString)) + return IND; + if ("BEN".equals(codeString)) + return BEN; + if ("CAGNT".equals(codeString)) + return CAGNT; + if ("COV".equals(codeString)) + return COV; + if ("GUAR".equals(codeString)) + return GUAR; + if ("HLD".equals(codeString)) + return HLD; + if ("RCT".equals(codeString)) + return RCT; + if ("RCV".equals(codeString)) + return RCV; + if ("IRCP".equals(codeString)) + return IRCP; + if ("NOT".equals(codeString)) + return NOT; + if ("PRCP".equals(codeString)) + return PRCP; + if ("REFB".equals(codeString)) + return REFB; + if ("REFT".equals(codeString)) + return REFT; + if ("TRC".equals(codeString)) + return TRC; + if ("LOC".equals(codeString)) + return LOC; + if ("DST".equals(codeString)) + return DST; + if ("ELOC".equals(codeString)) + return ELOC; + if ("ORG".equals(codeString)) + return ORG; + if ("RML".equals(codeString)) + return RML; + if ("VIA".equals(codeString)) + return VIA; + if ("PRF".equals(codeString)) + return PRF; + if ("DIST".equals(codeString)) + return DIST; + if ("PPRF".equals(codeString)) + return PPRF; + if ("SPRF".equals(codeString)) + return SPRF; + if ("RESP".equals(codeString)) + return RESP; + if ("VRF".equals(codeString)) + return VRF; + if ("AUTHEN".equals(codeString)) + return AUTHEN; + if ("LA".equals(codeString)) + return LA; + throw new FHIRException("Unknown V3ParticipationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PART: return "PART"; + case _PARTICIPATIONANCILLARY: return "_ParticipationAncillary"; + case ADM: return "ADM"; + case ATND: return "ATND"; + case CALLBCK: return "CALLBCK"; + case CON: return "CON"; + case DIS: return "DIS"; + case ESC: return "ESC"; + case REF: return "REF"; + case _PARTICIPATIONINFORMATIONGENERATOR: return "_ParticipationInformationGenerator"; + case AUT: return "AUT"; + case INF: return "INF"; + case TRANS: return "TRANS"; + case ENT: return "ENT"; + case WIT: return "WIT"; + case CST: return "CST"; + case DIR: return "DIR"; + case ALY: return "ALY"; + case BBY: return "BBY"; + case CAT: return "CAT"; + case CSM: return "CSM"; + case TPA: return "TPA"; + case DEV: return "DEV"; + case NRD: return "NRD"; + case RDV: return "RDV"; + case DON: return "DON"; + case EXPAGNT: return "EXPAGNT"; + case EXPART: return "EXPART"; + case EXPTRGT: return "EXPTRGT"; + case EXSRC: return "EXSRC"; + case PRD: return "PRD"; + case SBJ: return "SBJ"; + case SPC: return "SPC"; + case IND: return "IND"; + case BEN: return "BEN"; + case CAGNT: return "CAGNT"; + case COV: return "COV"; + case GUAR: return "GUAR"; + case HLD: return "HLD"; + case RCT: return "RCT"; + case RCV: return "RCV"; + case IRCP: return "IRCP"; + case NOT: return "NOT"; + case PRCP: return "PRCP"; + case REFB: return "REFB"; + case REFT: return "REFT"; + case TRC: return "TRC"; + case LOC: return "LOC"; + case DST: return "DST"; + case ELOC: return "ELOC"; + case ORG: return "ORG"; + case RML: return "RML"; + case VIA: return "VIA"; + case PRF: return "PRF"; + case DIST: return "DIST"; + case PPRF: return "PPRF"; + case SPRF: return "SPRF"; + case RESP: return "RESP"; + case VRF: return "VRF"; + case AUTHEN: return "AUTHEN"; + case LA: return "LA"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationType"; + } + public String getDefinition() { + switch (this) { + case PART: return "Indicates that the target of the participation is involved in some manner in the act, but does not qualify how."; + case _PARTICIPATIONANCILLARY: return "Participations related, but not primary to an act. The Referring, Admitting, and Discharging practitioners must be the same person as those authoring the ControlAct event for their respective trigger events."; + case ADM: return "The practitioner who is responsible for admitting a patient to a patient encounter."; + case ATND: return "The practitioner that has responsibility for overseeing a patient's care during a patient encounter."; + case CALLBCK: return "A person or organization who should be contacted for follow-up questions about the act in place of the author."; + case CON: return "An advisor participating in the service by performing evaluations and making recommendations."; + case DIS: return "The practitioner who is responsible for the discharge of a patient from a patient encounter."; + case ESC: return "Only with Transportation services. A person who escorts the patient."; + case REF: return "A person having referred the subject of the service to the performer (referring physician). Typically, a referring physician will receive a report."; + case _PARTICIPATIONINFORMATIONGENERATOR: return "Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g., consultant), information that the Act itself seeks to reveal (e.g., informant of clinical history), or information about what Act was performed (e.g., informant witness)."; + case AUT: return "Definition: A party that originates the Act and therefore has responsibility for the information given in the Act and ownership of this Act.\r\n\n \n Example: the report writer, the person writing the act definition, the guideline author, the placer of an order, the EKG cart (device) creating a report etc. Every Act should have an author. Authorship is regardless of mood always actual authorship. \r\n\n Examples of such policies might include:\r\n\n \n \n The author and anyone they explicitly delegate may update the report;\r\n\n \n \n All administrators within the same clinic may cancel and reschedule appointments created by other administrators within that clinic;\r\n\n \n \n A party that is neither an author nor a party who is extended authorship maintenance rights by policy, may only amend, reverse, override, replace, or follow up in other ways on this Act, whereby the Act remains intact and is linked to another Act authored by that other party."; + case INF: return "A source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject."; + case TRANS: return "An entity entering the data into the originating system. The data entry entity is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text transcribed into electronic form."; + case ENT: return "A person entering the data into the originating system. The data entry person is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text."; + case WIT: return "Only with service events. A person witnessing the action happening without doing anything. A witness is not necessarily aware, much less approves of anything stated in the service event. Example for a witness is students watching an operation or an advanced directive witness."; + case CST: return "An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g., who maintains the report or the master service catalog item, etc.)."; + case DIR: return "Target participant that is substantially present in the act and which is directly involved in the action (includes consumed material, devices, etc.)."; + case ALY: return "The target of an Observation action. Links an observation to a Role whose player is the substance or most specific component entity (material, micro-organism, etc.) being measured within the subject.\r\n\n \n Examples: A \"plasma porcelain substance concentration\" has analyte a Role with player substance Entity \"porcelain\".\r\n\n \n UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for \"plasma porcelain\" the scoper could be \"Plasma\"."; + case BBY: return "In an obstetric service, the baby."; + case CAT: return "The catalyst of a chemical reaction, such as an enzyme or a platinum surface. In biochemical reactions, connects the enzyme with the molecular interaction"; + case CSM: return "Participant material that is taken up, diminished, altered, or disappears in the act."; + case TPA: return "Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g., heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service."; + case DEV: return "Participant used in performing the act without being substantially affected by the act (i.e. durable or inert with respect to that particular service).\r\n\n \n Examples: monitoring equipment, tools, but also access/drainage lines, prostheses, pace maker, etc."; + case NRD: return "A device that changes ownership due to the service, e.g., a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service."; + case RDV: return "A device that does not change ownership due to the service, i.e., a surgical instrument or tool or an endoscope. The distinction between reuseable and non-reuseable must be made in order to know whether material must be re-stocked."; + case DON: return "In some organ transplantation services and rarely in transfusion services a donor will be a target participant in the service. However, in most cases transplantation is decomposed in three services: explantation, transport, and implantation. The identity of the donor (recipient) is often irrelevant for the explantation (implantation) service."; + case EXPAGNT: return "Description: The entity playing the associated role is the physical (including energy), chemical or biological substance that is participating in the exposure. For example in communicable diseases, the associated playing entity is the disease causing pathogen."; + case EXPART: return "Description:Direct participation in an exposure act where it is unknown that the participant is the source or subject of the exposure. If the participant is known to be the contact of an exposure then the SBJ participation type should be used. If the participant is known to be the source then the EXSRC participation type should be used."; + case EXPTRGT: return "Description: The entity playing the associated role is the target (contact) of exposure."; + case EXSRC: return "Description:The entity playing the associated role is the source of exposure."; + case PRD: return "Participant material that is brought forth (produced) in the act (e.g., specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g., in supply services the product is taken from a stock)."; + case SBJ: return "The principle target on which the action happens.\r\n\n \n Examples: The patient in physical examination, a specimen in a lab observation. May also be a patient's family member (teaching) or a device or room (cleaning, disinfecting, housekeeping). \r\n\n \n UsageNotes: Not all direct targets are subjects. Consumables and devices used as tools for an act are not subjects. However, a device may be a subject of a maintenance action."; + case SPC: return "The subject of non-clinical (e.g. laboratory) observation services is a specimen."; + case IND: return "Target that is not substantially present in the act and which is not directly affected by the act, but which will be a focus of the record or documentation of the act."; + case BEN: return "Target on behalf of whom the service happens, but that is not necessarily present in the service. Can occur together with direct target to indicate that a target is both, as in the case where the patient is the indirect beneficiary of a service rendered to a family member, e.g. counseling or given home care instructions. This concept includes a participant, such as a covered party, who derives benefits from a service act covered by a coverage act.\r\n\n Note that the semantic role of the intended recipient who benefits from the happening denoted by the verb in the clause. Thus, a patient who has no coverage under a policy or program may be a beneficiary of a health service while not being the beneficiary of coverage for that service."; + case CAGNT: return "Definition: A factor, such as a microorganism, chemical substance, or form of radiation, whose presence, excessive presence, or (in deficiency diseases) relative absence is essential, in whole or in part, for the occurrence of a condition.\r\n\n Constraint: The use of this participation is limited to observations."; + case COV: return "The target participation for an individual in a health care coverage act in which the target role is either the policy holder of the coverage, or a covered party under the coverage."; + case GUAR: return "The target person or organization contractually recognized by the issuer as a participant who has assumed fiscal responsibility for another personaTMs financial obligations by guaranteeing to pay for amounts owed to a particular account\r\n\n \n Example:The subscriber of the patientaTMs health insurance policy signs a contract with the provider to be fiscally responsible for the patient billing account balance amount owed."; + case HLD: return "Participant who posses an instrument such as a financial contract (insurance policy) usually based on some agreement with the author."; + case RCT: return "The record target indicates whose medical record holds the documentation of this act. This is especially important when the subject of a service is not the patient himself."; + case RCV: return "The person (or organization) who receives the product of an Act."; + case IRCP: return "A party, who may or should receive or who has recieved the Act or subsequent or derivative information of that Act. Information recipient is inert, i.e., independent of mood.\" Rationale: this is a generalization of a too diverse family that the definition can't be any more specific, and the concept is abstract so one of the specializations should be used."; + case NOT: return "An information recipient to notify for urgent matters about this Act. (e.g., in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill)."; + case PRCP: return "Information recipient to whom an act statement is primarily directed. E.g., a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary."; + case REFB: return "A participant (e.g. provider) who has referred the subject of an act (e.g. patient).\r\n\n Typically, a referred by participant will provide a report (e.g. referral)."; + case REFT: return "The person who receives the patient"; + case TRC: return "A secondary information recipient, who receives copies (e.g., a primary care provider receiving copies of results as ordered by specialist)."; + case LOC: return "The facility where the service is done. May be a static building (or room therein) or a moving location (e.g., ambulance, helicopter, aircraft, train, truck, ship, etc.)"; + case DST: return "The destination for services. May be a static building (or room therein) or a movable facility (e.g., ship)."; + case ELOC: return "A location where data about an Act was entered."; + case ORG: return "The location of origin for services. May be a static building (or room therein) or a movable facility (e.g., ship)."; + case RML: return "Some services take place at multiple concurrent locations (e.g., telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered \"remote.\""; + case VIA: return "For services, an intermediate location that specifies a path between origin an destination."; + case PRF: return "Definition: A person, non-person living subject, organization or device that who actually and principally carries out the action. Device should only be assigned as a performer in circumstances where the device is performing independent of human intervention. Need not be the principal responsible actor.\r\n\n \n Exampe: A surgery resident operating under supervision of attending surgeon, a search and rescue dog locating survivors, an electronic laboratory analyzer or the laboratory discipline requested to perform a laboratory test. The performer may also be the patient in self-care, e.g. fingerstick blood sugar. The traditional order filler is a performer. This information should accompany every service event.\r\n\n \n Note: that existing HL7 designs assign an organization as the playing entity of the Role that is the performer. These designs should be revised in subsequent releases to make this the scooping entity for the role involved."; + case DIST: return "Distributes material used in or generated during the act."; + case PPRF: return "The principal or primary performer of the act."; + case SPRF: return "A person assisting in an act through his substantial presence and involvement This includes: assistants, technicians, associates, or whatever the job titles may be."; + case RESP: return "The person or organization that has primary responsibility for the act. The responsible party is not necessarily present in an action, but is accountable for the action through the power to delegate, and the duty to review actions with the performing actor after the fact. This responsibility may be ethical, legal, contractual, fiscal, or fiduciary in nature.\r\n\n \n Example: A person who is the head of a biochemical laboratory; a sponsor for a policy or government program."; + case VRF: return "A person who verifies the correctness and appropriateness of the service (plan, order, event, etc.) and hence takes on accountability."; + case AUTHEN: return "A verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate the act. An example would be a resident physician who sees a patient and dictates a note, then later signs it. Their signature constitutes an authentication."; + case LA: return "A verifier who legally authenticates the accuracy of an act. An example would be a staff physician who sees a patient and dictates a note, then later signs it. Their signature constitutes a legal authentication."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PART: return "Participation"; + case _PARTICIPATIONANCILLARY: return "ParticipationAncillary"; + case ADM: return "admitter"; + case ATND: return "attender"; + case CALLBCK: return "callback contact"; + case CON: return "consultant"; + case DIS: return "discharger"; + case ESC: return "escort"; + case REF: return "referrer"; + case _PARTICIPATIONINFORMATIONGENERATOR: return "ParticipationInformationGenerator"; + case AUT: return "author (originator)"; + case INF: return "informant"; + case TRANS: return "Transcriber"; + case ENT: return "data entry person"; + case WIT: return "witness"; + case CST: return "custodian"; + case DIR: return "direct target"; + case ALY: return "analyte"; + case BBY: return "baby"; + case CAT: return "catalyst"; + case CSM: return "consumable"; + case TPA: return "therapeutic agent"; + case DEV: return "device"; + case NRD: return "non-reuseable device"; + case RDV: return "reusable device"; + case DON: return "donor"; + case EXPAGNT: return "ExposureAgent"; + case EXPART: return "ExposureParticipation"; + case EXPTRGT: return "ExposureTarget"; + case EXSRC: return "ExposureSource"; + case PRD: return "product"; + case SBJ: return "subject"; + case SPC: return "specimen"; + case IND: return "indirect target"; + case BEN: return "beneficiary"; + case CAGNT: return "causative agent"; + case COV: return "coverage target"; + case GUAR: return "guarantor party"; + case HLD: return "holder"; + case RCT: return "record target"; + case RCV: return "receiver"; + case IRCP: return "information recipient"; + case NOT: return "ugent notification contact"; + case PRCP: return "primary information recipient"; + case REFB: return "Referred By"; + case REFT: return "Referred to"; + case TRC: return "tracker"; + case LOC: return "location"; + case DST: return "destination"; + case ELOC: return "entry location"; + case ORG: return "origin"; + case RML: return "remote"; + case VIA: return "via"; + case PRF: return "performer"; + case DIST: return "distributor"; + case PPRF: return "primary performer"; + case SPRF: return "secondary performer"; + case RESP: return "responsible party"; + case VRF: return "verifier"; + case AUTHEN: return "authenticator"; + case LA: return "legal authenticator"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationTypeEnumFactory.java new file mode 100644 index 00000000000..a1dc9491287 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ParticipationTypeEnumFactory.java @@ -0,0 +1,295 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ParticipationTypeEnumFactory implements EnumFactory { + + public V3ParticipationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PART".equals(codeString)) + return V3ParticipationType.PART; + if ("_ParticipationAncillary".equals(codeString)) + return V3ParticipationType._PARTICIPATIONANCILLARY; + if ("ADM".equals(codeString)) + return V3ParticipationType.ADM; + if ("ATND".equals(codeString)) + return V3ParticipationType.ATND; + if ("CALLBCK".equals(codeString)) + return V3ParticipationType.CALLBCK; + if ("CON".equals(codeString)) + return V3ParticipationType.CON; + if ("DIS".equals(codeString)) + return V3ParticipationType.DIS; + if ("ESC".equals(codeString)) + return V3ParticipationType.ESC; + if ("REF".equals(codeString)) + return V3ParticipationType.REF; + if ("_ParticipationInformationGenerator".equals(codeString)) + return V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR; + if ("AUT".equals(codeString)) + return V3ParticipationType.AUT; + if ("INF".equals(codeString)) + return V3ParticipationType.INF; + if ("TRANS".equals(codeString)) + return V3ParticipationType.TRANS; + if ("ENT".equals(codeString)) + return V3ParticipationType.ENT; + if ("WIT".equals(codeString)) + return V3ParticipationType.WIT; + if ("CST".equals(codeString)) + return V3ParticipationType.CST; + if ("DIR".equals(codeString)) + return V3ParticipationType.DIR; + if ("ALY".equals(codeString)) + return V3ParticipationType.ALY; + if ("BBY".equals(codeString)) + return V3ParticipationType.BBY; + if ("CAT".equals(codeString)) + return V3ParticipationType.CAT; + if ("CSM".equals(codeString)) + return V3ParticipationType.CSM; + if ("TPA".equals(codeString)) + return V3ParticipationType.TPA; + if ("DEV".equals(codeString)) + return V3ParticipationType.DEV; + if ("NRD".equals(codeString)) + return V3ParticipationType.NRD; + if ("RDV".equals(codeString)) + return V3ParticipationType.RDV; + if ("DON".equals(codeString)) + return V3ParticipationType.DON; + if ("EXPAGNT".equals(codeString)) + return V3ParticipationType.EXPAGNT; + if ("EXPART".equals(codeString)) + return V3ParticipationType.EXPART; + if ("EXPTRGT".equals(codeString)) + return V3ParticipationType.EXPTRGT; + if ("EXSRC".equals(codeString)) + return V3ParticipationType.EXSRC; + if ("PRD".equals(codeString)) + return V3ParticipationType.PRD; + if ("SBJ".equals(codeString)) + return V3ParticipationType.SBJ; + if ("SPC".equals(codeString)) + return V3ParticipationType.SPC; + if ("IND".equals(codeString)) + return V3ParticipationType.IND; + if ("BEN".equals(codeString)) + return V3ParticipationType.BEN; + if ("CAGNT".equals(codeString)) + return V3ParticipationType.CAGNT; + if ("COV".equals(codeString)) + return V3ParticipationType.COV; + if ("GUAR".equals(codeString)) + return V3ParticipationType.GUAR; + if ("HLD".equals(codeString)) + return V3ParticipationType.HLD; + if ("RCT".equals(codeString)) + return V3ParticipationType.RCT; + if ("RCV".equals(codeString)) + return V3ParticipationType.RCV; + if ("IRCP".equals(codeString)) + return V3ParticipationType.IRCP; + if ("NOT".equals(codeString)) + return V3ParticipationType.NOT; + if ("PRCP".equals(codeString)) + return V3ParticipationType.PRCP; + if ("REFB".equals(codeString)) + return V3ParticipationType.REFB; + if ("REFT".equals(codeString)) + return V3ParticipationType.REFT; + if ("TRC".equals(codeString)) + return V3ParticipationType.TRC; + if ("LOC".equals(codeString)) + return V3ParticipationType.LOC; + if ("DST".equals(codeString)) + return V3ParticipationType.DST; + if ("ELOC".equals(codeString)) + return V3ParticipationType.ELOC; + if ("ORG".equals(codeString)) + return V3ParticipationType.ORG; + if ("RML".equals(codeString)) + return V3ParticipationType.RML; + if ("VIA".equals(codeString)) + return V3ParticipationType.VIA; + if ("PRF".equals(codeString)) + return V3ParticipationType.PRF; + if ("DIST".equals(codeString)) + return V3ParticipationType.DIST; + if ("PPRF".equals(codeString)) + return V3ParticipationType.PPRF; + if ("SPRF".equals(codeString)) + return V3ParticipationType.SPRF; + if ("RESP".equals(codeString)) + return V3ParticipationType.RESP; + if ("VRF".equals(codeString)) + return V3ParticipationType.VRF; + if ("AUTHEN".equals(codeString)) + return V3ParticipationType.AUTHEN; + if ("LA".equals(codeString)) + return V3ParticipationType.LA; + throw new IllegalArgumentException("Unknown V3ParticipationType code '"+codeString+"'"); + } + + public String toCode(V3ParticipationType code) { + if (code == V3ParticipationType.PART) + return "PART"; + if (code == V3ParticipationType._PARTICIPATIONANCILLARY) + return "_ParticipationAncillary"; + if (code == V3ParticipationType.ADM) + return "ADM"; + if (code == V3ParticipationType.ATND) + return "ATND"; + if (code == V3ParticipationType.CALLBCK) + return "CALLBCK"; + if (code == V3ParticipationType.CON) + return "CON"; + if (code == V3ParticipationType.DIS) + return "DIS"; + if (code == V3ParticipationType.ESC) + return "ESC"; + if (code == V3ParticipationType.REF) + return "REF"; + if (code == V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR) + return "_ParticipationInformationGenerator"; + if (code == V3ParticipationType.AUT) + return "AUT"; + if (code == V3ParticipationType.INF) + return "INF"; + if (code == V3ParticipationType.TRANS) + return "TRANS"; + if (code == V3ParticipationType.ENT) + return "ENT"; + if (code == V3ParticipationType.WIT) + return "WIT"; + if (code == V3ParticipationType.CST) + return "CST"; + if (code == V3ParticipationType.DIR) + return "DIR"; + if (code == V3ParticipationType.ALY) + return "ALY"; + if (code == V3ParticipationType.BBY) + return "BBY"; + if (code == V3ParticipationType.CAT) + return "CAT"; + if (code == V3ParticipationType.CSM) + return "CSM"; + if (code == V3ParticipationType.TPA) + return "TPA"; + if (code == V3ParticipationType.DEV) + return "DEV"; + if (code == V3ParticipationType.NRD) + return "NRD"; + if (code == V3ParticipationType.RDV) + return "RDV"; + if (code == V3ParticipationType.DON) + return "DON"; + if (code == V3ParticipationType.EXPAGNT) + return "EXPAGNT"; + if (code == V3ParticipationType.EXPART) + return "EXPART"; + if (code == V3ParticipationType.EXPTRGT) + return "EXPTRGT"; + if (code == V3ParticipationType.EXSRC) + return "EXSRC"; + if (code == V3ParticipationType.PRD) + return "PRD"; + if (code == V3ParticipationType.SBJ) + return "SBJ"; + if (code == V3ParticipationType.SPC) + return "SPC"; + if (code == V3ParticipationType.IND) + return "IND"; + if (code == V3ParticipationType.BEN) + return "BEN"; + if (code == V3ParticipationType.CAGNT) + return "CAGNT"; + if (code == V3ParticipationType.COV) + return "COV"; + if (code == V3ParticipationType.GUAR) + return "GUAR"; + if (code == V3ParticipationType.HLD) + return "HLD"; + if (code == V3ParticipationType.RCT) + return "RCT"; + if (code == V3ParticipationType.RCV) + return "RCV"; + if (code == V3ParticipationType.IRCP) + return "IRCP"; + if (code == V3ParticipationType.NOT) + return "NOT"; + if (code == V3ParticipationType.PRCP) + return "PRCP"; + if (code == V3ParticipationType.REFB) + return "REFB"; + if (code == V3ParticipationType.REFT) + return "REFT"; + if (code == V3ParticipationType.TRC) + return "TRC"; + if (code == V3ParticipationType.LOC) + return "LOC"; + if (code == V3ParticipationType.DST) + return "DST"; + if (code == V3ParticipationType.ELOC) + return "ELOC"; + if (code == V3ParticipationType.ORG) + return "ORG"; + if (code == V3ParticipationType.RML) + return "RML"; + if (code == V3ParticipationType.VIA) + return "VIA"; + if (code == V3ParticipationType.PRF) + return "PRF"; + if (code == V3ParticipationType.DIST) + return "DIST"; + if (code == V3ParticipationType.PPRF) + return "PPRF"; + if (code == V3ParticipationType.SPRF) + return "SPRF"; + if (code == V3ParticipationType.RESP) + return "RESP"; + if (code == V3ParticipationType.VRF) + return "VRF"; + if (code == V3ParticipationType.AUTHEN) + return "AUTHEN"; + if (code == V3ParticipationType.LA) + return "LA"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportance.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportance.java new file mode 100644 index 00000000000..4d87b00980d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportance.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PatientImportance { + + /** + * Board member of health care organization + */ + BM, + /** + * Family member of staff physician + */ + DFM, + /** + * Member of the health care organization physician staff + */ + DR, + /** + * Financial donor to the health care organization + */ + FD, + /** + * Foreign citizen dignitary of interest to the health care organization + */ + FOR, + /** + * Government dignitary of interest to the organization + */ + GOVT, + /** + * Family member of staff member + */ + SFM, + /** + * Staff member of the health care organization + */ + STF, + /** + * Very important person of interest to the health care organization + */ + VIP, + /** + * added to help the parsers + */ + NULL; + public static V3PatientImportance fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BM".equals(codeString)) + return BM; + if ("DFM".equals(codeString)) + return DFM; + if ("DR".equals(codeString)) + return DR; + if ("FD".equals(codeString)) + return FD; + if ("FOR".equals(codeString)) + return FOR; + if ("GOVT".equals(codeString)) + return GOVT; + if ("SFM".equals(codeString)) + return SFM; + if ("STF".equals(codeString)) + return STF; + if ("VIP".equals(codeString)) + return VIP; + throw new FHIRException("Unknown V3PatientImportance code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BM: return "BM"; + case DFM: return "DFM"; + case DR: return "DR"; + case FD: return "FD"; + case FOR: return "FOR"; + case GOVT: return "GOVT"; + case SFM: return "SFM"; + case STF: return "STF"; + case VIP: return "VIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PatientImportance"; + } + public String getDefinition() { + switch (this) { + case BM: return "Board member of health care organization"; + case DFM: return "Family member of staff physician"; + case DR: return "Member of the health care organization physician staff"; + case FD: return "Financial donor to the health care organization"; + case FOR: return "Foreign citizen dignitary of interest to the health care organization"; + case GOVT: return "Government dignitary of interest to the organization"; + case SFM: return "Family member of staff member"; + case STF: return "Staff member of the health care organization"; + case VIP: return "Very important person of interest to the health care organization"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BM: return "Board Member"; + case DFM: return "Physician Family Member"; + case DR: return "Staff Physician"; + case FD: return "Financial Donor"; + case FOR: return "Foreign Dignitary"; + case GOVT: return "Government Dignitary"; + case SFM: return "Staff Family Member"; + case STF: return "Staff Member"; + case VIP: return "Very Important Person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportanceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportanceEnumFactory.java new file mode 100644 index 00000000000..fca950b58ea --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PatientImportanceEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3PatientImportanceEnumFactory implements EnumFactory { + + public V3PatientImportance fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BM".equals(codeString)) + return V3PatientImportance.BM; + if ("DFM".equals(codeString)) + return V3PatientImportance.DFM; + if ("DR".equals(codeString)) + return V3PatientImportance.DR; + if ("FD".equals(codeString)) + return V3PatientImportance.FD; + if ("FOR".equals(codeString)) + return V3PatientImportance.FOR; + if ("GOVT".equals(codeString)) + return V3PatientImportance.GOVT; + if ("SFM".equals(codeString)) + return V3PatientImportance.SFM; + if ("STF".equals(codeString)) + return V3PatientImportance.STF; + if ("VIP".equals(codeString)) + return V3PatientImportance.VIP; + throw new IllegalArgumentException("Unknown V3PatientImportance code '"+codeString+"'"); + } + + public String toCode(V3PatientImportance code) { + if (code == V3PatientImportance.BM) + return "BM"; + if (code == V3PatientImportance.DFM) + return "DFM"; + if (code == V3PatientImportance.DR) + return "DR"; + if (code == V3PatientImportance.FD) + return "FD"; + if (code == V3PatientImportance.FOR) + return "FOR"; + if (code == V3PatientImportance.GOVT) + return "GOVT"; + if (code == V3PatientImportance.SFM) + return "SFM"; + if (code == V3PatientImportance.STF) + return "STF"; + if (code == V3PatientImportance.VIP) + return "VIP"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTerms.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTerms.java new file mode 100644 index 00000000000..cdd5258ad37 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTerms.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PaymentTerms { + + /** + * Payment in full for products and/or services is required as soon as the service is performed or goods delivered. + */ + COD, + /** + * Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered. + */ + N30, + /** + * Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered. + */ + N60, + /** + * Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered. + */ + N90, + /** + * added to help the parsers + */ + NULL; + public static V3PaymentTerms fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("COD".equals(codeString)) + return COD; + if ("N30".equals(codeString)) + return N30; + if ("N60".equals(codeString)) + return N60; + if ("N90".equals(codeString)) + return N90; + throw new FHIRException("Unknown V3PaymentTerms code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COD: return "COD"; + case N30: return "N30"; + case N60: return "N60"; + case N90: return "N90"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PaymentTerms"; + } + public String getDefinition() { + switch (this) { + case COD: return "Payment in full for products and/or services is required as soon as the service is performed or goods delivered."; + case N30: return "Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered."; + case N60: return "Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered."; + case N90: return "Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COD: return "Cash on Delivery"; + case N30: return "Net 30 days"; + case N60: return "Net 60 days"; + case N90: return "Net 90 days"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTermsEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTermsEnumFactory.java new file mode 100644 index 00000000000..13804e7ca43 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PaymentTermsEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3PaymentTermsEnumFactory implements EnumFactory { + + public V3PaymentTerms fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("COD".equals(codeString)) + return V3PaymentTerms.COD; + if ("N30".equals(codeString)) + return V3PaymentTerms.N30; + if ("N60".equals(codeString)) + return V3PaymentTerms.N60; + if ("N90".equals(codeString)) + return V3PaymentTerms.N90; + throw new IllegalArgumentException("Unknown V3PaymentTerms code '"+codeString+"'"); + } + + public String toCode(V3PaymentTerms code) { + if (code == V3PaymentTerms.COD) + return "COD"; + if (code == V3PaymentTerms.N30) + return "N30"; + if (code == V3PaymentTerms.N60) + return "N60"; + if (code == V3PaymentTerms.N90) + return "N90"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityType.java new file mode 100644 index 00000000000..3471484d6fa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityType.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PersonDisabilityType { + + /** + * Vision impaired + */ + _1, + /** + * Hearing impaired + */ + _2, + /** + * Speech impaired + */ + _3, + /** + * Mentally impaired + */ + _4, + /** + * Mobility impaired + */ + _5, + /** + * A crib is required to move the person + */ + CB, + /** + * Person requires crutches to ambulate + */ + CR, + /** + * A gurney is required to move the person + */ + G, + /** + * Person requires a wheelchair to be ambulatory + */ + WC, + /** + * Person requires a walker to ambulate + */ + WK, + /** + * added to help the parsers + */ + NULL; + public static V3PersonDisabilityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("CB".equals(codeString)) + return CB; + if ("CR".equals(codeString)) + return CR; + if ("G".equals(codeString)) + return G; + if ("WC".equals(codeString)) + return WC; + if ("WK".equals(codeString)) + return WK; + throw new FHIRException("Unknown V3PersonDisabilityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case CB: return "CB"; + case CR: return "CR"; + case G: return "G"; + case WC: return "WC"; + case WK: return "WK"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PersonDisabilityType"; + } + public String getDefinition() { + switch (this) { + case _1: return "Vision impaired"; + case _2: return "Hearing impaired"; + case _3: return "Speech impaired"; + case _4: return "Mentally impaired"; + case _5: return "Mobility impaired"; + case CB: return "A crib is required to move the person"; + case CR: return "Person requires crutches to ambulate"; + case G: return "A gurney is required to move the person"; + case WC: return "Person requires a wheelchair to be ambulatory"; + case WK: return "Person requires a walker to ambulate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Vision impaired"; + case _2: return "Hearing impaired"; + case _3: return "Speech impaired"; + case _4: return "Mentally impaired"; + case _5: return "Mobility impaired"; + case CB: return "Requires crib"; + case CR: return "Requires crutches"; + case G: return "Requires gurney"; + case WC: return "Requires wheelchair"; + case WK: return "Requires walker"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityTypeEnumFactory.java new file mode 100644 index 00000000000..1cb0b0e6220 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3PersonDisabilityTypeEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3PersonDisabilityTypeEnumFactory implements EnumFactory { + + public V3PersonDisabilityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return V3PersonDisabilityType._1; + if ("2".equals(codeString)) + return V3PersonDisabilityType._2; + if ("3".equals(codeString)) + return V3PersonDisabilityType._3; + if ("4".equals(codeString)) + return V3PersonDisabilityType._4; + if ("5".equals(codeString)) + return V3PersonDisabilityType._5; + if ("CB".equals(codeString)) + return V3PersonDisabilityType.CB; + if ("CR".equals(codeString)) + return V3PersonDisabilityType.CR; + if ("G".equals(codeString)) + return V3PersonDisabilityType.G; + if ("WC".equals(codeString)) + return V3PersonDisabilityType.WC; + if ("WK".equals(codeString)) + return V3PersonDisabilityType.WK; + throw new IllegalArgumentException("Unknown V3PersonDisabilityType code '"+codeString+"'"); + } + + public String toCode(V3PersonDisabilityType code) { + if (code == V3PersonDisabilityType._1) + return "1"; + if (code == V3PersonDisabilityType._2) + return "2"; + if (code == V3PersonDisabilityType._3) + return "3"; + if (code == V3PersonDisabilityType._4) + return "4"; + if (code == V3PersonDisabilityType._5) + return "5"; + if (code == V3PersonDisabilityType.CB) + return "CB"; + if (code == V3PersonDisabilityType.CR) + return "CR"; + if (code == V3PersonDisabilityType.G) + return "G"; + if (code == V3PersonDisabilityType.WC) + return "WC"; + if (code == V3PersonDisabilityType.WK) + return "WK"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionType.java new file mode 100644 index 00000000000..e4485edac19 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProbabilityDistributionType { + + /** + * The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g., occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1)). + */ + B, + /** + * Used for data that describes extinction. The exponential distribution is a special form of g-distribution where a = 1, hence, the relationship to mean m and variance s2 are m = b and s2 = b2. + */ + E, + /** + * Used to describe the quotient of two c2 random variables. The F-distribution has two parameters n1 and n2, which are the numbers of degrees of freedom of the numerator and denominator variable respectively. The relationship to mean m and variance s2 are: m = n2 / (n2 - 2) and s2 = (2 n2 (n2 + n1 - 2)) / (n1 (n2 - 2)2 (n2 - 4)). + */ + F, + /** + * The gamma-distribution used for data that is skewed and bounded to the right, i.e. where the maximum of the distribution curve is located near the origin. The g-distribution has a two parameters a and b. The relationship to mean m and variance s2 is m = a b and s2 = a b2. + */ + G, + /** + * The logarithmic normal distribution is used to transform skewed random variable X into a normally distributed random variable U = log X. The log-normal distribution can be specified with the properties mean m and standard deviation s. Note however that mean m and standard deviation s are the parameters of the raw value distribution, not the transformed parameters of the lognormal distribution that are conventionally referred to by the same letters. Those log-normal parameters mlog and slog relate to the mean m and standard deviation s of the data value through slog2 = log (s2/m2 + 1) and mlog = log m - slog2/2. + */ + LN, + /** + * This is the well-known bell-shaped normal distribution. Because of the central limit theorem, the normal distribution is the distribution of choice for an unbounded random variable that is an outcome of a combination of many stochastic processes. Even for values bounded on a single side (i.e. greater than 0) the normal distribution may be accurate enough if the mean is "far away" from the bound of the scale measured in terms of standard deviations. + */ + N, + /** + * Used to describe the quotient of a normal random variable and the square root of a c2 random variable. The t-distribution has one parameter n, the number of degrees of freedom. The relationship to mean m and variance s2 are: m = 0 and s2 = n / (n - 2) + */ + T, + /** + * The uniform distribution assigns a constant probability over the entire interval of possible outcomes, while all outcomes outside this interval are assumed to have zero probability. The width of this interval is 2s sqrt(3). Thus, the uniform distribution assigns the probability densities f(x) = sqrt(2 s sqrt(3)) to values m - s sqrt(3) >= x <= m + s sqrt(3) and f(x) = 0 otherwise. + */ + U, + /** + * Used to describe the sum of squares of random variables which occurs when a variance is estimated (rather than presumed) from the sample. The only parameter of the c2-distribution is n, so called the number of degrees of freedom (which is the number of independent parts in the sum). The c2-distribution is a special type of g-distribution with parameter a = n /2 and b = 2. Hence, m = n and s2 = 2 n. + */ + X2, + /** + * added to help the parsers + */ + NULL; + public static V3ProbabilityDistributionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("G".equals(codeString)) + return G; + if ("LN".equals(codeString)) + return LN; + if ("N".equals(codeString)) + return N; + if ("T".equals(codeString)) + return T; + if ("U".equals(codeString)) + return U; + if ("X2".equals(codeString)) + return X2; + throw new FHIRException("Unknown V3ProbabilityDistributionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case E: return "E"; + case F: return "F"; + case G: return "G"; + case LN: return "LN"; + case N: return "N"; + case T: return "T"; + case U: return "U"; + case X2: return "X2"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProbabilityDistributionType"; + } + public String getDefinition() { + switch (this) { + case B: return "The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g., occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1))."; + case E: return "Used for data that describes extinction. The exponential distribution is a special form of g-distribution where a = 1, hence, the relationship to mean m and variance s2 are m = b and s2 = b2."; + case F: return "Used to describe the quotient of two c2 random variables. The F-distribution has two parameters n1 and n2, which are the numbers of degrees of freedom of the numerator and denominator variable respectively. The relationship to mean m and variance s2 are: m = n2 / (n2 - 2) and s2 = (2 n2 (n2 + n1 - 2)) / (n1 (n2 - 2)2 (n2 - 4))."; + case G: return "The gamma-distribution used for data that is skewed and bounded to the right, i.e. where the maximum of the distribution curve is located near the origin. The g-distribution has a two parameters a and b. The relationship to mean m and variance s2 is m = a b and s2 = a b2."; + case LN: return "The logarithmic normal distribution is used to transform skewed random variable X into a normally distributed random variable U = log X. The log-normal distribution can be specified with the properties mean m and standard deviation s. Note however that mean m and standard deviation s are the parameters of the raw value distribution, not the transformed parameters of the lognormal distribution that are conventionally referred to by the same letters. Those log-normal parameters mlog and slog relate to the mean m and standard deviation s of the data value through slog2 = log (s2/m2 + 1) and mlog = log m - slog2/2."; + case N: return "This is the well-known bell-shaped normal distribution. Because of the central limit theorem, the normal distribution is the distribution of choice for an unbounded random variable that is an outcome of a combination of many stochastic processes. Even for values bounded on a single side (i.e. greater than 0) the normal distribution may be accurate enough if the mean is \"far away\" from the bound of the scale measured in terms of standard deviations."; + case T: return "Used to describe the quotient of a normal random variable and the square root of a c2 random variable. The t-distribution has one parameter n, the number of degrees of freedom. The relationship to mean m and variance s2 are: m = 0 and s2 = n / (n - 2)"; + case U: return "The uniform distribution assigns a constant probability over the entire interval of possible outcomes, while all outcomes outside this interval are assumed to have zero probability. The width of this interval is 2s sqrt(3). Thus, the uniform distribution assigns the probability densities f(x) = sqrt(2 s sqrt(3)) to values m - s sqrt(3) >= x <= m + s sqrt(3) and f(x) = 0 otherwise."; + case X2: return "Used to describe the sum of squares of random variables which occurs when a variance is estimated (rather than presumed) from the sample. The only parameter of the c2-distribution is n, so called the number of degrees of freedom (which is the number of independent parts in the sum). The c2-distribution is a special type of g-distribution with parameter a = n /2 and b = 2. Hence, m = n and s2 = 2 n."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "beta"; + case E: return "exponential"; + case F: return "F"; + case G: return "(gamma)"; + case LN: return "log-normal"; + case N: return "normal (Gaussian)"; + case T: return "T"; + case U: return "uniform"; + case X2: return "chi square"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionTypeEnumFactory.java new file mode 100644 index 00000000000..1c4d55f567c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProbabilityDistributionTypeEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ProbabilityDistributionTypeEnumFactory implements EnumFactory { + + public V3ProbabilityDistributionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ProbabilityDistributionType.B; + if ("E".equals(codeString)) + return V3ProbabilityDistributionType.E; + if ("F".equals(codeString)) + return V3ProbabilityDistributionType.F; + if ("G".equals(codeString)) + return V3ProbabilityDistributionType.G; + if ("LN".equals(codeString)) + return V3ProbabilityDistributionType.LN; + if ("N".equals(codeString)) + return V3ProbabilityDistributionType.N; + if ("T".equals(codeString)) + return V3ProbabilityDistributionType.T; + if ("U".equals(codeString)) + return V3ProbabilityDistributionType.U; + if ("X2".equals(codeString)) + return V3ProbabilityDistributionType.X2; + throw new IllegalArgumentException("Unknown V3ProbabilityDistributionType code '"+codeString+"'"); + } + + public String toCode(V3ProbabilityDistributionType code) { + if (code == V3ProbabilityDistributionType.B) + return "B"; + if (code == V3ProbabilityDistributionType.E) + return "E"; + if (code == V3ProbabilityDistributionType.F) + return "F"; + if (code == V3ProbabilityDistributionType.G) + return "G"; + if (code == V3ProbabilityDistributionType.LN) + return "LN"; + if (code == V3ProbabilityDistributionType.N) + return "N"; + if (code == V3ProbabilityDistributionType.T) + return "T"; + if (code == V3ProbabilityDistributionType.U) + return "U"; + if (code == V3ProbabilityDistributionType.X2) + return "X2"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingID.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingID.java new file mode 100644 index 00000000000..fbed7716c91 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingID.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProcessingID { + + /** + * Identifies debugging type of processing. + */ + D, + /** + * Identifies production type of processing. + */ + P, + /** + * Identifies training type of processing. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ProcessingID fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("P".equals(codeString)) + return P; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ProcessingID code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case P: return "P"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProcessingID"; + } + public String getDefinition() { + switch (this) { + case D: return "Identifies debugging type of processing."; + case P: return "Identifies production type of processing."; + case T: return "Identifies training type of processing."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "Debugging"; + case P: return "Production"; + case T: return "Training"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingIDEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingIDEnumFactory.java new file mode 100644 index 00000000000..9e2c08adc1c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingIDEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ProcessingIDEnumFactory implements EnumFactory { + + public V3ProcessingID fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ProcessingID.D; + if ("P".equals(codeString)) + return V3ProcessingID.P; + if ("T".equals(codeString)) + return V3ProcessingID.T; + throw new IllegalArgumentException("Unknown V3ProcessingID code '"+codeString+"'"); + } + + public String toCode(V3ProcessingID code) { + if (code == V3ProcessingID.D) + return "D"; + if (code == V3ProcessingID.P) + return "P"; + if (code == V3ProcessingID.T) + return "T"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingMode.java new file mode 100644 index 00000000000..62d1c29c421 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProcessingMode { + + /** + * Identifies archive mode of processing. + */ + A, + /** + * Identifies initial load mode of processing. + */ + I, + /** + * Identifies restore mode of processing. + */ + R, + /** + * Identifies on-line mode of processing. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ProcessingMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("I".equals(codeString)) + return I; + if ("R".equals(codeString)) + return R; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ProcessingMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case I: return "I"; + case R: return "R"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProcessingMode"; + } + public String getDefinition() { + switch (this) { + case A: return "Identifies archive mode of processing."; + case I: return "Identifies initial load mode of processing."; + case R: return "Identifies restore mode of processing."; + case T: return "Identifies on-line mode of processing."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Archive"; + case I: return "Initial load"; + case R: return "Restore from archive"; + case T: return "Current processing"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingModeEnumFactory.java new file mode 100644 index 00000000000..87b5b2d4584 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ProcessingModeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ProcessingModeEnumFactory implements EnumFactory { + + public V3ProcessingMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3ProcessingMode.A; + if ("I".equals(codeString)) + return V3ProcessingMode.I; + if ("R".equals(codeString)) + return V3ProcessingMode.R; + if ("T".equals(codeString)) + return V3ProcessingMode.T; + throw new IllegalArgumentException("Unknown V3ProcessingMode code '"+codeString+"'"); + } + + public String toCode(V3ProcessingMode code) { + if (code == V3ProcessingMode.A) + return "A"; + if (code == V3ProcessingMode.I) + return "I"; + if (code == V3ProcessingMode.R) + return "R"; + if (code == V3ProcessingMode.T) + return "T"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValue.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValue.java new file mode 100644 index 00000000000..ff578920af6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValue.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryParameterValue { + + /** + * Description:Filter codes used to manage volume of dispenses returned by a parameter-based queries. + */ + _DISPENSEQUERYFILTERCODE, + /** + * Description:Returns all dispenses to date for a prescription. + */ + ALLDISP, + /** + * Description:Returns the most recent dispense for a prescription. + */ + LASTDISP, + /** + * Description:Returns no dispense for a prescription. + */ + NODISP, + /** + * Filter codes used to manage types of orders being returned by a parameter-based query. + */ + _ORDERFILTERCODE, + /** + * Return all orders. + */ + AO, + /** + * Return only those orders that do not have results. + */ + ONR, + /** + * Return only those orders that have results. + */ + OWR, + /** + * A "helper" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed. + */ + _PRESCRIPTIONDISPENSEFILTERCODE, + /** + * Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed. + */ + C, + /** + * Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed. + */ + N, + /** + * Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized. + */ + R, + /** + * Description:Indicates how result sets should be filtered based on whether they have associated issues. + */ + _QUERYPARAMETERVALUE, + /** + * Description:Result set should not be filtered based on the presence of issues. + */ + ISSFA, + /** + * Description:Result set should be filtered to only include records with associated issues. + */ + ISSFI, + /** + * Description:Result set should be filtered to only include records with associated unmanaged issues. + */ + ISSFU, + /** + * added to help the parsers + */ + NULL; + public static V3QueryParameterValue fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DispenseQueryFilterCode".equals(codeString)) + return _DISPENSEQUERYFILTERCODE; + if ("ALLDISP".equals(codeString)) + return ALLDISP; + if ("LASTDISP".equals(codeString)) + return LASTDISP; + if ("NODISP".equals(codeString)) + return NODISP; + if ("_OrderFilterCode".equals(codeString)) + return _ORDERFILTERCODE; + if ("AO".equals(codeString)) + return AO; + if ("ONR".equals(codeString)) + return ONR; + if ("OWR".equals(codeString)) + return OWR; + if ("_PrescriptionDispenseFilterCode".equals(codeString)) + return _PRESCRIPTIONDISPENSEFILTERCODE; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("_QueryParameterValue".equals(codeString)) + return _QUERYPARAMETERVALUE; + if ("ISSFA".equals(codeString)) + return ISSFA; + if ("ISSFI".equals(codeString)) + return ISSFI; + if ("ISSFU".equals(codeString)) + return ISSFU; + throw new FHIRException("Unknown V3QueryParameterValue code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "_DispenseQueryFilterCode"; + case ALLDISP: return "ALLDISP"; + case LASTDISP: return "LASTDISP"; + case NODISP: return "NODISP"; + case _ORDERFILTERCODE: return "_OrderFilterCode"; + case AO: return "AO"; + case ONR: return "ONR"; + case OWR: return "OWR"; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "_PrescriptionDispenseFilterCode"; + case C: return "C"; + case N: return "N"; + case R: return "R"; + case _QUERYPARAMETERVALUE: return "_QueryParameterValue"; + case ISSFA: return "ISSFA"; + case ISSFI: return "ISSFI"; + case ISSFU: return "ISSFU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryParameterValue"; + } + public String getDefinition() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "Description:Filter codes used to manage volume of dispenses returned by a parameter-based queries."; + case ALLDISP: return "Description:Returns all dispenses to date for a prescription."; + case LASTDISP: return "Description:Returns the most recent dispense for a prescription."; + case NODISP: return "Description:Returns no dispense for a prescription."; + case _ORDERFILTERCODE: return "Filter codes used to manage types of orders being returned by a parameter-based query."; + case AO: return "Return all orders."; + case ONR: return "Return only those orders that do not have results."; + case OWR: return "Return only those orders that have results."; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "A \"helper\" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed."; + case C: return "Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed."; + case N: return "Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed."; + case R: return "Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized."; + case _QUERYPARAMETERVALUE: return "Description:Indicates how result sets should be filtered based on whether they have associated issues."; + case ISSFA: return "Description:Result set should not be filtered based on the presence of issues."; + case ISSFI: return "Description:Result set should be filtered to only include records with associated issues."; + case ISSFU: return "Description:Result set should be filtered to only include records with associated unmanaged issues."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "dispense query filter code"; + case ALLDISP: return "all dispenses"; + case LASTDISP: return "last dispense"; + case NODISP: return "no dispense"; + case _ORDERFILTERCODE: return "_OrderFilterCode"; + case AO: return "all orders"; + case ONR: return "orders without results"; + case OWR: return "orders with results"; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "Prescription Dispense Filter Code"; + case C: return "Completely dispensed"; + case N: return "Never Dispensed"; + case R: return "Dispensed with remaining fills"; + case _QUERYPARAMETERVALUE: return "QueryParameterValue"; + case ISSFA: return "all"; + case ISSFI: return "with issues"; + case ISSFU: return "with unmanaged issues"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValueEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValueEnumFactory.java new file mode 100644 index 00000000000..7a13db21da2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryParameterValueEnumFactory.java @@ -0,0 +1,115 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3QueryParameterValueEnumFactory implements EnumFactory { + + public V3QueryParameterValue fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DispenseQueryFilterCode".equals(codeString)) + return V3QueryParameterValue._DISPENSEQUERYFILTERCODE; + if ("ALLDISP".equals(codeString)) + return V3QueryParameterValue.ALLDISP; + if ("LASTDISP".equals(codeString)) + return V3QueryParameterValue.LASTDISP; + if ("NODISP".equals(codeString)) + return V3QueryParameterValue.NODISP; + if ("_OrderFilterCode".equals(codeString)) + return V3QueryParameterValue._ORDERFILTERCODE; + if ("AO".equals(codeString)) + return V3QueryParameterValue.AO; + if ("ONR".equals(codeString)) + return V3QueryParameterValue.ONR; + if ("OWR".equals(codeString)) + return V3QueryParameterValue.OWR; + if ("_PrescriptionDispenseFilterCode".equals(codeString)) + return V3QueryParameterValue._PRESCRIPTIONDISPENSEFILTERCODE; + if ("C".equals(codeString)) + return V3QueryParameterValue.C; + if ("N".equals(codeString)) + return V3QueryParameterValue.N; + if ("R".equals(codeString)) + return V3QueryParameterValue.R; + if ("_QueryParameterValue".equals(codeString)) + return V3QueryParameterValue._QUERYPARAMETERVALUE; + if ("ISSFA".equals(codeString)) + return V3QueryParameterValue.ISSFA; + if ("ISSFI".equals(codeString)) + return V3QueryParameterValue.ISSFI; + if ("ISSFU".equals(codeString)) + return V3QueryParameterValue.ISSFU; + throw new IllegalArgumentException("Unknown V3QueryParameterValue code '"+codeString+"'"); + } + + public String toCode(V3QueryParameterValue code) { + if (code == V3QueryParameterValue._DISPENSEQUERYFILTERCODE) + return "_DispenseQueryFilterCode"; + if (code == V3QueryParameterValue.ALLDISP) + return "ALLDISP"; + if (code == V3QueryParameterValue.LASTDISP) + return "LASTDISP"; + if (code == V3QueryParameterValue.NODISP) + return "NODISP"; + if (code == V3QueryParameterValue._ORDERFILTERCODE) + return "_OrderFilterCode"; + if (code == V3QueryParameterValue.AO) + return "AO"; + if (code == V3QueryParameterValue.ONR) + return "ONR"; + if (code == V3QueryParameterValue.OWR) + return "OWR"; + if (code == V3QueryParameterValue._PRESCRIPTIONDISPENSEFILTERCODE) + return "_PrescriptionDispenseFilterCode"; + if (code == V3QueryParameterValue.C) + return "C"; + if (code == V3QueryParameterValue.N) + return "N"; + if (code == V3QueryParameterValue.R) + return "R"; + if (code == V3QueryParameterValue._QUERYPARAMETERVALUE) + return "_QueryParameterValue"; + if (code == V3QueryParameterValue.ISSFA) + return "ISSFA"; + if (code == V3QueryParameterValue.ISSFI) + return "ISSFI"; + if (code == V3QueryParameterValue.ISSFU) + return "ISSFU"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriority.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriority.java new file mode 100644 index 00000000000..d7487d3d3b6 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriority.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryPriority { + + /** + * Query response is deferred. + */ + D, + /** + * Query response is immediate. + */ + I, + /** + * added to help the parsers + */ + NULL; + public static V3QueryPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + throw new FHIRException("Unknown V3QueryPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case I: return "I"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryPriority"; + } + public String getDefinition() { + switch (this) { + case D: return "Query response is deferred."; + case I: return "Query response is immediate."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "Deferred"; + case I: return "Immediate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriorityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriorityEnumFactory.java new file mode 100644 index 00000000000..95714b9e3c1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryPriorityEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3QueryPriorityEnumFactory implements EnumFactory { + + public V3QueryPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3QueryPriority.D; + if ("I".equals(codeString)) + return V3QueryPriority.I; + throw new IllegalArgumentException("Unknown V3QueryPriority code '"+codeString+"'"); + } + + public String toCode(V3QueryPriority code) { + if (code == V3QueryPriority.D) + return "D"; + if (code == V3QueryPriority.I) + return "I"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimit.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimit.java new file mode 100644 index 00000000000..7152256bc99 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimit.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryRequestLimit { + + /** + * Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document. + */ + _QUERYREQUESTLIMIT, + /** + * Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document. + */ + RD, + /** + * added to help the parsers + */ + NULL; + public static V3QueryRequestLimit fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_QueryRequestLimit".equals(codeString)) + return _QUERYREQUESTLIMIT; + if ("RD".equals(codeString)) + return RD; + throw new FHIRException("Unknown V3QueryRequestLimit code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _QUERYREQUESTLIMIT: return "_QueryRequestLimit"; + case RD: return "RD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryRequestLimit"; + } + public String getDefinition() { + switch (this) { + case _QUERYREQUESTLIMIT: return "Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document."; + case RD: return "Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _QUERYREQUESTLIMIT: return "QueryRequestLimit"; + case RD: return "record"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimitEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimitEnumFactory.java new file mode 100644 index 00000000000..f73212767bf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryRequestLimitEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3QueryRequestLimitEnumFactory implements EnumFactory { + + public V3QueryRequestLimit fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_QueryRequestLimit".equals(codeString)) + return V3QueryRequestLimit._QUERYREQUESTLIMIT; + if ("RD".equals(codeString)) + return V3QueryRequestLimit.RD; + throw new IllegalArgumentException("Unknown V3QueryRequestLimit code '"+codeString+"'"); + } + + public String toCode(V3QueryRequestLimit code) { + if (code == V3QueryRequestLimit._QUERYREQUESTLIMIT) + return "_QueryRequestLimit"; + if (code == V3QueryRequestLimit.RD) + return "RD"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponse.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponse.java new file mode 100644 index 00000000000..22019d552a7 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponse.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryResponse { + + /** + * Query Error. Application Error. + */ + AE, + /** + * No errors, but no data was found matching the query request specification. + */ + NF, + /** + * Query reponse data found for 1 or more result sets matching the query request specification. + */ + OK, + /** + * QueryError. Problem with input ParmetersError + */ + QE, + /** + * added to help the parsers + */ + NULL; + public static V3QueryResponse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AE".equals(codeString)) + return AE; + if ("NF".equals(codeString)) + return NF; + if ("OK".equals(codeString)) + return OK; + if ("QE".equals(codeString)) + return QE; + throw new FHIRException("Unknown V3QueryResponse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AE: return "AE"; + case NF: return "NF"; + case OK: return "OK"; + case QE: return "QE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryResponse"; + } + public String getDefinition() { + switch (this) { + case AE: return "Query Error. Application Error."; + case NF: return "No errors, but no data was found matching the query request specification."; + case OK: return "Query reponse data found for 1 or more result sets matching the query request specification."; + case QE: return "QueryError. Problem with input ParmetersError"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AE: return "ApplicationError"; + case NF: return "No data found"; + case OK: return "Data found"; + case QE: return "QueryParameterError"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponseEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponseEnumFactory.java new file mode 100644 index 00000000000..59155ba0673 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryResponseEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3QueryResponseEnumFactory implements EnumFactory { + + public V3QueryResponse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AE".equals(codeString)) + return V3QueryResponse.AE; + if ("NF".equals(codeString)) + return V3QueryResponse.NF; + if ("OK".equals(codeString)) + return V3QueryResponse.OK; + if ("QE".equals(codeString)) + return V3QueryResponse.QE; + throw new IllegalArgumentException("Unknown V3QueryResponse code '"+codeString+"'"); + } + + public String toCode(V3QueryResponse code) { + if (code == V3QueryResponse.AE) + return "AE"; + if (code == V3QueryResponse.NF) + return "NF"; + if (code == V3QueryResponse.OK) + return "OK"; + if (code == V3QueryResponse.QE) + return "QE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCode.java new file mode 100644 index 00000000000..5268c4c8b28 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryStatusCode { + + /** + * Query status aborted + */ + ABORTED, + /** + * Query Status delivered response + */ + DELIVEREDRESPONSE, + /** + * Query Status executing + */ + EXECUTING, + /** + * Query Status new + */ + NEW, + /** + * Query Status wait continued + */ + WAITCONTINUEDQUERYRESPONSE, + /** + * added to help the parsers + */ + NULL; + public static V3QueryStatusCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aborted".equals(codeString)) + return ABORTED; + if ("deliveredResponse".equals(codeString)) + return DELIVEREDRESPONSE; + if ("executing".equals(codeString)) + return EXECUTING; + if ("new".equals(codeString)) + return NEW; + if ("waitContinuedQueryResponse".equals(codeString)) + return WAITCONTINUEDQUERYRESPONSE; + throw new FHIRException("Unknown V3QueryStatusCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ABORTED: return "aborted"; + case DELIVEREDRESPONSE: return "deliveredResponse"; + case EXECUTING: return "executing"; + case NEW: return "new"; + case WAITCONTINUEDQUERYRESPONSE: return "waitContinuedQueryResponse"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryStatusCode"; + } + public String getDefinition() { + switch (this) { + case ABORTED: return "Query status aborted"; + case DELIVEREDRESPONSE: return "Query Status delivered response"; + case EXECUTING: return "Query Status executing"; + case NEW: return "Query Status new"; + case WAITCONTINUEDQUERYRESPONSE: return "Query Status wait continued"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ABORTED: return "aborted"; + case DELIVEREDRESPONSE: return "deliveredResponse"; + case EXECUTING: return "executing"; + case NEW: return "new"; + case WAITCONTINUEDQUERYRESPONSE: return "waitContinuedQueryResponse"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCodeEnumFactory.java new file mode 100644 index 00000000000..fa4b0fd551e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3QueryStatusCodeEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3QueryStatusCodeEnumFactory implements EnumFactory { + + public V3QueryStatusCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aborted".equals(codeString)) + return V3QueryStatusCode.ABORTED; + if ("deliveredResponse".equals(codeString)) + return V3QueryStatusCode.DELIVEREDRESPONSE; + if ("executing".equals(codeString)) + return V3QueryStatusCode.EXECUTING; + if ("new".equals(codeString)) + return V3QueryStatusCode.NEW; + if ("waitContinuedQueryResponse".equals(codeString)) + return V3QueryStatusCode.WAITCONTINUEDQUERYRESPONSE; + throw new IllegalArgumentException("Unknown V3QueryStatusCode code '"+codeString+"'"); + } + + public String toCode(V3QueryStatusCode code) { + if (code == V3QueryStatusCode.ABORTED) + return "aborted"; + if (code == V3QueryStatusCode.DELIVEREDRESPONSE) + return "deliveredResponse"; + if (code == V3QueryStatusCode.EXECUTING) + return "executing"; + if (code == V3QueryStatusCode.NEW) + return "new"; + if (code == V3QueryStatusCode.WAITCONTINUEDQUERYRESPONSE) + return "waitContinuedQueryResponse"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Race.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Race.java new file mode 100644 index 00000000000..78856c508c4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Race.java @@ -0,0 +1,8358 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Race { + + /** + * American Indian or Alaska Native + */ + _10025, + /** + * American Indian + */ + _10041, + /** + * Abenaki + */ + _10066, + /** + * Algonquian + */ + _10082, + /** + * Apache + */ + _10108, + /** + * Chiricahua + */ + _10116, + /** + * Fort Sill Apache + */ + _10124, + /** + * Jicarilla Apache + */ + _10132, + /** + * Lipan Apache + */ + _10140, + /** + * Mescalero Apache + */ + _10157, + /** + * Oklahoma Apache + */ + _10165, + /** + * Payson Apache + */ + _10173, + /** + * San Carlos Apache + */ + _10181, + /** + * White Mountain Apache + */ + _10199, + /** + * Arapaho + */ + _10215, + /** + * Northern Arapaho + */ + _10223, + /** + * Southern Arapaho + */ + _10231, + /** + * Wind River Arapaho + */ + _10249, + /** + * Arikara + */ + _10264, + /** + * Assiniboine + */ + _10280, + /** + * Assiniboine Sioux + */ + _10306, + /** + * Fort Peck Assiniboine Sioux + */ + _10314, + /** + * Bannock + */ + _10330, + /** + * Blackfeet + */ + _10355, + /** + * Brotherton + */ + _10371, + /** + * Burt Lake Band + */ + _10397, + /** + * Caddo + */ + _10413, + /** + * Oklahoma Cado + */ + _10421, + /** + * Cahuilla + */ + _10447, + /** + * Agua Caliente Cahuilla + */ + _10454, + /** + * Augustine + */ + _10462, + /** + * Cabazon + */ + _10470, + /** + * Los Coyotes + */ + _10488, + /** + * Morongo + */ + _10496, + /** + * Santa Rosa Cahuilla + */ + _10504, + /** + * Torres-Martinez + */ + _10512, + /** + * California Tribes + */ + _10538, + /** + * Cahto + */ + _10546, + /** + * Chimariko + */ + _10553, + /** + * Coast Miwok + */ + _10561, + /** + * Digger + */ + _10579, + /** + * Kawaiisu + */ + _10587, + /** + * Kern River + */ + _10595, + /** + * Mattole + */ + _10603, + /** + * Red Wood + */ + _10611, + /** + * Santa Rosa + */ + _10629, + /** + * Takelma + */ + _10637, + /** + * Wappo + */ + _10645, + /** + * Yana + */ + _10652, + /** + * Yuki + */ + _10660, + /** + * Canadian and Latin American Indian + */ + _10686, + /** + * Canadian Indian + */ + _10694, + /** + * Central American Indian + */ + _10702, + /** + * French American Indian + */ + _10710, + /** + * Mexican American Indian + */ + _10728, + /** + * South American Indian + */ + _10736, + /** + * Spanish American Indian + */ + _10744, + /** + * Catawba + */ + _10769, + /** + * Alatna + */ + _17418, + /** + * Alexander + */ + _17426, + /** + * Allakaket + */ + _17434, + /** + * Alanvik + */ + _17442, + /** + * Anvik + */ + _17459, + /** + * Arctic + */ + _17467, + /** + * Beaver + */ + _17475, + /** + * Birch Creek + */ + _17483, + /** + * Cantwell + */ + _17491, + /** + * Chalkyitsik + */ + _17509, + /** + * Chickaloon + */ + _17517, + /** + * Chistochina + */ + _17525, + /** + * Chitina + */ + _17533, + /** + * Circle + */ + _17541, + /** + * Cook Inlet + */ + _17558, + /** + * Copper Center + */ + _17566, + /** + * Copper River + */ + _17574, + /** + * Dot Lake + */ + _17582, + /** + * Doyon + */ + _17590, + /** + * Eagle + */ + _17608, + /** + * Eklutna + */ + _17616, + /** + * Evansville + */ + _17624, + /** + * Fort Yukon + */ + _17632, + /** + * Gakona + */ + _17640, + /** + * Galena + */ + _17657, + /** + * Grayling + */ + _17665, + /** + * Gulkana + */ + _17673, + /** + * Healy Lake + */ + _17681, + /** + * Holy Cross + */ + _17699, + /** + * Hughes + */ + _17707, + /** + * Huslia + */ + _17715, + /** + * Iliamna + */ + _17723, + /** + * Kaltag + */ + _17731, + /** + * Kluti Kaah + */ + _17749, + /** + * Knik + */ + _17756, + /** + * Koyukuk + */ + _17764, + /** + * Lake Minchumina + */ + _17772, + /** + * Lime + */ + _17780, + /** + * Mcgrath + */ + _17798, + /** + * Manley Hot Springs + */ + _17806, + /** + * Mentasta Lake + */ + _17814, + /** + * Minto + */ + _17822, + /** + * Nenana + */ + _17830, + /** + * Nikolai + */ + _17848, + /** + * Ninilchik + */ + _17855, + /** + * Nondalton + */ + _17863, + /** + * Northway + */ + _17871, + /** + * Nulato + */ + _17889, + /** + * Pedro Bay + */ + _17897, + /** + * Rampart + */ + _17905, + /** + * Ruby + */ + _17913, + /** + * Salamatof + */ + _17921, + /** + * Seldovia + */ + _17939, + /** + * Slana + */ + _17947, + /** + * Shageluk + */ + _17954, + /** + * Stevens + */ + _17962, + /** + * Stony River + */ + _17970, + /** + * Takotna + */ + _17988, + /** + * Tanacross + */ + _17996, + /** + * Tanaina + */ + _18002, + /** + * Tanana + */ + _18010, + /** + * Tanana Chiefs + */ + _18028, + /** + * Tazlina + */ + _18036, + /** + * Telida + */ + _18044, + /** + * Tetlin + */ + _18051, + /** + * Tok + */ + _18069, + /** + * Tyonek + */ + _18077, + /** + * Venetie + */ + _18085, + /** + * Wiseman + */ + _18093, + /** + * Cayuse + */ + _10785, + /** + * Chehalis + */ + _10801, + /** + * Chemakuan + */ + _10827, + /** + * Hoh + */ + _10835, + /** + * Quileute + */ + _10843, + /** + * Chemehuevi + */ + _10868, + /** + * Cherokee + */ + _10884, + /** + * Cherokee Alabama + */ + _10892, + /** + * Cherokees of Northeast Alabama + */ + _10900, + /** + * Cherokees of Southeast Alabama + */ + _10918, + /** + * Eastern Cherokee + */ + _10926, + /** + * Echota Cherokee + */ + _10934, + /** + * Etowah Cherokee + */ + _10942, + /** + * Northern Cherokee + */ + _10959, + /** + * Tuscola + */ + _10967, + /** + * United Keetowah Band of Cherokee + */ + _10975, + /** + * Western Cherokee + */ + _10983, + /** + * Cherokee Shawnee + */ + _11007, + /** + * Cheyenne + */ + _11023, + /** + * Northern Cheyenne + */ + _11031, + /** + * Southern Cheyenne + */ + _11049, + /** + * Cheyenne-Arapaho + */ + _11064, + /** + * Chickahominy + */ + _11080, + /** + * Eastern Chickahominy + */ + _11098, + /** + * Western Chickahominy + */ + _11106, + /** + * Chickasaw + */ + _11122, + /** + * Chinook + */ + _11148, + /** + * Clatsop + */ + _11155, + /** + * Columbia River Chinook + */ + _11163, + /** + * Kathlamet + */ + _11171, + /** + * Upper Chinook + */ + _11189, + /** + * Wakiakum Chinook + */ + _11197, + /** + * Willapa Chinook + */ + _11205, + /** + * Wishram + */ + _11213, + /** + * Chippewa + */ + _11239, + /** + * Bad River + */ + _11247, + /** + * Bay Mills Chippewa + */ + _11254, + /** + * Bois Forte + */ + _11262, + /** + * Burt Lake Chippewa + */ + _11270, + /** + * Fond du Lac + */ + _11288, + /** + * Grand Portage + */ + _11296, + /** + * Grand Traverse Band of Ottawa-Chippewa + */ + _11304, + /** + * Keweenaw + */ + _11312, + /** + * Lac Courte Oreilles + */ + _11320, + /** + * Lac du Flambeau + */ + _11338, + /** + * Lac Vieux Desert Chippewa + */ + _11346, + /** + * Lake Superior + */ + _11353, + /** + * Leech Lake + */ + _11361, + /** + * Little Shell Chippewa + */ + _11379, + /** + * Mille Lacs + */ + _11387, + /** + * Minnesota Chippewa + */ + _11395, + /** + * Ontonagon + */ + _11403, + /** + * Red Cliff Chippewa + */ + _11411, + /** + * Red Lake Chippewa + */ + _11429, + /** + * Saginaw Chippewa + */ + _11437, + /** + * St. Croix Chippewa + */ + _11445, + /** + * Sault Ste. Marie Chippewa + */ + _11452, + /** + * Sokoagon Chippewa + */ + _11460, + /** + * Turtle Mountain + */ + _11478, + /** + * White Earth + */ + _11486, + /** + * Chippewa Cree + */ + _11502, + /** + * Rocky Boy's Chippewa Cree + */ + _11510, + /** + * Chitimacha + */ + _11536, + /** + * Choctaw + */ + _11551, + /** + * Clifton Choctaw + */ + _11569, + /** + * Jena Choctaw + */ + _11577, + /** + * Mississippi Choctaw + */ + _11585, + /** + * Mowa Band of Choctaw + */ + _11593, + /** + * Oklahoma Choctaw + */ + _11601, + /** + * Chumash + */ + _11627, + /** + * Santa Ynez + */ + _11635, + /** + * Clear Lake + */ + _11650, + /** + * Coeur D'Alene + */ + _11676, + /** + * Coharie + */ + _11692, + /** + * Colorado River + */ + _11718, + /** + * Colville + */ + _11734, + /** + * Comanche + */ + _11759, + /** + * Oklahoma Comanche + */ + _11767, + /** + * Coos, Lower Umpqua, Siuslaw + */ + _11783, + /** + * Coos + */ + _11809, + /** + * Coquilles + */ + _11825, + /** + * Costanoan + */ + _11841, + /** + * Coushatta + */ + _11866, + /** + * Alabama Coushatta + */ + _11874, + /** + * Cowlitz + */ + _11890, + /** + * Cree + */ + _11916, + /** + * Creek + */ + _11932, + /** + * Alabama Creek + */ + _11940, + /** + * Alabama Quassarte + */ + _11957, + /** + * Eastern Creek + */ + _11965, + /** + * Eastern Muscogee + */ + _11973, + /** + * Kialegee + */ + _11981, + /** + * Lower Muscogee + */ + _11999, + /** + * Machis Lower Creek Indian + */ + _12005, + /** + * Poarch Band + */ + _12013, + /** + * Principal Creek Indian Nation + */ + _12021, + /** + * Star Clan of Muscogee Creeks + */ + _12039, + /** + * Thlopthlocco + */ + _12047, + /** + * Tuckabachee + */ + _12054, + /** + * Croatan + */ + _12070, + /** + * Crow + */ + _12096, + /** + * Cupeno + */ + _12112, + /** + * Agua Caliente + */ + _12120, + /** + * Delaware + */ + _12146, + /** + * Eastern Delaware + */ + _12153, + /** + * Lenni-Lenape + */ + _12161, + /** + * Munsee + */ + _12179, + /** + * Oklahoma Delaware + */ + _12187, + /** + * Rampough Mountain + */ + _12195, + /** + * Sand Hill + */ + _12203, + /** + * Diegueno + */ + _12229, + /** + * Campo + */ + _12237, + /** + * Capitan Grande + */ + _12245, + /** + * Cuyapaipe + */ + _12252, + /** + * La Posta + */ + _12260, + /** + * Manzanita + */ + _12278, + /** + * Mesa Grande + */ + _12286, + /** + * San Pasqual + */ + _12294, + /** + * Santa Ysabel + */ + _12302, + /** + * Sycuan + */ + _12310, + /** + * Eastern Tribes + */ + _12336, + /** + * Attacapa + */ + _12344, + /** + * Biloxi + */ + _12351, + /** + * Georgetown + */ + _12369, + /** + * Moor + */ + _12377, + /** + * Nansemond + */ + _12385, + /** + * Natchez + */ + _12393, + /** + * Nausu Waiwash + */ + _12401, + /** + * Nipmuc + */ + _12419, + /** + * Paugussett + */ + _12427, + /** + * Pocomoke Acohonock + */ + _12435, + /** + * Southeastern Indians + */ + _12443, + /** + * Susquehanock + */ + _12450, + /** + * Tunica Biloxi + */ + _12468, + /** + * Waccamaw-Siousan + */ + _12476, + /** + * Wicomico + */ + _12484, + /** + * Esselen + */ + _12500, + /** + * Fort Belknap + */ + _12526, + /** + * Fort Berthold + */ + _12542, + /** + * Fort Mcdowell + */ + _12567, + /** + * Fort Hall + */ + _12583, + /** + * Gabrieleno + */ + _12609, + /** + * Grand Ronde + */ + _12625, + /** + * Gros Ventres + */ + _12641, + /** + * Atsina + */ + _12658, + /** + * Haliwa + */ + _12674, + /** + * Hidatsa + */ + _12690, + /** + * Hoopa + */ + _12716, + /** + * Trinity + */ + _12724, + /** + * Whilkut + */ + _12732, + /** + * Hoopa Extension + */ + _12757, + /** + * Houma + */ + _12773, + /** + * Inaja-Cosmit + */ + _12799, + /** + * Iowa + */ + _12815, + /** + * Iowa of Kansas-Nebraska + */ + _12823, + /** + * Iowa of Oklahoma + */ + _12831, + /** + * Iroquois + */ + _12856, + /** + * Cayuga + */ + _12864, + /** + * Mohawk + */ + _12872, + /** + * Oneida + */ + _12880, + /** + * Onondaga + */ + _12898, + /** + * Seneca + */ + _12906, + /** + * Seneca Nation + */ + _12914, + /** + * Seneca-Cayuga + */ + _12922, + /** + * Tonawanda Seneca + */ + _12930, + /** + * Tuscarora + */ + _12948, + /** + * Wyandotte + */ + _12955, + /** + * Juaneno + */ + _12971, + /** + * Kalispel + */ + _12997, + /** + * Karuk + */ + _13011, + /** + * Kaw + */ + _13037, + /** + * Kickapoo + */ + _13052, + /** + * Oklahoma Kickapoo + */ + _13060, + /** + * Texas Kickapoo + */ + _13078, + /** + * Kiowa + */ + _13094, + /** + * Oklahoma Kiowa + */ + _13102, + /** + * Klallam + */ + _13128, + /** + * Jamestown + */ + _13136, + /** + * Lower Elwha + */ + _13144, + /** + * Port Gamble Klallam + */ + _13151, + /** + * Klamath + */ + _13177, + /** + * Konkow + */ + _13193, + /** + * Kootenai + */ + _13219, + /** + * Lassik + */ + _13235, + /** + * Long Island + */ + _13250, + /** + * Matinecock + */ + _13268, + /** + * Montauk + */ + _13276, + /** + * Poospatuck + */ + _13284, + /** + * Setauket + */ + _13292, + /** + * Luiseno + */ + _13318, + /** + * La Jolla + */ + _13326, + /** + * Pala + */ + _13334, + /** + * Pauma + */ + _13342, + /** + * Pechanga + */ + _13359, + /** + * Soboba + */ + _13367, + /** + * Twenty-Nine Palms + */ + _13375, + /** + * Temecula + */ + _13383, + /** + * Lumbee + */ + _13409, + /** + * Lummi + */ + _13425, + /** + * Maidu + */ + _13441, + /** + * Mountain Maidu + */ + _13458, + /** + * Nishinam + */ + _13466, + /** + * Makah + */ + _13482, + /** + * Maliseet + */ + _13508, + /** + * Mandan + */ + _13524, + /** + * Mattaponi + */ + _13540, + /** + * Menominee + */ + _13565, + /** + * Miami + */ + _13581, + /** + * Illinois Miami + */ + _13599, + /** + * Indiana Miami + */ + _13607, + /** + * Oklahoma Miami + */ + _13615, + /** + * Miccosukee + */ + _13631, + /** + * Micmac + */ + _13656, + /** + * Aroostook + */ + _13664, + /** + * Mission Indians + */ + _13680, + /** + * Miwok + */ + _13706, + /** + * Modoc + */ + _13722, + /** + * Mohegan + */ + _13748, + /** + * Mono + */ + _13763, + /** + * Nanticoke + */ + _13789, + /** + * Narragansett + */ + _13805, + /** + * Navajo + */ + _13821, + /** + * Alamo Navajo + */ + _13839, + /** + * Canoncito Navajo + */ + _13847, + /** + * Ramah Navajo + */ + _13854, + /** + * Nez Perce + */ + _13870, + /** + * Nomalaki + */ + _13896, + /** + * Northwest Tribes + */ + _13912, + /** + * Alsea + */ + _13920, + /** + * Celilo + */ + _13938, + /** + * Columbia + */ + _13946, + /** + * Kalapuya + */ + _13953, + /** + * Molala + */ + _13961, + /** + * Talakamish + */ + _13979, + /** + * Tenino + */ + _13987, + /** + * Tillamook + */ + _13995, + /** + * Wenatchee + */ + _14001, + /** + * Yahooskin + */ + _14019, + /** + * Omaha + */ + _14035, + /** + * Oregon Athabaskan + */ + _14050, + /** + * Osage + */ + _14076, + /** + * Otoe-Missouria + */ + _14092, + /** + * Ottawa + */ + _14118, + /** + * Burt Lake Ottawa + */ + _14126, + /** + * Michigan Ottawa + */ + _14134, + /** + * Oklahoma Ottawa + */ + _14142, + /** + * Paiute + */ + _14167, + /** + * Bishop + */ + _14175, + /** + * Bridgeport + */ + _14183, + /** + * Burns Paiute + */ + _14191, + /** + * Cedarville + */ + _14209, + /** + * Fort Bidwell + */ + _14217, + /** + * Fort Independence + */ + _14225, + /** + * Kaibab + */ + _14233, + /** + * Las Vegas + */ + _14241, + /** + * Lone Pine + */ + _14258, + /** + * Lovelock + */ + _14266, + /** + * Malheur Paiute + */ + _14274, + /** + * Moapa + */ + _14282, + /** + * Northern Paiute + */ + _14290, + /** + * Owens Valley + */ + _14308, + /** + * Pyramid Lake + */ + _14316, + /** + * San Juan Southern Paiute + */ + _14324, + /** + * Southern Paiute + */ + _14332, + /** + * Summit Lake + */ + _14340, + /** + * Utu Utu Gwaitu Paiute + */ + _14357, + /** + * Walker River + */ + _14365, + /** + * Yerington Paiute + */ + _14373, + /** + * Pamunkey + */ + _14399, + /** + * Passamaquoddy + */ + _14415, + /** + * Indian Township + */ + _14423, + /** + * Pleasant Point Passamaquoddy + */ + _14431, + /** + * Pawnee + */ + _14456, + /** + * Oklahoma Pawnee + */ + _14464, + /** + * Penobscot + */ + _14480, + /** + * Peoria + */ + _14506, + /** + * Oklahoma Peoria + */ + _14514, + /** + * Pequot + */ + _14530, + /** + * Marshantucket Pequot + */ + _14548, + /** + * Pima + */ + _14563, + /** + * Gila River Pima-Maricopa + */ + _14571, + /** + * Salt River Pima-Maricopa + */ + _14589, + /** + * Piscataway + */ + _14605, + /** + * Pit River + */ + _14621, + /** + * Pomo + */ + _14647, + /** + * Central Pomo + */ + _14654, + /** + * Dry Creek + */ + _14662, + /** + * Eastern Pomo + */ + _14670, + /** + * Kashia + */ + _14688, + /** + * Northern Pomo + */ + _14696, + /** + * Scotts Valley + */ + _14704, + /** + * Stonyford + */ + _14712, + /** + * Sulphur Bank + */ + _14720, + /** + * Ponca + */ + _14746, + /** + * Nebraska Ponca + */ + _14753, + /** + * Oklahoma Ponca + */ + _14761, + /** + * Potawatomi + */ + _14787, + /** + * Citizen Band Potawatomi + */ + _14795, + /** + * Forest County + */ + _14803, + /** + * Hannahville + */ + _14811, + /** + * Huron Potawatomi + */ + _14829, + /** + * Pokagon Potawatomi + */ + _14837, + /** + * Prairie Band + */ + _14845, + /** + * Wisconsin Potawatomi + */ + _14852, + /** + * Powhatan + */ + _14878, + /** + * Pueblo + */ + _14894, + /** + * Acoma + */ + _14902, + /** + * Arizona Tewa + */ + _14910, + /** + * Cochiti + */ + _14928, + /** + * Hopi + */ + _14936, + /** + * Isleta + */ + _14944, + /** + * Jemez + */ + _14951, + /** + * Keres + */ + _14969, + /** + * Laguna + */ + _14977, + /** + * Nambe + */ + _14985, + /** + * Picuris + */ + _14993, + /** + * Piro + */ + _15008, + /** + * Pojoaque + */ + _15016, + /** + * San Felipe + */ + _15024, + /** + * San Ildefonso + */ + _15032, + /** + * San Juan Pueblo + */ + _15040, + /** + * San Juan De + */ + _15057, + /** + * San Juan + */ + _15065, + /** + * Sandia + */ + _15073, + /** + * Santa Ana + */ + _15081, + /** + * Santa Clara + */ + _15099, + /** + * Santo Domingo + */ + _15107, + /** + * Taos + */ + _15115, + /** + * Tesuque + */ + _15123, + /** + * Tewa + */ + _15131, + /** + * Tigua + */ + _15149, + /** + * Zia + */ + _15156, + /** + * Zuni + */ + _15164, + /** + * Puget Sound Salish + */ + _15180, + /** + * Duwamish + */ + _15198, + /** + * Kikiallus + */ + _15206, + /** + * Lower Skagit + */ + _15214, + /** + * Muckleshoot + */ + _15222, + /** + * Nisqually + */ + _15230, + /** + * Nooksack + */ + _15248, + /** + * Port Madison + */ + _15255, + /** + * Puyallup + */ + _15263, + /** + * Samish + */ + _15271, + /** + * Sauk-Suiattle + */ + _15289, + /** + * Skokomish + */ + _15297, + /** + * Skykomish + */ + _15305, + /** + * Snohomish + */ + _15313, + /** + * Snoqualmie + */ + _15321, + /** + * Squaxin Island + */ + _15339, + /** + * Steilacoom + */ + _15347, + /** + * Stillaguamish + */ + _15354, + /** + * Suquamish + */ + _15362, + /** + * Swinomish + */ + _15370, + /** + * Tulalip + */ + _15388, + /** + * Upper Skagit + */ + _15396, + /** + * Quapaw + */ + _15412, + /** + * Quinault + */ + _15438, + /** + * Rappahannock + */ + _15453, + /** + * Reno-Sparks + */ + _15479, + /** + * Round Valley + */ + _15495, + /** + * Sac and Fox + */ + _15511, + /** + * Iowa Sac and Fox + */ + _15529, + /** + * Missouri Sac and Fox + */ + _15537, + /** + * Oklahoma Sac and Fox + */ + _15545, + /** + * Salinan + */ + _15560, + /** + * Salish + */ + _15586, + /** + * Salish and Kootenai + */ + _15602, + /** + * Schaghticoke + */ + _15628, + /** + * Scott Valley + */ + _15644, + /** + * Seminole + */ + _15669, + /** + * Big Cypress + */ + _15677, + /** + * Brighton + */ + _15685, + /** + * Florida Seminole + */ + _15693, + /** + * Hollywood Seminole + */ + _15701, + /** + * Oklahoma Seminole + */ + _15719, + /** + * Serrano + */ + _15735, + /** + * San Manual + */ + _15743, + /** + * Shasta + */ + _15768, + /** + * Shawnee + */ + _15784, + /** + * Absentee Shawnee + */ + _15792, + /** + * Eastern Shawnee + */ + _15800, + /** + * Shinnecock + */ + _15826, + /** + * Shoalwater Bay + */ + _15842, + /** + * Shoshone + */ + _15867, + /** + * Battle Mountain + */ + _15875, + /** + * Duckwater + */ + _15883, + /** + * Elko + */ + _15891, + /** + * Ely + */ + _15909, + /** + * Goshute + */ + _15917, + /** + * Panamint + */ + _15925, + /** + * Ruby Valley + */ + _15933, + /** + * Skull Valley + */ + _15941, + /** + * South Fork Shoshone + */ + _15958, + /** + * Te-Moak Western Shoshone + */ + _15966, + /** + * Timbi-Sha Shoshone + */ + _15974, + /** + * Washakie + */ + _15982, + /** + * Wind River Shoshone + */ + _15990, + /** + * Yomba + */ + _16006, + /** + * Shoshone Paiute + */ + _16022, + /** + * Duck Valley + */ + _16030, + /** + * Fallon + */ + _16048, + /** + * Fort McDermitt + */ + _16055, + /** + * Siletz + */ + _16071, + /** + * Sioux + */ + _16097, + /** + * Blackfoot Sioux + */ + _16105, + /** + * Brule Sioux + */ + _16113, + /** + * Cheyenne River Sioux + */ + _16121, + /** + * Crow Creek Sioux + */ + _16139, + /** + * Dakota Sioux + */ + _16147, + /** + * Flandreau Santee + */ + _16154, + /** + * Fort Peck + */ + _16162, + /** + * Lake Traverse Sioux + */ + _16170, + /** + * Lower Brule Sioux + */ + _16188, + /** + * Lower Sioux + */ + _16196, + /** + * Mdewakanton Sioux + */ + _16204, + /** + * Miniconjou + */ + _16212, + /** + * Oglala Sioux + */ + _16220, + /** + * Pine Ridge Sioux + */ + _16238, + /** + * Pipestone Sioux + */ + _16246, + /** + * Prairie Island Sioux + */ + _16253, + /** + * Prior Lake Sioux + */ + _16261, + /** + * Rosebud Sioux + */ + _16279, + /** + * Sans Arc Sioux + */ + _16287, + /** + * Santee Sioux + */ + _16295, + /** + * Sisseton-Wahpeton + */ + _16303, + /** + * Sisseton Sioux + */ + _16311, + /** + * Spirit Lake Sioux + */ + _16329, + /** + * Standing Rock Sioux + */ + _16337, + /** + * Teton Sioux + */ + _16345, + /** + * Two Kettle Sioux + */ + _16352, + /** + * Upper Sioux + */ + _16360, + /** + * Wahpekute Sioux + */ + _16378, + /** + * Wahpeton Sioux + */ + _16386, + /** + * Wazhaza Sioux + */ + _16394, + /** + * Yankton Sioux + */ + _16402, + /** + * Yanktonai Sioux + */ + _16410, + /** + * Siuslaw + */ + _16436, + /** + * Spokane + */ + _16451, + /** + * Stewart + */ + _16477, + /** + * Stockbridge + */ + _16493, + /** + * Susanville + */ + _16519, + /** + * Tohono O'Odham + */ + _16535, + /** + * Ak-Chin + */ + _16543, + /** + * Gila Bend + */ + _16550, + /** + * San Xavier + */ + _16568, + /** + * Sells + */ + _16576, + /** + * Tolowa + */ + _16592, + /** + * Tonkawa + */ + _16618, + /** + * Tygh + */ + _16634, + /** + * Umatilla + */ + _16659, + /** + * Umpqua + */ + _16675, + /** + * Cow Creek Umpqua + */ + _16683, + /** + * Ute + */ + _16709, + /** + * Allen Canyon + */ + _16717, + /** + * Uintah Ute + */ + _16725, + /** + * Ute Mountain Ute + */ + _16733, + /** + * Wailaki + */ + _16758, + /** + * Walla-Walla + */ + _16774, + /** + * Wampanoag + */ + _16790, + /** + * Gay Head Wampanoag + */ + _16808, + /** + * Mashpee Wampanoag + */ + _16816, + /** + * Warm Springs + */ + _16832, + /** + * Wascopum + */ + _16857, + /** + * Washoe + */ + _16873, + /** + * Alpine + */ + _16881, + /** + * Carson + */ + _16899, + /** + * Dresslerville + */ + _16907, + /** + * Wichita + */ + _16923, + /** + * Wind River + */ + _16949, + /** + * Winnebago + */ + _16964, + /** + * Ho-chunk + */ + _16972, + /** + * Nebraska Winnebago + */ + _16980, + /** + * Winnemucca + */ + _17004, + /** + * Wintun + */ + _17020, + /** + * Wiyot + */ + _17046, + /** + * Table Bluff + */ + _17053, + /** + * Yakama + */ + _17079, + /** + * Yakama Cowlitz + */ + _17095, + /** + * Yaqui + */ + _17111, + /** + * Barrio Libre + */ + _17129, + /** + * Pascua Yaqui + */ + _17137, + /** + * Yavapai Apache + */ + _17152, + /** + * Yokuts + */ + _17178, + /** + * Chukchansi + */ + _17186, + /** + * Tachi + */ + _17194, + /** + * Tule River + */ + _17202, + /** + * Yuchi + */ + _17228, + /** + * Yuman + */ + _17244, + /** + * Cocopah + */ + _17251, + /** + * Havasupai + */ + _17269, + /** + * Hualapai + */ + _17277, + /** + * Maricopa + */ + _17285, + /** + * Mohave + */ + _17293, + /** + * Quechan + */ + _17301, + /** + * Yavapai + */ + _17319, + /** + * Yurok + */ + _17327, + /** + * Coast Yurok + */ + _17335, + /** + * Alaska Native + */ + _17350, + /** + * Alaska Indian + */ + _17376, + /** + * Alaskan Athabascan + */ + _17392, + /** + * Ahtna + */ + _17400, + /** + * Southeast Alaska + */ + _18119, + /** + * Tlingit-Haida + */ + _18135, + /** + * Angoon + */ + _18143, + /** + * Central Council of Tlingit and Haida Tribes + */ + _18150, + /** + * Chilkat + */ + _18168, + /** + * Chilkoot + */ + _18176, + /** + * Craig + */ + _18184, + /** + * Douglas + */ + _18192, + /** + * Haida + */ + _18200, + /** + * Hoonah + */ + _18218, + /** + * Hydaburg + */ + _18226, + /** + * Kake + */ + _18234, + /** + * Kasaan + */ + _18242, + /** + * Kenaitze + */ + _18259, + /** + * Ketchikan + */ + _18267, + /** + * Klawock + */ + _18275, + /** + * Pelican + */ + _18283, + /** + * Petersburg + */ + _18291, + /** + * Saxman + */ + _18309, + /** + * Sitka + */ + _18317, + /** + * Tenakee Springs + */ + _18325, + /** + * Tlingit + */ + _18333, + /** + * Wrangell + */ + _18341, + /** + * Yakutat + */ + _18358, + /** + * Tsimshian + */ + _18374, + /** + * Metlakatla + */ + _18382, + /** + * Eskimo + */ + _18408, + /** + * Greenland Eskimo + */ + _18424, + /** + * Inupiat Eskimo + */ + _18440, + /** + * Ambler + */ + _18457, + /** + * Anaktuvuk + */ + _18465, + /** + * Anaktuvuk Pass + */ + _18473, + /** + * Arctic Slope Inupiat + */ + _18481, + /** + * Arctic Slope Corporation + */ + _18499, + /** + * Atqasuk + */ + _18507, + /** + * Barrow + */ + _18515, + /** + * Bering Straits Inupiat + */ + _18523, + /** + * Brevig Mission + */ + _18531, + /** + * Buckland + */ + _18549, + /** + * Chinik + */ + _18556, + /** + * Council + */ + _18564, + /** + * Deering + */ + _18572, + /** + * Elim + */ + _18580, + /** + * Golovin + */ + _18598, + /** + * Inalik Diomede + */ + _18606, + /** + * Inupiaq + */ + _18614, + /** + * Kaktovik + */ + _18622, + /** + * Kawerak + */ + _18630, + /** + * Kiana + */ + _18648, + /** + * Kivalina + */ + _18655, + /** + * Kobuk + */ + _18663, + /** + * Kotzebue + */ + _18671, + /** + * Koyuk + */ + _18689, + /** + * Kwiguk + */ + _18697, + /** + * Mauneluk Inupiat + */ + _18705, + /** + * Nana Inupiat + */ + _18713, + /** + * Noatak + */ + _18721, + /** + * Nome + */ + _18739, + /** + * Noorvik + */ + _18747, + /** + * Nuiqsut + */ + _18754, + /** + * Point Hope + */ + _18762, + /** + * Point Lay + */ + _18770, + /** + * Selawik + */ + _18788, + /** + * Shaktoolik + */ + _18796, + /** + * Shishmaref + */ + _18804, + /** + * Shungnak + */ + _18812, + /** + * Solomon + */ + _18820, + /** + * Teller + */ + _18838, + /** + * Unalakleet + */ + _18846, + /** + * Wainwright + */ + _18853, + /** + * Wales + */ + _18861, + /** + * White Mountain + */ + _18879, + /** + * White Mountain Inupiat + */ + _18887, + /** + * Mary's Igloo + */ + _18895, + /** + * Siberian Eskimo + */ + _18911, + /** + * Gambell + */ + _18929, + /** + * Savoonga + */ + _18937, + /** + * Siberian Yupik + */ + _18945, + /** + * Yupik Eskimo + */ + _18960, + /** + * Akiachak + */ + _18978, + /** + * Akiak + */ + _18986, + /** + * Alakanuk + */ + _18994, + /** + * Aleknagik + */ + _19000, + /** + * Andreafsky + */ + _19018, + /** + * Aniak + */ + _19026, + /** + * Atmautluak + */ + _19034, + /** + * Bethel + */ + _19042, + /** + * Bill Moore's Slough + */ + _19059, + /** + * Bristol Bay Yupik + */ + _19067, + /** + * Calista Yupik + */ + _19075, + /** + * Chefornak + */ + _19083, + /** + * Chevak + */ + _19091, + /** + * Chuathbaluk + */ + _19109, + /** + * Clark's Point + */ + _19117, + /** + * Crooked Creek + */ + _19125, + /** + * Dillingham + */ + _19133, + /** + * Eek + */ + _19141, + /** + * Ekuk + */ + _19158, + /** + * Ekwok + */ + _19166, + /** + * Emmonak + */ + _19174, + /** + * Goodnews Bay + */ + _19182, + /** + * Hooper Bay + */ + _19190, + /** + * Iqurmuit (Russian Mission) + */ + _19208, + /** + * Kalskag + */ + _19216, + /** + * Kasigluk + */ + _19224, + /** + * Kipnuk + */ + _19232, + /** + * Koliganek + */ + _19240, + /** + * Kongiganak + */ + _19257, + /** + * Kotlik + */ + _19265, + /** + * Kwethluk + */ + _19273, + /** + * Kwigillingok + */ + _19281, + /** + * Levelock + */ + _19299, + /** + * Lower Kalskag + */ + _19307, + /** + * Manokotak + */ + _19315, + /** + * Marshall + */ + _19323, + /** + * Mekoryuk + */ + _19331, + /** + * Mountain Village + */ + _19349, + /** + * Naknek + */ + _19356, + /** + * Napaumute + */ + _19364, + /** + * Napakiak + */ + _19372, + /** + * Napaskiak + */ + _19380, + /** + * Newhalen + */ + _19398, + /** + * New Stuyahok + */ + _19406, + /** + * Newtok + */ + _19414, + /** + * Nightmute + */ + _19422, + /** + * Nunapitchukv + */ + _19430, + /** + * Oscarville + */ + _19448, + /** + * Pilot Station + */ + _19455, + /** + * Pitkas Point + */ + _19463, + /** + * Platinum + */ + _19471, + /** + * Portage Creek + */ + _19489, + /** + * Quinhagak + */ + _19497, + /** + * Red Devil + */ + _19505, + /** + * St. Michael + */ + _19513, + /** + * Scammon Bay + */ + _19521, + /** + * Sheldon's Point + */ + _19539, + /** + * Sleetmute + */ + _19547, + /** + * Stebbins + */ + _19554, + /** + * Togiak + */ + _19562, + /** + * Toksook + */ + _19570, + /** + * Tulukskak + */ + _19588, + /** + * Tuntutuliak + */ + _19596, + /** + * Tununak + */ + _19604, + /** + * Twin Hills + */ + _19612, + /** + * Georgetown + */ + _19620, + /** + * St. Mary's + */ + _19638, + /** + * Umkumiate + */ + _19646, + /** + * Aleut + */ + _19661, + /** + * Alutiiq Aleut + */ + _19687, + /** + * Tatitlek + */ + _19695, + /** + * Ugashik + */ + _19703, + /** + * Bristol Bay Aleut + */ + _19729, + /** + * Chignik + */ + _19737, + /** + * Chignik Lake + */ + _19745, + /** + * Egegik + */ + _19752, + /** + * Igiugig + */ + _19760, + /** + * Ivanof Bay + */ + _19778, + /** + * King Salmon + */ + _19786, + /** + * Kokhanok + */ + _19794, + /** + * Perryville + */ + _19802, + /** + * Pilot Point + */ + _19810, + /** + * Port Heiden + */ + _19828, + /** + * Chugach Aleut + */ + _19844, + /** + * Chenega + */ + _19851, + /** + * Chugach Corporation + */ + _19869, + /** + * English Bay + */ + _19877, + /** + * Port Graham + */ + _19885, + /** + * Eyak + */ + _19901, + /** + * Koniag Aleut + */ + _19927, + /** + * Akhiok + */ + _19935, + /** + * Agdaagux + */ + _19943, + /** + * Karluk + */ + _19950, + /** + * Kodiak + */ + _19968, + /** + * Larsen Bay + */ + _19976, + /** + * Old Harbor + */ + _19984, + /** + * Ouzinkie + */ + _19992, + /** + * Port Lions + */ + _20008, + /** + * Sugpiaq + */ + _20024, + /** + * Suqpigaq + */ + _20040, + /** + * Unangan Aleut + */ + _20065, + /** + * Akutan + */ + _20073, + /** + * Aleut Corporation + */ + _20081, + /** + * Aleutian + */ + _20099, + /** + * Aleutian Islander + */ + _20107, + /** + * Atka + */ + _20115, + /** + * Belkofski + */ + _20123, + /** + * Chignik Lagoon + */ + _20131, + /** + * King Cove + */ + _20149, + /** + * False Pass + */ + _20156, + /** + * Nelson Lagoon + */ + _20164, + /** + * Nikolski + */ + _20172, + /** + * Pauloff Harbor + */ + _20180, + /** + * Qagan Toyagungin + */ + _20198, + /** + * Qawalangin + */ + _20206, + /** + * St. George + */ + _20214, + /** + * St. Paul + */ + _20222, + /** + * Sand Point + */ + _20230, + /** + * South Naknek + */ + _20248, + /** + * Unalaska + */ + _20255, + /** + * Unga + */ + _20263, + /** + * Asian + */ + _20289, + /** + * Asian Indian + */ + _20297, + /** + * Bangladeshi + */ + _20305, + /** + * Bhutanese + */ + _20313, + /** + * Burmese + */ + _20321, + /** + * Cambodian + */ + _20339, + /** + * Chinese + */ + _20347, + /** + * Taiwanese + */ + _20354, + /** + * Filipino + */ + _20362, + /** + * Hmong + */ + _20370, + /** + * Indonesian + */ + _20388, + /** + * Japanese + */ + _20396, + /** + * Korean + */ + _20404, + /** + * Laotian + */ + _20412, + /** + * Malaysian + */ + _20420, + /** + * Okinawan + */ + _20438, + /** + * Pakistani + */ + _20446, + /** + * Sri Lankan + */ + _20453, + /** + * Thai + */ + _20461, + /** + * Vietnamese + */ + _20479, + /** + * Iwo Jiman + */ + _20487, + /** + * Maldivian + */ + _20495, + /** + * Nepalese + */ + _20503, + /** + * Singaporean + */ + _20511, + /** + * Madagascar + */ + _20529, + /** + * Black or African American + */ + _20545, + /** + * Black + */ + _20560, + /** + * African American + */ + _20586, + /** + * African + */ + _20602, + /** + * Botswanan + */ + _20610, + /** + * Ethiopian + */ + _20628, + /** + * Liberian + */ + _20636, + /** + * Namibian + */ + _20644, + /** + * Nigerian + */ + _20651, + /** + * Zairean + */ + _20669, + /** + * Bahamian + */ + _20677, + /** + * Barbadian + */ + _20685, + /** + * Dominican + */ + _20693, + /** + * Dominica Islander + */ + _20701, + /** + * Haitian + */ + _20719, + /** + * Jamaican + */ + _20727, + /** + * Tobagoan + */ + _20735, + /** + * Trinidadian + */ + _20743, + /** + * West Indian + */ + _20750, + /** + * Native Hawaiian or Other Pacific Islander + */ + _20768, + /** + * Polynesian + */ + _20784, + /** + * Native Hawaiian + */ + _20792, + /** + * Samoan + */ + _20800, + /** + * Tahitian + */ + _20818, + /** + * Tongan + */ + _20826, + /** + * Tokelauan + */ + _20834, + /** + * Micronesian + */ + _20859, + /** + * Guamanian or Chamorro + */ + _20867, + /** + * Guamanian + */ + _20875, + /** + * Chamorro + */ + _20883, + /** + * Mariana Islander + */ + _20891, + /** + * Marshallese + */ + _20909, + /** + * Palauan + */ + _20917, + /** + * Carolinian + */ + _20925, + /** + * Kosraean + */ + _20933, + /** + * Pohnpeian + */ + _20941, + /** + * Saipanese + */ + _20958, + /** + * Kiribati + */ + _20966, + /** + * Chuukese + */ + _20974, + /** + * Yapese + */ + _20982, + /** + * Melanesian + */ + _21006, + /** + * Fijian + */ + _21014, + /** + * Papua New Guinean + */ + _21022, + /** + * Solomon Islander + */ + _21030, + /** + * New Hebrides + */ + _21048, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated. + */ + _25007, + /** + * White + */ + _21063, + /** + * European + */ + _21089, + /** + * Armenian + */ + _21097, + /** + * English + */ + _21105, + /** + * French + */ + _21113, + /** + * German + */ + _21121, + /** + * Irish + */ + _21139, + /** + * Italian + */ + _21147, + /** + * Polish + */ + _21154, + /** + * Scottish + */ + _21162, + /** + * Middle Eastern or North African + */ + _21188, + /** + * Assyrian + */ + _21196, + /** + * Egyptian + */ + _21204, + /** + * Iranian + */ + _21212, + /** + * Iraqi + */ + _21220, + /** + * Lebanese + */ + _21238, + /** + * Palestinian + */ + _21246, + /** + * Syrian + */ + _21253, + /** + * Afghanistani + */ + _21261, + /** + * Israeili + */ + _21279, + /** + * Arab + */ + _21295, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated. + */ + _21311, + /** + * added to help the parsers + */ + NULL; + public static V3Race fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1002-5".equals(codeString)) + return _10025; + if ("1004-1".equals(codeString)) + return _10041; + if ("1006-6".equals(codeString)) + return _10066; + if ("1008-2".equals(codeString)) + return _10082; + if ("1010-8".equals(codeString)) + return _10108; + if ("1011-6".equals(codeString)) + return _10116; + if ("1012-4".equals(codeString)) + return _10124; + if ("1013-2".equals(codeString)) + return _10132; + if ("1014-0".equals(codeString)) + return _10140; + if ("1015-7".equals(codeString)) + return _10157; + if ("1016-5".equals(codeString)) + return _10165; + if ("1017-3".equals(codeString)) + return _10173; + if ("1018-1".equals(codeString)) + return _10181; + if ("1019-9".equals(codeString)) + return _10199; + if ("1021-5".equals(codeString)) + return _10215; + if ("1022-3".equals(codeString)) + return _10223; + if ("1023-1".equals(codeString)) + return _10231; + if ("1024-9".equals(codeString)) + return _10249; + if ("1026-4".equals(codeString)) + return _10264; + if ("1028-0".equals(codeString)) + return _10280; + if ("1030-6".equals(codeString)) + return _10306; + if ("1031-4".equals(codeString)) + return _10314; + if ("1033-0".equals(codeString)) + return _10330; + if ("1035-5".equals(codeString)) + return _10355; + if ("1037-1".equals(codeString)) + return _10371; + if ("1039-7".equals(codeString)) + return _10397; + if ("1041-3".equals(codeString)) + return _10413; + if ("1042-1".equals(codeString)) + return _10421; + if ("1044-7".equals(codeString)) + return _10447; + if ("1045-4".equals(codeString)) + return _10454; + if ("1046-2".equals(codeString)) + return _10462; + if ("1047-0".equals(codeString)) + return _10470; + if ("1048-8".equals(codeString)) + return _10488; + if ("1049-6".equals(codeString)) + return _10496; + if ("1050-4".equals(codeString)) + return _10504; + if ("1051-2".equals(codeString)) + return _10512; + if ("1053-8".equals(codeString)) + return _10538; + if ("1054-6".equals(codeString)) + return _10546; + if ("1055-3".equals(codeString)) + return _10553; + if ("1056-1".equals(codeString)) + return _10561; + if ("1057-9".equals(codeString)) + return _10579; + if ("1058-7".equals(codeString)) + return _10587; + if ("1059-5".equals(codeString)) + return _10595; + if ("1060-3".equals(codeString)) + return _10603; + if ("1061-1".equals(codeString)) + return _10611; + if ("1062-9".equals(codeString)) + return _10629; + if ("1063-7".equals(codeString)) + return _10637; + if ("1064-5".equals(codeString)) + return _10645; + if ("1065-2".equals(codeString)) + return _10652; + if ("1066-0".equals(codeString)) + return _10660; + if ("1068-6".equals(codeString)) + return _10686; + if ("1069-4".equals(codeString)) + return _10694; + if ("1070-2".equals(codeString)) + return _10702; + if ("1071-0".equals(codeString)) + return _10710; + if ("1072-8".equals(codeString)) + return _10728; + if ("1073-6".equals(codeString)) + return _10736; + if ("1074-4".equals(codeString)) + return _10744; + if ("1076-9".equals(codeString)) + return _10769; + if ("1741-8".equals(codeString)) + return _17418; + if ("1742-6".equals(codeString)) + return _17426; + if ("1743-4".equals(codeString)) + return _17434; + if ("1744-2".equals(codeString)) + return _17442; + if ("1745-9".equals(codeString)) + return _17459; + if ("1746-7".equals(codeString)) + return _17467; + if ("1747-5".equals(codeString)) + return _17475; + if ("1748-3".equals(codeString)) + return _17483; + if ("1749-1".equals(codeString)) + return _17491; + if ("1750-9".equals(codeString)) + return _17509; + if ("1751-7".equals(codeString)) + return _17517; + if ("1752-5".equals(codeString)) + return _17525; + if ("1753-3".equals(codeString)) + return _17533; + if ("1754-1".equals(codeString)) + return _17541; + if ("1755-8".equals(codeString)) + return _17558; + if ("1756-6".equals(codeString)) + return _17566; + if ("1757-4".equals(codeString)) + return _17574; + if ("1758-2".equals(codeString)) + return _17582; + if ("1759-0".equals(codeString)) + return _17590; + if ("1760-8".equals(codeString)) + return _17608; + if ("1761-6".equals(codeString)) + return _17616; + if ("1762-4".equals(codeString)) + return _17624; + if ("1763-2".equals(codeString)) + return _17632; + if ("1764-0".equals(codeString)) + return _17640; + if ("1765-7".equals(codeString)) + return _17657; + if ("1766-5".equals(codeString)) + return _17665; + if ("1767-3".equals(codeString)) + return _17673; + if ("1768-1".equals(codeString)) + return _17681; + if ("1769-9".equals(codeString)) + return _17699; + if ("1770-7".equals(codeString)) + return _17707; + if ("1771-5".equals(codeString)) + return _17715; + if ("1772-3".equals(codeString)) + return _17723; + if ("1773-1".equals(codeString)) + return _17731; + if ("1774-9".equals(codeString)) + return _17749; + if ("1775-6".equals(codeString)) + return _17756; + if ("1776-4".equals(codeString)) + return _17764; + if ("1777-2".equals(codeString)) + return _17772; + if ("1778-0".equals(codeString)) + return _17780; + if ("1779-8".equals(codeString)) + return _17798; + if ("1780-6".equals(codeString)) + return _17806; + if ("1781-4".equals(codeString)) + return _17814; + if ("1782-2".equals(codeString)) + return _17822; + if ("1783-0".equals(codeString)) + return _17830; + if ("1784-8".equals(codeString)) + return _17848; + if ("1785-5".equals(codeString)) + return _17855; + if ("1786-3".equals(codeString)) + return _17863; + if ("1787-1".equals(codeString)) + return _17871; + if ("1788-9".equals(codeString)) + return _17889; + if ("1789-7".equals(codeString)) + return _17897; + if ("1790-5".equals(codeString)) + return _17905; + if ("1791-3".equals(codeString)) + return _17913; + if ("1792-1".equals(codeString)) + return _17921; + if ("1793-9".equals(codeString)) + return _17939; + if ("1794-7".equals(codeString)) + return _17947; + if ("1795-4".equals(codeString)) + return _17954; + if ("1796-2".equals(codeString)) + return _17962; + if ("1797-0".equals(codeString)) + return _17970; + if ("1798-8".equals(codeString)) + return _17988; + if ("1799-6".equals(codeString)) + return _17996; + if ("1800-2".equals(codeString)) + return _18002; + if ("1801-0".equals(codeString)) + return _18010; + if ("1802-8".equals(codeString)) + return _18028; + if ("1803-6".equals(codeString)) + return _18036; + if ("1804-4".equals(codeString)) + return _18044; + if ("1805-1".equals(codeString)) + return _18051; + if ("1806-9".equals(codeString)) + return _18069; + if ("1807-7".equals(codeString)) + return _18077; + if ("1808-5".equals(codeString)) + return _18085; + if ("1809-3".equals(codeString)) + return _18093; + if ("1078-5".equals(codeString)) + return _10785; + if ("1080-1".equals(codeString)) + return _10801; + if ("1082-7".equals(codeString)) + return _10827; + if ("1083-5".equals(codeString)) + return _10835; + if ("1084-3".equals(codeString)) + return _10843; + if ("1086-8".equals(codeString)) + return _10868; + if ("1088-4".equals(codeString)) + return _10884; + if ("1089-2".equals(codeString)) + return _10892; + if ("1090-0".equals(codeString)) + return _10900; + if ("1091-8".equals(codeString)) + return _10918; + if ("1092-6".equals(codeString)) + return _10926; + if ("1093-4".equals(codeString)) + return _10934; + if ("1094-2".equals(codeString)) + return _10942; + if ("1095-9".equals(codeString)) + return _10959; + if ("1096-7".equals(codeString)) + return _10967; + if ("1097-5".equals(codeString)) + return _10975; + if ("1098-3".equals(codeString)) + return _10983; + if ("1100-7".equals(codeString)) + return _11007; + if ("1102-3".equals(codeString)) + return _11023; + if ("1103-1".equals(codeString)) + return _11031; + if ("1104-9".equals(codeString)) + return _11049; + if ("1106-4".equals(codeString)) + return _11064; + if ("1108-0".equals(codeString)) + return _11080; + if ("1109-8".equals(codeString)) + return _11098; + if ("1110-6".equals(codeString)) + return _11106; + if ("1112-2".equals(codeString)) + return _11122; + if ("1114-8".equals(codeString)) + return _11148; + if ("1115-5".equals(codeString)) + return _11155; + if ("1116-3".equals(codeString)) + return _11163; + if ("1117-1".equals(codeString)) + return _11171; + if ("1118-9".equals(codeString)) + return _11189; + if ("1119-7".equals(codeString)) + return _11197; + if ("1120-5".equals(codeString)) + return _11205; + if ("1121-3".equals(codeString)) + return _11213; + if ("1123-9".equals(codeString)) + return _11239; + if ("1124-7".equals(codeString)) + return _11247; + if ("1125-4".equals(codeString)) + return _11254; + if ("1126-2".equals(codeString)) + return _11262; + if ("1127-0".equals(codeString)) + return _11270; + if ("1128-8".equals(codeString)) + return _11288; + if ("1129-6".equals(codeString)) + return _11296; + if ("1130-4".equals(codeString)) + return _11304; + if ("1131-2".equals(codeString)) + return _11312; + if ("1132-0".equals(codeString)) + return _11320; + if ("1133-8".equals(codeString)) + return _11338; + if ("1134-6".equals(codeString)) + return _11346; + if ("1135-3".equals(codeString)) + return _11353; + if ("1136-1".equals(codeString)) + return _11361; + if ("1137-9".equals(codeString)) + return _11379; + if ("1138-7".equals(codeString)) + return _11387; + if ("1139-5".equals(codeString)) + return _11395; + if ("1140-3".equals(codeString)) + return _11403; + if ("1141-1".equals(codeString)) + return _11411; + if ("1142-9".equals(codeString)) + return _11429; + if ("1143-7".equals(codeString)) + return _11437; + if ("1144-5".equals(codeString)) + return _11445; + if ("1145-2".equals(codeString)) + return _11452; + if ("1146-0".equals(codeString)) + return _11460; + if ("1147-8".equals(codeString)) + return _11478; + if ("1148-6".equals(codeString)) + return _11486; + if ("1150-2".equals(codeString)) + return _11502; + if ("1151-0".equals(codeString)) + return _11510; + if ("1153-6".equals(codeString)) + return _11536; + if ("1155-1".equals(codeString)) + return _11551; + if ("1156-9".equals(codeString)) + return _11569; + if ("1157-7".equals(codeString)) + return _11577; + if ("1158-5".equals(codeString)) + return _11585; + if ("1159-3".equals(codeString)) + return _11593; + if ("1160-1".equals(codeString)) + return _11601; + if ("1162-7".equals(codeString)) + return _11627; + if ("1163-5".equals(codeString)) + return _11635; + if ("1165-0".equals(codeString)) + return _11650; + if ("1167-6".equals(codeString)) + return _11676; + if ("1169-2".equals(codeString)) + return _11692; + if ("1171-8".equals(codeString)) + return _11718; + if ("1173-4".equals(codeString)) + return _11734; + if ("1175-9".equals(codeString)) + return _11759; + if ("1176-7".equals(codeString)) + return _11767; + if ("1178-3".equals(codeString)) + return _11783; + if ("1180-9".equals(codeString)) + return _11809; + if ("1182-5".equals(codeString)) + return _11825; + if ("1184-1".equals(codeString)) + return _11841; + if ("1186-6".equals(codeString)) + return _11866; + if ("1187-4".equals(codeString)) + return _11874; + if ("1189-0".equals(codeString)) + return _11890; + if ("1191-6".equals(codeString)) + return _11916; + if ("1193-2".equals(codeString)) + return _11932; + if ("1194-0".equals(codeString)) + return _11940; + if ("1195-7".equals(codeString)) + return _11957; + if ("1196-5".equals(codeString)) + return _11965; + if ("1197-3".equals(codeString)) + return _11973; + if ("1198-1".equals(codeString)) + return _11981; + if ("1199-9".equals(codeString)) + return _11999; + if ("1200-5".equals(codeString)) + return _12005; + if ("1201-3".equals(codeString)) + return _12013; + if ("1202-1".equals(codeString)) + return _12021; + if ("1203-9".equals(codeString)) + return _12039; + if ("1204-7".equals(codeString)) + return _12047; + if ("1205-4".equals(codeString)) + return _12054; + if ("1207-0".equals(codeString)) + return _12070; + if ("1209-6".equals(codeString)) + return _12096; + if ("1211-2".equals(codeString)) + return _12112; + if ("1212-0".equals(codeString)) + return _12120; + if ("1214-6".equals(codeString)) + return _12146; + if ("1215-3".equals(codeString)) + return _12153; + if ("1216-1".equals(codeString)) + return _12161; + if ("1217-9".equals(codeString)) + return _12179; + if ("1218-7".equals(codeString)) + return _12187; + if ("1219-5".equals(codeString)) + return _12195; + if ("1220-3".equals(codeString)) + return _12203; + if ("1222-9".equals(codeString)) + return _12229; + if ("1223-7".equals(codeString)) + return _12237; + if ("1224-5".equals(codeString)) + return _12245; + if ("1225-2".equals(codeString)) + return _12252; + if ("1226-0".equals(codeString)) + return _12260; + if ("1227-8".equals(codeString)) + return _12278; + if ("1228-6".equals(codeString)) + return _12286; + if ("1229-4".equals(codeString)) + return _12294; + if ("1230-2".equals(codeString)) + return _12302; + if ("1231-0".equals(codeString)) + return _12310; + if ("1233-6".equals(codeString)) + return _12336; + if ("1234-4".equals(codeString)) + return _12344; + if ("1235-1".equals(codeString)) + return _12351; + if ("1236-9".equals(codeString)) + return _12369; + if ("1237-7".equals(codeString)) + return _12377; + if ("1238-5".equals(codeString)) + return _12385; + if ("1239-3".equals(codeString)) + return _12393; + if ("1240-1".equals(codeString)) + return _12401; + if ("1241-9".equals(codeString)) + return _12419; + if ("1242-7".equals(codeString)) + return _12427; + if ("1243-5".equals(codeString)) + return _12435; + if ("1244-3".equals(codeString)) + return _12443; + if ("1245-0".equals(codeString)) + return _12450; + if ("1246-8".equals(codeString)) + return _12468; + if ("1247-6".equals(codeString)) + return _12476; + if ("1248-4".equals(codeString)) + return _12484; + if ("1250-0".equals(codeString)) + return _12500; + if ("1252-6".equals(codeString)) + return _12526; + if ("1254-2".equals(codeString)) + return _12542; + if ("1256-7".equals(codeString)) + return _12567; + if ("1258-3".equals(codeString)) + return _12583; + if ("1260-9".equals(codeString)) + return _12609; + if ("1262-5".equals(codeString)) + return _12625; + if ("1264-1".equals(codeString)) + return _12641; + if ("1265-8".equals(codeString)) + return _12658; + if ("1267-4".equals(codeString)) + return _12674; + if ("1269-0".equals(codeString)) + return _12690; + if ("1271-6".equals(codeString)) + return _12716; + if ("1272-4".equals(codeString)) + return _12724; + if ("1273-2".equals(codeString)) + return _12732; + if ("1275-7".equals(codeString)) + return _12757; + if ("1277-3".equals(codeString)) + return _12773; + if ("1279-9".equals(codeString)) + return _12799; + if ("1281-5".equals(codeString)) + return _12815; + if ("1282-3".equals(codeString)) + return _12823; + if ("1283-1".equals(codeString)) + return _12831; + if ("1285-6".equals(codeString)) + return _12856; + if ("1286-4".equals(codeString)) + return _12864; + if ("1287-2".equals(codeString)) + return _12872; + if ("1288-0".equals(codeString)) + return _12880; + if ("1289-8".equals(codeString)) + return _12898; + if ("1290-6".equals(codeString)) + return _12906; + if ("1291-4".equals(codeString)) + return _12914; + if ("1292-2".equals(codeString)) + return _12922; + if ("1293-0".equals(codeString)) + return _12930; + if ("1294-8".equals(codeString)) + return _12948; + if ("1295-5".equals(codeString)) + return _12955; + if ("1297-1".equals(codeString)) + return _12971; + if ("1299-7".equals(codeString)) + return _12997; + if ("1301-1".equals(codeString)) + return _13011; + if ("1303-7".equals(codeString)) + return _13037; + if ("1305-2".equals(codeString)) + return _13052; + if ("1306-0".equals(codeString)) + return _13060; + if ("1307-8".equals(codeString)) + return _13078; + if ("1309-4".equals(codeString)) + return _13094; + if ("1310-2".equals(codeString)) + return _13102; + if ("1312-8".equals(codeString)) + return _13128; + if ("1313-6".equals(codeString)) + return _13136; + if ("1314-4".equals(codeString)) + return _13144; + if ("1315-1".equals(codeString)) + return _13151; + if ("1317-7".equals(codeString)) + return _13177; + if ("1319-3".equals(codeString)) + return _13193; + if ("1321-9".equals(codeString)) + return _13219; + if ("1323-5".equals(codeString)) + return _13235; + if ("1325-0".equals(codeString)) + return _13250; + if ("1326-8".equals(codeString)) + return _13268; + if ("1327-6".equals(codeString)) + return _13276; + if ("1328-4".equals(codeString)) + return _13284; + if ("1329-2".equals(codeString)) + return _13292; + if ("1331-8".equals(codeString)) + return _13318; + if ("1332-6".equals(codeString)) + return _13326; + if ("1333-4".equals(codeString)) + return _13334; + if ("1334-2".equals(codeString)) + return _13342; + if ("1335-9".equals(codeString)) + return _13359; + if ("1336-7".equals(codeString)) + return _13367; + if ("1337-5".equals(codeString)) + return _13375; + if ("1338-3".equals(codeString)) + return _13383; + if ("1340-9".equals(codeString)) + return _13409; + if ("1342-5".equals(codeString)) + return _13425; + if ("1344-1".equals(codeString)) + return _13441; + if ("1345-8".equals(codeString)) + return _13458; + if ("1346-6".equals(codeString)) + return _13466; + if ("1348-2".equals(codeString)) + return _13482; + if ("1350-8".equals(codeString)) + return _13508; + if ("1352-4".equals(codeString)) + return _13524; + if ("1354-0".equals(codeString)) + return _13540; + if ("1356-5".equals(codeString)) + return _13565; + if ("1358-1".equals(codeString)) + return _13581; + if ("1359-9".equals(codeString)) + return _13599; + if ("1360-7".equals(codeString)) + return _13607; + if ("1361-5".equals(codeString)) + return _13615; + if ("1363-1".equals(codeString)) + return _13631; + if ("1365-6".equals(codeString)) + return _13656; + if ("1366-4".equals(codeString)) + return _13664; + if ("1368-0".equals(codeString)) + return _13680; + if ("1370-6".equals(codeString)) + return _13706; + if ("1372-2".equals(codeString)) + return _13722; + if ("1374-8".equals(codeString)) + return _13748; + if ("1376-3".equals(codeString)) + return _13763; + if ("1378-9".equals(codeString)) + return _13789; + if ("1380-5".equals(codeString)) + return _13805; + if ("1382-1".equals(codeString)) + return _13821; + if ("1383-9".equals(codeString)) + return _13839; + if ("1384-7".equals(codeString)) + return _13847; + if ("1385-4".equals(codeString)) + return _13854; + if ("1387-0".equals(codeString)) + return _13870; + if ("1389-6".equals(codeString)) + return _13896; + if ("1391-2".equals(codeString)) + return _13912; + if ("1392-0".equals(codeString)) + return _13920; + if ("1393-8".equals(codeString)) + return _13938; + if ("1394-6".equals(codeString)) + return _13946; + if ("1395-3".equals(codeString)) + return _13953; + if ("1396-1".equals(codeString)) + return _13961; + if ("1397-9".equals(codeString)) + return _13979; + if ("1398-7".equals(codeString)) + return _13987; + if ("1399-5".equals(codeString)) + return _13995; + if ("1400-1".equals(codeString)) + return _14001; + if ("1401-9".equals(codeString)) + return _14019; + if ("1403-5".equals(codeString)) + return _14035; + if ("1405-0".equals(codeString)) + return _14050; + if ("1407-6".equals(codeString)) + return _14076; + if ("1409-2".equals(codeString)) + return _14092; + if ("1411-8".equals(codeString)) + return _14118; + if ("1412-6".equals(codeString)) + return _14126; + if ("1413-4".equals(codeString)) + return _14134; + if ("1414-2".equals(codeString)) + return _14142; + if ("1416-7".equals(codeString)) + return _14167; + if ("1417-5".equals(codeString)) + return _14175; + if ("1418-3".equals(codeString)) + return _14183; + if ("1419-1".equals(codeString)) + return _14191; + if ("1420-9".equals(codeString)) + return _14209; + if ("1421-7".equals(codeString)) + return _14217; + if ("1422-5".equals(codeString)) + return _14225; + if ("1423-3".equals(codeString)) + return _14233; + if ("1424-1".equals(codeString)) + return _14241; + if ("1425-8".equals(codeString)) + return _14258; + if ("1426-6".equals(codeString)) + return _14266; + if ("1427-4".equals(codeString)) + return _14274; + if ("1428-2".equals(codeString)) + return _14282; + if ("1429-0".equals(codeString)) + return _14290; + if ("1430-8".equals(codeString)) + return _14308; + if ("1431-6".equals(codeString)) + return _14316; + if ("1432-4".equals(codeString)) + return _14324; + if ("1433-2".equals(codeString)) + return _14332; + if ("1434-0".equals(codeString)) + return _14340; + if ("1435-7".equals(codeString)) + return _14357; + if ("1436-5".equals(codeString)) + return _14365; + if ("1437-3".equals(codeString)) + return _14373; + if ("1439-9".equals(codeString)) + return _14399; + if ("1441-5".equals(codeString)) + return _14415; + if ("1442-3".equals(codeString)) + return _14423; + if ("1443-1".equals(codeString)) + return _14431; + if ("1445-6".equals(codeString)) + return _14456; + if ("1446-4".equals(codeString)) + return _14464; + if ("1448-0".equals(codeString)) + return _14480; + if ("1450-6".equals(codeString)) + return _14506; + if ("1451-4".equals(codeString)) + return _14514; + if ("1453-0".equals(codeString)) + return _14530; + if ("1454-8".equals(codeString)) + return _14548; + if ("1456-3".equals(codeString)) + return _14563; + if ("1457-1".equals(codeString)) + return _14571; + if ("1458-9".equals(codeString)) + return _14589; + if ("1460-5".equals(codeString)) + return _14605; + if ("1462-1".equals(codeString)) + return _14621; + if ("1464-7".equals(codeString)) + return _14647; + if ("1465-4".equals(codeString)) + return _14654; + if ("1466-2".equals(codeString)) + return _14662; + if ("1467-0".equals(codeString)) + return _14670; + if ("1468-8".equals(codeString)) + return _14688; + if ("1469-6".equals(codeString)) + return _14696; + if ("1470-4".equals(codeString)) + return _14704; + if ("1471-2".equals(codeString)) + return _14712; + if ("1472-0".equals(codeString)) + return _14720; + if ("1474-6".equals(codeString)) + return _14746; + if ("1475-3".equals(codeString)) + return _14753; + if ("1476-1".equals(codeString)) + return _14761; + if ("1478-7".equals(codeString)) + return _14787; + if ("1479-5".equals(codeString)) + return _14795; + if ("1480-3".equals(codeString)) + return _14803; + if ("1481-1".equals(codeString)) + return _14811; + if ("1482-9".equals(codeString)) + return _14829; + if ("1483-7".equals(codeString)) + return _14837; + if ("1484-5".equals(codeString)) + return _14845; + if ("1485-2".equals(codeString)) + return _14852; + if ("1487-8".equals(codeString)) + return _14878; + if ("1489-4".equals(codeString)) + return _14894; + if ("1490-2".equals(codeString)) + return _14902; + if ("1491-0".equals(codeString)) + return _14910; + if ("1492-8".equals(codeString)) + return _14928; + if ("1493-6".equals(codeString)) + return _14936; + if ("1494-4".equals(codeString)) + return _14944; + if ("1495-1".equals(codeString)) + return _14951; + if ("1496-9".equals(codeString)) + return _14969; + if ("1497-7".equals(codeString)) + return _14977; + if ("1498-5".equals(codeString)) + return _14985; + if ("1499-3".equals(codeString)) + return _14993; + if ("1500-8".equals(codeString)) + return _15008; + if ("1501-6".equals(codeString)) + return _15016; + if ("1502-4".equals(codeString)) + return _15024; + if ("1503-2".equals(codeString)) + return _15032; + if ("1504-0".equals(codeString)) + return _15040; + if ("1505-7".equals(codeString)) + return _15057; + if ("1506-5".equals(codeString)) + return _15065; + if ("1507-3".equals(codeString)) + return _15073; + if ("1508-1".equals(codeString)) + return _15081; + if ("1509-9".equals(codeString)) + return _15099; + if ("1510-7".equals(codeString)) + return _15107; + if ("1511-5".equals(codeString)) + return _15115; + if ("1512-3".equals(codeString)) + return _15123; + if ("1513-1".equals(codeString)) + return _15131; + if ("1514-9".equals(codeString)) + return _15149; + if ("1515-6".equals(codeString)) + return _15156; + if ("1516-4".equals(codeString)) + return _15164; + if ("1518-0".equals(codeString)) + return _15180; + if ("1519-8".equals(codeString)) + return _15198; + if ("1520-6".equals(codeString)) + return _15206; + if ("1521-4".equals(codeString)) + return _15214; + if ("1522-2".equals(codeString)) + return _15222; + if ("1523-0".equals(codeString)) + return _15230; + if ("1524-8".equals(codeString)) + return _15248; + if ("1525-5".equals(codeString)) + return _15255; + if ("1526-3".equals(codeString)) + return _15263; + if ("1527-1".equals(codeString)) + return _15271; + if ("1528-9".equals(codeString)) + return _15289; + if ("1529-7".equals(codeString)) + return _15297; + if ("1530-5".equals(codeString)) + return _15305; + if ("1531-3".equals(codeString)) + return _15313; + if ("1532-1".equals(codeString)) + return _15321; + if ("1533-9".equals(codeString)) + return _15339; + if ("1534-7".equals(codeString)) + return _15347; + if ("1535-4".equals(codeString)) + return _15354; + if ("1536-2".equals(codeString)) + return _15362; + if ("1537-0".equals(codeString)) + return _15370; + if ("1538-8".equals(codeString)) + return _15388; + if ("1539-6".equals(codeString)) + return _15396; + if ("1541-2".equals(codeString)) + return _15412; + if ("1543-8".equals(codeString)) + return _15438; + if ("1545-3".equals(codeString)) + return _15453; + if ("1547-9".equals(codeString)) + return _15479; + if ("1549-5".equals(codeString)) + return _15495; + if ("1551-1".equals(codeString)) + return _15511; + if ("1552-9".equals(codeString)) + return _15529; + if ("1553-7".equals(codeString)) + return _15537; + if ("1554-5".equals(codeString)) + return _15545; + if ("1556-0".equals(codeString)) + return _15560; + if ("1558-6".equals(codeString)) + return _15586; + if ("1560-2".equals(codeString)) + return _15602; + if ("1562-8".equals(codeString)) + return _15628; + if ("1564-4".equals(codeString)) + return _15644; + if ("1566-9".equals(codeString)) + return _15669; + if ("1567-7".equals(codeString)) + return _15677; + if ("1568-5".equals(codeString)) + return _15685; + if ("1569-3".equals(codeString)) + return _15693; + if ("1570-1".equals(codeString)) + return _15701; + if ("1571-9".equals(codeString)) + return _15719; + if ("1573-5".equals(codeString)) + return _15735; + if ("1574-3".equals(codeString)) + return _15743; + if ("1576-8".equals(codeString)) + return _15768; + if ("1578-4".equals(codeString)) + return _15784; + if ("1579-2".equals(codeString)) + return _15792; + if ("1580-0".equals(codeString)) + return _15800; + if ("1582-6".equals(codeString)) + return _15826; + if ("1584-2".equals(codeString)) + return _15842; + if ("1586-7".equals(codeString)) + return _15867; + if ("1587-5".equals(codeString)) + return _15875; + if ("1588-3".equals(codeString)) + return _15883; + if ("1589-1".equals(codeString)) + return _15891; + if ("1590-9".equals(codeString)) + return _15909; + if ("1591-7".equals(codeString)) + return _15917; + if ("1592-5".equals(codeString)) + return _15925; + if ("1593-3".equals(codeString)) + return _15933; + if ("1594-1".equals(codeString)) + return _15941; + if ("1595-8".equals(codeString)) + return _15958; + if ("1596-6".equals(codeString)) + return _15966; + if ("1597-4".equals(codeString)) + return _15974; + if ("1598-2".equals(codeString)) + return _15982; + if ("1599-0".equals(codeString)) + return _15990; + if ("1600-6".equals(codeString)) + return _16006; + if ("1602-2".equals(codeString)) + return _16022; + if ("1603-0".equals(codeString)) + return _16030; + if ("1604-8".equals(codeString)) + return _16048; + if ("1605-5".equals(codeString)) + return _16055; + if ("1607-1".equals(codeString)) + return _16071; + if ("1609-7".equals(codeString)) + return _16097; + if ("1610-5".equals(codeString)) + return _16105; + if ("1611-3".equals(codeString)) + return _16113; + if ("1612-1".equals(codeString)) + return _16121; + if ("1613-9".equals(codeString)) + return _16139; + if ("1614-7".equals(codeString)) + return _16147; + if ("1615-4".equals(codeString)) + return _16154; + if ("1616-2".equals(codeString)) + return _16162; + if ("1617-0".equals(codeString)) + return _16170; + if ("1618-8".equals(codeString)) + return _16188; + if ("1619-6".equals(codeString)) + return _16196; + if ("1620-4".equals(codeString)) + return _16204; + if ("1621-2".equals(codeString)) + return _16212; + if ("1622-0".equals(codeString)) + return _16220; + if ("1623-8".equals(codeString)) + return _16238; + if ("1624-6".equals(codeString)) + return _16246; + if ("1625-3".equals(codeString)) + return _16253; + if ("1626-1".equals(codeString)) + return _16261; + if ("1627-9".equals(codeString)) + return _16279; + if ("1628-7".equals(codeString)) + return _16287; + if ("1629-5".equals(codeString)) + return _16295; + if ("1630-3".equals(codeString)) + return _16303; + if ("1631-1".equals(codeString)) + return _16311; + if ("1632-9".equals(codeString)) + return _16329; + if ("1633-7".equals(codeString)) + return _16337; + if ("1634-5".equals(codeString)) + return _16345; + if ("1635-2".equals(codeString)) + return _16352; + if ("1636-0".equals(codeString)) + return _16360; + if ("1637-8".equals(codeString)) + return _16378; + if ("1638-6".equals(codeString)) + return _16386; + if ("1639-4".equals(codeString)) + return _16394; + if ("1640-2".equals(codeString)) + return _16402; + if ("1641-0".equals(codeString)) + return _16410; + if ("1643-6".equals(codeString)) + return _16436; + if ("1645-1".equals(codeString)) + return _16451; + if ("1647-7".equals(codeString)) + return _16477; + if ("1649-3".equals(codeString)) + return _16493; + if ("1651-9".equals(codeString)) + return _16519; + if ("1653-5".equals(codeString)) + return _16535; + if ("1654-3".equals(codeString)) + return _16543; + if ("1655-0".equals(codeString)) + return _16550; + if ("1656-8".equals(codeString)) + return _16568; + if ("1657-6".equals(codeString)) + return _16576; + if ("1659-2".equals(codeString)) + return _16592; + if ("1661-8".equals(codeString)) + return _16618; + if ("1663-4".equals(codeString)) + return _16634; + if ("1665-9".equals(codeString)) + return _16659; + if ("1667-5".equals(codeString)) + return _16675; + if ("1668-3".equals(codeString)) + return _16683; + if ("1670-9".equals(codeString)) + return _16709; + if ("1671-7".equals(codeString)) + return _16717; + if ("1672-5".equals(codeString)) + return _16725; + if ("1673-3".equals(codeString)) + return _16733; + if ("1675-8".equals(codeString)) + return _16758; + if ("1677-4".equals(codeString)) + return _16774; + if ("1679-0".equals(codeString)) + return _16790; + if ("1680-8".equals(codeString)) + return _16808; + if ("1681-6".equals(codeString)) + return _16816; + if ("1683-2".equals(codeString)) + return _16832; + if ("1685-7".equals(codeString)) + return _16857; + if ("1687-3".equals(codeString)) + return _16873; + if ("1688-1".equals(codeString)) + return _16881; + if ("1689-9".equals(codeString)) + return _16899; + if ("1690-7".equals(codeString)) + return _16907; + if ("1692-3".equals(codeString)) + return _16923; + if ("1694-9".equals(codeString)) + return _16949; + if ("1696-4".equals(codeString)) + return _16964; + if ("1697-2".equals(codeString)) + return _16972; + if ("1698-0".equals(codeString)) + return _16980; + if ("1700-4".equals(codeString)) + return _17004; + if ("1702-0".equals(codeString)) + return _17020; + if ("1704-6".equals(codeString)) + return _17046; + if ("1705-3".equals(codeString)) + return _17053; + if ("1707-9".equals(codeString)) + return _17079; + if ("1709-5".equals(codeString)) + return _17095; + if ("1711-1".equals(codeString)) + return _17111; + if ("1712-9".equals(codeString)) + return _17129; + if ("1713-7".equals(codeString)) + return _17137; + if ("1715-2".equals(codeString)) + return _17152; + if ("1717-8".equals(codeString)) + return _17178; + if ("1718-6".equals(codeString)) + return _17186; + if ("1719-4".equals(codeString)) + return _17194; + if ("1720-2".equals(codeString)) + return _17202; + if ("1722-8".equals(codeString)) + return _17228; + if ("1724-4".equals(codeString)) + return _17244; + if ("1725-1".equals(codeString)) + return _17251; + if ("1726-9".equals(codeString)) + return _17269; + if ("1727-7".equals(codeString)) + return _17277; + if ("1728-5".equals(codeString)) + return _17285; + if ("1729-3".equals(codeString)) + return _17293; + if ("1730-1".equals(codeString)) + return _17301; + if ("1731-9".equals(codeString)) + return _17319; + if ("1732-7".equals(codeString)) + return _17327; + if ("1733-5".equals(codeString)) + return _17335; + if ("1735-0".equals(codeString)) + return _17350; + if ("1737-6".equals(codeString)) + return _17376; + if ("1739-2".equals(codeString)) + return _17392; + if ("1740-0".equals(codeString)) + return _17400; + if ("1811-9".equals(codeString)) + return _18119; + if ("1813-5".equals(codeString)) + return _18135; + if ("1814-3".equals(codeString)) + return _18143; + if ("1815-0".equals(codeString)) + return _18150; + if ("1816-8".equals(codeString)) + return _18168; + if ("1817-6".equals(codeString)) + return _18176; + if ("1818-4".equals(codeString)) + return _18184; + if ("1819-2".equals(codeString)) + return _18192; + if ("1820-0".equals(codeString)) + return _18200; + if ("1821-8".equals(codeString)) + return _18218; + if ("1822-6".equals(codeString)) + return _18226; + if ("1823-4".equals(codeString)) + return _18234; + if ("1824-2".equals(codeString)) + return _18242; + if ("1825-9".equals(codeString)) + return _18259; + if ("1826-7".equals(codeString)) + return _18267; + if ("1827-5".equals(codeString)) + return _18275; + if ("1828-3".equals(codeString)) + return _18283; + if ("1829-1".equals(codeString)) + return _18291; + if ("1830-9".equals(codeString)) + return _18309; + if ("1831-7".equals(codeString)) + return _18317; + if ("1832-5".equals(codeString)) + return _18325; + if ("1833-3".equals(codeString)) + return _18333; + if ("1834-1".equals(codeString)) + return _18341; + if ("1835-8".equals(codeString)) + return _18358; + if ("1837-4".equals(codeString)) + return _18374; + if ("1838-2".equals(codeString)) + return _18382; + if ("1840-8".equals(codeString)) + return _18408; + if ("1842-4".equals(codeString)) + return _18424; + if ("1844-0".equals(codeString)) + return _18440; + if ("1845-7".equals(codeString)) + return _18457; + if ("1846-5".equals(codeString)) + return _18465; + if ("1847-3".equals(codeString)) + return _18473; + if ("1848-1".equals(codeString)) + return _18481; + if ("1849-9".equals(codeString)) + return _18499; + if ("1850-7".equals(codeString)) + return _18507; + if ("1851-5".equals(codeString)) + return _18515; + if ("1852-3".equals(codeString)) + return _18523; + if ("1853-1".equals(codeString)) + return _18531; + if ("1854-9".equals(codeString)) + return _18549; + if ("1855-6".equals(codeString)) + return _18556; + if ("1856-4".equals(codeString)) + return _18564; + if ("1857-2".equals(codeString)) + return _18572; + if ("1858-0".equals(codeString)) + return _18580; + if ("1859-8".equals(codeString)) + return _18598; + if ("1860-6".equals(codeString)) + return _18606; + if ("1861-4".equals(codeString)) + return _18614; + if ("1862-2".equals(codeString)) + return _18622; + if ("1863-0".equals(codeString)) + return _18630; + if ("1864-8".equals(codeString)) + return _18648; + if ("1865-5".equals(codeString)) + return _18655; + if ("1866-3".equals(codeString)) + return _18663; + if ("1867-1".equals(codeString)) + return _18671; + if ("1868-9".equals(codeString)) + return _18689; + if ("1869-7".equals(codeString)) + return _18697; + if ("1870-5".equals(codeString)) + return _18705; + if ("1871-3".equals(codeString)) + return _18713; + if ("1872-1".equals(codeString)) + return _18721; + if ("1873-9".equals(codeString)) + return _18739; + if ("1874-7".equals(codeString)) + return _18747; + if ("1875-4".equals(codeString)) + return _18754; + if ("1876-2".equals(codeString)) + return _18762; + if ("1877-0".equals(codeString)) + return _18770; + if ("1878-8".equals(codeString)) + return _18788; + if ("1879-6".equals(codeString)) + return _18796; + if ("1880-4".equals(codeString)) + return _18804; + if ("1881-2".equals(codeString)) + return _18812; + if ("1882-0".equals(codeString)) + return _18820; + if ("1883-8".equals(codeString)) + return _18838; + if ("1884-6".equals(codeString)) + return _18846; + if ("1885-3".equals(codeString)) + return _18853; + if ("1886-1".equals(codeString)) + return _18861; + if ("1887-9".equals(codeString)) + return _18879; + if ("1888-7".equals(codeString)) + return _18887; + if ("1889-5".equals(codeString)) + return _18895; + if ("1891-1".equals(codeString)) + return _18911; + if ("1892-9".equals(codeString)) + return _18929; + if ("1893-7".equals(codeString)) + return _18937; + if ("1894-5".equals(codeString)) + return _18945; + if ("1896-0".equals(codeString)) + return _18960; + if ("1897-8".equals(codeString)) + return _18978; + if ("1898-6".equals(codeString)) + return _18986; + if ("1899-4".equals(codeString)) + return _18994; + if ("1900-0".equals(codeString)) + return _19000; + if ("1901-8".equals(codeString)) + return _19018; + if ("1902-6".equals(codeString)) + return _19026; + if ("1903-4".equals(codeString)) + return _19034; + if ("1904-2".equals(codeString)) + return _19042; + if ("1905-9".equals(codeString)) + return _19059; + if ("1906-7".equals(codeString)) + return _19067; + if ("1907-5".equals(codeString)) + return _19075; + if ("1908-3".equals(codeString)) + return _19083; + if ("1909-1".equals(codeString)) + return _19091; + if ("1910-9".equals(codeString)) + return _19109; + if ("1911-7".equals(codeString)) + return _19117; + if ("1912-5".equals(codeString)) + return _19125; + if ("1913-3".equals(codeString)) + return _19133; + if ("1914-1".equals(codeString)) + return _19141; + if ("1915-8".equals(codeString)) + return _19158; + if ("1916-6".equals(codeString)) + return _19166; + if ("1917-4".equals(codeString)) + return _19174; + if ("1918-2".equals(codeString)) + return _19182; + if ("1919-0".equals(codeString)) + return _19190; + if ("1920-8".equals(codeString)) + return _19208; + if ("1921-6".equals(codeString)) + return _19216; + if ("1922-4".equals(codeString)) + return _19224; + if ("1923-2".equals(codeString)) + return _19232; + if ("1924-0".equals(codeString)) + return _19240; + if ("1925-7".equals(codeString)) + return _19257; + if ("1926-5".equals(codeString)) + return _19265; + if ("1927-3".equals(codeString)) + return _19273; + if ("1928-1".equals(codeString)) + return _19281; + if ("1929-9".equals(codeString)) + return _19299; + if ("1930-7".equals(codeString)) + return _19307; + if ("1931-5".equals(codeString)) + return _19315; + if ("1932-3".equals(codeString)) + return _19323; + if ("1933-1".equals(codeString)) + return _19331; + if ("1934-9".equals(codeString)) + return _19349; + if ("1935-6".equals(codeString)) + return _19356; + if ("1936-4".equals(codeString)) + return _19364; + if ("1937-2".equals(codeString)) + return _19372; + if ("1938-0".equals(codeString)) + return _19380; + if ("1939-8".equals(codeString)) + return _19398; + if ("1940-6".equals(codeString)) + return _19406; + if ("1941-4".equals(codeString)) + return _19414; + if ("1942-2".equals(codeString)) + return _19422; + if ("1943-0".equals(codeString)) + return _19430; + if ("1944-8".equals(codeString)) + return _19448; + if ("1945-5".equals(codeString)) + return _19455; + if ("1946-3".equals(codeString)) + return _19463; + if ("1947-1".equals(codeString)) + return _19471; + if ("1948-9".equals(codeString)) + return _19489; + if ("1949-7".equals(codeString)) + return _19497; + if ("1950-5".equals(codeString)) + return _19505; + if ("1951-3".equals(codeString)) + return _19513; + if ("1952-1".equals(codeString)) + return _19521; + if ("1953-9".equals(codeString)) + return _19539; + if ("1954-7".equals(codeString)) + return _19547; + if ("1955-4".equals(codeString)) + return _19554; + if ("1956-2".equals(codeString)) + return _19562; + if ("1957-0".equals(codeString)) + return _19570; + if ("1958-8".equals(codeString)) + return _19588; + if ("1959-6".equals(codeString)) + return _19596; + if ("1960-4".equals(codeString)) + return _19604; + if ("1961-2".equals(codeString)) + return _19612; + if ("1962-0".equals(codeString)) + return _19620; + if ("1963-8".equals(codeString)) + return _19638; + if ("1964-6".equals(codeString)) + return _19646; + if ("1966-1".equals(codeString)) + return _19661; + if ("1968-7".equals(codeString)) + return _19687; + if ("1969-5".equals(codeString)) + return _19695; + if ("1970-3".equals(codeString)) + return _19703; + if ("1972-9".equals(codeString)) + return _19729; + if ("1973-7".equals(codeString)) + return _19737; + if ("1974-5".equals(codeString)) + return _19745; + if ("1975-2".equals(codeString)) + return _19752; + if ("1976-0".equals(codeString)) + return _19760; + if ("1977-8".equals(codeString)) + return _19778; + if ("1978-6".equals(codeString)) + return _19786; + if ("1979-4".equals(codeString)) + return _19794; + if ("1980-2".equals(codeString)) + return _19802; + if ("1981-0".equals(codeString)) + return _19810; + if ("1982-8".equals(codeString)) + return _19828; + if ("1984-4".equals(codeString)) + return _19844; + if ("1985-1".equals(codeString)) + return _19851; + if ("1986-9".equals(codeString)) + return _19869; + if ("1987-7".equals(codeString)) + return _19877; + if ("1988-5".equals(codeString)) + return _19885; + if ("1990-1".equals(codeString)) + return _19901; + if ("1992-7".equals(codeString)) + return _19927; + if ("1993-5".equals(codeString)) + return _19935; + if ("1994-3".equals(codeString)) + return _19943; + if ("1995-0".equals(codeString)) + return _19950; + if ("1996-8".equals(codeString)) + return _19968; + if ("1997-6".equals(codeString)) + return _19976; + if ("1998-4".equals(codeString)) + return _19984; + if ("1999-2".equals(codeString)) + return _19992; + if ("2000-8".equals(codeString)) + return _20008; + if ("2002-4".equals(codeString)) + return _20024; + if ("2004-0".equals(codeString)) + return _20040; + if ("2006-5".equals(codeString)) + return _20065; + if ("2007-3".equals(codeString)) + return _20073; + if ("2008-1".equals(codeString)) + return _20081; + if ("2009-9".equals(codeString)) + return _20099; + if ("2010-7".equals(codeString)) + return _20107; + if ("2011-5".equals(codeString)) + return _20115; + if ("2012-3".equals(codeString)) + return _20123; + if ("2013-1".equals(codeString)) + return _20131; + if ("2014-9".equals(codeString)) + return _20149; + if ("2015-6".equals(codeString)) + return _20156; + if ("2016-4".equals(codeString)) + return _20164; + if ("2017-2".equals(codeString)) + return _20172; + if ("2018-0".equals(codeString)) + return _20180; + if ("2019-8".equals(codeString)) + return _20198; + if ("2020-6".equals(codeString)) + return _20206; + if ("2021-4".equals(codeString)) + return _20214; + if ("2022-2".equals(codeString)) + return _20222; + if ("2023-0".equals(codeString)) + return _20230; + if ("2024-8".equals(codeString)) + return _20248; + if ("2025-5".equals(codeString)) + return _20255; + if ("2026-3".equals(codeString)) + return _20263; + if ("2028-9".equals(codeString)) + return _20289; + if ("2029-7".equals(codeString)) + return _20297; + if ("2030-5".equals(codeString)) + return _20305; + if ("2031-3".equals(codeString)) + return _20313; + if ("2032-1".equals(codeString)) + return _20321; + if ("2033-9".equals(codeString)) + return _20339; + if ("2034-7".equals(codeString)) + return _20347; + if ("2035-4".equals(codeString)) + return _20354; + if ("2036-2".equals(codeString)) + return _20362; + if ("2037-0".equals(codeString)) + return _20370; + if ("2038-8".equals(codeString)) + return _20388; + if ("2039-6".equals(codeString)) + return _20396; + if ("2040-4".equals(codeString)) + return _20404; + if ("2041-2".equals(codeString)) + return _20412; + if ("2042-0".equals(codeString)) + return _20420; + if ("2043-8".equals(codeString)) + return _20438; + if ("2044-6".equals(codeString)) + return _20446; + if ("2045-3".equals(codeString)) + return _20453; + if ("2046-1".equals(codeString)) + return _20461; + if ("2047-9".equals(codeString)) + return _20479; + if ("2048-7".equals(codeString)) + return _20487; + if ("2049-5".equals(codeString)) + return _20495; + if ("2050-3".equals(codeString)) + return _20503; + if ("2051-1".equals(codeString)) + return _20511; + if ("2052-9".equals(codeString)) + return _20529; + if ("2054-5".equals(codeString)) + return _20545; + if ("2056-0".equals(codeString)) + return _20560; + if ("2058-6".equals(codeString)) + return _20586; + if ("2060-2".equals(codeString)) + return _20602; + if ("2061-0".equals(codeString)) + return _20610; + if ("2062-8".equals(codeString)) + return _20628; + if ("2063-6".equals(codeString)) + return _20636; + if ("2064-4".equals(codeString)) + return _20644; + if ("2065-1".equals(codeString)) + return _20651; + if ("2066-9".equals(codeString)) + return _20669; + if ("2067-7".equals(codeString)) + return _20677; + if ("2068-5".equals(codeString)) + return _20685; + if ("2069-3".equals(codeString)) + return _20693; + if ("2070-1".equals(codeString)) + return _20701; + if ("2071-9".equals(codeString)) + return _20719; + if ("2072-7".equals(codeString)) + return _20727; + if ("2073-5".equals(codeString)) + return _20735; + if ("2074-3".equals(codeString)) + return _20743; + if ("2075-0".equals(codeString)) + return _20750; + if ("2076-8".equals(codeString)) + return _20768; + if ("2078-4".equals(codeString)) + return _20784; + if ("2079-2".equals(codeString)) + return _20792; + if ("2080-0".equals(codeString)) + return _20800; + if ("2081-8".equals(codeString)) + return _20818; + if ("2082-6".equals(codeString)) + return _20826; + if ("2083-4".equals(codeString)) + return _20834; + if ("2085-9".equals(codeString)) + return _20859; + if ("2086-7".equals(codeString)) + return _20867; + if ("2087-5".equals(codeString)) + return _20875; + if ("2088-3".equals(codeString)) + return _20883; + if ("2089-1".equals(codeString)) + return _20891; + if ("2090-9".equals(codeString)) + return _20909; + if ("2091-7".equals(codeString)) + return _20917; + if ("2092-5".equals(codeString)) + return _20925; + if ("2093-3".equals(codeString)) + return _20933; + if ("2094-1".equals(codeString)) + return _20941; + if ("2095-8".equals(codeString)) + return _20958; + if ("2096-6".equals(codeString)) + return _20966; + if ("2097-4".equals(codeString)) + return _20974; + if ("2098-2".equals(codeString)) + return _20982; + if ("2100-6".equals(codeString)) + return _21006; + if ("2101-4".equals(codeString)) + return _21014; + if ("2102-2".equals(codeString)) + return _21022; + if ("2103-0".equals(codeString)) + return _21030; + if ("2104-8".equals(codeString)) + return _21048; + if ("2500-7".equals(codeString)) + return _25007; + if ("2106-3".equals(codeString)) + return _21063; + if ("2108-9".equals(codeString)) + return _21089; + if ("2109-7".equals(codeString)) + return _21097; + if ("2110-5".equals(codeString)) + return _21105; + if ("2111-3".equals(codeString)) + return _21113; + if ("2112-1".equals(codeString)) + return _21121; + if ("2113-9".equals(codeString)) + return _21139; + if ("2114-7".equals(codeString)) + return _21147; + if ("2115-4".equals(codeString)) + return _21154; + if ("2116-2".equals(codeString)) + return _21162; + if ("2118-8".equals(codeString)) + return _21188; + if ("2119-6".equals(codeString)) + return _21196; + if ("2120-4".equals(codeString)) + return _21204; + if ("2121-2".equals(codeString)) + return _21212; + if ("2122-0".equals(codeString)) + return _21220; + if ("2123-8".equals(codeString)) + return _21238; + if ("2124-6".equals(codeString)) + return _21246; + if ("2125-3".equals(codeString)) + return _21253; + if ("2126-1".equals(codeString)) + return _21261; + if ("2127-9".equals(codeString)) + return _21279; + if ("2129-5".equals(codeString)) + return _21295; + if ("2131-1".equals(codeString)) + return _21311; + throw new FHIRException("Unknown V3Race code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _10025: return "1002-5"; + case _10041: return "1004-1"; + case _10066: return "1006-6"; + case _10082: return "1008-2"; + case _10108: return "1010-8"; + case _10116: return "1011-6"; + case _10124: return "1012-4"; + case _10132: return "1013-2"; + case _10140: return "1014-0"; + case _10157: return "1015-7"; + case _10165: return "1016-5"; + case _10173: return "1017-3"; + case _10181: return "1018-1"; + case _10199: return "1019-9"; + case _10215: return "1021-5"; + case _10223: return "1022-3"; + case _10231: return "1023-1"; + case _10249: return "1024-9"; + case _10264: return "1026-4"; + case _10280: return "1028-0"; + case _10306: return "1030-6"; + case _10314: return "1031-4"; + case _10330: return "1033-0"; + case _10355: return "1035-5"; + case _10371: return "1037-1"; + case _10397: return "1039-7"; + case _10413: return "1041-3"; + case _10421: return "1042-1"; + case _10447: return "1044-7"; + case _10454: return "1045-4"; + case _10462: return "1046-2"; + case _10470: return "1047-0"; + case _10488: return "1048-8"; + case _10496: return "1049-6"; + case _10504: return "1050-4"; + case _10512: return "1051-2"; + case _10538: return "1053-8"; + case _10546: return "1054-6"; + case _10553: return "1055-3"; + case _10561: return "1056-1"; + case _10579: return "1057-9"; + case _10587: return "1058-7"; + case _10595: return "1059-5"; + case _10603: return "1060-3"; + case _10611: return "1061-1"; + case _10629: return "1062-9"; + case _10637: return "1063-7"; + case _10645: return "1064-5"; + case _10652: return "1065-2"; + case _10660: return "1066-0"; + case _10686: return "1068-6"; + case _10694: return "1069-4"; + case _10702: return "1070-2"; + case _10710: return "1071-0"; + case _10728: return "1072-8"; + case _10736: return "1073-6"; + case _10744: return "1074-4"; + case _10769: return "1076-9"; + case _17418: return "1741-8"; + case _17426: return "1742-6"; + case _17434: return "1743-4"; + case _17442: return "1744-2"; + case _17459: return "1745-9"; + case _17467: return "1746-7"; + case _17475: return "1747-5"; + case _17483: return "1748-3"; + case _17491: return "1749-1"; + case _17509: return "1750-9"; + case _17517: return "1751-7"; + case _17525: return "1752-5"; + case _17533: return "1753-3"; + case _17541: return "1754-1"; + case _17558: return "1755-8"; + case _17566: return "1756-6"; + case _17574: return "1757-4"; + case _17582: return "1758-2"; + case _17590: return "1759-0"; + case _17608: return "1760-8"; + case _17616: return "1761-6"; + case _17624: return "1762-4"; + case _17632: return "1763-2"; + case _17640: return "1764-0"; + case _17657: return "1765-7"; + case _17665: return "1766-5"; + case _17673: return "1767-3"; + case _17681: return "1768-1"; + case _17699: return "1769-9"; + case _17707: return "1770-7"; + case _17715: return "1771-5"; + case _17723: return "1772-3"; + case _17731: return "1773-1"; + case _17749: return "1774-9"; + case _17756: return "1775-6"; + case _17764: return "1776-4"; + case _17772: return "1777-2"; + case _17780: return "1778-0"; + case _17798: return "1779-8"; + case _17806: return "1780-6"; + case _17814: return "1781-4"; + case _17822: return "1782-2"; + case _17830: return "1783-0"; + case _17848: return "1784-8"; + case _17855: return "1785-5"; + case _17863: return "1786-3"; + case _17871: return "1787-1"; + case _17889: return "1788-9"; + case _17897: return "1789-7"; + case _17905: return "1790-5"; + case _17913: return "1791-3"; + case _17921: return "1792-1"; + case _17939: return "1793-9"; + case _17947: return "1794-7"; + case _17954: return "1795-4"; + case _17962: return "1796-2"; + case _17970: return "1797-0"; + case _17988: return "1798-8"; + case _17996: return "1799-6"; + case _18002: return "1800-2"; + case _18010: return "1801-0"; + case _18028: return "1802-8"; + case _18036: return "1803-6"; + case _18044: return "1804-4"; + case _18051: return "1805-1"; + case _18069: return "1806-9"; + case _18077: return "1807-7"; + case _18085: return "1808-5"; + case _18093: return "1809-3"; + case _10785: return "1078-5"; + case _10801: return "1080-1"; + case _10827: return "1082-7"; + case _10835: return "1083-5"; + case _10843: return "1084-3"; + case _10868: return "1086-8"; + case _10884: return "1088-4"; + case _10892: return "1089-2"; + case _10900: return "1090-0"; + case _10918: return "1091-8"; + case _10926: return "1092-6"; + case _10934: return "1093-4"; + case _10942: return "1094-2"; + case _10959: return "1095-9"; + case _10967: return "1096-7"; + case _10975: return "1097-5"; + case _10983: return "1098-3"; + case _11007: return "1100-7"; + case _11023: return "1102-3"; + case _11031: return "1103-1"; + case _11049: return "1104-9"; + case _11064: return "1106-4"; + case _11080: return "1108-0"; + case _11098: return "1109-8"; + case _11106: return "1110-6"; + case _11122: return "1112-2"; + case _11148: return "1114-8"; + case _11155: return "1115-5"; + case _11163: return "1116-3"; + case _11171: return "1117-1"; + case _11189: return "1118-9"; + case _11197: return "1119-7"; + case _11205: return "1120-5"; + case _11213: return "1121-3"; + case _11239: return "1123-9"; + case _11247: return "1124-7"; + case _11254: return "1125-4"; + case _11262: return "1126-2"; + case _11270: return "1127-0"; + case _11288: return "1128-8"; + case _11296: return "1129-6"; + case _11304: return "1130-4"; + case _11312: return "1131-2"; + case _11320: return "1132-0"; + case _11338: return "1133-8"; + case _11346: return "1134-6"; + case _11353: return "1135-3"; + case _11361: return "1136-1"; + case _11379: return "1137-9"; + case _11387: return "1138-7"; + case _11395: return "1139-5"; + case _11403: return "1140-3"; + case _11411: return "1141-1"; + case _11429: return "1142-9"; + case _11437: return "1143-7"; + case _11445: return "1144-5"; + case _11452: return "1145-2"; + case _11460: return "1146-0"; + case _11478: return "1147-8"; + case _11486: return "1148-6"; + case _11502: return "1150-2"; + case _11510: return "1151-0"; + case _11536: return "1153-6"; + case _11551: return "1155-1"; + case _11569: return "1156-9"; + case _11577: return "1157-7"; + case _11585: return "1158-5"; + case _11593: return "1159-3"; + case _11601: return "1160-1"; + case _11627: return "1162-7"; + case _11635: return "1163-5"; + case _11650: return "1165-0"; + case _11676: return "1167-6"; + case _11692: return "1169-2"; + case _11718: return "1171-8"; + case _11734: return "1173-4"; + case _11759: return "1175-9"; + case _11767: return "1176-7"; + case _11783: return "1178-3"; + case _11809: return "1180-9"; + case _11825: return "1182-5"; + case _11841: return "1184-1"; + case _11866: return "1186-6"; + case _11874: return "1187-4"; + case _11890: return "1189-0"; + case _11916: return "1191-6"; + case _11932: return "1193-2"; + case _11940: return "1194-0"; + case _11957: return "1195-7"; + case _11965: return "1196-5"; + case _11973: return "1197-3"; + case _11981: return "1198-1"; + case _11999: return "1199-9"; + case _12005: return "1200-5"; + case _12013: return "1201-3"; + case _12021: return "1202-1"; + case _12039: return "1203-9"; + case _12047: return "1204-7"; + case _12054: return "1205-4"; + case _12070: return "1207-0"; + case _12096: return "1209-6"; + case _12112: return "1211-2"; + case _12120: return "1212-0"; + case _12146: return "1214-6"; + case _12153: return "1215-3"; + case _12161: return "1216-1"; + case _12179: return "1217-9"; + case _12187: return "1218-7"; + case _12195: return "1219-5"; + case _12203: return "1220-3"; + case _12229: return "1222-9"; + case _12237: return "1223-7"; + case _12245: return "1224-5"; + case _12252: return "1225-2"; + case _12260: return "1226-0"; + case _12278: return "1227-8"; + case _12286: return "1228-6"; + case _12294: return "1229-4"; + case _12302: return "1230-2"; + case _12310: return "1231-0"; + case _12336: return "1233-6"; + case _12344: return "1234-4"; + case _12351: return "1235-1"; + case _12369: return "1236-9"; + case _12377: return "1237-7"; + case _12385: return "1238-5"; + case _12393: return "1239-3"; + case _12401: return "1240-1"; + case _12419: return "1241-9"; + case _12427: return "1242-7"; + case _12435: return "1243-5"; + case _12443: return "1244-3"; + case _12450: return "1245-0"; + case _12468: return "1246-8"; + case _12476: return "1247-6"; + case _12484: return "1248-4"; + case _12500: return "1250-0"; + case _12526: return "1252-6"; + case _12542: return "1254-2"; + case _12567: return "1256-7"; + case _12583: return "1258-3"; + case _12609: return "1260-9"; + case _12625: return "1262-5"; + case _12641: return "1264-1"; + case _12658: return "1265-8"; + case _12674: return "1267-4"; + case _12690: return "1269-0"; + case _12716: return "1271-6"; + case _12724: return "1272-4"; + case _12732: return "1273-2"; + case _12757: return "1275-7"; + case _12773: return "1277-3"; + case _12799: return "1279-9"; + case _12815: return "1281-5"; + case _12823: return "1282-3"; + case _12831: return "1283-1"; + case _12856: return "1285-6"; + case _12864: return "1286-4"; + case _12872: return "1287-2"; + case _12880: return "1288-0"; + case _12898: return "1289-8"; + case _12906: return "1290-6"; + case _12914: return "1291-4"; + case _12922: return "1292-2"; + case _12930: return "1293-0"; + case _12948: return "1294-8"; + case _12955: return "1295-5"; + case _12971: return "1297-1"; + case _12997: return "1299-7"; + case _13011: return "1301-1"; + case _13037: return "1303-7"; + case _13052: return "1305-2"; + case _13060: return "1306-0"; + case _13078: return "1307-8"; + case _13094: return "1309-4"; + case _13102: return "1310-2"; + case _13128: return "1312-8"; + case _13136: return "1313-6"; + case _13144: return "1314-4"; + case _13151: return "1315-1"; + case _13177: return "1317-7"; + case _13193: return "1319-3"; + case _13219: return "1321-9"; + case _13235: return "1323-5"; + case _13250: return "1325-0"; + case _13268: return "1326-8"; + case _13276: return "1327-6"; + case _13284: return "1328-4"; + case _13292: return "1329-2"; + case _13318: return "1331-8"; + case _13326: return "1332-6"; + case _13334: return "1333-4"; + case _13342: return "1334-2"; + case _13359: return "1335-9"; + case _13367: return "1336-7"; + case _13375: return "1337-5"; + case _13383: return "1338-3"; + case _13409: return "1340-9"; + case _13425: return "1342-5"; + case _13441: return "1344-1"; + case _13458: return "1345-8"; + case _13466: return "1346-6"; + case _13482: return "1348-2"; + case _13508: return "1350-8"; + case _13524: return "1352-4"; + case _13540: return "1354-0"; + case _13565: return "1356-5"; + case _13581: return "1358-1"; + case _13599: return "1359-9"; + case _13607: return "1360-7"; + case _13615: return "1361-5"; + case _13631: return "1363-1"; + case _13656: return "1365-6"; + case _13664: return "1366-4"; + case _13680: return "1368-0"; + case _13706: return "1370-6"; + case _13722: return "1372-2"; + case _13748: return "1374-8"; + case _13763: return "1376-3"; + case _13789: return "1378-9"; + case _13805: return "1380-5"; + case _13821: return "1382-1"; + case _13839: return "1383-9"; + case _13847: return "1384-7"; + case _13854: return "1385-4"; + case _13870: return "1387-0"; + case _13896: return "1389-6"; + case _13912: return "1391-2"; + case _13920: return "1392-0"; + case _13938: return "1393-8"; + case _13946: return "1394-6"; + case _13953: return "1395-3"; + case _13961: return "1396-1"; + case _13979: return "1397-9"; + case _13987: return "1398-7"; + case _13995: return "1399-5"; + case _14001: return "1400-1"; + case _14019: return "1401-9"; + case _14035: return "1403-5"; + case _14050: return "1405-0"; + case _14076: return "1407-6"; + case _14092: return "1409-2"; + case _14118: return "1411-8"; + case _14126: return "1412-6"; + case _14134: return "1413-4"; + case _14142: return "1414-2"; + case _14167: return "1416-7"; + case _14175: return "1417-5"; + case _14183: return "1418-3"; + case _14191: return "1419-1"; + case _14209: return "1420-9"; + case _14217: return "1421-7"; + case _14225: return "1422-5"; + case _14233: return "1423-3"; + case _14241: return "1424-1"; + case _14258: return "1425-8"; + case _14266: return "1426-6"; + case _14274: return "1427-4"; + case _14282: return "1428-2"; + case _14290: return "1429-0"; + case _14308: return "1430-8"; + case _14316: return "1431-6"; + case _14324: return "1432-4"; + case _14332: return "1433-2"; + case _14340: return "1434-0"; + case _14357: return "1435-7"; + case _14365: return "1436-5"; + case _14373: return "1437-3"; + case _14399: return "1439-9"; + case _14415: return "1441-5"; + case _14423: return "1442-3"; + case _14431: return "1443-1"; + case _14456: return "1445-6"; + case _14464: return "1446-4"; + case _14480: return "1448-0"; + case _14506: return "1450-6"; + case _14514: return "1451-4"; + case _14530: return "1453-0"; + case _14548: return "1454-8"; + case _14563: return "1456-3"; + case _14571: return "1457-1"; + case _14589: return "1458-9"; + case _14605: return "1460-5"; + case _14621: return "1462-1"; + case _14647: return "1464-7"; + case _14654: return "1465-4"; + case _14662: return "1466-2"; + case _14670: return "1467-0"; + case _14688: return "1468-8"; + case _14696: return "1469-6"; + case _14704: return "1470-4"; + case _14712: return "1471-2"; + case _14720: return "1472-0"; + case _14746: return "1474-6"; + case _14753: return "1475-3"; + case _14761: return "1476-1"; + case _14787: return "1478-7"; + case _14795: return "1479-5"; + case _14803: return "1480-3"; + case _14811: return "1481-1"; + case _14829: return "1482-9"; + case _14837: return "1483-7"; + case _14845: return "1484-5"; + case _14852: return "1485-2"; + case _14878: return "1487-8"; + case _14894: return "1489-4"; + case _14902: return "1490-2"; + case _14910: return "1491-0"; + case _14928: return "1492-8"; + case _14936: return "1493-6"; + case _14944: return "1494-4"; + case _14951: return "1495-1"; + case _14969: return "1496-9"; + case _14977: return "1497-7"; + case _14985: return "1498-5"; + case _14993: return "1499-3"; + case _15008: return "1500-8"; + case _15016: return "1501-6"; + case _15024: return "1502-4"; + case _15032: return "1503-2"; + case _15040: return "1504-0"; + case _15057: return "1505-7"; + case _15065: return "1506-5"; + case _15073: return "1507-3"; + case _15081: return "1508-1"; + case _15099: return "1509-9"; + case _15107: return "1510-7"; + case _15115: return "1511-5"; + case _15123: return "1512-3"; + case _15131: return "1513-1"; + case _15149: return "1514-9"; + case _15156: return "1515-6"; + case _15164: return "1516-4"; + case _15180: return "1518-0"; + case _15198: return "1519-8"; + case _15206: return "1520-6"; + case _15214: return "1521-4"; + case _15222: return "1522-2"; + case _15230: return "1523-0"; + case _15248: return "1524-8"; + case _15255: return "1525-5"; + case _15263: return "1526-3"; + case _15271: return "1527-1"; + case _15289: return "1528-9"; + case _15297: return "1529-7"; + case _15305: return "1530-5"; + case _15313: return "1531-3"; + case _15321: return "1532-1"; + case _15339: return "1533-9"; + case _15347: return "1534-7"; + case _15354: return "1535-4"; + case _15362: return "1536-2"; + case _15370: return "1537-0"; + case _15388: return "1538-8"; + case _15396: return "1539-6"; + case _15412: return "1541-2"; + case _15438: return "1543-8"; + case _15453: return "1545-3"; + case _15479: return "1547-9"; + case _15495: return "1549-5"; + case _15511: return "1551-1"; + case _15529: return "1552-9"; + case _15537: return "1553-7"; + case _15545: return "1554-5"; + case _15560: return "1556-0"; + case _15586: return "1558-6"; + case _15602: return "1560-2"; + case _15628: return "1562-8"; + case _15644: return "1564-4"; + case _15669: return "1566-9"; + case _15677: return "1567-7"; + case _15685: return "1568-5"; + case _15693: return "1569-3"; + case _15701: return "1570-1"; + case _15719: return "1571-9"; + case _15735: return "1573-5"; + case _15743: return "1574-3"; + case _15768: return "1576-8"; + case _15784: return "1578-4"; + case _15792: return "1579-2"; + case _15800: return "1580-0"; + case _15826: return "1582-6"; + case _15842: return "1584-2"; + case _15867: return "1586-7"; + case _15875: return "1587-5"; + case _15883: return "1588-3"; + case _15891: return "1589-1"; + case _15909: return "1590-9"; + case _15917: return "1591-7"; + case _15925: return "1592-5"; + case _15933: return "1593-3"; + case _15941: return "1594-1"; + case _15958: return "1595-8"; + case _15966: return "1596-6"; + case _15974: return "1597-4"; + case _15982: return "1598-2"; + case _15990: return "1599-0"; + case _16006: return "1600-6"; + case _16022: return "1602-2"; + case _16030: return "1603-0"; + case _16048: return "1604-8"; + case _16055: return "1605-5"; + case _16071: return "1607-1"; + case _16097: return "1609-7"; + case _16105: return "1610-5"; + case _16113: return "1611-3"; + case _16121: return "1612-1"; + case _16139: return "1613-9"; + case _16147: return "1614-7"; + case _16154: return "1615-4"; + case _16162: return "1616-2"; + case _16170: return "1617-0"; + case _16188: return "1618-8"; + case _16196: return "1619-6"; + case _16204: return "1620-4"; + case _16212: return "1621-2"; + case _16220: return "1622-0"; + case _16238: return "1623-8"; + case _16246: return "1624-6"; + case _16253: return "1625-3"; + case _16261: return "1626-1"; + case _16279: return "1627-9"; + case _16287: return "1628-7"; + case _16295: return "1629-5"; + case _16303: return "1630-3"; + case _16311: return "1631-1"; + case _16329: return "1632-9"; + case _16337: return "1633-7"; + case _16345: return "1634-5"; + case _16352: return "1635-2"; + case _16360: return "1636-0"; + case _16378: return "1637-8"; + case _16386: return "1638-6"; + case _16394: return "1639-4"; + case _16402: return "1640-2"; + case _16410: return "1641-0"; + case _16436: return "1643-6"; + case _16451: return "1645-1"; + case _16477: return "1647-7"; + case _16493: return "1649-3"; + case _16519: return "1651-9"; + case _16535: return "1653-5"; + case _16543: return "1654-3"; + case _16550: return "1655-0"; + case _16568: return "1656-8"; + case _16576: return "1657-6"; + case _16592: return "1659-2"; + case _16618: return "1661-8"; + case _16634: return "1663-4"; + case _16659: return "1665-9"; + case _16675: return "1667-5"; + case _16683: return "1668-3"; + case _16709: return "1670-9"; + case _16717: return "1671-7"; + case _16725: return "1672-5"; + case _16733: return "1673-3"; + case _16758: return "1675-8"; + case _16774: return "1677-4"; + case _16790: return "1679-0"; + case _16808: return "1680-8"; + case _16816: return "1681-6"; + case _16832: return "1683-2"; + case _16857: return "1685-7"; + case _16873: return "1687-3"; + case _16881: return "1688-1"; + case _16899: return "1689-9"; + case _16907: return "1690-7"; + case _16923: return "1692-3"; + case _16949: return "1694-9"; + case _16964: return "1696-4"; + case _16972: return "1697-2"; + case _16980: return "1698-0"; + case _17004: return "1700-4"; + case _17020: return "1702-0"; + case _17046: return "1704-6"; + case _17053: return "1705-3"; + case _17079: return "1707-9"; + case _17095: return "1709-5"; + case _17111: return "1711-1"; + case _17129: return "1712-9"; + case _17137: return "1713-7"; + case _17152: return "1715-2"; + case _17178: return "1717-8"; + case _17186: return "1718-6"; + case _17194: return "1719-4"; + case _17202: return "1720-2"; + case _17228: return "1722-8"; + case _17244: return "1724-4"; + case _17251: return "1725-1"; + case _17269: return "1726-9"; + case _17277: return "1727-7"; + case _17285: return "1728-5"; + case _17293: return "1729-3"; + case _17301: return "1730-1"; + case _17319: return "1731-9"; + case _17327: return "1732-7"; + case _17335: return "1733-5"; + case _17350: return "1735-0"; + case _17376: return "1737-6"; + case _17392: return "1739-2"; + case _17400: return "1740-0"; + case _18119: return "1811-9"; + case _18135: return "1813-5"; + case _18143: return "1814-3"; + case _18150: return "1815-0"; + case _18168: return "1816-8"; + case _18176: return "1817-6"; + case _18184: return "1818-4"; + case _18192: return "1819-2"; + case _18200: return "1820-0"; + case _18218: return "1821-8"; + case _18226: return "1822-6"; + case _18234: return "1823-4"; + case _18242: return "1824-2"; + case _18259: return "1825-9"; + case _18267: return "1826-7"; + case _18275: return "1827-5"; + case _18283: return "1828-3"; + case _18291: return "1829-1"; + case _18309: return "1830-9"; + case _18317: return "1831-7"; + case _18325: return "1832-5"; + case _18333: return "1833-3"; + case _18341: return "1834-1"; + case _18358: return "1835-8"; + case _18374: return "1837-4"; + case _18382: return "1838-2"; + case _18408: return "1840-8"; + case _18424: return "1842-4"; + case _18440: return "1844-0"; + case _18457: return "1845-7"; + case _18465: return "1846-5"; + case _18473: return "1847-3"; + case _18481: return "1848-1"; + case _18499: return "1849-9"; + case _18507: return "1850-7"; + case _18515: return "1851-5"; + case _18523: return "1852-3"; + case _18531: return "1853-1"; + case _18549: return "1854-9"; + case _18556: return "1855-6"; + case _18564: return "1856-4"; + case _18572: return "1857-2"; + case _18580: return "1858-0"; + case _18598: return "1859-8"; + case _18606: return "1860-6"; + case _18614: return "1861-4"; + case _18622: return "1862-2"; + case _18630: return "1863-0"; + case _18648: return "1864-8"; + case _18655: return "1865-5"; + case _18663: return "1866-3"; + case _18671: return "1867-1"; + case _18689: return "1868-9"; + case _18697: return "1869-7"; + case _18705: return "1870-5"; + case _18713: return "1871-3"; + case _18721: return "1872-1"; + case _18739: return "1873-9"; + case _18747: return "1874-7"; + case _18754: return "1875-4"; + case _18762: return "1876-2"; + case _18770: return "1877-0"; + case _18788: return "1878-8"; + case _18796: return "1879-6"; + case _18804: return "1880-4"; + case _18812: return "1881-2"; + case _18820: return "1882-0"; + case _18838: return "1883-8"; + case _18846: return "1884-6"; + case _18853: return "1885-3"; + case _18861: return "1886-1"; + case _18879: return "1887-9"; + case _18887: return "1888-7"; + case _18895: return "1889-5"; + case _18911: return "1891-1"; + case _18929: return "1892-9"; + case _18937: return "1893-7"; + case _18945: return "1894-5"; + case _18960: return "1896-0"; + case _18978: return "1897-8"; + case _18986: return "1898-6"; + case _18994: return "1899-4"; + case _19000: return "1900-0"; + case _19018: return "1901-8"; + case _19026: return "1902-6"; + case _19034: return "1903-4"; + case _19042: return "1904-2"; + case _19059: return "1905-9"; + case _19067: return "1906-7"; + case _19075: return "1907-5"; + case _19083: return "1908-3"; + case _19091: return "1909-1"; + case _19109: return "1910-9"; + case _19117: return "1911-7"; + case _19125: return "1912-5"; + case _19133: return "1913-3"; + case _19141: return "1914-1"; + case _19158: return "1915-8"; + case _19166: return "1916-6"; + case _19174: return "1917-4"; + case _19182: return "1918-2"; + case _19190: return "1919-0"; + case _19208: return "1920-8"; + case _19216: return "1921-6"; + case _19224: return "1922-4"; + case _19232: return "1923-2"; + case _19240: return "1924-0"; + case _19257: return "1925-7"; + case _19265: return "1926-5"; + case _19273: return "1927-3"; + case _19281: return "1928-1"; + case _19299: return "1929-9"; + case _19307: return "1930-7"; + case _19315: return "1931-5"; + case _19323: return "1932-3"; + case _19331: return "1933-1"; + case _19349: return "1934-9"; + case _19356: return "1935-6"; + case _19364: return "1936-4"; + case _19372: return "1937-2"; + case _19380: return "1938-0"; + case _19398: return "1939-8"; + case _19406: return "1940-6"; + case _19414: return "1941-4"; + case _19422: return "1942-2"; + case _19430: return "1943-0"; + case _19448: return "1944-8"; + case _19455: return "1945-5"; + case _19463: return "1946-3"; + case _19471: return "1947-1"; + case _19489: return "1948-9"; + case _19497: return "1949-7"; + case _19505: return "1950-5"; + case _19513: return "1951-3"; + case _19521: return "1952-1"; + case _19539: return "1953-9"; + case _19547: return "1954-7"; + case _19554: return "1955-4"; + case _19562: return "1956-2"; + case _19570: return "1957-0"; + case _19588: return "1958-8"; + case _19596: return "1959-6"; + case _19604: return "1960-4"; + case _19612: return "1961-2"; + case _19620: return "1962-0"; + case _19638: return "1963-8"; + case _19646: return "1964-6"; + case _19661: return "1966-1"; + case _19687: return "1968-7"; + case _19695: return "1969-5"; + case _19703: return "1970-3"; + case _19729: return "1972-9"; + case _19737: return "1973-7"; + case _19745: return "1974-5"; + case _19752: return "1975-2"; + case _19760: return "1976-0"; + case _19778: return "1977-8"; + case _19786: return "1978-6"; + case _19794: return "1979-4"; + case _19802: return "1980-2"; + case _19810: return "1981-0"; + case _19828: return "1982-8"; + case _19844: return "1984-4"; + case _19851: return "1985-1"; + case _19869: return "1986-9"; + case _19877: return "1987-7"; + case _19885: return "1988-5"; + case _19901: return "1990-1"; + case _19927: return "1992-7"; + case _19935: return "1993-5"; + case _19943: return "1994-3"; + case _19950: return "1995-0"; + case _19968: return "1996-8"; + case _19976: return "1997-6"; + case _19984: return "1998-4"; + case _19992: return "1999-2"; + case _20008: return "2000-8"; + case _20024: return "2002-4"; + case _20040: return "2004-0"; + case _20065: return "2006-5"; + case _20073: return "2007-3"; + case _20081: return "2008-1"; + case _20099: return "2009-9"; + case _20107: return "2010-7"; + case _20115: return "2011-5"; + case _20123: return "2012-3"; + case _20131: return "2013-1"; + case _20149: return "2014-9"; + case _20156: return "2015-6"; + case _20164: return "2016-4"; + case _20172: return "2017-2"; + case _20180: return "2018-0"; + case _20198: return "2019-8"; + case _20206: return "2020-6"; + case _20214: return "2021-4"; + case _20222: return "2022-2"; + case _20230: return "2023-0"; + case _20248: return "2024-8"; + case _20255: return "2025-5"; + case _20263: return "2026-3"; + case _20289: return "2028-9"; + case _20297: return "2029-7"; + case _20305: return "2030-5"; + case _20313: return "2031-3"; + case _20321: return "2032-1"; + case _20339: return "2033-9"; + case _20347: return "2034-7"; + case _20354: return "2035-4"; + case _20362: return "2036-2"; + case _20370: return "2037-0"; + case _20388: return "2038-8"; + case _20396: return "2039-6"; + case _20404: return "2040-4"; + case _20412: return "2041-2"; + case _20420: return "2042-0"; + case _20438: return "2043-8"; + case _20446: return "2044-6"; + case _20453: return "2045-3"; + case _20461: return "2046-1"; + case _20479: return "2047-9"; + case _20487: return "2048-7"; + case _20495: return "2049-5"; + case _20503: return "2050-3"; + case _20511: return "2051-1"; + case _20529: return "2052-9"; + case _20545: return "2054-5"; + case _20560: return "2056-0"; + case _20586: return "2058-6"; + case _20602: return "2060-2"; + case _20610: return "2061-0"; + case _20628: return "2062-8"; + case _20636: return "2063-6"; + case _20644: return "2064-4"; + case _20651: return "2065-1"; + case _20669: return "2066-9"; + case _20677: return "2067-7"; + case _20685: return "2068-5"; + case _20693: return "2069-3"; + case _20701: return "2070-1"; + case _20719: return "2071-9"; + case _20727: return "2072-7"; + case _20735: return "2073-5"; + case _20743: return "2074-3"; + case _20750: return "2075-0"; + case _20768: return "2076-8"; + case _20784: return "2078-4"; + case _20792: return "2079-2"; + case _20800: return "2080-0"; + case _20818: return "2081-8"; + case _20826: return "2082-6"; + case _20834: return "2083-4"; + case _20859: return "2085-9"; + case _20867: return "2086-7"; + case _20875: return "2087-5"; + case _20883: return "2088-3"; + case _20891: return "2089-1"; + case _20909: return "2090-9"; + case _20917: return "2091-7"; + case _20925: return "2092-5"; + case _20933: return "2093-3"; + case _20941: return "2094-1"; + case _20958: return "2095-8"; + case _20966: return "2096-6"; + case _20974: return "2097-4"; + case _20982: return "2098-2"; + case _21006: return "2100-6"; + case _21014: return "2101-4"; + case _21022: return "2102-2"; + case _21030: return "2103-0"; + case _21048: return "2104-8"; + case _25007: return "2500-7"; + case _21063: return "2106-3"; + case _21089: return "2108-9"; + case _21097: return "2109-7"; + case _21105: return "2110-5"; + case _21113: return "2111-3"; + case _21121: return "2112-1"; + case _21139: return "2113-9"; + case _21147: return "2114-7"; + case _21154: return "2115-4"; + case _21162: return "2116-2"; + case _21188: return "2118-8"; + case _21196: return "2119-6"; + case _21204: return "2120-4"; + case _21212: return "2121-2"; + case _21220: return "2122-0"; + case _21238: return "2123-8"; + case _21246: return "2124-6"; + case _21253: return "2125-3"; + case _21261: return "2126-1"; + case _21279: return "2127-9"; + case _21295: return "2129-5"; + case _21311: return "2131-1"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Race"; + } + public String getDefinition() { + switch (this) { + case _10025: return "American Indian or Alaska Native"; + case _10041: return "American Indian"; + case _10066: return "Abenaki"; + case _10082: return "Algonquian"; + case _10108: return "Apache"; + case _10116: return "Chiricahua"; + case _10124: return "Fort Sill Apache"; + case _10132: return "Jicarilla Apache"; + case _10140: return "Lipan Apache"; + case _10157: return "Mescalero Apache"; + case _10165: return "Oklahoma Apache"; + case _10173: return "Payson Apache"; + case _10181: return "San Carlos Apache"; + case _10199: return "White Mountain Apache"; + case _10215: return "Arapaho"; + case _10223: return "Northern Arapaho"; + case _10231: return "Southern Arapaho"; + case _10249: return "Wind River Arapaho"; + case _10264: return "Arikara"; + case _10280: return "Assiniboine"; + case _10306: return "Assiniboine Sioux"; + case _10314: return "Fort Peck Assiniboine Sioux"; + case _10330: return "Bannock"; + case _10355: return "Blackfeet"; + case _10371: return "Brotherton"; + case _10397: return "Burt Lake Band"; + case _10413: return "Caddo"; + case _10421: return "Oklahoma Cado"; + case _10447: return "Cahuilla"; + case _10454: return "Agua Caliente Cahuilla"; + case _10462: return "Augustine"; + case _10470: return "Cabazon"; + case _10488: return "Los Coyotes"; + case _10496: return "Morongo"; + case _10504: return "Santa Rosa Cahuilla"; + case _10512: return "Torres-Martinez"; + case _10538: return "California Tribes"; + case _10546: return "Cahto"; + case _10553: return "Chimariko"; + case _10561: return "Coast Miwok"; + case _10579: return "Digger"; + case _10587: return "Kawaiisu"; + case _10595: return "Kern River"; + case _10603: return "Mattole"; + case _10611: return "Red Wood"; + case _10629: return "Santa Rosa"; + case _10637: return "Takelma"; + case _10645: return "Wappo"; + case _10652: return "Yana"; + case _10660: return "Yuki"; + case _10686: return "Canadian and Latin American Indian"; + case _10694: return "Canadian Indian"; + case _10702: return "Central American Indian"; + case _10710: return "French American Indian"; + case _10728: return "Mexican American Indian"; + case _10736: return "South American Indian"; + case _10744: return "Spanish American Indian"; + case _10769: return "Catawba"; + case _17418: return "Alatna"; + case _17426: return "Alexander"; + case _17434: return "Allakaket"; + case _17442: return "Alanvik"; + case _17459: return "Anvik"; + case _17467: return "Arctic"; + case _17475: return "Beaver"; + case _17483: return "Birch Creek"; + case _17491: return "Cantwell"; + case _17509: return "Chalkyitsik"; + case _17517: return "Chickaloon"; + case _17525: return "Chistochina"; + case _17533: return "Chitina"; + case _17541: return "Circle"; + case _17558: return "Cook Inlet"; + case _17566: return "Copper Center"; + case _17574: return "Copper River"; + case _17582: return "Dot Lake"; + case _17590: return "Doyon"; + case _17608: return "Eagle"; + case _17616: return "Eklutna"; + case _17624: return "Evansville"; + case _17632: return "Fort Yukon"; + case _17640: return "Gakona"; + case _17657: return "Galena"; + case _17665: return "Grayling"; + case _17673: return "Gulkana"; + case _17681: return "Healy Lake"; + case _17699: return "Holy Cross"; + case _17707: return "Hughes"; + case _17715: return "Huslia"; + case _17723: return "Iliamna"; + case _17731: return "Kaltag"; + case _17749: return "Kluti Kaah"; + case _17756: return "Knik"; + case _17764: return "Koyukuk"; + case _17772: return "Lake Minchumina"; + case _17780: return "Lime"; + case _17798: return "Mcgrath"; + case _17806: return "Manley Hot Springs"; + case _17814: return "Mentasta Lake"; + case _17822: return "Minto"; + case _17830: return "Nenana"; + case _17848: return "Nikolai"; + case _17855: return "Ninilchik"; + case _17863: return "Nondalton"; + case _17871: return "Northway"; + case _17889: return "Nulato"; + case _17897: return "Pedro Bay"; + case _17905: return "Rampart"; + case _17913: return "Ruby"; + case _17921: return "Salamatof"; + case _17939: return "Seldovia"; + case _17947: return "Slana"; + case _17954: return "Shageluk"; + case _17962: return "Stevens"; + case _17970: return "Stony River"; + case _17988: return "Takotna"; + case _17996: return "Tanacross"; + case _18002: return "Tanaina"; + case _18010: return "Tanana"; + case _18028: return "Tanana Chiefs"; + case _18036: return "Tazlina"; + case _18044: return "Telida"; + case _18051: return "Tetlin"; + case _18069: return "Tok"; + case _18077: return "Tyonek"; + case _18085: return "Venetie"; + case _18093: return "Wiseman"; + case _10785: return "Cayuse"; + case _10801: return "Chehalis"; + case _10827: return "Chemakuan"; + case _10835: return "Hoh"; + case _10843: return "Quileute"; + case _10868: return "Chemehuevi"; + case _10884: return "Cherokee"; + case _10892: return "Cherokee Alabama"; + case _10900: return "Cherokees of Northeast Alabama"; + case _10918: return "Cherokees of Southeast Alabama"; + case _10926: return "Eastern Cherokee"; + case _10934: return "Echota Cherokee"; + case _10942: return "Etowah Cherokee"; + case _10959: return "Northern Cherokee"; + case _10967: return "Tuscola"; + case _10975: return "United Keetowah Band of Cherokee"; + case _10983: return "Western Cherokee"; + case _11007: return "Cherokee Shawnee"; + case _11023: return "Cheyenne"; + case _11031: return "Northern Cheyenne"; + case _11049: return "Southern Cheyenne"; + case _11064: return "Cheyenne-Arapaho"; + case _11080: return "Chickahominy"; + case _11098: return "Eastern Chickahominy"; + case _11106: return "Western Chickahominy"; + case _11122: return "Chickasaw"; + case _11148: return "Chinook"; + case _11155: return "Clatsop"; + case _11163: return "Columbia River Chinook"; + case _11171: return "Kathlamet"; + case _11189: return "Upper Chinook"; + case _11197: return "Wakiakum Chinook"; + case _11205: return "Willapa Chinook"; + case _11213: return "Wishram"; + case _11239: return "Chippewa"; + case _11247: return "Bad River"; + case _11254: return "Bay Mills Chippewa"; + case _11262: return "Bois Forte"; + case _11270: return "Burt Lake Chippewa"; + case _11288: return "Fond du Lac"; + case _11296: return "Grand Portage"; + case _11304: return "Grand Traverse Band of Ottawa-Chippewa"; + case _11312: return "Keweenaw"; + case _11320: return "Lac Courte Oreilles"; + case _11338: return "Lac du Flambeau"; + case _11346: return "Lac Vieux Desert Chippewa"; + case _11353: return "Lake Superior"; + case _11361: return "Leech Lake"; + case _11379: return "Little Shell Chippewa"; + case _11387: return "Mille Lacs"; + case _11395: return "Minnesota Chippewa"; + case _11403: return "Ontonagon"; + case _11411: return "Red Cliff Chippewa"; + case _11429: return "Red Lake Chippewa"; + case _11437: return "Saginaw Chippewa"; + case _11445: return "St. Croix Chippewa"; + case _11452: return "Sault Ste. Marie Chippewa"; + case _11460: return "Sokoagon Chippewa"; + case _11478: return "Turtle Mountain"; + case _11486: return "White Earth"; + case _11502: return "Chippewa Cree"; + case _11510: return "Rocky Boy's Chippewa Cree"; + case _11536: return "Chitimacha"; + case _11551: return "Choctaw"; + case _11569: return "Clifton Choctaw"; + case _11577: return "Jena Choctaw"; + case _11585: return "Mississippi Choctaw"; + case _11593: return "Mowa Band of Choctaw"; + case _11601: return "Oklahoma Choctaw"; + case _11627: return "Chumash"; + case _11635: return "Santa Ynez"; + case _11650: return "Clear Lake"; + case _11676: return "Coeur D'Alene"; + case _11692: return "Coharie"; + case _11718: return "Colorado River"; + case _11734: return "Colville"; + case _11759: return "Comanche"; + case _11767: return "Oklahoma Comanche"; + case _11783: return "Coos, Lower Umpqua, Siuslaw"; + case _11809: return "Coos"; + case _11825: return "Coquilles"; + case _11841: return "Costanoan"; + case _11866: return "Coushatta"; + case _11874: return "Alabama Coushatta"; + case _11890: return "Cowlitz"; + case _11916: return "Cree"; + case _11932: return "Creek"; + case _11940: return "Alabama Creek"; + case _11957: return "Alabama Quassarte"; + case _11965: return "Eastern Creek"; + case _11973: return "Eastern Muscogee"; + case _11981: return "Kialegee"; + case _11999: return "Lower Muscogee"; + case _12005: return "Machis Lower Creek Indian"; + case _12013: return "Poarch Band"; + case _12021: return "Principal Creek Indian Nation"; + case _12039: return "Star Clan of Muscogee Creeks"; + case _12047: return "Thlopthlocco"; + case _12054: return "Tuckabachee"; + case _12070: return "Croatan"; + case _12096: return "Crow"; + case _12112: return "Cupeno"; + case _12120: return "Agua Caliente"; + case _12146: return "Delaware"; + case _12153: return "Eastern Delaware"; + case _12161: return "Lenni-Lenape"; + case _12179: return "Munsee"; + case _12187: return "Oklahoma Delaware"; + case _12195: return "Rampough Mountain"; + case _12203: return "Sand Hill"; + case _12229: return "Diegueno"; + case _12237: return "Campo"; + case _12245: return "Capitan Grande"; + case _12252: return "Cuyapaipe"; + case _12260: return "La Posta"; + case _12278: return "Manzanita"; + case _12286: return "Mesa Grande"; + case _12294: return "San Pasqual"; + case _12302: return "Santa Ysabel"; + case _12310: return "Sycuan"; + case _12336: return "Eastern Tribes"; + case _12344: return "Attacapa"; + case _12351: return "Biloxi"; + case _12369: return "Georgetown"; + case _12377: return "Moor"; + case _12385: return "Nansemond"; + case _12393: return "Natchez"; + case _12401: return "Nausu Waiwash"; + case _12419: return "Nipmuc"; + case _12427: return "Paugussett"; + case _12435: return "Pocomoke Acohonock"; + case _12443: return "Southeastern Indians"; + case _12450: return "Susquehanock"; + case _12468: return "Tunica Biloxi"; + case _12476: return "Waccamaw-Siousan"; + case _12484: return "Wicomico"; + case _12500: return "Esselen"; + case _12526: return "Fort Belknap"; + case _12542: return "Fort Berthold"; + case _12567: return "Fort Mcdowell"; + case _12583: return "Fort Hall"; + case _12609: return "Gabrieleno"; + case _12625: return "Grand Ronde"; + case _12641: return "Gros Ventres"; + case _12658: return "Atsina"; + case _12674: return "Haliwa"; + case _12690: return "Hidatsa"; + case _12716: return "Hoopa"; + case _12724: return "Trinity"; + case _12732: return "Whilkut"; + case _12757: return "Hoopa Extension"; + case _12773: return "Houma"; + case _12799: return "Inaja-Cosmit"; + case _12815: return "Iowa"; + case _12823: return "Iowa of Kansas-Nebraska"; + case _12831: return "Iowa of Oklahoma"; + case _12856: return "Iroquois"; + case _12864: return "Cayuga"; + case _12872: return "Mohawk"; + case _12880: return "Oneida"; + case _12898: return "Onondaga"; + case _12906: return "Seneca"; + case _12914: return "Seneca Nation"; + case _12922: return "Seneca-Cayuga"; + case _12930: return "Tonawanda Seneca"; + case _12948: return "Tuscarora"; + case _12955: return "Wyandotte"; + case _12971: return "Juaneno"; + case _12997: return "Kalispel"; + case _13011: return "Karuk"; + case _13037: return "Kaw"; + case _13052: return "Kickapoo"; + case _13060: return "Oklahoma Kickapoo"; + case _13078: return "Texas Kickapoo"; + case _13094: return "Kiowa"; + case _13102: return "Oklahoma Kiowa"; + case _13128: return "Klallam"; + case _13136: return "Jamestown"; + case _13144: return "Lower Elwha"; + case _13151: return "Port Gamble Klallam"; + case _13177: return "Klamath"; + case _13193: return "Konkow"; + case _13219: return "Kootenai"; + case _13235: return "Lassik"; + case _13250: return "Long Island"; + case _13268: return "Matinecock"; + case _13276: return "Montauk"; + case _13284: return "Poospatuck"; + case _13292: return "Setauket"; + case _13318: return "Luiseno"; + case _13326: return "La Jolla"; + case _13334: return "Pala"; + case _13342: return "Pauma"; + case _13359: return "Pechanga"; + case _13367: return "Soboba"; + case _13375: return "Twenty-Nine Palms"; + case _13383: return "Temecula"; + case _13409: return "Lumbee"; + case _13425: return "Lummi"; + case _13441: return "Maidu"; + case _13458: return "Mountain Maidu"; + case _13466: return "Nishinam"; + case _13482: return "Makah"; + case _13508: return "Maliseet"; + case _13524: return "Mandan"; + case _13540: return "Mattaponi"; + case _13565: return "Menominee"; + case _13581: return "Miami"; + case _13599: return "Illinois Miami"; + case _13607: return "Indiana Miami"; + case _13615: return "Oklahoma Miami"; + case _13631: return "Miccosukee"; + case _13656: return "Micmac"; + case _13664: return "Aroostook"; + case _13680: return "Mission Indians"; + case _13706: return "Miwok"; + case _13722: return "Modoc"; + case _13748: return "Mohegan"; + case _13763: return "Mono"; + case _13789: return "Nanticoke"; + case _13805: return "Narragansett"; + case _13821: return "Navajo"; + case _13839: return "Alamo Navajo"; + case _13847: return "Canoncito Navajo"; + case _13854: return "Ramah Navajo"; + case _13870: return "Nez Perce"; + case _13896: return "Nomalaki"; + case _13912: return "Northwest Tribes"; + case _13920: return "Alsea"; + case _13938: return "Celilo"; + case _13946: return "Columbia"; + case _13953: return "Kalapuya"; + case _13961: return "Molala"; + case _13979: return "Talakamish"; + case _13987: return "Tenino"; + case _13995: return "Tillamook"; + case _14001: return "Wenatchee"; + case _14019: return "Yahooskin"; + case _14035: return "Omaha"; + case _14050: return "Oregon Athabaskan"; + case _14076: return "Osage"; + case _14092: return "Otoe-Missouria"; + case _14118: return "Ottawa"; + case _14126: return "Burt Lake Ottawa"; + case _14134: return "Michigan Ottawa"; + case _14142: return "Oklahoma Ottawa"; + case _14167: return "Paiute"; + case _14175: return "Bishop"; + case _14183: return "Bridgeport"; + case _14191: return "Burns Paiute"; + case _14209: return "Cedarville"; + case _14217: return "Fort Bidwell"; + case _14225: return "Fort Independence"; + case _14233: return "Kaibab"; + case _14241: return "Las Vegas"; + case _14258: return "Lone Pine"; + case _14266: return "Lovelock"; + case _14274: return "Malheur Paiute"; + case _14282: return "Moapa"; + case _14290: return "Northern Paiute"; + case _14308: return "Owens Valley"; + case _14316: return "Pyramid Lake"; + case _14324: return "San Juan Southern Paiute"; + case _14332: return "Southern Paiute"; + case _14340: return "Summit Lake"; + case _14357: return "Utu Utu Gwaitu Paiute"; + case _14365: return "Walker River"; + case _14373: return "Yerington Paiute"; + case _14399: return "Pamunkey"; + case _14415: return "Passamaquoddy"; + case _14423: return "Indian Township"; + case _14431: return "Pleasant Point Passamaquoddy"; + case _14456: return "Pawnee"; + case _14464: return "Oklahoma Pawnee"; + case _14480: return "Penobscot"; + case _14506: return "Peoria"; + case _14514: return "Oklahoma Peoria"; + case _14530: return "Pequot"; + case _14548: return "Marshantucket Pequot"; + case _14563: return "Pima"; + case _14571: return "Gila River Pima-Maricopa"; + case _14589: return "Salt River Pima-Maricopa"; + case _14605: return "Piscataway"; + case _14621: return "Pit River"; + case _14647: return "Pomo"; + case _14654: return "Central Pomo"; + case _14662: return "Dry Creek"; + case _14670: return "Eastern Pomo"; + case _14688: return "Kashia"; + case _14696: return "Northern Pomo"; + case _14704: return "Scotts Valley"; + case _14712: return "Stonyford"; + case _14720: return "Sulphur Bank"; + case _14746: return "Ponca"; + case _14753: return "Nebraska Ponca"; + case _14761: return "Oklahoma Ponca"; + case _14787: return "Potawatomi"; + case _14795: return "Citizen Band Potawatomi"; + case _14803: return "Forest County"; + case _14811: return "Hannahville"; + case _14829: return "Huron Potawatomi"; + case _14837: return "Pokagon Potawatomi"; + case _14845: return "Prairie Band"; + case _14852: return "Wisconsin Potawatomi"; + case _14878: return "Powhatan"; + case _14894: return "Pueblo"; + case _14902: return "Acoma"; + case _14910: return "Arizona Tewa"; + case _14928: return "Cochiti"; + case _14936: return "Hopi"; + case _14944: return "Isleta"; + case _14951: return "Jemez"; + case _14969: return "Keres"; + case _14977: return "Laguna"; + case _14985: return "Nambe"; + case _14993: return "Picuris"; + case _15008: return "Piro"; + case _15016: return "Pojoaque"; + case _15024: return "San Felipe"; + case _15032: return "San Ildefonso"; + case _15040: return "San Juan Pueblo"; + case _15057: return "San Juan De"; + case _15065: return "San Juan"; + case _15073: return "Sandia"; + case _15081: return "Santa Ana"; + case _15099: return "Santa Clara"; + case _15107: return "Santo Domingo"; + case _15115: return "Taos"; + case _15123: return "Tesuque"; + case _15131: return "Tewa"; + case _15149: return "Tigua"; + case _15156: return "Zia"; + case _15164: return "Zuni"; + case _15180: return "Puget Sound Salish"; + case _15198: return "Duwamish"; + case _15206: return "Kikiallus"; + case _15214: return "Lower Skagit"; + case _15222: return "Muckleshoot"; + case _15230: return "Nisqually"; + case _15248: return "Nooksack"; + case _15255: return "Port Madison"; + case _15263: return "Puyallup"; + case _15271: return "Samish"; + case _15289: return "Sauk-Suiattle"; + case _15297: return "Skokomish"; + case _15305: return "Skykomish"; + case _15313: return "Snohomish"; + case _15321: return "Snoqualmie"; + case _15339: return "Squaxin Island"; + case _15347: return "Steilacoom"; + case _15354: return "Stillaguamish"; + case _15362: return "Suquamish"; + case _15370: return "Swinomish"; + case _15388: return "Tulalip"; + case _15396: return "Upper Skagit"; + case _15412: return "Quapaw"; + case _15438: return "Quinault"; + case _15453: return "Rappahannock"; + case _15479: return "Reno-Sparks"; + case _15495: return "Round Valley"; + case _15511: return "Sac and Fox"; + case _15529: return "Iowa Sac and Fox"; + case _15537: return "Missouri Sac and Fox"; + case _15545: return "Oklahoma Sac and Fox"; + case _15560: return "Salinan"; + case _15586: return "Salish"; + case _15602: return "Salish and Kootenai"; + case _15628: return "Schaghticoke"; + case _15644: return "Scott Valley"; + case _15669: return "Seminole"; + case _15677: return "Big Cypress"; + case _15685: return "Brighton"; + case _15693: return "Florida Seminole"; + case _15701: return "Hollywood Seminole"; + case _15719: return "Oklahoma Seminole"; + case _15735: return "Serrano"; + case _15743: return "San Manual"; + case _15768: return "Shasta"; + case _15784: return "Shawnee"; + case _15792: return "Absentee Shawnee"; + case _15800: return "Eastern Shawnee"; + case _15826: return "Shinnecock"; + case _15842: return "Shoalwater Bay"; + case _15867: return "Shoshone"; + case _15875: return "Battle Mountain"; + case _15883: return "Duckwater"; + case _15891: return "Elko"; + case _15909: return "Ely"; + case _15917: return "Goshute"; + case _15925: return "Panamint"; + case _15933: return "Ruby Valley"; + case _15941: return "Skull Valley"; + case _15958: return "South Fork Shoshone"; + case _15966: return "Te-Moak Western Shoshone"; + case _15974: return "Timbi-Sha Shoshone"; + case _15982: return "Washakie"; + case _15990: return "Wind River Shoshone"; + case _16006: return "Yomba"; + case _16022: return "Shoshone Paiute"; + case _16030: return "Duck Valley"; + case _16048: return "Fallon"; + case _16055: return "Fort McDermitt"; + case _16071: return "Siletz"; + case _16097: return "Sioux"; + case _16105: return "Blackfoot Sioux"; + case _16113: return "Brule Sioux"; + case _16121: return "Cheyenne River Sioux"; + case _16139: return "Crow Creek Sioux"; + case _16147: return "Dakota Sioux"; + case _16154: return "Flandreau Santee"; + case _16162: return "Fort Peck"; + case _16170: return "Lake Traverse Sioux"; + case _16188: return "Lower Brule Sioux"; + case _16196: return "Lower Sioux"; + case _16204: return "Mdewakanton Sioux"; + case _16212: return "Miniconjou"; + case _16220: return "Oglala Sioux"; + case _16238: return "Pine Ridge Sioux"; + case _16246: return "Pipestone Sioux"; + case _16253: return "Prairie Island Sioux"; + case _16261: return "Prior Lake Sioux"; + case _16279: return "Rosebud Sioux"; + case _16287: return "Sans Arc Sioux"; + case _16295: return "Santee Sioux"; + case _16303: return "Sisseton-Wahpeton"; + case _16311: return "Sisseton Sioux"; + case _16329: return "Spirit Lake Sioux"; + case _16337: return "Standing Rock Sioux"; + case _16345: return "Teton Sioux"; + case _16352: return "Two Kettle Sioux"; + case _16360: return "Upper Sioux"; + case _16378: return "Wahpekute Sioux"; + case _16386: return "Wahpeton Sioux"; + case _16394: return "Wazhaza Sioux"; + case _16402: return "Yankton Sioux"; + case _16410: return "Yanktonai Sioux"; + case _16436: return "Siuslaw"; + case _16451: return "Spokane"; + case _16477: return "Stewart"; + case _16493: return "Stockbridge"; + case _16519: return "Susanville"; + case _16535: return "Tohono O'Odham"; + case _16543: return "Ak-Chin"; + case _16550: return "Gila Bend"; + case _16568: return "San Xavier"; + case _16576: return "Sells"; + case _16592: return "Tolowa"; + case _16618: return "Tonkawa"; + case _16634: return "Tygh"; + case _16659: return "Umatilla"; + case _16675: return "Umpqua"; + case _16683: return "Cow Creek Umpqua"; + case _16709: return "Ute"; + case _16717: return "Allen Canyon"; + case _16725: return "Uintah Ute"; + case _16733: return "Ute Mountain Ute"; + case _16758: return "Wailaki"; + case _16774: return "Walla-Walla"; + case _16790: return "Wampanoag"; + case _16808: return "Gay Head Wampanoag"; + case _16816: return "Mashpee Wampanoag"; + case _16832: return "Warm Springs"; + case _16857: return "Wascopum"; + case _16873: return "Washoe"; + case _16881: return "Alpine"; + case _16899: return "Carson"; + case _16907: return "Dresslerville"; + case _16923: return "Wichita"; + case _16949: return "Wind River"; + case _16964: return "Winnebago"; + case _16972: return "Ho-chunk"; + case _16980: return "Nebraska Winnebago"; + case _17004: return "Winnemucca"; + case _17020: return "Wintun"; + case _17046: return "Wiyot"; + case _17053: return "Table Bluff"; + case _17079: return "Yakama"; + case _17095: return "Yakama Cowlitz"; + case _17111: return "Yaqui"; + case _17129: return "Barrio Libre"; + case _17137: return "Pascua Yaqui"; + case _17152: return "Yavapai Apache"; + case _17178: return "Yokuts"; + case _17186: return "Chukchansi"; + case _17194: return "Tachi"; + case _17202: return "Tule River"; + case _17228: return "Yuchi"; + case _17244: return "Yuman"; + case _17251: return "Cocopah"; + case _17269: return "Havasupai"; + case _17277: return "Hualapai"; + case _17285: return "Maricopa"; + case _17293: return "Mohave"; + case _17301: return "Quechan"; + case _17319: return "Yavapai"; + case _17327: return "Yurok"; + case _17335: return "Coast Yurok"; + case _17350: return "Alaska Native"; + case _17376: return "Alaska Indian"; + case _17392: return "Alaskan Athabascan"; + case _17400: return "Ahtna"; + case _18119: return "Southeast Alaska"; + case _18135: return "Tlingit-Haida"; + case _18143: return "Angoon"; + case _18150: return "Central Council of Tlingit and Haida Tribes"; + case _18168: return "Chilkat"; + case _18176: return "Chilkoot"; + case _18184: return "Craig"; + case _18192: return "Douglas"; + case _18200: return "Haida"; + case _18218: return "Hoonah"; + case _18226: return "Hydaburg"; + case _18234: return "Kake"; + case _18242: return "Kasaan"; + case _18259: return "Kenaitze"; + case _18267: return "Ketchikan"; + case _18275: return "Klawock"; + case _18283: return "Pelican"; + case _18291: return "Petersburg"; + case _18309: return "Saxman"; + case _18317: return "Sitka"; + case _18325: return "Tenakee Springs"; + case _18333: return "Tlingit"; + case _18341: return "Wrangell"; + case _18358: return "Yakutat"; + case _18374: return "Tsimshian"; + case _18382: return "Metlakatla"; + case _18408: return "Eskimo"; + case _18424: return "Greenland Eskimo"; + case _18440: return "Inupiat Eskimo"; + case _18457: return "Ambler"; + case _18465: return "Anaktuvuk"; + case _18473: return "Anaktuvuk Pass"; + case _18481: return "Arctic Slope Inupiat"; + case _18499: return "Arctic Slope Corporation"; + case _18507: return "Atqasuk"; + case _18515: return "Barrow"; + case _18523: return "Bering Straits Inupiat"; + case _18531: return "Brevig Mission"; + case _18549: return "Buckland"; + case _18556: return "Chinik"; + case _18564: return "Council"; + case _18572: return "Deering"; + case _18580: return "Elim"; + case _18598: return "Golovin"; + case _18606: return "Inalik Diomede"; + case _18614: return "Inupiaq"; + case _18622: return "Kaktovik"; + case _18630: return "Kawerak"; + case _18648: return "Kiana"; + case _18655: return "Kivalina"; + case _18663: return "Kobuk"; + case _18671: return "Kotzebue"; + case _18689: return "Koyuk"; + case _18697: return "Kwiguk"; + case _18705: return "Mauneluk Inupiat"; + case _18713: return "Nana Inupiat"; + case _18721: return "Noatak"; + case _18739: return "Nome"; + case _18747: return "Noorvik"; + case _18754: return "Nuiqsut"; + case _18762: return "Point Hope"; + case _18770: return "Point Lay"; + case _18788: return "Selawik"; + case _18796: return "Shaktoolik"; + case _18804: return "Shishmaref"; + case _18812: return "Shungnak"; + case _18820: return "Solomon"; + case _18838: return "Teller"; + case _18846: return "Unalakleet"; + case _18853: return "Wainwright"; + case _18861: return "Wales"; + case _18879: return "White Mountain"; + case _18887: return "White Mountain Inupiat"; + case _18895: return "Mary's Igloo"; + case _18911: return "Siberian Eskimo"; + case _18929: return "Gambell"; + case _18937: return "Savoonga"; + case _18945: return "Siberian Yupik"; + case _18960: return "Yupik Eskimo"; + case _18978: return "Akiachak"; + case _18986: return "Akiak"; + case _18994: return "Alakanuk"; + case _19000: return "Aleknagik"; + case _19018: return "Andreafsky"; + case _19026: return "Aniak"; + case _19034: return "Atmautluak"; + case _19042: return "Bethel"; + case _19059: return "Bill Moore's Slough"; + case _19067: return "Bristol Bay Yupik"; + case _19075: return "Calista Yupik"; + case _19083: return "Chefornak"; + case _19091: return "Chevak"; + case _19109: return "Chuathbaluk"; + case _19117: return "Clark's Point"; + case _19125: return "Crooked Creek"; + case _19133: return "Dillingham"; + case _19141: return "Eek"; + case _19158: return "Ekuk"; + case _19166: return "Ekwok"; + case _19174: return "Emmonak"; + case _19182: return "Goodnews Bay"; + case _19190: return "Hooper Bay"; + case _19208: return "Iqurmuit (Russian Mission)"; + case _19216: return "Kalskag"; + case _19224: return "Kasigluk"; + case _19232: return "Kipnuk"; + case _19240: return "Koliganek"; + case _19257: return "Kongiganak"; + case _19265: return "Kotlik"; + case _19273: return "Kwethluk"; + case _19281: return "Kwigillingok"; + case _19299: return "Levelock"; + case _19307: return "Lower Kalskag"; + case _19315: return "Manokotak"; + case _19323: return "Marshall"; + case _19331: return "Mekoryuk"; + case _19349: return "Mountain Village"; + case _19356: return "Naknek"; + case _19364: return "Napaumute"; + case _19372: return "Napakiak"; + case _19380: return "Napaskiak"; + case _19398: return "Newhalen"; + case _19406: return "New Stuyahok"; + case _19414: return "Newtok"; + case _19422: return "Nightmute"; + case _19430: return "Nunapitchukv"; + case _19448: return "Oscarville"; + case _19455: return "Pilot Station"; + case _19463: return "Pitkas Point"; + case _19471: return "Platinum"; + case _19489: return "Portage Creek"; + case _19497: return "Quinhagak"; + case _19505: return "Red Devil"; + case _19513: return "St. Michael"; + case _19521: return "Scammon Bay"; + case _19539: return "Sheldon's Point"; + case _19547: return "Sleetmute"; + case _19554: return "Stebbins"; + case _19562: return "Togiak"; + case _19570: return "Toksook"; + case _19588: return "Tulukskak"; + case _19596: return "Tuntutuliak"; + case _19604: return "Tununak"; + case _19612: return "Twin Hills"; + case _19620: return "Georgetown"; + case _19638: return "St. Mary's"; + case _19646: return "Umkumiate"; + case _19661: return "Aleut"; + case _19687: return "Alutiiq Aleut"; + case _19695: return "Tatitlek"; + case _19703: return "Ugashik"; + case _19729: return "Bristol Bay Aleut"; + case _19737: return "Chignik"; + case _19745: return "Chignik Lake"; + case _19752: return "Egegik"; + case _19760: return "Igiugig"; + case _19778: return "Ivanof Bay"; + case _19786: return "King Salmon"; + case _19794: return "Kokhanok"; + case _19802: return "Perryville"; + case _19810: return "Pilot Point"; + case _19828: return "Port Heiden"; + case _19844: return "Chugach Aleut"; + case _19851: return "Chenega"; + case _19869: return "Chugach Corporation"; + case _19877: return "English Bay"; + case _19885: return "Port Graham"; + case _19901: return "Eyak"; + case _19927: return "Koniag Aleut"; + case _19935: return "Akhiok"; + case _19943: return "Agdaagux"; + case _19950: return "Karluk"; + case _19968: return "Kodiak"; + case _19976: return "Larsen Bay"; + case _19984: return "Old Harbor"; + case _19992: return "Ouzinkie"; + case _20008: return "Port Lions"; + case _20024: return "Sugpiaq"; + case _20040: return "Suqpigaq"; + case _20065: return "Unangan Aleut"; + case _20073: return "Akutan"; + case _20081: return "Aleut Corporation"; + case _20099: return "Aleutian"; + case _20107: return "Aleutian Islander"; + case _20115: return "Atka"; + case _20123: return "Belkofski"; + case _20131: return "Chignik Lagoon"; + case _20149: return "King Cove"; + case _20156: return "False Pass"; + case _20164: return "Nelson Lagoon"; + case _20172: return "Nikolski"; + case _20180: return "Pauloff Harbor"; + case _20198: return "Qagan Toyagungin"; + case _20206: return "Qawalangin"; + case _20214: return "St. George"; + case _20222: return "St. Paul"; + case _20230: return "Sand Point"; + case _20248: return "South Naknek"; + case _20255: return "Unalaska"; + case _20263: return "Unga"; + case _20289: return "Asian"; + case _20297: return "Asian Indian"; + case _20305: return "Bangladeshi"; + case _20313: return "Bhutanese"; + case _20321: return "Burmese"; + case _20339: return "Cambodian"; + case _20347: return "Chinese"; + case _20354: return "Taiwanese"; + case _20362: return "Filipino"; + case _20370: return "Hmong"; + case _20388: return "Indonesian"; + case _20396: return "Japanese"; + case _20404: return "Korean"; + case _20412: return "Laotian"; + case _20420: return "Malaysian"; + case _20438: return "Okinawan"; + case _20446: return "Pakistani"; + case _20453: return "Sri Lankan"; + case _20461: return "Thai"; + case _20479: return "Vietnamese"; + case _20487: return "Iwo Jiman"; + case _20495: return "Maldivian"; + case _20503: return "Nepalese"; + case _20511: return "Singaporean"; + case _20529: return "Madagascar"; + case _20545: return "Black or African American"; + case _20560: return "Black"; + case _20586: return "African American"; + case _20602: return "African"; + case _20610: return "Botswanan"; + case _20628: return "Ethiopian"; + case _20636: return "Liberian"; + case _20644: return "Namibian"; + case _20651: return "Nigerian"; + case _20669: return "Zairean"; + case _20677: return "Bahamian"; + case _20685: return "Barbadian"; + case _20693: return "Dominican"; + case _20701: return "Dominica Islander"; + case _20719: return "Haitian"; + case _20727: return "Jamaican"; + case _20735: return "Tobagoan"; + case _20743: return "Trinidadian"; + case _20750: return "West Indian"; + case _20768: return "Native Hawaiian or Other Pacific Islander"; + case _20784: return "Polynesian"; + case _20792: return "Native Hawaiian"; + case _20800: return "Samoan"; + case _20818: return "Tahitian"; + case _20826: return "Tongan"; + case _20834: return "Tokelauan"; + case _20859: return "Micronesian"; + case _20867: return "Guamanian or Chamorro"; + case _20875: return "Guamanian"; + case _20883: return "Chamorro"; + case _20891: return "Mariana Islander"; + case _20909: return "Marshallese"; + case _20917: return "Palauan"; + case _20925: return "Carolinian"; + case _20933: return "Kosraean"; + case _20941: return "Pohnpeian"; + case _20958: return "Saipanese"; + case _20966: return "Kiribati"; + case _20974: return "Chuukese"; + case _20982: return "Yapese"; + case _21006: return "Melanesian"; + case _21014: return "Fijian"; + case _21022: return "Papua New Guinean"; + case _21030: return "Solomon Islander"; + case _21048: return "New Hebrides"; + case _25007: return "Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated."; + case _21063: return "White"; + case _21089: return "European"; + case _21097: return "Armenian"; + case _21105: return "English"; + case _21113: return "French"; + case _21121: return "German"; + case _21139: return "Irish"; + case _21147: return "Italian"; + case _21154: return "Polish"; + case _21162: return "Scottish"; + case _21188: return "Middle Eastern or North African"; + case _21196: return "Assyrian"; + case _21204: return "Egyptian"; + case _21212: return "Iranian"; + case _21220: return "Iraqi"; + case _21238: return "Lebanese"; + case _21246: return "Palestinian"; + case _21253: return "Syrian"; + case _21261: return "Afghanistani"; + case _21279: return "Israeili"; + case _21295: return "Arab"; + case _21311: return "Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _10025: return "American Indian or Alaska Native"; + case _10041: return "American Indian"; + case _10066: return "Abenaki"; + case _10082: return "Algonquian"; + case _10108: return "Apache"; + case _10116: return "Chiricahua"; + case _10124: return "Fort Sill Apache"; + case _10132: return "Jicarilla Apache"; + case _10140: return "Lipan Apache"; + case _10157: return "Mescalero Apache"; + case _10165: return "Oklahoma Apache"; + case _10173: return "Payson Apache"; + case _10181: return "San Carlos Apache"; + case _10199: return "White Mountain Apache"; + case _10215: return "Arapaho"; + case _10223: return "Northern Arapaho"; + case _10231: return "Southern Arapaho"; + case _10249: return "Wind River Arapaho"; + case _10264: return "Arikara"; + case _10280: return "Assiniboine"; + case _10306: return "Assiniboine Sioux"; + case _10314: return "Fort Peck Assiniboine Sioux"; + case _10330: return "Bannock"; + case _10355: return "Blackfeet"; + case _10371: return "Brotherton"; + case _10397: return "Burt Lake Band"; + case _10413: return "Caddo"; + case _10421: return "Oklahoma Cado"; + case _10447: return "Cahuilla"; + case _10454: return "Agua Caliente Cahuilla"; + case _10462: return "Augustine"; + case _10470: return "Cabazon"; + case _10488: return "Los Coyotes"; + case _10496: return "Morongo"; + case _10504: return "Santa Rosa Cahuilla"; + case _10512: return "Torres-Martinez"; + case _10538: return "California Tribes"; + case _10546: return "Cahto"; + case _10553: return "Chimariko"; + case _10561: return "Coast Miwok"; + case _10579: return "Digger"; + case _10587: return "Kawaiisu"; + case _10595: return "Kern River"; + case _10603: return "Mattole"; + case _10611: return "Red Wood"; + case _10629: return "Santa Rosa"; + case _10637: return "Takelma"; + case _10645: return "Wappo"; + case _10652: return "Yana"; + case _10660: return "Yuki"; + case _10686: return "Canadian and Latin American Indian"; + case _10694: return "Canadian Indian"; + case _10702: return "Central American Indian"; + case _10710: return "French American Indian"; + case _10728: return "Mexican American Indian"; + case _10736: return "South American Indian"; + case _10744: return "Spanish American Indian"; + case _10769: return "Catawba"; + case _17418: return "Alatna"; + case _17426: return "Alexander"; + case _17434: return "Allakaket"; + case _17442: return "Alanvik"; + case _17459: return "Anvik"; + case _17467: return "Arctic"; + case _17475: return "Beaver"; + case _17483: return "Birch Creek"; + case _17491: return "Cantwell"; + case _17509: return "Chalkyitsik"; + case _17517: return "Chickaloon"; + case _17525: return "Chistochina"; + case _17533: return "Chitina"; + case _17541: return "Circle"; + case _17558: return "Cook Inlet"; + case _17566: return "Copper Center"; + case _17574: return "Copper River"; + case _17582: return "Dot Lake"; + case _17590: return "Doyon"; + case _17608: return "Eagle"; + case _17616: return "Eklutna"; + case _17624: return "Evansville"; + case _17632: return "Fort Yukon"; + case _17640: return "Gakona"; + case _17657: return "Galena"; + case _17665: return "Grayling"; + case _17673: return "Gulkana"; + case _17681: return "Healy Lake"; + case _17699: return "Holy Cross"; + case _17707: return "Hughes"; + case _17715: return "Huslia"; + case _17723: return "Iliamna"; + case _17731: return "Kaltag"; + case _17749: return "Kluti Kaah"; + case _17756: return "Knik"; + case _17764: return "Koyukuk"; + case _17772: return "Lake Minchumina"; + case _17780: return "Lime"; + case _17798: return "Mcgrath"; + case _17806: return "Manley Hot Springs"; + case _17814: return "Mentasta Lake"; + case _17822: return "Minto"; + case _17830: return "Nenana"; + case _17848: return "Nikolai"; + case _17855: return "Ninilchik"; + case _17863: return "Nondalton"; + case _17871: return "Northway"; + case _17889: return "Nulato"; + case _17897: return "Pedro Bay"; + case _17905: return "Rampart"; + case _17913: return "Ruby"; + case _17921: return "Salamatof"; + case _17939: return "Seldovia"; + case _17947: return "Slana"; + case _17954: return "Shageluk"; + case _17962: return "Stevens"; + case _17970: return "Stony River"; + case _17988: return "Takotna"; + case _17996: return "Tanacross"; + case _18002: return "Tanaina"; + case _18010: return "Tanana"; + case _18028: return "Tanana Chiefs"; + case _18036: return "Tazlina"; + case _18044: return "Telida"; + case _18051: return "Tetlin"; + case _18069: return "Tok"; + case _18077: return "Tyonek"; + case _18085: return "Venetie"; + case _18093: return "Wiseman"; + case _10785: return "Cayuse"; + case _10801: return "Chehalis"; + case _10827: return "Chemakuan"; + case _10835: return "Hoh"; + case _10843: return "Quileute"; + case _10868: return "Chemehuevi"; + case _10884: return "Cherokee"; + case _10892: return "Cherokee Alabama"; + case _10900: return "Cherokees of Northeast Alabama"; + case _10918: return "Cherokees of Southeast Alabama"; + case _10926: return "Eastern Cherokee"; + case _10934: return "Echota Cherokee"; + case _10942: return "Etowah Cherokee"; + case _10959: return "Northern Cherokee"; + case _10967: return "Tuscola"; + case _10975: return "United Keetowah Band of Cherokee"; + case _10983: return "Western Cherokee"; + case _11007: return "Cherokee Shawnee"; + case _11023: return "Cheyenne"; + case _11031: return "Northern Cheyenne"; + case _11049: return "Southern Cheyenne"; + case _11064: return "Cheyenne-Arapaho"; + case _11080: return "Chickahominy"; + case _11098: return "Eastern Chickahominy"; + case _11106: return "Western Chickahominy"; + case _11122: return "Chickasaw"; + case _11148: return "Chinook"; + case _11155: return "Clatsop"; + case _11163: return "Columbia River Chinook"; + case _11171: return "Kathlamet"; + case _11189: return "Upper Chinook"; + case _11197: return "Wakiakum Chinook"; + case _11205: return "Willapa Chinook"; + case _11213: return "Wishram"; + case _11239: return "Chippewa"; + case _11247: return "Bad River"; + case _11254: return "Bay Mills Chippewa"; + case _11262: return "Bois Forte"; + case _11270: return "Burt Lake Chippewa"; + case _11288: return "Fond du Lac"; + case _11296: return "Grand Portage"; + case _11304: return "Grand Traverse Band of Ottawa-Chippewa"; + case _11312: return "Keweenaw"; + case _11320: return "Lac Courte Oreilles"; + case _11338: return "Lac du Flambeau"; + case _11346: return "Lac Vieux Desert Chippewa"; + case _11353: return "Lake Superior"; + case _11361: return "Leech Lake"; + case _11379: return "Little Shell Chippewa"; + case _11387: return "Mille Lacs"; + case _11395: return "Minnesota Chippewa"; + case _11403: return "Ontonagon"; + case _11411: return "Red Cliff Chippewa"; + case _11429: return "Red Lake Chippewa"; + case _11437: return "Saginaw Chippewa"; + case _11445: return "St. Croix Chippewa"; + case _11452: return "Sault Ste. Marie Chippewa"; + case _11460: return "Sokoagon Chippewa"; + case _11478: return "Turtle Mountain"; + case _11486: return "White Earth"; + case _11502: return "Chippewa Cree"; + case _11510: return "Rocky Boy's Chippewa Cree"; + case _11536: return "Chitimacha"; + case _11551: return "Choctaw"; + case _11569: return "Clifton Choctaw"; + case _11577: return "Jena Choctaw"; + case _11585: return "Mississippi Choctaw"; + case _11593: return "Mowa Band of Choctaw"; + case _11601: return "Oklahoma Choctaw"; + case _11627: return "Chumash"; + case _11635: return "Santa Ynez"; + case _11650: return "Clear Lake"; + case _11676: return "Coeur D'Alene"; + case _11692: return "Coharie"; + case _11718: return "Colorado River"; + case _11734: return "Colville"; + case _11759: return "Comanche"; + case _11767: return "Oklahoma Comanche"; + case _11783: return "Coos, Lower Umpqua, Siuslaw"; + case _11809: return "Coos"; + case _11825: return "Coquilles"; + case _11841: return "Costanoan"; + case _11866: return "Coushatta"; + case _11874: return "Alabama Coushatta"; + case _11890: return "Cowlitz"; + case _11916: return "Cree"; + case _11932: return "Creek"; + case _11940: return "Alabama Creek"; + case _11957: return "Alabama Quassarte"; + case _11965: return "Eastern Creek"; + case _11973: return "Eastern Muscogee"; + case _11981: return "Kialegee"; + case _11999: return "Lower Muscogee"; + case _12005: return "Machis Lower Creek Indian"; + case _12013: return "Poarch Band"; + case _12021: return "Principal Creek Indian Nation"; + case _12039: return "Star Clan of Muscogee Creeks"; + case _12047: return "Thlopthlocco"; + case _12054: return "Tuckabachee"; + case _12070: return "Croatan"; + case _12096: return "Crow"; + case _12112: return "Cupeno"; + case _12120: return "Agua Caliente"; + case _12146: return "Delaware"; + case _12153: return "Eastern Delaware"; + case _12161: return "Lenni-Lenape"; + case _12179: return "Munsee"; + case _12187: return "Oklahoma Delaware"; + case _12195: return "Rampough Mountain"; + case _12203: return "Sand Hill"; + case _12229: return "Diegueno"; + case _12237: return "Campo"; + case _12245: return "Capitan Grande"; + case _12252: return "Cuyapaipe"; + case _12260: return "La Posta"; + case _12278: return "Manzanita"; + case _12286: return "Mesa Grande"; + case _12294: return "San Pasqual"; + case _12302: return "Santa Ysabel"; + case _12310: return "Sycuan"; + case _12336: return "Eastern Tribes"; + case _12344: return "Attacapa"; + case _12351: return "Biloxi"; + case _12369: return "Georgetown"; + case _12377: return "Moor"; + case _12385: return "Nansemond"; + case _12393: return "Natchez"; + case _12401: return "Nausu Waiwash"; + case _12419: return "Nipmuc"; + case _12427: return "Paugussett"; + case _12435: return "Pocomoke Acohonock"; + case _12443: return "Southeastern Indians"; + case _12450: return "Susquehanock"; + case _12468: return "Tunica Biloxi"; + case _12476: return "Waccamaw-Siousan"; + case _12484: return "Wicomico"; + case _12500: return "Esselen"; + case _12526: return "Fort Belknap"; + case _12542: return "Fort Berthold"; + case _12567: return "Fort Mcdowell"; + case _12583: return "Fort Hall"; + case _12609: return "Gabrieleno"; + case _12625: return "Grand Ronde"; + case _12641: return "Gros Ventres"; + case _12658: return "Atsina"; + case _12674: return "Haliwa"; + case _12690: return "Hidatsa"; + case _12716: return "Hoopa"; + case _12724: return "Trinity"; + case _12732: return "Whilkut"; + case _12757: return "Hoopa Extension"; + case _12773: return "Houma"; + case _12799: return "Inaja-Cosmit"; + case _12815: return "Iowa"; + case _12823: return "Iowa of Kansas-Nebraska"; + case _12831: return "Iowa of Oklahoma"; + case _12856: return "Iroquois"; + case _12864: return "Cayuga"; + case _12872: return "Mohawk"; + case _12880: return "Oneida"; + case _12898: return "Onondaga"; + case _12906: return "Seneca"; + case _12914: return "Seneca Nation"; + case _12922: return "Seneca-Cayuga"; + case _12930: return "Tonawanda Seneca"; + case _12948: return "Tuscarora"; + case _12955: return "Wyandotte"; + case _12971: return "Juaneno"; + case _12997: return "Kalispel"; + case _13011: return "Karuk"; + case _13037: return "Kaw"; + case _13052: return "Kickapoo"; + case _13060: return "Oklahoma Kickapoo"; + case _13078: return "Texas Kickapoo"; + case _13094: return "Kiowa"; + case _13102: return "Oklahoma Kiowa"; + case _13128: return "Klallam"; + case _13136: return "Jamestown"; + case _13144: return "Lower Elwha"; + case _13151: return "Port Gamble Klallam"; + case _13177: return "Klamath"; + case _13193: return "Konkow"; + case _13219: return "Kootenai"; + case _13235: return "Lassik"; + case _13250: return "Long Island"; + case _13268: return "Matinecock"; + case _13276: return "Montauk"; + case _13284: return "Poospatuck"; + case _13292: return "Setauket"; + case _13318: return "Luiseno"; + case _13326: return "La Jolla"; + case _13334: return "Pala"; + case _13342: return "Pauma"; + case _13359: return "Pechanga"; + case _13367: return "Soboba"; + case _13375: return "Twenty-Nine Palms"; + case _13383: return "Temecula"; + case _13409: return "Lumbee"; + case _13425: return "Lummi"; + case _13441: return "Maidu"; + case _13458: return "Mountain Maidu"; + case _13466: return "Nishinam"; + case _13482: return "Makah"; + case _13508: return "Maliseet"; + case _13524: return "Mandan"; + case _13540: return "Mattaponi"; + case _13565: return "Menominee"; + case _13581: return "Miami"; + case _13599: return "Illinois Miami"; + case _13607: return "Indiana Miami"; + case _13615: return "Oklahoma Miami"; + case _13631: return "Miccosukee"; + case _13656: return "Micmac"; + case _13664: return "Aroostook"; + case _13680: return "Mission Indians"; + case _13706: return "Miwok"; + case _13722: return "Modoc"; + case _13748: return "Mohegan"; + case _13763: return "Mono"; + case _13789: return "Nanticoke"; + case _13805: return "Narragansett"; + case _13821: return "Navajo"; + case _13839: return "Alamo Navajo"; + case _13847: return "Canoncito Navajo"; + case _13854: return "Ramah Navajo"; + case _13870: return "Nez Perce"; + case _13896: return "Nomalaki"; + case _13912: return "Northwest Tribes"; + case _13920: return "Alsea"; + case _13938: return "Celilo"; + case _13946: return "Columbia"; + case _13953: return "Kalapuya"; + case _13961: return "Molala"; + case _13979: return "Talakamish"; + case _13987: return "Tenino"; + case _13995: return "Tillamook"; + case _14001: return "Wenatchee"; + case _14019: return "Yahooskin"; + case _14035: return "Omaha"; + case _14050: return "Oregon Athabaskan"; + case _14076: return "Osage"; + case _14092: return "Otoe-Missouria"; + case _14118: return "Ottawa"; + case _14126: return "Burt Lake Ottawa"; + case _14134: return "Michigan Ottawa"; + case _14142: return "Oklahoma Ottawa"; + case _14167: return "Paiute"; + case _14175: return "Bishop"; + case _14183: return "Bridgeport"; + case _14191: return "Burns Paiute"; + case _14209: return "Cedarville"; + case _14217: return "Fort Bidwell"; + case _14225: return "Fort Independence"; + case _14233: return "Kaibab"; + case _14241: return "Las Vegas"; + case _14258: return "Lone Pine"; + case _14266: return "Lovelock"; + case _14274: return "Malheur Paiute"; + case _14282: return "Moapa"; + case _14290: return "Northern Paiute"; + case _14308: return "Owens Valley"; + case _14316: return "Pyramid Lake"; + case _14324: return "San Juan Southern Paiute"; + case _14332: return "Southern Paiute"; + case _14340: return "Summit Lake"; + case _14357: return "Utu Utu Gwaitu Paiute"; + case _14365: return "Walker River"; + case _14373: return "Yerington Paiute"; + case _14399: return "Pamunkey"; + case _14415: return "Passamaquoddy"; + case _14423: return "Indian Township"; + case _14431: return "Pleasant Point Passamaquoddy"; + case _14456: return "Pawnee"; + case _14464: return "Oklahoma Pawnee"; + case _14480: return "Penobscot"; + case _14506: return "Peoria"; + case _14514: return "Oklahoma Peoria"; + case _14530: return "Pequot"; + case _14548: return "Marshantucket Pequot"; + case _14563: return "Pima"; + case _14571: return "Gila River Pima-Maricopa"; + case _14589: return "Salt River Pima-Maricopa"; + case _14605: return "Piscataway"; + case _14621: return "Pit River"; + case _14647: return "Pomo"; + case _14654: return "Central Pomo"; + case _14662: return "Dry Creek"; + case _14670: return "Eastern Pomo"; + case _14688: return "Kashia"; + case _14696: return "Northern Pomo"; + case _14704: return "Scotts Valley"; + case _14712: return "Stonyford"; + case _14720: return "Sulphur Bank"; + case _14746: return "Ponca"; + case _14753: return "Nebraska Ponca"; + case _14761: return "Oklahoma Ponca"; + case _14787: return "Potawatomi"; + case _14795: return "Citizen Band Potawatomi"; + case _14803: return "Forest County"; + case _14811: return "Hannahville"; + case _14829: return "Huron Potawatomi"; + case _14837: return "Pokagon Potawatomi"; + case _14845: return "Prairie Band"; + case _14852: return "Wisconsin Potawatomi"; + case _14878: return "Powhatan"; + case _14894: return "Pueblo"; + case _14902: return "Acoma"; + case _14910: return "Arizona Tewa"; + case _14928: return "Cochiti"; + case _14936: return "Hopi"; + case _14944: return "Isleta"; + case _14951: return "Jemez"; + case _14969: return "Keres"; + case _14977: return "Laguna"; + case _14985: return "Nambe"; + case _14993: return "Picuris"; + case _15008: return "Piro"; + case _15016: return "Pojoaque"; + case _15024: return "San Felipe"; + case _15032: return "San Ildefonso"; + case _15040: return "San Juan Pueblo"; + case _15057: return "San Juan De"; + case _15065: return "San Juan"; + case _15073: return "Sandia"; + case _15081: return "Santa Ana"; + case _15099: return "Santa Clara"; + case _15107: return "Santo Domingo"; + case _15115: return "Taos"; + case _15123: return "Tesuque"; + case _15131: return "Tewa"; + case _15149: return "Tigua"; + case _15156: return "Zia"; + case _15164: return "Zuni"; + case _15180: return "Puget Sound Salish"; + case _15198: return "Duwamish"; + case _15206: return "Kikiallus"; + case _15214: return "Lower Skagit"; + case _15222: return "Muckleshoot"; + case _15230: return "Nisqually"; + case _15248: return "Nooksack"; + case _15255: return "Port Madison"; + case _15263: return "Puyallup"; + case _15271: return "Samish"; + case _15289: return "Sauk-Suiattle"; + case _15297: return "Skokomish"; + case _15305: return "Skykomish"; + case _15313: return "Snohomish"; + case _15321: return "Snoqualmie"; + case _15339: return "Squaxin Island"; + case _15347: return "Steilacoom"; + case _15354: return "Stillaguamish"; + case _15362: return "Suquamish"; + case _15370: return "Swinomish"; + case _15388: return "Tulalip"; + case _15396: return "Upper Skagit"; + case _15412: return "Quapaw"; + case _15438: return "Quinault"; + case _15453: return "Rappahannock"; + case _15479: return "Reno-Sparks"; + case _15495: return "Round Valley"; + case _15511: return "Sac and Fox"; + case _15529: return "Iowa Sac and Fox"; + case _15537: return "Missouri Sac and Fox"; + case _15545: return "Oklahoma Sac and Fox"; + case _15560: return "Salinan"; + case _15586: return "Salish"; + case _15602: return "Salish and Kootenai"; + case _15628: return "Schaghticoke"; + case _15644: return "Scott Valley"; + case _15669: return "Seminole"; + case _15677: return "Big Cypress"; + case _15685: return "Brighton"; + case _15693: return "Florida Seminole"; + case _15701: return "Hollywood Seminole"; + case _15719: return "Oklahoma Seminole"; + case _15735: return "Serrano"; + case _15743: return "San Manual"; + case _15768: return "Shasta"; + case _15784: return "Shawnee"; + case _15792: return "Absentee Shawnee"; + case _15800: return "Eastern Shawnee"; + case _15826: return "Shinnecock"; + case _15842: return "Shoalwater Bay"; + case _15867: return "Shoshone"; + case _15875: return "Battle Mountain"; + case _15883: return "Duckwater"; + case _15891: return "Elko"; + case _15909: return "Ely"; + case _15917: return "Goshute"; + case _15925: return "Panamint"; + case _15933: return "Ruby Valley"; + case _15941: return "Skull Valley"; + case _15958: return "South Fork Shoshone"; + case _15966: return "Te-Moak Western Shoshone"; + case _15974: return "Timbi-Sha Shoshone"; + case _15982: return "Washakie"; + case _15990: return "Wind River Shoshone"; + case _16006: return "Yomba"; + case _16022: return "Shoshone Paiute"; + case _16030: return "Duck Valley"; + case _16048: return "Fallon"; + case _16055: return "Fort McDermitt"; + case _16071: return "Siletz"; + case _16097: return "Sioux"; + case _16105: return "Blackfoot Sioux"; + case _16113: return "Brule Sioux"; + case _16121: return "Cheyenne River Sioux"; + case _16139: return "Crow Creek Sioux"; + case _16147: return "Dakota Sioux"; + case _16154: return "Flandreau Santee"; + case _16162: return "Fort Peck"; + case _16170: return "Lake Traverse Sioux"; + case _16188: return "Lower Brule Sioux"; + case _16196: return "Lower Sioux"; + case _16204: return "Mdewakanton Sioux"; + case _16212: return "Miniconjou"; + case _16220: return "Oglala Sioux"; + case _16238: return "Pine Ridge Sioux"; + case _16246: return "Pipestone Sioux"; + case _16253: return "Prairie Island Sioux"; + case _16261: return "Prior Lake Sioux"; + case _16279: return "Rosebud Sioux"; + case _16287: return "Sans Arc Sioux"; + case _16295: return "Santee Sioux"; + case _16303: return "Sisseton-Wahpeton"; + case _16311: return "Sisseton Sioux"; + case _16329: return "Spirit Lake Sioux"; + case _16337: return "Standing Rock Sioux"; + case _16345: return "Teton Sioux"; + case _16352: return "Two Kettle Sioux"; + case _16360: return "Upper Sioux"; + case _16378: return "Wahpekute Sioux"; + case _16386: return "Wahpeton Sioux"; + case _16394: return "Wazhaza Sioux"; + case _16402: return "Yankton Sioux"; + case _16410: return "Yanktonai Sioux"; + case _16436: return "Siuslaw"; + case _16451: return "Spokane"; + case _16477: return "Stewart"; + case _16493: return "Stockbridge"; + case _16519: return "Susanville"; + case _16535: return "Tohono O'Odham"; + case _16543: return "Ak-Chin"; + case _16550: return "Gila Bend"; + case _16568: return "San Xavier"; + case _16576: return "Sells"; + case _16592: return "Tolowa"; + case _16618: return "Tonkawa"; + case _16634: return "Tygh"; + case _16659: return "Umatilla"; + case _16675: return "Umpqua"; + case _16683: return "Cow Creek Umpqua"; + case _16709: return "Ute"; + case _16717: return "Allen Canyon"; + case _16725: return "Uintah Ute"; + case _16733: return "Ute Mountain Ute"; + case _16758: return "Wailaki"; + case _16774: return "Walla-Walla"; + case _16790: return "Wampanoag"; + case _16808: return "Gay Head Wampanoag"; + case _16816: return "Mashpee Wampanoag"; + case _16832: return "Warm Springs"; + case _16857: return "Wascopum"; + case _16873: return "Washoe"; + case _16881: return "Alpine"; + case _16899: return "Carson"; + case _16907: return "Dresslerville"; + case _16923: return "Wichita"; + case _16949: return "Wind River"; + case _16964: return "Winnebago"; + case _16972: return "Ho-chunk"; + case _16980: return "Nebraska Winnebago"; + case _17004: return "Winnemucca"; + case _17020: return "Wintun"; + case _17046: return "Wiyot"; + case _17053: return "Table Bluff"; + case _17079: return "Yakama"; + case _17095: return "Yakama Cowlitz"; + case _17111: return "Yaqui"; + case _17129: return "Barrio Libre"; + case _17137: return "Pascua Yaqui"; + case _17152: return "Yavapai Apache"; + case _17178: return "Yokuts"; + case _17186: return "Chukchansi"; + case _17194: return "Tachi"; + case _17202: return "Tule River"; + case _17228: return "Yuchi"; + case _17244: return "Yuman"; + case _17251: return "Cocopah"; + case _17269: return "Havasupai"; + case _17277: return "Hualapai"; + case _17285: return "Maricopa"; + case _17293: return "Mohave"; + case _17301: return "Quechan"; + case _17319: return "Yavapai"; + case _17327: return "Yurok"; + case _17335: return "Coast Yurok"; + case _17350: return "Alaska Native"; + case _17376: return "Alaska Indian"; + case _17392: return "Alaskan Athabascan"; + case _17400: return "Ahtna"; + case _18119: return "Southeast Alaska"; + case _18135: return "Tlingit-Haida"; + case _18143: return "Angoon"; + case _18150: return "Central Council of Tlingit and Haida Tribes"; + case _18168: return "Chilkat"; + case _18176: return "Chilkoot"; + case _18184: return "Craig"; + case _18192: return "Douglas"; + case _18200: return "Haida"; + case _18218: return "Hoonah"; + case _18226: return "Hydaburg"; + case _18234: return "Kake"; + case _18242: return "Kasaan"; + case _18259: return "Kenaitze"; + case _18267: return "Ketchikan"; + case _18275: return "Klawock"; + case _18283: return "Pelican"; + case _18291: return "Petersburg"; + case _18309: return "Saxman"; + case _18317: return "Sitka"; + case _18325: return "Tenakee Springs"; + case _18333: return "Tlingit"; + case _18341: return "Wrangell"; + case _18358: return "Yakutat"; + case _18374: return "Tsimshian"; + case _18382: return "Metlakatla"; + case _18408: return "Eskimo"; + case _18424: return "Greenland Eskimo"; + case _18440: return "Inupiat Eskimo"; + case _18457: return "Ambler"; + case _18465: return "Anaktuvuk"; + case _18473: return "Anaktuvuk Pass"; + case _18481: return "Arctic Slope Inupiat"; + case _18499: return "Arctic Slope Corporation"; + case _18507: return "Atqasuk"; + case _18515: return "Barrow"; + case _18523: return "Bering Straits Inupiat"; + case _18531: return "Brevig Mission"; + case _18549: return "Buckland"; + case _18556: return "Chinik"; + case _18564: return "Council"; + case _18572: return "Deering"; + case _18580: return "Elim"; + case _18598: return "Golovin"; + case _18606: return "Inalik Diomede"; + case _18614: return "Inupiaq"; + case _18622: return "Kaktovik"; + case _18630: return "Kawerak"; + case _18648: return "Kiana"; + case _18655: return "Kivalina"; + case _18663: return "Kobuk"; + case _18671: return "Kotzebue"; + case _18689: return "Koyuk"; + case _18697: return "Kwiguk"; + case _18705: return "Mauneluk Inupiat"; + case _18713: return "Nana Inupiat"; + case _18721: return "Noatak"; + case _18739: return "Nome"; + case _18747: return "Noorvik"; + case _18754: return "Nuiqsut"; + case _18762: return "Point Hope"; + case _18770: return "Point Lay"; + case _18788: return "Selawik"; + case _18796: return "Shaktoolik"; + case _18804: return "Shishmaref"; + case _18812: return "Shungnak"; + case _18820: return "Solomon"; + case _18838: return "Teller"; + case _18846: return "Unalakleet"; + case _18853: return "Wainwright"; + case _18861: return "Wales"; + case _18879: return "White Mountain"; + case _18887: return "White Mountain Inupiat"; + case _18895: return "Mary's Igloo"; + case _18911: return "Siberian Eskimo"; + case _18929: return "Gambell"; + case _18937: return "Savoonga"; + case _18945: return "Siberian Yupik"; + case _18960: return "Yupik Eskimo"; + case _18978: return "Akiachak"; + case _18986: return "Akiak"; + case _18994: return "Alakanuk"; + case _19000: return "Aleknagik"; + case _19018: return "Andreafsky"; + case _19026: return "Aniak"; + case _19034: return "Atmautluak"; + case _19042: return "Bethel"; + case _19059: return "Bill Moore's Slough"; + case _19067: return "Bristol Bay Yupik"; + case _19075: return "Calista Yupik"; + case _19083: return "Chefornak"; + case _19091: return "Chevak"; + case _19109: return "Chuathbaluk"; + case _19117: return "Clark's Point"; + case _19125: return "Crooked Creek"; + case _19133: return "Dillingham"; + case _19141: return "Eek"; + case _19158: return "Ekuk"; + case _19166: return "Ekwok"; + case _19174: return "Emmonak"; + case _19182: return "Goodnews Bay"; + case _19190: return "Hooper Bay"; + case _19208: return "Iqurmuit (Russian Mission)"; + case _19216: return "Kalskag"; + case _19224: return "Kasigluk"; + case _19232: return "Kipnuk"; + case _19240: return "Koliganek"; + case _19257: return "Kongiganak"; + case _19265: return "Kotlik"; + case _19273: return "Kwethluk"; + case _19281: return "Kwigillingok"; + case _19299: return "Levelock"; + case _19307: return "Lower Kalskag"; + case _19315: return "Manokotak"; + case _19323: return "Marshall"; + case _19331: return "Mekoryuk"; + case _19349: return "Mountain Village"; + case _19356: return "Naknek"; + case _19364: return "Napaumute"; + case _19372: return "Napakiak"; + case _19380: return "Napaskiak"; + case _19398: return "Newhalen"; + case _19406: return "New Stuyahok"; + case _19414: return "Newtok"; + case _19422: return "Nightmute"; + case _19430: return "Nunapitchukv"; + case _19448: return "Oscarville"; + case _19455: return "Pilot Station"; + case _19463: return "Pitkas Point"; + case _19471: return "Platinum"; + case _19489: return "Portage Creek"; + case _19497: return "Quinhagak"; + case _19505: return "Red Devil"; + case _19513: return "St. Michael"; + case _19521: return "Scammon Bay"; + case _19539: return "Sheldon's Point"; + case _19547: return "Sleetmute"; + case _19554: return "Stebbins"; + case _19562: return "Togiak"; + case _19570: return "Toksook"; + case _19588: return "Tulukskak"; + case _19596: return "Tuntutuliak"; + case _19604: return "Tununak"; + case _19612: return "Twin Hills"; + case _19620: return "Georgetown"; + case _19638: return "St. Mary's"; + case _19646: return "Umkumiate"; + case _19661: return "Aleut"; + case _19687: return "Alutiiq Aleut"; + case _19695: return "Tatitlek"; + case _19703: return "Ugashik"; + case _19729: return "Bristol Bay Aleut"; + case _19737: return "Chignik"; + case _19745: return "Chignik Lake"; + case _19752: return "Egegik"; + case _19760: return "Igiugig"; + case _19778: return "Ivanof Bay"; + case _19786: return "King Salmon"; + case _19794: return "Kokhanok"; + case _19802: return "Perryville"; + case _19810: return "Pilot Point"; + case _19828: return "Port Heiden"; + case _19844: return "Chugach Aleut"; + case _19851: return "Chenega"; + case _19869: return "Chugach Corporation"; + case _19877: return "English Bay"; + case _19885: return "Port Graham"; + case _19901: return "Eyak"; + case _19927: return "Koniag Aleut"; + case _19935: return "Akhiok"; + case _19943: return "Agdaagux"; + case _19950: return "Karluk"; + case _19968: return "Kodiak"; + case _19976: return "Larsen Bay"; + case _19984: return "Old Harbor"; + case _19992: return "Ouzinkie"; + case _20008: return "Port Lions"; + case _20024: return "Sugpiaq"; + case _20040: return "Suqpigaq"; + case _20065: return "Unangan Aleut"; + case _20073: return "Akutan"; + case _20081: return "Aleut Corporation"; + case _20099: return "Aleutian"; + case _20107: return "Aleutian Islander"; + case _20115: return "Atka"; + case _20123: return "Belkofski"; + case _20131: return "Chignik Lagoon"; + case _20149: return "King Cove"; + case _20156: return "False Pass"; + case _20164: return "Nelson Lagoon"; + case _20172: return "Nikolski"; + case _20180: return "Pauloff Harbor"; + case _20198: return "Qagan Toyagungin"; + case _20206: return "Qawalangin"; + case _20214: return "St. George"; + case _20222: return "St. Paul"; + case _20230: return "Sand Point"; + case _20248: return "South Naknek"; + case _20255: return "Unalaska"; + case _20263: return "Unga"; + case _20289: return "Asian"; + case _20297: return "Asian Indian"; + case _20305: return "Bangladeshi"; + case _20313: return "Bhutanese"; + case _20321: return "Burmese"; + case _20339: return "Cambodian"; + case _20347: return "Chinese"; + case _20354: return "Taiwanese"; + case _20362: return "Filipino"; + case _20370: return "Hmong"; + case _20388: return "Indonesian"; + case _20396: return "Japanese"; + case _20404: return "Korean"; + case _20412: return "Laotian"; + case _20420: return "Malaysian"; + case _20438: return "Okinawan"; + case _20446: return "Pakistani"; + case _20453: return "Sri Lankan"; + case _20461: return "Thai"; + case _20479: return "Vietnamese"; + case _20487: return "Iwo Jiman"; + case _20495: return "Maldivian"; + case _20503: return "Nepalese"; + case _20511: return "Singaporean"; + case _20529: return "Madagascar"; + case _20545: return "Black or African American"; + case _20560: return "Black"; + case _20586: return "African American"; + case _20602: return "African"; + case _20610: return "Botswanan"; + case _20628: return "Ethiopian"; + case _20636: return "Liberian"; + case _20644: return "Namibian"; + case _20651: return "Nigerian"; + case _20669: return "Zairean"; + case _20677: return "Bahamian"; + case _20685: return "Barbadian"; + case _20693: return "Dominican"; + case _20701: return "Dominica Islander"; + case _20719: return "Haitian"; + case _20727: return "Jamaican"; + case _20735: return "Tobagoan"; + case _20743: return "Trinidadian"; + case _20750: return "West Indian"; + case _20768: return "Native Hawaiian or Other Pacific Islander"; + case _20784: return "Polynesian"; + case _20792: return "Native Hawaiian"; + case _20800: return "Samoan"; + case _20818: return "Tahitian"; + case _20826: return "Tongan"; + case _20834: return "Tokelauan"; + case _20859: return "Micronesian"; + case _20867: return "Guamanian or Chamorro"; + case _20875: return "Guamanian"; + case _20883: return "Chamorro"; + case _20891: return "Mariana Islander"; + case _20909: return "Marshallese"; + case _20917: return "Palauan"; + case _20925: return "Carolinian"; + case _20933: return "Kosraean"; + case _20941: return "Pohnpeian"; + case _20958: return "Saipanese"; + case _20966: return "Kiribati"; + case _20974: return "Chuukese"; + case _20982: return "Yapese"; + case _21006: return "Melanesian"; + case _21014: return "Fijian"; + case _21022: return "Papua New Guinean"; + case _21030: return "Solomon Islander"; + case _21048: return "New Hebrides"; + case _25007: return "Other Pacific Islander"; + case _21063: return "White"; + case _21089: return "European"; + case _21097: return "Armenian"; + case _21105: return "English"; + case _21113: return "French"; + case _21121: return "German"; + case _21139: return "Irish"; + case _21147: return "Italian"; + case _21154: return "Polish"; + case _21162: return "Scottish"; + case _21188: return "Middle Eastern or North African"; + case _21196: return "Assyrian"; + case _21204: return "Egyptian"; + case _21212: return "Iranian"; + case _21220: return "Iraqi"; + case _21238: return "Lebanese"; + case _21246: return "Palestinian"; + case _21253: return "Syrian"; + case _21261: return "Afghanistani"; + case _21279: return "Israeili"; + case _21295: return "Arab"; + case _21311: return "Other Race"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RaceEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RaceEnumFactory.java new file mode 100644 index 00000000000..426dbe7aef9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RaceEnumFactory.java @@ -0,0 +1,3735 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RaceEnumFactory implements EnumFactory { + + public V3Race fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1002-5".equals(codeString)) + return V3Race._10025; + if ("1004-1".equals(codeString)) + return V3Race._10041; + if ("1006-6".equals(codeString)) + return V3Race._10066; + if ("1008-2".equals(codeString)) + return V3Race._10082; + if ("1010-8".equals(codeString)) + return V3Race._10108; + if ("1011-6".equals(codeString)) + return V3Race._10116; + if ("1012-4".equals(codeString)) + return V3Race._10124; + if ("1013-2".equals(codeString)) + return V3Race._10132; + if ("1014-0".equals(codeString)) + return V3Race._10140; + if ("1015-7".equals(codeString)) + return V3Race._10157; + if ("1016-5".equals(codeString)) + return V3Race._10165; + if ("1017-3".equals(codeString)) + return V3Race._10173; + if ("1018-1".equals(codeString)) + return V3Race._10181; + if ("1019-9".equals(codeString)) + return V3Race._10199; + if ("1021-5".equals(codeString)) + return V3Race._10215; + if ("1022-3".equals(codeString)) + return V3Race._10223; + if ("1023-1".equals(codeString)) + return V3Race._10231; + if ("1024-9".equals(codeString)) + return V3Race._10249; + if ("1026-4".equals(codeString)) + return V3Race._10264; + if ("1028-0".equals(codeString)) + return V3Race._10280; + if ("1030-6".equals(codeString)) + return V3Race._10306; + if ("1031-4".equals(codeString)) + return V3Race._10314; + if ("1033-0".equals(codeString)) + return V3Race._10330; + if ("1035-5".equals(codeString)) + return V3Race._10355; + if ("1037-1".equals(codeString)) + return V3Race._10371; + if ("1039-7".equals(codeString)) + return V3Race._10397; + if ("1041-3".equals(codeString)) + return V3Race._10413; + if ("1042-1".equals(codeString)) + return V3Race._10421; + if ("1044-7".equals(codeString)) + return V3Race._10447; + if ("1045-4".equals(codeString)) + return V3Race._10454; + if ("1046-2".equals(codeString)) + return V3Race._10462; + if ("1047-0".equals(codeString)) + return V3Race._10470; + if ("1048-8".equals(codeString)) + return V3Race._10488; + if ("1049-6".equals(codeString)) + return V3Race._10496; + if ("1050-4".equals(codeString)) + return V3Race._10504; + if ("1051-2".equals(codeString)) + return V3Race._10512; + if ("1053-8".equals(codeString)) + return V3Race._10538; + if ("1054-6".equals(codeString)) + return V3Race._10546; + if ("1055-3".equals(codeString)) + return V3Race._10553; + if ("1056-1".equals(codeString)) + return V3Race._10561; + if ("1057-9".equals(codeString)) + return V3Race._10579; + if ("1058-7".equals(codeString)) + return V3Race._10587; + if ("1059-5".equals(codeString)) + return V3Race._10595; + if ("1060-3".equals(codeString)) + return V3Race._10603; + if ("1061-1".equals(codeString)) + return V3Race._10611; + if ("1062-9".equals(codeString)) + return V3Race._10629; + if ("1063-7".equals(codeString)) + return V3Race._10637; + if ("1064-5".equals(codeString)) + return V3Race._10645; + if ("1065-2".equals(codeString)) + return V3Race._10652; + if ("1066-0".equals(codeString)) + return V3Race._10660; + if ("1068-6".equals(codeString)) + return V3Race._10686; + if ("1069-4".equals(codeString)) + return V3Race._10694; + if ("1070-2".equals(codeString)) + return V3Race._10702; + if ("1071-0".equals(codeString)) + return V3Race._10710; + if ("1072-8".equals(codeString)) + return V3Race._10728; + if ("1073-6".equals(codeString)) + return V3Race._10736; + if ("1074-4".equals(codeString)) + return V3Race._10744; + if ("1076-9".equals(codeString)) + return V3Race._10769; + if ("1741-8".equals(codeString)) + return V3Race._17418; + if ("1742-6".equals(codeString)) + return V3Race._17426; + if ("1743-4".equals(codeString)) + return V3Race._17434; + if ("1744-2".equals(codeString)) + return V3Race._17442; + if ("1745-9".equals(codeString)) + return V3Race._17459; + if ("1746-7".equals(codeString)) + return V3Race._17467; + if ("1747-5".equals(codeString)) + return V3Race._17475; + if ("1748-3".equals(codeString)) + return V3Race._17483; + if ("1749-1".equals(codeString)) + return V3Race._17491; + if ("1750-9".equals(codeString)) + return V3Race._17509; + if ("1751-7".equals(codeString)) + return V3Race._17517; + if ("1752-5".equals(codeString)) + return V3Race._17525; + if ("1753-3".equals(codeString)) + return V3Race._17533; + if ("1754-1".equals(codeString)) + return V3Race._17541; + if ("1755-8".equals(codeString)) + return V3Race._17558; + if ("1756-6".equals(codeString)) + return V3Race._17566; + if ("1757-4".equals(codeString)) + return V3Race._17574; + if ("1758-2".equals(codeString)) + return V3Race._17582; + if ("1759-0".equals(codeString)) + return V3Race._17590; + if ("1760-8".equals(codeString)) + return V3Race._17608; + if ("1761-6".equals(codeString)) + return V3Race._17616; + if ("1762-4".equals(codeString)) + return V3Race._17624; + if ("1763-2".equals(codeString)) + return V3Race._17632; + if ("1764-0".equals(codeString)) + return V3Race._17640; + if ("1765-7".equals(codeString)) + return V3Race._17657; + if ("1766-5".equals(codeString)) + return V3Race._17665; + if ("1767-3".equals(codeString)) + return V3Race._17673; + if ("1768-1".equals(codeString)) + return V3Race._17681; + if ("1769-9".equals(codeString)) + return V3Race._17699; + if ("1770-7".equals(codeString)) + return V3Race._17707; + if ("1771-5".equals(codeString)) + return V3Race._17715; + if ("1772-3".equals(codeString)) + return V3Race._17723; + if ("1773-1".equals(codeString)) + return V3Race._17731; + if ("1774-9".equals(codeString)) + return V3Race._17749; + if ("1775-6".equals(codeString)) + return V3Race._17756; + if ("1776-4".equals(codeString)) + return V3Race._17764; + if ("1777-2".equals(codeString)) + return V3Race._17772; + if ("1778-0".equals(codeString)) + return V3Race._17780; + if ("1779-8".equals(codeString)) + return V3Race._17798; + if ("1780-6".equals(codeString)) + return V3Race._17806; + if ("1781-4".equals(codeString)) + return V3Race._17814; + if ("1782-2".equals(codeString)) + return V3Race._17822; + if ("1783-0".equals(codeString)) + return V3Race._17830; + if ("1784-8".equals(codeString)) + return V3Race._17848; + if ("1785-5".equals(codeString)) + return V3Race._17855; + if ("1786-3".equals(codeString)) + return V3Race._17863; + if ("1787-1".equals(codeString)) + return V3Race._17871; + if ("1788-9".equals(codeString)) + return V3Race._17889; + if ("1789-7".equals(codeString)) + return V3Race._17897; + if ("1790-5".equals(codeString)) + return V3Race._17905; + if ("1791-3".equals(codeString)) + return V3Race._17913; + if ("1792-1".equals(codeString)) + return V3Race._17921; + if ("1793-9".equals(codeString)) + return V3Race._17939; + if ("1794-7".equals(codeString)) + return V3Race._17947; + if ("1795-4".equals(codeString)) + return V3Race._17954; + if ("1796-2".equals(codeString)) + return V3Race._17962; + if ("1797-0".equals(codeString)) + return V3Race._17970; + if ("1798-8".equals(codeString)) + return V3Race._17988; + if ("1799-6".equals(codeString)) + return V3Race._17996; + if ("1800-2".equals(codeString)) + return V3Race._18002; + if ("1801-0".equals(codeString)) + return V3Race._18010; + if ("1802-8".equals(codeString)) + return V3Race._18028; + if ("1803-6".equals(codeString)) + return V3Race._18036; + if ("1804-4".equals(codeString)) + return V3Race._18044; + if ("1805-1".equals(codeString)) + return V3Race._18051; + if ("1806-9".equals(codeString)) + return V3Race._18069; + if ("1807-7".equals(codeString)) + return V3Race._18077; + if ("1808-5".equals(codeString)) + return V3Race._18085; + if ("1809-3".equals(codeString)) + return V3Race._18093; + if ("1078-5".equals(codeString)) + return V3Race._10785; + if ("1080-1".equals(codeString)) + return V3Race._10801; + if ("1082-7".equals(codeString)) + return V3Race._10827; + if ("1083-5".equals(codeString)) + return V3Race._10835; + if ("1084-3".equals(codeString)) + return V3Race._10843; + if ("1086-8".equals(codeString)) + return V3Race._10868; + if ("1088-4".equals(codeString)) + return V3Race._10884; + if ("1089-2".equals(codeString)) + return V3Race._10892; + if ("1090-0".equals(codeString)) + return V3Race._10900; + if ("1091-8".equals(codeString)) + return V3Race._10918; + if ("1092-6".equals(codeString)) + return V3Race._10926; + if ("1093-4".equals(codeString)) + return V3Race._10934; + if ("1094-2".equals(codeString)) + return V3Race._10942; + if ("1095-9".equals(codeString)) + return V3Race._10959; + if ("1096-7".equals(codeString)) + return V3Race._10967; + if ("1097-5".equals(codeString)) + return V3Race._10975; + if ("1098-3".equals(codeString)) + return V3Race._10983; + if ("1100-7".equals(codeString)) + return V3Race._11007; + if ("1102-3".equals(codeString)) + return V3Race._11023; + if ("1103-1".equals(codeString)) + return V3Race._11031; + if ("1104-9".equals(codeString)) + return V3Race._11049; + if ("1106-4".equals(codeString)) + return V3Race._11064; + if ("1108-0".equals(codeString)) + return V3Race._11080; + if ("1109-8".equals(codeString)) + return V3Race._11098; + if ("1110-6".equals(codeString)) + return V3Race._11106; + if ("1112-2".equals(codeString)) + return V3Race._11122; + if ("1114-8".equals(codeString)) + return V3Race._11148; + if ("1115-5".equals(codeString)) + return V3Race._11155; + if ("1116-3".equals(codeString)) + return V3Race._11163; + if ("1117-1".equals(codeString)) + return V3Race._11171; + if ("1118-9".equals(codeString)) + return V3Race._11189; + if ("1119-7".equals(codeString)) + return V3Race._11197; + if ("1120-5".equals(codeString)) + return V3Race._11205; + if ("1121-3".equals(codeString)) + return V3Race._11213; + if ("1123-9".equals(codeString)) + return V3Race._11239; + if ("1124-7".equals(codeString)) + return V3Race._11247; + if ("1125-4".equals(codeString)) + return V3Race._11254; + if ("1126-2".equals(codeString)) + return V3Race._11262; + if ("1127-0".equals(codeString)) + return V3Race._11270; + if ("1128-8".equals(codeString)) + return V3Race._11288; + if ("1129-6".equals(codeString)) + return V3Race._11296; + if ("1130-4".equals(codeString)) + return V3Race._11304; + if ("1131-2".equals(codeString)) + return V3Race._11312; + if ("1132-0".equals(codeString)) + return V3Race._11320; + if ("1133-8".equals(codeString)) + return V3Race._11338; + if ("1134-6".equals(codeString)) + return V3Race._11346; + if ("1135-3".equals(codeString)) + return V3Race._11353; + if ("1136-1".equals(codeString)) + return V3Race._11361; + if ("1137-9".equals(codeString)) + return V3Race._11379; + if ("1138-7".equals(codeString)) + return V3Race._11387; + if ("1139-5".equals(codeString)) + return V3Race._11395; + if ("1140-3".equals(codeString)) + return V3Race._11403; + if ("1141-1".equals(codeString)) + return V3Race._11411; + if ("1142-9".equals(codeString)) + return V3Race._11429; + if ("1143-7".equals(codeString)) + return V3Race._11437; + if ("1144-5".equals(codeString)) + return V3Race._11445; + if ("1145-2".equals(codeString)) + return V3Race._11452; + if ("1146-0".equals(codeString)) + return V3Race._11460; + if ("1147-8".equals(codeString)) + return V3Race._11478; + if ("1148-6".equals(codeString)) + return V3Race._11486; + if ("1150-2".equals(codeString)) + return V3Race._11502; + if ("1151-0".equals(codeString)) + return V3Race._11510; + if ("1153-6".equals(codeString)) + return V3Race._11536; + if ("1155-1".equals(codeString)) + return V3Race._11551; + if ("1156-9".equals(codeString)) + return V3Race._11569; + if ("1157-7".equals(codeString)) + return V3Race._11577; + if ("1158-5".equals(codeString)) + return V3Race._11585; + if ("1159-3".equals(codeString)) + return V3Race._11593; + if ("1160-1".equals(codeString)) + return V3Race._11601; + if ("1162-7".equals(codeString)) + return V3Race._11627; + if ("1163-5".equals(codeString)) + return V3Race._11635; + if ("1165-0".equals(codeString)) + return V3Race._11650; + if ("1167-6".equals(codeString)) + return V3Race._11676; + if ("1169-2".equals(codeString)) + return V3Race._11692; + if ("1171-8".equals(codeString)) + return V3Race._11718; + if ("1173-4".equals(codeString)) + return V3Race._11734; + if ("1175-9".equals(codeString)) + return V3Race._11759; + if ("1176-7".equals(codeString)) + return V3Race._11767; + if ("1178-3".equals(codeString)) + return V3Race._11783; + if ("1180-9".equals(codeString)) + return V3Race._11809; + if ("1182-5".equals(codeString)) + return V3Race._11825; + if ("1184-1".equals(codeString)) + return V3Race._11841; + if ("1186-6".equals(codeString)) + return V3Race._11866; + if ("1187-4".equals(codeString)) + return V3Race._11874; + if ("1189-0".equals(codeString)) + return V3Race._11890; + if ("1191-6".equals(codeString)) + return V3Race._11916; + if ("1193-2".equals(codeString)) + return V3Race._11932; + if ("1194-0".equals(codeString)) + return V3Race._11940; + if ("1195-7".equals(codeString)) + return V3Race._11957; + if ("1196-5".equals(codeString)) + return V3Race._11965; + if ("1197-3".equals(codeString)) + return V3Race._11973; + if ("1198-1".equals(codeString)) + return V3Race._11981; + if ("1199-9".equals(codeString)) + return V3Race._11999; + if ("1200-5".equals(codeString)) + return V3Race._12005; + if ("1201-3".equals(codeString)) + return V3Race._12013; + if ("1202-1".equals(codeString)) + return V3Race._12021; + if ("1203-9".equals(codeString)) + return V3Race._12039; + if ("1204-7".equals(codeString)) + return V3Race._12047; + if ("1205-4".equals(codeString)) + return V3Race._12054; + if ("1207-0".equals(codeString)) + return V3Race._12070; + if ("1209-6".equals(codeString)) + return V3Race._12096; + if ("1211-2".equals(codeString)) + return V3Race._12112; + if ("1212-0".equals(codeString)) + return V3Race._12120; + if ("1214-6".equals(codeString)) + return V3Race._12146; + if ("1215-3".equals(codeString)) + return V3Race._12153; + if ("1216-1".equals(codeString)) + return V3Race._12161; + if ("1217-9".equals(codeString)) + return V3Race._12179; + if ("1218-7".equals(codeString)) + return V3Race._12187; + if ("1219-5".equals(codeString)) + return V3Race._12195; + if ("1220-3".equals(codeString)) + return V3Race._12203; + if ("1222-9".equals(codeString)) + return V3Race._12229; + if ("1223-7".equals(codeString)) + return V3Race._12237; + if ("1224-5".equals(codeString)) + return V3Race._12245; + if ("1225-2".equals(codeString)) + return V3Race._12252; + if ("1226-0".equals(codeString)) + return V3Race._12260; + if ("1227-8".equals(codeString)) + return V3Race._12278; + if ("1228-6".equals(codeString)) + return V3Race._12286; + if ("1229-4".equals(codeString)) + return V3Race._12294; + if ("1230-2".equals(codeString)) + return V3Race._12302; + if ("1231-0".equals(codeString)) + return V3Race._12310; + if ("1233-6".equals(codeString)) + return V3Race._12336; + if ("1234-4".equals(codeString)) + return V3Race._12344; + if ("1235-1".equals(codeString)) + return V3Race._12351; + if ("1236-9".equals(codeString)) + return V3Race._12369; + if ("1237-7".equals(codeString)) + return V3Race._12377; + if ("1238-5".equals(codeString)) + return V3Race._12385; + if ("1239-3".equals(codeString)) + return V3Race._12393; + if ("1240-1".equals(codeString)) + return V3Race._12401; + if ("1241-9".equals(codeString)) + return V3Race._12419; + if ("1242-7".equals(codeString)) + return V3Race._12427; + if ("1243-5".equals(codeString)) + return V3Race._12435; + if ("1244-3".equals(codeString)) + return V3Race._12443; + if ("1245-0".equals(codeString)) + return V3Race._12450; + if ("1246-8".equals(codeString)) + return V3Race._12468; + if ("1247-6".equals(codeString)) + return V3Race._12476; + if ("1248-4".equals(codeString)) + return V3Race._12484; + if ("1250-0".equals(codeString)) + return V3Race._12500; + if ("1252-6".equals(codeString)) + return V3Race._12526; + if ("1254-2".equals(codeString)) + return V3Race._12542; + if ("1256-7".equals(codeString)) + return V3Race._12567; + if ("1258-3".equals(codeString)) + return V3Race._12583; + if ("1260-9".equals(codeString)) + return V3Race._12609; + if ("1262-5".equals(codeString)) + return V3Race._12625; + if ("1264-1".equals(codeString)) + return V3Race._12641; + if ("1265-8".equals(codeString)) + return V3Race._12658; + if ("1267-4".equals(codeString)) + return V3Race._12674; + if ("1269-0".equals(codeString)) + return V3Race._12690; + if ("1271-6".equals(codeString)) + return V3Race._12716; + if ("1272-4".equals(codeString)) + return V3Race._12724; + if ("1273-2".equals(codeString)) + return V3Race._12732; + if ("1275-7".equals(codeString)) + return V3Race._12757; + if ("1277-3".equals(codeString)) + return V3Race._12773; + if ("1279-9".equals(codeString)) + return V3Race._12799; + if ("1281-5".equals(codeString)) + return V3Race._12815; + if ("1282-3".equals(codeString)) + return V3Race._12823; + if ("1283-1".equals(codeString)) + return V3Race._12831; + if ("1285-6".equals(codeString)) + return V3Race._12856; + if ("1286-4".equals(codeString)) + return V3Race._12864; + if ("1287-2".equals(codeString)) + return V3Race._12872; + if ("1288-0".equals(codeString)) + return V3Race._12880; + if ("1289-8".equals(codeString)) + return V3Race._12898; + if ("1290-6".equals(codeString)) + return V3Race._12906; + if ("1291-4".equals(codeString)) + return V3Race._12914; + if ("1292-2".equals(codeString)) + return V3Race._12922; + if ("1293-0".equals(codeString)) + return V3Race._12930; + if ("1294-8".equals(codeString)) + return V3Race._12948; + if ("1295-5".equals(codeString)) + return V3Race._12955; + if ("1297-1".equals(codeString)) + return V3Race._12971; + if ("1299-7".equals(codeString)) + return V3Race._12997; + if ("1301-1".equals(codeString)) + return V3Race._13011; + if ("1303-7".equals(codeString)) + return V3Race._13037; + if ("1305-2".equals(codeString)) + return V3Race._13052; + if ("1306-0".equals(codeString)) + return V3Race._13060; + if ("1307-8".equals(codeString)) + return V3Race._13078; + if ("1309-4".equals(codeString)) + return V3Race._13094; + if ("1310-2".equals(codeString)) + return V3Race._13102; + if ("1312-8".equals(codeString)) + return V3Race._13128; + if ("1313-6".equals(codeString)) + return V3Race._13136; + if ("1314-4".equals(codeString)) + return V3Race._13144; + if ("1315-1".equals(codeString)) + return V3Race._13151; + if ("1317-7".equals(codeString)) + return V3Race._13177; + if ("1319-3".equals(codeString)) + return V3Race._13193; + if ("1321-9".equals(codeString)) + return V3Race._13219; + if ("1323-5".equals(codeString)) + return V3Race._13235; + if ("1325-0".equals(codeString)) + return V3Race._13250; + if ("1326-8".equals(codeString)) + return V3Race._13268; + if ("1327-6".equals(codeString)) + return V3Race._13276; + if ("1328-4".equals(codeString)) + return V3Race._13284; + if ("1329-2".equals(codeString)) + return V3Race._13292; + if ("1331-8".equals(codeString)) + return V3Race._13318; + if ("1332-6".equals(codeString)) + return V3Race._13326; + if ("1333-4".equals(codeString)) + return V3Race._13334; + if ("1334-2".equals(codeString)) + return V3Race._13342; + if ("1335-9".equals(codeString)) + return V3Race._13359; + if ("1336-7".equals(codeString)) + return V3Race._13367; + if ("1337-5".equals(codeString)) + return V3Race._13375; + if ("1338-3".equals(codeString)) + return V3Race._13383; + if ("1340-9".equals(codeString)) + return V3Race._13409; + if ("1342-5".equals(codeString)) + return V3Race._13425; + if ("1344-1".equals(codeString)) + return V3Race._13441; + if ("1345-8".equals(codeString)) + return V3Race._13458; + if ("1346-6".equals(codeString)) + return V3Race._13466; + if ("1348-2".equals(codeString)) + return V3Race._13482; + if ("1350-8".equals(codeString)) + return V3Race._13508; + if ("1352-4".equals(codeString)) + return V3Race._13524; + if ("1354-0".equals(codeString)) + return V3Race._13540; + if ("1356-5".equals(codeString)) + return V3Race._13565; + if ("1358-1".equals(codeString)) + return V3Race._13581; + if ("1359-9".equals(codeString)) + return V3Race._13599; + if ("1360-7".equals(codeString)) + return V3Race._13607; + if ("1361-5".equals(codeString)) + return V3Race._13615; + if ("1363-1".equals(codeString)) + return V3Race._13631; + if ("1365-6".equals(codeString)) + return V3Race._13656; + if ("1366-4".equals(codeString)) + return V3Race._13664; + if ("1368-0".equals(codeString)) + return V3Race._13680; + if ("1370-6".equals(codeString)) + return V3Race._13706; + if ("1372-2".equals(codeString)) + return V3Race._13722; + if ("1374-8".equals(codeString)) + return V3Race._13748; + if ("1376-3".equals(codeString)) + return V3Race._13763; + if ("1378-9".equals(codeString)) + return V3Race._13789; + if ("1380-5".equals(codeString)) + return V3Race._13805; + if ("1382-1".equals(codeString)) + return V3Race._13821; + if ("1383-9".equals(codeString)) + return V3Race._13839; + if ("1384-7".equals(codeString)) + return V3Race._13847; + if ("1385-4".equals(codeString)) + return V3Race._13854; + if ("1387-0".equals(codeString)) + return V3Race._13870; + if ("1389-6".equals(codeString)) + return V3Race._13896; + if ("1391-2".equals(codeString)) + return V3Race._13912; + if ("1392-0".equals(codeString)) + return V3Race._13920; + if ("1393-8".equals(codeString)) + return V3Race._13938; + if ("1394-6".equals(codeString)) + return V3Race._13946; + if ("1395-3".equals(codeString)) + return V3Race._13953; + if ("1396-1".equals(codeString)) + return V3Race._13961; + if ("1397-9".equals(codeString)) + return V3Race._13979; + if ("1398-7".equals(codeString)) + return V3Race._13987; + if ("1399-5".equals(codeString)) + return V3Race._13995; + if ("1400-1".equals(codeString)) + return V3Race._14001; + if ("1401-9".equals(codeString)) + return V3Race._14019; + if ("1403-5".equals(codeString)) + return V3Race._14035; + if ("1405-0".equals(codeString)) + return V3Race._14050; + if ("1407-6".equals(codeString)) + return V3Race._14076; + if ("1409-2".equals(codeString)) + return V3Race._14092; + if ("1411-8".equals(codeString)) + return V3Race._14118; + if ("1412-6".equals(codeString)) + return V3Race._14126; + if ("1413-4".equals(codeString)) + return V3Race._14134; + if ("1414-2".equals(codeString)) + return V3Race._14142; + if ("1416-7".equals(codeString)) + return V3Race._14167; + if ("1417-5".equals(codeString)) + return V3Race._14175; + if ("1418-3".equals(codeString)) + return V3Race._14183; + if ("1419-1".equals(codeString)) + return V3Race._14191; + if ("1420-9".equals(codeString)) + return V3Race._14209; + if ("1421-7".equals(codeString)) + return V3Race._14217; + if ("1422-5".equals(codeString)) + return V3Race._14225; + if ("1423-3".equals(codeString)) + return V3Race._14233; + if ("1424-1".equals(codeString)) + return V3Race._14241; + if ("1425-8".equals(codeString)) + return V3Race._14258; + if ("1426-6".equals(codeString)) + return V3Race._14266; + if ("1427-4".equals(codeString)) + return V3Race._14274; + if ("1428-2".equals(codeString)) + return V3Race._14282; + if ("1429-0".equals(codeString)) + return V3Race._14290; + if ("1430-8".equals(codeString)) + return V3Race._14308; + if ("1431-6".equals(codeString)) + return V3Race._14316; + if ("1432-4".equals(codeString)) + return V3Race._14324; + if ("1433-2".equals(codeString)) + return V3Race._14332; + if ("1434-0".equals(codeString)) + return V3Race._14340; + if ("1435-7".equals(codeString)) + return V3Race._14357; + if ("1436-5".equals(codeString)) + return V3Race._14365; + if ("1437-3".equals(codeString)) + return V3Race._14373; + if ("1439-9".equals(codeString)) + return V3Race._14399; + if ("1441-5".equals(codeString)) + return V3Race._14415; + if ("1442-3".equals(codeString)) + return V3Race._14423; + if ("1443-1".equals(codeString)) + return V3Race._14431; + if ("1445-6".equals(codeString)) + return V3Race._14456; + if ("1446-4".equals(codeString)) + return V3Race._14464; + if ("1448-0".equals(codeString)) + return V3Race._14480; + if ("1450-6".equals(codeString)) + return V3Race._14506; + if ("1451-4".equals(codeString)) + return V3Race._14514; + if ("1453-0".equals(codeString)) + return V3Race._14530; + if ("1454-8".equals(codeString)) + return V3Race._14548; + if ("1456-3".equals(codeString)) + return V3Race._14563; + if ("1457-1".equals(codeString)) + return V3Race._14571; + if ("1458-9".equals(codeString)) + return V3Race._14589; + if ("1460-5".equals(codeString)) + return V3Race._14605; + if ("1462-1".equals(codeString)) + return V3Race._14621; + if ("1464-7".equals(codeString)) + return V3Race._14647; + if ("1465-4".equals(codeString)) + return V3Race._14654; + if ("1466-2".equals(codeString)) + return V3Race._14662; + if ("1467-0".equals(codeString)) + return V3Race._14670; + if ("1468-8".equals(codeString)) + return V3Race._14688; + if ("1469-6".equals(codeString)) + return V3Race._14696; + if ("1470-4".equals(codeString)) + return V3Race._14704; + if ("1471-2".equals(codeString)) + return V3Race._14712; + if ("1472-0".equals(codeString)) + return V3Race._14720; + if ("1474-6".equals(codeString)) + return V3Race._14746; + if ("1475-3".equals(codeString)) + return V3Race._14753; + if ("1476-1".equals(codeString)) + return V3Race._14761; + if ("1478-7".equals(codeString)) + return V3Race._14787; + if ("1479-5".equals(codeString)) + return V3Race._14795; + if ("1480-3".equals(codeString)) + return V3Race._14803; + if ("1481-1".equals(codeString)) + return V3Race._14811; + if ("1482-9".equals(codeString)) + return V3Race._14829; + if ("1483-7".equals(codeString)) + return V3Race._14837; + if ("1484-5".equals(codeString)) + return V3Race._14845; + if ("1485-2".equals(codeString)) + return V3Race._14852; + if ("1487-8".equals(codeString)) + return V3Race._14878; + if ("1489-4".equals(codeString)) + return V3Race._14894; + if ("1490-2".equals(codeString)) + return V3Race._14902; + if ("1491-0".equals(codeString)) + return V3Race._14910; + if ("1492-8".equals(codeString)) + return V3Race._14928; + if ("1493-6".equals(codeString)) + return V3Race._14936; + if ("1494-4".equals(codeString)) + return V3Race._14944; + if ("1495-1".equals(codeString)) + return V3Race._14951; + if ("1496-9".equals(codeString)) + return V3Race._14969; + if ("1497-7".equals(codeString)) + return V3Race._14977; + if ("1498-5".equals(codeString)) + return V3Race._14985; + if ("1499-3".equals(codeString)) + return V3Race._14993; + if ("1500-8".equals(codeString)) + return V3Race._15008; + if ("1501-6".equals(codeString)) + return V3Race._15016; + if ("1502-4".equals(codeString)) + return V3Race._15024; + if ("1503-2".equals(codeString)) + return V3Race._15032; + if ("1504-0".equals(codeString)) + return V3Race._15040; + if ("1505-7".equals(codeString)) + return V3Race._15057; + if ("1506-5".equals(codeString)) + return V3Race._15065; + if ("1507-3".equals(codeString)) + return V3Race._15073; + if ("1508-1".equals(codeString)) + return V3Race._15081; + if ("1509-9".equals(codeString)) + return V3Race._15099; + if ("1510-7".equals(codeString)) + return V3Race._15107; + if ("1511-5".equals(codeString)) + return V3Race._15115; + if ("1512-3".equals(codeString)) + return V3Race._15123; + if ("1513-1".equals(codeString)) + return V3Race._15131; + if ("1514-9".equals(codeString)) + return V3Race._15149; + if ("1515-6".equals(codeString)) + return V3Race._15156; + if ("1516-4".equals(codeString)) + return V3Race._15164; + if ("1518-0".equals(codeString)) + return V3Race._15180; + if ("1519-8".equals(codeString)) + return V3Race._15198; + if ("1520-6".equals(codeString)) + return V3Race._15206; + if ("1521-4".equals(codeString)) + return V3Race._15214; + if ("1522-2".equals(codeString)) + return V3Race._15222; + if ("1523-0".equals(codeString)) + return V3Race._15230; + if ("1524-8".equals(codeString)) + return V3Race._15248; + if ("1525-5".equals(codeString)) + return V3Race._15255; + if ("1526-3".equals(codeString)) + return V3Race._15263; + if ("1527-1".equals(codeString)) + return V3Race._15271; + if ("1528-9".equals(codeString)) + return V3Race._15289; + if ("1529-7".equals(codeString)) + return V3Race._15297; + if ("1530-5".equals(codeString)) + return V3Race._15305; + if ("1531-3".equals(codeString)) + return V3Race._15313; + if ("1532-1".equals(codeString)) + return V3Race._15321; + if ("1533-9".equals(codeString)) + return V3Race._15339; + if ("1534-7".equals(codeString)) + return V3Race._15347; + if ("1535-4".equals(codeString)) + return V3Race._15354; + if ("1536-2".equals(codeString)) + return V3Race._15362; + if ("1537-0".equals(codeString)) + return V3Race._15370; + if ("1538-8".equals(codeString)) + return V3Race._15388; + if ("1539-6".equals(codeString)) + return V3Race._15396; + if ("1541-2".equals(codeString)) + return V3Race._15412; + if ("1543-8".equals(codeString)) + return V3Race._15438; + if ("1545-3".equals(codeString)) + return V3Race._15453; + if ("1547-9".equals(codeString)) + return V3Race._15479; + if ("1549-5".equals(codeString)) + return V3Race._15495; + if ("1551-1".equals(codeString)) + return V3Race._15511; + if ("1552-9".equals(codeString)) + return V3Race._15529; + if ("1553-7".equals(codeString)) + return V3Race._15537; + if ("1554-5".equals(codeString)) + return V3Race._15545; + if ("1556-0".equals(codeString)) + return V3Race._15560; + if ("1558-6".equals(codeString)) + return V3Race._15586; + if ("1560-2".equals(codeString)) + return V3Race._15602; + if ("1562-8".equals(codeString)) + return V3Race._15628; + if ("1564-4".equals(codeString)) + return V3Race._15644; + if ("1566-9".equals(codeString)) + return V3Race._15669; + if ("1567-7".equals(codeString)) + return V3Race._15677; + if ("1568-5".equals(codeString)) + return V3Race._15685; + if ("1569-3".equals(codeString)) + return V3Race._15693; + if ("1570-1".equals(codeString)) + return V3Race._15701; + if ("1571-9".equals(codeString)) + return V3Race._15719; + if ("1573-5".equals(codeString)) + return V3Race._15735; + if ("1574-3".equals(codeString)) + return V3Race._15743; + if ("1576-8".equals(codeString)) + return V3Race._15768; + if ("1578-4".equals(codeString)) + return V3Race._15784; + if ("1579-2".equals(codeString)) + return V3Race._15792; + if ("1580-0".equals(codeString)) + return V3Race._15800; + if ("1582-6".equals(codeString)) + return V3Race._15826; + if ("1584-2".equals(codeString)) + return V3Race._15842; + if ("1586-7".equals(codeString)) + return V3Race._15867; + if ("1587-5".equals(codeString)) + return V3Race._15875; + if ("1588-3".equals(codeString)) + return V3Race._15883; + if ("1589-1".equals(codeString)) + return V3Race._15891; + if ("1590-9".equals(codeString)) + return V3Race._15909; + if ("1591-7".equals(codeString)) + return V3Race._15917; + if ("1592-5".equals(codeString)) + return V3Race._15925; + if ("1593-3".equals(codeString)) + return V3Race._15933; + if ("1594-1".equals(codeString)) + return V3Race._15941; + if ("1595-8".equals(codeString)) + return V3Race._15958; + if ("1596-6".equals(codeString)) + return V3Race._15966; + if ("1597-4".equals(codeString)) + return V3Race._15974; + if ("1598-2".equals(codeString)) + return V3Race._15982; + if ("1599-0".equals(codeString)) + return V3Race._15990; + if ("1600-6".equals(codeString)) + return V3Race._16006; + if ("1602-2".equals(codeString)) + return V3Race._16022; + if ("1603-0".equals(codeString)) + return V3Race._16030; + if ("1604-8".equals(codeString)) + return V3Race._16048; + if ("1605-5".equals(codeString)) + return V3Race._16055; + if ("1607-1".equals(codeString)) + return V3Race._16071; + if ("1609-7".equals(codeString)) + return V3Race._16097; + if ("1610-5".equals(codeString)) + return V3Race._16105; + if ("1611-3".equals(codeString)) + return V3Race._16113; + if ("1612-1".equals(codeString)) + return V3Race._16121; + if ("1613-9".equals(codeString)) + return V3Race._16139; + if ("1614-7".equals(codeString)) + return V3Race._16147; + if ("1615-4".equals(codeString)) + return V3Race._16154; + if ("1616-2".equals(codeString)) + return V3Race._16162; + if ("1617-0".equals(codeString)) + return V3Race._16170; + if ("1618-8".equals(codeString)) + return V3Race._16188; + if ("1619-6".equals(codeString)) + return V3Race._16196; + if ("1620-4".equals(codeString)) + return V3Race._16204; + if ("1621-2".equals(codeString)) + return V3Race._16212; + if ("1622-0".equals(codeString)) + return V3Race._16220; + if ("1623-8".equals(codeString)) + return V3Race._16238; + if ("1624-6".equals(codeString)) + return V3Race._16246; + if ("1625-3".equals(codeString)) + return V3Race._16253; + if ("1626-1".equals(codeString)) + return V3Race._16261; + if ("1627-9".equals(codeString)) + return V3Race._16279; + if ("1628-7".equals(codeString)) + return V3Race._16287; + if ("1629-5".equals(codeString)) + return V3Race._16295; + if ("1630-3".equals(codeString)) + return V3Race._16303; + if ("1631-1".equals(codeString)) + return V3Race._16311; + if ("1632-9".equals(codeString)) + return V3Race._16329; + if ("1633-7".equals(codeString)) + return V3Race._16337; + if ("1634-5".equals(codeString)) + return V3Race._16345; + if ("1635-2".equals(codeString)) + return V3Race._16352; + if ("1636-0".equals(codeString)) + return V3Race._16360; + if ("1637-8".equals(codeString)) + return V3Race._16378; + if ("1638-6".equals(codeString)) + return V3Race._16386; + if ("1639-4".equals(codeString)) + return V3Race._16394; + if ("1640-2".equals(codeString)) + return V3Race._16402; + if ("1641-0".equals(codeString)) + return V3Race._16410; + if ("1643-6".equals(codeString)) + return V3Race._16436; + if ("1645-1".equals(codeString)) + return V3Race._16451; + if ("1647-7".equals(codeString)) + return V3Race._16477; + if ("1649-3".equals(codeString)) + return V3Race._16493; + if ("1651-9".equals(codeString)) + return V3Race._16519; + if ("1653-5".equals(codeString)) + return V3Race._16535; + if ("1654-3".equals(codeString)) + return V3Race._16543; + if ("1655-0".equals(codeString)) + return V3Race._16550; + if ("1656-8".equals(codeString)) + return V3Race._16568; + if ("1657-6".equals(codeString)) + return V3Race._16576; + if ("1659-2".equals(codeString)) + return V3Race._16592; + if ("1661-8".equals(codeString)) + return V3Race._16618; + if ("1663-4".equals(codeString)) + return V3Race._16634; + if ("1665-9".equals(codeString)) + return V3Race._16659; + if ("1667-5".equals(codeString)) + return V3Race._16675; + if ("1668-3".equals(codeString)) + return V3Race._16683; + if ("1670-9".equals(codeString)) + return V3Race._16709; + if ("1671-7".equals(codeString)) + return V3Race._16717; + if ("1672-5".equals(codeString)) + return V3Race._16725; + if ("1673-3".equals(codeString)) + return V3Race._16733; + if ("1675-8".equals(codeString)) + return V3Race._16758; + if ("1677-4".equals(codeString)) + return V3Race._16774; + if ("1679-0".equals(codeString)) + return V3Race._16790; + if ("1680-8".equals(codeString)) + return V3Race._16808; + if ("1681-6".equals(codeString)) + return V3Race._16816; + if ("1683-2".equals(codeString)) + return V3Race._16832; + if ("1685-7".equals(codeString)) + return V3Race._16857; + if ("1687-3".equals(codeString)) + return V3Race._16873; + if ("1688-1".equals(codeString)) + return V3Race._16881; + if ("1689-9".equals(codeString)) + return V3Race._16899; + if ("1690-7".equals(codeString)) + return V3Race._16907; + if ("1692-3".equals(codeString)) + return V3Race._16923; + if ("1694-9".equals(codeString)) + return V3Race._16949; + if ("1696-4".equals(codeString)) + return V3Race._16964; + if ("1697-2".equals(codeString)) + return V3Race._16972; + if ("1698-0".equals(codeString)) + return V3Race._16980; + if ("1700-4".equals(codeString)) + return V3Race._17004; + if ("1702-0".equals(codeString)) + return V3Race._17020; + if ("1704-6".equals(codeString)) + return V3Race._17046; + if ("1705-3".equals(codeString)) + return V3Race._17053; + if ("1707-9".equals(codeString)) + return V3Race._17079; + if ("1709-5".equals(codeString)) + return V3Race._17095; + if ("1711-1".equals(codeString)) + return V3Race._17111; + if ("1712-9".equals(codeString)) + return V3Race._17129; + if ("1713-7".equals(codeString)) + return V3Race._17137; + if ("1715-2".equals(codeString)) + return V3Race._17152; + if ("1717-8".equals(codeString)) + return V3Race._17178; + if ("1718-6".equals(codeString)) + return V3Race._17186; + if ("1719-4".equals(codeString)) + return V3Race._17194; + if ("1720-2".equals(codeString)) + return V3Race._17202; + if ("1722-8".equals(codeString)) + return V3Race._17228; + if ("1724-4".equals(codeString)) + return V3Race._17244; + if ("1725-1".equals(codeString)) + return V3Race._17251; + if ("1726-9".equals(codeString)) + return V3Race._17269; + if ("1727-7".equals(codeString)) + return V3Race._17277; + if ("1728-5".equals(codeString)) + return V3Race._17285; + if ("1729-3".equals(codeString)) + return V3Race._17293; + if ("1730-1".equals(codeString)) + return V3Race._17301; + if ("1731-9".equals(codeString)) + return V3Race._17319; + if ("1732-7".equals(codeString)) + return V3Race._17327; + if ("1733-5".equals(codeString)) + return V3Race._17335; + if ("1735-0".equals(codeString)) + return V3Race._17350; + if ("1737-6".equals(codeString)) + return V3Race._17376; + if ("1739-2".equals(codeString)) + return V3Race._17392; + if ("1740-0".equals(codeString)) + return V3Race._17400; + if ("1811-9".equals(codeString)) + return V3Race._18119; + if ("1813-5".equals(codeString)) + return V3Race._18135; + if ("1814-3".equals(codeString)) + return V3Race._18143; + if ("1815-0".equals(codeString)) + return V3Race._18150; + if ("1816-8".equals(codeString)) + return V3Race._18168; + if ("1817-6".equals(codeString)) + return V3Race._18176; + if ("1818-4".equals(codeString)) + return V3Race._18184; + if ("1819-2".equals(codeString)) + return V3Race._18192; + if ("1820-0".equals(codeString)) + return V3Race._18200; + if ("1821-8".equals(codeString)) + return V3Race._18218; + if ("1822-6".equals(codeString)) + return V3Race._18226; + if ("1823-4".equals(codeString)) + return V3Race._18234; + if ("1824-2".equals(codeString)) + return V3Race._18242; + if ("1825-9".equals(codeString)) + return V3Race._18259; + if ("1826-7".equals(codeString)) + return V3Race._18267; + if ("1827-5".equals(codeString)) + return V3Race._18275; + if ("1828-3".equals(codeString)) + return V3Race._18283; + if ("1829-1".equals(codeString)) + return V3Race._18291; + if ("1830-9".equals(codeString)) + return V3Race._18309; + if ("1831-7".equals(codeString)) + return V3Race._18317; + if ("1832-5".equals(codeString)) + return V3Race._18325; + if ("1833-3".equals(codeString)) + return V3Race._18333; + if ("1834-1".equals(codeString)) + return V3Race._18341; + if ("1835-8".equals(codeString)) + return V3Race._18358; + if ("1837-4".equals(codeString)) + return V3Race._18374; + if ("1838-2".equals(codeString)) + return V3Race._18382; + if ("1840-8".equals(codeString)) + return V3Race._18408; + if ("1842-4".equals(codeString)) + return V3Race._18424; + if ("1844-0".equals(codeString)) + return V3Race._18440; + if ("1845-7".equals(codeString)) + return V3Race._18457; + if ("1846-5".equals(codeString)) + return V3Race._18465; + if ("1847-3".equals(codeString)) + return V3Race._18473; + if ("1848-1".equals(codeString)) + return V3Race._18481; + if ("1849-9".equals(codeString)) + return V3Race._18499; + if ("1850-7".equals(codeString)) + return V3Race._18507; + if ("1851-5".equals(codeString)) + return V3Race._18515; + if ("1852-3".equals(codeString)) + return V3Race._18523; + if ("1853-1".equals(codeString)) + return V3Race._18531; + if ("1854-9".equals(codeString)) + return V3Race._18549; + if ("1855-6".equals(codeString)) + return V3Race._18556; + if ("1856-4".equals(codeString)) + return V3Race._18564; + if ("1857-2".equals(codeString)) + return V3Race._18572; + if ("1858-0".equals(codeString)) + return V3Race._18580; + if ("1859-8".equals(codeString)) + return V3Race._18598; + if ("1860-6".equals(codeString)) + return V3Race._18606; + if ("1861-4".equals(codeString)) + return V3Race._18614; + if ("1862-2".equals(codeString)) + return V3Race._18622; + if ("1863-0".equals(codeString)) + return V3Race._18630; + if ("1864-8".equals(codeString)) + return V3Race._18648; + if ("1865-5".equals(codeString)) + return V3Race._18655; + if ("1866-3".equals(codeString)) + return V3Race._18663; + if ("1867-1".equals(codeString)) + return V3Race._18671; + if ("1868-9".equals(codeString)) + return V3Race._18689; + if ("1869-7".equals(codeString)) + return V3Race._18697; + if ("1870-5".equals(codeString)) + return V3Race._18705; + if ("1871-3".equals(codeString)) + return V3Race._18713; + if ("1872-1".equals(codeString)) + return V3Race._18721; + if ("1873-9".equals(codeString)) + return V3Race._18739; + if ("1874-7".equals(codeString)) + return V3Race._18747; + if ("1875-4".equals(codeString)) + return V3Race._18754; + if ("1876-2".equals(codeString)) + return V3Race._18762; + if ("1877-0".equals(codeString)) + return V3Race._18770; + if ("1878-8".equals(codeString)) + return V3Race._18788; + if ("1879-6".equals(codeString)) + return V3Race._18796; + if ("1880-4".equals(codeString)) + return V3Race._18804; + if ("1881-2".equals(codeString)) + return V3Race._18812; + if ("1882-0".equals(codeString)) + return V3Race._18820; + if ("1883-8".equals(codeString)) + return V3Race._18838; + if ("1884-6".equals(codeString)) + return V3Race._18846; + if ("1885-3".equals(codeString)) + return V3Race._18853; + if ("1886-1".equals(codeString)) + return V3Race._18861; + if ("1887-9".equals(codeString)) + return V3Race._18879; + if ("1888-7".equals(codeString)) + return V3Race._18887; + if ("1889-5".equals(codeString)) + return V3Race._18895; + if ("1891-1".equals(codeString)) + return V3Race._18911; + if ("1892-9".equals(codeString)) + return V3Race._18929; + if ("1893-7".equals(codeString)) + return V3Race._18937; + if ("1894-5".equals(codeString)) + return V3Race._18945; + if ("1896-0".equals(codeString)) + return V3Race._18960; + if ("1897-8".equals(codeString)) + return V3Race._18978; + if ("1898-6".equals(codeString)) + return V3Race._18986; + if ("1899-4".equals(codeString)) + return V3Race._18994; + if ("1900-0".equals(codeString)) + return V3Race._19000; + if ("1901-8".equals(codeString)) + return V3Race._19018; + if ("1902-6".equals(codeString)) + return V3Race._19026; + if ("1903-4".equals(codeString)) + return V3Race._19034; + if ("1904-2".equals(codeString)) + return V3Race._19042; + if ("1905-9".equals(codeString)) + return V3Race._19059; + if ("1906-7".equals(codeString)) + return V3Race._19067; + if ("1907-5".equals(codeString)) + return V3Race._19075; + if ("1908-3".equals(codeString)) + return V3Race._19083; + if ("1909-1".equals(codeString)) + return V3Race._19091; + if ("1910-9".equals(codeString)) + return V3Race._19109; + if ("1911-7".equals(codeString)) + return V3Race._19117; + if ("1912-5".equals(codeString)) + return V3Race._19125; + if ("1913-3".equals(codeString)) + return V3Race._19133; + if ("1914-1".equals(codeString)) + return V3Race._19141; + if ("1915-8".equals(codeString)) + return V3Race._19158; + if ("1916-6".equals(codeString)) + return V3Race._19166; + if ("1917-4".equals(codeString)) + return V3Race._19174; + if ("1918-2".equals(codeString)) + return V3Race._19182; + if ("1919-0".equals(codeString)) + return V3Race._19190; + if ("1920-8".equals(codeString)) + return V3Race._19208; + if ("1921-6".equals(codeString)) + return V3Race._19216; + if ("1922-4".equals(codeString)) + return V3Race._19224; + if ("1923-2".equals(codeString)) + return V3Race._19232; + if ("1924-0".equals(codeString)) + return V3Race._19240; + if ("1925-7".equals(codeString)) + return V3Race._19257; + if ("1926-5".equals(codeString)) + return V3Race._19265; + if ("1927-3".equals(codeString)) + return V3Race._19273; + if ("1928-1".equals(codeString)) + return V3Race._19281; + if ("1929-9".equals(codeString)) + return V3Race._19299; + if ("1930-7".equals(codeString)) + return V3Race._19307; + if ("1931-5".equals(codeString)) + return V3Race._19315; + if ("1932-3".equals(codeString)) + return V3Race._19323; + if ("1933-1".equals(codeString)) + return V3Race._19331; + if ("1934-9".equals(codeString)) + return V3Race._19349; + if ("1935-6".equals(codeString)) + return V3Race._19356; + if ("1936-4".equals(codeString)) + return V3Race._19364; + if ("1937-2".equals(codeString)) + return V3Race._19372; + if ("1938-0".equals(codeString)) + return V3Race._19380; + if ("1939-8".equals(codeString)) + return V3Race._19398; + if ("1940-6".equals(codeString)) + return V3Race._19406; + if ("1941-4".equals(codeString)) + return V3Race._19414; + if ("1942-2".equals(codeString)) + return V3Race._19422; + if ("1943-0".equals(codeString)) + return V3Race._19430; + if ("1944-8".equals(codeString)) + return V3Race._19448; + if ("1945-5".equals(codeString)) + return V3Race._19455; + if ("1946-3".equals(codeString)) + return V3Race._19463; + if ("1947-1".equals(codeString)) + return V3Race._19471; + if ("1948-9".equals(codeString)) + return V3Race._19489; + if ("1949-7".equals(codeString)) + return V3Race._19497; + if ("1950-5".equals(codeString)) + return V3Race._19505; + if ("1951-3".equals(codeString)) + return V3Race._19513; + if ("1952-1".equals(codeString)) + return V3Race._19521; + if ("1953-9".equals(codeString)) + return V3Race._19539; + if ("1954-7".equals(codeString)) + return V3Race._19547; + if ("1955-4".equals(codeString)) + return V3Race._19554; + if ("1956-2".equals(codeString)) + return V3Race._19562; + if ("1957-0".equals(codeString)) + return V3Race._19570; + if ("1958-8".equals(codeString)) + return V3Race._19588; + if ("1959-6".equals(codeString)) + return V3Race._19596; + if ("1960-4".equals(codeString)) + return V3Race._19604; + if ("1961-2".equals(codeString)) + return V3Race._19612; + if ("1962-0".equals(codeString)) + return V3Race._19620; + if ("1963-8".equals(codeString)) + return V3Race._19638; + if ("1964-6".equals(codeString)) + return V3Race._19646; + if ("1966-1".equals(codeString)) + return V3Race._19661; + if ("1968-7".equals(codeString)) + return V3Race._19687; + if ("1969-5".equals(codeString)) + return V3Race._19695; + if ("1970-3".equals(codeString)) + return V3Race._19703; + if ("1972-9".equals(codeString)) + return V3Race._19729; + if ("1973-7".equals(codeString)) + return V3Race._19737; + if ("1974-5".equals(codeString)) + return V3Race._19745; + if ("1975-2".equals(codeString)) + return V3Race._19752; + if ("1976-0".equals(codeString)) + return V3Race._19760; + if ("1977-8".equals(codeString)) + return V3Race._19778; + if ("1978-6".equals(codeString)) + return V3Race._19786; + if ("1979-4".equals(codeString)) + return V3Race._19794; + if ("1980-2".equals(codeString)) + return V3Race._19802; + if ("1981-0".equals(codeString)) + return V3Race._19810; + if ("1982-8".equals(codeString)) + return V3Race._19828; + if ("1984-4".equals(codeString)) + return V3Race._19844; + if ("1985-1".equals(codeString)) + return V3Race._19851; + if ("1986-9".equals(codeString)) + return V3Race._19869; + if ("1987-7".equals(codeString)) + return V3Race._19877; + if ("1988-5".equals(codeString)) + return V3Race._19885; + if ("1990-1".equals(codeString)) + return V3Race._19901; + if ("1992-7".equals(codeString)) + return V3Race._19927; + if ("1993-5".equals(codeString)) + return V3Race._19935; + if ("1994-3".equals(codeString)) + return V3Race._19943; + if ("1995-0".equals(codeString)) + return V3Race._19950; + if ("1996-8".equals(codeString)) + return V3Race._19968; + if ("1997-6".equals(codeString)) + return V3Race._19976; + if ("1998-4".equals(codeString)) + return V3Race._19984; + if ("1999-2".equals(codeString)) + return V3Race._19992; + if ("2000-8".equals(codeString)) + return V3Race._20008; + if ("2002-4".equals(codeString)) + return V3Race._20024; + if ("2004-0".equals(codeString)) + return V3Race._20040; + if ("2006-5".equals(codeString)) + return V3Race._20065; + if ("2007-3".equals(codeString)) + return V3Race._20073; + if ("2008-1".equals(codeString)) + return V3Race._20081; + if ("2009-9".equals(codeString)) + return V3Race._20099; + if ("2010-7".equals(codeString)) + return V3Race._20107; + if ("2011-5".equals(codeString)) + return V3Race._20115; + if ("2012-3".equals(codeString)) + return V3Race._20123; + if ("2013-1".equals(codeString)) + return V3Race._20131; + if ("2014-9".equals(codeString)) + return V3Race._20149; + if ("2015-6".equals(codeString)) + return V3Race._20156; + if ("2016-4".equals(codeString)) + return V3Race._20164; + if ("2017-2".equals(codeString)) + return V3Race._20172; + if ("2018-0".equals(codeString)) + return V3Race._20180; + if ("2019-8".equals(codeString)) + return V3Race._20198; + if ("2020-6".equals(codeString)) + return V3Race._20206; + if ("2021-4".equals(codeString)) + return V3Race._20214; + if ("2022-2".equals(codeString)) + return V3Race._20222; + if ("2023-0".equals(codeString)) + return V3Race._20230; + if ("2024-8".equals(codeString)) + return V3Race._20248; + if ("2025-5".equals(codeString)) + return V3Race._20255; + if ("2026-3".equals(codeString)) + return V3Race._20263; + if ("2028-9".equals(codeString)) + return V3Race._20289; + if ("2029-7".equals(codeString)) + return V3Race._20297; + if ("2030-5".equals(codeString)) + return V3Race._20305; + if ("2031-3".equals(codeString)) + return V3Race._20313; + if ("2032-1".equals(codeString)) + return V3Race._20321; + if ("2033-9".equals(codeString)) + return V3Race._20339; + if ("2034-7".equals(codeString)) + return V3Race._20347; + if ("2035-4".equals(codeString)) + return V3Race._20354; + if ("2036-2".equals(codeString)) + return V3Race._20362; + if ("2037-0".equals(codeString)) + return V3Race._20370; + if ("2038-8".equals(codeString)) + return V3Race._20388; + if ("2039-6".equals(codeString)) + return V3Race._20396; + if ("2040-4".equals(codeString)) + return V3Race._20404; + if ("2041-2".equals(codeString)) + return V3Race._20412; + if ("2042-0".equals(codeString)) + return V3Race._20420; + if ("2043-8".equals(codeString)) + return V3Race._20438; + if ("2044-6".equals(codeString)) + return V3Race._20446; + if ("2045-3".equals(codeString)) + return V3Race._20453; + if ("2046-1".equals(codeString)) + return V3Race._20461; + if ("2047-9".equals(codeString)) + return V3Race._20479; + if ("2048-7".equals(codeString)) + return V3Race._20487; + if ("2049-5".equals(codeString)) + return V3Race._20495; + if ("2050-3".equals(codeString)) + return V3Race._20503; + if ("2051-1".equals(codeString)) + return V3Race._20511; + if ("2052-9".equals(codeString)) + return V3Race._20529; + if ("2054-5".equals(codeString)) + return V3Race._20545; + if ("2056-0".equals(codeString)) + return V3Race._20560; + if ("2058-6".equals(codeString)) + return V3Race._20586; + if ("2060-2".equals(codeString)) + return V3Race._20602; + if ("2061-0".equals(codeString)) + return V3Race._20610; + if ("2062-8".equals(codeString)) + return V3Race._20628; + if ("2063-6".equals(codeString)) + return V3Race._20636; + if ("2064-4".equals(codeString)) + return V3Race._20644; + if ("2065-1".equals(codeString)) + return V3Race._20651; + if ("2066-9".equals(codeString)) + return V3Race._20669; + if ("2067-7".equals(codeString)) + return V3Race._20677; + if ("2068-5".equals(codeString)) + return V3Race._20685; + if ("2069-3".equals(codeString)) + return V3Race._20693; + if ("2070-1".equals(codeString)) + return V3Race._20701; + if ("2071-9".equals(codeString)) + return V3Race._20719; + if ("2072-7".equals(codeString)) + return V3Race._20727; + if ("2073-5".equals(codeString)) + return V3Race._20735; + if ("2074-3".equals(codeString)) + return V3Race._20743; + if ("2075-0".equals(codeString)) + return V3Race._20750; + if ("2076-8".equals(codeString)) + return V3Race._20768; + if ("2078-4".equals(codeString)) + return V3Race._20784; + if ("2079-2".equals(codeString)) + return V3Race._20792; + if ("2080-0".equals(codeString)) + return V3Race._20800; + if ("2081-8".equals(codeString)) + return V3Race._20818; + if ("2082-6".equals(codeString)) + return V3Race._20826; + if ("2083-4".equals(codeString)) + return V3Race._20834; + if ("2085-9".equals(codeString)) + return V3Race._20859; + if ("2086-7".equals(codeString)) + return V3Race._20867; + if ("2087-5".equals(codeString)) + return V3Race._20875; + if ("2088-3".equals(codeString)) + return V3Race._20883; + if ("2089-1".equals(codeString)) + return V3Race._20891; + if ("2090-9".equals(codeString)) + return V3Race._20909; + if ("2091-7".equals(codeString)) + return V3Race._20917; + if ("2092-5".equals(codeString)) + return V3Race._20925; + if ("2093-3".equals(codeString)) + return V3Race._20933; + if ("2094-1".equals(codeString)) + return V3Race._20941; + if ("2095-8".equals(codeString)) + return V3Race._20958; + if ("2096-6".equals(codeString)) + return V3Race._20966; + if ("2097-4".equals(codeString)) + return V3Race._20974; + if ("2098-2".equals(codeString)) + return V3Race._20982; + if ("2100-6".equals(codeString)) + return V3Race._21006; + if ("2101-4".equals(codeString)) + return V3Race._21014; + if ("2102-2".equals(codeString)) + return V3Race._21022; + if ("2103-0".equals(codeString)) + return V3Race._21030; + if ("2104-8".equals(codeString)) + return V3Race._21048; + if ("2500-7".equals(codeString)) + return V3Race._25007; + if ("2106-3".equals(codeString)) + return V3Race._21063; + if ("2108-9".equals(codeString)) + return V3Race._21089; + if ("2109-7".equals(codeString)) + return V3Race._21097; + if ("2110-5".equals(codeString)) + return V3Race._21105; + if ("2111-3".equals(codeString)) + return V3Race._21113; + if ("2112-1".equals(codeString)) + return V3Race._21121; + if ("2113-9".equals(codeString)) + return V3Race._21139; + if ("2114-7".equals(codeString)) + return V3Race._21147; + if ("2115-4".equals(codeString)) + return V3Race._21154; + if ("2116-2".equals(codeString)) + return V3Race._21162; + if ("2118-8".equals(codeString)) + return V3Race._21188; + if ("2119-6".equals(codeString)) + return V3Race._21196; + if ("2120-4".equals(codeString)) + return V3Race._21204; + if ("2121-2".equals(codeString)) + return V3Race._21212; + if ("2122-0".equals(codeString)) + return V3Race._21220; + if ("2123-8".equals(codeString)) + return V3Race._21238; + if ("2124-6".equals(codeString)) + return V3Race._21246; + if ("2125-3".equals(codeString)) + return V3Race._21253; + if ("2126-1".equals(codeString)) + return V3Race._21261; + if ("2127-9".equals(codeString)) + return V3Race._21279; + if ("2129-5".equals(codeString)) + return V3Race._21295; + if ("2131-1".equals(codeString)) + return V3Race._21311; + throw new IllegalArgumentException("Unknown V3Race code '"+codeString+"'"); + } + + public String toCode(V3Race code) { + if (code == V3Race._10025) + return "1002-5"; + if (code == V3Race._10041) + return "1004-1"; + if (code == V3Race._10066) + return "1006-6"; + if (code == V3Race._10082) + return "1008-2"; + if (code == V3Race._10108) + return "1010-8"; + if (code == V3Race._10116) + return "1011-6"; + if (code == V3Race._10124) + return "1012-4"; + if (code == V3Race._10132) + return "1013-2"; + if (code == V3Race._10140) + return "1014-0"; + if (code == V3Race._10157) + return "1015-7"; + if (code == V3Race._10165) + return "1016-5"; + if (code == V3Race._10173) + return "1017-3"; + if (code == V3Race._10181) + return "1018-1"; + if (code == V3Race._10199) + return "1019-9"; + if (code == V3Race._10215) + return "1021-5"; + if (code == V3Race._10223) + return "1022-3"; + if (code == V3Race._10231) + return "1023-1"; + if (code == V3Race._10249) + return "1024-9"; + if (code == V3Race._10264) + return "1026-4"; + if (code == V3Race._10280) + return "1028-0"; + if (code == V3Race._10306) + return "1030-6"; + if (code == V3Race._10314) + return "1031-4"; + if (code == V3Race._10330) + return "1033-0"; + if (code == V3Race._10355) + return "1035-5"; + if (code == V3Race._10371) + return "1037-1"; + if (code == V3Race._10397) + return "1039-7"; + if (code == V3Race._10413) + return "1041-3"; + if (code == V3Race._10421) + return "1042-1"; + if (code == V3Race._10447) + return "1044-7"; + if (code == V3Race._10454) + return "1045-4"; + if (code == V3Race._10462) + return "1046-2"; + if (code == V3Race._10470) + return "1047-0"; + if (code == V3Race._10488) + return "1048-8"; + if (code == V3Race._10496) + return "1049-6"; + if (code == V3Race._10504) + return "1050-4"; + if (code == V3Race._10512) + return "1051-2"; + if (code == V3Race._10538) + return "1053-8"; + if (code == V3Race._10546) + return "1054-6"; + if (code == V3Race._10553) + return "1055-3"; + if (code == V3Race._10561) + return "1056-1"; + if (code == V3Race._10579) + return "1057-9"; + if (code == V3Race._10587) + return "1058-7"; + if (code == V3Race._10595) + return "1059-5"; + if (code == V3Race._10603) + return "1060-3"; + if (code == V3Race._10611) + return "1061-1"; + if (code == V3Race._10629) + return "1062-9"; + if (code == V3Race._10637) + return "1063-7"; + if (code == V3Race._10645) + return "1064-5"; + if (code == V3Race._10652) + return "1065-2"; + if (code == V3Race._10660) + return "1066-0"; + if (code == V3Race._10686) + return "1068-6"; + if (code == V3Race._10694) + return "1069-4"; + if (code == V3Race._10702) + return "1070-2"; + if (code == V3Race._10710) + return "1071-0"; + if (code == V3Race._10728) + return "1072-8"; + if (code == V3Race._10736) + return "1073-6"; + if (code == V3Race._10744) + return "1074-4"; + if (code == V3Race._10769) + return "1076-9"; + if (code == V3Race._17418) + return "1741-8"; + if (code == V3Race._17426) + return "1742-6"; + if (code == V3Race._17434) + return "1743-4"; + if (code == V3Race._17442) + return "1744-2"; + if (code == V3Race._17459) + return "1745-9"; + if (code == V3Race._17467) + return "1746-7"; + if (code == V3Race._17475) + return "1747-5"; + if (code == V3Race._17483) + return "1748-3"; + if (code == V3Race._17491) + return "1749-1"; + if (code == V3Race._17509) + return "1750-9"; + if (code == V3Race._17517) + return "1751-7"; + if (code == V3Race._17525) + return "1752-5"; + if (code == V3Race._17533) + return "1753-3"; + if (code == V3Race._17541) + return "1754-1"; + if (code == V3Race._17558) + return "1755-8"; + if (code == V3Race._17566) + return "1756-6"; + if (code == V3Race._17574) + return "1757-4"; + if (code == V3Race._17582) + return "1758-2"; + if (code == V3Race._17590) + return "1759-0"; + if (code == V3Race._17608) + return "1760-8"; + if (code == V3Race._17616) + return "1761-6"; + if (code == V3Race._17624) + return "1762-4"; + if (code == V3Race._17632) + return "1763-2"; + if (code == V3Race._17640) + return "1764-0"; + if (code == V3Race._17657) + return "1765-7"; + if (code == V3Race._17665) + return "1766-5"; + if (code == V3Race._17673) + return "1767-3"; + if (code == V3Race._17681) + return "1768-1"; + if (code == V3Race._17699) + return "1769-9"; + if (code == V3Race._17707) + return "1770-7"; + if (code == V3Race._17715) + return "1771-5"; + if (code == V3Race._17723) + return "1772-3"; + if (code == V3Race._17731) + return "1773-1"; + if (code == V3Race._17749) + return "1774-9"; + if (code == V3Race._17756) + return "1775-6"; + if (code == V3Race._17764) + return "1776-4"; + if (code == V3Race._17772) + return "1777-2"; + if (code == V3Race._17780) + return "1778-0"; + if (code == V3Race._17798) + return "1779-8"; + if (code == V3Race._17806) + return "1780-6"; + if (code == V3Race._17814) + return "1781-4"; + if (code == V3Race._17822) + return "1782-2"; + if (code == V3Race._17830) + return "1783-0"; + if (code == V3Race._17848) + return "1784-8"; + if (code == V3Race._17855) + return "1785-5"; + if (code == V3Race._17863) + return "1786-3"; + if (code == V3Race._17871) + return "1787-1"; + if (code == V3Race._17889) + return "1788-9"; + if (code == V3Race._17897) + return "1789-7"; + if (code == V3Race._17905) + return "1790-5"; + if (code == V3Race._17913) + return "1791-3"; + if (code == V3Race._17921) + return "1792-1"; + if (code == V3Race._17939) + return "1793-9"; + if (code == V3Race._17947) + return "1794-7"; + if (code == V3Race._17954) + return "1795-4"; + if (code == V3Race._17962) + return "1796-2"; + if (code == V3Race._17970) + return "1797-0"; + if (code == V3Race._17988) + return "1798-8"; + if (code == V3Race._17996) + return "1799-6"; + if (code == V3Race._18002) + return "1800-2"; + if (code == V3Race._18010) + return "1801-0"; + if (code == V3Race._18028) + return "1802-8"; + if (code == V3Race._18036) + return "1803-6"; + if (code == V3Race._18044) + return "1804-4"; + if (code == V3Race._18051) + return "1805-1"; + if (code == V3Race._18069) + return "1806-9"; + if (code == V3Race._18077) + return "1807-7"; + if (code == V3Race._18085) + return "1808-5"; + if (code == V3Race._18093) + return "1809-3"; + if (code == V3Race._10785) + return "1078-5"; + if (code == V3Race._10801) + return "1080-1"; + if (code == V3Race._10827) + return "1082-7"; + if (code == V3Race._10835) + return "1083-5"; + if (code == V3Race._10843) + return "1084-3"; + if (code == V3Race._10868) + return "1086-8"; + if (code == V3Race._10884) + return "1088-4"; + if (code == V3Race._10892) + return "1089-2"; + if (code == V3Race._10900) + return "1090-0"; + if (code == V3Race._10918) + return "1091-8"; + if (code == V3Race._10926) + return "1092-6"; + if (code == V3Race._10934) + return "1093-4"; + if (code == V3Race._10942) + return "1094-2"; + if (code == V3Race._10959) + return "1095-9"; + if (code == V3Race._10967) + return "1096-7"; + if (code == V3Race._10975) + return "1097-5"; + if (code == V3Race._10983) + return "1098-3"; + if (code == V3Race._11007) + return "1100-7"; + if (code == V3Race._11023) + return "1102-3"; + if (code == V3Race._11031) + return "1103-1"; + if (code == V3Race._11049) + return "1104-9"; + if (code == V3Race._11064) + return "1106-4"; + if (code == V3Race._11080) + return "1108-0"; + if (code == V3Race._11098) + return "1109-8"; + if (code == V3Race._11106) + return "1110-6"; + if (code == V3Race._11122) + return "1112-2"; + if (code == V3Race._11148) + return "1114-8"; + if (code == V3Race._11155) + return "1115-5"; + if (code == V3Race._11163) + return "1116-3"; + if (code == V3Race._11171) + return "1117-1"; + if (code == V3Race._11189) + return "1118-9"; + if (code == V3Race._11197) + return "1119-7"; + if (code == V3Race._11205) + return "1120-5"; + if (code == V3Race._11213) + return "1121-3"; + if (code == V3Race._11239) + return "1123-9"; + if (code == V3Race._11247) + return "1124-7"; + if (code == V3Race._11254) + return "1125-4"; + if (code == V3Race._11262) + return "1126-2"; + if (code == V3Race._11270) + return "1127-0"; + if (code == V3Race._11288) + return "1128-8"; + if (code == V3Race._11296) + return "1129-6"; + if (code == V3Race._11304) + return "1130-4"; + if (code == V3Race._11312) + return "1131-2"; + if (code == V3Race._11320) + return "1132-0"; + if (code == V3Race._11338) + return "1133-8"; + if (code == V3Race._11346) + return "1134-6"; + if (code == V3Race._11353) + return "1135-3"; + if (code == V3Race._11361) + return "1136-1"; + if (code == V3Race._11379) + return "1137-9"; + if (code == V3Race._11387) + return "1138-7"; + if (code == V3Race._11395) + return "1139-5"; + if (code == V3Race._11403) + return "1140-3"; + if (code == V3Race._11411) + return "1141-1"; + if (code == V3Race._11429) + return "1142-9"; + if (code == V3Race._11437) + return "1143-7"; + if (code == V3Race._11445) + return "1144-5"; + if (code == V3Race._11452) + return "1145-2"; + if (code == V3Race._11460) + return "1146-0"; + if (code == V3Race._11478) + return "1147-8"; + if (code == V3Race._11486) + return "1148-6"; + if (code == V3Race._11502) + return "1150-2"; + if (code == V3Race._11510) + return "1151-0"; + if (code == V3Race._11536) + return "1153-6"; + if (code == V3Race._11551) + return "1155-1"; + if (code == V3Race._11569) + return "1156-9"; + if (code == V3Race._11577) + return "1157-7"; + if (code == V3Race._11585) + return "1158-5"; + if (code == V3Race._11593) + return "1159-3"; + if (code == V3Race._11601) + return "1160-1"; + if (code == V3Race._11627) + return "1162-7"; + if (code == V3Race._11635) + return "1163-5"; + if (code == V3Race._11650) + return "1165-0"; + if (code == V3Race._11676) + return "1167-6"; + if (code == V3Race._11692) + return "1169-2"; + if (code == V3Race._11718) + return "1171-8"; + if (code == V3Race._11734) + return "1173-4"; + if (code == V3Race._11759) + return "1175-9"; + if (code == V3Race._11767) + return "1176-7"; + if (code == V3Race._11783) + return "1178-3"; + if (code == V3Race._11809) + return "1180-9"; + if (code == V3Race._11825) + return "1182-5"; + if (code == V3Race._11841) + return "1184-1"; + if (code == V3Race._11866) + return "1186-6"; + if (code == V3Race._11874) + return "1187-4"; + if (code == V3Race._11890) + return "1189-0"; + if (code == V3Race._11916) + return "1191-6"; + if (code == V3Race._11932) + return "1193-2"; + if (code == V3Race._11940) + return "1194-0"; + if (code == V3Race._11957) + return "1195-7"; + if (code == V3Race._11965) + return "1196-5"; + if (code == V3Race._11973) + return "1197-3"; + if (code == V3Race._11981) + return "1198-1"; + if (code == V3Race._11999) + return "1199-9"; + if (code == V3Race._12005) + return "1200-5"; + if (code == V3Race._12013) + return "1201-3"; + if (code == V3Race._12021) + return "1202-1"; + if (code == V3Race._12039) + return "1203-9"; + if (code == V3Race._12047) + return "1204-7"; + if (code == V3Race._12054) + return "1205-4"; + if (code == V3Race._12070) + return "1207-0"; + if (code == V3Race._12096) + return "1209-6"; + if (code == V3Race._12112) + return "1211-2"; + if (code == V3Race._12120) + return "1212-0"; + if (code == V3Race._12146) + return "1214-6"; + if (code == V3Race._12153) + return "1215-3"; + if (code == V3Race._12161) + return "1216-1"; + if (code == V3Race._12179) + return "1217-9"; + if (code == V3Race._12187) + return "1218-7"; + if (code == V3Race._12195) + return "1219-5"; + if (code == V3Race._12203) + return "1220-3"; + if (code == V3Race._12229) + return "1222-9"; + if (code == V3Race._12237) + return "1223-7"; + if (code == V3Race._12245) + return "1224-5"; + if (code == V3Race._12252) + return "1225-2"; + if (code == V3Race._12260) + return "1226-0"; + if (code == V3Race._12278) + return "1227-8"; + if (code == V3Race._12286) + return "1228-6"; + if (code == V3Race._12294) + return "1229-4"; + if (code == V3Race._12302) + return "1230-2"; + if (code == V3Race._12310) + return "1231-0"; + if (code == V3Race._12336) + return "1233-6"; + if (code == V3Race._12344) + return "1234-4"; + if (code == V3Race._12351) + return "1235-1"; + if (code == V3Race._12369) + return "1236-9"; + if (code == V3Race._12377) + return "1237-7"; + if (code == V3Race._12385) + return "1238-5"; + if (code == V3Race._12393) + return "1239-3"; + if (code == V3Race._12401) + return "1240-1"; + if (code == V3Race._12419) + return "1241-9"; + if (code == V3Race._12427) + return "1242-7"; + if (code == V3Race._12435) + return "1243-5"; + if (code == V3Race._12443) + return "1244-3"; + if (code == V3Race._12450) + return "1245-0"; + if (code == V3Race._12468) + return "1246-8"; + if (code == V3Race._12476) + return "1247-6"; + if (code == V3Race._12484) + return "1248-4"; + if (code == V3Race._12500) + return "1250-0"; + if (code == V3Race._12526) + return "1252-6"; + if (code == V3Race._12542) + return "1254-2"; + if (code == V3Race._12567) + return "1256-7"; + if (code == V3Race._12583) + return "1258-3"; + if (code == V3Race._12609) + return "1260-9"; + if (code == V3Race._12625) + return "1262-5"; + if (code == V3Race._12641) + return "1264-1"; + if (code == V3Race._12658) + return "1265-8"; + if (code == V3Race._12674) + return "1267-4"; + if (code == V3Race._12690) + return "1269-0"; + if (code == V3Race._12716) + return "1271-6"; + if (code == V3Race._12724) + return "1272-4"; + if (code == V3Race._12732) + return "1273-2"; + if (code == V3Race._12757) + return "1275-7"; + if (code == V3Race._12773) + return "1277-3"; + if (code == V3Race._12799) + return "1279-9"; + if (code == V3Race._12815) + return "1281-5"; + if (code == V3Race._12823) + return "1282-3"; + if (code == V3Race._12831) + return "1283-1"; + if (code == V3Race._12856) + return "1285-6"; + if (code == V3Race._12864) + return "1286-4"; + if (code == V3Race._12872) + return "1287-2"; + if (code == V3Race._12880) + return "1288-0"; + if (code == V3Race._12898) + return "1289-8"; + if (code == V3Race._12906) + return "1290-6"; + if (code == V3Race._12914) + return "1291-4"; + if (code == V3Race._12922) + return "1292-2"; + if (code == V3Race._12930) + return "1293-0"; + if (code == V3Race._12948) + return "1294-8"; + if (code == V3Race._12955) + return "1295-5"; + if (code == V3Race._12971) + return "1297-1"; + if (code == V3Race._12997) + return "1299-7"; + if (code == V3Race._13011) + return "1301-1"; + if (code == V3Race._13037) + return "1303-7"; + if (code == V3Race._13052) + return "1305-2"; + if (code == V3Race._13060) + return "1306-0"; + if (code == V3Race._13078) + return "1307-8"; + if (code == V3Race._13094) + return "1309-4"; + if (code == V3Race._13102) + return "1310-2"; + if (code == V3Race._13128) + return "1312-8"; + if (code == V3Race._13136) + return "1313-6"; + if (code == V3Race._13144) + return "1314-4"; + if (code == V3Race._13151) + return "1315-1"; + if (code == V3Race._13177) + return "1317-7"; + if (code == V3Race._13193) + return "1319-3"; + if (code == V3Race._13219) + return "1321-9"; + if (code == V3Race._13235) + return "1323-5"; + if (code == V3Race._13250) + return "1325-0"; + if (code == V3Race._13268) + return "1326-8"; + if (code == V3Race._13276) + return "1327-6"; + if (code == V3Race._13284) + return "1328-4"; + if (code == V3Race._13292) + return "1329-2"; + if (code == V3Race._13318) + return "1331-8"; + if (code == V3Race._13326) + return "1332-6"; + if (code == V3Race._13334) + return "1333-4"; + if (code == V3Race._13342) + return "1334-2"; + if (code == V3Race._13359) + return "1335-9"; + if (code == V3Race._13367) + return "1336-7"; + if (code == V3Race._13375) + return "1337-5"; + if (code == V3Race._13383) + return "1338-3"; + if (code == V3Race._13409) + return "1340-9"; + if (code == V3Race._13425) + return "1342-5"; + if (code == V3Race._13441) + return "1344-1"; + if (code == V3Race._13458) + return "1345-8"; + if (code == V3Race._13466) + return "1346-6"; + if (code == V3Race._13482) + return "1348-2"; + if (code == V3Race._13508) + return "1350-8"; + if (code == V3Race._13524) + return "1352-4"; + if (code == V3Race._13540) + return "1354-0"; + if (code == V3Race._13565) + return "1356-5"; + if (code == V3Race._13581) + return "1358-1"; + if (code == V3Race._13599) + return "1359-9"; + if (code == V3Race._13607) + return "1360-7"; + if (code == V3Race._13615) + return "1361-5"; + if (code == V3Race._13631) + return "1363-1"; + if (code == V3Race._13656) + return "1365-6"; + if (code == V3Race._13664) + return "1366-4"; + if (code == V3Race._13680) + return "1368-0"; + if (code == V3Race._13706) + return "1370-6"; + if (code == V3Race._13722) + return "1372-2"; + if (code == V3Race._13748) + return "1374-8"; + if (code == V3Race._13763) + return "1376-3"; + if (code == V3Race._13789) + return "1378-9"; + if (code == V3Race._13805) + return "1380-5"; + if (code == V3Race._13821) + return "1382-1"; + if (code == V3Race._13839) + return "1383-9"; + if (code == V3Race._13847) + return "1384-7"; + if (code == V3Race._13854) + return "1385-4"; + if (code == V3Race._13870) + return "1387-0"; + if (code == V3Race._13896) + return "1389-6"; + if (code == V3Race._13912) + return "1391-2"; + if (code == V3Race._13920) + return "1392-0"; + if (code == V3Race._13938) + return "1393-8"; + if (code == V3Race._13946) + return "1394-6"; + if (code == V3Race._13953) + return "1395-3"; + if (code == V3Race._13961) + return "1396-1"; + if (code == V3Race._13979) + return "1397-9"; + if (code == V3Race._13987) + return "1398-7"; + if (code == V3Race._13995) + return "1399-5"; + if (code == V3Race._14001) + return "1400-1"; + if (code == V3Race._14019) + return "1401-9"; + if (code == V3Race._14035) + return "1403-5"; + if (code == V3Race._14050) + return "1405-0"; + if (code == V3Race._14076) + return "1407-6"; + if (code == V3Race._14092) + return "1409-2"; + if (code == V3Race._14118) + return "1411-8"; + if (code == V3Race._14126) + return "1412-6"; + if (code == V3Race._14134) + return "1413-4"; + if (code == V3Race._14142) + return "1414-2"; + if (code == V3Race._14167) + return "1416-7"; + if (code == V3Race._14175) + return "1417-5"; + if (code == V3Race._14183) + return "1418-3"; + if (code == V3Race._14191) + return "1419-1"; + if (code == V3Race._14209) + return "1420-9"; + if (code == V3Race._14217) + return "1421-7"; + if (code == V3Race._14225) + return "1422-5"; + if (code == V3Race._14233) + return "1423-3"; + if (code == V3Race._14241) + return "1424-1"; + if (code == V3Race._14258) + return "1425-8"; + if (code == V3Race._14266) + return "1426-6"; + if (code == V3Race._14274) + return "1427-4"; + if (code == V3Race._14282) + return "1428-2"; + if (code == V3Race._14290) + return "1429-0"; + if (code == V3Race._14308) + return "1430-8"; + if (code == V3Race._14316) + return "1431-6"; + if (code == V3Race._14324) + return "1432-4"; + if (code == V3Race._14332) + return "1433-2"; + if (code == V3Race._14340) + return "1434-0"; + if (code == V3Race._14357) + return "1435-7"; + if (code == V3Race._14365) + return "1436-5"; + if (code == V3Race._14373) + return "1437-3"; + if (code == V3Race._14399) + return "1439-9"; + if (code == V3Race._14415) + return "1441-5"; + if (code == V3Race._14423) + return "1442-3"; + if (code == V3Race._14431) + return "1443-1"; + if (code == V3Race._14456) + return "1445-6"; + if (code == V3Race._14464) + return "1446-4"; + if (code == V3Race._14480) + return "1448-0"; + if (code == V3Race._14506) + return "1450-6"; + if (code == V3Race._14514) + return "1451-4"; + if (code == V3Race._14530) + return "1453-0"; + if (code == V3Race._14548) + return "1454-8"; + if (code == V3Race._14563) + return "1456-3"; + if (code == V3Race._14571) + return "1457-1"; + if (code == V3Race._14589) + return "1458-9"; + if (code == V3Race._14605) + return "1460-5"; + if (code == V3Race._14621) + return "1462-1"; + if (code == V3Race._14647) + return "1464-7"; + if (code == V3Race._14654) + return "1465-4"; + if (code == V3Race._14662) + return "1466-2"; + if (code == V3Race._14670) + return "1467-0"; + if (code == V3Race._14688) + return "1468-8"; + if (code == V3Race._14696) + return "1469-6"; + if (code == V3Race._14704) + return "1470-4"; + if (code == V3Race._14712) + return "1471-2"; + if (code == V3Race._14720) + return "1472-0"; + if (code == V3Race._14746) + return "1474-6"; + if (code == V3Race._14753) + return "1475-3"; + if (code == V3Race._14761) + return "1476-1"; + if (code == V3Race._14787) + return "1478-7"; + if (code == V3Race._14795) + return "1479-5"; + if (code == V3Race._14803) + return "1480-3"; + if (code == V3Race._14811) + return "1481-1"; + if (code == V3Race._14829) + return "1482-9"; + if (code == V3Race._14837) + return "1483-7"; + if (code == V3Race._14845) + return "1484-5"; + if (code == V3Race._14852) + return "1485-2"; + if (code == V3Race._14878) + return "1487-8"; + if (code == V3Race._14894) + return "1489-4"; + if (code == V3Race._14902) + return "1490-2"; + if (code == V3Race._14910) + return "1491-0"; + if (code == V3Race._14928) + return "1492-8"; + if (code == V3Race._14936) + return "1493-6"; + if (code == V3Race._14944) + return "1494-4"; + if (code == V3Race._14951) + return "1495-1"; + if (code == V3Race._14969) + return "1496-9"; + if (code == V3Race._14977) + return "1497-7"; + if (code == V3Race._14985) + return "1498-5"; + if (code == V3Race._14993) + return "1499-3"; + if (code == V3Race._15008) + return "1500-8"; + if (code == V3Race._15016) + return "1501-6"; + if (code == V3Race._15024) + return "1502-4"; + if (code == V3Race._15032) + return "1503-2"; + if (code == V3Race._15040) + return "1504-0"; + if (code == V3Race._15057) + return "1505-7"; + if (code == V3Race._15065) + return "1506-5"; + if (code == V3Race._15073) + return "1507-3"; + if (code == V3Race._15081) + return "1508-1"; + if (code == V3Race._15099) + return "1509-9"; + if (code == V3Race._15107) + return "1510-7"; + if (code == V3Race._15115) + return "1511-5"; + if (code == V3Race._15123) + return "1512-3"; + if (code == V3Race._15131) + return "1513-1"; + if (code == V3Race._15149) + return "1514-9"; + if (code == V3Race._15156) + return "1515-6"; + if (code == V3Race._15164) + return "1516-4"; + if (code == V3Race._15180) + return "1518-0"; + if (code == V3Race._15198) + return "1519-8"; + if (code == V3Race._15206) + return "1520-6"; + if (code == V3Race._15214) + return "1521-4"; + if (code == V3Race._15222) + return "1522-2"; + if (code == V3Race._15230) + return "1523-0"; + if (code == V3Race._15248) + return "1524-8"; + if (code == V3Race._15255) + return "1525-5"; + if (code == V3Race._15263) + return "1526-3"; + if (code == V3Race._15271) + return "1527-1"; + if (code == V3Race._15289) + return "1528-9"; + if (code == V3Race._15297) + return "1529-7"; + if (code == V3Race._15305) + return "1530-5"; + if (code == V3Race._15313) + return "1531-3"; + if (code == V3Race._15321) + return "1532-1"; + if (code == V3Race._15339) + return "1533-9"; + if (code == V3Race._15347) + return "1534-7"; + if (code == V3Race._15354) + return "1535-4"; + if (code == V3Race._15362) + return "1536-2"; + if (code == V3Race._15370) + return "1537-0"; + if (code == V3Race._15388) + return "1538-8"; + if (code == V3Race._15396) + return "1539-6"; + if (code == V3Race._15412) + return "1541-2"; + if (code == V3Race._15438) + return "1543-8"; + if (code == V3Race._15453) + return "1545-3"; + if (code == V3Race._15479) + return "1547-9"; + if (code == V3Race._15495) + return "1549-5"; + if (code == V3Race._15511) + return "1551-1"; + if (code == V3Race._15529) + return "1552-9"; + if (code == V3Race._15537) + return "1553-7"; + if (code == V3Race._15545) + return "1554-5"; + if (code == V3Race._15560) + return "1556-0"; + if (code == V3Race._15586) + return "1558-6"; + if (code == V3Race._15602) + return "1560-2"; + if (code == V3Race._15628) + return "1562-8"; + if (code == V3Race._15644) + return "1564-4"; + if (code == V3Race._15669) + return "1566-9"; + if (code == V3Race._15677) + return "1567-7"; + if (code == V3Race._15685) + return "1568-5"; + if (code == V3Race._15693) + return "1569-3"; + if (code == V3Race._15701) + return "1570-1"; + if (code == V3Race._15719) + return "1571-9"; + if (code == V3Race._15735) + return "1573-5"; + if (code == V3Race._15743) + return "1574-3"; + if (code == V3Race._15768) + return "1576-8"; + if (code == V3Race._15784) + return "1578-4"; + if (code == V3Race._15792) + return "1579-2"; + if (code == V3Race._15800) + return "1580-0"; + if (code == V3Race._15826) + return "1582-6"; + if (code == V3Race._15842) + return "1584-2"; + if (code == V3Race._15867) + return "1586-7"; + if (code == V3Race._15875) + return "1587-5"; + if (code == V3Race._15883) + return "1588-3"; + if (code == V3Race._15891) + return "1589-1"; + if (code == V3Race._15909) + return "1590-9"; + if (code == V3Race._15917) + return "1591-7"; + if (code == V3Race._15925) + return "1592-5"; + if (code == V3Race._15933) + return "1593-3"; + if (code == V3Race._15941) + return "1594-1"; + if (code == V3Race._15958) + return "1595-8"; + if (code == V3Race._15966) + return "1596-6"; + if (code == V3Race._15974) + return "1597-4"; + if (code == V3Race._15982) + return "1598-2"; + if (code == V3Race._15990) + return "1599-0"; + if (code == V3Race._16006) + return "1600-6"; + if (code == V3Race._16022) + return "1602-2"; + if (code == V3Race._16030) + return "1603-0"; + if (code == V3Race._16048) + return "1604-8"; + if (code == V3Race._16055) + return "1605-5"; + if (code == V3Race._16071) + return "1607-1"; + if (code == V3Race._16097) + return "1609-7"; + if (code == V3Race._16105) + return "1610-5"; + if (code == V3Race._16113) + return "1611-3"; + if (code == V3Race._16121) + return "1612-1"; + if (code == V3Race._16139) + return "1613-9"; + if (code == V3Race._16147) + return "1614-7"; + if (code == V3Race._16154) + return "1615-4"; + if (code == V3Race._16162) + return "1616-2"; + if (code == V3Race._16170) + return "1617-0"; + if (code == V3Race._16188) + return "1618-8"; + if (code == V3Race._16196) + return "1619-6"; + if (code == V3Race._16204) + return "1620-4"; + if (code == V3Race._16212) + return "1621-2"; + if (code == V3Race._16220) + return "1622-0"; + if (code == V3Race._16238) + return "1623-8"; + if (code == V3Race._16246) + return "1624-6"; + if (code == V3Race._16253) + return "1625-3"; + if (code == V3Race._16261) + return "1626-1"; + if (code == V3Race._16279) + return "1627-9"; + if (code == V3Race._16287) + return "1628-7"; + if (code == V3Race._16295) + return "1629-5"; + if (code == V3Race._16303) + return "1630-3"; + if (code == V3Race._16311) + return "1631-1"; + if (code == V3Race._16329) + return "1632-9"; + if (code == V3Race._16337) + return "1633-7"; + if (code == V3Race._16345) + return "1634-5"; + if (code == V3Race._16352) + return "1635-2"; + if (code == V3Race._16360) + return "1636-0"; + if (code == V3Race._16378) + return "1637-8"; + if (code == V3Race._16386) + return "1638-6"; + if (code == V3Race._16394) + return "1639-4"; + if (code == V3Race._16402) + return "1640-2"; + if (code == V3Race._16410) + return "1641-0"; + if (code == V3Race._16436) + return "1643-6"; + if (code == V3Race._16451) + return "1645-1"; + if (code == V3Race._16477) + return "1647-7"; + if (code == V3Race._16493) + return "1649-3"; + if (code == V3Race._16519) + return "1651-9"; + if (code == V3Race._16535) + return "1653-5"; + if (code == V3Race._16543) + return "1654-3"; + if (code == V3Race._16550) + return "1655-0"; + if (code == V3Race._16568) + return "1656-8"; + if (code == V3Race._16576) + return "1657-6"; + if (code == V3Race._16592) + return "1659-2"; + if (code == V3Race._16618) + return "1661-8"; + if (code == V3Race._16634) + return "1663-4"; + if (code == V3Race._16659) + return "1665-9"; + if (code == V3Race._16675) + return "1667-5"; + if (code == V3Race._16683) + return "1668-3"; + if (code == V3Race._16709) + return "1670-9"; + if (code == V3Race._16717) + return "1671-7"; + if (code == V3Race._16725) + return "1672-5"; + if (code == V3Race._16733) + return "1673-3"; + if (code == V3Race._16758) + return "1675-8"; + if (code == V3Race._16774) + return "1677-4"; + if (code == V3Race._16790) + return "1679-0"; + if (code == V3Race._16808) + return "1680-8"; + if (code == V3Race._16816) + return "1681-6"; + if (code == V3Race._16832) + return "1683-2"; + if (code == V3Race._16857) + return "1685-7"; + if (code == V3Race._16873) + return "1687-3"; + if (code == V3Race._16881) + return "1688-1"; + if (code == V3Race._16899) + return "1689-9"; + if (code == V3Race._16907) + return "1690-7"; + if (code == V3Race._16923) + return "1692-3"; + if (code == V3Race._16949) + return "1694-9"; + if (code == V3Race._16964) + return "1696-4"; + if (code == V3Race._16972) + return "1697-2"; + if (code == V3Race._16980) + return "1698-0"; + if (code == V3Race._17004) + return "1700-4"; + if (code == V3Race._17020) + return "1702-0"; + if (code == V3Race._17046) + return "1704-6"; + if (code == V3Race._17053) + return "1705-3"; + if (code == V3Race._17079) + return "1707-9"; + if (code == V3Race._17095) + return "1709-5"; + if (code == V3Race._17111) + return "1711-1"; + if (code == V3Race._17129) + return "1712-9"; + if (code == V3Race._17137) + return "1713-7"; + if (code == V3Race._17152) + return "1715-2"; + if (code == V3Race._17178) + return "1717-8"; + if (code == V3Race._17186) + return "1718-6"; + if (code == V3Race._17194) + return "1719-4"; + if (code == V3Race._17202) + return "1720-2"; + if (code == V3Race._17228) + return "1722-8"; + if (code == V3Race._17244) + return "1724-4"; + if (code == V3Race._17251) + return "1725-1"; + if (code == V3Race._17269) + return "1726-9"; + if (code == V3Race._17277) + return "1727-7"; + if (code == V3Race._17285) + return "1728-5"; + if (code == V3Race._17293) + return "1729-3"; + if (code == V3Race._17301) + return "1730-1"; + if (code == V3Race._17319) + return "1731-9"; + if (code == V3Race._17327) + return "1732-7"; + if (code == V3Race._17335) + return "1733-5"; + if (code == V3Race._17350) + return "1735-0"; + if (code == V3Race._17376) + return "1737-6"; + if (code == V3Race._17392) + return "1739-2"; + if (code == V3Race._17400) + return "1740-0"; + if (code == V3Race._18119) + return "1811-9"; + if (code == V3Race._18135) + return "1813-5"; + if (code == V3Race._18143) + return "1814-3"; + if (code == V3Race._18150) + return "1815-0"; + if (code == V3Race._18168) + return "1816-8"; + if (code == V3Race._18176) + return "1817-6"; + if (code == V3Race._18184) + return "1818-4"; + if (code == V3Race._18192) + return "1819-2"; + if (code == V3Race._18200) + return "1820-0"; + if (code == V3Race._18218) + return "1821-8"; + if (code == V3Race._18226) + return "1822-6"; + if (code == V3Race._18234) + return "1823-4"; + if (code == V3Race._18242) + return "1824-2"; + if (code == V3Race._18259) + return "1825-9"; + if (code == V3Race._18267) + return "1826-7"; + if (code == V3Race._18275) + return "1827-5"; + if (code == V3Race._18283) + return "1828-3"; + if (code == V3Race._18291) + return "1829-1"; + if (code == V3Race._18309) + return "1830-9"; + if (code == V3Race._18317) + return "1831-7"; + if (code == V3Race._18325) + return "1832-5"; + if (code == V3Race._18333) + return "1833-3"; + if (code == V3Race._18341) + return "1834-1"; + if (code == V3Race._18358) + return "1835-8"; + if (code == V3Race._18374) + return "1837-4"; + if (code == V3Race._18382) + return "1838-2"; + if (code == V3Race._18408) + return "1840-8"; + if (code == V3Race._18424) + return "1842-4"; + if (code == V3Race._18440) + return "1844-0"; + if (code == V3Race._18457) + return "1845-7"; + if (code == V3Race._18465) + return "1846-5"; + if (code == V3Race._18473) + return "1847-3"; + if (code == V3Race._18481) + return "1848-1"; + if (code == V3Race._18499) + return "1849-9"; + if (code == V3Race._18507) + return "1850-7"; + if (code == V3Race._18515) + return "1851-5"; + if (code == V3Race._18523) + return "1852-3"; + if (code == V3Race._18531) + return "1853-1"; + if (code == V3Race._18549) + return "1854-9"; + if (code == V3Race._18556) + return "1855-6"; + if (code == V3Race._18564) + return "1856-4"; + if (code == V3Race._18572) + return "1857-2"; + if (code == V3Race._18580) + return "1858-0"; + if (code == V3Race._18598) + return "1859-8"; + if (code == V3Race._18606) + return "1860-6"; + if (code == V3Race._18614) + return "1861-4"; + if (code == V3Race._18622) + return "1862-2"; + if (code == V3Race._18630) + return "1863-0"; + if (code == V3Race._18648) + return "1864-8"; + if (code == V3Race._18655) + return "1865-5"; + if (code == V3Race._18663) + return "1866-3"; + if (code == V3Race._18671) + return "1867-1"; + if (code == V3Race._18689) + return "1868-9"; + if (code == V3Race._18697) + return "1869-7"; + if (code == V3Race._18705) + return "1870-5"; + if (code == V3Race._18713) + return "1871-3"; + if (code == V3Race._18721) + return "1872-1"; + if (code == V3Race._18739) + return "1873-9"; + if (code == V3Race._18747) + return "1874-7"; + if (code == V3Race._18754) + return "1875-4"; + if (code == V3Race._18762) + return "1876-2"; + if (code == V3Race._18770) + return "1877-0"; + if (code == V3Race._18788) + return "1878-8"; + if (code == V3Race._18796) + return "1879-6"; + if (code == V3Race._18804) + return "1880-4"; + if (code == V3Race._18812) + return "1881-2"; + if (code == V3Race._18820) + return "1882-0"; + if (code == V3Race._18838) + return "1883-8"; + if (code == V3Race._18846) + return "1884-6"; + if (code == V3Race._18853) + return "1885-3"; + if (code == V3Race._18861) + return "1886-1"; + if (code == V3Race._18879) + return "1887-9"; + if (code == V3Race._18887) + return "1888-7"; + if (code == V3Race._18895) + return "1889-5"; + if (code == V3Race._18911) + return "1891-1"; + if (code == V3Race._18929) + return "1892-9"; + if (code == V3Race._18937) + return "1893-7"; + if (code == V3Race._18945) + return "1894-5"; + if (code == V3Race._18960) + return "1896-0"; + if (code == V3Race._18978) + return "1897-8"; + if (code == V3Race._18986) + return "1898-6"; + if (code == V3Race._18994) + return "1899-4"; + if (code == V3Race._19000) + return "1900-0"; + if (code == V3Race._19018) + return "1901-8"; + if (code == V3Race._19026) + return "1902-6"; + if (code == V3Race._19034) + return "1903-4"; + if (code == V3Race._19042) + return "1904-2"; + if (code == V3Race._19059) + return "1905-9"; + if (code == V3Race._19067) + return "1906-7"; + if (code == V3Race._19075) + return "1907-5"; + if (code == V3Race._19083) + return "1908-3"; + if (code == V3Race._19091) + return "1909-1"; + if (code == V3Race._19109) + return "1910-9"; + if (code == V3Race._19117) + return "1911-7"; + if (code == V3Race._19125) + return "1912-5"; + if (code == V3Race._19133) + return "1913-3"; + if (code == V3Race._19141) + return "1914-1"; + if (code == V3Race._19158) + return "1915-8"; + if (code == V3Race._19166) + return "1916-6"; + if (code == V3Race._19174) + return "1917-4"; + if (code == V3Race._19182) + return "1918-2"; + if (code == V3Race._19190) + return "1919-0"; + if (code == V3Race._19208) + return "1920-8"; + if (code == V3Race._19216) + return "1921-6"; + if (code == V3Race._19224) + return "1922-4"; + if (code == V3Race._19232) + return "1923-2"; + if (code == V3Race._19240) + return "1924-0"; + if (code == V3Race._19257) + return "1925-7"; + if (code == V3Race._19265) + return "1926-5"; + if (code == V3Race._19273) + return "1927-3"; + if (code == V3Race._19281) + return "1928-1"; + if (code == V3Race._19299) + return "1929-9"; + if (code == V3Race._19307) + return "1930-7"; + if (code == V3Race._19315) + return "1931-5"; + if (code == V3Race._19323) + return "1932-3"; + if (code == V3Race._19331) + return "1933-1"; + if (code == V3Race._19349) + return "1934-9"; + if (code == V3Race._19356) + return "1935-6"; + if (code == V3Race._19364) + return "1936-4"; + if (code == V3Race._19372) + return "1937-2"; + if (code == V3Race._19380) + return "1938-0"; + if (code == V3Race._19398) + return "1939-8"; + if (code == V3Race._19406) + return "1940-6"; + if (code == V3Race._19414) + return "1941-4"; + if (code == V3Race._19422) + return "1942-2"; + if (code == V3Race._19430) + return "1943-0"; + if (code == V3Race._19448) + return "1944-8"; + if (code == V3Race._19455) + return "1945-5"; + if (code == V3Race._19463) + return "1946-3"; + if (code == V3Race._19471) + return "1947-1"; + if (code == V3Race._19489) + return "1948-9"; + if (code == V3Race._19497) + return "1949-7"; + if (code == V3Race._19505) + return "1950-5"; + if (code == V3Race._19513) + return "1951-3"; + if (code == V3Race._19521) + return "1952-1"; + if (code == V3Race._19539) + return "1953-9"; + if (code == V3Race._19547) + return "1954-7"; + if (code == V3Race._19554) + return "1955-4"; + if (code == V3Race._19562) + return "1956-2"; + if (code == V3Race._19570) + return "1957-0"; + if (code == V3Race._19588) + return "1958-8"; + if (code == V3Race._19596) + return "1959-6"; + if (code == V3Race._19604) + return "1960-4"; + if (code == V3Race._19612) + return "1961-2"; + if (code == V3Race._19620) + return "1962-0"; + if (code == V3Race._19638) + return "1963-8"; + if (code == V3Race._19646) + return "1964-6"; + if (code == V3Race._19661) + return "1966-1"; + if (code == V3Race._19687) + return "1968-7"; + if (code == V3Race._19695) + return "1969-5"; + if (code == V3Race._19703) + return "1970-3"; + if (code == V3Race._19729) + return "1972-9"; + if (code == V3Race._19737) + return "1973-7"; + if (code == V3Race._19745) + return "1974-5"; + if (code == V3Race._19752) + return "1975-2"; + if (code == V3Race._19760) + return "1976-0"; + if (code == V3Race._19778) + return "1977-8"; + if (code == V3Race._19786) + return "1978-6"; + if (code == V3Race._19794) + return "1979-4"; + if (code == V3Race._19802) + return "1980-2"; + if (code == V3Race._19810) + return "1981-0"; + if (code == V3Race._19828) + return "1982-8"; + if (code == V3Race._19844) + return "1984-4"; + if (code == V3Race._19851) + return "1985-1"; + if (code == V3Race._19869) + return "1986-9"; + if (code == V3Race._19877) + return "1987-7"; + if (code == V3Race._19885) + return "1988-5"; + if (code == V3Race._19901) + return "1990-1"; + if (code == V3Race._19927) + return "1992-7"; + if (code == V3Race._19935) + return "1993-5"; + if (code == V3Race._19943) + return "1994-3"; + if (code == V3Race._19950) + return "1995-0"; + if (code == V3Race._19968) + return "1996-8"; + if (code == V3Race._19976) + return "1997-6"; + if (code == V3Race._19984) + return "1998-4"; + if (code == V3Race._19992) + return "1999-2"; + if (code == V3Race._20008) + return "2000-8"; + if (code == V3Race._20024) + return "2002-4"; + if (code == V3Race._20040) + return "2004-0"; + if (code == V3Race._20065) + return "2006-5"; + if (code == V3Race._20073) + return "2007-3"; + if (code == V3Race._20081) + return "2008-1"; + if (code == V3Race._20099) + return "2009-9"; + if (code == V3Race._20107) + return "2010-7"; + if (code == V3Race._20115) + return "2011-5"; + if (code == V3Race._20123) + return "2012-3"; + if (code == V3Race._20131) + return "2013-1"; + if (code == V3Race._20149) + return "2014-9"; + if (code == V3Race._20156) + return "2015-6"; + if (code == V3Race._20164) + return "2016-4"; + if (code == V3Race._20172) + return "2017-2"; + if (code == V3Race._20180) + return "2018-0"; + if (code == V3Race._20198) + return "2019-8"; + if (code == V3Race._20206) + return "2020-6"; + if (code == V3Race._20214) + return "2021-4"; + if (code == V3Race._20222) + return "2022-2"; + if (code == V3Race._20230) + return "2023-0"; + if (code == V3Race._20248) + return "2024-8"; + if (code == V3Race._20255) + return "2025-5"; + if (code == V3Race._20263) + return "2026-3"; + if (code == V3Race._20289) + return "2028-9"; + if (code == V3Race._20297) + return "2029-7"; + if (code == V3Race._20305) + return "2030-5"; + if (code == V3Race._20313) + return "2031-3"; + if (code == V3Race._20321) + return "2032-1"; + if (code == V3Race._20339) + return "2033-9"; + if (code == V3Race._20347) + return "2034-7"; + if (code == V3Race._20354) + return "2035-4"; + if (code == V3Race._20362) + return "2036-2"; + if (code == V3Race._20370) + return "2037-0"; + if (code == V3Race._20388) + return "2038-8"; + if (code == V3Race._20396) + return "2039-6"; + if (code == V3Race._20404) + return "2040-4"; + if (code == V3Race._20412) + return "2041-2"; + if (code == V3Race._20420) + return "2042-0"; + if (code == V3Race._20438) + return "2043-8"; + if (code == V3Race._20446) + return "2044-6"; + if (code == V3Race._20453) + return "2045-3"; + if (code == V3Race._20461) + return "2046-1"; + if (code == V3Race._20479) + return "2047-9"; + if (code == V3Race._20487) + return "2048-7"; + if (code == V3Race._20495) + return "2049-5"; + if (code == V3Race._20503) + return "2050-3"; + if (code == V3Race._20511) + return "2051-1"; + if (code == V3Race._20529) + return "2052-9"; + if (code == V3Race._20545) + return "2054-5"; + if (code == V3Race._20560) + return "2056-0"; + if (code == V3Race._20586) + return "2058-6"; + if (code == V3Race._20602) + return "2060-2"; + if (code == V3Race._20610) + return "2061-0"; + if (code == V3Race._20628) + return "2062-8"; + if (code == V3Race._20636) + return "2063-6"; + if (code == V3Race._20644) + return "2064-4"; + if (code == V3Race._20651) + return "2065-1"; + if (code == V3Race._20669) + return "2066-9"; + if (code == V3Race._20677) + return "2067-7"; + if (code == V3Race._20685) + return "2068-5"; + if (code == V3Race._20693) + return "2069-3"; + if (code == V3Race._20701) + return "2070-1"; + if (code == V3Race._20719) + return "2071-9"; + if (code == V3Race._20727) + return "2072-7"; + if (code == V3Race._20735) + return "2073-5"; + if (code == V3Race._20743) + return "2074-3"; + if (code == V3Race._20750) + return "2075-0"; + if (code == V3Race._20768) + return "2076-8"; + if (code == V3Race._20784) + return "2078-4"; + if (code == V3Race._20792) + return "2079-2"; + if (code == V3Race._20800) + return "2080-0"; + if (code == V3Race._20818) + return "2081-8"; + if (code == V3Race._20826) + return "2082-6"; + if (code == V3Race._20834) + return "2083-4"; + if (code == V3Race._20859) + return "2085-9"; + if (code == V3Race._20867) + return "2086-7"; + if (code == V3Race._20875) + return "2087-5"; + if (code == V3Race._20883) + return "2088-3"; + if (code == V3Race._20891) + return "2089-1"; + if (code == V3Race._20909) + return "2090-9"; + if (code == V3Race._20917) + return "2091-7"; + if (code == V3Race._20925) + return "2092-5"; + if (code == V3Race._20933) + return "2093-3"; + if (code == V3Race._20941) + return "2094-1"; + if (code == V3Race._20958) + return "2095-8"; + if (code == V3Race._20966) + return "2096-6"; + if (code == V3Race._20974) + return "2097-4"; + if (code == V3Race._20982) + return "2098-2"; + if (code == V3Race._21006) + return "2100-6"; + if (code == V3Race._21014) + return "2101-4"; + if (code == V3Race._21022) + return "2102-2"; + if (code == V3Race._21030) + return "2103-0"; + if (code == V3Race._21048) + return "2104-8"; + if (code == V3Race._25007) + return "2500-7"; + if (code == V3Race._21063) + return "2106-3"; + if (code == V3Race._21089) + return "2108-9"; + if (code == V3Race._21097) + return "2109-7"; + if (code == V3Race._21105) + return "2110-5"; + if (code == V3Race._21113) + return "2111-3"; + if (code == V3Race._21121) + return "2112-1"; + if (code == V3Race._21139) + return "2113-9"; + if (code == V3Race._21147) + return "2114-7"; + if (code == V3Race._21154) + return "2115-4"; + if (code == V3Race._21162) + return "2116-2"; + if (code == V3Race._21188) + return "2118-8"; + if (code == V3Race._21196) + return "2119-6"; + if (code == V3Race._21204) + return "2120-4"; + if (code == V3Race._21212) + return "2121-2"; + if (code == V3Race._21220) + return "2122-0"; + if (code == V3Race._21238) + return "2123-8"; + if (code == V3Race._21246) + return "2124-6"; + if (code == V3Race._21253) + return "2125-3"; + if (code == V3Race._21261) + return "2126-1"; + if (code == V3Race._21279) + return "2127-9"; + if (code == V3Race._21295) + return "2129-5"; + if (code == V3Race._21311) + return "2131-1"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperator.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperator.java new file mode 100644 index 00000000000..fc674d58093 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperator.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RelationalOperator { + + /** + * Specified set of things includes value being evaluated. + */ + CT, + /** + * Equal condition applied to comparisons. + */ + EQ, + /** + * Greater than or equal condition applied to comparisons. + */ + GE, + /** + * A generic comparison selects a record for inclusion in the response if the beginning of the designated element value matches the select string. + */ + GN, + /** + * Greater than condition applied to comparisons. + */ + GT, + /** + * Less than or equal condition applied to comparisons. + */ + LE, + /** + * Less than condition applied to comparisons. + */ + LT, + /** + * Not equal condition applied to comparisons. + */ + NE, + /** + * added to help the parsers + */ + NULL; + public static V3RelationalOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("CT".equals(codeString)) + return CT; + if ("EQ".equals(codeString)) + return EQ; + if ("GE".equals(codeString)) + return GE; + if ("GN".equals(codeString)) + return GN; + if ("GT".equals(codeString)) + return GT; + if ("LE".equals(codeString)) + return LE; + if ("LT".equals(codeString)) + return LT; + if ("NE".equals(codeString)) + return NE; + throw new FHIRException("Unknown V3RelationalOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CT: return "CT"; + case EQ: return "EQ"; + case GE: return "GE"; + case GN: return "GN"; + case GT: return "GT"; + case LE: return "LE"; + case LT: return "LT"; + case NE: return "NE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RelationalOperator"; + } + public String getDefinition() { + switch (this) { + case CT: return "Specified set of things includes value being evaluated."; + case EQ: return "Equal condition applied to comparisons."; + case GE: return "Greater than or equal condition applied to comparisons."; + case GN: return "A generic comparison selects a record for inclusion in the response if the beginning of the designated element value matches the select string."; + case GT: return "Greater than condition applied to comparisons."; + case LE: return "Less than or equal condition applied to comparisons."; + case LT: return "Less than condition applied to comparisons."; + case NE: return "Not equal condition applied to comparisons."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CT: return "Contains"; + case EQ: return "Equal"; + case GE: return "Greater than or equal"; + case GN: return "Generic"; + case GT: return "Greater than"; + case LE: return "Less than or equal"; + case LT: return "Less than"; + case NE: return "Not Equal"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperatorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperatorEnumFactory.java new file mode 100644 index 00000000000..7f365fa6a1a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationalOperatorEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RelationalOperatorEnumFactory implements EnumFactory { + + public V3RelationalOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("CT".equals(codeString)) + return V3RelationalOperator.CT; + if ("EQ".equals(codeString)) + return V3RelationalOperator.EQ; + if ("GE".equals(codeString)) + return V3RelationalOperator.GE; + if ("GN".equals(codeString)) + return V3RelationalOperator.GN; + if ("GT".equals(codeString)) + return V3RelationalOperator.GT; + if ("LE".equals(codeString)) + return V3RelationalOperator.LE; + if ("LT".equals(codeString)) + return V3RelationalOperator.LT; + if ("NE".equals(codeString)) + return V3RelationalOperator.NE; + throw new IllegalArgumentException("Unknown V3RelationalOperator code '"+codeString+"'"); + } + + public String toCode(V3RelationalOperator code) { + if (code == V3RelationalOperator.CT) + return "CT"; + if (code == V3RelationalOperator.EQ) + return "EQ"; + if (code == V3RelationalOperator.GE) + return "GE"; + if (code == V3RelationalOperator.GN) + return "GN"; + if (code == V3RelationalOperator.GT) + return "GT"; + if (code == V3RelationalOperator.LE) + return "LE"; + if (code == V3RelationalOperator.LT) + return "LT"; + if (code == V3RelationalOperator.NE) + return "NE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunction.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunction.java new file mode 100644 index 00000000000..ab88828b172 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunction.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RelationshipConjunction { + + /** + * This condition must be true. + */ + AND, + /** + * At least one of the condition among all OR conditions must be true. + */ + OR, + /** + * One and only one of the XOR conditions must be true. + */ + XOR, + /** + * added to help the parsers + */ + NULL; + public static V3RelationshipConjunction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AND".equals(codeString)) + return AND; + if ("OR".equals(codeString)) + return OR; + if ("XOR".equals(codeString)) + return XOR; + throw new FHIRException("Unknown V3RelationshipConjunction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AND: return "AND"; + case OR: return "OR"; + case XOR: return "XOR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RelationshipConjunction"; + } + public String getDefinition() { + switch (this) { + case AND: return "This condition must be true."; + case OR: return "At least one of the condition among all OR conditions must be true."; + case XOR: return "One and only one of the XOR conditions must be true."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AND: return "and"; + case OR: return "or"; + case XOR: return "exclusive or"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunctionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunctionEnumFactory.java new file mode 100644 index 00000000000..a693f656623 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RelationshipConjunctionEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RelationshipConjunctionEnumFactory implements EnumFactory { + + public V3RelationshipConjunction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AND".equals(codeString)) + return V3RelationshipConjunction.AND; + if ("OR".equals(codeString)) + return V3RelationshipConjunction.OR; + if ("XOR".equals(codeString)) + return V3RelationshipConjunction.XOR; + throw new IllegalArgumentException("Unknown V3RelationshipConjunction code '"+codeString+"'"); + } + + public String toCode(V3RelationshipConjunction code) { + if (code == V3RelationshipConjunction.AND) + return "AND"; + if (code == V3RelationshipConjunction.OR) + return "OR"; + if (code == V3RelationshipConjunction.XOR) + return "XOR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliation.java new file mode 100644 index 00000000000..1c8d1432e0c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliation.java @@ -0,0 +1,807 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ReligiousAffiliation { + + /** + * Adventist + */ + _1001, + /** + * African Religions + */ + _1002, + /** + * Afro-Caribbean Religions + */ + _1003, + /** + * Agnosticism + */ + _1004, + /** + * Anglican + */ + _1005, + /** + * Animism + */ + _1006, + /** + * Atheism + */ + _1007, + /** + * Babi & Baha'I faiths + */ + _1008, + /** + * Baptist + */ + _1009, + /** + * Bon + */ + _1010, + /** + * Cao Dai + */ + _1011, + /** + * Celticism + */ + _1012, + /** + * Christian (non-Catholic, non-specific) + */ + _1013, + /** + * Confucianism + */ + _1014, + /** + * Cyberculture Religions + */ + _1015, + /** + * Divination + */ + _1016, + /** + * Fourth Way + */ + _1017, + /** + * Free Daism + */ + _1018, + /** + * Gnosis + */ + _1019, + /** + * Hinduism + */ + _1020, + /** + * Humanism + */ + _1021, + /** + * Independent + */ + _1022, + /** + * Islam + */ + _1023, + /** + * Jainism + */ + _1024, + /** + * Jehovah's Witnesses + */ + _1025, + /** + * Judaism + */ + _1026, + /** + * Latter Day Saints + */ + _1027, + /** + * Lutheran + */ + _1028, + /** + * Mahayana + */ + _1029, + /** + * Meditation + */ + _1030, + /** + * Messianic Judaism + */ + _1031, + /** + * Mitraism + */ + _1032, + /** + * New Age + */ + _1033, + /** + * non-Roman Catholic + */ + _1034, + /** + * Occult + */ + _1035, + /** + * Orthodox + */ + _1036, + /** + * Paganism + */ + _1037, + /** + * Pentecostal + */ + _1038, + /** + * Process, The + */ + _1039, + /** + * Reformed/Presbyterian + */ + _1040, + /** + * Roman Catholic Church + */ + _1041, + /** + * Satanism + */ + _1042, + /** + * Scientology + */ + _1043, + /** + * Shamanism + */ + _1044, + /** + * Shiite (Islam) + */ + _1045, + /** + * Shinto + */ + _1046, + /** + * Sikism + */ + _1047, + /** + * Spiritualism + */ + _1048, + /** + * Sunni (Islam) + */ + _1049, + /** + * Taoism + */ + _1050, + /** + * Theravada + */ + _1051, + /** + * Unitarian-Universalism + */ + _1052, + /** + * Universal Life Church + */ + _1053, + /** + * Vajrayana (Tibetan) + */ + _1054, + /** + * Veda + */ + _1055, + /** + * Voodoo + */ + _1056, + /** + * Wicca + */ + _1057, + /** + * Yaohushua + */ + _1058, + /** + * Zen Buddhism + */ + _1059, + /** + * Zoroastrianism + */ + _1060, + /** + * Assembly of God + */ + _1061, + /** + * Brethren + */ + _1062, + /** + * Christian Scientist + */ + _1063, + /** + * Church of Christ + */ + _1064, + /** + * Church of God + */ + _1065, + /** + * Congregational + */ + _1066, + /** + * Disciples of Christ + */ + _1067, + /** + * Eastern Orthodox + */ + _1068, + /** + * Episcopalian + */ + _1069, + /** + * Evangelical Covenant + */ + _1070, + /** + * Friends + */ + _1071, + /** + * Full Gospel + */ + _1072, + /** + * Methodist + */ + _1073, + /** + * Native American + */ + _1074, + /** + * Nazarene + */ + _1075, + /** + * Presbyterian + */ + _1076, + /** + * Protestant + */ + _1077, + /** + * Protestant, No Denomination + */ + _1078, + /** + * Reformed + */ + _1079, + /** + * Salvation Army + */ + _1080, + /** + * Unitarian Universalist + */ + _1081, + /** + * United Church of Christ + */ + _1082, + /** + * added to help the parsers + */ + NULL; + public static V3ReligiousAffiliation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1001".equals(codeString)) + return _1001; + if ("1002".equals(codeString)) + return _1002; + if ("1003".equals(codeString)) + return _1003; + if ("1004".equals(codeString)) + return _1004; + if ("1005".equals(codeString)) + return _1005; + if ("1006".equals(codeString)) + return _1006; + if ("1007".equals(codeString)) + return _1007; + if ("1008".equals(codeString)) + return _1008; + if ("1009".equals(codeString)) + return _1009; + if ("1010".equals(codeString)) + return _1010; + if ("1011".equals(codeString)) + return _1011; + if ("1012".equals(codeString)) + return _1012; + if ("1013".equals(codeString)) + return _1013; + if ("1014".equals(codeString)) + return _1014; + if ("1015".equals(codeString)) + return _1015; + if ("1016".equals(codeString)) + return _1016; + if ("1017".equals(codeString)) + return _1017; + if ("1018".equals(codeString)) + return _1018; + if ("1019".equals(codeString)) + return _1019; + if ("1020".equals(codeString)) + return _1020; + if ("1021".equals(codeString)) + return _1021; + if ("1022".equals(codeString)) + return _1022; + if ("1023".equals(codeString)) + return _1023; + if ("1024".equals(codeString)) + return _1024; + if ("1025".equals(codeString)) + return _1025; + if ("1026".equals(codeString)) + return _1026; + if ("1027".equals(codeString)) + return _1027; + if ("1028".equals(codeString)) + return _1028; + if ("1029".equals(codeString)) + return _1029; + if ("1030".equals(codeString)) + return _1030; + if ("1031".equals(codeString)) + return _1031; + if ("1032".equals(codeString)) + return _1032; + if ("1033".equals(codeString)) + return _1033; + if ("1034".equals(codeString)) + return _1034; + if ("1035".equals(codeString)) + return _1035; + if ("1036".equals(codeString)) + return _1036; + if ("1037".equals(codeString)) + return _1037; + if ("1038".equals(codeString)) + return _1038; + if ("1039".equals(codeString)) + return _1039; + if ("1040".equals(codeString)) + return _1040; + if ("1041".equals(codeString)) + return _1041; + if ("1042".equals(codeString)) + return _1042; + if ("1043".equals(codeString)) + return _1043; + if ("1044".equals(codeString)) + return _1044; + if ("1045".equals(codeString)) + return _1045; + if ("1046".equals(codeString)) + return _1046; + if ("1047".equals(codeString)) + return _1047; + if ("1048".equals(codeString)) + return _1048; + if ("1049".equals(codeString)) + return _1049; + if ("1050".equals(codeString)) + return _1050; + if ("1051".equals(codeString)) + return _1051; + if ("1052".equals(codeString)) + return _1052; + if ("1053".equals(codeString)) + return _1053; + if ("1054".equals(codeString)) + return _1054; + if ("1055".equals(codeString)) + return _1055; + if ("1056".equals(codeString)) + return _1056; + if ("1057".equals(codeString)) + return _1057; + if ("1058".equals(codeString)) + return _1058; + if ("1059".equals(codeString)) + return _1059; + if ("1060".equals(codeString)) + return _1060; + if ("1061".equals(codeString)) + return _1061; + if ("1062".equals(codeString)) + return _1062; + if ("1063".equals(codeString)) + return _1063; + if ("1064".equals(codeString)) + return _1064; + if ("1065".equals(codeString)) + return _1065; + if ("1066".equals(codeString)) + return _1066; + if ("1067".equals(codeString)) + return _1067; + if ("1068".equals(codeString)) + return _1068; + if ("1069".equals(codeString)) + return _1069; + if ("1070".equals(codeString)) + return _1070; + if ("1071".equals(codeString)) + return _1071; + if ("1072".equals(codeString)) + return _1072; + if ("1073".equals(codeString)) + return _1073; + if ("1074".equals(codeString)) + return _1074; + if ("1075".equals(codeString)) + return _1075; + if ("1076".equals(codeString)) + return _1076; + if ("1077".equals(codeString)) + return _1077; + if ("1078".equals(codeString)) + return _1078; + if ("1079".equals(codeString)) + return _1079; + if ("1080".equals(codeString)) + return _1080; + if ("1081".equals(codeString)) + return _1081; + if ("1082".equals(codeString)) + return _1082; + throw new FHIRException("Unknown V3ReligiousAffiliation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1001: return "1001"; + case _1002: return "1002"; + case _1003: return "1003"; + case _1004: return "1004"; + case _1005: return "1005"; + case _1006: return "1006"; + case _1007: return "1007"; + case _1008: return "1008"; + case _1009: return "1009"; + case _1010: return "1010"; + case _1011: return "1011"; + case _1012: return "1012"; + case _1013: return "1013"; + case _1014: return "1014"; + case _1015: return "1015"; + case _1016: return "1016"; + case _1017: return "1017"; + case _1018: return "1018"; + case _1019: return "1019"; + case _1020: return "1020"; + case _1021: return "1021"; + case _1022: return "1022"; + case _1023: return "1023"; + case _1024: return "1024"; + case _1025: return "1025"; + case _1026: return "1026"; + case _1027: return "1027"; + case _1028: return "1028"; + case _1029: return "1029"; + case _1030: return "1030"; + case _1031: return "1031"; + case _1032: return "1032"; + case _1033: return "1033"; + case _1034: return "1034"; + case _1035: return "1035"; + case _1036: return "1036"; + case _1037: return "1037"; + case _1038: return "1038"; + case _1039: return "1039"; + case _1040: return "1040"; + case _1041: return "1041"; + case _1042: return "1042"; + case _1043: return "1043"; + case _1044: return "1044"; + case _1045: return "1045"; + case _1046: return "1046"; + case _1047: return "1047"; + case _1048: return "1048"; + case _1049: return "1049"; + case _1050: return "1050"; + case _1051: return "1051"; + case _1052: return "1052"; + case _1053: return "1053"; + case _1054: return "1054"; + case _1055: return "1055"; + case _1056: return "1056"; + case _1057: return "1057"; + case _1058: return "1058"; + case _1059: return "1059"; + case _1060: return "1060"; + case _1061: return "1061"; + case _1062: return "1062"; + case _1063: return "1063"; + case _1064: return "1064"; + case _1065: return "1065"; + case _1066: return "1066"; + case _1067: return "1067"; + case _1068: return "1068"; + case _1069: return "1069"; + case _1070: return "1070"; + case _1071: return "1071"; + case _1072: return "1072"; + case _1073: return "1073"; + case _1074: return "1074"; + case _1075: return "1075"; + case _1076: return "1076"; + case _1077: return "1077"; + case _1078: return "1078"; + case _1079: return "1079"; + case _1080: return "1080"; + case _1081: return "1081"; + case _1082: return "1082"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ReligiousAffiliation"; + } + public String getDefinition() { + switch (this) { + case _1001: return "Adventist"; + case _1002: return "African Religions"; + case _1003: return "Afro-Caribbean Religions"; + case _1004: return "Agnosticism"; + case _1005: return "Anglican"; + case _1006: return "Animism"; + case _1007: return "Atheism"; + case _1008: return "Babi & Baha'I faiths"; + case _1009: return "Baptist"; + case _1010: return "Bon"; + case _1011: return "Cao Dai"; + case _1012: return "Celticism"; + case _1013: return "Christian (non-Catholic, non-specific)"; + case _1014: return "Confucianism"; + case _1015: return "Cyberculture Religions"; + case _1016: return "Divination"; + case _1017: return "Fourth Way"; + case _1018: return "Free Daism"; + case _1019: return "Gnosis"; + case _1020: return "Hinduism"; + case _1021: return "Humanism"; + case _1022: return "Independent"; + case _1023: return "Islam"; + case _1024: return "Jainism"; + case _1025: return "Jehovah's Witnesses"; + case _1026: return "Judaism"; + case _1027: return "Latter Day Saints"; + case _1028: return "Lutheran"; + case _1029: return "Mahayana"; + case _1030: return "Meditation"; + case _1031: return "Messianic Judaism"; + case _1032: return "Mitraism"; + case _1033: return "New Age"; + case _1034: return "non-Roman Catholic"; + case _1035: return "Occult"; + case _1036: return "Orthodox"; + case _1037: return "Paganism"; + case _1038: return "Pentecostal"; + case _1039: return "Process, The"; + case _1040: return "Reformed/Presbyterian"; + case _1041: return "Roman Catholic Church"; + case _1042: return "Satanism"; + case _1043: return "Scientology"; + case _1044: return "Shamanism"; + case _1045: return "Shiite (Islam)"; + case _1046: return "Shinto"; + case _1047: return "Sikism"; + case _1048: return "Spiritualism"; + case _1049: return "Sunni (Islam)"; + case _1050: return "Taoism"; + case _1051: return "Theravada"; + case _1052: return "Unitarian-Universalism"; + case _1053: return "Universal Life Church"; + case _1054: return "Vajrayana (Tibetan)"; + case _1055: return "Veda"; + case _1056: return "Voodoo"; + case _1057: return "Wicca"; + case _1058: return "Yaohushua"; + case _1059: return "Zen Buddhism"; + case _1060: return "Zoroastrianism"; + case _1061: return "Assembly of God"; + case _1062: return "Brethren"; + case _1063: return "Christian Scientist"; + case _1064: return "Church of Christ"; + case _1065: return "Church of God"; + case _1066: return "Congregational"; + case _1067: return "Disciples of Christ"; + case _1068: return "Eastern Orthodox"; + case _1069: return "Episcopalian"; + case _1070: return "Evangelical Covenant"; + case _1071: return "Friends"; + case _1072: return "Full Gospel"; + case _1073: return "Methodist"; + case _1074: return "Native American"; + case _1075: return "Nazarene"; + case _1076: return "Presbyterian"; + case _1077: return "Protestant"; + case _1078: return "Protestant, No Denomination"; + case _1079: return "Reformed"; + case _1080: return "Salvation Army"; + case _1081: return "Unitarian Universalist"; + case _1082: return "United Church of Christ"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1001: return "Adventist"; + case _1002: return "African Religions"; + case _1003: return "Afro-Caribbean Religions"; + case _1004: return "Agnosticism"; + case _1005: return "Anglican"; + case _1006: return "Animism"; + case _1007: return "Atheism"; + case _1008: return "Babi & Baha'I faiths"; + case _1009: return "Baptist"; + case _1010: return "Bon"; + case _1011: return "Cao Dai"; + case _1012: return "Celticism"; + case _1013: return "Christian (non-Catholic, non-specific)"; + case _1014: return "Confucianism"; + case _1015: return "Cyberculture Religions"; + case _1016: return "Divination"; + case _1017: return "Fourth Way"; + case _1018: return "Free Daism"; + case _1019: return "Gnosis"; + case _1020: return "Hinduism"; + case _1021: return "Humanism"; + case _1022: return "Independent"; + case _1023: return "Islam"; + case _1024: return "Jainism"; + case _1025: return "Jehovah's Witnesses"; + case _1026: return "Judaism"; + case _1027: return "Latter Day Saints"; + case _1028: return "Lutheran"; + case _1029: return "Mahayana"; + case _1030: return "Meditation"; + case _1031: return "Messianic Judaism"; + case _1032: return "Mitraism"; + case _1033: return "New Age"; + case _1034: return "non-Roman Catholic"; + case _1035: return "Occult"; + case _1036: return "Orthodox"; + case _1037: return "Paganism"; + case _1038: return "Pentecostal"; + case _1039: return "Process, The"; + case _1040: return "Reformed/Presbyterian"; + case _1041: return "Roman Catholic Church"; + case _1042: return "Satanism"; + case _1043: return "Scientology"; + case _1044: return "Shamanism"; + case _1045: return "Shiite (Islam)"; + case _1046: return "Shinto"; + case _1047: return "Sikism"; + case _1048: return "Spiritualism"; + case _1049: return "Sunni (Islam)"; + case _1050: return "Taoism"; + case _1051: return "Theravada"; + case _1052: return "Unitarian-Universalism"; + case _1053: return "Universal Life Church"; + case _1054: return "Vajrayana (Tibetan)"; + case _1055: return "Veda"; + case _1056: return "Voodoo"; + case _1057: return "Wicca"; + case _1058: return "Yaohushua"; + case _1059: return "Zen Buddhism"; + case _1060: return "Zoroastrianism"; + case _1061: return "Assembly of God"; + case _1062: return "Brethren"; + case _1063: return "Christian Scientist"; + case _1064: return "Church of Christ"; + case _1065: return "Church of God"; + case _1066: return "Congregational"; + case _1067: return "Disciples of Christ"; + case _1068: return "Eastern Orthodox"; + case _1069: return "Episcopalian"; + case _1070: return "Evangelical Covenant"; + case _1071: return "Friends"; + case _1072: return "Full Gospel"; + case _1073: return "Methodist"; + case _1074: return "Native American"; + case _1075: return "Nazarene"; + case _1076: return "Presbyterian"; + case _1077: return "Protestant"; + case _1078: return "Protestant, No Denomination"; + case _1079: return "Reformed"; + case _1080: return "Salvation Army"; + case _1081: return "Unitarian Universalist"; + case _1082: return "United Church of Christ"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliationEnumFactory.java new file mode 100644 index 00000000000..8ecc53ebd7b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ReligiousAffiliationEnumFactory.java @@ -0,0 +1,379 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ReligiousAffiliationEnumFactory implements EnumFactory { + + public V3ReligiousAffiliation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1001".equals(codeString)) + return V3ReligiousAffiliation._1001; + if ("1002".equals(codeString)) + return V3ReligiousAffiliation._1002; + if ("1003".equals(codeString)) + return V3ReligiousAffiliation._1003; + if ("1004".equals(codeString)) + return V3ReligiousAffiliation._1004; + if ("1005".equals(codeString)) + return V3ReligiousAffiliation._1005; + if ("1006".equals(codeString)) + return V3ReligiousAffiliation._1006; + if ("1007".equals(codeString)) + return V3ReligiousAffiliation._1007; + if ("1008".equals(codeString)) + return V3ReligiousAffiliation._1008; + if ("1009".equals(codeString)) + return V3ReligiousAffiliation._1009; + if ("1010".equals(codeString)) + return V3ReligiousAffiliation._1010; + if ("1011".equals(codeString)) + return V3ReligiousAffiliation._1011; + if ("1012".equals(codeString)) + return V3ReligiousAffiliation._1012; + if ("1013".equals(codeString)) + return V3ReligiousAffiliation._1013; + if ("1014".equals(codeString)) + return V3ReligiousAffiliation._1014; + if ("1015".equals(codeString)) + return V3ReligiousAffiliation._1015; + if ("1016".equals(codeString)) + return V3ReligiousAffiliation._1016; + if ("1017".equals(codeString)) + return V3ReligiousAffiliation._1017; + if ("1018".equals(codeString)) + return V3ReligiousAffiliation._1018; + if ("1019".equals(codeString)) + return V3ReligiousAffiliation._1019; + if ("1020".equals(codeString)) + return V3ReligiousAffiliation._1020; + if ("1021".equals(codeString)) + return V3ReligiousAffiliation._1021; + if ("1022".equals(codeString)) + return V3ReligiousAffiliation._1022; + if ("1023".equals(codeString)) + return V3ReligiousAffiliation._1023; + if ("1024".equals(codeString)) + return V3ReligiousAffiliation._1024; + if ("1025".equals(codeString)) + return V3ReligiousAffiliation._1025; + if ("1026".equals(codeString)) + return V3ReligiousAffiliation._1026; + if ("1027".equals(codeString)) + return V3ReligiousAffiliation._1027; + if ("1028".equals(codeString)) + return V3ReligiousAffiliation._1028; + if ("1029".equals(codeString)) + return V3ReligiousAffiliation._1029; + if ("1030".equals(codeString)) + return V3ReligiousAffiliation._1030; + if ("1031".equals(codeString)) + return V3ReligiousAffiliation._1031; + if ("1032".equals(codeString)) + return V3ReligiousAffiliation._1032; + if ("1033".equals(codeString)) + return V3ReligiousAffiliation._1033; + if ("1034".equals(codeString)) + return V3ReligiousAffiliation._1034; + if ("1035".equals(codeString)) + return V3ReligiousAffiliation._1035; + if ("1036".equals(codeString)) + return V3ReligiousAffiliation._1036; + if ("1037".equals(codeString)) + return V3ReligiousAffiliation._1037; + if ("1038".equals(codeString)) + return V3ReligiousAffiliation._1038; + if ("1039".equals(codeString)) + return V3ReligiousAffiliation._1039; + if ("1040".equals(codeString)) + return V3ReligiousAffiliation._1040; + if ("1041".equals(codeString)) + return V3ReligiousAffiliation._1041; + if ("1042".equals(codeString)) + return V3ReligiousAffiliation._1042; + if ("1043".equals(codeString)) + return V3ReligiousAffiliation._1043; + if ("1044".equals(codeString)) + return V3ReligiousAffiliation._1044; + if ("1045".equals(codeString)) + return V3ReligiousAffiliation._1045; + if ("1046".equals(codeString)) + return V3ReligiousAffiliation._1046; + if ("1047".equals(codeString)) + return V3ReligiousAffiliation._1047; + if ("1048".equals(codeString)) + return V3ReligiousAffiliation._1048; + if ("1049".equals(codeString)) + return V3ReligiousAffiliation._1049; + if ("1050".equals(codeString)) + return V3ReligiousAffiliation._1050; + if ("1051".equals(codeString)) + return V3ReligiousAffiliation._1051; + if ("1052".equals(codeString)) + return V3ReligiousAffiliation._1052; + if ("1053".equals(codeString)) + return V3ReligiousAffiliation._1053; + if ("1054".equals(codeString)) + return V3ReligiousAffiliation._1054; + if ("1055".equals(codeString)) + return V3ReligiousAffiliation._1055; + if ("1056".equals(codeString)) + return V3ReligiousAffiliation._1056; + if ("1057".equals(codeString)) + return V3ReligiousAffiliation._1057; + if ("1058".equals(codeString)) + return V3ReligiousAffiliation._1058; + if ("1059".equals(codeString)) + return V3ReligiousAffiliation._1059; + if ("1060".equals(codeString)) + return V3ReligiousAffiliation._1060; + if ("1061".equals(codeString)) + return V3ReligiousAffiliation._1061; + if ("1062".equals(codeString)) + return V3ReligiousAffiliation._1062; + if ("1063".equals(codeString)) + return V3ReligiousAffiliation._1063; + if ("1064".equals(codeString)) + return V3ReligiousAffiliation._1064; + if ("1065".equals(codeString)) + return V3ReligiousAffiliation._1065; + if ("1066".equals(codeString)) + return V3ReligiousAffiliation._1066; + if ("1067".equals(codeString)) + return V3ReligiousAffiliation._1067; + if ("1068".equals(codeString)) + return V3ReligiousAffiliation._1068; + if ("1069".equals(codeString)) + return V3ReligiousAffiliation._1069; + if ("1070".equals(codeString)) + return V3ReligiousAffiliation._1070; + if ("1071".equals(codeString)) + return V3ReligiousAffiliation._1071; + if ("1072".equals(codeString)) + return V3ReligiousAffiliation._1072; + if ("1073".equals(codeString)) + return V3ReligiousAffiliation._1073; + if ("1074".equals(codeString)) + return V3ReligiousAffiliation._1074; + if ("1075".equals(codeString)) + return V3ReligiousAffiliation._1075; + if ("1076".equals(codeString)) + return V3ReligiousAffiliation._1076; + if ("1077".equals(codeString)) + return V3ReligiousAffiliation._1077; + if ("1078".equals(codeString)) + return V3ReligiousAffiliation._1078; + if ("1079".equals(codeString)) + return V3ReligiousAffiliation._1079; + if ("1080".equals(codeString)) + return V3ReligiousAffiliation._1080; + if ("1081".equals(codeString)) + return V3ReligiousAffiliation._1081; + if ("1082".equals(codeString)) + return V3ReligiousAffiliation._1082; + throw new IllegalArgumentException("Unknown V3ReligiousAffiliation code '"+codeString+"'"); + } + + public String toCode(V3ReligiousAffiliation code) { + if (code == V3ReligiousAffiliation._1001) + return "1001"; + if (code == V3ReligiousAffiliation._1002) + return "1002"; + if (code == V3ReligiousAffiliation._1003) + return "1003"; + if (code == V3ReligiousAffiliation._1004) + return "1004"; + if (code == V3ReligiousAffiliation._1005) + return "1005"; + if (code == V3ReligiousAffiliation._1006) + return "1006"; + if (code == V3ReligiousAffiliation._1007) + return "1007"; + if (code == V3ReligiousAffiliation._1008) + return "1008"; + if (code == V3ReligiousAffiliation._1009) + return "1009"; + if (code == V3ReligiousAffiliation._1010) + return "1010"; + if (code == V3ReligiousAffiliation._1011) + return "1011"; + if (code == V3ReligiousAffiliation._1012) + return "1012"; + if (code == V3ReligiousAffiliation._1013) + return "1013"; + if (code == V3ReligiousAffiliation._1014) + return "1014"; + if (code == V3ReligiousAffiliation._1015) + return "1015"; + if (code == V3ReligiousAffiliation._1016) + return "1016"; + if (code == V3ReligiousAffiliation._1017) + return "1017"; + if (code == V3ReligiousAffiliation._1018) + return "1018"; + if (code == V3ReligiousAffiliation._1019) + return "1019"; + if (code == V3ReligiousAffiliation._1020) + return "1020"; + if (code == V3ReligiousAffiliation._1021) + return "1021"; + if (code == V3ReligiousAffiliation._1022) + return "1022"; + if (code == V3ReligiousAffiliation._1023) + return "1023"; + if (code == V3ReligiousAffiliation._1024) + return "1024"; + if (code == V3ReligiousAffiliation._1025) + return "1025"; + if (code == V3ReligiousAffiliation._1026) + return "1026"; + if (code == V3ReligiousAffiliation._1027) + return "1027"; + if (code == V3ReligiousAffiliation._1028) + return "1028"; + if (code == V3ReligiousAffiliation._1029) + return "1029"; + if (code == V3ReligiousAffiliation._1030) + return "1030"; + if (code == V3ReligiousAffiliation._1031) + return "1031"; + if (code == V3ReligiousAffiliation._1032) + return "1032"; + if (code == V3ReligiousAffiliation._1033) + return "1033"; + if (code == V3ReligiousAffiliation._1034) + return "1034"; + if (code == V3ReligiousAffiliation._1035) + return "1035"; + if (code == V3ReligiousAffiliation._1036) + return "1036"; + if (code == V3ReligiousAffiliation._1037) + return "1037"; + if (code == V3ReligiousAffiliation._1038) + return "1038"; + if (code == V3ReligiousAffiliation._1039) + return "1039"; + if (code == V3ReligiousAffiliation._1040) + return "1040"; + if (code == V3ReligiousAffiliation._1041) + return "1041"; + if (code == V3ReligiousAffiliation._1042) + return "1042"; + if (code == V3ReligiousAffiliation._1043) + return "1043"; + if (code == V3ReligiousAffiliation._1044) + return "1044"; + if (code == V3ReligiousAffiliation._1045) + return "1045"; + if (code == V3ReligiousAffiliation._1046) + return "1046"; + if (code == V3ReligiousAffiliation._1047) + return "1047"; + if (code == V3ReligiousAffiliation._1048) + return "1048"; + if (code == V3ReligiousAffiliation._1049) + return "1049"; + if (code == V3ReligiousAffiliation._1050) + return "1050"; + if (code == V3ReligiousAffiliation._1051) + return "1051"; + if (code == V3ReligiousAffiliation._1052) + return "1052"; + if (code == V3ReligiousAffiliation._1053) + return "1053"; + if (code == V3ReligiousAffiliation._1054) + return "1054"; + if (code == V3ReligiousAffiliation._1055) + return "1055"; + if (code == V3ReligiousAffiliation._1056) + return "1056"; + if (code == V3ReligiousAffiliation._1057) + return "1057"; + if (code == V3ReligiousAffiliation._1058) + return "1058"; + if (code == V3ReligiousAffiliation._1059) + return "1059"; + if (code == V3ReligiousAffiliation._1060) + return "1060"; + if (code == V3ReligiousAffiliation._1061) + return "1061"; + if (code == V3ReligiousAffiliation._1062) + return "1062"; + if (code == V3ReligiousAffiliation._1063) + return "1063"; + if (code == V3ReligiousAffiliation._1064) + return "1064"; + if (code == V3ReligiousAffiliation._1065) + return "1065"; + if (code == V3ReligiousAffiliation._1066) + return "1066"; + if (code == V3ReligiousAffiliation._1067) + return "1067"; + if (code == V3ReligiousAffiliation._1068) + return "1068"; + if (code == V3ReligiousAffiliation._1069) + return "1069"; + if (code == V3ReligiousAffiliation._1070) + return "1070"; + if (code == V3ReligiousAffiliation._1071) + return "1071"; + if (code == V3ReligiousAffiliation._1072) + return "1072"; + if (code == V3ReligiousAffiliation._1073) + return "1073"; + if (code == V3ReligiousAffiliation._1074) + return "1074"; + if (code == V3ReligiousAffiliation._1075) + return "1075"; + if (code == V3ReligiousAffiliation._1076) + return "1076"; + if (code == V3ReligiousAffiliation._1077) + return "1077"; + if (code == V3ReligiousAffiliation._1078) + return "1078"; + if (code == V3ReligiousAffiliation._1079) + return "1079"; + if (code == V3ReligiousAffiliation._1080) + return "1080"; + if (code == V3ReligiousAffiliation._1081) + return "1081"; + if (code == V3ReligiousAffiliation._1082) + return "1082"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevel.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevel.java new file mode 100644 index 00000000000..18db945b435 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevel.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseLevel { + + /** + * Respond with exceptions and a notification of completion + */ + C, + /** + * Respond with exceptions, completion, modifications and include more detail information (if applicable) + */ + D, + /** + * Respond with exceptions only + */ + E, + /** + * Respond with exceptions, completion, and modification with detail (as above), and send positive confirmations even if no modifications are being made. + */ + F, + /** + * Respond only with message level acknowledgements, i.e., only notify acceptance or rejection of the message, do not include any application-level detail + */ + N, + /** + * Respond with exceptions, completions and modifications or revisions done before completion + */ + R, + /** + * Do not send any kind of response + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("D".equals(codeString)) + return D; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ResponseLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case D: return "D"; + case E: return "E"; + case F: return "F"; + case N: return "N"; + case R: return "R"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Respond with exceptions and a notification of completion"; + case D: return "Respond with exceptions, completion, modifications and include more detail information (if applicable)"; + case E: return "Respond with exceptions only"; + case F: return "Respond with exceptions, completion, and modification with detail (as above), and send positive confirmations even if no modifications are being made."; + case N: return "Respond only with message level acknowledgements, i.e., only notify acceptance or rejection of the message, do not include any application-level detail"; + case R: return "Respond with exceptions, completions and modifications or revisions done before completion"; + case X: return "Do not send any kind of response"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "completion"; + case D: return "detail"; + case E: return "exception"; + case F: return "confirmation"; + case N: return "message-control"; + case R: return "modification"; + case X: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevelEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevelEnumFactory.java new file mode 100644 index 00000000000..58f83340753 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseLevelEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ResponseLevelEnumFactory implements EnumFactory { + + public V3ResponseLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3ResponseLevel.C; + if ("D".equals(codeString)) + return V3ResponseLevel.D; + if ("E".equals(codeString)) + return V3ResponseLevel.E; + if ("F".equals(codeString)) + return V3ResponseLevel.F; + if ("N".equals(codeString)) + return V3ResponseLevel.N; + if ("R".equals(codeString)) + return V3ResponseLevel.R; + if ("X".equals(codeString)) + return V3ResponseLevel.X; + throw new IllegalArgumentException("Unknown V3ResponseLevel code '"+codeString+"'"); + } + + public String toCode(V3ResponseLevel code) { + if (code == V3ResponseLevel.C) + return "C"; + if (code == V3ResponseLevel.D) + return "D"; + if (code == V3ResponseLevel.E) + return "E"; + if (code == V3ResponseLevel.F) + return "F"; + if (code == V3ResponseLevel.N) + return "N"; + if (code == V3ResponseLevel.R) + return "R"; + if (code == V3ResponseLevel.X) + return "X"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModality.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModality.java new file mode 100644 index 00000000000..afb2ca3d7b8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModality.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseModality { + + /** + * Query response to be sent as an HL7 Batch. + */ + B, + /** + * Query response to occur in real time. + */ + R, + /** + * Query response to sent as a series of responses at the same time without the use of batch formatting. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseModality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("R".equals(codeString)) + return R; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ResponseModality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case R: return "R"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseModality"; + } + public String getDefinition() { + switch (this) { + case B: return "Query response to be sent as an HL7 Batch."; + case R: return "Query response to occur in real time."; + case T: return "Query response to sent as a series of responses at the same time without the use of batch formatting."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "Batch"; + case R: return "Real Time"; + case T: return "Bolus"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModalityEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModalityEnumFactory.java new file mode 100644 index 00000000000..a796f156fbe --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModalityEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ResponseModalityEnumFactory implements EnumFactory { + + public V3ResponseModality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ResponseModality.B; + if ("R".equals(codeString)) + return V3ResponseModality.R; + if ("T".equals(codeString)) + return V3ResponseModality.T; + throw new IllegalArgumentException("Unknown V3ResponseModality code '"+codeString+"'"); + } + + public String toCode(V3ResponseModality code) { + if (code == V3ResponseModality.B) + return "B"; + if (code == V3ResponseModality.R) + return "R"; + if (code == V3ResponseModality.T) + return "T"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseMode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseMode.java new file mode 100644 index 00000000000..9b2c853682b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseMode { + + /** + * The receiver may respond in a non-immediate manner. Note: this will be the default value. + */ + D, + /** + * The receiver is required to assume that the sender is blocking and behave appropriately by sending an immediate response. + */ + I, + /** + * The receiver shall keep any application responses in a queue until such time as the queue is polled. + */ + Q, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("Q".equals(codeString)) + return Q; + throw new FHIRException("Unknown V3ResponseMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case I: return "I"; + case Q: return "Q"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseMode"; + } + public String getDefinition() { + switch (this) { + case D: return "The receiver may respond in a non-immediate manner. Note: this will be the default value."; + case I: return "The receiver is required to assume that the sender is blocking and behave appropriately by sending an immediate response."; + case Q: return "The receiver shall keep any application responses in a queue until such time as the queue is polled."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "deferred"; + case I: return "immediate"; + case Q: return "queue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModeEnumFactory.java new file mode 100644 index 00000000000..248ae5d88fb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ResponseModeEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3ResponseModeEnumFactory implements EnumFactory { + + public V3ResponseMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ResponseMode.D; + if ("I".equals(codeString)) + return V3ResponseMode.I; + if ("Q".equals(codeString)) + return V3ResponseMode.Q; + throw new IllegalArgumentException("Unknown V3ResponseMode code '"+codeString+"'"); + } + + public String toCode(V3ResponseMode code) { + if (code == V3ResponseMode.D) + return "D"; + if (code == V3ResponseMode.I) + return "I"; + if (code == V3ResponseMode.Q) + return "Q"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClass.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClass.java new file mode 100644 index 00000000000..478adadbb2c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClass.java @@ -0,0 +1,1278 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleClass { + + /** + * Corresponds to the Role class + */ + ROL, + /** + * A general association between two entities that is neither partitive nor ontological. + */ + _ROLECLASSASSOCIATIVE, + /** + * A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g., spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children). + */ + _ROLECLASSMUTUALRELATIONSHIP, + /** + * A relationship between two entities that is formally recognized, frequently by a contract or similar agreement. + */ + _ROLECLASSRELATIONSHIPFORMAL, + /** + * Player of the Affiliate role has a business/professional relationship with scoper. Player and scoper may be persons or organization. The Affiliate relationship does not imply membership in a group, nor does it exist for resource scheduling purposes. + + + Example: A healthcare provider is affiliated with another provider as a business associate. + */ + AFFL, + /** + * An entity (player) that acts or is authorized to act on behalf of another entity (scoper). + */ + AGNT, + /** + * An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization. + */ + ASSIGNED, + /** + * An Entity that is authorized to issue or instantiate permissions, privileges, credentials or other formal/legal authorizations. + */ + COMPAR, + /** + * The role of a person (player) who is the officer or signature authority for of a scoping entity, usually an organization (scoper). + */ + SGNOFF, + /** + * A person or an organization (player) which provides or receives information regarding another entity (scoper). Examples; patient NOK and emergency contacts; guarantor contact; employer contact. + */ + CON, + /** + * An entity to be contacted in the event of an emergency. + */ + ECON, + /** + * An individual designated for notification as the next of kin for a given entity. + */ + NOK, + /** + * Guardian of a ward + */ + GUARD, + /** + * Citizen of apolitical entity + */ + CIT, + /** + * A role class played by a person who receives benefit coverage under the terms of a particular insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy. + + + Discussion:This reason for coverage is captured in 'Role.code' and a relationship link with type code of indirect authority should be included using the policy holder role as the source, and the covered party role as the target. + + Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder. + */ + COVPTY, + /** + * Description: A role played by a party making a claim for coverage under a policy or program. A claimant must be either a person or organization, or a group of persons or organizations. A claimant is not a named insured or a program eligible. + + + Discussion: With respect to liability insurance such as property and casualty insurance, a claimant must file a claim requesting indemnification for a loss that the claimant considers covered under the policy of a named insured. The claims adjuster for the policy underwriter will review the claim to determine whether the loss meets the benefit coverage criteria under a policy, and base any indemnification or coverage payment on that review. If a third party is liable in whole or part for the loss, the underwriter may pursue third party liability recovery. A claimant may be involved in civil or criminal legal proceedings involving claims against a defendant party that is indemnified by an insurance policy or to protest the finding of a claims adjustor. With respect to life insurance, a beneficiary designated by a named insured becomes a claimant of the proceeds of coverage, as in the case of a life insurance policy. However, a claimant for coverage under life insurance is not necessarily a designated beneficiary. + + + Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + + In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. + + + Example: A claimant under automobile policy that is not the named insured. + */ + CLAIM, + /** + * Description: A role played by a party to an insurance policy to which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations. + + + Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g., where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy. + + + Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g., if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss. + + + Example: The named insured under a comprehensive automobile, disability, or property and casualty policy that is the named insured and may or may not be the policy holder. + */ + NAMED, + /** + * Description: A role played by a person covered under a policy or program based on an association with a subscriber, which is recognized by the policy holder. + + + Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g., a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy. + + + Example: The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriberaTMs legal standing in the relationship with the dependent. + */ + DEPEN, + /** + * Description: A role played by a party covered under a policy as the policy holder. An individual may be either a person or an organization. + + + Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss. + + + Example: The individual insured under a comprehensive automobile, disability, or property and casualty policy that is the policy holder. + */ + INDIV, + /** + * Description: A role played by a person covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage. + + + Discussion: The policy holder holds the contract with the policy or program underwriter. The subscriber holds a certificate of coverage under the contract. In legal proceedings concerning the policy or program, the terms of the contract takes precedence over the terms of the certificate of coverage if there are any inconsistencies. + + + Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy. + + + Example: An employee or a member of an association. + */ + SUBSCR, + /** + * Description: A role played by a party that meets the eligibility criteria for coverage under a program. A program eligible may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations. + + + Discussion: A program as typically government administered coverage for parties determined eligible under the terms of the program. + + + Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + + In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. + + + Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid. + */ + PROG, + /** + * A role played by a provider, always a person, who has agency authority from a Clinical Research Sponsor to direct the conduct of a clinical research trial or study on behalf of the sponsor. + */ + CRINV, + /** + * A role played by an entity, usually an organization, that is the sponsor of a clinical research trial or study. The sponsor commissions the study, bears the expenses, is responsible for satisfying all legal requirements concerning subject safety and privacy, and is generally responsible for collection, storage and analysis of the data generated during the trial. No scoper is necessary, as a clinical research sponsor undertakes the role on its own authority and declaration. Clinical research sponsors are usually educational or other research organizations, government agencies or biopharmaceutical companies. + */ + CRSPNSR, + /** + * A relationship between a person or organization and a person or organization formed for the purpose of exchanging work for compensation. The purpose of the role is to identify the type of relationship the employee has to the employer, rather than the nature of the work actually performed. (Contrast with AssignedEntity.) + */ + EMP, + /** + * A role played by a member of a military service. Scoper is the military service (e.g. Army, Navy, Air Force, etc.) or, more specifically, the unit (e.g. Company C, 3rd Battalion, 4th Division, etc.) + */ + MIL, + /** + * A person or organization (player) that serves as a financial guarantor for another person or organization (scoper). + */ + GUAR, + /** + * An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation. + */ + INVSBJ, + /** + * A person, non-person living subject, or place that is the subject of an investigation related to a notifiable condition (health circumstance that is reportable within the applicable public health jurisdiction) + */ + CASEBJ, + /** + * Definition:Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. + + + Examples: Screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the experimental portion of the design. + */ + RESBJ, + /** + * A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g., a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals). + */ + LIC, + /** + * notary public + */ + NOT, + /** + * An Entity (player) that is authorized to provide health care services by some authorizing agency (scoper). + */ + PROV, + /** + * A Role of a LivingSubject (player) as an actual or potential recipient of health care services from a healthcare provider organization (scoper). + + + Usage Note: Communication about relationships between patients and specific healthcare practitioners (people) is not done via scoper. Instead this is generally done using the CareProvision act. This allows linkage between patient and a particular healthcare practitioner role and also allows description of the type of care involved in the relationship. + */ + PAT, + /** + * The role of an organization or individual designated to receive payment for a claim against a particular coverage. The scoping entity is the organization that is the submitter of the invoice in question. + */ + PAYEE, + /** + * The role of an organization that undertakes to accept claims invoices, assess the coverage or payments due for those invoices and pay to the designated payees for those invoices. This role may be either the underwriter or a third-party organization authorized by the underwriter. The scoping entity is the organization that underwrites the claimed coverage. + */ + PAYOR, + /** + * A role played by a person or organization that holds an insurance policy. The underwriter of that policy is the scoping entity. + + + Discussion:The identifier of the policy is captured in 'Role.id' when the Role is a policy holder. + + A particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder. + */ + POLHOLD, + /** + * An entity (player) that has been recognized as having certain training/experience or other characteristics that would make said entity an appropriate performer for a certain activity. The scoper is an organization that educates or qualifies entities. + */ + QUAL, + /** + * A role played by an entity, usually an organization that is the sponsor of an insurance plan or a health program. A sponsor is the party that is ultimately accountable for the coverage by employment contract or by law. A sponsor can be an employer, union, government agency, or association. Fully insured sponsors establish the terms of the plan and contract with health insurance plans to assume the risk and to administer the plan. Self-insured sponsors delegate coverage administration, but not risk, to third-party administrators. Program sponsors designate services to be covered in accordance with statute. Program sponsors may administer the coverage themselves, delegate coverage administration, but not risk to third-party administrators, or contract with health insurance plans to assume the risk and administrator a program. Sponsors qualify individuals who may become + + + + a policy holder of the plan; + + + + where the sponsor is the policy holder, who may become a subscriber or a dependent to a policy under the plan; or + + + + where the sponsor is a government agency, who may become program eligibles under a program. + + + + The sponsor role may be further qualified by the SponsorRole.code. Entities playing the sponsor role may also play the role of a Coverage Administrator. + + + Example: An employer, union, government agency, or association. + */ + SPNSR, + /** + * A role played by an individual who is a student of a school, which is the scoping entity. + */ + STD, + /** + * A role played by a person or an organization. It is the party that + + + + accepts fiscal responsibility for insurance plans and the policies created under those plans; + + + + administers and accepts fiscal responsibility for a program that provides coverage for services to eligible individuals; and/or + + + + has the responsibility to assess the merits of each risk and decide a suitable premium for accepting all or part of the risk. If played by an organization, this role may be further specified by an appropriate RoleCode. + + + + + Example: + + + + + A health insurer; + + + + Medicaid Program; + + + + Lloyd's of London + */ + UNDWRT, + /** + * A person responsible for the primary care of a patient at home. + */ + CAREGIVER, + /** + * Links two entities with classCode PSN (person) in a personal relationship. The character of the relationship must be defined by a PersonalRelationshipRoleType code. The player and scoper are determined by PersonalRelationshipRoleType code as well. + */ + PRS, + /** + * The "same" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error. + + + Usage: + + + playing and scoping entities must have same classcode, but need not have identical attributes or values. + + + Example: + + + a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual. + */ + SELF, + /** + * An association for a playing Entity that is used, known, treated, handled, built, or destroyed, etc. under the auspices of the scoping Entity. The playing Entity is passive in these roles (even though it may be active in other roles), in the sense that the kinds of things done to it in this role happen without an agreement from the playing Entity. + */ + _ROLECLASSPASSIVE, + /** + * A role in which the playing entity (material) provides access to another entity. The principal use case is intravenous (or other bodily) access lines that preexist and need to be referred to for medication routing instructions. + */ + ACCESS, + /** + * A physical association whereby two Entities are in some (even lose) spatial relationship with each other such that they touch each other in some way. + + + Examples: the colon is connected (and therefore adjacent) to the jejunum; the colon is adjacent to the liver (even if not actually connected.) + + + UsageConstraints: Adjacency is in principle a symmetrical connection, but scoper and player of the role should, where applicable, be assigned to have scoper be the larger, more central Entity and player the smaller, more distant, appendage. + */ + ADJY, + /** + * An adjacency of two Entities held together by a bond which attaches to each of the two entities. + + + Examples: biceps brachii muscle connected to the radius bone, port 3 on a network switch connected to port 5 on a patch panel. + + + UsageConstraints: See Adjacency for the assignment of scoper (larger, more central) and player (smaller, more distant). + */ + CONC, + /** + * A connection between two atoms of a molecule. + + + Examples: double bond between first and second C in ethane, peptide bond between two amino-acid, disulfide bridge between two proteins, chelate and ion associations, even the much weaker van-der-Waals bonds can be considered molecular bonds. + + + UsageConstraints: See connection and adjacency for the assignment of player and scoper. + */ + BOND, + /** + * A connection between two regional parts. + + + Examples: the connection between ascending aorta and the aortic arc, connection between descending colon and sigmoid. + + + UsageConstraints: See connection and adjacency for the assignment of player and scoper. + */ + CONY, + /** + * A material (player) that can be administered to an Entity (scoper). + */ + ADMM, + /** + * Relates a place (playing Entity) as the location where a living subject (scoping Entity) was born. + */ + BIRTHPL, + /** + * Definition: Relates a place (playing Entity) as the location where a living subject (scoping Entity) died. + */ + DEATHPLC, + /** + * A material (player) distributed by a distributor (scoper) who functions between a manufacturer and a buyer or retailer. + */ + DST, + /** + * Material (player) sold by a retailer (scoper), who also give advice to prospective buyers. + */ + RET, + /** + * A role played by a place at which the location of an event may be recorded. + */ + EXLOC, + /** + * A role played by a place at which services may be provided. + */ + SDLOC, + /** + * A role of a place (player) that is intended to house the provision of services. Scoper is the Entity (typically Organization) that provides these services. This is not synonymous with "ownership." + */ + DSDLOC, + /** + * A role played by a place at which health care services may be provided without prior designation or authorization. + */ + ISDLOC, + /** + * A role played by an entity that has been exposed to a person or animal suffering a contagious disease, or with a location from which a toxin has been distributed. The player of the role is normally a person or animal, but it is possible that other entity types could become exposed. The role is scoped by the source of the exposure, and it is quite possible for a person playing the role of exposed party to also become the scoper a role played by another person. That is to say, once a person has become infected, it is possible, perhaps likely, for that person to infect others. + + Management of exposures and tracking exposed parties is a key function within public health, and within most public health contexts - exposed parties are known as "contacts." + */ + EXPR, + /** + * Entity that is currently in the possession of a holder (scoper), who holds, or uses it, usually based on some agreement with the owner. + */ + HLD, + /** + * The role of a material (player) that is the physical health chart belonging to an organization (scoper). + */ + HLTHCHRT, + /** + * A role in which the scoping entity designates an identifier for a playing entity. + */ + IDENT, + /** + * Scoped by the manufacturer + */ + MANU, + /** + * A manufactured material (player) that is used for its therapeutic properties. The manufacturer is the scoper. + */ + THER, + /** + * An entity (player) that is maintained by another entity (scoper). This is typical role held by durable equipment. The scoper assumes responsibility for proper operation, quality, and safety. + */ + MNT, + /** + * An Entity (player) for which someone (scoper) is granted by law the right to call the material (player) his own. This entitles the scoper to make decisions about the disposition of that material. + */ + OWN, + /** + * A product regulated by some governmentatl orgnization. The role is played by Material and scoped by Organization. + + Rationale: To support an entity clone used to identify the NDC number for a drug product. + */ + RGPR, + /** + * Relates a place entity (player) as the region over which the scoper (typically an Organization) has certain authority (jurisdiction). For example, the Calgary Regional Health Authority (scoper) has authority over the territory "Region 4 of Alberta" (player) in matters of health. + */ + TERR, + /** + * Description:An entity (player) that is used by another entity (scoper) + */ + USED, + /** + * A role a product plays when a guarantee is given to the purchaser by the seller (scoping entity) stating that the product is reliable and free from known defects and that the seller will repair or replace defective parts within a given time limit and under certain conditions. + */ + WRTE, + /** + * A relationship in which the scoping Entity defines or specifies what the playing Entity is. Thus, the player's "being" (Greek: ontos) is specified. + */ + _ROLECLASSONTOLOGICAL, + /** + * Description: Specifies the player Entity (the equivalent Entity) as an Entity that is considered to be equivalent to a reference Entity (scoper). The equivalence is in principle a symmetric relationship, however, it is expected that the scoper is a reference entity which serves as reference entity for multiple different equivalent entities. + + + Examples: An innovator's medicine formulation is the reference for "generics", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.) + */ + EQUIV, + /** + * The "same" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error. + + + Usage: + + + playing and scoping entities must have same classCode, but need not have identical attributes or values. + + + Example: + + + a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual. + */ + SAME, + /** + * Relates a prevailing record of an Entity (scoper) with another record (player) that it subsumes. + + + Examples: Show a correct new Person object (scoper) that subsumes one or more duplicate Person objects that had accidentally been created for the same physical person. + + + Constraints: Both the player and scoper must have the same classCode. + */ + SUBY, + /** + * Relates a specialized material concept (player) to its generalization (scoper). + */ + GEN, + /** + * A special link between pharmaceuticals indicating that the target (scoper) is a generic for the source (player). + */ + GRIC, + /** + * An individual piece of material (player) instantiating a class of material (scoper). + */ + INST, + /** + * An entity that subsumes the identity of another. Used in the context of merging documented entity instances. Both the player and scoper must have the same classCode. + + The use of this code is deprecated in favor of the term SUBY which is its inverse and is more ontologically correct. + */ + SUBS, + /** + * An association between two Entities where the playing Entity is considered in some way "part" of the scoping Entity, e.g., as a member, component, ingredient, or content. Being "part" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity. + */ + _ROLECLASSPARTITIVE, + /** + * Relates a material as the content (player) to a container (scoper). Unlike ingredients, the content and a container remain separate (not mixed) and the content can be removed from the container. A content is not part of an empty container. + */ + CONT, + /** + * An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + EXPAGTCAR, + /** + * Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + EXPVECTOR, + /** + * Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + FOMITE, + /** + * Relates a component (player) to a mixture (scoper). E.g., Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube. + */ + INGR, + /** + * Definition: a therapeutically active ingredient (player) in a mixture (scoper), where the mixture is typically a manufactured pharmaceutical. It is unknown if the quantity of such an ingredient is expressed precisely in terms of the playing ingredient substance, or, if it is specified in terms of a closely related substance (active moiety or reference substance). + */ + ACTI, + /** + * Description: Active ingredient, where the ingredient substance (player) is itself the "basis of strength", i.e., where the Role.quantity specifies exactly the quantity of the player substance in the medicine formulation. + + + Examples: Lopressor 50 mg actually contains 50 mg of metoprolol succinate, even though the active moiety is metoprolol, but also: Tenormin 50 mg contain 50 mg of atenolol, as free base, i.e., where the active ingredient atenolol is also the active moiety. + */ + ACTIB, + /** + * Description: Active ingredient, where not the ingredient substance (player), but itaTMs active moiety is the "basis of strength", i.e., where the Role.quantity specifies the quantity of the player substance's active moiety in the medicine formulation. + + + Examples: 1 mL of Betopic 5mg/mL eye drops contains 5.6 mg betaxolol hydrochloride equivalent to betaxolol base 5 mg. + */ + ACTIM, + /** + * Description: Active ingredient, where not the ingredient substance (player) but another reference substance with the same active moiety, is the "basis of strength", i.e., where the Role.quantity specifies the quantity of a reference substance, similar but different from the player substance's in the medicine formulation. + + + Examples: Toprol-XL 50 mg contains 47.5 mg of metoprolol succinate equivalent to 50 mg of metoprolol tartrate. + */ + ACTIR, + /** + * A component (player) added to enhance the action of an active ingredient (scoper) (in the manner of a catalyst) but which has no active effect in and of itself. Such ingredients are significant in defining equivalence of products in a way that inactive ingredients are not. + */ + ADJV, + /** + * An ingredient (player) that is added to a base (scoper), that amounts to a minor part of the overall mixture. + */ + ADTV, + /** + * A base ingredient (player) is what comprises the major part of a mixture (scoper). E.g., Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture. + */ + BASE, + /** + * An ingredient whose presence is not intended but may not be reasonably avoided given the circumstances of the mixture's nature or origin. + */ + CNTM, + /** + * An ingredient which is not considered therapeutically active, e.g., colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g., might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect. + */ + IACT, + /** + * A substance (player) influencing the optical aspect of material (scoper). + */ + COLR, + /** + * A substance (player) added to a mixture (scoper) to make it taste a certain way. In food the use is obvious, in pharmaceuticals flavors can hide disgusting taste of the active ingredient (important in pediatric treatments). + */ + FLVR, + /** + * A substance (player) added to a mixture (scoper) to prevent microorganisms (fungi, bacteria) to spoil the mixture. + */ + PRSV, + /** + * A stabilizer (player) added to a mixture (scoper) in order to prevent the molecular disintegration of the main substance. + */ + STBL, + /** + * An ingredient (player) of a medication (scoper) that is inseparable from the active ingredients, but has no intended chemical or pharmaceutical effect itself, but which may have some systemic effect on the patient. + + An example is a collagen matrix used as a base for transplanting skin cells. The collagen matrix can be left permanently in the graft site. Because it is of bovine origin, the patient may exhibit allergies or may have cultural objections to its use. + */ + MECH, + /** + * Relates an entity (player) to a location (scoper) at which it is present in some way. This presence may be limited in time. + */ + LOCE, + /** + * Relates an entity (player) (e.g. a device) to a location (scoper) at which it is normally found or stored when not used. + */ + STOR, + /** + * A role played by an entity that is a member of a group. The group provides the scope for this role. + + Among other uses, groups as used in insurance (groups of covered individuals) and in scheduling where resources may be grouped for scheduling and logistical purposes. + */ + MBR, + /** + * Definition: an association between two Entities where the playing Entity (the part) is a component of the whole (scoper) in the sense of an integral structural component, that is distinct from other parts in the same whole, has a distinct function in the whole, and, as an effect, the full integrity of the whole depends (to some degree) on the presence of this part, even though the part may often be separable from the whole. + + + Discussion: Part is defined in opposition to (a) ingredient (not separable), (b) content (not a functional component), and (c) member (not functionally distinct from other members). + */ + PART, + /** + * The molecule or ion that is responsible for the intended pharmacological action of the drug substance, excluding those appended or associated parts of the molecule that make the molecule an ester, salt (including a salt with hydrogen or coordination bonds), or other noncovalent derivative (such as a complex, chelate, or clathrate). + + Examples: heparin-sodium and heparin-potassium have the same active moiety, heparin; the active moiety of morphine-hydrochloride is morphine. + */ + ACTM, + /** + * A role played by a material entity that is a specimen for an act. It is scoped by the source of the specimen. + */ + SPEC, + /** + * A portion (player) of an original or source specimen (scoper) used for testing or transportation. + */ + ALQT, + /** + * A microorganism that has been isolated from other microorganisms or a source matrix. + */ + ISLT, + /** + * The player of the role is a child of the scoping entity, in a generic sense. + */ + CHILD, + /** + * A role played by an entity that receives credentials from the scoping entity. + */ + CRED, + /** + * nurse practitioner + */ + NURPRAC, + /** + * nurse + */ + NURS, + /** + * physician assistant + */ + PA, + /** + * physician + */ + PHYS, + /** + * added to help the parsers + */ + NULL; + public static V3RoleClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ROL".equals(codeString)) + return ROL; + if ("_RoleClassAssociative".equals(codeString)) + return _ROLECLASSASSOCIATIVE; + if ("_RoleClassMutualRelationship".equals(codeString)) + return _ROLECLASSMUTUALRELATIONSHIP; + if ("_RoleClassRelationshipFormal".equals(codeString)) + return _ROLECLASSRELATIONSHIPFORMAL; + if ("AFFL".equals(codeString)) + return AFFL; + if ("AGNT".equals(codeString)) + return AGNT; + if ("ASSIGNED".equals(codeString)) + return ASSIGNED; + if ("COMPAR".equals(codeString)) + return COMPAR; + if ("SGNOFF".equals(codeString)) + return SGNOFF; + if ("CON".equals(codeString)) + return CON; + if ("ECON".equals(codeString)) + return ECON; + if ("NOK".equals(codeString)) + return NOK; + if ("GUARD".equals(codeString)) + return GUARD; + if ("CIT".equals(codeString)) + return CIT; + if ("COVPTY".equals(codeString)) + return COVPTY; + if ("CLAIM".equals(codeString)) + return CLAIM; + if ("NAMED".equals(codeString)) + return NAMED; + if ("DEPEN".equals(codeString)) + return DEPEN; + if ("INDIV".equals(codeString)) + return INDIV; + if ("SUBSCR".equals(codeString)) + return SUBSCR; + if ("PROG".equals(codeString)) + return PROG; + if ("CRINV".equals(codeString)) + return CRINV; + if ("CRSPNSR".equals(codeString)) + return CRSPNSR; + if ("EMP".equals(codeString)) + return EMP; + if ("MIL".equals(codeString)) + return MIL; + if ("GUAR".equals(codeString)) + return GUAR; + if ("INVSBJ".equals(codeString)) + return INVSBJ; + if ("CASEBJ".equals(codeString)) + return CASEBJ; + if ("RESBJ".equals(codeString)) + return RESBJ; + if ("LIC".equals(codeString)) + return LIC; + if ("NOT".equals(codeString)) + return NOT; + if ("PROV".equals(codeString)) + return PROV; + if ("PAT".equals(codeString)) + return PAT; + if ("PAYEE".equals(codeString)) + return PAYEE; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("POLHOLD".equals(codeString)) + return POLHOLD; + if ("QUAL".equals(codeString)) + return QUAL; + if ("SPNSR".equals(codeString)) + return SPNSR; + if ("STD".equals(codeString)) + return STD; + if ("UNDWRT".equals(codeString)) + return UNDWRT; + if ("CAREGIVER".equals(codeString)) + return CAREGIVER; + if ("PRS".equals(codeString)) + return PRS; + if ("SELF".equals(codeString)) + return SELF; + if ("_RoleClassPassive".equals(codeString)) + return _ROLECLASSPASSIVE; + if ("ACCESS".equals(codeString)) + return ACCESS; + if ("ADJY".equals(codeString)) + return ADJY; + if ("CONC".equals(codeString)) + return CONC; + if ("BOND".equals(codeString)) + return BOND; + if ("CONY".equals(codeString)) + return CONY; + if ("ADMM".equals(codeString)) + return ADMM; + if ("BIRTHPL".equals(codeString)) + return BIRTHPL; + if ("DEATHPLC".equals(codeString)) + return DEATHPLC; + if ("DST".equals(codeString)) + return DST; + if ("RET".equals(codeString)) + return RET; + if ("EXLOC".equals(codeString)) + return EXLOC; + if ("SDLOC".equals(codeString)) + return SDLOC; + if ("DSDLOC".equals(codeString)) + return DSDLOC; + if ("ISDLOC".equals(codeString)) + return ISDLOC; + if ("EXPR".equals(codeString)) + return EXPR; + if ("HLD".equals(codeString)) + return HLD; + if ("HLTHCHRT".equals(codeString)) + return HLTHCHRT; + if ("IDENT".equals(codeString)) + return IDENT; + if ("MANU".equals(codeString)) + return MANU; + if ("THER".equals(codeString)) + return THER; + if ("MNT".equals(codeString)) + return MNT; + if ("OWN".equals(codeString)) + return OWN; + if ("RGPR".equals(codeString)) + return RGPR; + if ("TERR".equals(codeString)) + return TERR; + if ("USED".equals(codeString)) + return USED; + if ("WRTE".equals(codeString)) + return WRTE; + if ("_RoleClassOntological".equals(codeString)) + return _ROLECLASSONTOLOGICAL; + if ("EQUIV".equals(codeString)) + return EQUIV; + if ("SAME".equals(codeString)) + return SAME; + if ("SUBY".equals(codeString)) + return SUBY; + if ("GEN".equals(codeString)) + return GEN; + if ("GRIC".equals(codeString)) + return GRIC; + if ("INST".equals(codeString)) + return INST; + if ("SUBS".equals(codeString)) + return SUBS; + if ("_RoleClassPartitive".equals(codeString)) + return _ROLECLASSPARTITIVE; + if ("CONT".equals(codeString)) + return CONT; + if ("EXPAGTCAR".equals(codeString)) + return EXPAGTCAR; + if ("EXPVECTOR".equals(codeString)) + return EXPVECTOR; + if ("FOMITE".equals(codeString)) + return FOMITE; + if ("INGR".equals(codeString)) + return INGR; + if ("ACTI".equals(codeString)) + return ACTI; + if ("ACTIB".equals(codeString)) + return ACTIB; + if ("ACTIM".equals(codeString)) + return ACTIM; + if ("ACTIR".equals(codeString)) + return ACTIR; + if ("ADJV".equals(codeString)) + return ADJV; + if ("ADTV".equals(codeString)) + return ADTV; + if ("BASE".equals(codeString)) + return BASE; + if ("CNTM".equals(codeString)) + return CNTM; + if ("IACT".equals(codeString)) + return IACT; + if ("COLR".equals(codeString)) + return COLR; + if ("FLVR".equals(codeString)) + return FLVR; + if ("PRSV".equals(codeString)) + return PRSV; + if ("STBL".equals(codeString)) + return STBL; + if ("MECH".equals(codeString)) + return MECH; + if ("LOCE".equals(codeString)) + return LOCE; + if ("STOR".equals(codeString)) + return STOR; + if ("MBR".equals(codeString)) + return MBR; + if ("PART".equals(codeString)) + return PART; + if ("ACTM".equals(codeString)) + return ACTM; + if ("SPEC".equals(codeString)) + return SPEC; + if ("ALQT".equals(codeString)) + return ALQT; + if ("ISLT".equals(codeString)) + return ISLT; + if ("CHILD".equals(codeString)) + return CHILD; + if ("CRED".equals(codeString)) + return CRED; + if ("NURPRAC".equals(codeString)) + return NURPRAC; + if ("NURS".equals(codeString)) + return NURS; + if ("PA".equals(codeString)) + return PA; + if ("PHYS".equals(codeString)) + return PHYS; + throw new FHIRException("Unknown V3RoleClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROL: return "ROL"; + case _ROLECLASSASSOCIATIVE: return "_RoleClassAssociative"; + case _ROLECLASSMUTUALRELATIONSHIP: return "_RoleClassMutualRelationship"; + case _ROLECLASSRELATIONSHIPFORMAL: return "_RoleClassRelationshipFormal"; + case AFFL: return "AFFL"; + case AGNT: return "AGNT"; + case ASSIGNED: return "ASSIGNED"; + case COMPAR: return "COMPAR"; + case SGNOFF: return "SGNOFF"; + case CON: return "CON"; + case ECON: return "ECON"; + case NOK: return "NOK"; + case GUARD: return "GUARD"; + case CIT: return "CIT"; + case COVPTY: return "COVPTY"; + case CLAIM: return "CLAIM"; + case NAMED: return "NAMED"; + case DEPEN: return "DEPEN"; + case INDIV: return "INDIV"; + case SUBSCR: return "SUBSCR"; + case PROG: return "PROG"; + case CRINV: return "CRINV"; + case CRSPNSR: return "CRSPNSR"; + case EMP: return "EMP"; + case MIL: return "MIL"; + case GUAR: return "GUAR"; + case INVSBJ: return "INVSBJ"; + case CASEBJ: return "CASEBJ"; + case RESBJ: return "RESBJ"; + case LIC: return "LIC"; + case NOT: return "NOT"; + case PROV: return "PROV"; + case PAT: return "PAT"; + case PAYEE: return "PAYEE"; + case PAYOR: return "PAYOR"; + case POLHOLD: return "POLHOLD"; + case QUAL: return "QUAL"; + case SPNSR: return "SPNSR"; + case STD: return "STD"; + case UNDWRT: return "UNDWRT"; + case CAREGIVER: return "CAREGIVER"; + case PRS: return "PRS"; + case SELF: return "SELF"; + case _ROLECLASSPASSIVE: return "_RoleClassPassive"; + case ACCESS: return "ACCESS"; + case ADJY: return "ADJY"; + case CONC: return "CONC"; + case BOND: return "BOND"; + case CONY: return "CONY"; + case ADMM: return "ADMM"; + case BIRTHPL: return "BIRTHPL"; + case DEATHPLC: return "DEATHPLC"; + case DST: return "DST"; + case RET: return "RET"; + case EXLOC: return "EXLOC"; + case SDLOC: return "SDLOC"; + case DSDLOC: return "DSDLOC"; + case ISDLOC: return "ISDLOC"; + case EXPR: return "EXPR"; + case HLD: return "HLD"; + case HLTHCHRT: return "HLTHCHRT"; + case IDENT: return "IDENT"; + case MANU: return "MANU"; + case THER: return "THER"; + case MNT: return "MNT"; + case OWN: return "OWN"; + case RGPR: return "RGPR"; + case TERR: return "TERR"; + case USED: return "USED"; + case WRTE: return "WRTE"; + case _ROLECLASSONTOLOGICAL: return "_RoleClassOntological"; + case EQUIV: return "EQUIV"; + case SAME: return "SAME"; + case SUBY: return "SUBY"; + case GEN: return "GEN"; + case GRIC: return "GRIC"; + case INST: return "INST"; + case SUBS: return "SUBS"; + case _ROLECLASSPARTITIVE: return "_RoleClassPartitive"; + case CONT: return "CONT"; + case EXPAGTCAR: return "EXPAGTCAR"; + case EXPVECTOR: return "EXPVECTOR"; + case FOMITE: return "FOMITE"; + case INGR: return "INGR"; + case ACTI: return "ACTI"; + case ACTIB: return "ACTIB"; + case ACTIM: return "ACTIM"; + case ACTIR: return "ACTIR"; + case ADJV: return "ADJV"; + case ADTV: return "ADTV"; + case BASE: return "BASE"; + case CNTM: return "CNTM"; + case IACT: return "IACT"; + case COLR: return "COLR"; + case FLVR: return "FLVR"; + case PRSV: return "PRSV"; + case STBL: return "STBL"; + case MECH: return "MECH"; + case LOCE: return "LOCE"; + case STOR: return "STOR"; + case MBR: return "MBR"; + case PART: return "PART"; + case ACTM: return "ACTM"; + case SPEC: return "SPEC"; + case ALQT: return "ALQT"; + case ISLT: return "ISLT"; + case CHILD: return "CHILD"; + case CRED: return "CRED"; + case NURPRAC: return "NURPRAC"; + case NURS: return "NURS"; + case PA: return "PA"; + case PHYS: return "PHYS"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleClass"; + } + public String getDefinition() { + switch (this) { + case ROL: return "Corresponds to the Role class"; + case _ROLECLASSASSOCIATIVE: return "A general association between two entities that is neither partitive nor ontological."; + case _ROLECLASSMUTUALRELATIONSHIP: return "A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g., spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children)."; + case _ROLECLASSRELATIONSHIPFORMAL: return "A relationship between two entities that is formally recognized, frequently by a contract or similar agreement."; + case AFFL: return "Player of the Affiliate role has a business/professional relationship with scoper. Player and scoper may be persons or organization. The Affiliate relationship does not imply membership in a group, nor does it exist for resource scheduling purposes.\r\n\n \n Example: A healthcare provider is affiliated with another provider as a business associate."; + case AGNT: return "An entity (player) that acts or is authorized to act on behalf of another entity (scoper)."; + case ASSIGNED: return "An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization."; + case COMPAR: return "An Entity that is authorized to issue or instantiate permissions, privileges, credentials or other formal/legal authorizations."; + case SGNOFF: return "The role of a person (player) who is the officer or signature authority for of a scoping entity, usually an organization (scoper)."; + case CON: return "A person or an organization (player) which provides or receives information regarding another entity (scoper). Examples; patient NOK and emergency contacts; guarantor contact; employer contact."; + case ECON: return "An entity to be contacted in the event of an emergency."; + case NOK: return "An individual designated for notification as the next of kin for a given entity."; + case GUARD: return "Guardian of a ward"; + case CIT: return "Citizen of apolitical entity"; + case COVPTY: return "A role class played by a person who receives benefit coverage under the terms of a particular insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy.\r\n\n \n Discussion:This reason for coverage is captured in 'Role.code' and a relationship link with type code of indirect authority should be included using the policy holder role as the source, and the covered party role as the target.\r\n\n Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder."; + case CLAIM: return "Description: A role played by a party making a claim for coverage under a policy or program. A claimant must be either a person or organization, or a group of persons or organizations. A claimant is not a named insured or a program eligible.\r\n\n \n Discussion: With respect to liability insurance such as property and casualty insurance, a claimant must file a claim requesting indemnification for a loss that the claimant considers covered under the policy of a named insured. The claims adjuster for the policy underwriter will review the claim to determine whether the loss meets the benefit coverage criteria under a policy, and base any indemnification or coverage payment on that review. If a third party is liable in whole or part for the loss, the underwriter may pursue third party liability recovery. A claimant may be involved in civil or criminal legal proceedings involving claims against a defendant party that is indemnified by an insurance policy or to protest the finding of a claims adjustor. With respect to life insurance, a beneficiary designated by a named insured becomes a claimant of the proceeds of coverage, as in the case of a life insurance policy. However, a claimant for coverage under life insurance is not necessarily a designated beneficiary.\r\n\n \n Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.\r\n\n In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a \"claim\" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits.\r\n\n \n Example: A claimant under automobile policy that is not the named insured."; + case NAMED: return "Description: A role played by a party to an insurance policy to which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations.\r\n\n \n Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g., where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy.\r\n\n \n Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g., if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss.\r\n\n \n Example: The named insured under a comprehensive automobile, disability, or property and casualty policy that is the named insured and may or may not be the policy holder."; + case DEPEN: return "Description: A role played by a person covered under a policy or program based on an association with a subscriber, which is recognized by the policy holder.\r\n\n \n Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g., a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy.\r\n\n \n Example: The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriberaTMs legal standing in the relationship with the dependent."; + case INDIV: return "Description: A role played by a party covered under a policy as the policy holder. An individual may be either a person or an organization.\r\n\n \n Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss.\r\n\n \n Example: The individual insured under a comprehensive automobile, disability, or property and casualty policy that is the policy holder."; + case SUBSCR: return "Description: A role played by a person covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage.\r\n\n \n Discussion: The policy holder holds the contract with the policy or program underwriter. The subscriber holds a certificate of coverage under the contract. In legal proceedings concerning the policy or program, the terms of the contract takes precedence over the terms of the certificate of coverage if there are any inconsistencies.\r\n\n \n Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy.\r\n\n \n Example: An employee or a member of an association."; + case PROG: return "Description: A role played by a party that meets the eligibility criteria for coverage under a program. A program eligible may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations.\r\n\n \n Discussion: A program as typically government administered coverage for parties determined eligible under the terms of the program.\r\n\n \n Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.\r\n\n In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a \"claim\" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits.\r\n\n \n Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid."; + case CRINV: return "A role played by a provider, always a person, who has agency authority from a Clinical Research Sponsor to direct the conduct of a clinical research trial or study on behalf of the sponsor."; + case CRSPNSR: return "A role played by an entity, usually an organization, that is the sponsor of a clinical research trial or study. The sponsor commissions the study, bears the expenses, is responsible for satisfying all legal requirements concerning subject safety and privacy, and is generally responsible for collection, storage and analysis of the data generated during the trial. No scoper is necessary, as a clinical research sponsor undertakes the role on its own authority and declaration. Clinical research sponsors are usually educational or other research organizations, government agencies or biopharmaceutical companies."; + case EMP: return "A relationship between a person or organization and a person or organization formed for the purpose of exchanging work for compensation. The purpose of the role is to identify the type of relationship the employee has to the employer, rather than the nature of the work actually performed. (Contrast with AssignedEntity.)"; + case MIL: return "A role played by a member of a military service. Scoper is the military service (e.g. Army, Navy, Air Force, etc.) or, more specifically, the unit (e.g. Company C, 3rd Battalion, 4th Division, etc.)"; + case GUAR: return "A person or organization (player) that serves as a financial guarantor for another person or organization (scoper)."; + case INVSBJ: return "An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation."; + case CASEBJ: return "A person, non-person living subject, or place that is the subject of an investigation related to a notifiable condition (health circumstance that is reportable within the applicable public health jurisdiction)"; + case RESBJ: return "Definition:Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established.\r\n\n \n Examples: Screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the experimental portion of the design."; + case LIC: return "A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g., a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals)."; + case NOT: return "notary public"; + case PROV: return "An Entity (player) that is authorized to provide health care services by some authorizing agency (scoper)."; + case PAT: return "A Role of a LivingSubject (player) as an actual or potential recipient of health care services from a healthcare provider organization (scoper).\r\n\n \n Usage Note: Communication about relationships between patients and specific healthcare practitioners (people) is not done via scoper. Instead this is generally done using the CareProvision act. This allows linkage between patient and a particular healthcare practitioner role and also allows description of the type of care involved in the relationship."; + case PAYEE: return "The role of an organization or individual designated to receive payment for a claim against a particular coverage. The scoping entity is the organization that is the submitter of the invoice in question."; + case PAYOR: return "The role of an organization that undertakes to accept claims invoices, assess the coverage or payments due for those invoices and pay to the designated payees for those invoices. This role may be either the underwriter or a third-party organization authorized by the underwriter. The scoping entity is the organization that underwrites the claimed coverage."; + case POLHOLD: return "A role played by a person or organization that holds an insurance policy. The underwriter of that policy is the scoping entity.\r\n\n \n Discussion:The identifier of the policy is captured in 'Role.id' when the Role is a policy holder.\r\n\n A particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder."; + case QUAL: return "An entity (player) that has been recognized as having certain training/experience or other characteristics that would make said entity an appropriate performer for a certain activity. The scoper is an organization that educates or qualifies entities."; + case SPNSR: return "A role played by an entity, usually an organization that is the sponsor of an insurance plan or a health program. A sponsor is the party that is ultimately accountable for the coverage by employment contract or by law. A sponsor can be an employer, union, government agency, or association. Fully insured sponsors establish the terms of the plan and contract with health insurance plans to assume the risk and to administer the plan. Self-insured sponsors delegate coverage administration, but not risk, to third-party administrators. Program sponsors designate services to be covered in accordance with statute. Program sponsors may administer the coverage themselves, delegate coverage administration, but not risk to third-party administrators, or contract with health insurance plans to assume the risk and administrator a program. Sponsors qualify individuals who may become \r\n\n \n \n a policy holder of the plan;\r\n\n \n \n where the sponsor is the policy holder, who may become a subscriber or a dependent to a policy under the plan; or\r\n\n \n \n where the sponsor is a government agency, who may become program eligibles under a program. \r\n\n \n \n The sponsor role may be further qualified by the SponsorRole.code. Entities playing the sponsor role may also play the role of a Coverage Administrator.\r\n\n \n Example: An employer, union, government agency, or association."; + case STD: return "A role played by an individual who is a student of a school, which is the scoping entity."; + case UNDWRT: return "A role played by a person or an organization. It is the party that \r\n\n \n \n accepts fiscal responsibility for insurance plans and the policies created under those plans;\r\n\n \n \n administers and accepts fiscal responsibility for a program that provides coverage for services to eligible individuals; and/or\r\n\n \n \n has the responsibility to assess the merits of each risk and decide a suitable premium for accepting all or part of the risk. If played by an organization, this role may be further specified by an appropriate RoleCode.\r\n\n \n \n \n Example:\n \r\n\n \n \n A health insurer; \r\n\n \n \n Medicaid Program;\r\n\n \n \n Lloyd's of London"; + case CAREGIVER: return "A person responsible for the primary care of a patient at home."; + case PRS: return "Links two entities with classCode PSN (person) in a personal relationship. The character of the relationship must be defined by a PersonalRelationshipRoleType code. The player and scoper are determined by PersonalRelationshipRoleType code as well."; + case SELF: return "The \"same\" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.\r\n\n \n Usage:\n \r\n\n playing and scoping entities must have same classcode, but need not have identical attributes or values. \r\n\n \n Example: \n \r\n\n a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual."; + case _ROLECLASSPASSIVE: return "An association for a playing Entity that is used, known, treated, handled, built, or destroyed, etc. under the auspices of the scoping Entity. The playing Entity is passive in these roles (even though it may be active in other roles), in the sense that the kinds of things done to it in this role happen without an agreement from the playing Entity."; + case ACCESS: return "A role in which the playing entity (material) provides access to another entity. The principal use case is intravenous (or other bodily) access lines that preexist and need to be referred to for medication routing instructions."; + case ADJY: return "A physical association whereby two Entities are in some (even lose) spatial relationship with each other such that they touch each other in some way.\r\n\n \n Examples: the colon is connected (and therefore adjacent) to the jejunum; the colon is adjacent to the liver (even if not actually connected.)\r\n\n \n UsageConstraints: Adjacency is in principle a symmetrical connection, but scoper and player of the role should, where applicable, be assigned to have scoper be the larger, more central Entity and player the smaller, more distant, appendage."; + case CONC: return "An adjacency of two Entities held together by a bond which attaches to each of the two entities. \r\n\n \n Examples: biceps brachii muscle connected to the radius bone, port 3 on a network switch connected to port 5 on a patch panel.\r\n\n \n UsageConstraints: See Adjacency for the assignment of scoper (larger, more central) and player (smaller, more distant)."; + case BOND: return "A connection between two atoms of a molecule.\r\n\n \n Examples: double bond between first and second C in ethane, peptide bond between two amino-acid, disulfide bridge between two proteins, chelate and ion associations, even the much weaker van-der-Waals bonds can be considered molecular bonds.\r\n\n \n UsageConstraints: See connection and adjacency for the assignment of player and scoper."; + case CONY: return "A connection between two regional parts.\r\n\n \n Examples: the connection between ascending aorta and the aortic arc, connection between descending colon and sigmoid.\r\n\n \n UsageConstraints: See connection and adjacency for the assignment of player and scoper."; + case ADMM: return "A material (player) that can be administered to an Entity (scoper)."; + case BIRTHPL: return "Relates a place (playing Entity) as the location where a living subject (scoping Entity) was born."; + case DEATHPLC: return "Definition: Relates a place (playing Entity) as the location where a living subject (scoping Entity) died."; + case DST: return "A material (player) distributed by a distributor (scoper) who functions between a manufacturer and a buyer or retailer."; + case RET: return "Material (player) sold by a retailer (scoper), who also give advice to prospective buyers."; + case EXLOC: return "A role played by a place at which the location of an event may be recorded."; + case SDLOC: return "A role played by a place at which services may be provided."; + case DSDLOC: return "A role of a place (player) that is intended to house the provision of services. Scoper is the Entity (typically Organization) that provides these services. This is not synonymous with \"ownership.\""; + case ISDLOC: return "A role played by a place at which health care services may be provided without prior designation or authorization."; + case EXPR: return "A role played by an entity that has been exposed to a person or animal suffering a contagious disease, or with a location from which a toxin has been distributed. The player of the role is normally a person or animal, but it is possible that other entity types could become exposed. The role is scoped by the source of the exposure, and it is quite possible for a person playing the role of exposed party to also become the scoper a role played by another person. That is to say, once a person has become infected, it is possible, perhaps likely, for that person to infect others.\r\n\n Management of exposures and tracking exposed parties is a key function within public health, and within most public health contexts - exposed parties are known as \"contacts.\""; + case HLD: return "Entity that is currently in the possession of a holder (scoper), who holds, or uses it, usually based on some agreement with the owner."; + case HLTHCHRT: return "The role of a material (player) that is the physical health chart belonging to an organization (scoper)."; + case IDENT: return "A role in which the scoping entity designates an identifier for a playing entity."; + case MANU: return "Scoped by the manufacturer"; + case THER: return "A manufactured material (player) that is used for its therapeutic properties. The manufacturer is the scoper."; + case MNT: return "An entity (player) that is maintained by another entity (scoper). This is typical role held by durable equipment. The scoper assumes responsibility for proper operation, quality, and safety."; + case OWN: return "An Entity (player) for which someone (scoper) is granted by law the right to call the material (player) his own. This entitles the scoper to make decisions about the disposition of that material."; + case RGPR: return "A product regulated by some governmentatl orgnization. The role is played by Material and scoped by Organization.\r\n\n Rationale: To support an entity clone used to identify the NDC number for a drug product."; + case TERR: return "Relates a place entity (player) as the region over which the scoper (typically an Organization) has certain authority (jurisdiction). For example, the Calgary Regional Health Authority (scoper) has authority over the territory \"Region 4 of Alberta\" (player) in matters of health."; + case USED: return "Description:An entity (player) that is used by another entity (scoper)"; + case WRTE: return "A role a product plays when a guarantee is given to the purchaser by the seller (scoping entity) stating that the product is reliable and free from known defects and that the seller will repair or replace defective parts within a given time limit and under certain conditions."; + case _ROLECLASSONTOLOGICAL: return "A relationship in which the scoping Entity defines or specifies what the playing Entity is. Thus, the player's \"being\" (Greek: ontos) is specified."; + case EQUIV: return "Description: Specifies the player Entity (the equivalent Entity) as an Entity that is considered to be equivalent to a reference Entity (scoper). The equivalence is in principle a symmetric relationship, however, it is expected that the scoper is a reference entity which serves as reference entity for multiple different equivalent entities. \r\n\n \n Examples: An innovator's medicine formulation is the reference for \"generics\", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.)"; + case SAME: return "The \"same\" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.\r\n\n \n Usage:\n \r\n\n playing and scoping entities must have same classCode, but need not have identical attributes or values.\r\n\n \n Example: \n \r\n\n a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual."; + case SUBY: return "Relates a prevailing record of an Entity (scoper) with another record (player) that it subsumes.\r\n\n \n Examples: Show a correct new Person object (scoper) that subsumes one or more duplicate Person objects that had accidentally been created for the same physical person.\r\n\n \n Constraints: Both the player and scoper must have the same classCode."; + case GEN: return "Relates a specialized material concept (player) to its generalization (scoper)."; + case GRIC: return "A special link between pharmaceuticals indicating that the target (scoper) is a generic for the source (player)."; + case INST: return "An individual piece of material (player) instantiating a class of material (scoper)."; + case SUBS: return "An entity that subsumes the identity of another. Used in the context of merging documented entity instances. Both the player and scoper must have the same classCode.\r\n\n The use of this code is deprecated in favor of the term SUBY which is its inverse and is more ontologically correct."; + case _ROLECLASSPARTITIVE: return "An association between two Entities where the playing Entity is considered in some way \"part\" of the scoping Entity, e.g., as a member, component, ingredient, or content. Being \"part\" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity."; + case CONT: return "Relates a material as the content (player) to a container (scoper). Unlike ingredients, the content and a container remain separate (not mixed) and the content can be removed from the container. A content is not part of an empty container."; + case EXPAGTCAR: return "An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case EXPVECTOR: return "Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case FOMITE: return "Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case INGR: return "Relates a component (player) to a mixture (scoper). E.g., Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube."; + case ACTI: return "Definition: a therapeutically active ingredient (player) in a mixture (scoper), where the mixture is typically a manufactured pharmaceutical. It is unknown if the quantity of such an ingredient is expressed precisely in terms of the playing ingredient substance, or, if it is specified in terms of a closely related substance (active moiety or reference substance)."; + case ACTIB: return "Description: Active ingredient, where the ingredient substance (player) is itself the \"basis of strength\", i.e., where the Role.quantity specifies exactly the quantity of the player substance in the medicine formulation. \r\n\n \n Examples: Lopressor 50 mg actually contains 50 mg of metoprolol succinate, even though the active moiety is metoprolol, but also: Tenormin 50 mg contain 50 mg of atenolol, as free base, i.e., where the active ingredient atenolol is also the active moiety."; + case ACTIM: return "Description: Active ingredient, where not the ingredient substance (player), but itaTMs active moiety is the \"basis of strength\", i.e., where the Role.quantity specifies the quantity of the player substance's active moiety in the medicine formulation.\r\n\n \n Examples: 1 mL of Betopic 5mg/mL eye drops contains 5.6 mg betaxolol hydrochloride equivalent to betaxolol base 5 mg."; + case ACTIR: return "Description: Active ingredient, where not the ingredient substance (player) but another reference substance with the same active moiety, is the \"basis of strength\", i.e., where the Role.quantity specifies the quantity of a reference substance, similar but different from the player substance's in the medicine formulation.\r\n\n \n Examples: Toprol-XL 50 mg contains 47.5 mg of metoprolol succinate equivalent to 50 mg of metoprolol tartrate."; + case ADJV: return "A component (player) added to enhance the action of an active ingredient (scoper) (in the manner of a catalyst) but which has no active effect in and of itself. Such ingredients are significant in defining equivalence of products in a way that inactive ingredients are not."; + case ADTV: return "An ingredient (player) that is added to a base (scoper), that amounts to a minor part of the overall mixture."; + case BASE: return "A base ingredient (player) is what comprises the major part of a mixture (scoper). E.g., Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture."; + case CNTM: return "An ingredient whose presence is not intended but may not be reasonably avoided given the circumstances of the mixture's nature or origin."; + case IACT: return "An ingredient which is not considered therapeutically active, e.g., colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g., might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect."; + case COLR: return "A substance (player) influencing the optical aspect of material (scoper)."; + case FLVR: return "A substance (player) added to a mixture (scoper) to make it taste a certain way. In food the use is obvious, in pharmaceuticals flavors can hide disgusting taste of the active ingredient (important in pediatric treatments)."; + case PRSV: return "A substance (player) added to a mixture (scoper) to prevent microorganisms (fungi, bacteria) to spoil the mixture."; + case STBL: return "A stabilizer (player) added to a mixture (scoper) in order to prevent the molecular disintegration of the main substance."; + case MECH: return "An ingredient (player) of a medication (scoper) that is inseparable from the active ingredients, but has no intended chemical or pharmaceutical effect itself, but which may have some systemic effect on the patient.\r\n\n An example is a collagen matrix used as a base for transplanting skin cells. The collagen matrix can be left permanently in the graft site. Because it is of bovine origin, the patient may exhibit allergies or may have cultural objections to its use."; + case LOCE: return "Relates an entity (player) to a location (scoper) at which it is present in some way. This presence may be limited in time."; + case STOR: return "Relates an entity (player) (e.g. a device) to a location (scoper) at which it is normally found or stored when not used."; + case MBR: return "A role played by an entity that is a member of a group. The group provides the scope for this role.\r\n\n Among other uses, groups as used in insurance (groups of covered individuals) and in scheduling where resources may be grouped for scheduling and logistical purposes."; + case PART: return "Definition: an association between two Entities where the playing Entity (the part) is a component of the whole (scoper) in the sense of an integral structural component, that is distinct from other parts in the same whole, has a distinct function in the whole, and, as an effect, the full integrity of the whole depends (to some degree) on the presence of this part, even though the part may often be separable from the whole.\r\n\n \n Discussion: Part is defined in opposition to (a) ingredient (not separable), (b) content (not a functional component), and (c) member (not functionally distinct from other members)."; + case ACTM: return "The molecule or ion that is responsible for the intended pharmacological action of the drug substance, excluding those appended or associated parts of the molecule that make the molecule an ester, salt (including a salt with hydrogen or coordination bonds), or other noncovalent derivative (such as a complex, chelate, or clathrate).\r\n\n Examples: heparin-sodium and heparin-potassium have the same active moiety, heparin; the active moiety of morphine-hydrochloride is morphine."; + case SPEC: return "A role played by a material entity that is a specimen for an act. It is scoped by the source of the specimen."; + case ALQT: return "A portion (player) of an original or source specimen (scoper) used for testing or transportation."; + case ISLT: return "A microorganism that has been isolated from other microorganisms or a source matrix."; + case CHILD: return "The player of the role is a child of the scoping entity, in a generic sense."; + case CRED: return "A role played by an entity that receives credentials from the scoping entity."; + case NURPRAC: return "nurse practitioner"; + case NURS: return "nurse"; + case PA: return "physician assistant"; + case PHYS: return "physician"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROL: return "role"; + case _ROLECLASSASSOCIATIVE: return "RoleClassAssociative"; + case _ROLECLASSMUTUALRELATIONSHIP: return "RoleClassMutualRelationship"; + case _ROLECLASSRELATIONSHIPFORMAL: return "RoleClassRelationshipFormal"; + case AFFL: return "affiliate"; + case AGNT: return "agent"; + case ASSIGNED: return "assigned entity"; + case COMPAR: return "commissioning party"; + case SGNOFF: return "signing authority or officer"; + case CON: return "contact"; + case ECON: return "emergency contact"; + case NOK: return "next of kin"; + case GUARD: return "guardian"; + case CIT: return "citizen"; + case COVPTY: return "covered party"; + case CLAIM: return "claimant"; + case NAMED: return "named insured"; + case DEPEN: return "dependent"; + case INDIV: return "individual"; + case SUBSCR: return "subscriber"; + case PROG: return "program eligible"; + case CRINV: return "clinical research investigator"; + case CRSPNSR: return "clinical research sponsor"; + case EMP: return "employee"; + case MIL: return "military person"; + case GUAR: return "guarantor"; + case INVSBJ: return "Investigation Subject"; + case CASEBJ: return "Case Subject"; + case RESBJ: return "research subject"; + case LIC: return "licensed entity"; + case NOT: return "notary public"; + case PROV: return "healthcare provider"; + case PAT: return "patient"; + case PAYEE: return "payee"; + case PAYOR: return "invoice payor"; + case POLHOLD: return "policy holder"; + case QUAL: return "qualified entity"; + case SPNSR: return "coverage sponsor"; + case STD: return "student"; + case UNDWRT: return "underwriter"; + case CAREGIVER: return "caregiver"; + case PRS: return "personal relationship"; + case SELF: return "self"; + case _ROLECLASSPASSIVE: return "RoleClassPassive"; + case ACCESS: return "access"; + case ADJY: return "adjacency"; + case CONC: return "connection"; + case BOND: return "molecular bond"; + case CONY: return "continuity"; + case ADMM: return "Administerable Material"; + case BIRTHPL: return "birthplace"; + case DEATHPLC: return "place of death"; + case DST: return "distributed material"; + case RET: return "retailed material"; + case EXLOC: return "event location"; + case SDLOC: return "service delivery location"; + case DSDLOC: return "dedicated service delivery location"; + case ISDLOC: return "incidental service delivery location"; + case EXPR: return "exposed entity"; + case HLD: return "held entity"; + case HLTHCHRT: return "health chart"; + case IDENT: return "identified entity"; + case MANU: return "manufactured product"; + case THER: return "therapeutic agent"; + case MNT: return "maintained entity"; + case OWN: return "owned entity"; + case RGPR: return "regulated product"; + case TERR: return "territory of authority"; + case USED: return "used entity"; + case WRTE: return "warranted product"; + case _ROLECLASSONTOLOGICAL: return "RoleClassOntological"; + case EQUIV: return "equivalent entity"; + case SAME: return "same"; + case SUBY: return "subsumed by"; + case GEN: return "has generalization"; + case GRIC: return "has generic"; + case INST: return "instance"; + case SUBS: return "subsumer"; + case _ROLECLASSPARTITIVE: return "RoleClassPartitive"; + case CONT: return "content"; + case EXPAGTCAR: return "exposure agent carrier"; + case EXPVECTOR: return "exposure vector"; + case FOMITE: return "fomite"; + case INGR: return "ingredient"; + case ACTI: return "active ingredient"; + case ACTIB: return "active ingredient - basis of strength"; + case ACTIM: return "active ingredient - moiety is basis of strength"; + case ACTIR: return "active ingredient - reference substance is basis of strength"; + case ADJV: return "adjuvant"; + case ADTV: return "additive"; + case BASE: return "base"; + case CNTM: return "contaminant ingredient"; + case IACT: return "inactive ingredient"; + case COLR: return "color additive"; + case FLVR: return "flavor additive"; + case PRSV: return "preservative"; + case STBL: return "stabilizer"; + case MECH: return "mechanical ingredient"; + case LOCE: return "located entity"; + case STOR: return "stored entity"; + case MBR: return "member"; + case PART: return "part"; + case ACTM: return "active moiety"; + case SPEC: return "specimen"; + case ALQT: return "aliquot"; + case ISLT: return "isolate"; + case CHILD: return "child"; + case CRED: return "credentialed entity"; + case NURPRAC: return "nurse practitioner"; + case NURS: return "nurse"; + case PA: return "physician assistant"; + case PHYS: return "physician"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClassEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClassEnumFactory.java new file mode 100644 index 00000000000..ff05040f5fd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleClassEnumFactory.java @@ -0,0 +1,499 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RoleClassEnumFactory implements EnumFactory { + + public V3RoleClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ROL".equals(codeString)) + return V3RoleClass.ROL; + if ("_RoleClassAssociative".equals(codeString)) + return V3RoleClass._ROLECLASSASSOCIATIVE; + if ("_RoleClassMutualRelationship".equals(codeString)) + return V3RoleClass._ROLECLASSMUTUALRELATIONSHIP; + if ("_RoleClassRelationshipFormal".equals(codeString)) + return V3RoleClass._ROLECLASSRELATIONSHIPFORMAL; + if ("AFFL".equals(codeString)) + return V3RoleClass.AFFL; + if ("AGNT".equals(codeString)) + return V3RoleClass.AGNT; + if ("ASSIGNED".equals(codeString)) + return V3RoleClass.ASSIGNED; + if ("COMPAR".equals(codeString)) + return V3RoleClass.COMPAR; + if ("SGNOFF".equals(codeString)) + return V3RoleClass.SGNOFF; + if ("CON".equals(codeString)) + return V3RoleClass.CON; + if ("ECON".equals(codeString)) + return V3RoleClass.ECON; + if ("NOK".equals(codeString)) + return V3RoleClass.NOK; + if ("GUARD".equals(codeString)) + return V3RoleClass.GUARD; + if ("CIT".equals(codeString)) + return V3RoleClass.CIT; + if ("COVPTY".equals(codeString)) + return V3RoleClass.COVPTY; + if ("CLAIM".equals(codeString)) + return V3RoleClass.CLAIM; + if ("NAMED".equals(codeString)) + return V3RoleClass.NAMED; + if ("DEPEN".equals(codeString)) + return V3RoleClass.DEPEN; + if ("INDIV".equals(codeString)) + return V3RoleClass.INDIV; + if ("SUBSCR".equals(codeString)) + return V3RoleClass.SUBSCR; + if ("PROG".equals(codeString)) + return V3RoleClass.PROG; + if ("CRINV".equals(codeString)) + return V3RoleClass.CRINV; + if ("CRSPNSR".equals(codeString)) + return V3RoleClass.CRSPNSR; + if ("EMP".equals(codeString)) + return V3RoleClass.EMP; + if ("MIL".equals(codeString)) + return V3RoleClass.MIL; + if ("GUAR".equals(codeString)) + return V3RoleClass.GUAR; + if ("INVSBJ".equals(codeString)) + return V3RoleClass.INVSBJ; + if ("CASEBJ".equals(codeString)) + return V3RoleClass.CASEBJ; + if ("RESBJ".equals(codeString)) + return V3RoleClass.RESBJ; + if ("LIC".equals(codeString)) + return V3RoleClass.LIC; + if ("NOT".equals(codeString)) + return V3RoleClass.NOT; + if ("PROV".equals(codeString)) + return V3RoleClass.PROV; + if ("PAT".equals(codeString)) + return V3RoleClass.PAT; + if ("PAYEE".equals(codeString)) + return V3RoleClass.PAYEE; + if ("PAYOR".equals(codeString)) + return V3RoleClass.PAYOR; + if ("POLHOLD".equals(codeString)) + return V3RoleClass.POLHOLD; + if ("QUAL".equals(codeString)) + return V3RoleClass.QUAL; + if ("SPNSR".equals(codeString)) + return V3RoleClass.SPNSR; + if ("STD".equals(codeString)) + return V3RoleClass.STD; + if ("UNDWRT".equals(codeString)) + return V3RoleClass.UNDWRT; + if ("CAREGIVER".equals(codeString)) + return V3RoleClass.CAREGIVER; + if ("PRS".equals(codeString)) + return V3RoleClass.PRS; + if ("SELF".equals(codeString)) + return V3RoleClass.SELF; + if ("_RoleClassPassive".equals(codeString)) + return V3RoleClass._ROLECLASSPASSIVE; + if ("ACCESS".equals(codeString)) + return V3RoleClass.ACCESS; + if ("ADJY".equals(codeString)) + return V3RoleClass.ADJY; + if ("CONC".equals(codeString)) + return V3RoleClass.CONC; + if ("BOND".equals(codeString)) + return V3RoleClass.BOND; + if ("CONY".equals(codeString)) + return V3RoleClass.CONY; + if ("ADMM".equals(codeString)) + return V3RoleClass.ADMM; + if ("BIRTHPL".equals(codeString)) + return V3RoleClass.BIRTHPL; + if ("DEATHPLC".equals(codeString)) + return V3RoleClass.DEATHPLC; + if ("DST".equals(codeString)) + return V3RoleClass.DST; + if ("RET".equals(codeString)) + return V3RoleClass.RET; + if ("EXLOC".equals(codeString)) + return V3RoleClass.EXLOC; + if ("SDLOC".equals(codeString)) + return V3RoleClass.SDLOC; + if ("DSDLOC".equals(codeString)) + return V3RoleClass.DSDLOC; + if ("ISDLOC".equals(codeString)) + return V3RoleClass.ISDLOC; + if ("EXPR".equals(codeString)) + return V3RoleClass.EXPR; + if ("HLD".equals(codeString)) + return V3RoleClass.HLD; + if ("HLTHCHRT".equals(codeString)) + return V3RoleClass.HLTHCHRT; + if ("IDENT".equals(codeString)) + return V3RoleClass.IDENT; + if ("MANU".equals(codeString)) + return V3RoleClass.MANU; + if ("THER".equals(codeString)) + return V3RoleClass.THER; + if ("MNT".equals(codeString)) + return V3RoleClass.MNT; + if ("OWN".equals(codeString)) + return V3RoleClass.OWN; + if ("RGPR".equals(codeString)) + return V3RoleClass.RGPR; + if ("TERR".equals(codeString)) + return V3RoleClass.TERR; + if ("USED".equals(codeString)) + return V3RoleClass.USED; + if ("WRTE".equals(codeString)) + return V3RoleClass.WRTE; + if ("_RoleClassOntological".equals(codeString)) + return V3RoleClass._ROLECLASSONTOLOGICAL; + if ("EQUIV".equals(codeString)) + return V3RoleClass.EQUIV; + if ("SAME".equals(codeString)) + return V3RoleClass.SAME; + if ("SUBY".equals(codeString)) + return V3RoleClass.SUBY; + if ("GEN".equals(codeString)) + return V3RoleClass.GEN; + if ("GRIC".equals(codeString)) + return V3RoleClass.GRIC; + if ("INST".equals(codeString)) + return V3RoleClass.INST; + if ("SUBS".equals(codeString)) + return V3RoleClass.SUBS; + if ("_RoleClassPartitive".equals(codeString)) + return V3RoleClass._ROLECLASSPARTITIVE; + if ("CONT".equals(codeString)) + return V3RoleClass.CONT; + if ("EXPAGTCAR".equals(codeString)) + return V3RoleClass.EXPAGTCAR; + if ("EXPVECTOR".equals(codeString)) + return V3RoleClass.EXPVECTOR; + if ("FOMITE".equals(codeString)) + return V3RoleClass.FOMITE; + if ("INGR".equals(codeString)) + return V3RoleClass.INGR; + if ("ACTI".equals(codeString)) + return V3RoleClass.ACTI; + if ("ACTIB".equals(codeString)) + return V3RoleClass.ACTIB; + if ("ACTIM".equals(codeString)) + return V3RoleClass.ACTIM; + if ("ACTIR".equals(codeString)) + return V3RoleClass.ACTIR; + if ("ADJV".equals(codeString)) + return V3RoleClass.ADJV; + if ("ADTV".equals(codeString)) + return V3RoleClass.ADTV; + if ("BASE".equals(codeString)) + return V3RoleClass.BASE; + if ("CNTM".equals(codeString)) + return V3RoleClass.CNTM; + if ("IACT".equals(codeString)) + return V3RoleClass.IACT; + if ("COLR".equals(codeString)) + return V3RoleClass.COLR; + if ("FLVR".equals(codeString)) + return V3RoleClass.FLVR; + if ("PRSV".equals(codeString)) + return V3RoleClass.PRSV; + if ("STBL".equals(codeString)) + return V3RoleClass.STBL; + if ("MECH".equals(codeString)) + return V3RoleClass.MECH; + if ("LOCE".equals(codeString)) + return V3RoleClass.LOCE; + if ("STOR".equals(codeString)) + return V3RoleClass.STOR; + if ("MBR".equals(codeString)) + return V3RoleClass.MBR; + if ("PART".equals(codeString)) + return V3RoleClass.PART; + if ("ACTM".equals(codeString)) + return V3RoleClass.ACTM; + if ("SPEC".equals(codeString)) + return V3RoleClass.SPEC; + if ("ALQT".equals(codeString)) + return V3RoleClass.ALQT; + if ("ISLT".equals(codeString)) + return V3RoleClass.ISLT; + if ("CHILD".equals(codeString)) + return V3RoleClass.CHILD; + if ("CRED".equals(codeString)) + return V3RoleClass.CRED; + if ("NURPRAC".equals(codeString)) + return V3RoleClass.NURPRAC; + if ("NURS".equals(codeString)) + return V3RoleClass.NURS; + if ("PA".equals(codeString)) + return V3RoleClass.PA; + if ("PHYS".equals(codeString)) + return V3RoleClass.PHYS; + throw new IllegalArgumentException("Unknown V3RoleClass code '"+codeString+"'"); + } + + public String toCode(V3RoleClass code) { + if (code == V3RoleClass.ROL) + return "ROL"; + if (code == V3RoleClass._ROLECLASSASSOCIATIVE) + return "_RoleClassAssociative"; + if (code == V3RoleClass._ROLECLASSMUTUALRELATIONSHIP) + return "_RoleClassMutualRelationship"; + if (code == V3RoleClass._ROLECLASSRELATIONSHIPFORMAL) + return "_RoleClassRelationshipFormal"; + if (code == V3RoleClass.AFFL) + return "AFFL"; + if (code == V3RoleClass.AGNT) + return "AGNT"; + if (code == V3RoleClass.ASSIGNED) + return "ASSIGNED"; + if (code == V3RoleClass.COMPAR) + return "COMPAR"; + if (code == V3RoleClass.SGNOFF) + return "SGNOFF"; + if (code == V3RoleClass.CON) + return "CON"; + if (code == V3RoleClass.ECON) + return "ECON"; + if (code == V3RoleClass.NOK) + return "NOK"; + if (code == V3RoleClass.GUARD) + return "GUARD"; + if (code == V3RoleClass.CIT) + return "CIT"; + if (code == V3RoleClass.COVPTY) + return "COVPTY"; + if (code == V3RoleClass.CLAIM) + return "CLAIM"; + if (code == V3RoleClass.NAMED) + return "NAMED"; + if (code == V3RoleClass.DEPEN) + return "DEPEN"; + if (code == V3RoleClass.INDIV) + return "INDIV"; + if (code == V3RoleClass.SUBSCR) + return "SUBSCR"; + if (code == V3RoleClass.PROG) + return "PROG"; + if (code == V3RoleClass.CRINV) + return "CRINV"; + if (code == V3RoleClass.CRSPNSR) + return "CRSPNSR"; + if (code == V3RoleClass.EMP) + return "EMP"; + if (code == V3RoleClass.MIL) + return "MIL"; + if (code == V3RoleClass.GUAR) + return "GUAR"; + if (code == V3RoleClass.INVSBJ) + return "INVSBJ"; + if (code == V3RoleClass.CASEBJ) + return "CASEBJ"; + if (code == V3RoleClass.RESBJ) + return "RESBJ"; + if (code == V3RoleClass.LIC) + return "LIC"; + if (code == V3RoleClass.NOT) + return "NOT"; + if (code == V3RoleClass.PROV) + return "PROV"; + if (code == V3RoleClass.PAT) + return "PAT"; + if (code == V3RoleClass.PAYEE) + return "PAYEE"; + if (code == V3RoleClass.PAYOR) + return "PAYOR"; + if (code == V3RoleClass.POLHOLD) + return "POLHOLD"; + if (code == V3RoleClass.QUAL) + return "QUAL"; + if (code == V3RoleClass.SPNSR) + return "SPNSR"; + if (code == V3RoleClass.STD) + return "STD"; + if (code == V3RoleClass.UNDWRT) + return "UNDWRT"; + if (code == V3RoleClass.CAREGIVER) + return "CAREGIVER"; + if (code == V3RoleClass.PRS) + return "PRS"; + if (code == V3RoleClass.SELF) + return "SELF"; + if (code == V3RoleClass._ROLECLASSPASSIVE) + return "_RoleClassPassive"; + if (code == V3RoleClass.ACCESS) + return "ACCESS"; + if (code == V3RoleClass.ADJY) + return "ADJY"; + if (code == V3RoleClass.CONC) + return "CONC"; + if (code == V3RoleClass.BOND) + return "BOND"; + if (code == V3RoleClass.CONY) + return "CONY"; + if (code == V3RoleClass.ADMM) + return "ADMM"; + if (code == V3RoleClass.BIRTHPL) + return "BIRTHPL"; + if (code == V3RoleClass.DEATHPLC) + return "DEATHPLC"; + if (code == V3RoleClass.DST) + return "DST"; + if (code == V3RoleClass.RET) + return "RET"; + if (code == V3RoleClass.EXLOC) + return "EXLOC"; + if (code == V3RoleClass.SDLOC) + return "SDLOC"; + if (code == V3RoleClass.DSDLOC) + return "DSDLOC"; + if (code == V3RoleClass.ISDLOC) + return "ISDLOC"; + if (code == V3RoleClass.EXPR) + return "EXPR"; + if (code == V3RoleClass.HLD) + return "HLD"; + if (code == V3RoleClass.HLTHCHRT) + return "HLTHCHRT"; + if (code == V3RoleClass.IDENT) + return "IDENT"; + if (code == V3RoleClass.MANU) + return "MANU"; + if (code == V3RoleClass.THER) + return "THER"; + if (code == V3RoleClass.MNT) + return "MNT"; + if (code == V3RoleClass.OWN) + return "OWN"; + if (code == V3RoleClass.RGPR) + return "RGPR"; + if (code == V3RoleClass.TERR) + return "TERR"; + if (code == V3RoleClass.USED) + return "USED"; + if (code == V3RoleClass.WRTE) + return "WRTE"; + if (code == V3RoleClass._ROLECLASSONTOLOGICAL) + return "_RoleClassOntological"; + if (code == V3RoleClass.EQUIV) + return "EQUIV"; + if (code == V3RoleClass.SAME) + return "SAME"; + if (code == V3RoleClass.SUBY) + return "SUBY"; + if (code == V3RoleClass.GEN) + return "GEN"; + if (code == V3RoleClass.GRIC) + return "GRIC"; + if (code == V3RoleClass.INST) + return "INST"; + if (code == V3RoleClass.SUBS) + return "SUBS"; + if (code == V3RoleClass._ROLECLASSPARTITIVE) + return "_RoleClassPartitive"; + if (code == V3RoleClass.CONT) + return "CONT"; + if (code == V3RoleClass.EXPAGTCAR) + return "EXPAGTCAR"; + if (code == V3RoleClass.EXPVECTOR) + return "EXPVECTOR"; + if (code == V3RoleClass.FOMITE) + return "FOMITE"; + if (code == V3RoleClass.INGR) + return "INGR"; + if (code == V3RoleClass.ACTI) + return "ACTI"; + if (code == V3RoleClass.ACTIB) + return "ACTIB"; + if (code == V3RoleClass.ACTIM) + return "ACTIM"; + if (code == V3RoleClass.ACTIR) + return "ACTIR"; + if (code == V3RoleClass.ADJV) + return "ADJV"; + if (code == V3RoleClass.ADTV) + return "ADTV"; + if (code == V3RoleClass.BASE) + return "BASE"; + if (code == V3RoleClass.CNTM) + return "CNTM"; + if (code == V3RoleClass.IACT) + return "IACT"; + if (code == V3RoleClass.COLR) + return "COLR"; + if (code == V3RoleClass.FLVR) + return "FLVR"; + if (code == V3RoleClass.PRSV) + return "PRSV"; + if (code == V3RoleClass.STBL) + return "STBL"; + if (code == V3RoleClass.MECH) + return "MECH"; + if (code == V3RoleClass.LOCE) + return "LOCE"; + if (code == V3RoleClass.STOR) + return "STOR"; + if (code == V3RoleClass.MBR) + return "MBR"; + if (code == V3RoleClass.PART) + return "PART"; + if (code == V3RoleClass.ACTM) + return "ACTM"; + if (code == V3RoleClass.SPEC) + return "SPEC"; + if (code == V3RoleClass.ALQT) + return "ALQT"; + if (code == V3RoleClass.ISLT) + return "ISLT"; + if (code == V3RoleClass.CHILD) + return "CHILD"; + if (code == V3RoleClass.CRED) + return "CRED"; + if (code == V3RoleClass.NURPRAC) + return "NURPRAC"; + if (code == V3RoleClass.NURS) + return "NURS"; + if (code == V3RoleClass.PA) + return "PA"; + if (code == V3RoleClass.PHYS) + return "PHYS"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCode.java new file mode 100644 index 00000000000..4a33d62f9a2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCode.java @@ -0,0 +1,3596 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleCode { + + /** + * Concepts characterizing the type of association formed by player and scoper when there is a recognized Affiliate role by which the two parties are related. + + + Examples: Business Partner, Business Associate, Colleague + */ + _AFFILIATIONROLETYPE, + /** + * Description:Codes that indicate a specific type of sponsor. Used when the sponsor's role is only either as a fully insured sponsor or only as a self-insured sponsor. NOTE: Where a sponsor may be either, use the SponsorParticipationFunction.code (fully insured or self insured) to indicate the type of responsibility. (CO6-0057) + */ + _COVERAGESPONSORROLETYPE, + /** + * Description:An employer or organization that contracts with an underwriter to assumes the financial risk and administrative responsibility for coverage of health services for covered parties. + */ + FULLINS, + /** + * Description:An employer or organization that assumes the financial risk and administrative responsibility for coverage of health services for covered parties. + */ + SELFINS, + /** + * Description:PayorRoleType for a particular type of policy or program benefit package or plan where more detail about the coverage administration role of the Payor is required. The functions performed by a Payor qualified by a PayorRoleType may be specified by the PayorParticpationFunction value set. + + + Examples:A Payor that is a TPA may administer a managed care plan without underwriting the risk. + */ + _PAYORROLETYPE, + /** + * Description:A payor that is responsible for functions related to the enrollment of covered parties. + */ + ENROLBKR, + /** + * Description:Third party administrator (TPA) is a payor organization that processes health care claims without carrying insurance risk. Third party administrators are prominent players in the managed care industry and have the expertise and capability to administer all or a portion of the claims process. They are normally contracted by a health insurer or self-insuring companies to administer services, including claims administration, premium collection, enrollment and other administrative activities. + + Self-insured employers often contract with third party administrator to handle their insurance functions. Insurance companies oftentimes outsource the claims, utilization review or membership functions to a TPA. Sometimes TPAs only manage provider networks, only claims or only utilization review. + + While some third-party administrators may operate as units of insurance companies, they are often independent. However, hospitals or provider organizations desiring to set up their own health plans will often outsource certain responsibilities to TPAs. TPAs may perform one or several payor functions, specified by the PayorParticipationFunction value set, such as provider management, enrollment, utilization management, and fee for service claims adjudication management. + */ + TPA, + /** + * Description:A payor that is responsible for review and case management of health services covered under a policy or program. + */ + UMO, + /** + * The role played by a party who has legal responsibility for another party. + */ + RESPRSN, + /** + * The role played by a person acting as the estate executor for a deceased subscriber or policyholder who was the responsible party + */ + EXCEST, + /** + * The role played by a person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings. + */ + GUADLTM, + /** + * The role played by a person or institution legally empowered with responsibility for the care of a ward. + */ + GUARD, + /** + * A relationship between two people in which one person authorizes another to act for him in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. + */ + POWATT, + /** + * A relationship between two people in which one person authorizes another, usually a family member or relative, to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency. + */ + DPOWATT, + /** + * A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that continues (by its terms) to be effective even though the grantor has become mentally incompetent after signing the document. + */ + HPOWATT, + /** + * A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. + */ + SPOWATT, + /** + * AssignedRoleType + */ + _ASSIGNEDROLETYPE, + /** + * Description:A role type that is used to further qualify a non-person subject playing a role where the role class attribute is set to RoleClass AssignedEntity + */ + _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE, + /** + * Description:Dogs trained to assist the ill or physically challenged. + */ + ASSIST, + /** + * Description:Animals, including fish and insects, and microorganisms which may participate as assigned entities in biotherapies. + */ + BIOTH, + /** + * Description:Non-person living subject used as antibiotic. + + + Examples:Bacteriophage, is a virus that infects bacteria. + */ + ANTIBIOT, + /** + * Description:Maggots raised for biodebridement. + + + Discussion: Maggot Debridement Therapy is the medical use of live maggots for cleaning non-healing wounds. + + + Examples:Removal of burnt skin. + */ + DEBR, + /** + * Description:Companion animals, such as dogs, cats, and rabbits, which may be provided to patients to improve general mood, decrease depression and loneliness, and distract from stress-inducing concerns to improve quality of life. + */ + CCO, + /** + * Description:Dogs trained to assist persons who are seeing impaired or blind. + */ + SEE, + /** + * Description:Dogs trained or having the ability to detect imminent seizures or cancers in humans, probably as a result of volatile chemical (odors) given off by the malignancy of the host. + */ + SNIFF, + /** + * Defines types of certifications for all entities + */ + _CERTIFIEDENTITYTYPE, + /** + * A role type used to qualify a person's legal status within a country or nation. + */ + _CITIZENROLETYPE, + /** + * A person who has fled his or her home country to find a safe place elsewhere. + */ + CAS, + /** + * A person who is someone of below legal age who has fled his or her home country, without his or her parents, to find a safe place elsewhere at time of categorization. + */ + CASM, + /** + * A person who is legally recognized as a member of a nation or country, with associated rights and obligations. + */ + CN, + /** + * A foreigner who is present in a country (which is foreign to him/her) unlawfully or without the country's authorization (may be called an illegal alien). + */ + CNRP, + /** + * A person who is below legal age present in a country, without his or her parents, (which is foreign to him/her) unlawfully or without the country's authorization. + */ + CNRPM, + /** + * A non-country member admitted to the territory of a nation or country as a non-resident for an explicit purpose. + */ + CPCA, + /** + * A foreigner who is a resident of the country but does not have citizenship. + */ + CRP, + /** + * A person who is a resident below legal age of the country without his or her parents and does not have citizenship. + */ + CRPM, + /** + * Types of contact for Role code "CON" + */ + _CONTACTROLETYPE, + /** + * A contact role used for business and/or administrative purposes. + */ + _ADMINISTRATIVECONTACTROLETYPE, + /** + * A contact role used to identify a person within a Provider organization that can be contacted for billing purposes (e.g. about the content of the Invoice). + */ + BILL, + /** + * A contact for an organization for administrative purposes. Contact role specifies a person acting as a liason for the organization. + + Example: HR Department representative. + */ + ORG, + /** + * A contact role used to identify a person within a Payor organization to whom this communication is addressed. + */ + PAYOR, + /** + * A contact designated for contact in emergent situations. + */ + ECON, + /** + * Played by an individual who is designated as the next of kin for another individual which scopes the role. + */ + NOK, + /** + * Definition: A code representing the type of identifier that has been assigned to the identified entity (IDENT). + + + Examples: Example values include Social Insurance Number, Product Catalog ID, Product Model Number. + */ + _IDENTIFIEDENTITYTYPE, + /** + * Description:Describes types of identifiers other than the primary location registry identifier for a service delivery location. Identifiers may be assigned by a local service delivery organization, a formal body capable of accrediting the location for the capability to provide specific services or the identifier may be assigned at a jurisdictional level. + */ + _LOCATIONIDENTIFIEDENTITYROLECODE, + /** + * Description:Identifier assigned to a location by the organization responsible for accrediting the location. + */ + ACHFID, + /** + * Description:Identifier assigned to a location by a jurisdiction. + */ + JURID, + /** + * Description:Identifier assigned to a location by a local party (which could be the facility itself or organization overseeing a group of facilities). + */ + LOCHFID, + /** + * Code indicating the primary use for which a living subject is bred or grown + */ + _LIVINGSUBJECTPRODUCTIONCLASS, + /** + * Cattle used for meat production + */ + BF, + /** + * Chickens raised for meat + */ + BL, + /** + * Breeding/genetic stock + */ + BR, + /** + * Companion animals + */ + CO, + /** + * Milk production + */ + DA, + /** + * Draft animals + */ + DR, + /** + * Dual purpose. Defined purposes based on species and breed + */ + DU, + /** + * Animals raised for their fur, hair or skins + */ + FI, + /** + * Chickens raised for egg production + */ + LY, + /** + * Animals raised for meat production + */ + MT, + /** + * Poultry flocks used for chick/poult production + */ + MU, + /** + * Animals rasied for recreation + */ + PL, + /** + * Animals raised for racing perfomance + */ + RC, + /** + * Animals raised for shows + */ + SH, + /** + * Cattle raised for veal meat production. Implicit is the husbandry method. + */ + VL, + /** + * Sheep, goats and other mammals raised for their fiber + */ + WL, + /** + * Animals used to perform work + */ + WO, + /** + * Identifies the specific hierarchical relationship between the playing and scoping medications. + + + Examples: Generic, Generic Formulation, Therapeutic Class, etc. + */ + _MEDICATIONGENERALIZATIONROLETYPE, + /** + * Description:A categorization of medicinal products by their therapeutic properties and/or main therapeutic use. + */ + DC, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients independent of strength, and form. + + The scoping entity identifies a unique combination of medicine ingredients; sometimes referred to as "ingredient set". + */ + GD, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients and dose form, independent of strength of the ingredients. The scoping entity identifies a unique combination of medicine ingredients in a specific dose form. + */ + GDF, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of is ingredients with their strength. The scoping entity identifies a unique combination of medicine ingredients with their strength. + */ + GDS, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form. + */ + GDSF, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form. + */ + MGDSF, + /** + * Types of membership for Role code "MBR" + */ + _MEMBERROLETYPE, + /** + * A person who is a member of a tribe. + */ + TRB, + /** + * PersonalRelationshipRoleType + */ + _PERSONALRELATIONSHIPROLETYPE, + /** + * A relationship between two people characterizing their "familial" relationship + */ + FAMMEMB, + /** + * The player of the role is a child of the scoping entity. + */ + CHILD, + /** + * The player of the role is a child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + CHLDADOPT, + /** + * The player of the role is a female child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + DAUADOPT, + /** + * The player of the role is a male child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + SONADOPT, + /** + * The player of the role is a child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + CHLDFOST, + /** + * The player of the role is a female child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + DAUFOST, + /** + * The player of the role is a male child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + SONFOST, + /** + * Description: The player of the role is a female child (of any type) of scoping entity (parent) + */ + DAUC, + /** + * The player of the role is a female offspring of the scoping entity (parent). + */ + DAU, + /** + * The player of the role is a daughter of the scoping person's spouse by a previous union. + */ + STPDAU, + /** + * The player of the role is an offspring of the scoping entity as determined by birth. + */ + NCHILD, + /** + * The player of the role is a male offspring of the scoping entity (parent). + */ + SON, + /** + * Description: The player of the role is a male child (of any type) of scoping entity (parent) + */ + SONC, + /** + * The player of the role is a son of the scoping person's spouse by a previous union. + */ + STPSON, + /** + * The player of the role is a child of the scoping person's spouse by a previous union. + */ + STPCHLD, + /** + * Description: A family member not having an immediate genetic or legal relationship e.g. Aunt, cousin, great grandparent, grandchild, grandparent, niece, nephew or uncle. + */ + EXT, + /** + * The player of the role is a sister of the scoping person's mother or father. + */ + AUNT, + /** + * Description:The player of the role is a biological sister of the scoping person's biological mother. + */ + MAUNT, + /** + * Description:The player of the role is a biological sister of the scoping person's biological father. + */ + PAUNT, + /** + * The player of the role is a relative of the scoping person descended from a common ancestor, such as a grandparent, by two or more steps in a diverging line. + */ + COUSN, + /** + * Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's mother's side, such as a grandparent, by two or more steps in a diverging line. + */ + MCOUSN, + /** + * Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's father's side, such as a grandparent, by two or more steps in a diverging line. + */ + PCOUSN, + /** + * The player of the role is a parent of the scoping person's grandparent. + */ + GGRPRN, + /** + * The player of the role is the father of the scoping person's grandparent. + */ + GGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological mother's parent. + */ + MGGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological father's parent. + */ + PGGRFTH, + /** + * The player of the role is the mother of the scoping person's grandparent. + */ + GGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological mother's parent. + */ + MGGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological father's parent. + */ + PGGRMTH, + /** + * Description:The player of the role is a biological parent of the scoping person's biological mother's parent. + */ + MGGRPRN, + /** + * Description:The player of the role is a biological parent of the scoping person's biological father's parent. + */ + PGGRPRN, + /** + * The player of the role is a child of the scoping person's son or daughter. + */ + GRNDCHILD, + /** + * The player of the role is a daughter of the scoping person's son or daughter. + */ + GRNDDAU, + /** + * The player of the role is a son of the scoping person's son or daughter. + */ + GRNDSON, + /** + * The player of the role is a parent of the scoping person's mother or father. + */ + GRPRN, + /** + * The player of the role is the father of the scoping person's mother or father. + */ + GRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological mother. + */ + MGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological father. + */ + PGRFTH, + /** + * The player of the role is the mother of the scoping person's mother or father. + */ + GRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological mother. + */ + MGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological father. + */ + PGRMTH, + /** + * Description:The player of the role is the biological parent of the scoping person's biological mother. + */ + MGRPRN, + /** + * Description:The player of the role is the biological parent of the scoping person's biological father. + */ + PGRPRN, + /** + * A relationship between an individual and a member of their spousal partner's immediate family. + */ + INLAW, + /** + * The player of the role is the spouse of scoping person's child. + */ + CHLDINLAW, + /** + * The player of the role is the wife of scoping person's son. + */ + DAUINLAW, + /** + * The player of the role is the husband of scoping person's daughter. + */ + SONINLAW, + /** + * The player of the role is the parent of scoping person's husband or wife. + */ + PRNINLAW, + /** + * The player of the role is the father of the scoping person's husband or wife. + */ + FTHINLAW, + /** + * The player of the role is the mother of the scoping person's husband or wife. + */ + MTHINLAW, + /** + * The player of the role is: (1) a sibling of the scoping person's spouse, or (2) the spouse of the scoping person's sibling, or (3) the spouse of a sibling of the scoping person's spouse. + */ + SIBINLAW, + /** + * The player of the role is: (1) a brother of the scoping person's spouse, or (2) the husband of the scoping person's sister, or (3) the husband of a sister of the scoping person's spouse. + */ + BROINLAW, + /** + * The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse. + */ + SISINLAW, + /** + * The player of the role is a child of scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NIENEPH, + /** + * The player of the role is a son of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NEPHEW, + /** + * The player of the role is a daughter of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NIECE, + /** + * The player of the role is a brother of the scoping person's mother or father. + */ + UNCLE, + /** + * Description:The player of the role is a biological brother of the scoping person's biological mother. + */ + MUNCLE, + /** + * Description:The player of the role is a biological brother of the scoping person's biological father. + */ + PUNCLE, + /** + * The player of the role is one who begets, gives birth to, or nurtures and raises the scoping entity (child). + */ + PRN, + /** + * The player of the role (parent) has taken the scoper (child) into their family through legal means and raises them as his or her own child. + */ + ADOPTP, + /** + * The player of the role (father) is a male who has taken the scoper (child) into their family through legal means and raises them as his own child. + */ + ADOPTF, + /** + * The player of the role (father) is a female who has taken the scoper (child) into their family through legal means and raises them as her own child. + */ + ADOPTM, + /** + * The player of the role is a male who begets or raises or nurtures the scoping entity (child). + */ + FTH, + /** + * The player of the role (parent) who is a male state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + FTHFOST, + /** + * The player of the role is a male who begets the scoping entity (child). + */ + NFTH, + /** + * Indicates the biologic male parent of a fetus. + */ + NFTHF, + /** + * The player of the role is the husband of scoping person's mother and not the scoping person's natural father. + */ + STPFTH, + /** + * The player of the role is a female who conceives, gives birth to, or raises and nurtures the scoping entity (child). + */ + MTH, + /** + * The player is a female whose womb carries the fetus of the scoper. Generally used when the gestational mother and natural mother are not the same. + */ + GESTM, + /** + * The player of the role (parent) who is a female state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + MTHFOST, + /** + * The player of the role is a female who conceives or gives birth to the scoping entity (child). + */ + NMTH, + /** + * The player is the biologic female parent of the scoping fetus. + */ + NMTHF, + /** + * The player of the role is the wife of scoping person's father and not the scoping person's natural mother. + */ + STPMTH, + /** + * natural parent + */ + NPRN, + /** + * The player of the role (parent) who is a state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + PRNFOST, + /** + * The player of the role is the spouse of the scoping person's parent and not the scoping person's natural parent. + */ + STPPRN, + /** + * The player of the role shares one or both parents in common with the scoping entity. + */ + SIB, + /** + * The player of the role is a male sharing one or both parents in common with the scoping entity. + */ + BRO, + /** + * The player of the role is a male related to the scoping entity by sharing only one biological parent. + */ + HBRO, + /** + * The player of the role is a male having the same biological parents as the scoping entity. + */ + NBRO, + /** + * The scoper was carried in the same womb as the male player and shares common biological parents. + */ + TWINBRO, + /** + * The scoper was carried in the same womb as the male player and shares common biological parents but is the product of a distinct egg/sperm pair. + */ + FTWINBRO, + /** + * The male scoper is an offspring of the same egg-sperm pair as the male player. + */ + ITWINBRO, + /** + * The player of the role is a son of the scoping person's stepparent. + */ + STPBRO, + /** + * The player of the role is related to the scoping entity by sharing only one biological parent. + */ + HSIB, + /** + * The player of the role is a female related to the scoping entity by sharing only one biological parent. + */ + HSIS, + /** + * The player of the role has both biological parents in common with the scoping entity. + */ + NSIB, + /** + * The player of the role is a female having the same biological parents as the scoping entity. + */ + NSIS, + /** + * The scoper was carried in the same womb as the female player and shares common biological parents. + */ + TWINSIS, + /** + * The scoper was carried in the same womb as the female player and shares common biological parents but is the product of a distinct egg/sperm pair. + */ + FTWINSIS, + /** + * The female scoper is an offspring of the same egg-sperm pair as the female player. + */ + ITWINSIS, + /** + * The scoper and player were carried in the same womb and shared common biological parents. + */ + TWIN, + /** + * The scoper and player were carried in the same womb and share common biological parents but are the product of distinct egg/sperm pairs. + */ + FTWIN, + /** + * The scoper and player are offspring of the same egg-sperm pair. + */ + ITWIN, + /** + * The player of the role is a female sharing one or both parents in common with the scoping entity. + */ + SIS, + /** + * The player of the role is a daughter of the scoping person's stepparent. + */ + STPSIS, + /** + * The player of the role is a child of the scoping person's stepparent. + */ + STPSIB, + /** + * A person who is important to one's well being; especially a spouse or one in a similar relationship. (The player is the one who is important) + */ + SIGOTHR, + /** + * The player of the role cohabits with the scoping person but is not the scoping person's spouse. + */ + DOMPART, + /** + * Player of the role was previously joined to the scoping person in marriage and this marriage is now dissolved and inactive. + + + Usage Note: This is significant to indicate as some jurisdictions have different legal requirements for former spouse to access the patient's record, from a general friend. + */ + FMRSPS, + /** + * The player of the role is a marriage partner of the scoping person. + */ + SPS, + /** + * The player of the role is a man joined to a woman (scoping person) in marriage. + */ + HUSB, + /** + * The player of the role is a woman joined to a man (scoping person) in marriage. + */ + WIFE, + /** + * The player of the role is a person who is known, liked, and trusted by the scoping person. + */ + FRND, + /** + * The player of the role lives near or next to the scoping person. + */ + NBOR, + /** + * The relationship that a person has with his or her self. + */ + ONESELF, + /** + * One who shares living quarters with the subject. + */ + ROOM, + /** + * Description: A role recognized through the eligibility of an identified party for benefits covered under an insurance policy or a program based on meeting eligibility criteria. + + Eligibility as a covered party may be conditioned on the party meeting criteria to qualify for coverage under a policy or program, which may be mandated by law. These criteria may be: + + + + The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage + + + + May more fully qualify a covered party role e.g, being differently abled may qualify an adult child as a dependent + + + + May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits. + + + + + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead. + + In summary, the coded concepts in the Abstract Value Set "CoveredPartyRoleType" can be "post-coordinated" with the "RoleClassCoveredParty" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability. + */ + _POLICYORPROGRAMCOVERAGEROLETYPE, + /** + * Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc + */ + _COVERAGEROLETYPE, + /** + * The player of the role is dependent of the scoping entity. + */ + FAMDEP, + /** + * Covered party is a dependent of the policy holder with a physical or mental disability causing a disadvantage that makes independent achievement unusually difficult. + */ + HANDIC, + /** + * Covered party is an injured party with a legal claim for compensation against a policy holder under an insurance policy. + */ + INJ, + /** + * Covered party is the policy holder. Also known as the subscriber. + */ + SELF, + /** + * Covered party is an individual that the policy holder has assumed responsibility for, such as foster child or legal ward. + */ + SPON, + /** + * Covered party to an insurance policy has coverage through full-time or part-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + STUD, + /** + * Covered party to an insurance policy has coverage through full-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + FSTUD, + /** + * Covered party to an insurance policy has coverage through part-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + PSTUD, + /** + * A child taken into one's family through legal means and raised as one's own child. + */ + ADOPT, + /** + * A child of one's son or daughter. + */ + GCHILD, + /** + * parent of a parent of the subject. + */ + GPARNT, + /** + * A child as determined by birth. + */ + NAT, + /** + * A child of one's brother or sister or of the brother or sister of one's spouse. + */ + NIENE, + /** + * One that begets or brings forth offspring or a person who brings up and cares for for another (Webster's Collegiate Dictionary) + */ + PARNT, + /** + * A marriage partner; a husband or wife. + */ + SPSE, + /** + * A child receiving parental care and nurture from a person who is related to them through marriage to their parent. + */ + STEP, + /** + * A role recognized through the eligibility of an identified living subject for benefits covered under an insurance policy or a program. Eligibility as a covered party may be conditioned on a relationship with (1) the policy holder such as the policy holder who is covered as an individual under a poliy or as a party sponsored for coverage by the policy holder. + + + Example:An employee as a subscriber; or (2) on being scoped another covered party such as the subscriber, as in the case of a dependent. + + + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts. + */ + _COVEREDPARTYROLETYPE, + /** + * DescriptionA role recognized through the eligibility of a party play a claimant for benefits covered or provided under an insurance policy. + */ + _CLAIMANTCOVEREDPARTYROLETYPE, + /** + * Description: A person playing the role of program eligible under a program based on allegations of being the victim of a crime. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is "program eligible" and the person's status as a crime victim meets jurisdictional or program criteria. + */ + CRIMEVIC, + /** + * Description: A person playing the role of program eligible under a workers compensation program based on the filing of work-related injury claim. + + + Discussion: This CoveredPartyRoleType.code is used when the CoveredPartyRole class code is either "program eligible", a "named insured", and "individual insured", or "dependent", and the person's status as differently abled or "handicapped" meets jurisdictional, policy, or program criteria. + */ + INJWKR, + /** + * Description: A role recognized through the eligibility of a party to play a dependent for benefits covered or provided under a health insurance policy because of an association with the subscriber that is recognized by the policy underwriter. + */ + _DEPENDENTCOVEREDPARTYROLETYPE, + /** + * Description: A person playing the role of an individual insured with continuity of coverage under a policy which is being terminated based on loss of original status that was the basis for coverage. Criteria for qualifying for continuity of coverage may be set by law. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a continuity of coverage beneficiary meets jurisdictional or policy criteria. + */ + COCBEN, + /** + * Description: A person playing the role of program eligible under a program based on meeting criteria for health or functional limitation set by law or by the program. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible", "named insured", "individual insured", or "dependent", and the person's status as differently abled meets jurisdictional, policy, or program criteria. + */ + DIFFABL, + /** + * Description: A person, who is a minor or is deemed incompetent, who plays the role of a program eligible where eligibility for coverage is based on meeting program eligibility criteria for status as a ward of a court or jurisdiction. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a "claimant", "program eligible", a "named insured", an "individual Insured" or a "dependent", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law. + */ + WARD, + /** + * A role recognized through the eligibility of a party to play an individual insured for benefits covered or provided under an insurance policy where the party is also the policy holder. + */ + _INDIVIDUALINSUREDPARTYROLETYPE, + /** + * Description: A person playing the role of an individual insured under a policy based on meeting criteria for the employment status of retired set by law or the policy. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a retiree meets jurisdictional or policy criteria. + */ + RETIREE, + /** + * Description:A role recognized through the eligibility of a party to play a program eligible for benefits covered or provided under a program. + */ + _PROGRAMELIGIBLEPARTYROLETYPE, + /** + * Description: A person playing the role of program eligible under a program based on aboriginal ancestry or as a member of an aboriginal community. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is "program eligible" and the person's status as a member of an indigenous people meets jurisdictional or program criteria. + */ + INDIG, + /** + * Definition: A person playing the role of program eligible under a program based on military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a member of the military meets jurisdictional or program criteria + */ + MIL, + /** + * Description: A person playing the role of program eligible under a program based on active military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as active duty military meets jurisdictional or program criteria. + */ + ACTMIL, + /** + * Description: A person playing the role of program eligible under a program based on retired military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as retired military meets jurisdictional or program criteria. + */ + RETMIL, + /** + * Description: A person playing the role of program eligible under a program based on status as a military veteran. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as a veteran meets jurisdictional or program criteria. + */ + VET, + /** + * Description: A role recognized through the eligibility of a party to play a subscriber for benefits covered or provided under a health insurance policy. + */ + _SUBSCRIBERCOVEREDPARTYROLETYPE, + /** + * Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. Examples: screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the active treatment portion of the design. + */ + _RESEARCHSUBJECTROLEBASIS, + /** + * Definition:The specific role being played by a research subject participating in the active treatment or primary data collection portion of a research study. + */ + ERL, + /** + * Definition:The specific role being played by a research subject participating in the pre-enrollment evaluation portion of a research study. + */ + SCN, + /** + * A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered. + */ + _SERVICEDELIVERYLOCATIONROLETYPE, + /** + * A role of a place that further classifies a setting that is intended to house the provision of services. + */ + _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE, + /** + * A role of a place that further classifies the clinical setting (e.g., cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter. + */ + _DEDICATEDCLINICALLOCATIONROLETYPE, + /** + * A practice setting where diagnostic procedures or therapeutic interventions are performed + */ + DX, + /** + * A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g., cardiac catheterization lab, echocardiography suite) + */ + CVDX, + /** + * Cardiac catheterization lab + */ + CATH, + /** + * Echocardiography lab + */ + ECHO, + /** + * A practice setting where GI procedures (such as endoscopies) are performed + */ + GIDX, + /** + * (X12N 261QD0000N) + */ + ENDOS, + /** + * A practice setting where radiology services (diagnostic or therapeutic) are provided (X12N 261QR0200N) + */ + RADDX, + /** + * (X12N 261QX0203N) + */ + RADO, + /** + * Neuroradiology unit + */ + RNEU, + /** + * An acute care institution that provides medical, surgical, or psychiatric care and treatment for the sick or the injured. + */ + HOSP, + /** + * (1) A hospital including a physical plant and personnel that provides multidisciplinary diagnosis and treatment for diseases that have one or more of the following characteristics: is permanent; leaves residual disability; is caused by nonreversible pathological alteration; requires special training of the patient for rehabilitation; and/or may be expected to require a long period of supervision or care. In addition, patients require the safety, security, and shelter of these specialized inpatient or partial hospitalization settings. (2) A hospital that provides medical and skilled nursing services to patients with long-term illnesses who are not in an acute phase but who require an intensity of services not available in nursing homes + */ + CHR, + /** + * (X12N 282N00000N) + */ + GACH, + /** + * A health care facility operated by the Department of Defense or other military operation. + */ + MHSP, + /** + * Healthcare facility that cares for patients with psychiatric illness(s). + */ + PSYCHF, + /** + * (X12N 283X00000N) + */ + RH, + /** + * Description: A location that plays the role of delivering services which may include life training and/or social support to people with addictions. + */ + RHAT, + /** + * Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behaviour disorder. + */ + RHII, + /** + * Description: A location that plays the role of delivering services which may social support services for adolescents who are pregnant or have child and are experiencing adaptation issues/difficulties in their current or eventual parenting role. + */ + RHMAD, + /** + * Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with physical impairments. + */ + RHPI, + /** + * Description: A location that plays the role of delivering services for people with hearing impairments. + */ + RHPIH, + /** + * Description: A location that plays the role of delivering services for people with motor skill impairments. + */ + RHPIMS, + /** + * Description: A location that plays the role of delivering services for people with visual skill impairments. + */ + RHPIVS, + /** + * Description: A location that plays the role of delivering services which may include life training and/or social support services for the adaption, rehabilitation and social integration of youths with adjustment difficulties. + */ + RHYAD, + /** + * Hospital unit + */ + HU, + /** + * Bone marrow transplant unit + */ + BMTU, + /** + * Coronary care unit + */ + CCU, + /** + * A specialty unit in hospital that focuses on chronic respirator patients and pulmonary failure + */ + CHEST, + /** + * Epilepsy unit + */ + EPIL, + /** + * The section of a health care facility for providing rapid treatment to victims of sudden illness or trauma. + */ + ER, + /** + * Emergency trauma unit + */ + ETU, + /** + * Hemodialysis unit + */ + HD, + /** + * Description: A location that plays the role of delivering services which may include tests done based on clinical specimens to get health information about a patient as pertaining to the diagnosis, treatment and prevention of disease. Hospital laboratories may be further divided into specialized units such as Anatomic Pathology, Microbiology, and Biochemistry. + */ + HLAB, + /** + * Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for a hospital visit longer than one day. + */ + INLAB, + /** + * Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for same day visits. + */ + OUTLAB, + /** + * Description: A location that plays the role of delivering services which may include the branch of medicine that uses ionizing and non-ionizing radiation to diagnose and treat diseases. The radiology unit may be further divided into subspecialties such as Imaging, Cardiovascular, Thoracic, and Ultrasound. + */ + HRAD, + /** + * Description: A location that plays the role of delivering services which may include collecting specimens and/or samples from patients for laboratory testing purposes, but does not perform any tests or analysis functions. + */ + HUSCS, + /** + * Intensive care unit + */ + ICU, + /** + * Pediatric intensive care unit + */ + PEDICU, + /** + * Pediatric neonatal intensive care unit + */ + PEDNICU, + /** + * Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for visits longer than one day. The distinction between inpatient pharmacies and retail (or outpatient) pharmacies is that they are part of a patient's continuity of care while staying in the hospital. + */ + INPHARM, + /** + * Description: A location that plays the role of delivering services which include biochemistry, hematology, microbiology, immunochemistry, and toxicology. + */ + MBL, + /** + * Neurology critical care and stroke unit + */ + NCCS, + /** + * Neurosurgery unit + */ + NS, + /** + * Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for outpatient visits and may also be used for discharge prescriptions. + */ + OUTPHARM, + /** + * Pediatric unit + */ + PEDU, + /** + * (X12N 273R00000N) + */ + PHU, + /** + * Rehabilitation hospital unit + */ + RHU, + /** + * (X12N 261QA1200N) + */ + SLEEP, + /** + * Nursing or custodial care facility + */ + NCCF, + /** + * (X12N 314000000N) + */ + SNF, + /** + * Outpatient facility + */ + OF, + /** + * Allergy clinic + */ + ALL, + /** + * Amputee clinic + */ + AMPUT, + /** + * Bone marrow transplant clinic + */ + BMTC, + /** + * Breast clinic + */ + BREAST, + /** + * Child and adolescent neurology clinic + */ + CANC, + /** + * Child and adolescent psychiatry clinic + */ + CAPC, + /** + * Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities + */ + CARD, + /** + * Pediatric cardiology clinic + */ + PEDCARD, + /** + * Coagulation clinic + */ + COAG, + /** + * Colon and rectal surgery clinic + */ + CRS, + /** + * Dermatology clinic + */ + DERM, + /** + * Endocrinology clinic + */ + ENDO, + /** + * Pediatric endocrinology clinic + */ + PEDE, + /** + * Otorhinolaryngology clinic + */ + ENT, + /** + * Family medicine clinic + */ + FMC, + /** + * Gastroenterology clinic + */ + GI, + /** + * Pediatric gastroenterology clinic + */ + PEDGI, + /** + * General internal medicine clinic + */ + GIM, + /** + * Gynecology clinic + */ + GYN, + /** + * Hematology clinic + */ + HEM, + /** + * Pediatric hematology clinic + */ + PEDHEM, + /** + * Hypertension clinic + */ + HTN, + /** + * Focuses on assessing disability + */ + IEC, + /** + * Infectious disease clinic + */ + INFD, + /** + * Pediatric infectious disease clinic + */ + PEDID, + /** + * Infertility clinic + */ + INV, + /** + * Lympedema clinic + */ + LYMPH, + /** + * Medical genetics clinic + */ + MGEN, + /** + * Nephrology clinic + */ + NEPH, + /** + * Pediatric nephrology clinic + */ + PEDNEPH, + /** + * Neurology clinic + */ + NEUR, + /** + * Obstetrics clinic + */ + OB, + /** + * Oral and maxillofacial surgery clinic + */ + OMS, + /** + * Medical oncology clinic + */ + ONCL, + /** + * Pediatric oncology clinic + */ + PEDHO, + /** + * Opthalmology clinic + */ + OPH, + /** + * Description: A location that plays the role of delivering services which may include examination, diagnosis, treatment, management, and prevention of diseases and disorders of the eye as well as prescribing and fitting appropriate corrective lenses (glasses or contact lenses) as needed. Optometry clinics may also provide tests for visual field screening, measuring intra-ocular pressure and ophthalmoscopy, as and when required. + */ + OPTC, + /** + * Orthopedics clinic + */ + ORTHO, + /** + * Hand clinic + */ + HAND, + /** + * (X12N 261QP3300N) + */ + PAINCL, + /** + * (X12N 261QP2300N) + */ + PC, + /** + * Pediatrics clinic + */ + PEDC, + /** + * Pediatric rheumatology clinic + */ + PEDRHEUM, + /** + * (X12N 261QP1100N) + */ + POD, + /** + * Preventive medicine clinic + */ + PREV, + /** + * Proctology clinic + */ + PROCTO, + /** + * Location where healthcare service was delivered, identified as the healthcare provider's practice office. + */ + PROFF, + /** + * Prosthodontics clinic + */ + PROS, + /** + * Psychology clinic + */ + PSI, + /** + * Psychiatry clinic + */ + PSY, + /** + * Rheumatology clinic + */ + RHEUM, + /** + * Sports medicine clinic + */ + SPMED, + /** + * Surgery clinic + */ + SU, + /** + * Plastic surgery clinic + */ + PLS, + /** + * Urology clinic + */ + URO, + /** + * Transplant clinic + */ + TR, + /** + * Travel and geographic medicine clinic + */ + TRAVEL, + /** + * Wound clinic + */ + WND, + /** + * Residential treatment facility + */ + RTF, + /** + * Pain rehabilitation center + */ + PRC, + /** + * (X12N 324500000N) + */ + SURF, + /** + * A role of a place that further classifies a setting that is intended to house the provision of non-clinical services. + */ + _DEDICATEDNONCLINICALLOCATIONROLETYPE, + /** + * Location address where medical supplies were transported to for use. + */ + DADDR, + /** + * Location (mobile) where healthcare service was delivered. + */ + MOBL, + /** + * Location (mobile) where healthcare service was delivered, identified specifically as an ambulance. + */ + AMB, + /** + * Location where healthcare service was delivered, identified as a pharmacy. + */ + PHARM, + /** + * IncidentalServiceDeliveryLocationRoleType + */ + _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE, + /** + * Location of an accident where healthcare service was delivered, such as a roadside. + */ + ACC, + /** + * Community location where healthcare is delivered. + */ + COMM, + /** + * Description: A location that plays the role of delivering services which may include providing front-line services to the population of a defined geographic area such as: healthcare services and social services, preventive or curative, rehabilitation or reintegration. + */ + CSC, + /** + * location where healthcare was delivered which is the residence of the Patient. + */ + PTRES, + /** + * Location where healthcare service was delivered, identified as a school or educational facility. + */ + SCHOOL, + /** + * Description: A location that plays the role of delivering services which may include: social emergency services required for a young person as required under any jurisdictional youth laws, child placement, and family mediation in the defined geographical area the SDL is responsible for. It may provide expertise in a judiciary setting on child custody, adoption and biological history research. + */ + UPC, + /** + * Location where healthcare service was delivered, identified as a work place. + */ + WORK, + /** + * SpecimenRoleType + */ + _SPECIMENROLETYPE, + /** + * A specimen used for initial calibration settings of an instrument + */ + C, + /** + * A set of patient samples in which the individuals of the group may or may not be identified. + */ + G, + /** + * Aliquots of individual specimens combined to form a single specimen representing all of the included individuals. + */ + L, + /** + * A specimen that has been collected from a patient. + */ + P, + /** + * A specimen specifically used to verify the sensitivity, specificity, accuracy or other perfomance parameter of a diagnostic test. + */ + Q, + /** + * Quality Control specimen submitted to the lab whose identity and composition is not known to the lab. + */ + B, + /** + * An electronically simulated QC specimen + */ + E, + /** + * Specimen used for testing proficiency of an organization performing testing (how does this differ from O?) + */ + F, + /** + * A specimen used for evaluation of operator proficiency (operator in what context?) + */ + O, + /** + * A specimen used for periodic calibration checks of instruments + */ + V, + /** + * A portion of an original patent sample that is tested at the same time as the original sample + */ + R, + /** + * A party that makes a claim for coverage under a policy. + */ + CLAIM, + /** + * Community Laboratory + */ + COMMUNITYLABORATORY, + /** + * An individual or organization that makes or gives a promise, assurance, pledge to pay or has paid the healthcare service provider. + */ + GT, + /** + * Home Health + */ + HOMEHEALTH, + /** + * Laboratory + */ + LABORATORY, + /** + * Pathologist + */ + PATHOLOGIST, + /** + * Policy holder for the insurance policy. + */ + PH, + /** + * Phlebotomist + */ + PHLEBOTOMIST, + /** + * A party that meets the eligibility criteria for coverage under a program. + */ + PROG, + /** + * The recipient for the service(s) and/or product(s) when they are not the covered party. + */ + PT, + /** + * Self + */ + SUBJECT, + /** + * Third Party + */ + THIRDPARTY, + /** + * null + */ + DEP, + /** + * A party covered under a policy based on association with a subscriber. + */ + DEPEN, + /** + * A member of the covered party's family. This could be the spouse, a parent, a grand parent, a sibling, etc. + */ + FM, + /** + * A party covered under a policy as the policyholder. + */ + INDIV, + /** + * A party to an insurance policy to whom the insurer agrees to indemnify for losses, provides benefits for, or renders services. + */ + NAMED, + /** + * null + */ + PSYCHCF, + /** + * A party covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage + */ + SUBSCR, + /** + * added to help the parsers + */ + NULL; + public static V3RoleCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AffiliationRoleType".equals(codeString)) + return _AFFILIATIONROLETYPE; + if ("_CoverageSponsorRoleType".equals(codeString)) + return _COVERAGESPONSORROLETYPE; + if ("FULLINS".equals(codeString)) + return FULLINS; + if ("SELFINS".equals(codeString)) + return SELFINS; + if ("_PayorRoleType".equals(codeString)) + return _PAYORROLETYPE; + if ("ENROLBKR".equals(codeString)) + return ENROLBKR; + if ("TPA".equals(codeString)) + return TPA; + if ("UMO".equals(codeString)) + return UMO; + if ("RESPRSN".equals(codeString)) + return RESPRSN; + if ("EXCEST".equals(codeString)) + return EXCEST; + if ("GUADLTM".equals(codeString)) + return GUADLTM; + if ("GUARD".equals(codeString)) + return GUARD; + if ("POWATT".equals(codeString)) + return POWATT; + if ("DPOWATT".equals(codeString)) + return DPOWATT; + if ("HPOWATT".equals(codeString)) + return HPOWATT; + if ("SPOWATT".equals(codeString)) + return SPOWATT; + if ("_AssignedRoleType".equals(codeString)) + return _ASSIGNEDROLETYPE; + if ("_AssignedNonPersonLivingSubjectRoleType".equals(codeString)) + return _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE; + if ("ASSIST".equals(codeString)) + return ASSIST; + if ("BIOTH".equals(codeString)) + return BIOTH; + if ("ANTIBIOT".equals(codeString)) + return ANTIBIOT; + if ("DEBR".equals(codeString)) + return DEBR; + if ("CCO".equals(codeString)) + return CCO; + if ("SEE".equals(codeString)) + return SEE; + if ("SNIFF".equals(codeString)) + return SNIFF; + if ("_CertifiedEntityType".equals(codeString)) + return _CERTIFIEDENTITYTYPE; + if ("_CitizenRoleType".equals(codeString)) + return _CITIZENROLETYPE; + if ("CAS".equals(codeString)) + return CAS; + if ("CASM".equals(codeString)) + return CASM; + if ("CN".equals(codeString)) + return CN; + if ("CNRP".equals(codeString)) + return CNRP; + if ("CNRPM".equals(codeString)) + return CNRPM; + if ("CPCA".equals(codeString)) + return CPCA; + if ("CRP".equals(codeString)) + return CRP; + if ("CRPM".equals(codeString)) + return CRPM; + if ("_ContactRoleType".equals(codeString)) + return _CONTACTROLETYPE; + if ("_AdministrativeContactRoleType".equals(codeString)) + return _ADMINISTRATIVECONTACTROLETYPE; + if ("BILL".equals(codeString)) + return BILL; + if ("ORG".equals(codeString)) + return ORG; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("ECON".equals(codeString)) + return ECON; + if ("NOK".equals(codeString)) + return NOK; + if ("_IdentifiedEntityType".equals(codeString)) + return _IDENTIFIEDENTITYTYPE; + if ("_LocationIdentifiedEntityRoleCode".equals(codeString)) + return _LOCATIONIDENTIFIEDENTITYROLECODE; + if ("ACHFID".equals(codeString)) + return ACHFID; + if ("JURID".equals(codeString)) + return JURID; + if ("LOCHFID".equals(codeString)) + return LOCHFID; + if ("_LivingSubjectProductionClass".equals(codeString)) + return _LIVINGSUBJECTPRODUCTIONCLASS; + if ("BF".equals(codeString)) + return BF; + if ("BL".equals(codeString)) + return BL; + if ("BR".equals(codeString)) + return BR; + if ("CO".equals(codeString)) + return CO; + if ("DA".equals(codeString)) + return DA; + if ("DR".equals(codeString)) + return DR; + if ("DU".equals(codeString)) + return DU; + if ("FI".equals(codeString)) + return FI; + if ("LY".equals(codeString)) + return LY; + if ("MT".equals(codeString)) + return MT; + if ("MU".equals(codeString)) + return MU; + if ("PL".equals(codeString)) + return PL; + if ("RC".equals(codeString)) + return RC; + if ("SH".equals(codeString)) + return SH; + if ("VL".equals(codeString)) + return VL; + if ("WL".equals(codeString)) + return WL; + if ("WO".equals(codeString)) + return WO; + if ("_MedicationGeneralizationRoleType".equals(codeString)) + return _MEDICATIONGENERALIZATIONROLETYPE; + if ("DC".equals(codeString)) + return DC; + if ("GD".equals(codeString)) + return GD; + if ("GDF".equals(codeString)) + return GDF; + if ("GDS".equals(codeString)) + return GDS; + if ("GDSF".equals(codeString)) + return GDSF; + if ("MGDSF".equals(codeString)) + return MGDSF; + if ("_MemberRoleType".equals(codeString)) + return _MEMBERROLETYPE; + if ("TRB".equals(codeString)) + return TRB; + if ("_PersonalRelationshipRoleType".equals(codeString)) + return _PERSONALRELATIONSHIPROLETYPE; + if ("FAMMEMB".equals(codeString)) + return FAMMEMB; + if ("CHILD".equals(codeString)) + return CHILD; + if ("CHLDADOPT".equals(codeString)) + return CHLDADOPT; + if ("DAUADOPT".equals(codeString)) + return DAUADOPT; + if ("SONADOPT".equals(codeString)) + return SONADOPT; + if ("CHLDFOST".equals(codeString)) + return CHLDFOST; + if ("DAUFOST".equals(codeString)) + return DAUFOST; + if ("SONFOST".equals(codeString)) + return SONFOST; + if ("DAUC".equals(codeString)) + return DAUC; + if ("DAU".equals(codeString)) + return DAU; + if ("STPDAU".equals(codeString)) + return STPDAU; + if ("NCHILD".equals(codeString)) + return NCHILD; + if ("SON".equals(codeString)) + return SON; + if ("SONC".equals(codeString)) + return SONC; + if ("STPSON".equals(codeString)) + return STPSON; + if ("STPCHLD".equals(codeString)) + return STPCHLD; + if ("EXT".equals(codeString)) + return EXT; + if ("AUNT".equals(codeString)) + return AUNT; + if ("MAUNT".equals(codeString)) + return MAUNT; + if ("PAUNT".equals(codeString)) + return PAUNT; + if ("COUSN".equals(codeString)) + return COUSN; + if ("MCOUSN".equals(codeString)) + return MCOUSN; + if ("PCOUSN".equals(codeString)) + return PCOUSN; + if ("GGRPRN".equals(codeString)) + return GGRPRN; + if ("GGRFTH".equals(codeString)) + return GGRFTH; + if ("MGGRFTH".equals(codeString)) + return MGGRFTH; + if ("PGGRFTH".equals(codeString)) + return PGGRFTH; + if ("GGRMTH".equals(codeString)) + return GGRMTH; + if ("MGGRMTH".equals(codeString)) + return MGGRMTH; + if ("PGGRMTH".equals(codeString)) + return PGGRMTH; + if ("MGGRPRN".equals(codeString)) + return MGGRPRN; + if ("PGGRPRN".equals(codeString)) + return PGGRPRN; + if ("GRNDCHILD".equals(codeString)) + return GRNDCHILD; + if ("GRNDDAU".equals(codeString)) + return GRNDDAU; + if ("GRNDSON".equals(codeString)) + return GRNDSON; + if ("GRPRN".equals(codeString)) + return GRPRN; + if ("GRFTH".equals(codeString)) + return GRFTH; + if ("MGRFTH".equals(codeString)) + return MGRFTH; + if ("PGRFTH".equals(codeString)) + return PGRFTH; + if ("GRMTH".equals(codeString)) + return GRMTH; + if ("MGRMTH".equals(codeString)) + return MGRMTH; + if ("PGRMTH".equals(codeString)) + return PGRMTH; + if ("MGRPRN".equals(codeString)) + return MGRPRN; + if ("PGRPRN".equals(codeString)) + return PGRPRN; + if ("INLAW".equals(codeString)) + return INLAW; + if ("CHLDINLAW".equals(codeString)) + return CHLDINLAW; + if ("DAUINLAW".equals(codeString)) + return DAUINLAW; + if ("SONINLAW".equals(codeString)) + return SONINLAW; + if ("PRNINLAW".equals(codeString)) + return PRNINLAW; + if ("FTHINLAW".equals(codeString)) + return FTHINLAW; + if ("MTHINLAW".equals(codeString)) + return MTHINLAW; + if ("SIBINLAW".equals(codeString)) + return SIBINLAW; + if ("BROINLAW".equals(codeString)) + return BROINLAW; + if ("SISINLAW".equals(codeString)) + return SISINLAW; + if ("NIENEPH".equals(codeString)) + return NIENEPH; + if ("NEPHEW".equals(codeString)) + return NEPHEW; + if ("NIECE".equals(codeString)) + return NIECE; + if ("UNCLE".equals(codeString)) + return UNCLE; + if ("MUNCLE".equals(codeString)) + return MUNCLE; + if ("PUNCLE".equals(codeString)) + return PUNCLE; + if ("PRN".equals(codeString)) + return PRN; + if ("ADOPTP".equals(codeString)) + return ADOPTP; + if ("ADOPTF".equals(codeString)) + return ADOPTF; + if ("ADOPTM".equals(codeString)) + return ADOPTM; + if ("FTH".equals(codeString)) + return FTH; + if ("FTHFOST".equals(codeString)) + return FTHFOST; + if ("NFTH".equals(codeString)) + return NFTH; + if ("NFTHF".equals(codeString)) + return NFTHF; + if ("STPFTH".equals(codeString)) + return STPFTH; + if ("MTH".equals(codeString)) + return MTH; + if ("GESTM".equals(codeString)) + return GESTM; + if ("MTHFOST".equals(codeString)) + return MTHFOST; + if ("NMTH".equals(codeString)) + return NMTH; + if ("NMTHF".equals(codeString)) + return NMTHF; + if ("STPMTH".equals(codeString)) + return STPMTH; + if ("NPRN".equals(codeString)) + return NPRN; + if ("PRNFOST".equals(codeString)) + return PRNFOST; + if ("STPPRN".equals(codeString)) + return STPPRN; + if ("SIB".equals(codeString)) + return SIB; + if ("BRO".equals(codeString)) + return BRO; + if ("HBRO".equals(codeString)) + return HBRO; + if ("NBRO".equals(codeString)) + return NBRO; + if ("TWINBRO".equals(codeString)) + return TWINBRO; + if ("FTWINBRO".equals(codeString)) + return FTWINBRO; + if ("ITWINBRO".equals(codeString)) + return ITWINBRO; + if ("STPBRO".equals(codeString)) + return STPBRO; + if ("HSIB".equals(codeString)) + return HSIB; + if ("HSIS".equals(codeString)) + return HSIS; + if ("NSIB".equals(codeString)) + return NSIB; + if ("NSIS".equals(codeString)) + return NSIS; + if ("TWINSIS".equals(codeString)) + return TWINSIS; + if ("FTWINSIS".equals(codeString)) + return FTWINSIS; + if ("ITWINSIS".equals(codeString)) + return ITWINSIS; + if ("TWIN".equals(codeString)) + return TWIN; + if ("FTWIN".equals(codeString)) + return FTWIN; + if ("ITWIN".equals(codeString)) + return ITWIN; + if ("SIS".equals(codeString)) + return SIS; + if ("STPSIS".equals(codeString)) + return STPSIS; + if ("STPSIB".equals(codeString)) + return STPSIB; + if ("SIGOTHR".equals(codeString)) + return SIGOTHR; + if ("DOMPART".equals(codeString)) + return DOMPART; + if ("FMRSPS".equals(codeString)) + return FMRSPS; + if ("SPS".equals(codeString)) + return SPS; + if ("HUSB".equals(codeString)) + return HUSB; + if ("WIFE".equals(codeString)) + return WIFE; + if ("FRND".equals(codeString)) + return FRND; + if ("NBOR".equals(codeString)) + return NBOR; + if ("ONESELF".equals(codeString)) + return ONESELF; + if ("ROOM".equals(codeString)) + return ROOM; + if ("_PolicyOrProgramCoverageRoleType".equals(codeString)) + return _POLICYORPROGRAMCOVERAGEROLETYPE; + if ("_CoverageRoleType".equals(codeString)) + return _COVERAGEROLETYPE; + if ("FAMDEP".equals(codeString)) + return FAMDEP; + if ("HANDIC".equals(codeString)) + return HANDIC; + if ("INJ".equals(codeString)) + return INJ; + if ("SELF".equals(codeString)) + return SELF; + if ("SPON".equals(codeString)) + return SPON; + if ("STUD".equals(codeString)) + return STUD; + if ("FSTUD".equals(codeString)) + return FSTUD; + if ("PSTUD".equals(codeString)) + return PSTUD; + if ("ADOPT".equals(codeString)) + return ADOPT; + if ("GCHILD".equals(codeString)) + return GCHILD; + if ("GPARNT".equals(codeString)) + return GPARNT; + if ("NAT".equals(codeString)) + return NAT; + if ("NIENE".equals(codeString)) + return NIENE; + if ("PARNT".equals(codeString)) + return PARNT; + if ("SPSE".equals(codeString)) + return SPSE; + if ("STEP".equals(codeString)) + return STEP; + if ("_CoveredPartyRoleType".equals(codeString)) + return _COVEREDPARTYROLETYPE; + if ("_ClaimantCoveredPartyRoleType".equals(codeString)) + return _CLAIMANTCOVEREDPARTYROLETYPE; + if ("CRIMEVIC".equals(codeString)) + return CRIMEVIC; + if ("INJWKR".equals(codeString)) + return INJWKR; + if ("_DependentCoveredPartyRoleType".equals(codeString)) + return _DEPENDENTCOVEREDPARTYROLETYPE; + if ("COCBEN".equals(codeString)) + return COCBEN; + if ("DIFFABL".equals(codeString)) + return DIFFABL; + if ("WARD".equals(codeString)) + return WARD; + if ("_IndividualInsuredPartyRoleType".equals(codeString)) + return _INDIVIDUALINSUREDPARTYROLETYPE; + if ("RETIREE".equals(codeString)) + return RETIREE; + if ("_ProgramEligiblePartyRoleType".equals(codeString)) + return _PROGRAMELIGIBLEPARTYROLETYPE; + if ("INDIG".equals(codeString)) + return INDIG; + if ("MIL".equals(codeString)) + return MIL; + if ("ACTMIL".equals(codeString)) + return ACTMIL; + if ("RETMIL".equals(codeString)) + return RETMIL; + if ("VET".equals(codeString)) + return VET; + if ("_SubscriberCoveredPartyRoleType".equals(codeString)) + return _SUBSCRIBERCOVEREDPARTYROLETYPE; + if ("_ResearchSubjectRoleBasis".equals(codeString)) + return _RESEARCHSUBJECTROLEBASIS; + if ("ERL".equals(codeString)) + return ERL; + if ("SCN".equals(codeString)) + return SCN; + if ("_ServiceDeliveryLocationRoleType".equals(codeString)) + return _SERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedServiceDeliveryLocationRoleType".equals(codeString)) + return _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedClinicalLocationRoleType".equals(codeString)) + return _DEDICATEDCLINICALLOCATIONROLETYPE; + if ("DX".equals(codeString)) + return DX; + if ("CVDX".equals(codeString)) + return CVDX; + if ("CATH".equals(codeString)) + return CATH; + if ("ECHO".equals(codeString)) + return ECHO; + if ("GIDX".equals(codeString)) + return GIDX; + if ("ENDOS".equals(codeString)) + return ENDOS; + if ("RADDX".equals(codeString)) + return RADDX; + if ("RADO".equals(codeString)) + return RADO; + if ("RNEU".equals(codeString)) + return RNEU; + if ("HOSP".equals(codeString)) + return HOSP; + if ("CHR".equals(codeString)) + return CHR; + if ("GACH".equals(codeString)) + return GACH; + if ("MHSP".equals(codeString)) + return MHSP; + if ("PSYCHF".equals(codeString)) + return PSYCHF; + if ("RH".equals(codeString)) + return RH; + if ("RHAT".equals(codeString)) + return RHAT; + if ("RHII".equals(codeString)) + return RHII; + if ("RHMAD".equals(codeString)) + return RHMAD; + if ("RHPI".equals(codeString)) + return RHPI; + if ("RHPIH".equals(codeString)) + return RHPIH; + if ("RHPIMS".equals(codeString)) + return RHPIMS; + if ("RHPIVS".equals(codeString)) + return RHPIVS; + if ("RHYAD".equals(codeString)) + return RHYAD; + if ("HU".equals(codeString)) + return HU; + if ("BMTU".equals(codeString)) + return BMTU; + if ("CCU".equals(codeString)) + return CCU; + if ("CHEST".equals(codeString)) + return CHEST; + if ("EPIL".equals(codeString)) + return EPIL; + if ("ER".equals(codeString)) + return ER; + if ("ETU".equals(codeString)) + return ETU; + if ("HD".equals(codeString)) + return HD; + if ("HLAB".equals(codeString)) + return HLAB; + if ("INLAB".equals(codeString)) + return INLAB; + if ("OUTLAB".equals(codeString)) + return OUTLAB; + if ("HRAD".equals(codeString)) + return HRAD; + if ("HUSCS".equals(codeString)) + return HUSCS; + if ("ICU".equals(codeString)) + return ICU; + if ("PEDICU".equals(codeString)) + return PEDICU; + if ("PEDNICU".equals(codeString)) + return PEDNICU; + if ("INPHARM".equals(codeString)) + return INPHARM; + if ("MBL".equals(codeString)) + return MBL; + if ("NCCS".equals(codeString)) + return NCCS; + if ("NS".equals(codeString)) + return NS; + if ("OUTPHARM".equals(codeString)) + return OUTPHARM; + if ("PEDU".equals(codeString)) + return PEDU; + if ("PHU".equals(codeString)) + return PHU; + if ("RHU".equals(codeString)) + return RHU; + if ("SLEEP".equals(codeString)) + return SLEEP; + if ("NCCF".equals(codeString)) + return NCCF; + if ("SNF".equals(codeString)) + return SNF; + if ("OF".equals(codeString)) + return OF; + if ("ALL".equals(codeString)) + return ALL; + if ("AMPUT".equals(codeString)) + return AMPUT; + if ("BMTC".equals(codeString)) + return BMTC; + if ("BREAST".equals(codeString)) + return BREAST; + if ("CANC".equals(codeString)) + return CANC; + if ("CAPC".equals(codeString)) + return CAPC; + if ("CARD".equals(codeString)) + return CARD; + if ("PEDCARD".equals(codeString)) + return PEDCARD; + if ("COAG".equals(codeString)) + return COAG; + if ("CRS".equals(codeString)) + return CRS; + if ("DERM".equals(codeString)) + return DERM; + if ("ENDO".equals(codeString)) + return ENDO; + if ("PEDE".equals(codeString)) + return PEDE; + if ("ENT".equals(codeString)) + return ENT; + if ("FMC".equals(codeString)) + return FMC; + if ("GI".equals(codeString)) + return GI; + if ("PEDGI".equals(codeString)) + return PEDGI; + if ("GIM".equals(codeString)) + return GIM; + if ("GYN".equals(codeString)) + return GYN; + if ("HEM".equals(codeString)) + return HEM; + if ("PEDHEM".equals(codeString)) + return PEDHEM; + if ("HTN".equals(codeString)) + return HTN; + if ("IEC".equals(codeString)) + return IEC; + if ("INFD".equals(codeString)) + return INFD; + if ("PEDID".equals(codeString)) + return PEDID; + if ("INV".equals(codeString)) + return INV; + if ("LYMPH".equals(codeString)) + return LYMPH; + if ("MGEN".equals(codeString)) + return MGEN; + if ("NEPH".equals(codeString)) + return NEPH; + if ("PEDNEPH".equals(codeString)) + return PEDNEPH; + if ("NEUR".equals(codeString)) + return NEUR; + if ("OB".equals(codeString)) + return OB; + if ("OMS".equals(codeString)) + return OMS; + if ("ONCL".equals(codeString)) + return ONCL; + if ("PEDHO".equals(codeString)) + return PEDHO; + if ("OPH".equals(codeString)) + return OPH; + if ("OPTC".equals(codeString)) + return OPTC; + if ("ORTHO".equals(codeString)) + return ORTHO; + if ("HAND".equals(codeString)) + return HAND; + if ("PAINCL".equals(codeString)) + return PAINCL; + if ("PC".equals(codeString)) + return PC; + if ("PEDC".equals(codeString)) + return PEDC; + if ("PEDRHEUM".equals(codeString)) + return PEDRHEUM; + if ("POD".equals(codeString)) + return POD; + if ("PREV".equals(codeString)) + return PREV; + if ("PROCTO".equals(codeString)) + return PROCTO; + if ("PROFF".equals(codeString)) + return PROFF; + if ("PROS".equals(codeString)) + return PROS; + if ("PSI".equals(codeString)) + return PSI; + if ("PSY".equals(codeString)) + return PSY; + if ("RHEUM".equals(codeString)) + return RHEUM; + if ("SPMED".equals(codeString)) + return SPMED; + if ("SU".equals(codeString)) + return SU; + if ("PLS".equals(codeString)) + return PLS; + if ("URO".equals(codeString)) + return URO; + if ("TR".equals(codeString)) + return TR; + if ("TRAVEL".equals(codeString)) + return TRAVEL; + if ("WND".equals(codeString)) + return WND; + if ("RTF".equals(codeString)) + return RTF; + if ("PRC".equals(codeString)) + return PRC; + if ("SURF".equals(codeString)) + return SURF; + if ("_DedicatedNonClinicalLocationRoleType".equals(codeString)) + return _DEDICATEDNONCLINICALLOCATIONROLETYPE; + if ("DADDR".equals(codeString)) + return DADDR; + if ("MOBL".equals(codeString)) + return MOBL; + if ("AMB".equals(codeString)) + return AMB; + if ("PHARM".equals(codeString)) + return PHARM; + if ("_IncidentalServiceDeliveryLocationRoleType".equals(codeString)) + return _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE; + if ("ACC".equals(codeString)) + return ACC; + if ("COMM".equals(codeString)) + return COMM; + if ("CSC".equals(codeString)) + return CSC; + if ("PTRES".equals(codeString)) + return PTRES; + if ("SCHOOL".equals(codeString)) + return SCHOOL; + if ("UPC".equals(codeString)) + return UPC; + if ("WORK".equals(codeString)) + return WORK; + if ("_SpecimenRoleType".equals(codeString)) + return _SPECIMENROLETYPE; + if ("C".equals(codeString)) + return C; + if ("G".equals(codeString)) + return G; + if ("L".equals(codeString)) + return L; + if ("P".equals(codeString)) + return P; + if ("Q".equals(codeString)) + return Q; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("O".equals(codeString)) + return O; + if ("V".equals(codeString)) + return V; + if ("R".equals(codeString)) + return R; + if ("CLAIM".equals(codeString)) + return CLAIM; + if ("communityLaboratory".equals(codeString)) + return COMMUNITYLABORATORY; + if ("GT".equals(codeString)) + return GT; + if ("homeHealth".equals(codeString)) + return HOMEHEALTH; + if ("laboratory".equals(codeString)) + return LABORATORY; + if ("pathologist".equals(codeString)) + return PATHOLOGIST; + if ("PH".equals(codeString)) + return PH; + if ("phlebotomist".equals(codeString)) + return PHLEBOTOMIST; + if ("PROG".equals(codeString)) + return PROG; + if ("PT".equals(codeString)) + return PT; + if ("subject".equals(codeString)) + return SUBJECT; + if ("thirdParty".equals(codeString)) + return THIRDPARTY; + if ("DEP".equals(codeString)) + return DEP; + if ("DEPEN".equals(codeString)) + return DEPEN; + if ("FM".equals(codeString)) + return FM; + if ("INDIV".equals(codeString)) + return INDIV; + if ("NAMED".equals(codeString)) + return NAMED; + if ("PSYCHCF".equals(codeString)) + return PSYCHCF; + if ("SUBSCR".equals(codeString)) + return SUBSCR; + throw new FHIRException("Unknown V3RoleCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _AFFILIATIONROLETYPE: return "_AffiliationRoleType"; + case _COVERAGESPONSORROLETYPE: return "_CoverageSponsorRoleType"; + case FULLINS: return "FULLINS"; + case SELFINS: return "SELFINS"; + case _PAYORROLETYPE: return "_PayorRoleType"; + case ENROLBKR: return "ENROLBKR"; + case TPA: return "TPA"; + case UMO: return "UMO"; + case RESPRSN: return "RESPRSN"; + case EXCEST: return "EXCEST"; + case GUADLTM: return "GUADLTM"; + case GUARD: return "GUARD"; + case POWATT: return "POWATT"; + case DPOWATT: return "DPOWATT"; + case HPOWATT: return "HPOWATT"; + case SPOWATT: return "SPOWATT"; + case _ASSIGNEDROLETYPE: return "_AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "_AssignedNonPersonLivingSubjectRoleType"; + case ASSIST: return "ASSIST"; + case BIOTH: return "BIOTH"; + case ANTIBIOT: return "ANTIBIOT"; + case DEBR: return "DEBR"; + case CCO: return "CCO"; + case SEE: return "SEE"; + case SNIFF: return "SNIFF"; + case _CERTIFIEDENTITYTYPE: return "_CertifiedEntityType"; + case _CITIZENROLETYPE: return "_CitizenRoleType"; + case CAS: return "CAS"; + case CASM: return "CASM"; + case CN: return "CN"; + case CNRP: return "CNRP"; + case CNRPM: return "CNRPM"; + case CPCA: return "CPCA"; + case CRP: return "CRP"; + case CRPM: return "CRPM"; + case _CONTACTROLETYPE: return "_ContactRoleType"; + case _ADMINISTRATIVECONTACTROLETYPE: return "_AdministrativeContactRoleType"; + case BILL: return "BILL"; + case ORG: return "ORG"; + case PAYOR: return "PAYOR"; + case ECON: return "ECON"; + case NOK: return "NOK"; + case _IDENTIFIEDENTITYTYPE: return "_IdentifiedEntityType"; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "_LocationIdentifiedEntityRoleCode"; + case ACHFID: return "ACHFID"; + case JURID: return "JURID"; + case LOCHFID: return "LOCHFID"; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "_LivingSubjectProductionClass"; + case BF: return "BF"; + case BL: return "BL"; + case BR: return "BR"; + case CO: return "CO"; + case DA: return "DA"; + case DR: return "DR"; + case DU: return "DU"; + case FI: return "FI"; + case LY: return "LY"; + case MT: return "MT"; + case MU: return "MU"; + case PL: return "PL"; + case RC: return "RC"; + case SH: return "SH"; + case VL: return "VL"; + case WL: return "WL"; + case WO: return "WO"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "_MedicationGeneralizationRoleType"; + case DC: return "DC"; + case GD: return "GD"; + case GDF: return "GDF"; + case GDS: return "GDS"; + case GDSF: return "GDSF"; + case MGDSF: return "MGDSF"; + case _MEMBERROLETYPE: return "_MemberRoleType"; + case TRB: return "TRB"; + case _PERSONALRELATIONSHIPROLETYPE: return "_PersonalRelationshipRoleType"; + case FAMMEMB: return "FAMMEMB"; + case CHILD: return "CHILD"; + case CHLDADOPT: return "CHLDADOPT"; + case DAUADOPT: return "DAUADOPT"; + case SONADOPT: return "SONADOPT"; + case CHLDFOST: return "CHLDFOST"; + case DAUFOST: return "DAUFOST"; + case SONFOST: return "SONFOST"; + case DAUC: return "DAUC"; + case DAU: return "DAU"; + case STPDAU: return "STPDAU"; + case NCHILD: return "NCHILD"; + case SON: return "SON"; + case SONC: return "SONC"; + case STPSON: return "STPSON"; + case STPCHLD: return "STPCHLD"; + case EXT: return "EXT"; + case AUNT: return "AUNT"; + case MAUNT: return "MAUNT"; + case PAUNT: return "PAUNT"; + case COUSN: return "COUSN"; + case MCOUSN: return "MCOUSN"; + case PCOUSN: return "PCOUSN"; + case GGRPRN: return "GGRPRN"; + case GGRFTH: return "GGRFTH"; + case MGGRFTH: return "MGGRFTH"; + case PGGRFTH: return "PGGRFTH"; + case GGRMTH: return "GGRMTH"; + case MGGRMTH: return "MGGRMTH"; + case PGGRMTH: return "PGGRMTH"; + case MGGRPRN: return "MGGRPRN"; + case PGGRPRN: return "PGGRPRN"; + case GRNDCHILD: return "GRNDCHILD"; + case GRNDDAU: return "GRNDDAU"; + case GRNDSON: return "GRNDSON"; + case GRPRN: return "GRPRN"; + case GRFTH: return "GRFTH"; + case MGRFTH: return "MGRFTH"; + case PGRFTH: return "PGRFTH"; + case GRMTH: return "GRMTH"; + case MGRMTH: return "MGRMTH"; + case PGRMTH: return "PGRMTH"; + case MGRPRN: return "MGRPRN"; + case PGRPRN: return "PGRPRN"; + case INLAW: return "INLAW"; + case CHLDINLAW: return "CHLDINLAW"; + case DAUINLAW: return "DAUINLAW"; + case SONINLAW: return "SONINLAW"; + case PRNINLAW: return "PRNINLAW"; + case FTHINLAW: return "FTHINLAW"; + case MTHINLAW: return "MTHINLAW"; + case SIBINLAW: return "SIBINLAW"; + case BROINLAW: return "BROINLAW"; + case SISINLAW: return "SISINLAW"; + case NIENEPH: return "NIENEPH"; + case NEPHEW: return "NEPHEW"; + case NIECE: return "NIECE"; + case UNCLE: return "UNCLE"; + case MUNCLE: return "MUNCLE"; + case PUNCLE: return "PUNCLE"; + case PRN: return "PRN"; + case ADOPTP: return "ADOPTP"; + case ADOPTF: return "ADOPTF"; + case ADOPTM: return "ADOPTM"; + case FTH: return "FTH"; + case FTHFOST: return "FTHFOST"; + case NFTH: return "NFTH"; + case NFTHF: return "NFTHF"; + case STPFTH: return "STPFTH"; + case MTH: return "MTH"; + case GESTM: return "GESTM"; + case MTHFOST: return "MTHFOST"; + case NMTH: return "NMTH"; + case NMTHF: return "NMTHF"; + case STPMTH: return "STPMTH"; + case NPRN: return "NPRN"; + case PRNFOST: return "PRNFOST"; + case STPPRN: return "STPPRN"; + case SIB: return "SIB"; + case BRO: return "BRO"; + case HBRO: return "HBRO"; + case NBRO: return "NBRO"; + case TWINBRO: return "TWINBRO"; + case FTWINBRO: return "FTWINBRO"; + case ITWINBRO: return "ITWINBRO"; + case STPBRO: return "STPBRO"; + case HSIB: return "HSIB"; + case HSIS: return "HSIS"; + case NSIB: return "NSIB"; + case NSIS: return "NSIS"; + case TWINSIS: return "TWINSIS"; + case FTWINSIS: return "FTWINSIS"; + case ITWINSIS: return "ITWINSIS"; + case TWIN: return "TWIN"; + case FTWIN: return "FTWIN"; + case ITWIN: return "ITWIN"; + case SIS: return "SIS"; + case STPSIS: return "STPSIS"; + case STPSIB: return "STPSIB"; + case SIGOTHR: return "SIGOTHR"; + case DOMPART: return "DOMPART"; + case FMRSPS: return "FMRSPS"; + case SPS: return "SPS"; + case HUSB: return "HUSB"; + case WIFE: return "WIFE"; + case FRND: return "FRND"; + case NBOR: return "NBOR"; + case ONESELF: return "ONESELF"; + case ROOM: return "ROOM"; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "_PolicyOrProgramCoverageRoleType"; + case _COVERAGEROLETYPE: return "_CoverageRoleType"; + case FAMDEP: return "FAMDEP"; + case HANDIC: return "HANDIC"; + case INJ: return "INJ"; + case SELF: return "SELF"; + case SPON: return "SPON"; + case STUD: return "STUD"; + case FSTUD: return "FSTUD"; + case PSTUD: return "PSTUD"; + case ADOPT: return "ADOPT"; + case GCHILD: return "GCHILD"; + case GPARNT: return "GPARNT"; + case NAT: return "NAT"; + case NIENE: return "NIENE"; + case PARNT: return "PARNT"; + case SPSE: return "SPSE"; + case STEP: return "STEP"; + case _COVEREDPARTYROLETYPE: return "_CoveredPartyRoleType"; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "_ClaimantCoveredPartyRoleType"; + case CRIMEVIC: return "CRIMEVIC"; + case INJWKR: return "INJWKR"; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "_DependentCoveredPartyRoleType"; + case COCBEN: return "COCBEN"; + case DIFFABL: return "DIFFABL"; + case WARD: return "WARD"; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "_IndividualInsuredPartyRoleType"; + case RETIREE: return "RETIREE"; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "_ProgramEligiblePartyRoleType"; + case INDIG: return "INDIG"; + case MIL: return "MIL"; + case ACTMIL: return "ACTMIL"; + case RETMIL: return "RETMIL"; + case VET: return "VET"; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "_SubscriberCoveredPartyRoleType"; + case _RESEARCHSUBJECTROLEBASIS: return "_ResearchSubjectRoleBasis"; + case ERL: return "ERL"; + case SCN: return "SCN"; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "_ServiceDeliveryLocationRoleType"; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "_DedicatedServiceDeliveryLocationRoleType"; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "_DedicatedClinicalLocationRoleType"; + case DX: return "DX"; + case CVDX: return "CVDX"; + case CATH: return "CATH"; + case ECHO: return "ECHO"; + case GIDX: return "GIDX"; + case ENDOS: return "ENDOS"; + case RADDX: return "RADDX"; + case RADO: return "RADO"; + case RNEU: return "RNEU"; + case HOSP: return "HOSP"; + case CHR: return "CHR"; + case GACH: return "GACH"; + case MHSP: return "MHSP"; + case PSYCHF: return "PSYCHF"; + case RH: return "RH"; + case RHAT: return "RHAT"; + case RHII: return "RHII"; + case RHMAD: return "RHMAD"; + case RHPI: return "RHPI"; + case RHPIH: return "RHPIH"; + case RHPIMS: return "RHPIMS"; + case RHPIVS: return "RHPIVS"; + case RHYAD: return "RHYAD"; + case HU: return "HU"; + case BMTU: return "BMTU"; + case CCU: return "CCU"; + case CHEST: return "CHEST"; + case EPIL: return "EPIL"; + case ER: return "ER"; + case ETU: return "ETU"; + case HD: return "HD"; + case HLAB: return "HLAB"; + case INLAB: return "INLAB"; + case OUTLAB: return "OUTLAB"; + case HRAD: return "HRAD"; + case HUSCS: return "HUSCS"; + case ICU: return "ICU"; + case PEDICU: return "PEDICU"; + case PEDNICU: return "PEDNICU"; + case INPHARM: return "INPHARM"; + case MBL: return "MBL"; + case NCCS: return "NCCS"; + case NS: return "NS"; + case OUTPHARM: return "OUTPHARM"; + case PEDU: return "PEDU"; + case PHU: return "PHU"; + case RHU: return "RHU"; + case SLEEP: return "SLEEP"; + case NCCF: return "NCCF"; + case SNF: return "SNF"; + case OF: return "OF"; + case ALL: return "ALL"; + case AMPUT: return "AMPUT"; + case BMTC: return "BMTC"; + case BREAST: return "BREAST"; + case CANC: return "CANC"; + case CAPC: return "CAPC"; + case CARD: return "CARD"; + case PEDCARD: return "PEDCARD"; + case COAG: return "COAG"; + case CRS: return "CRS"; + case DERM: return "DERM"; + case ENDO: return "ENDO"; + case PEDE: return "PEDE"; + case ENT: return "ENT"; + case FMC: return "FMC"; + case GI: return "GI"; + case PEDGI: return "PEDGI"; + case GIM: return "GIM"; + case GYN: return "GYN"; + case HEM: return "HEM"; + case PEDHEM: return "PEDHEM"; + case HTN: return "HTN"; + case IEC: return "IEC"; + case INFD: return "INFD"; + case PEDID: return "PEDID"; + case INV: return "INV"; + case LYMPH: return "LYMPH"; + case MGEN: return "MGEN"; + case NEPH: return "NEPH"; + case PEDNEPH: return "PEDNEPH"; + case NEUR: return "NEUR"; + case OB: return "OB"; + case OMS: return "OMS"; + case ONCL: return "ONCL"; + case PEDHO: return "PEDHO"; + case OPH: return "OPH"; + case OPTC: return "OPTC"; + case ORTHO: return "ORTHO"; + case HAND: return "HAND"; + case PAINCL: return "PAINCL"; + case PC: return "PC"; + case PEDC: return "PEDC"; + case PEDRHEUM: return "PEDRHEUM"; + case POD: return "POD"; + case PREV: return "PREV"; + case PROCTO: return "PROCTO"; + case PROFF: return "PROFF"; + case PROS: return "PROS"; + case PSI: return "PSI"; + case PSY: return "PSY"; + case RHEUM: return "RHEUM"; + case SPMED: return "SPMED"; + case SU: return "SU"; + case PLS: return "PLS"; + case URO: return "URO"; + case TR: return "TR"; + case TRAVEL: return "TRAVEL"; + case WND: return "WND"; + case RTF: return "RTF"; + case PRC: return "PRC"; + case SURF: return "SURF"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "_DedicatedNonClinicalLocationRoleType"; + case DADDR: return "DADDR"; + case MOBL: return "MOBL"; + case AMB: return "AMB"; + case PHARM: return "PHARM"; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "_IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "ACC"; + case COMM: return "COMM"; + case CSC: return "CSC"; + case PTRES: return "PTRES"; + case SCHOOL: return "SCHOOL"; + case UPC: return "UPC"; + case WORK: return "WORK"; + case _SPECIMENROLETYPE: return "_SpecimenRoleType"; + case C: return "C"; + case G: return "G"; + case L: return "L"; + case P: return "P"; + case Q: return "Q"; + case B: return "B"; + case E: return "E"; + case F: return "F"; + case O: return "O"; + case V: return "V"; + case R: return "R"; + case CLAIM: return "CLAIM"; + case COMMUNITYLABORATORY: return "communityLaboratory"; + case GT: return "GT"; + case HOMEHEALTH: return "homeHealth"; + case LABORATORY: return "laboratory"; + case PATHOLOGIST: return "pathologist"; + case PH: return "PH"; + case PHLEBOTOMIST: return "phlebotomist"; + case PROG: return "PROG"; + case PT: return "PT"; + case SUBJECT: return "subject"; + case THIRDPARTY: return "thirdParty"; + case DEP: return "DEP"; + case DEPEN: return "DEPEN"; + case FM: return "FM"; + case INDIV: return "INDIV"; + case NAMED: return "NAMED"; + case PSYCHCF: return "PSYCHCF"; + case SUBSCR: return "SUBSCR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleCode"; + } + public String getDefinition() { + switch (this) { + case _AFFILIATIONROLETYPE: return "Concepts characterizing the type of association formed by player and scoper when there is a recognized Affiliate role by which the two parties are related.\r\n\n \n Examples: Business Partner, Business Associate, Colleague"; + case _COVERAGESPONSORROLETYPE: return "Description:Codes that indicate a specific type of sponsor. Used when the sponsor's role is only either as a fully insured sponsor or only as a self-insured sponsor. NOTE: Where a sponsor may be either, use the SponsorParticipationFunction.code (fully insured or self insured) to indicate the type of responsibility. (CO6-0057)"; + case FULLINS: return "Description:An employer or organization that contracts with an underwriter to assumes the financial risk and administrative responsibility for coverage of health services for covered parties."; + case SELFINS: return "Description:An employer or organization that assumes the financial risk and administrative responsibility for coverage of health services for covered parties."; + case _PAYORROLETYPE: return "Description:PayorRoleType for a particular type of policy or program benefit package or plan where more detail about the coverage administration role of the Payor is required. The functions performed by a Payor qualified by a PayorRoleType may be specified by the PayorParticpationFunction value set.\r\n\n \n Examples:A Payor that is a TPA may administer a managed care plan without underwriting the risk."; + case ENROLBKR: return "Description:A payor that is responsible for functions related to the enrollment of covered parties."; + case TPA: return "Description:Third party administrator (TPA) is a payor organization that processes health care claims without carrying insurance risk. Third party administrators are prominent players in the managed care industry and have the expertise and capability to administer all or a portion of the claims process. They are normally contracted by a health insurer or self-insuring companies to administer services, including claims administration, premium collection, enrollment and other administrative activities.\r\n\n Self-insured employers often contract with third party administrator to handle their insurance functions. Insurance companies oftentimes outsource the claims, utilization review or membership functions to a TPA. Sometimes TPAs only manage provider networks, only claims or only utilization review.\r\n\n While some third-party administrators may operate as units of insurance companies, they are often independent. However, hospitals or provider organizations desiring to set up their own health plans will often outsource certain responsibilities to TPAs. TPAs may perform one or several payor functions, specified by the PayorParticipationFunction value set, such as provider management, enrollment, utilization management, and fee for service claims adjudication management."; + case UMO: return "Description:A payor that is responsible for review and case management of health services covered under a policy or program."; + case RESPRSN: return "The role played by a party who has legal responsibility for another party."; + case EXCEST: return "The role played by a person acting as the estate executor for a deceased subscriber or policyholder who was the responsible party"; + case GUADLTM: return "The role played by a person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings."; + case GUARD: return "The role played by a person or institution legally empowered with responsibility for the care of a ward."; + case POWATT: return "A relationship between two people in which one person authorizes another to act for him in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts."; + case DPOWATT: return "A relationship between two people in which one person authorizes another, usually a family member or relative, to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency."; + case HPOWATT: return "A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that continues (by its terms) to be effective even though the grantor has become mentally incompetent after signing the document."; + case SPOWATT: return "A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned."; + case _ASSIGNEDROLETYPE: return "AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "Description:A role type that is used to further qualify a non-person subject playing a role where the role class attribute is set to RoleClass AssignedEntity"; + case ASSIST: return "Description:Dogs trained to assist the ill or physically challenged."; + case BIOTH: return "Description:Animals, including fish and insects, and microorganisms which may participate as assigned entities in biotherapies."; + case ANTIBIOT: return "Description:Non-person living subject used as antibiotic.\r\n\n \n Examples:Bacteriophage, is a virus that infects bacteria."; + case DEBR: return "Description:Maggots raised for biodebridement.\r\n\n \n Discussion: Maggot Debridement Therapy is the medical use of live maggots for cleaning non-healing wounds.\r\n\n \n Examples:Removal of burnt skin."; + case CCO: return "Description:Companion animals, such as dogs, cats, and rabbits, which may be provided to patients to improve general mood, decrease depression and loneliness, and distract from stress-inducing concerns to improve quality of life."; + case SEE: return "Description:Dogs trained to assist persons who are seeing impaired or blind."; + case SNIFF: return "Description:Dogs trained or having the ability to detect imminent seizures or cancers in humans, probably as a result of volatile chemical (odors) given off by the malignancy of the host."; + case _CERTIFIEDENTITYTYPE: return "Defines types of certifications for all entities"; + case _CITIZENROLETYPE: return "A role type used to qualify a person's legal status within a country or nation."; + case CAS: return "A person who has fled his or her home country to find a safe place elsewhere."; + case CASM: return "A person who is someone of below legal age who has fled his or her home country, without his or her parents, to find a safe place elsewhere at time of categorization."; + case CN: return "A person who is legally recognized as a member of a nation or country, with associated rights and obligations."; + case CNRP: return "A foreigner who is present in a country (which is foreign to him/her) unlawfully or without the country's authorization (may be called an illegal alien)."; + case CNRPM: return "A person who is below legal age present in a country, without his or her parents, (which is foreign to him/her) unlawfully or without the country's authorization."; + case CPCA: return "A non-country member admitted to the territory of a nation or country as a non-resident for an explicit purpose."; + case CRP: return "A foreigner who is a resident of the country but does not have citizenship."; + case CRPM: return "A person who is a resident below legal age of the country without his or her parents and does not have citizenship."; + case _CONTACTROLETYPE: return "Types of contact for Role code \"CON\""; + case _ADMINISTRATIVECONTACTROLETYPE: return "A contact role used for business and/or administrative purposes."; + case BILL: return "A contact role used to identify a person within a Provider organization that can be contacted for billing purposes (e.g. about the content of the Invoice)."; + case ORG: return "A contact for an organization for administrative purposes. Contact role specifies a person acting as a liason for the organization.\r\n\n Example: HR Department representative."; + case PAYOR: return "A contact role used to identify a person within a Payor organization to whom this communication is addressed."; + case ECON: return "A contact designated for contact in emergent situations."; + case NOK: return "Played by an individual who is designated as the next of kin for another individual which scopes the role."; + case _IDENTIFIEDENTITYTYPE: return "Definition: A code representing the type of identifier that has been assigned to the identified entity (IDENT).\r\n\n \n Examples: Example values include Social Insurance Number, Product Catalog ID, Product Model Number."; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "Description:Describes types of identifiers other than the primary location registry identifier for a service delivery location. Identifiers may be assigned by a local service delivery organization, a formal body capable of accrediting the location for the capability to provide specific services or the identifier may be assigned at a jurisdictional level."; + case ACHFID: return "Description:Identifier assigned to a location by the organization responsible for accrediting the location."; + case JURID: return "Description:Identifier assigned to a location by a jurisdiction."; + case LOCHFID: return "Description:Identifier assigned to a location by a local party (which could be the facility itself or organization overseeing a group of facilities)."; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "Code indicating the primary use for which a living subject is bred or grown"; + case BF: return "Cattle used for meat production"; + case BL: return "Chickens raised for meat"; + case BR: return "Breeding/genetic stock"; + case CO: return "Companion animals"; + case DA: return "Milk production"; + case DR: return "Draft animals"; + case DU: return "Dual purpose. Defined purposes based on species and breed"; + case FI: return "Animals raised for their fur, hair or skins"; + case LY: return "Chickens raised for egg production"; + case MT: return "Animals raised for meat production"; + case MU: return "Poultry flocks used for chick/poult production"; + case PL: return "Animals rasied for recreation"; + case RC: return "Animals raised for racing perfomance"; + case SH: return "Animals raised for shows"; + case VL: return "Cattle raised for veal meat production. Implicit is the husbandry method."; + case WL: return "Sheep, goats and other mammals raised for their fiber"; + case WO: return "Animals used to perform work"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "Identifies the specific hierarchical relationship between the playing and scoping medications. \r\n\n \n Examples: Generic, Generic Formulation, Therapeutic Class, etc."; + case DC: return "Description:A categorization of medicinal products by their therapeutic properties and/or main therapeutic use."; + case GD: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients independent of strength, and form.\r\n\n The scoping entity identifies a unique combination of medicine ingredients; sometimes referred to as \"ingredient set\"."; + case GDF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients and dose form, independent of strength of the ingredients. The scoping entity identifies a unique combination of medicine ingredients in a specific dose form."; + case GDS: return "Relates a manufactured drug product to the non-proprietary (generic) representation of is ingredients with their strength. The scoping entity identifies a unique combination of medicine ingredients with their strength."; + case GDSF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form."; + case MGDSF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form."; + case _MEMBERROLETYPE: return "Types of membership for Role code \"MBR\""; + case TRB: return "A person who is a member of a tribe."; + case _PERSONALRELATIONSHIPROLETYPE: return "PersonalRelationshipRoleType"; + case FAMMEMB: return "A relationship between two people characterizing their \"familial\" relationship"; + case CHILD: return "The player of the role is a child of the scoping entity."; + case CHLDADOPT: return "The player of the role is a child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case DAUADOPT: return "The player of the role is a female child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case SONADOPT: return "The player of the role is a male child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case CHLDFOST: return "The player of the role is a child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case DAUFOST: return "The player of the role is a female child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case SONFOST: return "The player of the role is a male child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case DAUC: return "Description: The player of the role is a female child (of any type) of scoping entity (parent)"; + case DAU: return "The player of the role is a female offspring of the scoping entity (parent)."; + case STPDAU: return "The player of the role is a daughter of the scoping person's spouse by a previous union."; + case NCHILD: return "The player of the role is an offspring of the scoping entity as determined by birth."; + case SON: return "The player of the role is a male offspring of the scoping entity (parent)."; + case SONC: return "Description: The player of the role is a male child (of any type) of scoping entity (parent)"; + case STPSON: return "The player of the role is a son of the scoping person's spouse by a previous union."; + case STPCHLD: return "The player of the role is a child of the scoping person's spouse by a previous union."; + case EXT: return "Description: A family member not having an immediate genetic or legal relationship e.g. Aunt, cousin, great grandparent, grandchild, grandparent, niece, nephew or uncle."; + case AUNT: return "The player of the role is a sister of the scoping person's mother or father."; + case MAUNT: return "Description:The player of the role is a biological sister of the scoping person's biological mother."; + case PAUNT: return "Description:The player of the role is a biological sister of the scoping person's biological father."; + case COUSN: return "The player of the role is a relative of the scoping person descended from a common ancestor, such as a grandparent, by two or more steps in a diverging line."; + case MCOUSN: return "Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's mother's side, such as a grandparent, by two or more steps in a diverging line."; + case PCOUSN: return "Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's father's side, such as a grandparent, by two or more steps in a diverging line."; + case GGRPRN: return "The player of the role is a parent of the scoping person's grandparent."; + case GGRFTH: return "The player of the role is the father of the scoping person's grandparent."; + case MGGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological mother's parent."; + case PGGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological father's parent."; + case GGRMTH: return "The player of the role is the mother of the scoping person's grandparent."; + case MGGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological mother's parent."; + case PGGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological father's parent."; + case MGGRPRN: return "Description:The player of the role is a biological parent of the scoping person's biological mother's parent."; + case PGGRPRN: return "Description:The player of the role is a biological parent of the scoping person's biological father's parent."; + case GRNDCHILD: return "The player of the role is a child of the scoping person's son or daughter."; + case GRNDDAU: return "The player of the role is a daughter of the scoping person's son or daughter."; + case GRNDSON: return "The player of the role is a son of the scoping person's son or daughter."; + case GRPRN: return "The player of the role is a parent of the scoping person's mother or father."; + case GRFTH: return "The player of the role is the father of the scoping person's mother or father."; + case MGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological mother."; + case PGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological father."; + case GRMTH: return "The player of the role is the mother of the scoping person's mother or father."; + case MGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological mother."; + case PGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological father."; + case MGRPRN: return "Description:The player of the role is the biological parent of the scoping person's biological mother."; + case PGRPRN: return "Description:The player of the role is the biological parent of the scoping person's biological father."; + case INLAW: return "A relationship between an individual and a member of their spousal partner's immediate family."; + case CHLDINLAW: return "The player of the role is the spouse of scoping person's child."; + case DAUINLAW: return "The player of the role is the wife of scoping person's son."; + case SONINLAW: return "The player of the role is the husband of scoping person's daughter."; + case PRNINLAW: return "The player of the role is the parent of scoping person's husband or wife."; + case FTHINLAW: return "The player of the role is the father of the scoping person's husband or wife."; + case MTHINLAW: return "The player of the role is the mother of the scoping person's husband or wife."; + case SIBINLAW: return "The player of the role is: (1) a sibling of the scoping person's spouse, or (2) the spouse of the scoping person's sibling, or (3) the spouse of a sibling of the scoping person's spouse."; + case BROINLAW: return "The player of the role is: (1) a brother of the scoping person's spouse, or (2) the husband of the scoping person's sister, or (3) the husband of a sister of the scoping person's spouse."; + case SISINLAW: return "The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse."; + case NIENEPH: return "The player of the role is a child of scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case NEPHEW: return "The player of the role is a son of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case NIECE: return "The player of the role is a daughter of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case UNCLE: return "The player of the role is a brother of the scoping person's mother or father."; + case MUNCLE: return "Description:The player of the role is a biological brother of the scoping person's biological mother."; + case PUNCLE: return "Description:The player of the role is a biological brother of the scoping person's biological father."; + case PRN: return "The player of the role is one who begets, gives birth to, or nurtures and raises the scoping entity (child)."; + case ADOPTP: return "The player of the role (parent) has taken the scoper (child) into their family through legal means and raises them as his or her own child."; + case ADOPTF: return "The player of the role (father) is a male who has taken the scoper (child) into their family through legal means and raises them as his own child."; + case ADOPTM: return "The player of the role (father) is a female who has taken the scoper (child) into their family through legal means and raises them as her own child."; + case FTH: return "The player of the role is a male who begets or raises or nurtures the scoping entity (child)."; + case FTHFOST: return "The player of the role (parent) who is a male state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case NFTH: return "The player of the role is a male who begets the scoping entity (child)."; + case NFTHF: return "Indicates the biologic male parent of a fetus."; + case STPFTH: return "The player of the role is the husband of scoping person's mother and not the scoping person's natural father."; + case MTH: return "The player of the role is a female who conceives, gives birth to, or raises and nurtures the scoping entity (child)."; + case GESTM: return "The player is a female whose womb carries the fetus of the scoper. Generally used when the gestational mother and natural mother are not the same."; + case MTHFOST: return "The player of the role (parent) who is a female state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case NMTH: return "The player of the role is a female who conceives or gives birth to the scoping entity (child)."; + case NMTHF: return "The player is the biologic female parent of the scoping fetus."; + case STPMTH: return "The player of the role is the wife of scoping person's father and not the scoping person's natural mother."; + case NPRN: return "natural parent"; + case PRNFOST: return "The player of the role (parent) who is a state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case STPPRN: return "The player of the role is the spouse of the scoping person's parent and not the scoping person's natural parent."; + case SIB: return "The player of the role shares one or both parents in common with the scoping entity."; + case BRO: return "The player of the role is a male sharing one or both parents in common with the scoping entity."; + case HBRO: return "The player of the role is a male related to the scoping entity by sharing only one biological parent."; + case NBRO: return "The player of the role is a male having the same biological parents as the scoping entity."; + case TWINBRO: return "The scoper was carried in the same womb as the male player and shares common biological parents."; + case FTWINBRO: return "The scoper was carried in the same womb as the male player and shares common biological parents but is the product of a distinct egg/sperm pair."; + case ITWINBRO: return "The male scoper is an offspring of the same egg-sperm pair as the male player."; + case STPBRO: return "The player of the role is a son of the scoping person's stepparent."; + case HSIB: return "The player of the role is related to the scoping entity by sharing only one biological parent."; + case HSIS: return "The player of the role is a female related to the scoping entity by sharing only one biological parent."; + case NSIB: return "The player of the role has both biological parents in common with the scoping entity."; + case NSIS: return "The player of the role is a female having the same biological parents as the scoping entity."; + case TWINSIS: return "The scoper was carried in the same womb as the female player and shares common biological parents."; + case FTWINSIS: return "The scoper was carried in the same womb as the female player and shares common biological parents but is the product of a distinct egg/sperm pair."; + case ITWINSIS: return "The female scoper is an offspring of the same egg-sperm pair as the female player."; + case TWIN: return "The scoper and player were carried in the same womb and shared common biological parents."; + case FTWIN: return "The scoper and player were carried in the same womb and share common biological parents but are the product of distinct egg/sperm pairs."; + case ITWIN: return "The scoper and player are offspring of the same egg-sperm pair."; + case SIS: return "The player of the role is a female sharing one or both parents in common with the scoping entity."; + case STPSIS: return "The player of the role is a daughter of the scoping person's stepparent."; + case STPSIB: return "The player of the role is a child of the scoping person's stepparent."; + case SIGOTHR: return "A person who is important to one's well being; especially a spouse or one in a similar relationship. (The player is the one who is important)"; + case DOMPART: return "The player of the role cohabits with the scoping person but is not the scoping person's spouse."; + case FMRSPS: return "Player of the role was previously joined to the scoping person in marriage and this marriage is now dissolved and inactive.\r\n\n \n Usage Note: This is significant to indicate as some jurisdictions have different legal requirements for former spouse to access the patient's record, from a general friend."; + case SPS: return "The player of the role is a marriage partner of the scoping person."; + case HUSB: return "The player of the role is a man joined to a woman (scoping person) in marriage."; + case WIFE: return "The player of the role is a woman joined to a man (scoping person) in marriage."; + case FRND: return "The player of the role is a person who is known, liked, and trusted by the scoping person."; + case NBOR: return "The player of the role lives near or next to the scoping person."; + case ONESELF: return "The relationship that a person has with his or her self."; + case ROOM: return "One who shares living quarters with the subject."; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "Description: A role recognized through the eligibility of an identified party for benefits covered under an insurance policy or a program based on meeting eligibility criteria.\r\n\n Eligibility as a covered party may be conditioned on the party meeting criteria to qualify for coverage under a policy or program, which may be mandated by law. These criteria may be: \r\n\n \n \n The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage\r\n\n \n \n May more fully qualify a covered party role e.g, being differently abled may qualify an adult child as a dependent\r\n\n \n \n May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits.\r\n\n \n \n \n Discussion: The Abstract Value Set \"CoverageRoleType\", which was developed for use in the Canadian realm \"pre-coordinate\" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., \"handicapped dependent\". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead.\r\n\n In summary, the coded concepts in the Abstract Value Set \"CoveredPartyRoleType\" can be \"post-coordinated\" with the \"RoleClassCoveredParty\" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability."; + case _COVERAGEROLETYPE: return "Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc"; + case FAMDEP: return "The player of the role is dependent of the scoping entity."; + case HANDIC: return "Covered party is a dependent of the policy holder with a physical or mental disability causing a disadvantage that makes independent achievement unusually difficult."; + case INJ: return "Covered party is an injured party with a legal claim for compensation against a policy holder under an insurance policy."; + case SELF: return "Covered party is the policy holder. Also known as the subscriber."; + case SPON: return "Covered party is an individual that the policy holder has assumed responsibility for, such as foster child or legal ward."; + case STUD: return "Covered party to an insurance policy has coverage through full-time or part-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case FSTUD: return "Covered party to an insurance policy has coverage through full-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case PSTUD: return "Covered party to an insurance policy has coverage through part-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case ADOPT: return "A child taken into one's family through legal means and raised as one's own child."; + case GCHILD: return "A child of one's son or daughter."; + case GPARNT: return "parent of a parent of the subject."; + case NAT: return "A child as determined by birth."; + case NIENE: return "A child of one's brother or sister or of the brother or sister of one's spouse."; + case PARNT: return "One that begets or brings forth offspring or a person who brings up and cares for for another (Webster's Collegiate Dictionary)"; + case SPSE: return "A marriage partner; a husband or wife."; + case STEP: return "A child receiving parental care and nurture from a person who is related to them through marriage to their parent."; + case _COVEREDPARTYROLETYPE: return "A role recognized through the eligibility of an identified living subject for benefits covered under an insurance policy or a program. Eligibility as a covered party may be conditioned on a relationship with (1) the policy holder such as the policy holder who is covered as an individual under a poliy or as a party sponsored for coverage by the policy holder.\r\n\n \n Example:An employee as a subscriber; or (2) on being scoped another covered party such as the subscriber, as in the case of a dependent. \r\n\n \n Discussion: The Abstract Value Set \"CoverageRoleType\", which was developed for use in the Canadian realm \"pre-coordinate\" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., \"handicapped dependent\". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be \"post-coordinated\" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts."; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "DescriptionA role recognized through the eligibility of a party play a claimant for benefits covered or provided under an insurance policy."; + case CRIMEVIC: return "Description: A person playing the role of program eligible under a program based on allegations of being the victim of a crime.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is \"program eligible\" and the person's status as a crime victim meets jurisdictional or program criteria."; + case INJWKR: return "Description: A person playing the role of program eligible under a workers compensation program based on the filing of work-related injury claim.\r\n\n \n Discussion: This CoveredPartyRoleType.code is used when the CoveredPartyRole class code is either \"program eligible\", a \"named insured\", and \"individual insured\", or \"dependent\", and the person's status as differently abled or \"handicapped\" meets jurisdictional, policy, or program criteria."; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "Description: A role recognized through the eligibility of a party to play a dependent for benefits covered or provided under a health insurance policy because of an association with the subscriber that is recognized by the policy underwriter."; + case COCBEN: return "Description: A person playing the role of an individual insured with continuity of coverage under a policy which is being terminated based on loss of original status that was the basis for coverage. Criteria for qualifying for continuity of coverage may be set by law.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a continuity of coverage beneficiary meets jurisdictional or policy criteria."; + case DIFFABL: return "Description: A person playing the role of program eligible under a program based on meeting criteria for health or functional limitation set by law or by the program.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\", \"named insured\", \"individual insured\", or \"dependent\", and the person's status as differently abled meets jurisdictional, policy, or program criteria."; + case WARD: return "Description: A person, who is a minor or is deemed incompetent, who plays the role of a program eligible where eligibility for coverage is based on meeting program eligibility criteria for status as a ward of a court or jurisdiction.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a \"claimant\", \"program eligible\", a \"named insured\", an \"individual Insured\" or a \"dependent\", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law."; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "A role recognized through the eligibility of a party to play an individual insured for benefits covered or provided under an insurance policy where the party is also the policy holder."; + case RETIREE: return "Description: A person playing the role of an individual insured under a policy based on meeting criteria for the employment status of retired set by law or the policy.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a retiree meets jurisdictional or policy criteria."; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "Description:A role recognized through the eligibility of a party to play a program eligible for benefits covered or provided under a program."; + case INDIG: return "Description: A person playing the role of program eligible under a program based on aboriginal ancestry or as a member of an aboriginal community.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is \"program eligible\" and the person's status as a member of an indigenous people meets jurisdictional or program criteria."; + case MIL: return "Definition: A person playing the role of program eligible under a program based on military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a member of the military meets jurisdictional or program criteria"; + case ACTMIL: return "Description: A person playing the role of program eligible under a program based on active military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as active duty military meets jurisdictional or program criteria."; + case RETMIL: return "Description: A person playing the role of program eligible under a program based on retired military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as retired military meets jurisdictional or program criteria."; + case VET: return "Description: A person playing the role of program eligible under a program based on status as a military veteran.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as a veteran meets jurisdictional or program criteria."; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "Description: A role recognized through the eligibility of a party to play a subscriber for benefits covered or provided under a health insurance policy."; + case _RESEARCHSUBJECTROLEBASIS: return "Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. Examples: screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the active treatment portion of the design."; + case ERL: return "Definition:The specific role being played by a research subject participating in the active treatment or primary data collection portion of a research study."; + case SCN: return "Definition:The specific role being played by a research subject participating in the pre-enrollment evaluation portion of a research study."; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered."; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "A role of a place that further classifies a setting that is intended to house the provision of services."; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "A role of a place that further classifies the clinical setting (e.g., cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter."; + case DX: return "A practice setting where diagnostic procedures or therapeutic interventions are performed"; + case CVDX: return "A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g., cardiac catheterization lab, echocardiography suite)"; + case CATH: return "Cardiac catheterization lab"; + case ECHO: return "Echocardiography lab"; + case GIDX: return "A practice setting where GI procedures (such as endoscopies) are performed"; + case ENDOS: return "(X12N 261QD0000N)"; + case RADDX: return "A practice setting where radiology services (diagnostic or therapeutic) are provided (X12N 261QR0200N)"; + case RADO: return "(X12N 261QX0203N)"; + case RNEU: return "Neuroradiology unit"; + case HOSP: return "An acute care institution that provides medical, surgical, or psychiatric care and treatment for the sick or the injured."; + case CHR: return "(1) A hospital including a physical plant and personnel that provides multidisciplinary diagnosis and treatment for diseases that have one or more of the following characteristics: is permanent; leaves residual disability; is caused by nonreversible pathological alteration; requires special training of the patient for rehabilitation; and/or may be expected to require a long period of supervision or care. In addition, patients require the safety, security, and shelter of these specialized inpatient or partial hospitalization settings. (2) A hospital that provides medical and skilled nursing services to patients with long-term illnesses who are not in an acute phase but who require an intensity of services not available in nursing homes"; + case GACH: return "(X12N 282N00000N)"; + case MHSP: return "A health care facility operated by the Department of Defense or other military operation."; + case PSYCHF: return "Healthcare facility that cares for patients with psychiatric illness(s)."; + case RH: return "(X12N 283X00000N)"; + case RHAT: return "Description: A location that plays the role of delivering services which may include life training and/or social support to people with addictions."; + case RHII: return "Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behaviour disorder."; + case RHMAD: return "Description: A location that plays the role of delivering services which may social support services for adolescents who are pregnant or have child and are experiencing adaptation issues/difficulties in their current or eventual parenting role."; + case RHPI: return "Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with physical impairments."; + case RHPIH: return "Description: A location that plays the role of delivering services for people with hearing impairments."; + case RHPIMS: return "Description: A location that plays the role of delivering services for people with motor skill impairments."; + case RHPIVS: return "Description: A location that plays the role of delivering services for people with visual skill impairments."; + case RHYAD: return "Description: A location that plays the role of delivering services which may include life training and/or social support services for the adaption, rehabilitation and social integration of youths with adjustment difficulties."; + case HU: return "Hospital unit"; + case BMTU: return "Bone marrow transplant unit"; + case CCU: return "Coronary care unit"; + case CHEST: return "A specialty unit in hospital that focuses on chronic respirator patients and pulmonary failure"; + case EPIL: return "Epilepsy unit"; + case ER: return "The section of a health care facility for providing rapid treatment to victims of sudden illness or trauma."; + case ETU: return "Emergency trauma unit"; + case HD: return "Hemodialysis unit"; + case HLAB: return "Description: A location that plays the role of delivering services which may include tests done based on clinical specimens to get health information about a patient as pertaining to the diagnosis, treatment and prevention of disease. Hospital laboratories may be further divided into specialized units such as Anatomic Pathology, Microbiology, and Biochemistry."; + case INLAB: return "Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for a hospital visit longer than one day."; + case OUTLAB: return "Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for same day visits."; + case HRAD: return "Description: A location that plays the role of delivering services which may include the branch of medicine that uses ionizing and non-ionizing radiation to diagnose and treat diseases. The radiology unit may be further divided into subspecialties such as Imaging, Cardiovascular, Thoracic, and Ultrasound."; + case HUSCS: return "Description: A location that plays the role of delivering services which may include collecting specimens and/or samples from patients for laboratory testing purposes, but does not perform any tests or analysis functions."; + case ICU: return "Intensive care unit"; + case PEDICU: return "Pediatric intensive care unit"; + case PEDNICU: return "Pediatric neonatal intensive care unit"; + case INPHARM: return "Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for visits longer than one day. The distinction between inpatient pharmacies and retail (or outpatient) pharmacies is that they are part of a patient's continuity of care while staying in the hospital."; + case MBL: return "Description: A location that plays the role of delivering services which include biochemistry, hematology, microbiology, immunochemistry, and toxicology."; + case NCCS: return "Neurology critical care and stroke unit"; + case NS: return "Neurosurgery unit"; + case OUTPHARM: return "Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for outpatient visits and may also be used for discharge prescriptions."; + case PEDU: return "Pediatric unit"; + case PHU: return "(X12N 273R00000N)"; + case RHU: return "Rehabilitation hospital unit"; + case SLEEP: return "(X12N 261QA1200N)"; + case NCCF: return "Nursing or custodial care facility"; + case SNF: return "(X12N 314000000N)"; + case OF: return "Outpatient facility"; + case ALL: return "Allergy clinic"; + case AMPUT: return "Amputee clinic"; + case BMTC: return "Bone marrow transplant clinic"; + case BREAST: return "Breast clinic"; + case CANC: return "Child and adolescent neurology clinic"; + case CAPC: return "Child and adolescent psychiatry clinic"; + case CARD: return "Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities"; + case PEDCARD: return "Pediatric cardiology clinic"; + case COAG: return "Coagulation clinic"; + case CRS: return "Colon and rectal surgery clinic"; + case DERM: return "Dermatology clinic"; + case ENDO: return "Endocrinology clinic"; + case PEDE: return "Pediatric endocrinology clinic"; + case ENT: return "Otorhinolaryngology clinic"; + case FMC: return "Family medicine clinic"; + case GI: return "Gastroenterology clinic"; + case PEDGI: return "Pediatric gastroenterology clinic"; + case GIM: return "General internal medicine clinic"; + case GYN: return "Gynecology clinic"; + case HEM: return "Hematology clinic"; + case PEDHEM: return "Pediatric hematology clinic"; + case HTN: return "Hypertension clinic"; + case IEC: return "Focuses on assessing disability"; + case INFD: return "Infectious disease clinic"; + case PEDID: return "Pediatric infectious disease clinic"; + case INV: return "Infertility clinic"; + case LYMPH: return "Lympedema clinic"; + case MGEN: return "Medical genetics clinic"; + case NEPH: return "Nephrology clinic"; + case PEDNEPH: return "Pediatric nephrology clinic"; + case NEUR: return "Neurology clinic"; + case OB: return "Obstetrics clinic"; + case OMS: return "Oral and maxillofacial surgery clinic"; + case ONCL: return "Medical oncology clinic"; + case PEDHO: return "Pediatric oncology clinic"; + case OPH: return "Opthalmology clinic"; + case OPTC: return "Description: A location that plays the role of delivering services which may include examination, diagnosis, treatment, management, and prevention of diseases and disorders of the eye as well as prescribing and fitting appropriate corrective lenses (glasses or contact lenses) as needed. Optometry clinics may also provide tests for visual field screening, measuring intra-ocular pressure and ophthalmoscopy, as and when required."; + case ORTHO: return "Orthopedics clinic"; + case HAND: return "Hand clinic"; + case PAINCL: return "(X12N 261QP3300N)"; + case PC: return "(X12N 261QP2300N)"; + case PEDC: return "Pediatrics clinic"; + case PEDRHEUM: return "Pediatric rheumatology clinic"; + case POD: return "(X12N 261QP1100N)"; + case PREV: return "Preventive medicine clinic"; + case PROCTO: return "Proctology clinic"; + case PROFF: return "Location where healthcare service was delivered, identified as the healthcare provider's practice office."; + case PROS: return "Prosthodontics clinic"; + case PSI: return "Psychology clinic"; + case PSY: return "Psychiatry clinic"; + case RHEUM: return "Rheumatology clinic"; + case SPMED: return "Sports medicine clinic"; + case SU: return "Surgery clinic"; + case PLS: return "Plastic surgery clinic"; + case URO: return "Urology clinic"; + case TR: return "Transplant clinic"; + case TRAVEL: return "Travel and geographic medicine clinic"; + case WND: return "Wound clinic"; + case RTF: return "Residential treatment facility"; + case PRC: return "Pain rehabilitation center"; + case SURF: return "(X12N 324500000N)"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "A role of a place that further classifies a setting that is intended to house the provision of non-clinical services."; + case DADDR: return "Location address where medical supplies were transported to for use."; + case MOBL: return "Location (mobile) where healthcare service was delivered."; + case AMB: return "Location (mobile) where healthcare service was delivered, identified specifically as an ambulance."; + case PHARM: return "Location where healthcare service was delivered, identified as a pharmacy."; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "Location of an accident where healthcare service was delivered, such as a roadside."; + case COMM: return "Community location where healthcare is delivered."; + case CSC: return "Description: A location that plays the role of delivering services which may include providing front-line services to the population of a defined geographic area such as: healthcare services and social services, preventive or curative, rehabilitation or reintegration."; + case PTRES: return "location where healthcare was delivered which is the residence of the Patient."; + case SCHOOL: return "Location where healthcare service was delivered, identified as a school or educational facility."; + case UPC: return "Description: A location that plays the role of delivering services which may include: social emergency services required for a young person as required under any jurisdictional youth laws, child placement, and family mediation in the defined geographical area the SDL is responsible for. It may provide expertise in a judiciary setting on child custody, adoption and biological history research."; + case WORK: return "Location where healthcare service was delivered, identified as a work place."; + case _SPECIMENROLETYPE: return "SpecimenRoleType"; + case C: return "A specimen used for initial calibration settings of an instrument"; + case G: return "A set of patient samples in which the individuals of the group may or may not be identified."; + case L: return "Aliquots of individual specimens combined to form a single specimen representing all of the included individuals."; + case P: return "A specimen that has been collected from a patient."; + case Q: return "A specimen specifically used to verify the sensitivity, specificity, accuracy or other perfomance parameter of a diagnostic test."; + case B: return "Quality Control specimen submitted to the lab whose identity and composition is not known to the lab."; + case E: return "An electronically simulated QC specimen"; + case F: return "Specimen used for testing proficiency of an organization performing testing (how does this differ from O?)"; + case O: return "A specimen used for evaluation of operator proficiency (operator in what context?)"; + case V: return "A specimen used for periodic calibration checks of instruments"; + case R: return "A portion of an original patent sample that is tested at the same time as the original sample"; + case CLAIM: return "A party that makes a claim for coverage under a policy."; + case COMMUNITYLABORATORY: return "Community Laboratory"; + case GT: return "An individual or organization that makes or gives a promise, assurance, pledge to pay or has paid the healthcare service provider."; + case HOMEHEALTH: return "Home Health"; + case LABORATORY: return "Laboratory"; + case PATHOLOGIST: return "Pathologist"; + case PH: return "Policy holder for the insurance policy."; + case PHLEBOTOMIST: return "Phlebotomist"; + case PROG: return "A party that meets the eligibility criteria for coverage under a program."; + case PT: return "The recipient for the service(s) and/or product(s) when they are not the covered party."; + case SUBJECT: return "Self"; + case THIRDPARTY: return "Third Party"; + case DEP: return ""; + case DEPEN: return "A party covered under a policy based on association with a subscriber."; + case FM: return "A member of the covered party's family. This could be the spouse, a parent, a grand parent, a sibling, etc."; + case INDIV: return "A party covered under a policy as the policyholder."; + case NAMED: return "A party to an insurance policy to whom the insurer agrees to indemnify for losses, provides benefits for, or renders services."; + case PSYCHCF: return ""; + case SUBSCR: return "A party covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _AFFILIATIONROLETYPE: return "AffiliationRoleType"; + case _COVERAGESPONSORROLETYPE: return "CoverageSponsorRoleType"; + case FULLINS: return "Fully insured coverage sponsor"; + case SELFINS: return "Self insured coverage sponsor"; + case _PAYORROLETYPE: return "PayorRoleType"; + case ENROLBKR: return "Enrollment Broker"; + case TPA: return "Third party administrator"; + case UMO: return "Utilization management organization"; + case RESPRSN: return "responsible party"; + case EXCEST: return "executor of estate"; + case GUADLTM: return "guardian ad lidem"; + case GUARD: return "guardian"; + case POWATT: return "power of attorney"; + case DPOWATT: return "durable power of attorney"; + case HPOWATT: return "healthcare power of attorney"; + case SPOWATT: return "special power of attorney"; + case _ASSIGNEDROLETYPE: return "AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "AssignedNonPersonLivingSubjectRoleType"; + case ASSIST: return "Assistive non-person living subject"; + case BIOTH: return "Biotherapeutic non-person living subject"; + case ANTIBIOT: return "Antibiotic"; + case DEBR: return "Debridement"; + case CCO: return "Clinical Companion"; + case SEE: return "Seeing"; + case SNIFF: return "Sniffing"; + case _CERTIFIEDENTITYTYPE: return "CertifiedEntityType"; + case _CITIZENROLETYPE: return "CitizenRoleType"; + case CAS: return "asylum seeker"; + case CASM: return "single minor asylum seeker"; + case CN: return "national"; + case CNRP: return "non-country member without residence permit"; + case CNRPM: return "non-country member minor without residence permit"; + case CPCA: return "permit card applicant"; + case CRP: return "non-country member with residence permit"; + case CRPM: return "non-country member minor with residence permit"; + case _CONTACTROLETYPE: return "ContactRoleType"; + case _ADMINISTRATIVECONTACTROLETYPE: return "AdministrativeContactRoleType"; + case BILL: return "Billing Contact"; + case ORG: return "organizational contact"; + case PAYOR: return "Payor Contact"; + case ECON: return "emergency contact"; + case NOK: return "next of kin"; + case _IDENTIFIEDENTITYTYPE: return "IdentifiedEntityType"; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "LocationIdentifiedEntityRoleCode"; + case ACHFID: return "accreditation location identifier"; + case JURID: return "jurisdiction location identifier"; + case LOCHFID: return "local location identifier"; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "LivingSubjectProductionClass"; + case BF: return "Beef"; + case BL: return "Broiler"; + case BR: return "Breeder"; + case CO: return "Companion"; + case DA: return "Dairy"; + case DR: return "Draft"; + case DU: return "Dual"; + case FI: return "Fiber"; + case LY: return "Layer"; + case MT: return "Meat"; + case MU: return "Multiplier"; + case PL: return "Pleasure"; + case RC: return "Racing"; + case SH: return "Show"; + case VL: return "Veal"; + case WL: return "Wool"; + case WO: return "Working"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "MedicationGeneralizationRoleType"; + case DC: return "therapeutic class"; + case GD: return "generic drug"; + case GDF: return "generic drug form"; + case GDS: return "generic drug strength"; + case GDSF: return "generic drug strength form"; + case MGDSF: return "manufactured drug strength form"; + case _MEMBERROLETYPE: return "MemberRoleType"; + case TRB: return "Tribal Member"; + case _PERSONALRELATIONSHIPROLETYPE: return "PersonalRelationshipRoleType"; + case FAMMEMB: return "family member"; + case CHILD: return "child"; + case CHLDADOPT: return "adopted child"; + case DAUADOPT: return "adopted daughter"; + case SONADOPT: return "adopted son"; + case CHLDFOST: return "foster child"; + case DAUFOST: return "foster daughter"; + case SONFOST: return "foster son"; + case DAUC: return "daughter"; + case DAU: return "natural daughter"; + case STPDAU: return "stepdaughter"; + case NCHILD: return "natural child"; + case SON: return "natural son"; + case SONC: return "son"; + case STPSON: return "stepson"; + case STPCHLD: return "step child"; + case EXT: return "extended family member"; + case AUNT: return "aunt"; + case MAUNT: return "maternal aunt"; + case PAUNT: return "paternal aunt"; + case COUSN: return "cousin"; + case MCOUSN: return "maternal cousin"; + case PCOUSN: return "paternal cousin"; + case GGRPRN: return "great grandparent"; + case GGRFTH: return "great grandfather"; + case MGGRFTH: return "maternal great-grandfather"; + case PGGRFTH: return "paternal great-grandfather"; + case GGRMTH: return "great grandmother"; + case MGGRMTH: return "maternal great-grandmother"; + case PGGRMTH: return "paternal great-grandmother"; + case MGGRPRN: return "maternal great-grandparent"; + case PGGRPRN: return "paternal great-grandparent"; + case GRNDCHILD: return "grandchild"; + case GRNDDAU: return "granddaughter"; + case GRNDSON: return "grandson"; + case GRPRN: return "grandparent"; + case GRFTH: return "grandfather"; + case MGRFTH: return "maternal grandfather"; + case PGRFTH: return "paternal grandfather"; + case GRMTH: return "grandmother"; + case MGRMTH: return "maternal grandmother"; + case PGRMTH: return "paternal grandmother"; + case MGRPRN: return "maternal grandparent"; + case PGRPRN: return "paternal grandparent"; + case INLAW: return "inlaw"; + case CHLDINLAW: return "child-in-law"; + case DAUINLAW: return "daughter in-law"; + case SONINLAW: return "son in-law"; + case PRNINLAW: return "parent in-law"; + case FTHINLAW: return "father-in-law"; + case MTHINLAW: return "mother-in-law"; + case SIBINLAW: return "sibling in-law"; + case BROINLAW: return "brother-in-law"; + case SISINLAW: return "sister-in-law"; + case NIENEPH: return "niece/nephew"; + case NEPHEW: return "nephew"; + case NIECE: return "niece"; + case UNCLE: return "uncle"; + case MUNCLE: return "maternal uncle"; + case PUNCLE: return "paternal uncle"; + case PRN: return "parent"; + case ADOPTP: return "adoptive parent"; + case ADOPTF: return "adoptive father"; + case ADOPTM: return "adoptive mother"; + case FTH: return "father"; + case FTHFOST: return "foster father"; + case NFTH: return "natural father"; + case NFTHF: return "natural father of fetus"; + case STPFTH: return "stepfather"; + case MTH: return "mother"; + case GESTM: return "gestational mother"; + case MTHFOST: return "foster mother"; + case NMTH: return "natural mother"; + case NMTHF: return "natural mother of fetus"; + case STPMTH: return "stepmother"; + case NPRN: return "natural parent"; + case PRNFOST: return "foster parent"; + case STPPRN: return "step parent"; + case SIB: return "sibling"; + case BRO: return "brother"; + case HBRO: return "half-brother"; + case NBRO: return "natural brother"; + case TWINBRO: return "twin brother"; + case FTWINBRO: return "fraternal twin brother"; + case ITWINBRO: return "identical twin brother"; + case STPBRO: return "stepbrother"; + case HSIB: return "half-sibling"; + case HSIS: return "half-sister"; + case NSIB: return "natural sibling"; + case NSIS: return "natural sister"; + case TWINSIS: return "twin sister"; + case FTWINSIS: return "fraternal twin sister"; + case ITWINSIS: return "identical twin sister"; + case TWIN: return "twin"; + case FTWIN: return "fraternal twin"; + case ITWIN: return "identical twin"; + case SIS: return "sister"; + case STPSIS: return "stepsister"; + case STPSIB: return "step sibling"; + case SIGOTHR: return "significant other"; + case DOMPART: return "domestic partner"; + case FMRSPS: return "former spouse"; + case SPS: return "spouse"; + case HUSB: return "husband"; + case WIFE: return "wife"; + case FRND: return "unrelated friend"; + case NBOR: return "neighbor"; + case ONESELF: return "self"; + case ROOM: return "Roommate"; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "PolicyOrProgramCoverageRoleType"; + case _COVERAGEROLETYPE: return "CoverageRoleType"; + case FAMDEP: return "family dependent"; + case HANDIC: return "handicapped dependent"; + case INJ: return "injured plaintiff"; + case SELF: return "self"; + case SPON: return "sponsored dependent"; + case STUD: return "student"; + case FSTUD: return "full-time student"; + case PSTUD: return "part-time student"; + case ADOPT: return "adopted child"; + case GCHILD: return "grandchild"; + case GPARNT: return "grandparent"; + case NAT: return "natural child"; + case NIENE: return "niece/nephew"; + case PARNT: return "parent"; + case SPSE: return "spouse"; + case STEP: return "step child"; + case _COVEREDPARTYROLETYPE: return "covered party role type"; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "ClaimantCoveredPartyRoleType"; + case CRIMEVIC: return "crime victim"; + case INJWKR: return "injured worker"; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "DependentCoveredPartyRoleType"; + case COCBEN: return "continuity of coverage beneficiary"; + case DIFFABL: return "differently abled"; + case WARD: return "ward"; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "IndividualInsuredPartyRoleType"; + case RETIREE: return "retiree"; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "ProgramEligiblePartyRoleType"; + case INDIG: return "member of an indigenous people"; + case MIL: return "military"; + case ACTMIL: return "active duty military"; + case RETMIL: return "retired military"; + case VET: return "veteran"; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "SubscriberCoveredPartyRoleType"; + case _RESEARCHSUBJECTROLEBASIS: return "ResearchSubjectRoleBasis"; + case ERL: return "enrollment"; + case SCN: return "screening"; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "ServiceDeliveryLocationRoleType"; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "DedicatedServiceDeliveryLocationRoleType"; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "DedicatedClinicalLocationRoleType"; + case DX: return "Diagnostics or therapeutics unit"; + case CVDX: return "Cardiovascular diagnostics or therapeutics unit"; + case CATH: return "Cardiac catheterization lab"; + case ECHO: return "Echocardiography lab"; + case GIDX: return "Gastroenterology diagnostics or therapeutics lab"; + case ENDOS: return "Endoscopy lab"; + case RADDX: return "Radiology diagnostics or therapeutics unit"; + case RADO: return "Radiation oncology unit"; + case RNEU: return "Neuroradiology unit"; + case HOSP: return "Hospital"; + case CHR: return "Chronic Care Facility"; + case GACH: return "Hospitals; General Acute Care Hospital"; + case MHSP: return "Military Hospital"; + case PSYCHF: return "Psychatric Care Facility"; + case RH: return "Rehabilitation hospital"; + case RHAT: return "addiction treatment center"; + case RHII: return "intellectual impairment center"; + case RHMAD: return "parents with adjustment difficulties center"; + case RHPI: return "physical impairment center"; + case RHPIH: return "physical impairment - hearing center"; + case RHPIMS: return "physical impairment - motor skills center"; + case RHPIVS: return "physical impairment - visual skills center"; + case RHYAD: return "youths with adjustment difficulties center"; + case HU: return "Hospital unit"; + case BMTU: return "Bone marrow transplant unit"; + case CCU: return "Coronary care unit"; + case CHEST: return "Chest unit"; + case EPIL: return "Epilepsy unit"; + case ER: return "Emergency room"; + case ETU: return "Emergency trauma unit"; + case HD: return "Hemodialysis unit"; + case HLAB: return "hospital laboratory"; + case INLAB: return "inpatient laboratory"; + case OUTLAB: return "outpatient laboratory"; + case HRAD: return "radiology unit"; + case HUSCS: return "specimen collection site"; + case ICU: return "Intensive care unit"; + case PEDICU: return "Pediatric intensive care unit"; + case PEDNICU: return "Pediatric neonatal intensive care unit"; + case INPHARM: return "inpatient pharmacy"; + case MBL: return "medical laboratory"; + case NCCS: return "Neurology critical care and stroke unit"; + case NS: return "Neurosurgery unit"; + case OUTPHARM: return "outpatient pharmacy"; + case PEDU: return "Pediatric unit"; + case PHU: return "Psychiatric hospital unit"; + case RHU: return "Rehabilitation hospital unit"; + case SLEEP: return "Sleep disorders unit"; + case NCCF: return "Nursing or custodial care facility"; + case SNF: return "Skilled nursing facility"; + case OF: return "Outpatient facility"; + case ALL: return "Allergy clinic"; + case AMPUT: return "Amputee clinic"; + case BMTC: return "Bone marrow transplant clinic"; + case BREAST: return "Breast clinic"; + case CANC: return "Child and adolescent neurology clinic"; + case CAPC: return "Child and adolescent psychiatry clinic"; + case CARD: return "Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities"; + case PEDCARD: return "Pediatric cardiology clinic"; + case COAG: return "Coagulation clinic"; + case CRS: return "Colon and rectal surgery clinic"; + case DERM: return "Dermatology clinic"; + case ENDO: return "Endocrinology clinic"; + case PEDE: return "Pediatric endocrinology clinic"; + case ENT: return "Otorhinolaryngology clinic"; + case FMC: return "Family medicine clinic"; + case GI: return "Gastroenterology clinic"; + case PEDGI: return "Pediatric gastroenterology clinic"; + case GIM: return "General internal medicine clinic"; + case GYN: return "Gynecology clinic"; + case HEM: return "Hematology clinic"; + case PEDHEM: return "Pediatric hematology clinic"; + case HTN: return "Hypertension clinic"; + case IEC: return "Impairment evaluation center"; + case INFD: return "Infectious disease clinic"; + case PEDID: return "Pediatric infectious disease clinic"; + case INV: return "Infertility clinic"; + case LYMPH: return "Lympedema clinic"; + case MGEN: return "Medical genetics clinic"; + case NEPH: return "Nephrology clinic"; + case PEDNEPH: return "Pediatric nephrology clinic"; + case NEUR: return "Neurology clinic"; + case OB: return "Obstetrics clinic"; + case OMS: return "Oral and maxillofacial surgery clinic"; + case ONCL: return "Medical oncology clinic"; + case PEDHO: return "Pediatric oncology clinic"; + case OPH: return "Opthalmology clinic"; + case OPTC: return "optometry clinic"; + case ORTHO: return "Orthopedics clinic"; + case HAND: return "Hand clinic"; + case PAINCL: return "Pain clinic"; + case PC: return "Primary care clinic"; + case PEDC: return "Pediatrics clinic"; + case PEDRHEUM: return "Pediatric rheumatology clinic"; + case POD: return "Podiatry clinic"; + case PREV: return "Preventive medicine clinic"; + case PROCTO: return "Proctology clinic"; + case PROFF: return "Provider's Office"; + case PROS: return "Prosthodontics clinic"; + case PSI: return "Psychology clinic"; + case PSY: return "Psychiatry clinic"; + case RHEUM: return "Rheumatology clinic"; + case SPMED: return "Sports medicine clinic"; + case SU: return "Surgery clinic"; + case PLS: return "Plastic surgery clinic"; + case URO: return "Urology clinic"; + case TR: return "Transplant clinic"; + case TRAVEL: return "Travel and geographic medicine clinic"; + case WND: return "Wound clinic"; + case RTF: return "Residential treatment facility"; + case PRC: return "Pain rehabilitation center"; + case SURF: return "Substance use rehabilitation facility"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "DedicatedNonClinicalLocationRoleType"; + case DADDR: return "Delivery Address"; + case MOBL: return "Mobile Unit"; + case AMB: return "Ambulance"; + case PHARM: return "Pharmacy"; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "accident site"; + case COMM: return "Community Location"; + case CSC: return "community service center"; + case PTRES: return "Patient's Residence"; + case SCHOOL: return "school"; + case UPC: return "underage protection center"; + case WORK: return "work site"; + case _SPECIMENROLETYPE: return "SpecimenRoleType"; + case C: return "Calibrator"; + case G: return "Group"; + case L: return "Pool"; + case P: return "Patient"; + case Q: return "Quality Control"; + case B: return "Blind"; + case E: return "Electronic QC"; + case F: return "Filler Proficiency"; + case O: return "Operator Proficiency"; + case V: return "Verifying"; + case R: return "Replicate"; + case CLAIM: return "claimant"; + case COMMUNITYLABORATORY: return "Community Laboratory"; + case GT: return "Guarantor"; + case HOMEHEALTH: return "Home Health"; + case LABORATORY: return "Laboratory"; + case PATHOLOGIST: return "Pathologist"; + case PH: return "Policy Holder"; + case PHLEBOTOMIST: return "Phlebotomist"; + case PROG: return "program eligible"; + case PT: return "Patient"; + case SUBJECT: return "Self"; + case THIRDPARTY: return "Third Party"; + case DEP: return "DEP"; + case DEPEN: return "dependent"; + case FM: return "Family Member"; + case INDIV: return "individual"; + case NAMED: return "named insured"; + case PSYCHCF: return "PSYCHCF"; + case SUBSCR: return "subscriber"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCodeEnumFactory.java new file mode 100644 index 00000000000..80d8a9e99ec --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleCodeEnumFactory.java @@ -0,0 +1,1575 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RoleCodeEnumFactory implements EnumFactory { + + public V3RoleCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AffiliationRoleType".equals(codeString)) + return V3RoleCode._AFFILIATIONROLETYPE; + if ("_CoverageSponsorRoleType".equals(codeString)) + return V3RoleCode._COVERAGESPONSORROLETYPE; + if ("FULLINS".equals(codeString)) + return V3RoleCode.FULLINS; + if ("SELFINS".equals(codeString)) + return V3RoleCode.SELFINS; + if ("_PayorRoleType".equals(codeString)) + return V3RoleCode._PAYORROLETYPE; + if ("ENROLBKR".equals(codeString)) + return V3RoleCode.ENROLBKR; + if ("TPA".equals(codeString)) + return V3RoleCode.TPA; + if ("UMO".equals(codeString)) + return V3RoleCode.UMO; + if ("RESPRSN".equals(codeString)) + return V3RoleCode.RESPRSN; + if ("EXCEST".equals(codeString)) + return V3RoleCode.EXCEST; + if ("GUADLTM".equals(codeString)) + return V3RoleCode.GUADLTM; + if ("GUARD".equals(codeString)) + return V3RoleCode.GUARD; + if ("POWATT".equals(codeString)) + return V3RoleCode.POWATT; + if ("DPOWATT".equals(codeString)) + return V3RoleCode.DPOWATT; + if ("HPOWATT".equals(codeString)) + return V3RoleCode.HPOWATT; + if ("SPOWATT".equals(codeString)) + return V3RoleCode.SPOWATT; + if ("_AssignedRoleType".equals(codeString)) + return V3RoleCode._ASSIGNEDROLETYPE; + if ("_AssignedNonPersonLivingSubjectRoleType".equals(codeString)) + return V3RoleCode._ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE; + if ("ASSIST".equals(codeString)) + return V3RoleCode.ASSIST; + if ("BIOTH".equals(codeString)) + return V3RoleCode.BIOTH; + if ("ANTIBIOT".equals(codeString)) + return V3RoleCode.ANTIBIOT; + if ("DEBR".equals(codeString)) + return V3RoleCode.DEBR; + if ("CCO".equals(codeString)) + return V3RoleCode.CCO; + if ("SEE".equals(codeString)) + return V3RoleCode.SEE; + if ("SNIFF".equals(codeString)) + return V3RoleCode.SNIFF; + if ("_CertifiedEntityType".equals(codeString)) + return V3RoleCode._CERTIFIEDENTITYTYPE; + if ("_CitizenRoleType".equals(codeString)) + return V3RoleCode._CITIZENROLETYPE; + if ("CAS".equals(codeString)) + return V3RoleCode.CAS; + if ("CASM".equals(codeString)) + return V3RoleCode.CASM; + if ("CN".equals(codeString)) + return V3RoleCode.CN; + if ("CNRP".equals(codeString)) + return V3RoleCode.CNRP; + if ("CNRPM".equals(codeString)) + return V3RoleCode.CNRPM; + if ("CPCA".equals(codeString)) + return V3RoleCode.CPCA; + if ("CRP".equals(codeString)) + return V3RoleCode.CRP; + if ("CRPM".equals(codeString)) + return V3RoleCode.CRPM; + if ("_ContactRoleType".equals(codeString)) + return V3RoleCode._CONTACTROLETYPE; + if ("_AdministrativeContactRoleType".equals(codeString)) + return V3RoleCode._ADMINISTRATIVECONTACTROLETYPE; + if ("BILL".equals(codeString)) + return V3RoleCode.BILL; + if ("ORG".equals(codeString)) + return V3RoleCode.ORG; + if ("PAYOR".equals(codeString)) + return V3RoleCode.PAYOR; + if ("ECON".equals(codeString)) + return V3RoleCode.ECON; + if ("NOK".equals(codeString)) + return V3RoleCode.NOK; + if ("_IdentifiedEntityType".equals(codeString)) + return V3RoleCode._IDENTIFIEDENTITYTYPE; + if ("_LocationIdentifiedEntityRoleCode".equals(codeString)) + return V3RoleCode._LOCATIONIDENTIFIEDENTITYROLECODE; + if ("ACHFID".equals(codeString)) + return V3RoleCode.ACHFID; + if ("JURID".equals(codeString)) + return V3RoleCode.JURID; + if ("LOCHFID".equals(codeString)) + return V3RoleCode.LOCHFID; + if ("_LivingSubjectProductionClass".equals(codeString)) + return V3RoleCode._LIVINGSUBJECTPRODUCTIONCLASS; + if ("BF".equals(codeString)) + return V3RoleCode.BF; + if ("BL".equals(codeString)) + return V3RoleCode.BL; + if ("BR".equals(codeString)) + return V3RoleCode.BR; + if ("CO".equals(codeString)) + return V3RoleCode.CO; + if ("DA".equals(codeString)) + return V3RoleCode.DA; + if ("DR".equals(codeString)) + return V3RoleCode.DR; + if ("DU".equals(codeString)) + return V3RoleCode.DU; + if ("FI".equals(codeString)) + return V3RoleCode.FI; + if ("LY".equals(codeString)) + return V3RoleCode.LY; + if ("MT".equals(codeString)) + return V3RoleCode.MT; + if ("MU".equals(codeString)) + return V3RoleCode.MU; + if ("PL".equals(codeString)) + return V3RoleCode.PL; + if ("RC".equals(codeString)) + return V3RoleCode.RC; + if ("SH".equals(codeString)) + return V3RoleCode.SH; + if ("VL".equals(codeString)) + return V3RoleCode.VL; + if ("WL".equals(codeString)) + return V3RoleCode.WL; + if ("WO".equals(codeString)) + return V3RoleCode.WO; + if ("_MedicationGeneralizationRoleType".equals(codeString)) + return V3RoleCode._MEDICATIONGENERALIZATIONROLETYPE; + if ("DC".equals(codeString)) + return V3RoleCode.DC; + if ("GD".equals(codeString)) + return V3RoleCode.GD; + if ("GDF".equals(codeString)) + return V3RoleCode.GDF; + if ("GDS".equals(codeString)) + return V3RoleCode.GDS; + if ("GDSF".equals(codeString)) + return V3RoleCode.GDSF; + if ("MGDSF".equals(codeString)) + return V3RoleCode.MGDSF; + if ("_MemberRoleType".equals(codeString)) + return V3RoleCode._MEMBERROLETYPE; + if ("TRB".equals(codeString)) + return V3RoleCode.TRB; + if ("_PersonalRelationshipRoleType".equals(codeString)) + return V3RoleCode._PERSONALRELATIONSHIPROLETYPE; + if ("FAMMEMB".equals(codeString)) + return V3RoleCode.FAMMEMB; + if ("CHILD".equals(codeString)) + return V3RoleCode.CHILD; + if ("CHLDADOPT".equals(codeString)) + return V3RoleCode.CHLDADOPT; + if ("DAUADOPT".equals(codeString)) + return V3RoleCode.DAUADOPT; + if ("SONADOPT".equals(codeString)) + return V3RoleCode.SONADOPT; + if ("CHLDFOST".equals(codeString)) + return V3RoleCode.CHLDFOST; + if ("DAUFOST".equals(codeString)) + return V3RoleCode.DAUFOST; + if ("SONFOST".equals(codeString)) + return V3RoleCode.SONFOST; + if ("DAUC".equals(codeString)) + return V3RoleCode.DAUC; + if ("DAU".equals(codeString)) + return V3RoleCode.DAU; + if ("STPDAU".equals(codeString)) + return V3RoleCode.STPDAU; + if ("NCHILD".equals(codeString)) + return V3RoleCode.NCHILD; + if ("SON".equals(codeString)) + return V3RoleCode.SON; + if ("SONC".equals(codeString)) + return V3RoleCode.SONC; + if ("STPSON".equals(codeString)) + return V3RoleCode.STPSON; + if ("STPCHLD".equals(codeString)) + return V3RoleCode.STPCHLD; + if ("EXT".equals(codeString)) + return V3RoleCode.EXT; + if ("AUNT".equals(codeString)) + return V3RoleCode.AUNT; + if ("MAUNT".equals(codeString)) + return V3RoleCode.MAUNT; + if ("PAUNT".equals(codeString)) + return V3RoleCode.PAUNT; + if ("COUSN".equals(codeString)) + return V3RoleCode.COUSN; + if ("MCOUSN".equals(codeString)) + return V3RoleCode.MCOUSN; + if ("PCOUSN".equals(codeString)) + return V3RoleCode.PCOUSN; + if ("GGRPRN".equals(codeString)) + return V3RoleCode.GGRPRN; + if ("GGRFTH".equals(codeString)) + return V3RoleCode.GGRFTH; + if ("MGGRFTH".equals(codeString)) + return V3RoleCode.MGGRFTH; + if ("PGGRFTH".equals(codeString)) + return V3RoleCode.PGGRFTH; + if ("GGRMTH".equals(codeString)) + return V3RoleCode.GGRMTH; + if ("MGGRMTH".equals(codeString)) + return V3RoleCode.MGGRMTH; + if ("PGGRMTH".equals(codeString)) + return V3RoleCode.PGGRMTH; + if ("MGGRPRN".equals(codeString)) + return V3RoleCode.MGGRPRN; + if ("PGGRPRN".equals(codeString)) + return V3RoleCode.PGGRPRN; + if ("GRNDCHILD".equals(codeString)) + return V3RoleCode.GRNDCHILD; + if ("GRNDDAU".equals(codeString)) + return V3RoleCode.GRNDDAU; + if ("GRNDSON".equals(codeString)) + return V3RoleCode.GRNDSON; + if ("GRPRN".equals(codeString)) + return V3RoleCode.GRPRN; + if ("GRFTH".equals(codeString)) + return V3RoleCode.GRFTH; + if ("MGRFTH".equals(codeString)) + return V3RoleCode.MGRFTH; + if ("PGRFTH".equals(codeString)) + return V3RoleCode.PGRFTH; + if ("GRMTH".equals(codeString)) + return V3RoleCode.GRMTH; + if ("MGRMTH".equals(codeString)) + return V3RoleCode.MGRMTH; + if ("PGRMTH".equals(codeString)) + return V3RoleCode.PGRMTH; + if ("MGRPRN".equals(codeString)) + return V3RoleCode.MGRPRN; + if ("PGRPRN".equals(codeString)) + return V3RoleCode.PGRPRN; + if ("INLAW".equals(codeString)) + return V3RoleCode.INLAW; + if ("CHLDINLAW".equals(codeString)) + return V3RoleCode.CHLDINLAW; + if ("DAUINLAW".equals(codeString)) + return V3RoleCode.DAUINLAW; + if ("SONINLAW".equals(codeString)) + return V3RoleCode.SONINLAW; + if ("PRNINLAW".equals(codeString)) + return V3RoleCode.PRNINLAW; + if ("FTHINLAW".equals(codeString)) + return V3RoleCode.FTHINLAW; + if ("MTHINLAW".equals(codeString)) + return V3RoleCode.MTHINLAW; + if ("SIBINLAW".equals(codeString)) + return V3RoleCode.SIBINLAW; + if ("BROINLAW".equals(codeString)) + return V3RoleCode.BROINLAW; + if ("SISINLAW".equals(codeString)) + return V3RoleCode.SISINLAW; + if ("NIENEPH".equals(codeString)) + return V3RoleCode.NIENEPH; + if ("NEPHEW".equals(codeString)) + return V3RoleCode.NEPHEW; + if ("NIECE".equals(codeString)) + return V3RoleCode.NIECE; + if ("UNCLE".equals(codeString)) + return V3RoleCode.UNCLE; + if ("MUNCLE".equals(codeString)) + return V3RoleCode.MUNCLE; + if ("PUNCLE".equals(codeString)) + return V3RoleCode.PUNCLE; + if ("PRN".equals(codeString)) + return V3RoleCode.PRN; + if ("ADOPTP".equals(codeString)) + return V3RoleCode.ADOPTP; + if ("ADOPTF".equals(codeString)) + return V3RoleCode.ADOPTF; + if ("ADOPTM".equals(codeString)) + return V3RoleCode.ADOPTM; + if ("FTH".equals(codeString)) + return V3RoleCode.FTH; + if ("FTHFOST".equals(codeString)) + return V3RoleCode.FTHFOST; + if ("NFTH".equals(codeString)) + return V3RoleCode.NFTH; + if ("NFTHF".equals(codeString)) + return V3RoleCode.NFTHF; + if ("STPFTH".equals(codeString)) + return V3RoleCode.STPFTH; + if ("MTH".equals(codeString)) + return V3RoleCode.MTH; + if ("GESTM".equals(codeString)) + return V3RoleCode.GESTM; + if ("MTHFOST".equals(codeString)) + return V3RoleCode.MTHFOST; + if ("NMTH".equals(codeString)) + return V3RoleCode.NMTH; + if ("NMTHF".equals(codeString)) + return V3RoleCode.NMTHF; + if ("STPMTH".equals(codeString)) + return V3RoleCode.STPMTH; + if ("NPRN".equals(codeString)) + return V3RoleCode.NPRN; + if ("PRNFOST".equals(codeString)) + return V3RoleCode.PRNFOST; + if ("STPPRN".equals(codeString)) + return V3RoleCode.STPPRN; + if ("SIB".equals(codeString)) + return V3RoleCode.SIB; + if ("BRO".equals(codeString)) + return V3RoleCode.BRO; + if ("HBRO".equals(codeString)) + return V3RoleCode.HBRO; + if ("NBRO".equals(codeString)) + return V3RoleCode.NBRO; + if ("TWINBRO".equals(codeString)) + return V3RoleCode.TWINBRO; + if ("FTWINBRO".equals(codeString)) + return V3RoleCode.FTWINBRO; + if ("ITWINBRO".equals(codeString)) + return V3RoleCode.ITWINBRO; + if ("STPBRO".equals(codeString)) + return V3RoleCode.STPBRO; + if ("HSIB".equals(codeString)) + return V3RoleCode.HSIB; + if ("HSIS".equals(codeString)) + return V3RoleCode.HSIS; + if ("NSIB".equals(codeString)) + return V3RoleCode.NSIB; + if ("NSIS".equals(codeString)) + return V3RoleCode.NSIS; + if ("TWINSIS".equals(codeString)) + return V3RoleCode.TWINSIS; + if ("FTWINSIS".equals(codeString)) + return V3RoleCode.FTWINSIS; + if ("ITWINSIS".equals(codeString)) + return V3RoleCode.ITWINSIS; + if ("TWIN".equals(codeString)) + return V3RoleCode.TWIN; + if ("FTWIN".equals(codeString)) + return V3RoleCode.FTWIN; + if ("ITWIN".equals(codeString)) + return V3RoleCode.ITWIN; + if ("SIS".equals(codeString)) + return V3RoleCode.SIS; + if ("STPSIS".equals(codeString)) + return V3RoleCode.STPSIS; + if ("STPSIB".equals(codeString)) + return V3RoleCode.STPSIB; + if ("SIGOTHR".equals(codeString)) + return V3RoleCode.SIGOTHR; + if ("DOMPART".equals(codeString)) + return V3RoleCode.DOMPART; + if ("FMRSPS".equals(codeString)) + return V3RoleCode.FMRSPS; + if ("SPS".equals(codeString)) + return V3RoleCode.SPS; + if ("HUSB".equals(codeString)) + return V3RoleCode.HUSB; + if ("WIFE".equals(codeString)) + return V3RoleCode.WIFE; + if ("FRND".equals(codeString)) + return V3RoleCode.FRND; + if ("NBOR".equals(codeString)) + return V3RoleCode.NBOR; + if ("ONESELF".equals(codeString)) + return V3RoleCode.ONESELF; + if ("ROOM".equals(codeString)) + return V3RoleCode.ROOM; + if ("_PolicyOrProgramCoverageRoleType".equals(codeString)) + return V3RoleCode._POLICYORPROGRAMCOVERAGEROLETYPE; + if ("_CoverageRoleType".equals(codeString)) + return V3RoleCode._COVERAGEROLETYPE; + if ("FAMDEP".equals(codeString)) + return V3RoleCode.FAMDEP; + if ("HANDIC".equals(codeString)) + return V3RoleCode.HANDIC; + if ("INJ".equals(codeString)) + return V3RoleCode.INJ; + if ("SELF".equals(codeString)) + return V3RoleCode.SELF; + if ("SPON".equals(codeString)) + return V3RoleCode.SPON; + if ("STUD".equals(codeString)) + return V3RoleCode.STUD; + if ("FSTUD".equals(codeString)) + return V3RoleCode.FSTUD; + if ("PSTUD".equals(codeString)) + return V3RoleCode.PSTUD; + if ("ADOPT".equals(codeString)) + return V3RoleCode.ADOPT; + if ("GCHILD".equals(codeString)) + return V3RoleCode.GCHILD; + if ("GPARNT".equals(codeString)) + return V3RoleCode.GPARNT; + if ("NAT".equals(codeString)) + return V3RoleCode.NAT; + if ("NIENE".equals(codeString)) + return V3RoleCode.NIENE; + if ("PARNT".equals(codeString)) + return V3RoleCode.PARNT; + if ("SPSE".equals(codeString)) + return V3RoleCode.SPSE; + if ("STEP".equals(codeString)) + return V3RoleCode.STEP; + if ("_CoveredPartyRoleType".equals(codeString)) + return V3RoleCode._COVEREDPARTYROLETYPE; + if ("_ClaimantCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._CLAIMANTCOVEREDPARTYROLETYPE; + if ("CRIMEVIC".equals(codeString)) + return V3RoleCode.CRIMEVIC; + if ("INJWKR".equals(codeString)) + return V3RoleCode.INJWKR; + if ("_DependentCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._DEPENDENTCOVEREDPARTYROLETYPE; + if ("COCBEN".equals(codeString)) + return V3RoleCode.COCBEN; + if ("DIFFABL".equals(codeString)) + return V3RoleCode.DIFFABL; + if ("WARD".equals(codeString)) + return V3RoleCode.WARD; + if ("_IndividualInsuredPartyRoleType".equals(codeString)) + return V3RoleCode._INDIVIDUALINSUREDPARTYROLETYPE; + if ("RETIREE".equals(codeString)) + return V3RoleCode.RETIREE; + if ("_ProgramEligiblePartyRoleType".equals(codeString)) + return V3RoleCode._PROGRAMELIGIBLEPARTYROLETYPE; + if ("INDIG".equals(codeString)) + return V3RoleCode.INDIG; + if ("MIL".equals(codeString)) + return V3RoleCode.MIL; + if ("ACTMIL".equals(codeString)) + return V3RoleCode.ACTMIL; + if ("RETMIL".equals(codeString)) + return V3RoleCode.RETMIL; + if ("VET".equals(codeString)) + return V3RoleCode.VET; + if ("_SubscriberCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._SUBSCRIBERCOVEREDPARTYROLETYPE; + if ("_ResearchSubjectRoleBasis".equals(codeString)) + return V3RoleCode._RESEARCHSUBJECTROLEBASIS; + if ("ERL".equals(codeString)) + return V3RoleCode.ERL; + if ("SCN".equals(codeString)) + return V3RoleCode.SCN; + if ("_ServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._SERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedClinicalLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDCLINICALLOCATIONROLETYPE; + if ("DX".equals(codeString)) + return V3RoleCode.DX; + if ("CVDX".equals(codeString)) + return V3RoleCode.CVDX; + if ("CATH".equals(codeString)) + return V3RoleCode.CATH; + if ("ECHO".equals(codeString)) + return V3RoleCode.ECHO; + if ("GIDX".equals(codeString)) + return V3RoleCode.GIDX; + if ("ENDOS".equals(codeString)) + return V3RoleCode.ENDOS; + if ("RADDX".equals(codeString)) + return V3RoleCode.RADDX; + if ("RADO".equals(codeString)) + return V3RoleCode.RADO; + if ("RNEU".equals(codeString)) + return V3RoleCode.RNEU; + if ("HOSP".equals(codeString)) + return V3RoleCode.HOSP; + if ("CHR".equals(codeString)) + return V3RoleCode.CHR; + if ("GACH".equals(codeString)) + return V3RoleCode.GACH; + if ("MHSP".equals(codeString)) + return V3RoleCode.MHSP; + if ("PSYCHF".equals(codeString)) + return V3RoleCode.PSYCHF; + if ("RH".equals(codeString)) + return V3RoleCode.RH; + if ("RHAT".equals(codeString)) + return V3RoleCode.RHAT; + if ("RHII".equals(codeString)) + return V3RoleCode.RHII; + if ("RHMAD".equals(codeString)) + return V3RoleCode.RHMAD; + if ("RHPI".equals(codeString)) + return V3RoleCode.RHPI; + if ("RHPIH".equals(codeString)) + return V3RoleCode.RHPIH; + if ("RHPIMS".equals(codeString)) + return V3RoleCode.RHPIMS; + if ("RHPIVS".equals(codeString)) + return V3RoleCode.RHPIVS; + if ("RHYAD".equals(codeString)) + return V3RoleCode.RHYAD; + if ("HU".equals(codeString)) + return V3RoleCode.HU; + if ("BMTU".equals(codeString)) + return V3RoleCode.BMTU; + if ("CCU".equals(codeString)) + return V3RoleCode.CCU; + if ("CHEST".equals(codeString)) + return V3RoleCode.CHEST; + if ("EPIL".equals(codeString)) + return V3RoleCode.EPIL; + if ("ER".equals(codeString)) + return V3RoleCode.ER; + if ("ETU".equals(codeString)) + return V3RoleCode.ETU; + if ("HD".equals(codeString)) + return V3RoleCode.HD; + if ("HLAB".equals(codeString)) + return V3RoleCode.HLAB; + if ("INLAB".equals(codeString)) + return V3RoleCode.INLAB; + if ("OUTLAB".equals(codeString)) + return V3RoleCode.OUTLAB; + if ("HRAD".equals(codeString)) + return V3RoleCode.HRAD; + if ("HUSCS".equals(codeString)) + return V3RoleCode.HUSCS; + if ("ICU".equals(codeString)) + return V3RoleCode.ICU; + if ("PEDICU".equals(codeString)) + return V3RoleCode.PEDICU; + if ("PEDNICU".equals(codeString)) + return V3RoleCode.PEDNICU; + if ("INPHARM".equals(codeString)) + return V3RoleCode.INPHARM; + if ("MBL".equals(codeString)) + return V3RoleCode.MBL; + if ("NCCS".equals(codeString)) + return V3RoleCode.NCCS; + if ("NS".equals(codeString)) + return V3RoleCode.NS; + if ("OUTPHARM".equals(codeString)) + return V3RoleCode.OUTPHARM; + if ("PEDU".equals(codeString)) + return V3RoleCode.PEDU; + if ("PHU".equals(codeString)) + return V3RoleCode.PHU; + if ("RHU".equals(codeString)) + return V3RoleCode.RHU; + if ("SLEEP".equals(codeString)) + return V3RoleCode.SLEEP; + if ("NCCF".equals(codeString)) + return V3RoleCode.NCCF; + if ("SNF".equals(codeString)) + return V3RoleCode.SNF; + if ("OF".equals(codeString)) + return V3RoleCode.OF; + if ("ALL".equals(codeString)) + return V3RoleCode.ALL; + if ("AMPUT".equals(codeString)) + return V3RoleCode.AMPUT; + if ("BMTC".equals(codeString)) + return V3RoleCode.BMTC; + if ("BREAST".equals(codeString)) + return V3RoleCode.BREAST; + if ("CANC".equals(codeString)) + return V3RoleCode.CANC; + if ("CAPC".equals(codeString)) + return V3RoleCode.CAPC; + if ("CARD".equals(codeString)) + return V3RoleCode.CARD; + if ("PEDCARD".equals(codeString)) + return V3RoleCode.PEDCARD; + if ("COAG".equals(codeString)) + return V3RoleCode.COAG; + if ("CRS".equals(codeString)) + return V3RoleCode.CRS; + if ("DERM".equals(codeString)) + return V3RoleCode.DERM; + if ("ENDO".equals(codeString)) + return V3RoleCode.ENDO; + if ("PEDE".equals(codeString)) + return V3RoleCode.PEDE; + if ("ENT".equals(codeString)) + return V3RoleCode.ENT; + if ("FMC".equals(codeString)) + return V3RoleCode.FMC; + if ("GI".equals(codeString)) + return V3RoleCode.GI; + if ("PEDGI".equals(codeString)) + return V3RoleCode.PEDGI; + if ("GIM".equals(codeString)) + return V3RoleCode.GIM; + if ("GYN".equals(codeString)) + return V3RoleCode.GYN; + if ("HEM".equals(codeString)) + return V3RoleCode.HEM; + if ("PEDHEM".equals(codeString)) + return V3RoleCode.PEDHEM; + if ("HTN".equals(codeString)) + return V3RoleCode.HTN; + if ("IEC".equals(codeString)) + return V3RoleCode.IEC; + if ("INFD".equals(codeString)) + return V3RoleCode.INFD; + if ("PEDID".equals(codeString)) + return V3RoleCode.PEDID; + if ("INV".equals(codeString)) + return V3RoleCode.INV; + if ("LYMPH".equals(codeString)) + return V3RoleCode.LYMPH; + if ("MGEN".equals(codeString)) + return V3RoleCode.MGEN; + if ("NEPH".equals(codeString)) + return V3RoleCode.NEPH; + if ("PEDNEPH".equals(codeString)) + return V3RoleCode.PEDNEPH; + if ("NEUR".equals(codeString)) + return V3RoleCode.NEUR; + if ("OB".equals(codeString)) + return V3RoleCode.OB; + if ("OMS".equals(codeString)) + return V3RoleCode.OMS; + if ("ONCL".equals(codeString)) + return V3RoleCode.ONCL; + if ("PEDHO".equals(codeString)) + return V3RoleCode.PEDHO; + if ("OPH".equals(codeString)) + return V3RoleCode.OPH; + if ("OPTC".equals(codeString)) + return V3RoleCode.OPTC; + if ("ORTHO".equals(codeString)) + return V3RoleCode.ORTHO; + if ("HAND".equals(codeString)) + return V3RoleCode.HAND; + if ("PAINCL".equals(codeString)) + return V3RoleCode.PAINCL; + if ("PC".equals(codeString)) + return V3RoleCode.PC; + if ("PEDC".equals(codeString)) + return V3RoleCode.PEDC; + if ("PEDRHEUM".equals(codeString)) + return V3RoleCode.PEDRHEUM; + if ("POD".equals(codeString)) + return V3RoleCode.POD; + if ("PREV".equals(codeString)) + return V3RoleCode.PREV; + if ("PROCTO".equals(codeString)) + return V3RoleCode.PROCTO; + if ("PROFF".equals(codeString)) + return V3RoleCode.PROFF; + if ("PROS".equals(codeString)) + return V3RoleCode.PROS; + if ("PSI".equals(codeString)) + return V3RoleCode.PSI; + if ("PSY".equals(codeString)) + return V3RoleCode.PSY; + if ("RHEUM".equals(codeString)) + return V3RoleCode.RHEUM; + if ("SPMED".equals(codeString)) + return V3RoleCode.SPMED; + if ("SU".equals(codeString)) + return V3RoleCode.SU; + if ("PLS".equals(codeString)) + return V3RoleCode.PLS; + if ("URO".equals(codeString)) + return V3RoleCode.URO; + if ("TR".equals(codeString)) + return V3RoleCode.TR; + if ("TRAVEL".equals(codeString)) + return V3RoleCode.TRAVEL; + if ("WND".equals(codeString)) + return V3RoleCode.WND; + if ("RTF".equals(codeString)) + return V3RoleCode.RTF; + if ("PRC".equals(codeString)) + return V3RoleCode.PRC; + if ("SURF".equals(codeString)) + return V3RoleCode.SURF; + if ("_DedicatedNonClinicalLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDNONCLINICALLOCATIONROLETYPE; + if ("DADDR".equals(codeString)) + return V3RoleCode.DADDR; + if ("MOBL".equals(codeString)) + return V3RoleCode.MOBL; + if ("AMB".equals(codeString)) + return V3RoleCode.AMB; + if ("PHARM".equals(codeString)) + return V3RoleCode.PHARM; + if ("_IncidentalServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE; + if ("ACC".equals(codeString)) + return V3RoleCode.ACC; + if ("COMM".equals(codeString)) + return V3RoleCode.COMM; + if ("CSC".equals(codeString)) + return V3RoleCode.CSC; + if ("PTRES".equals(codeString)) + return V3RoleCode.PTRES; + if ("SCHOOL".equals(codeString)) + return V3RoleCode.SCHOOL; + if ("UPC".equals(codeString)) + return V3RoleCode.UPC; + if ("WORK".equals(codeString)) + return V3RoleCode.WORK; + if ("_SpecimenRoleType".equals(codeString)) + return V3RoleCode._SPECIMENROLETYPE; + if ("C".equals(codeString)) + return V3RoleCode.C; + if ("G".equals(codeString)) + return V3RoleCode.G; + if ("L".equals(codeString)) + return V3RoleCode.L; + if ("P".equals(codeString)) + return V3RoleCode.P; + if ("Q".equals(codeString)) + return V3RoleCode.Q; + if ("B".equals(codeString)) + return V3RoleCode.B; + if ("E".equals(codeString)) + return V3RoleCode.E; + if ("F".equals(codeString)) + return V3RoleCode.F; + if ("O".equals(codeString)) + return V3RoleCode.O; + if ("V".equals(codeString)) + return V3RoleCode.V; + if ("R".equals(codeString)) + return V3RoleCode.R; + if ("CLAIM".equals(codeString)) + return V3RoleCode.CLAIM; + if ("communityLaboratory".equals(codeString)) + return V3RoleCode.COMMUNITYLABORATORY; + if ("GT".equals(codeString)) + return V3RoleCode.GT; + if ("homeHealth".equals(codeString)) + return V3RoleCode.HOMEHEALTH; + if ("laboratory".equals(codeString)) + return V3RoleCode.LABORATORY; + if ("pathologist".equals(codeString)) + return V3RoleCode.PATHOLOGIST; + if ("PH".equals(codeString)) + return V3RoleCode.PH; + if ("phlebotomist".equals(codeString)) + return V3RoleCode.PHLEBOTOMIST; + if ("PROG".equals(codeString)) + return V3RoleCode.PROG; + if ("PT".equals(codeString)) + return V3RoleCode.PT; + if ("subject".equals(codeString)) + return V3RoleCode.SUBJECT; + if ("thirdParty".equals(codeString)) + return V3RoleCode.THIRDPARTY; + if ("DEP".equals(codeString)) + return V3RoleCode.DEP; + if ("DEPEN".equals(codeString)) + return V3RoleCode.DEPEN; + if ("FM".equals(codeString)) + return V3RoleCode.FM; + if ("INDIV".equals(codeString)) + return V3RoleCode.INDIV; + if ("NAMED".equals(codeString)) + return V3RoleCode.NAMED; + if ("PSYCHCF".equals(codeString)) + return V3RoleCode.PSYCHCF; + if ("SUBSCR".equals(codeString)) + return V3RoleCode.SUBSCR; + throw new IllegalArgumentException("Unknown V3RoleCode code '"+codeString+"'"); + } + + public String toCode(V3RoleCode code) { + if (code == V3RoleCode._AFFILIATIONROLETYPE) + return "_AffiliationRoleType"; + if (code == V3RoleCode._COVERAGESPONSORROLETYPE) + return "_CoverageSponsorRoleType"; + if (code == V3RoleCode.FULLINS) + return "FULLINS"; + if (code == V3RoleCode.SELFINS) + return "SELFINS"; + if (code == V3RoleCode._PAYORROLETYPE) + return "_PayorRoleType"; + if (code == V3RoleCode.ENROLBKR) + return "ENROLBKR"; + if (code == V3RoleCode.TPA) + return "TPA"; + if (code == V3RoleCode.UMO) + return "UMO"; + if (code == V3RoleCode.RESPRSN) + return "RESPRSN"; + if (code == V3RoleCode.EXCEST) + return "EXCEST"; + if (code == V3RoleCode.GUADLTM) + return "GUADLTM"; + if (code == V3RoleCode.GUARD) + return "GUARD"; + if (code == V3RoleCode.POWATT) + return "POWATT"; + if (code == V3RoleCode.DPOWATT) + return "DPOWATT"; + if (code == V3RoleCode.HPOWATT) + return "HPOWATT"; + if (code == V3RoleCode.SPOWATT) + return "SPOWATT"; + if (code == V3RoleCode._ASSIGNEDROLETYPE) + return "_AssignedRoleType"; + if (code == V3RoleCode._ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE) + return "_AssignedNonPersonLivingSubjectRoleType"; + if (code == V3RoleCode.ASSIST) + return "ASSIST"; + if (code == V3RoleCode.BIOTH) + return "BIOTH"; + if (code == V3RoleCode.ANTIBIOT) + return "ANTIBIOT"; + if (code == V3RoleCode.DEBR) + return "DEBR"; + if (code == V3RoleCode.CCO) + return "CCO"; + if (code == V3RoleCode.SEE) + return "SEE"; + if (code == V3RoleCode.SNIFF) + return "SNIFF"; + if (code == V3RoleCode._CERTIFIEDENTITYTYPE) + return "_CertifiedEntityType"; + if (code == V3RoleCode._CITIZENROLETYPE) + return "_CitizenRoleType"; + if (code == V3RoleCode.CAS) + return "CAS"; + if (code == V3RoleCode.CASM) + return "CASM"; + if (code == V3RoleCode.CN) + return "CN"; + if (code == V3RoleCode.CNRP) + return "CNRP"; + if (code == V3RoleCode.CNRPM) + return "CNRPM"; + if (code == V3RoleCode.CPCA) + return "CPCA"; + if (code == V3RoleCode.CRP) + return "CRP"; + if (code == V3RoleCode.CRPM) + return "CRPM"; + if (code == V3RoleCode._CONTACTROLETYPE) + return "_ContactRoleType"; + if (code == V3RoleCode._ADMINISTRATIVECONTACTROLETYPE) + return "_AdministrativeContactRoleType"; + if (code == V3RoleCode.BILL) + return "BILL"; + if (code == V3RoleCode.ORG) + return "ORG"; + if (code == V3RoleCode.PAYOR) + return "PAYOR"; + if (code == V3RoleCode.ECON) + return "ECON"; + if (code == V3RoleCode.NOK) + return "NOK"; + if (code == V3RoleCode._IDENTIFIEDENTITYTYPE) + return "_IdentifiedEntityType"; + if (code == V3RoleCode._LOCATIONIDENTIFIEDENTITYROLECODE) + return "_LocationIdentifiedEntityRoleCode"; + if (code == V3RoleCode.ACHFID) + return "ACHFID"; + if (code == V3RoleCode.JURID) + return "JURID"; + if (code == V3RoleCode.LOCHFID) + return "LOCHFID"; + if (code == V3RoleCode._LIVINGSUBJECTPRODUCTIONCLASS) + return "_LivingSubjectProductionClass"; + if (code == V3RoleCode.BF) + return "BF"; + if (code == V3RoleCode.BL) + return "BL"; + if (code == V3RoleCode.BR) + return "BR"; + if (code == V3RoleCode.CO) + return "CO"; + if (code == V3RoleCode.DA) + return "DA"; + if (code == V3RoleCode.DR) + return "DR"; + if (code == V3RoleCode.DU) + return "DU"; + if (code == V3RoleCode.FI) + return "FI"; + if (code == V3RoleCode.LY) + return "LY"; + if (code == V3RoleCode.MT) + return "MT"; + if (code == V3RoleCode.MU) + return "MU"; + if (code == V3RoleCode.PL) + return "PL"; + if (code == V3RoleCode.RC) + return "RC"; + if (code == V3RoleCode.SH) + return "SH"; + if (code == V3RoleCode.VL) + return "VL"; + if (code == V3RoleCode.WL) + return "WL"; + if (code == V3RoleCode.WO) + return "WO"; + if (code == V3RoleCode._MEDICATIONGENERALIZATIONROLETYPE) + return "_MedicationGeneralizationRoleType"; + if (code == V3RoleCode.DC) + return "DC"; + if (code == V3RoleCode.GD) + return "GD"; + if (code == V3RoleCode.GDF) + return "GDF"; + if (code == V3RoleCode.GDS) + return "GDS"; + if (code == V3RoleCode.GDSF) + return "GDSF"; + if (code == V3RoleCode.MGDSF) + return "MGDSF"; + if (code == V3RoleCode._MEMBERROLETYPE) + return "_MemberRoleType"; + if (code == V3RoleCode.TRB) + return "TRB"; + if (code == V3RoleCode._PERSONALRELATIONSHIPROLETYPE) + return "_PersonalRelationshipRoleType"; + if (code == V3RoleCode.FAMMEMB) + return "FAMMEMB"; + if (code == V3RoleCode.CHILD) + return "CHILD"; + if (code == V3RoleCode.CHLDADOPT) + return "CHLDADOPT"; + if (code == V3RoleCode.DAUADOPT) + return "DAUADOPT"; + if (code == V3RoleCode.SONADOPT) + return "SONADOPT"; + if (code == V3RoleCode.CHLDFOST) + return "CHLDFOST"; + if (code == V3RoleCode.DAUFOST) + return "DAUFOST"; + if (code == V3RoleCode.SONFOST) + return "SONFOST"; + if (code == V3RoleCode.DAUC) + return "DAUC"; + if (code == V3RoleCode.DAU) + return "DAU"; + if (code == V3RoleCode.STPDAU) + return "STPDAU"; + if (code == V3RoleCode.NCHILD) + return "NCHILD"; + if (code == V3RoleCode.SON) + return "SON"; + if (code == V3RoleCode.SONC) + return "SONC"; + if (code == V3RoleCode.STPSON) + return "STPSON"; + if (code == V3RoleCode.STPCHLD) + return "STPCHLD"; + if (code == V3RoleCode.EXT) + return "EXT"; + if (code == V3RoleCode.AUNT) + return "AUNT"; + if (code == V3RoleCode.MAUNT) + return "MAUNT"; + if (code == V3RoleCode.PAUNT) + return "PAUNT"; + if (code == V3RoleCode.COUSN) + return "COUSN"; + if (code == V3RoleCode.MCOUSN) + return "MCOUSN"; + if (code == V3RoleCode.PCOUSN) + return "PCOUSN"; + if (code == V3RoleCode.GGRPRN) + return "GGRPRN"; + if (code == V3RoleCode.GGRFTH) + return "GGRFTH"; + if (code == V3RoleCode.MGGRFTH) + return "MGGRFTH"; + if (code == V3RoleCode.PGGRFTH) + return "PGGRFTH"; + if (code == V3RoleCode.GGRMTH) + return "GGRMTH"; + if (code == V3RoleCode.MGGRMTH) + return "MGGRMTH"; + if (code == V3RoleCode.PGGRMTH) + return "PGGRMTH"; + if (code == V3RoleCode.MGGRPRN) + return "MGGRPRN"; + if (code == V3RoleCode.PGGRPRN) + return "PGGRPRN"; + if (code == V3RoleCode.GRNDCHILD) + return "GRNDCHILD"; + if (code == V3RoleCode.GRNDDAU) + return "GRNDDAU"; + if (code == V3RoleCode.GRNDSON) + return "GRNDSON"; + if (code == V3RoleCode.GRPRN) + return "GRPRN"; + if (code == V3RoleCode.GRFTH) + return "GRFTH"; + if (code == V3RoleCode.MGRFTH) + return "MGRFTH"; + if (code == V3RoleCode.PGRFTH) + return "PGRFTH"; + if (code == V3RoleCode.GRMTH) + return "GRMTH"; + if (code == V3RoleCode.MGRMTH) + return "MGRMTH"; + if (code == V3RoleCode.PGRMTH) + return "PGRMTH"; + if (code == V3RoleCode.MGRPRN) + return "MGRPRN"; + if (code == V3RoleCode.PGRPRN) + return "PGRPRN"; + if (code == V3RoleCode.INLAW) + return "INLAW"; + if (code == V3RoleCode.CHLDINLAW) + return "CHLDINLAW"; + if (code == V3RoleCode.DAUINLAW) + return "DAUINLAW"; + if (code == V3RoleCode.SONINLAW) + return "SONINLAW"; + if (code == V3RoleCode.PRNINLAW) + return "PRNINLAW"; + if (code == V3RoleCode.FTHINLAW) + return "FTHINLAW"; + if (code == V3RoleCode.MTHINLAW) + return "MTHINLAW"; + if (code == V3RoleCode.SIBINLAW) + return "SIBINLAW"; + if (code == V3RoleCode.BROINLAW) + return "BROINLAW"; + if (code == V3RoleCode.SISINLAW) + return "SISINLAW"; + if (code == V3RoleCode.NIENEPH) + return "NIENEPH"; + if (code == V3RoleCode.NEPHEW) + return "NEPHEW"; + if (code == V3RoleCode.NIECE) + return "NIECE"; + if (code == V3RoleCode.UNCLE) + return "UNCLE"; + if (code == V3RoleCode.MUNCLE) + return "MUNCLE"; + if (code == V3RoleCode.PUNCLE) + return "PUNCLE"; + if (code == V3RoleCode.PRN) + return "PRN"; + if (code == V3RoleCode.ADOPTP) + return "ADOPTP"; + if (code == V3RoleCode.ADOPTF) + return "ADOPTF"; + if (code == V3RoleCode.ADOPTM) + return "ADOPTM"; + if (code == V3RoleCode.FTH) + return "FTH"; + if (code == V3RoleCode.FTHFOST) + return "FTHFOST"; + if (code == V3RoleCode.NFTH) + return "NFTH"; + if (code == V3RoleCode.NFTHF) + return "NFTHF"; + if (code == V3RoleCode.STPFTH) + return "STPFTH"; + if (code == V3RoleCode.MTH) + return "MTH"; + if (code == V3RoleCode.GESTM) + return "GESTM"; + if (code == V3RoleCode.MTHFOST) + return "MTHFOST"; + if (code == V3RoleCode.NMTH) + return "NMTH"; + if (code == V3RoleCode.NMTHF) + return "NMTHF"; + if (code == V3RoleCode.STPMTH) + return "STPMTH"; + if (code == V3RoleCode.NPRN) + return "NPRN"; + if (code == V3RoleCode.PRNFOST) + return "PRNFOST"; + if (code == V3RoleCode.STPPRN) + return "STPPRN"; + if (code == V3RoleCode.SIB) + return "SIB"; + if (code == V3RoleCode.BRO) + return "BRO"; + if (code == V3RoleCode.HBRO) + return "HBRO"; + if (code == V3RoleCode.NBRO) + return "NBRO"; + if (code == V3RoleCode.TWINBRO) + return "TWINBRO"; + if (code == V3RoleCode.FTWINBRO) + return "FTWINBRO"; + if (code == V3RoleCode.ITWINBRO) + return "ITWINBRO"; + if (code == V3RoleCode.STPBRO) + return "STPBRO"; + if (code == V3RoleCode.HSIB) + return "HSIB"; + if (code == V3RoleCode.HSIS) + return "HSIS"; + if (code == V3RoleCode.NSIB) + return "NSIB"; + if (code == V3RoleCode.NSIS) + return "NSIS"; + if (code == V3RoleCode.TWINSIS) + return "TWINSIS"; + if (code == V3RoleCode.FTWINSIS) + return "FTWINSIS"; + if (code == V3RoleCode.ITWINSIS) + return "ITWINSIS"; + if (code == V3RoleCode.TWIN) + return "TWIN"; + if (code == V3RoleCode.FTWIN) + return "FTWIN"; + if (code == V3RoleCode.ITWIN) + return "ITWIN"; + if (code == V3RoleCode.SIS) + return "SIS"; + if (code == V3RoleCode.STPSIS) + return "STPSIS"; + if (code == V3RoleCode.STPSIB) + return "STPSIB"; + if (code == V3RoleCode.SIGOTHR) + return "SIGOTHR"; + if (code == V3RoleCode.DOMPART) + return "DOMPART"; + if (code == V3RoleCode.FMRSPS) + return "FMRSPS"; + if (code == V3RoleCode.SPS) + return "SPS"; + if (code == V3RoleCode.HUSB) + return "HUSB"; + if (code == V3RoleCode.WIFE) + return "WIFE"; + if (code == V3RoleCode.FRND) + return "FRND"; + if (code == V3RoleCode.NBOR) + return "NBOR"; + if (code == V3RoleCode.ONESELF) + return "ONESELF"; + if (code == V3RoleCode.ROOM) + return "ROOM"; + if (code == V3RoleCode._POLICYORPROGRAMCOVERAGEROLETYPE) + return "_PolicyOrProgramCoverageRoleType"; + if (code == V3RoleCode._COVERAGEROLETYPE) + return "_CoverageRoleType"; + if (code == V3RoleCode.FAMDEP) + return "FAMDEP"; + if (code == V3RoleCode.HANDIC) + return "HANDIC"; + if (code == V3RoleCode.INJ) + return "INJ"; + if (code == V3RoleCode.SELF) + return "SELF"; + if (code == V3RoleCode.SPON) + return "SPON"; + if (code == V3RoleCode.STUD) + return "STUD"; + if (code == V3RoleCode.FSTUD) + return "FSTUD"; + if (code == V3RoleCode.PSTUD) + return "PSTUD"; + if (code == V3RoleCode.ADOPT) + return "ADOPT"; + if (code == V3RoleCode.GCHILD) + return "GCHILD"; + if (code == V3RoleCode.GPARNT) + return "GPARNT"; + if (code == V3RoleCode.NAT) + return "NAT"; + if (code == V3RoleCode.NIENE) + return "NIENE"; + if (code == V3RoleCode.PARNT) + return "PARNT"; + if (code == V3RoleCode.SPSE) + return "SPSE"; + if (code == V3RoleCode.STEP) + return "STEP"; + if (code == V3RoleCode._COVEREDPARTYROLETYPE) + return "_CoveredPartyRoleType"; + if (code == V3RoleCode._CLAIMANTCOVEREDPARTYROLETYPE) + return "_ClaimantCoveredPartyRoleType"; + if (code == V3RoleCode.CRIMEVIC) + return "CRIMEVIC"; + if (code == V3RoleCode.INJWKR) + return "INJWKR"; + if (code == V3RoleCode._DEPENDENTCOVEREDPARTYROLETYPE) + return "_DependentCoveredPartyRoleType"; + if (code == V3RoleCode.COCBEN) + return "COCBEN"; + if (code == V3RoleCode.DIFFABL) + return "DIFFABL"; + if (code == V3RoleCode.WARD) + return "WARD"; + if (code == V3RoleCode._INDIVIDUALINSUREDPARTYROLETYPE) + return "_IndividualInsuredPartyRoleType"; + if (code == V3RoleCode.RETIREE) + return "RETIREE"; + if (code == V3RoleCode._PROGRAMELIGIBLEPARTYROLETYPE) + return "_ProgramEligiblePartyRoleType"; + if (code == V3RoleCode.INDIG) + return "INDIG"; + if (code == V3RoleCode.MIL) + return "MIL"; + if (code == V3RoleCode.ACTMIL) + return "ACTMIL"; + if (code == V3RoleCode.RETMIL) + return "RETMIL"; + if (code == V3RoleCode.VET) + return "VET"; + if (code == V3RoleCode._SUBSCRIBERCOVEREDPARTYROLETYPE) + return "_SubscriberCoveredPartyRoleType"; + if (code == V3RoleCode._RESEARCHSUBJECTROLEBASIS) + return "_ResearchSubjectRoleBasis"; + if (code == V3RoleCode.ERL) + return "ERL"; + if (code == V3RoleCode.SCN) + return "SCN"; + if (code == V3RoleCode._SERVICEDELIVERYLOCATIONROLETYPE) + return "_ServiceDeliveryLocationRoleType"; + if (code == V3RoleCode._DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE) + return "_DedicatedServiceDeliveryLocationRoleType"; + if (code == V3RoleCode._DEDICATEDCLINICALLOCATIONROLETYPE) + return "_DedicatedClinicalLocationRoleType"; + if (code == V3RoleCode.DX) + return "DX"; + if (code == V3RoleCode.CVDX) + return "CVDX"; + if (code == V3RoleCode.CATH) + return "CATH"; + if (code == V3RoleCode.ECHO) + return "ECHO"; + if (code == V3RoleCode.GIDX) + return "GIDX"; + if (code == V3RoleCode.ENDOS) + return "ENDOS"; + if (code == V3RoleCode.RADDX) + return "RADDX"; + if (code == V3RoleCode.RADO) + return "RADO"; + if (code == V3RoleCode.RNEU) + return "RNEU"; + if (code == V3RoleCode.HOSP) + return "HOSP"; + if (code == V3RoleCode.CHR) + return "CHR"; + if (code == V3RoleCode.GACH) + return "GACH"; + if (code == V3RoleCode.MHSP) + return "MHSP"; + if (code == V3RoleCode.PSYCHF) + return "PSYCHF"; + if (code == V3RoleCode.RH) + return "RH"; + if (code == V3RoleCode.RHAT) + return "RHAT"; + if (code == V3RoleCode.RHII) + return "RHII"; + if (code == V3RoleCode.RHMAD) + return "RHMAD"; + if (code == V3RoleCode.RHPI) + return "RHPI"; + if (code == V3RoleCode.RHPIH) + return "RHPIH"; + if (code == V3RoleCode.RHPIMS) + return "RHPIMS"; + if (code == V3RoleCode.RHPIVS) + return "RHPIVS"; + if (code == V3RoleCode.RHYAD) + return "RHYAD"; + if (code == V3RoleCode.HU) + return "HU"; + if (code == V3RoleCode.BMTU) + return "BMTU"; + if (code == V3RoleCode.CCU) + return "CCU"; + if (code == V3RoleCode.CHEST) + return "CHEST"; + if (code == V3RoleCode.EPIL) + return "EPIL"; + if (code == V3RoleCode.ER) + return "ER"; + if (code == V3RoleCode.ETU) + return "ETU"; + if (code == V3RoleCode.HD) + return "HD"; + if (code == V3RoleCode.HLAB) + return "HLAB"; + if (code == V3RoleCode.INLAB) + return "INLAB"; + if (code == V3RoleCode.OUTLAB) + return "OUTLAB"; + if (code == V3RoleCode.HRAD) + return "HRAD"; + if (code == V3RoleCode.HUSCS) + return "HUSCS"; + if (code == V3RoleCode.ICU) + return "ICU"; + if (code == V3RoleCode.PEDICU) + return "PEDICU"; + if (code == V3RoleCode.PEDNICU) + return "PEDNICU"; + if (code == V3RoleCode.INPHARM) + return "INPHARM"; + if (code == V3RoleCode.MBL) + return "MBL"; + if (code == V3RoleCode.NCCS) + return "NCCS"; + if (code == V3RoleCode.NS) + return "NS"; + if (code == V3RoleCode.OUTPHARM) + return "OUTPHARM"; + if (code == V3RoleCode.PEDU) + return "PEDU"; + if (code == V3RoleCode.PHU) + return "PHU"; + if (code == V3RoleCode.RHU) + return "RHU"; + if (code == V3RoleCode.SLEEP) + return "SLEEP"; + if (code == V3RoleCode.NCCF) + return "NCCF"; + if (code == V3RoleCode.SNF) + return "SNF"; + if (code == V3RoleCode.OF) + return "OF"; + if (code == V3RoleCode.ALL) + return "ALL"; + if (code == V3RoleCode.AMPUT) + return "AMPUT"; + if (code == V3RoleCode.BMTC) + return "BMTC"; + if (code == V3RoleCode.BREAST) + return "BREAST"; + if (code == V3RoleCode.CANC) + return "CANC"; + if (code == V3RoleCode.CAPC) + return "CAPC"; + if (code == V3RoleCode.CARD) + return "CARD"; + if (code == V3RoleCode.PEDCARD) + return "PEDCARD"; + if (code == V3RoleCode.COAG) + return "COAG"; + if (code == V3RoleCode.CRS) + return "CRS"; + if (code == V3RoleCode.DERM) + return "DERM"; + if (code == V3RoleCode.ENDO) + return "ENDO"; + if (code == V3RoleCode.PEDE) + return "PEDE"; + if (code == V3RoleCode.ENT) + return "ENT"; + if (code == V3RoleCode.FMC) + return "FMC"; + if (code == V3RoleCode.GI) + return "GI"; + if (code == V3RoleCode.PEDGI) + return "PEDGI"; + if (code == V3RoleCode.GIM) + return "GIM"; + if (code == V3RoleCode.GYN) + return "GYN"; + if (code == V3RoleCode.HEM) + return "HEM"; + if (code == V3RoleCode.PEDHEM) + return "PEDHEM"; + if (code == V3RoleCode.HTN) + return "HTN"; + if (code == V3RoleCode.IEC) + return "IEC"; + if (code == V3RoleCode.INFD) + return "INFD"; + if (code == V3RoleCode.PEDID) + return "PEDID"; + if (code == V3RoleCode.INV) + return "INV"; + if (code == V3RoleCode.LYMPH) + return "LYMPH"; + if (code == V3RoleCode.MGEN) + return "MGEN"; + if (code == V3RoleCode.NEPH) + return "NEPH"; + if (code == V3RoleCode.PEDNEPH) + return "PEDNEPH"; + if (code == V3RoleCode.NEUR) + return "NEUR"; + if (code == V3RoleCode.OB) + return "OB"; + if (code == V3RoleCode.OMS) + return "OMS"; + if (code == V3RoleCode.ONCL) + return "ONCL"; + if (code == V3RoleCode.PEDHO) + return "PEDHO"; + if (code == V3RoleCode.OPH) + return "OPH"; + if (code == V3RoleCode.OPTC) + return "OPTC"; + if (code == V3RoleCode.ORTHO) + return "ORTHO"; + if (code == V3RoleCode.HAND) + return "HAND"; + if (code == V3RoleCode.PAINCL) + return "PAINCL"; + if (code == V3RoleCode.PC) + return "PC"; + if (code == V3RoleCode.PEDC) + return "PEDC"; + if (code == V3RoleCode.PEDRHEUM) + return "PEDRHEUM"; + if (code == V3RoleCode.POD) + return "POD"; + if (code == V3RoleCode.PREV) + return "PREV"; + if (code == V3RoleCode.PROCTO) + return "PROCTO"; + if (code == V3RoleCode.PROFF) + return "PROFF"; + if (code == V3RoleCode.PROS) + return "PROS"; + if (code == V3RoleCode.PSI) + return "PSI"; + if (code == V3RoleCode.PSY) + return "PSY"; + if (code == V3RoleCode.RHEUM) + return "RHEUM"; + if (code == V3RoleCode.SPMED) + return "SPMED"; + if (code == V3RoleCode.SU) + return "SU"; + if (code == V3RoleCode.PLS) + return "PLS"; + if (code == V3RoleCode.URO) + return "URO"; + if (code == V3RoleCode.TR) + return "TR"; + if (code == V3RoleCode.TRAVEL) + return "TRAVEL"; + if (code == V3RoleCode.WND) + return "WND"; + if (code == V3RoleCode.RTF) + return "RTF"; + if (code == V3RoleCode.PRC) + return "PRC"; + if (code == V3RoleCode.SURF) + return "SURF"; + if (code == V3RoleCode._DEDICATEDNONCLINICALLOCATIONROLETYPE) + return "_DedicatedNonClinicalLocationRoleType"; + if (code == V3RoleCode.DADDR) + return "DADDR"; + if (code == V3RoleCode.MOBL) + return "MOBL"; + if (code == V3RoleCode.AMB) + return "AMB"; + if (code == V3RoleCode.PHARM) + return "PHARM"; + if (code == V3RoleCode._INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE) + return "_IncidentalServiceDeliveryLocationRoleType"; + if (code == V3RoleCode.ACC) + return "ACC"; + if (code == V3RoleCode.COMM) + return "COMM"; + if (code == V3RoleCode.CSC) + return "CSC"; + if (code == V3RoleCode.PTRES) + return "PTRES"; + if (code == V3RoleCode.SCHOOL) + return "SCHOOL"; + if (code == V3RoleCode.UPC) + return "UPC"; + if (code == V3RoleCode.WORK) + return "WORK"; + if (code == V3RoleCode._SPECIMENROLETYPE) + return "_SpecimenRoleType"; + if (code == V3RoleCode.C) + return "C"; + if (code == V3RoleCode.G) + return "G"; + if (code == V3RoleCode.L) + return "L"; + if (code == V3RoleCode.P) + return "P"; + if (code == V3RoleCode.Q) + return "Q"; + if (code == V3RoleCode.B) + return "B"; + if (code == V3RoleCode.E) + return "E"; + if (code == V3RoleCode.F) + return "F"; + if (code == V3RoleCode.O) + return "O"; + if (code == V3RoleCode.V) + return "V"; + if (code == V3RoleCode.R) + return "R"; + if (code == V3RoleCode.CLAIM) + return "CLAIM"; + if (code == V3RoleCode.COMMUNITYLABORATORY) + return "communityLaboratory"; + if (code == V3RoleCode.GT) + return "GT"; + if (code == V3RoleCode.HOMEHEALTH) + return "homeHealth"; + if (code == V3RoleCode.LABORATORY) + return "laboratory"; + if (code == V3RoleCode.PATHOLOGIST) + return "pathologist"; + if (code == V3RoleCode.PH) + return "PH"; + if (code == V3RoleCode.PHLEBOTOMIST) + return "phlebotomist"; + if (code == V3RoleCode.PROG) + return "PROG"; + if (code == V3RoleCode.PT) + return "PT"; + if (code == V3RoleCode.SUBJECT) + return "subject"; + if (code == V3RoleCode.THIRDPARTY) + return "thirdParty"; + if (code == V3RoleCode.DEP) + return "DEP"; + if (code == V3RoleCode.DEPEN) + return "DEPEN"; + if (code == V3RoleCode.FM) + return "FM"; + if (code == V3RoleCode.INDIV) + return "INDIV"; + if (code == V3RoleCode.NAMED) + return "NAMED"; + if (code == V3RoleCode.PSYCHCF) + return "PSYCHCF"; + if (code == V3RoleCode.SUBSCR) + return "SUBSCR"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatus.java new file mode 100644 index 00000000000..4bade9932fb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleLinkStatus { + + /** + * Description: The 'typical' state. Excludes "nullified" which represents the termination state of a RoleLink instance that was created in error. + */ + NORMAL, + /** + * Description: The state indicates the RoleLink is in progress. + */ + ACTIVE, + /** + * Description: The terminal state resulting from abandoning the RoleLink prior to or after activation. + */ + CANCELLED, + /** + * Description: The terminal state representing the successful completion of the RoleLink. + */ + COMPLETED, + /** + * Description: The state indicates the RoleLink has not yet become active. + */ + PENDING, + /** + * Description: The state representing the termination of a RoleLink instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3RoleLinkStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NORMAL".equals(codeString)) + return NORMAL; + if ("ACTIVE".equals(codeString)) + return ACTIVE; + if ("CANCELLED".equals(codeString)) + return CANCELLED; + if ("COMPLETED".equals(codeString)) + return COMPLETED; + if ("PENDING".equals(codeString)) + return PENDING; + if ("NULLIFIED".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3RoleLinkStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "NORMAL"; + case ACTIVE: return "ACTIVE"; + case CANCELLED: return "CANCELLED"; + case COMPLETED: return "COMPLETED"; + case PENDING: return "PENDING"; + case NULLIFIED: return "NULLIFIED"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleLinkStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "Description: The 'typical' state. Excludes \"nullified\" which represents the termination state of a RoleLink instance that was created in error."; + case ACTIVE: return "Description: The state indicates the RoleLink is in progress."; + case CANCELLED: return "Description: The terminal state resulting from abandoning the RoleLink prior to or after activation."; + case COMPLETED: return "Description: The terminal state representing the successful completion of the RoleLink."; + case PENDING: return "Description: The state indicates the RoleLink has not yet become active."; + case NULLIFIED: return "Description: The state representing the termination of a RoleLink instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatusEnumFactory.java new file mode 100644 index 00000000000..efc78ef0dee --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkStatusEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RoleLinkStatusEnumFactory implements EnumFactory { + + public V3RoleLinkStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NORMAL".equals(codeString)) + return V3RoleLinkStatus.NORMAL; + if ("ACTIVE".equals(codeString)) + return V3RoleLinkStatus.ACTIVE; + if ("CANCELLED".equals(codeString)) + return V3RoleLinkStatus.CANCELLED; + if ("COMPLETED".equals(codeString)) + return V3RoleLinkStatus.COMPLETED; + if ("PENDING".equals(codeString)) + return V3RoleLinkStatus.PENDING; + if ("NULLIFIED".equals(codeString)) + return V3RoleLinkStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3RoleLinkStatus code '"+codeString+"'"); + } + + public String toCode(V3RoleLinkStatus code) { + if (code == V3RoleLinkStatus.NORMAL) + return "NORMAL"; + if (code == V3RoleLinkStatus.ACTIVE) + return "ACTIVE"; + if (code == V3RoleLinkStatus.CANCELLED) + return "CANCELLED"; + if (code == V3RoleLinkStatus.COMPLETED) + return "COMPLETED"; + if (code == V3RoleLinkStatus.PENDING) + return "PENDING"; + if (code == V3RoleLinkStatus.NULLIFIED) + return "NULLIFIED"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkType.java new file mode 100644 index 00000000000..bc0e6539d84 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkType.java @@ -0,0 +1,143 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleLinkType { + + /** + * An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable. + + Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples: + */ + REL, + /** + * This relationship indicates the source Role is available to the target Role as a backup. An entity in a backup role will be available as a substitute or replacement in the event that the entity assigned the role is unavailable. In medical roles where it is critical that the function be performed and there is a possibility that the individual assigned may be ill or otherwise indisposed, another individual is assigned to cover for the individual originally assigned the role. A backup may be required to be identified, but unless the backup is actually used, he/she would not assume the assigned entity role. + */ + BACKUP, + /** + * This relationship indicates the target Role provides or receives information regarding the target role. For example, AssignedEntity is a contact for a ServiceDeliveryLocation. + */ + CONT, + /** + * The source Role has direct authority over the target role in a chain of authority. + */ + DIRAUTH, + /** + * Description: The source role provides identification for the target role. The source role must be IDENT. The player entity of the source role is constrained to be the same as (i.e. the equivalent of, or equal to) the player of the target role if present. If the player is absent from the source role, then it is assumed to be the same as the player of the target role. + */ + IDENT, + /** + * The source Role has indirect authority over the target role in a chain of authority. + */ + INDAUTH, + /** + * The target Role is part of the Source Role. + */ + PART, + /** + * This relationship indicates that the source Role replaces (or subsumes) the target Role. Allows for new identifiers and/or new effective time for a registry entry or a certification, etc. + */ + REPL, + /** + * added to help the parsers + */ + NULL; + public static V3RoleLinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("REL".equals(codeString)) + return REL; + if ("BACKUP".equals(codeString)) + return BACKUP; + if ("CONT".equals(codeString)) + return CONT; + if ("DIRAUTH".equals(codeString)) + return DIRAUTH; + if ("IDENT".equals(codeString)) + return IDENT; + if ("INDAUTH".equals(codeString)) + return INDAUTH; + if ("PART".equals(codeString)) + return PART; + if ("REPL".equals(codeString)) + return REPL; + throw new FHIRException("Unknown V3RoleLinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REL: return "REL"; + case BACKUP: return "BACKUP"; + case CONT: return "CONT"; + case DIRAUTH: return "DIRAUTH"; + case IDENT: return "IDENT"; + case INDAUTH: return "INDAUTH"; + case PART: return "PART"; + case REPL: return "REPL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleLinkType"; + } + public String getDefinition() { + switch (this) { + case REL: return "An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable.\r\n\n Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples:"; + case BACKUP: return "This relationship indicates the source Role is available to the target Role as a backup. An entity in a backup role will be available as a substitute or replacement in the event that the entity assigned the role is unavailable. In medical roles where it is critical that the function be performed and there is a possibility that the individual assigned may be ill or otherwise indisposed, another individual is assigned to cover for the individual originally assigned the role. A backup may be required to be identified, but unless the backup is actually used, he/she would not assume the assigned entity role."; + case CONT: return "This relationship indicates the target Role provides or receives information regarding the target role. For example, AssignedEntity is a contact for a ServiceDeliveryLocation."; + case DIRAUTH: return "The source Role has direct authority over the target role in a chain of authority."; + case IDENT: return "Description: The source role provides identification for the target role. The source role must be IDENT. The player entity of the source role is constrained to be the same as (i.e. the equivalent of, or equal to) the player of the target role if present. If the player is absent from the source role, then it is assumed to be the same as the player of the target role."; + case INDAUTH: return "The source Role has indirect authority over the target role in a chain of authority."; + case PART: return "The target Role is part of the Source Role."; + case REPL: return "This relationship indicates that the source Role replaces (or subsumes) the target Role. Allows for new identifiers and/or new effective time for a registry entry or a certification, etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REL: return "related"; + case BACKUP: return "is backup for"; + case CONT: return "has contact"; + case DIRAUTH: return "has direct authority over"; + case IDENT: return "Identification"; + case INDAUTH: return "has indirect authority over"; + case PART: return "has part"; + case REPL: return "replaces"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkTypeEnumFactory.java new file mode 100644 index 00000000000..e6eca024753 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleLinkTypeEnumFactory.java @@ -0,0 +1,83 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RoleLinkTypeEnumFactory implements EnumFactory { + + public V3RoleLinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("REL".equals(codeString)) + return V3RoleLinkType.REL; + if ("BACKUP".equals(codeString)) + return V3RoleLinkType.BACKUP; + if ("CONT".equals(codeString)) + return V3RoleLinkType.CONT; + if ("DIRAUTH".equals(codeString)) + return V3RoleLinkType.DIRAUTH; + if ("IDENT".equals(codeString)) + return V3RoleLinkType.IDENT; + if ("INDAUTH".equals(codeString)) + return V3RoleLinkType.INDAUTH; + if ("PART".equals(codeString)) + return V3RoleLinkType.PART; + if ("REPL".equals(codeString)) + return V3RoleLinkType.REPL; + throw new IllegalArgumentException("Unknown V3RoleLinkType code '"+codeString+"'"); + } + + public String toCode(V3RoleLinkType code) { + if (code == V3RoleLinkType.REL) + return "REL"; + if (code == V3RoleLinkType.BACKUP) + return "BACKUP"; + if (code == V3RoleLinkType.CONT) + return "CONT"; + if (code == V3RoleLinkType.DIRAUTH) + return "DIRAUTH"; + if (code == V3RoleLinkType.IDENT) + return "IDENT"; + if (code == V3RoleLinkType.INDAUTH) + return "INDAUTH"; + if (code == V3RoleLinkType.PART) + return "PART"; + if (code == V3RoleLinkType.REPL) + return "REPL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatus.java new file mode 100644 index 00000000000..d1652cf9e7e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of a Role instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Entity is currently active in the Role. + */ + ACTIVE, + /** + * The terminal state resulting from cancellation of the role prior to activation. + */ + CANCELLED, + /** + * The state representing that fact that the role has not yet become active. + */ + PENDING, + /** + * The state that represents a suspension of the Entity playing the Role. This state is arrived at from the "active" state. + */ + SUSPENDED, + /** + * The state representing the successful termination of the Role. + */ + TERMINATED, + /** + * The state representing the termination of a Role instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3RoleStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("pending".equals(codeString)) + return PENDING; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("terminated".equals(codeString)) + return TERMINATED; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3RoleStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case PENDING: return "pending"; + case SUSPENDED: return "suspended"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of a Role instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Entity is currently active in the Role."; + case CANCELLED: return "The terminal state resulting from cancellation of the role prior to activation."; + case PENDING: return "The state representing that fact that the role has not yet become active."; + case SUSPENDED: return "The state that represents a suspension of the Entity playing the Role. This state is arrived at from the \"active\" state."; + case TERMINATED: return "The state representing the successful termination of the Role."; + case NULLIFIED: return "The state representing the termination of a Role instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case PENDING: return "pending"; + case SUSPENDED: return "suspended"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatusEnumFactory.java new file mode 100644 index 00000000000..db55e8f83bd --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RoleStatusEnumFactory.java @@ -0,0 +1,79 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RoleStatusEnumFactory implements EnumFactory { + + public V3RoleStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3RoleStatus.NORMAL; + if ("active".equals(codeString)) + return V3RoleStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3RoleStatus.CANCELLED; + if ("pending".equals(codeString)) + return V3RoleStatus.PENDING; + if ("suspended".equals(codeString)) + return V3RoleStatus.SUSPENDED; + if ("terminated".equals(codeString)) + return V3RoleStatus.TERMINATED; + if ("nullified".equals(codeString)) + return V3RoleStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3RoleStatus code '"+codeString+"'"); + } + + public String toCode(V3RoleStatus code) { + if (code == V3RoleStatus.NORMAL) + return "normal"; + if (code == V3RoleStatus.ACTIVE) + return "active"; + if (code == V3RoleStatus.CANCELLED) + return "cancelled"; + if (code == V3RoleStatus.PENDING) + return "pending"; + if (code == V3RoleStatus.SUSPENDED) + return "suspended"; + if (code == V3RoleStatus.TERMINATED) + return "terminated"; + if (code == V3RoleStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministration.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministration.java new file mode 100644 index 00000000000..0e344a0157d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministration.java @@ -0,0 +1,3543 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RouteOfAdministration { + + /** + * Route of substance administration classified by administration method. + */ + _ROUTEBYMETHOD, + /** + * Immersion (soak) + */ + SOAK, + /** + * Shampoo + */ + SHAMPOO, + /** + * Translingual + */ + TRNSLING, + /** + * Swallow, oral + */ + PO, + /** + * Gargle + */ + GARGLE, + /** + * Suck, oromucosal + */ + SUCK, + /** + * Chew + */ + _CHEW, + /** + * Chew, oral + */ + CHEW, + /** + * Diffusion + */ + _DIFFUSION, + /** + * Diffusion, extracorporeal + */ + EXTCORPDIF, + /** + * Diffusion, hemodialysis + */ + HEMODIFF, + /** + * Diffusion, transdermal + */ + TRNSDERMD, + /** + * Dissolve + */ + _DISSOLVE, + /** + * Dissolve, oral + */ + DISSOLVE, + /** + * Dissolve, sublingual + */ + SL, + /** + * Douche + */ + _DOUCHE, + /** + * Douche, vaginal + */ + DOUCHE, + /** + * Electro-osmosis + */ + _ELECTROOSMOSISROUTE, + /** + * Electro-osmosis + */ + ELECTOSMOS, + /** + * Enema + */ + _ENEMA, + /** + * Enema, rectal + */ + ENEMA, + /** + * Enema, rectal retention + */ + RETENEMA, + /** + * Flush + */ + _FLUSH, + /** + * Flush, intravenous catheter + */ + IVFLUSH, + /** + * Implantation + */ + _IMPLANTATION, + /** + * Implantation, intradermal + */ + IDIMPLNT, + /** + * Implantation, intravitreal + */ + IVITIMPLNT, + /** + * Implantation, subcutaneous + */ + SQIMPLNT, + /** + * Infusion + */ + _INFUSION, + /** + * Infusion, epidural + */ + EPI, + /** + * Infusion, intraarterial catheter + */ + IA, + /** + * Infusion, intracardiac + */ + IC, + /** + * Infusion, intracoronary + */ + ICOR, + /** + * Infusion, intraosseous, continuous + */ + IOSSC, + /** + * Infusion, intrathecal + */ + IT, + /** + * Infusion, intravenous + */ + IV, + /** + * Infusion, intravenous catheter + */ + IVC, + /** + * Infusion, intravenous catheter, continuous + */ + IVCC, + /** + * Infusion, intravenous catheter, intermittent + */ + IVCI, + /** + * Infusion, intravenous catheter, pca pump + */ + PCA, + /** + * Infusion, intravascular + */ + IVASCINFUS, + /** + * Infusion, subcutaneous + */ + SQINFUS, + /** + * Inhalation + */ + _INHALATION, + /** + * Inhalation, oral + */ + IPINHL, + /** + * Inhalation, oral intermittent flow + */ + ORIFINHL, + /** + * Inhalation, oral rebreather mask + */ + REBREATH, + /** + * Inhalation, intermittent positive pressure breathing (ippb) + */ + IPPB, + /** + * Inhalation, nasal + */ + NASINHL, + /** + * Inhalation, nasal, prongs + */ + NASINHLC, + /** + * Inhalation, nebulization + */ + NEB, + /** + * Inhalation, nebulization, nasal + */ + NASNEB, + /** + * Inhalation, nebulization, oral + */ + ORNEB, + /** + * Inhalation, tracheostomy + */ + TRACH, + /** + * Inhalation, ventilator + */ + VENT, + /** + * Inhalation, ventimask + */ + VENTMASK, + /** + * Injection + */ + _INJECTION, + /** + * Injection, amniotic fluid + */ + AMNINJ, + /** + * Injection, biliary tract + */ + BILINJ, + /** + * Injection, for cholangiography + */ + CHOLINJ, + /** + * Injection, cervical + */ + CERVINJ, + /** + * Injection, epidural + */ + EPIDURINJ, + /** + * Injection, epidural, push + */ + EPIINJ, + /** + * Injection, epidural, slow push + */ + EPINJSP, + /** + * Injection, extra-amniotic + */ + EXTRAMNINJ, + /** + * Injection, extracorporeal + */ + EXTCORPINJ, + /** + * Injection, gastric button + */ + GBINJ, + /** + * Injection, gingival + */ + GINGINJ, + /** + * Injection, urinary bladder + */ + BLADINJ, + /** + * Injection, endosinusial + */ + ENDOSININJ, + /** + * Injection, hemodialysis port + */ + HEMOPORT, + /** + * Injection, intra-abdominal + */ + IABDINJ, + /** + * Injection, intraarterial + */ + IAINJ, + /** + * Injection, intraarterial, push + */ + IAINJP, + /** + * Injection, intraarterial, slow push + */ + IAINJSP, + /** + * Injection, intraarticular + */ + IARTINJ, + /** + * Injection, intrabursal + */ + IBURSINJ, + /** + * Injection, intracardiac + */ + ICARDINJ, + /** + * Injection, intracardiac, rapid push + */ + ICARDINJRP, + /** + * Injection, intracardiac, slow push + */ + ICARDINJSP, + /** + * Injection, intracardiac, push + */ + ICARINJP, + /** + * Injection, intracartilaginous + */ + ICARTINJ, + /** + * Injection, intracaudal + */ + ICAUDINJ, + /** + * Injection, intracavernous + */ + ICAVINJ, + /** + * Injection, intracavitary + */ + ICAVITINJ, + /** + * Injection, intracerebral + */ + ICEREBINJ, + /** + * Injection, intracisternal + */ + ICISTERNINJ, + /** + * Injection, intracoronary + */ + ICORONINJ, + /** + * Injection, intracoronary, push + */ + ICORONINJP, + /** + * Injection, intracorpus cavernosum + */ + ICORPCAVINJ, + /** + * Injection, intradermal + */ + IDINJ, + /** + * Injection, intradiscal + */ + IDISCINJ, + /** + * Injection, intraductal + */ + IDUCTINJ, + /** + * Injection, intradural + */ + IDURINJ, + /** + * Injection, intraepidermal + */ + IEPIDINJ, + /** + * Injection, intraepithelial + */ + IEPITHINJ, + /** + * Injection, intralesional + */ + ILESINJ, + /** + * Injection, intraluminal + */ + ILUMINJ, + /** + * Injection, intralymphatic + */ + ILYMPJINJ, + /** + * Injection, intramuscular + */ + IM, + /** + * Injection, intramuscular, deep + */ + IMD, + /** + * Injection, intramuscular, z track + */ + IMZ, + /** + * Injection, intramedullary + */ + IMEDULINJ, + /** + * Injection, interameningeal + */ + INTERMENINJ, + /** + * Injection, interstitial + */ + INTERSTITINJ, + /** + * Injection, intraocular + */ + IOINJ, + /** + * Injection, intraosseous + */ + IOSSINJ, + /** + * Injection, intraovarian + */ + IOVARINJ, + /** + * Injection, intrapericardial + */ + IPCARDINJ, + /** + * Injection, intraperitoneal + */ + IPERINJ, + /** + * Injection, intrapulmonary + */ + IPINJ, + /** + * Injection, intrapleural + */ + IPLRINJ, + /** + * Injection, intraprostatic + */ + IPROSTINJ, + /** + * Injection, insulin pump + */ + IPUMPINJ, + /** + * Injection, intraspinal + */ + ISINJ, + /** + * Injection, intrasternal + */ + ISTERINJ, + /** + * Injection, intrasynovial + */ + ISYNINJ, + /** + * Injection, intratendinous + */ + ITENDINJ, + /** + * Injection, intratesticular + */ + ITESTINJ, + /** + * Injection, intrathoracic + */ + ITHORINJ, + /** + * Injection, intrathecal + */ + ITINJ, + /** + * Injection, intratubular + */ + ITUBINJ, + /** + * Injection, intratumor + */ + ITUMINJ, + /** + * Injection, intratympanic + */ + ITYMPINJ, + /** + * Injection, intracervical (uterus) + */ + IUINJ, + /** + * Injection, intracervical (uterus) + */ + IUINJC, + /** + * Injection, intraureteral, retrograde + */ + IURETINJ, + /** + * Injection, intravascular + */ + IVASCINJ, + /** + * Injection, intraventricular (heart) + */ + IVENTINJ, + /** + * Injection, intravesicle + */ + IVESINJ, + /** + * Injection, intravenous + */ + IVINJ, + /** + * Injection, intravenous, bolus + */ + IVINJBOL, + /** + * Injection, intravenous, push + */ + IVPUSH, + /** + * Injection, intravenous, rapid push + */ + IVRPUSH, + /** + * Injection, intravenous, slow push + */ + IVSPUSH, + /** + * Injection, intravitreal + */ + IVITINJ, + /** + * Injection, periarticular + */ + PAINJ, + /** + * Injection, parenteral + */ + PARENTINJ, + /** + * Injection, periodontal + */ + PDONTINJ, + /** + * Injection, peritoneal dialysis port + */ + PDPINJ, + /** + * Injection, peridural + */ + PDURINJ, + /** + * Injection, perineural + */ + PNINJ, + /** + * Injection, paranasal sinuses + */ + PNSINJ, + /** + * Injection, retrobulbar + */ + RBINJ, + /** + * Injection, subconjunctival + */ + SCINJ, + /** + * Injection, sublesional + */ + SLESINJ, + /** + * Injection, soft tissue + */ + SOFTISINJ, + /** + * Injection, subcutaneous + */ + SQ, + /** + * Injection, subarachnoid + */ + SUBARACHINJ, + /** + * Injection, submucosal + */ + SUBMUCINJ, + /** + * Injection, transplacental + */ + TRPLACINJ, + /** + * Injection, transtracheal + */ + TRTRACHINJ, + /** + * Injection, urethral + */ + URETHINJ, + /** + * Injection, ureteral + */ + URETINJ, + /** + * Insertion + */ + _INSERTION, + /** + * Insertion, cervical (uterine) + */ + CERVINS, + /** + * Insertion, intraocular, surgical + */ + IOSURGINS, + /** + * Insertion, intrauterine + */ + IU, + /** + * Insertion, lacrimal puncta + */ + LPINS, + /** + * Insertion, rectal + */ + PR, + /** + * Insertion, subcutaneous, surgical + */ + SQSURGINS, + /** + * Insertion, urethral + */ + URETHINS, + /** + * Insertion, vaginal + */ + VAGINSI, + /** + * Instillation + */ + _INSTILLATION, + /** + * Instillation, cecostomy + */ + CECINSTL, + /** + * Instillation, enteral feeding tube + */ + EFT, + /** + * Instillation, enteral + */ + ENTINSTL, + /** + * Instillation, gastrostomy tube + */ + GT, + /** + * Instillation, nasogastric tube + */ + NGT, + /** + * Instillation, orogastric tube + */ + OGT, + /** + * Instillation, urinary catheter + */ + BLADINSTL, + /** + * Instillation, continuous ambulatory peritoneal dialysis port + */ + CAPDINSTL, + /** + * Instillation, chest tube + */ + CTINSTL, + /** + * Instillation, endotracheal tube + */ + ETINSTL, + /** + * Instillation, gastro-jejunostomy tube + */ + GJT, + /** + * Instillation, intrabronchial + */ + IBRONCHINSTIL, + /** + * Instillation, intraduodenal + */ + IDUODINSTIL, + /** + * Instillation, intraesophageal + */ + IESOPHINSTIL, + /** + * Instillation, intragastric + */ + IGASTINSTIL, + /** + * Instillation, intraileal + */ + IILEALINJ, + /** + * Instillation, intraocular + */ + IOINSTL, + /** + * Instillation, intrasinal + */ + ISININSTIL, + /** + * Instillation, intratracheal + */ + ITRACHINSTIL, + /** + * Instillation, intrauterine + */ + IUINSTL, + /** + * Instillation, jejunostomy tube + */ + JJTINSTL, + /** + * Instillation, laryngeal + */ + LARYNGINSTIL, + /** + * Instillation, nasal + */ + NASALINSTIL, + /** + * Instillation, nasogastric + */ + NASOGASINSTIL, + /** + * Instillation, nasotracheal tube + */ + NTT, + /** + * Instillation, orojejunum tube + */ + OJJ, + /** + * Instillation, otic + */ + OT, + /** + * Instillation, peritoneal dialysis port + */ + PDPINSTL, + /** + * Instillation, paranasal sinuses + */ + PNSINSTL, + /** + * Instillation, rectal + */ + RECINSTL, + /** + * Instillation, rectal tube + */ + RECTINSTL, + /** + * Instillation, sinus, unspecified + */ + SININSTIL, + /** + * Instillation, soft tissue + */ + SOFTISINSTIL, + /** + * Instillation, tracheostomy + */ + TRACHINSTL, + /** + * Instillation, transtympanic + */ + TRTYMPINSTIL, + /** + * Instillation, urethral + */ + URETHINSTL, + /** + * Iontophoresis + */ + _IONTOPHORESISROUTE, + /** + * Topical application, iontophoresis + */ + IONTO, + /** + * Irrigation + */ + _IRRIGATION, + /** + * Irrigation, genitourinary + */ + GUIRR, + /** + * Irrigation, intragastric + */ + IGASTIRR, + /** + * Irrigation, intralesional + */ + ILESIRR, + /** + * Irrigation, intraocular + */ + IOIRR, + /** + * Irrigation, urinary bladder + */ + BLADIRR, + /** + * Irrigation, urinary bladder, continuous + */ + BLADIRRC, + /** + * Irrigation, urinary bladder, tidal + */ + BLADIRRT, + /** + * Irrigation, rectal + */ + RECIRR, + /** + * Lavage + */ + _LAVAGEROUTE, + /** + * Lavage, intragastric + */ + IGASTLAV, + /** + * Mucosal absorption + */ + _MUCOSALABSORPTIONROUTE, + /** + * Mucosal absorption, intraduodenal + */ + IDOUDMAB, + /** + * Mucosal absorption, intratracheal + */ + ITRACHMAB, + /** + * Mucosal absorption, submucosal + */ + SMUCMAB, + /** + * Nebulization + */ + _NEBULIZATION, + /** + * Nebulization, endotracheal tube + */ + ETNEB, + /** + * Rinse + */ + _RINSE, + /** + * Rinse, dental + */ + DENRINSE, + /** + * Rinse, oral + */ + ORRINSE, + /** + * Suppository + */ + _SUPPOSITORYROUTE, + /** + * Suppository, urethral + */ + URETHSUP, + /** + * Swish + */ + _SWISH, + /** + * Swish and spit out, oromucosal + */ + SWISHSPIT, + /** + * Swish and swallow, oromucosal + */ + SWISHSWAL, + /** + * Topical absorption + */ + _TOPICALABSORPTIONROUTE, + /** + * Topical absorption, transtympanic + */ + TTYMPTABSORP, + /** + * Topical application + */ + _TOPICALAPPLICATION, + /** + * Topical application, soaked dressing + */ + DRESS, + /** + * Topical application, swab + */ + SWAB, + /** + * Topical + */ + TOPICAL, + /** + * Topical application, buccal + */ + BUC, + /** + * Topical application, cervical + */ + CERV, + /** + * Topical application, dental + */ + DEN, + /** + * Topical application, gingival + */ + GIN, + /** + * Topical application, hair + */ + HAIR, + /** + * Topical application, intracorneal + */ + ICORNTA, + /** + * Topical application, intracoronal (dental) + */ + ICORONTA, + /** + * Topical application, intraesophageal + */ + IESOPHTA, + /** + * Topical application, intraileal + */ + IILEALTA, + /** + * Topical application, intralesional + */ + ILTOP, + /** + * Topical application, intraluminal + */ + ILUMTA, + /** + * Topical application, intraocular + */ + IOTOP, + /** + * Topical application, laryngeal + */ + LARYNGTA, + /** + * Topical application, mucous membrane + */ + MUC, + /** + * Topical application, nail + */ + NAIL, + /** + * Topical application, nasal + */ + NASAL, + /** + * Topical application, ophthalmic + */ + OPTHALTA, + /** + * Topical application, oral + */ + ORALTA, + /** + * Topical application, oromucosal + */ + ORMUC, + /** + * Topical application, oropharyngeal + */ + OROPHARTA, + /** + * Topical application, perianal + */ + PERIANAL, + /** + * Topical application, perineal + */ + PERINEAL, + /** + * Topical application, periodontal + */ + PDONTTA, + /** + * Topical application, rectal + */ + RECTAL, + /** + * Topical application, scalp + */ + SCALP, + /** + * Occlusive dressing technique + */ + OCDRESTA, + /** + * Topical application, skin + */ + SKIN, + /** + * Subconjunctival + */ + SUBCONJTA, + /** + * Topical application, transmucosal + */ + TMUCTA, + /** + * Insertion, vaginal + */ + VAGINS, + /** + * Insufflation + */ + INSUF, + /** + * Transdermal + */ + TRNSDERM, + /** + * Route of substance administration classified by site. + */ + _ROUTEBYSITE, + /** + * Amniotic fluid sac + */ + _AMNIOTICFLUIDSACROUTE, + /** + * Biliary tract + */ + _BILIARYROUTE, + /** + * Body surface + */ + _BODYSURFACEROUTE, + /** + * Buccal mucosa + */ + _BUCCALMUCOSAROUTE, + /** + * Cecostomy + */ + _CECOSTOMYROUTE, + /** + * Cervix of the uterus + */ + _CERVICALROUTE, + /** + * Endocervical + */ + _ENDOCERVICALROUTE, + /** + * Enteral + */ + _ENTERALROUTE, + /** + * Epidural + */ + _EPIDURALROUTE, + /** + * Extra-amniotic + */ + _EXTRAAMNIOTICROUTE, + /** + * Extracorporeal circulation + */ + _EXTRACORPOREALCIRCULATIONROUTE, + /** + * Gastric + */ + _GASTRICROUTE, + /** + * Genitourinary + */ + _GENITOURINARYROUTE, + /** + * Gingival + */ + _GINGIVALROUTE, + /** + * Hair + */ + _HAIRROUTE, + /** + * Interameningeal + */ + _INTERAMENINGEALROUTE, + /** + * Interstitial + */ + _INTERSTITIALROUTE, + /** + * Intra-abdominal + */ + _INTRAABDOMINALROUTE, + /** + * Intra-arterial + */ + _INTRAARTERIALROUTE, + /** + * Intraarticular + */ + _INTRAARTICULARROUTE, + /** + * Intrabronchial + */ + _INTRABRONCHIALROUTE, + /** + * Intrabursal + */ + _INTRABURSALROUTE, + /** + * Intracardiac + */ + _INTRACARDIACROUTE, + /** + * Intracartilaginous + */ + _INTRACARTILAGINOUSROUTE, + /** + * Intracaudal + */ + _INTRACAUDALROUTE, + /** + * Intracavernosal + */ + _INTRACAVERNOSALROUTE, + /** + * Intracavitary + */ + _INTRACAVITARYROUTE, + /** + * Intracerebral + */ + _INTRACEREBRALROUTE, + /** + * Intracervical + */ + _INTRACERVICALROUTE, + /** + * Intracisternal + */ + _INTRACISTERNALROUTE, + /** + * Intracorneal + */ + _INTRACORNEALROUTE, + /** + * Intracoronal (dental) + */ + _INTRACORONALROUTE, + /** + * Intracoronary + */ + _INTRACORONARYROUTE, + /** + * Intracorpus cavernosum + */ + _INTRACORPUSCAVERNOSUMROUTE, + /** + * Intradermal + */ + _INTRADERMALROUTE, + /** + * Intradiscal + */ + _INTRADISCALROUTE, + /** + * Intraductal + */ + _INTRADUCTALROUTE, + /** + * Intraduodenal + */ + _INTRADUODENALROUTE, + /** + * Intradural + */ + _INTRADURALROUTE, + /** + * Intraepidermal + */ + _INTRAEPIDERMALROUTE, + /** + * Intraepithelial + */ + _INTRAEPITHELIALROUTE, + /** + * Intraesophageal + */ + _INTRAESOPHAGEALROUTE, + /** + * Intragastric + */ + _INTRAGASTRICROUTE, + /** + * Intraileal + */ + _INTRAILEALROUTE, + /** + * Intralesional + */ + _INTRALESIONALROUTE, + /** + * Intraluminal + */ + _INTRALUMINALROUTE, + /** + * Intralymphatic + */ + _INTRALYMPHATICROUTE, + /** + * Intramedullary + */ + _INTRAMEDULLARYROUTE, + /** + * Intramuscular + */ + _INTRAMUSCULARROUTE, + /** + * Intraocular + */ + _INTRAOCULARROUTE, + /** + * Intraosseous + */ + _INTRAOSSEOUSROUTE, + /** + * Intraovarian + */ + _INTRAOVARIANROUTE, + /** + * Intrapericardial + */ + _INTRAPERICARDIALROUTE, + /** + * Intraperitoneal + */ + _INTRAPERITONEALROUTE, + /** + * Intrapleural + */ + _INTRAPLEURALROUTE, + /** + * Intraprostatic + */ + _INTRAPROSTATICROUTE, + /** + * Intrapulmonary + */ + _INTRAPULMONARYROUTE, + /** + * Intrasinal + */ + _INTRASINALROUTE, + /** + * Intraspinal + */ + _INTRASPINALROUTE, + /** + * Intrasternal + */ + _INTRASTERNALROUTE, + /** + * Intrasynovial + */ + _INTRASYNOVIALROUTE, + /** + * Intratendinous + */ + _INTRATENDINOUSROUTE, + /** + * Intratesticular + */ + _INTRATESTICULARROUTE, + /** + * Intrathecal + */ + _INTRATHECALROUTE, + /** + * Intrathoracic + */ + _INTRATHORACICROUTE, + /** + * Intratracheal + */ + _INTRATRACHEALROUTE, + /** + * Intratubular + */ + _INTRATUBULARROUTE, + /** + * Intratumor + */ + _INTRATUMORROUTE, + /** + * Intratympanic + */ + _INTRATYMPANICROUTE, + /** + * Intrauterine + */ + _INTRAUTERINEROUTE, + /** + * Intravascular + */ + _INTRAVASCULARROUTE, + /** + * Intravenous + */ + _INTRAVENOUSROUTE, + /** + * Intraventricular + */ + _INTRAVENTRICULARROUTE, + /** + * Intravesicle + */ + _INTRAVESICLEROUTE, + /** + * Intravitreal + */ + _INTRAVITREALROUTE, + /** + * Jejunum + */ + _JEJUNUMROUTE, + /** + * Lacrimal puncta + */ + _LACRIMALPUNCTAROUTE, + /** + * Laryngeal + */ + _LARYNGEALROUTE, + /** + * Lingual + */ + _LINGUALROUTE, + /** + * Mucous membrane + */ + _MUCOUSMEMBRANEROUTE, + /** + * Nail + */ + _NAILROUTE, + /** + * Nasal + */ + _NASALROUTE, + /** + * Ophthalmic + */ + _OPHTHALMICROUTE, + /** + * Oral + */ + _ORALROUTE, + /** + * Oromucosal + */ + _OROMUCOSALROUTE, + /** + * Oropharyngeal + */ + _OROPHARYNGEALROUTE, + /** + * Otic + */ + _OTICROUTE, + /** + * Paranasal sinuses + */ + _PARANASALSINUSESROUTE, + /** + * Parenteral + */ + _PARENTERALROUTE, + /** + * Perianal + */ + _PERIANALROUTE, + /** + * Periarticular + */ + _PERIARTICULARROUTE, + /** + * Peridural + */ + _PERIDURALROUTE, + /** + * Perineal + */ + _PERINEALROUTE, + /** + * Perineural + */ + _PERINEURALROUTE, + /** + * Periodontal + */ + _PERIODONTALROUTE, + /** + * Pulmonary + */ + _PULMONARYROUTE, + /** + * Rectal + */ + _RECTALROUTE, + /** + * Respiratory tract + */ + _RESPIRATORYTRACTROUTE, + /** + * Retrobulbar + */ + _RETROBULBARROUTE, + /** + * Scalp + */ + _SCALPROUTE, + /** + * Sinus, unspecified + */ + _SINUSUNSPECIFIEDROUTE, + /** + * Skin + */ + _SKINROUTE, + /** + * Soft tissue + */ + _SOFTTISSUEROUTE, + /** + * Subarachnoid + */ + _SUBARACHNOIDROUTE, + /** + * Subconjunctival + */ + _SUBCONJUNCTIVALROUTE, + /** + * Subcutaneous + */ + _SUBCUTANEOUSROUTE, + /** + * Sublesional + */ + _SUBLESIONALROUTE, + /** + * Sublingual + */ + _SUBLINGUALROUTE, + /** + * Submucosal + */ + _SUBMUCOSALROUTE, + /** + * Tracheostomy + */ + _TRACHEOSTOMYROUTE, + /** + * Transmucosal + */ + _TRANSMUCOSALROUTE, + /** + * Transplacental + */ + _TRANSPLACENTALROUTE, + /** + * Transtracheal + */ + _TRANSTRACHEALROUTE, + /** + * Transtympanic + */ + _TRANSTYMPANICROUTE, + /** + * Ureteral + */ + _URETERALROUTE, + /** + * Urethral + */ + _URETHRALROUTE, + /** + * Urinary bladder + */ + _URINARYBLADDERROUTE, + /** + * Urinary tract + */ + _URINARYTRACTROUTE, + /** + * Vaginal + */ + _VAGINALROUTE, + /** + * Vitreous humour + */ + _VITREOUSHUMOURROUTE, + /** + * added to help the parsers + */ + NULL; + public static V3RouteOfAdministration fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_RouteByMethod".equals(codeString)) + return _ROUTEBYMETHOD; + if ("SOAK".equals(codeString)) + return SOAK; + if ("SHAMPOO".equals(codeString)) + return SHAMPOO; + if ("TRNSLING".equals(codeString)) + return TRNSLING; + if ("PO".equals(codeString)) + return PO; + if ("GARGLE".equals(codeString)) + return GARGLE; + if ("SUCK".equals(codeString)) + return SUCK; + if ("_Chew".equals(codeString)) + return _CHEW; + if ("CHEW".equals(codeString)) + return CHEW; + if ("_Diffusion".equals(codeString)) + return _DIFFUSION; + if ("EXTCORPDIF".equals(codeString)) + return EXTCORPDIF; + if ("HEMODIFF".equals(codeString)) + return HEMODIFF; + if ("TRNSDERMD".equals(codeString)) + return TRNSDERMD; + if ("_Dissolve".equals(codeString)) + return _DISSOLVE; + if ("DISSOLVE".equals(codeString)) + return DISSOLVE; + if ("SL".equals(codeString)) + return SL; + if ("_Douche".equals(codeString)) + return _DOUCHE; + if ("DOUCHE".equals(codeString)) + return DOUCHE; + if ("_ElectroOsmosisRoute".equals(codeString)) + return _ELECTROOSMOSISROUTE; + if ("ELECTOSMOS".equals(codeString)) + return ELECTOSMOS; + if ("_Enema".equals(codeString)) + return _ENEMA; + if ("ENEMA".equals(codeString)) + return ENEMA; + if ("RETENEMA".equals(codeString)) + return RETENEMA; + if ("_Flush".equals(codeString)) + return _FLUSH; + if ("IVFLUSH".equals(codeString)) + return IVFLUSH; + if ("_Implantation".equals(codeString)) + return _IMPLANTATION; + if ("IDIMPLNT".equals(codeString)) + return IDIMPLNT; + if ("IVITIMPLNT".equals(codeString)) + return IVITIMPLNT; + if ("SQIMPLNT".equals(codeString)) + return SQIMPLNT; + if ("_Infusion".equals(codeString)) + return _INFUSION; + if ("EPI".equals(codeString)) + return EPI; + if ("IA".equals(codeString)) + return IA; + if ("IC".equals(codeString)) + return IC; + if ("ICOR".equals(codeString)) + return ICOR; + if ("IOSSC".equals(codeString)) + return IOSSC; + if ("IT".equals(codeString)) + return IT; + if ("IV".equals(codeString)) + return IV; + if ("IVC".equals(codeString)) + return IVC; + if ("IVCC".equals(codeString)) + return IVCC; + if ("IVCI".equals(codeString)) + return IVCI; + if ("PCA".equals(codeString)) + return PCA; + if ("IVASCINFUS".equals(codeString)) + return IVASCINFUS; + if ("SQINFUS".equals(codeString)) + return SQINFUS; + if ("_Inhalation".equals(codeString)) + return _INHALATION; + if ("IPINHL".equals(codeString)) + return IPINHL; + if ("ORIFINHL".equals(codeString)) + return ORIFINHL; + if ("REBREATH".equals(codeString)) + return REBREATH; + if ("IPPB".equals(codeString)) + return IPPB; + if ("NASINHL".equals(codeString)) + return NASINHL; + if ("NASINHLC".equals(codeString)) + return NASINHLC; + if ("NEB".equals(codeString)) + return NEB; + if ("NASNEB".equals(codeString)) + return NASNEB; + if ("ORNEB".equals(codeString)) + return ORNEB; + if ("TRACH".equals(codeString)) + return TRACH; + if ("VENT".equals(codeString)) + return VENT; + if ("VENTMASK".equals(codeString)) + return VENTMASK; + if ("_Injection".equals(codeString)) + return _INJECTION; + if ("AMNINJ".equals(codeString)) + return AMNINJ; + if ("BILINJ".equals(codeString)) + return BILINJ; + if ("CHOLINJ".equals(codeString)) + return CHOLINJ; + if ("CERVINJ".equals(codeString)) + return CERVINJ; + if ("EPIDURINJ".equals(codeString)) + return EPIDURINJ; + if ("EPIINJ".equals(codeString)) + return EPIINJ; + if ("EPINJSP".equals(codeString)) + return EPINJSP; + if ("EXTRAMNINJ".equals(codeString)) + return EXTRAMNINJ; + if ("EXTCORPINJ".equals(codeString)) + return EXTCORPINJ; + if ("GBINJ".equals(codeString)) + return GBINJ; + if ("GINGINJ".equals(codeString)) + return GINGINJ; + if ("BLADINJ".equals(codeString)) + return BLADINJ; + if ("ENDOSININJ".equals(codeString)) + return ENDOSININJ; + if ("HEMOPORT".equals(codeString)) + return HEMOPORT; + if ("IABDINJ".equals(codeString)) + return IABDINJ; + if ("IAINJ".equals(codeString)) + return IAINJ; + if ("IAINJP".equals(codeString)) + return IAINJP; + if ("IAINJSP".equals(codeString)) + return IAINJSP; + if ("IARTINJ".equals(codeString)) + return IARTINJ; + if ("IBURSINJ".equals(codeString)) + return IBURSINJ; + if ("ICARDINJ".equals(codeString)) + return ICARDINJ; + if ("ICARDINJRP".equals(codeString)) + return ICARDINJRP; + if ("ICARDINJSP".equals(codeString)) + return ICARDINJSP; + if ("ICARINJP".equals(codeString)) + return ICARINJP; + if ("ICARTINJ".equals(codeString)) + return ICARTINJ; + if ("ICAUDINJ".equals(codeString)) + return ICAUDINJ; + if ("ICAVINJ".equals(codeString)) + return ICAVINJ; + if ("ICAVITINJ".equals(codeString)) + return ICAVITINJ; + if ("ICEREBINJ".equals(codeString)) + return ICEREBINJ; + if ("ICISTERNINJ".equals(codeString)) + return ICISTERNINJ; + if ("ICORONINJ".equals(codeString)) + return ICORONINJ; + if ("ICORONINJP".equals(codeString)) + return ICORONINJP; + if ("ICORPCAVINJ".equals(codeString)) + return ICORPCAVINJ; + if ("IDINJ".equals(codeString)) + return IDINJ; + if ("IDISCINJ".equals(codeString)) + return IDISCINJ; + if ("IDUCTINJ".equals(codeString)) + return IDUCTINJ; + if ("IDURINJ".equals(codeString)) + return IDURINJ; + if ("IEPIDINJ".equals(codeString)) + return IEPIDINJ; + if ("IEPITHINJ".equals(codeString)) + return IEPITHINJ; + if ("ILESINJ".equals(codeString)) + return ILESINJ; + if ("ILUMINJ".equals(codeString)) + return ILUMINJ; + if ("ILYMPJINJ".equals(codeString)) + return ILYMPJINJ; + if ("IM".equals(codeString)) + return IM; + if ("IMD".equals(codeString)) + return IMD; + if ("IMZ".equals(codeString)) + return IMZ; + if ("IMEDULINJ".equals(codeString)) + return IMEDULINJ; + if ("INTERMENINJ".equals(codeString)) + return INTERMENINJ; + if ("INTERSTITINJ".equals(codeString)) + return INTERSTITINJ; + if ("IOINJ".equals(codeString)) + return IOINJ; + if ("IOSSINJ".equals(codeString)) + return IOSSINJ; + if ("IOVARINJ".equals(codeString)) + return IOVARINJ; + if ("IPCARDINJ".equals(codeString)) + return IPCARDINJ; + if ("IPERINJ".equals(codeString)) + return IPERINJ; + if ("IPINJ".equals(codeString)) + return IPINJ; + if ("IPLRINJ".equals(codeString)) + return IPLRINJ; + if ("IPROSTINJ".equals(codeString)) + return IPROSTINJ; + if ("IPUMPINJ".equals(codeString)) + return IPUMPINJ; + if ("ISINJ".equals(codeString)) + return ISINJ; + if ("ISTERINJ".equals(codeString)) + return ISTERINJ; + if ("ISYNINJ".equals(codeString)) + return ISYNINJ; + if ("ITENDINJ".equals(codeString)) + return ITENDINJ; + if ("ITESTINJ".equals(codeString)) + return ITESTINJ; + if ("ITHORINJ".equals(codeString)) + return ITHORINJ; + if ("ITINJ".equals(codeString)) + return ITINJ; + if ("ITUBINJ".equals(codeString)) + return ITUBINJ; + if ("ITUMINJ".equals(codeString)) + return ITUMINJ; + if ("ITYMPINJ".equals(codeString)) + return ITYMPINJ; + if ("IUINJ".equals(codeString)) + return IUINJ; + if ("IUINJC".equals(codeString)) + return IUINJC; + if ("IURETINJ".equals(codeString)) + return IURETINJ; + if ("IVASCINJ".equals(codeString)) + return IVASCINJ; + if ("IVENTINJ".equals(codeString)) + return IVENTINJ; + if ("IVESINJ".equals(codeString)) + return IVESINJ; + if ("IVINJ".equals(codeString)) + return IVINJ; + if ("IVINJBOL".equals(codeString)) + return IVINJBOL; + if ("IVPUSH".equals(codeString)) + return IVPUSH; + if ("IVRPUSH".equals(codeString)) + return IVRPUSH; + if ("IVSPUSH".equals(codeString)) + return IVSPUSH; + if ("IVITINJ".equals(codeString)) + return IVITINJ; + if ("PAINJ".equals(codeString)) + return PAINJ; + if ("PARENTINJ".equals(codeString)) + return PARENTINJ; + if ("PDONTINJ".equals(codeString)) + return PDONTINJ; + if ("PDPINJ".equals(codeString)) + return PDPINJ; + if ("PDURINJ".equals(codeString)) + return PDURINJ; + if ("PNINJ".equals(codeString)) + return PNINJ; + if ("PNSINJ".equals(codeString)) + return PNSINJ; + if ("RBINJ".equals(codeString)) + return RBINJ; + if ("SCINJ".equals(codeString)) + return SCINJ; + if ("SLESINJ".equals(codeString)) + return SLESINJ; + if ("SOFTISINJ".equals(codeString)) + return SOFTISINJ; + if ("SQ".equals(codeString)) + return SQ; + if ("SUBARACHINJ".equals(codeString)) + return SUBARACHINJ; + if ("SUBMUCINJ".equals(codeString)) + return SUBMUCINJ; + if ("TRPLACINJ".equals(codeString)) + return TRPLACINJ; + if ("TRTRACHINJ".equals(codeString)) + return TRTRACHINJ; + if ("URETHINJ".equals(codeString)) + return URETHINJ; + if ("URETINJ".equals(codeString)) + return URETINJ; + if ("_Insertion".equals(codeString)) + return _INSERTION; + if ("CERVINS".equals(codeString)) + return CERVINS; + if ("IOSURGINS".equals(codeString)) + return IOSURGINS; + if ("IU".equals(codeString)) + return IU; + if ("LPINS".equals(codeString)) + return LPINS; + if ("PR".equals(codeString)) + return PR; + if ("SQSURGINS".equals(codeString)) + return SQSURGINS; + if ("URETHINS".equals(codeString)) + return URETHINS; + if ("VAGINSI".equals(codeString)) + return VAGINSI; + if ("_Instillation".equals(codeString)) + return _INSTILLATION; + if ("CECINSTL".equals(codeString)) + return CECINSTL; + if ("EFT".equals(codeString)) + return EFT; + if ("ENTINSTL".equals(codeString)) + return ENTINSTL; + if ("GT".equals(codeString)) + return GT; + if ("NGT".equals(codeString)) + return NGT; + if ("OGT".equals(codeString)) + return OGT; + if ("BLADINSTL".equals(codeString)) + return BLADINSTL; + if ("CAPDINSTL".equals(codeString)) + return CAPDINSTL; + if ("CTINSTL".equals(codeString)) + return CTINSTL; + if ("ETINSTL".equals(codeString)) + return ETINSTL; + if ("GJT".equals(codeString)) + return GJT; + if ("IBRONCHINSTIL".equals(codeString)) + return IBRONCHINSTIL; + if ("IDUODINSTIL".equals(codeString)) + return IDUODINSTIL; + if ("IESOPHINSTIL".equals(codeString)) + return IESOPHINSTIL; + if ("IGASTINSTIL".equals(codeString)) + return IGASTINSTIL; + if ("IILEALINJ".equals(codeString)) + return IILEALINJ; + if ("IOINSTL".equals(codeString)) + return IOINSTL; + if ("ISININSTIL".equals(codeString)) + return ISININSTIL; + if ("ITRACHINSTIL".equals(codeString)) + return ITRACHINSTIL; + if ("IUINSTL".equals(codeString)) + return IUINSTL; + if ("JJTINSTL".equals(codeString)) + return JJTINSTL; + if ("LARYNGINSTIL".equals(codeString)) + return LARYNGINSTIL; + if ("NASALINSTIL".equals(codeString)) + return NASALINSTIL; + if ("NASOGASINSTIL".equals(codeString)) + return NASOGASINSTIL; + if ("NTT".equals(codeString)) + return NTT; + if ("OJJ".equals(codeString)) + return OJJ; + if ("OT".equals(codeString)) + return OT; + if ("PDPINSTL".equals(codeString)) + return PDPINSTL; + if ("PNSINSTL".equals(codeString)) + return PNSINSTL; + if ("RECINSTL".equals(codeString)) + return RECINSTL; + if ("RECTINSTL".equals(codeString)) + return RECTINSTL; + if ("SININSTIL".equals(codeString)) + return SININSTIL; + if ("SOFTISINSTIL".equals(codeString)) + return SOFTISINSTIL; + if ("TRACHINSTL".equals(codeString)) + return TRACHINSTL; + if ("TRTYMPINSTIL".equals(codeString)) + return TRTYMPINSTIL; + if ("URETHINSTL".equals(codeString)) + return URETHINSTL; + if ("_IontophoresisRoute".equals(codeString)) + return _IONTOPHORESISROUTE; + if ("IONTO".equals(codeString)) + return IONTO; + if ("_Irrigation".equals(codeString)) + return _IRRIGATION; + if ("GUIRR".equals(codeString)) + return GUIRR; + if ("IGASTIRR".equals(codeString)) + return IGASTIRR; + if ("ILESIRR".equals(codeString)) + return ILESIRR; + if ("IOIRR".equals(codeString)) + return IOIRR; + if ("BLADIRR".equals(codeString)) + return BLADIRR; + if ("BLADIRRC".equals(codeString)) + return BLADIRRC; + if ("BLADIRRT".equals(codeString)) + return BLADIRRT; + if ("RECIRR".equals(codeString)) + return RECIRR; + if ("_LavageRoute".equals(codeString)) + return _LAVAGEROUTE; + if ("IGASTLAV".equals(codeString)) + return IGASTLAV; + if ("_MucosalAbsorptionRoute".equals(codeString)) + return _MUCOSALABSORPTIONROUTE; + if ("IDOUDMAB".equals(codeString)) + return IDOUDMAB; + if ("ITRACHMAB".equals(codeString)) + return ITRACHMAB; + if ("SMUCMAB".equals(codeString)) + return SMUCMAB; + if ("_Nebulization".equals(codeString)) + return _NEBULIZATION; + if ("ETNEB".equals(codeString)) + return ETNEB; + if ("_Rinse".equals(codeString)) + return _RINSE; + if ("DENRINSE".equals(codeString)) + return DENRINSE; + if ("ORRINSE".equals(codeString)) + return ORRINSE; + if ("_SuppositoryRoute".equals(codeString)) + return _SUPPOSITORYROUTE; + if ("URETHSUP".equals(codeString)) + return URETHSUP; + if ("_Swish".equals(codeString)) + return _SWISH; + if ("SWISHSPIT".equals(codeString)) + return SWISHSPIT; + if ("SWISHSWAL".equals(codeString)) + return SWISHSWAL; + if ("_TopicalAbsorptionRoute".equals(codeString)) + return _TOPICALABSORPTIONROUTE; + if ("TTYMPTABSORP".equals(codeString)) + return TTYMPTABSORP; + if ("_TopicalApplication".equals(codeString)) + return _TOPICALAPPLICATION; + if ("DRESS".equals(codeString)) + return DRESS; + if ("SWAB".equals(codeString)) + return SWAB; + if ("TOPICAL".equals(codeString)) + return TOPICAL; + if ("BUC".equals(codeString)) + return BUC; + if ("CERV".equals(codeString)) + return CERV; + if ("DEN".equals(codeString)) + return DEN; + if ("GIN".equals(codeString)) + return GIN; + if ("HAIR".equals(codeString)) + return HAIR; + if ("ICORNTA".equals(codeString)) + return ICORNTA; + if ("ICORONTA".equals(codeString)) + return ICORONTA; + if ("IESOPHTA".equals(codeString)) + return IESOPHTA; + if ("IILEALTA".equals(codeString)) + return IILEALTA; + if ("ILTOP".equals(codeString)) + return ILTOP; + if ("ILUMTA".equals(codeString)) + return ILUMTA; + if ("IOTOP".equals(codeString)) + return IOTOP; + if ("LARYNGTA".equals(codeString)) + return LARYNGTA; + if ("MUC".equals(codeString)) + return MUC; + if ("NAIL".equals(codeString)) + return NAIL; + if ("NASAL".equals(codeString)) + return NASAL; + if ("OPTHALTA".equals(codeString)) + return OPTHALTA; + if ("ORALTA".equals(codeString)) + return ORALTA; + if ("ORMUC".equals(codeString)) + return ORMUC; + if ("OROPHARTA".equals(codeString)) + return OROPHARTA; + if ("PERIANAL".equals(codeString)) + return PERIANAL; + if ("PERINEAL".equals(codeString)) + return PERINEAL; + if ("PDONTTA".equals(codeString)) + return PDONTTA; + if ("RECTAL".equals(codeString)) + return RECTAL; + if ("SCALP".equals(codeString)) + return SCALP; + if ("OCDRESTA".equals(codeString)) + return OCDRESTA; + if ("SKIN".equals(codeString)) + return SKIN; + if ("SUBCONJTA".equals(codeString)) + return SUBCONJTA; + if ("TMUCTA".equals(codeString)) + return TMUCTA; + if ("VAGINS".equals(codeString)) + return VAGINS; + if ("INSUF".equals(codeString)) + return INSUF; + if ("TRNSDERM".equals(codeString)) + return TRNSDERM; + if ("_RouteBySite".equals(codeString)) + return _ROUTEBYSITE; + if ("_AmnioticFluidSacRoute".equals(codeString)) + return _AMNIOTICFLUIDSACROUTE; + if ("_BiliaryRoute".equals(codeString)) + return _BILIARYROUTE; + if ("_BodySurfaceRoute".equals(codeString)) + return _BODYSURFACEROUTE; + if ("_BuccalMucosaRoute".equals(codeString)) + return _BUCCALMUCOSAROUTE; + if ("_CecostomyRoute".equals(codeString)) + return _CECOSTOMYROUTE; + if ("_CervicalRoute".equals(codeString)) + return _CERVICALROUTE; + if ("_EndocervicalRoute".equals(codeString)) + return _ENDOCERVICALROUTE; + if ("_EnteralRoute".equals(codeString)) + return _ENTERALROUTE; + if ("_EpiduralRoute".equals(codeString)) + return _EPIDURALROUTE; + if ("_ExtraAmnioticRoute".equals(codeString)) + return _EXTRAAMNIOTICROUTE; + if ("_ExtracorporealCirculationRoute".equals(codeString)) + return _EXTRACORPOREALCIRCULATIONROUTE; + if ("_GastricRoute".equals(codeString)) + return _GASTRICROUTE; + if ("_GenitourinaryRoute".equals(codeString)) + return _GENITOURINARYROUTE; + if ("_GingivalRoute".equals(codeString)) + return _GINGIVALROUTE; + if ("_HairRoute".equals(codeString)) + return _HAIRROUTE; + if ("_InterameningealRoute".equals(codeString)) + return _INTERAMENINGEALROUTE; + if ("_InterstitialRoute".equals(codeString)) + return _INTERSTITIALROUTE; + if ("_IntraabdominalRoute".equals(codeString)) + return _INTRAABDOMINALROUTE; + if ("_IntraarterialRoute".equals(codeString)) + return _INTRAARTERIALROUTE; + if ("_IntraarticularRoute".equals(codeString)) + return _INTRAARTICULARROUTE; + if ("_IntrabronchialRoute".equals(codeString)) + return _INTRABRONCHIALROUTE; + if ("_IntrabursalRoute".equals(codeString)) + return _INTRABURSALROUTE; + if ("_IntracardiacRoute".equals(codeString)) + return _INTRACARDIACROUTE; + if ("_IntracartilaginousRoute".equals(codeString)) + return _INTRACARTILAGINOUSROUTE; + if ("_IntracaudalRoute".equals(codeString)) + return _INTRACAUDALROUTE; + if ("_IntracavernosalRoute".equals(codeString)) + return _INTRACAVERNOSALROUTE; + if ("_IntracavitaryRoute".equals(codeString)) + return _INTRACAVITARYROUTE; + if ("_IntracerebralRoute".equals(codeString)) + return _INTRACEREBRALROUTE; + if ("_IntracervicalRoute".equals(codeString)) + return _INTRACERVICALROUTE; + if ("_IntracisternalRoute".equals(codeString)) + return _INTRACISTERNALROUTE; + if ("_IntracornealRoute".equals(codeString)) + return _INTRACORNEALROUTE; + if ("_IntracoronalRoute".equals(codeString)) + return _INTRACORONALROUTE; + if ("_IntracoronaryRoute".equals(codeString)) + return _INTRACORONARYROUTE; + if ("_IntracorpusCavernosumRoute".equals(codeString)) + return _INTRACORPUSCAVERNOSUMROUTE; + if ("_IntradermalRoute".equals(codeString)) + return _INTRADERMALROUTE; + if ("_IntradiscalRoute".equals(codeString)) + return _INTRADISCALROUTE; + if ("_IntraductalRoute".equals(codeString)) + return _INTRADUCTALROUTE; + if ("_IntraduodenalRoute".equals(codeString)) + return _INTRADUODENALROUTE; + if ("_IntraduralRoute".equals(codeString)) + return _INTRADURALROUTE; + if ("_IntraepidermalRoute".equals(codeString)) + return _INTRAEPIDERMALROUTE; + if ("_IntraepithelialRoute".equals(codeString)) + return _INTRAEPITHELIALROUTE; + if ("_IntraesophagealRoute".equals(codeString)) + return _INTRAESOPHAGEALROUTE; + if ("_IntragastricRoute".equals(codeString)) + return _INTRAGASTRICROUTE; + if ("_IntrailealRoute".equals(codeString)) + return _INTRAILEALROUTE; + if ("_IntralesionalRoute".equals(codeString)) + return _INTRALESIONALROUTE; + if ("_IntraluminalRoute".equals(codeString)) + return _INTRALUMINALROUTE; + if ("_IntralymphaticRoute".equals(codeString)) + return _INTRALYMPHATICROUTE; + if ("_IntramedullaryRoute".equals(codeString)) + return _INTRAMEDULLARYROUTE; + if ("_IntramuscularRoute".equals(codeString)) + return _INTRAMUSCULARROUTE; + if ("_IntraocularRoute".equals(codeString)) + return _INTRAOCULARROUTE; + if ("_IntraosseousRoute".equals(codeString)) + return _INTRAOSSEOUSROUTE; + if ("_IntraovarianRoute".equals(codeString)) + return _INTRAOVARIANROUTE; + if ("_IntrapericardialRoute".equals(codeString)) + return _INTRAPERICARDIALROUTE; + if ("_IntraperitonealRoute".equals(codeString)) + return _INTRAPERITONEALROUTE; + if ("_IntrapleuralRoute".equals(codeString)) + return _INTRAPLEURALROUTE; + if ("_IntraprostaticRoute".equals(codeString)) + return _INTRAPROSTATICROUTE; + if ("_IntrapulmonaryRoute".equals(codeString)) + return _INTRAPULMONARYROUTE; + if ("_IntrasinalRoute".equals(codeString)) + return _INTRASINALROUTE; + if ("_IntraspinalRoute".equals(codeString)) + return _INTRASPINALROUTE; + if ("_IntrasternalRoute".equals(codeString)) + return _INTRASTERNALROUTE; + if ("_IntrasynovialRoute".equals(codeString)) + return _INTRASYNOVIALROUTE; + if ("_IntratendinousRoute".equals(codeString)) + return _INTRATENDINOUSROUTE; + if ("_IntratesticularRoute".equals(codeString)) + return _INTRATESTICULARROUTE; + if ("_IntrathecalRoute".equals(codeString)) + return _INTRATHECALROUTE; + if ("_IntrathoracicRoute".equals(codeString)) + return _INTRATHORACICROUTE; + if ("_IntratrachealRoute".equals(codeString)) + return _INTRATRACHEALROUTE; + if ("_IntratubularRoute".equals(codeString)) + return _INTRATUBULARROUTE; + if ("_IntratumorRoute".equals(codeString)) + return _INTRATUMORROUTE; + if ("_IntratympanicRoute".equals(codeString)) + return _INTRATYMPANICROUTE; + if ("_IntrauterineRoute".equals(codeString)) + return _INTRAUTERINEROUTE; + if ("_IntravascularRoute".equals(codeString)) + return _INTRAVASCULARROUTE; + if ("_IntravenousRoute".equals(codeString)) + return _INTRAVENOUSROUTE; + if ("_IntraventricularRoute".equals(codeString)) + return _INTRAVENTRICULARROUTE; + if ("_IntravesicleRoute".equals(codeString)) + return _INTRAVESICLEROUTE; + if ("_IntravitrealRoute".equals(codeString)) + return _INTRAVITREALROUTE; + if ("_JejunumRoute".equals(codeString)) + return _JEJUNUMROUTE; + if ("_LacrimalPunctaRoute".equals(codeString)) + return _LACRIMALPUNCTAROUTE; + if ("_LaryngealRoute".equals(codeString)) + return _LARYNGEALROUTE; + if ("_LingualRoute".equals(codeString)) + return _LINGUALROUTE; + if ("_MucousMembraneRoute".equals(codeString)) + return _MUCOUSMEMBRANEROUTE; + if ("_NailRoute".equals(codeString)) + return _NAILROUTE; + if ("_NasalRoute".equals(codeString)) + return _NASALROUTE; + if ("_OphthalmicRoute".equals(codeString)) + return _OPHTHALMICROUTE; + if ("_OralRoute".equals(codeString)) + return _ORALROUTE; + if ("_OromucosalRoute".equals(codeString)) + return _OROMUCOSALROUTE; + if ("_OropharyngealRoute".equals(codeString)) + return _OROPHARYNGEALROUTE; + if ("_OticRoute".equals(codeString)) + return _OTICROUTE; + if ("_ParanasalSinusesRoute".equals(codeString)) + return _PARANASALSINUSESROUTE; + if ("_ParenteralRoute".equals(codeString)) + return _PARENTERALROUTE; + if ("_PerianalRoute".equals(codeString)) + return _PERIANALROUTE; + if ("_PeriarticularRoute".equals(codeString)) + return _PERIARTICULARROUTE; + if ("_PeriduralRoute".equals(codeString)) + return _PERIDURALROUTE; + if ("_PerinealRoute".equals(codeString)) + return _PERINEALROUTE; + if ("_PerineuralRoute".equals(codeString)) + return _PERINEURALROUTE; + if ("_PeriodontalRoute".equals(codeString)) + return _PERIODONTALROUTE; + if ("_PulmonaryRoute".equals(codeString)) + return _PULMONARYROUTE; + if ("_RectalRoute".equals(codeString)) + return _RECTALROUTE; + if ("_RespiratoryTractRoute".equals(codeString)) + return _RESPIRATORYTRACTROUTE; + if ("_RetrobulbarRoute".equals(codeString)) + return _RETROBULBARROUTE; + if ("_ScalpRoute".equals(codeString)) + return _SCALPROUTE; + if ("_SinusUnspecifiedRoute".equals(codeString)) + return _SINUSUNSPECIFIEDROUTE; + if ("_SkinRoute".equals(codeString)) + return _SKINROUTE; + if ("_SoftTissueRoute".equals(codeString)) + return _SOFTTISSUEROUTE; + if ("_SubarachnoidRoute".equals(codeString)) + return _SUBARACHNOIDROUTE; + if ("_SubconjunctivalRoute".equals(codeString)) + return _SUBCONJUNCTIVALROUTE; + if ("_SubcutaneousRoute".equals(codeString)) + return _SUBCUTANEOUSROUTE; + if ("_SublesionalRoute".equals(codeString)) + return _SUBLESIONALROUTE; + if ("_SublingualRoute".equals(codeString)) + return _SUBLINGUALROUTE; + if ("_SubmucosalRoute".equals(codeString)) + return _SUBMUCOSALROUTE; + if ("_TracheostomyRoute".equals(codeString)) + return _TRACHEOSTOMYROUTE; + if ("_TransmucosalRoute".equals(codeString)) + return _TRANSMUCOSALROUTE; + if ("_TransplacentalRoute".equals(codeString)) + return _TRANSPLACENTALROUTE; + if ("_TranstrachealRoute".equals(codeString)) + return _TRANSTRACHEALROUTE; + if ("_TranstympanicRoute".equals(codeString)) + return _TRANSTYMPANICROUTE; + if ("_UreteralRoute".equals(codeString)) + return _URETERALROUTE; + if ("_UrethralRoute".equals(codeString)) + return _URETHRALROUTE; + if ("_UrinaryBladderRoute".equals(codeString)) + return _URINARYBLADDERROUTE; + if ("_UrinaryTractRoute".equals(codeString)) + return _URINARYTRACTROUTE; + if ("_VaginalRoute".equals(codeString)) + return _VAGINALROUTE; + if ("_VitreousHumourRoute".equals(codeString)) + return _VITREOUSHUMOURROUTE; + throw new FHIRException("Unknown V3RouteOfAdministration code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ROUTEBYMETHOD: return "_RouteByMethod"; + case SOAK: return "SOAK"; + case SHAMPOO: return "SHAMPOO"; + case TRNSLING: return "TRNSLING"; + case PO: return "PO"; + case GARGLE: return "GARGLE"; + case SUCK: return "SUCK"; + case _CHEW: return "_Chew"; + case CHEW: return "CHEW"; + case _DIFFUSION: return "_Diffusion"; + case EXTCORPDIF: return "EXTCORPDIF"; + case HEMODIFF: return "HEMODIFF"; + case TRNSDERMD: return "TRNSDERMD"; + case _DISSOLVE: return "_Dissolve"; + case DISSOLVE: return "DISSOLVE"; + case SL: return "SL"; + case _DOUCHE: return "_Douche"; + case DOUCHE: return "DOUCHE"; + case _ELECTROOSMOSISROUTE: return "_ElectroOsmosisRoute"; + case ELECTOSMOS: return "ELECTOSMOS"; + case _ENEMA: return "_Enema"; + case ENEMA: return "ENEMA"; + case RETENEMA: return "RETENEMA"; + case _FLUSH: return "_Flush"; + case IVFLUSH: return "IVFLUSH"; + case _IMPLANTATION: return "_Implantation"; + case IDIMPLNT: return "IDIMPLNT"; + case IVITIMPLNT: return "IVITIMPLNT"; + case SQIMPLNT: return "SQIMPLNT"; + case _INFUSION: return "_Infusion"; + case EPI: return "EPI"; + case IA: return "IA"; + case IC: return "IC"; + case ICOR: return "ICOR"; + case IOSSC: return "IOSSC"; + case IT: return "IT"; + case IV: return "IV"; + case IVC: return "IVC"; + case IVCC: return "IVCC"; + case IVCI: return "IVCI"; + case PCA: return "PCA"; + case IVASCINFUS: return "IVASCINFUS"; + case SQINFUS: return "SQINFUS"; + case _INHALATION: return "_Inhalation"; + case IPINHL: return "IPINHL"; + case ORIFINHL: return "ORIFINHL"; + case REBREATH: return "REBREATH"; + case IPPB: return "IPPB"; + case NASINHL: return "NASINHL"; + case NASINHLC: return "NASINHLC"; + case NEB: return "NEB"; + case NASNEB: return "NASNEB"; + case ORNEB: return "ORNEB"; + case TRACH: return "TRACH"; + case VENT: return "VENT"; + case VENTMASK: return "VENTMASK"; + case _INJECTION: return "_Injection"; + case AMNINJ: return "AMNINJ"; + case BILINJ: return "BILINJ"; + case CHOLINJ: return "CHOLINJ"; + case CERVINJ: return "CERVINJ"; + case EPIDURINJ: return "EPIDURINJ"; + case EPIINJ: return "EPIINJ"; + case EPINJSP: return "EPINJSP"; + case EXTRAMNINJ: return "EXTRAMNINJ"; + case EXTCORPINJ: return "EXTCORPINJ"; + case GBINJ: return "GBINJ"; + case GINGINJ: return "GINGINJ"; + case BLADINJ: return "BLADINJ"; + case ENDOSININJ: return "ENDOSININJ"; + case HEMOPORT: return "HEMOPORT"; + case IABDINJ: return "IABDINJ"; + case IAINJ: return "IAINJ"; + case IAINJP: return "IAINJP"; + case IAINJSP: return "IAINJSP"; + case IARTINJ: return "IARTINJ"; + case IBURSINJ: return "IBURSINJ"; + case ICARDINJ: return "ICARDINJ"; + case ICARDINJRP: return "ICARDINJRP"; + case ICARDINJSP: return "ICARDINJSP"; + case ICARINJP: return "ICARINJP"; + case ICARTINJ: return "ICARTINJ"; + case ICAUDINJ: return "ICAUDINJ"; + case ICAVINJ: return "ICAVINJ"; + case ICAVITINJ: return "ICAVITINJ"; + case ICEREBINJ: return "ICEREBINJ"; + case ICISTERNINJ: return "ICISTERNINJ"; + case ICORONINJ: return "ICORONINJ"; + case ICORONINJP: return "ICORONINJP"; + case ICORPCAVINJ: return "ICORPCAVINJ"; + case IDINJ: return "IDINJ"; + case IDISCINJ: return "IDISCINJ"; + case IDUCTINJ: return "IDUCTINJ"; + case IDURINJ: return "IDURINJ"; + case IEPIDINJ: return "IEPIDINJ"; + case IEPITHINJ: return "IEPITHINJ"; + case ILESINJ: return "ILESINJ"; + case ILUMINJ: return "ILUMINJ"; + case ILYMPJINJ: return "ILYMPJINJ"; + case IM: return "IM"; + case IMD: return "IMD"; + case IMZ: return "IMZ"; + case IMEDULINJ: return "IMEDULINJ"; + case INTERMENINJ: return "INTERMENINJ"; + case INTERSTITINJ: return "INTERSTITINJ"; + case IOINJ: return "IOINJ"; + case IOSSINJ: return "IOSSINJ"; + case IOVARINJ: return "IOVARINJ"; + case IPCARDINJ: return "IPCARDINJ"; + case IPERINJ: return "IPERINJ"; + case IPINJ: return "IPINJ"; + case IPLRINJ: return "IPLRINJ"; + case IPROSTINJ: return "IPROSTINJ"; + case IPUMPINJ: return "IPUMPINJ"; + case ISINJ: return "ISINJ"; + case ISTERINJ: return "ISTERINJ"; + case ISYNINJ: return "ISYNINJ"; + case ITENDINJ: return "ITENDINJ"; + case ITESTINJ: return "ITESTINJ"; + case ITHORINJ: return "ITHORINJ"; + case ITINJ: return "ITINJ"; + case ITUBINJ: return "ITUBINJ"; + case ITUMINJ: return "ITUMINJ"; + case ITYMPINJ: return "ITYMPINJ"; + case IUINJ: return "IUINJ"; + case IUINJC: return "IUINJC"; + case IURETINJ: return "IURETINJ"; + case IVASCINJ: return "IVASCINJ"; + case IVENTINJ: return "IVENTINJ"; + case IVESINJ: return "IVESINJ"; + case IVINJ: return "IVINJ"; + case IVINJBOL: return "IVINJBOL"; + case IVPUSH: return "IVPUSH"; + case IVRPUSH: return "IVRPUSH"; + case IVSPUSH: return "IVSPUSH"; + case IVITINJ: return "IVITINJ"; + case PAINJ: return "PAINJ"; + case PARENTINJ: return "PARENTINJ"; + case PDONTINJ: return "PDONTINJ"; + case PDPINJ: return "PDPINJ"; + case PDURINJ: return "PDURINJ"; + case PNINJ: return "PNINJ"; + case PNSINJ: return "PNSINJ"; + case RBINJ: return "RBINJ"; + case SCINJ: return "SCINJ"; + case SLESINJ: return "SLESINJ"; + case SOFTISINJ: return "SOFTISINJ"; + case SQ: return "SQ"; + case SUBARACHINJ: return "SUBARACHINJ"; + case SUBMUCINJ: return "SUBMUCINJ"; + case TRPLACINJ: return "TRPLACINJ"; + case TRTRACHINJ: return "TRTRACHINJ"; + case URETHINJ: return "URETHINJ"; + case URETINJ: return "URETINJ"; + case _INSERTION: return "_Insertion"; + case CERVINS: return "CERVINS"; + case IOSURGINS: return "IOSURGINS"; + case IU: return "IU"; + case LPINS: return "LPINS"; + case PR: return "PR"; + case SQSURGINS: return "SQSURGINS"; + case URETHINS: return "URETHINS"; + case VAGINSI: return "VAGINSI"; + case _INSTILLATION: return "_Instillation"; + case CECINSTL: return "CECINSTL"; + case EFT: return "EFT"; + case ENTINSTL: return "ENTINSTL"; + case GT: return "GT"; + case NGT: return "NGT"; + case OGT: return "OGT"; + case BLADINSTL: return "BLADINSTL"; + case CAPDINSTL: return "CAPDINSTL"; + case CTINSTL: return "CTINSTL"; + case ETINSTL: return "ETINSTL"; + case GJT: return "GJT"; + case IBRONCHINSTIL: return "IBRONCHINSTIL"; + case IDUODINSTIL: return "IDUODINSTIL"; + case IESOPHINSTIL: return "IESOPHINSTIL"; + case IGASTINSTIL: return "IGASTINSTIL"; + case IILEALINJ: return "IILEALINJ"; + case IOINSTL: return "IOINSTL"; + case ISININSTIL: return "ISININSTIL"; + case ITRACHINSTIL: return "ITRACHINSTIL"; + case IUINSTL: return "IUINSTL"; + case JJTINSTL: return "JJTINSTL"; + case LARYNGINSTIL: return "LARYNGINSTIL"; + case NASALINSTIL: return "NASALINSTIL"; + case NASOGASINSTIL: return "NASOGASINSTIL"; + case NTT: return "NTT"; + case OJJ: return "OJJ"; + case OT: return "OT"; + case PDPINSTL: return "PDPINSTL"; + case PNSINSTL: return "PNSINSTL"; + case RECINSTL: return "RECINSTL"; + case RECTINSTL: return "RECTINSTL"; + case SININSTIL: return "SININSTIL"; + case SOFTISINSTIL: return "SOFTISINSTIL"; + case TRACHINSTL: return "TRACHINSTL"; + case TRTYMPINSTIL: return "TRTYMPINSTIL"; + case URETHINSTL: return "URETHINSTL"; + case _IONTOPHORESISROUTE: return "_IontophoresisRoute"; + case IONTO: return "IONTO"; + case _IRRIGATION: return "_Irrigation"; + case GUIRR: return "GUIRR"; + case IGASTIRR: return "IGASTIRR"; + case ILESIRR: return "ILESIRR"; + case IOIRR: return "IOIRR"; + case BLADIRR: return "BLADIRR"; + case BLADIRRC: return "BLADIRRC"; + case BLADIRRT: return "BLADIRRT"; + case RECIRR: return "RECIRR"; + case _LAVAGEROUTE: return "_LavageRoute"; + case IGASTLAV: return "IGASTLAV"; + case _MUCOSALABSORPTIONROUTE: return "_MucosalAbsorptionRoute"; + case IDOUDMAB: return "IDOUDMAB"; + case ITRACHMAB: return "ITRACHMAB"; + case SMUCMAB: return "SMUCMAB"; + case _NEBULIZATION: return "_Nebulization"; + case ETNEB: return "ETNEB"; + case _RINSE: return "_Rinse"; + case DENRINSE: return "DENRINSE"; + case ORRINSE: return "ORRINSE"; + case _SUPPOSITORYROUTE: return "_SuppositoryRoute"; + case URETHSUP: return "URETHSUP"; + case _SWISH: return "_Swish"; + case SWISHSPIT: return "SWISHSPIT"; + case SWISHSWAL: return "SWISHSWAL"; + case _TOPICALABSORPTIONROUTE: return "_TopicalAbsorptionRoute"; + case TTYMPTABSORP: return "TTYMPTABSORP"; + case _TOPICALAPPLICATION: return "_TopicalApplication"; + case DRESS: return "DRESS"; + case SWAB: return "SWAB"; + case TOPICAL: return "TOPICAL"; + case BUC: return "BUC"; + case CERV: return "CERV"; + case DEN: return "DEN"; + case GIN: return "GIN"; + case HAIR: return "HAIR"; + case ICORNTA: return "ICORNTA"; + case ICORONTA: return "ICORONTA"; + case IESOPHTA: return "IESOPHTA"; + case IILEALTA: return "IILEALTA"; + case ILTOP: return "ILTOP"; + case ILUMTA: return "ILUMTA"; + case IOTOP: return "IOTOP"; + case LARYNGTA: return "LARYNGTA"; + case MUC: return "MUC"; + case NAIL: return "NAIL"; + case NASAL: return "NASAL"; + case OPTHALTA: return "OPTHALTA"; + case ORALTA: return "ORALTA"; + case ORMUC: return "ORMUC"; + case OROPHARTA: return "OROPHARTA"; + case PERIANAL: return "PERIANAL"; + case PERINEAL: return "PERINEAL"; + case PDONTTA: return "PDONTTA"; + case RECTAL: return "RECTAL"; + case SCALP: return "SCALP"; + case OCDRESTA: return "OCDRESTA"; + case SKIN: return "SKIN"; + case SUBCONJTA: return "SUBCONJTA"; + case TMUCTA: return "TMUCTA"; + case VAGINS: return "VAGINS"; + case INSUF: return "INSUF"; + case TRNSDERM: return "TRNSDERM"; + case _ROUTEBYSITE: return "_RouteBySite"; + case _AMNIOTICFLUIDSACROUTE: return "_AmnioticFluidSacRoute"; + case _BILIARYROUTE: return "_BiliaryRoute"; + case _BODYSURFACEROUTE: return "_BodySurfaceRoute"; + case _BUCCALMUCOSAROUTE: return "_BuccalMucosaRoute"; + case _CECOSTOMYROUTE: return "_CecostomyRoute"; + case _CERVICALROUTE: return "_CervicalRoute"; + case _ENDOCERVICALROUTE: return "_EndocervicalRoute"; + case _ENTERALROUTE: return "_EnteralRoute"; + case _EPIDURALROUTE: return "_EpiduralRoute"; + case _EXTRAAMNIOTICROUTE: return "_ExtraAmnioticRoute"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "_ExtracorporealCirculationRoute"; + case _GASTRICROUTE: return "_GastricRoute"; + case _GENITOURINARYROUTE: return "_GenitourinaryRoute"; + case _GINGIVALROUTE: return "_GingivalRoute"; + case _HAIRROUTE: return "_HairRoute"; + case _INTERAMENINGEALROUTE: return "_InterameningealRoute"; + case _INTERSTITIALROUTE: return "_InterstitialRoute"; + case _INTRAABDOMINALROUTE: return "_IntraabdominalRoute"; + case _INTRAARTERIALROUTE: return "_IntraarterialRoute"; + case _INTRAARTICULARROUTE: return "_IntraarticularRoute"; + case _INTRABRONCHIALROUTE: return "_IntrabronchialRoute"; + case _INTRABURSALROUTE: return "_IntrabursalRoute"; + case _INTRACARDIACROUTE: return "_IntracardiacRoute"; + case _INTRACARTILAGINOUSROUTE: return "_IntracartilaginousRoute"; + case _INTRACAUDALROUTE: return "_IntracaudalRoute"; + case _INTRACAVERNOSALROUTE: return "_IntracavernosalRoute"; + case _INTRACAVITARYROUTE: return "_IntracavitaryRoute"; + case _INTRACEREBRALROUTE: return "_IntracerebralRoute"; + case _INTRACERVICALROUTE: return "_IntracervicalRoute"; + case _INTRACISTERNALROUTE: return "_IntracisternalRoute"; + case _INTRACORNEALROUTE: return "_IntracornealRoute"; + case _INTRACORONALROUTE: return "_IntracoronalRoute"; + case _INTRACORONARYROUTE: return "_IntracoronaryRoute"; + case _INTRACORPUSCAVERNOSUMROUTE: return "_IntracorpusCavernosumRoute"; + case _INTRADERMALROUTE: return "_IntradermalRoute"; + case _INTRADISCALROUTE: return "_IntradiscalRoute"; + case _INTRADUCTALROUTE: return "_IntraductalRoute"; + case _INTRADUODENALROUTE: return "_IntraduodenalRoute"; + case _INTRADURALROUTE: return "_IntraduralRoute"; + case _INTRAEPIDERMALROUTE: return "_IntraepidermalRoute"; + case _INTRAEPITHELIALROUTE: return "_IntraepithelialRoute"; + case _INTRAESOPHAGEALROUTE: return "_IntraesophagealRoute"; + case _INTRAGASTRICROUTE: return "_IntragastricRoute"; + case _INTRAILEALROUTE: return "_IntrailealRoute"; + case _INTRALESIONALROUTE: return "_IntralesionalRoute"; + case _INTRALUMINALROUTE: return "_IntraluminalRoute"; + case _INTRALYMPHATICROUTE: return "_IntralymphaticRoute"; + case _INTRAMEDULLARYROUTE: return "_IntramedullaryRoute"; + case _INTRAMUSCULARROUTE: return "_IntramuscularRoute"; + case _INTRAOCULARROUTE: return "_IntraocularRoute"; + case _INTRAOSSEOUSROUTE: return "_IntraosseousRoute"; + case _INTRAOVARIANROUTE: return "_IntraovarianRoute"; + case _INTRAPERICARDIALROUTE: return "_IntrapericardialRoute"; + case _INTRAPERITONEALROUTE: return "_IntraperitonealRoute"; + case _INTRAPLEURALROUTE: return "_IntrapleuralRoute"; + case _INTRAPROSTATICROUTE: return "_IntraprostaticRoute"; + case _INTRAPULMONARYROUTE: return "_IntrapulmonaryRoute"; + case _INTRASINALROUTE: return "_IntrasinalRoute"; + case _INTRASPINALROUTE: return "_IntraspinalRoute"; + case _INTRASTERNALROUTE: return "_IntrasternalRoute"; + case _INTRASYNOVIALROUTE: return "_IntrasynovialRoute"; + case _INTRATENDINOUSROUTE: return "_IntratendinousRoute"; + case _INTRATESTICULARROUTE: return "_IntratesticularRoute"; + case _INTRATHECALROUTE: return "_IntrathecalRoute"; + case _INTRATHORACICROUTE: return "_IntrathoracicRoute"; + case _INTRATRACHEALROUTE: return "_IntratrachealRoute"; + case _INTRATUBULARROUTE: return "_IntratubularRoute"; + case _INTRATUMORROUTE: return "_IntratumorRoute"; + case _INTRATYMPANICROUTE: return "_IntratympanicRoute"; + case _INTRAUTERINEROUTE: return "_IntrauterineRoute"; + case _INTRAVASCULARROUTE: return "_IntravascularRoute"; + case _INTRAVENOUSROUTE: return "_IntravenousRoute"; + case _INTRAVENTRICULARROUTE: return "_IntraventricularRoute"; + case _INTRAVESICLEROUTE: return "_IntravesicleRoute"; + case _INTRAVITREALROUTE: return "_IntravitrealRoute"; + case _JEJUNUMROUTE: return "_JejunumRoute"; + case _LACRIMALPUNCTAROUTE: return "_LacrimalPunctaRoute"; + case _LARYNGEALROUTE: return "_LaryngealRoute"; + case _LINGUALROUTE: return "_LingualRoute"; + case _MUCOUSMEMBRANEROUTE: return "_MucousMembraneRoute"; + case _NAILROUTE: return "_NailRoute"; + case _NASALROUTE: return "_NasalRoute"; + case _OPHTHALMICROUTE: return "_OphthalmicRoute"; + case _ORALROUTE: return "_OralRoute"; + case _OROMUCOSALROUTE: return "_OromucosalRoute"; + case _OROPHARYNGEALROUTE: return "_OropharyngealRoute"; + case _OTICROUTE: return "_OticRoute"; + case _PARANASALSINUSESROUTE: return "_ParanasalSinusesRoute"; + case _PARENTERALROUTE: return "_ParenteralRoute"; + case _PERIANALROUTE: return "_PerianalRoute"; + case _PERIARTICULARROUTE: return "_PeriarticularRoute"; + case _PERIDURALROUTE: return "_PeriduralRoute"; + case _PERINEALROUTE: return "_PerinealRoute"; + case _PERINEURALROUTE: return "_PerineuralRoute"; + case _PERIODONTALROUTE: return "_PeriodontalRoute"; + case _PULMONARYROUTE: return "_PulmonaryRoute"; + case _RECTALROUTE: return "_RectalRoute"; + case _RESPIRATORYTRACTROUTE: return "_RespiratoryTractRoute"; + case _RETROBULBARROUTE: return "_RetrobulbarRoute"; + case _SCALPROUTE: return "_ScalpRoute"; + case _SINUSUNSPECIFIEDROUTE: return "_SinusUnspecifiedRoute"; + case _SKINROUTE: return "_SkinRoute"; + case _SOFTTISSUEROUTE: return "_SoftTissueRoute"; + case _SUBARACHNOIDROUTE: return "_SubarachnoidRoute"; + case _SUBCONJUNCTIVALROUTE: return "_SubconjunctivalRoute"; + case _SUBCUTANEOUSROUTE: return "_SubcutaneousRoute"; + case _SUBLESIONALROUTE: return "_SublesionalRoute"; + case _SUBLINGUALROUTE: return "_SublingualRoute"; + case _SUBMUCOSALROUTE: return "_SubmucosalRoute"; + case _TRACHEOSTOMYROUTE: return "_TracheostomyRoute"; + case _TRANSMUCOSALROUTE: return "_TransmucosalRoute"; + case _TRANSPLACENTALROUTE: return "_TransplacentalRoute"; + case _TRANSTRACHEALROUTE: return "_TranstrachealRoute"; + case _TRANSTYMPANICROUTE: return "_TranstympanicRoute"; + case _URETERALROUTE: return "_UreteralRoute"; + case _URETHRALROUTE: return "_UrethralRoute"; + case _URINARYBLADDERROUTE: return "_UrinaryBladderRoute"; + case _URINARYTRACTROUTE: return "_UrinaryTractRoute"; + case _VAGINALROUTE: return "_VaginalRoute"; + case _VITREOUSHUMOURROUTE: return "_VitreousHumourRoute"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RouteOfAdministration"; + } + public String getDefinition() { + switch (this) { + case _ROUTEBYMETHOD: return "Route of substance administration classified by administration method."; + case SOAK: return "Immersion (soak)"; + case SHAMPOO: return "Shampoo"; + case TRNSLING: return "Translingual"; + case PO: return "Swallow, oral"; + case GARGLE: return "Gargle"; + case SUCK: return "Suck, oromucosal"; + case _CHEW: return "Chew"; + case CHEW: return "Chew, oral"; + case _DIFFUSION: return "Diffusion"; + case EXTCORPDIF: return "Diffusion, extracorporeal"; + case HEMODIFF: return "Diffusion, hemodialysis"; + case TRNSDERMD: return "Diffusion, transdermal"; + case _DISSOLVE: return "Dissolve"; + case DISSOLVE: return "Dissolve, oral"; + case SL: return "Dissolve, sublingual"; + case _DOUCHE: return "Douche"; + case DOUCHE: return "Douche, vaginal"; + case _ELECTROOSMOSISROUTE: return "Electro-osmosis"; + case ELECTOSMOS: return "Electro-osmosis"; + case _ENEMA: return "Enema"; + case ENEMA: return "Enema, rectal"; + case RETENEMA: return "Enema, rectal retention"; + case _FLUSH: return "Flush"; + case IVFLUSH: return "Flush, intravenous catheter"; + case _IMPLANTATION: return "Implantation"; + case IDIMPLNT: return "Implantation, intradermal"; + case IVITIMPLNT: return "Implantation, intravitreal"; + case SQIMPLNT: return "Implantation, subcutaneous"; + case _INFUSION: return "Infusion"; + case EPI: return "Infusion, epidural"; + case IA: return "Infusion, intraarterial catheter"; + case IC: return "Infusion, intracardiac"; + case ICOR: return "Infusion, intracoronary"; + case IOSSC: return "Infusion, intraosseous, continuous"; + case IT: return "Infusion, intrathecal"; + case IV: return "Infusion, intravenous"; + case IVC: return "Infusion, intravenous catheter"; + case IVCC: return "Infusion, intravenous catheter, continuous"; + case IVCI: return "Infusion, intravenous catheter, intermittent"; + case PCA: return "Infusion, intravenous catheter, pca pump"; + case IVASCINFUS: return "Infusion, intravascular"; + case SQINFUS: return "Infusion, subcutaneous"; + case _INHALATION: return "Inhalation"; + case IPINHL: return "Inhalation, oral"; + case ORIFINHL: return "Inhalation, oral intermittent flow"; + case REBREATH: return "Inhalation, oral rebreather mask"; + case IPPB: return "Inhalation, intermittent positive pressure breathing (ippb)"; + case NASINHL: return "Inhalation, nasal"; + case NASINHLC: return "Inhalation, nasal, prongs"; + case NEB: return "Inhalation, nebulization"; + case NASNEB: return "Inhalation, nebulization, nasal"; + case ORNEB: return "Inhalation, nebulization, oral"; + case TRACH: return "Inhalation, tracheostomy"; + case VENT: return "Inhalation, ventilator"; + case VENTMASK: return "Inhalation, ventimask"; + case _INJECTION: return "Injection"; + case AMNINJ: return "Injection, amniotic fluid"; + case BILINJ: return "Injection, biliary tract"; + case CHOLINJ: return "Injection, for cholangiography"; + case CERVINJ: return "Injection, cervical"; + case EPIDURINJ: return "Injection, epidural"; + case EPIINJ: return "Injection, epidural, push"; + case EPINJSP: return "Injection, epidural, slow push"; + case EXTRAMNINJ: return "Injection, extra-amniotic"; + case EXTCORPINJ: return "Injection, extracorporeal"; + case GBINJ: return "Injection, gastric button"; + case GINGINJ: return "Injection, gingival"; + case BLADINJ: return "Injection, urinary bladder"; + case ENDOSININJ: return "Injection, endosinusial"; + case HEMOPORT: return "Injection, hemodialysis port"; + case IABDINJ: return "Injection, intra-abdominal"; + case IAINJ: return "Injection, intraarterial"; + case IAINJP: return "Injection, intraarterial, push"; + case IAINJSP: return "Injection, intraarterial, slow push"; + case IARTINJ: return "Injection, intraarticular"; + case IBURSINJ: return "Injection, intrabursal"; + case ICARDINJ: return "Injection, intracardiac"; + case ICARDINJRP: return "Injection, intracardiac, rapid push"; + case ICARDINJSP: return "Injection, intracardiac, slow push"; + case ICARINJP: return "Injection, intracardiac, push"; + case ICARTINJ: return "Injection, intracartilaginous"; + case ICAUDINJ: return "Injection, intracaudal"; + case ICAVINJ: return "Injection, intracavernous"; + case ICAVITINJ: return "Injection, intracavitary"; + case ICEREBINJ: return "Injection, intracerebral"; + case ICISTERNINJ: return "Injection, intracisternal"; + case ICORONINJ: return "Injection, intracoronary"; + case ICORONINJP: return "Injection, intracoronary, push"; + case ICORPCAVINJ: return "Injection, intracorpus cavernosum"; + case IDINJ: return "Injection, intradermal"; + case IDISCINJ: return "Injection, intradiscal"; + case IDUCTINJ: return "Injection, intraductal"; + case IDURINJ: return "Injection, intradural"; + case IEPIDINJ: return "Injection, intraepidermal"; + case IEPITHINJ: return "Injection, intraepithelial"; + case ILESINJ: return "Injection, intralesional"; + case ILUMINJ: return "Injection, intraluminal"; + case ILYMPJINJ: return "Injection, intralymphatic"; + case IM: return "Injection, intramuscular"; + case IMD: return "Injection, intramuscular, deep"; + case IMZ: return "Injection, intramuscular, z track"; + case IMEDULINJ: return "Injection, intramedullary"; + case INTERMENINJ: return "Injection, interameningeal"; + case INTERSTITINJ: return "Injection, interstitial"; + case IOINJ: return "Injection, intraocular"; + case IOSSINJ: return "Injection, intraosseous"; + case IOVARINJ: return "Injection, intraovarian"; + case IPCARDINJ: return "Injection, intrapericardial"; + case IPERINJ: return "Injection, intraperitoneal"; + case IPINJ: return "Injection, intrapulmonary"; + case IPLRINJ: return "Injection, intrapleural"; + case IPROSTINJ: return "Injection, intraprostatic"; + case IPUMPINJ: return "Injection, insulin pump"; + case ISINJ: return "Injection, intraspinal"; + case ISTERINJ: return "Injection, intrasternal"; + case ISYNINJ: return "Injection, intrasynovial"; + case ITENDINJ: return "Injection, intratendinous"; + case ITESTINJ: return "Injection, intratesticular"; + case ITHORINJ: return "Injection, intrathoracic"; + case ITINJ: return "Injection, intrathecal"; + case ITUBINJ: return "Injection, intratubular"; + case ITUMINJ: return "Injection, intratumor"; + case ITYMPINJ: return "Injection, intratympanic"; + case IUINJ: return "Injection, intracervical (uterus)"; + case IUINJC: return "Injection, intracervical (uterus)"; + case IURETINJ: return "Injection, intraureteral, retrograde"; + case IVASCINJ: return "Injection, intravascular"; + case IVENTINJ: return "Injection, intraventricular (heart)"; + case IVESINJ: return "Injection, intravesicle"; + case IVINJ: return "Injection, intravenous"; + case IVINJBOL: return "Injection, intravenous, bolus"; + case IVPUSH: return "Injection, intravenous, push"; + case IVRPUSH: return "Injection, intravenous, rapid push"; + case IVSPUSH: return "Injection, intravenous, slow push"; + case IVITINJ: return "Injection, intravitreal"; + case PAINJ: return "Injection, periarticular"; + case PARENTINJ: return "Injection, parenteral"; + case PDONTINJ: return "Injection, periodontal"; + case PDPINJ: return "Injection, peritoneal dialysis port"; + case PDURINJ: return "Injection, peridural"; + case PNINJ: return "Injection, perineural"; + case PNSINJ: return "Injection, paranasal sinuses"; + case RBINJ: return "Injection, retrobulbar"; + case SCINJ: return "Injection, subconjunctival"; + case SLESINJ: return "Injection, sublesional"; + case SOFTISINJ: return "Injection, soft tissue"; + case SQ: return "Injection, subcutaneous"; + case SUBARACHINJ: return "Injection, subarachnoid"; + case SUBMUCINJ: return "Injection, submucosal"; + case TRPLACINJ: return "Injection, transplacental"; + case TRTRACHINJ: return "Injection, transtracheal"; + case URETHINJ: return "Injection, urethral"; + case URETINJ: return "Injection, ureteral"; + case _INSERTION: return "Insertion"; + case CERVINS: return "Insertion, cervical (uterine)"; + case IOSURGINS: return "Insertion, intraocular, surgical"; + case IU: return "Insertion, intrauterine"; + case LPINS: return "Insertion, lacrimal puncta"; + case PR: return "Insertion, rectal"; + case SQSURGINS: return "Insertion, subcutaneous, surgical"; + case URETHINS: return "Insertion, urethral"; + case VAGINSI: return "Insertion, vaginal"; + case _INSTILLATION: return "Instillation"; + case CECINSTL: return "Instillation, cecostomy"; + case EFT: return "Instillation, enteral feeding tube"; + case ENTINSTL: return "Instillation, enteral"; + case GT: return "Instillation, gastrostomy tube"; + case NGT: return "Instillation, nasogastric tube"; + case OGT: return "Instillation, orogastric tube"; + case BLADINSTL: return "Instillation, urinary catheter"; + case CAPDINSTL: return "Instillation, continuous ambulatory peritoneal dialysis port"; + case CTINSTL: return "Instillation, chest tube"; + case ETINSTL: return "Instillation, endotracheal tube"; + case GJT: return "Instillation, gastro-jejunostomy tube"; + case IBRONCHINSTIL: return "Instillation, intrabronchial"; + case IDUODINSTIL: return "Instillation, intraduodenal"; + case IESOPHINSTIL: return "Instillation, intraesophageal"; + case IGASTINSTIL: return "Instillation, intragastric"; + case IILEALINJ: return "Instillation, intraileal"; + case IOINSTL: return "Instillation, intraocular"; + case ISININSTIL: return "Instillation, intrasinal"; + case ITRACHINSTIL: return "Instillation, intratracheal"; + case IUINSTL: return "Instillation, intrauterine"; + case JJTINSTL: return "Instillation, jejunostomy tube"; + case LARYNGINSTIL: return "Instillation, laryngeal"; + case NASALINSTIL: return "Instillation, nasal"; + case NASOGASINSTIL: return "Instillation, nasogastric"; + case NTT: return "Instillation, nasotracheal tube"; + case OJJ: return "Instillation, orojejunum tube"; + case OT: return "Instillation, otic"; + case PDPINSTL: return "Instillation, peritoneal dialysis port"; + case PNSINSTL: return "Instillation, paranasal sinuses"; + case RECINSTL: return "Instillation, rectal"; + case RECTINSTL: return "Instillation, rectal tube"; + case SININSTIL: return "Instillation, sinus, unspecified"; + case SOFTISINSTIL: return "Instillation, soft tissue"; + case TRACHINSTL: return "Instillation, tracheostomy"; + case TRTYMPINSTIL: return "Instillation, transtympanic"; + case URETHINSTL: return "Instillation, urethral"; + case _IONTOPHORESISROUTE: return "Iontophoresis"; + case IONTO: return "Topical application, iontophoresis"; + case _IRRIGATION: return "Irrigation"; + case GUIRR: return "Irrigation, genitourinary"; + case IGASTIRR: return "Irrigation, intragastric"; + case ILESIRR: return "Irrigation, intralesional"; + case IOIRR: return "Irrigation, intraocular"; + case BLADIRR: return "Irrigation, urinary bladder"; + case BLADIRRC: return "Irrigation, urinary bladder, continuous"; + case BLADIRRT: return "Irrigation, urinary bladder, tidal"; + case RECIRR: return "Irrigation, rectal"; + case _LAVAGEROUTE: return "Lavage"; + case IGASTLAV: return "Lavage, intragastric"; + case _MUCOSALABSORPTIONROUTE: return "Mucosal absorption"; + case IDOUDMAB: return "Mucosal absorption, intraduodenal"; + case ITRACHMAB: return "Mucosal absorption, intratracheal"; + case SMUCMAB: return "Mucosal absorption, submucosal"; + case _NEBULIZATION: return "Nebulization"; + case ETNEB: return "Nebulization, endotracheal tube"; + case _RINSE: return "Rinse"; + case DENRINSE: return "Rinse, dental"; + case ORRINSE: return "Rinse, oral"; + case _SUPPOSITORYROUTE: return "Suppository"; + case URETHSUP: return "Suppository, urethral"; + case _SWISH: return "Swish"; + case SWISHSPIT: return "Swish and spit out, oromucosal"; + case SWISHSWAL: return "Swish and swallow, oromucosal"; + case _TOPICALABSORPTIONROUTE: return "Topical absorption"; + case TTYMPTABSORP: return "Topical absorption, transtympanic"; + case _TOPICALAPPLICATION: return "Topical application"; + case DRESS: return "Topical application, soaked dressing"; + case SWAB: return "Topical application, swab"; + case TOPICAL: return "Topical"; + case BUC: return "Topical application, buccal"; + case CERV: return "Topical application, cervical"; + case DEN: return "Topical application, dental"; + case GIN: return "Topical application, gingival"; + case HAIR: return "Topical application, hair"; + case ICORNTA: return "Topical application, intracorneal"; + case ICORONTA: return "Topical application, intracoronal (dental)"; + case IESOPHTA: return "Topical application, intraesophageal"; + case IILEALTA: return "Topical application, intraileal"; + case ILTOP: return "Topical application, intralesional"; + case ILUMTA: return "Topical application, intraluminal"; + case IOTOP: return "Topical application, intraocular"; + case LARYNGTA: return "Topical application, laryngeal"; + case MUC: return "Topical application, mucous membrane"; + case NAIL: return "Topical application, nail"; + case NASAL: return "Topical application, nasal"; + case OPTHALTA: return "Topical application, ophthalmic"; + case ORALTA: return "Topical application, oral"; + case ORMUC: return "Topical application, oromucosal"; + case OROPHARTA: return "Topical application, oropharyngeal"; + case PERIANAL: return "Topical application, perianal"; + case PERINEAL: return "Topical application, perineal"; + case PDONTTA: return "Topical application, periodontal"; + case RECTAL: return "Topical application, rectal"; + case SCALP: return "Topical application, scalp"; + case OCDRESTA: return "Occlusive dressing technique"; + case SKIN: return "Topical application, skin"; + case SUBCONJTA: return "Subconjunctival"; + case TMUCTA: return "Topical application, transmucosal"; + case VAGINS: return "Insertion, vaginal"; + case INSUF: return "Insufflation"; + case TRNSDERM: return "Transdermal"; + case _ROUTEBYSITE: return "Route of substance administration classified by site."; + case _AMNIOTICFLUIDSACROUTE: return "Amniotic fluid sac"; + case _BILIARYROUTE: return "Biliary tract"; + case _BODYSURFACEROUTE: return "Body surface"; + case _BUCCALMUCOSAROUTE: return "Buccal mucosa"; + case _CECOSTOMYROUTE: return "Cecostomy"; + case _CERVICALROUTE: return "Cervix of the uterus"; + case _ENDOCERVICALROUTE: return "Endocervical"; + case _ENTERALROUTE: return "Enteral"; + case _EPIDURALROUTE: return "Epidural"; + case _EXTRAAMNIOTICROUTE: return "Extra-amniotic"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "Extracorporeal circulation"; + case _GASTRICROUTE: return "Gastric"; + case _GENITOURINARYROUTE: return "Genitourinary"; + case _GINGIVALROUTE: return "Gingival"; + case _HAIRROUTE: return "Hair"; + case _INTERAMENINGEALROUTE: return "Interameningeal"; + case _INTERSTITIALROUTE: return "Interstitial"; + case _INTRAABDOMINALROUTE: return "Intra-abdominal"; + case _INTRAARTERIALROUTE: return "Intra-arterial"; + case _INTRAARTICULARROUTE: return "Intraarticular"; + case _INTRABRONCHIALROUTE: return "Intrabronchial"; + case _INTRABURSALROUTE: return "Intrabursal"; + case _INTRACARDIACROUTE: return "Intracardiac"; + case _INTRACARTILAGINOUSROUTE: return "Intracartilaginous"; + case _INTRACAUDALROUTE: return "Intracaudal"; + case _INTRACAVERNOSALROUTE: return "Intracavernosal"; + case _INTRACAVITARYROUTE: return "Intracavitary"; + case _INTRACEREBRALROUTE: return "Intracerebral"; + case _INTRACERVICALROUTE: return "Intracervical"; + case _INTRACISTERNALROUTE: return "Intracisternal"; + case _INTRACORNEALROUTE: return "Intracorneal"; + case _INTRACORONALROUTE: return "Intracoronal (dental)"; + case _INTRACORONARYROUTE: return "Intracoronary"; + case _INTRACORPUSCAVERNOSUMROUTE: return "Intracorpus cavernosum"; + case _INTRADERMALROUTE: return "Intradermal"; + case _INTRADISCALROUTE: return "Intradiscal"; + case _INTRADUCTALROUTE: return "Intraductal"; + case _INTRADUODENALROUTE: return "Intraduodenal"; + case _INTRADURALROUTE: return "Intradural"; + case _INTRAEPIDERMALROUTE: return "Intraepidermal"; + case _INTRAEPITHELIALROUTE: return "Intraepithelial"; + case _INTRAESOPHAGEALROUTE: return "Intraesophageal"; + case _INTRAGASTRICROUTE: return "Intragastric"; + case _INTRAILEALROUTE: return "Intraileal"; + case _INTRALESIONALROUTE: return "Intralesional"; + case _INTRALUMINALROUTE: return "Intraluminal"; + case _INTRALYMPHATICROUTE: return "Intralymphatic"; + case _INTRAMEDULLARYROUTE: return "Intramedullary"; + case _INTRAMUSCULARROUTE: return "Intramuscular"; + case _INTRAOCULARROUTE: return "Intraocular"; + case _INTRAOSSEOUSROUTE: return "Intraosseous"; + case _INTRAOVARIANROUTE: return "Intraovarian"; + case _INTRAPERICARDIALROUTE: return "Intrapericardial"; + case _INTRAPERITONEALROUTE: return "Intraperitoneal"; + case _INTRAPLEURALROUTE: return "Intrapleural"; + case _INTRAPROSTATICROUTE: return "Intraprostatic"; + case _INTRAPULMONARYROUTE: return "Intrapulmonary"; + case _INTRASINALROUTE: return "Intrasinal"; + case _INTRASPINALROUTE: return "Intraspinal"; + case _INTRASTERNALROUTE: return "Intrasternal"; + case _INTRASYNOVIALROUTE: return "Intrasynovial"; + case _INTRATENDINOUSROUTE: return "Intratendinous"; + case _INTRATESTICULARROUTE: return "Intratesticular"; + case _INTRATHECALROUTE: return "Intrathecal"; + case _INTRATHORACICROUTE: return "Intrathoracic"; + case _INTRATRACHEALROUTE: return "Intratracheal"; + case _INTRATUBULARROUTE: return "Intratubular"; + case _INTRATUMORROUTE: return "Intratumor"; + case _INTRATYMPANICROUTE: return "Intratympanic"; + case _INTRAUTERINEROUTE: return "Intrauterine"; + case _INTRAVASCULARROUTE: return "Intravascular"; + case _INTRAVENOUSROUTE: return "Intravenous"; + case _INTRAVENTRICULARROUTE: return "Intraventricular"; + case _INTRAVESICLEROUTE: return "Intravesicle"; + case _INTRAVITREALROUTE: return "Intravitreal"; + case _JEJUNUMROUTE: return "Jejunum"; + case _LACRIMALPUNCTAROUTE: return "Lacrimal puncta"; + case _LARYNGEALROUTE: return "Laryngeal"; + case _LINGUALROUTE: return "Lingual"; + case _MUCOUSMEMBRANEROUTE: return "Mucous membrane"; + case _NAILROUTE: return "Nail"; + case _NASALROUTE: return "Nasal"; + case _OPHTHALMICROUTE: return "Ophthalmic"; + case _ORALROUTE: return "Oral"; + case _OROMUCOSALROUTE: return "Oromucosal"; + case _OROPHARYNGEALROUTE: return "Oropharyngeal"; + case _OTICROUTE: return "Otic"; + case _PARANASALSINUSESROUTE: return "Paranasal sinuses"; + case _PARENTERALROUTE: return "Parenteral"; + case _PERIANALROUTE: return "Perianal"; + case _PERIARTICULARROUTE: return "Periarticular"; + case _PERIDURALROUTE: return "Peridural"; + case _PERINEALROUTE: return "Perineal"; + case _PERINEURALROUTE: return "Perineural"; + case _PERIODONTALROUTE: return "Periodontal"; + case _PULMONARYROUTE: return "Pulmonary"; + case _RECTALROUTE: return "Rectal"; + case _RESPIRATORYTRACTROUTE: return "Respiratory tract"; + case _RETROBULBARROUTE: return "Retrobulbar"; + case _SCALPROUTE: return "Scalp"; + case _SINUSUNSPECIFIEDROUTE: return "Sinus, unspecified"; + case _SKINROUTE: return "Skin"; + case _SOFTTISSUEROUTE: return "Soft tissue"; + case _SUBARACHNOIDROUTE: return "Subarachnoid"; + case _SUBCONJUNCTIVALROUTE: return "Subconjunctival"; + case _SUBCUTANEOUSROUTE: return "Subcutaneous"; + case _SUBLESIONALROUTE: return "Sublesional"; + case _SUBLINGUALROUTE: return "Sublingual"; + case _SUBMUCOSALROUTE: return "Submucosal"; + case _TRACHEOSTOMYROUTE: return "Tracheostomy"; + case _TRANSMUCOSALROUTE: return "Transmucosal"; + case _TRANSPLACENTALROUTE: return "Transplacental"; + case _TRANSTRACHEALROUTE: return "Transtracheal"; + case _TRANSTYMPANICROUTE: return "Transtympanic"; + case _URETERALROUTE: return "Ureteral"; + case _URETHRALROUTE: return "Urethral"; + case _URINARYBLADDERROUTE: return "Urinary bladder"; + case _URINARYTRACTROUTE: return "Urinary tract"; + case _VAGINALROUTE: return "Vaginal"; + case _VITREOUSHUMOURROUTE: return "Vitreous humour"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ROUTEBYMETHOD: return "RouteByMethod"; + case SOAK: return "Immersion (soak)"; + case SHAMPOO: return "Shampoo"; + case TRNSLING: return "Translingual"; + case PO: return "Swallow, oral"; + case GARGLE: return "Gargle"; + case SUCK: return "Suck, oromucosal"; + case _CHEW: return "Chew"; + case CHEW: return "Chew, oral"; + case _DIFFUSION: return "Diffusion"; + case EXTCORPDIF: return "Diffusion, extracorporeal"; + case HEMODIFF: return "Diffusion, hemodialysis"; + case TRNSDERMD: return "Diffusion, transdermal"; + case _DISSOLVE: return "Dissolve"; + case DISSOLVE: return "Dissolve, oral"; + case SL: return "Dissolve, sublingual"; + case _DOUCHE: return "Douche"; + case DOUCHE: return "Douche, vaginal"; + case _ELECTROOSMOSISROUTE: return "ElectroOsmosisRoute"; + case ELECTOSMOS: return "Electro-osmosis"; + case _ENEMA: return "Enema"; + case ENEMA: return "Enema, rectal"; + case RETENEMA: return "Enema, rectal retention"; + case _FLUSH: return "Flush"; + case IVFLUSH: return "Flush, intravenous catheter"; + case _IMPLANTATION: return "Implantation"; + case IDIMPLNT: return "Implantation, intradermal"; + case IVITIMPLNT: return "Implantation, intravitreal"; + case SQIMPLNT: return "Implantation, subcutaneous"; + case _INFUSION: return "Infusion"; + case EPI: return "Infusion, epidural"; + case IA: return "Infusion, intraarterial catheter"; + case IC: return "Infusion, intracardiac"; + case ICOR: return "Infusion, intracoronary"; + case IOSSC: return "Infusion, intraosseous, continuous"; + case IT: return "Infusion, intrathecal"; + case IV: return "Infusion, intravenous"; + case IVC: return "Infusion, intravenous catheter"; + case IVCC: return "Infusion, intravenous catheter, continuous"; + case IVCI: return "Infusion, intravenous catheter, intermittent"; + case PCA: return "Infusion, intravenous catheter, pca pump"; + case IVASCINFUS: return "Infusion, intravascular"; + case SQINFUS: return "Infusion, subcutaneous"; + case _INHALATION: return "Inhalation"; + case IPINHL: return "Inhalation, respiratory"; + case ORIFINHL: return "Inhalation, oral intermittent flow"; + case REBREATH: return "Inhalation, oral rebreather mask"; + case IPPB: return "Inhalation, intermittent positive pressure breathing (ippb)"; + case NASINHL: return "Inhalation, nasal"; + case NASINHLC: return "Inhalation, nasal cannula"; + case NEB: return "Inhalation, nebulization"; + case NASNEB: return "Inhalation, nebulization, nasal"; + case ORNEB: return "Inhalation, nebulization, oral"; + case TRACH: return "Inhalation, tracheostomy"; + case VENT: return "Inhalation, ventilator"; + case VENTMASK: return "Inhalation, ventimask"; + case _INJECTION: return "Injection"; + case AMNINJ: return "Injection, amniotic fluid"; + case BILINJ: return "Injection, biliary tract"; + case CHOLINJ: return "Injection, for cholangiography"; + case CERVINJ: return "Injection, cervical"; + case EPIDURINJ: return "Injection, epidural"; + case EPIINJ: return "Injection, epidural, push"; + case EPINJSP: return "Injection, epidural, slow push"; + case EXTRAMNINJ: return "Injection, extra-amniotic"; + case EXTCORPINJ: return "Injection, extracorporeal"; + case GBINJ: return "Injection, gastric button"; + case GINGINJ: return "Injection, gingival"; + case BLADINJ: return "Injection, urinary bladder"; + case ENDOSININJ: return "Injection, endosinusial"; + case HEMOPORT: return "Injection, hemodialysis port"; + case IABDINJ: return "Injection, intra-abdominal"; + case IAINJ: return "Injection, intraarterial"; + case IAINJP: return "Injection, intraarterial, push"; + case IAINJSP: return "Injection, intraarterial, slow push"; + case IARTINJ: return "Injection, intraarticular"; + case IBURSINJ: return "Injection, intrabursal"; + case ICARDINJ: return "Injection, intracardiac"; + case ICARDINJRP: return "Injection, intracardiac, rapid push"; + case ICARDINJSP: return "Injection, intracardiac, slow push"; + case ICARINJP: return "Injection, intracardiac, push"; + case ICARTINJ: return "Injection, intracartilaginous"; + case ICAUDINJ: return "Injection, intracaudal"; + case ICAVINJ: return "Injection, intracavernous"; + case ICAVITINJ: return "Injection, intracavitary"; + case ICEREBINJ: return "Injection, intracerebral"; + case ICISTERNINJ: return "Injection, intracisternal"; + case ICORONINJ: return "Injection, intracoronary"; + case ICORONINJP: return "Injection, intracoronary, push"; + case ICORPCAVINJ: return "Injection, intracorpus cavernosum"; + case IDINJ: return "Injection, intradermal"; + case IDISCINJ: return "Injection, intradiscal"; + case IDUCTINJ: return "Injection, intraductal"; + case IDURINJ: return "Injection, intradural"; + case IEPIDINJ: return "Injection, intraepidermal"; + case IEPITHINJ: return "Injection, intraepithelial"; + case ILESINJ: return "Injection, intralesional"; + case ILUMINJ: return "Injection, intraluminal"; + case ILYMPJINJ: return "Injection, intralymphatic"; + case IM: return "Injection, intramuscular"; + case IMD: return "Injection, intramuscular, deep"; + case IMZ: return "Injection, intramuscular, z track"; + case IMEDULINJ: return "Injection, intramedullary"; + case INTERMENINJ: return "Injection, interameningeal"; + case INTERSTITINJ: return "Injection, interstitial"; + case IOINJ: return "Injection, intraocular"; + case IOSSINJ: return "Injection, intraosseous"; + case IOVARINJ: return "Injection, intraovarian"; + case IPCARDINJ: return "Injection, intrapericardial"; + case IPERINJ: return "Injection, intraperitoneal"; + case IPINJ: return "Injection, intrapulmonary"; + case IPLRINJ: return "Injection, intrapleural"; + case IPROSTINJ: return "Injection, intraprostatic"; + case IPUMPINJ: return "Injection, insulin pump"; + case ISINJ: return "Injection, intraspinal"; + case ISTERINJ: return "Injection, intrasternal"; + case ISYNINJ: return "Injection, intrasynovial"; + case ITENDINJ: return "Injection, intratendinous"; + case ITESTINJ: return "Injection, intratesticular"; + case ITHORINJ: return "Injection, intrathoracic"; + case ITINJ: return "Injection, intrathecal"; + case ITUBINJ: return "Injection, intratubular"; + case ITUMINJ: return "Injection, intratumor"; + case ITYMPINJ: return "Injection, intratympanic"; + case IUINJ: return "Injection, intrauterine"; + case IUINJC: return "Injection, intracervical (uterus)"; + case IURETINJ: return "Injection, intraureteral, retrograde"; + case IVASCINJ: return "Injection, intravascular"; + case IVENTINJ: return "Injection, intraventricular (heart)"; + case IVESINJ: return "Injection, intravesicle"; + case IVINJ: return "Injection, intravenous"; + case IVINJBOL: return "Injection, intravenous, bolus"; + case IVPUSH: return "Injection, intravenous, push"; + case IVRPUSH: return "Injection, intravenous, rapid push"; + case IVSPUSH: return "Injection, intravenous, slow push"; + case IVITINJ: return "Injection, intravitreal"; + case PAINJ: return "Injection, periarticular"; + case PARENTINJ: return "Injection, parenteral"; + case PDONTINJ: return "Injection, periodontal"; + case PDPINJ: return "Injection, peritoneal dialysis port"; + case PDURINJ: return "Injection, peridural"; + case PNINJ: return "Injection, perineural"; + case PNSINJ: return "Injection, paranasal sinuses"; + case RBINJ: return "Injection, retrobulbar"; + case SCINJ: return "Injection, subconjunctival"; + case SLESINJ: return "Injection, sublesional"; + case SOFTISINJ: return "Injection, soft tissue"; + case SQ: return "Injection, subcutaneous"; + case SUBARACHINJ: return "Injection, subarachnoid"; + case SUBMUCINJ: return "Injection, submucosal"; + case TRPLACINJ: return "Injection, transplacental"; + case TRTRACHINJ: return "Injection, transtracheal"; + case URETHINJ: return "Injection, urethral"; + case URETINJ: return "Injection, ureteral"; + case _INSERTION: return "Insertion"; + case CERVINS: return "Insertion, cervical (uterine)"; + case IOSURGINS: return "Insertion, intraocular, surgical"; + case IU: return "Insertion, intrauterine"; + case LPINS: return "Insertion, lacrimal puncta"; + case PR: return "Insertion, rectal"; + case SQSURGINS: return "Insertion, subcutaneous, surgical"; + case URETHINS: return "Insertion, urethral"; + case VAGINSI: return "Insertion, vaginal"; + case _INSTILLATION: return "Instillation"; + case CECINSTL: return "Instillation, cecostomy"; + case EFT: return "Instillation, enteral feeding tube"; + case ENTINSTL: return "Instillation, enteral"; + case GT: return "Instillation, gastrostomy tube"; + case NGT: return "Instillation, nasogastric tube"; + case OGT: return "Instillation, orogastric tube"; + case BLADINSTL: return "Instillation, urinary catheter"; + case CAPDINSTL: return "Instillation, continuous ambulatory peritoneal dialysis port"; + case CTINSTL: return "Instillation, chest tube"; + case ETINSTL: return "Instillation, endotracheal tube"; + case GJT: return "Instillation, gastro-jejunostomy tube"; + case IBRONCHINSTIL: return "Instillation, intrabronchial"; + case IDUODINSTIL: return "Instillation, intraduodenal"; + case IESOPHINSTIL: return "Instillation, intraesophageal"; + case IGASTINSTIL: return "Instillation, intragastric"; + case IILEALINJ: return "Instillation, intraileal"; + case IOINSTL: return "Instillation, intraocular"; + case ISININSTIL: return "Instillation, intrasinal"; + case ITRACHINSTIL: return "Instillation, intratracheal"; + case IUINSTL: return "Instillation, intrauterine"; + case JJTINSTL: return "Instillation, jejunostomy tube"; + case LARYNGINSTIL: return "Instillation, laryngeal"; + case NASALINSTIL: return "Instillation, nasal"; + case NASOGASINSTIL: return "Instillation, nasogastric"; + case NTT: return "Instillation, nasotracheal tube"; + case OJJ: return "Instillation, orojejunum tube"; + case OT: return "Instillation, otic"; + case PDPINSTL: return "Instillation, peritoneal dialysis port"; + case PNSINSTL: return "Instillation, paranasal sinuses"; + case RECINSTL: return "Instillation, rectal"; + case RECTINSTL: return "Instillation, rectal tube"; + case SININSTIL: return "Instillation, sinus, unspecified"; + case SOFTISINSTIL: return "Instillation, soft tissue"; + case TRACHINSTL: return "Instillation, tracheostomy"; + case TRTYMPINSTIL: return "Instillation, transtympanic"; + case URETHINSTL: return "instillation, urethral"; + case _IONTOPHORESISROUTE: return "IontophoresisRoute"; + case IONTO: return "Topical application, iontophoresis"; + case _IRRIGATION: return "Irrigation"; + case GUIRR: return "Irrigation, genitourinary"; + case IGASTIRR: return "Irrigation, intragastric"; + case ILESIRR: return "Irrigation, intralesional"; + case IOIRR: return "Irrigation, intraocular"; + case BLADIRR: return "Irrigation, urinary bladder"; + case BLADIRRC: return "Irrigation, urinary bladder, continuous"; + case BLADIRRT: return "Irrigation, urinary bladder, tidal"; + case RECIRR: return "Irrigation, rectal"; + case _LAVAGEROUTE: return "LavageRoute"; + case IGASTLAV: return "Lavage, intragastric"; + case _MUCOSALABSORPTIONROUTE: return "MucosalAbsorptionRoute"; + case IDOUDMAB: return "Mucosal absorption, intraduodenal"; + case ITRACHMAB: return "Mucosal absorption, intratracheal"; + case SMUCMAB: return "Mucosal absorption, submucosal"; + case _NEBULIZATION: return "Nebulization"; + case ETNEB: return "Nebulization, endotracheal tube"; + case _RINSE: return "Rinse"; + case DENRINSE: return "Rinse, dental"; + case ORRINSE: return "Rinse, oral"; + case _SUPPOSITORYROUTE: return "SuppositoryRoute"; + case URETHSUP: return "Suppository, urethral"; + case _SWISH: return "Swish"; + case SWISHSPIT: return "Swish and spit out, oromucosal"; + case SWISHSWAL: return "Swish and swallow, oromucosal"; + case _TOPICALABSORPTIONROUTE: return "TopicalAbsorptionRoute"; + case TTYMPTABSORP: return "Topical absorption, transtympanic"; + case _TOPICALAPPLICATION: return "TopicalApplication"; + case DRESS: return "Topical application, soaked dressing"; + case SWAB: return "Topical application, swab"; + case TOPICAL: return "Topical"; + case BUC: return "Topical application, buccal"; + case CERV: return "Topical application, cervical"; + case DEN: return "Topical application, dental"; + case GIN: return "Topical application, gingival"; + case HAIR: return "Topical application, hair"; + case ICORNTA: return "Topical application, intracorneal"; + case ICORONTA: return "Topical application, intracoronal (dental)"; + case IESOPHTA: return "Topical application, intraesophageal"; + case IILEALTA: return "Topical application, intraileal"; + case ILTOP: return "Topical application, intralesional"; + case ILUMTA: return "Topical application, intraluminal"; + case IOTOP: return "Topical application, intraocular"; + case LARYNGTA: return "Topical application, laryngeal"; + case MUC: return "Topical application, mucous membrane"; + case NAIL: return "Topical application, nail"; + case NASAL: return "Topical application, nasal"; + case OPTHALTA: return "Topical application, ophthalmic"; + case ORALTA: return "Topical application, oral"; + case ORMUC: return "Topical application, oromucosal"; + case OROPHARTA: return "Topical application, oropharyngeal"; + case PERIANAL: return "Topical application, perianal"; + case PERINEAL: return "Topical application, perineal"; + case PDONTTA: return "Topical application, periodontal"; + case RECTAL: return "Topical application, rectal"; + case SCALP: return "Topical application, scalp"; + case OCDRESTA: return "Occlusive dressing technique"; + case SKIN: return "Topical application, skin"; + case SUBCONJTA: return "Subconjunctival"; + case TMUCTA: return "Topical application, transmucosal"; + case VAGINS: return "Topical application, vaginal"; + case INSUF: return "Insufflation"; + case TRNSDERM: return "Transdermal"; + case _ROUTEBYSITE: return "RouteBySite"; + case _AMNIOTICFLUIDSACROUTE: return "AmnioticFluidSacRoute"; + case _BILIARYROUTE: return "BiliaryRoute"; + case _BODYSURFACEROUTE: return "BodySurfaceRoute"; + case _BUCCALMUCOSAROUTE: return "BuccalMucosaRoute"; + case _CECOSTOMYROUTE: return "CecostomyRoute"; + case _CERVICALROUTE: return "CervicalRoute"; + case _ENDOCERVICALROUTE: return "EndocervicalRoute"; + case _ENTERALROUTE: return "EnteralRoute"; + case _EPIDURALROUTE: return "EpiduralRoute"; + case _EXTRAAMNIOTICROUTE: return "ExtraAmnioticRoute"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "ExtracorporealCirculationRoute"; + case _GASTRICROUTE: return "GastricRoute"; + case _GENITOURINARYROUTE: return "GenitourinaryRoute"; + case _GINGIVALROUTE: return "GingivalRoute"; + case _HAIRROUTE: return "HairRoute"; + case _INTERAMENINGEALROUTE: return "InterameningealRoute"; + case _INTERSTITIALROUTE: return "InterstitialRoute"; + case _INTRAABDOMINALROUTE: return "IntraabdominalRoute"; + case _INTRAARTERIALROUTE: return "IntraarterialRoute"; + case _INTRAARTICULARROUTE: return "IntraarticularRoute"; + case _INTRABRONCHIALROUTE: return "IntrabronchialRoute"; + case _INTRABURSALROUTE: return "IntrabursalRoute"; + case _INTRACARDIACROUTE: return "IntracardiacRoute"; + case _INTRACARTILAGINOUSROUTE: return "IntracartilaginousRoute"; + case _INTRACAUDALROUTE: return "IntracaudalRoute"; + case _INTRACAVERNOSALROUTE: return "IntracavernosalRoute"; + case _INTRACAVITARYROUTE: return "IntracavitaryRoute"; + case _INTRACEREBRALROUTE: return "IntracerebralRoute"; + case _INTRACERVICALROUTE: return "IntracervicalRoute"; + case _INTRACISTERNALROUTE: return "IntracisternalRoute"; + case _INTRACORNEALROUTE: return "IntracornealRoute"; + case _INTRACORONALROUTE: return "IntracoronalRoute"; + case _INTRACORONARYROUTE: return "IntracoronaryRoute"; + case _INTRACORPUSCAVERNOSUMROUTE: return "IntracorpusCavernosumRoute"; + case _INTRADERMALROUTE: return "IntradermalRoute"; + case _INTRADISCALROUTE: return "IntradiscalRoute"; + case _INTRADUCTALROUTE: return "IntraductalRoute"; + case _INTRADUODENALROUTE: return "IntraduodenalRoute"; + case _INTRADURALROUTE: return "IntraduralRoute"; + case _INTRAEPIDERMALROUTE: return "IntraepidermalRoute"; + case _INTRAEPITHELIALROUTE: return "IntraepithelialRoute"; + case _INTRAESOPHAGEALROUTE: return "IntraesophagealRoute"; + case _INTRAGASTRICROUTE: return "IntragastricRoute"; + case _INTRAILEALROUTE: return "IntrailealRoute"; + case _INTRALESIONALROUTE: return "IntralesionalRoute"; + case _INTRALUMINALROUTE: return "IntraluminalRoute"; + case _INTRALYMPHATICROUTE: return "IntralymphaticRoute"; + case _INTRAMEDULLARYROUTE: return "IntramedullaryRoute"; + case _INTRAMUSCULARROUTE: return "IntramuscularRoute"; + case _INTRAOCULARROUTE: return "IntraocularRoute"; + case _INTRAOSSEOUSROUTE: return "IntraosseousRoute"; + case _INTRAOVARIANROUTE: return "IntraovarianRoute"; + case _INTRAPERICARDIALROUTE: return "IntrapericardialRoute"; + case _INTRAPERITONEALROUTE: return "IntraperitonealRoute"; + case _INTRAPLEURALROUTE: return "IntrapleuralRoute"; + case _INTRAPROSTATICROUTE: return "IntraprostaticRoute"; + case _INTRAPULMONARYROUTE: return "IntrapulmonaryRoute"; + case _INTRASINALROUTE: return "IntrasinalRoute"; + case _INTRASPINALROUTE: return "IntraspinalRoute"; + case _INTRASTERNALROUTE: return "IntrasternalRoute"; + case _INTRASYNOVIALROUTE: return "IntrasynovialRoute"; + case _INTRATENDINOUSROUTE: return "IntratendinousRoute"; + case _INTRATESTICULARROUTE: return "IntratesticularRoute"; + case _INTRATHECALROUTE: return "IntrathecalRoute"; + case _INTRATHORACICROUTE: return "IntrathoracicRoute"; + case _INTRATRACHEALROUTE: return "IntratrachealRoute"; + case _INTRATUBULARROUTE: return "IntratubularRoute"; + case _INTRATUMORROUTE: return "IntratumorRoute"; + case _INTRATYMPANICROUTE: return "IntratympanicRoute"; + case _INTRAUTERINEROUTE: return "IntrauterineRoute"; + case _INTRAVASCULARROUTE: return "IntravascularRoute"; + case _INTRAVENOUSROUTE: return "IntravenousRoute"; + case _INTRAVENTRICULARROUTE: return "IntraventricularRoute"; + case _INTRAVESICLEROUTE: return "IntravesicleRoute"; + case _INTRAVITREALROUTE: return "IntravitrealRoute"; + case _JEJUNUMROUTE: return "JejunumRoute"; + case _LACRIMALPUNCTAROUTE: return "LacrimalPunctaRoute"; + case _LARYNGEALROUTE: return "LaryngealRoute"; + case _LINGUALROUTE: return "LingualRoute"; + case _MUCOUSMEMBRANEROUTE: return "MucousMembraneRoute"; + case _NAILROUTE: return "NailRoute"; + case _NASALROUTE: return "NasalRoute"; + case _OPHTHALMICROUTE: return "OphthalmicRoute"; + case _ORALROUTE: return "OralRoute"; + case _OROMUCOSALROUTE: return "OromucosalRoute"; + case _OROPHARYNGEALROUTE: return "OropharyngealRoute"; + case _OTICROUTE: return "OticRoute"; + case _PARANASALSINUSESROUTE: return "ParanasalSinusesRoute"; + case _PARENTERALROUTE: return "ParenteralRoute"; + case _PERIANALROUTE: return "PerianalRoute"; + case _PERIARTICULARROUTE: return "PeriarticularRoute"; + case _PERIDURALROUTE: return "PeriduralRoute"; + case _PERINEALROUTE: return "PerinealRoute"; + case _PERINEURALROUTE: return "PerineuralRoute"; + case _PERIODONTALROUTE: return "PeriodontalRoute"; + case _PULMONARYROUTE: return "PulmonaryRoute"; + case _RECTALROUTE: return "RectalRoute"; + case _RESPIRATORYTRACTROUTE: return "RespiratoryTractRoute"; + case _RETROBULBARROUTE: return "RetrobulbarRoute"; + case _SCALPROUTE: return "ScalpRoute"; + case _SINUSUNSPECIFIEDROUTE: return "SinusUnspecifiedRoute"; + case _SKINROUTE: return "SkinRoute"; + case _SOFTTISSUEROUTE: return "SoftTissueRoute"; + case _SUBARACHNOIDROUTE: return "SubarachnoidRoute"; + case _SUBCONJUNCTIVALROUTE: return "SubconjunctivalRoute"; + case _SUBCUTANEOUSROUTE: return "SubcutaneousRoute"; + case _SUBLESIONALROUTE: return "SublesionalRoute"; + case _SUBLINGUALROUTE: return "SublingualRoute"; + case _SUBMUCOSALROUTE: return "SubmucosalRoute"; + case _TRACHEOSTOMYROUTE: return "TracheostomyRoute"; + case _TRANSMUCOSALROUTE: return "TransmucosalRoute"; + case _TRANSPLACENTALROUTE: return "TransplacentalRoute"; + case _TRANSTRACHEALROUTE: return "TranstrachealRoute"; + case _TRANSTYMPANICROUTE: return "TranstympanicRoute"; + case _URETERALROUTE: return "UreteralRoute"; + case _URETHRALROUTE: return "UrethralRoute"; + case _URINARYBLADDERROUTE: return "UrinaryBladderRoute"; + case _URINARYTRACTROUTE: return "UrinaryTractRoute"; + case _VAGINALROUTE: return "VaginalRoute"; + case _VITREOUSHUMOURROUTE: return "VitreousHumourRoute"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministrationEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministrationEnumFactory.java new file mode 100644 index 00000000000..7c44c0afa51 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3RouteOfAdministrationEnumFactory.java @@ -0,0 +1,1595 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3RouteOfAdministrationEnumFactory implements EnumFactory { + + public V3RouteOfAdministration fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_RouteByMethod".equals(codeString)) + return V3RouteOfAdministration._ROUTEBYMETHOD; + if ("SOAK".equals(codeString)) + return V3RouteOfAdministration.SOAK; + if ("SHAMPOO".equals(codeString)) + return V3RouteOfAdministration.SHAMPOO; + if ("TRNSLING".equals(codeString)) + return V3RouteOfAdministration.TRNSLING; + if ("PO".equals(codeString)) + return V3RouteOfAdministration.PO; + if ("GARGLE".equals(codeString)) + return V3RouteOfAdministration.GARGLE; + if ("SUCK".equals(codeString)) + return V3RouteOfAdministration.SUCK; + if ("_Chew".equals(codeString)) + return V3RouteOfAdministration._CHEW; + if ("CHEW".equals(codeString)) + return V3RouteOfAdministration.CHEW; + if ("_Diffusion".equals(codeString)) + return V3RouteOfAdministration._DIFFUSION; + if ("EXTCORPDIF".equals(codeString)) + return V3RouteOfAdministration.EXTCORPDIF; + if ("HEMODIFF".equals(codeString)) + return V3RouteOfAdministration.HEMODIFF; + if ("TRNSDERMD".equals(codeString)) + return V3RouteOfAdministration.TRNSDERMD; + if ("_Dissolve".equals(codeString)) + return V3RouteOfAdministration._DISSOLVE; + if ("DISSOLVE".equals(codeString)) + return V3RouteOfAdministration.DISSOLVE; + if ("SL".equals(codeString)) + return V3RouteOfAdministration.SL; + if ("_Douche".equals(codeString)) + return V3RouteOfAdministration._DOUCHE; + if ("DOUCHE".equals(codeString)) + return V3RouteOfAdministration.DOUCHE; + if ("_ElectroOsmosisRoute".equals(codeString)) + return V3RouteOfAdministration._ELECTROOSMOSISROUTE; + if ("ELECTOSMOS".equals(codeString)) + return V3RouteOfAdministration.ELECTOSMOS; + if ("_Enema".equals(codeString)) + return V3RouteOfAdministration._ENEMA; + if ("ENEMA".equals(codeString)) + return V3RouteOfAdministration.ENEMA; + if ("RETENEMA".equals(codeString)) + return V3RouteOfAdministration.RETENEMA; + if ("_Flush".equals(codeString)) + return V3RouteOfAdministration._FLUSH; + if ("IVFLUSH".equals(codeString)) + return V3RouteOfAdministration.IVFLUSH; + if ("_Implantation".equals(codeString)) + return V3RouteOfAdministration._IMPLANTATION; + if ("IDIMPLNT".equals(codeString)) + return V3RouteOfAdministration.IDIMPLNT; + if ("IVITIMPLNT".equals(codeString)) + return V3RouteOfAdministration.IVITIMPLNT; + if ("SQIMPLNT".equals(codeString)) + return V3RouteOfAdministration.SQIMPLNT; + if ("_Infusion".equals(codeString)) + return V3RouteOfAdministration._INFUSION; + if ("EPI".equals(codeString)) + return V3RouteOfAdministration.EPI; + if ("IA".equals(codeString)) + return V3RouteOfAdministration.IA; + if ("IC".equals(codeString)) + return V3RouteOfAdministration.IC; + if ("ICOR".equals(codeString)) + return V3RouteOfAdministration.ICOR; + if ("IOSSC".equals(codeString)) + return V3RouteOfAdministration.IOSSC; + if ("IT".equals(codeString)) + return V3RouteOfAdministration.IT; + if ("IV".equals(codeString)) + return V3RouteOfAdministration.IV; + if ("IVC".equals(codeString)) + return V3RouteOfAdministration.IVC; + if ("IVCC".equals(codeString)) + return V3RouteOfAdministration.IVCC; + if ("IVCI".equals(codeString)) + return V3RouteOfAdministration.IVCI; + if ("PCA".equals(codeString)) + return V3RouteOfAdministration.PCA; + if ("IVASCINFUS".equals(codeString)) + return V3RouteOfAdministration.IVASCINFUS; + if ("SQINFUS".equals(codeString)) + return V3RouteOfAdministration.SQINFUS; + if ("_Inhalation".equals(codeString)) + return V3RouteOfAdministration._INHALATION; + if ("IPINHL".equals(codeString)) + return V3RouteOfAdministration.IPINHL; + if ("ORIFINHL".equals(codeString)) + return V3RouteOfAdministration.ORIFINHL; + if ("REBREATH".equals(codeString)) + return V3RouteOfAdministration.REBREATH; + if ("IPPB".equals(codeString)) + return V3RouteOfAdministration.IPPB; + if ("NASINHL".equals(codeString)) + return V3RouteOfAdministration.NASINHL; + if ("NASINHLC".equals(codeString)) + return V3RouteOfAdministration.NASINHLC; + if ("NEB".equals(codeString)) + return V3RouteOfAdministration.NEB; + if ("NASNEB".equals(codeString)) + return V3RouteOfAdministration.NASNEB; + if ("ORNEB".equals(codeString)) + return V3RouteOfAdministration.ORNEB; + if ("TRACH".equals(codeString)) + return V3RouteOfAdministration.TRACH; + if ("VENT".equals(codeString)) + return V3RouteOfAdministration.VENT; + if ("VENTMASK".equals(codeString)) + return V3RouteOfAdministration.VENTMASK; + if ("_Injection".equals(codeString)) + return V3RouteOfAdministration._INJECTION; + if ("AMNINJ".equals(codeString)) + return V3RouteOfAdministration.AMNINJ; + if ("BILINJ".equals(codeString)) + return V3RouteOfAdministration.BILINJ; + if ("CHOLINJ".equals(codeString)) + return V3RouteOfAdministration.CHOLINJ; + if ("CERVINJ".equals(codeString)) + return V3RouteOfAdministration.CERVINJ; + if ("EPIDURINJ".equals(codeString)) + return V3RouteOfAdministration.EPIDURINJ; + if ("EPIINJ".equals(codeString)) + return V3RouteOfAdministration.EPIINJ; + if ("EPINJSP".equals(codeString)) + return V3RouteOfAdministration.EPINJSP; + if ("EXTRAMNINJ".equals(codeString)) + return V3RouteOfAdministration.EXTRAMNINJ; + if ("EXTCORPINJ".equals(codeString)) + return V3RouteOfAdministration.EXTCORPINJ; + if ("GBINJ".equals(codeString)) + return V3RouteOfAdministration.GBINJ; + if ("GINGINJ".equals(codeString)) + return V3RouteOfAdministration.GINGINJ; + if ("BLADINJ".equals(codeString)) + return V3RouteOfAdministration.BLADINJ; + if ("ENDOSININJ".equals(codeString)) + return V3RouteOfAdministration.ENDOSININJ; + if ("HEMOPORT".equals(codeString)) + return V3RouteOfAdministration.HEMOPORT; + if ("IABDINJ".equals(codeString)) + return V3RouteOfAdministration.IABDINJ; + if ("IAINJ".equals(codeString)) + return V3RouteOfAdministration.IAINJ; + if ("IAINJP".equals(codeString)) + return V3RouteOfAdministration.IAINJP; + if ("IAINJSP".equals(codeString)) + return V3RouteOfAdministration.IAINJSP; + if ("IARTINJ".equals(codeString)) + return V3RouteOfAdministration.IARTINJ; + if ("IBURSINJ".equals(codeString)) + return V3RouteOfAdministration.IBURSINJ; + if ("ICARDINJ".equals(codeString)) + return V3RouteOfAdministration.ICARDINJ; + if ("ICARDINJRP".equals(codeString)) + return V3RouteOfAdministration.ICARDINJRP; + if ("ICARDINJSP".equals(codeString)) + return V3RouteOfAdministration.ICARDINJSP; + if ("ICARINJP".equals(codeString)) + return V3RouteOfAdministration.ICARINJP; + if ("ICARTINJ".equals(codeString)) + return V3RouteOfAdministration.ICARTINJ; + if ("ICAUDINJ".equals(codeString)) + return V3RouteOfAdministration.ICAUDINJ; + if ("ICAVINJ".equals(codeString)) + return V3RouteOfAdministration.ICAVINJ; + if ("ICAVITINJ".equals(codeString)) + return V3RouteOfAdministration.ICAVITINJ; + if ("ICEREBINJ".equals(codeString)) + return V3RouteOfAdministration.ICEREBINJ; + if ("ICISTERNINJ".equals(codeString)) + return V3RouteOfAdministration.ICISTERNINJ; + if ("ICORONINJ".equals(codeString)) + return V3RouteOfAdministration.ICORONINJ; + if ("ICORONINJP".equals(codeString)) + return V3RouteOfAdministration.ICORONINJP; + if ("ICORPCAVINJ".equals(codeString)) + return V3RouteOfAdministration.ICORPCAVINJ; + if ("IDINJ".equals(codeString)) + return V3RouteOfAdministration.IDINJ; + if ("IDISCINJ".equals(codeString)) + return V3RouteOfAdministration.IDISCINJ; + if ("IDUCTINJ".equals(codeString)) + return V3RouteOfAdministration.IDUCTINJ; + if ("IDURINJ".equals(codeString)) + return V3RouteOfAdministration.IDURINJ; + if ("IEPIDINJ".equals(codeString)) + return V3RouteOfAdministration.IEPIDINJ; + if ("IEPITHINJ".equals(codeString)) + return V3RouteOfAdministration.IEPITHINJ; + if ("ILESINJ".equals(codeString)) + return V3RouteOfAdministration.ILESINJ; + if ("ILUMINJ".equals(codeString)) + return V3RouteOfAdministration.ILUMINJ; + if ("ILYMPJINJ".equals(codeString)) + return V3RouteOfAdministration.ILYMPJINJ; + if ("IM".equals(codeString)) + return V3RouteOfAdministration.IM; + if ("IMD".equals(codeString)) + return V3RouteOfAdministration.IMD; + if ("IMZ".equals(codeString)) + return V3RouteOfAdministration.IMZ; + if ("IMEDULINJ".equals(codeString)) + return V3RouteOfAdministration.IMEDULINJ; + if ("INTERMENINJ".equals(codeString)) + return V3RouteOfAdministration.INTERMENINJ; + if ("INTERSTITINJ".equals(codeString)) + return V3RouteOfAdministration.INTERSTITINJ; + if ("IOINJ".equals(codeString)) + return V3RouteOfAdministration.IOINJ; + if ("IOSSINJ".equals(codeString)) + return V3RouteOfAdministration.IOSSINJ; + if ("IOVARINJ".equals(codeString)) + return V3RouteOfAdministration.IOVARINJ; + if ("IPCARDINJ".equals(codeString)) + return V3RouteOfAdministration.IPCARDINJ; + if ("IPERINJ".equals(codeString)) + return V3RouteOfAdministration.IPERINJ; + if ("IPINJ".equals(codeString)) + return V3RouteOfAdministration.IPINJ; + if ("IPLRINJ".equals(codeString)) + return V3RouteOfAdministration.IPLRINJ; + if ("IPROSTINJ".equals(codeString)) + return V3RouteOfAdministration.IPROSTINJ; + if ("IPUMPINJ".equals(codeString)) + return V3RouteOfAdministration.IPUMPINJ; + if ("ISINJ".equals(codeString)) + return V3RouteOfAdministration.ISINJ; + if ("ISTERINJ".equals(codeString)) + return V3RouteOfAdministration.ISTERINJ; + if ("ISYNINJ".equals(codeString)) + return V3RouteOfAdministration.ISYNINJ; + if ("ITENDINJ".equals(codeString)) + return V3RouteOfAdministration.ITENDINJ; + if ("ITESTINJ".equals(codeString)) + return V3RouteOfAdministration.ITESTINJ; + if ("ITHORINJ".equals(codeString)) + return V3RouteOfAdministration.ITHORINJ; + if ("ITINJ".equals(codeString)) + return V3RouteOfAdministration.ITINJ; + if ("ITUBINJ".equals(codeString)) + return V3RouteOfAdministration.ITUBINJ; + if ("ITUMINJ".equals(codeString)) + return V3RouteOfAdministration.ITUMINJ; + if ("ITYMPINJ".equals(codeString)) + return V3RouteOfAdministration.ITYMPINJ; + if ("IUINJ".equals(codeString)) + return V3RouteOfAdministration.IUINJ; + if ("IUINJC".equals(codeString)) + return V3RouteOfAdministration.IUINJC; + if ("IURETINJ".equals(codeString)) + return V3RouteOfAdministration.IURETINJ; + if ("IVASCINJ".equals(codeString)) + return V3RouteOfAdministration.IVASCINJ; + if ("IVENTINJ".equals(codeString)) + return V3RouteOfAdministration.IVENTINJ; + if ("IVESINJ".equals(codeString)) + return V3RouteOfAdministration.IVESINJ; + if ("IVINJ".equals(codeString)) + return V3RouteOfAdministration.IVINJ; + if ("IVINJBOL".equals(codeString)) + return V3RouteOfAdministration.IVINJBOL; + if ("IVPUSH".equals(codeString)) + return V3RouteOfAdministration.IVPUSH; + if ("IVRPUSH".equals(codeString)) + return V3RouteOfAdministration.IVRPUSH; + if ("IVSPUSH".equals(codeString)) + return V3RouteOfAdministration.IVSPUSH; + if ("IVITINJ".equals(codeString)) + return V3RouteOfAdministration.IVITINJ; + if ("PAINJ".equals(codeString)) + return V3RouteOfAdministration.PAINJ; + if ("PARENTINJ".equals(codeString)) + return V3RouteOfAdministration.PARENTINJ; + if ("PDONTINJ".equals(codeString)) + return V3RouteOfAdministration.PDONTINJ; + if ("PDPINJ".equals(codeString)) + return V3RouteOfAdministration.PDPINJ; + if ("PDURINJ".equals(codeString)) + return V3RouteOfAdministration.PDURINJ; + if ("PNINJ".equals(codeString)) + return V3RouteOfAdministration.PNINJ; + if ("PNSINJ".equals(codeString)) + return V3RouteOfAdministration.PNSINJ; + if ("RBINJ".equals(codeString)) + return V3RouteOfAdministration.RBINJ; + if ("SCINJ".equals(codeString)) + return V3RouteOfAdministration.SCINJ; + if ("SLESINJ".equals(codeString)) + return V3RouteOfAdministration.SLESINJ; + if ("SOFTISINJ".equals(codeString)) + return V3RouteOfAdministration.SOFTISINJ; + if ("SQ".equals(codeString)) + return V3RouteOfAdministration.SQ; + if ("SUBARACHINJ".equals(codeString)) + return V3RouteOfAdministration.SUBARACHINJ; + if ("SUBMUCINJ".equals(codeString)) + return V3RouteOfAdministration.SUBMUCINJ; + if ("TRPLACINJ".equals(codeString)) + return V3RouteOfAdministration.TRPLACINJ; + if ("TRTRACHINJ".equals(codeString)) + return V3RouteOfAdministration.TRTRACHINJ; + if ("URETHINJ".equals(codeString)) + return V3RouteOfAdministration.URETHINJ; + if ("URETINJ".equals(codeString)) + return V3RouteOfAdministration.URETINJ; + if ("_Insertion".equals(codeString)) + return V3RouteOfAdministration._INSERTION; + if ("CERVINS".equals(codeString)) + return V3RouteOfAdministration.CERVINS; + if ("IOSURGINS".equals(codeString)) + return V3RouteOfAdministration.IOSURGINS; + if ("IU".equals(codeString)) + return V3RouteOfAdministration.IU; + if ("LPINS".equals(codeString)) + return V3RouteOfAdministration.LPINS; + if ("PR".equals(codeString)) + return V3RouteOfAdministration.PR; + if ("SQSURGINS".equals(codeString)) + return V3RouteOfAdministration.SQSURGINS; + if ("URETHINS".equals(codeString)) + return V3RouteOfAdministration.URETHINS; + if ("VAGINSI".equals(codeString)) + return V3RouteOfAdministration.VAGINSI; + if ("_Instillation".equals(codeString)) + return V3RouteOfAdministration._INSTILLATION; + if ("CECINSTL".equals(codeString)) + return V3RouteOfAdministration.CECINSTL; + if ("EFT".equals(codeString)) + return V3RouteOfAdministration.EFT; + if ("ENTINSTL".equals(codeString)) + return V3RouteOfAdministration.ENTINSTL; + if ("GT".equals(codeString)) + return V3RouteOfAdministration.GT; + if ("NGT".equals(codeString)) + return V3RouteOfAdministration.NGT; + if ("OGT".equals(codeString)) + return V3RouteOfAdministration.OGT; + if ("BLADINSTL".equals(codeString)) + return V3RouteOfAdministration.BLADINSTL; + if ("CAPDINSTL".equals(codeString)) + return V3RouteOfAdministration.CAPDINSTL; + if ("CTINSTL".equals(codeString)) + return V3RouteOfAdministration.CTINSTL; + if ("ETINSTL".equals(codeString)) + return V3RouteOfAdministration.ETINSTL; + if ("GJT".equals(codeString)) + return V3RouteOfAdministration.GJT; + if ("IBRONCHINSTIL".equals(codeString)) + return V3RouteOfAdministration.IBRONCHINSTIL; + if ("IDUODINSTIL".equals(codeString)) + return V3RouteOfAdministration.IDUODINSTIL; + if ("IESOPHINSTIL".equals(codeString)) + return V3RouteOfAdministration.IESOPHINSTIL; + if ("IGASTINSTIL".equals(codeString)) + return V3RouteOfAdministration.IGASTINSTIL; + if ("IILEALINJ".equals(codeString)) + return V3RouteOfAdministration.IILEALINJ; + if ("IOINSTL".equals(codeString)) + return V3RouteOfAdministration.IOINSTL; + if ("ISININSTIL".equals(codeString)) + return V3RouteOfAdministration.ISININSTIL; + if ("ITRACHINSTIL".equals(codeString)) + return V3RouteOfAdministration.ITRACHINSTIL; + if ("IUINSTL".equals(codeString)) + return V3RouteOfAdministration.IUINSTL; + if ("JJTINSTL".equals(codeString)) + return V3RouteOfAdministration.JJTINSTL; + if ("LARYNGINSTIL".equals(codeString)) + return V3RouteOfAdministration.LARYNGINSTIL; + if ("NASALINSTIL".equals(codeString)) + return V3RouteOfAdministration.NASALINSTIL; + if ("NASOGASINSTIL".equals(codeString)) + return V3RouteOfAdministration.NASOGASINSTIL; + if ("NTT".equals(codeString)) + return V3RouteOfAdministration.NTT; + if ("OJJ".equals(codeString)) + return V3RouteOfAdministration.OJJ; + if ("OT".equals(codeString)) + return V3RouteOfAdministration.OT; + if ("PDPINSTL".equals(codeString)) + return V3RouteOfAdministration.PDPINSTL; + if ("PNSINSTL".equals(codeString)) + return V3RouteOfAdministration.PNSINSTL; + if ("RECINSTL".equals(codeString)) + return V3RouteOfAdministration.RECINSTL; + if ("RECTINSTL".equals(codeString)) + return V3RouteOfAdministration.RECTINSTL; + if ("SININSTIL".equals(codeString)) + return V3RouteOfAdministration.SININSTIL; + if ("SOFTISINSTIL".equals(codeString)) + return V3RouteOfAdministration.SOFTISINSTIL; + if ("TRACHINSTL".equals(codeString)) + return V3RouteOfAdministration.TRACHINSTL; + if ("TRTYMPINSTIL".equals(codeString)) + return V3RouteOfAdministration.TRTYMPINSTIL; + if ("URETHINSTL".equals(codeString)) + return V3RouteOfAdministration.URETHINSTL; + if ("_IontophoresisRoute".equals(codeString)) + return V3RouteOfAdministration._IONTOPHORESISROUTE; + if ("IONTO".equals(codeString)) + return V3RouteOfAdministration.IONTO; + if ("_Irrigation".equals(codeString)) + return V3RouteOfAdministration._IRRIGATION; + if ("GUIRR".equals(codeString)) + return V3RouteOfAdministration.GUIRR; + if ("IGASTIRR".equals(codeString)) + return V3RouteOfAdministration.IGASTIRR; + if ("ILESIRR".equals(codeString)) + return V3RouteOfAdministration.ILESIRR; + if ("IOIRR".equals(codeString)) + return V3RouteOfAdministration.IOIRR; + if ("BLADIRR".equals(codeString)) + return V3RouteOfAdministration.BLADIRR; + if ("BLADIRRC".equals(codeString)) + return V3RouteOfAdministration.BLADIRRC; + if ("BLADIRRT".equals(codeString)) + return V3RouteOfAdministration.BLADIRRT; + if ("RECIRR".equals(codeString)) + return V3RouteOfAdministration.RECIRR; + if ("_LavageRoute".equals(codeString)) + return V3RouteOfAdministration._LAVAGEROUTE; + if ("IGASTLAV".equals(codeString)) + return V3RouteOfAdministration.IGASTLAV; + if ("_MucosalAbsorptionRoute".equals(codeString)) + return V3RouteOfAdministration._MUCOSALABSORPTIONROUTE; + if ("IDOUDMAB".equals(codeString)) + return V3RouteOfAdministration.IDOUDMAB; + if ("ITRACHMAB".equals(codeString)) + return V3RouteOfAdministration.ITRACHMAB; + if ("SMUCMAB".equals(codeString)) + return V3RouteOfAdministration.SMUCMAB; + if ("_Nebulization".equals(codeString)) + return V3RouteOfAdministration._NEBULIZATION; + if ("ETNEB".equals(codeString)) + return V3RouteOfAdministration.ETNEB; + if ("_Rinse".equals(codeString)) + return V3RouteOfAdministration._RINSE; + if ("DENRINSE".equals(codeString)) + return V3RouteOfAdministration.DENRINSE; + if ("ORRINSE".equals(codeString)) + return V3RouteOfAdministration.ORRINSE; + if ("_SuppositoryRoute".equals(codeString)) + return V3RouteOfAdministration._SUPPOSITORYROUTE; + if ("URETHSUP".equals(codeString)) + return V3RouteOfAdministration.URETHSUP; + if ("_Swish".equals(codeString)) + return V3RouteOfAdministration._SWISH; + if ("SWISHSPIT".equals(codeString)) + return V3RouteOfAdministration.SWISHSPIT; + if ("SWISHSWAL".equals(codeString)) + return V3RouteOfAdministration.SWISHSWAL; + if ("_TopicalAbsorptionRoute".equals(codeString)) + return V3RouteOfAdministration._TOPICALABSORPTIONROUTE; + if ("TTYMPTABSORP".equals(codeString)) + return V3RouteOfAdministration.TTYMPTABSORP; + if ("_TopicalApplication".equals(codeString)) + return V3RouteOfAdministration._TOPICALAPPLICATION; + if ("DRESS".equals(codeString)) + return V3RouteOfAdministration.DRESS; + if ("SWAB".equals(codeString)) + return V3RouteOfAdministration.SWAB; + if ("TOPICAL".equals(codeString)) + return V3RouteOfAdministration.TOPICAL; + if ("BUC".equals(codeString)) + return V3RouteOfAdministration.BUC; + if ("CERV".equals(codeString)) + return V3RouteOfAdministration.CERV; + if ("DEN".equals(codeString)) + return V3RouteOfAdministration.DEN; + if ("GIN".equals(codeString)) + return V3RouteOfAdministration.GIN; + if ("HAIR".equals(codeString)) + return V3RouteOfAdministration.HAIR; + if ("ICORNTA".equals(codeString)) + return V3RouteOfAdministration.ICORNTA; + if ("ICORONTA".equals(codeString)) + return V3RouteOfAdministration.ICORONTA; + if ("IESOPHTA".equals(codeString)) + return V3RouteOfAdministration.IESOPHTA; + if ("IILEALTA".equals(codeString)) + return V3RouteOfAdministration.IILEALTA; + if ("ILTOP".equals(codeString)) + return V3RouteOfAdministration.ILTOP; + if ("ILUMTA".equals(codeString)) + return V3RouteOfAdministration.ILUMTA; + if ("IOTOP".equals(codeString)) + return V3RouteOfAdministration.IOTOP; + if ("LARYNGTA".equals(codeString)) + return V3RouteOfAdministration.LARYNGTA; + if ("MUC".equals(codeString)) + return V3RouteOfAdministration.MUC; + if ("NAIL".equals(codeString)) + return V3RouteOfAdministration.NAIL; + if ("NASAL".equals(codeString)) + return V3RouteOfAdministration.NASAL; + if ("OPTHALTA".equals(codeString)) + return V3RouteOfAdministration.OPTHALTA; + if ("ORALTA".equals(codeString)) + return V3RouteOfAdministration.ORALTA; + if ("ORMUC".equals(codeString)) + return V3RouteOfAdministration.ORMUC; + if ("OROPHARTA".equals(codeString)) + return V3RouteOfAdministration.OROPHARTA; + if ("PERIANAL".equals(codeString)) + return V3RouteOfAdministration.PERIANAL; + if ("PERINEAL".equals(codeString)) + return V3RouteOfAdministration.PERINEAL; + if ("PDONTTA".equals(codeString)) + return V3RouteOfAdministration.PDONTTA; + if ("RECTAL".equals(codeString)) + return V3RouteOfAdministration.RECTAL; + if ("SCALP".equals(codeString)) + return V3RouteOfAdministration.SCALP; + if ("OCDRESTA".equals(codeString)) + return V3RouteOfAdministration.OCDRESTA; + if ("SKIN".equals(codeString)) + return V3RouteOfAdministration.SKIN; + if ("SUBCONJTA".equals(codeString)) + return V3RouteOfAdministration.SUBCONJTA; + if ("TMUCTA".equals(codeString)) + return V3RouteOfAdministration.TMUCTA; + if ("VAGINS".equals(codeString)) + return V3RouteOfAdministration.VAGINS; + if ("INSUF".equals(codeString)) + return V3RouteOfAdministration.INSUF; + if ("TRNSDERM".equals(codeString)) + return V3RouteOfAdministration.TRNSDERM; + if ("_RouteBySite".equals(codeString)) + return V3RouteOfAdministration._ROUTEBYSITE; + if ("_AmnioticFluidSacRoute".equals(codeString)) + return V3RouteOfAdministration._AMNIOTICFLUIDSACROUTE; + if ("_BiliaryRoute".equals(codeString)) + return V3RouteOfAdministration._BILIARYROUTE; + if ("_BodySurfaceRoute".equals(codeString)) + return V3RouteOfAdministration._BODYSURFACEROUTE; + if ("_BuccalMucosaRoute".equals(codeString)) + return V3RouteOfAdministration._BUCCALMUCOSAROUTE; + if ("_CecostomyRoute".equals(codeString)) + return V3RouteOfAdministration._CECOSTOMYROUTE; + if ("_CervicalRoute".equals(codeString)) + return V3RouteOfAdministration._CERVICALROUTE; + if ("_EndocervicalRoute".equals(codeString)) + return V3RouteOfAdministration._ENDOCERVICALROUTE; + if ("_EnteralRoute".equals(codeString)) + return V3RouteOfAdministration._ENTERALROUTE; + if ("_EpiduralRoute".equals(codeString)) + return V3RouteOfAdministration._EPIDURALROUTE; + if ("_ExtraAmnioticRoute".equals(codeString)) + return V3RouteOfAdministration._EXTRAAMNIOTICROUTE; + if ("_ExtracorporealCirculationRoute".equals(codeString)) + return V3RouteOfAdministration._EXTRACORPOREALCIRCULATIONROUTE; + if ("_GastricRoute".equals(codeString)) + return V3RouteOfAdministration._GASTRICROUTE; + if ("_GenitourinaryRoute".equals(codeString)) + return V3RouteOfAdministration._GENITOURINARYROUTE; + if ("_GingivalRoute".equals(codeString)) + return V3RouteOfAdministration._GINGIVALROUTE; + if ("_HairRoute".equals(codeString)) + return V3RouteOfAdministration._HAIRROUTE; + if ("_InterameningealRoute".equals(codeString)) + return V3RouteOfAdministration._INTERAMENINGEALROUTE; + if ("_InterstitialRoute".equals(codeString)) + return V3RouteOfAdministration._INTERSTITIALROUTE; + if ("_IntraabdominalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAABDOMINALROUTE; + if ("_IntraarterialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAARTERIALROUTE; + if ("_IntraarticularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAARTICULARROUTE; + if ("_IntrabronchialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRABRONCHIALROUTE; + if ("_IntrabursalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRABURSALROUTE; + if ("_IntracardiacRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACARDIACROUTE; + if ("_IntracartilaginousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACARTILAGINOUSROUTE; + if ("_IntracaudalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAUDALROUTE; + if ("_IntracavernosalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAVERNOSALROUTE; + if ("_IntracavitaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAVITARYROUTE; + if ("_IntracerebralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACEREBRALROUTE; + if ("_IntracervicalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACERVICALROUTE; + if ("_IntracisternalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACISTERNALROUTE; + if ("_IntracornealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORNEALROUTE; + if ("_IntracoronalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORONALROUTE; + if ("_IntracoronaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORONARYROUTE; + if ("_IntracorpusCavernosumRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORPUSCAVERNOSUMROUTE; + if ("_IntradermalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADERMALROUTE; + if ("_IntradiscalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADISCALROUTE; + if ("_IntraductalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADUCTALROUTE; + if ("_IntraduodenalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADUODENALROUTE; + if ("_IntraduralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADURALROUTE; + if ("_IntraepidermalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAEPIDERMALROUTE; + if ("_IntraepithelialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAEPITHELIALROUTE; + if ("_IntraesophagealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAESOPHAGEALROUTE; + if ("_IntragastricRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAGASTRICROUTE; + if ("_IntrailealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAILEALROUTE; + if ("_IntralesionalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALESIONALROUTE; + if ("_IntraluminalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALUMINALROUTE; + if ("_IntralymphaticRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALYMPHATICROUTE; + if ("_IntramedullaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAMEDULLARYROUTE; + if ("_IntramuscularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAMUSCULARROUTE; + if ("_IntraocularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOCULARROUTE; + if ("_IntraosseousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOSSEOUSROUTE; + if ("_IntraovarianRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOVARIANROUTE; + if ("_IntrapericardialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPERICARDIALROUTE; + if ("_IntraperitonealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPERITONEALROUTE; + if ("_IntrapleuralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPLEURALROUTE; + if ("_IntraprostaticRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPROSTATICROUTE; + if ("_IntrapulmonaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPULMONARYROUTE; + if ("_IntrasinalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASINALROUTE; + if ("_IntraspinalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASPINALROUTE; + if ("_IntrasternalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASTERNALROUTE; + if ("_IntrasynovialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASYNOVIALROUTE; + if ("_IntratendinousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATENDINOUSROUTE; + if ("_IntratesticularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATESTICULARROUTE; + if ("_IntrathecalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATHECALROUTE; + if ("_IntrathoracicRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATHORACICROUTE; + if ("_IntratrachealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATRACHEALROUTE; + if ("_IntratubularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATUBULARROUTE; + if ("_IntratumorRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATUMORROUTE; + if ("_IntratympanicRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATYMPANICROUTE; + if ("_IntrauterineRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAUTERINEROUTE; + if ("_IntravascularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVASCULARROUTE; + if ("_IntravenousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVENOUSROUTE; + if ("_IntraventricularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVENTRICULARROUTE; + if ("_IntravesicleRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVESICLEROUTE; + if ("_IntravitrealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVITREALROUTE; + if ("_JejunumRoute".equals(codeString)) + return V3RouteOfAdministration._JEJUNUMROUTE; + if ("_LacrimalPunctaRoute".equals(codeString)) + return V3RouteOfAdministration._LACRIMALPUNCTAROUTE; + if ("_LaryngealRoute".equals(codeString)) + return V3RouteOfAdministration._LARYNGEALROUTE; + if ("_LingualRoute".equals(codeString)) + return V3RouteOfAdministration._LINGUALROUTE; + if ("_MucousMembraneRoute".equals(codeString)) + return V3RouteOfAdministration._MUCOUSMEMBRANEROUTE; + if ("_NailRoute".equals(codeString)) + return V3RouteOfAdministration._NAILROUTE; + if ("_NasalRoute".equals(codeString)) + return V3RouteOfAdministration._NASALROUTE; + if ("_OphthalmicRoute".equals(codeString)) + return V3RouteOfAdministration._OPHTHALMICROUTE; + if ("_OralRoute".equals(codeString)) + return V3RouteOfAdministration._ORALROUTE; + if ("_OromucosalRoute".equals(codeString)) + return V3RouteOfAdministration._OROMUCOSALROUTE; + if ("_OropharyngealRoute".equals(codeString)) + return V3RouteOfAdministration._OROPHARYNGEALROUTE; + if ("_OticRoute".equals(codeString)) + return V3RouteOfAdministration._OTICROUTE; + if ("_ParanasalSinusesRoute".equals(codeString)) + return V3RouteOfAdministration._PARANASALSINUSESROUTE; + if ("_ParenteralRoute".equals(codeString)) + return V3RouteOfAdministration._PARENTERALROUTE; + if ("_PerianalRoute".equals(codeString)) + return V3RouteOfAdministration._PERIANALROUTE; + if ("_PeriarticularRoute".equals(codeString)) + return V3RouteOfAdministration._PERIARTICULARROUTE; + if ("_PeriduralRoute".equals(codeString)) + return V3RouteOfAdministration._PERIDURALROUTE; + if ("_PerinealRoute".equals(codeString)) + return V3RouteOfAdministration._PERINEALROUTE; + if ("_PerineuralRoute".equals(codeString)) + return V3RouteOfAdministration._PERINEURALROUTE; + if ("_PeriodontalRoute".equals(codeString)) + return V3RouteOfAdministration._PERIODONTALROUTE; + if ("_PulmonaryRoute".equals(codeString)) + return V3RouteOfAdministration._PULMONARYROUTE; + if ("_RectalRoute".equals(codeString)) + return V3RouteOfAdministration._RECTALROUTE; + if ("_RespiratoryTractRoute".equals(codeString)) + return V3RouteOfAdministration._RESPIRATORYTRACTROUTE; + if ("_RetrobulbarRoute".equals(codeString)) + return V3RouteOfAdministration._RETROBULBARROUTE; + if ("_ScalpRoute".equals(codeString)) + return V3RouteOfAdministration._SCALPROUTE; + if ("_SinusUnspecifiedRoute".equals(codeString)) + return V3RouteOfAdministration._SINUSUNSPECIFIEDROUTE; + if ("_SkinRoute".equals(codeString)) + return V3RouteOfAdministration._SKINROUTE; + if ("_SoftTissueRoute".equals(codeString)) + return V3RouteOfAdministration._SOFTTISSUEROUTE; + if ("_SubarachnoidRoute".equals(codeString)) + return V3RouteOfAdministration._SUBARACHNOIDROUTE; + if ("_SubconjunctivalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBCONJUNCTIVALROUTE; + if ("_SubcutaneousRoute".equals(codeString)) + return V3RouteOfAdministration._SUBCUTANEOUSROUTE; + if ("_SublesionalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBLESIONALROUTE; + if ("_SublingualRoute".equals(codeString)) + return V3RouteOfAdministration._SUBLINGUALROUTE; + if ("_SubmucosalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBMUCOSALROUTE; + if ("_TracheostomyRoute".equals(codeString)) + return V3RouteOfAdministration._TRACHEOSTOMYROUTE; + if ("_TransmucosalRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSMUCOSALROUTE; + if ("_TransplacentalRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSPLACENTALROUTE; + if ("_TranstrachealRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSTRACHEALROUTE; + if ("_TranstympanicRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSTYMPANICROUTE; + if ("_UreteralRoute".equals(codeString)) + return V3RouteOfAdministration._URETERALROUTE; + if ("_UrethralRoute".equals(codeString)) + return V3RouteOfAdministration._URETHRALROUTE; + if ("_UrinaryBladderRoute".equals(codeString)) + return V3RouteOfAdministration._URINARYBLADDERROUTE; + if ("_UrinaryTractRoute".equals(codeString)) + return V3RouteOfAdministration._URINARYTRACTROUTE; + if ("_VaginalRoute".equals(codeString)) + return V3RouteOfAdministration._VAGINALROUTE; + if ("_VitreousHumourRoute".equals(codeString)) + return V3RouteOfAdministration._VITREOUSHUMOURROUTE; + throw new IllegalArgumentException("Unknown V3RouteOfAdministration code '"+codeString+"'"); + } + + public String toCode(V3RouteOfAdministration code) { + if (code == V3RouteOfAdministration._ROUTEBYMETHOD) + return "_RouteByMethod"; + if (code == V3RouteOfAdministration.SOAK) + return "SOAK"; + if (code == V3RouteOfAdministration.SHAMPOO) + return "SHAMPOO"; + if (code == V3RouteOfAdministration.TRNSLING) + return "TRNSLING"; + if (code == V3RouteOfAdministration.PO) + return "PO"; + if (code == V3RouteOfAdministration.GARGLE) + return "GARGLE"; + if (code == V3RouteOfAdministration.SUCK) + return "SUCK"; + if (code == V3RouteOfAdministration._CHEW) + return "_Chew"; + if (code == V3RouteOfAdministration.CHEW) + return "CHEW"; + if (code == V3RouteOfAdministration._DIFFUSION) + return "_Diffusion"; + if (code == V3RouteOfAdministration.EXTCORPDIF) + return "EXTCORPDIF"; + if (code == V3RouteOfAdministration.HEMODIFF) + return "HEMODIFF"; + if (code == V3RouteOfAdministration.TRNSDERMD) + return "TRNSDERMD"; + if (code == V3RouteOfAdministration._DISSOLVE) + return "_Dissolve"; + if (code == V3RouteOfAdministration.DISSOLVE) + return "DISSOLVE"; + if (code == V3RouteOfAdministration.SL) + return "SL"; + if (code == V3RouteOfAdministration._DOUCHE) + return "_Douche"; + if (code == V3RouteOfAdministration.DOUCHE) + return "DOUCHE"; + if (code == V3RouteOfAdministration._ELECTROOSMOSISROUTE) + return "_ElectroOsmosisRoute"; + if (code == V3RouteOfAdministration.ELECTOSMOS) + return "ELECTOSMOS"; + if (code == V3RouteOfAdministration._ENEMA) + return "_Enema"; + if (code == V3RouteOfAdministration.ENEMA) + return "ENEMA"; + if (code == V3RouteOfAdministration.RETENEMA) + return "RETENEMA"; + if (code == V3RouteOfAdministration._FLUSH) + return "_Flush"; + if (code == V3RouteOfAdministration.IVFLUSH) + return "IVFLUSH"; + if (code == V3RouteOfAdministration._IMPLANTATION) + return "_Implantation"; + if (code == V3RouteOfAdministration.IDIMPLNT) + return "IDIMPLNT"; + if (code == V3RouteOfAdministration.IVITIMPLNT) + return "IVITIMPLNT"; + if (code == V3RouteOfAdministration.SQIMPLNT) + return "SQIMPLNT"; + if (code == V3RouteOfAdministration._INFUSION) + return "_Infusion"; + if (code == V3RouteOfAdministration.EPI) + return "EPI"; + if (code == V3RouteOfAdministration.IA) + return "IA"; + if (code == V3RouteOfAdministration.IC) + return "IC"; + if (code == V3RouteOfAdministration.ICOR) + return "ICOR"; + if (code == V3RouteOfAdministration.IOSSC) + return "IOSSC"; + if (code == V3RouteOfAdministration.IT) + return "IT"; + if (code == V3RouteOfAdministration.IV) + return "IV"; + if (code == V3RouteOfAdministration.IVC) + return "IVC"; + if (code == V3RouteOfAdministration.IVCC) + return "IVCC"; + if (code == V3RouteOfAdministration.IVCI) + return "IVCI"; + if (code == V3RouteOfAdministration.PCA) + return "PCA"; + if (code == V3RouteOfAdministration.IVASCINFUS) + return "IVASCINFUS"; + if (code == V3RouteOfAdministration.SQINFUS) + return "SQINFUS"; + if (code == V3RouteOfAdministration._INHALATION) + return "_Inhalation"; + if (code == V3RouteOfAdministration.IPINHL) + return "IPINHL"; + if (code == V3RouteOfAdministration.ORIFINHL) + return "ORIFINHL"; + if (code == V3RouteOfAdministration.REBREATH) + return "REBREATH"; + if (code == V3RouteOfAdministration.IPPB) + return "IPPB"; + if (code == V3RouteOfAdministration.NASINHL) + return "NASINHL"; + if (code == V3RouteOfAdministration.NASINHLC) + return "NASINHLC"; + if (code == V3RouteOfAdministration.NEB) + return "NEB"; + if (code == V3RouteOfAdministration.NASNEB) + return "NASNEB"; + if (code == V3RouteOfAdministration.ORNEB) + return "ORNEB"; + if (code == V3RouteOfAdministration.TRACH) + return "TRACH"; + if (code == V3RouteOfAdministration.VENT) + return "VENT"; + if (code == V3RouteOfAdministration.VENTMASK) + return "VENTMASK"; + if (code == V3RouteOfAdministration._INJECTION) + return "_Injection"; + if (code == V3RouteOfAdministration.AMNINJ) + return "AMNINJ"; + if (code == V3RouteOfAdministration.BILINJ) + return "BILINJ"; + if (code == V3RouteOfAdministration.CHOLINJ) + return "CHOLINJ"; + if (code == V3RouteOfAdministration.CERVINJ) + return "CERVINJ"; + if (code == V3RouteOfAdministration.EPIDURINJ) + return "EPIDURINJ"; + if (code == V3RouteOfAdministration.EPIINJ) + return "EPIINJ"; + if (code == V3RouteOfAdministration.EPINJSP) + return "EPINJSP"; + if (code == V3RouteOfAdministration.EXTRAMNINJ) + return "EXTRAMNINJ"; + if (code == V3RouteOfAdministration.EXTCORPINJ) + return "EXTCORPINJ"; + if (code == V3RouteOfAdministration.GBINJ) + return "GBINJ"; + if (code == V3RouteOfAdministration.GINGINJ) + return "GINGINJ"; + if (code == V3RouteOfAdministration.BLADINJ) + return "BLADINJ"; + if (code == V3RouteOfAdministration.ENDOSININJ) + return "ENDOSININJ"; + if (code == V3RouteOfAdministration.HEMOPORT) + return "HEMOPORT"; + if (code == V3RouteOfAdministration.IABDINJ) + return "IABDINJ"; + if (code == V3RouteOfAdministration.IAINJ) + return "IAINJ"; + if (code == V3RouteOfAdministration.IAINJP) + return "IAINJP"; + if (code == V3RouteOfAdministration.IAINJSP) + return "IAINJSP"; + if (code == V3RouteOfAdministration.IARTINJ) + return "IARTINJ"; + if (code == V3RouteOfAdministration.IBURSINJ) + return "IBURSINJ"; + if (code == V3RouteOfAdministration.ICARDINJ) + return "ICARDINJ"; + if (code == V3RouteOfAdministration.ICARDINJRP) + return "ICARDINJRP"; + if (code == V3RouteOfAdministration.ICARDINJSP) + return "ICARDINJSP"; + if (code == V3RouteOfAdministration.ICARINJP) + return "ICARINJP"; + if (code == V3RouteOfAdministration.ICARTINJ) + return "ICARTINJ"; + if (code == V3RouteOfAdministration.ICAUDINJ) + return "ICAUDINJ"; + if (code == V3RouteOfAdministration.ICAVINJ) + return "ICAVINJ"; + if (code == V3RouteOfAdministration.ICAVITINJ) + return "ICAVITINJ"; + if (code == V3RouteOfAdministration.ICEREBINJ) + return "ICEREBINJ"; + if (code == V3RouteOfAdministration.ICISTERNINJ) + return "ICISTERNINJ"; + if (code == V3RouteOfAdministration.ICORONINJ) + return "ICORONINJ"; + if (code == V3RouteOfAdministration.ICORONINJP) + return "ICORONINJP"; + if (code == V3RouteOfAdministration.ICORPCAVINJ) + return "ICORPCAVINJ"; + if (code == V3RouteOfAdministration.IDINJ) + return "IDINJ"; + if (code == V3RouteOfAdministration.IDISCINJ) + return "IDISCINJ"; + if (code == V3RouteOfAdministration.IDUCTINJ) + return "IDUCTINJ"; + if (code == V3RouteOfAdministration.IDURINJ) + return "IDURINJ"; + if (code == V3RouteOfAdministration.IEPIDINJ) + return "IEPIDINJ"; + if (code == V3RouteOfAdministration.IEPITHINJ) + return "IEPITHINJ"; + if (code == V3RouteOfAdministration.ILESINJ) + return "ILESINJ"; + if (code == V3RouteOfAdministration.ILUMINJ) + return "ILUMINJ"; + if (code == V3RouteOfAdministration.ILYMPJINJ) + return "ILYMPJINJ"; + if (code == V3RouteOfAdministration.IM) + return "IM"; + if (code == V3RouteOfAdministration.IMD) + return "IMD"; + if (code == V3RouteOfAdministration.IMZ) + return "IMZ"; + if (code == V3RouteOfAdministration.IMEDULINJ) + return "IMEDULINJ"; + if (code == V3RouteOfAdministration.INTERMENINJ) + return "INTERMENINJ"; + if (code == V3RouteOfAdministration.INTERSTITINJ) + return "INTERSTITINJ"; + if (code == V3RouteOfAdministration.IOINJ) + return "IOINJ"; + if (code == V3RouteOfAdministration.IOSSINJ) + return "IOSSINJ"; + if (code == V3RouteOfAdministration.IOVARINJ) + return "IOVARINJ"; + if (code == V3RouteOfAdministration.IPCARDINJ) + return "IPCARDINJ"; + if (code == V3RouteOfAdministration.IPERINJ) + return "IPERINJ"; + if (code == V3RouteOfAdministration.IPINJ) + return "IPINJ"; + if (code == V3RouteOfAdministration.IPLRINJ) + return "IPLRINJ"; + if (code == V3RouteOfAdministration.IPROSTINJ) + return "IPROSTINJ"; + if (code == V3RouteOfAdministration.IPUMPINJ) + return "IPUMPINJ"; + if (code == V3RouteOfAdministration.ISINJ) + return "ISINJ"; + if (code == V3RouteOfAdministration.ISTERINJ) + return "ISTERINJ"; + if (code == V3RouteOfAdministration.ISYNINJ) + return "ISYNINJ"; + if (code == V3RouteOfAdministration.ITENDINJ) + return "ITENDINJ"; + if (code == V3RouteOfAdministration.ITESTINJ) + return "ITESTINJ"; + if (code == V3RouteOfAdministration.ITHORINJ) + return "ITHORINJ"; + if (code == V3RouteOfAdministration.ITINJ) + return "ITINJ"; + if (code == V3RouteOfAdministration.ITUBINJ) + return "ITUBINJ"; + if (code == V3RouteOfAdministration.ITUMINJ) + return "ITUMINJ"; + if (code == V3RouteOfAdministration.ITYMPINJ) + return "ITYMPINJ"; + if (code == V3RouteOfAdministration.IUINJ) + return "IUINJ"; + if (code == V3RouteOfAdministration.IUINJC) + return "IUINJC"; + if (code == V3RouteOfAdministration.IURETINJ) + return "IURETINJ"; + if (code == V3RouteOfAdministration.IVASCINJ) + return "IVASCINJ"; + if (code == V3RouteOfAdministration.IVENTINJ) + return "IVENTINJ"; + if (code == V3RouteOfAdministration.IVESINJ) + return "IVESINJ"; + if (code == V3RouteOfAdministration.IVINJ) + return "IVINJ"; + if (code == V3RouteOfAdministration.IVINJBOL) + return "IVINJBOL"; + if (code == V3RouteOfAdministration.IVPUSH) + return "IVPUSH"; + if (code == V3RouteOfAdministration.IVRPUSH) + return "IVRPUSH"; + if (code == V3RouteOfAdministration.IVSPUSH) + return "IVSPUSH"; + if (code == V3RouteOfAdministration.IVITINJ) + return "IVITINJ"; + if (code == V3RouteOfAdministration.PAINJ) + return "PAINJ"; + if (code == V3RouteOfAdministration.PARENTINJ) + return "PARENTINJ"; + if (code == V3RouteOfAdministration.PDONTINJ) + return "PDONTINJ"; + if (code == V3RouteOfAdministration.PDPINJ) + return "PDPINJ"; + if (code == V3RouteOfAdministration.PDURINJ) + return "PDURINJ"; + if (code == V3RouteOfAdministration.PNINJ) + return "PNINJ"; + if (code == V3RouteOfAdministration.PNSINJ) + return "PNSINJ"; + if (code == V3RouteOfAdministration.RBINJ) + return "RBINJ"; + if (code == V3RouteOfAdministration.SCINJ) + return "SCINJ"; + if (code == V3RouteOfAdministration.SLESINJ) + return "SLESINJ"; + if (code == V3RouteOfAdministration.SOFTISINJ) + return "SOFTISINJ"; + if (code == V3RouteOfAdministration.SQ) + return "SQ"; + if (code == V3RouteOfAdministration.SUBARACHINJ) + return "SUBARACHINJ"; + if (code == V3RouteOfAdministration.SUBMUCINJ) + return "SUBMUCINJ"; + if (code == V3RouteOfAdministration.TRPLACINJ) + return "TRPLACINJ"; + if (code == V3RouteOfAdministration.TRTRACHINJ) + return "TRTRACHINJ"; + if (code == V3RouteOfAdministration.URETHINJ) + return "URETHINJ"; + if (code == V3RouteOfAdministration.URETINJ) + return "URETINJ"; + if (code == V3RouteOfAdministration._INSERTION) + return "_Insertion"; + if (code == V3RouteOfAdministration.CERVINS) + return "CERVINS"; + if (code == V3RouteOfAdministration.IOSURGINS) + return "IOSURGINS"; + if (code == V3RouteOfAdministration.IU) + return "IU"; + if (code == V3RouteOfAdministration.LPINS) + return "LPINS"; + if (code == V3RouteOfAdministration.PR) + return "PR"; + if (code == V3RouteOfAdministration.SQSURGINS) + return "SQSURGINS"; + if (code == V3RouteOfAdministration.URETHINS) + return "URETHINS"; + if (code == V3RouteOfAdministration.VAGINSI) + return "VAGINSI"; + if (code == V3RouteOfAdministration._INSTILLATION) + return "_Instillation"; + if (code == V3RouteOfAdministration.CECINSTL) + return "CECINSTL"; + if (code == V3RouteOfAdministration.EFT) + return "EFT"; + if (code == V3RouteOfAdministration.ENTINSTL) + return "ENTINSTL"; + if (code == V3RouteOfAdministration.GT) + return "GT"; + if (code == V3RouteOfAdministration.NGT) + return "NGT"; + if (code == V3RouteOfAdministration.OGT) + return "OGT"; + if (code == V3RouteOfAdministration.BLADINSTL) + return "BLADINSTL"; + if (code == V3RouteOfAdministration.CAPDINSTL) + return "CAPDINSTL"; + if (code == V3RouteOfAdministration.CTINSTL) + return "CTINSTL"; + if (code == V3RouteOfAdministration.ETINSTL) + return "ETINSTL"; + if (code == V3RouteOfAdministration.GJT) + return "GJT"; + if (code == V3RouteOfAdministration.IBRONCHINSTIL) + return "IBRONCHINSTIL"; + if (code == V3RouteOfAdministration.IDUODINSTIL) + return "IDUODINSTIL"; + if (code == V3RouteOfAdministration.IESOPHINSTIL) + return "IESOPHINSTIL"; + if (code == V3RouteOfAdministration.IGASTINSTIL) + return "IGASTINSTIL"; + if (code == V3RouteOfAdministration.IILEALINJ) + return "IILEALINJ"; + if (code == V3RouteOfAdministration.IOINSTL) + return "IOINSTL"; + if (code == V3RouteOfAdministration.ISININSTIL) + return "ISININSTIL"; + if (code == V3RouteOfAdministration.ITRACHINSTIL) + return "ITRACHINSTIL"; + if (code == V3RouteOfAdministration.IUINSTL) + return "IUINSTL"; + if (code == V3RouteOfAdministration.JJTINSTL) + return "JJTINSTL"; + if (code == V3RouteOfAdministration.LARYNGINSTIL) + return "LARYNGINSTIL"; + if (code == V3RouteOfAdministration.NASALINSTIL) + return "NASALINSTIL"; + if (code == V3RouteOfAdministration.NASOGASINSTIL) + return "NASOGASINSTIL"; + if (code == V3RouteOfAdministration.NTT) + return "NTT"; + if (code == V3RouteOfAdministration.OJJ) + return "OJJ"; + if (code == V3RouteOfAdministration.OT) + return "OT"; + if (code == V3RouteOfAdministration.PDPINSTL) + return "PDPINSTL"; + if (code == V3RouteOfAdministration.PNSINSTL) + return "PNSINSTL"; + if (code == V3RouteOfAdministration.RECINSTL) + return "RECINSTL"; + if (code == V3RouteOfAdministration.RECTINSTL) + return "RECTINSTL"; + if (code == V3RouteOfAdministration.SININSTIL) + return "SININSTIL"; + if (code == V3RouteOfAdministration.SOFTISINSTIL) + return "SOFTISINSTIL"; + if (code == V3RouteOfAdministration.TRACHINSTL) + return "TRACHINSTL"; + if (code == V3RouteOfAdministration.TRTYMPINSTIL) + return "TRTYMPINSTIL"; + if (code == V3RouteOfAdministration.URETHINSTL) + return "URETHINSTL"; + if (code == V3RouteOfAdministration._IONTOPHORESISROUTE) + return "_IontophoresisRoute"; + if (code == V3RouteOfAdministration.IONTO) + return "IONTO"; + if (code == V3RouteOfAdministration._IRRIGATION) + return "_Irrigation"; + if (code == V3RouteOfAdministration.GUIRR) + return "GUIRR"; + if (code == V3RouteOfAdministration.IGASTIRR) + return "IGASTIRR"; + if (code == V3RouteOfAdministration.ILESIRR) + return "ILESIRR"; + if (code == V3RouteOfAdministration.IOIRR) + return "IOIRR"; + if (code == V3RouteOfAdministration.BLADIRR) + return "BLADIRR"; + if (code == V3RouteOfAdministration.BLADIRRC) + return "BLADIRRC"; + if (code == V3RouteOfAdministration.BLADIRRT) + return "BLADIRRT"; + if (code == V3RouteOfAdministration.RECIRR) + return "RECIRR"; + if (code == V3RouteOfAdministration._LAVAGEROUTE) + return "_LavageRoute"; + if (code == V3RouteOfAdministration.IGASTLAV) + return "IGASTLAV"; + if (code == V3RouteOfAdministration._MUCOSALABSORPTIONROUTE) + return "_MucosalAbsorptionRoute"; + if (code == V3RouteOfAdministration.IDOUDMAB) + return "IDOUDMAB"; + if (code == V3RouteOfAdministration.ITRACHMAB) + return "ITRACHMAB"; + if (code == V3RouteOfAdministration.SMUCMAB) + return "SMUCMAB"; + if (code == V3RouteOfAdministration._NEBULIZATION) + return "_Nebulization"; + if (code == V3RouteOfAdministration.ETNEB) + return "ETNEB"; + if (code == V3RouteOfAdministration._RINSE) + return "_Rinse"; + if (code == V3RouteOfAdministration.DENRINSE) + return "DENRINSE"; + if (code == V3RouteOfAdministration.ORRINSE) + return "ORRINSE"; + if (code == V3RouteOfAdministration._SUPPOSITORYROUTE) + return "_SuppositoryRoute"; + if (code == V3RouteOfAdministration.URETHSUP) + return "URETHSUP"; + if (code == V3RouteOfAdministration._SWISH) + return "_Swish"; + if (code == V3RouteOfAdministration.SWISHSPIT) + return "SWISHSPIT"; + if (code == V3RouteOfAdministration.SWISHSWAL) + return "SWISHSWAL"; + if (code == V3RouteOfAdministration._TOPICALABSORPTIONROUTE) + return "_TopicalAbsorptionRoute"; + if (code == V3RouteOfAdministration.TTYMPTABSORP) + return "TTYMPTABSORP"; + if (code == V3RouteOfAdministration._TOPICALAPPLICATION) + return "_TopicalApplication"; + if (code == V3RouteOfAdministration.DRESS) + return "DRESS"; + if (code == V3RouteOfAdministration.SWAB) + return "SWAB"; + if (code == V3RouteOfAdministration.TOPICAL) + return "TOPICAL"; + if (code == V3RouteOfAdministration.BUC) + return "BUC"; + if (code == V3RouteOfAdministration.CERV) + return "CERV"; + if (code == V3RouteOfAdministration.DEN) + return "DEN"; + if (code == V3RouteOfAdministration.GIN) + return "GIN"; + if (code == V3RouteOfAdministration.HAIR) + return "HAIR"; + if (code == V3RouteOfAdministration.ICORNTA) + return "ICORNTA"; + if (code == V3RouteOfAdministration.ICORONTA) + return "ICORONTA"; + if (code == V3RouteOfAdministration.IESOPHTA) + return "IESOPHTA"; + if (code == V3RouteOfAdministration.IILEALTA) + return "IILEALTA"; + if (code == V3RouteOfAdministration.ILTOP) + return "ILTOP"; + if (code == V3RouteOfAdministration.ILUMTA) + return "ILUMTA"; + if (code == V3RouteOfAdministration.IOTOP) + return "IOTOP"; + if (code == V3RouteOfAdministration.LARYNGTA) + return "LARYNGTA"; + if (code == V3RouteOfAdministration.MUC) + return "MUC"; + if (code == V3RouteOfAdministration.NAIL) + return "NAIL"; + if (code == V3RouteOfAdministration.NASAL) + return "NASAL"; + if (code == V3RouteOfAdministration.OPTHALTA) + return "OPTHALTA"; + if (code == V3RouteOfAdministration.ORALTA) + return "ORALTA"; + if (code == V3RouteOfAdministration.ORMUC) + return "ORMUC"; + if (code == V3RouteOfAdministration.OROPHARTA) + return "OROPHARTA"; + if (code == V3RouteOfAdministration.PERIANAL) + return "PERIANAL"; + if (code == V3RouteOfAdministration.PERINEAL) + return "PERINEAL"; + if (code == V3RouteOfAdministration.PDONTTA) + return "PDONTTA"; + if (code == V3RouteOfAdministration.RECTAL) + return "RECTAL"; + if (code == V3RouteOfAdministration.SCALP) + return "SCALP"; + if (code == V3RouteOfAdministration.OCDRESTA) + return "OCDRESTA"; + if (code == V3RouteOfAdministration.SKIN) + return "SKIN"; + if (code == V3RouteOfAdministration.SUBCONJTA) + return "SUBCONJTA"; + if (code == V3RouteOfAdministration.TMUCTA) + return "TMUCTA"; + if (code == V3RouteOfAdministration.VAGINS) + return "VAGINS"; + if (code == V3RouteOfAdministration.INSUF) + return "INSUF"; + if (code == V3RouteOfAdministration.TRNSDERM) + return "TRNSDERM"; + if (code == V3RouteOfAdministration._ROUTEBYSITE) + return "_RouteBySite"; + if (code == V3RouteOfAdministration._AMNIOTICFLUIDSACROUTE) + return "_AmnioticFluidSacRoute"; + if (code == V3RouteOfAdministration._BILIARYROUTE) + return "_BiliaryRoute"; + if (code == V3RouteOfAdministration._BODYSURFACEROUTE) + return "_BodySurfaceRoute"; + if (code == V3RouteOfAdministration._BUCCALMUCOSAROUTE) + return "_BuccalMucosaRoute"; + if (code == V3RouteOfAdministration._CECOSTOMYROUTE) + return "_CecostomyRoute"; + if (code == V3RouteOfAdministration._CERVICALROUTE) + return "_CervicalRoute"; + if (code == V3RouteOfAdministration._ENDOCERVICALROUTE) + return "_EndocervicalRoute"; + if (code == V3RouteOfAdministration._ENTERALROUTE) + return "_EnteralRoute"; + if (code == V3RouteOfAdministration._EPIDURALROUTE) + return "_EpiduralRoute"; + if (code == V3RouteOfAdministration._EXTRAAMNIOTICROUTE) + return "_ExtraAmnioticRoute"; + if (code == V3RouteOfAdministration._EXTRACORPOREALCIRCULATIONROUTE) + return "_ExtracorporealCirculationRoute"; + if (code == V3RouteOfAdministration._GASTRICROUTE) + return "_GastricRoute"; + if (code == V3RouteOfAdministration._GENITOURINARYROUTE) + return "_GenitourinaryRoute"; + if (code == V3RouteOfAdministration._GINGIVALROUTE) + return "_GingivalRoute"; + if (code == V3RouteOfAdministration._HAIRROUTE) + return "_HairRoute"; + if (code == V3RouteOfAdministration._INTERAMENINGEALROUTE) + return "_InterameningealRoute"; + if (code == V3RouteOfAdministration._INTERSTITIALROUTE) + return "_InterstitialRoute"; + if (code == V3RouteOfAdministration._INTRAABDOMINALROUTE) + return "_IntraabdominalRoute"; + if (code == V3RouteOfAdministration._INTRAARTERIALROUTE) + return "_IntraarterialRoute"; + if (code == V3RouteOfAdministration._INTRAARTICULARROUTE) + return "_IntraarticularRoute"; + if (code == V3RouteOfAdministration._INTRABRONCHIALROUTE) + return "_IntrabronchialRoute"; + if (code == V3RouteOfAdministration._INTRABURSALROUTE) + return "_IntrabursalRoute"; + if (code == V3RouteOfAdministration._INTRACARDIACROUTE) + return "_IntracardiacRoute"; + if (code == V3RouteOfAdministration._INTRACARTILAGINOUSROUTE) + return "_IntracartilaginousRoute"; + if (code == V3RouteOfAdministration._INTRACAUDALROUTE) + return "_IntracaudalRoute"; + if (code == V3RouteOfAdministration._INTRACAVERNOSALROUTE) + return "_IntracavernosalRoute"; + if (code == V3RouteOfAdministration._INTRACAVITARYROUTE) + return "_IntracavitaryRoute"; + if (code == V3RouteOfAdministration._INTRACEREBRALROUTE) + return "_IntracerebralRoute"; + if (code == V3RouteOfAdministration._INTRACERVICALROUTE) + return "_IntracervicalRoute"; + if (code == V3RouteOfAdministration._INTRACISTERNALROUTE) + return "_IntracisternalRoute"; + if (code == V3RouteOfAdministration._INTRACORNEALROUTE) + return "_IntracornealRoute"; + if (code == V3RouteOfAdministration._INTRACORONALROUTE) + return "_IntracoronalRoute"; + if (code == V3RouteOfAdministration._INTRACORONARYROUTE) + return "_IntracoronaryRoute"; + if (code == V3RouteOfAdministration._INTRACORPUSCAVERNOSUMROUTE) + return "_IntracorpusCavernosumRoute"; + if (code == V3RouteOfAdministration._INTRADERMALROUTE) + return "_IntradermalRoute"; + if (code == V3RouteOfAdministration._INTRADISCALROUTE) + return "_IntradiscalRoute"; + if (code == V3RouteOfAdministration._INTRADUCTALROUTE) + return "_IntraductalRoute"; + if (code == V3RouteOfAdministration._INTRADUODENALROUTE) + return "_IntraduodenalRoute"; + if (code == V3RouteOfAdministration._INTRADURALROUTE) + return "_IntraduralRoute"; + if (code == V3RouteOfAdministration._INTRAEPIDERMALROUTE) + return "_IntraepidermalRoute"; + if (code == V3RouteOfAdministration._INTRAEPITHELIALROUTE) + return "_IntraepithelialRoute"; + if (code == V3RouteOfAdministration._INTRAESOPHAGEALROUTE) + return "_IntraesophagealRoute"; + if (code == V3RouteOfAdministration._INTRAGASTRICROUTE) + return "_IntragastricRoute"; + if (code == V3RouteOfAdministration._INTRAILEALROUTE) + return "_IntrailealRoute"; + if (code == V3RouteOfAdministration._INTRALESIONALROUTE) + return "_IntralesionalRoute"; + if (code == V3RouteOfAdministration._INTRALUMINALROUTE) + return "_IntraluminalRoute"; + if (code == V3RouteOfAdministration._INTRALYMPHATICROUTE) + return "_IntralymphaticRoute"; + if (code == V3RouteOfAdministration._INTRAMEDULLARYROUTE) + return "_IntramedullaryRoute"; + if (code == V3RouteOfAdministration._INTRAMUSCULARROUTE) + return "_IntramuscularRoute"; + if (code == V3RouteOfAdministration._INTRAOCULARROUTE) + return "_IntraocularRoute"; + if (code == V3RouteOfAdministration._INTRAOSSEOUSROUTE) + return "_IntraosseousRoute"; + if (code == V3RouteOfAdministration._INTRAOVARIANROUTE) + return "_IntraovarianRoute"; + if (code == V3RouteOfAdministration._INTRAPERICARDIALROUTE) + return "_IntrapericardialRoute"; + if (code == V3RouteOfAdministration._INTRAPERITONEALROUTE) + return "_IntraperitonealRoute"; + if (code == V3RouteOfAdministration._INTRAPLEURALROUTE) + return "_IntrapleuralRoute"; + if (code == V3RouteOfAdministration._INTRAPROSTATICROUTE) + return "_IntraprostaticRoute"; + if (code == V3RouteOfAdministration._INTRAPULMONARYROUTE) + return "_IntrapulmonaryRoute"; + if (code == V3RouteOfAdministration._INTRASINALROUTE) + return "_IntrasinalRoute"; + if (code == V3RouteOfAdministration._INTRASPINALROUTE) + return "_IntraspinalRoute"; + if (code == V3RouteOfAdministration._INTRASTERNALROUTE) + return "_IntrasternalRoute"; + if (code == V3RouteOfAdministration._INTRASYNOVIALROUTE) + return "_IntrasynovialRoute"; + if (code == V3RouteOfAdministration._INTRATENDINOUSROUTE) + return "_IntratendinousRoute"; + if (code == V3RouteOfAdministration._INTRATESTICULARROUTE) + return "_IntratesticularRoute"; + if (code == V3RouteOfAdministration._INTRATHECALROUTE) + return "_IntrathecalRoute"; + if (code == V3RouteOfAdministration._INTRATHORACICROUTE) + return "_IntrathoracicRoute"; + if (code == V3RouteOfAdministration._INTRATRACHEALROUTE) + return "_IntratrachealRoute"; + if (code == V3RouteOfAdministration._INTRATUBULARROUTE) + return "_IntratubularRoute"; + if (code == V3RouteOfAdministration._INTRATUMORROUTE) + return "_IntratumorRoute"; + if (code == V3RouteOfAdministration._INTRATYMPANICROUTE) + return "_IntratympanicRoute"; + if (code == V3RouteOfAdministration._INTRAUTERINEROUTE) + return "_IntrauterineRoute"; + if (code == V3RouteOfAdministration._INTRAVASCULARROUTE) + return "_IntravascularRoute"; + if (code == V3RouteOfAdministration._INTRAVENOUSROUTE) + return "_IntravenousRoute"; + if (code == V3RouteOfAdministration._INTRAVENTRICULARROUTE) + return "_IntraventricularRoute"; + if (code == V3RouteOfAdministration._INTRAVESICLEROUTE) + return "_IntravesicleRoute"; + if (code == V3RouteOfAdministration._INTRAVITREALROUTE) + return "_IntravitrealRoute"; + if (code == V3RouteOfAdministration._JEJUNUMROUTE) + return "_JejunumRoute"; + if (code == V3RouteOfAdministration._LACRIMALPUNCTAROUTE) + return "_LacrimalPunctaRoute"; + if (code == V3RouteOfAdministration._LARYNGEALROUTE) + return "_LaryngealRoute"; + if (code == V3RouteOfAdministration._LINGUALROUTE) + return "_LingualRoute"; + if (code == V3RouteOfAdministration._MUCOUSMEMBRANEROUTE) + return "_MucousMembraneRoute"; + if (code == V3RouteOfAdministration._NAILROUTE) + return "_NailRoute"; + if (code == V3RouteOfAdministration._NASALROUTE) + return "_NasalRoute"; + if (code == V3RouteOfAdministration._OPHTHALMICROUTE) + return "_OphthalmicRoute"; + if (code == V3RouteOfAdministration._ORALROUTE) + return "_OralRoute"; + if (code == V3RouteOfAdministration._OROMUCOSALROUTE) + return "_OromucosalRoute"; + if (code == V3RouteOfAdministration._OROPHARYNGEALROUTE) + return "_OropharyngealRoute"; + if (code == V3RouteOfAdministration._OTICROUTE) + return "_OticRoute"; + if (code == V3RouteOfAdministration._PARANASALSINUSESROUTE) + return "_ParanasalSinusesRoute"; + if (code == V3RouteOfAdministration._PARENTERALROUTE) + return "_ParenteralRoute"; + if (code == V3RouteOfAdministration._PERIANALROUTE) + return "_PerianalRoute"; + if (code == V3RouteOfAdministration._PERIARTICULARROUTE) + return "_PeriarticularRoute"; + if (code == V3RouteOfAdministration._PERIDURALROUTE) + return "_PeriduralRoute"; + if (code == V3RouteOfAdministration._PERINEALROUTE) + return "_PerinealRoute"; + if (code == V3RouteOfAdministration._PERINEURALROUTE) + return "_PerineuralRoute"; + if (code == V3RouteOfAdministration._PERIODONTALROUTE) + return "_PeriodontalRoute"; + if (code == V3RouteOfAdministration._PULMONARYROUTE) + return "_PulmonaryRoute"; + if (code == V3RouteOfAdministration._RECTALROUTE) + return "_RectalRoute"; + if (code == V3RouteOfAdministration._RESPIRATORYTRACTROUTE) + return "_RespiratoryTractRoute"; + if (code == V3RouteOfAdministration._RETROBULBARROUTE) + return "_RetrobulbarRoute"; + if (code == V3RouteOfAdministration._SCALPROUTE) + return "_ScalpRoute"; + if (code == V3RouteOfAdministration._SINUSUNSPECIFIEDROUTE) + return "_SinusUnspecifiedRoute"; + if (code == V3RouteOfAdministration._SKINROUTE) + return "_SkinRoute"; + if (code == V3RouteOfAdministration._SOFTTISSUEROUTE) + return "_SoftTissueRoute"; + if (code == V3RouteOfAdministration._SUBARACHNOIDROUTE) + return "_SubarachnoidRoute"; + if (code == V3RouteOfAdministration._SUBCONJUNCTIVALROUTE) + return "_SubconjunctivalRoute"; + if (code == V3RouteOfAdministration._SUBCUTANEOUSROUTE) + return "_SubcutaneousRoute"; + if (code == V3RouteOfAdministration._SUBLESIONALROUTE) + return "_SublesionalRoute"; + if (code == V3RouteOfAdministration._SUBLINGUALROUTE) + return "_SublingualRoute"; + if (code == V3RouteOfAdministration._SUBMUCOSALROUTE) + return "_SubmucosalRoute"; + if (code == V3RouteOfAdministration._TRACHEOSTOMYROUTE) + return "_TracheostomyRoute"; + if (code == V3RouteOfAdministration._TRANSMUCOSALROUTE) + return "_TransmucosalRoute"; + if (code == V3RouteOfAdministration._TRANSPLACENTALROUTE) + return "_TransplacentalRoute"; + if (code == V3RouteOfAdministration._TRANSTRACHEALROUTE) + return "_TranstrachealRoute"; + if (code == V3RouteOfAdministration._TRANSTYMPANICROUTE) + return "_TranstympanicRoute"; + if (code == V3RouteOfAdministration._URETERALROUTE) + return "_UreteralRoute"; + if (code == V3RouteOfAdministration._URETHRALROUTE) + return "_UrethralRoute"; + if (code == V3RouteOfAdministration._URINARYBLADDERROUTE) + return "_UrinaryBladderRoute"; + if (code == V3RouteOfAdministration._URINARYTRACTROUTE) + return "_UrinaryTractRoute"; + if (code == V3RouteOfAdministration._VAGINALROUTE) + return "_VaginalRoute"; + if (code == V3RouteOfAdministration._VITREOUSHUMOURROUTE) + return "_VitreousHumourRoute"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Sequencing.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Sequencing.java new file mode 100644 index 00000000000..a0ead23fab5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3Sequencing.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Sequencing { + + /** + * Ascending sequence order. + */ + A, + /** + * Descending sequence order. + */ + D, + /** + * No enforced sequence order. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3Sequencing fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("D".equals(codeString)) + return D; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3Sequencing code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case D: return "D"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Sequencing"; + } + public String getDefinition() { + switch (this) { + case A: return "Ascending sequence order."; + case D: return "Descending sequence order."; + case N: return "No enforced sequence order."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Ascending"; + case D: return "Descending"; + case N: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SequencingEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SequencingEnumFactory.java new file mode 100644 index 00000000000..5823e60bbb2 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SequencingEnumFactory.java @@ -0,0 +1,63 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3SequencingEnumFactory implements EnumFactory { + + public V3Sequencing fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3Sequencing.A; + if ("D".equals(codeString)) + return V3Sequencing.D; + if ("N".equals(codeString)) + return V3Sequencing.N; + throw new IllegalArgumentException("Unknown V3Sequencing code '"+codeString+"'"); + } + + public String toCode(V3Sequencing code) { + if (code == V3Sequencing.A) + return "A"; + if (code == V3Sequencing.D) + return "D"; + if (code == V3Sequencing.N) + return "N"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperator.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperator.java new file mode 100644 index 00000000000..bdc0cd24aab --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperator.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SetOperator { + + /** + * Operations that can be used to associate concepts in a terminology. + */ + _VALUESETOPERATOR, + /** + * Form the set-difference with this value, i.e., exclude this element or set from the resulting set. + */ + E, + /** + * Form the union with this value, i.e., include this element or set in the resulting set. + */ + I, + /** + * Form the intersection with the value. + */ + A, + /** + * Form the convex hull with the value. The convex hull is defined over ordered domains and is the smallest contiguous superset (interval) that of all the operand sets. + */ + H, + /** + * Form the periodic hull with the value. The periodic hull is defined over ordered domains and is the periodic set that contains all contiguous supersets of pairs of intervals generated by the operand periodic intervals. + */ + P, + /** + * added to help the parsers + */ + NULL; + public static V3SetOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ValueSetOperator".equals(codeString)) + return _VALUESETOPERATOR; + if ("E".equals(codeString)) + return E; + if ("I".equals(codeString)) + return I; + if ("A".equals(codeString)) + return A; + if ("H".equals(codeString)) + return H; + if ("P".equals(codeString)) + return P; + throw new FHIRException("Unknown V3SetOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _VALUESETOPERATOR: return "_ValueSetOperator"; + case E: return "E"; + case I: return "I"; + case A: return "A"; + case H: return "H"; + case P: return "P"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SetOperator"; + } + public String getDefinition() { + switch (this) { + case _VALUESETOPERATOR: return "Operations that can be used to associate concepts in a terminology."; + case E: return "Form the set-difference with this value, i.e., exclude this element or set from the resulting set."; + case I: return "Form the union with this value, i.e., include this element or set in the resulting set."; + case A: return "Form the intersection with the value."; + case H: return "Form the convex hull with the value. The convex hull is defined over ordered domains and is the smallest contiguous superset (interval) that of all the operand sets."; + case P: return "Form the periodic hull with the value. The periodic hull is defined over ordered domains and is the periodic set that contains all contiguous supersets of pairs of intervals generated by the operand periodic intervals."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _VALUESETOPERATOR: return "ValueSetOperator"; + case E: return "exclude"; + case I: return "include"; + case A: return "intersect"; + case H: return "convex hull"; + case P: return "periodic hull"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperatorEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperatorEnumFactory.java new file mode 100644 index 00000000000..2486d94e93d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SetOperatorEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3SetOperatorEnumFactory implements EnumFactory { + + public V3SetOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ValueSetOperator".equals(codeString)) + return V3SetOperator._VALUESETOPERATOR; + if ("E".equals(codeString)) + return V3SetOperator.E; + if ("I".equals(codeString)) + return V3SetOperator.I; + if ("A".equals(codeString)) + return V3SetOperator.A; + if ("H".equals(codeString)) + return V3SetOperator.H; + if ("P".equals(codeString)) + return V3SetOperator.P; + throw new IllegalArgumentException("Unknown V3SetOperator code '"+codeString+"'"); + } + + public String toCode(V3SetOperator code) { + if (code == V3SetOperator._VALUESETOPERATOR) + return "_ValueSetOperator"; + if (code == V3SetOperator.E) + return "E"; + if (code == V3SetOperator.I) + return "I"; + if (code == V3SetOperator.A) + return "A"; + if (code == V3SetOperator.H) + return "H"; + if (code == V3SetOperator.P) + return "P"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenType.java new file mode 100644 index 00000000000..23d23f965bf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenType.java @@ -0,0 +1,1185 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SpecimenType { + + /** + * SpecimenEntityType + */ + _SPECIMENENTITYTYPE, + /** + * Abcess + */ + ABS, + /** + * Amniotic fluid + */ + AMN, + /** + * Aspirate + */ + ASP, + /** + * Blood bag + */ + BBL, + /** + * Whole body + */ + BDY, + /** + * Bile fluid + */ + BIFL, + /** + * Whole blood + */ + BLD, + /** + * Blood arterial + */ + BLDA, + /** + * Blood capillary + */ + BLDC, + /** + * Blood - cord + */ + BLDCO, + /** + * Blood venous + */ + BLDV, + /** + * Bone + */ + BON, + /** + * Basophils + */ + BPH, + /** + * Blood product unit + */ + BPU, + /** + * Burn + */ + BRN, + /** + * Bronchial + */ + BRO, + /** + * Exhaled gas (=breath) + */ + BRTH, + /** + * Calculus (=Stone) + */ + CALC, + /** + * Cardiac muscle + */ + CDM, + /** + * Conjunctiva + */ + CNJT, + /** + * Cannula + */ + CNL, + /** + * Colostrum + */ + COL, + /** + * Cornea + */ + CRN, + /** + * Cerebral spinal fluid + */ + CSF, + /** + * Catheter tip + */ + CTP, + /** + * Curettage + */ + CUR, + /** + * Cervical mucus + */ + CVM, + /** + * Cervix + */ + CVX, + /** + * Cyst + */ + CYST, + /** + * Dialysis fluid + */ + DIAF, + /** + * Dose med or substance + */ + DOSE, + /** + * Drain + */ + DRN, + /** + * Duodenal fluid + */ + DUFL, + /** + * Ear + */ + EAR, + /** + * Ear wax (cerumen) + */ + EARW, + /** + * Electrode + */ + ELT, + /** + * Endocardium + */ + ENDC, + /** + * Endometrium + */ + ENDM, + /** + * Eosinophils + */ + EOS, + /** + * Eye + */ + EYE, + /** + * Fibroblasts + */ + FIB, + /** + * Fistula + */ + FIST, + /** + * Filter + */ + FLT, + /** + * Body fluid, unsp + */ + FLU, + /** + * Food sample + */ + FOOD, + /** + * Gas + */ + GAS, + /** + * Gastric fluid/contents + */ + GAST, + /** + * Genital + */ + GEN, + /** + * Genital cervix + */ + GENC, + /** + * Genital fluid + */ + GENF, + /** + * Genital lochia + */ + GENL, + /** + * Genital vaginal + */ + GENV, + /** + * Hair + */ + HAR, + /** + * Inhaled Gas + */ + IHG, + /** + * Isolate + */ + ISLT, + /** + * Intubation tube + */ + IT, + /** + * Lamella + */ + LAM, + /** + * Liquid NOS + */ + LIQ, + /** + * Line + */ + LN, + /** + * Line arterial + */ + LNA, + /** + * Line venous + */ + LNV, + /** + * Lymphocytes + */ + LYM, + /** + * Macrophages + */ + MAC, + /** + * Marrow (bone) + */ + MAR, + /** + * Menstrual blood + */ + MBLD, + /** + * Meconium + */ + MEC, + /** + * Breast milk + */ + MILK, + /** + * Milk + */ + MLK, + /** + * Nail + */ + NAIL, + /** + * Nose (nasal passage) + */ + NOS, + /** + * Pancreatic fluid + */ + PAFL, + /** + * Patient + */ + PAT, + /** + * Plasma + */ + PLAS, + /** + * Plasma bag + */ + PLB, + /** + * Placenta + */ + PLC, + /** + * Pleural fluid (thoracentesis fld) + */ + PLR, + /** + * Polymorphonuclear neutrophils + */ + PMN, + /** + * Platelet poor plasma + */ + PPP, + /** + * Platelet rich plasma + */ + PRP, + /** + * Peritoneal fluid /ascites + */ + PRT, + /** + * Pus + */ + PUS, + /** + * Erythrocytes + */ + RBC, + /** + * Saliva + */ + SAL, + /** + * Serum + */ + SER, + /** + * Skeletal muscle + */ + SKM, + /** + * Skin + */ + SKN, + /** + * Seminal fluid + */ + SMN, + /** + * Seminal plasma + */ + SMPLS, + /** + * Synovial fluid (Joint fluid) + */ + SNV, + /** + * Spermatozoa + */ + SPRM, + /** + * Sputum + */ + SPT, + /** + * Sputum - coughed + */ + SPTC, + /** + * Sputum - tracheal aspirate + */ + SPTT, + /** + * Stool = Fecal + */ + STL, + /** + * Sweat + */ + SWT, + /** + * Tears + */ + TEAR, + /** + * Thrombocyte (platelet) + */ + THRB, + /** + * Throat + */ + THRT, + /** + * Tissue gall bladder + */ + TISG, + /** + * Tissue placenta + */ + TISPL, + /** + * Tissue, unspecified + */ + TISS, + /** + * Tissue ulcer + */ + TISU, + /** + * Tissue large intestine + */ + TLGI, + /** + * Tissue lung + */ + TLNG, + /** + * Tissue small intestine Tissue ulcer + */ + TSMI, + /** + * Tube, unspecified + */ + TUB, + /** + * Ulcer + */ + ULC, + /** + * Umbilical blood + */ + UMB, + /** + * Unknown medicine + */ + UMED, + /** + * Urine + */ + UR, + /** + * Urine clean catch + */ + URC, + /** + * Urine sediment + */ + URNS, + /** + * Urine catheter + */ + URT, + /** + * Urethra + */ + URTH, + /** + * Unknown substance + */ + USUB, + /** + * Vomitus + */ + VOM, + /** + * Water + */ + WAT, + /** + * Leukocytes + */ + WBC, + /** + * Wick + */ + WICK, + /** + * Wound + */ + WND, + /** + * Wound abscess + */ + WNDA, + /** + * Wound drainage + */ + WNDD, + /** + * Wound exudate + */ + WNDE, + /** + * added to help the parsers + */ + NULL; + public static V3SpecimenType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_SpecimenEntityType".equals(codeString)) + return _SPECIMENENTITYTYPE; + if ("ABS".equals(codeString)) + return ABS; + if ("AMN".equals(codeString)) + return AMN; + if ("ASP".equals(codeString)) + return ASP; + if ("BBL".equals(codeString)) + return BBL; + if ("BDY".equals(codeString)) + return BDY; + if ("BIFL".equals(codeString)) + return BIFL; + if ("BLD".equals(codeString)) + return BLD; + if ("BLDA".equals(codeString)) + return BLDA; + if ("BLDC".equals(codeString)) + return BLDC; + if ("BLDCO".equals(codeString)) + return BLDCO; + if ("BLDV".equals(codeString)) + return BLDV; + if ("BON".equals(codeString)) + return BON; + if ("BPH".equals(codeString)) + return BPH; + if ("BPU".equals(codeString)) + return BPU; + if ("BRN".equals(codeString)) + return BRN; + if ("BRO".equals(codeString)) + return BRO; + if ("BRTH".equals(codeString)) + return BRTH; + if ("CALC".equals(codeString)) + return CALC; + if ("CDM".equals(codeString)) + return CDM; + if ("CNJT".equals(codeString)) + return CNJT; + if ("CNL".equals(codeString)) + return CNL; + if ("COL".equals(codeString)) + return COL; + if ("CRN".equals(codeString)) + return CRN; + if ("CSF".equals(codeString)) + return CSF; + if ("CTP".equals(codeString)) + return CTP; + if ("CUR".equals(codeString)) + return CUR; + if ("CVM".equals(codeString)) + return CVM; + if ("CVX".equals(codeString)) + return CVX; + if ("CYST".equals(codeString)) + return CYST; + if ("DIAF".equals(codeString)) + return DIAF; + if ("DOSE".equals(codeString)) + return DOSE; + if ("DRN".equals(codeString)) + return DRN; + if ("DUFL".equals(codeString)) + return DUFL; + if ("EAR".equals(codeString)) + return EAR; + if ("EARW".equals(codeString)) + return EARW; + if ("ELT".equals(codeString)) + return ELT; + if ("ENDC".equals(codeString)) + return ENDC; + if ("ENDM".equals(codeString)) + return ENDM; + if ("EOS".equals(codeString)) + return EOS; + if ("EYE".equals(codeString)) + return EYE; + if ("FIB".equals(codeString)) + return FIB; + if ("FIST".equals(codeString)) + return FIST; + if ("FLT".equals(codeString)) + return FLT; + if ("FLU".equals(codeString)) + return FLU; + if ("FOOD".equals(codeString)) + return FOOD; + if ("GAS".equals(codeString)) + return GAS; + if ("GAST".equals(codeString)) + return GAST; + if ("GEN".equals(codeString)) + return GEN; + if ("GENC".equals(codeString)) + return GENC; + if ("GENF".equals(codeString)) + return GENF; + if ("GENL".equals(codeString)) + return GENL; + if ("GENV".equals(codeString)) + return GENV; + if ("HAR".equals(codeString)) + return HAR; + if ("IHG".equals(codeString)) + return IHG; + if ("ISLT".equals(codeString)) + return ISLT; + if ("IT".equals(codeString)) + return IT; + if ("LAM".equals(codeString)) + return LAM; + if ("LIQ".equals(codeString)) + return LIQ; + if ("LN".equals(codeString)) + return LN; + if ("LNA".equals(codeString)) + return LNA; + if ("LNV".equals(codeString)) + return LNV; + if ("LYM".equals(codeString)) + return LYM; + if ("MAC".equals(codeString)) + return MAC; + if ("MAR".equals(codeString)) + return MAR; + if ("MBLD".equals(codeString)) + return MBLD; + if ("MEC".equals(codeString)) + return MEC; + if ("MILK".equals(codeString)) + return MILK; + if ("MLK".equals(codeString)) + return MLK; + if ("NAIL".equals(codeString)) + return NAIL; + if ("NOS".equals(codeString)) + return NOS; + if ("PAFL".equals(codeString)) + return PAFL; + if ("PAT".equals(codeString)) + return PAT; + if ("PLAS".equals(codeString)) + return PLAS; + if ("PLB".equals(codeString)) + return PLB; + if ("PLC".equals(codeString)) + return PLC; + if ("PLR".equals(codeString)) + return PLR; + if ("PMN".equals(codeString)) + return PMN; + if ("PPP".equals(codeString)) + return PPP; + if ("PRP".equals(codeString)) + return PRP; + if ("PRT".equals(codeString)) + return PRT; + if ("PUS".equals(codeString)) + return PUS; + if ("RBC".equals(codeString)) + return RBC; + if ("SAL".equals(codeString)) + return SAL; + if ("SER".equals(codeString)) + return SER; + if ("SKM".equals(codeString)) + return SKM; + if ("SKN".equals(codeString)) + return SKN; + if ("SMN".equals(codeString)) + return SMN; + if ("SMPLS".equals(codeString)) + return SMPLS; + if ("SNV".equals(codeString)) + return SNV; + if ("SPRM".equals(codeString)) + return SPRM; + if ("SPT".equals(codeString)) + return SPT; + if ("SPTC".equals(codeString)) + return SPTC; + if ("SPTT".equals(codeString)) + return SPTT; + if ("STL".equals(codeString)) + return STL; + if ("SWT".equals(codeString)) + return SWT; + if ("TEAR".equals(codeString)) + return TEAR; + if ("THRB".equals(codeString)) + return THRB; + if ("THRT".equals(codeString)) + return THRT; + if ("TISG".equals(codeString)) + return TISG; + if ("TISPL".equals(codeString)) + return TISPL; + if ("TISS".equals(codeString)) + return TISS; + if ("TISU".equals(codeString)) + return TISU; + if ("TLGI".equals(codeString)) + return TLGI; + if ("TLNG".equals(codeString)) + return TLNG; + if ("TSMI".equals(codeString)) + return TSMI; + if ("TUB".equals(codeString)) + return TUB; + if ("ULC".equals(codeString)) + return ULC; + if ("UMB".equals(codeString)) + return UMB; + if ("UMED".equals(codeString)) + return UMED; + if ("UR".equals(codeString)) + return UR; + if ("URC".equals(codeString)) + return URC; + if ("URNS".equals(codeString)) + return URNS; + if ("URT".equals(codeString)) + return URT; + if ("URTH".equals(codeString)) + return URTH; + if ("USUB".equals(codeString)) + return USUB; + if ("VOM".equals(codeString)) + return VOM; + if ("WAT".equals(codeString)) + return WAT; + if ("WBC".equals(codeString)) + return WBC; + if ("WICK".equals(codeString)) + return WICK; + if ("WND".equals(codeString)) + return WND; + if ("WNDA".equals(codeString)) + return WNDA; + if ("WNDD".equals(codeString)) + return WNDD; + if ("WNDE".equals(codeString)) + return WNDE; + throw new FHIRException("Unknown V3SpecimenType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _SPECIMENENTITYTYPE: return "_SpecimenEntityType"; + case ABS: return "ABS"; + case AMN: return "AMN"; + case ASP: return "ASP"; + case BBL: return "BBL"; + case BDY: return "BDY"; + case BIFL: return "BIFL"; + case BLD: return "BLD"; + case BLDA: return "BLDA"; + case BLDC: return "BLDC"; + case BLDCO: return "BLDCO"; + case BLDV: return "BLDV"; + case BON: return "BON"; + case BPH: return "BPH"; + case BPU: return "BPU"; + case BRN: return "BRN"; + case BRO: return "BRO"; + case BRTH: return "BRTH"; + case CALC: return "CALC"; + case CDM: return "CDM"; + case CNJT: return "CNJT"; + case CNL: return "CNL"; + case COL: return "COL"; + case CRN: return "CRN"; + case CSF: return "CSF"; + case CTP: return "CTP"; + case CUR: return "CUR"; + case CVM: return "CVM"; + case CVX: return "CVX"; + case CYST: return "CYST"; + case DIAF: return "DIAF"; + case DOSE: return "DOSE"; + case DRN: return "DRN"; + case DUFL: return "DUFL"; + case EAR: return "EAR"; + case EARW: return "EARW"; + case ELT: return "ELT"; + case ENDC: return "ENDC"; + case ENDM: return "ENDM"; + case EOS: return "EOS"; + case EYE: return "EYE"; + case FIB: return "FIB"; + case FIST: return "FIST"; + case FLT: return "FLT"; + case FLU: return "FLU"; + case FOOD: return "FOOD"; + case GAS: return "GAS"; + case GAST: return "GAST"; + case GEN: return "GEN"; + case GENC: return "GENC"; + case GENF: return "GENF"; + case GENL: return "GENL"; + case GENV: return "GENV"; + case HAR: return "HAR"; + case IHG: return "IHG"; + case ISLT: return "ISLT"; + case IT: return "IT"; + case LAM: return "LAM"; + case LIQ: return "LIQ"; + case LN: return "LN"; + case LNA: return "LNA"; + case LNV: return "LNV"; + case LYM: return "LYM"; + case MAC: return "MAC"; + case MAR: return "MAR"; + case MBLD: return "MBLD"; + case MEC: return "MEC"; + case MILK: return "MILK"; + case MLK: return "MLK"; + case NAIL: return "NAIL"; + case NOS: return "NOS"; + case PAFL: return "PAFL"; + case PAT: return "PAT"; + case PLAS: return "PLAS"; + case PLB: return "PLB"; + case PLC: return "PLC"; + case PLR: return "PLR"; + case PMN: return "PMN"; + case PPP: return "PPP"; + case PRP: return "PRP"; + case PRT: return "PRT"; + case PUS: return "PUS"; + case RBC: return "RBC"; + case SAL: return "SAL"; + case SER: return "SER"; + case SKM: return "SKM"; + case SKN: return "SKN"; + case SMN: return "SMN"; + case SMPLS: return "SMPLS"; + case SNV: return "SNV"; + case SPRM: return "SPRM"; + case SPT: return "SPT"; + case SPTC: return "SPTC"; + case SPTT: return "SPTT"; + case STL: return "STL"; + case SWT: return "SWT"; + case TEAR: return "TEAR"; + case THRB: return "THRB"; + case THRT: return "THRT"; + case TISG: return "TISG"; + case TISPL: return "TISPL"; + case TISS: return "TISS"; + case TISU: return "TISU"; + case TLGI: return "TLGI"; + case TLNG: return "TLNG"; + case TSMI: return "TSMI"; + case TUB: return "TUB"; + case ULC: return "ULC"; + case UMB: return "UMB"; + case UMED: return "UMED"; + case UR: return "UR"; + case URC: return "URC"; + case URNS: return "URNS"; + case URT: return "URT"; + case URTH: return "URTH"; + case USUB: return "USUB"; + case VOM: return "VOM"; + case WAT: return "WAT"; + case WBC: return "WBC"; + case WICK: return "WICK"; + case WND: return "WND"; + case WNDA: return "WNDA"; + case WNDD: return "WNDD"; + case WNDE: return "WNDE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SpecimenType"; + } + public String getDefinition() { + switch (this) { + case _SPECIMENENTITYTYPE: return "SpecimenEntityType"; + case ABS: return "Abcess"; + case AMN: return "Amniotic fluid"; + case ASP: return "Aspirate"; + case BBL: return "Blood bag"; + case BDY: return "Whole body"; + case BIFL: return "Bile fluid"; + case BLD: return "Whole blood"; + case BLDA: return "Blood arterial"; + case BLDC: return "Blood capillary"; + case BLDCO: return "Blood - cord"; + case BLDV: return "Blood venous"; + case BON: return "Bone"; + case BPH: return "Basophils"; + case BPU: return "Blood product unit"; + case BRN: return "Burn"; + case BRO: return "Bronchial"; + case BRTH: return "Exhaled gas (=breath)"; + case CALC: return "Calculus (=Stone)"; + case CDM: return "Cardiac muscle"; + case CNJT: return "Conjunctiva"; + case CNL: return "Cannula"; + case COL: return "Colostrum"; + case CRN: return "Cornea"; + case CSF: return "Cerebral spinal fluid"; + case CTP: return "Catheter tip"; + case CUR: return "Curettage"; + case CVM: return "Cervical mucus"; + case CVX: return "Cervix"; + case CYST: return "Cyst"; + case DIAF: return "Dialysis fluid"; + case DOSE: return "Dose med or substance"; + case DRN: return "Drain"; + case DUFL: return "Duodenal fluid"; + case EAR: return "Ear"; + case EARW: return "Ear wax (cerumen)"; + case ELT: return "Electrode"; + case ENDC: return "Endocardium"; + case ENDM: return "Endometrium"; + case EOS: return "Eosinophils"; + case EYE: return "Eye"; + case FIB: return "Fibroblasts"; + case FIST: return "Fistula"; + case FLT: return "Filter"; + case FLU: return "Body fluid, unsp"; + case FOOD: return "Food sample"; + case GAS: return "Gas"; + case GAST: return "Gastric fluid/contents"; + case GEN: return "Genital"; + case GENC: return "Genital cervix"; + case GENF: return "Genital fluid"; + case GENL: return "Genital lochia"; + case GENV: return "Genital vaginal"; + case HAR: return "Hair"; + case IHG: return "Inhaled Gas"; + case ISLT: return "Isolate"; + case IT: return "Intubation tube"; + case LAM: return "Lamella"; + case LIQ: return "Liquid NOS"; + case LN: return "Line"; + case LNA: return "Line arterial"; + case LNV: return "Line venous"; + case LYM: return "Lymphocytes"; + case MAC: return "Macrophages"; + case MAR: return "Marrow (bone)"; + case MBLD: return "Menstrual blood"; + case MEC: return "Meconium"; + case MILK: return "Breast milk"; + case MLK: return "Milk"; + case NAIL: return "Nail"; + case NOS: return "Nose (nasal passage)"; + case PAFL: return "Pancreatic fluid"; + case PAT: return "Patient"; + case PLAS: return "Plasma"; + case PLB: return "Plasma bag"; + case PLC: return "Placenta"; + case PLR: return "Pleural fluid (thoracentesis fld)"; + case PMN: return "Polymorphonuclear neutrophils"; + case PPP: return "Platelet poor plasma"; + case PRP: return "Platelet rich plasma"; + case PRT: return "Peritoneal fluid /ascites"; + case PUS: return "Pus"; + case RBC: return "Erythrocytes"; + case SAL: return "Saliva"; + case SER: return "Serum"; + case SKM: return "Skeletal muscle"; + case SKN: return "Skin"; + case SMN: return "Seminal fluid"; + case SMPLS: return "Seminal plasma"; + case SNV: return "Synovial fluid (Joint fluid)"; + case SPRM: return "Spermatozoa"; + case SPT: return "Sputum"; + case SPTC: return "Sputum - coughed"; + case SPTT: return "Sputum - tracheal aspirate"; + case STL: return "Stool = Fecal"; + case SWT: return "Sweat"; + case TEAR: return "Tears"; + case THRB: return "Thrombocyte (platelet)"; + case THRT: return "Throat"; + case TISG: return "Tissue gall bladder"; + case TISPL: return "Tissue placenta"; + case TISS: return "Tissue, unspecified"; + case TISU: return "Tissue ulcer"; + case TLGI: return "Tissue large intestine"; + case TLNG: return "Tissue lung"; + case TSMI: return "Tissue small intestine Tissue ulcer"; + case TUB: return "Tube, unspecified"; + case ULC: return "Ulcer"; + case UMB: return "Umbilical blood"; + case UMED: return "Unknown medicine"; + case UR: return "Urine"; + case URC: return "Urine clean catch"; + case URNS: return "Urine sediment"; + case URT: return "Urine catheter"; + case URTH: return "Urethra"; + case USUB: return "Unknown substance"; + case VOM: return "Vomitus"; + case WAT: return "Water"; + case WBC: return "Leukocytes"; + case WICK: return "Wick"; + case WND: return "Wound"; + case WNDA: return "Wound abscess"; + case WNDD: return "Wound drainage"; + case WNDE: return "Wound exudate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _SPECIMENENTITYTYPE: return "SpecimenEntityType"; + case ABS: return "Abcess"; + case AMN: return "Amniotic fluid"; + case ASP: return "Aspirate"; + case BBL: return "Blood bag"; + case BDY: return "Whole body"; + case BIFL: return "Bile fluid"; + case BLD: return "Whole blood"; + case BLDA: return "Blood arterial"; + case BLDC: return "Blood capillary"; + case BLDCO: return "Blood - cord"; + case BLDV: return "Blood venous"; + case BON: return "Bone"; + case BPH: return "Basophils"; + case BPU: return "Blood product unit"; + case BRN: return "Burn"; + case BRO: return "Bronchial"; + case BRTH: return "Exhaled gas (=breath)"; + case CALC: return "Calculus (=Stone)"; + case CDM: return "Cardiac muscle"; + case CNJT: return "Conjunctiva"; + case CNL: return "Cannula"; + case COL: return "Colostrum"; + case CRN: return "Cornea"; + case CSF: return "Cerebral spinal fluid"; + case CTP: return "Catheter tip"; + case CUR: return "Curettage"; + case CVM: return "Cervical mucus"; + case CVX: return "Cervix"; + case CYST: return "Cyst"; + case DIAF: return "Dialysis fluid"; + case DOSE: return "Dose med or substance"; + case DRN: return "Drain"; + case DUFL: return "Duodenal fluid"; + case EAR: return "Ear"; + case EARW: return "Ear wax (cerumen)"; + case ELT: return "Electrode"; + case ENDC: return "Endocardium"; + case ENDM: return "Endometrium"; + case EOS: return "Eosinophils"; + case EYE: return "Eye"; + case FIB: return "Fibroblasts"; + case FIST: return "Fistula"; + case FLT: return "Filter"; + case FLU: return "Body fluid, unsp"; + case FOOD: return "Food sample"; + case GAS: return "Gas"; + case GAST: return "Gastric fluid/contents"; + case GEN: return "Genital"; + case GENC: return "Genital cervix"; + case GENF: return "Genital fluid"; + case GENL: return "Genital lochia"; + case GENV: return "Genital vaginal"; + case HAR: return "Hair"; + case IHG: return "Inhaled Gas"; + case ISLT: return "Isolate"; + case IT: return "Intubation tube"; + case LAM: return "Lamella"; + case LIQ: return "Liquid NOS"; + case LN: return "Line"; + case LNA: return "Line arterial"; + case LNV: return "Line venous"; + case LYM: return "Lymphocytes"; + case MAC: return "Macrophages"; + case MAR: return "Marrow (bone)"; + case MBLD: return "Menstrual blood"; + case MEC: return "Meconium"; + case MILK: return "Breast milk"; + case MLK: return "Milk"; + case NAIL: return "Nail"; + case NOS: return "Nose (nasal passage)"; + case PAFL: return "Pancreatic fluid"; + case PAT: return "Patient"; + case PLAS: return "Plasma"; + case PLB: return "Plasma bag"; + case PLC: return "Placenta"; + case PLR: return "Pleural fluid (thoracentesis fld)"; + case PMN: return "Polymorphonuclear neutrophils"; + case PPP: return "Platelet poor plasma"; + case PRP: return "Platelet rich plasma"; + case PRT: return "Peritoneal fluid /ascites"; + case PUS: return "Pus"; + case RBC: return "Erythrocytes"; + case SAL: return "Saliva"; + case SER: return "Serum"; + case SKM: return "Skeletal muscle"; + case SKN: return "Skin"; + case SMN: return "Seminal fluid"; + case SMPLS: return "Seminal plasma"; + case SNV: return "Synovial fluid (Joint fluid)"; + case SPRM: return "Spermatozoa"; + case SPT: return "Sputum"; + case SPTC: return "Sputum - coughed"; + case SPTT: return "Sputum - tracheal aspirate"; + case STL: return "Stool = Fecal"; + case SWT: return "Sweat"; + case TEAR: return "Tears"; + case THRB: return "Thrombocyte (platelet)"; + case THRT: return "Throat"; + case TISG: return "Tissue gall bladder"; + case TISPL: return "Tissue placenta"; + case TISS: return "Tissue, unspecified"; + case TISU: return "Tissue ulcer"; + case TLGI: return "Tissue large intestine"; + case TLNG: return "Tissue lung"; + case TSMI: return "Tissue small intestine Tissue ulcer"; + case TUB: return "Tube, unspecified"; + case ULC: return "Ulcer"; + case UMB: return "Umbilical blood"; + case UMED: return "Unknown medicine"; + case UR: return "Urine"; + case URC: return "Urine clean catch"; + case URNS: return "Urine sediment"; + case URT: return "Urine catheter"; + case URTH: return "Urethra"; + case USUB: return "Unknown substance"; + case VOM: return "Vomitus"; + case WAT: return "Water"; + case WBC: return "Leukocytes"; + case WICK: return "Wick"; + case WND: return "Wound"; + case WNDA: return "Wound abscess"; + case WNDD: return "Wound drainage"; + case WNDE: return "Wound exudate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenTypeEnumFactory.java new file mode 100644 index 00000000000..56fcc7a5be8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SpecimenTypeEnumFactory.java @@ -0,0 +1,547 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3SpecimenTypeEnumFactory implements EnumFactory { + + public V3SpecimenType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_SpecimenEntityType".equals(codeString)) + return V3SpecimenType._SPECIMENENTITYTYPE; + if ("ABS".equals(codeString)) + return V3SpecimenType.ABS; + if ("AMN".equals(codeString)) + return V3SpecimenType.AMN; + if ("ASP".equals(codeString)) + return V3SpecimenType.ASP; + if ("BBL".equals(codeString)) + return V3SpecimenType.BBL; + if ("BDY".equals(codeString)) + return V3SpecimenType.BDY; + if ("BIFL".equals(codeString)) + return V3SpecimenType.BIFL; + if ("BLD".equals(codeString)) + return V3SpecimenType.BLD; + if ("BLDA".equals(codeString)) + return V3SpecimenType.BLDA; + if ("BLDC".equals(codeString)) + return V3SpecimenType.BLDC; + if ("BLDCO".equals(codeString)) + return V3SpecimenType.BLDCO; + if ("BLDV".equals(codeString)) + return V3SpecimenType.BLDV; + if ("BON".equals(codeString)) + return V3SpecimenType.BON; + if ("BPH".equals(codeString)) + return V3SpecimenType.BPH; + if ("BPU".equals(codeString)) + return V3SpecimenType.BPU; + if ("BRN".equals(codeString)) + return V3SpecimenType.BRN; + if ("BRO".equals(codeString)) + return V3SpecimenType.BRO; + if ("BRTH".equals(codeString)) + return V3SpecimenType.BRTH; + if ("CALC".equals(codeString)) + return V3SpecimenType.CALC; + if ("CDM".equals(codeString)) + return V3SpecimenType.CDM; + if ("CNJT".equals(codeString)) + return V3SpecimenType.CNJT; + if ("CNL".equals(codeString)) + return V3SpecimenType.CNL; + if ("COL".equals(codeString)) + return V3SpecimenType.COL; + if ("CRN".equals(codeString)) + return V3SpecimenType.CRN; + if ("CSF".equals(codeString)) + return V3SpecimenType.CSF; + if ("CTP".equals(codeString)) + return V3SpecimenType.CTP; + if ("CUR".equals(codeString)) + return V3SpecimenType.CUR; + if ("CVM".equals(codeString)) + return V3SpecimenType.CVM; + if ("CVX".equals(codeString)) + return V3SpecimenType.CVX; + if ("CYST".equals(codeString)) + return V3SpecimenType.CYST; + if ("DIAF".equals(codeString)) + return V3SpecimenType.DIAF; + if ("DOSE".equals(codeString)) + return V3SpecimenType.DOSE; + if ("DRN".equals(codeString)) + return V3SpecimenType.DRN; + if ("DUFL".equals(codeString)) + return V3SpecimenType.DUFL; + if ("EAR".equals(codeString)) + return V3SpecimenType.EAR; + if ("EARW".equals(codeString)) + return V3SpecimenType.EARW; + if ("ELT".equals(codeString)) + return V3SpecimenType.ELT; + if ("ENDC".equals(codeString)) + return V3SpecimenType.ENDC; + if ("ENDM".equals(codeString)) + return V3SpecimenType.ENDM; + if ("EOS".equals(codeString)) + return V3SpecimenType.EOS; + if ("EYE".equals(codeString)) + return V3SpecimenType.EYE; + if ("FIB".equals(codeString)) + return V3SpecimenType.FIB; + if ("FIST".equals(codeString)) + return V3SpecimenType.FIST; + if ("FLT".equals(codeString)) + return V3SpecimenType.FLT; + if ("FLU".equals(codeString)) + return V3SpecimenType.FLU; + if ("FOOD".equals(codeString)) + return V3SpecimenType.FOOD; + if ("GAS".equals(codeString)) + return V3SpecimenType.GAS; + if ("GAST".equals(codeString)) + return V3SpecimenType.GAST; + if ("GEN".equals(codeString)) + return V3SpecimenType.GEN; + if ("GENC".equals(codeString)) + return V3SpecimenType.GENC; + if ("GENF".equals(codeString)) + return V3SpecimenType.GENF; + if ("GENL".equals(codeString)) + return V3SpecimenType.GENL; + if ("GENV".equals(codeString)) + return V3SpecimenType.GENV; + if ("HAR".equals(codeString)) + return V3SpecimenType.HAR; + if ("IHG".equals(codeString)) + return V3SpecimenType.IHG; + if ("ISLT".equals(codeString)) + return V3SpecimenType.ISLT; + if ("IT".equals(codeString)) + return V3SpecimenType.IT; + if ("LAM".equals(codeString)) + return V3SpecimenType.LAM; + if ("LIQ".equals(codeString)) + return V3SpecimenType.LIQ; + if ("LN".equals(codeString)) + return V3SpecimenType.LN; + if ("LNA".equals(codeString)) + return V3SpecimenType.LNA; + if ("LNV".equals(codeString)) + return V3SpecimenType.LNV; + if ("LYM".equals(codeString)) + return V3SpecimenType.LYM; + if ("MAC".equals(codeString)) + return V3SpecimenType.MAC; + if ("MAR".equals(codeString)) + return V3SpecimenType.MAR; + if ("MBLD".equals(codeString)) + return V3SpecimenType.MBLD; + if ("MEC".equals(codeString)) + return V3SpecimenType.MEC; + if ("MILK".equals(codeString)) + return V3SpecimenType.MILK; + if ("MLK".equals(codeString)) + return V3SpecimenType.MLK; + if ("NAIL".equals(codeString)) + return V3SpecimenType.NAIL; + if ("NOS".equals(codeString)) + return V3SpecimenType.NOS; + if ("PAFL".equals(codeString)) + return V3SpecimenType.PAFL; + if ("PAT".equals(codeString)) + return V3SpecimenType.PAT; + if ("PLAS".equals(codeString)) + return V3SpecimenType.PLAS; + if ("PLB".equals(codeString)) + return V3SpecimenType.PLB; + if ("PLC".equals(codeString)) + return V3SpecimenType.PLC; + if ("PLR".equals(codeString)) + return V3SpecimenType.PLR; + if ("PMN".equals(codeString)) + return V3SpecimenType.PMN; + if ("PPP".equals(codeString)) + return V3SpecimenType.PPP; + if ("PRP".equals(codeString)) + return V3SpecimenType.PRP; + if ("PRT".equals(codeString)) + return V3SpecimenType.PRT; + if ("PUS".equals(codeString)) + return V3SpecimenType.PUS; + if ("RBC".equals(codeString)) + return V3SpecimenType.RBC; + if ("SAL".equals(codeString)) + return V3SpecimenType.SAL; + if ("SER".equals(codeString)) + return V3SpecimenType.SER; + if ("SKM".equals(codeString)) + return V3SpecimenType.SKM; + if ("SKN".equals(codeString)) + return V3SpecimenType.SKN; + if ("SMN".equals(codeString)) + return V3SpecimenType.SMN; + if ("SMPLS".equals(codeString)) + return V3SpecimenType.SMPLS; + if ("SNV".equals(codeString)) + return V3SpecimenType.SNV; + if ("SPRM".equals(codeString)) + return V3SpecimenType.SPRM; + if ("SPT".equals(codeString)) + return V3SpecimenType.SPT; + if ("SPTC".equals(codeString)) + return V3SpecimenType.SPTC; + if ("SPTT".equals(codeString)) + return V3SpecimenType.SPTT; + if ("STL".equals(codeString)) + return V3SpecimenType.STL; + if ("SWT".equals(codeString)) + return V3SpecimenType.SWT; + if ("TEAR".equals(codeString)) + return V3SpecimenType.TEAR; + if ("THRB".equals(codeString)) + return V3SpecimenType.THRB; + if ("THRT".equals(codeString)) + return V3SpecimenType.THRT; + if ("TISG".equals(codeString)) + return V3SpecimenType.TISG; + if ("TISPL".equals(codeString)) + return V3SpecimenType.TISPL; + if ("TISS".equals(codeString)) + return V3SpecimenType.TISS; + if ("TISU".equals(codeString)) + return V3SpecimenType.TISU; + if ("TLGI".equals(codeString)) + return V3SpecimenType.TLGI; + if ("TLNG".equals(codeString)) + return V3SpecimenType.TLNG; + if ("TSMI".equals(codeString)) + return V3SpecimenType.TSMI; + if ("TUB".equals(codeString)) + return V3SpecimenType.TUB; + if ("ULC".equals(codeString)) + return V3SpecimenType.ULC; + if ("UMB".equals(codeString)) + return V3SpecimenType.UMB; + if ("UMED".equals(codeString)) + return V3SpecimenType.UMED; + if ("UR".equals(codeString)) + return V3SpecimenType.UR; + if ("URC".equals(codeString)) + return V3SpecimenType.URC; + if ("URNS".equals(codeString)) + return V3SpecimenType.URNS; + if ("URT".equals(codeString)) + return V3SpecimenType.URT; + if ("URTH".equals(codeString)) + return V3SpecimenType.URTH; + if ("USUB".equals(codeString)) + return V3SpecimenType.USUB; + if ("VOM".equals(codeString)) + return V3SpecimenType.VOM; + if ("WAT".equals(codeString)) + return V3SpecimenType.WAT; + if ("WBC".equals(codeString)) + return V3SpecimenType.WBC; + if ("WICK".equals(codeString)) + return V3SpecimenType.WICK; + if ("WND".equals(codeString)) + return V3SpecimenType.WND; + if ("WNDA".equals(codeString)) + return V3SpecimenType.WNDA; + if ("WNDD".equals(codeString)) + return V3SpecimenType.WNDD; + if ("WNDE".equals(codeString)) + return V3SpecimenType.WNDE; + throw new IllegalArgumentException("Unknown V3SpecimenType code '"+codeString+"'"); + } + + public String toCode(V3SpecimenType code) { + if (code == V3SpecimenType._SPECIMENENTITYTYPE) + return "_SpecimenEntityType"; + if (code == V3SpecimenType.ABS) + return "ABS"; + if (code == V3SpecimenType.AMN) + return "AMN"; + if (code == V3SpecimenType.ASP) + return "ASP"; + if (code == V3SpecimenType.BBL) + return "BBL"; + if (code == V3SpecimenType.BDY) + return "BDY"; + if (code == V3SpecimenType.BIFL) + return "BIFL"; + if (code == V3SpecimenType.BLD) + return "BLD"; + if (code == V3SpecimenType.BLDA) + return "BLDA"; + if (code == V3SpecimenType.BLDC) + return "BLDC"; + if (code == V3SpecimenType.BLDCO) + return "BLDCO"; + if (code == V3SpecimenType.BLDV) + return "BLDV"; + if (code == V3SpecimenType.BON) + return "BON"; + if (code == V3SpecimenType.BPH) + return "BPH"; + if (code == V3SpecimenType.BPU) + return "BPU"; + if (code == V3SpecimenType.BRN) + return "BRN"; + if (code == V3SpecimenType.BRO) + return "BRO"; + if (code == V3SpecimenType.BRTH) + return "BRTH"; + if (code == V3SpecimenType.CALC) + return "CALC"; + if (code == V3SpecimenType.CDM) + return "CDM"; + if (code == V3SpecimenType.CNJT) + return "CNJT"; + if (code == V3SpecimenType.CNL) + return "CNL"; + if (code == V3SpecimenType.COL) + return "COL"; + if (code == V3SpecimenType.CRN) + return "CRN"; + if (code == V3SpecimenType.CSF) + return "CSF"; + if (code == V3SpecimenType.CTP) + return "CTP"; + if (code == V3SpecimenType.CUR) + return "CUR"; + if (code == V3SpecimenType.CVM) + return "CVM"; + if (code == V3SpecimenType.CVX) + return "CVX"; + if (code == V3SpecimenType.CYST) + return "CYST"; + if (code == V3SpecimenType.DIAF) + return "DIAF"; + if (code == V3SpecimenType.DOSE) + return "DOSE"; + if (code == V3SpecimenType.DRN) + return "DRN"; + if (code == V3SpecimenType.DUFL) + return "DUFL"; + if (code == V3SpecimenType.EAR) + return "EAR"; + if (code == V3SpecimenType.EARW) + return "EARW"; + if (code == V3SpecimenType.ELT) + return "ELT"; + if (code == V3SpecimenType.ENDC) + return "ENDC"; + if (code == V3SpecimenType.ENDM) + return "ENDM"; + if (code == V3SpecimenType.EOS) + return "EOS"; + if (code == V3SpecimenType.EYE) + return "EYE"; + if (code == V3SpecimenType.FIB) + return "FIB"; + if (code == V3SpecimenType.FIST) + return "FIST"; + if (code == V3SpecimenType.FLT) + return "FLT"; + if (code == V3SpecimenType.FLU) + return "FLU"; + if (code == V3SpecimenType.FOOD) + return "FOOD"; + if (code == V3SpecimenType.GAS) + return "GAS"; + if (code == V3SpecimenType.GAST) + return "GAST"; + if (code == V3SpecimenType.GEN) + return "GEN"; + if (code == V3SpecimenType.GENC) + return "GENC"; + if (code == V3SpecimenType.GENF) + return "GENF"; + if (code == V3SpecimenType.GENL) + return "GENL"; + if (code == V3SpecimenType.GENV) + return "GENV"; + if (code == V3SpecimenType.HAR) + return "HAR"; + if (code == V3SpecimenType.IHG) + return "IHG"; + if (code == V3SpecimenType.ISLT) + return "ISLT"; + if (code == V3SpecimenType.IT) + return "IT"; + if (code == V3SpecimenType.LAM) + return "LAM"; + if (code == V3SpecimenType.LIQ) + return "LIQ"; + if (code == V3SpecimenType.LN) + return "LN"; + if (code == V3SpecimenType.LNA) + return "LNA"; + if (code == V3SpecimenType.LNV) + return "LNV"; + if (code == V3SpecimenType.LYM) + return "LYM"; + if (code == V3SpecimenType.MAC) + return "MAC"; + if (code == V3SpecimenType.MAR) + return "MAR"; + if (code == V3SpecimenType.MBLD) + return "MBLD"; + if (code == V3SpecimenType.MEC) + return "MEC"; + if (code == V3SpecimenType.MILK) + return "MILK"; + if (code == V3SpecimenType.MLK) + return "MLK"; + if (code == V3SpecimenType.NAIL) + return "NAIL"; + if (code == V3SpecimenType.NOS) + return "NOS"; + if (code == V3SpecimenType.PAFL) + return "PAFL"; + if (code == V3SpecimenType.PAT) + return "PAT"; + if (code == V3SpecimenType.PLAS) + return "PLAS"; + if (code == V3SpecimenType.PLB) + return "PLB"; + if (code == V3SpecimenType.PLC) + return "PLC"; + if (code == V3SpecimenType.PLR) + return "PLR"; + if (code == V3SpecimenType.PMN) + return "PMN"; + if (code == V3SpecimenType.PPP) + return "PPP"; + if (code == V3SpecimenType.PRP) + return "PRP"; + if (code == V3SpecimenType.PRT) + return "PRT"; + if (code == V3SpecimenType.PUS) + return "PUS"; + if (code == V3SpecimenType.RBC) + return "RBC"; + if (code == V3SpecimenType.SAL) + return "SAL"; + if (code == V3SpecimenType.SER) + return "SER"; + if (code == V3SpecimenType.SKM) + return "SKM"; + if (code == V3SpecimenType.SKN) + return "SKN"; + if (code == V3SpecimenType.SMN) + return "SMN"; + if (code == V3SpecimenType.SMPLS) + return "SMPLS"; + if (code == V3SpecimenType.SNV) + return "SNV"; + if (code == V3SpecimenType.SPRM) + return "SPRM"; + if (code == V3SpecimenType.SPT) + return "SPT"; + if (code == V3SpecimenType.SPTC) + return "SPTC"; + if (code == V3SpecimenType.SPTT) + return "SPTT"; + if (code == V3SpecimenType.STL) + return "STL"; + if (code == V3SpecimenType.SWT) + return "SWT"; + if (code == V3SpecimenType.TEAR) + return "TEAR"; + if (code == V3SpecimenType.THRB) + return "THRB"; + if (code == V3SpecimenType.THRT) + return "THRT"; + if (code == V3SpecimenType.TISG) + return "TISG"; + if (code == V3SpecimenType.TISPL) + return "TISPL"; + if (code == V3SpecimenType.TISS) + return "TISS"; + if (code == V3SpecimenType.TISU) + return "TISU"; + if (code == V3SpecimenType.TLGI) + return "TLGI"; + if (code == V3SpecimenType.TLNG) + return "TLNG"; + if (code == V3SpecimenType.TSMI) + return "TSMI"; + if (code == V3SpecimenType.TUB) + return "TUB"; + if (code == V3SpecimenType.ULC) + return "ULC"; + if (code == V3SpecimenType.UMB) + return "UMB"; + if (code == V3SpecimenType.UMED) + return "UMED"; + if (code == V3SpecimenType.UR) + return "UR"; + if (code == V3SpecimenType.URC) + return "URC"; + if (code == V3SpecimenType.URNS) + return "URNS"; + if (code == V3SpecimenType.URT) + return "URT"; + if (code == V3SpecimenType.URTH) + return "URTH"; + if (code == V3SpecimenType.USUB) + return "USUB"; + if (code == V3SpecimenType.VOM) + return "VOM"; + if (code == V3SpecimenType.WAT) + return "WAT"; + if (code == V3SpecimenType.WBC) + return "WBC"; + if (code == V3SpecimenType.WICK) + return "WICK"; + if (code == V3SpecimenType.WND) + return "WND"; + if (code == V3SpecimenType.WNDA) + return "WNDA"; + if (code == V3SpecimenType.WNDD) + return "WNDD"; + if (code == V3SpecimenType.WNDE) + return "WNDE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitution.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitution.java new file mode 100644 index 00000000000..f1541ceba75 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitution.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SubstanceAdminSubstitution { + + /** + * Description: Substitution occurred or is permitted with another product that may potentially have different ingredients, but having the same biological and therapeutic effects. + */ + _ACTSUBSTANCEADMINSUBSTITUTIONCODE, + /** + * Description: Substitution occurred or is permitted with another bioequivalent and therapeutically equivalent product. + */ + E, + /** + * Description: + + + Substitution occurred or is permitted with another product that is a: + + + pharmaceutical alternative containing the same active ingredient but is formulated with different salt, ester + pharmaceutical equivalent that has the same active ingredient, strength, dosage form and route of administration + + + Examples: + + + + + Pharmaceutical alternative: Erythromycin Ethylsuccinate for Erythromycin Stearate + + Pharmaceutical equivalent: Lisonpril for Zestril + */ + EC, + /** + * Description: + + + Substitution occurred or is permitted between equivalent Brands but not Generics + + + Examples: + + + + Zestril for Prinivil + Coumadin for Jantoven + */ + BC, + /** + * Description: Substitution occurred or is permitted between equivalent Generics but not Brands + + + Examples: + + + + Lisnopril (Lupin Corp) for Lisnopril (Wockhardt Corp) + */ + G, + /** + * Description: Substitution occurred or is permitted with another product having the same therapeutic objective and safety profile. + + + Examples: + + + + ranitidine for Tagamet + */ + TE, + /** + * Description: Substitution occurred or is permitted between therapeutically equivalent Brands but not Generics +> + Examples: + + + + Zantac for Tagamet + */ + TB, + /** + * Description: Substitution occurred or is permitted between therapeutically equivalent Generics but not Brands +> + Examples: + + + + Ranitidine for cimetidine + */ + TG, + /** + * Description: This substitution was performed or is permitted based on formulary guidelines. + */ + F, + /** + * No substitution occurred or is permitted. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3SubstanceAdminSubstitution fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActSubstanceAdminSubstitutionCode".equals(codeString)) + return _ACTSUBSTANCEADMINSUBSTITUTIONCODE; + if ("E".equals(codeString)) + return E; + if ("EC".equals(codeString)) + return EC; + if ("BC".equals(codeString)) + return BC; + if ("G".equals(codeString)) + return G; + if ("TE".equals(codeString)) + return TE; + if ("TB".equals(codeString)) + return TB; + if ("TG".equals(codeString)) + return TG; + if ("F".equals(codeString)) + return F; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3SubstanceAdminSubstitution code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "_ActSubstanceAdminSubstitutionCode"; + case E: return "E"; + case EC: return "EC"; + case BC: return "BC"; + case G: return "G"; + case TE: return "TE"; + case TB: return "TB"; + case TG: return "TG"; + case F: return "F"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/substanceAdminSubstitution"; + } + public String getDefinition() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "Description: Substitution occurred or is permitted with another product that may potentially have different ingredients, but having the same biological and therapeutic effects."; + case E: return "Description: Substitution occurred or is permitted with another bioequivalent and therapeutically equivalent product."; + case EC: return "Description: \n \r\n\n Substitution occurred or is permitted with another product that is a:\r\n\n \n pharmaceutical alternative containing the same active ingredient but is formulated with different salt, ester\n pharmaceutical equivalent that has the same active ingredient, strength, dosage form and route of administration\n \n \n Examples: \n \r\n\n \n \n Pharmaceutical alternative: Erythromycin Ethylsuccinate for Erythromycin Stearate\n \n Pharmaceutical equivalent: Lisonpril for Zestril"; + case BC: return "Description: \n \r\n\n Substitution occurred or is permitted between equivalent Brands but not Generics\r\n\n \n Examples: \n \r\n\n \n Zestril for Prinivil\n Coumadin for Jantoven"; + case G: return "Description: Substitution occurred or is permitted between equivalent Generics but not Brands\r\n\n \n Examples: \n \r\n\n \n Lisnopril (Lupin Corp) for Lisnopril (Wockhardt Corp)"; + case TE: return "Description: Substitution occurred or is permitted with another product having the same therapeutic objective and safety profile.\r\n\n \n Examples: \n \r\n\n \n ranitidine for Tagamet"; + case TB: return "Description: Substitution occurred or is permitted between therapeutically equivalent Brands but not Generics\r\n>\n Examples: \n \r\n\n \n Zantac for Tagamet"; + case TG: return "Description: Substitution occurred or is permitted between therapeutically equivalent Generics but not Brands\r\n>\n Examples: \n \r\n\n \n Ranitidine for cimetidine"; + case F: return "Description: This substitution was performed or is permitted based on formulary guidelines."; + case N: return "No substitution occurred or is permitted."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "ActSubstanceAdminSubstitutionCode"; + case E: return "equivalent"; + case EC: return "equivalent composition"; + case BC: return "brand composition"; + case G: return "generic composition"; + case TE: return "therapeutic alternative"; + case TB: return "therapeutic brand"; + case TG: return "therapeutic generic"; + case F: return "formulary"; + case N: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitutionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitutionEnumFactory.java new file mode 100644 index 00000000000..8aa792d332e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstanceAdminSubstitutionEnumFactory.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3SubstanceAdminSubstitutionEnumFactory implements EnumFactory { + + public V3SubstanceAdminSubstitution fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActSubstanceAdminSubstitutionCode".equals(codeString)) + return V3SubstanceAdminSubstitution._ACTSUBSTANCEADMINSUBSTITUTIONCODE; + if ("E".equals(codeString)) + return V3SubstanceAdminSubstitution.E; + if ("EC".equals(codeString)) + return V3SubstanceAdminSubstitution.EC; + if ("BC".equals(codeString)) + return V3SubstanceAdminSubstitution.BC; + if ("G".equals(codeString)) + return V3SubstanceAdminSubstitution.G; + if ("TE".equals(codeString)) + return V3SubstanceAdminSubstitution.TE; + if ("TB".equals(codeString)) + return V3SubstanceAdminSubstitution.TB; + if ("TG".equals(codeString)) + return V3SubstanceAdminSubstitution.TG; + if ("F".equals(codeString)) + return V3SubstanceAdminSubstitution.F; + if ("N".equals(codeString)) + return V3SubstanceAdminSubstitution.N; + throw new IllegalArgumentException("Unknown V3SubstanceAdminSubstitution code '"+codeString+"'"); + } + + public String toCode(V3SubstanceAdminSubstitution code) { + if (code == V3SubstanceAdminSubstitution._ACTSUBSTANCEADMINSUBSTITUTIONCODE) + return "_ActSubstanceAdminSubstitutionCode"; + if (code == V3SubstanceAdminSubstitution.E) + return "E"; + if (code == V3SubstanceAdminSubstitution.EC) + return "EC"; + if (code == V3SubstanceAdminSubstitution.BC) + return "BC"; + if (code == V3SubstanceAdminSubstitution.G) + return "G"; + if (code == V3SubstanceAdminSubstitution.TE) + return "TE"; + if (code == V3SubstanceAdminSubstitution.TB) + return "TB"; + if (code == V3SubstanceAdminSubstitution.TG) + return "TG"; + if (code == V3SubstanceAdminSubstitution.F) + return "F"; + if (code == V3SubstanceAdminSubstitution.N) + return "N"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionCondition.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionCondition.java new file mode 100644 index 00000000000..d16b9d6e3ba --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionCondition.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SubstitutionCondition { + + /** + * Some conditions may be attached to an allowable substitution. An allowable substitution is based on a match to any other attributes that may be specified. + */ + _CONDITIONAL, + /** + * Confirmation with Contact Person prior to making any substitutions has or will occur. + */ + CONFIRM, + /** + * Notification to the Contact Person, prior to substitution and through normal institutional procedures, has or will be made. + */ + NOTIFY, + /** + * Substitution is not permitted. + */ + NOSUB, + /** + * No conditions are required. + */ + UNCOND, + /** + * added to help the parsers + */ + NULL; + public static V3SubstitutionCondition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Conditional".equals(codeString)) + return _CONDITIONAL; + if ("CONFIRM".equals(codeString)) + return CONFIRM; + if ("NOTIFY".equals(codeString)) + return NOTIFY; + if ("NOSUB".equals(codeString)) + return NOSUB; + if ("UNCOND".equals(codeString)) + return UNCOND; + throw new FHIRException("Unknown V3SubstitutionCondition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONDITIONAL: return "_Conditional"; + case CONFIRM: return "CONFIRM"; + case NOTIFY: return "NOTIFY"; + case NOSUB: return "NOSUB"; + case UNCOND: return "UNCOND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SubstitutionCondition"; + } + public String getDefinition() { + switch (this) { + case _CONDITIONAL: return "Some conditions may be attached to an allowable substitution. An allowable substitution is based on a match to any other attributes that may be specified."; + case CONFIRM: return "Confirmation with Contact Person prior to making any substitutions has or will occur."; + case NOTIFY: return "Notification to the Contact Person, prior to substitution and through normal institutional procedures, has or will be made."; + case NOSUB: return "Substitution is not permitted."; + case UNCOND: return "No conditions are required."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONDITIONAL: return "Conditional"; + case CONFIRM: return "Confirm first"; + case NOTIFY: return "Notify first"; + case NOSUB: return "No substitution"; + case UNCOND: return "Unconditional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionConditionEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionConditionEnumFactory.java new file mode 100644 index 00000000000..11fae0583b8 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3SubstitutionConditionEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3SubstitutionConditionEnumFactory implements EnumFactory { + + public V3SubstitutionCondition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Conditional".equals(codeString)) + return V3SubstitutionCondition._CONDITIONAL; + if ("CONFIRM".equals(codeString)) + return V3SubstitutionCondition.CONFIRM; + if ("NOTIFY".equals(codeString)) + return V3SubstitutionCondition.NOTIFY; + if ("NOSUB".equals(codeString)) + return V3SubstitutionCondition.NOSUB; + if ("UNCOND".equals(codeString)) + return V3SubstitutionCondition.UNCOND; + throw new IllegalArgumentException("Unknown V3SubstitutionCondition code '"+codeString+"'"); + } + + public String toCode(V3SubstitutionCondition code) { + if (code == V3SubstitutionCondition._CONDITIONAL) + return "_Conditional"; + if (code == V3SubstitutionCondition.CONFIRM) + return "CONFIRM"; + if (code == V3SubstitutionCondition.NOTIFY) + return "NOTIFY"; + if (code == V3SubstitutionCondition.NOSUB) + return "NOSUB"; + if (code == V3SubstitutionCondition.UNCOND) + return "UNCOND"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlign.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlign.java new file mode 100644 index 00000000000..c8a44184706 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlign.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellHorizontalAlign { + + /** + * center + */ + CENTER, + /** + * char + */ + CHAR, + /** + * justify + */ + JUSTIFY, + /** + * left + */ + LEFT, + /** + * right + */ + RIGHT, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellHorizontalAlign fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("center".equals(codeString)) + return CENTER; + if ("char".equals(codeString)) + return CHAR; + if ("justify".equals(codeString)) + return JUSTIFY; + if ("left".equals(codeString)) + return LEFT; + if ("right".equals(codeString)) + return RIGHT; + throw new FHIRException("Unknown V3TableCellHorizontalAlign code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellHorizontalAlign"; + } + public String getDefinition() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlignEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlignEnumFactory.java new file mode 100644 index 00000000000..77161595120 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellHorizontalAlignEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TableCellHorizontalAlignEnumFactory implements EnumFactory { + + public V3TableCellHorizontalAlign fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("center".equals(codeString)) + return V3TableCellHorizontalAlign.CENTER; + if ("char".equals(codeString)) + return V3TableCellHorizontalAlign.CHAR; + if ("justify".equals(codeString)) + return V3TableCellHorizontalAlign.JUSTIFY; + if ("left".equals(codeString)) + return V3TableCellHorizontalAlign.LEFT; + if ("right".equals(codeString)) + return V3TableCellHorizontalAlign.RIGHT; + throw new IllegalArgumentException("Unknown V3TableCellHorizontalAlign code '"+codeString+"'"); + } + + public String toCode(V3TableCellHorizontalAlign code) { + if (code == V3TableCellHorizontalAlign.CENTER) + return "center"; + if (code == V3TableCellHorizontalAlign.CHAR) + return "char"; + if (code == V3TableCellHorizontalAlign.JUSTIFY) + return "justify"; + if (code == V3TableCellHorizontalAlign.LEFT) + return "left"; + if (code == V3TableCellHorizontalAlign.RIGHT) + return "right"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScope.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScope.java new file mode 100644 index 00000000000..9ef8e2dcfaa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScope.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellScope { + + /** + * col + */ + COL, + /** + * colgroup + */ + COLGROUP, + /** + * row + */ + ROW, + /** + * rowgroup + */ + ROWGROUP, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellScope fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("col".equals(codeString)) + return COL; + if ("colgroup".equals(codeString)) + return COLGROUP; + if ("row".equals(codeString)) + return ROW; + if ("rowgroup".equals(codeString)) + return ROWGROUP; + throw new FHIRException("Unknown V3TableCellScope code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellScope"; + } + public String getDefinition() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScopeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScopeEnumFactory.java new file mode 100644 index 00000000000..a85aa94d245 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellScopeEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TableCellScopeEnumFactory implements EnumFactory { + + public V3TableCellScope fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("col".equals(codeString)) + return V3TableCellScope.COL; + if ("colgroup".equals(codeString)) + return V3TableCellScope.COLGROUP; + if ("row".equals(codeString)) + return V3TableCellScope.ROW; + if ("rowgroup".equals(codeString)) + return V3TableCellScope.ROWGROUP; + throw new IllegalArgumentException("Unknown V3TableCellScope code '"+codeString+"'"); + } + + public String toCode(V3TableCellScope code) { + if (code == V3TableCellScope.COL) + return "col"; + if (code == V3TableCellScope.COLGROUP) + return "colgroup"; + if (code == V3TableCellScope.ROW) + return "row"; + if (code == V3TableCellScope.ROWGROUP) + return "rowgroup"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlign.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlign.java new file mode 100644 index 00000000000..2a5f1e967d9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlign.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellVerticalAlign { + + /** + * baseline + */ + BASELINE, + /** + * bottom + */ + BOTTOM, + /** + * middle + */ + MIDDLE, + /** + * top + */ + TOP, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellVerticalAlign fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("baseline".equals(codeString)) + return BASELINE; + if ("bottom".equals(codeString)) + return BOTTOM; + if ("middle".equals(codeString)) + return MIDDLE; + if ("top".equals(codeString)) + return TOP; + throw new FHIRException("Unknown V3TableCellVerticalAlign code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellVerticalAlign"; + } + public String getDefinition() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlignEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlignEnumFactory.java new file mode 100644 index 00000000000..7dfb90fc1eb --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableCellVerticalAlignEnumFactory.java @@ -0,0 +1,67 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TableCellVerticalAlignEnumFactory implements EnumFactory { + + public V3TableCellVerticalAlign fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("baseline".equals(codeString)) + return V3TableCellVerticalAlign.BASELINE; + if ("bottom".equals(codeString)) + return V3TableCellVerticalAlign.BOTTOM; + if ("middle".equals(codeString)) + return V3TableCellVerticalAlign.MIDDLE; + if ("top".equals(codeString)) + return V3TableCellVerticalAlign.TOP; + throw new IllegalArgumentException("Unknown V3TableCellVerticalAlign code '"+codeString+"'"); + } + + public String toCode(V3TableCellVerticalAlign code) { + if (code == V3TableCellVerticalAlign.BASELINE) + return "baseline"; + if (code == V3TableCellVerticalAlign.BOTTOM) + return "bottom"; + if (code == V3TableCellVerticalAlign.MIDDLE) + return "middle"; + if (code == V3TableCellVerticalAlign.TOP) + return "top"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrame.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrame.java new file mode 100644 index 00000000000..8d465da9c80 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrame.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableFrame { + + /** + * above + */ + ABOVE, + /** + * below + */ + BELOW, + /** + * border + */ + BORDER, + /** + * box + */ + BOX, + /** + * hsides + */ + HSIDES, + /** + * lhs + */ + LHS, + /** + * rhs + */ + RHS, + /** + * void + */ + VOID, + /** + * vsides + */ + VSIDES, + /** + * added to help the parsers + */ + NULL; + public static V3TableFrame fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("above".equals(codeString)) + return ABOVE; + if ("below".equals(codeString)) + return BELOW; + if ("border".equals(codeString)) + return BORDER; + if ("box".equals(codeString)) + return BOX; + if ("hsides".equals(codeString)) + return HSIDES; + if ("lhs".equals(codeString)) + return LHS; + if ("rhs".equals(codeString)) + return RHS; + if ("void".equals(codeString)) + return VOID; + if ("vsides".equals(codeString)) + return VSIDES; + throw new FHIRException("Unknown V3TableFrame code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableFrame"; + } + public String getDefinition() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrameEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrameEnumFactory.java new file mode 100644 index 00000000000..9b21fa60a64 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableFrameEnumFactory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TableFrameEnumFactory implements EnumFactory { + + public V3TableFrame fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("above".equals(codeString)) + return V3TableFrame.ABOVE; + if ("below".equals(codeString)) + return V3TableFrame.BELOW; + if ("border".equals(codeString)) + return V3TableFrame.BORDER; + if ("box".equals(codeString)) + return V3TableFrame.BOX; + if ("hsides".equals(codeString)) + return V3TableFrame.HSIDES; + if ("lhs".equals(codeString)) + return V3TableFrame.LHS; + if ("rhs".equals(codeString)) + return V3TableFrame.RHS; + if ("void".equals(codeString)) + return V3TableFrame.VOID; + if ("vsides".equals(codeString)) + return V3TableFrame.VSIDES; + throw new IllegalArgumentException("Unknown V3TableFrame code '"+codeString+"'"); + } + + public String toCode(V3TableFrame code) { + if (code == V3TableFrame.ABOVE) + return "above"; + if (code == V3TableFrame.BELOW) + return "below"; + if (code == V3TableFrame.BORDER) + return "border"; + if (code == V3TableFrame.BOX) + return "box"; + if (code == V3TableFrame.HSIDES) + return "hsides"; + if (code == V3TableFrame.LHS) + return "lhs"; + if (code == V3TableFrame.RHS) + return "rhs"; + if (code == V3TableFrame.VOID) + return "void"; + if (code == V3TableFrame.VSIDES) + return "vsides"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRules.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRules.java new file mode 100644 index 00000000000..4d465398172 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRules.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableRules { + + /** + * all + */ + ALL, + /** + * cols + */ + COLS, + /** + * groups + */ + GROUPS, + /** + * none + */ + NONE, + /** + * rows + */ + ROWS, + /** + * added to help the parsers + */ + NULL; + public static V3TableRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return ALL; + if ("cols".equals(codeString)) + return COLS; + if ("groups".equals(codeString)) + return GROUPS; + if ("none".equals(codeString)) + return NONE; + if ("rows".equals(codeString)) + return ROWS; + throw new FHIRException("Unknown V3TableRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableRules"; + } + public String getDefinition() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRulesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRulesEnumFactory.java new file mode 100644 index 00000000000..5cee1a24d7d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TableRulesEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TableRulesEnumFactory implements EnumFactory { + + public V3TableRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return V3TableRules.ALL; + if ("cols".equals(codeString)) + return V3TableRules.COLS; + if ("groups".equals(codeString)) + return V3TableRules.GROUPS; + if ("none".equals(codeString)) + return V3TableRules.NONE; + if ("rows".equals(codeString)) + return V3TableRules.ROWS; + throw new IllegalArgumentException("Unknown V3TableRules code '"+codeString+"'"); + } + + public String toCode(V3TableRules code) { + if (code == V3TableRules.ALL) + return "all"; + if (code == V3TableRules.COLS) + return "cols"; + if (code == V3TableRules.GROUPS) + return "groups"; + if (code == V3TableRules.NONE) + return "none"; + if (code == V3TableRules.ROWS) + return "rows"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwareness.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwareness.java new file mode 100644 index 00000000000..b90b47854aa --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwareness.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TargetAwareness { + + /** + * Target person has been informed about the issue but currently denies it. + */ + D, + /** + * Target person is fully aware of the issue. + */ + F, + /** + * Target person is not capable of comprehending the issue. + */ + I, + /** + * Target person is marginally aware of the issue. + */ + M, + /** + * Target person is partially aware of the issue. + */ + P, + /** + * Target person has not yet been informed of the issue. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3TargetAwareness fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("F".equals(codeString)) + return F; + if ("I".equals(codeString)) + return I; + if ("M".equals(codeString)) + return M; + if ("P".equals(codeString)) + return P; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3TargetAwareness code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case F: return "F"; + case I: return "I"; + case M: return "M"; + case P: return "P"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TargetAwareness"; + } + public String getDefinition() { + switch (this) { + case D: return "Target person has been informed about the issue but currently denies it."; + case F: return "Target person is fully aware of the issue."; + case I: return "Target person is not capable of comprehending the issue."; + case M: return "Target person is marginally aware of the issue."; + case P: return "Target person is partially aware of the issue."; + case U: return "Target person has not yet been informed of the issue."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "denying"; + case F: return "full awareness"; + case I: return "incapable"; + case M: return "marginal"; + case P: return "partial"; + case U: return "uninformed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwarenessEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwarenessEnumFactory.java new file mode 100644 index 00000000000..feb6d261e75 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TargetAwarenessEnumFactory.java @@ -0,0 +1,75 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TargetAwarenessEnumFactory implements EnumFactory { + + public V3TargetAwareness fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3TargetAwareness.D; + if ("F".equals(codeString)) + return V3TargetAwareness.F; + if ("I".equals(codeString)) + return V3TargetAwareness.I; + if ("M".equals(codeString)) + return V3TargetAwareness.M; + if ("P".equals(codeString)) + return V3TargetAwareness.P; + if ("U".equals(codeString)) + return V3TargetAwareness.U; + throw new IllegalArgumentException("Unknown V3TargetAwareness code '"+codeString+"'"); + } + + public String toCode(V3TargetAwareness code) { + if (code == V3TargetAwareness.D) + return "D"; + if (code == V3TargetAwareness.F) + return "F"; + if (code == V3TargetAwareness.I) + return "I"; + if (code == V3TargetAwareness.M) + return "M"; + if (code == V3TargetAwareness.P) + return "P"; + if (code == V3TargetAwareness.U) + return "U"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilities.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilities.java new file mode 100644 index 00000000000..2f59f3b232c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilities.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TelecommunicationCapabilities { + + /** + * Description: This device can receive data calls (i.e. modem). + */ + DATA, + /** + * Description: This device can receive faxes. + */ + FAX, + /** + * Description: This device can receive SMS messages. + */ + SMS, + /** + * Description: This device is a text telephone. + */ + TTY, + /** + * Description: This device can receive voice calls (i.e. talking to another person, or a recording device, or a voice activated computer). + */ + VOICE, + /** + * added to help the parsers + */ + NULL; + public static V3TelecommunicationCapabilities fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("data".equals(codeString)) + return DATA; + if ("fax".equals(codeString)) + return FAX; + if ("sms".equals(codeString)) + return SMS; + if ("tty".equals(codeString)) + return TTY; + if ("voice".equals(codeString)) + return VOICE; + throw new FHIRException("Unknown V3TelecommunicationCapabilities code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DATA: return "data"; + case FAX: return "fax"; + case SMS: return "sms"; + case TTY: return "tty"; + case VOICE: return "voice"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TelecommunicationCapabilities"; + } + public String getDefinition() { + switch (this) { + case DATA: return "Description: This device can receive data calls (i.e. modem)."; + case FAX: return "Description: This device can receive faxes."; + case SMS: return "Description: This device can receive SMS messages."; + case TTY: return "Description: This device is a text telephone."; + case VOICE: return "Description: This device can receive voice calls (i.e. talking to another person, or a recording device, or a voice activated computer)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DATA: return "data"; + case FAX: return "fax"; + case SMS: return "sms"; + case TTY: return "text"; + case VOICE: return "voice"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilitiesEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilitiesEnumFactory.java new file mode 100644 index 00000000000..db7151a2e38 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TelecommunicationCapabilitiesEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TelecommunicationCapabilitiesEnumFactory implements EnumFactory { + + public V3TelecommunicationCapabilities fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("data".equals(codeString)) + return V3TelecommunicationCapabilities.DATA; + if ("fax".equals(codeString)) + return V3TelecommunicationCapabilities.FAX; + if ("sms".equals(codeString)) + return V3TelecommunicationCapabilities.SMS; + if ("tty".equals(codeString)) + return V3TelecommunicationCapabilities.TTY; + if ("voice".equals(codeString)) + return V3TelecommunicationCapabilities.VOICE; + throw new IllegalArgumentException("Unknown V3TelecommunicationCapabilities code '"+codeString+"'"); + } + + public String toCode(V3TelecommunicationCapabilities code) { + if (code == V3TelecommunicationCapabilities.DATA) + return "data"; + if (code == V3TelecommunicationCapabilities.FAX) + return "fax"; + if (code == V3TelecommunicationCapabilities.SMS) + return "sms"; + if (code == V3TelecommunicationCapabilities.TTY) + return "tty"; + if (code == V3TelecommunicationCapabilities.VOICE) + return "voice"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEvent.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEvent.java new file mode 100644 index 00000000000..fa6f128dd71 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEvent.java @@ -0,0 +1,240 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TimingEvent { + + /** + * before meal (from lat. ante cibus) + */ + AC, + /** + * before lunch (from lat. ante cibus diurnus) + */ + ACD, + /** + * before breakfast (from lat. ante cibus matutinus) + */ + ACM, + /** + * before dinner (from lat. ante cibus vespertinus) + */ + ACV, + /** + * Description: meal (from lat. ante cibus) + */ + C, + /** + * Description: lunch (from lat. cibus diurnus) + */ + CD, + /** + * Description: breakfast (from lat. cibus matutinus) + */ + CM, + /** + * Description: dinner (from lat. cibus vespertinus) + */ + CV, + /** + * Description: Prior to beginning a regular period of extended sleep (this would exclude naps). Note that this might occur at different times of day depending on a person's regular sleep schedule. + */ + HS, + /** + * between meals (from lat. inter cibus) + */ + IC, + /** + * between lunch and dinner + */ + ICD, + /** + * between breakfast and lunch + */ + ICM, + /** + * between dinner and the hour of sleep + */ + ICV, + /** + * after meal (from lat. post cibus) + */ + PC, + /** + * after lunch (from lat. post cibus diurnus) + */ + PCD, + /** + * after breakfast (from lat. post cibus matutinus) + */ + PCM, + /** + * after dinner (from lat. post cibus vespertinus) + */ + PCV, + /** + * Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep) + + + Usage Notes: e.g. + + Take pulse rate on waking in management of thyrotoxicosis. + + Take BP on waking in management of hypertension + + Take basal body temperature on waking in establishing date of ovulation + */ + WAKE, + /** + * added to help the parsers + */ + NULL; + public static V3TimingEvent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return AC; + if ("ACD".equals(codeString)) + return ACD; + if ("ACM".equals(codeString)) + return ACM; + if ("ACV".equals(codeString)) + return ACV; + if ("C".equals(codeString)) + return C; + if ("CD".equals(codeString)) + return CD; + if ("CM".equals(codeString)) + return CM; + if ("CV".equals(codeString)) + return CV; + if ("HS".equals(codeString)) + return HS; + if ("IC".equals(codeString)) + return IC; + if ("ICD".equals(codeString)) + return ICD; + if ("ICM".equals(codeString)) + return ICM; + if ("ICV".equals(codeString)) + return ICV; + if ("PC".equals(codeString)) + return PC; + if ("PCD".equals(codeString)) + return PCD; + if ("PCM".equals(codeString)) + return PCM; + if ("PCV".equals(codeString)) + return PCV; + if ("WAKE".equals(codeString)) + return WAKE; + throw new FHIRException("Unknown V3TimingEvent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AC: return "AC"; + case ACD: return "ACD"; + case ACM: return "ACM"; + case ACV: return "ACV"; + case C: return "C"; + case CD: return "CD"; + case CM: return "CM"; + case CV: return "CV"; + case HS: return "HS"; + case IC: return "IC"; + case ICD: return "ICD"; + case ICM: return "ICM"; + case ICV: return "ICV"; + case PC: return "PC"; + case PCD: return "PCD"; + case PCM: return "PCM"; + case PCV: return "PCV"; + case WAKE: return "WAKE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TimingEvent"; + } + public String getDefinition() { + switch (this) { + case AC: return "before meal (from lat. ante cibus)"; + case ACD: return "before lunch (from lat. ante cibus diurnus)"; + case ACM: return "before breakfast (from lat. ante cibus matutinus)"; + case ACV: return "before dinner (from lat. ante cibus vespertinus)"; + case C: return "Description: meal (from lat. ante cibus)"; + case CD: return "Description: lunch (from lat. cibus diurnus)"; + case CM: return "Description: breakfast (from lat. cibus matutinus)"; + case CV: return "Description: dinner (from lat. cibus vespertinus)"; + case HS: return "Description: Prior to beginning a regular period of extended sleep (this would exclude naps). Note that this might occur at different times of day depending on a person's regular sleep schedule."; + case IC: return "between meals (from lat. inter cibus)"; + case ICD: return "between lunch and dinner"; + case ICM: return "between breakfast and lunch"; + case ICV: return "between dinner and the hour of sleep"; + case PC: return "after meal (from lat. post cibus)"; + case PCD: return "after lunch (from lat. post cibus diurnus)"; + case PCM: return "after breakfast (from lat. post cibus matutinus)"; + case PCV: return "after dinner (from lat. post cibus vespertinus)"; + case WAKE: return "Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep)\r\n\n \n Usage Notes: e.g.\r\n\n Take pulse rate on waking in management of thyrotoxicosis.\r\n\n Take BP on waking in management of hypertension\r\n\n Take basal body temperature on waking in establishing date of ovulation"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AC: return "AC"; + case ACD: return "ACD"; + case ACM: return "ACM"; + case ACV: return "ACV"; + case C: return "C"; + case CD: return "CD"; + case CM: return "CM"; + case CV: return "CV"; + case HS: return "HS"; + case IC: return "IC"; + case ICD: return "ICD"; + case ICM: return "ICM"; + case ICV: return "ICV"; + case PC: return "PC"; + case PCD: return "PCD"; + case PCM: return "PCM"; + case PCV: return "PCV"; + case WAKE: return "WAKE"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEventEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEventEnumFactory.java new file mode 100644 index 00000000000..c03a183957e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TimingEventEnumFactory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TimingEventEnumFactory implements EnumFactory { + + public V3TimingEvent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return V3TimingEvent.AC; + if ("ACD".equals(codeString)) + return V3TimingEvent.ACD; + if ("ACM".equals(codeString)) + return V3TimingEvent.ACM; + if ("ACV".equals(codeString)) + return V3TimingEvent.ACV; + if ("C".equals(codeString)) + return V3TimingEvent.C; + if ("CD".equals(codeString)) + return V3TimingEvent.CD; + if ("CM".equals(codeString)) + return V3TimingEvent.CM; + if ("CV".equals(codeString)) + return V3TimingEvent.CV; + if ("HS".equals(codeString)) + return V3TimingEvent.HS; + if ("IC".equals(codeString)) + return V3TimingEvent.IC; + if ("ICD".equals(codeString)) + return V3TimingEvent.ICD; + if ("ICM".equals(codeString)) + return V3TimingEvent.ICM; + if ("ICV".equals(codeString)) + return V3TimingEvent.ICV; + if ("PC".equals(codeString)) + return V3TimingEvent.PC; + if ("PCD".equals(codeString)) + return V3TimingEvent.PCD; + if ("PCM".equals(codeString)) + return V3TimingEvent.PCM; + if ("PCV".equals(codeString)) + return V3TimingEvent.PCV; + if ("WAKE".equals(codeString)) + return V3TimingEvent.WAKE; + throw new IllegalArgumentException("Unknown V3TimingEvent code '"+codeString+"'"); + } + + public String toCode(V3TimingEvent code) { + if (code == V3TimingEvent.AC) + return "AC"; + if (code == V3TimingEvent.ACD) + return "ACD"; + if (code == V3TimingEvent.ACM) + return "ACM"; + if (code == V3TimingEvent.ACV) + return "ACV"; + if (code == V3TimingEvent.C) + return "C"; + if (code == V3TimingEvent.CD) + return "CD"; + if (code == V3TimingEvent.CM) + return "CM"; + if (code == V3TimingEvent.CV) + return "CV"; + if (code == V3TimingEvent.HS) + return "HS"; + if (code == V3TimingEvent.IC) + return "IC"; + if (code == V3TimingEvent.ICD) + return "ICD"; + if (code == V3TimingEvent.ICM) + return "ICM"; + if (code == V3TimingEvent.ICV) + return "ICV"; + if (code == V3TimingEvent.PC) + return "PC"; + if (code == V3TimingEvent.PCD) + return "PCD"; + if (code == V3TimingEvent.PCM) + return "PCM"; + if (code == V3TimingEvent.PCV) + return "PCV"; + if (code == V3TimingEvent.WAKE) + return "WAKE"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCode.java new file mode 100644 index 00000000000..d11a7d33572 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCode.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TransmissionRelationshipTypeCode { + + /** + * Description:A transmission relationship indicating that the source transmission follows the target transmission. + */ + SEQL, + /** + * added to help the parsers + */ + NULL; + public static V3TransmissionRelationshipTypeCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return SEQL; + throw new FHIRException("Unknown V3TransmissionRelationshipTypeCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SEQL: return "SEQL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TransmissionRelationshipTypeCode"; + } + public String getDefinition() { + switch (this) { + case SEQL: return "Description:A transmission relationship indicating that the source transmission follows the target transmission."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SEQL: return "sequence"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCodeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCodeEnumFactory.java new file mode 100644 index 00000000000..3fb5da0a7df --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TransmissionRelationshipTypeCodeEnumFactory.java @@ -0,0 +1,55 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TransmissionRelationshipTypeCodeEnumFactory implements EnumFactory { + + public V3TransmissionRelationshipTypeCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return V3TransmissionRelationshipTypeCode.SEQL; + throw new IllegalArgumentException("Unknown V3TransmissionRelationshipTypeCode code '"+codeString+"'"); + } + + public String toCode(V3TransmissionRelationshipTypeCode code) { + if (code == V3TransmissionRelationshipTypeCode.SEQL) + return "SEQL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUS.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUS.java new file mode 100644 index 00000000000..3455118a3c4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUS.java @@ -0,0 +1,5181 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TribalEntityUS { + + /** + * NATIVE ENTITIES WITHIN THE STATE OF ALASKA RECOGNIZED AND ELIGIBLE TO RECEIVE SERVICES FROM THE UNITED STATES BUREAU OF INDIAN AFFAIRS + */ + _NATIVEENTITYALASKA, + /** + * Village of Afognak + */ + _338, + /** + * Agdaagux Tribe of King Cove + */ + _339, + /** + * Native Village of Akhiok + */ + _340, + /** + * Akiachak Native Community + */ + _341, + /** + * Akiak Native Community + */ + _342, + /** + * Native Village of Akutan + */ + _343, + /** + * Village of Alakanuk + */ + _344, + /** + * Alatna Village + */ + _345, + /** + * Native Village of Aleknagik + */ + _346, + /** + * Algaaciq Native Village (St. Mary's) + */ + _347, + /** + * Allakaket Village + */ + _348, + /** + * Native Village of Ambler + */ + _349, + /** + * Village of Anaktuvuk Pass + */ + _350, + /** + * Yupiit of Andreafski + */ + _351, + /** + * Angoon Community Association + */ + _352, + /** + * Village of Aniak + */ + _353, + /** + * Anvik Village + */ + _354, + /** + * Arctic Village (See Native Village of Venetie Trib + */ + _355, + /** + * Asa carsarmiut Tribe (formerly Native Village of M + */ + _356, + /** + * Native Village of Atka + */ + _357, + /** + * Village of Atmautluak + */ + _358, + /** + * Atqasuk Village (Atkasook) + */ + _359, + /** + * Native Village of Barrow Inupiat Traditional Gover + */ + _360, + /** + * Beaver Village + */ + _361, + /** + * Native Village of Belkofski + */ + _362, + /** + * Village of Bill Moore's Slough + */ + _363, + /** + * Birch Creek Tribe + */ + _364, + /** + * Native Village of Brevig Mission + */ + _365, + /** + * Native Village of Buckland + */ + _366, + /** + * Native Village of Cantwell + */ + _367, + /** + * Native Village of Chanega (aka Chenega) + */ + _368, + /** + * Chalkyitsik Village + */ + _369, + /** + * Village of Chefornak + */ + _370, + /** + * Chevak Native Village + */ + _371, + /** + * Chickaloon Native Village + */ + _372, + /** + * Native Village of Chignik + */ + _373, + /** + * Native Village of Chignik Lagoon + */ + _374, + /** + * Chignik Lake Village + */ + _375, + /** + * Chilkat Indian Village (Klukwan) + */ + _376, + /** + * Chilkoot Indian Association (Haines) + */ + _377, + /** + * Chinik Eskimo Community (Golovin) + */ + _378, + /** + * Native Village of Chistochina + */ + _379, + /** + * Native Village of Chitina + */ + _380, + /** + * Native Village of Chuathbaluk (Russian Mission, Ku + */ + _381, + /** + * Chuloonawick Native Village + */ + _382, + /** + * Circle Native Community + */ + _383, + /** + * Village of Clark's Point + */ + _384, + /** + * Native Village of Council + */ + _385, + /** + * Craig Community Association + */ + _386, + /** + * Village of Crooked Creek + */ + _387, + /** + * Curyung Tribal Council (formerly Native Village of + */ + _388, + /** + * Native Village of Deering + */ + _389, + /** + * Native Village of Diomede (aka Inalik) + */ + _390, + /** + * Village of Dot Lake + */ + _391, + /** + * Douglas Indian Association + */ + _392, + /** + * Native Village of Eagle + */ + _393, + /** + * Native Village of Eek + */ + _394, + /** + * Egegik Village + */ + _395, + /** + * Eklutna Native Village + */ + _396, + /** + * Native Village of Ekuk + */ + _397, + /** + * Ekwok Village + */ + _398, + /** + * Native Village of Elim + */ + _399, + /** + * Emmonak Village + */ + _400, + /** + * Evansville Village (aka Bettles Field) + */ + _401, + /** + * Native Village of Eyak (Cordova) + */ + _402, + /** + * Native Village of False Pass + */ + _403, + /** + * Native Village of Fort Yukon + */ + _404, + /** + * Native Village of Gakona + */ + _405, + /** + * Galena Village (aka Louden Village) + */ + _406, + /** + * Native Village of Gambell + */ + _407, + /** + * Native Village of Georgetown + */ + _408, + /** + * Native Village of Goodnews Bay + */ + _409, + /** + * Organized Village of Grayling (aka Holikachuk) + */ + _410, + /** + * Gulkana Village + */ + _411, + /** + * Native Village of Hamilton + */ + _412, + /** + * Healy Lake Village + */ + _413, + /** + * Holy Cross Village + */ + _414, + /** + * Hoonah Indian Association + */ + _415, + /** + * Native Village of Hooper Bay + */ + _416, + /** + * Hughes Village + */ + _417, + /** + * Huslia Village + */ + _418, + /** + * Hydaburg Cooperative Association + */ + _419, + /** + * Igiugig Village + */ + _420, + /** + * Village of Iliamna + */ + _421, + /** + * Inupiat Community of the Arctic Slope + */ + _422, + /** + * Iqurmuit Traditional Council (formerly Native Vill + */ + _423, + /** + * Ivanoff Bay Village + */ + _424, + /** + * Kaguyak Village + */ + _425, + /** + * Organized Village of Kake + */ + _426, + /** + * Kaktovik Village (aka Barter Island) + */ + _427, + /** + * Village of Kalskag + */ + _428, + /** + * Village of Kaltag + */ + _429, + /** + * Native Village of Kanatak + */ + _430, + /** + * Native Village of Karluk + */ + _431, + /** + * Organized Village of Kasaan + */ + _432, + /** + * Native Village of Kasigluk + */ + _433, + /** + * Kenaitze Indian Tribe + */ + _434, + /** + * Ketchikan Indian Corporation + */ + _435, + /** + * Native Village of Kiana + */ + _436, + /** + * King Island Native Community + */ + _437, + /** + * King Salmon Tribe + */ + _438, + /** + * Native Village of Kipnuk + */ + _439, + /** + * Native Village of Kivalina + */ + _440, + /** + * Klawock Cooperative Association + */ + _441, + /** + * Native Village of Kluti Kaah (aka Copper Center) + */ + _442, + /** + * Knik Tribe + */ + _443, + /** + * Native Village of Kobuk + */ + _444, + /** + * Kokhanok Village + */ + _445, + /** + * Native Village of Kongiganak + */ + _446, + /** + * Village of Kotlik + */ + _447, + /** + * Native Village of Kotzebue + */ + _448, + /** + * Native Village of Koyuk + */ + _449, + /** + * Koyukuk Native Village + */ + _450, + /** + * Organized Village of Kwethluk + */ + _451, + /** + * Native Village of Kwigillingok + */ + _452, + /** + * Native Village of Kwinhagak (aka Quinhagak) + */ + _453, + /** + * Native Village of Larsen Bay + */ + _454, + /** + * Levelock Village + */ + _455, + /** + * Lesnoi Village (aka Woody Island) + */ + _456, + /** + * Lime Village + */ + _457, + /** + * Village of Lower Kalskag + */ + _458, + /** + * Manley Hot Springs Village + */ + _459, + /** + * Manokotak Village + */ + _460, + /** + * Native Village of Marshall (aka Fortuna Ledge) + */ + _461, + /** + * Native Village of Mary's Igloo + */ + _462, + /** + * McGrath Native Village + */ + _463, + /** + * Native Village of Mekoryuk + */ + _464, + /** + * Mentasta Traditional Council + */ + _465, + /** + * Metlakatla Indian Community, Annette Island Reserv + */ + _466, + /** + * Native Village of Minto + */ + _467, + /** + * Naknek Native Village + */ + _468, + /** + * Native Village of Nanwalek (aka English Bay) + */ + _469, + /** + * Native Village of Napaimute + */ + _470, + /** + * Native Village of Napakiak + */ + _471, + /** + * Native Village of Napaskiak + */ + _472, + /** + * Native Village of Nelson Lagoon + */ + _473, + /** + * Nenana Native Association + */ + _474, + /** + * New Koliganek Village Council (formerly Koliganek + */ + _475, + /** + * New Stuyahok Village + */ + _476, + /** + * Newhalen Village + */ + _477, + /** + * Newtok Village + */ + _478, + /** + * Native Village of Nightmute + */ + _479, + /** + * Nikolai Village + */ + _480, + /** + * Native Village of Nikolski + */ + _481, + /** + * Ninilchik Village + */ + _482, + /** + * Native Village of Noatak + */ + _483, + /** + * Nome Eskimo Community + */ + _484, + /** + * Nondalton Village + */ + _485, + /** + * Noorvik Native Community + */ + _486, + /** + * Northway Village + */ + _487, + /** + * Native Village of Nuiqsut (aka Nooiksut) + */ + _488, + /** + * Nulato Village + */ + _489, + /** + * Nunakauyarmiut Tribe (formerly Native Village of T + */ + _490, + /** + * Native Village of Nunapitchuk + */ + _491, + /** + * Village of Ohogamiut + */ + _492, + /** + * Village of Old Harbor + */ + _493, + /** + * Orutsararmuit Native Village (aka Bethel) + */ + _494, + /** + * Oscarville Traditional Village + */ + _495, + /** + * Native Village of Ouzinkie + */ + _496, + /** + * Native Village of Paimiut + */ + _497, + /** + * Pauloff Harbor Village + */ + _498, + /** + * Pedro Bay Village + */ + _499, + /** + * Native Village of Perryville + */ + _500, + /** + * Petersburg Indian Association + */ + _501, + /** + * Native Village of Pilot Point + */ + _502, + /** + * Pilot Station Traditional Village + */ + _503, + /** + * Native Village of Pitka's Point + */ + _504, + /** + * Platinum Traditional Village + */ + _505, + /** + * Native Village of Point Hope + */ + _506, + /** + * Native Village of Point Lay + */ + _507, + /** + * Native Village of Port Graham + */ + _508, + /** + * Native Village of Port Heiden + */ + _509, + /** + * Native Village of Port Lions + */ + _510, + /** + * Portage Creek Village (aka Ohgsenakale) + */ + _511, + /** + * Pribilof Islands Aleut Communities of St. Paul & S + */ + _512, + /** + * Qagan Tayagungin Tribe of Sand Point Village + */ + _513, + /** + * Qawalangin Tribe of Unalaska + */ + _514, + /** + * Rampart Village + */ + _515, + /** + * Village of Red Devil + */ + _516, + /** + * Native Village of Ruby + */ + _517, + /** + * Saint George Island(See Pribilof Islands Aleut Com + */ + _518, + /** + * Native Village of Saint Michael + */ + _519, + /** + * Saint Paul Island (See Pribilof Islands Aleut Comm + */ + _520, + /** + * Village of Salamatoff + */ + _521, + /** + * Native Village of Savoonga + */ + _522, + /** + * Organized Village of Saxman + */ + _523, + /** + * Native Village of Scammon Bay + */ + _524, + /** + * Native Village of Selawik + */ + _525, + /** + * Seldovia Village Tribe + */ + _526, + /** + * Shageluk Native Village + */ + _527, + /** + * Native Village of Shaktoolik + */ + _528, + /** + * Native Village of Sheldon's Point + */ + _529, + /** + * Native Village of Shishmaref + */ + _530, + /** + * Shoonaq Tribe of Kodiak + */ + _531, + /** + * Native Village of Shungnak + */ + _532, + /** + * Sitka Tribe of Alaska + */ + _533, + /** + * Skagway Village + */ + _534, + /** + * Village of Sleetmute + */ + _535, + /** + * Village of Solomon + */ + _536, + /** + * South Naknek Village + */ + _537, + /** + * Stebbins Community Association + */ + _538, + /** + * Native Village of Stevens + */ + _539, + /** + * Village of Stony River + */ + _540, + /** + * Takotna Village + */ + _541, + /** + * Native Village of Tanacross + */ + _542, + /** + * Native Village of Tanana + */ + _543, + /** + * Native Village of Tatitlek + */ + _544, + /** + * Native Village of Tazlina + */ + _545, + /** + * Telida Village + */ + _546, + /** + * Native Village of Teller + */ + _547, + /** + * Native Village of Tetlin + */ + _548, + /** + * Central Council of the Tlingit and Haida Indian Tb + */ + _549, + /** + * Traditional Village of Togiak + */ + _550, + /** + * Tuluksak Native Community + */ + _551, + /** + * Native Village of Tuntutuliak + */ + _552, + /** + * Native Village of Tununak + */ + _553, + /** + * Twin Hills Village + */ + _554, + /** + * Native Village of Tyonek + */ + _555, + /** + * Ugashik Village + */ + _556, + /** + * Umkumiute Native Village + */ + _557, + /** + * Native Village of Unalakleet + */ + _558, + /** + * Native Village of Unga + */ + _559, + /** + * Village of Venetie (See Native Village of Venetie + */ + _560, + /** + * Native Village of Venetie Tribal Government (Arcti + */ + _561, + /** + * Village of Wainwright + */ + _562, + /** + * Native Village of Wales + */ + _563, + /** + * Native Village of White Mountain + */ + _564, + /** + * Wrangell Cooperative Association + */ + _565, + /** + * Yakutat Tlingit Tribe + */ + _566, + /** + * NATIVE ENTITIES WITHIN THE CONTIGUOUS 48 STATES + */ + _NATIVEENTITYCONTIGUOUS, + /** + * Absentee-Shawnee Tribe of Indians of Oklahoma + */ + _1, + /** + * Assiniboine and Sioux Tribes of the Fort Peck Indi + */ + _10, + /** + * Havasupai Tribe of the Havasupai Reservation, Ariz + */ + _100, + /** + * Ho-Chunk Nation of Wisconsin (formerly known as th + */ + _101, + /** + * Hoh Indian Tribe of the Hoh Indian Reservation, Wa + */ + _102, + /** + * Hoopa Valley Tribe, California + */ + _103, + /** + * Hopi Tribe of Arizona + */ + _104, + /** + * Hopland Band of Pomo Indians of the Hopland Ranche + */ + _105, + /** + * Houlton Band of Maliseet Indians of Maine + */ + _106, + /** + * Hualapai Indian Tribe of the Hualapai Indian Reser + */ + _107, + /** + * Huron Potawatomi, Inc., Michigan + */ + _108, + /** + * Inaja Band of Diegueno Mission Indians of the Inaj + */ + _109, + /** + * Augustine Band of Cahuilla Mission Indians of the + */ + _11, + /** + * Ione Band of Miwok Indians of California + */ + _110, + /** + * Iowa Tribe of Kansas and Nebraska + */ + _111, + /** + * Iowa Tribe of Oklahoma + */ + _112, + /** + * Jackson Rancheria of Me-Wuk Indians of California + */ + _113, + /** + * Jamestown S'Klallam Tribe of Washington + */ + _114, + /** + * Jamul Indian Village of California + */ + _115, + /** + * Jena Band of Choctaw Indians, Louisiana + */ + _116, + /** + * Jicarilla Apache Tribe of the Jicarilla Apache Ind + */ + _117, + /** + * Kaibab Band of Paiute Indians of the Kaibab Indian + */ + _118, + /** + * Kalispel Indian Community of the Kalispel Reservat + */ + _119, + /** + * Bad River Band of the Lake Superior Tribe of Chipp + */ + _12, + /** + * Karuk Tribe of California + */ + _120, + /** + * Kashia Band of Pomo Indians of the Stewarts Point + */ + _121, + /** + * Kaw Nation, Oklahoma + */ + _122, + /** + * Keweenaw Bay Indian Community of L'Anse and Ontona + */ + _123, + /** + * Kialegee Tribal Town, Oklahoma + */ + _124, + /** + * Kickapoo Tribe of Indians of the Kickapoo Reservat + */ + _125, + /** + * Kickapoo Tribe of Oklahoma + */ + _126, + /** + * Kickapoo Traditional Tribe of Texas + */ + _127, + /** + * Kiowa Indian Tribe of Oklahoma + */ + _128, + /** + * Klamath Indian Tribe of Oregon + */ + _129, + /** + * Bay Mills Indian Community of the Sault Ste. Marie + */ + _13, + /** + * Kootenai Tribe of Idaho + */ + _130, + /** + * La Jolla Band of Luiseno Mission Indians of the La + */ + _131, + /** + * La Posta Band of Diegueno Mission Indians of the L + */ + _132, + /** + * Lac Courte Oreilles Band of Lake Superior Chippewa + */ + _133, + /** + * Lac du Flambeau Band of Lake Superior Chippewa Ind + */ + _134, + /** + * Lac Vieux Desert Band of Lake Superior Chippewa In + */ + _135, + /** + * Las Vegas Tribe of Paiute Indians of the Las Vegas + */ + _136, + /** + * Little River Band of Ottawa Indians of Michigan + */ + _137, + /** + * Little Traverse Bay Bands of Odawa Indians of Mich + */ + _138, + /** + * Lower Lake Rancheria, California + */ + _139, + /** + * Bear River Band of the Rohnerville Rancheria, Cali + */ + _14, + /** + * Los Coyotes Band of Cahuilla Mission Indians of th + */ + _140, + /** + * Lovelock Paiute Tribe of the Lovelock Indian Colon + */ + _141, + /** + * Lower Brule Sioux Tribe of the Lower Brule Reserva + */ + _142, + /** + * Lower Elwha Tribal Community of the Lower Elwha Re + */ + _143, + /** + * Lower Sioux Indian Community of Minnesota Mdewakan + */ + _144, + /** + * Lummi Tribe of the Lummi Reservation, Washington + */ + _145, + /** + * Lytton Rancheria of California + */ + _146, + /** + * Makah Indian Tribe of the Makah Indian Reservation + */ + _147, + /** + * Manchester Band of Pomo Indians of the Manchester- + */ + _148, + /** + * Manzanita Band of Diegueno Mission Indians of the + */ + _149, + /** + * Berry Creek Rancheria of Maidu Indians of Californ + */ + _15, + /** + * Mashantucket Pequot Tribe of Connecticut + */ + _150, + /** + * Match-e-be-nash-she-wish Band of Pottawatomi India + */ + _151, + /** + * Mechoopda Indian Tribe of Chico Rancheria, Califor + */ + _152, + /** + * Menominee Indian Tribe of Wisconsin + */ + _153, + /** + * Mesa Grande Band of Diegueno Mission Indians of th + */ + _154, + /** + * Mescalero Apache Tribe of the Mescalero Reservatio + */ + _155, + /** + * Miami Tribe of Oklahoma + */ + _156, + /** + * Miccosukee Tribe of Indians of Florida + */ + _157, + /** + * Middletown Rancheria of Pomo Indians of California + */ + _158, + /** + * Minnesota Chippewa Tribe, Minnesota (Six component + */ + _159, + /** + * Big Lagoon Rancheria, California + */ + _16, + /** + * Bois Forte Band (Nett Lake); Fond du Lac Band; Gra + */ + _160, + /** + * Mississippi Band of Choctaw Indians, Mississippi + */ + _161, + /** + * Moapa Band of Paiute Indians of the Moapa River In + */ + _162, + /** + * Modoc Tribe of Oklahoma + */ + _163, + /** + * Mohegan Indian Tribe of Connecticut + */ + _164, + /** + * Mooretown Rancheria of Maidu Indians of California + */ + _165, + /** + * Morongo Band of Cahuilla Mission Indians of the Mo + */ + _166, + /** + * Muckleshoot Indian Tribe of the Muckleshoot Reserv + */ + _167, + /** + * Muscogee (Creek) Nation, Oklahoma + */ + _168, + /** + * Narragansett Indian Tribe of Rhode Island + */ + _169, + /** + * Big Pine Band of Owens Valley Paiute Shoshone Indi + */ + _17, + /** + * Navajo Nation, Arizona, New Mexico & Utah + */ + _170, + /** + * Nez Perce Tribe of Idaho + */ + _171, + /** + * Nisqually Indian Tribe of the Nisqually Reservatio + */ + _172, + /** + * Nooksack Indian Tribe of Washington + */ + _173, + /** + * Northern Cheyenne Tribe of the Northern Cheyenne I + */ + _174, + /** + * Northfork Rancheria of Mono Indians of California + */ + _175, + /** + * Northwestern Band of Shoshoni Nation of Utah (Wash + */ + _176, + /** + * Oglala Sioux Tribe of the Pine Ridge Reservation, + */ + _177, + /** + * Omaha Tribe of Nebraska + */ + _178, + /** + * Oneida Nation of New York + */ + _179, + /** + * Big Sandy Rancheria of Mono Indians of California + */ + _18, + /** + * Oneida Tribe of Wisconsin + */ + _180, + /** + * Onondaga Nation of New York + */ + _181, + /** + * Osage Tribe, Oklahoma + */ + _182, + /** + * Ottawa Tribe of Oklahoma + */ + _183, + /** + * Otoe-Missouria Tribe of Indians, Oklahoma + */ + _184, + /** + * Paiute Indian Tribe of Utah + */ + _185, + /** + * Paiute-Shoshone Indians of the Bishop Community of + */ + _186, + /** + * Paiute-Shoshone Tribe of the Fallon Reservation an + */ + _187, + /** + * Paiute-Shoshone Indians of the Lone Pine Community + */ + _188, + /** + * Pala Band of Luiseno Mission Indians of the Pala R + */ + _189, + /** + * Big Valley Band of Pomo Indians of the Big Valley + */ + _19, + /** + * Pascua Yaqui Tribe of Arizona + */ + _190, + /** + * Paskenta Band of Nomlaki Indians of California + */ + _191, + /** + * Passamaquoddy Tribe of Maine + */ + _192, + /** + * Pauma Band of Luiseno Mission Indians of the Pauma + */ + _193, + /** + * Pawnee Nation of Oklahoma + */ + _194, + /** + * Pechanga Band of Luiseno Mission Indians of the Pe + */ + _195, + /** + * Penobscot Tribe of Maine + */ + _196, + /** + * Peoria Tribe of Indians of Oklahoma + */ + _197, + /** + * Picayune Rancheria of Chukchansi Indians of Califo + */ + _198, + /** + * Pinoleville Rancheria of Pomo Indians of Californi + */ + _199, + /** + * Agua Caliente Band of Cahuilla Indians of the Agua + */ + _2, + /** + * Blackfeet Tribe of the Blackfeet Indian Reservatio + */ + _20, + /** + * Pit River Tribe, California (includes Big Bend, Lo + */ + _200, + /** + * Poarch Band of Creek Indians of Alabama + */ + _201, + /** + * Pokagon Band of Potawatomi Indians of Michigan + */ + _202, + /** + * Ponca Tribe of Indians of Oklahoma + */ + _203, + /** + * Ponca Tribe of Nebraska + */ + _204, + /** + * Port Gamble Indian Community of the Port Gamble Re + */ + _205, + /** + * Potter Valley Rancheria of Pomo Indians of Califor + */ + _206, + /** + * Prairie Band of Potawatomi Indians, Kansas + */ + _207, + /** + * Prairie Island Indian Community of Minnesota Mdewa + */ + _208, + /** + * Pueblo of Acoma, New Mexico + */ + _209, + /** + * Blue Lake Rancheria, California + */ + _21, + /** + * Pueblo of Cochiti, New Mexico + */ + _210, + /** + * Pueblo of Jemez, New Mexico + */ + _211, + /** + * Pueblo of Isleta, New Mexico + */ + _212, + /** + * Pueblo of Laguna, New Mexico + */ + _213, + /** + * Pueblo of Nambe, New Mexico + */ + _214, + /** + * Pueblo of Picuris, New Mexico + */ + _215, + /** + * Pueblo of Pojoaque, New Mexico + */ + _216, + /** + * Pueblo of San Felipe, New Mexico + */ + _217, + /** + * Pueblo of San Juan, New Mexico + */ + _218, + /** + * Pueblo of San Ildefonso, New Mexico + */ + _219, + /** + * Bridgeport Paiute Indian Colony of California + */ + _22, + /** + * Pueblo of Sandia, New Mexico + */ + _220, + /** + * Pueblo of Santa Ana, New Mexico + */ + _221, + /** + * Pueblo of Santa Clara, New Mexico + */ + _222, + /** + * Pueblo of Santo Domingo, New Mexico + */ + _223, + /** + * Pueblo of Taos, New Mexico + */ + _224, + /** + * Pueblo of Tesuque, New Mexico + */ + _225, + /** + * Pueblo of Zia, New Mexico + */ + _226, + /** + * Puyallup Tribe of the Puyallup Reservation, Washin + */ + _227, + /** + * Pyramid Lake Paiute Tribe of the Pyramid Lake Rese + */ + _228, + /** + * Quapaw Tribe of Indians, Oklahoma + */ + _229, + /** + * Buena Vista Rancheria of Me-Wuk Indians of Califor + */ + _23, + /** + * Quartz Valley Indian Community of the Quartz Valle + */ + _230, + /** + * Quechan Tribe of the Fort Yuma Indian Reservation, + */ + _231, + /** + * Quileute Tribe of the Quileute Reservation, Washin + */ + _232, + /** + * Quinault Tribe of the Quinault Reservation, Washin + */ + _233, + /** + * Ramona Band or Village of Cahuilla Mission Indians + */ + _234, + /** + * Red Cliff Band of Lake Superior Chippewa Indians o + */ + _235, + /** + * Red Lake Band of Chippewa Indians of the Red Lake + */ + _236, + /** + * Redding Rancheria, California + */ + _237, + /** + * Redwood Valley Rancheria of Pomo Indians of Califo + */ + _238, + /** + * Reno-Sparks Indian Colony, Nevada + */ + _239, + /** + * Burns Paiute Tribe of the Burns Paiute Indian Colo + */ + _24, + /** + * Resighini Rancheria, California (formerly known as + */ + _240, + /** + * Rincon Band of Luiseno Mission Indians of the Rinc + */ + _241, + /** + * Robinson Rancheria of Pomo Indians of California + */ + _242, + /** + * Rosebud Sioux Tribe of the Rosebud Indian Reservat + */ + _243, + /** + * Round Valley Indian Tribes of the Round Valley Res + */ + _244, + /** + * Rumsey Indian Rancheria of Wintun Indians of Calif + */ + _245, + /** + * Sac and Fox Tribe of the Mississippi in Iowa + */ + _246, + /** + * Sac and Fox Nation of Missouri in Kansas and Nebra + */ + _247, + /** + * Sac and Fox Nation, Oklahoma + */ + _248, + /** + * Saginaw Chippewa Indian Tribe of Michigan, Isabell + */ + _249, + /** + * Cabazon Band of Cahuilla Mission Indians of the Ca + */ + _25, + /** + * Salt River Pima-Maricopa Indian Community of the S + */ + _250, + /** + * Samish Indian Tribe, Washington + */ + _251, + /** + * San Carlos Apache Tribe of the San Carlos Reservat + */ + _252, + /** + * San Juan Southern Paiute Tribe of Arizona + */ + _253, + /** + * San Manual Band of Serrano Mission Indians of the + */ + _254, + /** + * San Pasqual Band of Diegueno Mission Indians of Ca + */ + _255, + /** + * Santa Rosa Indian Community of the Santa Rosa Ranc + */ + _256, + /** + * Santa Rosa Band of Cahuilla Mission Indians of the + */ + _257, + /** + * Santa Ynez Band of Chumash Mission Indians of the + */ + _258, + /** + * Santa Ysabel Band of Diegueno Mission Indians of t + */ + _259, + /** + * Cachil DeHe Band of Wintun Indians of the Colusa I + */ + _26, + /** + * Santee Sioux Tribe of the Santee Reservation of Ne + */ + _260, + /** + * Sauk-Suiattle Indian Tribe of Washington + */ + _261, + /** + * Sault Ste. Marie Tribe of Chippewa Indians of Mich + */ + _262, + /** + * Scotts Valley Band of Pomo Indians of California + */ + _263, + /** + * Seminole Nation of Oklahoma + */ + _264, + /** + * Seminole Tribe of Florida, Dania, Big Cypress, Bri + */ + _265, + /** + * Seneca Nation of New York + */ + _266, + /** + * Seneca-Cayuga Tribe of Oklahoma + */ + _267, + /** + * Shakopee Mdewakanton Sioux Community of Minnesota + */ + _268, + /** + * Shawnee Tribe, Oklahoma + */ + _269, + /** + * Caddo Indian Tribe of Oklahoma + */ + _27, + /** + * Sherwood Valley Rancheria of Pomo Indians of Calif + */ + _270, + /** + * Shingle Springs Band of Miwok Indians, Shingle Spr + */ + _271, + /** + * Shoalwater Bay Tribe of the Shoalwater Bay Indian + */ + _272, + /** + * Shoshone Tribe of the Wind River Reservation, Wyom + */ + _273, + /** + * Shoshone-Bannock Tribes of the Fort Hall Reservati + */ + _274, + /** + * Shoshone-Paiute Tribes of the Duck Valley Reservat + */ + _275, + /** + * Sisseton-Wahpeton Sioux Tribe of the Lake Traverse + */ + _276, + /** + * Skokomish Indian Tribe of the Skokomish Reservatio + */ + _277, + /** + * Skull Valley Band of Goshute Indians of Utah + */ + _278, + /** + * Smith River Rancheria, California + */ + _279, + /** + * Cahuilla Band of Mission Indians of the Cahuilla R + */ + _28, + /** + * Snoqualmie Tribe, Washington + */ + _280, + /** + * Soboba Band of Luiseno Indians, California (former + */ + _281, + /** + * Sokaogon Chippewa Community of the Mole Lake Band + */ + _282, + /** + * Southern Ute Indian Tribe of the Southern Ute Rese + */ + _283, + /** + * Spirit Lake Tribe, North Dakota (formerly known as + */ + _284, + /** + * Spokane Tribe of the Spokane Reservation, Washingt + */ + _285, + /** + * Squaxin Island Tribe of the Squaxin Island Reserva + */ + _286, + /** + * St. Croix Chippewa Indians of Wisconsin, St. Croix + */ + _287, + /** + * St. Regis Band of Mohawk Indians of New York + */ + _288, + /** + * Standing Rock Sioux Tribe of North & South Dakota + */ + _289, + /** + * Cahto Indian Tribe of the Laytonville Rancheria, C + */ + _29, + /** + * Stockbridge-Munsee Community of Mohican Indians of + */ + _290, + /** + * Stillaguamish Tribe of Washington + */ + _291, + /** + * Summit Lake Paiute Tribe of Nevada + */ + _292, + /** + * Suquamish Indian Tribe of the Port Madison Reserva + */ + _293, + /** + * Susanville Indian Rancheria, California + */ + _294, + /** + * Swinomish Indians of the Swinomish Reservation, Wa + */ + _295, + /** + * Sycuan Band of Diegueno Mission Indians of Califor + */ + _296, + /** + * Table Bluff Reservation - Wiyot Tribe, California + */ + _297, + /** + * Table Mountain Rancheria of California + */ + _298, + /** + * Te-Moak Tribe of Western Shoshone Indians of Nevad + */ + _299, + /** + * Ak Chin Indian Community of the Maricopa (Ak Chin) + */ + _3, + /** + * California Valley Miwok Tribe, California (formerl + */ + _30, + /** + * Thlopthlocco Tribal Town, Oklahoma + */ + _300, + /** + * Three Affiliated Tribes of the Fort Berthold Reser + */ + _301, + /** + * Tohono O'odham Nation of Arizona + */ + _302, + /** + * Tonawanda Band of Seneca Indians of New York + */ + _303, + /** + * Tonkawa Tribe of Indians of Oklahoma + */ + _304, + /** + * Tonto Apache Tribe of Arizona + */ + _305, + /** + * Torres-Martinez Band of Cahuilla Mission Indians o + */ + _306, + /** + * Tule River Indian Tribe of the Tule River Reservat + */ + _307, + /** + * Tulalip Tribes of the Tulalip Reservation, Washing + */ + _308, + /** + * Tunica-Biloxi Indian Tribe of Louisiana + */ + _309, + /** + * Campo Band of Diegueno Mission Indians of the Camp + */ + _31, + /** + * Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra + */ + _310, + /** + * Turtle Mountain Band of Chippewa Indians of North + */ + _311, + /** + * Tuscarora Nation of New York + */ + _312, + /** + * Twenty-Nine Palms Band of Mission Indians of Calif + */ + _313, + /** + * United Auburn Indian Community of the Auburn Ranch + */ + _314, + /** + * United Keetoowah Band of Cherokee Indians of Oklah + */ + _315, + /** + * Upper Lake Band of Pomo Indians of Upper Lake Ranc + */ + _316, + /** + * Upper Sioux Indian Community of the Upper Sioux Re + */ + _317, + /** + * Upper Skagit Indian Tribe of Washington + */ + _318, + /** + * Ute Indian Tribe of the Uintah & Ouray Reservation + */ + _319, + /** + * Capitan Grande Band of Diegueno Mission Indians of + */ + _32, + /** + * Ute Mountain Tribe of the Ute Mountain Reservation + */ + _320, + /** + * Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R + */ + _321, + /** + * Walker River Paiute Tribe of the Walker River Rese + */ + _322, + /** + * Wampanoag Tribe of Gay Head (Aquinnah) of Massachu + */ + _323, + /** + * Washoe Tribe of Nevada & California (Carson Colony + */ + _324, + /** + * White Mountain Apache Tribe of the Fort Apache Res + */ + _325, + /** + * Wichita and Affiliated Tribes (Wichita, Keechi, Wa + */ + _326, + /** + * Winnebago Tribe of Nebraska + */ + _327, + /** + * Winnemucca Indian Colony of Nevada + */ + _328, + /** + * Wyandotte Tribe of Oklahoma + */ + _329, + /** + * Barona Group of Capitan Grande Band of Mission Ind + */ + _33, + /** + * Yankton Sioux Tribe of South Dakota + */ + _330, + /** + * Yavapai-Apache Nation of the Camp Verde Indian Res + */ + _331, + /** + * Yavapai-Prescott Tribe of the Yavapai Reservation, + */ + _332, + /** + * Yerington Paiute Tribe of the Yerington Colony & C + */ + _333, + /** + * Yomba Shoshone Tribe of the Yomba Reservation, Nev + */ + _334, + /** + * Ysleta Del Sur Pueblo of Texas + */ + _335, + /** + * Yurok Tribe of the Yurok Reservation, California + */ + _336, + /** + * Zuni Tribe of the Zuni Reservation, New Mexico + */ + _337, + /** + * Viejas (Baron Long) Group of Capitan Grande Band o + */ + _34, + /** + * Catawba Indian Nation (aka Catawba Tribe of South + */ + _35, + /** + * Cayuga Nation of New York + */ + _36, + /** + * Cedarville Rancheria, California + */ + _37, + /** + * Chemehuevi Indian Tribe of the Chemehuevi Reservat + */ + _38, + /** + * Cher-Ae Heights Indian Community of the Trinidad R + */ + _39, + /** + * Alabama-Coushatta Tribes of Texas + */ + _4, + /** + * Cherokee Nation, Oklahoma + */ + _40, + /** + * Cheyenne-Arapaho Tribes of Oklahoma + */ + _41, + /** + * Cheyenne River Sioux Tribe of the Cheyenne River R + */ + _42, + /** + * Chickasaw Nation, Oklahoma + */ + _43, + /** + * Chicken Ranch Rancheria of Me-Wuk Indians of Calif + */ + _44, + /** + * Chippewa-Cree Indians of the Rocky Boy's Reservati + */ + _45, + /** + * Chitimacha Tribe of Louisiana + */ + _46, + /** + * Choctaw Nation of Oklahoma + */ + _47, + /** + * Citizen Potawatomi Nation, Oklahoma + */ + _48, + /** + * Cloverdale Rancheria of Pomo Indians of California + */ + _49, + /** + * Alabama-Quassarte Tribal Town, Oklahoma + */ + _5, + /** + * Cocopah Tribe of Arizona + */ + _50, + /** + * Coeur D'Alene Tribe of the Coeur D'Alene Reservati + */ + _51, + /** + * Cold Springs Rancheria of Mono Indians of Californ + */ + _52, + /** + * Colorado River Indian Tribes of the Colorado River + */ + _53, + /** + * Comanche Indian Tribe, Oklahoma + */ + _54, + /** + * Confederated Salish & Kootenai Tribes of the Flath + */ + _55, + /** + * Confederated Tribes of the Chehalis Reservation, W + */ + _56, + /** + * Confederated Tribes of the Colville Reservation, W + */ + _57, + /** + * Confederated Tribes of the Coos, Lower Umpqua and + */ + _58, + /** + * Confederated Tribes of the Goshute Reservation, Ne + */ + _59, + /** + * Alturas Indian Rancheria, California + */ + _6, + /** + * Confederated Tribes of the Grand Ronde Community o + */ + _60, + /** + * Confederated Tribes of the Siletz Reservation, Ore + */ + _61, + /** + * Confederated Tribes of the Umatilla Reservation, O + */ + _62, + /** + * Confederated Tribes of the Warm Springs Reservatio + */ + _63, + /** + * Confederated Tribes and Bands of the Yakama Indian + */ + _64, + /** + * Coquille Tribe of Oregon + */ + _65, + /** + * Cortina Indian Rancheria of Wintun Indians of Cali + */ + _66, + /** + * Coushatta Tribe of Louisiana + */ + _67, + /** + * Cow Creek Band of Umpqua Indians of Oregon + */ + _68, + /** + * Coyote Valley Band of Pomo Indians of California + */ + _69, + /** + * Apache Tribe of Oklahoma + */ + _7, + /** + * Crow Tribe of Montana + */ + _70, + /** + * Crow Creek Sioux Tribe of the Crow Creek Reservati + */ + _71, + /** + * Cuyapaipe Community of Diegueno Mission Indians of + */ + _72, + /** + * Death Valley Timbi-Sha Shoshone Band of California + */ + _73, + /** + * Delaware Nation, Oklahoma (formerly Delaware Tribe + */ + _74, + /** + * Delaware Tribe of Indians, Oklahoma + */ + _75, + /** + * Dry Creek Rancheria of Pomo Indians of California + */ + _76, + /** + * Duckwater Shoshone Tribe of the Duckwater Reservat + */ + _77, + /** + * Eastern Band of Cherokee Indians of North Carolina + */ + _78, + /** + * Eastern Shawnee Tribe of Oklahoma + */ + _79, + /** + * Arapahoe Tribe of the Wind River Reservation, Wyom + */ + _8, + /** + * Elem Indian Colony of Pomo Indians of the Sulphur + */ + _80, + /** + * Elk Valley Rancheria, California + */ + _81, + /** + * Ely Shoshone Tribe of Nevada + */ + _82, + /** + * Enterprise Rancheria of Maidu Indians of Californi + */ + _83, + /** + * Flandreau Santee Sioux Tribe of South Dakota + */ + _84, + /** + * Forest County Potawatomi Community of Wisconsin Po + */ + _85, + /** + * Fort Belknap Indian Community of the Fort Belknap + */ + _86, + /** + * Fort Bidwell Indian Community of the Fort Bidwell + */ + _87, + /** + * Fort Independence Indian Community of Paiute India + */ + _88, + /** + * Fort McDermitt Paiute and Shoshone Tribes of the F + */ + _89, + /** + * Aroostook Band of Micmac Indians of Maine + */ + _9, + /** + * Fort McDowell Yavapai Nation, Arizona (formerly th + */ + _90, + /** + * Fort Mojave Indian Tribe of Arizona, California + */ + _91, + /** + * Fort Sill Apache Tribe of Oklahoma + */ + _92, + /** + * Gila River Indian Community of the Gila River Indi + */ + _93, + /** + * Grand Traverse Band of Ottawa & Chippewa Indians o + */ + _94, + /** + * Graton Rancheria, California + */ + _95, + /** + * Greenville Rancheria of Maidu Indians of Californi + */ + _96, + /** + * Grindstone Indian Rancheria of Wintun-Wailaki Indi + */ + _97, + /** + * Guidiville Rancheria of California + */ + _98, + /** + * Hannahville Indian Community of Wisconsin Potawato + */ + _99, + /** + * added to help the parsers + */ + NULL; + public static V3TribalEntityUS fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NativeEntityAlaska".equals(codeString)) + return _NATIVEENTITYALASKA; + if ("338".equals(codeString)) + return _338; + if ("339".equals(codeString)) + return _339; + if ("340".equals(codeString)) + return _340; + if ("341".equals(codeString)) + return _341; + if ("342".equals(codeString)) + return _342; + if ("343".equals(codeString)) + return _343; + if ("344".equals(codeString)) + return _344; + if ("345".equals(codeString)) + return _345; + if ("346".equals(codeString)) + return _346; + if ("347".equals(codeString)) + return _347; + if ("348".equals(codeString)) + return _348; + if ("349".equals(codeString)) + return _349; + if ("350".equals(codeString)) + return _350; + if ("351".equals(codeString)) + return _351; + if ("352".equals(codeString)) + return _352; + if ("353".equals(codeString)) + return _353; + if ("354".equals(codeString)) + return _354; + if ("355".equals(codeString)) + return _355; + if ("356".equals(codeString)) + return _356; + if ("357".equals(codeString)) + return _357; + if ("358".equals(codeString)) + return _358; + if ("359".equals(codeString)) + return _359; + if ("360".equals(codeString)) + return _360; + if ("361".equals(codeString)) + return _361; + if ("362".equals(codeString)) + return _362; + if ("363".equals(codeString)) + return _363; + if ("364".equals(codeString)) + return _364; + if ("365".equals(codeString)) + return _365; + if ("366".equals(codeString)) + return _366; + if ("367".equals(codeString)) + return _367; + if ("368".equals(codeString)) + return _368; + if ("369".equals(codeString)) + return _369; + if ("370".equals(codeString)) + return _370; + if ("371".equals(codeString)) + return _371; + if ("372".equals(codeString)) + return _372; + if ("373".equals(codeString)) + return _373; + if ("374".equals(codeString)) + return _374; + if ("375".equals(codeString)) + return _375; + if ("376".equals(codeString)) + return _376; + if ("377".equals(codeString)) + return _377; + if ("378".equals(codeString)) + return _378; + if ("379".equals(codeString)) + return _379; + if ("380".equals(codeString)) + return _380; + if ("381".equals(codeString)) + return _381; + if ("382".equals(codeString)) + return _382; + if ("383".equals(codeString)) + return _383; + if ("384".equals(codeString)) + return _384; + if ("385".equals(codeString)) + return _385; + if ("386".equals(codeString)) + return _386; + if ("387".equals(codeString)) + return _387; + if ("388".equals(codeString)) + return _388; + if ("389".equals(codeString)) + return _389; + if ("390".equals(codeString)) + return _390; + if ("391".equals(codeString)) + return _391; + if ("392".equals(codeString)) + return _392; + if ("393".equals(codeString)) + return _393; + if ("394".equals(codeString)) + return _394; + if ("395".equals(codeString)) + return _395; + if ("396".equals(codeString)) + return _396; + if ("397".equals(codeString)) + return _397; + if ("398".equals(codeString)) + return _398; + if ("399".equals(codeString)) + return _399; + if ("400".equals(codeString)) + return _400; + if ("401".equals(codeString)) + return _401; + if ("402".equals(codeString)) + return _402; + if ("403".equals(codeString)) + return _403; + if ("404".equals(codeString)) + return _404; + if ("405".equals(codeString)) + return _405; + if ("406".equals(codeString)) + return _406; + if ("407".equals(codeString)) + return _407; + if ("408".equals(codeString)) + return _408; + if ("409".equals(codeString)) + return _409; + if ("410".equals(codeString)) + return _410; + if ("411".equals(codeString)) + return _411; + if ("412".equals(codeString)) + return _412; + if ("413".equals(codeString)) + return _413; + if ("414".equals(codeString)) + return _414; + if ("415".equals(codeString)) + return _415; + if ("416".equals(codeString)) + return _416; + if ("417".equals(codeString)) + return _417; + if ("418".equals(codeString)) + return _418; + if ("419".equals(codeString)) + return _419; + if ("420".equals(codeString)) + return _420; + if ("421".equals(codeString)) + return _421; + if ("422".equals(codeString)) + return _422; + if ("423".equals(codeString)) + return _423; + if ("424".equals(codeString)) + return _424; + if ("425".equals(codeString)) + return _425; + if ("426".equals(codeString)) + return _426; + if ("427".equals(codeString)) + return _427; + if ("428".equals(codeString)) + return _428; + if ("429".equals(codeString)) + return _429; + if ("430".equals(codeString)) + return _430; + if ("431".equals(codeString)) + return _431; + if ("432".equals(codeString)) + return _432; + if ("433".equals(codeString)) + return _433; + if ("434".equals(codeString)) + return _434; + if ("435".equals(codeString)) + return _435; + if ("436".equals(codeString)) + return _436; + if ("437".equals(codeString)) + return _437; + if ("438".equals(codeString)) + return _438; + if ("439".equals(codeString)) + return _439; + if ("440".equals(codeString)) + return _440; + if ("441".equals(codeString)) + return _441; + if ("442".equals(codeString)) + return _442; + if ("443".equals(codeString)) + return _443; + if ("444".equals(codeString)) + return _444; + if ("445".equals(codeString)) + return _445; + if ("446".equals(codeString)) + return _446; + if ("447".equals(codeString)) + return _447; + if ("448".equals(codeString)) + return _448; + if ("449".equals(codeString)) + return _449; + if ("450".equals(codeString)) + return _450; + if ("451".equals(codeString)) + return _451; + if ("452".equals(codeString)) + return _452; + if ("453".equals(codeString)) + return _453; + if ("454".equals(codeString)) + return _454; + if ("455".equals(codeString)) + return _455; + if ("456".equals(codeString)) + return _456; + if ("457".equals(codeString)) + return _457; + if ("458".equals(codeString)) + return _458; + if ("459".equals(codeString)) + return _459; + if ("460".equals(codeString)) + return _460; + if ("461".equals(codeString)) + return _461; + if ("462".equals(codeString)) + return _462; + if ("463".equals(codeString)) + return _463; + if ("464".equals(codeString)) + return _464; + if ("465".equals(codeString)) + return _465; + if ("466".equals(codeString)) + return _466; + if ("467".equals(codeString)) + return _467; + if ("468".equals(codeString)) + return _468; + if ("469".equals(codeString)) + return _469; + if ("470".equals(codeString)) + return _470; + if ("471".equals(codeString)) + return _471; + if ("472".equals(codeString)) + return _472; + if ("473".equals(codeString)) + return _473; + if ("474".equals(codeString)) + return _474; + if ("475".equals(codeString)) + return _475; + if ("476".equals(codeString)) + return _476; + if ("477".equals(codeString)) + return _477; + if ("478".equals(codeString)) + return _478; + if ("479".equals(codeString)) + return _479; + if ("480".equals(codeString)) + return _480; + if ("481".equals(codeString)) + return _481; + if ("482".equals(codeString)) + return _482; + if ("483".equals(codeString)) + return _483; + if ("484".equals(codeString)) + return _484; + if ("485".equals(codeString)) + return _485; + if ("486".equals(codeString)) + return _486; + if ("487".equals(codeString)) + return _487; + if ("488".equals(codeString)) + return _488; + if ("489".equals(codeString)) + return _489; + if ("490".equals(codeString)) + return _490; + if ("491".equals(codeString)) + return _491; + if ("492".equals(codeString)) + return _492; + if ("493".equals(codeString)) + return _493; + if ("494".equals(codeString)) + return _494; + if ("495".equals(codeString)) + return _495; + if ("496".equals(codeString)) + return _496; + if ("497".equals(codeString)) + return _497; + if ("498".equals(codeString)) + return _498; + if ("499".equals(codeString)) + return _499; + if ("500".equals(codeString)) + return _500; + if ("501".equals(codeString)) + return _501; + if ("502".equals(codeString)) + return _502; + if ("503".equals(codeString)) + return _503; + if ("504".equals(codeString)) + return _504; + if ("505".equals(codeString)) + return _505; + if ("506".equals(codeString)) + return _506; + if ("507".equals(codeString)) + return _507; + if ("508".equals(codeString)) + return _508; + if ("509".equals(codeString)) + return _509; + if ("510".equals(codeString)) + return _510; + if ("511".equals(codeString)) + return _511; + if ("512".equals(codeString)) + return _512; + if ("513".equals(codeString)) + return _513; + if ("514".equals(codeString)) + return _514; + if ("515".equals(codeString)) + return _515; + if ("516".equals(codeString)) + return _516; + if ("517".equals(codeString)) + return _517; + if ("518".equals(codeString)) + return _518; + if ("519".equals(codeString)) + return _519; + if ("520".equals(codeString)) + return _520; + if ("521".equals(codeString)) + return _521; + if ("522".equals(codeString)) + return _522; + if ("523".equals(codeString)) + return _523; + if ("524".equals(codeString)) + return _524; + if ("525".equals(codeString)) + return _525; + if ("526".equals(codeString)) + return _526; + if ("527".equals(codeString)) + return _527; + if ("528".equals(codeString)) + return _528; + if ("529".equals(codeString)) + return _529; + if ("530".equals(codeString)) + return _530; + if ("531".equals(codeString)) + return _531; + if ("532".equals(codeString)) + return _532; + if ("533".equals(codeString)) + return _533; + if ("534".equals(codeString)) + return _534; + if ("535".equals(codeString)) + return _535; + if ("536".equals(codeString)) + return _536; + if ("537".equals(codeString)) + return _537; + if ("538".equals(codeString)) + return _538; + if ("539".equals(codeString)) + return _539; + if ("540".equals(codeString)) + return _540; + if ("541".equals(codeString)) + return _541; + if ("542".equals(codeString)) + return _542; + if ("543".equals(codeString)) + return _543; + if ("544".equals(codeString)) + return _544; + if ("545".equals(codeString)) + return _545; + if ("546".equals(codeString)) + return _546; + if ("547".equals(codeString)) + return _547; + if ("548".equals(codeString)) + return _548; + if ("549".equals(codeString)) + return _549; + if ("550".equals(codeString)) + return _550; + if ("551".equals(codeString)) + return _551; + if ("552".equals(codeString)) + return _552; + if ("553".equals(codeString)) + return _553; + if ("554".equals(codeString)) + return _554; + if ("555".equals(codeString)) + return _555; + if ("556".equals(codeString)) + return _556; + if ("557".equals(codeString)) + return _557; + if ("558".equals(codeString)) + return _558; + if ("559".equals(codeString)) + return _559; + if ("560".equals(codeString)) + return _560; + if ("561".equals(codeString)) + return _561; + if ("562".equals(codeString)) + return _562; + if ("563".equals(codeString)) + return _563; + if ("564".equals(codeString)) + return _564; + if ("565".equals(codeString)) + return _565; + if ("566".equals(codeString)) + return _566; + if ("_NativeEntityContiguous".equals(codeString)) + return _NATIVEENTITYCONTIGUOUS; + if ("1".equals(codeString)) + return _1; + if ("10".equals(codeString)) + return _10; + if ("100".equals(codeString)) + return _100; + if ("101".equals(codeString)) + return _101; + if ("102".equals(codeString)) + return _102; + if ("103".equals(codeString)) + return _103; + if ("104".equals(codeString)) + return _104; + if ("105".equals(codeString)) + return _105; + if ("106".equals(codeString)) + return _106; + if ("107".equals(codeString)) + return _107; + if ("108".equals(codeString)) + return _108; + if ("109".equals(codeString)) + return _109; + if ("11".equals(codeString)) + return _11; + if ("110".equals(codeString)) + return _110; + if ("111".equals(codeString)) + return _111; + if ("112".equals(codeString)) + return _112; + if ("113".equals(codeString)) + return _113; + if ("114".equals(codeString)) + return _114; + if ("115".equals(codeString)) + return _115; + if ("116".equals(codeString)) + return _116; + if ("117".equals(codeString)) + return _117; + if ("118".equals(codeString)) + return _118; + if ("119".equals(codeString)) + return _119; + if ("12".equals(codeString)) + return _12; + if ("120".equals(codeString)) + return _120; + if ("121".equals(codeString)) + return _121; + if ("122".equals(codeString)) + return _122; + if ("123".equals(codeString)) + return _123; + if ("124".equals(codeString)) + return _124; + if ("125".equals(codeString)) + return _125; + if ("126".equals(codeString)) + return _126; + if ("127".equals(codeString)) + return _127; + if ("128".equals(codeString)) + return _128; + if ("129".equals(codeString)) + return _129; + if ("13".equals(codeString)) + return _13; + if ("130".equals(codeString)) + return _130; + if ("131".equals(codeString)) + return _131; + if ("132".equals(codeString)) + return _132; + if ("133".equals(codeString)) + return _133; + if ("134".equals(codeString)) + return _134; + if ("135".equals(codeString)) + return _135; + if ("136".equals(codeString)) + return _136; + if ("137".equals(codeString)) + return _137; + if ("138".equals(codeString)) + return _138; + if ("139".equals(codeString)) + return _139; + if ("14".equals(codeString)) + return _14; + if ("140".equals(codeString)) + return _140; + if ("141".equals(codeString)) + return _141; + if ("142".equals(codeString)) + return _142; + if ("143".equals(codeString)) + return _143; + if ("144".equals(codeString)) + return _144; + if ("145".equals(codeString)) + return _145; + if ("146".equals(codeString)) + return _146; + if ("147".equals(codeString)) + return _147; + if ("148".equals(codeString)) + return _148; + if ("149".equals(codeString)) + return _149; + if ("15".equals(codeString)) + return _15; + if ("150".equals(codeString)) + return _150; + if ("151".equals(codeString)) + return _151; + if ("152".equals(codeString)) + return _152; + if ("153".equals(codeString)) + return _153; + if ("154".equals(codeString)) + return _154; + if ("155".equals(codeString)) + return _155; + if ("156".equals(codeString)) + return _156; + if ("157".equals(codeString)) + return _157; + if ("158".equals(codeString)) + return _158; + if ("159".equals(codeString)) + return _159; + if ("16".equals(codeString)) + return _16; + if ("160".equals(codeString)) + return _160; + if ("161".equals(codeString)) + return _161; + if ("162".equals(codeString)) + return _162; + if ("163".equals(codeString)) + return _163; + if ("164".equals(codeString)) + return _164; + if ("165".equals(codeString)) + return _165; + if ("166".equals(codeString)) + return _166; + if ("167".equals(codeString)) + return _167; + if ("168".equals(codeString)) + return _168; + if ("169".equals(codeString)) + return _169; + if ("17".equals(codeString)) + return _17; + if ("170".equals(codeString)) + return _170; + if ("171".equals(codeString)) + return _171; + if ("172".equals(codeString)) + return _172; + if ("173".equals(codeString)) + return _173; + if ("174".equals(codeString)) + return _174; + if ("175".equals(codeString)) + return _175; + if ("176".equals(codeString)) + return _176; + if ("177".equals(codeString)) + return _177; + if ("178".equals(codeString)) + return _178; + if ("179".equals(codeString)) + return _179; + if ("18".equals(codeString)) + return _18; + if ("180".equals(codeString)) + return _180; + if ("181".equals(codeString)) + return _181; + if ("182".equals(codeString)) + return _182; + if ("183".equals(codeString)) + return _183; + if ("184".equals(codeString)) + return _184; + if ("185".equals(codeString)) + return _185; + if ("186".equals(codeString)) + return _186; + if ("187".equals(codeString)) + return _187; + if ("188".equals(codeString)) + return _188; + if ("189".equals(codeString)) + return _189; + if ("19".equals(codeString)) + return _19; + if ("190".equals(codeString)) + return _190; + if ("191".equals(codeString)) + return _191; + if ("192".equals(codeString)) + return _192; + if ("193".equals(codeString)) + return _193; + if ("194".equals(codeString)) + return _194; + if ("195".equals(codeString)) + return _195; + if ("196".equals(codeString)) + return _196; + if ("197".equals(codeString)) + return _197; + if ("198".equals(codeString)) + return _198; + if ("199".equals(codeString)) + return _199; + if ("2".equals(codeString)) + return _2; + if ("20".equals(codeString)) + return _20; + if ("200".equals(codeString)) + return _200; + if ("201".equals(codeString)) + return _201; + if ("202".equals(codeString)) + return _202; + if ("203".equals(codeString)) + return _203; + if ("204".equals(codeString)) + return _204; + if ("205".equals(codeString)) + return _205; + if ("206".equals(codeString)) + return _206; + if ("207".equals(codeString)) + return _207; + if ("208".equals(codeString)) + return _208; + if ("209".equals(codeString)) + return _209; + if ("21".equals(codeString)) + return _21; + if ("210".equals(codeString)) + return _210; + if ("211".equals(codeString)) + return _211; + if ("212".equals(codeString)) + return _212; + if ("213".equals(codeString)) + return _213; + if ("214".equals(codeString)) + return _214; + if ("215".equals(codeString)) + return _215; + if ("216".equals(codeString)) + return _216; + if ("217".equals(codeString)) + return _217; + if ("218".equals(codeString)) + return _218; + if ("219".equals(codeString)) + return _219; + if ("22".equals(codeString)) + return _22; + if ("220".equals(codeString)) + return _220; + if ("221".equals(codeString)) + return _221; + if ("222".equals(codeString)) + return _222; + if ("223".equals(codeString)) + return _223; + if ("224".equals(codeString)) + return _224; + if ("225".equals(codeString)) + return _225; + if ("226".equals(codeString)) + return _226; + if ("227".equals(codeString)) + return _227; + if ("228".equals(codeString)) + return _228; + if ("229".equals(codeString)) + return _229; + if ("23".equals(codeString)) + return _23; + if ("230".equals(codeString)) + return _230; + if ("231".equals(codeString)) + return _231; + if ("232".equals(codeString)) + return _232; + if ("233".equals(codeString)) + return _233; + if ("234".equals(codeString)) + return _234; + if ("235".equals(codeString)) + return _235; + if ("236".equals(codeString)) + return _236; + if ("237".equals(codeString)) + return _237; + if ("238".equals(codeString)) + return _238; + if ("239".equals(codeString)) + return _239; + if ("24".equals(codeString)) + return _24; + if ("240".equals(codeString)) + return _240; + if ("241".equals(codeString)) + return _241; + if ("242".equals(codeString)) + return _242; + if ("243".equals(codeString)) + return _243; + if ("244".equals(codeString)) + return _244; + if ("245".equals(codeString)) + return _245; + if ("246".equals(codeString)) + return _246; + if ("247".equals(codeString)) + return _247; + if ("248".equals(codeString)) + return _248; + if ("249".equals(codeString)) + return _249; + if ("25".equals(codeString)) + return _25; + if ("250".equals(codeString)) + return _250; + if ("251".equals(codeString)) + return _251; + if ("252".equals(codeString)) + return _252; + if ("253".equals(codeString)) + return _253; + if ("254".equals(codeString)) + return _254; + if ("255".equals(codeString)) + return _255; + if ("256".equals(codeString)) + return _256; + if ("257".equals(codeString)) + return _257; + if ("258".equals(codeString)) + return _258; + if ("259".equals(codeString)) + return _259; + if ("26".equals(codeString)) + return _26; + if ("260".equals(codeString)) + return _260; + if ("261".equals(codeString)) + return _261; + if ("262".equals(codeString)) + return _262; + if ("263".equals(codeString)) + return _263; + if ("264".equals(codeString)) + return _264; + if ("265".equals(codeString)) + return _265; + if ("266".equals(codeString)) + return _266; + if ("267".equals(codeString)) + return _267; + if ("268".equals(codeString)) + return _268; + if ("269".equals(codeString)) + return _269; + if ("27".equals(codeString)) + return _27; + if ("270".equals(codeString)) + return _270; + if ("271".equals(codeString)) + return _271; + if ("272".equals(codeString)) + return _272; + if ("273".equals(codeString)) + return _273; + if ("274".equals(codeString)) + return _274; + if ("275".equals(codeString)) + return _275; + if ("276".equals(codeString)) + return _276; + if ("277".equals(codeString)) + return _277; + if ("278".equals(codeString)) + return _278; + if ("279".equals(codeString)) + return _279; + if ("28".equals(codeString)) + return _28; + if ("280".equals(codeString)) + return _280; + if ("281".equals(codeString)) + return _281; + if ("282".equals(codeString)) + return _282; + if ("283".equals(codeString)) + return _283; + if ("284".equals(codeString)) + return _284; + if ("285".equals(codeString)) + return _285; + if ("286".equals(codeString)) + return _286; + if ("287".equals(codeString)) + return _287; + if ("288".equals(codeString)) + return _288; + if ("289".equals(codeString)) + return _289; + if ("29".equals(codeString)) + return _29; + if ("290".equals(codeString)) + return _290; + if ("291".equals(codeString)) + return _291; + if ("292".equals(codeString)) + return _292; + if ("293".equals(codeString)) + return _293; + if ("294".equals(codeString)) + return _294; + if ("295".equals(codeString)) + return _295; + if ("296".equals(codeString)) + return _296; + if ("297".equals(codeString)) + return _297; + if ("298".equals(codeString)) + return _298; + if ("299".equals(codeString)) + return _299; + if ("3".equals(codeString)) + return _3; + if ("30".equals(codeString)) + return _30; + if ("300".equals(codeString)) + return _300; + if ("301".equals(codeString)) + return _301; + if ("302".equals(codeString)) + return _302; + if ("303".equals(codeString)) + return _303; + if ("304".equals(codeString)) + return _304; + if ("305".equals(codeString)) + return _305; + if ("306".equals(codeString)) + return _306; + if ("307".equals(codeString)) + return _307; + if ("308".equals(codeString)) + return _308; + if ("309".equals(codeString)) + return _309; + if ("31".equals(codeString)) + return _31; + if ("310".equals(codeString)) + return _310; + if ("311".equals(codeString)) + return _311; + if ("312".equals(codeString)) + return _312; + if ("313".equals(codeString)) + return _313; + if ("314".equals(codeString)) + return _314; + if ("315".equals(codeString)) + return _315; + if ("316".equals(codeString)) + return _316; + if ("317".equals(codeString)) + return _317; + if ("318".equals(codeString)) + return _318; + if ("319".equals(codeString)) + return _319; + if ("32".equals(codeString)) + return _32; + if ("320".equals(codeString)) + return _320; + if ("321".equals(codeString)) + return _321; + if ("322".equals(codeString)) + return _322; + if ("323".equals(codeString)) + return _323; + if ("324".equals(codeString)) + return _324; + if ("325".equals(codeString)) + return _325; + if ("326".equals(codeString)) + return _326; + if ("327".equals(codeString)) + return _327; + if ("328".equals(codeString)) + return _328; + if ("329".equals(codeString)) + return _329; + if ("33".equals(codeString)) + return _33; + if ("330".equals(codeString)) + return _330; + if ("331".equals(codeString)) + return _331; + if ("332".equals(codeString)) + return _332; + if ("333".equals(codeString)) + return _333; + if ("334".equals(codeString)) + return _334; + if ("335".equals(codeString)) + return _335; + if ("336".equals(codeString)) + return _336; + if ("337".equals(codeString)) + return _337; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("39".equals(codeString)) + return _39; + if ("4".equals(codeString)) + return _4; + if ("40".equals(codeString)) + return _40; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + if ("49".equals(codeString)) + return _49; + if ("5".equals(codeString)) + return _5; + if ("50".equals(codeString)) + return _50; + if ("51".equals(codeString)) + return _51; + if ("52".equals(codeString)) + return _52; + if ("53".equals(codeString)) + return _53; + if ("54".equals(codeString)) + return _54; + if ("55".equals(codeString)) + return _55; + if ("56".equals(codeString)) + return _56; + if ("57".equals(codeString)) + return _57; + if ("58".equals(codeString)) + return _58; + if ("59".equals(codeString)) + return _59; + if ("6".equals(codeString)) + return _6; + if ("60".equals(codeString)) + return _60; + if ("61".equals(codeString)) + return _61; + if ("62".equals(codeString)) + return _62; + if ("63".equals(codeString)) + return _63; + if ("64".equals(codeString)) + return _64; + if ("65".equals(codeString)) + return _65; + if ("66".equals(codeString)) + return _66; + if ("67".equals(codeString)) + return _67; + if ("68".equals(codeString)) + return _68; + if ("69".equals(codeString)) + return _69; + if ("7".equals(codeString)) + return _7; + if ("70".equals(codeString)) + return _70; + if ("71".equals(codeString)) + return _71; + if ("72".equals(codeString)) + return _72; + if ("73".equals(codeString)) + return _73; + if ("74".equals(codeString)) + return _74; + if ("75".equals(codeString)) + return _75; + if ("76".equals(codeString)) + return _76; + if ("77".equals(codeString)) + return _77; + if ("78".equals(codeString)) + return _78; + if ("79".equals(codeString)) + return _79; + if ("8".equals(codeString)) + return _8; + if ("80".equals(codeString)) + return _80; + if ("81".equals(codeString)) + return _81; + if ("82".equals(codeString)) + return _82; + if ("83".equals(codeString)) + return _83; + if ("84".equals(codeString)) + return _84; + if ("85".equals(codeString)) + return _85; + if ("86".equals(codeString)) + return _86; + if ("87".equals(codeString)) + return _87; + if ("88".equals(codeString)) + return _88; + if ("89".equals(codeString)) + return _89; + if ("9".equals(codeString)) + return _9; + if ("90".equals(codeString)) + return _90; + if ("91".equals(codeString)) + return _91; + if ("92".equals(codeString)) + return _92; + if ("93".equals(codeString)) + return _93; + if ("94".equals(codeString)) + return _94; + if ("95".equals(codeString)) + return _95; + if ("96".equals(codeString)) + return _96; + if ("97".equals(codeString)) + return _97; + if ("98".equals(codeString)) + return _98; + if ("99".equals(codeString)) + return _99; + throw new FHIRException("Unknown V3TribalEntityUS code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _NATIVEENTITYALASKA: return "_NativeEntityAlaska"; + case _338: return "338"; + case _339: return "339"; + case _340: return "340"; + case _341: return "341"; + case _342: return "342"; + case _343: return "343"; + case _344: return "344"; + case _345: return "345"; + case _346: return "346"; + case _347: return "347"; + case _348: return "348"; + case _349: return "349"; + case _350: return "350"; + case _351: return "351"; + case _352: return "352"; + case _353: return "353"; + case _354: return "354"; + case _355: return "355"; + case _356: return "356"; + case _357: return "357"; + case _358: return "358"; + case _359: return "359"; + case _360: return "360"; + case _361: return "361"; + case _362: return "362"; + case _363: return "363"; + case _364: return "364"; + case _365: return "365"; + case _366: return "366"; + case _367: return "367"; + case _368: return "368"; + case _369: return "369"; + case _370: return "370"; + case _371: return "371"; + case _372: return "372"; + case _373: return "373"; + case _374: return "374"; + case _375: return "375"; + case _376: return "376"; + case _377: return "377"; + case _378: return "378"; + case _379: return "379"; + case _380: return "380"; + case _381: return "381"; + case _382: return "382"; + case _383: return "383"; + case _384: return "384"; + case _385: return "385"; + case _386: return "386"; + case _387: return "387"; + case _388: return "388"; + case _389: return "389"; + case _390: return "390"; + case _391: return "391"; + case _392: return "392"; + case _393: return "393"; + case _394: return "394"; + case _395: return "395"; + case _396: return "396"; + case _397: return "397"; + case _398: return "398"; + case _399: return "399"; + case _400: return "400"; + case _401: return "401"; + case _402: return "402"; + case _403: return "403"; + case _404: return "404"; + case _405: return "405"; + case _406: return "406"; + case _407: return "407"; + case _408: return "408"; + case _409: return "409"; + case _410: return "410"; + case _411: return "411"; + case _412: return "412"; + case _413: return "413"; + case _414: return "414"; + case _415: return "415"; + case _416: return "416"; + case _417: return "417"; + case _418: return "418"; + case _419: return "419"; + case _420: return "420"; + case _421: return "421"; + case _422: return "422"; + case _423: return "423"; + case _424: return "424"; + case _425: return "425"; + case _426: return "426"; + case _427: return "427"; + case _428: return "428"; + case _429: return "429"; + case _430: return "430"; + case _431: return "431"; + case _432: return "432"; + case _433: return "433"; + case _434: return "434"; + case _435: return "435"; + case _436: return "436"; + case _437: return "437"; + case _438: return "438"; + case _439: return "439"; + case _440: return "440"; + case _441: return "441"; + case _442: return "442"; + case _443: return "443"; + case _444: return "444"; + case _445: return "445"; + case _446: return "446"; + case _447: return "447"; + case _448: return "448"; + case _449: return "449"; + case _450: return "450"; + case _451: return "451"; + case _452: return "452"; + case _453: return "453"; + case _454: return "454"; + case _455: return "455"; + case _456: return "456"; + case _457: return "457"; + case _458: return "458"; + case _459: return "459"; + case _460: return "460"; + case _461: return "461"; + case _462: return "462"; + case _463: return "463"; + case _464: return "464"; + case _465: return "465"; + case _466: return "466"; + case _467: return "467"; + case _468: return "468"; + case _469: return "469"; + case _470: return "470"; + case _471: return "471"; + case _472: return "472"; + case _473: return "473"; + case _474: return "474"; + case _475: return "475"; + case _476: return "476"; + case _477: return "477"; + case _478: return "478"; + case _479: return "479"; + case _480: return "480"; + case _481: return "481"; + case _482: return "482"; + case _483: return "483"; + case _484: return "484"; + case _485: return "485"; + case _486: return "486"; + case _487: return "487"; + case _488: return "488"; + case _489: return "489"; + case _490: return "490"; + case _491: return "491"; + case _492: return "492"; + case _493: return "493"; + case _494: return "494"; + case _495: return "495"; + case _496: return "496"; + case _497: return "497"; + case _498: return "498"; + case _499: return "499"; + case _500: return "500"; + case _501: return "501"; + case _502: return "502"; + case _503: return "503"; + case _504: return "504"; + case _505: return "505"; + case _506: return "506"; + case _507: return "507"; + case _508: return "508"; + case _509: return "509"; + case _510: return "510"; + case _511: return "511"; + case _512: return "512"; + case _513: return "513"; + case _514: return "514"; + case _515: return "515"; + case _516: return "516"; + case _517: return "517"; + case _518: return "518"; + case _519: return "519"; + case _520: return "520"; + case _521: return "521"; + case _522: return "522"; + case _523: return "523"; + case _524: return "524"; + case _525: return "525"; + case _526: return "526"; + case _527: return "527"; + case _528: return "528"; + case _529: return "529"; + case _530: return "530"; + case _531: return "531"; + case _532: return "532"; + case _533: return "533"; + case _534: return "534"; + case _535: return "535"; + case _536: return "536"; + case _537: return "537"; + case _538: return "538"; + case _539: return "539"; + case _540: return "540"; + case _541: return "541"; + case _542: return "542"; + case _543: return "543"; + case _544: return "544"; + case _545: return "545"; + case _546: return "546"; + case _547: return "547"; + case _548: return "548"; + case _549: return "549"; + case _550: return "550"; + case _551: return "551"; + case _552: return "552"; + case _553: return "553"; + case _554: return "554"; + case _555: return "555"; + case _556: return "556"; + case _557: return "557"; + case _558: return "558"; + case _559: return "559"; + case _560: return "560"; + case _561: return "561"; + case _562: return "562"; + case _563: return "563"; + case _564: return "564"; + case _565: return "565"; + case _566: return "566"; + case _NATIVEENTITYCONTIGUOUS: return "_NativeEntityContiguous"; + case _1: return "1"; + case _10: return "10"; + case _100: return "100"; + case _101: return "101"; + case _102: return "102"; + case _103: return "103"; + case _104: return "104"; + case _105: return "105"; + case _106: return "106"; + case _107: return "107"; + case _108: return "108"; + case _109: return "109"; + case _11: return "11"; + case _110: return "110"; + case _111: return "111"; + case _112: return "112"; + case _113: return "113"; + case _114: return "114"; + case _115: return "115"; + case _116: return "116"; + case _117: return "117"; + case _118: return "118"; + case _119: return "119"; + case _12: return "12"; + case _120: return "120"; + case _121: return "121"; + case _122: return "122"; + case _123: return "123"; + case _124: return "124"; + case _125: return "125"; + case _126: return "126"; + case _127: return "127"; + case _128: return "128"; + case _129: return "129"; + case _13: return "13"; + case _130: return "130"; + case _131: return "131"; + case _132: return "132"; + case _133: return "133"; + case _134: return "134"; + case _135: return "135"; + case _136: return "136"; + case _137: return "137"; + case _138: return "138"; + case _139: return "139"; + case _14: return "14"; + case _140: return "140"; + case _141: return "141"; + case _142: return "142"; + case _143: return "143"; + case _144: return "144"; + case _145: return "145"; + case _146: return "146"; + case _147: return "147"; + case _148: return "148"; + case _149: return "149"; + case _15: return "15"; + case _150: return "150"; + case _151: return "151"; + case _152: return "152"; + case _153: return "153"; + case _154: return "154"; + case _155: return "155"; + case _156: return "156"; + case _157: return "157"; + case _158: return "158"; + case _159: return "159"; + case _16: return "16"; + case _160: return "160"; + case _161: return "161"; + case _162: return "162"; + case _163: return "163"; + case _164: return "164"; + case _165: return "165"; + case _166: return "166"; + case _167: return "167"; + case _168: return "168"; + case _169: return "169"; + case _17: return "17"; + case _170: return "170"; + case _171: return "171"; + case _172: return "172"; + case _173: return "173"; + case _174: return "174"; + case _175: return "175"; + case _176: return "176"; + case _177: return "177"; + case _178: return "178"; + case _179: return "179"; + case _18: return "18"; + case _180: return "180"; + case _181: return "181"; + case _182: return "182"; + case _183: return "183"; + case _184: return "184"; + case _185: return "185"; + case _186: return "186"; + case _187: return "187"; + case _188: return "188"; + case _189: return "189"; + case _19: return "19"; + case _190: return "190"; + case _191: return "191"; + case _192: return "192"; + case _193: return "193"; + case _194: return "194"; + case _195: return "195"; + case _196: return "196"; + case _197: return "197"; + case _198: return "198"; + case _199: return "199"; + case _2: return "2"; + case _20: return "20"; + case _200: return "200"; + case _201: return "201"; + case _202: return "202"; + case _203: return "203"; + case _204: return "204"; + case _205: return "205"; + case _206: return "206"; + case _207: return "207"; + case _208: return "208"; + case _209: return "209"; + case _21: return "21"; + case _210: return "210"; + case _211: return "211"; + case _212: return "212"; + case _213: return "213"; + case _214: return "214"; + case _215: return "215"; + case _216: return "216"; + case _217: return "217"; + case _218: return "218"; + case _219: return "219"; + case _22: return "22"; + case _220: return "220"; + case _221: return "221"; + case _222: return "222"; + case _223: return "223"; + case _224: return "224"; + case _225: return "225"; + case _226: return "226"; + case _227: return "227"; + case _228: return "228"; + case _229: return "229"; + case _23: return "23"; + case _230: return "230"; + case _231: return "231"; + case _232: return "232"; + case _233: return "233"; + case _234: return "234"; + case _235: return "235"; + case _236: return "236"; + case _237: return "237"; + case _238: return "238"; + case _239: return "239"; + case _24: return "24"; + case _240: return "240"; + case _241: return "241"; + case _242: return "242"; + case _243: return "243"; + case _244: return "244"; + case _245: return "245"; + case _246: return "246"; + case _247: return "247"; + case _248: return "248"; + case _249: return "249"; + case _25: return "25"; + case _250: return "250"; + case _251: return "251"; + case _252: return "252"; + case _253: return "253"; + case _254: return "254"; + case _255: return "255"; + case _256: return "256"; + case _257: return "257"; + case _258: return "258"; + case _259: return "259"; + case _26: return "26"; + case _260: return "260"; + case _261: return "261"; + case _262: return "262"; + case _263: return "263"; + case _264: return "264"; + case _265: return "265"; + case _266: return "266"; + case _267: return "267"; + case _268: return "268"; + case _269: return "269"; + case _27: return "27"; + case _270: return "270"; + case _271: return "271"; + case _272: return "272"; + case _273: return "273"; + case _274: return "274"; + case _275: return "275"; + case _276: return "276"; + case _277: return "277"; + case _278: return "278"; + case _279: return "279"; + case _28: return "28"; + case _280: return "280"; + case _281: return "281"; + case _282: return "282"; + case _283: return "283"; + case _284: return "284"; + case _285: return "285"; + case _286: return "286"; + case _287: return "287"; + case _288: return "288"; + case _289: return "289"; + case _29: return "29"; + case _290: return "290"; + case _291: return "291"; + case _292: return "292"; + case _293: return "293"; + case _294: return "294"; + case _295: return "295"; + case _296: return "296"; + case _297: return "297"; + case _298: return "298"; + case _299: return "299"; + case _3: return "3"; + case _30: return "30"; + case _300: return "300"; + case _301: return "301"; + case _302: return "302"; + case _303: return "303"; + case _304: return "304"; + case _305: return "305"; + case _306: return "306"; + case _307: return "307"; + case _308: return "308"; + case _309: return "309"; + case _31: return "31"; + case _310: return "310"; + case _311: return "311"; + case _312: return "312"; + case _313: return "313"; + case _314: return "314"; + case _315: return "315"; + case _316: return "316"; + case _317: return "317"; + case _318: return "318"; + case _319: return "319"; + case _32: return "32"; + case _320: return "320"; + case _321: return "321"; + case _322: return "322"; + case _323: return "323"; + case _324: return "324"; + case _325: return "325"; + case _326: return "326"; + case _327: return "327"; + case _328: return "328"; + case _329: return "329"; + case _33: return "33"; + case _330: return "330"; + case _331: return "331"; + case _332: return "332"; + case _333: return "333"; + case _334: return "334"; + case _335: return "335"; + case _336: return "336"; + case _337: return "337"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _39: return "39"; + case _4: return "4"; + case _40: return "40"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + case _49: return "49"; + case _5: return "5"; + case _50: return "50"; + case _51: return "51"; + case _52: return "52"; + case _53: return "53"; + case _54: return "54"; + case _55: return "55"; + case _56: return "56"; + case _57: return "57"; + case _58: return "58"; + case _59: return "59"; + case _6: return "6"; + case _60: return "60"; + case _61: return "61"; + case _62: return "62"; + case _63: return "63"; + case _64: return "64"; + case _65: return "65"; + case _66: return "66"; + case _67: return "67"; + case _68: return "68"; + case _69: return "69"; + case _7: return "7"; + case _70: return "70"; + case _71: return "71"; + case _72: return "72"; + case _73: return "73"; + case _74: return "74"; + case _75: return "75"; + case _76: return "76"; + case _77: return "77"; + case _78: return "78"; + case _79: return "79"; + case _8: return "8"; + case _80: return "80"; + case _81: return "81"; + case _82: return "82"; + case _83: return "83"; + case _84: return "84"; + case _85: return "85"; + case _86: return "86"; + case _87: return "87"; + case _88: return "88"; + case _89: return "89"; + case _9: return "9"; + case _90: return "90"; + case _91: return "91"; + case _92: return "92"; + case _93: return "93"; + case _94: return "94"; + case _95: return "95"; + case _96: return "96"; + case _97: return "97"; + case _98: return "98"; + case _99: return "99"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TribalEntityUS"; + } + public String getDefinition() { + switch (this) { + case _NATIVEENTITYALASKA: return "NATIVE ENTITIES WITHIN THE STATE OF ALASKA RECOGNIZED AND ELIGIBLE TO RECEIVE SERVICES FROM THE UNITED STATES BUREAU OF INDIAN AFFAIRS"; + case _338: return "Village of Afognak"; + case _339: return "Agdaagux Tribe of King Cove"; + case _340: return "Native Village of Akhiok"; + case _341: return "Akiachak Native Community"; + case _342: return "Akiak Native Community"; + case _343: return "Native Village of Akutan"; + case _344: return "Village of Alakanuk"; + case _345: return "Alatna Village"; + case _346: return "Native Village of Aleknagik"; + case _347: return "Algaaciq Native Village (St. Mary's)"; + case _348: return "Allakaket Village"; + case _349: return "Native Village of Ambler"; + case _350: return "Village of Anaktuvuk Pass"; + case _351: return "Yupiit of Andreafski"; + case _352: return "Angoon Community Association"; + case _353: return "Village of Aniak"; + case _354: return "Anvik Village"; + case _355: return "Arctic Village (See Native Village of Venetie Trib"; + case _356: return "Asa carsarmiut Tribe (formerly Native Village of M"; + case _357: return "Native Village of Atka"; + case _358: return "Village of Atmautluak"; + case _359: return "Atqasuk Village (Atkasook)"; + case _360: return "Native Village of Barrow Inupiat Traditional Gover"; + case _361: return "Beaver Village"; + case _362: return "Native Village of Belkofski"; + case _363: return "Village of Bill Moore's Slough"; + case _364: return "Birch Creek Tribe"; + case _365: return "Native Village of Brevig Mission"; + case _366: return "Native Village of Buckland"; + case _367: return "Native Village of Cantwell"; + case _368: return "Native Village of Chanega (aka Chenega)"; + case _369: return "Chalkyitsik Village"; + case _370: return "Village of Chefornak"; + case _371: return "Chevak Native Village"; + case _372: return "Chickaloon Native Village"; + case _373: return "Native Village of Chignik"; + case _374: return "Native Village of Chignik Lagoon"; + case _375: return "Chignik Lake Village"; + case _376: return "Chilkat Indian Village (Klukwan)"; + case _377: return "Chilkoot Indian Association (Haines)"; + case _378: return "Chinik Eskimo Community (Golovin)"; + case _379: return "Native Village of Chistochina"; + case _380: return "Native Village of Chitina"; + case _381: return "Native Village of Chuathbaluk (Russian Mission, Ku"; + case _382: return "Chuloonawick Native Village"; + case _383: return "Circle Native Community"; + case _384: return "Village of Clark's Point"; + case _385: return "Native Village of Council"; + case _386: return "Craig Community Association"; + case _387: return "Village of Crooked Creek"; + case _388: return "Curyung Tribal Council (formerly Native Village of"; + case _389: return "Native Village of Deering"; + case _390: return "Native Village of Diomede (aka Inalik)"; + case _391: return "Village of Dot Lake"; + case _392: return "Douglas Indian Association"; + case _393: return "Native Village of Eagle"; + case _394: return "Native Village of Eek"; + case _395: return "Egegik Village"; + case _396: return "Eklutna Native Village"; + case _397: return "Native Village of Ekuk"; + case _398: return "Ekwok Village"; + case _399: return "Native Village of Elim"; + case _400: return "Emmonak Village"; + case _401: return "Evansville Village (aka Bettles Field)"; + case _402: return "Native Village of Eyak (Cordova)"; + case _403: return "Native Village of False Pass"; + case _404: return "Native Village of Fort Yukon"; + case _405: return "Native Village of Gakona"; + case _406: return "Galena Village (aka Louden Village)"; + case _407: return "Native Village of Gambell"; + case _408: return "Native Village of Georgetown"; + case _409: return "Native Village of Goodnews Bay"; + case _410: return "Organized Village of Grayling (aka Holikachuk)"; + case _411: return "Gulkana Village"; + case _412: return "Native Village of Hamilton"; + case _413: return "Healy Lake Village"; + case _414: return "Holy Cross Village"; + case _415: return "Hoonah Indian Association"; + case _416: return "Native Village of Hooper Bay"; + case _417: return "Hughes Village"; + case _418: return "Huslia Village"; + case _419: return "Hydaburg Cooperative Association"; + case _420: return "Igiugig Village"; + case _421: return "Village of Iliamna"; + case _422: return "Inupiat Community of the Arctic Slope"; + case _423: return "Iqurmuit Traditional Council (formerly Native Vill"; + case _424: return "Ivanoff Bay Village"; + case _425: return "Kaguyak Village"; + case _426: return "Organized Village of Kake"; + case _427: return "Kaktovik Village (aka Barter Island)"; + case _428: return "Village of Kalskag"; + case _429: return "Village of Kaltag"; + case _430: return "Native Village of Kanatak"; + case _431: return "Native Village of Karluk"; + case _432: return "Organized Village of Kasaan"; + case _433: return "Native Village of Kasigluk"; + case _434: return "Kenaitze Indian Tribe"; + case _435: return "Ketchikan Indian Corporation"; + case _436: return "Native Village of Kiana"; + case _437: return "King Island Native Community"; + case _438: return "King Salmon Tribe"; + case _439: return "Native Village of Kipnuk"; + case _440: return "Native Village of Kivalina"; + case _441: return "Klawock Cooperative Association"; + case _442: return "Native Village of Kluti Kaah (aka Copper Center)"; + case _443: return "Knik Tribe"; + case _444: return "Native Village of Kobuk"; + case _445: return "Kokhanok Village"; + case _446: return "Native Village of Kongiganak"; + case _447: return "Village of Kotlik"; + case _448: return "Native Village of Kotzebue"; + case _449: return "Native Village of Koyuk"; + case _450: return "Koyukuk Native Village"; + case _451: return "Organized Village of Kwethluk"; + case _452: return "Native Village of Kwigillingok"; + case _453: return "Native Village of Kwinhagak (aka Quinhagak)"; + case _454: return "Native Village of Larsen Bay"; + case _455: return "Levelock Village"; + case _456: return "Lesnoi Village (aka Woody Island)"; + case _457: return "Lime Village"; + case _458: return "Village of Lower Kalskag"; + case _459: return "Manley Hot Springs Village"; + case _460: return "Manokotak Village"; + case _461: return "Native Village of Marshall (aka Fortuna Ledge)"; + case _462: return "Native Village of Mary's Igloo"; + case _463: return "McGrath Native Village"; + case _464: return "Native Village of Mekoryuk"; + case _465: return "Mentasta Traditional Council"; + case _466: return "Metlakatla Indian Community, Annette Island Reserv"; + case _467: return "Native Village of Minto"; + case _468: return "Naknek Native Village"; + case _469: return "Native Village of Nanwalek (aka English Bay)"; + case _470: return "Native Village of Napaimute"; + case _471: return "Native Village of Napakiak"; + case _472: return "Native Village of Napaskiak"; + case _473: return "Native Village of Nelson Lagoon"; + case _474: return "Nenana Native Association"; + case _475: return "New Koliganek Village Council (formerly Koliganek"; + case _476: return "New Stuyahok Village"; + case _477: return "Newhalen Village"; + case _478: return "Newtok Village"; + case _479: return "Native Village of Nightmute"; + case _480: return "Nikolai Village"; + case _481: return "Native Village of Nikolski"; + case _482: return "Ninilchik Village"; + case _483: return "Native Village of Noatak"; + case _484: return "Nome Eskimo Community"; + case _485: return "Nondalton Village"; + case _486: return "Noorvik Native Community"; + case _487: return "Northway Village"; + case _488: return "Native Village of Nuiqsut (aka Nooiksut)"; + case _489: return "Nulato Village"; + case _490: return "Nunakauyarmiut Tribe (formerly Native Village of T"; + case _491: return "Native Village of Nunapitchuk"; + case _492: return "Village of Ohogamiut"; + case _493: return "Village of Old Harbor"; + case _494: return "Orutsararmuit Native Village (aka Bethel)"; + case _495: return "Oscarville Traditional Village"; + case _496: return "Native Village of Ouzinkie"; + case _497: return "Native Village of Paimiut"; + case _498: return "Pauloff Harbor Village"; + case _499: return "Pedro Bay Village"; + case _500: return "Native Village of Perryville"; + case _501: return "Petersburg Indian Association"; + case _502: return "Native Village of Pilot Point"; + case _503: return "Pilot Station Traditional Village"; + case _504: return "Native Village of Pitka's Point"; + case _505: return "Platinum Traditional Village"; + case _506: return "Native Village of Point Hope"; + case _507: return "Native Village of Point Lay"; + case _508: return "Native Village of Port Graham"; + case _509: return "Native Village of Port Heiden"; + case _510: return "Native Village of Port Lions"; + case _511: return "Portage Creek Village (aka Ohgsenakale)"; + case _512: return "Pribilof Islands Aleut Communities of St. Paul & S"; + case _513: return "Qagan Tayagungin Tribe of Sand Point Village"; + case _514: return "Qawalangin Tribe of Unalaska"; + case _515: return "Rampart Village"; + case _516: return "Village of Red Devil"; + case _517: return "Native Village of Ruby"; + case _518: return "Saint George Island(See Pribilof Islands Aleut Com"; + case _519: return "Native Village of Saint Michael"; + case _520: return "Saint Paul Island (See Pribilof Islands Aleut Comm"; + case _521: return "Village of Salamatoff"; + case _522: return "Native Village of Savoonga"; + case _523: return "Organized Village of Saxman"; + case _524: return "Native Village of Scammon Bay"; + case _525: return "Native Village of Selawik"; + case _526: return "Seldovia Village Tribe"; + case _527: return "Shageluk Native Village"; + case _528: return "Native Village of Shaktoolik"; + case _529: return "Native Village of Sheldon's Point"; + case _530: return "Native Village of Shishmaref"; + case _531: return "Shoonaq Tribe of Kodiak"; + case _532: return "Native Village of Shungnak"; + case _533: return "Sitka Tribe of Alaska"; + case _534: return "Skagway Village"; + case _535: return "Village of Sleetmute"; + case _536: return "Village of Solomon"; + case _537: return "South Naknek Village"; + case _538: return "Stebbins Community Association"; + case _539: return "Native Village of Stevens"; + case _540: return "Village of Stony River"; + case _541: return "Takotna Village"; + case _542: return "Native Village of Tanacross"; + case _543: return "Native Village of Tanana"; + case _544: return "Native Village of Tatitlek"; + case _545: return "Native Village of Tazlina"; + case _546: return "Telida Village"; + case _547: return "Native Village of Teller"; + case _548: return "Native Village of Tetlin"; + case _549: return "Central Council of the Tlingit and Haida Indian Tb"; + case _550: return "Traditional Village of Togiak"; + case _551: return "Tuluksak Native Community"; + case _552: return "Native Village of Tuntutuliak"; + case _553: return "Native Village of Tununak"; + case _554: return "Twin Hills Village"; + case _555: return "Native Village of Tyonek"; + case _556: return "Ugashik Village"; + case _557: return "Umkumiute Native Village"; + case _558: return "Native Village of Unalakleet"; + case _559: return "Native Village of Unga"; + case _560: return "Village of Venetie (See Native Village of Venetie"; + case _561: return "Native Village of Venetie Tribal Government (Arcti"; + case _562: return "Village of Wainwright"; + case _563: return "Native Village of Wales"; + case _564: return "Native Village of White Mountain"; + case _565: return "Wrangell Cooperative Association"; + case _566: return "Yakutat Tlingit Tribe"; + case _NATIVEENTITYCONTIGUOUS: return "NATIVE ENTITIES WITHIN THE CONTIGUOUS 48 STATES"; + case _1: return "Absentee-Shawnee Tribe of Indians of Oklahoma"; + case _10: return "Assiniboine and Sioux Tribes of the Fort Peck Indi"; + case _100: return "Havasupai Tribe of the Havasupai Reservation, Ariz"; + case _101: return "Ho-Chunk Nation of Wisconsin (formerly known as th"; + case _102: return "Hoh Indian Tribe of the Hoh Indian Reservation, Wa"; + case _103: return "Hoopa Valley Tribe, California"; + case _104: return "Hopi Tribe of Arizona"; + case _105: return "Hopland Band of Pomo Indians of the Hopland Ranche"; + case _106: return "Houlton Band of Maliseet Indians of Maine"; + case _107: return "Hualapai Indian Tribe of the Hualapai Indian Reser"; + case _108: return "Huron Potawatomi, Inc., Michigan"; + case _109: return "Inaja Band of Diegueno Mission Indians of the Inaj"; + case _11: return "Augustine Band of Cahuilla Mission Indians of the"; + case _110: return "Ione Band of Miwok Indians of California"; + case _111: return "Iowa Tribe of Kansas and Nebraska"; + case _112: return "Iowa Tribe of Oklahoma"; + case _113: return "Jackson Rancheria of Me-Wuk Indians of California"; + case _114: return "Jamestown S'Klallam Tribe of Washington"; + case _115: return "Jamul Indian Village of California"; + case _116: return "Jena Band of Choctaw Indians, Louisiana"; + case _117: return "Jicarilla Apache Tribe of the Jicarilla Apache Ind"; + case _118: return "Kaibab Band of Paiute Indians of the Kaibab Indian"; + case _119: return "Kalispel Indian Community of the Kalispel Reservat"; + case _12: return "Bad River Band of the Lake Superior Tribe of Chipp"; + case _120: return "Karuk Tribe of California"; + case _121: return "Kashia Band of Pomo Indians of the Stewarts Point"; + case _122: return "Kaw Nation, Oklahoma"; + case _123: return "Keweenaw Bay Indian Community of L'Anse and Ontona"; + case _124: return "Kialegee Tribal Town, Oklahoma"; + case _125: return "Kickapoo Tribe of Indians of the Kickapoo Reservat"; + case _126: return "Kickapoo Tribe of Oklahoma"; + case _127: return "Kickapoo Traditional Tribe of Texas"; + case _128: return "Kiowa Indian Tribe of Oklahoma"; + case _129: return "Klamath Indian Tribe of Oregon"; + case _13: return "Bay Mills Indian Community of the Sault Ste. Marie"; + case _130: return "Kootenai Tribe of Idaho"; + case _131: return "La Jolla Band of Luiseno Mission Indians of the La"; + case _132: return "La Posta Band of Diegueno Mission Indians of the L"; + case _133: return "Lac Courte Oreilles Band of Lake Superior Chippewa"; + case _134: return "Lac du Flambeau Band of Lake Superior Chippewa Ind"; + case _135: return "Lac Vieux Desert Band of Lake Superior Chippewa In"; + case _136: return "Las Vegas Tribe of Paiute Indians of the Las Vegas"; + case _137: return "Little River Band of Ottawa Indians of Michigan"; + case _138: return "Little Traverse Bay Bands of Odawa Indians of Mich"; + case _139: return "Lower Lake Rancheria, California"; + case _14: return "Bear River Band of the Rohnerville Rancheria, Cali"; + case _140: return "Los Coyotes Band of Cahuilla Mission Indians of th"; + case _141: return "Lovelock Paiute Tribe of the Lovelock Indian Colon"; + case _142: return "Lower Brule Sioux Tribe of the Lower Brule Reserva"; + case _143: return "Lower Elwha Tribal Community of the Lower Elwha Re"; + case _144: return "Lower Sioux Indian Community of Minnesota Mdewakan"; + case _145: return "Lummi Tribe of the Lummi Reservation, Washington"; + case _146: return "Lytton Rancheria of California"; + case _147: return "Makah Indian Tribe of the Makah Indian Reservation"; + case _148: return "Manchester Band of Pomo Indians of the Manchester-"; + case _149: return "Manzanita Band of Diegueno Mission Indians of the"; + case _15: return "Berry Creek Rancheria of Maidu Indians of Californ"; + case _150: return "Mashantucket Pequot Tribe of Connecticut"; + case _151: return "Match-e-be-nash-she-wish Band of Pottawatomi India"; + case _152: return "Mechoopda Indian Tribe of Chico Rancheria, Califor"; + case _153: return "Menominee Indian Tribe of Wisconsin"; + case _154: return "Mesa Grande Band of Diegueno Mission Indians of th"; + case _155: return "Mescalero Apache Tribe of the Mescalero Reservatio"; + case _156: return "Miami Tribe of Oklahoma"; + case _157: return "Miccosukee Tribe of Indians of Florida"; + case _158: return "Middletown Rancheria of Pomo Indians of California"; + case _159: return "Minnesota Chippewa Tribe, Minnesota (Six component"; + case _16: return "Big Lagoon Rancheria, California"; + case _160: return "Bois Forte Band (Nett Lake); Fond du Lac Band; Gra"; + case _161: return "Mississippi Band of Choctaw Indians, Mississippi"; + case _162: return "Moapa Band of Paiute Indians of the Moapa River In"; + case _163: return "Modoc Tribe of Oklahoma"; + case _164: return "Mohegan Indian Tribe of Connecticut"; + case _165: return "Mooretown Rancheria of Maidu Indians of California"; + case _166: return "Morongo Band of Cahuilla Mission Indians of the Mo"; + case _167: return "Muckleshoot Indian Tribe of the Muckleshoot Reserv"; + case _168: return "Muscogee (Creek) Nation, Oklahoma"; + case _169: return "Narragansett Indian Tribe of Rhode Island"; + case _17: return "Big Pine Band of Owens Valley Paiute Shoshone Indi"; + case _170: return "Navajo Nation, Arizona, New Mexico & Utah"; + case _171: return "Nez Perce Tribe of Idaho"; + case _172: return "Nisqually Indian Tribe of the Nisqually Reservatio"; + case _173: return "Nooksack Indian Tribe of Washington"; + case _174: return "Northern Cheyenne Tribe of the Northern Cheyenne I"; + case _175: return "Northfork Rancheria of Mono Indians of California"; + case _176: return "Northwestern Band of Shoshoni Nation of Utah (Wash"; + case _177: return "Oglala Sioux Tribe of the Pine Ridge Reservation,"; + case _178: return "Omaha Tribe of Nebraska"; + case _179: return "Oneida Nation of New York"; + case _18: return "Big Sandy Rancheria of Mono Indians of California"; + case _180: return "Oneida Tribe of Wisconsin"; + case _181: return "Onondaga Nation of New York"; + case _182: return "Osage Tribe, Oklahoma"; + case _183: return "Ottawa Tribe of Oklahoma"; + case _184: return "Otoe-Missouria Tribe of Indians, Oklahoma"; + case _185: return "Paiute Indian Tribe of Utah"; + case _186: return "Paiute-Shoshone Indians of the Bishop Community of"; + case _187: return "Paiute-Shoshone Tribe of the Fallon Reservation an"; + case _188: return "Paiute-Shoshone Indians of the Lone Pine Community"; + case _189: return "Pala Band of Luiseno Mission Indians of the Pala R"; + case _19: return "Big Valley Band of Pomo Indians of the Big Valley"; + case _190: return "Pascua Yaqui Tribe of Arizona"; + case _191: return "Paskenta Band of Nomlaki Indians of California"; + case _192: return "Passamaquoddy Tribe of Maine"; + case _193: return "Pauma Band of Luiseno Mission Indians of the Pauma"; + case _194: return "Pawnee Nation of Oklahoma"; + case _195: return "Pechanga Band of Luiseno Mission Indians of the Pe"; + case _196: return "Penobscot Tribe of Maine"; + case _197: return "Peoria Tribe of Indians of Oklahoma"; + case _198: return "Picayune Rancheria of Chukchansi Indians of Califo"; + case _199: return "Pinoleville Rancheria of Pomo Indians of Californi"; + case _2: return "Agua Caliente Band of Cahuilla Indians of the Agua"; + case _20: return "Blackfeet Tribe of the Blackfeet Indian Reservatio"; + case _200: return "Pit River Tribe, California (includes Big Bend, Lo"; + case _201: return "Poarch Band of Creek Indians of Alabama"; + case _202: return "Pokagon Band of Potawatomi Indians of Michigan"; + case _203: return "Ponca Tribe of Indians of Oklahoma"; + case _204: return "Ponca Tribe of Nebraska"; + case _205: return "Port Gamble Indian Community of the Port Gamble Re"; + case _206: return "Potter Valley Rancheria of Pomo Indians of Califor"; + case _207: return "Prairie Band of Potawatomi Indians, Kansas"; + case _208: return "Prairie Island Indian Community of Minnesota Mdewa"; + case _209: return "Pueblo of Acoma, New Mexico"; + case _21: return "Blue Lake Rancheria, California"; + case _210: return "Pueblo of Cochiti, New Mexico"; + case _211: return "Pueblo of Jemez, New Mexico"; + case _212: return "Pueblo of Isleta, New Mexico"; + case _213: return "Pueblo of Laguna, New Mexico"; + case _214: return "Pueblo of Nambe, New Mexico"; + case _215: return "Pueblo of Picuris, New Mexico"; + case _216: return "Pueblo of Pojoaque, New Mexico"; + case _217: return "Pueblo of San Felipe, New Mexico"; + case _218: return "Pueblo of San Juan, New Mexico"; + case _219: return "Pueblo of San Ildefonso, New Mexico"; + case _22: return "Bridgeport Paiute Indian Colony of California"; + case _220: return "Pueblo of Sandia, New Mexico"; + case _221: return "Pueblo of Santa Ana, New Mexico"; + case _222: return "Pueblo of Santa Clara, New Mexico"; + case _223: return "Pueblo of Santo Domingo, New Mexico"; + case _224: return "Pueblo of Taos, New Mexico"; + case _225: return "Pueblo of Tesuque, New Mexico"; + case _226: return "Pueblo of Zia, New Mexico"; + case _227: return "Puyallup Tribe of the Puyallup Reservation, Washin"; + case _228: return "Pyramid Lake Paiute Tribe of the Pyramid Lake Rese"; + case _229: return "Quapaw Tribe of Indians, Oklahoma"; + case _23: return "Buena Vista Rancheria of Me-Wuk Indians of Califor"; + case _230: return "Quartz Valley Indian Community of the Quartz Valle"; + case _231: return "Quechan Tribe of the Fort Yuma Indian Reservation,"; + case _232: return "Quileute Tribe of the Quileute Reservation, Washin"; + case _233: return "Quinault Tribe of the Quinault Reservation, Washin"; + case _234: return "Ramona Band or Village of Cahuilla Mission Indians"; + case _235: return "Red Cliff Band of Lake Superior Chippewa Indians o"; + case _236: return "Red Lake Band of Chippewa Indians of the Red Lake"; + case _237: return "Redding Rancheria, California"; + case _238: return "Redwood Valley Rancheria of Pomo Indians of Califo"; + case _239: return "Reno-Sparks Indian Colony, Nevada"; + case _24: return "Burns Paiute Tribe of the Burns Paiute Indian Colo"; + case _240: return "Resighini Rancheria, California (formerly known as"; + case _241: return "Rincon Band of Luiseno Mission Indians of the Rinc"; + case _242: return "Robinson Rancheria of Pomo Indians of California"; + case _243: return "Rosebud Sioux Tribe of the Rosebud Indian Reservat"; + case _244: return "Round Valley Indian Tribes of the Round Valley Res"; + case _245: return "Rumsey Indian Rancheria of Wintun Indians of Calif"; + case _246: return "Sac and Fox Tribe of the Mississippi in Iowa"; + case _247: return "Sac and Fox Nation of Missouri in Kansas and Nebra"; + case _248: return "Sac and Fox Nation, Oklahoma"; + case _249: return "Saginaw Chippewa Indian Tribe of Michigan, Isabell"; + case _25: return "Cabazon Band of Cahuilla Mission Indians of the Ca"; + case _250: return "Salt River Pima-Maricopa Indian Community of the S"; + case _251: return "Samish Indian Tribe, Washington"; + case _252: return "San Carlos Apache Tribe of the San Carlos Reservat"; + case _253: return "San Juan Southern Paiute Tribe of Arizona"; + case _254: return "San Manual Band of Serrano Mission Indians of the"; + case _255: return "San Pasqual Band of Diegueno Mission Indians of Ca"; + case _256: return "Santa Rosa Indian Community of the Santa Rosa Ranc"; + case _257: return "Santa Rosa Band of Cahuilla Mission Indians of the"; + case _258: return "Santa Ynez Band of Chumash Mission Indians of the"; + case _259: return "Santa Ysabel Band of Diegueno Mission Indians of t"; + case _26: return "Cachil DeHe Band of Wintun Indians of the Colusa I"; + case _260: return "Santee Sioux Tribe of the Santee Reservation of Ne"; + case _261: return "Sauk-Suiattle Indian Tribe of Washington"; + case _262: return "Sault Ste. Marie Tribe of Chippewa Indians of Mich"; + case _263: return "Scotts Valley Band of Pomo Indians of California"; + case _264: return "Seminole Nation of Oklahoma"; + case _265: return "Seminole Tribe of Florida, Dania, Big Cypress, Bri"; + case _266: return "Seneca Nation of New York"; + case _267: return "Seneca-Cayuga Tribe of Oklahoma"; + case _268: return "Shakopee Mdewakanton Sioux Community of Minnesota"; + case _269: return "Shawnee Tribe, Oklahoma"; + case _27: return "Caddo Indian Tribe of Oklahoma"; + case _270: return "Sherwood Valley Rancheria of Pomo Indians of Calif"; + case _271: return "Shingle Springs Band of Miwok Indians, Shingle Spr"; + case _272: return "Shoalwater Bay Tribe of the Shoalwater Bay Indian"; + case _273: return "Shoshone Tribe of the Wind River Reservation, Wyom"; + case _274: return "Shoshone-Bannock Tribes of the Fort Hall Reservati"; + case _275: return "Shoshone-Paiute Tribes of the Duck Valley Reservat"; + case _276: return "Sisseton-Wahpeton Sioux Tribe of the Lake Traverse"; + case _277: return "Skokomish Indian Tribe of the Skokomish Reservatio"; + case _278: return "Skull Valley Band of Goshute Indians of Utah"; + case _279: return "Smith River Rancheria, California"; + case _28: return "Cahuilla Band of Mission Indians of the Cahuilla R"; + case _280: return "Snoqualmie Tribe, Washington"; + case _281: return "Soboba Band of Luiseno Indians, California (former"; + case _282: return "Sokaogon Chippewa Community of the Mole Lake Band"; + case _283: return "Southern Ute Indian Tribe of the Southern Ute Rese"; + case _284: return "Spirit Lake Tribe, North Dakota (formerly known as"; + case _285: return "Spokane Tribe of the Spokane Reservation, Washingt"; + case _286: return "Squaxin Island Tribe of the Squaxin Island Reserva"; + case _287: return "St. Croix Chippewa Indians of Wisconsin, St. Croix"; + case _288: return "St. Regis Band of Mohawk Indians of New York"; + case _289: return "Standing Rock Sioux Tribe of North & South Dakota"; + case _29: return "Cahto Indian Tribe of the Laytonville Rancheria, C"; + case _290: return "Stockbridge-Munsee Community of Mohican Indians of"; + case _291: return "Stillaguamish Tribe of Washington"; + case _292: return "Summit Lake Paiute Tribe of Nevada"; + case _293: return "Suquamish Indian Tribe of the Port Madison Reserva"; + case _294: return "Susanville Indian Rancheria, California"; + case _295: return "Swinomish Indians of the Swinomish Reservation, Wa"; + case _296: return "Sycuan Band of Diegueno Mission Indians of Califor"; + case _297: return "Table Bluff Reservation - Wiyot Tribe, California"; + case _298: return "Table Mountain Rancheria of California"; + case _299: return "Te-Moak Tribe of Western Shoshone Indians of Nevad"; + case _3: return "Ak Chin Indian Community of the Maricopa (Ak Chin)"; + case _30: return "California Valley Miwok Tribe, California (formerl"; + case _300: return "Thlopthlocco Tribal Town, Oklahoma"; + case _301: return "Three Affiliated Tribes of the Fort Berthold Reser"; + case _302: return "Tohono O'odham Nation of Arizona"; + case _303: return "Tonawanda Band of Seneca Indians of New York"; + case _304: return "Tonkawa Tribe of Indians of Oklahoma"; + case _305: return "Tonto Apache Tribe of Arizona"; + case _306: return "Torres-Martinez Band of Cahuilla Mission Indians o"; + case _307: return "Tule River Indian Tribe of the Tule River Reservat"; + case _308: return "Tulalip Tribes of the Tulalip Reservation, Washing"; + case _309: return "Tunica-Biloxi Indian Tribe of Louisiana"; + case _31: return "Campo Band of Diegueno Mission Indians of the Camp"; + case _310: return "Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra"; + case _311: return "Turtle Mountain Band of Chippewa Indians of North"; + case _312: return "Tuscarora Nation of New York"; + case _313: return "Twenty-Nine Palms Band of Mission Indians of Calif"; + case _314: return "United Auburn Indian Community of the Auburn Ranch"; + case _315: return "United Keetoowah Band of Cherokee Indians of Oklah"; + case _316: return "Upper Lake Band of Pomo Indians of Upper Lake Ranc"; + case _317: return "Upper Sioux Indian Community of the Upper Sioux Re"; + case _318: return "Upper Skagit Indian Tribe of Washington"; + case _319: return "Ute Indian Tribe of the Uintah & Ouray Reservation"; + case _32: return "Capitan Grande Band of Diegueno Mission Indians of"; + case _320: return "Ute Mountain Tribe of the Ute Mountain Reservation"; + case _321: return "Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R"; + case _322: return "Walker River Paiute Tribe of the Walker River Rese"; + case _323: return "Wampanoag Tribe of Gay Head (Aquinnah) of Massachu"; + case _324: return "Washoe Tribe of Nevada & California (Carson Colony"; + case _325: return "White Mountain Apache Tribe of the Fort Apache Res"; + case _326: return "Wichita and Affiliated Tribes (Wichita, Keechi, Wa"; + case _327: return "Winnebago Tribe of Nebraska"; + case _328: return "Winnemucca Indian Colony of Nevada"; + case _329: return "Wyandotte Tribe of Oklahoma"; + case _33: return "Barona Group of Capitan Grande Band of Mission Ind"; + case _330: return "Yankton Sioux Tribe of South Dakota"; + case _331: return "Yavapai-Apache Nation of the Camp Verde Indian Res"; + case _332: return "Yavapai-Prescott Tribe of the Yavapai Reservation,"; + case _333: return "Yerington Paiute Tribe of the Yerington Colony & C"; + case _334: return "Yomba Shoshone Tribe of the Yomba Reservation, Nev"; + case _335: return "Ysleta Del Sur Pueblo of Texas"; + case _336: return "Yurok Tribe of the Yurok Reservation, California"; + case _337: return "Zuni Tribe of the Zuni Reservation, New Mexico"; + case _34: return "Viejas (Baron Long) Group of Capitan Grande Band o"; + case _35: return "Catawba Indian Nation (aka Catawba Tribe of South"; + case _36: return "Cayuga Nation of New York"; + case _37: return "Cedarville Rancheria, California"; + case _38: return "Chemehuevi Indian Tribe of the Chemehuevi Reservat"; + case _39: return "Cher-Ae Heights Indian Community of the Trinidad R"; + case _4: return "Alabama-Coushatta Tribes of Texas"; + case _40: return "Cherokee Nation, Oklahoma"; + case _41: return "Cheyenne-Arapaho Tribes of Oklahoma"; + case _42: return "Cheyenne River Sioux Tribe of the Cheyenne River R"; + case _43: return "Chickasaw Nation, Oklahoma"; + case _44: return "Chicken Ranch Rancheria of Me-Wuk Indians of Calif"; + case _45: return "Chippewa-Cree Indians of the Rocky Boy's Reservati"; + case _46: return "Chitimacha Tribe of Louisiana"; + case _47: return "Choctaw Nation of Oklahoma"; + case _48: return "Citizen Potawatomi Nation, Oklahoma"; + case _49: return "Cloverdale Rancheria of Pomo Indians of California"; + case _5: return "Alabama-Quassarte Tribal Town, Oklahoma"; + case _50: return "Cocopah Tribe of Arizona"; + case _51: return "Coeur D'Alene Tribe of the Coeur D'Alene Reservati"; + case _52: return "Cold Springs Rancheria of Mono Indians of Californ"; + case _53: return "Colorado River Indian Tribes of the Colorado River"; + case _54: return "Comanche Indian Tribe, Oklahoma"; + case _55: return "Confederated Salish & Kootenai Tribes of the Flath"; + case _56: return "Confederated Tribes of the Chehalis Reservation, W"; + case _57: return "Confederated Tribes of the Colville Reservation, W"; + case _58: return "Confederated Tribes of the Coos, Lower Umpqua and"; + case _59: return "Confederated Tribes of the Goshute Reservation, Ne"; + case _6: return "Alturas Indian Rancheria, California"; + case _60: return "Confederated Tribes of the Grand Ronde Community o"; + case _61: return "Confederated Tribes of the Siletz Reservation, Ore"; + case _62: return "Confederated Tribes of the Umatilla Reservation, O"; + case _63: return "Confederated Tribes of the Warm Springs Reservatio"; + case _64: return "Confederated Tribes and Bands of the Yakama Indian"; + case _65: return "Coquille Tribe of Oregon"; + case _66: return "Cortina Indian Rancheria of Wintun Indians of Cali"; + case _67: return "Coushatta Tribe of Louisiana"; + case _68: return "Cow Creek Band of Umpqua Indians of Oregon"; + case _69: return "Coyote Valley Band of Pomo Indians of California"; + case _7: return "Apache Tribe of Oklahoma"; + case _70: return "Crow Tribe of Montana"; + case _71: return "Crow Creek Sioux Tribe of the Crow Creek Reservati"; + case _72: return "Cuyapaipe Community of Diegueno Mission Indians of"; + case _73: return "Death Valley Timbi-Sha Shoshone Band of California"; + case _74: return "Delaware Nation, Oklahoma (formerly Delaware Tribe"; + case _75: return "Delaware Tribe of Indians, Oklahoma"; + case _76: return "Dry Creek Rancheria of Pomo Indians of California"; + case _77: return "Duckwater Shoshone Tribe of the Duckwater Reservat"; + case _78: return "Eastern Band of Cherokee Indians of North Carolina"; + case _79: return "Eastern Shawnee Tribe of Oklahoma"; + case _8: return "Arapahoe Tribe of the Wind River Reservation, Wyom"; + case _80: return "Elem Indian Colony of Pomo Indians of the Sulphur"; + case _81: return "Elk Valley Rancheria, California"; + case _82: return "Ely Shoshone Tribe of Nevada"; + case _83: return "Enterprise Rancheria of Maidu Indians of Californi"; + case _84: return "Flandreau Santee Sioux Tribe of South Dakota"; + case _85: return "Forest County Potawatomi Community of Wisconsin Po"; + case _86: return "Fort Belknap Indian Community of the Fort Belknap"; + case _87: return "Fort Bidwell Indian Community of the Fort Bidwell"; + case _88: return "Fort Independence Indian Community of Paiute India"; + case _89: return "Fort McDermitt Paiute and Shoshone Tribes of the F"; + case _9: return "Aroostook Band of Micmac Indians of Maine"; + case _90: return "Fort McDowell Yavapai Nation, Arizona (formerly th"; + case _91: return "Fort Mojave Indian Tribe of Arizona, California"; + case _92: return "Fort Sill Apache Tribe of Oklahoma"; + case _93: return "Gila River Indian Community of the Gila River Indi"; + case _94: return "Grand Traverse Band of Ottawa & Chippewa Indians o"; + case _95: return "Graton Rancheria, California"; + case _96: return "Greenville Rancheria of Maidu Indians of Californi"; + case _97: return "Grindstone Indian Rancheria of Wintun-Wailaki Indi"; + case _98: return "Guidiville Rancheria of California"; + case _99: return "Hannahville Indian Community of Wisconsin Potawato"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _NATIVEENTITYALASKA: return "NativeEntityAlaska"; + case _338: return "Village of Afognak"; + case _339: return "Agdaagux Tribe of King Cove"; + case _340: return "Native Village of Akhiok"; + case _341: return "Akiachak Native Community"; + case _342: return "Akiak Native Community"; + case _343: return "Native Village of Akutan"; + case _344: return "Village of Alakanuk"; + case _345: return "Alatna Village"; + case _346: return "Native Village of Aleknagik"; + case _347: return "Algaaciq Native Village (St. Mary's)"; + case _348: return "Allakaket Village"; + case _349: return "Native Village of Ambler"; + case _350: return "Village of Anaktuvuk Pass"; + case _351: return "Yupiit of Andreafski"; + case _352: return "Angoon Community Association"; + case _353: return "Village of Aniak"; + case _354: return "Anvik Village"; + case _355: return "Arctic Village (See Native Village of Venetie Trib"; + case _356: return "Asa carsarmiut Tribe (formerly Native Village of M"; + case _357: return "Native Village of Atka"; + case _358: return "Village of Atmautluak"; + case _359: return "Atqasuk Village (Atkasook)"; + case _360: return "Native Village of Barrow Inupiat Traditional Gover"; + case _361: return "Beaver Village"; + case _362: return "Native Village of Belkofski"; + case _363: return "Village of Bill Moore's Slough"; + case _364: return "Birch Creek Tribe"; + case _365: return "Native Village of Brevig Mission"; + case _366: return "Native Village of Buckland"; + case _367: return "Native Village of Cantwell"; + case _368: return "Native Village of Chanega (aka Chenega)"; + case _369: return "Chalkyitsik Village"; + case _370: return "Village of Chefornak"; + case _371: return "Chevak Native Village"; + case _372: return "Chickaloon Native Village"; + case _373: return "Native Village of Chignik"; + case _374: return "Native Village of Chignik Lagoon"; + case _375: return "Chignik Lake Village"; + case _376: return "Chilkat Indian Village (Klukwan)"; + case _377: return "Chilkoot Indian Association (Haines)"; + case _378: return "Chinik Eskimo Community (Golovin)"; + case _379: return "Native Village of Chistochina"; + case _380: return "Native Village of Chitina"; + case _381: return "Native Village of Chuathbaluk (Russian Mission, Ku"; + case _382: return "Chuloonawick Native Village"; + case _383: return "Circle Native Community"; + case _384: return "Village of Clark's Point"; + case _385: return "Native Village of Council"; + case _386: return "Craig Community Association"; + case _387: return "Village of Crooked Creek"; + case _388: return "Curyung Tribal Council (formerly Native Village of"; + case _389: return "Native Village of Deering"; + case _390: return "Native Village of Diomede (aka Inalik)"; + case _391: return "Village of Dot Lake"; + case _392: return "Douglas Indian Association"; + case _393: return "Native Village of Eagle"; + case _394: return "Native Village of Eek"; + case _395: return "Egegik Village"; + case _396: return "Eklutna Native Village"; + case _397: return "Native Village of Ekuk"; + case _398: return "Ekwok Village"; + case _399: return "Native Village of Elim"; + case _400: return "Emmonak Village"; + case _401: return "Evansville Village (aka Bettles Field)"; + case _402: return "Native Village of Eyak (Cordova)"; + case _403: return "Native Village of False Pass"; + case _404: return "Native Village of Fort Yukon"; + case _405: return "Native Village of Gakona"; + case _406: return "Galena Village (aka Louden Village)"; + case _407: return "Native Village of Gambell"; + case _408: return "Native Village of Georgetown"; + case _409: return "Native Village of Goodnews Bay"; + case _410: return "Organized Village of Grayling (aka Holikachuk)"; + case _411: return "Gulkana Village"; + case _412: return "Native Village of Hamilton"; + case _413: return "Healy Lake Village"; + case _414: return "Holy Cross Village"; + case _415: return "Hoonah Indian Association"; + case _416: return "Native Village of Hooper Bay"; + case _417: return "Hughes Village"; + case _418: return "Huslia Village"; + case _419: return "Hydaburg Cooperative Association"; + case _420: return "Igiugig Village"; + case _421: return "Village of Iliamna"; + case _422: return "Inupiat Community of the Arctic Slope"; + case _423: return "Iqurmuit Traditional Council (formerly Native Vill"; + case _424: return "Ivanoff Bay Village"; + case _425: return "Kaguyak Village"; + case _426: return "Organized Village of Kake"; + case _427: return "Kaktovik Village (aka Barter Island)"; + case _428: return "Village of Kalskag"; + case _429: return "Village of Kaltag"; + case _430: return "Native Village of Kanatak"; + case _431: return "Native Village of Karluk"; + case _432: return "Organized Village of Kasaan"; + case _433: return "Native Village of Kasigluk"; + case _434: return "Kenaitze Indian Tribe"; + case _435: return "Ketchikan Indian Corporation"; + case _436: return "Native Village of Kiana"; + case _437: return "King Island Native Community"; + case _438: return "King Salmon Tribe"; + case _439: return "Native Village of Kipnuk"; + case _440: return "Native Village of Kivalina"; + case _441: return "Klawock Cooperative Association"; + case _442: return "Native Village of Kluti Kaah (aka Copper Center)"; + case _443: return "Knik Tribe"; + case _444: return "Native Village of Kobuk"; + case _445: return "Kokhanok Village"; + case _446: return "Native Village of Kongiganak"; + case _447: return "Village of Kotlik"; + case _448: return "Native Village of Kotzebue"; + case _449: return "Native Village of Koyuk"; + case _450: return "Koyukuk Native Village"; + case _451: return "Organized Village of Kwethluk"; + case _452: return "Native Village of Kwigillingok"; + case _453: return "Native Village of Kwinhagak (aka Quinhagak)"; + case _454: return "Native Village of Larsen Bay"; + case _455: return "Levelock Village"; + case _456: return "Lesnoi Village (aka Woody Island)"; + case _457: return "Lime Village"; + case _458: return "Village of Lower Kalskag"; + case _459: return "Manley Hot Springs Village"; + case _460: return "Manokotak Village"; + case _461: return "Native Village of Marshall (aka Fortuna Ledge)"; + case _462: return "Native Village of Mary's Igloo"; + case _463: return "McGrath Native Village"; + case _464: return "Native Village of Mekoryuk"; + case _465: return "Mentasta Traditional Council"; + case _466: return "Metlakatla Indian Community, Annette Island Reserv"; + case _467: return "Native Village of Minto"; + case _468: return "Naknek Native Village"; + case _469: return "Native Village of Nanwalek (aka English Bay)"; + case _470: return "Native Village of Napaimute"; + case _471: return "Native Village of Napakiak"; + case _472: return "Native Village of Napaskiak"; + case _473: return "Native Village of Nelson Lagoon"; + case _474: return "Nenana Native Association"; + case _475: return "New Koliganek Village Council (formerly Koliganek"; + case _476: return "New Stuyahok Village"; + case _477: return "Newhalen Village"; + case _478: return "Newtok Village"; + case _479: return "Native Village of Nightmute"; + case _480: return "Nikolai Village"; + case _481: return "Native Village of Nikolski"; + case _482: return "Ninilchik Village"; + case _483: return "Native Village of Noatak"; + case _484: return "Nome Eskimo Community"; + case _485: return "Nondalton Village"; + case _486: return "Noorvik Native Community"; + case _487: return "Northway Village"; + case _488: return "Native Village of Nuiqsut (aka Nooiksut)"; + case _489: return "Nulato Village"; + case _490: return "Nunakauyarmiut Tribe (formerly Native Village of T"; + case _491: return "Native Village of Nunapitchuk"; + case _492: return "Village of Ohogamiut"; + case _493: return "Village of Old Harbor"; + case _494: return "Orutsararmuit Native Village (aka Bethel)"; + case _495: return "Oscarville Traditional Village"; + case _496: return "Native Village of Ouzinkie"; + case _497: return "Native Village of Paimiut"; + case _498: return "Pauloff Harbor Village"; + case _499: return "Pedro Bay Village"; + case _500: return "Native Village of Perryville"; + case _501: return "Petersburg Indian Association"; + case _502: return "Native Village of Pilot Point"; + case _503: return "Pilot Station Traditional Village"; + case _504: return "Native Village of Pitka's Point"; + case _505: return "Platinum Traditional Village"; + case _506: return "Native Village of Point Hope"; + case _507: return "Native Village of Point Lay"; + case _508: return "Native Village of Port Graham"; + case _509: return "Native Village of Port Heiden"; + case _510: return "Native Village of Port Lions"; + case _511: return "Portage Creek Village (aka Ohgsenakale)"; + case _512: return "Pribilof Islands Aleut Communities of St. Paul & S"; + case _513: return "Qagan Tayagungin Tribe of Sand Point Village"; + case _514: return "Qawalangin Tribe of Unalaska"; + case _515: return "Rampart Village"; + case _516: return "Village of Red Devil"; + case _517: return "Native Village of Ruby"; + case _518: return "Saint George Island(See Pribilof Islands Aleut Com"; + case _519: return "Native Village of Saint Michael"; + case _520: return "Saint Paul Island (See Pribilof Islands Aleut Comm"; + case _521: return "Village of Salamatoff"; + case _522: return "Native Village of Savoonga"; + case _523: return "Organized Village of Saxman"; + case _524: return "Native Village of Scammon Bay"; + case _525: return "Native Village of Selawik"; + case _526: return "Seldovia Village Tribe"; + case _527: return "Shageluk Native Village"; + case _528: return "Native Village of Shaktoolik"; + case _529: return "Native Village of Sheldon's Point"; + case _530: return "Native Village of Shishmaref"; + case _531: return "Shoonaq Tribe of Kodiak"; + case _532: return "Native Village of Shungnak"; + case _533: return "Sitka Tribe of Alaska"; + case _534: return "Skagway Village"; + case _535: return "Village of Sleetmute"; + case _536: return "Village of Solomon"; + case _537: return "South Naknek Village"; + case _538: return "Stebbins Community Association"; + case _539: return "Native Village of Stevens"; + case _540: return "Village of Stony River"; + case _541: return "Takotna Village"; + case _542: return "Native Village of Tanacross"; + case _543: return "Native Village of Tanana"; + case _544: return "Native Village of Tatitlek"; + case _545: return "Native Village of Tazlina"; + case _546: return "Telida Village"; + case _547: return "Native Village of Teller"; + case _548: return "Native Village of Tetlin"; + case _549: return "Central Council of the Tlingit and Haida Indian Tb"; + case _550: return "Traditional Village of Togiak"; + case _551: return "Tuluksak Native Community"; + case _552: return "Native Village of Tuntutuliak"; + case _553: return "Native Village of Tununak"; + case _554: return "Twin Hills Village"; + case _555: return "Native Village of Tyonek"; + case _556: return "Ugashik Village"; + case _557: return "Umkumiute Native Village"; + case _558: return "Native Village of Unalakleet"; + case _559: return "Native Village of Unga"; + case _560: return "Village of Venetie (See Native Village of Venetie"; + case _561: return "Native Village of Venetie Tribal Government (Arcti"; + case _562: return "Village of Wainwright"; + case _563: return "Native Village of Wales"; + case _564: return "Native Village of White Mountain"; + case _565: return "Wrangell Cooperative Association"; + case _566: return "Yakutat Tlingit Tribe"; + case _NATIVEENTITYCONTIGUOUS: return "NativeEntityContiguous"; + case _1: return "Absentee-Shawnee Tribe of Indians of Oklahoma"; + case _10: return "Assiniboine and Sioux Tribes of the Fort Peck Indi"; + case _100: return "Havasupai Tribe of the Havasupai Reservation, Ariz"; + case _101: return "Ho-Chunk Nation of Wisconsin (formerly known as th"; + case _102: return "Hoh Indian Tribe of the Hoh Indian Reservation, Wa"; + case _103: return "Hoopa Valley Tribe, California"; + case _104: return "Hopi Tribe of Arizona"; + case _105: return "Hopland Band of Pomo Indians of the Hopland Ranche"; + case _106: return "Houlton Band of Maliseet Indians of Maine"; + case _107: return "Hualapai Indian Tribe of the Hualapai Indian Reser"; + case _108: return "Huron Potawatomi, Inc., Michigan"; + case _109: return "Inaja Band of Diegueno Mission Indians of the Inaj"; + case _11: return "Augustine Band of Cahuilla Mission Indians of the"; + case _110: return "Ione Band of Miwok Indians of California"; + case _111: return "Iowa Tribe of Kansas and Nebraska"; + case _112: return "Iowa Tribe of Oklahoma"; + case _113: return "Jackson Rancheria of Me-Wuk Indians of California"; + case _114: return "Jamestown S'Klallam Tribe of Washington"; + case _115: return "Jamul Indian Village of California"; + case _116: return "Jena Band of Choctaw Indians, Louisiana"; + case _117: return "Jicarilla Apache Tribe of the Jicarilla Apache Ind"; + case _118: return "Kaibab Band of Paiute Indians of the Kaibab Indian"; + case _119: return "Kalispel Indian Community of the Kalispel Reservat"; + case _12: return "Bad River Band of the Lake Superior Tribe of Chipp"; + case _120: return "Karuk Tribe of California"; + case _121: return "Kashia Band of Pomo Indians of the Stewarts Point"; + case _122: return "Kaw Nation, Oklahoma"; + case _123: return "Keweenaw Bay Indian Community of L'Anse and Ontona"; + case _124: return "Kialegee Tribal Town, Oklahoma"; + case _125: return "Kickapoo Tribe of Indians of the Kickapoo Reservat"; + case _126: return "Kickapoo Tribe of Oklahoma"; + case _127: return "Kickapoo Traditional Tribe of Texas"; + case _128: return "Kiowa Indian Tribe of Oklahoma"; + case _129: return "Klamath Indian Tribe of Oregon"; + case _13: return "Bay Mills Indian Community of the Sault Ste. Marie"; + case _130: return "Kootenai Tribe of Idaho"; + case _131: return "La Jolla Band of Luiseno Mission Indians of the La"; + case _132: return "La Posta Band of Diegueno Mission Indians of the L"; + case _133: return "Lac Courte Oreilles Band of Lake Superior Chippewa"; + case _134: return "Lac du Flambeau Band of Lake Superior Chippewa Ind"; + case _135: return "Lac Vieux Desert Band of Lake Superior Chippewa In"; + case _136: return "Las Vegas Tribe of Paiute Indians of the Las Vegas"; + case _137: return "Little River Band of Ottawa Indians of Michigan"; + case _138: return "Little Traverse Bay Bands of Odawa Indians of Mich"; + case _139: return "Lower Lake Rancheria, California"; + case _14: return "Bear River Band of the Rohnerville Rancheria, Cali"; + case _140: return "Los Coyotes Band of Cahuilla Mission Indians of th"; + case _141: return "Lovelock Paiute Tribe of the Lovelock Indian Colon"; + case _142: return "Lower Brule Sioux Tribe of the Lower Brule Reserva"; + case _143: return "Lower Elwha Tribal Community of the Lower Elwha Re"; + case _144: return "Lower Sioux Indian Community of Minnesota Mdewakan"; + case _145: return "Lummi Tribe of the Lummi Reservation, Washington"; + case _146: return "Lytton Rancheria of California"; + case _147: return "Makah Indian Tribe of the Makah Indian Reservation"; + case _148: return "Manchester Band of Pomo Indians of the Manchester-"; + case _149: return "Manzanita Band of Diegueno Mission Indians of the"; + case _15: return "Berry Creek Rancheria of Maidu Indians of Californ"; + case _150: return "Mashantucket Pequot Tribe of Connecticut"; + case _151: return "Match-e-be-nash-she-wish Band of Pottawatomi India"; + case _152: return "Mechoopda Indian Tribe of Chico Rancheria, Califor"; + case _153: return "Menominee Indian Tribe of Wisconsin"; + case _154: return "Mesa Grande Band of Diegueno Mission Indians of th"; + case _155: return "Mescalero Apache Tribe of the Mescalero Reservatio"; + case _156: return "Miami Tribe of Oklahoma"; + case _157: return "Miccosukee Tribe of Indians of Florida"; + case _158: return "Middletown Rancheria of Pomo Indians of California"; + case _159: return "Minnesota Chippewa Tribe, Minnesota (Six component"; + case _16: return "Big Lagoon Rancheria, California"; + case _160: return "Bois Forte Band (Nett Lake); Fond du Lac Band; Gra"; + case _161: return "Mississippi Band of Choctaw Indians, Mississippi"; + case _162: return "Moapa Band of Paiute Indians of the Moapa River In"; + case _163: return "Modoc Tribe of Oklahoma"; + case _164: return "Mohegan Indian Tribe of Connecticut"; + case _165: return "Mooretown Rancheria of Maidu Indians of California"; + case _166: return "Morongo Band of Cahuilla Mission Indians of the Mo"; + case _167: return "Muckleshoot Indian Tribe of the Muckleshoot Reserv"; + case _168: return "Muscogee (Creek) Nation, Oklahoma"; + case _169: return "Narragansett Indian Tribe of Rhode Island"; + case _17: return "Big Pine Band of Owens Valley Paiute Shoshone Indi"; + case _170: return "Navajo Nation, Arizona, New Mexico & Utah"; + case _171: return "Nez Perce Tribe of Idaho"; + case _172: return "Nisqually Indian Tribe of the Nisqually Reservatio"; + case _173: return "Nooksack Indian Tribe of Washington"; + case _174: return "Northern Cheyenne Tribe of the Northern Cheyenne I"; + case _175: return "Northfork Rancheria of Mono Indians of California"; + case _176: return "Northwestern Band of Shoshoni Nation of Utah (Wash"; + case _177: return "Oglala Sioux Tribe of the Pine Ridge Reservation,"; + case _178: return "Omaha Tribe of Nebraska"; + case _179: return "Oneida Nation of New York"; + case _18: return "Big Sandy Rancheria of Mono Indians of California"; + case _180: return "Oneida Tribe of Wisconsin"; + case _181: return "Onondaga Nation of New York"; + case _182: return "Osage Tribe, Oklahoma"; + case _183: return "Ottawa Tribe of Oklahoma"; + case _184: return "Otoe-Missouria Tribe of Indians, Oklahoma"; + case _185: return "Paiute Indian Tribe of Utah"; + case _186: return "Paiute-Shoshone Indians of the Bishop Community of"; + case _187: return "Paiute-Shoshone Tribe of the Fallon Reservation an"; + case _188: return "Paiute-Shoshone Indians of the Lone Pine Community"; + case _189: return "Pala Band of Luiseno Mission Indians of the Pala R"; + case _19: return "Big Valley Band of Pomo Indians of the Big Valley"; + case _190: return "Pascua Yaqui Tribe of Arizona"; + case _191: return "Paskenta Band of Nomlaki Indians of California"; + case _192: return "Passamaquoddy Tribe of Maine"; + case _193: return "Pauma Band of Luiseno Mission Indians of the Pauma"; + case _194: return "Pawnee Nation of Oklahoma"; + case _195: return "Pechanga Band of Luiseno Mission Indians of the Pe"; + case _196: return "Penobscot Tribe of Maine"; + case _197: return "Peoria Tribe of Indians of Oklahoma"; + case _198: return "Picayune Rancheria of Chukchansi Indians of Califo"; + case _199: return "Pinoleville Rancheria of Pomo Indians of Californi"; + case _2: return "Agua Caliente Band of Cahuilla Indians of the Agua"; + case _20: return "Blackfeet Tribe of the Blackfeet Indian Reservatio"; + case _200: return "Pit River Tribe, California (includes Big Bend, Lo"; + case _201: return "Poarch Band of Creek Indians of Alabama"; + case _202: return "Pokagon Band of Potawatomi Indians of Michigan"; + case _203: return "Ponca Tribe of Indians of Oklahoma"; + case _204: return "Ponca Tribe of Nebraska"; + case _205: return "Port Gamble Indian Community of the Port Gamble Re"; + case _206: return "Potter Valley Rancheria of Pomo Indians of Califor"; + case _207: return "Prairie Band of Potawatomi Indians, Kansas"; + case _208: return "Prairie Island Indian Community of Minnesota Mdewa"; + case _209: return "Pueblo of Acoma, New Mexico"; + case _21: return "Blue Lake Rancheria, California"; + case _210: return "Pueblo of Cochiti, New Mexico"; + case _211: return "Pueblo of Jemez, New Mexico"; + case _212: return "Pueblo of Isleta, New Mexico"; + case _213: return "Pueblo of Laguna, New Mexico"; + case _214: return "Pueblo of Nambe, New Mexico"; + case _215: return "Pueblo of Picuris, New Mexico"; + case _216: return "Pueblo of Pojoaque, New Mexico"; + case _217: return "Pueblo of San Felipe, New Mexico"; + case _218: return "Pueblo of San Juan, New Mexico"; + case _219: return "Pueblo of San Ildefonso, New Mexico"; + case _22: return "Bridgeport Paiute Indian Colony of California"; + case _220: return "Pueblo of Sandia, New Mexico"; + case _221: return "Pueblo of Santa Ana, New Mexico"; + case _222: return "Pueblo of Santa Clara, New Mexico"; + case _223: return "Pueblo of Santo Domingo, New Mexico"; + case _224: return "Pueblo of Taos, New Mexico"; + case _225: return "Pueblo of Tesuque, New Mexico"; + case _226: return "Pueblo of Zia, New Mexico"; + case _227: return "Puyallup Tribe of the Puyallup Reservation, Washin"; + case _228: return "Pyramid Lake Paiute Tribe of the Pyramid Lake Rese"; + case _229: return "Quapaw Tribe of Indians, Oklahoma"; + case _23: return "Buena Vista Rancheria of Me-Wuk Indians of Califor"; + case _230: return "Quartz Valley Indian Community of the Quartz Valle"; + case _231: return "Quechan Tribe of the Fort Yuma Indian Reservation,"; + case _232: return "Quileute Tribe of the Quileute Reservation, Washin"; + case _233: return "Quinault Tribe of the Quinault Reservation, Washin"; + case _234: return "Ramona Band or Village of Cahuilla Mission Indians"; + case _235: return "Red Cliff Band of Lake Superior Chippewa Indians o"; + case _236: return "Red Lake Band of Chippewa Indians of the Red Lake"; + case _237: return "Redding Rancheria, California"; + case _238: return "Redwood Valley Rancheria of Pomo Indians of Califo"; + case _239: return "Reno-Sparks Indian Colony, Nevada"; + case _24: return "Burns Paiute Tribe of the Burns Paiute Indian Colo"; + case _240: return "Resighini Rancheria, California (formerly known as"; + case _241: return "Rincon Band of Luiseno Mission Indians of the Rinc"; + case _242: return "Robinson Rancheria of Pomo Indians of California"; + case _243: return "Rosebud Sioux Tribe of the Rosebud Indian Reservat"; + case _244: return "Round Valley Indian Tribes of the Round Valley Res"; + case _245: return "Rumsey Indian Rancheria of Wintun Indians of Calif"; + case _246: return "Sac and Fox Tribe of the Mississippi in Iowa"; + case _247: return "Sac and Fox Nation of Missouri in Kansas and Nebra"; + case _248: return "Sac and Fox Nation, Oklahoma"; + case _249: return "Saginaw Chippewa Indian Tribe of Michigan, Isabell"; + case _25: return "Cabazon Band of Cahuilla Mission Indians of the Ca"; + case _250: return "Salt River Pima-Maricopa Indian Community of the S"; + case _251: return "Samish Indian Tribe, Washington"; + case _252: return "San Carlos Apache Tribe of the San Carlos Reservat"; + case _253: return "San Juan Southern Paiute Tribe of Arizona"; + case _254: return "San Manual Band of Serrano Mission Indians of the"; + case _255: return "San Pasqual Band of Diegueno Mission Indians of Ca"; + case _256: return "Santa Rosa Indian Community of the Santa Rosa Ranc"; + case _257: return "Santa Rosa Band of Cahuilla Mission Indians of the"; + case _258: return "Santa Ynez Band of Chumash Mission Indians of the"; + case _259: return "Santa Ysabel Band of Diegueno Mission Indians of t"; + case _26: return "Cachil DeHe Band of Wintun Indians of the Colusa I"; + case _260: return "Santee Sioux Tribe of the Santee Reservation of Ne"; + case _261: return "Sauk-Suiattle Indian Tribe of Washington"; + case _262: return "Sault Ste. Marie Tribe of Chippewa Indians of Mich"; + case _263: return "Scotts Valley Band of Pomo Indians of California"; + case _264: return "Seminole Nation of Oklahoma"; + case _265: return "Seminole Tribe of Florida, Dania, Big Cypress, Bri"; + case _266: return "Seneca Nation of New York"; + case _267: return "Seneca-Cayuga Tribe of Oklahoma"; + case _268: return "Shakopee Mdewakanton Sioux Community of Minnesota"; + case _269: return "Shawnee Tribe, Oklahoma"; + case _27: return "Caddo Indian Tribe of Oklahoma"; + case _270: return "Sherwood Valley Rancheria of Pomo Indians of Calif"; + case _271: return "Shingle Springs Band of Miwok Indians, Shingle Spr"; + case _272: return "Shoalwater Bay Tribe of the Shoalwater Bay Indian"; + case _273: return "Shoshone Tribe of the Wind River Reservation, Wyom"; + case _274: return "Shoshone-Bannock Tribes of the Fort Hall Reservati"; + case _275: return "Shoshone-Paiute Tribes of the Duck Valley Reservat"; + case _276: return "Sisseton-Wahpeton Sioux Tribe of the Lake Traverse"; + case _277: return "Skokomish Indian Tribe of the Skokomish Reservatio"; + case _278: return "Skull Valley Band of Goshute Indians of Utah"; + case _279: return "Smith River Rancheria, California"; + case _28: return "Cahuilla Band of Mission Indians of the Cahuilla R"; + case _280: return "Snoqualmie Tribe, Washington"; + case _281: return "Soboba Band of Luiseno Indians, California (former"; + case _282: return "Sokaogon Chippewa Community of the Mole Lake Band"; + case _283: return "Southern Ute Indian Tribe of the Southern Ute Rese"; + case _284: return "Spirit Lake Tribe, North Dakota (formerly known as"; + case _285: return "Spokane Tribe of the Spokane Reservation, Washingt"; + case _286: return "Squaxin Island Tribe of the Squaxin Island Reserva"; + case _287: return "St. Croix Chippewa Indians of Wisconsin, St. Croix"; + case _288: return "St. Regis Band of Mohawk Indians of New York"; + case _289: return "Standing Rock Sioux Tribe of North & South Dakota"; + case _29: return "Cahto Indian Tribe of the Laytonville Rancheria, C"; + case _290: return "Stockbridge-Munsee Community of Mohican Indians of"; + case _291: return "Stillaguamish Tribe of Washington"; + case _292: return "Summit Lake Paiute Tribe of Nevada"; + case _293: return "Suquamish Indian Tribe of the Port Madison Reserva"; + case _294: return "Susanville Indian Rancheria, California"; + case _295: return "Swinomish Indians of the Swinomish Reservation, Wa"; + case _296: return "Sycuan Band of Diegueno Mission Indians of Califor"; + case _297: return "Table Bluff Reservation - Wiyot Tribe, California"; + case _298: return "Table Mountain Rancheria of California"; + case _299: return "Te-Moak Tribe of Western Shoshone Indians of Nevad"; + case _3: return "Ak Chin Indian Community of the Maricopa (Ak Chin)"; + case _30: return "California Valley Miwok Tribe, California (formerl"; + case _300: return "Thlopthlocco Tribal Town, Oklahoma"; + case _301: return "Three Affiliated Tribes of the Fort Berthold Reser"; + case _302: return "Tohono O'odham Nation of Arizona"; + case _303: return "Tonawanda Band of Seneca Indians of New York"; + case _304: return "Tonkawa Tribe of Indians of Oklahoma"; + case _305: return "Tonto Apache Tribe of Arizona"; + case _306: return "Torres-Martinez Band of Cahuilla Mission Indians o"; + case _307: return "Tule River Indian Tribe of the Tule River Reservat"; + case _308: return "Tulalip Tribes of the Tulalip Reservation, Washing"; + case _309: return "Tunica-Biloxi Indian Tribe of Louisiana"; + case _31: return "Campo Band of Diegueno Mission Indians of the Camp"; + case _310: return "Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra"; + case _311: return "Turtle Mountain Band of Chippewa Indians of North"; + case _312: return "Tuscarora Nation of New York"; + case _313: return "Twenty-Nine Palms Band of Mission Indians of Calif"; + case _314: return "United Auburn Indian Community of the Auburn Ranch"; + case _315: return "United Keetoowah Band of Cherokee Indians of Oklah"; + case _316: return "Upper Lake Band of Pomo Indians of Upper Lake Ranc"; + case _317: return "Upper Sioux Indian Community of the Upper Sioux Re"; + case _318: return "Upper Skagit Indian Tribe of Washington"; + case _319: return "Ute Indian Tribe of the Uintah & Ouray Reservation"; + case _32: return "Capitan Grande Band of Diegueno Mission Indians of"; + case _320: return "Ute Mountain Tribe of the Ute Mountain Reservation"; + case _321: return "Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R"; + case _322: return "Walker River Paiute Tribe of the Walker River Rese"; + case _323: return "Wampanoag Tribe of Gay Head (Aquinnah) of Massachu"; + case _324: return "Washoe Tribe of Nevada & California (Carson Colony"; + case _325: return "White Mountain Apache Tribe of the Fort Apache Res"; + case _326: return "Wichita and Affiliated Tribes (Wichita, Keechi, Wa"; + case _327: return "Winnebago Tribe of Nebraska"; + case _328: return "Winnemucca Indian Colony of Nevada"; + case _329: return "Wyandotte Tribe of Oklahoma"; + case _33: return "Barona Group of Capitan Grande Band of Mission Ind"; + case _330: return "Yankton Sioux Tribe of South Dakota"; + case _331: return "Yavapai-Apache Nation of the Camp Verde Indian Res"; + case _332: return "Yavapai-Prescott Tribe of the Yavapai Reservation,"; + case _333: return "Yerington Paiute Tribe of the Yerington Colony & C"; + case _334: return "Yomba Shoshone Tribe of the Yomba Reservation, Nev"; + case _335: return "Ysleta Del Sur Pueblo of Texas"; + case _336: return "Yurok Tribe of the Yurok Reservation, California"; + case _337: return "Zuni Tribe of the Zuni Reservation, New Mexico"; + case _34: return "Viejas (Baron Long) Group of Capitan Grande Band o"; + case _35: return "Catawba Indian Nation (aka Catawba Tribe of South"; + case _36: return "Cayuga Nation of New York"; + case _37: return "Cedarville Rancheria, California"; + case _38: return "Chemehuevi Indian Tribe of the Chemehuevi Reservat"; + case _39: return "Cher-Ae Heights Indian Community of the Trinidad R"; + case _4: return "Alabama-Coushatta Tribes of Texas"; + case _40: return "Cherokee Nation, Oklahoma"; + case _41: return "Cheyenne-Arapaho Tribes of Oklahoma"; + case _42: return "Cheyenne River Sioux Tribe of the Cheyenne River R"; + case _43: return "Chickasaw Nation, Oklahoma"; + case _44: return "Chicken Ranch Rancheria of Me-Wuk Indians of Calif"; + case _45: return "Chippewa-Cree Indians of the Rocky Boy's Reservati"; + case _46: return "Chitimacha Tribe of Louisiana"; + case _47: return "Choctaw Nation of Oklahoma"; + case _48: return "Citizen Potawatomi Nation, Oklahoma"; + case _49: return "Cloverdale Rancheria of Pomo Indians of California"; + case _5: return "Alabama-Quassarte Tribal Town, Oklahoma"; + case _50: return "Cocopah Tribe of Arizona"; + case _51: return "Coeur D'Alene Tribe of the Coeur D'Alene Reservati"; + case _52: return "Cold Springs Rancheria of Mono Indians of Californ"; + case _53: return "Colorado River Indian Tribes of the Colorado River"; + case _54: return "Comanche Indian Tribe, Oklahoma"; + case _55: return "Confederated Salish & Kootenai Tribes of the Flath"; + case _56: return "Confederated Tribes of the Chehalis Reservation, W"; + case _57: return "Confederated Tribes of the Colville Reservation, W"; + case _58: return "Confederated Tribes of the Coos, Lower Umpqua and"; + case _59: return "Confederated Tribes of the Goshute Reservation, Ne"; + case _6: return "Alturas Indian Rancheria, California"; + case _60: return "Confederated Tribes of the Grand Ronde Community o"; + case _61: return "Confederated Tribes of the Siletz Reservation, Ore"; + case _62: return "Confederated Tribes of the Umatilla Reservation, O"; + case _63: return "Confederated Tribes of the Warm Springs Reservatio"; + case _64: return "Confederated Tribes and Bands of the Yakama Indian"; + case _65: return "Coquille Tribe of Oregon"; + case _66: return "Cortina Indian Rancheria of Wintun Indians of Cali"; + case _67: return "Coushatta Tribe of Louisiana"; + case _68: return "Cow Creek Band of Umpqua Indians of Oregon"; + case _69: return "Coyote Valley Band of Pomo Indians of California"; + case _7: return "Apache Tribe of Oklahoma"; + case _70: return "Crow Tribe of Montana"; + case _71: return "Crow Creek Sioux Tribe of the Crow Creek Reservati"; + case _72: return "Cuyapaipe Community of Diegueno Mission Indians of"; + case _73: return "Death Valley Timbi-Sha Shoshone Band of California"; + case _74: return "Delaware Nation, Oklahoma (formerly Delaware Tribe"; + case _75: return "Delaware Tribe of Indians, Oklahoma"; + case _76: return "Dry Creek Rancheria of Pomo Indians of California"; + case _77: return "Duckwater Shoshone Tribe of the Duckwater Reservat"; + case _78: return "Eastern Band of Cherokee Indians of North Carolina"; + case _79: return "Eastern Shawnee Tribe of Oklahoma"; + case _8: return "Arapahoe Tribe of the Wind River Reservation, Wyom"; + case _80: return "Elem Indian Colony of Pomo Indians of the Sulphur"; + case _81: return "Elk Valley Rancheria, California"; + case _82: return "Ely Shoshone Tribe of Nevada"; + case _83: return "Enterprise Rancheria of Maidu Indians of Californi"; + case _84: return "Flandreau Santee Sioux Tribe of South Dakota"; + case _85: return "Forest County Potawatomi Community of Wisconsin Po"; + case _86: return "Fort Belknap Indian Community of the Fort Belknap"; + case _87: return "Fort Bidwell Indian Community of the Fort Bidwell"; + case _88: return "Fort Independence Indian Community of Paiute India"; + case _89: return "Fort McDermitt Paiute and Shoshone Tribes of the F"; + case _9: return "Aroostook Band of Micmac Indians of Maine"; + case _90: return "Fort McDowell Yavapai Nation, Arizona (formerly th"; + case _91: return "Fort Mojave Indian Tribe of Arizona, California"; + case _92: return "Fort Sill Apache Tribe of Oklahoma"; + case _93: return "Gila River Indian Community of the Gila River Indi"; + case _94: return "Grand Traverse Band of Ottawa & Chippewa Indians o"; + case _95: return "Graton Rancheria, California"; + case _96: return "Greenville Rancheria of Maidu Indians of Californi"; + case _97: return "Grindstone Indian Rancheria of Wintun-Wailaki Indi"; + case _98: return "Guidiville Rancheria of California"; + case _99: return "Hannahville Indian Community of Wisconsin Potawato"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUSEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUSEnumFactory.java new file mode 100644 index 00000000000..e9df3008c8f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3TribalEntityUSEnumFactory.java @@ -0,0 +1,2323 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3TribalEntityUSEnumFactory implements EnumFactory { + + public V3TribalEntityUS fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NativeEntityAlaska".equals(codeString)) + return V3TribalEntityUS._NATIVEENTITYALASKA; + if ("338".equals(codeString)) + return V3TribalEntityUS._338; + if ("339".equals(codeString)) + return V3TribalEntityUS._339; + if ("340".equals(codeString)) + return V3TribalEntityUS._340; + if ("341".equals(codeString)) + return V3TribalEntityUS._341; + if ("342".equals(codeString)) + return V3TribalEntityUS._342; + if ("343".equals(codeString)) + return V3TribalEntityUS._343; + if ("344".equals(codeString)) + return V3TribalEntityUS._344; + if ("345".equals(codeString)) + return V3TribalEntityUS._345; + if ("346".equals(codeString)) + return V3TribalEntityUS._346; + if ("347".equals(codeString)) + return V3TribalEntityUS._347; + if ("348".equals(codeString)) + return V3TribalEntityUS._348; + if ("349".equals(codeString)) + return V3TribalEntityUS._349; + if ("350".equals(codeString)) + return V3TribalEntityUS._350; + if ("351".equals(codeString)) + return V3TribalEntityUS._351; + if ("352".equals(codeString)) + return V3TribalEntityUS._352; + if ("353".equals(codeString)) + return V3TribalEntityUS._353; + if ("354".equals(codeString)) + return V3TribalEntityUS._354; + if ("355".equals(codeString)) + return V3TribalEntityUS._355; + if ("356".equals(codeString)) + return V3TribalEntityUS._356; + if ("357".equals(codeString)) + return V3TribalEntityUS._357; + if ("358".equals(codeString)) + return V3TribalEntityUS._358; + if ("359".equals(codeString)) + return V3TribalEntityUS._359; + if ("360".equals(codeString)) + return V3TribalEntityUS._360; + if ("361".equals(codeString)) + return V3TribalEntityUS._361; + if ("362".equals(codeString)) + return V3TribalEntityUS._362; + if ("363".equals(codeString)) + return V3TribalEntityUS._363; + if ("364".equals(codeString)) + return V3TribalEntityUS._364; + if ("365".equals(codeString)) + return V3TribalEntityUS._365; + if ("366".equals(codeString)) + return V3TribalEntityUS._366; + if ("367".equals(codeString)) + return V3TribalEntityUS._367; + if ("368".equals(codeString)) + return V3TribalEntityUS._368; + if ("369".equals(codeString)) + return V3TribalEntityUS._369; + if ("370".equals(codeString)) + return V3TribalEntityUS._370; + if ("371".equals(codeString)) + return V3TribalEntityUS._371; + if ("372".equals(codeString)) + return V3TribalEntityUS._372; + if ("373".equals(codeString)) + return V3TribalEntityUS._373; + if ("374".equals(codeString)) + return V3TribalEntityUS._374; + if ("375".equals(codeString)) + return V3TribalEntityUS._375; + if ("376".equals(codeString)) + return V3TribalEntityUS._376; + if ("377".equals(codeString)) + return V3TribalEntityUS._377; + if ("378".equals(codeString)) + return V3TribalEntityUS._378; + if ("379".equals(codeString)) + return V3TribalEntityUS._379; + if ("380".equals(codeString)) + return V3TribalEntityUS._380; + if ("381".equals(codeString)) + return V3TribalEntityUS._381; + if ("382".equals(codeString)) + return V3TribalEntityUS._382; + if ("383".equals(codeString)) + return V3TribalEntityUS._383; + if ("384".equals(codeString)) + return V3TribalEntityUS._384; + if ("385".equals(codeString)) + return V3TribalEntityUS._385; + if ("386".equals(codeString)) + return V3TribalEntityUS._386; + if ("387".equals(codeString)) + return V3TribalEntityUS._387; + if ("388".equals(codeString)) + return V3TribalEntityUS._388; + if ("389".equals(codeString)) + return V3TribalEntityUS._389; + if ("390".equals(codeString)) + return V3TribalEntityUS._390; + if ("391".equals(codeString)) + return V3TribalEntityUS._391; + if ("392".equals(codeString)) + return V3TribalEntityUS._392; + if ("393".equals(codeString)) + return V3TribalEntityUS._393; + if ("394".equals(codeString)) + return V3TribalEntityUS._394; + if ("395".equals(codeString)) + return V3TribalEntityUS._395; + if ("396".equals(codeString)) + return V3TribalEntityUS._396; + if ("397".equals(codeString)) + return V3TribalEntityUS._397; + if ("398".equals(codeString)) + return V3TribalEntityUS._398; + if ("399".equals(codeString)) + return V3TribalEntityUS._399; + if ("400".equals(codeString)) + return V3TribalEntityUS._400; + if ("401".equals(codeString)) + return V3TribalEntityUS._401; + if ("402".equals(codeString)) + return V3TribalEntityUS._402; + if ("403".equals(codeString)) + return V3TribalEntityUS._403; + if ("404".equals(codeString)) + return V3TribalEntityUS._404; + if ("405".equals(codeString)) + return V3TribalEntityUS._405; + if ("406".equals(codeString)) + return V3TribalEntityUS._406; + if ("407".equals(codeString)) + return V3TribalEntityUS._407; + if ("408".equals(codeString)) + return V3TribalEntityUS._408; + if ("409".equals(codeString)) + return V3TribalEntityUS._409; + if ("410".equals(codeString)) + return V3TribalEntityUS._410; + if ("411".equals(codeString)) + return V3TribalEntityUS._411; + if ("412".equals(codeString)) + return V3TribalEntityUS._412; + if ("413".equals(codeString)) + return V3TribalEntityUS._413; + if ("414".equals(codeString)) + return V3TribalEntityUS._414; + if ("415".equals(codeString)) + return V3TribalEntityUS._415; + if ("416".equals(codeString)) + return V3TribalEntityUS._416; + if ("417".equals(codeString)) + return V3TribalEntityUS._417; + if ("418".equals(codeString)) + return V3TribalEntityUS._418; + if ("419".equals(codeString)) + return V3TribalEntityUS._419; + if ("420".equals(codeString)) + return V3TribalEntityUS._420; + if ("421".equals(codeString)) + return V3TribalEntityUS._421; + if ("422".equals(codeString)) + return V3TribalEntityUS._422; + if ("423".equals(codeString)) + return V3TribalEntityUS._423; + if ("424".equals(codeString)) + return V3TribalEntityUS._424; + if ("425".equals(codeString)) + return V3TribalEntityUS._425; + if ("426".equals(codeString)) + return V3TribalEntityUS._426; + if ("427".equals(codeString)) + return V3TribalEntityUS._427; + if ("428".equals(codeString)) + return V3TribalEntityUS._428; + if ("429".equals(codeString)) + return V3TribalEntityUS._429; + if ("430".equals(codeString)) + return V3TribalEntityUS._430; + if ("431".equals(codeString)) + return V3TribalEntityUS._431; + if ("432".equals(codeString)) + return V3TribalEntityUS._432; + if ("433".equals(codeString)) + return V3TribalEntityUS._433; + if ("434".equals(codeString)) + return V3TribalEntityUS._434; + if ("435".equals(codeString)) + return V3TribalEntityUS._435; + if ("436".equals(codeString)) + return V3TribalEntityUS._436; + if ("437".equals(codeString)) + return V3TribalEntityUS._437; + if ("438".equals(codeString)) + return V3TribalEntityUS._438; + if ("439".equals(codeString)) + return V3TribalEntityUS._439; + if ("440".equals(codeString)) + return V3TribalEntityUS._440; + if ("441".equals(codeString)) + return V3TribalEntityUS._441; + if ("442".equals(codeString)) + return V3TribalEntityUS._442; + if ("443".equals(codeString)) + return V3TribalEntityUS._443; + if ("444".equals(codeString)) + return V3TribalEntityUS._444; + if ("445".equals(codeString)) + return V3TribalEntityUS._445; + if ("446".equals(codeString)) + return V3TribalEntityUS._446; + if ("447".equals(codeString)) + return V3TribalEntityUS._447; + if ("448".equals(codeString)) + return V3TribalEntityUS._448; + if ("449".equals(codeString)) + return V3TribalEntityUS._449; + if ("450".equals(codeString)) + return V3TribalEntityUS._450; + if ("451".equals(codeString)) + return V3TribalEntityUS._451; + if ("452".equals(codeString)) + return V3TribalEntityUS._452; + if ("453".equals(codeString)) + return V3TribalEntityUS._453; + if ("454".equals(codeString)) + return V3TribalEntityUS._454; + if ("455".equals(codeString)) + return V3TribalEntityUS._455; + if ("456".equals(codeString)) + return V3TribalEntityUS._456; + if ("457".equals(codeString)) + return V3TribalEntityUS._457; + if ("458".equals(codeString)) + return V3TribalEntityUS._458; + if ("459".equals(codeString)) + return V3TribalEntityUS._459; + if ("460".equals(codeString)) + return V3TribalEntityUS._460; + if ("461".equals(codeString)) + return V3TribalEntityUS._461; + if ("462".equals(codeString)) + return V3TribalEntityUS._462; + if ("463".equals(codeString)) + return V3TribalEntityUS._463; + if ("464".equals(codeString)) + return V3TribalEntityUS._464; + if ("465".equals(codeString)) + return V3TribalEntityUS._465; + if ("466".equals(codeString)) + return V3TribalEntityUS._466; + if ("467".equals(codeString)) + return V3TribalEntityUS._467; + if ("468".equals(codeString)) + return V3TribalEntityUS._468; + if ("469".equals(codeString)) + return V3TribalEntityUS._469; + if ("470".equals(codeString)) + return V3TribalEntityUS._470; + if ("471".equals(codeString)) + return V3TribalEntityUS._471; + if ("472".equals(codeString)) + return V3TribalEntityUS._472; + if ("473".equals(codeString)) + return V3TribalEntityUS._473; + if ("474".equals(codeString)) + return V3TribalEntityUS._474; + if ("475".equals(codeString)) + return V3TribalEntityUS._475; + if ("476".equals(codeString)) + return V3TribalEntityUS._476; + if ("477".equals(codeString)) + return V3TribalEntityUS._477; + if ("478".equals(codeString)) + return V3TribalEntityUS._478; + if ("479".equals(codeString)) + return V3TribalEntityUS._479; + if ("480".equals(codeString)) + return V3TribalEntityUS._480; + if ("481".equals(codeString)) + return V3TribalEntityUS._481; + if ("482".equals(codeString)) + return V3TribalEntityUS._482; + if ("483".equals(codeString)) + return V3TribalEntityUS._483; + if ("484".equals(codeString)) + return V3TribalEntityUS._484; + if ("485".equals(codeString)) + return V3TribalEntityUS._485; + if ("486".equals(codeString)) + return V3TribalEntityUS._486; + if ("487".equals(codeString)) + return V3TribalEntityUS._487; + if ("488".equals(codeString)) + return V3TribalEntityUS._488; + if ("489".equals(codeString)) + return V3TribalEntityUS._489; + if ("490".equals(codeString)) + return V3TribalEntityUS._490; + if ("491".equals(codeString)) + return V3TribalEntityUS._491; + if ("492".equals(codeString)) + return V3TribalEntityUS._492; + if ("493".equals(codeString)) + return V3TribalEntityUS._493; + if ("494".equals(codeString)) + return V3TribalEntityUS._494; + if ("495".equals(codeString)) + return V3TribalEntityUS._495; + if ("496".equals(codeString)) + return V3TribalEntityUS._496; + if ("497".equals(codeString)) + return V3TribalEntityUS._497; + if ("498".equals(codeString)) + return V3TribalEntityUS._498; + if ("499".equals(codeString)) + return V3TribalEntityUS._499; + if ("500".equals(codeString)) + return V3TribalEntityUS._500; + if ("501".equals(codeString)) + return V3TribalEntityUS._501; + if ("502".equals(codeString)) + return V3TribalEntityUS._502; + if ("503".equals(codeString)) + return V3TribalEntityUS._503; + if ("504".equals(codeString)) + return V3TribalEntityUS._504; + if ("505".equals(codeString)) + return V3TribalEntityUS._505; + if ("506".equals(codeString)) + return V3TribalEntityUS._506; + if ("507".equals(codeString)) + return V3TribalEntityUS._507; + if ("508".equals(codeString)) + return V3TribalEntityUS._508; + if ("509".equals(codeString)) + return V3TribalEntityUS._509; + if ("510".equals(codeString)) + return V3TribalEntityUS._510; + if ("511".equals(codeString)) + return V3TribalEntityUS._511; + if ("512".equals(codeString)) + return V3TribalEntityUS._512; + if ("513".equals(codeString)) + return V3TribalEntityUS._513; + if ("514".equals(codeString)) + return V3TribalEntityUS._514; + if ("515".equals(codeString)) + return V3TribalEntityUS._515; + if ("516".equals(codeString)) + return V3TribalEntityUS._516; + if ("517".equals(codeString)) + return V3TribalEntityUS._517; + if ("518".equals(codeString)) + return V3TribalEntityUS._518; + if ("519".equals(codeString)) + return V3TribalEntityUS._519; + if ("520".equals(codeString)) + return V3TribalEntityUS._520; + if ("521".equals(codeString)) + return V3TribalEntityUS._521; + if ("522".equals(codeString)) + return V3TribalEntityUS._522; + if ("523".equals(codeString)) + return V3TribalEntityUS._523; + if ("524".equals(codeString)) + return V3TribalEntityUS._524; + if ("525".equals(codeString)) + return V3TribalEntityUS._525; + if ("526".equals(codeString)) + return V3TribalEntityUS._526; + if ("527".equals(codeString)) + return V3TribalEntityUS._527; + if ("528".equals(codeString)) + return V3TribalEntityUS._528; + if ("529".equals(codeString)) + return V3TribalEntityUS._529; + if ("530".equals(codeString)) + return V3TribalEntityUS._530; + if ("531".equals(codeString)) + return V3TribalEntityUS._531; + if ("532".equals(codeString)) + return V3TribalEntityUS._532; + if ("533".equals(codeString)) + return V3TribalEntityUS._533; + if ("534".equals(codeString)) + return V3TribalEntityUS._534; + if ("535".equals(codeString)) + return V3TribalEntityUS._535; + if ("536".equals(codeString)) + return V3TribalEntityUS._536; + if ("537".equals(codeString)) + return V3TribalEntityUS._537; + if ("538".equals(codeString)) + return V3TribalEntityUS._538; + if ("539".equals(codeString)) + return V3TribalEntityUS._539; + if ("540".equals(codeString)) + return V3TribalEntityUS._540; + if ("541".equals(codeString)) + return V3TribalEntityUS._541; + if ("542".equals(codeString)) + return V3TribalEntityUS._542; + if ("543".equals(codeString)) + return V3TribalEntityUS._543; + if ("544".equals(codeString)) + return V3TribalEntityUS._544; + if ("545".equals(codeString)) + return V3TribalEntityUS._545; + if ("546".equals(codeString)) + return V3TribalEntityUS._546; + if ("547".equals(codeString)) + return V3TribalEntityUS._547; + if ("548".equals(codeString)) + return V3TribalEntityUS._548; + if ("549".equals(codeString)) + return V3TribalEntityUS._549; + if ("550".equals(codeString)) + return V3TribalEntityUS._550; + if ("551".equals(codeString)) + return V3TribalEntityUS._551; + if ("552".equals(codeString)) + return V3TribalEntityUS._552; + if ("553".equals(codeString)) + return V3TribalEntityUS._553; + if ("554".equals(codeString)) + return V3TribalEntityUS._554; + if ("555".equals(codeString)) + return V3TribalEntityUS._555; + if ("556".equals(codeString)) + return V3TribalEntityUS._556; + if ("557".equals(codeString)) + return V3TribalEntityUS._557; + if ("558".equals(codeString)) + return V3TribalEntityUS._558; + if ("559".equals(codeString)) + return V3TribalEntityUS._559; + if ("560".equals(codeString)) + return V3TribalEntityUS._560; + if ("561".equals(codeString)) + return V3TribalEntityUS._561; + if ("562".equals(codeString)) + return V3TribalEntityUS._562; + if ("563".equals(codeString)) + return V3TribalEntityUS._563; + if ("564".equals(codeString)) + return V3TribalEntityUS._564; + if ("565".equals(codeString)) + return V3TribalEntityUS._565; + if ("566".equals(codeString)) + return V3TribalEntityUS._566; + if ("_NativeEntityContiguous".equals(codeString)) + return V3TribalEntityUS._NATIVEENTITYCONTIGUOUS; + if ("1".equals(codeString)) + return V3TribalEntityUS._1; + if ("10".equals(codeString)) + return V3TribalEntityUS._10; + if ("100".equals(codeString)) + return V3TribalEntityUS._100; + if ("101".equals(codeString)) + return V3TribalEntityUS._101; + if ("102".equals(codeString)) + return V3TribalEntityUS._102; + if ("103".equals(codeString)) + return V3TribalEntityUS._103; + if ("104".equals(codeString)) + return V3TribalEntityUS._104; + if ("105".equals(codeString)) + return V3TribalEntityUS._105; + if ("106".equals(codeString)) + return V3TribalEntityUS._106; + if ("107".equals(codeString)) + return V3TribalEntityUS._107; + if ("108".equals(codeString)) + return V3TribalEntityUS._108; + if ("109".equals(codeString)) + return V3TribalEntityUS._109; + if ("11".equals(codeString)) + return V3TribalEntityUS._11; + if ("110".equals(codeString)) + return V3TribalEntityUS._110; + if ("111".equals(codeString)) + return V3TribalEntityUS._111; + if ("112".equals(codeString)) + return V3TribalEntityUS._112; + if ("113".equals(codeString)) + return V3TribalEntityUS._113; + if ("114".equals(codeString)) + return V3TribalEntityUS._114; + if ("115".equals(codeString)) + return V3TribalEntityUS._115; + if ("116".equals(codeString)) + return V3TribalEntityUS._116; + if ("117".equals(codeString)) + return V3TribalEntityUS._117; + if ("118".equals(codeString)) + return V3TribalEntityUS._118; + if ("119".equals(codeString)) + return V3TribalEntityUS._119; + if ("12".equals(codeString)) + return V3TribalEntityUS._12; + if ("120".equals(codeString)) + return V3TribalEntityUS._120; + if ("121".equals(codeString)) + return V3TribalEntityUS._121; + if ("122".equals(codeString)) + return V3TribalEntityUS._122; + if ("123".equals(codeString)) + return V3TribalEntityUS._123; + if ("124".equals(codeString)) + return V3TribalEntityUS._124; + if ("125".equals(codeString)) + return V3TribalEntityUS._125; + if ("126".equals(codeString)) + return V3TribalEntityUS._126; + if ("127".equals(codeString)) + return V3TribalEntityUS._127; + if ("128".equals(codeString)) + return V3TribalEntityUS._128; + if ("129".equals(codeString)) + return V3TribalEntityUS._129; + if ("13".equals(codeString)) + return V3TribalEntityUS._13; + if ("130".equals(codeString)) + return V3TribalEntityUS._130; + if ("131".equals(codeString)) + return V3TribalEntityUS._131; + if ("132".equals(codeString)) + return V3TribalEntityUS._132; + if ("133".equals(codeString)) + return V3TribalEntityUS._133; + if ("134".equals(codeString)) + return V3TribalEntityUS._134; + if ("135".equals(codeString)) + return V3TribalEntityUS._135; + if ("136".equals(codeString)) + return V3TribalEntityUS._136; + if ("137".equals(codeString)) + return V3TribalEntityUS._137; + if ("138".equals(codeString)) + return V3TribalEntityUS._138; + if ("139".equals(codeString)) + return V3TribalEntityUS._139; + if ("14".equals(codeString)) + return V3TribalEntityUS._14; + if ("140".equals(codeString)) + return V3TribalEntityUS._140; + if ("141".equals(codeString)) + return V3TribalEntityUS._141; + if ("142".equals(codeString)) + return V3TribalEntityUS._142; + if ("143".equals(codeString)) + return V3TribalEntityUS._143; + if ("144".equals(codeString)) + return V3TribalEntityUS._144; + if ("145".equals(codeString)) + return V3TribalEntityUS._145; + if ("146".equals(codeString)) + return V3TribalEntityUS._146; + if ("147".equals(codeString)) + return V3TribalEntityUS._147; + if ("148".equals(codeString)) + return V3TribalEntityUS._148; + if ("149".equals(codeString)) + return V3TribalEntityUS._149; + if ("15".equals(codeString)) + return V3TribalEntityUS._15; + if ("150".equals(codeString)) + return V3TribalEntityUS._150; + if ("151".equals(codeString)) + return V3TribalEntityUS._151; + if ("152".equals(codeString)) + return V3TribalEntityUS._152; + if ("153".equals(codeString)) + return V3TribalEntityUS._153; + if ("154".equals(codeString)) + return V3TribalEntityUS._154; + if ("155".equals(codeString)) + return V3TribalEntityUS._155; + if ("156".equals(codeString)) + return V3TribalEntityUS._156; + if ("157".equals(codeString)) + return V3TribalEntityUS._157; + if ("158".equals(codeString)) + return V3TribalEntityUS._158; + if ("159".equals(codeString)) + return V3TribalEntityUS._159; + if ("16".equals(codeString)) + return V3TribalEntityUS._16; + if ("160".equals(codeString)) + return V3TribalEntityUS._160; + if ("161".equals(codeString)) + return V3TribalEntityUS._161; + if ("162".equals(codeString)) + return V3TribalEntityUS._162; + if ("163".equals(codeString)) + return V3TribalEntityUS._163; + if ("164".equals(codeString)) + return V3TribalEntityUS._164; + if ("165".equals(codeString)) + return V3TribalEntityUS._165; + if ("166".equals(codeString)) + return V3TribalEntityUS._166; + if ("167".equals(codeString)) + return V3TribalEntityUS._167; + if ("168".equals(codeString)) + return V3TribalEntityUS._168; + if ("169".equals(codeString)) + return V3TribalEntityUS._169; + if ("17".equals(codeString)) + return V3TribalEntityUS._17; + if ("170".equals(codeString)) + return V3TribalEntityUS._170; + if ("171".equals(codeString)) + return V3TribalEntityUS._171; + if ("172".equals(codeString)) + return V3TribalEntityUS._172; + if ("173".equals(codeString)) + return V3TribalEntityUS._173; + if ("174".equals(codeString)) + return V3TribalEntityUS._174; + if ("175".equals(codeString)) + return V3TribalEntityUS._175; + if ("176".equals(codeString)) + return V3TribalEntityUS._176; + if ("177".equals(codeString)) + return V3TribalEntityUS._177; + if ("178".equals(codeString)) + return V3TribalEntityUS._178; + if ("179".equals(codeString)) + return V3TribalEntityUS._179; + if ("18".equals(codeString)) + return V3TribalEntityUS._18; + if ("180".equals(codeString)) + return V3TribalEntityUS._180; + if ("181".equals(codeString)) + return V3TribalEntityUS._181; + if ("182".equals(codeString)) + return V3TribalEntityUS._182; + if ("183".equals(codeString)) + return V3TribalEntityUS._183; + if ("184".equals(codeString)) + return V3TribalEntityUS._184; + if ("185".equals(codeString)) + return V3TribalEntityUS._185; + if ("186".equals(codeString)) + return V3TribalEntityUS._186; + if ("187".equals(codeString)) + return V3TribalEntityUS._187; + if ("188".equals(codeString)) + return V3TribalEntityUS._188; + if ("189".equals(codeString)) + return V3TribalEntityUS._189; + if ("19".equals(codeString)) + return V3TribalEntityUS._19; + if ("190".equals(codeString)) + return V3TribalEntityUS._190; + if ("191".equals(codeString)) + return V3TribalEntityUS._191; + if ("192".equals(codeString)) + return V3TribalEntityUS._192; + if ("193".equals(codeString)) + return V3TribalEntityUS._193; + if ("194".equals(codeString)) + return V3TribalEntityUS._194; + if ("195".equals(codeString)) + return V3TribalEntityUS._195; + if ("196".equals(codeString)) + return V3TribalEntityUS._196; + if ("197".equals(codeString)) + return V3TribalEntityUS._197; + if ("198".equals(codeString)) + return V3TribalEntityUS._198; + if ("199".equals(codeString)) + return V3TribalEntityUS._199; + if ("2".equals(codeString)) + return V3TribalEntityUS._2; + if ("20".equals(codeString)) + return V3TribalEntityUS._20; + if ("200".equals(codeString)) + return V3TribalEntityUS._200; + if ("201".equals(codeString)) + return V3TribalEntityUS._201; + if ("202".equals(codeString)) + return V3TribalEntityUS._202; + if ("203".equals(codeString)) + return V3TribalEntityUS._203; + if ("204".equals(codeString)) + return V3TribalEntityUS._204; + if ("205".equals(codeString)) + return V3TribalEntityUS._205; + if ("206".equals(codeString)) + return V3TribalEntityUS._206; + if ("207".equals(codeString)) + return V3TribalEntityUS._207; + if ("208".equals(codeString)) + return V3TribalEntityUS._208; + if ("209".equals(codeString)) + return V3TribalEntityUS._209; + if ("21".equals(codeString)) + return V3TribalEntityUS._21; + if ("210".equals(codeString)) + return V3TribalEntityUS._210; + if ("211".equals(codeString)) + return V3TribalEntityUS._211; + if ("212".equals(codeString)) + return V3TribalEntityUS._212; + if ("213".equals(codeString)) + return V3TribalEntityUS._213; + if ("214".equals(codeString)) + return V3TribalEntityUS._214; + if ("215".equals(codeString)) + return V3TribalEntityUS._215; + if ("216".equals(codeString)) + return V3TribalEntityUS._216; + if ("217".equals(codeString)) + return V3TribalEntityUS._217; + if ("218".equals(codeString)) + return V3TribalEntityUS._218; + if ("219".equals(codeString)) + return V3TribalEntityUS._219; + if ("22".equals(codeString)) + return V3TribalEntityUS._22; + if ("220".equals(codeString)) + return V3TribalEntityUS._220; + if ("221".equals(codeString)) + return V3TribalEntityUS._221; + if ("222".equals(codeString)) + return V3TribalEntityUS._222; + if ("223".equals(codeString)) + return V3TribalEntityUS._223; + if ("224".equals(codeString)) + return V3TribalEntityUS._224; + if ("225".equals(codeString)) + return V3TribalEntityUS._225; + if ("226".equals(codeString)) + return V3TribalEntityUS._226; + if ("227".equals(codeString)) + return V3TribalEntityUS._227; + if ("228".equals(codeString)) + return V3TribalEntityUS._228; + if ("229".equals(codeString)) + return V3TribalEntityUS._229; + if ("23".equals(codeString)) + return V3TribalEntityUS._23; + if ("230".equals(codeString)) + return V3TribalEntityUS._230; + if ("231".equals(codeString)) + return V3TribalEntityUS._231; + if ("232".equals(codeString)) + return V3TribalEntityUS._232; + if ("233".equals(codeString)) + return V3TribalEntityUS._233; + if ("234".equals(codeString)) + return V3TribalEntityUS._234; + if ("235".equals(codeString)) + return V3TribalEntityUS._235; + if ("236".equals(codeString)) + return V3TribalEntityUS._236; + if ("237".equals(codeString)) + return V3TribalEntityUS._237; + if ("238".equals(codeString)) + return V3TribalEntityUS._238; + if ("239".equals(codeString)) + return V3TribalEntityUS._239; + if ("24".equals(codeString)) + return V3TribalEntityUS._24; + if ("240".equals(codeString)) + return V3TribalEntityUS._240; + if ("241".equals(codeString)) + return V3TribalEntityUS._241; + if ("242".equals(codeString)) + return V3TribalEntityUS._242; + if ("243".equals(codeString)) + return V3TribalEntityUS._243; + if ("244".equals(codeString)) + return V3TribalEntityUS._244; + if ("245".equals(codeString)) + return V3TribalEntityUS._245; + if ("246".equals(codeString)) + return V3TribalEntityUS._246; + if ("247".equals(codeString)) + return V3TribalEntityUS._247; + if ("248".equals(codeString)) + return V3TribalEntityUS._248; + if ("249".equals(codeString)) + return V3TribalEntityUS._249; + if ("25".equals(codeString)) + return V3TribalEntityUS._25; + if ("250".equals(codeString)) + return V3TribalEntityUS._250; + if ("251".equals(codeString)) + return V3TribalEntityUS._251; + if ("252".equals(codeString)) + return V3TribalEntityUS._252; + if ("253".equals(codeString)) + return V3TribalEntityUS._253; + if ("254".equals(codeString)) + return V3TribalEntityUS._254; + if ("255".equals(codeString)) + return V3TribalEntityUS._255; + if ("256".equals(codeString)) + return V3TribalEntityUS._256; + if ("257".equals(codeString)) + return V3TribalEntityUS._257; + if ("258".equals(codeString)) + return V3TribalEntityUS._258; + if ("259".equals(codeString)) + return V3TribalEntityUS._259; + if ("26".equals(codeString)) + return V3TribalEntityUS._26; + if ("260".equals(codeString)) + return V3TribalEntityUS._260; + if ("261".equals(codeString)) + return V3TribalEntityUS._261; + if ("262".equals(codeString)) + return V3TribalEntityUS._262; + if ("263".equals(codeString)) + return V3TribalEntityUS._263; + if ("264".equals(codeString)) + return V3TribalEntityUS._264; + if ("265".equals(codeString)) + return V3TribalEntityUS._265; + if ("266".equals(codeString)) + return V3TribalEntityUS._266; + if ("267".equals(codeString)) + return V3TribalEntityUS._267; + if ("268".equals(codeString)) + return V3TribalEntityUS._268; + if ("269".equals(codeString)) + return V3TribalEntityUS._269; + if ("27".equals(codeString)) + return V3TribalEntityUS._27; + if ("270".equals(codeString)) + return V3TribalEntityUS._270; + if ("271".equals(codeString)) + return V3TribalEntityUS._271; + if ("272".equals(codeString)) + return V3TribalEntityUS._272; + if ("273".equals(codeString)) + return V3TribalEntityUS._273; + if ("274".equals(codeString)) + return V3TribalEntityUS._274; + if ("275".equals(codeString)) + return V3TribalEntityUS._275; + if ("276".equals(codeString)) + return V3TribalEntityUS._276; + if ("277".equals(codeString)) + return V3TribalEntityUS._277; + if ("278".equals(codeString)) + return V3TribalEntityUS._278; + if ("279".equals(codeString)) + return V3TribalEntityUS._279; + if ("28".equals(codeString)) + return V3TribalEntityUS._28; + if ("280".equals(codeString)) + return V3TribalEntityUS._280; + if ("281".equals(codeString)) + return V3TribalEntityUS._281; + if ("282".equals(codeString)) + return V3TribalEntityUS._282; + if ("283".equals(codeString)) + return V3TribalEntityUS._283; + if ("284".equals(codeString)) + return V3TribalEntityUS._284; + if ("285".equals(codeString)) + return V3TribalEntityUS._285; + if ("286".equals(codeString)) + return V3TribalEntityUS._286; + if ("287".equals(codeString)) + return V3TribalEntityUS._287; + if ("288".equals(codeString)) + return V3TribalEntityUS._288; + if ("289".equals(codeString)) + return V3TribalEntityUS._289; + if ("29".equals(codeString)) + return V3TribalEntityUS._29; + if ("290".equals(codeString)) + return V3TribalEntityUS._290; + if ("291".equals(codeString)) + return V3TribalEntityUS._291; + if ("292".equals(codeString)) + return V3TribalEntityUS._292; + if ("293".equals(codeString)) + return V3TribalEntityUS._293; + if ("294".equals(codeString)) + return V3TribalEntityUS._294; + if ("295".equals(codeString)) + return V3TribalEntityUS._295; + if ("296".equals(codeString)) + return V3TribalEntityUS._296; + if ("297".equals(codeString)) + return V3TribalEntityUS._297; + if ("298".equals(codeString)) + return V3TribalEntityUS._298; + if ("299".equals(codeString)) + return V3TribalEntityUS._299; + if ("3".equals(codeString)) + return V3TribalEntityUS._3; + if ("30".equals(codeString)) + return V3TribalEntityUS._30; + if ("300".equals(codeString)) + return V3TribalEntityUS._300; + if ("301".equals(codeString)) + return V3TribalEntityUS._301; + if ("302".equals(codeString)) + return V3TribalEntityUS._302; + if ("303".equals(codeString)) + return V3TribalEntityUS._303; + if ("304".equals(codeString)) + return V3TribalEntityUS._304; + if ("305".equals(codeString)) + return V3TribalEntityUS._305; + if ("306".equals(codeString)) + return V3TribalEntityUS._306; + if ("307".equals(codeString)) + return V3TribalEntityUS._307; + if ("308".equals(codeString)) + return V3TribalEntityUS._308; + if ("309".equals(codeString)) + return V3TribalEntityUS._309; + if ("31".equals(codeString)) + return V3TribalEntityUS._31; + if ("310".equals(codeString)) + return V3TribalEntityUS._310; + if ("311".equals(codeString)) + return V3TribalEntityUS._311; + if ("312".equals(codeString)) + return V3TribalEntityUS._312; + if ("313".equals(codeString)) + return V3TribalEntityUS._313; + if ("314".equals(codeString)) + return V3TribalEntityUS._314; + if ("315".equals(codeString)) + return V3TribalEntityUS._315; + if ("316".equals(codeString)) + return V3TribalEntityUS._316; + if ("317".equals(codeString)) + return V3TribalEntityUS._317; + if ("318".equals(codeString)) + return V3TribalEntityUS._318; + if ("319".equals(codeString)) + return V3TribalEntityUS._319; + if ("32".equals(codeString)) + return V3TribalEntityUS._32; + if ("320".equals(codeString)) + return V3TribalEntityUS._320; + if ("321".equals(codeString)) + return V3TribalEntityUS._321; + if ("322".equals(codeString)) + return V3TribalEntityUS._322; + if ("323".equals(codeString)) + return V3TribalEntityUS._323; + if ("324".equals(codeString)) + return V3TribalEntityUS._324; + if ("325".equals(codeString)) + return V3TribalEntityUS._325; + if ("326".equals(codeString)) + return V3TribalEntityUS._326; + if ("327".equals(codeString)) + return V3TribalEntityUS._327; + if ("328".equals(codeString)) + return V3TribalEntityUS._328; + if ("329".equals(codeString)) + return V3TribalEntityUS._329; + if ("33".equals(codeString)) + return V3TribalEntityUS._33; + if ("330".equals(codeString)) + return V3TribalEntityUS._330; + if ("331".equals(codeString)) + return V3TribalEntityUS._331; + if ("332".equals(codeString)) + return V3TribalEntityUS._332; + if ("333".equals(codeString)) + return V3TribalEntityUS._333; + if ("334".equals(codeString)) + return V3TribalEntityUS._334; + if ("335".equals(codeString)) + return V3TribalEntityUS._335; + if ("336".equals(codeString)) + return V3TribalEntityUS._336; + if ("337".equals(codeString)) + return V3TribalEntityUS._337; + if ("34".equals(codeString)) + return V3TribalEntityUS._34; + if ("35".equals(codeString)) + return V3TribalEntityUS._35; + if ("36".equals(codeString)) + return V3TribalEntityUS._36; + if ("37".equals(codeString)) + return V3TribalEntityUS._37; + if ("38".equals(codeString)) + return V3TribalEntityUS._38; + if ("39".equals(codeString)) + return V3TribalEntityUS._39; + if ("4".equals(codeString)) + return V3TribalEntityUS._4; + if ("40".equals(codeString)) + return V3TribalEntityUS._40; + if ("41".equals(codeString)) + return V3TribalEntityUS._41; + if ("42".equals(codeString)) + return V3TribalEntityUS._42; + if ("43".equals(codeString)) + return V3TribalEntityUS._43; + if ("44".equals(codeString)) + return V3TribalEntityUS._44; + if ("45".equals(codeString)) + return V3TribalEntityUS._45; + if ("46".equals(codeString)) + return V3TribalEntityUS._46; + if ("47".equals(codeString)) + return V3TribalEntityUS._47; + if ("48".equals(codeString)) + return V3TribalEntityUS._48; + if ("49".equals(codeString)) + return V3TribalEntityUS._49; + if ("5".equals(codeString)) + return V3TribalEntityUS._5; + if ("50".equals(codeString)) + return V3TribalEntityUS._50; + if ("51".equals(codeString)) + return V3TribalEntityUS._51; + if ("52".equals(codeString)) + return V3TribalEntityUS._52; + if ("53".equals(codeString)) + return V3TribalEntityUS._53; + if ("54".equals(codeString)) + return V3TribalEntityUS._54; + if ("55".equals(codeString)) + return V3TribalEntityUS._55; + if ("56".equals(codeString)) + return V3TribalEntityUS._56; + if ("57".equals(codeString)) + return V3TribalEntityUS._57; + if ("58".equals(codeString)) + return V3TribalEntityUS._58; + if ("59".equals(codeString)) + return V3TribalEntityUS._59; + if ("6".equals(codeString)) + return V3TribalEntityUS._6; + if ("60".equals(codeString)) + return V3TribalEntityUS._60; + if ("61".equals(codeString)) + return V3TribalEntityUS._61; + if ("62".equals(codeString)) + return V3TribalEntityUS._62; + if ("63".equals(codeString)) + return V3TribalEntityUS._63; + if ("64".equals(codeString)) + return V3TribalEntityUS._64; + if ("65".equals(codeString)) + return V3TribalEntityUS._65; + if ("66".equals(codeString)) + return V3TribalEntityUS._66; + if ("67".equals(codeString)) + return V3TribalEntityUS._67; + if ("68".equals(codeString)) + return V3TribalEntityUS._68; + if ("69".equals(codeString)) + return V3TribalEntityUS._69; + if ("7".equals(codeString)) + return V3TribalEntityUS._7; + if ("70".equals(codeString)) + return V3TribalEntityUS._70; + if ("71".equals(codeString)) + return V3TribalEntityUS._71; + if ("72".equals(codeString)) + return V3TribalEntityUS._72; + if ("73".equals(codeString)) + return V3TribalEntityUS._73; + if ("74".equals(codeString)) + return V3TribalEntityUS._74; + if ("75".equals(codeString)) + return V3TribalEntityUS._75; + if ("76".equals(codeString)) + return V3TribalEntityUS._76; + if ("77".equals(codeString)) + return V3TribalEntityUS._77; + if ("78".equals(codeString)) + return V3TribalEntityUS._78; + if ("79".equals(codeString)) + return V3TribalEntityUS._79; + if ("8".equals(codeString)) + return V3TribalEntityUS._8; + if ("80".equals(codeString)) + return V3TribalEntityUS._80; + if ("81".equals(codeString)) + return V3TribalEntityUS._81; + if ("82".equals(codeString)) + return V3TribalEntityUS._82; + if ("83".equals(codeString)) + return V3TribalEntityUS._83; + if ("84".equals(codeString)) + return V3TribalEntityUS._84; + if ("85".equals(codeString)) + return V3TribalEntityUS._85; + if ("86".equals(codeString)) + return V3TribalEntityUS._86; + if ("87".equals(codeString)) + return V3TribalEntityUS._87; + if ("88".equals(codeString)) + return V3TribalEntityUS._88; + if ("89".equals(codeString)) + return V3TribalEntityUS._89; + if ("9".equals(codeString)) + return V3TribalEntityUS._9; + if ("90".equals(codeString)) + return V3TribalEntityUS._90; + if ("91".equals(codeString)) + return V3TribalEntityUS._91; + if ("92".equals(codeString)) + return V3TribalEntityUS._92; + if ("93".equals(codeString)) + return V3TribalEntityUS._93; + if ("94".equals(codeString)) + return V3TribalEntityUS._94; + if ("95".equals(codeString)) + return V3TribalEntityUS._95; + if ("96".equals(codeString)) + return V3TribalEntityUS._96; + if ("97".equals(codeString)) + return V3TribalEntityUS._97; + if ("98".equals(codeString)) + return V3TribalEntityUS._98; + if ("99".equals(codeString)) + return V3TribalEntityUS._99; + throw new IllegalArgumentException("Unknown V3TribalEntityUS code '"+codeString+"'"); + } + + public String toCode(V3TribalEntityUS code) { + if (code == V3TribalEntityUS._NATIVEENTITYALASKA) + return "_NativeEntityAlaska"; + if (code == V3TribalEntityUS._338) + return "338"; + if (code == V3TribalEntityUS._339) + return "339"; + if (code == V3TribalEntityUS._340) + return "340"; + if (code == V3TribalEntityUS._341) + return "341"; + if (code == V3TribalEntityUS._342) + return "342"; + if (code == V3TribalEntityUS._343) + return "343"; + if (code == V3TribalEntityUS._344) + return "344"; + if (code == V3TribalEntityUS._345) + return "345"; + if (code == V3TribalEntityUS._346) + return "346"; + if (code == V3TribalEntityUS._347) + return "347"; + if (code == V3TribalEntityUS._348) + return "348"; + if (code == V3TribalEntityUS._349) + return "349"; + if (code == V3TribalEntityUS._350) + return "350"; + if (code == V3TribalEntityUS._351) + return "351"; + if (code == V3TribalEntityUS._352) + return "352"; + if (code == V3TribalEntityUS._353) + return "353"; + if (code == V3TribalEntityUS._354) + return "354"; + if (code == V3TribalEntityUS._355) + return "355"; + if (code == V3TribalEntityUS._356) + return "356"; + if (code == V3TribalEntityUS._357) + return "357"; + if (code == V3TribalEntityUS._358) + return "358"; + if (code == V3TribalEntityUS._359) + return "359"; + if (code == V3TribalEntityUS._360) + return "360"; + if (code == V3TribalEntityUS._361) + return "361"; + if (code == V3TribalEntityUS._362) + return "362"; + if (code == V3TribalEntityUS._363) + return "363"; + if (code == V3TribalEntityUS._364) + return "364"; + if (code == V3TribalEntityUS._365) + return "365"; + if (code == V3TribalEntityUS._366) + return "366"; + if (code == V3TribalEntityUS._367) + return "367"; + if (code == V3TribalEntityUS._368) + return "368"; + if (code == V3TribalEntityUS._369) + return "369"; + if (code == V3TribalEntityUS._370) + return "370"; + if (code == V3TribalEntityUS._371) + return "371"; + if (code == V3TribalEntityUS._372) + return "372"; + if (code == V3TribalEntityUS._373) + return "373"; + if (code == V3TribalEntityUS._374) + return "374"; + if (code == V3TribalEntityUS._375) + return "375"; + if (code == V3TribalEntityUS._376) + return "376"; + if (code == V3TribalEntityUS._377) + return "377"; + if (code == V3TribalEntityUS._378) + return "378"; + if (code == V3TribalEntityUS._379) + return "379"; + if (code == V3TribalEntityUS._380) + return "380"; + if (code == V3TribalEntityUS._381) + return "381"; + if (code == V3TribalEntityUS._382) + return "382"; + if (code == V3TribalEntityUS._383) + return "383"; + if (code == V3TribalEntityUS._384) + return "384"; + if (code == V3TribalEntityUS._385) + return "385"; + if (code == V3TribalEntityUS._386) + return "386"; + if (code == V3TribalEntityUS._387) + return "387"; + if (code == V3TribalEntityUS._388) + return "388"; + if (code == V3TribalEntityUS._389) + return "389"; + if (code == V3TribalEntityUS._390) + return "390"; + if (code == V3TribalEntityUS._391) + return "391"; + if (code == V3TribalEntityUS._392) + return "392"; + if (code == V3TribalEntityUS._393) + return "393"; + if (code == V3TribalEntityUS._394) + return "394"; + if (code == V3TribalEntityUS._395) + return "395"; + if (code == V3TribalEntityUS._396) + return "396"; + if (code == V3TribalEntityUS._397) + return "397"; + if (code == V3TribalEntityUS._398) + return "398"; + if (code == V3TribalEntityUS._399) + return "399"; + if (code == V3TribalEntityUS._400) + return "400"; + if (code == V3TribalEntityUS._401) + return "401"; + if (code == V3TribalEntityUS._402) + return "402"; + if (code == V3TribalEntityUS._403) + return "403"; + if (code == V3TribalEntityUS._404) + return "404"; + if (code == V3TribalEntityUS._405) + return "405"; + if (code == V3TribalEntityUS._406) + return "406"; + if (code == V3TribalEntityUS._407) + return "407"; + if (code == V3TribalEntityUS._408) + return "408"; + if (code == V3TribalEntityUS._409) + return "409"; + if (code == V3TribalEntityUS._410) + return "410"; + if (code == V3TribalEntityUS._411) + return "411"; + if (code == V3TribalEntityUS._412) + return "412"; + if (code == V3TribalEntityUS._413) + return "413"; + if (code == V3TribalEntityUS._414) + return "414"; + if (code == V3TribalEntityUS._415) + return "415"; + if (code == V3TribalEntityUS._416) + return "416"; + if (code == V3TribalEntityUS._417) + return "417"; + if (code == V3TribalEntityUS._418) + return "418"; + if (code == V3TribalEntityUS._419) + return "419"; + if (code == V3TribalEntityUS._420) + return "420"; + if (code == V3TribalEntityUS._421) + return "421"; + if (code == V3TribalEntityUS._422) + return "422"; + if (code == V3TribalEntityUS._423) + return "423"; + if (code == V3TribalEntityUS._424) + return "424"; + if (code == V3TribalEntityUS._425) + return "425"; + if (code == V3TribalEntityUS._426) + return "426"; + if (code == V3TribalEntityUS._427) + return "427"; + if (code == V3TribalEntityUS._428) + return "428"; + if (code == V3TribalEntityUS._429) + return "429"; + if (code == V3TribalEntityUS._430) + return "430"; + if (code == V3TribalEntityUS._431) + return "431"; + if (code == V3TribalEntityUS._432) + return "432"; + if (code == V3TribalEntityUS._433) + return "433"; + if (code == V3TribalEntityUS._434) + return "434"; + if (code == V3TribalEntityUS._435) + return "435"; + if (code == V3TribalEntityUS._436) + return "436"; + if (code == V3TribalEntityUS._437) + return "437"; + if (code == V3TribalEntityUS._438) + return "438"; + if (code == V3TribalEntityUS._439) + return "439"; + if (code == V3TribalEntityUS._440) + return "440"; + if (code == V3TribalEntityUS._441) + return "441"; + if (code == V3TribalEntityUS._442) + return "442"; + if (code == V3TribalEntityUS._443) + return "443"; + if (code == V3TribalEntityUS._444) + return "444"; + if (code == V3TribalEntityUS._445) + return "445"; + if (code == V3TribalEntityUS._446) + return "446"; + if (code == V3TribalEntityUS._447) + return "447"; + if (code == V3TribalEntityUS._448) + return "448"; + if (code == V3TribalEntityUS._449) + return "449"; + if (code == V3TribalEntityUS._450) + return "450"; + if (code == V3TribalEntityUS._451) + return "451"; + if (code == V3TribalEntityUS._452) + return "452"; + if (code == V3TribalEntityUS._453) + return "453"; + if (code == V3TribalEntityUS._454) + return "454"; + if (code == V3TribalEntityUS._455) + return "455"; + if (code == V3TribalEntityUS._456) + return "456"; + if (code == V3TribalEntityUS._457) + return "457"; + if (code == V3TribalEntityUS._458) + return "458"; + if (code == V3TribalEntityUS._459) + return "459"; + if (code == V3TribalEntityUS._460) + return "460"; + if (code == V3TribalEntityUS._461) + return "461"; + if (code == V3TribalEntityUS._462) + return "462"; + if (code == V3TribalEntityUS._463) + return "463"; + if (code == V3TribalEntityUS._464) + return "464"; + if (code == V3TribalEntityUS._465) + return "465"; + if (code == V3TribalEntityUS._466) + return "466"; + if (code == V3TribalEntityUS._467) + return "467"; + if (code == V3TribalEntityUS._468) + return "468"; + if (code == V3TribalEntityUS._469) + return "469"; + if (code == V3TribalEntityUS._470) + return "470"; + if (code == V3TribalEntityUS._471) + return "471"; + if (code == V3TribalEntityUS._472) + return "472"; + if (code == V3TribalEntityUS._473) + return "473"; + if (code == V3TribalEntityUS._474) + return "474"; + if (code == V3TribalEntityUS._475) + return "475"; + if (code == V3TribalEntityUS._476) + return "476"; + if (code == V3TribalEntityUS._477) + return "477"; + if (code == V3TribalEntityUS._478) + return "478"; + if (code == V3TribalEntityUS._479) + return "479"; + if (code == V3TribalEntityUS._480) + return "480"; + if (code == V3TribalEntityUS._481) + return "481"; + if (code == V3TribalEntityUS._482) + return "482"; + if (code == V3TribalEntityUS._483) + return "483"; + if (code == V3TribalEntityUS._484) + return "484"; + if (code == V3TribalEntityUS._485) + return "485"; + if (code == V3TribalEntityUS._486) + return "486"; + if (code == V3TribalEntityUS._487) + return "487"; + if (code == V3TribalEntityUS._488) + return "488"; + if (code == V3TribalEntityUS._489) + return "489"; + if (code == V3TribalEntityUS._490) + return "490"; + if (code == V3TribalEntityUS._491) + return "491"; + if (code == V3TribalEntityUS._492) + return "492"; + if (code == V3TribalEntityUS._493) + return "493"; + if (code == V3TribalEntityUS._494) + return "494"; + if (code == V3TribalEntityUS._495) + return "495"; + if (code == V3TribalEntityUS._496) + return "496"; + if (code == V3TribalEntityUS._497) + return "497"; + if (code == V3TribalEntityUS._498) + return "498"; + if (code == V3TribalEntityUS._499) + return "499"; + if (code == V3TribalEntityUS._500) + return "500"; + if (code == V3TribalEntityUS._501) + return "501"; + if (code == V3TribalEntityUS._502) + return "502"; + if (code == V3TribalEntityUS._503) + return "503"; + if (code == V3TribalEntityUS._504) + return "504"; + if (code == V3TribalEntityUS._505) + return "505"; + if (code == V3TribalEntityUS._506) + return "506"; + if (code == V3TribalEntityUS._507) + return "507"; + if (code == V3TribalEntityUS._508) + return "508"; + if (code == V3TribalEntityUS._509) + return "509"; + if (code == V3TribalEntityUS._510) + return "510"; + if (code == V3TribalEntityUS._511) + return "511"; + if (code == V3TribalEntityUS._512) + return "512"; + if (code == V3TribalEntityUS._513) + return "513"; + if (code == V3TribalEntityUS._514) + return "514"; + if (code == V3TribalEntityUS._515) + return "515"; + if (code == V3TribalEntityUS._516) + return "516"; + if (code == V3TribalEntityUS._517) + return "517"; + if (code == V3TribalEntityUS._518) + return "518"; + if (code == V3TribalEntityUS._519) + return "519"; + if (code == V3TribalEntityUS._520) + return "520"; + if (code == V3TribalEntityUS._521) + return "521"; + if (code == V3TribalEntityUS._522) + return "522"; + if (code == V3TribalEntityUS._523) + return "523"; + if (code == V3TribalEntityUS._524) + return "524"; + if (code == V3TribalEntityUS._525) + return "525"; + if (code == V3TribalEntityUS._526) + return "526"; + if (code == V3TribalEntityUS._527) + return "527"; + if (code == V3TribalEntityUS._528) + return "528"; + if (code == V3TribalEntityUS._529) + return "529"; + if (code == V3TribalEntityUS._530) + return "530"; + if (code == V3TribalEntityUS._531) + return "531"; + if (code == V3TribalEntityUS._532) + return "532"; + if (code == V3TribalEntityUS._533) + return "533"; + if (code == V3TribalEntityUS._534) + return "534"; + if (code == V3TribalEntityUS._535) + return "535"; + if (code == V3TribalEntityUS._536) + return "536"; + if (code == V3TribalEntityUS._537) + return "537"; + if (code == V3TribalEntityUS._538) + return "538"; + if (code == V3TribalEntityUS._539) + return "539"; + if (code == V3TribalEntityUS._540) + return "540"; + if (code == V3TribalEntityUS._541) + return "541"; + if (code == V3TribalEntityUS._542) + return "542"; + if (code == V3TribalEntityUS._543) + return "543"; + if (code == V3TribalEntityUS._544) + return "544"; + if (code == V3TribalEntityUS._545) + return "545"; + if (code == V3TribalEntityUS._546) + return "546"; + if (code == V3TribalEntityUS._547) + return "547"; + if (code == V3TribalEntityUS._548) + return "548"; + if (code == V3TribalEntityUS._549) + return "549"; + if (code == V3TribalEntityUS._550) + return "550"; + if (code == V3TribalEntityUS._551) + return "551"; + if (code == V3TribalEntityUS._552) + return "552"; + if (code == V3TribalEntityUS._553) + return "553"; + if (code == V3TribalEntityUS._554) + return "554"; + if (code == V3TribalEntityUS._555) + return "555"; + if (code == V3TribalEntityUS._556) + return "556"; + if (code == V3TribalEntityUS._557) + return "557"; + if (code == V3TribalEntityUS._558) + return "558"; + if (code == V3TribalEntityUS._559) + return "559"; + if (code == V3TribalEntityUS._560) + return "560"; + if (code == V3TribalEntityUS._561) + return "561"; + if (code == V3TribalEntityUS._562) + return "562"; + if (code == V3TribalEntityUS._563) + return "563"; + if (code == V3TribalEntityUS._564) + return "564"; + if (code == V3TribalEntityUS._565) + return "565"; + if (code == V3TribalEntityUS._566) + return "566"; + if (code == V3TribalEntityUS._NATIVEENTITYCONTIGUOUS) + return "_NativeEntityContiguous"; + if (code == V3TribalEntityUS._1) + return "1"; + if (code == V3TribalEntityUS._10) + return "10"; + if (code == V3TribalEntityUS._100) + return "100"; + if (code == V3TribalEntityUS._101) + return "101"; + if (code == V3TribalEntityUS._102) + return "102"; + if (code == V3TribalEntityUS._103) + return "103"; + if (code == V3TribalEntityUS._104) + return "104"; + if (code == V3TribalEntityUS._105) + return "105"; + if (code == V3TribalEntityUS._106) + return "106"; + if (code == V3TribalEntityUS._107) + return "107"; + if (code == V3TribalEntityUS._108) + return "108"; + if (code == V3TribalEntityUS._109) + return "109"; + if (code == V3TribalEntityUS._11) + return "11"; + if (code == V3TribalEntityUS._110) + return "110"; + if (code == V3TribalEntityUS._111) + return "111"; + if (code == V3TribalEntityUS._112) + return "112"; + if (code == V3TribalEntityUS._113) + return "113"; + if (code == V3TribalEntityUS._114) + return "114"; + if (code == V3TribalEntityUS._115) + return "115"; + if (code == V3TribalEntityUS._116) + return "116"; + if (code == V3TribalEntityUS._117) + return "117"; + if (code == V3TribalEntityUS._118) + return "118"; + if (code == V3TribalEntityUS._119) + return "119"; + if (code == V3TribalEntityUS._12) + return "12"; + if (code == V3TribalEntityUS._120) + return "120"; + if (code == V3TribalEntityUS._121) + return "121"; + if (code == V3TribalEntityUS._122) + return "122"; + if (code == V3TribalEntityUS._123) + return "123"; + if (code == V3TribalEntityUS._124) + return "124"; + if (code == V3TribalEntityUS._125) + return "125"; + if (code == V3TribalEntityUS._126) + return "126"; + if (code == V3TribalEntityUS._127) + return "127"; + if (code == V3TribalEntityUS._128) + return "128"; + if (code == V3TribalEntityUS._129) + return "129"; + if (code == V3TribalEntityUS._13) + return "13"; + if (code == V3TribalEntityUS._130) + return "130"; + if (code == V3TribalEntityUS._131) + return "131"; + if (code == V3TribalEntityUS._132) + return "132"; + if (code == V3TribalEntityUS._133) + return "133"; + if (code == V3TribalEntityUS._134) + return "134"; + if (code == V3TribalEntityUS._135) + return "135"; + if (code == V3TribalEntityUS._136) + return "136"; + if (code == V3TribalEntityUS._137) + return "137"; + if (code == V3TribalEntityUS._138) + return "138"; + if (code == V3TribalEntityUS._139) + return "139"; + if (code == V3TribalEntityUS._14) + return "14"; + if (code == V3TribalEntityUS._140) + return "140"; + if (code == V3TribalEntityUS._141) + return "141"; + if (code == V3TribalEntityUS._142) + return "142"; + if (code == V3TribalEntityUS._143) + return "143"; + if (code == V3TribalEntityUS._144) + return "144"; + if (code == V3TribalEntityUS._145) + return "145"; + if (code == V3TribalEntityUS._146) + return "146"; + if (code == V3TribalEntityUS._147) + return "147"; + if (code == V3TribalEntityUS._148) + return "148"; + if (code == V3TribalEntityUS._149) + return "149"; + if (code == V3TribalEntityUS._15) + return "15"; + if (code == V3TribalEntityUS._150) + return "150"; + if (code == V3TribalEntityUS._151) + return "151"; + if (code == V3TribalEntityUS._152) + return "152"; + if (code == V3TribalEntityUS._153) + return "153"; + if (code == V3TribalEntityUS._154) + return "154"; + if (code == V3TribalEntityUS._155) + return "155"; + if (code == V3TribalEntityUS._156) + return "156"; + if (code == V3TribalEntityUS._157) + return "157"; + if (code == V3TribalEntityUS._158) + return "158"; + if (code == V3TribalEntityUS._159) + return "159"; + if (code == V3TribalEntityUS._16) + return "16"; + if (code == V3TribalEntityUS._160) + return "160"; + if (code == V3TribalEntityUS._161) + return "161"; + if (code == V3TribalEntityUS._162) + return "162"; + if (code == V3TribalEntityUS._163) + return "163"; + if (code == V3TribalEntityUS._164) + return "164"; + if (code == V3TribalEntityUS._165) + return "165"; + if (code == V3TribalEntityUS._166) + return "166"; + if (code == V3TribalEntityUS._167) + return "167"; + if (code == V3TribalEntityUS._168) + return "168"; + if (code == V3TribalEntityUS._169) + return "169"; + if (code == V3TribalEntityUS._17) + return "17"; + if (code == V3TribalEntityUS._170) + return "170"; + if (code == V3TribalEntityUS._171) + return "171"; + if (code == V3TribalEntityUS._172) + return "172"; + if (code == V3TribalEntityUS._173) + return "173"; + if (code == V3TribalEntityUS._174) + return "174"; + if (code == V3TribalEntityUS._175) + return "175"; + if (code == V3TribalEntityUS._176) + return "176"; + if (code == V3TribalEntityUS._177) + return "177"; + if (code == V3TribalEntityUS._178) + return "178"; + if (code == V3TribalEntityUS._179) + return "179"; + if (code == V3TribalEntityUS._18) + return "18"; + if (code == V3TribalEntityUS._180) + return "180"; + if (code == V3TribalEntityUS._181) + return "181"; + if (code == V3TribalEntityUS._182) + return "182"; + if (code == V3TribalEntityUS._183) + return "183"; + if (code == V3TribalEntityUS._184) + return "184"; + if (code == V3TribalEntityUS._185) + return "185"; + if (code == V3TribalEntityUS._186) + return "186"; + if (code == V3TribalEntityUS._187) + return "187"; + if (code == V3TribalEntityUS._188) + return "188"; + if (code == V3TribalEntityUS._189) + return "189"; + if (code == V3TribalEntityUS._19) + return "19"; + if (code == V3TribalEntityUS._190) + return "190"; + if (code == V3TribalEntityUS._191) + return "191"; + if (code == V3TribalEntityUS._192) + return "192"; + if (code == V3TribalEntityUS._193) + return "193"; + if (code == V3TribalEntityUS._194) + return "194"; + if (code == V3TribalEntityUS._195) + return "195"; + if (code == V3TribalEntityUS._196) + return "196"; + if (code == V3TribalEntityUS._197) + return "197"; + if (code == V3TribalEntityUS._198) + return "198"; + if (code == V3TribalEntityUS._199) + return "199"; + if (code == V3TribalEntityUS._2) + return "2"; + if (code == V3TribalEntityUS._20) + return "20"; + if (code == V3TribalEntityUS._200) + return "200"; + if (code == V3TribalEntityUS._201) + return "201"; + if (code == V3TribalEntityUS._202) + return "202"; + if (code == V3TribalEntityUS._203) + return "203"; + if (code == V3TribalEntityUS._204) + return "204"; + if (code == V3TribalEntityUS._205) + return "205"; + if (code == V3TribalEntityUS._206) + return "206"; + if (code == V3TribalEntityUS._207) + return "207"; + if (code == V3TribalEntityUS._208) + return "208"; + if (code == V3TribalEntityUS._209) + return "209"; + if (code == V3TribalEntityUS._21) + return "21"; + if (code == V3TribalEntityUS._210) + return "210"; + if (code == V3TribalEntityUS._211) + return "211"; + if (code == V3TribalEntityUS._212) + return "212"; + if (code == V3TribalEntityUS._213) + return "213"; + if (code == V3TribalEntityUS._214) + return "214"; + if (code == V3TribalEntityUS._215) + return "215"; + if (code == V3TribalEntityUS._216) + return "216"; + if (code == V3TribalEntityUS._217) + return "217"; + if (code == V3TribalEntityUS._218) + return "218"; + if (code == V3TribalEntityUS._219) + return "219"; + if (code == V3TribalEntityUS._22) + return "22"; + if (code == V3TribalEntityUS._220) + return "220"; + if (code == V3TribalEntityUS._221) + return "221"; + if (code == V3TribalEntityUS._222) + return "222"; + if (code == V3TribalEntityUS._223) + return "223"; + if (code == V3TribalEntityUS._224) + return "224"; + if (code == V3TribalEntityUS._225) + return "225"; + if (code == V3TribalEntityUS._226) + return "226"; + if (code == V3TribalEntityUS._227) + return "227"; + if (code == V3TribalEntityUS._228) + return "228"; + if (code == V3TribalEntityUS._229) + return "229"; + if (code == V3TribalEntityUS._23) + return "23"; + if (code == V3TribalEntityUS._230) + return "230"; + if (code == V3TribalEntityUS._231) + return "231"; + if (code == V3TribalEntityUS._232) + return "232"; + if (code == V3TribalEntityUS._233) + return "233"; + if (code == V3TribalEntityUS._234) + return "234"; + if (code == V3TribalEntityUS._235) + return "235"; + if (code == V3TribalEntityUS._236) + return "236"; + if (code == V3TribalEntityUS._237) + return "237"; + if (code == V3TribalEntityUS._238) + return "238"; + if (code == V3TribalEntityUS._239) + return "239"; + if (code == V3TribalEntityUS._24) + return "24"; + if (code == V3TribalEntityUS._240) + return "240"; + if (code == V3TribalEntityUS._241) + return "241"; + if (code == V3TribalEntityUS._242) + return "242"; + if (code == V3TribalEntityUS._243) + return "243"; + if (code == V3TribalEntityUS._244) + return "244"; + if (code == V3TribalEntityUS._245) + return "245"; + if (code == V3TribalEntityUS._246) + return "246"; + if (code == V3TribalEntityUS._247) + return "247"; + if (code == V3TribalEntityUS._248) + return "248"; + if (code == V3TribalEntityUS._249) + return "249"; + if (code == V3TribalEntityUS._25) + return "25"; + if (code == V3TribalEntityUS._250) + return "250"; + if (code == V3TribalEntityUS._251) + return "251"; + if (code == V3TribalEntityUS._252) + return "252"; + if (code == V3TribalEntityUS._253) + return "253"; + if (code == V3TribalEntityUS._254) + return "254"; + if (code == V3TribalEntityUS._255) + return "255"; + if (code == V3TribalEntityUS._256) + return "256"; + if (code == V3TribalEntityUS._257) + return "257"; + if (code == V3TribalEntityUS._258) + return "258"; + if (code == V3TribalEntityUS._259) + return "259"; + if (code == V3TribalEntityUS._26) + return "26"; + if (code == V3TribalEntityUS._260) + return "260"; + if (code == V3TribalEntityUS._261) + return "261"; + if (code == V3TribalEntityUS._262) + return "262"; + if (code == V3TribalEntityUS._263) + return "263"; + if (code == V3TribalEntityUS._264) + return "264"; + if (code == V3TribalEntityUS._265) + return "265"; + if (code == V3TribalEntityUS._266) + return "266"; + if (code == V3TribalEntityUS._267) + return "267"; + if (code == V3TribalEntityUS._268) + return "268"; + if (code == V3TribalEntityUS._269) + return "269"; + if (code == V3TribalEntityUS._27) + return "27"; + if (code == V3TribalEntityUS._270) + return "270"; + if (code == V3TribalEntityUS._271) + return "271"; + if (code == V3TribalEntityUS._272) + return "272"; + if (code == V3TribalEntityUS._273) + return "273"; + if (code == V3TribalEntityUS._274) + return "274"; + if (code == V3TribalEntityUS._275) + return "275"; + if (code == V3TribalEntityUS._276) + return "276"; + if (code == V3TribalEntityUS._277) + return "277"; + if (code == V3TribalEntityUS._278) + return "278"; + if (code == V3TribalEntityUS._279) + return "279"; + if (code == V3TribalEntityUS._28) + return "28"; + if (code == V3TribalEntityUS._280) + return "280"; + if (code == V3TribalEntityUS._281) + return "281"; + if (code == V3TribalEntityUS._282) + return "282"; + if (code == V3TribalEntityUS._283) + return "283"; + if (code == V3TribalEntityUS._284) + return "284"; + if (code == V3TribalEntityUS._285) + return "285"; + if (code == V3TribalEntityUS._286) + return "286"; + if (code == V3TribalEntityUS._287) + return "287"; + if (code == V3TribalEntityUS._288) + return "288"; + if (code == V3TribalEntityUS._289) + return "289"; + if (code == V3TribalEntityUS._29) + return "29"; + if (code == V3TribalEntityUS._290) + return "290"; + if (code == V3TribalEntityUS._291) + return "291"; + if (code == V3TribalEntityUS._292) + return "292"; + if (code == V3TribalEntityUS._293) + return "293"; + if (code == V3TribalEntityUS._294) + return "294"; + if (code == V3TribalEntityUS._295) + return "295"; + if (code == V3TribalEntityUS._296) + return "296"; + if (code == V3TribalEntityUS._297) + return "297"; + if (code == V3TribalEntityUS._298) + return "298"; + if (code == V3TribalEntityUS._299) + return "299"; + if (code == V3TribalEntityUS._3) + return "3"; + if (code == V3TribalEntityUS._30) + return "30"; + if (code == V3TribalEntityUS._300) + return "300"; + if (code == V3TribalEntityUS._301) + return "301"; + if (code == V3TribalEntityUS._302) + return "302"; + if (code == V3TribalEntityUS._303) + return "303"; + if (code == V3TribalEntityUS._304) + return "304"; + if (code == V3TribalEntityUS._305) + return "305"; + if (code == V3TribalEntityUS._306) + return "306"; + if (code == V3TribalEntityUS._307) + return "307"; + if (code == V3TribalEntityUS._308) + return "308"; + if (code == V3TribalEntityUS._309) + return "309"; + if (code == V3TribalEntityUS._31) + return "31"; + if (code == V3TribalEntityUS._310) + return "310"; + if (code == V3TribalEntityUS._311) + return "311"; + if (code == V3TribalEntityUS._312) + return "312"; + if (code == V3TribalEntityUS._313) + return "313"; + if (code == V3TribalEntityUS._314) + return "314"; + if (code == V3TribalEntityUS._315) + return "315"; + if (code == V3TribalEntityUS._316) + return "316"; + if (code == V3TribalEntityUS._317) + return "317"; + if (code == V3TribalEntityUS._318) + return "318"; + if (code == V3TribalEntityUS._319) + return "319"; + if (code == V3TribalEntityUS._32) + return "32"; + if (code == V3TribalEntityUS._320) + return "320"; + if (code == V3TribalEntityUS._321) + return "321"; + if (code == V3TribalEntityUS._322) + return "322"; + if (code == V3TribalEntityUS._323) + return "323"; + if (code == V3TribalEntityUS._324) + return "324"; + if (code == V3TribalEntityUS._325) + return "325"; + if (code == V3TribalEntityUS._326) + return "326"; + if (code == V3TribalEntityUS._327) + return "327"; + if (code == V3TribalEntityUS._328) + return "328"; + if (code == V3TribalEntityUS._329) + return "329"; + if (code == V3TribalEntityUS._33) + return "33"; + if (code == V3TribalEntityUS._330) + return "330"; + if (code == V3TribalEntityUS._331) + return "331"; + if (code == V3TribalEntityUS._332) + return "332"; + if (code == V3TribalEntityUS._333) + return "333"; + if (code == V3TribalEntityUS._334) + return "334"; + if (code == V3TribalEntityUS._335) + return "335"; + if (code == V3TribalEntityUS._336) + return "336"; + if (code == V3TribalEntityUS._337) + return "337"; + if (code == V3TribalEntityUS._34) + return "34"; + if (code == V3TribalEntityUS._35) + return "35"; + if (code == V3TribalEntityUS._36) + return "36"; + if (code == V3TribalEntityUS._37) + return "37"; + if (code == V3TribalEntityUS._38) + return "38"; + if (code == V3TribalEntityUS._39) + return "39"; + if (code == V3TribalEntityUS._4) + return "4"; + if (code == V3TribalEntityUS._40) + return "40"; + if (code == V3TribalEntityUS._41) + return "41"; + if (code == V3TribalEntityUS._42) + return "42"; + if (code == V3TribalEntityUS._43) + return "43"; + if (code == V3TribalEntityUS._44) + return "44"; + if (code == V3TribalEntityUS._45) + return "45"; + if (code == V3TribalEntityUS._46) + return "46"; + if (code == V3TribalEntityUS._47) + return "47"; + if (code == V3TribalEntityUS._48) + return "48"; + if (code == V3TribalEntityUS._49) + return "49"; + if (code == V3TribalEntityUS._5) + return "5"; + if (code == V3TribalEntityUS._50) + return "50"; + if (code == V3TribalEntityUS._51) + return "51"; + if (code == V3TribalEntityUS._52) + return "52"; + if (code == V3TribalEntityUS._53) + return "53"; + if (code == V3TribalEntityUS._54) + return "54"; + if (code == V3TribalEntityUS._55) + return "55"; + if (code == V3TribalEntityUS._56) + return "56"; + if (code == V3TribalEntityUS._57) + return "57"; + if (code == V3TribalEntityUS._58) + return "58"; + if (code == V3TribalEntityUS._59) + return "59"; + if (code == V3TribalEntityUS._6) + return "6"; + if (code == V3TribalEntityUS._60) + return "60"; + if (code == V3TribalEntityUS._61) + return "61"; + if (code == V3TribalEntityUS._62) + return "62"; + if (code == V3TribalEntityUS._63) + return "63"; + if (code == V3TribalEntityUS._64) + return "64"; + if (code == V3TribalEntityUS._65) + return "65"; + if (code == V3TribalEntityUS._66) + return "66"; + if (code == V3TribalEntityUS._67) + return "67"; + if (code == V3TribalEntityUS._68) + return "68"; + if (code == V3TribalEntityUS._69) + return "69"; + if (code == V3TribalEntityUS._7) + return "7"; + if (code == V3TribalEntityUS._70) + return "70"; + if (code == V3TribalEntityUS._71) + return "71"; + if (code == V3TribalEntityUS._72) + return "72"; + if (code == V3TribalEntityUS._73) + return "73"; + if (code == V3TribalEntityUS._74) + return "74"; + if (code == V3TribalEntityUS._75) + return "75"; + if (code == V3TribalEntityUS._76) + return "76"; + if (code == V3TribalEntityUS._77) + return "77"; + if (code == V3TribalEntityUS._78) + return "78"; + if (code == V3TribalEntityUS._79) + return "79"; + if (code == V3TribalEntityUS._8) + return "8"; + if (code == V3TribalEntityUS._80) + return "80"; + if (code == V3TribalEntityUS._81) + return "81"; + if (code == V3TribalEntityUS._82) + return "82"; + if (code == V3TribalEntityUS._83) + return "83"; + if (code == V3TribalEntityUS._84) + return "84"; + if (code == V3TribalEntityUS._85) + return "85"; + if (code == V3TribalEntityUS._86) + return "86"; + if (code == V3TribalEntityUS._87) + return "87"; + if (code == V3TribalEntityUS._88) + return "88"; + if (code == V3TribalEntityUS._89) + return "89"; + if (code == V3TribalEntityUS._9) + return "9"; + if (code == V3TribalEntityUS._90) + return "90"; + if (code == V3TribalEntityUS._91) + return "91"; + if (code == V3TribalEntityUS._92) + return "92"; + if (code == V3TribalEntityUS._93) + return "93"; + if (code == V3TribalEntityUS._94) + return "94"; + if (code == V3TribalEntityUS._95) + return "95"; + if (code == V3TribalEntityUS._96) + return "96"; + if (code == V3TribalEntityUS._97) + return "97"; + if (code == V3TribalEntityUS._98) + return "98"; + if (code == V3TribalEntityUS._99) + return "99"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturer.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturer.java new file mode 100644 index 00000000000..dbe7dd240f5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturer.java @@ -0,0 +1,429 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3VaccineManufacturer { + + /** + * Abbott Laboratories (includes Ross Products Division) + */ + AB, + /** + * Adams Laboratories + */ + AD, + /** + * Alpha Therapeutic Corporation + */ + ALP, + /** + * Armour [Inactive-use CEN] + */ + AR, + /** + * Aviron + */ + AVI, + /** + * Baxter Healthcare Corporation + */ + BA, + /** + * Bayer Corporation (includes Miles, Inc. and Cutter Laboratories) + */ + BAY, + /** + * Berna Products [Inactive-use BPC] + */ + BP, + /** + * Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne) + */ + BPC, + /** + * Centeon L.L.C. (includes Armour Pharmaceutical Company) + */ + CEN, + /** + * Chiron Corporation + */ + CHI, + /** + * Connaught [Inactive-use PMC] + */ + CON, + /** + * Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.) + */ + EVN, + /** + * Greer Laboratories, Inc. + */ + GRE, + /** + * Immuno International AG + */ + IAG, + /** + * Merieux [Inactive-use PMC] + */ + IM, + /** + * Immuno-U.S., Inc. + */ + IUS, + /** + * The Research Foundation for Microbial Diseases of Osaka University (BIKEN) + */ + JPN, + /** + * Korea Green Cross Corporation + */ + KGC, + /** + * Lederle [Inactive-use WAL] + */ + LED, + /** + * Massachusetts Public Health Biologic Laboratories + */ + MA, + /** + * MedImmune, Inc. + */ + MED, + /** + * Miles [Inactive-use BAY] + */ + MIL, + /** + * Bioport Corporation (formerly Michigan Biologic Products Institute) + */ + MIP, + /** + * Merck & Co., Inc. + */ + MSD, + /** + * NABI (formerly North American Biologicals, Inc.) + */ + NAB, + /** + * North American Vaccine, Inc. + */ + NAV, + /** + * Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited) + */ + NOV, + /** + * New York Blood Center + */ + NYB, + /** + * Ortho Diagnostic Systems, Inc. + */ + ORT, + /** + * Organon Teknika Corporation + */ + OTC, + /** + * Parkedale Pharmaceuticals (formerly Parke-Davis) + */ + PD, + /** + * Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux) + */ + PMC, + /** + * Praxis Biologics [Inactive-use WAL] + */ + PRX, + /** + * Sclavo, Inc. + */ + SCL, + /** + * Swiss Serum and Vaccine Inst. [Inactive-use BPC] + */ + SI, + /** + * SmithKline Beecham + */ + SKB, + /** + * United States Army Medical Research and Materiel Command + */ + USA, + /** + * Wyeth-Ayerst [Inactive-use WAL] + */ + WA, + /** + * Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics) + */ + WAL, + /** + * added to help the parsers + */ + NULL; + public static V3VaccineManufacturer fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AB".equals(codeString)) + return AB; + if ("AD".equals(codeString)) + return AD; + if ("ALP".equals(codeString)) + return ALP; + if ("AR".equals(codeString)) + return AR; + if ("AVI".equals(codeString)) + return AVI; + if ("BA".equals(codeString)) + return BA; + if ("BAY".equals(codeString)) + return BAY; + if ("BP".equals(codeString)) + return BP; + if ("BPC".equals(codeString)) + return BPC; + if ("CEN".equals(codeString)) + return CEN; + if ("CHI".equals(codeString)) + return CHI; + if ("CON".equals(codeString)) + return CON; + if ("EVN".equals(codeString)) + return EVN; + if ("GRE".equals(codeString)) + return GRE; + if ("IAG".equals(codeString)) + return IAG; + if ("IM".equals(codeString)) + return IM; + if ("IUS".equals(codeString)) + return IUS; + if ("JPN".equals(codeString)) + return JPN; + if ("KGC".equals(codeString)) + return KGC; + if ("LED".equals(codeString)) + return LED; + if ("MA".equals(codeString)) + return MA; + if ("MED".equals(codeString)) + return MED; + if ("MIL".equals(codeString)) + return MIL; + if ("MIP".equals(codeString)) + return MIP; + if ("MSD".equals(codeString)) + return MSD; + if ("NAB".equals(codeString)) + return NAB; + if ("NAV".equals(codeString)) + return NAV; + if ("NOV".equals(codeString)) + return NOV; + if ("NYB".equals(codeString)) + return NYB; + if ("ORT".equals(codeString)) + return ORT; + if ("OTC".equals(codeString)) + return OTC; + if ("PD".equals(codeString)) + return PD; + if ("PMC".equals(codeString)) + return PMC; + if ("PRX".equals(codeString)) + return PRX; + if ("SCL".equals(codeString)) + return SCL; + if ("SI".equals(codeString)) + return SI; + if ("SKB".equals(codeString)) + return SKB; + if ("USA".equals(codeString)) + return USA; + if ("WA".equals(codeString)) + return WA; + if ("WAL".equals(codeString)) + return WAL; + throw new FHIRException("Unknown V3VaccineManufacturer code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AB: return "AB"; + case AD: return "AD"; + case ALP: return "ALP"; + case AR: return "AR"; + case AVI: return "AVI"; + case BA: return "BA"; + case BAY: return "BAY"; + case BP: return "BP"; + case BPC: return "BPC"; + case CEN: return "CEN"; + case CHI: return "CHI"; + case CON: return "CON"; + case EVN: return "EVN"; + case GRE: return "GRE"; + case IAG: return "IAG"; + case IM: return "IM"; + case IUS: return "IUS"; + case JPN: return "JPN"; + case KGC: return "KGC"; + case LED: return "LED"; + case MA: return "MA"; + case MED: return "MED"; + case MIL: return "MIL"; + case MIP: return "MIP"; + case MSD: return "MSD"; + case NAB: return "NAB"; + case NAV: return "NAV"; + case NOV: return "NOV"; + case NYB: return "NYB"; + case ORT: return "ORT"; + case OTC: return "OTC"; + case PD: return "PD"; + case PMC: return "PMC"; + case PRX: return "PRX"; + case SCL: return "SCL"; + case SI: return "SI"; + case SKB: return "SKB"; + case USA: return "USA"; + case WA: return "WA"; + case WAL: return "WAL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/VaccineManufacturer"; + } + public String getDefinition() { + switch (this) { + case AB: return "Abbott Laboratories (includes Ross Products Division)"; + case AD: return "Adams Laboratories"; + case ALP: return "Alpha Therapeutic Corporation"; + case AR: return "Armour [Inactive-use CEN]"; + case AVI: return "Aviron"; + case BA: return "Baxter Healthcare Corporation"; + case BAY: return "Bayer Corporation (includes Miles, Inc. and Cutter Laboratories)"; + case BP: return "Berna Products [Inactive-use BPC]"; + case BPC: return "Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne)"; + case CEN: return "Centeon L.L.C. (includes Armour Pharmaceutical Company)"; + case CHI: return "Chiron Corporation"; + case CON: return "Connaught [Inactive-use PMC]"; + case EVN: return "Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.)"; + case GRE: return "Greer Laboratories, Inc."; + case IAG: return "Immuno International AG"; + case IM: return "Merieux [Inactive-use PMC]"; + case IUS: return "Immuno-U.S., Inc."; + case JPN: return "The Research Foundation for Microbial Diseases of Osaka University (BIKEN)"; + case KGC: return "Korea Green Cross Corporation"; + case LED: return "Lederle [Inactive-use WAL]"; + case MA: return "Massachusetts Public Health Biologic Laboratories"; + case MED: return "MedImmune, Inc."; + case MIL: return "Miles [Inactive-use BAY]"; + case MIP: return "Bioport Corporation (formerly Michigan Biologic Products Institute)"; + case MSD: return "Merck & Co., Inc."; + case NAB: return "NABI (formerly North American Biologicals, Inc.)"; + case NAV: return "North American Vaccine, Inc."; + case NOV: return "Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited)"; + case NYB: return "New York Blood Center"; + case ORT: return "Ortho Diagnostic Systems, Inc."; + case OTC: return "Organon Teknika Corporation"; + case PD: return "Parkedale Pharmaceuticals (formerly Parke-Davis)"; + case PMC: return "Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux)"; + case PRX: return "Praxis Biologics [Inactive-use WAL]"; + case SCL: return "Sclavo, Inc."; + case SI: return "Swiss Serum and Vaccine Inst. [Inactive-use BPC]"; + case SKB: return "SmithKline Beecham"; + case USA: return "United States Army Medical Research and Materiel Command"; + case WA: return "Wyeth-Ayerst [Inactive-use WAL]"; + case WAL: return "Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AB: return "Abbott Laboratories (includes Ross Products Division)"; + case AD: return "Adams Laboratories"; + case ALP: return "Alpha Therapeutic Corporation"; + case AR: return "Armour [Inactive - use CEN]"; + case AVI: return "Aviron"; + case BA: return "Baxter Healthcare Corporation"; + case BAY: return "Bayer Corporation (includes Miles, Inc. and Cutter Laboratories)"; + case BP: return "Berna Products [Inactive - use BPC]"; + case BPC: return "Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne)"; + case CEN: return "Centeon L.L.C. (includes Armour Pharmaceutical Company)"; + case CHI: return "Chiron Corporation"; + case CON: return "Connaught [Inactive - use PMC]"; + case EVN: return "Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.)"; + case GRE: return "Greer Laboratories, Inc."; + case IAG: return "Immuno International AG"; + case IM: return "Merieux [Inactive - use PMC]"; + case IUS: return "Immuno-U.S., Inc."; + case JPN: return "The Research Foundation for Microbial Diseases of Osaka University (BIKEN)"; + case KGC: return "Korea Green Cross Corporation"; + case LED: return "Lederle [Inactive - use WAL]"; + case MA: return "Massachusetts Public Health Biologic Laboratories"; + case MED: return "MedImmune, Inc."; + case MIL: return "Miles [Inactive - use BAY]"; + case MIP: return "Bioport Corporation (formerly Michigan Biologic Products Institute)"; + case MSD: return "Merck and Co., Inc."; + case NAB: return "NABI (formerly North American Biologicals, Inc.)"; + case NAV: return "North American Vaccine, Inc."; + case NOV: return "Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited)"; + case NYB: return "New York Blood Center"; + case ORT: return "Ortho Diagnostic Systems, Inc."; + case OTC: return "Organon Teknika Corporation"; + case PD: return "Parkedale Pharmaceuticals (formerly Parke-Davis)"; + case PMC: return "Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux)"; + case PRX: return "Praxis Biologics [Inactive - use WAL]"; + case SCL: return "Sclavo, Inc."; + case SI: return "Swiss Serum and Vaccine Inst. [Inactive - use BPC]"; + case SKB: return "SmithKline Beecham"; + case USA: return "United States Army Medical Research and Materiel Command"; + case WA: return "Wyeth-Ayerst [Inactive - use WAL]"; + case WAL: return "Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics)"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturerEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturerEnumFactory.java new file mode 100644 index 00000000000..ce4e731177c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3VaccineManufacturerEnumFactory.java @@ -0,0 +1,211 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class V3VaccineManufacturerEnumFactory implements EnumFactory { + + public V3VaccineManufacturer fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AB".equals(codeString)) + return V3VaccineManufacturer.AB; + if ("AD".equals(codeString)) + return V3VaccineManufacturer.AD; + if ("ALP".equals(codeString)) + return V3VaccineManufacturer.ALP; + if ("AR".equals(codeString)) + return V3VaccineManufacturer.AR; + if ("AVI".equals(codeString)) + return V3VaccineManufacturer.AVI; + if ("BA".equals(codeString)) + return V3VaccineManufacturer.BA; + if ("BAY".equals(codeString)) + return V3VaccineManufacturer.BAY; + if ("BP".equals(codeString)) + return V3VaccineManufacturer.BP; + if ("BPC".equals(codeString)) + return V3VaccineManufacturer.BPC; + if ("CEN".equals(codeString)) + return V3VaccineManufacturer.CEN; + if ("CHI".equals(codeString)) + return V3VaccineManufacturer.CHI; + if ("CON".equals(codeString)) + return V3VaccineManufacturer.CON; + if ("EVN".equals(codeString)) + return V3VaccineManufacturer.EVN; + if ("GRE".equals(codeString)) + return V3VaccineManufacturer.GRE; + if ("IAG".equals(codeString)) + return V3VaccineManufacturer.IAG; + if ("IM".equals(codeString)) + return V3VaccineManufacturer.IM; + if ("IUS".equals(codeString)) + return V3VaccineManufacturer.IUS; + if ("JPN".equals(codeString)) + return V3VaccineManufacturer.JPN; + if ("KGC".equals(codeString)) + return V3VaccineManufacturer.KGC; + if ("LED".equals(codeString)) + return V3VaccineManufacturer.LED; + if ("MA".equals(codeString)) + return V3VaccineManufacturer.MA; + if ("MED".equals(codeString)) + return V3VaccineManufacturer.MED; + if ("MIL".equals(codeString)) + return V3VaccineManufacturer.MIL; + if ("MIP".equals(codeString)) + return V3VaccineManufacturer.MIP; + if ("MSD".equals(codeString)) + return V3VaccineManufacturer.MSD; + if ("NAB".equals(codeString)) + return V3VaccineManufacturer.NAB; + if ("NAV".equals(codeString)) + return V3VaccineManufacturer.NAV; + if ("NOV".equals(codeString)) + return V3VaccineManufacturer.NOV; + if ("NYB".equals(codeString)) + return V3VaccineManufacturer.NYB; + if ("ORT".equals(codeString)) + return V3VaccineManufacturer.ORT; + if ("OTC".equals(codeString)) + return V3VaccineManufacturer.OTC; + if ("PD".equals(codeString)) + return V3VaccineManufacturer.PD; + if ("PMC".equals(codeString)) + return V3VaccineManufacturer.PMC; + if ("PRX".equals(codeString)) + return V3VaccineManufacturer.PRX; + if ("SCL".equals(codeString)) + return V3VaccineManufacturer.SCL; + if ("SI".equals(codeString)) + return V3VaccineManufacturer.SI; + if ("SKB".equals(codeString)) + return V3VaccineManufacturer.SKB; + if ("USA".equals(codeString)) + return V3VaccineManufacturer.USA; + if ("WA".equals(codeString)) + return V3VaccineManufacturer.WA; + if ("WAL".equals(codeString)) + return V3VaccineManufacturer.WAL; + throw new IllegalArgumentException("Unknown V3VaccineManufacturer code '"+codeString+"'"); + } + + public String toCode(V3VaccineManufacturer code) { + if (code == V3VaccineManufacturer.AB) + return "AB"; + if (code == V3VaccineManufacturer.AD) + return "AD"; + if (code == V3VaccineManufacturer.ALP) + return "ALP"; + if (code == V3VaccineManufacturer.AR) + return "AR"; + if (code == V3VaccineManufacturer.AVI) + return "AVI"; + if (code == V3VaccineManufacturer.BA) + return "BA"; + if (code == V3VaccineManufacturer.BAY) + return "BAY"; + if (code == V3VaccineManufacturer.BP) + return "BP"; + if (code == V3VaccineManufacturer.BPC) + return "BPC"; + if (code == V3VaccineManufacturer.CEN) + return "CEN"; + if (code == V3VaccineManufacturer.CHI) + return "CHI"; + if (code == V3VaccineManufacturer.CON) + return "CON"; + if (code == V3VaccineManufacturer.EVN) + return "EVN"; + if (code == V3VaccineManufacturer.GRE) + return "GRE"; + if (code == V3VaccineManufacturer.IAG) + return "IAG"; + if (code == V3VaccineManufacturer.IM) + return "IM"; + if (code == V3VaccineManufacturer.IUS) + return "IUS"; + if (code == V3VaccineManufacturer.JPN) + return "JPN"; + if (code == V3VaccineManufacturer.KGC) + return "KGC"; + if (code == V3VaccineManufacturer.LED) + return "LED"; + if (code == V3VaccineManufacturer.MA) + return "MA"; + if (code == V3VaccineManufacturer.MED) + return "MED"; + if (code == V3VaccineManufacturer.MIL) + return "MIL"; + if (code == V3VaccineManufacturer.MIP) + return "MIP"; + if (code == V3VaccineManufacturer.MSD) + return "MSD"; + if (code == V3VaccineManufacturer.NAB) + return "NAB"; + if (code == V3VaccineManufacturer.NAV) + return "NAV"; + if (code == V3VaccineManufacturer.NOV) + return "NOV"; + if (code == V3VaccineManufacturer.NYB) + return "NYB"; + if (code == V3VaccineManufacturer.ORT) + return "ORT"; + if (code == V3VaccineManufacturer.OTC) + return "OTC"; + if (code == V3VaccineManufacturer.PD) + return "PD"; + if (code == V3VaccineManufacturer.PMC) + return "PMC"; + if (code == V3VaccineManufacturer.PRX) + return "PRX"; + if (code == V3VaccineManufacturer.SCL) + return "SCL"; + if (code == V3VaccineManufacturer.SI) + return "SI"; + if (code == V3VaccineManufacturer.SKB) + return "SKB"; + if (code == V3VaccineManufacturer.USA) + return "USA"; + if (code == V3VaccineManufacturer.WA) + return "WA"; + if (code == V3VaccineManufacturer.WAL) + return "WAL"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatus.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatus.java new file mode 100644 index 00000000000..eb84f1f8eb5 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VaccinationProtocolDoseStatus { + + /** + * null + */ + COUNT, + /** + * null + */ + NOCOUNT, + /** + * added to help the parsers + */ + NULL; + public static VaccinationProtocolDoseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("count".equals(codeString)) + return COUNT; + if ("nocount".equals(codeString)) + return NOCOUNT; + throw new FHIRException("Unknown VaccinationProtocolDoseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COUNT: return "count"; + case NOCOUNT: return "nocount"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vaccination-protocol-dose-status"; + } + public String getDefinition() { + switch (this) { + case COUNT: return ""; + case NOCOUNT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COUNT: return "Counts"; + case NOCOUNT: return "Does not Count"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusEnumFactory.java new file mode 100644 index 00000000000..95c5de951c3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class VaccinationProtocolDoseStatusEnumFactory implements EnumFactory { + + public VaccinationProtocolDoseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("count".equals(codeString)) + return VaccinationProtocolDoseStatus.COUNT; + if ("nocount".equals(codeString)) + return VaccinationProtocolDoseStatus.NOCOUNT; + throw new IllegalArgumentException("Unknown VaccinationProtocolDoseStatus code '"+codeString+"'"); + } + + public String toCode(VaccinationProtocolDoseStatus code) { + if (code == VaccinationProtocolDoseStatus.COUNT) + return "count"; + if (code == VaccinationProtocolDoseStatus.NOCOUNT) + return "nocount"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReason.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReason.java new file mode 100644 index 00000000000..e3539f9b0c9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReason.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VaccinationProtocolDoseStatusReason { + + /** + * null + */ + ADVSTORAGE, + /** + * null + */ + COLDCHBRK, + /** + * null + */ + EXPLOT, + /** + * null + */ + OUTSIDESCHED, + /** + * null + */ + PRODRECALL, + /** + * added to help the parsers + */ + NULL; + public static VaccinationProtocolDoseStatusReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("advstorage".equals(codeString)) + return ADVSTORAGE; + if ("coldchbrk".equals(codeString)) + return COLDCHBRK; + if ("explot".equals(codeString)) + return EXPLOT; + if ("outsidesched".equals(codeString)) + return OUTSIDESCHED; + if ("prodrecall".equals(codeString)) + return PRODRECALL; + throw new FHIRException("Unknown VaccinationProtocolDoseStatusReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADVSTORAGE: return "advstorage"; + case COLDCHBRK: return "coldchbrk"; + case EXPLOT: return "explot"; + case OUTSIDESCHED: return "outsidesched"; + case PRODRECALL: return "prodrecall"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vaccination-protocol-dose-status-reason"; + } + public String getDefinition() { + switch (this) { + case ADVSTORAGE: return ""; + case COLDCHBRK: return ""; + case EXPLOT: return ""; + case OUTSIDESCHED: return ""; + case PRODRECALL: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADVSTORAGE: return "Adverse storage condition"; + case COLDCHBRK: return "Cold chain break"; + case EXPLOT: return "Expired lot"; + case OUTSIDESCHED: return "Administered outside recommended schedule"; + case PRODRECALL: return "Product recall"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReasonEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReasonEnumFactory.java new file mode 100644 index 00000000000..9bdb5d1059e --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReasonEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class VaccinationProtocolDoseStatusReasonEnumFactory implements EnumFactory { + + public VaccinationProtocolDoseStatusReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("advstorage".equals(codeString)) + return VaccinationProtocolDoseStatusReason.ADVSTORAGE; + if ("coldchbrk".equals(codeString)) + return VaccinationProtocolDoseStatusReason.COLDCHBRK; + if ("explot".equals(codeString)) + return VaccinationProtocolDoseStatusReason.EXPLOT; + if ("outsidesched".equals(codeString)) + return VaccinationProtocolDoseStatusReason.OUTSIDESCHED; + if ("prodrecall".equals(codeString)) + return VaccinationProtocolDoseStatusReason.PRODRECALL; + throw new IllegalArgumentException("Unknown VaccinationProtocolDoseStatusReason code '"+codeString+"'"); + } + + public String toCode(VaccinationProtocolDoseStatusReason code) { + if (code == VaccinationProtocolDoseStatusReason.ADVSTORAGE) + return "advstorage"; + if (code == VaccinationProtocolDoseStatusReason.COLDCHBRK) + return "coldchbrk"; + if (code == VaccinationProtocolDoseStatusReason.EXPLOT) + return "explot"; + if (code == VaccinationProtocolDoseStatusReason.OUTSIDESCHED) + return "outsidesched"; + if (code == VaccinationProtocolDoseStatusReason.PRODRECALL) + return "prodrecall"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProduct.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProduct.java new file mode 100644 index 00000000000..70737b6f935 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProduct.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VisionProduct { + + /** + * null + */ + LENS, + /** + * null + */ + CONTACT, + /** + * added to help the parsers + */ + NULL; + public static VisionProduct fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lens".equals(codeString)) + return LENS; + if ("contact".equals(codeString)) + return CONTACT; + throw new FHIRException("Unknown VisionProduct code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LENS: return "lens"; + case CONTACT: return "contact"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-visionprescriptionproduct"; + } + public String getDefinition() { + switch (this) { + case LENS: return ""; + case CONTACT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LENS: return "lens"; + case CONTACT: return "contact"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProductEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProductEnumFactory.java new file mode 100644 index 00000000000..72c84909614 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VisionProductEnumFactory.java @@ -0,0 +1,59 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class VisionProductEnumFactory implements EnumFactory { + + public VisionProduct fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lens".equals(codeString)) + return VisionProduct.LENS; + if ("contact".equals(codeString)) + return VisionProduct.CONTACT; + throw new IllegalArgumentException("Unknown VisionProduct code '"+codeString+"'"); + } + + public String toCode(VisionProduct code) { + if (code == VisionProduct.LENS) + return "lens"; + if (code == VisionProduct.CONTACT) + return "contact"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipType.java new file mode 100644 index 00000000000..f4cc9ea6951 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum XdsRelationshipType { + + /** + * A separate XDS document that references a prior document, and may extend or alter the observations in the prior document. + */ + APND, + /** + * A new version of an existing document. + */ + RPLC, + /** + * A transformed document is derived by a machine translation from some other format. + */ + XFRM, + /** + * Both a XFRM and a RPLC relationship. + */ + XFRMRPLC, + /** + * This document signs the target document. + */ + SIGNS, + /** + * added to help the parsers + */ + NULL; + public static XdsRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("APND".equals(codeString)) + return APND; + if ("RPLC".equals(codeString)) + return RPLC; + if ("XFRM".equals(codeString)) + return XFRM; + if ("XFRM_RPLC".equals(codeString)) + return XFRMRPLC; + if ("signs".equals(codeString)) + return SIGNS; + throw new FHIRException("Unknown XdsRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case APND: return "APND"; + case RPLC: return "RPLC"; + case XFRM: return "XFRM"; + case XFRMRPLC: return "XFRM_RPLC"; + case SIGNS: return "signs"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/xds-relationship-type"; + } + public String getDefinition() { + switch (this) { + case APND: return "A separate XDS document that references a prior document, and may extend or alter the observations in the prior document."; + case RPLC: return "A new version of an existing document."; + case XFRM: return "A transformed document is derived by a machine translation from some other format."; + case XFRMRPLC: return "Both a XFRM and a RPLC relationship."; + case SIGNS: return "This document signs the target document."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case APND: return "APND"; + case RPLC: return "RPLC"; + case XFRM: return "XFRM"; + case XFRMRPLC: return "XFRM_RPLC"; + case SIGNS: return "Signs"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipTypeEnumFactory.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..e514471c305 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/XdsRelationshipTypeEnumFactory.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.dstu21.model.valuesets; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 + + +import org.hl7.fhir.dstu21.model.EnumFactory; + +public class XdsRelationshipTypeEnumFactory implements EnumFactory { + + public XdsRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("APND".equals(codeString)) + return XdsRelationshipType.APND; + if ("RPLC".equals(codeString)) + return XdsRelationshipType.RPLC; + if ("XFRM".equals(codeString)) + return XdsRelationshipType.XFRM; + if ("XFRM_RPLC".equals(codeString)) + return XdsRelationshipType.XFRMRPLC; + if ("signs".equals(codeString)) + return XdsRelationshipType.SIGNS; + throw new IllegalArgumentException("Unknown XdsRelationshipType code '"+codeString+"'"); + } + + public String toCode(XdsRelationshipType code) { + if (code == XdsRelationshipType.APND) + return "APND"; + if (code == XdsRelationshipType.RPLC) + return "RPLC"; + if (code == XdsRelationshipType.XFRM) + return "XFRM"; + if (code == XdsRelationshipType.XFRMRPLC) + return "XFRM_RPLC"; + if (code == XdsRelationshipType.SIGNS) + return "signs"; + return "?"; + } + + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/holder.txt b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/holder.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRException.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRException.java new file mode 100644 index 00000000000..6e97d6c19ed --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRException.java @@ -0,0 +1,25 @@ +package org.hl7.fhir.exceptions; + +public class FHIRException extends Exception { + + public FHIRException() { + super(); + } + + public FHIRException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public FHIRException(String message, Throwable cause) { + super(message, cause); + } + + public FHIRException(String message) { + super(message); + } + + public FHIRException(Throwable cause) { + super(cause); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRFormatError.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRFormatError.java new file mode 100644 index 00000000000..13ef2405749 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/exceptions/FHIRFormatError.java @@ -0,0 +1,25 @@ +package org.hl7.fhir.exceptions; + +public class FHIRFormatError extends FHIRException { + + public FHIRFormatError() { + super(); + } + + public FHIRFormatError(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public FHIRFormatError(String message, Throwable cause) { + super(message, cause); + } + + public FHIRFormatError(String message) { + super(message); + } + + public FHIRFormatError(Throwable cause) { + super(cause); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/CSFile.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/CSFile.java new file mode 100644 index 00000000000..aaa4f8e29b1 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/CSFile.java @@ -0,0 +1,71 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities; + +import java.io.File; +import java.io.IOException; + +/** + * Extends the usual Java File to make it case-sensitive: if the file to be opened has + * a different casing in the filesystem (but is found anyway base Windows is case-insensitive), + * the constructor will throw. Allows early detection of miscased filenames. + * @author Ewout + * + */ +public class CSFile extends File { + private static final long serialVersionUID = -2017155765132460726L; + + public CSFile(String pathname) throws IOException { + super(pathname); + +// if (exists() && getParent() != null) +// { +// String n = getName(); +// File f = new File(getParent()); +// String[] l = f.list(); +// boolean ok = false; +// for (String n1 : l) { +// if (n1.equals(n)) +// ok = true; +// } +// if (!ok) +// throw new Error("Case mismatch of file "+ pathname); +// } + + //EK: Original code above looked extremely wasteful: every single + //attempt to open a file triggers a directory listing + if (exists()) + { + if(!this.getCanonicalFile().getName().equals(this.getName())) + throw new Error("Case mismatch of file "+ pathname+": found "+this.getCanonicalFile().getName()); + } + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/FileNotifier.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/FileNotifier.java new file mode 100644 index 00000000000..590a7d9a1e3 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/FileNotifier.java @@ -0,0 +1,7 @@ +package org.hl7.fhir.utilities; + +public interface FileNotifier { + + public void copyFile(String src, String dst); + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Inflector.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Inflector.java new file mode 100644 index 00000000000..06e11326900 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Inflector.java @@ -0,0 +1,619 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities; + +/* + * JBoss DNA (http://www.jboss.org/dna) + * See the COPYRIGHT.txt file distributed with this work for information + * regarding copyright ownership. Some portions may be licensed + * to Red Hat, Inc. under one or more contributor license agreements. + * See the AUTHORS.txt file in the distribution for a full listing of + * individual contributors. + * + * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA + * is licensed to you under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * JBoss DNA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Transforms words to singular, plural, humanized (human readable), underscore, camel case, or ordinal form. This is inspired by + * the Inflector class in Ruby on Rails, which is distributed under the Rails license. + * + * @author Randall Hauch + */ +public class Inflector { + + protected static final Inflector INSTANCE = new Inflector(); + + public static final Inflector getInstance() { + return INSTANCE; + } + + protected class Rule { + + protected final String expression; + protected final Pattern expressionPattern; + protected final String replacement; + + protected Rule( String expression, + String replacement ) { + this.expression = expression; + this.replacement = replacement != null ? replacement : ""; + this.expressionPattern = Pattern.compile(this.expression, Pattern.CASE_INSENSITIVE); + } + + /** + * Apply the rule against the input string, returning the modified string or null if the rule didn't apply (and no + * modifications were made) + * + * @param input the input string + * @return the modified string if this rule applied, or null if the input was not modified by this rule + */ + protected String apply( String input ) { + Matcher matcher = this.expressionPattern.matcher(input); + if (!matcher.find()) return null; + return matcher.replaceAll(this.replacement); + } + + @Override + public int hashCode() { + return expression.hashCode(); + } + + @Override + public boolean equals( Object obj ) { + if (obj == this) return true; + if (obj != null && obj.getClass() == this.getClass()) { + final Rule that = (Rule)obj; + if (this.expression.equalsIgnoreCase(that.expression)) return true; + } + return false; + } + + @Override + public String toString() { + return expression + ", " + replacement; + } + } + + private LinkedList plurals = new LinkedList(); + private LinkedList singulars = new LinkedList(); + /** + * The lowercase words that are to be excluded and not processed. This map can be modified by the users via + * {@link #getUncountables()}. + */ + private final Set uncountables = new HashSet(); + + public Inflector() { + initialize(); + } + + protected Inflector( Inflector original ) { + this.plurals.addAll(original.plurals); + this.singulars.addAll(original.singulars); + this.uncountables.addAll(original.uncountables); + } + + @Override + public Inflector clone() { + return new Inflector(this); + } + + // ------------------------------------------------------------------------------------------------ + // Usage functions + // ------------------------------------------------------------------------------------------------ + + /** + * Returns the plural form of the word in the string. + * + * Examples: + * + *
+     *   inflector.pluralize("post")               #=> "posts"
+     *   inflector.pluralize("octopus")            #=> "octopi"
+     *   inflector.pluralize("sheep")              #=> "sheep"
+     *   inflector.pluralize("words")              #=> "words"
+     *   inflector.pluralize("the blue mailman")   #=> "the blue mailmen"
+     *   inflector.pluralize("CamelOctopus")       #=> "CamelOctopi"
+     * 
+ * + * + * + * Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too. + * + * + * @param word the word that is to be pluralized. + * @return the pluralized form of the word, or the word itself if it could not be pluralized + * @see #singularize(Object) + */ + public String pluralize( Object word ) { + if (word == null) return null; + String wordStr = word.toString().trim(); + if (wordStr.length() == 0) return wordStr; + if (isUncountable(wordStr)) return wordStr; + for (Rule rule : this.plurals) { + String result = rule.apply(wordStr); + if (result != null) return result; + } + return wordStr; + } + + public String pluralize( Object word, + int count ) { + if (word == null) return null; + if (count == 1 || count == -1) { + return word.toString(); + } + return pluralize(word); + } + + /** + * Returns the singular form of the word in the string. + * + * Examples: + * + *
+     *   inflector.singularize("posts")             #=> "post"
+     *   inflector.singularize("octopi")            #=> "octopus"
+     *   inflector.singularize("sheep")             #=> "sheep"
+     *   inflector.singularize("words")             #=> "word"
+     *   inflector.singularize("the blue mailmen")  #=> "the blue mailman"
+     *   inflector.singularize("CamelOctopi")       #=> "CamelOctopus"
+     * 
+ * + * + * + * Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too. + * + * + * @param word the word that is to be pluralized. + * @return the pluralized form of the word, or the word itself if it could not be pluralized + * @see #pluralize(Object) + */ + public String singularize( Object word ) { + if (word == null) return null; + String wordStr = word.toString().trim(); + if (wordStr.length() == 0) return wordStr; + if (isUncountable(wordStr)) return wordStr; + for (Rule rule : this.singulars) { + String result = rule.apply(wordStr); + if (result != null) return result; + } + return wordStr; + } + + /** + * Converts strings to lowerCamelCase. This method will also use any extra delimiter characters to identify word boundaries. + * + * Examples: + * + *
+     *   inflector.lowerCamelCase("active_record")       #=> "activeRecord"
+     *   inflector.lowerCamelCase("first_name")          #=> "firstName"
+     *   inflector.lowerCamelCase("name")                #=> "name"
+     *   inflector.lowerCamelCase("the-first_name",'-')  #=> "theFirstName"
+     * 
+ * + * + * + * @param lowerCaseAndUnderscoredWord the word that is to be converted to camel case + * @param delimiterChars optional characters that are used to delimit word boundaries + * @return the lower camel case version of the word + * @see #underscore(String, char[]) + * @see #camelCase(String, boolean, char[]) + * @see #upperCamelCase(String, char[]) + */ + public String lowerCamelCase( String lowerCaseAndUnderscoredWord, + char... delimiterChars ) { + return camelCase(lowerCaseAndUnderscoredWord, false, delimiterChars); + } + + /** + * Converts strings to UpperCamelCase. This method will also use any extra delimiter characters to identify word boundaries. + * + * Examples: + * + *
+     *   inflector.upperCamelCase("active_record")       #=> "SctiveRecord"
+     *   inflector.upperCamelCase("first_name")          #=> "FirstName"
+     *   inflector.upperCamelCase("name")                #=> "Name"
+     *   inflector.lowerCamelCase("the-first_name",'-')  #=> "TheFirstName"
+     * 
+ * + * + * + * @param lowerCaseAndUnderscoredWord the word that is to be converted to camel case + * @param delimiterChars optional characters that are used to delimit word boundaries + * @return the upper camel case version of the word + * @see #underscore(String, char[]) + * @see #camelCase(String, boolean, char[]) + * @see #lowerCamelCase(String, char[]) + */ + public String upperCamelCase( String lowerCaseAndUnderscoredWord, + char... delimiterChars ) { + return camelCase(lowerCaseAndUnderscoredWord, true, delimiterChars); + } + + /** + * By default, this method converts strings to UpperCamelCase. If the uppercaseFirstLetter argument to false, + * then this method produces lowerCamelCase. This method will also use any extra delimiter characters to identify word + * boundaries. + * + * Examples: + * + *
+     *   inflector.camelCase("active_record",false)    #=> "activeRecord"
+     *   inflector.camelCase("active_record",true)     #=> "ActiveRecord"
+     *   inflector.camelCase("first_name",false)       #=> "firstName"
+     *   inflector.camelCase("first_name",true)        #=> "FirstName"
+     *   inflector.camelCase("name",false)             #=> "name"
+     *   inflector.camelCase("name",true)              #=> "Name"
+     * 
+ * + * + * + * @param lowerCaseAndUnderscoredWord the word that is to be converted to camel case + * @param uppercaseFirstLetter true if the first character is to be uppercased, or false if the first character is to be + * lowercased + * @param delimiterChars optional characters that are used to delimit word boundaries + * @return the camel case version of the word + * @see #underscore(String, char[]) + * @see #upperCamelCase(String, char[]) + * @see #lowerCamelCase(String, char[]) + */ + public String camelCase( String lowerCaseAndUnderscoredWord, + boolean uppercaseFirstLetter, + char... delimiterChars ) { + if (lowerCaseAndUnderscoredWord == null) return null; + lowerCaseAndUnderscoredWord = lowerCaseAndUnderscoredWord.trim(); + if (lowerCaseAndUnderscoredWord.length() == 0) return ""; + if (uppercaseFirstLetter) { + String result = lowerCaseAndUnderscoredWord; + // Replace any extra delimiters with underscores (before the underscores are converted in the next step)... + if (delimiterChars != null) { + for (char delimiterChar : delimiterChars) { + result = result.replace(delimiterChar, '_'); + } + } + + // Change the case at the beginning at after each underscore ... + return replaceAllWithUppercase(result, "(^|_)(.)", 2); + } + if (lowerCaseAndUnderscoredWord.length() < 2) return lowerCaseAndUnderscoredWord; + return "" + Character.toLowerCase(lowerCaseAndUnderscoredWord.charAt(0)) + + camelCase(lowerCaseAndUnderscoredWord, true, delimiterChars).substring(1); + } + + /** + * Makes an underscored form from the expression in the string (the reverse of the {@link #camelCase(String, boolean, char[]) + * camelCase} method. Also changes any characters that match the supplied delimiters into underscore. + * + * Examples: + * + *
+     *   inflector.underscore("activeRecord")     #=> "active_record"
+     *   inflector.underscore("ActiveRecord")     #=> "active_record"
+     *   inflector.underscore("firstName")        #=> "first_name"
+     *   inflector.underscore("FirstName")        #=> "first_name"
+     *   inflector.underscore("name")             #=> "name"
+     *   inflector.underscore("The.firstName")    #=> "the_first_name"
+     * 
+ * + * + * + * @param camelCaseWord the camel-cased word that is to be converted; + * @param delimiterChars optional characters that are used to delimit word boundaries (beyond capitalization) + * @return a lower-cased version of the input, with separate words delimited by the underscore character. + */ + public String underscore( String camelCaseWord, + char... delimiterChars ) { + if (camelCaseWord == null) return null; + String result = camelCaseWord.trim(); + if (result.length() == 0) return ""; + result = result.replaceAll("([A-Z]+)([A-Z][a-z])", "$1_$2"); + result = result.replaceAll("([a-z\\d])([A-Z])", "$1_$2"); + result = result.replace('-', '_'); + if (delimiterChars != null) { + for (char delimiterChar : delimiterChars) { + result = result.replace(delimiterChar, '_'); + } + } + return result.toLowerCase(); + } + + /** + * Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase. + * + * @param words the word to be capitalized + * @return the string with the first character capitalized and the remaining characters lowercased + */ + public String capitalize( String words ) { + if (words == null) return null; + String result = words.trim(); + if (result.length() == 0) return ""; + if (result.length() == 1) return result.toUpperCase(); + return "" + Character.toUpperCase(result.charAt(0)) + result.substring(1).toLowerCase(); + } + + /** + * Capitalizes the first word and turns underscores into spaces and strips trailing "_id" and any supplied removable tokens. + * Like {@link #titleCase(String, String[])}, this is meant for creating pretty output. + * + * Examples: + * + *
+     *   inflector.humanize("employee_salary")       #=> "Employee salary"
+     *   inflector.humanize("author_id")             #=> "Author"
+     * 
+ * + * + * + * @param lowerCaseAndUnderscoredWords the input to be humanized + * @param removableTokens optional array of tokens that are to be removed + * @return the humanized string + * @see #titleCase(String, String[]) + */ + public String humanize( String lowerCaseAndUnderscoredWords, + String... removableTokens ) { + if (lowerCaseAndUnderscoredWords == null) return null; + String result = lowerCaseAndUnderscoredWords.trim(); + if (result.length() == 0) return ""; + // Remove a trailing "_id" token + result = result.replaceAll("_id$", ""); + // Remove all of the tokens that should be removed + if (removableTokens != null) { + for (String removableToken : removableTokens) { + result = result.replaceAll(removableToken, ""); + } + } + result = result.replaceAll("_+", " "); // replace all adjacent underscores with a single space + return capitalize(result); + } + + /** + * Capitalizes all the words and replaces some characters in the string to create a nicer looking title. Underscores are + * changed to spaces, a trailing "_id" is removed, and any of the supplied tokens are removed. Like + * {@link #humanize(String, String[])}, this is meant for creating pretty output. + * + * Examples: + * + *
+     *   inflector.titleCase("man from the boondocks")       #=> "Man From The Boondocks"
+     *   inflector.titleCase("x-men: the last stand")        #=> "X Men: The Last Stand"
+     * 
+ * + * + * + * @param words the input to be turned into title case + * @param removableTokens optional array of tokens that are to be removed + * @return the title-case version of the supplied words + */ + public String titleCase( String words, + String... removableTokens ) { + String result = humanize(words, removableTokens); + result = replaceAllWithUppercase(result, "\\b([a-z])", 1); // change first char of each word to uppercase + return result; + } + + /** + * Turns a non-negative number into an ordinal string used to denote the position in an ordered sequence, such as 1st, 2nd, + * 3rd, 4th. + * + * @param number the non-negative number + * @return the string with the number and ordinal suffix + */ + public String ordinalize( int number ) { + int remainder = number % 100; + String numberStr = Integer.toString(number); + if (11 <= number && number <= 13) return numberStr + "th"; + remainder = number % 10; + if (remainder == 1) return numberStr + "st"; + if (remainder == 2) return numberStr + "nd"; + if (remainder == 3) return numberStr + "rd"; + return numberStr + "th"; + } + + // ------------------------------------------------------------------------------------------------ + // Management methods + // ------------------------------------------------------------------------------------------------ + + /** + * Determine whether the supplied word is considered uncountable by the {@link #pluralize(Object) pluralize} and + * {@link #singularize(Object) singularize} methods. + * + * @param word the word + * @return true if the plural and singular forms of the word are the same + */ + public boolean isUncountable( String word ) { + if (word == null) return false; + String trimmedLower = word.trim().toLowerCase(); + return this.uncountables.contains(trimmedLower); + } + + /** + * Get the set of words that are not processed by the Inflector. The resulting map is directly modifiable. + * + * @return the set of uncountable words + */ + public Set getUncountables() { + return uncountables; + } + + public void addPluralize( String rule, + String replacement ) { + final Rule pluralizeRule = new Rule(rule, replacement); + this.plurals.addFirst(pluralizeRule); + } + + public void addSingularize( String rule, + String replacement ) { + final Rule singularizeRule = new Rule(rule, replacement); + this.singulars.addFirst(singularizeRule); + } + + public void addIrregular( String singular, + String plural ) { + //CheckArg.isNotEmpty(singular, "singular rule"); + //CheckArg.isNotEmpty(plural, "plural rule"); + String singularRemainder = singular.length() > 1 ? singular.substring(1) : ""; + String pluralRemainder = plural.length() > 1 ? plural.substring(1) : ""; + addPluralize("(" + singular.charAt(0) + ")" + singularRemainder + "$", "$1" + pluralRemainder); + addSingularize("(" + plural.charAt(0) + ")" + pluralRemainder + "$", "$1" + singularRemainder); + } + + public void addUncountable( String... words ) { + if (words == null || words.length == 0) return; + for (String word : words) { + if (word != null) uncountables.add(word.trim().toLowerCase()); + } + } + + /** + * Utility method to replace all occurrences given by the specific backreference with its uppercased form, and remove all + * other backreferences. + * + * The Java {@link Pattern regular expression processing} does not use the preprocessing directives \l, + * \u, \L, and \U. If so, such directives could be used in the replacement string + * to uppercase or lowercase the backreferences. For example, \L1 would lowercase the first backreference, and + * \u3 would uppercase the 3rd backreference. + * + * + * @param input + * @param regex + * @param groupNumberToUppercase + * @return the input string with the appropriate characters converted to upper-case + */ + protected static String replaceAllWithUppercase( String input, + String regex, + int groupNumberToUppercase ) { + Pattern underscoreAndDotPattern = Pattern.compile(regex); + Matcher matcher = underscoreAndDotPattern.matcher(input); + StringBuffer sb = new StringBuffer(); + while (matcher.find()) { + matcher.appendReplacement(sb, matcher.group(groupNumberToUppercase).toUpperCase()); + } + matcher.appendTail(sb); + return sb.toString(); + } + + /** + * Completely remove all rules within this inflector. + */ + public void clear() { + this.uncountables.clear(); + this.plurals.clear(); + this.singulars.clear(); + } + + protected void initialize() { + Inflector inflect = this; + inflect.addPluralize("$", "s"); + inflect.addPluralize("s$", "s"); + inflect.addPluralize("(ax|test)is$", "$1es"); + inflect.addPluralize("(octop|vir)us$", "$1i"); + inflect.addPluralize("(octop|vir)i$", "$1i"); // already plural + inflect.addPluralize("(alias|status)$", "$1es"); + inflect.addPluralize("(bu)s$", "$1ses"); + inflect.addPluralize("(buffal|tomat)o$", "$1oes"); + inflect.addPluralize("([ti])um$", "$1a"); + inflect.addPluralize("([ti])a$", "$1a"); // already plural + inflect.addPluralize("sis$", "ses"); + inflect.addPluralize("(?:([^f])fe|([lr])f)$", "$1$2ves"); + inflect.addPluralize("(hive)$", "$1s"); + inflect.addPluralize("([^aeiouy]|qu)y$", "$1ies"); + inflect.addPluralize("(x|ch|ss|sh)$", "$1es"); + inflect.addPluralize("(matr|vert|ind)ix|ex$", "$1ices"); + inflect.addPluralize("([m|l])ouse$", "$1ice"); + inflect.addPluralize("([m|l])ice$", "$1ice"); + inflect.addPluralize("^(ox)$", "$1en"); + inflect.addPluralize("(quiz)$", "$1zes"); + // Need to check for the following words that are already pluralized: + inflect.addPluralize("(people|men|children|sexes|moves|stadiums)$", "$1"); // irregulars + inflect.addPluralize("(oxen|octopi|viri|aliases|quizzes)$", "$1"); // special rules + + inflect.addSingularize("s$", ""); + inflect.addSingularize("(s|si|u)s$", "$1s"); // '-us' and '-ss' are already singular + inflect.addSingularize("(n)ews$", "$1ews"); + inflect.addSingularize("([ti])a$", "$1um"); + inflect.addSingularize("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis"); + inflect.addSingularize("(^analy)ses$", "$1sis"); + inflect.addSingularize("(^analy)sis$", "$1sis"); // already singular, but ends in 's' + inflect.addSingularize("([^f])ves$", "$1fe"); + inflect.addSingularize("(hive)s$", "$1"); + inflect.addSingularize("(tive)s$", "$1"); + inflect.addSingularize("([lr])ves$", "$1f"); + inflect.addSingularize("([^aeiouy]|qu)ies$", "$1y"); + inflect.addSingularize("(s)eries$", "$1eries"); + inflect.addSingularize("(m)ovies$", "$1ovie"); + inflect.addSingularize("(x|ch|ss|sh)es$", "$1"); + inflect.addSingularize("([m|l])ice$", "$1ouse"); + inflect.addSingularize("(bus)es$", "$1"); + inflect.addSingularize("(o)es$", "$1"); + inflect.addSingularize("(shoe)s$", "$1"); + inflect.addSingularize("(cris|ax|test)is$", "$1is"); // already singular, but ends in 's' + inflect.addSingularize("(cris|ax|test)es$", "$1is"); + inflect.addSingularize("(octop|vir)i$", "$1us"); + inflect.addSingularize("(octop|vir)us$", "$1us"); // already singular, but ends in 's' + inflect.addSingularize("(alias|status)es$", "$1"); + inflect.addSingularize("(alias|status)$", "$1"); // already singular, but ends in 's' + inflect.addSingularize("^(ox)en", "$1"); + inflect.addSingularize("(vert|ind)ices$", "$1ex"); + inflect.addSingularize("(matr)ices$", "$1ix"); + inflect.addSingularize("(quiz)zes$", "$1"); + + inflect.addIrregular("person", "people"); + inflect.addIrregular("man", "men"); + inflect.addIrregular("child", "children"); + inflect.addIrregular("sex", "sexes"); + inflect.addIrregular("move", "moves"); + inflect.addIrregular("stadium", "stadiums"); + + inflect.addUncountable("equipment", "information", "rice", "money", "species", "series", "fish", "sheep"); + } + +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/MyURIResolver.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/MyURIResolver.java new file mode 100644 index 00000000000..2517d84ed2d --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/MyURIResolver.java @@ -0,0 +1,71 @@ +package org.hl7.fhir.utilities; + +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; + +import javax.xml.transform.Source; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.URIResolver; +import javax.xml.transform.stream.StreamSource; + +public class MyURIResolver implements URIResolver { + + private String path; + private URIResolver alt; + + public MyURIResolver(String path, URIResolver alt) { + super(); + this.path = path; + this.alt = alt; + } + + + @Override + public Source resolve(String href, String base) throws TransformerException { + try { + if (href.startsWith("http://") || href.startsWith("https://")) { + if (alt != null) { + Source s = alt.resolve(href, base); + if (s != null) + return s; + } + return TransformerFactory.newInstance().getURIResolver().resolve(href, base); + } else + return new StreamSource(new FileInputStream(href.contains(File.separator) ? href : Utilities.path(path, href))); + } catch (FileNotFoundException e) { + throw new TransformerException(e); + } + } + +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Utilities.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Utilities.java new file mode 100644 index 00000000000..36caeba0cbf --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/Utilities.java @@ -0,0 +1,916 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.utilities; + +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.SourceDataLine; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.URIResolver; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import net.sf.saxon.TransformerFactoryImpl; + +import org.apache.commons.io.FileUtils; +import org.hl7.fhir.exceptions.FHIRException; + +public class Utilities { + +// private static final String TOKEN_REGEX = "^a-z[A-Za-z0-9]*$"; + + + private static final String OID_REGEX = "[0-2](\\.(0|[1-9]([0-9])*))*"; + + /** + * Returns the plural form of the word in the string. + * + * Examples: + * + *
+     *   inflector.pluralize("post")               #=> "posts"
+     *   inflector.pluralize("octopus")            #=> "octopi"
+     *   inflector.pluralize("sheep")              #=> "sheep"
+     *   inflector.pluralize("words")              #=> "words"
+     *   inflector.pluralize("the blue mailman")   #=> "the blue mailmen"
+     *   inflector.pluralize("CamelOctopus")       #=> "CamelOctopi"
+     * 
+ * + * + * + * Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too. + * + * + * @param word the word that is to be pluralized. + * @return the pluralized form of the word, or the word itself if it could not be pluralized + * @see #singularize(Object) + */ + public static String pluralizeMe( String word ) { + Inflector inf = new Inflector(); + return inf.pluralize(word); + } + + + public static boolean isInteger(String string) { + try { + int i = Integer.parseInt(string); + return i != i+1; + } catch (Exception e) { + return false; + } + } + + public static boolean isDecimal(String string) { + try { + float r = Float.parseFloat(string); + return r != r + 1; // just to suppress the hint + } catch (Exception e) { + return false; + } + } + + public static String camelCase(String value) { + return new Inflector().camelCase(value.trim().replace(" ", "_"), false); + } + + public static String escapeXml(String doco) { + if (doco == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : doco.toCharArray()) { + if (c == '<') + b.append("<"); + else if (c == '>') + b.append(">"); + else if (c == '&') + b.append("&"); + else if (c == '"') + b.append("""); + else + b.append(c); + } + return b.toString(); + } + + + public static String capitalize(String s) + { + if( s == null ) return null; + if( s.length() == 0 ) return s; + if( s.length() == 1 ) return s.toUpperCase(); + + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + + public static void copyDirectory(String sourceFolder, String destFolder, FileNotifier notifier) throws IOException, FHIRException { + CSFile src = new CSFile(sourceFolder); + if (!src.exists()) + throw new FHIRException("Folder " +sourceFolder+" not found"); + createDirectory(destFolder); + + String[] files = src.list(); + for (String f : files) { + if (new CSFile(sourceFolder+File.separator+f).isDirectory()) { + if (!f.startsWith(".")) // ignore .svn... + copyDirectory(sourceFolder+File.separator+f, destFolder+File.separator+f, notifier); + } else { + if (notifier != null) + notifier.copyFile(sourceFolder+File.separator+f, destFolder+File.separator+f); + copyFile(new CSFile(sourceFolder+File.separator+f), new CSFile(destFolder+File.separator+f)); + } + } + } + + public static void copyFile(String source, String dest) throws IOException { + copyFile(new File(source), new File(dest)); + } + + public static void copyFile(File sourceFile, File destFile) throws IOException { + if(!destFile.exists()) { + if (!new CSFile(destFile.getParent()).exists()) { + createDirectory(destFile.getParent()); + } + destFile.createNewFile(); + } + + FileChannel source = null; + FileChannel destination = null; + + try { + source = new FileInputStream(sourceFile).getChannel(); + destination = new FileOutputStream(destFile).getChannel(); + destination.transferFrom(source, 0, source.size()); + } + finally { + if(source != null) { + source.close(); + } + if(destination != null) { + destination.close(); + } + } + } + + public static boolean checkFolder(String dir, List errors) + throws IOException + { + if (!new CSFile(dir).exists()) { + errors.add("Unable to find directory "+dir); + return false; + } else { + return true; + } + } + + public static boolean checkFile(String purpose, String dir, String file, List errors) + throws IOException + { + if (!new CSFile(dir+file).exists()) { + errors.add("Unable to find "+purpose+" file "+file+" in "+dir); + return false; + } else { + return true; + } + } + + public static String asCSV(List strings) { + StringBuilder s = new StringBuilder(); + boolean first = true; + for (String n : strings) { + if (!first) + s.append(","); + s.append(n); + first = false; + } + return s.toString(); + } + + public static String asHtmlBr(String prefix, List strings) { + StringBuilder s = new StringBuilder(); + boolean first = true; + for (String n : strings) { + if (!first) + s.append("
"); + s.append(prefix); + s.append(n); + first = false; + } + return s.toString(); + } + + public static void clearDirectory(String folder) throws IOException { + File dir = new File(folder); + if (dir.exists()) + FileUtils.cleanDirectory(dir); +// String[] files = new CSFile(folder).list(); +// if (files != null) { +// for (String f : files) { +// File fh = new CSFile(folder+File.separatorChar+f); +// if (fh.isDirectory()) +// clearDirectory(fh.getAbsolutePath()); +// fh.delete(); +// } +// } + } + + public static void createDirectory(String path) throws IOException{ + new CSFile(path).mkdirs(); + } + + public static String changeFileExt(String name, String ext) { + if (name.lastIndexOf('.') > -1) + return name.substring(0, name.lastIndexOf('.')) + ext; + else + return name+ext; + } + + public static String cleanupTextString( String contents ) + { + if( contents == null || contents.trim().equals("") ) + return null; + else + return contents.trim(); + } + + + public static boolean noString(String v) { + return v == null || v.equals(""); + } + + + public static byte[] saxonTransform(Map files, byte[] source, byte[] xslt) throws TransformerException { + TransformerFactory f = new net.sf.saxon.TransformerFactoryImpl(); + f.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE); + StreamSource xsrc = new StreamSource(new ByteArrayInputStream(xslt)); + f.setURIResolver(new ZipURIResolver(files)); + Transformer t = f.newTransformer(xsrc); + + t.setURIResolver(new ZipURIResolver(files)); + StreamSource src = new StreamSource(new ByteArrayInputStream(source)); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + StreamResult res = new StreamResult(out); + t.transform(src, res); + return out.toByteArray(); + } + + public static byte[] transform(Map files, byte[] source, byte[] xslt) throws TransformerException { + TransformerFactory f = TransformerFactory.newInstance(); + f.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE); + StreamSource xsrc = new StreamSource(new ByteArrayInputStream(xslt)); + f.setURIResolver(new ZipURIResolver(files)); + Transformer t = f.newTransformer(xsrc); + + t.setURIResolver(new ZipURIResolver(files)); + StreamSource src = new StreamSource(new ByteArrayInputStream(source)); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + StreamResult res = new StreamResult(out); + t.transform(src, res); + return out.toByteArray(); + } + + public static void bytesToFile(byte[] content, String filename) throws IOException { + FileOutputStream out = new FileOutputStream(filename); + out.write(content); + out.close(); + + } + + public static String saxonTransform(String source, String xslt) throws TransformerException, FileNotFoundException { + TransformerFactoryImpl f = new net.sf.saxon.TransformerFactoryImpl(); + f.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE); + StreamSource xsrc = new StreamSource(new FileInputStream(xslt)); + Transformer t = f.newTransformer(xsrc); + StreamSource src = new StreamSource(new FileInputStream(source)); + StreamResult res = new StreamResult(new ByteArrayOutputStream()); + t.transform(src, res); + return res.getOutputStream().toString(); + } + + public static void saxonTransform(String xsltDir, String source, String xslt, String dest, URIResolver alt) throws FileNotFoundException, TransformerException { + saxonTransform(xsltDir, source, xslt, dest, alt, null); + } + + public static void saxonTransform(String xsltDir, String source, String xslt, String dest, URIResolver alt, Map params) throws FileNotFoundException, TransformerException { + TransformerFactoryImpl f = new net.sf.saxon.TransformerFactoryImpl(); + f.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE); + StreamSource xsrc = new StreamSource(new FileInputStream(xslt)); + f.setURIResolver(new MyURIResolver(xsltDir, alt)); + Transformer t = f.newTransformer(xsrc); + if (params != null) { + for (Map.Entry entry : params.entrySet()) { + t.setParameter(entry.getKey(), entry.getValue()); + } + } + + t.setURIResolver(new MyURIResolver(xsltDir, alt)); + StreamSource src = new StreamSource(new FileInputStream(source)); + StreamResult res = new StreamResult(new FileOutputStream(dest)); + t.transform(src, res); + } + + public static void transform(String xsltDir, String source, String xslt, String dest, URIResolver alt) throws FileNotFoundException, TransformerException { + + TransformerFactory f = TransformerFactory.newInstance(); + StreamSource xsrc = new StreamSource(new FileInputStream(xslt)); + f.setURIResolver(new MyURIResolver(xsltDir, alt)); + Transformer t = f.newTransformer(xsrc); + + t.setURIResolver(new MyURIResolver(xsltDir, alt)); + StreamSource src = new StreamSource(new FileInputStream(source)); + StreamResult res = new StreamResult(new FileOutputStream(dest)); + t.transform(src, res); + + } + + + public static String appendSlash(String definitions) { + return definitions.endsWith(File.separator) ? definitions : definitions+File.separator; + } + + public static String appendForwardSlash(String definitions) { + return definitions.endsWith("/") ? definitions : definitions+"/"; + } + + + public static String fileTitle(String file) { + if (file == null) + return null; + String s = new File(file).getName(); + return s.indexOf(".") == -1? s : s.substring(0, s.indexOf(".")); + } + + + public static String systemEol() + { + return System.getProperty("line.separator"); + } + + public static String normaliseEolns(String value) { + return value.replace("\r\n", "\r").replace("\n", "\r").replace("\r", "\r\n"); + } + + + public static String unescapeXml(String xml) throws FHIRException { + if (xml == null) + return null; + + StringBuilder b = new StringBuilder(); + int i = 0; + while (i < xml.length()) { + if (xml.charAt(i) == '&') { + StringBuilder e = new StringBuilder(); + i++; + while (xml.charAt(i) != ';') { + e.append(xml.charAt(i)); + i++; + } + if (e.toString().equals("lt")) + b.append("<"); + else if (e.toString().equals("gt")) + b.append(">"); + else if (e.toString().equals("amp")) + b.append("&"); + else if (e.toString().equals("quot")) + b.append("\""); + else if (e.toString().equals("mu")) + b.append((char)956); + else + throw new FHIRException("unknown XML entity \""+e.toString()+"\""); + } else + b.append(xml.charAt(i)); + i++; + } + return b.toString(); + } + + + public static boolean isPlural(String word) { + word = word.toLowerCase(); + if ("restricts".equals(word) || "contains".equals(word) || "data".equals(word) || "specimen".equals(word)) + return false; + Inflector inf = new Inflector(); + return !inf.singularize(word).equals(word); + } + + + public static String padLeft(String src, char c, int len) { + StringBuilder s = new StringBuilder(); + for (int i = 0; i < len - src.length(); i++) + s.append(c); + s.append(src); + return s.toString(); + + } + + + public static String path(String... args) { + StringBuilder s = new StringBuilder(); + boolean d = false; + for(String arg: args) { + if (!d) + d = !noString(arg); + else if (!s.toString().endsWith(File.separator)) + s.append(File.separator); + String a = arg; + a = a.replace("\\", File.separator); + if (s.length() > 0 && a.startsWith(File.separator)) + a = a.substring(File.separator.length()); + + if ("..".equals(a)) { + int i = s.substring(0, s.length()-1).lastIndexOf(File.separator); + s = new StringBuilder(s.substring(0, i+1)); + } else + s.append(a); + } + return s.toString(); + } + + public static String pathReverse(String... args) { + StringBuilder s = new StringBuilder(); + boolean d = false; + for(String arg: args) { + if (!d) + d = !noString(arg); + else if (!s.toString().endsWith("/")) + s.append("/"); + s.append(arg); + } + return s.toString(); + } + + + +// public static void checkCase(String filename) { +// File f = new CSFile(filename); +// if (!f.getName().equals(filename)) +// throw new FHIRException("Filename ") +// +// } + + public static String nmtokenize(String cs) { + StringBuilder s = new StringBuilder(); + for (int i = 0; i < cs.length(); i++) { + char c = cs.charAt(i); + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') + s.append(c); + else if (c != ' ') + s.append("."+Integer.toString(c)); + } + return s.toString(); + } + + + public static boolean isToken(String tail) { + if (tail == null || tail.length() == 0) + return false; + boolean result = isAlphabetic(tail.charAt(0)); + for (int i = 1; i < tail.length(); i++) { + result = result && (isAlphabetic(tail.charAt(i)) || isDigit(tail.charAt(i)) || (tail.charAt(i) == '_') || (tail.charAt(i) == '[') || (tail.charAt(i) == ']')); + } + return result; + } + + + private static boolean isDigit(char c) { + return (c >= '0') && (c <= '9'); + } + + + private static boolean isAlphabetic(char c) { + return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')); + } + + + public static String getDirectoryForFile(String filepath) { + File f = new File(filepath); + return f.getParent(); + } + + public static String appendPeriod(String s) { + if (Utilities.noString(s)) + return s; + s = s.trim(); + if (s.endsWith(".") || s.endsWith("?")) + return s; + return s+"."; + } + + + public static String removePeriod(String s) { + if (Utilities.noString(s)) + return s; + if (s.endsWith(".")) + return s.substring(0, s.length()-1); + return s; + } + + + public static String stripBOM(String string) { + return string.replace("\uFEFF", ""); + } + + + public static String oidTail(String id) { + if (id == null || !id.contains(".")) + return id; + return id.substring(id.lastIndexOf(".")+1); + } + + + public static String oidRoot(String id) { + if (id == null || !id.contains(".")) + return id; + return id.substring(0, id.indexOf(".")); + } + + public static String escapeJava(String doco) { + if (doco == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : doco.toCharArray()) { + if (c == '\r') + b.append("\\r"); + else if (c == '\n') + b.append("\\n"); + else if (c == '"') + b.append("\\\""); + else if (c == '\\') + b.append("\\\\"); + else + b.append(c); + } + return b.toString(); + } + + + public static String[] splitByCamelCase(String name) { + List parts = new ArrayList(); + StringBuilder b = new StringBuilder(); + for (int i = 0; i < name.length(); i++) { + if (i > 0 && Character.isUpperCase(name.charAt(i))) { + parts.add(b.toString()); + b = new StringBuilder(); + } + b.append(Character.toLowerCase(name.charAt(i))); + } + parts.add(b.toString()); + return parts.toArray(new String[] {} ); + } + + + public static String encodeUri(String v) { + return v.replace(" ", "%20").replace("?", "%3F").replace("=", "%3D"); + } + + + + public static String normalize(String s) { + if (noString(s)) + return null; + StringBuilder b = new StringBuilder(); + boolean isWhitespace = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (!Character.isWhitespace(c)) { + b.append(Character.toLowerCase(c)); + isWhitespace = false; + } else if (!isWhitespace) { + b.append(' '); + isWhitespace = true; + } + } + return b.toString().trim(); + } + + public static String normalizeSameCase(String s) { + if (noString(s)) + return null; + StringBuilder b = new StringBuilder(); + boolean isWhitespace = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (!Character.isWhitespace(c)) { + b.append(c); + isWhitespace = false; + } else if (!isWhitespace) { + b.append(' '); + isWhitespace = true; + } + } + return b.toString().trim(); + } + + + public static void copyFileToDirectory(File source, File destDir) throws IOException { + copyFile(source, new File(path(destDir.getAbsolutePath(), source.getName()))); + } + + + public static boolean isWhitespace(String s) { + boolean ok = true; + for (int i = 0; i < s.length(); i++) + ok = ok && Character.isWhitespace(s.charAt(i)); + return ok; + + } + + + public static String URLEncode(String string) { + try { + return URLEncoder.encode(string, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new Error(e.getMessage()); + } + } + + + public static boolean existsInList(String value, String... array) { + for (String s : array) + if (value.equals(s)) + return true; + return false; + } + + public static boolean existsInListNC(String value, String... array) { + for (String s : array) + if (value.equalsIgnoreCase(s)) + return true; + return false; + } + + + public static String getFileNameForName(String name) { + return name.toLowerCase(); + } + + public static void deleteTempFiles() throws IOException { + File file = createTempFile("test", "test"); + String folder = getDirectoryForFile(file.getAbsolutePath()); + String[] list = new File(folder).list(new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.startsWith("ohfu-"); + } + }); + if (list != null) { + for (String n : list) { + new File(path(folder, n)).delete(); + } + } + } + + public static File createTempFile(String prefix, String suffix) throws IOException { + // this allows use to eaily identify all our dtemp files and delete them, since delete on Exit doesn't really work. + File file = File.createTempFile("ohfu-"+prefix, suffix); + file.deleteOnExit(); + return file; + } + + + public static boolean isAsciiChar(char ch) { + return ch >= ' ' && ch <= '~'; + } + + + public static String makeUuidUrn() { + return "urn:uuid:"+UUID.randomUUID().toString().toLowerCase(); + } + + public static boolean isURL(String s) { + boolean ok = s.matches("^http(s{0,1})://[a-zA-Z0-9_/\\-\\.]+\\.([A-Za-z/]{2,5})[a-zA-Z0-9_/\\&\\?\\=\\-\\.\\~\\%]*"); + return ok; + } + + + public static String escapeJson(String value) { + if (value == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : value.toCharArray()) { + if (c == '\r') + b.append("\\r"); + else if (c == '\n') + b.append("\\n"); + else if (c == '"') + b.append("\\\""); + else if (c == '\'') + b.append("\\'"); + else if (c == '\\') + b.append("\\\\"); + else + b.append(c); + } + return b.toString(); + } + + public static String humanize(String code) { + StringBuilder b = new StringBuilder(); + boolean lastBreak = true; + for (char c : code.toCharArray()) { + if (Character.isLetter(c)) { + if (lastBreak) + b.append(Character.toUpperCase(c)); + else { + if (Character.isUpperCase(c)) + b.append(" "); + b.append(c); + } + lastBreak = false; + } else { + b.append(" "); + lastBreak = true; + } + } + if (b.length() == 0) + return code; + else + return b.toString(); + } + + + public static String uncapitalize(String s) { + if( s == null ) return null; + if( s.length() == 0 ) return s; + if( s.length() == 1 ) return s.toLowerCase(); + + return s.substring(0, 1).toLowerCase() + s.substring(1); + } + + + public static int charCount(String s, char c) { + int res = 0; + for (char ch : s.toCharArray()) + if (ch == c) + res++; + return res; + } + + + // http://stackoverflow.com/questions/3780406/how-to-play-a-sound-alert-in-a-java-application + public static float SAMPLE_RATE = 8000f; + + public static void tone(int hz, int msecs) { + tone(hz, msecs, 1.0); + } + + public static void tone(int hz, int msecs, double vol) { + try { + byte[] buf = new byte[1]; + AudioFormat af = + new AudioFormat( + SAMPLE_RATE, // sampleRate + 8, // sampleSizeInBits + 1, // channels + true, // signed + false); // bigEndian + SourceDataLine sdl; + sdl = AudioSystem.getSourceDataLine(af); + sdl.open(af); + sdl.start(); + for (int i=0; i < msecs*8; i++) { + double angle = i / (SAMPLE_RATE / hz) * 2.0 * Math.PI; + buf[0] = (byte)(Math.sin(angle) * 127.0 * vol); + sdl.write(buf,0,1); + } + sdl.drain(); + sdl.stop(); + sdl.close(); + } catch (Exception e) { + } + } + + + public static boolean isOid(String cc) { + return cc.matches(OID_REGEX) && cc.lastIndexOf('.') > 5; + } + + + public static boolean equals(String one, String two) { + if (one == null && two == null) + return true; + if (one == null || two == null) + return false; + return one.equals(two); + } + + + public static void deleteAllFiles(String folder, String type) { + File src = new File(folder); + String[] files = src.list(); + for (String f : files) { + if (new File(folder+File.separator+f).isDirectory()) { + deleteAllFiles(folder+File.separator+f, type); + } else if (f.endsWith(type)) { + new File(folder+File.separator+f).delete(); + } + } + + } + + public static boolean compareIgnoreWhitespace(File f1, File f2) throws IOException { + InputStream in1 = null; + InputStream in2 = null; + try { + in1 = new BufferedInputStream(new FileInputStream(f1)); + in2 = new BufferedInputStream(new FileInputStream(f2)); + + int expectedByte = in1.read(); + while (expectedByte != -1) { + boolean w1 = isWhitespace(expectedByte); + if (w1) + while (isWhitespace(expectedByte)) + expectedByte = in1.read(); + int foundByte = in2.read(); + if (w1) { + if (!isWhitespace(foundByte)) + return false; + while (isWhitespace(foundByte)) + foundByte = in2.read(); + } + if (expectedByte != foundByte) + return false; + expectedByte = in1.read(); + } + if (in2.read() != -1) { + return false; + } + return true; + } finally { + if (in1 != null) { + try { + in1.close(); + } catch (IOException e) {} + } + if (in2 != null) { + try { + in2.close(); + } catch (IOException e) {} + } + } + } + + private static boolean isWhitespace(int b) { + return b == 9 || b == 10 || b == 13 || b == 32; + } + + + public static boolean compareIgnoreWhitespace(String fn1, String fn2) throws IOException { + return compareIgnoreWhitespace(new File(fn1), new File(fn2)); + } + + + public static boolean isAbsoluteUrl(String ref) { + return ref.startsWith("http:") || ref.startsWith("https:") || ref.startsWith("urn:uuid:") || ref.startsWith("urn:oid:") ; + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/ZipURIResolver.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/ZipURIResolver.java new file mode 100644 index 00000000000..7799a94d58f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/ZipURIResolver.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.utilities; + +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + + +import java.io.ByteArrayInputStream; +import java.util.Map; + +import javax.xml.transform.Source; +import javax.xml.transform.TransformerException; +import javax.xml.transform.URIResolver; +import javax.xml.transform.stream.StreamSource; + +public class ZipURIResolver implements URIResolver { + + private Map files; + + + public ZipURIResolver(Map files) { + super(); + this.files = files; + } + + + @Override + public Source resolve(String arg0, String arg1) throws TransformerException { + try { + byte[] bs = files.get(arg0); + return new StreamSource(new ByteArrayInputStream(bs)); + } catch (Exception e) { + throw new TransformerException(e); + } + } + +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/NodeType.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/NodeType.java new file mode 100644 index 00000000000..5b714474dad --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/NodeType.java @@ -0,0 +1,31 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xhtml; + +public enum NodeType { Element, Text, Comment, DocType, Document, Instruction } \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java new file mode 100644 index 00000000000..32a44a5e99b --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java @@ -0,0 +1,303 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xhtml; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.io.Writer; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xml.IXMLWriter; +import org.w3c.dom.Element; + +public class XhtmlComposer { + + public static final String XHTML_NS = "http://www.w3.org/1999/xhtml"; + private boolean pretty; + private boolean xmlOnly; + + + public boolean isPretty() { + return pretty; + } + + public void setPretty(boolean pretty) { + this.pretty = pretty; + } + + public boolean isXmlOnly() { + return xmlOnly; + } + + public XhtmlComposer setXmlOnly(boolean xmlOnly) { + this.xmlOnly = xmlOnly; + return this; + } + + + private Writer dst; + + public String compose(XhtmlDocument doc) throws IOException, FHIRException { + StringWriter sdst = new StringWriter(); + dst = sdst; + composeDoc(doc); + return sdst.toString(); + } + + public String compose(XhtmlNode node) throws IOException { + StringWriter sdst = new StringWriter(); + dst = sdst; + writeNode("", node); + return sdst.toString(); + } + + public void compose(OutputStream stream, XhtmlDocument doc) throws IOException, FHIRException { + byte[] bom = new byte[] { (byte)0xEF, (byte)0xBB, (byte)0xBF }; + stream.write(bom); + dst = new OutputStreamWriter(stream, "UTF-8"); + composeDoc(doc); + dst.flush(); + } + + private void composeDoc(XhtmlDocument doc) throws IOException, FHIRException { + // headers.... +// dst.append("" + (isPretty() ? "\r\n" : "")); + for (XhtmlNode c : doc.getChildNodes()) + writeNode(" ", c); +// dst.append("" + (isPretty() ? "\r\n" : "")); + } + + private void writeNode(String indent, XhtmlNode node) throws IOException { + if (node.getNodeType() == NodeType.Comment) + writeComment(indent, node); + else if (node.getNodeType() == NodeType.DocType) + writeDocType(node); + else if (node.getNodeType() == NodeType.Instruction) + writeInstruction(node); + else if (node.getNodeType() == NodeType.Element) + writeElement(indent, node); + else if (node.getNodeType() == NodeType.Text) + writeText(node); + else + throw new Error("Unknown node type: "+node.getNodeType().toString()); + } + + private void writeText(XhtmlNode node) throws IOException { + for (char c : node.getContent().toCharArray()) + { + if (c == '&') + dst.append("&"); + else if (c == '<') + dst.append("<"); + else if (c == '>') + dst.append(">"); + else if (c == '"') + dst.append("""); + else if (!xmlOnly) { + dst.append(c); + } else { + if (c == XhtmlNode.NBSP.charAt(0)) + dst.append(" "); + else if (c == (char) 0xA7) + dst.append("§"); + else if (c == (char) 169) + dst.append("©"); + else if (c == (char) 8482) + dst.append("™"); + else if (c == (char) 956) + dst.append("μ"); + else if (c == (char) 174) + dst.append("®"); + else + dst.append(c); + } + } + } + + private void writeComment(String indent, XhtmlNode node) throws IOException { + dst.append(indent + "" + (isPretty() ? "\r\n" : "")); +} + + private void writeDocType(XhtmlNode node) throws IOException { + dst.append("\r\n"); +} + + private void writeInstruction(XhtmlNode node) throws IOException { + dst.append("\r\n"); +} + + private String escapeHtml(String s) { + if (s == null || s.equals("")) + return null; + StringBuilder b = new StringBuilder(); + for (char c : s.toCharArray()) + if (c == '<') + b.append("<"); + else if (c == '>') + b.append(">"); + else if (c == '"') + b.append("""); + else if (c == '&') + b.append("&"); + else + b.append(c); + return b.toString(); + } + + private String attributes(XhtmlNode node) { + StringBuilder s = new StringBuilder(); + for (String n : node.getAttributes().keySet()) + s.append(" " + n + "=\"" + escapeHtml(node.getAttributes().get(n)) + "\""); + return s.toString(); + } + + private void writeElement(String indent, XhtmlNode node) throws IOException { + if (!pretty) + indent = ""; + + if (node.getChildNodes().size() == 0) + dst.append(indent + "<" + node.getName() + attributes(node) + "/>" + (isPretty() ? "\r\n" : "")); + else { + boolean act = node.allChildrenAreText(); + if (act || !pretty) + dst.append(indent + "<" + node.getName() + attributes(node)+">"); + else + dst.append(indent + "<" + node.getName() + attributes(node) + ">\r\n"); + if (node.getName() == "head" && node.getElement("meta") == null) + dst.append(indent + " " + (isPretty() ? "\r\n" : "")); + + + for (XhtmlNode c : node.getChildNodes()) + writeNode(indent + " ", c); + if (act) + dst.append("" + (isPretty() ? "\r\n" : "")); + else if (node.getChildNodes().get(node.getChildNodes().size() - 1).getNodeType() == NodeType.Text) + dst.append((isPretty() ? "\r\n"+ indent : "") + "" + (isPretty() ? "\r\n" : "")); + else + dst.append(indent + "" + (isPretty() ? "\r\n" : "")); + } + } + + public void compose(IXMLWriter xml, XhtmlNode node) throws IOException { + if (node.getNodeType() == NodeType.Comment) + xml.comment(node.getContent(), isPretty()); + else if (node.getNodeType() == NodeType.Element) + composeElement(xml, node); + else if (node.getNodeType() == NodeType.Text) + xml.text(node.getContent()); + else + throw new Error("Unhandled node type: "+node.getNodeType().toString()); + } + + private void composeElement(IXMLWriter xml, XhtmlNode node) throws IOException { + for (String n : node.getAttributes().keySet()) + xml.attribute(n, node.getAttributes().get(n)); + xml.enter(XHTML_NS, node.getName()); + for (XhtmlNode n : node.getChildNodes()) + compose(xml, n); + xml.exit(XHTML_NS, node.getName()); + } + + public String composePlainText(XhtmlNode x) { + StringBuilder b = new StringBuilder(); + composePlainText(x, b, false); + return b.toString().trim(); + } + + private boolean composePlainText(XhtmlNode x, StringBuilder b, boolean lastWS) { + if (x.getNodeType() == NodeType.Text) { + String s = x.getContent(); + if (!lastWS & (s.startsWith(" ") || s.startsWith("\r") || s.startsWith("\n") || s.endsWith("\t"))) { + b.append(" "); + lastWS = true; + } + String st = s.trim().replace("\r", " ").replace("\n", " ").replace("\t", " "); + while (st.contains(" ")) + st = st.replace(" ", " "); + if (!Utilities.noString(st)) { + b.append(st); + lastWS = false; + if (!lastWS & (s.endsWith(" ") || s.endsWith("\r") || s.endsWith("\n") || s.endsWith("\t"))) { + b.append(" "); + lastWS = true; + } + } + return lastWS; + } else if (x.getNodeType() == NodeType.Element) { + if (x.getName().equals("li")) { + b.append("* "); + lastWS = true; + } + + for (XhtmlNode n : x.getChildNodes()) { + lastWS = composePlainText(n, b, lastWS); + } + if (x.getName().equals("p")) { + b.append("\r\n\r\n"); + lastWS = true; + } + if (x.getName().equals("br") || x.getName().equals("li")) { + b.append("\r\n"); + lastWS = true; + } + return lastWS; + } else + return lastWS; + } + + public void compose(Element div, XhtmlNode x) { + for (XhtmlNode child : x.getChildNodes()) { + appendChild(div, child); + } + } + + private void appendChild(Element e, XhtmlNode node) { + if (node.getNodeType() == NodeType.Comment) + e.appendChild(e.getOwnerDocument().createComment(node.getContent())); + else if (node.getNodeType() == NodeType.DocType) + throw new Error("not done yet"); + else if (node.getNodeType() == NodeType.Instruction) + e.appendChild(e.getOwnerDocument().createProcessingInstruction("", node.getContent())); + else if (node.getNodeType() == NodeType.Text) + e.appendChild(e.getOwnerDocument().createTextNode(node.getContent())); + else if (node.getNodeType() == NodeType.Element) { + Element child = e.getOwnerDocument().createElementNS(XHTML_NS, node.getName()); + e.appendChild(child); + for (XhtmlNode c : node.getChildNodes()) { + appendChild(child, c); + } + } else + throw new Error("Unknown node type: "+node.getNodeType().toString()); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlDocument.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlDocument.java new file mode 100644 index 00000000000..3e36a16386c --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlDocument.java @@ -0,0 +1,37 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xhtml; + +public class XhtmlDocument extends XhtmlNode { + + public XhtmlDocument() { + super(NodeType.Document); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java new file mode 100644 index 00000000000..637ff76bfc0 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java @@ -0,0 +1,351 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xhtml; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +//@DatatypeDef() +public class XhtmlNode { + + public static final String NBSP = Character.toString((char)0xa0); + + private NodeType nodeType; + private String name; + private Map Attributes = new HashMap(); + private List childNodes = new ArrayList(); + private String content; + + public XhtmlNode() { + super(); + } + + public XhtmlNode(NodeType nodeType, String name) { + super(); + this.nodeType = nodeType; + this.name = name; + } + + public XhtmlNode(NodeType nodeType) { + super(); + this.nodeType = nodeType; + } + + public NodeType getNodeType() { + return nodeType; + } + + public void setNodeType(NodeType nodeType) { + this.nodeType = nodeType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Map getAttributes() { + return Attributes; + } + + public List getChildNodes() { + return childNodes; + } + + public String getContent() { + return content; + } + + public XhtmlNode setContent(String content) { + if (!(nodeType != NodeType.Text || nodeType != NodeType.Comment)) + throw new Error("Wrong node type"); + this.content = content; + return this; + } + + public XhtmlNode addTag(String name) + { + + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type. is "+nodeType.toString()); + XhtmlNode node = new XhtmlNode(NodeType.Element); + node.setName(name); + childNodes.add(node); + return node; + } + + public XhtmlNode addTag(int index, String name) + { + + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type. is "+nodeType.toString()); + XhtmlNode node = new XhtmlNode(NodeType.Element); + node.setName(name); + childNodes.add(index, node); + return node; + } + + public XhtmlNode addComment(String content) + { + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + XhtmlNode node = new XhtmlNode(NodeType.Comment); + node.setContent(content); + childNodes.add(node); + return node; + } + + public XhtmlNode addDocType(String content) + { + if (!(nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + XhtmlNode node = new XhtmlNode(NodeType.DocType); + node.setContent(content); + childNodes.add(node); + return node; + } + + public XhtmlNode addInstruction(String content) + { + if (!(nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + XhtmlNode node = new XhtmlNode(NodeType.Instruction); + node.setContent(content); + childNodes.add(node); + return node; + } + + + + + public XhtmlNode addText(String content) + { + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + if (content != null) { + XhtmlNode node = new XhtmlNode(NodeType.Text); + node.setContent(content); + childNodes.add(node); + return node; + } else + return null; + } + + public XhtmlNode addText(int index, String content) + { + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + if (content == null) + throw new Error("Content cannot be null"); + + XhtmlNode node = new XhtmlNode(NodeType.Text); + node.setContent(content); + childNodes.add(index, node); + return node; + } + + public boolean allChildrenAreText() + { + boolean res = true; + for (XhtmlNode n : childNodes) + res = res && n.getNodeType() == NodeType.Text; + return res; + } + + public XhtmlNode getElement(String name) + { + for (XhtmlNode n : childNodes) + if (n.getNodeType() == NodeType.Element && name.equals(n.getName())) + return n; + return null; + } + + public XhtmlNode getFirstElement() + { + for (XhtmlNode n : childNodes) + if (n.getNodeType() == NodeType.Element) + return n; + return null; + } + + public String allText() { + StringBuilder b = new StringBuilder(); + for (XhtmlNode n : childNodes) + if (n.getNodeType() == NodeType.Text) + b.append(n.getContent()); + else if (n.getNodeType() == NodeType.Element) + b.append(n.allText()); + return b.toString(); + } + + public XhtmlNode attribute(String name, String value) { + if (!(nodeType == NodeType.Element || nodeType == NodeType.Document)) + throw new Error("Wrong node type"); + if (name == null) + throw new Error("name is null"); + if (value == null) + throw new Error("value is null"); + Attributes.put(name, value); + return this; + } + + public boolean hasAttribute(String name) { + return getAttributes().containsKey(name); + } + + public String getAttribute(String name) { + return getAttributes().get(name); + } + + public XhtmlNode setAttribute(String name, String value) { + getAttributes().put(name, value); + return this; + } + + public XhtmlNode copy() { + XhtmlNode dst = new XhtmlNode(nodeType); + dst.name = name; + for (String n : Attributes.keySet()) { + dst.Attributes.put(n, Attributes.get(n)); + } + for (XhtmlNode n : childNodes) + dst.childNodes.add(n.copy()); + dst.content = content; + return dst; + } + + public boolean isEmpty() { + return (childNodes == null || childNodes.isEmpty()) && content == null; + } + + public boolean equalsDeep(XhtmlNode other) { + if (other instanceof XhtmlNode) + return false; + XhtmlNode o = (XhtmlNode) other; + if (!(nodeType == o.nodeType) || !compare(name, o.name) || !compare(content, o.content)) + return false; + if (Attributes.size() != o.Attributes.size()) + return false; + for (String an : Attributes.keySet()) + if (!Attributes.get(an).equals(o.Attributes.get(an))) + return false; + if (childNodes.size() != o.childNodes.size()) + return false; + for (int i = 0; i < childNodes.size(); i++) { + if (!compareDeep(childNodes.get(i), o.childNodes.get(i))) + return false; + } + return true; + } + + private boolean compare(String s1, String s2) { + if (s1 == null && s2 == null) + return true; + if (s1 == null || s2 == null) + return false; + return s1.equals(s2); + } + + private static boolean compareDeep(XhtmlNode e1, XhtmlNode e2) { + if (e1 == null && e2 == null) + return true; + if (e1 == null || e2 == null) + return false; + return e1.equalsDeep(e2); + } + + + public String getValueAsString() { + if (isEmpty()) { + return null; + } + try { + return new XhtmlComposer().compose(this); + } catch (Exception e) { + // TODO: composer shouldn't throw exception like this + throw new RuntimeException(e); + } + } + + public void setValueAsString(String theValue) throws IllegalArgumentException { + this.Attributes = null; + this.childNodes = null; + this.content = null; + this.name = null; + this.nodeType= null; + if (theValue == null) { + return; + } + + String val = theValue.trim(); + if (theValue == null || theValue.isEmpty()) { + return; + } + + if (!val.startsWith("<")) { + val = "
" + val + "
"; + } + if (val.startsWith("")) { + return; + } + + try { + // TODO: this is ugly + XhtmlNode fragment = new XhtmlParser().parseFragment(val); + this.Attributes = fragment.Attributes; + this.childNodes = fragment.childNodes; + this.content = fragment.content; + this.name = fragment.name; + this.nodeType= fragment.nodeType; + } catch (Exception e) { + // TODO: composer shouldn't throw exception like this + throw new RuntimeException(e); + } + + } + + public XhtmlNode getElementByIndex(int i) { + int c = 0; + for (XhtmlNode n : childNodes) + if (n.getNodeType() == NodeType.Element) { + if (c == i) + return n; + else + c++; + } + return null; + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java new file mode 100644 index 00000000000..b2dd20d7ca9 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java @@ -0,0 +1,943 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xhtml; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +public class XhtmlParser { + + private Set elements = new HashSet(); + private Set attributes = new HashSet(); + + + public XhtmlParser() { + super(); + policy = ParserSecurityPolicy.Accept; // for general parsing + + // set up sets + elements.add("p"); + elements.add("br"); + elements.add("div"); + elements.add("h1"); + elements.add("h2"); + elements.add("h3"); + elements.add("h4"); + elements.add("h5"); + elements.add("h6"); + elements.add("a"); + elements.add("span"); + elements.add("b"); + elements.add("em"); + elements.add("i"); + elements.add("strong"); + elements.add("small"); + elements.add("big"); + elements.add("tt"); + elements.add("small"); + elements.add("dfn"); + elements.add("q"); + elements.add("var"); + elements.add("abbr"); + elements.add("acronym"); + elements.add("cite"); + elements.add("blockquote"); + elements.add("hr"); + elements.add("address"); + elements.add("bdo"); + elements.add("kbd"); + elements.add("q"); + elements.add("sub"); + elements.add("sup"); + elements.add("ul"); + elements.add("ol"); + elements.add("li"); + elements.add("dl"); + elements.add("dt"); + elements.add("dd"); + elements.add("pre"); + elements.add("table"); + elements.add("caption"); + elements.add("colgroup"); + elements.add("col"); + elements.add("thead"); + elements.add("tr"); + elements.add("tfoot"); + elements.add("tbody"); + elements.add("th"); + elements.add("td"); + elements.add("code"); + elements.add("samp"); + elements.add("img"); + elements.add("map"); + elements.add("area"); + + attributes.add("title"); + attributes.add("style"); + attributes.add("class"); + attributes.add("id"); + attributes.add("lang"); + attributes.add("xml:lang"); + attributes.add("dir"); + attributes.add("accesskey"); + attributes.add("tabindex"); + // tables: + attributes.add("span"); + attributes.add("width"); + attributes.add("align"); + attributes.add("valign"); + attributes.add("char"); + attributes.add("charoff"); + attributes.add("abbr"); + attributes.add("axis"); + attributes.add("headers"); + attributes.add("scope"); + attributes.add("rowspan"); + attributes.add("colspan"); + + attributes.add("a.href"); + attributes.add("a.name"); + attributes.add("img.src"); + attributes.add("img.border"); + attributes.add("div.xmlns"); + attributes.add("blockquote.cite"); + attributes.add("q.cite"); + attributes.add("a.charset"); + attributes.add("a.type"); + attributes.add("a.name"); + attributes.add("a.href"); + attributes.add("a.hreflang"); + attributes.add("a.rel"); + attributes.add("a.rev"); + attributes.add("a.shape"); + attributes.add("a.coords"); + attributes.add("img.src"); + attributes.add("img.alt"); + attributes.add("img.longdesc"); + attributes.add("img.height"); + attributes.add("img.width"); + attributes.add("img.usemap"); + attributes.add("img.ismap"); + attributes.add("map.name"); + attributes.add("area.shape"); + attributes.add("area.coords"); + attributes.add("area.href"); + attributes.add("area.nohref"); + attributes.add("area.alt"); + attributes.add("table.summary"); + attributes.add("table.width"); + attributes.add("table.border"); + attributes.add("table.frame"); + attributes.add("table.rules"); + attributes.add("table.cellspacing"); + attributes.add("table.cellpadding"); +} + +public enum ParserSecurityPolicy { + Accept, + Drop, + Reject + } + + private ParserSecurityPolicy policy; + + private boolean trimWhitespace; + private boolean mustBeWellFormed = true; + + public boolean isTrimWhitespace() { + return trimWhitespace; + } + + public void setTrimWhitespace(boolean trimWhitespace) { + this.trimWhitespace = trimWhitespace; + } + + public boolean isMustBeWellFormed() { + return mustBeWellFormed; + } + + public void setMustBeWellFormed(boolean mustBeWellFormed) { + this.mustBeWellFormed = mustBeWellFormed; + } + + + public ParserSecurityPolicy getPolicy() { + return policy; + } + + public void setPolicy(ParserSecurityPolicy policy) { + this.policy = policy; + } + + public XhtmlNode parseHtmlNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + XhtmlNode res = new XhtmlNode(NodeType.Element); + res.setName(xpp.getName()); + + for (int i = 0; i < xpp.getAttributeCount(); i++) { + if (attributeIsOk(xpp.getName(), xpp.getAttributeName(i), xpp.getAttributeValue(i))) + res.getAttributes().put(xpp.getAttributeName(i), xpp.getAttributeValue(i)); + } + int eventType = xpp.next(); + while (eventType != XmlPullParser.END_TAG) { + if (eventType == XmlPullParser.TEXT) { + res.addText(xpp.getText()); + xpp.next(); + } else if (eventType == XmlPullParser.COMMENT) { + res.addComment(xpp.getText()); + xpp.next(); + } else if (eventType == XmlPullParser.START_TAG) { + if (elementIsOk(xpp.getName())) + res.getChildNodes().add(parseHtmlNode(xpp)); + } else + throw new FHIRFormatError("Unhandled XHTML feature: "+Integer.toString(eventType)+descLoc()); + eventType = xpp.getEventType(); + } + xpp.next(); + return res; + } + + private boolean attributeIsOk(String elem, String attr, String value) throws FHIRFormatError { + boolean ok = attributes.contains(attr) || attributes.contains(elem+"."+attr); + if (ok) + return true; + else switch (policy) { + case Accept: return true; + case Drop: return false; + case Reject: throw new FHIRFormatError("Illegal HTML attribute "+elem+"."+attr); + } + + if ((elem+"."+attr).equals("img.src") && !(value.startsWith("#") || value.startsWith("http:") || value.startsWith("https:"))) { + switch (policy) { + case Accept: return true; + case Drop: return false; + case Reject: throw new FHIRFormatError("Illegal Image Reference "+value); + } + } + return false; + } + +private boolean elementIsOk(String name) throws FHIRFormatError { + boolean ok = elements.contains(name); + if (ok) + return true; + else switch (policy) { + case Accept: return true; + case Drop: return false; + case Reject: throw new FHIRFormatError("Illegal HTML element "+name); + } + return false; +} + + private String descLoc() { + return " at line "+Integer.toString(line)+" column "+Integer.toString(col); + } + + private Reader rdr; + private String cache = ""; + private XhtmlNode unwindPoint; + private String lastText = ""; + private int line = 1; + private int col = 0; + private char lastChar; + + public XhtmlDocument parse(String source, String entryName) throws FHIRFormatError, IOException { + rdr = new StringReader(source); + return parse(entryName); + } + + public XhtmlDocument parse(InputStream input, String entryName) throws FHIRFormatError, IOException { + rdr = new InputStreamReader(input, "UTF-8"); + return parse(entryName); + } + + private XhtmlDocument parse(String entryName) throws FHIRFormatError, IOException + { + XhtmlDocument result = new XhtmlDocument(); + skipWhiteSpaceAndComments(result); + if (peekChar() != '<') + throw new FHIRFormatError("Unable to Parse HTML - does not start with tag. Found "+peekChar()+descLoc()); + readChar(); + String n = readName().toLowerCase(); + if ((entryName != null) && !n.equals(entryName)) + throw new FHIRFormatError("Unable to Parse HTML - starts with '"+n+"' not '"+entryName+"'"+descLoc()); + XhtmlNode root = result.addTag(n); + + readToTagEnd(); + unwindPoint = null; + List p = new ArrayList(); + parseElementInner(root, p); + + return result; + } + + private void addTextNode(XhtmlNode node, StringBuilder s) + { + String t = isTrimWhitespace() ? s.toString().trim() : s.toString(); + if (t.length() > 0) + { + lastText = t; + // System.out.println(t); + node.addText(t); + s.setLength(0); + } + } + private void parseElementInner(XhtmlNode node, List parents) throws FHIRFormatError, IOException + { + StringBuilder s = new StringBuilder(); + while (peekChar() != '\0' && !parents.contains(unwindPoint) && !(node == unwindPoint)) + { + if (peekChar() == '<') + { + addTextNode(node, s); + readChar(); + if (peekChar() == '!') + node.addComment(readToCommentEnd()); + else if (peekChar() == '?') + node.addComment(readToTagEnd()); + else if (peekChar() == '/') + { + readChar(); + String n = readToTagEnd(); + if (node.getName().equals(n)) + return; + else + { + if (mustBeWellFormed) + throw new FHIRFormatError("Malformed XHTML: Found \"\" expecting \"\""+descLoc()); + for (int i = parents.size() - 1; i >= 0; i--) + { + if (parents.get(i).getName().equals(n)) + unwindPoint = parents.get(i); + } + if (unwindPoint != null) + { + for (int i = parents.size(); i > 0; i--) + { + if (i < parents.size() && parents.get(i) == unwindPoint) + return; + if (i == parents.size()) + { + parents.get(i - 1).getChildNodes().addAll(node.getChildNodes()); + node.getChildNodes().clear(); + } + else + { + parents.get(i - 1).getChildNodes().addAll(parents.get(i).getChildNodes()); + parents.get(i).getChildNodes().clear(); + } + } + } + } + } + else if (Character.isLetterOrDigit(peekChar())) + { + parseElement(node, parents); + } + else + throw new FHIRFormatError("Unable to Parse HTML - node '" + node.getName() + "' has unexpected content '"+peekChar()+"' (last text = '"+lastText+"'"+descLoc()); + } + else if (peekChar() == '&') + { + parseLiteral(s); + } + else + s.append(readChar()); + } + addTextNode(node, s); + } + + private void parseElement(XhtmlNode parent, List parents) throws IOException, FHIRFormatError + { + String name = readName(); + XhtmlNode node = parent.addTag(name); + List newParents = new ArrayList(); + newParents.addAll(parents); + newParents.add(parent); + parseAttributes(node); + if (readChar() == '/') { + if (peekChar() != '>') + throw new FHIRFormatError("unexpected non-end of element"+descLoc()); + readChar(); + } else { + parseElementInner(node, newParents); + } + } + + private void parseAttributes(XhtmlNode node) throws FHIRFormatError, IOException + { + while (Character.isWhitespace(peekChar())) + readChar(); + while (peekChar() != '>' && peekChar() != '/' && peekChar() != '\0') + { + String name = readName(); + if (name.length() == 0) + { + throw new FHIRFormatError("Unable to read attribute on <"+node.getName()+">"+descLoc()); + } + while (Character.isWhitespace(peekChar())) + readChar(); + + if (isNameChar(peekChar()) || peekChar() == '>' || peekChar() == '/') + node.getAttributes().put(name, null); + else if (peekChar() != '=') + { + throw new FHIRFormatError("Unable to read attribute '"+name+"' value on <"+node.getName()+">"+descLoc()); + } + else + { + readChar(); + while (Character.isWhitespace(peekChar())) + readChar(); + if (peekChar() == '"' || peekChar() == '\'') + node.getAttributes().put(name, parseAttributeValue(readChar())); + else + node.getAttributes().put(name, parseAttributeValue('\0')); + } + while (Character.isWhitespace(peekChar())) + readChar(); + } + } + + private String parseAttributeValue(char term) throws IOException, FHIRFormatError + { + StringBuilder b = new StringBuilder(); + while (peekChar() != '\0' && peekChar() != '>' && (term != '\0' || peekChar() != '/') && peekChar() != term) + { + if (peekChar() == '&') + { + parseLiteral(b); + } + else + b.append(readChar()); + } + if (peekChar() == term) + readChar(); + return b.toString(); + } + + + private void skipWhiteSpaceAndComments(XhtmlNode focus) throws IOException, FHIRFormatError { + while (Character.isWhitespace(peekChar()) || (peekChar() == 0xfeff)) + readChar(); + if (peekChar() == '<') + { + char ch = readChar(); + if (peekChar() == '!') { + readChar(); + if (peekChar() == '-') { + readChar(); + if (peekChar() == '-') { + readChar(); + if (peekChar() == ' ') + readChar(); + focus.addComment(readToCommentEnd()); + } else + throw new FHIRFormatError("unrecognised element type 0) + return cache.charAt(0); + else if (!rdr.ready()) + return '\0'; + else + { + char c = (char)rdr.read(); + if (c == (char)-1) + { + cache = ""; + return '\0'; + } + cache = Character.toString(c); + return c; + } + } + + private char readChar() throws IOException + { + char c; + if (cache.length() > 0) + { + c = cache.charAt(0); + cache = cache.length() == 1 ? "" : cache.substring(1); + } + else if (!rdr.ready()) + c = '\0'; + else + c = (char)rdr.read(); + if (c == '\r' || c == '\n') { + if (c == '\r' || lastChar != '\r') { + line++; + col = 0; + } + lastChar = c; + } + col++; + return c; + } + + private String readToTagEnd() throws IOException, FHIRFormatError + { + StringBuilder s = new StringBuilder(); + while (peekChar() != '>' && peekChar() != '\0') + s.append(readChar()); + if (peekChar() != '\0') + { + readChar(); + skipWhiteSpace(); + } else if (mustBeWellFormed) + throw new FHIRFormatError("Unexpected termination of html source"+descLoc()); + return s.toString(); + } + + private String readToCommentEnd() throws IOException, FHIRFormatError + { + if (peekChar() == '!') + readChar(); + StringBuilder s = new StringBuilder(); + + boolean simple = true; + if (peekChar() == '-') { + readChar(); + simple = peekChar() != '-'; + if (simple) + s.append('-'); + else + readChar(); + } + + boolean done = false; + while (!done) { + char c = peekChar(); + if (c == '-') { + readChar(); + if (peekChar() == '-') { + readChar(); + if (peekChar() == '>') { + done = true; + } else + s.append("--"); + } else + s.append('-'); + } else if (simple && peekChar() == '>') { + done = true; + } else if (c != '\0') + s.append(readChar()); + else if (mustBeWellFormed) + throw new FHIRFormatError("Unexpected termination of html source"+descLoc()); + } + if (peekChar() != '\0') + { + readChar(); + skipWhiteSpace(); + } + return s.toString(); + } + + private boolean isNameChar(char ch) + { + return Character.isLetterOrDigit(ch) || ch == '_' || ch == '-' || ch == ':'; + } + + private String readName() throws IOException + { + StringBuilder s = new StringBuilder(); + while (isNameChar(peekChar())) + s.append(readChar()); + return s.toString(); + } + + private String readUntil(char ch) throws IOException + { + StringBuilder s = new StringBuilder(); + while (peekChar() != 0 && peekChar() != ch) + s.append(readChar()); + readChar(); + return s.toString(); + } + + private void parseLiteral(StringBuilder s) throws IOException, FHIRFormatError + { +// UInt16 w; + readChar(); + String c = readUntil(';'); + if (c.equals("apos")) + s.append('\''); + else if (c.equals("quot")) + s.append('"'); + else if (c.equals("nbsp")) + s.append(XhtmlNode.NBSP); + else if (c.equals("amp")) + s.append('&'); + else if (c.equals("gt")) + s.append('>'); + else if (c.equals("lt")) + s.append('<'); + else if (c.equals("copy")) + s.append((char) 169); + else if (c.equals("reg")) + s.append((char) 174); + else if (c.equals("sect")) + s.append((char) 0xA7); + else if (c.charAt(0) == '#') { + if (isInteger(c.substring(1), 10)) + s.append((char) Integer.parseInt(c.substring(1))); + else if (isInteger(c.substring(1), 16)) + s.append((char) Integer.parseInt(c.substring(1), 16)); + } + else if (c.equals("fnof")) + s.append((char)402); // latin small f with hook = function = florin, U+0192 ISOtech --> + else if (c.equals("Alpha")) + s.append((char)913); // greek capital letter alpha, U+0391 + else if (c.equals("Beta")) + s.append((char)914); // greek capital letter beta, U+0392 + else if (c.equals("Gamma")) + s.append((char)915); // greek capital letter gamma, U+0393 ISOgrk3 + else if (c.equals("Delta")) + s.append((char)916); // greek capital letter delta, U+0394 ISOgrk3 + else if (c.equals("Epsilon")) + s.append((char)917); // greek capital letter epsilon, U+0395 + else if (c.equals("Zeta")) + s.append((char)918); // greek capital letter zeta, U+0396 + else if (c.equals("Eta")) + s.append((char)919); // greek capital letter eta, U+0397 + else if (c.equals("Theta")) + s.append((char)920); // greek capital letter theta, U+0398 ISOgrk3 + else if (c.equals("Iota")) + s.append((char)921); // greek capital letter iota, U+0399 + else if (c.equals("Kappa")) + s.append((char)922); // greek capital letter kappa, U+039A + else if (c.equals("Lambda")) + s.append((char)923); // greek capital letter lambda, U+039B ISOgrk3 + else if (c.equals("Mu")) + s.append((char)924); // greek capital letter mu, U+039C + else if (c.equals("Nu")) + s.append((char)925); // greek capital letter nu, U+039D + else if (c.equals("Xi")) + s.append((char)926); // greek capital letter xi, U+039E ISOgrk3 + else if (c.equals("Omicron")) + s.append((char)927); // greek capital letter omicron, U+039F + else if (c.equals("Pi")) + s.append((char)928); // greek capital letter pi, U+03A0 ISOgrk3 + else if (c.equals("Rho")) + s.append((char)929); // greek capital letter rho, U+03A1 + else if (c.equals("Sigma")) + s.append((char)931); // greek capital letter sigma, U+03A3 ISOgrk3 + else if (c.equals("Tau")) + s.append((char)932); // greek capital letter tau, U+03A4 + else if (c.equals("Upsilon")) + s.append((char)933); // greek capital letter upsilon, U+03A5 ISOgrk3 + else if (c.equals("Phi")) + s.append((char)934); // greek capital letter phi, U+03A6 ISOgrk3 + else if (c.equals("Chi")) + s.append((char)935); // greek capital letter chi, U+03A7 + else if (c.equals("Psi")) + s.append((char)936); // greek capital letter psi, U+03A8 ISOgrk3 + else if (c.equals("Omega")) + s.append((char)937); // greek capital letter omega, U+03A9 ISOgrk3 + else if (c.equals("alpha")) + s.append((char)945); // greek small letter alpha, U+03B1 ISOgrk3 + else if (c.equals("beta")) + s.append((char)946); // greek small letter beta, U+03B2 ISOgrk3 + else if (c.equals("gamma")) + s.append((char)947); // greek small letter gamma, U+03B3 ISOgrk3 + else if (c.equals("delta")) + s.append((char)948); // greek small letter delta, U+03B4 ISOgrk3 + else if (c.equals("epsilon")) + s.append((char)949); // greek small letter epsilon, U+03B5 ISOgrk3 + else if (c.equals("zeta")) + s.append((char)950); // greek small letter zeta, U+03B6 ISOgrk3 + else if (c.equals("eta")) + s.append((char)951); // greek small letter eta, U+03B7 ISOgrk3 + else if (c.equals("theta")) + s.append((char)952); // greek small letter theta, U+03B8 ISOgrk3 + else if (c.equals("iota")) + s.append((char)953); // greek small letter iota, U+03B9 ISOgrk3 + else if (c.equals("kappa")) + s.append((char)954); // greek small letter kappa, U+03BA ISOgrk3 + else if (c.equals("lambda")) + s.append((char)955); // greek small letter lambda, U+03BB ISOgrk3 + else if (c.equals("mu")) + s.append((char)956); // greek small letter mu, U+03BC ISOgrk3 + else if (c.equals("nu")) + s.append((char)957); // greek small letter nu, U+03BD ISOgrk3 + else if (c.equals("xi")) + s.append((char)958); // greek small letter xi, U+03BE ISOgrk3 + else if (c.equals("omicron")) + s.append((char)959); // greek small letter omicron, U+03BF NEW + else if (c.equals("pi")) + s.append((char)960); // greek small letter pi, U+03C0 ISOgrk3 + else if (c.equals("rho")) + s.append((char)961); // greek small letter rho, U+03C1 ISOgrk3 + else if (c.equals("sigmaf")) + s.append((char)962); // greek small letter final sigma, U+03C2 ISOgrk3 + else if (c.equals("sigma")) + s.append((char)963); // greek small letter sigma, U+03C3 ISOgrk3 + else if (c.equals("tau")) + s.append((char)964); // greek small letter tau, U+03C4 ISOgrk3 + else if (c.equals("upsilon")) + s.append((char)965); // greek small letter upsilon, U+03C5 ISOgrk3 + else if (c.equals("phi")) + s.append((char)966); // greek small letter phi, U+03C6 ISOgrk3 + else if (c.equals("chi")) + s.append((char)967); // greek small letter chi, U+03C7 ISOgrk3 + else if (c.equals("psi")) + s.append((char)968); // greek small letter psi, U+03C8 ISOgrk3 + else if (c.equals("omega")) + s.append((char)969); // greek small letter omega, U+03C9 ISOgrk3 + else if (c.equals("thetasym")) + s.append((char)977); // greek small letter theta symbol, U+03D1 NEW + else if (c.equals("upsih")) + s.append((char)978); // greek upsilon with hook symbol, U+03D2 NEW + else if (c.equals("piv")) + s.append((char)982); // greek pi symbol, U+03D6 ISOgrk3 + else if (c.equals("bull")) + s.append((char)8226); // bullet = black small circle, U+2022 ISOpub + else if (c.equals("hellip")) + s.append((char)8230); // horizontal ellipsis = three dot leader, U+2026 ISOpub + else if (c.equals("prime")) + s.append((char)8242); // prime = minutes = feet, U+2032 ISOtech + else if (c.equals("Prime")) + s.append((char)8243); // double prime = seconds = inches, U+2033 ISOtech + else if (c.equals("oline")) + s.append((char)8254); // overline = spacing overscore, U+203E NEW + else if (c.equals("frasl")) + s.append((char)8260); // fraction slash, U+2044 NEW + else if (c.equals("weierp")) + s.append((char)8472); // script capital P = power set = Weierstrass p, U+2118 ISOamso + else if (c.equals("image")) + s.append((char)8465); // blackletter capital I = imaginary part, U+2111 ISOamso + else if (c.equals("real")) + s.append((char)8476); // blackletter capital R = real part symbol, U+211C ISOamso + else if (c.equals("trade")) + s.append((char)8482); // trade mark sign, U+2122 ISOnum + else if (c.equals("alefsym")) + s.append((char)8501); // alef symbol = first transfinite cardinal, U+2135 NEW + else if (c.equals("larr")) + s.append((char)8592); // leftwards arrow, U+2190 ISOnum + else if (c.equals("uarr")) + s.append((char)8593); // upwards arrow, U+2191 ISOnum + else if (c.equals("rarr")) + s.append((char)8594); // rightwards arrow, U+2192 ISOnum + else if (c.equals("darr")) + s.append((char)8595); // downwards arrow, U+2193 ISOnum + else if (c.equals("harr")) + s.append((char)8596); // left right arrow, U+2194 ISOamsa + else if (c.equals("crarr")) + s.append((char)8629); // downwards arrow with corner leftwards = carriage return, U+21B5 NEW + else if (c.equals("lArr")) + s.append((char)8656); // leftwards double arrow, U+21D0 ISOtech + else if (c.equals("uArr")) + s.append((char)8657); // upwards double arrow, U+21D1 ISOamsa + else if (c.equals("rArr")) + s.append((char)8658); // rightwards double arrow, U+21D2 ISOtech + else if (c.equals("dArr")) + s.append((char)8659); // downwards double arrow, U+21D3 ISOamsa + else if (c.equals("hArr")) + s.append((char)8660); // left right double arrow, U+21D4 ISOamsa + else if (c.equals("forall")) + s.append((char)8704); // for all, U+2200 ISOtech + else if (c.equals("part")) + s.append((char)8706); // partial differential, U+2202 ISOtech + else if (c.equals("exist")) + s.append((char)8707); // there exists, U+2203 ISOtech + else if (c.equals("empty")) + s.append((char)8709); // empty set = null set = diameter, U+2205 ISOamso + else if (c.equals("nabla")) + s.append((char)8711); // nabla = backward difference, U+2207 ISOtech + else if (c.equals("isin")) + s.append((char)8712); // element of, U+2208 ISOtech + else if (c.equals("notin")) + s.append((char)8713); // not an element of, U+2209 ISOtech + else if (c.equals("ni")) + s.append((char)8715); // contains as member, U+220B ISOtech + else if (c.equals("prod")) + s.append((char)8719); // n-ary product = product sign, U+220F ISOamsb + else if (c.equals("sum")) + s.append((char)8721); // n-ary sumation, U+2211 ISOamsb + else if (c.equals("minus")) + s.append((char)8722); // minus sign, U+2212 ISOtech + else if (c.equals("lowast")) + s.append((char)8727); // asterisk operator, U+2217 ISOtech + else if (c.equals("radic")) + s.append((char)8730); // square root = radical sign, U+221A ISOtech + else if (c.equals("prop")) + s.append((char)8733); // proportional to, U+221D ISOtech + else if (c.equals("infin")) + s.append((char)8734); // infinity, U+221E ISOtech --> + else if (c.equals("ang")) + s.append((char)8736); // angle, U+2220 ISOamso + else if (c.equals("and")) + s.append((char)8743); // logical and = wedge, U+2227 ISOtech + else if (c.equals("or")) + s.append((char)8744); // logical or = vee, U+2228 ISOtech + else if (c.equals("cap")) + s.append((char)8745); // intersection = cap, U+2229 ISOtech + else if (c.equals("cup")) + s.append((char)8746); // union = cup, U+222A ISOtech + else if (c.equals("int")) + s.append((char)8747); // integral, U+222B ISOtech + else if (c.equals("there4")) + s.append((char)8756); // therefore, U+2234 ISOtech + else if (c.equals("sim")) + s.append((char)8764); // tilde operator = varies with = similar t U+223C ISOtech + else if (c.equals("cong")) + s.append((char)8773); // approximately equal to, U+2245 ISOtec + else if (c.equals("asymp")) + s.append((char)8776); // almost equal to = asymptotic to, U+2248 ISOamsr + else if (c.equals("ne")) + s.append((char)8800); // not equal to, U+2260 ISOtech + else if (c.equals("equiv")) + s.append((char)8801); // identical to, U+2261 ISOtech + else if (c.equals("le")) + s.append((char)8804); // less-than or equal to, U+2264 ISOtech + else if (c.equals("ge")) + s.append((char)8805); // greater-than or equal to, U+2265 ISOtech + else if (c.equals("sub")) + s.append((char)8834); // subset of, U+2282 ISOtech + else if (c.equals("sup")) + s.append((char)8835); // superset of, U+2283 ISOtech + else if (c.equals("nsub")) + s.append((char)8836); // not a subset of, U+2284 ISOamsn + else if (c.equals("sube")) + s.append((char)8838); // subset of or equal to, U+2286 ISOtech + else if (c.equals("supe")) + s.append((char)8839); // superset of or equal to, U+2287 ISOtech + else if (c.equals("oplus")) + s.append((char)8853); // circled plus = direct sum, U+2295 ISOamsb + else if (c.equals("otimes")) + s.append((char)8855); // circled times = vector product, U+2297 ISOamsb --> + else if (c.equals("perp")) + s.append((char)8869); // up tack = orthogonal to = perpendicular, U+22A5 ISOtech + else if (c.equals("sdot")) + s.append((char)8901); // dot operator, U+22C5 ISOamsb + else if (c.equals("lceil")) + s.append((char)8968); // left ceiling = apl upstile, U+2308 ISOamsc + else if (c.equals("rceil")) + s.append((char)8969); // right ceiling, U+2309 ISOamsc + else if (c.equals("lfloor")) + s.append((char)8970); // left floor = apl downstile, U+230A ISOamsc + else if (c.equals("rfloor")) + s.append((char)8971); // right floor, U+230B ISOamsc + else if (c.equals("lang")) + s.append((char)9001); // left-pointing angle bracket = bra, U+2329 ISOtech + else if (c.equals("rang")) + s.append((char)9002); // right-pointing angle bracket = ket, U+232A ISOtech + else if (c.equals("loz")) + s.append((char)9674); // lozenge, U+25CA ISOpub + else if (c.equals("spades")) + s.append((char)9824); // black spade suit, U+2660 ISOpub + else if (c.equals("clubs")) + s.append((char)9827); // black club suit = shamrock, U+2663 ISOpub + else if (c.equals("hearts")) + s.append((char)9829); // black heart suit = valentine, U+2665 ISOpub + else if (c.equals("diams")) + s.append((char)9830); // black diamond suit, U+2666 ISOpub -- + else + throw new FHIRFormatError("unable to parse character reference '" + c + "'' (last text = '"+lastText+"'"+descLoc()); +} + + private boolean isInteger(String s, int base) { + try { + Integer.parseInt(s, base); + return true; + } catch (Exception e) { + return false; + } + } + + public XhtmlNode parseFragment(String source) throws IOException, FHIRException { + rdr = new StringReader(source); + return parseFragment(); + } + + public XhtmlNode parseFragment(InputStream input) throws IOException, FHIRException { + rdr = new InputStreamReader(input); + return parseFragment(); + } + + private XhtmlNode parseFragment() throws IOException, FHIRException + { + skipWhiteSpace(); + if (peekChar() != '<') + throw new FHIRException("Unable to Parse HTML - does not start with tag. Found "+peekChar()+descLoc()); + readChar(); + if (peekChar() == '?') { + readToTagEnd(); + skipWhiteSpace(); + if (peekChar() != '<') + throw new FHIRException("Unable to Parse HTML - does not start with tag after processing instruction. Found "+peekChar()+descLoc()); + readChar(); + } + String n = readName().toLowerCase(); + readToTagEnd(); + XhtmlNode result = new XhtmlNode(NodeType.Element); + result.setName(n); + unwindPoint = null; + List p = new ArrayList(); + parseElementInner(result, p); + + return result; + } + + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xml/IXMLWriter.java b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xml/IXMLWriter.java new file mode 100644 index 00000000000..bf93b17243a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/main/java/org/hl7/fhir/utilities/xml/IXMLWriter.java @@ -0,0 +1,93 @@ +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.xml; + +import java.io.IOException; + +/** + * Generalize + * @author dennisn + */ +public interface IXMLWriter { + + public abstract void start() throws IOException; + public abstract void end() throws IOException; + + public abstract void attribute(String namespace, String name, String value, boolean onlyIfNotEmpty) throws IOException; + public abstract void attribute(String namespace, String name, String value) throws IOException; + public abstract void attribute(String name, String value, boolean onlyIfNotEmpty) throws IOException; + public abstract void attribute(String name, String value) throws IOException; + public abstract void attributeNoLines(String name, String value) throws IOException; + + public abstract boolean namespaceDefined(String namespace); + public abstract boolean abbreviationDefined(String abbreviation); + public abstract String getDefaultNamespace(); + public abstract void namespace(String namespace) throws IOException; + public abstract void setDefaultNamespace(String namespace) throws IOException; + public abstract void namespace(String namespace, String abbreviation) throws IOException; + + public abstract void comment(String comment, boolean doPretty) throws IOException; + + public abstract void enter(String name) throws IOException; + public abstract void enter(String namespace, String name) throws IOException; + public abstract void enter(String namespace, String name, String comment) throws IOException; + + public abstract void exit() throws IOException; + public abstract void exit(String name) throws IOException; + public abstract void exit(String namespace, String name) throws IOException; + public abstract void exitToLevel(int count) throws IOException; + + + public abstract void element(String namespace, String name, String content, boolean onlyIfNotEmpty) throws IOException; + public abstract void element(String namespace, String name, String content, String comment) throws IOException; + public abstract void element(String namespace, String name, String content) throws IOException; + public abstract void element(String name, String content, boolean onlyIfNotEmpty) throws IOException; + public abstract void element(String name, String content) throws IOException; + + public abstract void text(String content) throws IOException; + public abstract void text(String content, boolean dontEscape) throws IOException; + + public abstract void cData(String text) throws IOException; + + public abstract void writeBytes(byte[] bytes) throws IOException; + + public abstract boolean isPretty() throws IOException; + public abstract void setPretty(boolean pretty) throws IOException; + + /** + * Start comment inserts a + * so the comment doesn't close prematurely. + * @throws IOException + */ + public abstract void startCommentBlock() throws IOException; + public abstract void endCommentBlock() throws IOException; + +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/CustomTypeTest.java b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/CustomTypeTest.java new file mode 100644 index 00000000000..052c695e62f --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/CustomTypeTest.java @@ -0,0 +1,228 @@ +package ca.uhn.fhir.parser; + +import java.util.ArrayList; +import java.util.List; + +import org.hl7.fhir.dstu21.model.DateTimeType; +import org.hl7.fhir.dstu21.model.Patient; +import org.hl7.fhir.dstu21.model.Quantity; +import org.junit.Test; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Extension; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.util.ElementUtil; + +public class CustomTypeTest { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(CustomTypeTest.class); + + @Test + public void testEncode() { + + FhirContext ctx = FhirContext.forDstu2_1(); + + MyCustomPatient patient = new MyCustomPatient(); + + patient.addIdentifier().setSystem("urn:system").setValue("1234"); + patient.addName().addFamily("Rossi").addGiven("Mario"); + patient.setInsulinLevel(new Quantity()); + patient.setGlucoseLevel(new Quantity()); + patient.setHbA1c(new Quantity()); + patient.setBloodPressure(new Quantity()); + patient.setCholesterol(new Quantity()); + patient.setWeight(new StringDt("80 kg")); + patient.setWeight(new StringDt("185 cm")); + patient.setCheckDates(new ArrayList()); + patient.getCheckDates().add(new DateTimeType("2014-01-26T11:11:11")); + + IParser p = ctx.newXmlParser().setPrettyPrint(true); + String messageString = p.encodeResourceToString(patient); + + ourLog.info(messageString); + + } + + @ResourceDef(name = "Patient") + public static class MyCustomPatient extends Patient { + + private static final long serialVersionUID = 1L; + + @Child(name = "bloodPressure") // once every 3 month. The average target is 130/80 mmHg or less + @Extension(url = "http://example.com/BloodPressure", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The value of the patient's blood pressure") + private Quantity myBloodPressure; + + // Dates of periodic tests + @Child(name = "CheckDates", max = Child.MAX_UNLIMITED) + @Extension(url = "http://example.com/diabetes2", definedLocally = false, isModifier = true) + @Description(shortDefinition = "Dates of periodic tests") + private List myCheckDates; + + @Child(name = "cholesterol") // once a year. The target is triglycerides =< 2 mmol/l e cholesterol =< 4 mmol/l + @Extension(url = "http://example.com/Cholesterol", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The value of the patient's cholesterol") + private Quantity myCholesterol; + + @Child(name = "glucoseLevel") // fingerprick test + @Extension(url = "http://example.com/Glucose", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The value of the patient's blood glucose") + private Quantity myGlucoseLevel; + + // Periodic Tests + @Child(name = "hbA1c") // once every 6 month. The average target is 53 mmol/mol (or 7%) or less. + @Extension(url = "http://example.com/HbA1c", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The value of the patient's glucose") + private Quantity myHbA1c; + + @Child(name = "Height") + @Extension(url = "http://example.com/Height", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The patient's height in cm") + private StringDt myHeight; + + @Child(name = "insulinLevel") // Normal range is [43,208] pmol/l + @Extension(url = "http://example.com/Insuline", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The value of the patient's insulin") + private Quantity myInsulinLevel; + + // Other parameters + @Child(name = "weight") + @Extension(url = "http://example.com/Weight", definedLocally = false, isModifier = false) + @Description(shortDefinition = "The patient's weight in Kg") + private StringDt myWeight; + + public Quantity Cholesterol() { + if (myCholesterol == null) { + myCholesterol = new Quantity(); + } + myCholesterol.getValue(); + myCholesterol.getSystem(); + myCholesterol.getCode(); + + return myCholesterol; + } + + public Quantity getBloodPressure() { + if (myBloodPressure == null) { + myBloodPressure = new Quantity(); + } + myBloodPressure.getValue(); + myBloodPressure.getSystem(); + myBloodPressure.getCode(); + + return myBloodPressure; + } + + public List getCheckDates() { + if (myCheckDates == null) { + myCheckDates = new ArrayList(); + } + return myCheckDates; + } + + public Quantity getGlucoseLevel() { + if (myGlucoseLevel == null) { + myGlucoseLevel = new Quantity(); + } + myGlucoseLevel.getValue(); + myGlucoseLevel.getSystem(); + myGlucoseLevel.getCode(); + + return myGlucoseLevel; + } + + public Quantity getHbA1c() { + if (myHbA1c == null) { + myHbA1c = new Quantity(); + } + myHbA1c.getValue(); + myHbA1c.getSystem(); + myHbA1c.getCode(); + + return myHbA1c; + } + + public StringDt getHeight() { + if (myHeight == null) { + myHeight = new StringDt(); + } + return myHeight; + } + + public Quantity getInsulinLevel() { + if (myInsulinLevel == null) { + myInsulinLevel = new Quantity(); + } + myInsulinLevel.getValue(); + myInsulinLevel.getSystem(); + myInsulinLevel.getCode(); + + return myInsulinLevel; + } + + public StringDt getWeight() { + if (myWeight == null) { + myWeight = new StringDt(); + } + return myWeight; + } + + @Override + public boolean isEmpty() { + return super.isEmpty() && ElementUtil.isEmpty(myInsulinLevel, myGlucoseLevel, myHbA1c, myBloodPressure, myCholesterol, myWeight, myHeight, myCheckDates); + } + + public void setBloodPressure(Quantity bloodPressure) { + myBloodPressure = bloodPressure; + myBloodPressure.setValue(110); + myBloodPressure.setSystem("http://unitsofmeasure.org"); + myBloodPressure.setCode("mmHg"); + } + + public void setCheckDates(List theCheckDates) { + myCheckDates = theCheckDates; + myCheckDates.add(new DateTimeType("2010-01-02")); + } + + public void setCholesterol(Quantity cholesterol) { + myCholesterol = cholesterol; + myCholesterol.setValue(2); + myCholesterol.setSystem("http://unitsofmeasure.org"); + myCholesterol.setCode("mmol/l"); + } + + public void setGlucoseLevel(Quantity glucoseLevel) { + myGlucoseLevel = glucoseLevel; + myGlucoseLevel.setValue(95); + myGlucoseLevel.setSystem("http://unitsofmeasure.org"); + myGlucoseLevel.setCode("mg/dl"); + } + + public void setHbA1c(Quantity hba1c) { + myHbA1c = hba1c; + myHbA1c.setValue(48); + myHbA1c.setSystem("http://unitsofmeasure.org"); + myHbA1c.setCode("mmol/mol"); + } + + public void setHeight(StringDt height) { + myHeight = height; + } + + // Setter/Getter methods + public void setInsulinLevel(Quantity insulinLevel) { + myInsulinLevel = insulinLevel; + myInsulinLevel.setValue(125); + myInsulinLevel.setSystem("http://unitsofmeasure.org"); + myInsulinLevel.setCode("pmol/l"); + } + + public void setWeight(StringDt weight) { + myWeight = weight; + } + + } +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu21Test.java b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu21Test.java new file mode 100644 index 00000000000..49f0dd21abc --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/JsonParserDstu21Test.java @@ -0,0 +1,1021 @@ +package ca.uhn.fhir.parser; + +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.apache.commons.io.IOUtils; +import org.hamcrest.Matchers; +import org.hl7.fhir.dstu21.model.Binary; +import org.hl7.fhir.dstu21.model.Bundle; +import org.hl7.fhir.dstu21.model.Bundle.BundleEntryComponent; +import org.hl7.fhir.dstu21.model.Coding; +import org.hl7.fhir.dstu21.model.DateTimeType; +import org.hl7.fhir.dstu21.model.DateType; +import org.hl7.fhir.dstu21.model.Extension; +import org.hl7.fhir.dstu21.model.HumanName; +import org.hl7.fhir.dstu21.model.IdType; +import org.hl7.fhir.dstu21.model.Identifier.IdentifierUse; +import org.hl7.fhir.dstu21.model.Observation.ObservationStatus; +import org.hl7.fhir.dstu21.model.Patient; +import org.hl7.fhir.dstu21.model.QuestionnaireResponse; +import org.hl7.fhir.dstu21.model.StringType; +import org.hl7.fhir.dstu21.model.UriType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +import ca.uhn.fhir.context.ConfigurationException; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.rest.server.Constants; +import net.sf.json.JSON; +import net.sf.json.JSONSerializer; +import net.sf.json.JsonConfig; + +public class JsonParserDstu21Test { + private static final FhirContext ourCtx = FhirContext.forDstu2_1(); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JsonParserDstu21Test.class); + + @Test + public void testNamespacePreservationEncode() throws Exception { + //@formatter:off + String input = "" + + "" + + "" + + "" + + "@fhirabend" + + "" + + "" + + ""; + //@formatter:on + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, input); + + String expected = "@fhirabend"; + assertEquals(expected, parsed.getText().getDiv().getValueAsString()); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(parsed); + ourLog.info(encoded); + assertThat(encoded, containsString("\"div\":\"" + expected.replace("\"", "\\\"") + "\"")); + } + + @Test + public void testEncodeDoesntIncludeUuidId() { + Patient p = new Patient(); + p.setId(new IdType("urn:uuid:42795ed8-041f-4ebf-b6f4-78ef6f64c2f2")); + p.addIdentifier().setSystem("ACME"); + + String actual = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); + assertThat(actual, not(containsString("78ef6f64c2f2"))); + } + + @Test + public void testEncodeEmptyBinary() { + String output = ourCtx.newJsonParser().encodeResourceToString(new Binary()); + assertEquals("{\"resourceType\":\"Binary\"}", output); + } + + @Test + public void testNamespacePreservationParse() throws Exception { + String input = "{\"resourceType\":\"Patient\",\"text\":{\"div\":\"@fhirabend\"}}"; + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, input); + + assertEquals("@fhirabend", parsed.getText().getDiv().getValueAsString()); + + String encoded = ourCtx.newXmlParser().encodeResourceToString(parsed); + assertEquals("@fhirabend",encoded); + } + + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + Extension ext = new Extension(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeType("2011-01-02T11:13:15")); + patient.addExtension(ext); + + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.addExtension(parent); + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1")); + parent.addExtension(child1); + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value2")); + parent.addExtension(child2); + + Extension modExt = new Extension(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateType("1995-01-02")); + patient.addModifierExtension(modExt); + + HumanName name = patient.addName(); + name.addFamily("Blah"); + StringType given = name.addGivenElement(); + given.setValue("Joe"); + Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given")); + given.addExtension(ext2); + + StringType given2 = name.addGivenElement(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.addExtension(given2ext); + given2ext.addExtension(new Extension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD"))); + + String output = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newJsonParser().encodeResourceToString(patient); + assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",", "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}", + "{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}")); + assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" + "{" + "\"url\":\"http://example.com/extensions#modext\"," + "\"valueDate\":\"1995-01-02\"" + "}" + "],")); + assertThat(enc, + containsString("\"_given\":[" + "{" + "\"extension\":[" + "{" + "\"url\":\"http://examples.com#givenext\"," + "\"valueString\":\"given\"" + "}" + "]" + "}," + "{" + "\"extension\":[" + "{" + + "\"url\":\"http://examples.com#givenext_parent\"," + "\"extension\":[" + "{" + "\"url\":\"http://examples.com#givenext_child\"," + "\"valueString\":\"CHILD\"" + "}" + "]" + "}" + + "]" + "}")); + + /* + * Now parse this back + */ + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); + ext = parsed.getExtension().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeType) ext.getValue()).getValueAsString()); + + parent = patient.getExtension().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringType) child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringType) child2.getValue()).getValueAsString()); + + modExt = parsed.getModifierExtension().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getExtension().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringType) ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getExtension().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + Extension given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringType) given2ext2.getValue()).getValue()); + + } + + @Test + public void testEncodeAndParseMetaProfileAndTags() { + Patient p = new Patient(); + p.addName().addFamily("FAMILY"); + + p.getMeta().addProfile("http://foo/Profile1"); + p.getMeta().addProfile("http://foo/Profile2"); + + p.getMeta().addTag().setSystem("scheme1").setCode("term1").setDisplay("label1"); + p.getMeta().addTag().setSystem("scheme2").setCode("term2").setDisplay("label2"); + + p.getMeta().addSecurity().setSystem("sec_scheme1").setCode("sec_term1").setDisplay("sec_label1"); + p.getMeta().addSecurity().setSystem("sec_scheme2").setCode("sec_term2").setDisplay("sec_label2"); + + String enc = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder("\"meta\":{", + "\"profile\":[", + "\"http://foo/Profile1\",", + "\"http://foo/Profile2\"", + "],", + "\"tag\":[", + "{", + "\"system\":\"scheme1\",", + "\"code\":\"term1\",", + "\"display\":\"label1\"", + "},", + "{", + "\"system\":\"scheme2\",", + "\"code\":\"term2\",", + "\"display\":\"label2\"", + "}", + "],", + "\"security\":[", + "{", + "\"system\":\"sec_scheme1\",", + "\"code\":\"sec_term1\",", + "\"display\":\"sec_label1\"", + "},", + "{", + "\"system\":\"sec_scheme2\",", + "\"code\":\"sec_term2\",", + "\"display\":\"sec_label2\"", + "}", + "]", + "},")); + //@formatter:on + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); + + List gotLabels = parsed.getMeta().getProfile(); + assertEquals(2, gotLabels.size()); + UriType label = (UriType) gotLabels.get(0); + assertEquals("http://foo/Profile1", label.getValue()); + label = (UriType) gotLabels.get(1); + assertEquals("http://foo/Profile2", label.getValue()); + + List tagList = parsed.getMeta().getTag(); + assertEquals(2, tagList.size()); + assertEquals("scheme1", tagList.get(0).getSystem()); + assertEquals("term1", tagList.get(0).getCode()); + assertEquals("label1", tagList.get(0).getDisplay()); + assertEquals("scheme2", tagList.get(1).getSystem()); + assertEquals("term2", tagList.get(1).getCode()); + assertEquals("label2", tagList.get(1).getDisplay()); + + tagList = parsed.getMeta().getSecurity(); + assertEquals(2, tagList.size()); + assertEquals("sec_scheme1", tagList.get(0).getSystem()); + assertEquals("sec_term1", tagList.get(0).getCode()); + assertEquals("sec_label1", tagList.get(0).getDisplay()); + assertEquals("sec_scheme2", tagList.get(1).getSystem()); + assertEquals("sec_term2", tagList.get(1).getCode()); + assertEquals("sec_label2", tagList.get(1).getDisplay()); + } + + @Test + public void testEncodeAndParseSecurityLabels() { + Patient p = new Patient(); + p.addName().addFamily("FAMILY"); + + List labels = new ArrayList(); + labels.add(new Coding().setSystem("SYSTEM1").setCode("CODE1").setDisplay("DISPLAY1").setVersion("VERSION1")); + labels.add(new Coding().setSystem("SYSTEM2").setCode("CODE2").setDisplay("DISPLAY2").setVersion("VERSION2")); + p.getMeta().getSecurity().addAll(labels); + + String enc = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p); + ourLog.info(enc); + + //@formatter:off + assertEquals("{\n" + + " \"resourceType\":\"Patient\",\n" + + " \"meta\":{\n" + + " \"security\":[\n" + + " {\n" + + " \"system\":\"SYSTEM1\",\n" + + " \"version\":\"VERSION1\",\n" + + " \"code\":\"CODE1\",\n" + + " \"display\":\"DISPLAY1\"\n" + + " },\n" + + " {\n" + + " \"system\":\"SYSTEM2\",\n" + + " \"version\":\"VERSION2\",\n" + + " \"code\":\"CODE2\",\n" + + " \"display\":\"DISPLAY2\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"name\":[\n" + + " {\n" + + " \"family\":[\n" + + " \"FAMILY\"\n" + + " ]\n" + + " }\n" + + " ]\n" + + "}", enc.trim()); + //@formatter:on + + Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc); + List gotLabels = parsed.getMeta().getSecurity(); + + assertEquals(2, gotLabels.size()); + + Coding label = (Coding) gotLabels.get(0); + assertEquals("SYSTEM1", label.getSystem()); + assertEquals("CODE1", label.getCode()); + assertEquals("DISPLAY1", label.getDisplay()); + assertEquals("VERSION1", label.getVersion()); + + label = (Coding) gotLabels.get(1); + assertEquals("SYSTEM2", label.getSystem()); + assertEquals("CODE2", label.getCode()); + assertEquals("DISPLAY2", label.getDisplay()); + assertEquals("VERSION2", label.getVersion()); + } + + @Test + public void testEncodeBundleNewBundleNoText() { + + Bundle b = new Bundle(); + + BundleEntryComponent e = b.addEntry(); + e.setResource(new Patient()); + + String val = ourCtx.newJsonParser().setPrettyPrint(false).encodeResourceToString(b); + ourLog.info(val); + assertThat(val, not(containsString("text"))); + + val = ourCtx.newXmlParser().setPrettyPrint(false).encodeResourceToString(b); + ourLog.info(val); + assertThat(val, not(containsString("text"))); + + } + + + + + /** + * #158 + */ + @Test + public void testEncodeEmptyTag() { + ArrayList tagList = new ArrayList(); + tagList.add(new Coding()); + tagList.add(new Coding().setDisplay("Label")); + + Patient p = new Patient(); + p.getMeta().getTag().addAll(tagList); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(p); + assertThat(encoded, not(containsString("tag"))); + } + + /** + * #158 + */ + @Test + public void testEncodeEmptyTag2() { + ArrayList tagList = new ArrayList(); + tagList.add(new Coding().setSystem("scheme").setCode("code")); + tagList.add(new Coding().setDisplay("Label")); + + Patient p = new Patient(); + p.getMeta().getTag().addAll(tagList); + + String encoded = ourCtx.newJsonParser().encodeResourceToString(p); + assertThat(encoded, containsString("tag")); + assertThat(encoded, containsString("scheme")); + assertThat(encoded, not(containsString("Label"))); + } + + @Test + public void testEncodeNarrativeSuppressed() throws Exception { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDivAsString("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.getMaritalStatus().addCoding().setCode("D"); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).setSuppressNarratives(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("Patient")); + assertThat(encoded, stringContainsInOrder(Constants.TAG_SUBSETTED_SYSTEM, Constants.TAG_SUBSETTED_CODE)); + assertThat(encoded, not(containsString("text"))); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, containsString("maritalStatus")); + } + + @Test + public void testEncodeSummary() { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDivAsString("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.getMaritalStatus().addCoding().setCode("D"); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).setSummaryMode(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("Patient")); + assertThat(encoded, stringContainsInOrder("\"tag\"", "\"system\":\"" + Constants.TAG_SUBSETTED_SYSTEM + "\",", "\"code\":\"" + Constants.TAG_SUBSETTED_CODE + "\",")); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, not(containsString("maritalStatus"))); + } + + @Test + public void testEncodeSummary2() { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDivAsString("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.getMaritalStatus().addCoding().setCode("D"); + + TagList tl = new TagList(); + tl.add(new Tag("foo", "bar")); + ResourceMetadataKeyEnum.TAG_LIST.put(patient, tl); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).setSummaryMode(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("Patient")); + assertThat(encoded, stringContainsInOrder("\"tag\"", "\"system\":\"foo\",", "\"code\":\"bar\"", "\"system\":\"" + Constants.TAG_SUBSETTED_SYSTEM + "\",", + "\"code\":\"" + Constants.TAG_SUBSETTED_CODE + "\",")); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, not(containsString("maritalStatus"))); + } + + /** + * See #205 + */ + @Test + public void testEncodeTags() { + Patient pt = new Patient(); + pt.addIdentifier().setSystem("sys").setValue("val"); + + TagList tagList = new TagList(); + tagList.addTag("scheme", "term", "display"); + ResourceMetadataKeyEnum.TAG_LIST.put(pt, tagList); + + String enc = ourCtx.newJsonParser().encodeResourceToString(pt); + ourLog.info(enc); + + assertEquals("{\"resourceType\":\"Patient\",\"meta\":{\"tag\":[{\"system\":\"scheme\",\"code\":\"term\",\"display\":\"display\"}]},\"identifier\":[{\"system\":\"sys\",\"value\":\"val\"}]}", + enc); + + } + + @Test + public void testEncodingNullExtension() { + Patient p = new Patient(); + Extension extension = new Extension("http://foo#bar"); + p.addExtension(extension); + String str = ourCtx.newJsonParser().encodeResourceToString(p); + + assertEquals("{\"resourceType\":\"Patient\"}", str); + + extension.setValue(new StringType()); + + str = ourCtx.newJsonParser().encodeResourceToString(p); + assertEquals("{\"resourceType\":\"Patient\"}", str); + + extension.setValue(new StringType("")); + + str = ourCtx.newJsonParser().encodeResourceToString(p); + assertEquals("{\"resourceType\":\"Patient\"}", str); + + } + + /** + * #65 + */ + @Test + public void testJsonPrimitiveWithExtensionEncoding() { + + QuestionnaireResponse parsed = new QuestionnaireResponse(); + parsed.getItemFirstRep().setLinkId("value123"); + parsed.getItemFirstRep().getLinkIdElement().addExtension(false, "http://123", new StringType("HELLO")); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(false).encodeResourceToString(parsed); + ourLog.info(encoded); + assertThat(encoded, containsString("{\"linkId\":\"value123\",\"_linkId\":{\"extension\":[{\"url\":\"http://123\",\"valueString\":\"HELLO\"}]}}")); + + } + + @Test + public void testOmitResourceId() { + Patient p = new Patient(); + p.setId("123"); + p.addName().addFamily("ABC"); + + assertThat(ourCtx.newJsonParser().encodeResourceToString(p), stringContainsInOrder("123", "ABC")); + assertThat(ourCtx.newJsonParser().setOmitResourceId(true).encodeResourceToString(p), containsString("ABC")); + assertThat(ourCtx.newJsonParser().setOmitResourceId(true).encodeResourceToString(p), not(containsString("123"))); + } + + @Test @Ignore + public void testParseAndEncodeBundle() throws Exception { + String content = IOUtils.toString(JsonParserDstu21Test.class.getResourceAsStream("/bundle-example.json")); + + Bundle parsed = ourCtx.newJsonParser().parseBundle(content); + assertEquals("Bundle/example/_history/1", parsed.getId().getValue()); + assertEquals("1", parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.VERSION)); + assertEquals("1", parsed.getId().getVersionIdPart()); + assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); + assertEquals("searchset", parsed.getType().getValue()); + assertEquals(3, parsed.getTotalResults().getValue().intValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2", parsed.getLinkNext().getValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&_include=MedicationOrder.medication", parsed.getLinkSelf().getValue()); + + assertEquals(2, parsed.getEntries().size()); + + MedicationOrder p = (MedicationOrder) parsed.getEntries().get(0).getResource(); + assertEquals("Patient/347", p.getPatient().getReference().getValue()); + assertEquals("2014-08-16T05:31:17Z", ResourceMetadataKeyEnum.UPDATED.get(p).getValueAsString()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", p.getId().getValue()); + + Medication m = (Medication) parsed.getEntries().get(1).getResource(); + assertEquals("http://example.com/base/Medication/example", m.getId().getValue()); + assertSame(((ResourceReferenceDt) p.getMedication()).getResource(), m); + + String reencoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeBundleToString(parsed); + ourLog.info(reencoded); + + JsonConfig cfg = new JsonConfig(); + + JSON expected = JSONSerializer.toJSON(content.trim(), cfg); + JSON actual = JSONSerializer.toJSON(reencoded.trim(), cfg); + + String exp = expected.toString().replace("\\r\\n", "\\n"); // .replace("§", "§"); + String act = actual.toString().replace("\\r\\n", "\\n"); + + ourLog.info("Expected: {}", exp); + ourLog.info("Actual : {}", act); + + assertEquals(exp, act); + + } + + /** + * Test for #146 + */ + @Test @Ignore + public void testParseAndEncodeBundleFromXmlToJson() throws Exception { + String content = IOUtils.toString(JsonParserDstu21Test.class.getResourceAsStream("/bundle-example2.xml")); + + ca.uhn.fhir.model.dstu21.resource.Bundle parsed = ourCtx.newXmlParser().parseResource(ca.uhn.fhir.model.dstu21.resource.Bundle.class, content); + + MedicationOrder p = (MedicationOrder) parsed.getEntry().get(0).getResource(); + assertEquals("#med", ((ResourceReferenceDt) p.getMedication()).getReference().getValue()); + + Medication m = (Medication) ((ResourceReferenceDt) p.getMedication()).getResource(); + assertNotNull(m); + assertEquals("#med", m.getId().getValue()); + assertEquals(1, p.getContained().getContainedResources().size()); + assertSame(m, p.getContained().getContainedResources().get(0)); + + String reencoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(reencoded); + assertThat(reencoded, containsString("contained")); + + reencoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(reencoded); + assertThat(reencoded, containsString("contained")); + } + + @Test @Ignore + public void testParseAndEncodeBundleNewStyle() throws Exception { + String content = IOUtils.toString(JsonParserDstu21Test.class.getResourceAsStream("/bundle-example.json")); + + ca.uhn.fhir.model.dstu21.resource.Bundle parsed = ourCtx.newJsonParser().parseResource(ca.uhn.fhir.model.dstu21.resource.Bundle.class, content); + assertEquals("Bundle/example/_history/1", parsed.getId().getValue()); + assertEquals("1", parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.VERSION)); + assertEquals("1", parsed.getId().getVersionIdPart()); + assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); + assertEquals("searchset", parsed.getType()); + assertEquals(3, parsed.getTotal().intValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2", parsed.getLink().get(0).getUrlElement().getValueAsString()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&_include=MedicationOrder.medication", parsed.getLink().get(1).getUrlElement().getValueAsString()); + + assertEquals(2, parsed.getEntry().size()); + + MedicationOrder p = (MedicationOrder) parsed.getEntry().get(0).getResource(); + assertEquals("Patient/347", p.getPatient().getReference().getValue()); + assertEquals("2014-08-16T05:31:17Z", ResourceMetadataKeyEnum.UPDATED.get(p).getValueAsString()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", p.getId().getValue()); + + Medication m = (Medication) parsed.getEntry().get(1).getResource(); + assertEquals("http://example.com/base/Medication/example", m.getId().getValue()); + assertEquals("Medication/example", ((ResourceReferenceDt) p.getMedication()).getReference().getValue()); + assertSame(((ResourceReferenceDt) p.getMedication()).getResource(), m); + + String reencoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(reencoded); + + JsonConfig cfg = new JsonConfig(); + + JSON expected = JSONSerializer.toJSON(content.trim(), cfg); + JSON actual = JSONSerializer.toJSON(reencoded.trim(), cfg); + + String exp = expected.toString().replace("\\r\\n", "\\n"); // .replace("§", "§"); + String act = actual.toString().replace("\\r\\n", "\\n"); + + ourLog.info("Expected: {}", exp); + ourLog.info("Actual : {}", act); + + assertEquals(exp, act); + + } + + @Test @Ignore + public void testParseAndEncodeBundleOldStyle() throws Exception { + String content = IOUtils.toString(JsonParserDstu21Test.class.getResourceAsStream("/bundle-example.json")); + + Bundle parsed = ourCtx.newJsonParser().parseBundle(content); + + assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); + assertEquals("searchset", parsed.getType().getValue()); + assertEquals(3, parsed.getTotalResults().getValue().intValue()); + + assertEquals(2, parsed.getEntries().size()); + + MedicationOrder p = (MedicationOrder) parsed.getEntries().get(0).getResource(); + assertEquals("Patient/347", p.getPatient().getReference().getValue()); + assertEquals("2014-08-16T05:31:17Z", ResourceMetadataKeyEnum.UPDATED.get(p).getValueAsString()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", p.getId().getValue()); + + Medication m = (Medication) parsed.getEntries().get(1).getResource(); + assertEquals("http://example.com/base/Medication/example", m.getId().getValue()); + assertEquals("Medication/example", ((ResourceReferenceDt) p.getMedication()).getReference().getValue()); + assertSame(((ResourceReferenceDt) p.getMedication()).getResource(), m); + + String reencoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeBundleToString(parsed); + ourLog.info(reencoded); + + JsonConfig cfg = new JsonConfig(); + + JSON expected = JSONSerializer.toJSON(content.trim(), cfg); + JSON actual = JSONSerializer.toJSON(reencoded.trim(), cfg); + + String exp = expected.toString().replace("\\r\\n", "\\n"); // .replace("§", "§"); + String act = actual.toString().replace("\\r\\n", "\\n"); + + exp = exp.replace(",\"ifNoneExist\":\"Patient?identifier=234234\"", ""); + + ourLog.info("Expected: {}", exp); + ourLog.info("Actual : {}", act); + + assertEquals(exp, act); + + } + + @Test @Ignore + public void testParseAndEncodeBundleResourceWithComments() throws Exception { + String content = IOUtils.toString(JsonParserDstu21Test.class.getResourceAsStream("/bundle-transaction2.json")); + + ourCtx.newJsonParser().parseBundle(content); + + ca.uhn.fhir.model.dstu21.resource.Bundle parsed = ourCtx.newJsonParser().parseResource(ca.uhn.fhir.model.dstu21.resource.Bundle.class, content); + + // TODO: preserve comments + } + + @Test + public void testParseAndEncodeBundleWithDeletedEntry() { + + Patient res = new Patient(); + res.setId(new IdType("Patient", "111", "222")); + ResourceMetadataKeyEnum.DELETED_AT.put(res, new InstantDt("2011-01-01T12:12:22Z")); + + Bundle bundle = new Bundle(); + bundle.addResource(res, ourCtx, "http://foo/base"); + + String actual = ourCtx.newJsonParser().encodeBundleToString(bundle); + ourLog.info(actual); + + String expected = "{\"resourceType\":\"Bundle\",\"entry\":[{\"deleted\":{\"type\":\"Patient\",\"resourceId\":\"111\",\"versionId\":\"222\",\"instant\":\"2011-01-01T12:12:22Z\"}}]}"; + assertEquals(expected, actual); + + } + + @Test + public void testParseAndEncodeBundleWithUuidBase() { + //@formatter:off + String input = + "{\n" + + " \"resourceType\":\"Bundle\",\n" + + " \"type\":\"document\",\n" + + " \"entry\":[\n" + + " {\n" + + " \"fullUrl\":\"urn:uuid:180f219f-97a8-486d-99d9-ed631fe4fc57\",\n" + + " \"resource\":{\n" + + " \"resourceType\":\"Composition\",\n" + + " \"id\":\"180f219f-97a8-486d-99d9-ed631fe4fc57\",\n" + + " \"meta\":{\n" + + " \"lastUpdated\":\"2013-05-28T22:12:21Z\"\n" + + " },\n" + + " \"text\":{\n" + + " \"status\":\"generated\",\n" + + " \"div\":\"

Generated Narrative with Details

id: 180f219f-97a8-486d-99d9-ed631fe4fc57

meta:

date: Feb 1, 2013 12:30:02 PM

type: Discharge Summary from Responsible Clinician (Details : {LOINC code '28655-9' = 'Physician attending Discharge summary)

status: final

confidentiality: N

author: Doctor Dave. Generated Summary: 23; Adam Careful

encounter: http://fhir.healthintersections.com.au/open/Encounter/doc-example

\"\n" + + " },\n" + + " \"date\":\"2013-02-01T12:30:02Z\",\n" + + " \"type\":{\n" + + " \"coding\":[\n" + + " {\n" + + " \"system\":\"http://loinc.org\",\n" + + " \"code\":\"28655-9\"\n" + + " }\n" + + " ],\n" + + " \"text\":\"Discharge Summary from Responsible Clinician\"\n" + + " },\n" + + " \"status\":\"final\",\n" + + " \"confidentiality\":\"N\",\n" + + " \"subject\":{\n" + + " \"reference\":\"http://fhir.healthintersections.com.au/open/Patient/d1\",\n" + + " \"display\":\"Eve Everywoman\"\n" + + " },\n" + + " \"author\":[\n" + + " {\n" + + " \"reference\":\"Practitioner/example\",\n" + + " \"display\":\"Doctor Dave\"\n" + + " }\n" + + " ],\n" + + " \"encounter\":{\n" + + " \"reference\":\"http://fhir.healthintersections.com.au/open/Encounter/doc-example\"\n" + + " },\n" + + " \"section\":[\n" + + " {\n" + + " \"title\":\"Reason for admission\",\n" + + " \"content\":{\n" + + " \"reference\":\"urn:uuid:d0dd51d3-3ab2-4c84-b697-a630c3e40e7a\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"title\":\"Medications on Discharge\",\n" + + " \"content\":{\n" + + " \"reference\":\"urn:uuid:673f8db5-0ffd-4395-9657-6da00420bbc1\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"title\":\"Known allergies\",\n" + + " \"content\":{\n" + + " \"reference\":\"urn:uuid:68f86194-e6e1-4f65-b64a-5314256f8d7b\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + + " }" + + " ]" + + "}"; + //@formatter:on + + ca.uhn.fhir.model.dstu21.resource.Bundle parsed = ourCtx.newJsonParser().parseResource(ca.uhn.fhir.model.dstu21.resource.Bundle.class, input); + + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(encoded); + + assertEquals("urn:uuid:180f219f-97a8-486d-99d9-ed631fe4fc57", parsed.getEntry().get(0).getResource().getId().getValue()); + assertEquals("urn:uuid:", parsed.getEntry().get(0).getResource().getId().getBaseUrl()); + assertEquals("180f219f-97a8-486d-99d9-ed631fe4fc57", parsed.getEntry().get(0).getResource().getId().getIdPart()); + assertThat(encoded, not(containsString("\"id\":\"180f219f-97a8-486d-99d9-ed631fe4fc57\""))); + } + + @Test + public void testParseBundleWithBinary() { + Binary patient = new Binary(); + patient.setId(new IdType("http://base/Binary/11/_history/22")); + patient.setContentType("foo"); + patient.setContent(new byte[] { 1, 2, 3, 4 }); + + String val = ourCtx.newJsonParser().encodeResourceToString(patient); + assertEquals("{\"resourceType\":\"Binary\",\"id\":\"11\",\"meta\":{\"versionId\":\"22\"},\"contentType\":\"foo\",\"content\":\"AQIDBA==\"}", val); + } + + /** + * see #144 and #146 + */ + @Test @Ignore + public void testParseContained() { + + FhirContext c = FhirContext.forDstu2(); + IParser parser = c.newJsonParser().setPrettyPrint(true); + + Observation o = new Observation(); + o.getCode().setText("obs text"); + + Patient p = new Patient(); + p.addName().addFamily("patient family"); + o.getSubject().setResource(p); + + String enc = parser.encodeResourceToString(o); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder( + "\"resourceType\":\"Observation\"", + "\"contained\":[", + "\"resourceType\":\"Patient\",", + "\"id\":\"1\"", + "\"reference\":\"#1\"" + )); + //@formatter:on + + o = parser.parseResource(Observation.class, enc); + assertEquals("obs text", o.getCode().getText()); + + assertNotNull(o.getSubject().getResource()); + p = (Patient) o.getSubject().getResource(); + assertEquals("patient family", p.getNameFirstRep().getFamilyAsSingleString()); + } + + @Test + public void testParseMetadata() throws Exception { + //@formatter:off + String bundle = "{\n" + + " \"resourceType\" : \"Bundle\",\n" + + " \"total\" : 1,\n" + + " \"link\": [{\n" + + " \"relation\" : \"self\",\n" + + " \"url\" : \"http://localhost:52788/Binary?_pretty=true\"\n" + + " }],\n" + + " \"entry\" : [{\n" + + " \"fullUrl\" : \"http://foo/fhirBase2/Patient/1/_history/2\",\n" + + " \"resource\" : {\n" + + " \"resourceType\" : \"Patient\",\n" + + " \"id\" : \"1\",\n" + + " \"meta\" : {\n" + + " \"versionId\" : \"2\",\n" + + " \"lastUpdated\" : \"2001-02-22T11:22:33-05:00\"\n" + + " },\n" + + " \"birthDate\" : \"2012-01-02\"\n" + + " },\n" + + " \"search\" : {\n" + + " \"mode\" : \"match\",\n" + + " \"score\" : 0.123\n" + + " },\n" + + " \"request\" : {\n" + + " \"method\" : \"POST\",\n" + + " \"url\" : \"http://foo/Patient?identifier=value\"\n" + + " }\n" + + " }]\n" + + "}"; + //@formatter:on + + Bundle b = ourCtx.newJsonParser().parseBundle(bundle); + assertEquals(1, b.getEntries().size()); + + Patient pt = (Patient) b.getEntries().get(0).getResource(); + assertEquals("http://foo/fhirBase2/Patient/1/_history/2", pt.getId().getValue()); + assertEquals("2012-01-02", pt.getBirthDateElement().getValueAsString()); + assertEquals("0.123", ResourceMetadataKeyEnum.ENTRY_SCORE.get(pt).getValueAsString()); + assertEquals("match", ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.get(pt).getCode()); + assertEquals("POST", ResourceMetadataKeyEnum.ENTRY_TRANSACTION_METHOD.get(pt).getCode()); + assertEquals("http://foo/Patient?identifier=value", ResourceMetadataKeyEnum.LINK_SEARCH.get(pt)); + assertEquals("2001-02-22T11:22:33-05:00", ResourceMetadataKeyEnum.UPDATED.get(pt).getValueAsString()); + + Bundle toBundle = new Bundle(); + toBundle.getLinkBase().setValue("http://foo/fhirBase1"); + toBundle.getTotalResults().setValue(1); + toBundle.getLinkSelf().setValue("http://localhost:52788/Binary?_pretty=true"); + + toBundle.addResource(pt, ourCtx, "http://foo/fhirBase1"); + String reEncoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeBundleToString(toBundle); + + JsonConfig cfg = new JsonConfig(); + + JSON expected = JSONSerializer.toJSON(bundle.trim(), cfg); + JSON actual = JSONSerializer.toJSON(reEncoded.trim(), cfg); + + String exp = expected.toString().replace("\\r\\n", "\\n"); // .replace("§", "§"); + String act = actual.toString().replace("\\r\\n", "\\n"); + + ourLog.info("Expected: {}", exp); + ourLog.info("Actual : {}", act); + + assertEquals(exp, act); + + } + + @Test @Ignore + public void testParsePatientInBundle() { + + String text = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}"; + FhirContext ctx = FhirContext.forDstu2(); + Bundle b = ctx.newJsonParser().parseBundle(text); + + IResource patient = b.getEntries().get(0).getResource(); + assertEquals(Patient.class, patient.getClass()); + + assertNull(ResourceMetadataKeyEnum.TAG_LIST.get(patient)); + assertNull(ResourceMetadataKeyEnum.PROFILES.get(patient)); + } + + /** + * See #163 + */ + @Test + public void testParseResourceType() { + IParser jsonParser = ourCtx.newJsonParser().setPrettyPrint(true); + + // Patient + Patient patient = new Patient(); + String patientId = UUID.randomUUID().toString(); + patient.setId(new IdType("Patient", patientId)); + patient.addName().addGiven("John").addFamily("Smith"); + patient.setGender(AdministrativeGenderEnum.MALE); + patient.setBirthDate(new DateType("1987-04-16")); + + // Bundle + ca.uhn.fhir.model.dstu21.resource.Bundle bundle = new ca.uhn.fhir.model.dstu21.resource.Bundle(); + bundle.setType(BundleTypeEnum.COLLECTION); + bundle.addEntry().setResource(patient); + + String bundleText = jsonParser.encodeResourceToString(bundle); + ourLog.info(bundleText); + + ca.uhn.fhir.model.dstu21.resource.Bundle reincarnatedBundle = jsonParser.parseResource(ca.uhn.fhir.model.dstu21.resource.Bundle.class, bundleText); + Patient reincarnatedPatient = (Patient) reincarnatedBundle.getEntry().get(0).getResource(); + + assertEquals("Patient", patient.getId().getResourceType()); + assertEquals("Patient", reincarnatedPatient.getId().getResourceType()); + } + + /** + * See #207 + */ + @Test + public void testParseResourceWithInvalidType() { + String input = "{" + "\"resourceType\":\"Patient\"," + "\"contained\":[" + " {" + " \"rezType\":\"Organization\"" + " }" + " ]" + "}"; + + IParser jsonParser = ourCtx.newJsonParser().setPrettyPrint(true); + try { + jsonParser.parseResource(input); + fail(); + } catch (DataFormatException e) { + assertEquals("Missing required element 'resourceType' from JSON resource object, unable to parse", e.getMessage()); + } + } + + @Test @Ignore + public void testParseWithWrongTypeObjectShouldBeArray() throws Exception { + String input = IOUtils.toString(getClass().getResourceAsStream("/invalid_metadata.json")); + try { + ourCtx.newJsonParser().parseResource(Conformance.class, input); + fail(); + } catch (DataFormatException e) { + assertEquals("Syntax error parsing JSON FHIR structure: Expected ARRAY at element 'modifierExtension', found 'OBJECT'", e.getMessage()); + } + } + + /** + * See #144 and #146 + */ + @Test + public void testReportSerialize() { + + ReportObservation obsv = new ReportObservation(); + obsv.getCode().addCoding().setCode("name"); + obsv.setValue(new StringType("value test")); + obsv.setStatus(ObservationStatus.FINAL); + obsv.addIdentifier().setSystem("System").setValue("id value"); + + DiagnosticReport report = new DiagnosticReport(); + report.getContained().getContainedResources().add(obsv); + report.addResult().setResource(obsv); + + IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); + String message = parser.encodeResourceToString(report); + ourLog.info(message); + Assert.assertThat(message, containsString("contained")); + } + + /** + * See #144 and #146 + */ + @Test + public void testReportSerializeWithMatchingId() { + + ReportObservation obsv = new ReportObservation(); + obsv.getCode().addCoding().setCode("name"); + obsv.setValue(new StringType("value test")); + obsv.setStatus(ObservationStatus.FINAL); + obsv.addIdentifier().setSystem("System").setValue("id value"); + + DiagnosticReport report = new DiagnosticReport(); + report.getContained().getContainedResources().add(obsv); + + obsv.setId("#123"); + report.addResult().setReference("#123"); + + IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); + String message = parser.encodeResourceToString(report); + ourLog.info(message); + Assert.assertThat(message, containsString("contained")); + } + + // see #241 + @Test + public void testEncodeThenParseShouldNotAddSpuriousId() throws Exception { + Condition condition = new Condition().setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED); + ca.uhn.fhir.model.dstu21.resource.Bundle bundle = new ca.uhn.fhir.model.dstu21.resource.Bundle(); + ca.uhn.fhir.model.dstu21.resource.Bundle.Entry entry = new ca.uhn.fhir.model.dstu21.resource.Bundle.Entry(); + entry.setFullUrl(IdType.newRandomUuid()); + entry.setResource(condition); + bundle.getEntry().add(entry); + IParser parser = ourCtx.newJsonParser(); + String json = parser.encodeResourceToString(bundle); + ourLog.info(json); + bundle = (ca.uhn.fhir.model.dstu21.resource.Bundle) parser.parseResource(json); + assertThat(json, not(containsString("\"id\""))); + } +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/ReportObservation.java b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/ReportObservation.java new file mode 100644 index 00000000000..195229b94e4 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/ReportObservation.java @@ -0,0 +1,112 @@ +package ca.uhn.fhir.parser; + +import org.hl7.fhir.dstu21.model.BooleanType; +import org.hl7.fhir.dstu21.model.Observation; +import org.hl7.fhir.dstu21.model.StringType; + +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Extension; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.util.ElementUtil; + +@ResourceDef(name = "Observation", id = "reportobservation") +public class ReportObservation extends Observation { + + /** + * Each extension is defined in a field. Any valid HAPI Data Type can be used for the field type. Note that the + * [name=""] attribute in the @Child annotation needs to match the name for the bean accessor and mutator methods. + */ + @Child(name = "mandatory", order = 0) + @Extension(url = "#mandatory", definedLocally = true, isModifier = false) + @Description(shortDefinition = "The report observation is mandatory or not") + private BooleanType mandatory; + + @Child(name = "readOnly", order = 1) + @Extension(url = "#readOnly", definedLocally = true, isModifier = false) + @Description(shortDefinition = "The report observation is read only or not") + private BooleanType readOnly; + + @Child(name = "defaultCursor", order = 2) + @Extension(url = "#defaultCursor", definedLocally = true, isModifier = false) + @Description(shortDefinition = "The report observation is default cursor or not") + private BooleanType defaultCursor; + + @Child(name = "sectionContentId", order = 3) + @Extension(url = "#sectionContentId", definedLocally = true, isModifier = false) + @Description(shortDefinition = "The primary key of the report section content") + private StringType sectionContentId; + + /** + * It is important to override the isEmpty() method, adding a check for any newly added fields. + */ + @Override + public boolean isEmpty() { + return super.isEmpty() && ElementUtil.isEmpty(mandatory, readOnly, defaultCursor, sectionContentId); + } + + /******** + * Accessors and mutators follow + * + * IMPORTANT: Each extension is required to have an getter/accessor and a stter/mutator. You are highly recommended + * to create getters which create instances if they do not already exist, since this is how the rest of the HAPI + * FHIR API works. + ********/ + + /** Getter for mandatory */ + public BooleanType getMandatory() { + if (mandatory == null) { + mandatory = new BooleanType(false); + } + return mandatory; + } + + /** Setter for mandatory */ + public ReportObservation setMandatory(Boolean isMandatory) { + mandatory = new BooleanType(isMandatory); + return this; + } + + /** Getter for readOnly */ + public BooleanType getReadOnly() { + if (readOnly == null) { + readOnly = new BooleanType(false); + } + return readOnly; + } + + /** Setter for readOnly */ + public ReportObservation setReadOnly(Boolean isReadOnly) { + readOnly = new BooleanType(isReadOnly); + return this; + } + + /** Getter for defaultCursor */ + public BooleanType getDefaultCursor() { + if (defaultCursor == null) { + defaultCursor = new BooleanType(false); + } + return defaultCursor; + } + + /** Setter for defaultCursor */ + public ReportObservation setDefaultCursor(Boolean isDefaultCursor) { + defaultCursor = new BooleanType(isDefaultCursor); + return this; + } + + /** Getter for sectionContentId */ + public StringType getSectionContentId() { + if (sectionContentId == null) { + sectionContentId = new StringType(); + } + return sectionContentId; + } + + /** Setter for sectionContentId */ + public ReportObservation setSectionContentId(String sectionContentId) { + this.sectionContentId = new StringType(sectionContentId); + return this; + } + +} \ No newline at end of file diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/RoundTripDstu21Test.java b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/RoundTripDstu21Test.java new file mode 100644 index 00000000000..2e6745ea349 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/RoundTripDstu21Test.java @@ -0,0 +1,112 @@ +package ca.uhn.fhir.parser; + +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.StringReader; +import java.io.StringWriter; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLEventWriter; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.events.XMLEvent; + +import org.custommonkey.xmlunit.DetailedDiff; +import org.custommonkey.xmlunit.Diff; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.junit.Test; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.util.XmlUtil; + +public class RoundTripDstu21Test { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RoundTripDstu21Test.class); + private static FhirContext ourCtx = FhirContext.forDstu2_1(); + + @Test + public void testIt() { + // Just so this doesn't complain until we enable roundtrip test + } + +// @Test + public void testRoundTrip() throws Exception { + ZipInputStream is = new ZipInputStream(new FileInputStream("src/test/resources/examples.zip")); + try { + while (true) { + ZipEntry nextEntry = is.getNextEntry(); + if (nextEntry == null) { + break; + } + + ByteArrayOutputStream oos = new ByteArrayOutputStream(); + byte[] buffer = new byte[2048]; + int len = 0; + while ((len = is.read(buffer)) > 0) { + oos.write(buffer, 0, len); + } + + String exampleText = oos.toString("UTF-8"); + ourLog.info("Next file: {} - Size: {} bytes", nextEntry.getName(), exampleText.length()); + if (!nextEntry.getName().contains("diagnosticreport-examples-lab")) { + continue; + } + + IBaseResource parsed = ourCtx.newXmlParser().parseResource(exampleText); + String encodedXml = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(parsed); + + exampleText = cleanXml(exampleText); + encodedXml = cleanXml(encodedXml); + + DetailedDiff d = new DetailedDiff(new Diff(new StringReader(exampleText), new StringReader(encodedXml))); +// d.overrideDifferenceListener(new DifferenceListener() { +// +// @Override +// public void skippedComparison(Node theControl, Node theTest) { +// ourLog.info("" + theControl); +// } +// +// @Override +// public int differenceFound(Difference theDifference) { +// ourLog.info("" + theDifference); +// return 0; +// } +// }); + + boolean similar = d.similar(); + if (!similar) { + exampleText = exampleText.replace(" xmlns=\"http://hl7.org/fhir\"", ""); + encodedXml = encodedXml.replace(" xmlns=\"http://hl7.org/fhir\"", ""); + if (exampleText.length() != encodedXml.length()) { +// ourLog.info("Expected: " + exampleText); +// ourLog.info("Actual : " + encodedXml); + assertTrue(d.toString(), similar); + } + } + + } + + } finally { + is.close(); + } + } + + private String cleanXml(String exampleText) throws Error, Exception { + XMLEventReader read = XmlUtil.createXmlReader(new StringReader(exampleText)); + StringWriter sw = new StringWriter(); + XMLEventWriter write = XmlUtil.createXmlWriter(sw); + while (read.hasNext()) { + XMLEvent nextEvent = read.nextEvent(); + if (nextEvent.getEventType() == XMLStreamConstants.COMMENT) { + continue; + } + write.add(nextEvent); + } + write.add(read); + sw.close(); + return sw.toString().replaceAll("", "").replace("\n", " ").replace("\r", " ").replaceAll(">\\s+<", "><").replaceAll("<\\?.*\\?>", "").replaceAll("\\s+", " "); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu21Test.java b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu21Test.java new file mode 100644 index 00000000000..0eb61c0962a --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2.1/src/test/java/ca/uhn/fhir/parser/XmlParserDstu21Test.java @@ -0,0 +1,1873 @@ +package ca.uhn.fhir.parser; + +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.emptyOrNullString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.stringContainsInOrder; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.io.StringReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; + +import org.apache.commons.io.IOUtils; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.XMLUnit; +import org.hamcrest.collection.IsEmptyCollection; +import org.hamcrest.core.StringContains; +import org.hamcrest.text.StringContainsInOrder; +import org.hl7.fhir.dstu21.model.Binary; +import org.hl7.fhir.dstu21.model.Bundle; +import org.hl7.fhir.dstu21.model.Bundle.BundleType; +import org.hl7.fhir.dstu21.model.DateType; +import org.hl7.fhir.dstu21.model.Enumerations.AdministrativeGender; +import org.hl7.fhir.dstu21.model.Extension; +import org.hl7.fhir.dstu21.model.IdType; +import org.hl7.fhir.dstu21.model.MedicationStatement; +import org.hl7.fhir.dstu21.model.Observation; +import org.hl7.fhir.dstu21.model.Organization; +import org.hl7.fhir.dstu21.model.Patient; +import org.hl7.fhir.dstu21.model.Quantity; +import org.hl7.fhir.dstu21.model.Reference; +import org.hl7.fhir.dstu21.model.SimpleQuantity; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.mockito.ArgumentCaptor; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IParserErrorHandler.IParseLocation; +import ca.uhn.fhir.rest.client.IGenericClient; +import ca.uhn.fhir.rest.server.Constants; + +public class XmlParserDstu21Test { + private static final FhirContext ourCtx = FhirContext.forDstu2_1(); + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(XmlParserDstu21Test.class); + + @Test + public void testBundleWithBinary() { + //@formatter:off + String bundle = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + + Bundle b = ourCtx.newXmlParser().parseResource(Bundle.class, bundle); + assertEquals(1, b.getEntry().size()); + + Binary bin = (Binary) b.getEntry().get(0).getResource(); + assertArrayEquals(new byte[] { 1, 2, 3, 4 }, bin.getContent()); + + } + + @Test + public void testEncodeEmptyBinary() { + String output = ourCtx.newXmlParser().encodeResourceToString(new Binary()); + assertEquals("", output); + } + + @Test + public void testParseInvalidTextualNumber() { + Observation obs = new Observation(); + obs.setValue(new Quantity().setValue(1234)); + String encoded = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs); + encoded = encoded.replace("1234", "\"1234\""); + ourLog.info(encoded); + ourCtx.newJsonParser().parseResource(encoded); + } + + + @Test + public void testEncodeDoesntIncludeUuidId() { + Patient p = new Patient(); + p.setId(new IdType("urn:uuid:42795ed8-041f-4ebf-b6f4-78ef6f64c2f2")); + p.addIdentifier().setSystem("ACME"); + + String actual = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(p); + assertThat(actual, not(containsString("78ef6f64c2f2"))); + } + + + @Test + public void testContainedResourceInExtensionUndeclared() { + Patient p = new Patient(); + p.addName().addFamily("PATIENT"); + + Organization o = new Organization(); + o.setName("ORG"); + p.addExtension(new Extension("urn:foo", new Reference(o))); + + String str = ourCtx.newXmlParser().encodeResourceToString(p); + ourLog.info(str); + + p = ourCtx.newXmlParser().parseResource(Patient.class, str); + assertEquals("PATIENT", p.getName().get(0).getFamily().get(0).getValue()); + + List exts = p.getExtension()UndeclaredExtensionsByUrl("urn:foo"); + assertEquals(1, exts.size()); + Reference rr = (Reference) exts.get(0).getValue(); + o = (Organization) rr.getResource(); + assertEquals("ORG", o.getName()); + } + + @Test + public void testDuration() { + Encounter enc = new Encounter(); + DurationDt duration = new DurationDt(); + duration.setUnit("day").setValue(123L); + enc.setLength(duration); + + String str = ourCtx.newXmlParser().encodeResourceToString(enc); + ourLog.info(str); + + assertThat(str, not(containsString("meta"))); + assertThat(str, containsString("")); + } + + @Test + public void testEncodeAndParseBundleWithoutResourceIds() { + Organization org = new Organization(); + org.addIdentifier().setSystem("urn:system").setValue("someval"); + + Bundle bundle = Bundle.withSingleResource(org); + String str = ourCtx.newXmlParser().encodeBundleToString(bundle); + ourLog.info(str); + + Bundle parsed = ourCtx.newXmlParser().parseBundle(str); + assertThat(parsed.getEntry().get(0).getResource().getIdElement().getValue(), emptyOrNullString()); + assertTrue(parsed.getEntry().get(0).getResource().getIdElement().isEmpty()); + } + + @Test + public void testEncodeAndParseContained() { + IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); + + // Create an organization, note that the organization does not have an ID + Organization org = new Organization(); + org.getNameElement().setValue("Contained Test Organization"); + + // Create a patient + Patient patient = new Patient(); + patient.setId("Patient/1333"); + patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); + + // Put the organization as a reference in the patient resource + patient.getManagingOrganization().setResource(org); + + String encoded = xmlParser.encodeResourceToString(patient); + ourLog.info(encoded); + assertThat(encoded, containsString("")); + assertThat(encoded, containsString("")); + + // Create a bundle with just the patient resource + Bundle b = new Bundle(); + b.addEntry().setResource(patient); + + // Encode the bundle + encoded = xmlParser.encodeResourceToString(b); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", ""))); + assertThat(encoded, containsString("")); + assertThat(encoded, stringContainsInOrder(Arrays.asList("", ""))); + assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "", "")))); + + // Re-parse the bundle + patient = (Patient) xmlParser.parseResource(xmlParser.encodeResourceToString(patient)); + assertEquals("#1", patient.getManagingOrganization().getReference().getValue()); + + assertNotNull(patient.getManagingOrganization().getResource()); + org = (Organization) patient.getManagingOrganization().getResource(); + assertEquals("#1", org.getId().getValue()); + assertEquals("Contained Test Organization", org.getName()); + + // And re-encode a second time + encoded = xmlParser.encodeResourceToString(patient); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", ""))); + assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "")))); + assertThat(encoded, containsString("")); + + // And re-encode once more, with the references cleared + patient.getContained().getContainedResources().clear(); + patient.getManagingOrganization().setReference((String) null); + encoded = xmlParser.encodeResourceToString(patient); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", ""))); + assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "")))); + assertThat(encoded, containsString("")); + + // And re-encode once more, with the references cleared and a manually set local ID + patient.getContained().getContainedResources().clear(); + patient.getManagingOrganization().setReference((String) null); + patient.getManagingOrganization().getResource().setId(("#333")); + encoded = xmlParser.encodeResourceToString(patient); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", ""))); + assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "")))); + + } + + @Test + public void testEncodeAndParseExtensionOnReference() { + DataElement de = new DataElement(); + Binding b = de.addElement().getBinding(); + b.setDescription("BINDING"); + + Organization o = new Organization(); + o.setName("ORG"); + b.addUndeclaredExtension(new Extension(false, "urn:foo", new Reference(o))); + + String str = ourCtx.newXmlParser().encodeResourceToString(de); + ourLog.info(str); + + de = ourCtx.newXmlParser().parseResource(DataElement.class, str); + b = de.getElement().get(0).getBinding(); + assertEquals("BINDING", b.getDescription()); + + List exts = b.getUndeclaredExtensionsByUrl("urn:foo"); + assertEquals(1, exts.size()); + Reference rr = (Reference) exts.get(0).getValue(); + o = (Organization) rr.getResource(); + assertEquals("ORG", o.getName()); + + } + + @Test + public void testEncodeAndParseExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + Extension ext = new Extension(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + patient.addExtension(ext); + + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.addExtension(parent); + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringDt("value1")); + parent.addExtension(child1); + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringDt("value2")); + parent.addExtension(child2); + + Extension modExt = new Extension(); + modExt.setUrl("http://example.com/extensions#modext"); + modExt.setValue(new DateType("1995-01-02")); + modExt.setModifier(true); + patient.addExtension(modExt); + + HumanNameDt name = patient.addName(); + name.addFamily("Blah"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + given2ext.addUndeclaredExtension(new Extension().setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD"))); + + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString( + "")); + assertThat(enc, containsString("")); + assertThat(enc, containsString( + "")); + + /* + * Now parse this back + */ + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); + ext = parsed.getUndeclaredExtensions().get(0); + assertEquals("http://example.com/extensions#someext", ext.getUrl()); + assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString()); + + parent = patient.getUndeclaredExtensions().get(1); + assertEquals("http://example.com#parent", parent.getUrl()); + assertNull(parent.getValue()); + child1 = parent.getExtension().get(0); + assertEquals("http://example.com#child", child1.getUrl()); + assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString()); + child2 = parent.getExtension().get(1); + assertEquals("http://example.com#child", child2.getUrl()); + assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString()); + + modExt = parsed.getUndeclaredModifierExtensions().get(0); + assertEquals("http://example.com/extensions#modext", modExt.getUrl()); + assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString()); + + name = parsed.getName().get(0); + + ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext", ext2.getUrl()); + assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString()); + + given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0); + assertEquals("http://examples.com#givenext_parent", given2ext.getUrl()); + assertNull(given2ext.getValue()); + Extension given2ext2 = given2ext.getExtension().get(0); + assertEquals("http://examples.com#givenext_child", given2ext2.getUrl()); + assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue()); + + } + + /** + * See #216 + */ + @Test + public void testEncodeAndParseIdentifierDstu2() { + IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); + + Patient patient = new Patient(); + patient.addIdentifier().setSystem("SYS").setValue("VAL").setType(IdentifierTypeCodesEnum.MR); + + String out = xmlParser.encodeResourceToString(patient); + ourLog.info(out); + + //@formatter:off + assertThat(out, stringContainsInOrder("", + "", + "", + "", + "", + "", + "", + "", + "", + "")); + //@formatter:on + + patient = ourCtx.newXmlParser().parseResource(Patient.class, out); + assertThat(patient.getIdentifier().get(0).getType().getValueAsEnum(), contains(IdentifierTypeCodesEnum.MR)); + assertEquals("http://hl7.org/fhir/v2/0203", patient.getIdentifier().get(0).getType().getCoding().get(0).getSystem()); + assertEquals("MR", patient.getIdentifier().get(0).getType().getCoding().get(0).getCode()); + } + + @Test + public void testEncodeAndParseMetaProfileAndTags() { + Patient p = new Patient(); + p.addName().addFamily("FAMILY"); + + List profiles = new ArrayList(); + profiles.add(new IdType("http://foo/Profile1")); + profiles.add(new IdType("http://foo/Profile2")); + ResourceMetadataKeyEnum.PROFILES.put(p, profiles); + + TagList tagList = new TagList(); + tagList.addTag("scheme1", "term1", "label1"); + tagList.addTag("scheme2", "term2", "label2"); + ResourceMetadataKeyEnum.TAG_LIST.put(p, tagList); + + String enc = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(p); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder("", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "")); + //@formatter:on + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); + List gotLabels = ResourceMetadataKeyEnum.PROFILES.get(parsed); + + assertEquals(2, gotLabels.size()); + + IdType label = (IdType) gotLabels.get(0); + assertEquals("http://foo/Profile1", label.getValue()); + label = (IdType) gotLabels.get(1); + assertEquals("http://foo/Profile2", label.getValue()); + + tagList = ResourceMetadataKeyEnum.TAG_LIST.get(parsed); + assertEquals(2, tagList.size()); + + assertEquals(new Tag("scheme1", "term1", "label1"), tagList.get(0)); + assertEquals(new Tag("scheme2", "term2", "label2"), tagList.get(1)); + } + + @Test + public void testEncodeAndParseMetaProfiles() { + Patient p = new Patient(); + p.addName().addFamily("FAMILY"); + + TagList tagList = new TagList(); + tagList.addTag("scheme1", "term1", "label1"); + tagList.addTag("scheme2", "term2", "label2"); + ResourceMetadataKeyEnum.TAG_LIST.put(p, tagList); + + String enc = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(p); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder("", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "")); + //@formatter:on + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); + List gotLabels = ResourceMetadataKeyEnum.PROFILES.get(parsed); + assertNull(gotLabels); + + tagList = ResourceMetadataKeyEnum.TAG_LIST.get(parsed); + assertEquals(2, tagList.size()); + + assertEquals(new Tag("scheme1", "term1", "label1"), tagList.get(0)); + assertEquals(new Tag("scheme2", "term2", "label2"), tagList.get(1)); + } + + /** + * Test for #233 + */ + @Test + public void testEncodeAndParseProfiledDatatype() { + MedicationOrder mo = new MedicationOrder(); + mo.addDosageInstruction().getTiming().getRepeat().setBounds(new DurationDt().setCode("code")); + String out = ourCtx.newXmlParser().encodeResourceToString(mo); + ourLog.info(out); + assertThat(out, containsString("")); + + mo = ourCtx.newXmlParser().parseResource(MedicationOrder.class, out); + DurationDt duration = (DurationDt) mo.getDosageInstruction().get(0).getTiming().getRepeat().getBounds(); + assertEquals("code", duration.getCode()); + } + + /** + * See #216 - Profiled datatypes should use their unprofiled parent type as the choice[x] name + */ + @Test @Ignore + public void testEncodeAndParseProfiledDatatypeChoice() throws Exception { + IParser xmlParser = ourCtx.newXmlParser(); + + String input = IOUtils.toString(XmlParser.class.getResourceAsStream("/medicationstatement_invalidelement.xml")); + MedicationStatement ms = xmlParser.parseResource(MedicationStatement.class, input); + SimpleQuantity q = (SimpleQuantity) ms.getDosage().get(0).getQuantity(); + assertEquals("1", q.getValueElement().getValueAsString()); + + String output = xmlParser.encodeResourceToString(ms); + assertThat(output, containsString("")); + } + + @Test + public void testEncodeAndParseSecurityLabels() { + Patient p = new Patient(); + p.addName().addFamily("FAMILY"); + + List labels = new ArrayList(); + labels.add(new CodingDt().setSystem("SYSTEM1").setCode("CODE1").setDisplay("DISPLAY1").setUserSelected(true).setVersion("VERSION1")); + labels.add(new CodingDt().setSystem("SYSTEM2").setCode("CODE2").setDisplay("DISPLAY2").setUserSelected(false).setVersion("VERSION2")); + + ResourceMetadataKeyEnum.SECURITY_LABELS.put(p, labels); + + String enc = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(p); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder("", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "")); + //@formatter:on + + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc); + List gotLabels = ResourceMetadataKeyEnum.SECURITY_LABELS.get(parsed); + + assertEquals(2, gotLabels.size()); + + CodingDt label = (CodingDt) gotLabels.get(0); + assertEquals("SYSTEM1", label.getSystem()); + assertEquals("CODE1", label.getCode()); + assertEquals("DISPLAY1", label.getDisplay()); + assertEquals(true, label.getUserSelected()); + assertEquals("VERSION1", label.getVersion()); + + label = (CodingDt) gotLabels.get(1); + assertEquals("SYSTEM2", label.getSystem()); + assertEquals("CODE2", label.getCode()); + assertEquals("DISPLAY2", label.getDisplay()); + assertEquals(false, label.getUserSelected()); + assertEquals("VERSION2", label.getVersion()); + } + + /** + * See #103 + */ + @Test + public void testEncodeAndReEncodeContainedJson() { + Composition comp = new Composition(); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section0_Allergy0"))); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section1_Allergy0"))); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section2_Allergy0"))); + + IParser parser = ourCtx.newJsonParser().setPrettyPrint(true); + + String string = parser.encodeResourceToString(comp); + ourLog.info(string); + + Composition parsed = parser.parseResource(Composition.class, string); + parsed.getSection().remove(0); + + string = parser.encodeResourceToString(parsed); + ourLog.info(string); + + parsed = parser.parseResource(Composition.class, string); + assertEquals(2, parsed.getContained().getContainedResources().size()); + } + + /** + * See #103 + */ + @Test + public void testEncodeAndReEncodeContainedXml() { + Composition comp = new Composition(); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section0_Allergy0"))); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section1_Allergy0"))); + comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section2_Allergy0"))); + + IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); + + String string = parser.encodeResourceToString(comp); + ourLog.info(string); + + Composition parsed = parser.parseResource(Composition.class, string); + parsed.getSection().remove(0); + + string = parser.encodeResourceToString(parsed); + ourLog.info(string); + + parsed = parser.parseResource(Composition.class, string); + assertEquals(2, parsed.getContained().getContainedResources().size()); + } + + @Test + public void testEncodeBinaryWithNoContentType() { + Binary b = new Binary(); + b.setContent(new byte[] { 1, 2, 3, 4 }); + + String output = ourCtx.newXmlParser().encodeResourceToString(b); + ourLog.info(output); + + assertEquals("", output); + } + + @Test + public void testEncodeBundleOldStyleContainingResourceWithUuidBase() { + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().addFamily("PATIENT"); + + Bundle b = new Bundle(); + b.addEntry().setResource(p); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b); + ourLog.info(encoded); + assertThat(encoded, stringContainsInOrder("", "", ""))); + } + + @Test + public void testEncodeBundleOldStyleContainingResourceWithUuidBaseBundleBaseIsSet() { + Patient p = new Patient(); + p.setId(IdType.newRandomUuid()); + p.addName().addFamily("PATIENT"); + + Bundle b = new Bundle(); + b.getLinkBase().setValue("urn:uuid:"); + b.addEntry().setResource(p); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b); + ourLog.info(encoded); + // Base element has been removed! + assertThat(encoded, not(stringContainsInOrder("", " medResList = new ArrayList(); + medResList.add(medResource); + ContainedDt medContainedDt = new ContainedDt(); + medContainedDt.setContainedResources(medResList); + medicationPrescript.setContained(medContainedDt); + + // Medication reference. This should point to the contained resource. + Reference medRefDt = new Reference("#" + medId); + medRefDt.setDisplay("MedRef"); + medicationPrescript.setMedication(medRefDt); + + IParser p = ourCtx.newXmlParser().setPrettyPrint(true); + String encoded = p.encodeResourceToString(medicationPrescript); + ourLog.info(encoded); + + // @formatter:on + assertThat(encoded, + stringContainsInOrder("", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "")); + //@formatter:off + + } + + /** + * See #113 + */ + @Test + public void testEncodeContainedResourcesAutomatic() { + + MedicationOrder medicationPrescript = new MedicationOrder(); + String nameDisp = "MedRef"; + CodeableConceptDt codeDt = new CodeableConceptDt("urn:sys", "code1"); + + // Adding medication to Contained. + Medication medResource = new Medication(); + // No ID set + medResource.setCode(codeDt); + + // Medication reference. This should point to the contained resource. + Reference medRefDt = new Reference(); + medRefDt.setDisplay(nameDisp); + // Resource reference set, but no ID + medRefDt.setResource(medResource); + medicationPrescript.setMedication(medRefDt); + + IParser p = ourCtx.newXmlParser().setPrettyPrint(true); + String encoded = p.encodeResourceToString(medicationPrescript); + ourLog.info(encoded); + + //@formatter:on + assertThat(encoded, + stringContainsInOrder("", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "")); + //@formatter:off + } + + /** + * See #113 + */ + @Test + public void testEncodeContainedResourcesManualContainUsingNonLocalId() { + + MedicationOrder medicationPrescript = new MedicationOrder(); + + String medId = "123"; + CodeableConceptDt codeDt = new CodeableConceptDt("urn:sys", "code1"); + + // Adding medication to Contained. + Medication medResource = new Medication(); + medResource.setCode(codeDt); + medResource.setId(String.valueOf(medId)); // ID does not start with '#' + ArrayList medResList = new ArrayList(); + medResList.add(medResource); + ContainedDt medContainedDt = new ContainedDt(); + medContainedDt.setContainedResources(medResList); + medicationPrescript.setContained(medContainedDt); + + // Medication reference. This should point to the contained resource. + Reference medRefDt = new Reference("#" + medId); + medRefDt.setDisplay("MedRef"); + medicationPrescript.setMedication(medRefDt); + + IParser p = ourCtx.newXmlParser().setPrettyPrint(true); + String encoded = p.encodeResourceToString(medicationPrescript); + ourLog.info(encoded); + + //@formatter:on + assertThat(encoded, + stringContainsInOrder("", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "")); + //@formatter:off + + } + + @Test + public void testEncodeContainedWithNarrativeIsSuppresed() throws Exception { + IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); + + // Create an organization, note that the organization does not have an ID + Organization org = new Organization(); + org.getNameElement().setValue("Contained Test Organization"); + org.getText().setDiv("
FOOBAR
"); + + // Create a patient + Patient patient = new Patient(); + patient.setId("Patient/1333"); + patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); + patient.getText().setDiv("
BARFOO
"); + patient.getManagingOrganization().setResource(org); + + String encoded = parser.encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, stringContainsInOrder("", "
BARFOO
", "", "", "", "
")); + + Patient actual = parser.parseResource(Patient.class, val); + assertEquals(AddressUseEnum.HOME.getCode(), patient.getAddress().get(0).getUse()); + List ext = actual.getUndeclaredExtensions(); + assertEquals(1, ext.size()); + Reference ref = (Reference) ext.get(0).getValue(); + assertEquals("Organization/123", ref.getReference().getValue()); + + } + + + @Test + public void testEncodeNarrativeSuppressed() { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDiv("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.setMaritalStatus(MaritalStatusCodesEnum.D); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).setSuppressNarratives(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("", "", "", "")); + assertThat(encoded, not(containsString("text"))); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, containsString("maritalStatus")); + } + + @Test + public void testEncodeNonContained() { + // Create an organization + Organization org = new Organization(); + org.setId("Organization/65546"); + org.getNameElement().setValue("Contained Test Organization"); + + // Create a patient + Patient patient = new Patient(); + patient.setId("Patient/1333"); + patient.addIdentifier().setSystem("urn:mrns").setValue("253345"); + patient.getManagingOrganization().setResource(org); + + // Create a list containing both resources. In a server method, you might just + // return this list, but here we will create a bundle to encode. + List resources = new ArrayList(); + resources.add(org); + resources.add(patient); + + // Create a bundle with both + Bundle b = new Bundle(); + b.addEntry().setResource(org); + b.addEntry().setResource(patient); + + // Encode the buntdle + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(b); + ourLog.info(encoded); + assertThat(encoded, not(containsString(""))); + assertThat(encoded, stringContainsInOrder("", "
")); + assertThat(encoded, containsString("")); + assertThat(encoded, stringContainsInOrder("", "")); + + encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(encoded); + assertThat(encoded, not(containsString(""))); + assertThat(encoded, containsString("")); + + + } + + + @Test + public void testEncodeReferenceUsingUnqualifiedResourceWorksCorrectly() { + + Patient patient = new Patient(); + patient.setId("phitcc_pat_normal"); + patient.addName().addGiven("Patty").setUse(NameUseEnum.NICKNAME); + patient.addTelecom().setSystem(ContactPointSystemEnum.EMAIL).setValue("patpain@ehealthinnovation.org"); + patient.setGender(AdministrativeGender.FEMALE); + patient.setBirthDateElement(new DateType("2001-10-13")); + + DateTimeDt obsEffectiveTime = new DateTimeDt("2015-04-11T12:22:01-04:00"); + + Observation obsParent = new Observation(); + obsParent.setId("phitcc_obs_bp_parent"); + obsParent.getSubject().setResource(patient); + obsParent.setStatus(ObservationStatusEnum.FINAL); + obsParent.setEffective(obsEffectiveTime); + + Observation obsSystolic = new Observation(); + obsSystolic.setId("phitcc_obs_bp_dia"); + obsSystolic.getSubject().setResource(patient); + obsSystolic.setEffective(obsEffectiveTime); + obsParent.addRelated().setType(ObservationRelationshipTypeEnum.HAS_MEMBER).setTarget(new Reference(obsSystolic)); + + Observation obsDiastolic = new Observation(); + obsDiastolic.setId("phitcc_obs_bp_dia"); + obsDiastolic.getSubject().setResource(patient); + obsDiastolic.setEffective(obsEffectiveTime); + obsParent.addRelated().setType(ObservationRelationshipTypeEnum.HAS_MEMBER).setTarget(new Reference(obsDiastolic)); + + String str = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(obsParent); + ourLog.info(str); + + assertThat(str, containsString("")); + assertThat(str, containsString("")); + } + + @Test + public void testEncodeSummary() { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDiv("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.setMaritalStatus(MaritalStatusCodesEnum.D); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).setSummaryMode(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("", "", "", "")); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, not(containsString("maritalStatus"))); + } + + @Test + public void testEncodeSummary2() { + Patient patient = new Patient(); + patient.setId("Patient/1/_history/1"); + patient.getText().setDiv("
THE DIV
"); + patient.addName().addFamily("FAMILY"); + patient.setMaritalStatus(MaritalStatusCodesEnum.D); + + TagList tl = new TagList(); + tl.add(new Tag("foo", "bar")); + ResourceMetadataKeyEnum.TAG_LIST.put(patient, tl); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).setSummaryMode(true).encodeResourceToString(patient); + ourLog.info(encoded); + + assertThat(encoded, containsString("", "", "", "")); + assertThat(encoded, stringContainsInOrder("", "", "", "")); + assertThat(encoded, not(containsString("THE DIV"))); + assertThat(encoded, containsString("family")); + assertThat(encoded, not(containsString("maritalStatus"))); + } + + + @Test @Ignore + public void testEncodeWithEncodeElements() throws Exception { + String content = IOUtils.toString(XmlParserDstu21Test.class.getResourceAsStream("/bundle-example.xml")); + + Patient patient = new Patient(); + patient.addName().addFamily("FAMILY"); + patient.addAddress().addLine("LINE1"); + + Bundle bundle = new Bundle(); + bundle.setTotal(100); + bundle.addEntry().setResource(patient); + + { + IParser p = ourCtx.newXmlParser(); + p.setEncodeElements(new HashSet(Arrays.asList("Patient.name", "Bundle.entry"))); + p.setPrettyPrint(true); + String out = p.encodeResourceToString(bundle); + ourLog.info(out); + assertThat(out, not(containsString("total"))); + assertThat(out, (containsString("Patient"))); + assertThat(out, (containsString("name"))); + assertThat(out, not(containsString("address"))); + } + { + IParser p = ourCtx.newXmlParser(); + p.setEncodeElements(new HashSet(Arrays.asList("Patient.name"))); + p.setEncodeElementsAppliesToResourceTypes(new HashSet(Arrays.asList("Patient"))); + p.setPrettyPrint(true); + String out = p.encodeResourceToString(bundle); + ourLog.info(out); + assertThat(out, (containsString("total"))); + assertThat(out, (containsString("Patient"))); + assertThat(out, (containsString("name"))); + assertThat(out, not(containsString("address"))); + } + { + IParser p = ourCtx.newXmlParser(); + p.setEncodeElements(new HashSet(Arrays.asList("Patient"))); + p.setEncodeElementsAppliesToResourceTypes(new HashSet(Arrays.asList("Patient"))); + p.setPrettyPrint(true); + String out = p.encodeResourceToString(bundle); + ourLog.info(out); + assertThat(out, (containsString("total"))); + assertThat(out, (containsString("Patient"))); + assertThat(out, (containsString("name"))); + assertThat(out, (containsString("address"))); + } + + } + + @Test + public void testMoreExtensions() throws Exception { + + Patient patient = new Patient(); + patient.addIdentifier().setUse(IdentifierUseEnum.OFFICIAL).setSystem("urn:example").setValue("7000135"); + + Extension ext = new Extension(); + ext.setUrl("http://example.com/extensions#someext"); + ext.setValue(new DateTimeDt("2011-01-02T11:13:15")); + + // Add the extension to the resource + patient.addUndeclaredExtension(ext); + // END SNIPPET: resourceExtension + + // START SNIPPET: resourceStringExtension + HumanNameDt name = patient.addName(); + name.addFamily("Shmoe"); + StringDt given = name.addGiven(); + given.setValue("Joe"); + Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringDt("given")); + given.addUndeclaredExtension(ext2); + + StringDt given2 = name.addGiven(); + given2.setValue("Shmoe"); + Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent"); + given2.addUndeclaredExtension(given2ext); + Extension givenExtChild = new Extension(); + givenExtChild.setUrl("http://examples.com#givenext_child").setValue(new StringDt("CHILD")); + given2ext.addUndeclaredExtension(givenExtChild); + // END SNIPPET: resourceStringExtension + + // START SNIPPET: subExtension + Extension parent = new Extension().setUrl("http://example.com#parent"); + patient.addUndeclaredExtension(parent); + + Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringDt("value1")); + parent.addUndeclaredExtension(child1); + + Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringDt("value1")); + parent.addUndeclaredExtension(child2); + // END SNIPPET: subExtension + + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + ourLog.info(output); + + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); + assertThat(enc, containsString("")); + assertThat( + enc, + containsString("")); + assertThat(enc, containsString("")); + assertThat(enc, containsString("")); + } + + @Test + public void testOmitResourceId() { + Patient p = new Patient(); + p.setId("123"); + p.addName().addFamily("ABC"); + + assertThat(ourCtx.newXmlParser().encodeResourceToString(p), stringContainsInOrder("123", "ABC")); + assertThat(ourCtx.newXmlParser().setOmitResourceId(true).encodeResourceToString(p), containsString("ABC")); + assertThat(ourCtx.newXmlParser().setOmitResourceId(true).encodeResourceToString(p), not(containsString("123"))); + } + + @Test @Ignore + public void testParseAndEncodeBundle() throws Exception { + String content = IOUtils.toString(XmlParserDstu21Test.class.getResourceAsStream("/bundle-example.xml")); + + Bundle parsed = ourCtx.newXmlParser().parseBundle(content); + assertEquals("Bundle/example/_history/1", parsed.getIdElement().getValue()); + assertEquals("1", parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.VERSION)); + assertEquals("1", parsed.getIdElement().getVersionIdPart()); + assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); + assertEquals("searchset", parsed.getType().getValue()); + assertEquals(3, parsed.getTotalResults().getValue().intValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2", parsed.getLinkNext().getValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&_include=MedicationOrder.medication", parsed.getLinkSelf().getValue()); + + assertEquals(2, parsed.getEntries().size()); + assertEquals("http://foo?search", parsed.getEntries().get(0).getLinkSearch().getValue()); + + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", parsed.getEntries().get(0).getLinkAlternate().getValue()); + MedicationOrder p = (MedicationOrder) parsed.getEntries().get(0).getResource(); + assertEquals("Patient/347", p.getPatient().getReference().getValue()); + assertEquals("2014-08-16T05:31:17Z", ResourceMetadataKeyEnum.UPDATED.get(p).getValueAsString()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", p.getId().getValue()); + + Medication m = (Medication) parsed.getEntries().get(1).getResource(); + assertEquals("http://example.com/base/Medication/example", m.getId().getValue()); + assertSame(((Reference)p.getMedication()).getResource(), m); + + String reencoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(parsed); + ourLog.info(reencoded); + + Diff d = new Diff(new StringReader(content), new StringReader(reencoded)); + assertTrue(d.toString(), d.identical()); + + } + + @Test @Ignore + public void testParseAndEncodeBundleNewStyle() throws Exception { + String content = IOUtils.toString(XmlParserDstu21Test.class.getResourceAsStream("/bundle-example.xml")); + + IParser newXmlParser = ourCtx.newXmlParser(); + Bundle parsed = newXmlParser.parseResource(Bundle.class, content); + assertEquals("Bundle/example/_history/1", parsed.getIdElement().getValue()); + assertEquals("1", parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.VERSION)); + assertEquals(new InstantDt("2014-08-18T01:43:30Z"), parsed.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED)); + assertEquals("searchset", parsed.getType()); + assertEquals(3, parsed.getTotal().intValue()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2", parsed.getLink().get(0).getUrlElement().getValueAsString()); + assertEquals("https://example.com/base/MedicationOrder?patient=347&_include=MedicationOrder.medication", parsed.getLink().get(1).getUrlElement().getValueAsString()); + + assertEquals(2, parsed.getEntry().size()); + assertEquals("alternate", parsed.getEntry().get(0).getLink().get(0).getRelation()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", parsed.getEntry().get(0).getLink().get(0).getUrl()); + assertEquals("http://foo?search", parsed.getEntry().get(0).getRequest().getUrlElement().getValueAsString()); + + MedicationOrder p = (MedicationOrder) parsed.getEntry().get(0).getResource(); + assertEquals("Patient/347", p.getPatient().getReference().getValue()); + assertEquals("2014-08-16T05:31:17Z", ResourceMetadataKeyEnum.UPDATED.get(p).getValueAsString()); + assertEquals("http://example.com/base/MedicationOrder/3123/_history/1", p.getId().getValue()); +// assertEquals("3123", p.getId().getValue()); + + Medication m = (Medication) parsed.getEntry().get(1).getResource(); + assertEquals("http://example.com/base/Medication/example", m.getId().getValue()); + assertSame(((Reference)p.getMedication()).getResource(), m); + + String reencoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(parsed); + ourLog.info(reencoded); + + Diff d = new Diff(new StringReader(content), new StringReader(reencoded)); + assertTrue(d.toString(), d.identical()); + + } + + + @Test + public void testParseAndEncodeExtensionOnReference() { + //@formatter:off + String input = + "" + + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""; + //@formatter:on + DataElement de = ourCtx.newXmlParser().parseResource(DataElement.class, input); + String output = ourCtx.newXmlParser().encodeResourceToString(de).replace(" xmlns=\"http://hl7.org/fhir\"", ""); + + ElementDefinitionDt elem = de.getElement().get(0); + Binding b = elem.getBinding(); + // assertEquals("All codes representing the gender of a person.", b.getDescription()); + + Reference ref = (Reference) b.getValueSet(); + assertEquals("#2179414", ref.getReference().getValue()); + + assertEquals(2, ref.getUndeclaredExtensions().size()); + Extension ext = ref.getUndeclaredExtensions().get(0); + assertEquals("http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset", ext.getUrl()); + assertEquals(Reference.class, ext.getValue().getClass()); + assertEquals("#2179414-permitted", ((Reference) ext.getValue()).getReference().getValue()); + + ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(de)); + + assertThat(output, containsString("http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset")); + + ourLog.info("Expected: {}", input); + ourLog.info("Actual : {}", output); + assertEquals(input, output); + } + + @Test + public void testParseBundleNewWithPlaceholderIds() { + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, input); + assertEquals("urn:oid:0.1.2.3", parsed.getEntry().get(0).getResource().getIdElement().getValue()); + + } + + @Test + public void testParseBundleNewWithPlaceholderIdsInBase1() { + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, input); + assertEquals("urn:oid:0.1.2.3", parsed.getEntry().get(0).getResource().getIdElement().getValue()); + } + + @Test + public void testParseBundleNewWithPlaceholderIdsInBase2() { + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, input); + assertEquals("urn:uuid:0.1.2.3", parsed.getEntry().get(0).getResource().getIdElement().getValue()); + + //@formatter:off + input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + parsed = ourCtx.newXmlParser().parseResource(Bundle.class, input); + assertEquals("urn:uuid:0.1.2.3", parsed.getEntry().get(0).getResource().getIdElement().getValue()); + + } + + @Test + public void testParseBundleOldStyleWithUnknownLinks() throws Exception { + //@formatter:off + String bundle = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + + Bundle b = ourCtx.newXmlParser().parseBundle(bundle); + assertEquals(1, b.getEntries().size()); + + } + + @Test + public void testParseBundleOldWithPlaceholderIds() { + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + Bundle parsed = ourCtx.newXmlParser().parseBundle(input); + assertEquals("urn:oid:0.1.2.3", parsed.getEntries().get(0).getResource().getId().getValue()); + + //@formatter:off + input = "\n" + + " \n" + + " \n" + + " \n" + // no trailing :, invalid but we'll be nice + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n"; + //@formatter:on + + parsed = ourCtx.newXmlParser().parseBundle(input); + assertEquals("urn:oid:0.1.2.3", parsed.getEntries().get(0).getResource().getId().getValue()); + + } + + @Test + public void testParseBundleWithBinary() { + // TODO: implement this test, make sure we handle ID and meta correctly in Binary + } + + /** + * See #191 + */ + @Test @Ignore + public void testParseBundleWithLinksOfUnknownRelation() throws Exception { + String input = IOUtils.toString(XmlParserDstu21Test.class.getResourceAsStream("/bundle_orion.xml")); + Bundle parsed = ourCtx.newXmlParser().parseResource(Bundle.class, input); + + Link link = parsed.getLink().get(0); + assertEquals("just trying add link", link.getRelation()); + assertEquals("blarion", link.getUrl()); + + Entry entry = parsed.getEntry().get(0); + link = entry.getLink().get(0); + assertEquals("orionhealth.edit", link.getRelation()); + assertEquals("Observation", link.getUrl()); + } + + @Test + public void testParseBundleWithResourceId() { + //@formatter:off + String input = "" + + "" + + "" + + "" + + "\n"; + //@formatter:on + + Bundle bundle = ourCtx.newXmlParser().parseResource(Bundle.class, input); + assertEquals("http://localhost:58402/fhir/context/Patient/1/_history/3", bundle.getEntry().get(0).getResource().getIdElement().getValue()); + assertEquals("http://localhost:58402/fhir/context/Patient/1/_history/2", bundle.getEntry().get(1).getResource().getIdElement().getValue()); + assertEquals("http://localhost:58402/fhir/context/Patient/1/_history/1", bundle.getEntry().get(2).getResource().getIdElement().getValue()); + } + + /** + * see #144 and #146 + */ + @Test @Ignore + public void testParseContained() { + + FhirContext c = FhirContext.forDstu2(); + IParser parser = c.newXmlParser().setPrettyPrint(true); + + Observation o = new Observation(); + o.getCode().setText("obs text"); + + Patient p = new Patient(); + p.addName().addFamily("patient family"); + o.getSubject().setResource(p); + + String enc = parser.encodeResourceToString(o); + ourLog.info(enc); + + //@formatter:off + assertThat(enc, stringContainsInOrder( + "", + "", + "", + "", + "", + "" + )); + //@formatter:on + + o = parser.parseResource(Observation.class, enc); + assertEquals("obs text", o.getCode().getText()); + + assertNotNull(o.getSubject().getResource()); + p = (Patient) o.getSubject().getResource(); + assertEquals("patient family", p.getNameFirstRep().getFamilyAsSingleString()); + } + + /** + * Thanks to Alexander Kley! + */ + @Test + public void testParseContainedBinaryResource() { + byte[] bin = new byte[] { 0, 1, 2, 3, 4 }; + final Binary binary = new Binary(); + binary.setContentType("PatientConsent").setContent(bin); + // binary.setId(UUID.randomUUID().toString()); + + ca.uhn.fhir.model.dstu21.resource.DocumentManifest manifest = new ca.uhn.fhir.model.dstu21.resource.DocumentManifest(); + // manifest.setId(UUID.randomUUID().toString()); + CodeableConceptDt cc = new CodeableConceptDt(); + cc.addCoding().setSystem("mySystem").setCode("PatientDocument"); + manifest.setType(cc); + manifest.setMasterIdentifier(new IdentifierDt().setSystem("mySystem").setValue(UUID.randomUUID().toString())); + manifest.addContent().setP(new Reference(binary)); + manifest.setStatus(DocumentReferenceStatusEnum.CURRENT); + + String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(manifest); + ourLog.info(encoded); + assertThat(encoded, StringContainsInOrder.stringContainsInOrder(Arrays.asList("contained>", ""))); + + ca.uhn.fhir.model.dstu21.resource.DocumentManifest actual = ourCtx.newXmlParser().parseResource(ca.uhn.fhir.model.dstu21.resource.DocumentManifest.class, encoded); + assertEquals(1, actual.getContained().getContainedResources().size()); + assertEquals(1, actual.getContent().size()); + assertNotNull(((Reference) actual.getContent().get(0).getP()).getResource()); + + } + + /** + * See #216 + */ + @Test + public void testParseMalformedIdentifierDstu2() { + + // This was changed from 0.5 to 1.0.0 + + //@formatter:off + String out = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + + IParserErrorHandler errorHandler = mock(IParserErrorHandler.class); + + IParser p = ourCtx.newXmlParser(); + p.setParserErrorHandler(errorHandler); + + Patient patient = p.parseResource(Patient.class, out); + assertThat(patient.getIdentifier().get(0).getType().getValueAsEnum(), IsEmptyCollection.empty()); + + ArgumentCaptor capt = ArgumentCaptor.forClass(String.class); + verify(errorHandler, times(1)).unknownAttribute(any(IParseLocation.class), capt.capture()); + + assertEquals("value", capt.getValue()); + } + + @Test + public void testParseMetadata() throws Exception { + //@formatter:off + String bundle = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + + Bundle b = ourCtx.newXmlParser().parseBundle(bundle); + assertEquals(1, b.getEntries().size()); + + Patient pt = (Patient) b.getEntries().get(0).getResource(); + assertEquals("http://foo/fhirBase2/Patient/1/_history/2", pt.getIdElement().getValue()); + assertEquals("2012-01-02", pt.getBirthDateElement().getValueAsString()); + assertEquals("0.123", ResourceMetadataKeyEnum.ENTRY_SCORE.get(pt).getValueAsString()); + assertEquals("match", ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.get(pt).getCode()); + assertEquals("POST", ResourceMetadataKeyEnum.ENTRY_TRANSACTION_METHOD.get(pt).getCode()); + assertEquals("http://foo/Patient?identifier=value", ResourceMetadataKeyEnum.LINK_SEARCH.get(pt)); + assertEquals("2001-02-22T11:22:33-05:00", ResourceMetadataKeyEnum.UPDATED.get(pt).getValueAsString()); + + Bundle toBundle = new Bundle(); + toBundle.getLinkBase().setValue("http://foo/fhirBase1"); + toBundle.getTotalResults().setValue(1); + toBundle.getLinkSelf().setValue("http://localhost:52788/Binary?_pretty=true"); + + toBundle.addResource(pt, ourCtx, "http://foo/fhirBase1"); + String reEncoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(toBundle); + + ourLog.info(reEncoded); + + Diff d = new Diff(new StringReader(bundle), new StringReader(reEncoded)); + assertTrue(d.toString(), d.identical()); + + } + + @Test + public void testParseMetaUpdatedDate() { + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + Bundle b = ourCtx.newXmlParser().parseResource(Bundle.class, input); + + InstantDt updated = ResourceMetadataKeyEnum.UPDATED.get(b); + assertEquals("2015-06-22T15:48:57.554-04:00", updated.getValueAsString()); + + } + + @Test + public void testParseNarrative() throws Exception { + //@formatter:off + String htmlNoNs = "
AAABBBCCC
"; + String htmlNs = htmlNoNs.replace("
", "
"); + String res= "\n" + + " \n" + + " \n" + + " " + htmlNs + "\n" + + " \n" + + ""; + //@formatter:on + + Patient p = ourCtx.newXmlParser().parseResource(Patient.class, res); + assertEquals(htmlNs, p.getText().getDiv().getValueAsString()); + } + + /** + * See #163 + */ + @Test + public void testParseResourceType() { + IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true); + + // Patient + Patient patient = new Patient(); + String patientId = UUID.randomUUID().toString(); + patient.setId(new IdType("Patient", patientId)); + patient.addName().addGiven("John").addFamily("Smith"); + patient.setGender(AdministrativeGender.MALE); + patient.setBirthDateElement(new DateType("1987-04-16")); + + // Bundle + Bundle bundle = new Bundle(); + bundle.setType(BundleType.COLLECTION); + bundle.addEntry().setResource(patient); + + String bundleText = xmlParser.encodeResourceToString(bundle); + ourLog.info(bundleText); + + Bundle reincarnatedBundle = xmlParser.parseResource(Bundle.class, bundleText); + Patient reincarnatedPatient = (Patient) reincarnatedBundle.getEntry().get(0).getResource(); + + assertEquals("Patient", patient.getIdElement().getResourceType()); + assertEquals("Patient", reincarnatedPatient.getIdElement().getResourceType()); + } + + @BeforeClass + public static void beforeClass() { + XMLUnit.setIgnoreAttributeOrder(true); + XMLUnit.setIgnoreComments(true); + XMLUnit.setIgnoreWhitespace(true); + } + + public static void main(String[] args) { + IGenericClient c = ourCtx.newRestfulGenericClient("http://fhir-dev.healthintersections.com.au/open"); + // c.registerInterceptor(new LoggingInterceptor(true)); + c.read().resource("Patient").withId("324").execute(); + } + +} diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/account.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/account.profile.xml index f5e5342f12f..2c59419f019 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/account.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/account.profile.xml @@ -3,7 +3,7 @@ - + @@ -292,9 +292,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/address.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/address.profile.xml index 929621c837c..a8d3ced05f3 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/address.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/address.profile.xml @@ -255,10 +255,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/age.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/age.profile.xml index c50b30c7b68..ffccee859e9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/age.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/age.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/allergyintolerance.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/allergyintolerance.profile.xml index bcb1e5b838a..98ffd566153 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/allergyintolerance.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/allergyintolerance.profile.xml @@ -3,7 +3,7 @@ - + @@ -519,10 +519,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/annotation.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/annotation.profile.xml index 2c17539d30d..b83df6addc6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/annotation.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/annotation.profile.xml @@ -152,9 +152,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointment.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointment.profile.xml index 5a9b8a06270..8a14ba498e4 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointment.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointment.profile.xml @@ -3,7 +3,7 @@ - + @@ -398,9 +398,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointmentresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointmentresponse.profile.xml index 14bc76c648d..e1778c8fd85 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointmentresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/appointmentresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -235,9 +235,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/attachment.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/attachment.profile.xml index 59898bd6b7d..65edaa68d43 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/attachment.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/attachment.profile.xml @@ -222,10 +222,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/auditevent.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/auditevent.profile.xml index c498b14c218..a3740310d91 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/auditevent.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/auditevent.profile.xml @@ -3,7 +3,7 @@ - + @@ -837,9 +837,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/backboneelement.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/backboneelement.profile.xml index b68bf9ad776..8a29e13ce58 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/backboneelement.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/backboneelement.profile.xml @@ -82,9 +82,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/basic.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/basic.profile.xml index d008f23700e..2ef000d9218 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/basic.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/basic.profile.xml @@ -3,7 +3,7 @@ - + @@ -177,10 +177,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/binary.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/binary.profile.xml index 1d212d1cd35..70e71f49334 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/binary.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/binary.profile.xml @@ -3,7 +3,7 @@ - + @@ -118,10 +118,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bodysite.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bodysite.profile.xml index e66a0409f1c..d9ce97b976f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bodysite.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bodysite.profile.xml @@ -3,7 +3,7 @@ - + @@ -189,9 +189,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/boolean.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/boolean.profile.xml index 1704adf587b..de467c133b1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/boolean.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/boolean.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bundle.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bundle.profile.xml index ccad1a3cabb..01d51e50d6b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bundle.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/bundle.profile.xml @@ -3,7 +3,7 @@ - + @@ -596,9 +596,9 @@ - + - + @@ -629,7 +629,7 @@ - + @@ -656,7 +656,7 @@ - + @@ -1337,7 +1337,7 @@ - + @@ -1364,7 +1364,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/careplan.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/careplan.profile.xml index 2b8f644e9a7..8f8d2b461de 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/careplan.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/careplan.profile.xml @@ -3,7 +3,7 @@ - + @@ -934,9 +934,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/cholesterol.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/cholesterol.profile.xml index 92ec7443961..d72ada899f8 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/cholesterol.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/cholesterol.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claim.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claim.profile.xml index 5bcecc04dad..def38588be6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claim.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claim.profile.xml @@ -3,7 +3,7 @@ - + @@ -1831,9 +1831,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claimresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claimresponse.profile.xml index 1e299b69bd8..e46f75e6689 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claimresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/claimresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -1573,9 +1573,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicaldocument.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicaldocument.profile.xml index 0b3194f7a26..7552767cc8a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicaldocument.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicaldocument.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicalimpression.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicalimpression.profile.xml index 54a2161b17f..c2431c6ad30 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicalimpression.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/clinicalimpression.profile.xml @@ -3,7 +3,7 @@ - + @@ -547,9 +547,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/code.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/code.profile.xml index 5317843b8be..bfe840b3e33 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/code.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/code.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/codeableconcept.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/codeableconcept.profile.xml index 95cd78c1946..bbadb51ad4c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/codeableconcept.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/codeableconcept.profile.xml @@ -102,10 +102,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coding.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coding.profile.xml index b08878c05e3..140a2bf4e1b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coding.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coding.profile.xml @@ -156,10 +156,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communication.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communication.profile.xml index de01904d658..f6852c72bd1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communication.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communication.profile.xml @@ -3,7 +3,7 @@ - + @@ -403,9 +403,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communicationrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communicationrequest.profile.xml index 9bb38ee363b..75616dc2e8e 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communicationrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/communicationrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -456,9 +456,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/composition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/composition.profile.xml index 5505d165987..263da3245de 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/composition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/composition.profile.xml @@ -3,7 +3,7 @@ - + @@ -648,10 +648,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conceptmap.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conceptmap.profile.xml index 00ae76c08ac..9160e814948 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conceptmap.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conceptmap.profile.xml @@ -3,7 +3,7 @@ - + @@ -696,9 +696,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/condition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/condition.profile.xml index cee6a118763..e2db164847a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/condition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/condition.profile.xml @@ -3,7 +3,7 @@ - + @@ -666,9 +666,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conformance.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conformance.profile.xml index c0ab9108dd9..fa1b71af500 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conformance.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/conformance.profile.xml @@ -3,7 +3,7 @@ - + @@ -1718,9 +1718,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/consentdirective.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/consentdirective.profile.xml index 385fa0f3416..c73d9d89169 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/consentdirective.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/consentdirective.profile.xml @@ -18,7 +18,6 @@ - @@ -33,7 +32,7 @@ - + @@ -56,7 +55,7 @@ - + @@ -90,7 +89,7 @@ - + @@ -121,7 +120,7 @@ - + @@ -329,7 +328,7 @@ - + @@ -346,7 +345,7 @@ - + @@ -360,7 +359,7 @@ - + @@ -388,14 +387,14 @@ - + - + @@ -415,14 +414,14 @@ - + - + @@ -442,14 +441,14 @@ - + - + @@ -603,7 +602,7 @@ - + @@ -767,7 +766,6 @@ - @@ -779,32 +777,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -812,7 +787,6 @@ - @@ -824,32 +798,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -909,7 +860,6 @@ - @@ -921,32 +871,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1042,7 +969,7 @@ - + @@ -1055,7 +982,7 @@ - + @@ -1246,7 +1173,7 @@ - + @@ -1259,7 +1186,7 @@ - + @@ -1269,7 +1196,7 @@ - + @@ -1282,7 +1209,7 @@ - + @@ -1322,7 +1249,7 @@ - + @@ -1345,7 +1272,7 @@ - + @@ -1502,7 +1429,7 @@ - + @@ -1682,7 +1609,6 @@ - @@ -1694,32 +1620,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1727,7 +1630,6 @@ - @@ -1739,32 +1641,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1812,7 +1691,6 @@ - @@ -1824,33 +1702,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2231,7 +2082,7 @@ - + @@ -2300,7 +2151,7 @@ - + @@ -2312,7 +2163,7 @@ - + @@ -2546,7 +2397,7 @@ - + @@ -2633,7 +2484,7 @@ - + @@ -2644,7 +2495,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contactpoint.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contactpoint.profile.xml index 1c56039327c..d693120494b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contactpoint.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contactpoint.profile.xml @@ -170,10 +170,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contract.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contract.profile.xml index 163c0f4eeb3..4b88150a704 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contract.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/contract.profile.xml @@ -3,7 +3,7 @@ - + @@ -1306,9 +1306,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/count.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/count.profile.xml index 2960af10d27..5c2db96d99c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/count.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/count.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coverage.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coverage.profile.xml index 8662aa8bc79..242fb55d1fb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coverage.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/coverage.profile.xml @@ -3,7 +3,7 @@ - + @@ -331,10 +331,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/dataelement.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/dataelement.profile.xml index aaf294e877f..bd07c298feb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/dataelement.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/dataelement.profile.xml @@ -3,7 +3,7 @@ - + @@ -449,9 +449,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/date.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/date.profile.xml index 30f04b0cfa9..0247692a936 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/date.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/date.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/datetime.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/datetime.profile.xml index b6040330469..093eae26f0e 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/datetime.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/datetime.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decimal.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decimal.profile.xml index 4eaa2b72e6a..9f143e86617 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decimal.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decimal.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportrule.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportrule.profile.xml index 3f2c0663e02..3a759eccdc0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportrule.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportrule.profile.xml @@ -3,7 +3,7 @@ - + @@ -580,9 +580,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportservicemodule.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportservicemodule.profile.xml index af7ebf652b5..53394adf4b8 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportservicemodule.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/decisionsupportservicemodule.profile.xml @@ -3,7 +3,7 @@ - + @@ -103,17 +103,319 @@ . . - . - moduleDefinition - + . + parameter + + + + 0..* + + BackboneElement + + + + + + + . + . + . + . + name + 1..1 - Reference( - ModuleDefinition) + code - Data requirements for the module + + + + + + . + . + . + . + use + + + + 1..1 + + code + + +
+ OperationParameterUse ( + Required) + + + + + + . + . + . + . + documentation + + + + 0..1 + + string + + + + + + + . + . + . + . + type + + + + 1..1 + + code + + +
+ Parameter Types used in Operation Definitions ( + Required) + + + + + + . + . + . + . + profile + + + + 0..1 + + Reference( + StructureDefinition) + + + + + + + . + . + . + . + mustSupport + + + + 0..* + + string + + Indicates that specific structure elements are referenced by the knowledge module + + + + + . + . + . + . + codeFilter + + + + 0..* + + BackboneElement + + + + + + + . + . + . + . + . + path + + + + 1..1 + + string + + The code-valued attribute of the filter + + + + + . + . + . + . + . + valueSet[x] + + + + 0..1 + + The valueset for the code filter + + + + + . + . + . + . + . + . + valueSetString + + + + + string + + + + + + + . + . + . + . + . + . valueSetReference + + + + + Reference( + ValueSet) + + + + + + + . + . + . + . + . + codeableConcept + + + + 0..* + + CodeableConcept + + The codeableConcepts for the filter + + + + + . + . + . + . + dateFilter + + + + 0..* + + BackboneElement + + + + + + + . + . + . + . + . + path + + + + 1..1 + + string + + The date-valued attribute of the filter + + + + + . + . + . + . + . + value[x] + + + + 0..1 + + The value of the filter, as a Period or dateTime value + + + + + . + . + . + . + . + . + valueDateTime + + + + + dateTime + + + + + + + . + . + . + . + . + . + valuePeriod + + + + + Period + + @@ -146,9 +448,9 @@ - + - + @@ -340,14 +642,310 @@
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -404,14 +1002,157 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/detectedissue.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/detectedissue.profile.xml index 7ae34513cae..89d816b976d 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/detectedissue.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/detectedissue.profile.xml @@ -3,7 +3,7 @@ - + @@ -318,9 +318,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/device.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/device.profile.xml index 4b9a0bc69f0..cfc16410238 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/device.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/device.profile.xml @@ -3,7 +3,7 @@ - + @@ -346,10 +346,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicecomponent.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicecomponent.profile.xml index 585e4f4a1ef..6d550fdb0b5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicecomponent.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicecomponent.profile.xml @@ -3,7 +3,7 @@ - + @@ -329,9 +329,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetric.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetric.profile.xml index 0acad56088b..a1a2482f85a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetric.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetric.profile.xml @@ -3,7 +3,7 @@ - + @@ -345,9 +345,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetricobservation.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetricobservation.profile.xml index 5b42c2f6130..0de103a7262 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetricobservation.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/devicemetricobservation.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceuserequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceuserequest.profile.xml index eed45e7b703..69d190c11c2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceuserequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceuserequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -399,9 +399,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceusestatement.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceusestatement.profile.xml index 798d0c4368a..c66a75245ad 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceusestatement.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/deviceusestatement.profile.xml @@ -3,7 +3,7 @@ - + @@ -317,9 +317,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticorder.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticorder.profile.xml index 8d1c0412e90..ffaccf62206 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticorder.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticorder.profile.xml @@ -3,7 +3,7 @@ - + @@ -491,9 +491,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticreport.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticreport.profile.xml index 426b46aa1ab..25908d4706a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticreport.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/diagnosticreport.profile.xml @@ -3,7 +3,7 @@ - + @@ -466,10 +466,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/distance.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/distance.profile.xml index 65f609c0e80..b3b6a5299fb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/distance.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/distance.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentmanifest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentmanifest.profile.xml index 170b54823e5..69387b9be60 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentmanifest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentmanifest.profile.xml @@ -3,7 +3,7 @@ - + @@ -406,9 +406,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentreference.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentreference.profile.xml index b4e850c4d94..7d03a54dd4f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentreference.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/documentreference.profile.xml @@ -3,7 +3,7 @@ - + @@ -691,9 +691,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/domainresource.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/domainresource.profile.xml index 5187cfb72c2..d945b93bf85 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/domainresource.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/domainresource.profile.xml @@ -2,9 +2,6 @@ - - -
@@ -155,9 +152,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/duration.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/duration.profile.xml index f541c8fea02..6a3ab858be2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/duration.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/duration.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/element.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/element.profile.xml index 79bc6399dd3..1f53d3088a2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/element.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/element.profile.xml @@ -101,9 +101,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/elementdefinition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/elementdefinition.profile.xml index 5f1c6ec096a..cc7bf5be2b6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/elementdefinition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/elementdefinition.profile.xml @@ -1137,9 +1137,9 @@ - + - + @@ -1180,7 +1180,7 @@ - + @@ -3270,7 +3270,7 @@ Note that an element that has the property IsModifier is not necessarily a " - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityrequest.profile.xml index 62858dfa7a9..803d6fe8798 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -215,9 +215,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityresponse.profile.xml index b8bfa20155d..d08f7f3b2b9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/eligibilityresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -274,9 +274,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/encounter.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/encounter.profile.xml index f6760f1aff0..d88b8d9ebb6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/encounter.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/encounter.profile.xml @@ -3,7 +3,7 @@ - + @@ -793,9 +793,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentrequest.profile.xml index 402f5a10824..c61a39dbd47 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -275,9 +275,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentresponse.profile.xml index 4d4e6b3f4d1..44f72d04c17 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/enrollmentresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -274,9 +274,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/episodeofcare.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/episodeofcare.profile.xml index 85d3ef6cc19..05cdc77d188 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/episodeofcare.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/episodeofcare.profile.xml @@ -3,7 +3,7 @@ - + @@ -367,9 +367,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/expansionprofile.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/expansionprofile.profile.xml index d2b29db9843..940b161687e 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/expansionprofile.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/expansionprofile.profile.xml @@ -2,9 +2,6 @@ - - -
@@ -38,17 +35,12 @@ ExpansionProfile - - I - + DomainResource - Defines behaviour and contraints on the ValueSet Expansion operation -
- SHALL have at least one of – codeSystems.include – codeSystems.exclude – includeDesignations (as true) – excludeNested – excludeNotForUI – excludePostCoordinated – displayLanguage – limitedExpansion - + Defines behaviour and contraints on the ValueSet Expansion operation @@ -826,9 +818,9 @@ - + - + @@ -853,15 +845,6 @@ - - - - - - - - - @@ -2084,15 +2067,6 @@ - - - - - - - - - diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/explanationofbenefit.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/explanationofbenefit.profile.xml index ce16f3815e4..0cad2fc5ea2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/explanationofbenefit.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/explanationofbenefit.profile.xml @@ -3,7 +3,7 @@ - + @@ -274,9 +274,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/extension.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/extension.profile.xml index 1e6ed5d6f15..0312c8dca01 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/extension.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/extension.profile.xml @@ -96,10 +96,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/familymemberhistory.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/familymemberhistory.profile.xml index f8689e35e38..2f6c69821b7 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/familymemberhistory.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/familymemberhistory.profile.xml @@ -3,7 +3,7 @@ - + @@ -612,9 +612,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/flag.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/flag.profile.xml index 2b37d498072..921bb0c4a2a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/flag.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/flag.profile.xml @@ -3,7 +3,7 @@ - + @@ -243,9 +243,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/genetics.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/genetics.profile.xml index 747659271aa..f0a71ad2eeb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/genetics.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/genetics.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/goal.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/goal.profile.xml index c0a80d512ce..a935aa01211 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/goal.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/goal.profile.xml @@ -3,7 +3,7 @@ - + @@ -459,9 +459,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/group.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/group.profile.xml index 08656afe95b..1045739a7fb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/group.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/group.profile.xml @@ -3,7 +3,7 @@ - + @@ -420,9 +420,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidancerequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidancerequest.profile.xml index ba90fb5ee38..0164adc5731 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidancerequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidancerequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -348,9 +348,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidanceresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidanceresponse.profile.xml index 910c779dd91..087db4a7d55 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidanceresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/guidanceresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -399,9 +399,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/hdlcholesterol.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/hdlcholesterol.profile.xml index 80438795fb3..7dc6e838e5c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/hdlcholesterol.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/hdlcholesterol.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/healthcareservice.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/healthcareservice.profile.xml index 055cbdccbb7..fdb725d2802 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/healthcareservice.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/healthcareservice.profile.xml @@ -3,7 +3,7 @@ - + @@ -603,9 +603,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/humanname.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/humanname.profile.xml index 18a0ca6958b..9d3e707b072 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/humanname.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/humanname.profile.xml @@ -197,10 +197,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/id.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/id.profile.xml index a140db608b6..f6cc33d3013 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/id.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/id.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/identifier.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/identifier.profile.xml index 8e2c26b29b6..3c60890b46c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/identifier.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/identifier.profile.xml @@ -184,10 +184,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingobjectselection.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingobjectselection.profile.xml index 0b394bcd037..a2173cc5417 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingobjectselection.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingobjectselection.profile.xml @@ -3,7 +3,7 @@ - + @@ -479,10 +479,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingstudy.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingstudy.profile.xml index 2207f40361b..eb5b4a5acc8 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingstudy.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/imagingstudy.profile.xml @@ -3,7 +3,7 @@ - + @@ -724,9 +724,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunization.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunization.profile.xml index 7da1980a0e3..2506b1c1cd2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunization.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunization.profile.xml @@ -3,7 +3,7 @@ - + @@ -691,9 +691,9 @@ - + - + @@ -729,7 +729,7 @@ - + @@ -1763,7 +1763,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunizationrecommendation.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunizationrecommendation.profile.xml index c398a3bc8ac..3b8936add1f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunizationrecommendation.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/immunizationrecommendation.profile.xml @@ -3,7 +3,7 @@ - + @@ -399,9 +399,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/implementationguide.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/implementationguide.profile.xml index 4b0954542e8..d5687ef4e9b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/implementationguide.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/implementationguide.profile.xml @@ -3,7 +3,7 @@ - + @@ -294,7 +294,7 @@ . . . - fhirVersion + fhirVersion @@ -855,10 +855,10 @@ - + - + @@ -1269,7 +1269,7 @@ - + @@ -2085,7 +2085,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/instant.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/instant.profile.xml index 38c3ab6545c..cd51fe6d7c5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/instant.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/instant.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/integer.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/integer.profile.xml index 63f83c7dd65..0f172af0e27 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/integer.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/integer.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ldlcholesterol.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ldlcholesterol.profile.xml index 9a551a44649..e9548ffcae0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ldlcholesterol.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ldlcholesterol.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/library.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/library.profile.xml index 685ffae1be8..da8a00467e3 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/library.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/library.profile.xml @@ -3,7 +3,7 @@ - + @@ -162,9 +162,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/lipidprofile.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/lipidprofile.profile.xml index 18893eb0c71..53e23c4153c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/lipidprofile.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/lipidprofile.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/list.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/list.profile.xml index 9567fe1294a..381bc169a6f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/list.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/list.profile.xml @@ -3,7 +3,7 @@ - + @@ -415,9 +415,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/location.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/location.profile.xml index 727f46bd28b..bfe3a8a6a38 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/location.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/location.profile.xml @@ -3,7 +3,7 @@ - + @@ -355,9 +355,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/markdown.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/markdown.profile.xml index 655e7c3b45b..e5744a28ce4 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/markdown.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/markdown.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measure.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measure.profile.xml index 18535de9dbc..52c4157243d 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measure.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measure.profile.xml @@ -3,7 +3,7 @@ - + @@ -266,9 +266,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measurereport.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measurereport.profile.xml index a35dceee6db..489482d3e5e 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measurereport.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/measurereport.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/media.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/media.profile.xml index 0fd3c3783cc..348e9d733d1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/media.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/media.profile.xml @@ -3,7 +3,7 @@ - + @@ -323,9 +323,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medication.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medication.profile.xml index b65f6f66a72..bfe9db39380 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medication.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medication.profile.xml @@ -3,7 +3,7 @@ - + @@ -371,9 +371,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationadministration.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationadministration.profile.xml index cf256a19616..be8043a8f23 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationadministration.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationadministration.profile.xml @@ -3,7 +3,7 @@ - + @@ -609,9 +609,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationdispense.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationdispense.profile.xml index 35712d46cf3..945de4a3b00 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationdispense.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationdispense.profile.xml @@ -3,7 +3,7 @@ - + @@ -808,9 +808,9 @@ Specifically if 'boolean' datatype is selected, then the following logic - + - + @@ -841,7 +841,7 @@ Specifically if 'boolean' datatype is selected, then the following logic - + @@ -1697,7 +1697,7 @@ Specifically if 'boolean' datatype is selected, then the following logic - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationorder.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationorder.profile.xml index 3acaf53a3e3..9a2802b49c0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationorder.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationorder.profile.xml @@ -3,7 +3,7 @@ - + @@ -919,9 +919,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationstatement.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationstatement.profile.xml index 76ddc2a2243..42477b70dae 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationstatement.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/medicationstatement.profile.xml @@ -3,7 +3,7 @@ - + @@ -736,9 +736,9 @@ Specifically if 'boolean' datatype is selected, then the following logic - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/messageheader.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/messageheader.profile.xml index ae0820a91f4..38987a0a811 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/messageheader.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/messageheader.profile.xml @@ -3,7 +3,7 @@ - + @@ -509,10 +509,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/meta.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/meta.profile.xml index 62ed65a91ff..56761104efb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/meta.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/meta.profile.xml @@ -160,9 +160,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/moduledefinition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/moduledefinition.profile.xml index acf9689f87d..7878c77c031 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/moduledefinition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/moduledefinition.profile.xml @@ -3,7 +3,7 @@ - + @@ -820,9 +820,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/modulemetadata.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/modulemetadata.profile.xml index 4e0bcfccba5..ea6980a1df8 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/modulemetadata.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/modulemetadata.profile.xml @@ -3,7 +3,7 @@ - + @@ -569,9 +569,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/money.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/money.profile.xml index f90397b5efb..929232435e0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/money.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/money.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/namingsystem.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/namingsystem.profile.xml index 526a7560825..9654a84d14b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/namingsystem.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/namingsystem.profile.xml @@ -3,7 +3,7 @@ - + @@ -432,9 +432,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/narrative.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/narrative.profile.xml index 34ac2999fcd..0c041f241c2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/narrative.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/narrative.profile.xml @@ -109,9 +109,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/nutritionorder.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/nutritionorder.profile.xml index 47a7eff8eea..f50baf86bf9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/nutritionorder.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/nutritionorder.profile.xml @@ -3,7 +3,7 @@ - + @@ -851,9 +851,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/observation.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/observation.profile.xml index 081b6b201de..67a09e19858 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/observation.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/observation.profile.xml @@ -3,7 +3,7 @@ - + @@ -1041,10 +1041,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/oid.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/oid.profile.xml index eb6cd3b3756..8b98a574fc6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/oid.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/oid.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationdefinition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationdefinition.profile.xml index 4685002dd59..c6b8fe43073 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationdefinition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationdefinition.profile.xml @@ -3,7 +3,7 @@ - + @@ -682,9 +682,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationoutcome.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationoutcome.profile.xml index 5aaa21d8e42..ce3ccbe237a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationoutcome.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/operationoutcome.profile.xml @@ -3,7 +3,7 @@ - + @@ -204,9 +204,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/order.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/order.profile.xml index cbee40c3144..629dfb0d231 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/order.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/order.profile.xml @@ -3,7 +3,7 @@ - + @@ -306,9 +306,9 @@ - + - + @@ -657,7 +657,7 @@ - + @@ -988,7 +988,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderresponse.profile.xml index 022468d4458..a23ff0725de 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -214,9 +214,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderset.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderset.profile.xml index 13a6aa47e00..b331417999f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderset.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/orderset.profile.xml @@ -3,7 +3,7 @@ - + @@ -533,9 +533,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/organization.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/organization.profile.xml index 56d722b83f6..c91abbebbc9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/organization.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/organization.profile.xml @@ -3,7 +3,7 @@ - + @@ -309,9 +309,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/parameters.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/parameters.profile.xml index f67c6a490c1..61e2207145d 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/parameters.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/parameters.profile.xml @@ -2,9 +2,6 @@ - - -
@@ -174,9 +171,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/patient.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/patient.profile.xml index fa8a8e0520b..282bb944ef5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/patient.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/patient.profile.xml @@ -3,7 +3,7 @@ - + @@ -729,10 +729,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentnotice.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentnotice.profile.xml index 914d10526df..1bed86426a2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentnotice.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentnotice.profile.xml @@ -3,7 +3,7 @@ - + @@ -275,9 +275,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentreconciliation.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentreconciliation.profile.xml index e1af909a189..aa54557d12b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentreconciliation.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/paymentreconciliation.profile.xml @@ -3,7 +3,7 @@ - + @@ -551,9 +551,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/period.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/period.profile.xml index 900ff3323c0..2dbda481a39 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/period.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/period.profile.xml @@ -108,9 +108,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/person.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/person.profile.xml index 07b84724d8c..cae7190b082 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/person.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/person.profile.xml @@ -3,7 +3,7 @@ - + @@ -296,10 +296,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/positiveint.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/positiveint.profile.xml index 9d7bc944908..eae68d7c70c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/positiveint.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/positiveint.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/practitioner.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/practitioner.profile.xml index 47b693b04f6..b4705b86b1b 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/practitioner.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/practitioner.profile.xml @@ -3,7 +3,7 @@ - + @@ -466,10 +466,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedure.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedure.profile.xml index 5b8a1264182..fc533e2d009 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedure.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedure.profile.xml @@ -3,7 +3,7 @@ - + @@ -639,9 +639,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedurerequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedurerequest.profile.xml index 1e4ef1c9a92..8a4ba2d8ba0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedurerequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/procedurerequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -467,9 +467,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processrequest.profile.xml index 24c5c22264c..e636e0d0ba0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -402,9 +402,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processresponse.profile.xml index 3884dc77707..e29c2bf96e6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/processresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -378,9 +378,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/provenance.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/provenance.profile.xml index f7d35408119..596d88f6245 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/provenance.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/provenance.profile.xml @@ -3,7 +3,7 @@ - + @@ -500,9 +500,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/quantity.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/quantity.profile.xml index 6459e0c7feb..d91c94b7b52 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/quantity.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/quantity.profile.xml @@ -166,10 +166,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaire.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaire.profile.xml index 6839c8fce27..54b56c5fcdb 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaire.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaire.profile.xml @@ -3,7 +3,7 @@ - + @@ -466,10 +466,10 @@ - + - + @@ -876,7 +876,7 @@ - + @@ -1375,7 +1375,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaireresponse.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaireresponse.profile.xml index bd4cd239e08..7855251126d 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaireresponse.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/questionnaireresponse.profile.xml @@ -3,7 +3,7 @@ - + @@ -605,10 +605,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/range.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/range.profile.xml index eb2fdec49c9..b22d8de0cb1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/range.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/range.profile.xml @@ -108,10 +108,10 @@ - + - + @@ -138,7 +138,7 @@ - + @@ -245,7 +245,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ratio.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ratio.profile.xml index 117d9398bf1..69025b793a0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ratio.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/ratio.profile.xml @@ -106,10 +106,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/reference.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/reference.profile.xml index 8b7bee87834..e86882bcd02 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/reference.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/reference.profile.xml @@ -107,9 +107,9 @@ - + - + @@ -130,7 +130,7 @@ - + @@ -221,7 +221,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/referralrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/referralrequest.profile.xml index d7ff21f2c01..916de038fb9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/referralrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/referralrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -381,9 +381,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/relatedperson.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/relatedperson.profile.xml index 92b5dce6c5e..9e5aa986efe 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/relatedperson.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/relatedperson.profile.xml @@ -3,7 +3,7 @@ - + @@ -261,10 +261,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/resource.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/resource.profile.xml index dc49cb6c5cf..3b95c21b885 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/resource.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/resource.profile.xml @@ -2,9 +2,6 @@ - - -
@@ -149,9 +146,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/riskassessment.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/riskassessment.profile.xml index 84a3aa6940e..64c4041a453 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/riskassessment.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/riskassessment.profile.xml @@ -3,7 +3,7 @@ - + @@ -433,9 +433,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/sampleddata.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/sampleddata.profile.xml index acdf181e269..04ce81370f9 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/sampleddata.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/sampleddata.profile.xml @@ -192,10 +192,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/schedule.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/schedule.profile.xml index acadb9b020e..5b90b88b201 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/schedule.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/schedule.profile.xml @@ -3,7 +3,7 @@ - + @@ -172,9 +172,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/searchparameter.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/searchparameter.profile.xml index 004d958e396..4da7de9faa5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/searchparameter.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/searchparameter.profile.xml @@ -3,7 +3,7 @@ - + @@ -406,9 +406,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/shareablevalueset.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/shareablevalueset.profile.xml index 126cc119592..4608ef4f523 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/shareablevalueset.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/shareablevalueset.profile.xml @@ -10,9 +10,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/signature.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/signature.profile.xml index 3e979093c0c..21f53ca7010 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/signature.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/signature.profile.xml @@ -198,10 +198,10 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/simplequantity.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/simplequantity.profile.xml index 5be17284a6f..b75cee4d46a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/simplequantity.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/simplequantity.profile.xml @@ -25,9 +25,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/slot.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/slot.profile.xml index f9bf75c749c..a690f1a1343 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/slot.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/slot.profile.xml @@ -3,7 +3,7 @@ - + @@ -223,9 +223,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/specimen.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/specimen.profile.xml index fcbe9d17878..37c9b30dfa1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/specimen.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/specimen.profile.xml @@ -3,7 +3,7 @@ - + @@ -609,9 +609,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/string.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/string.profile.xml index 1d72ff52ce0..1a351d3c592 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/string.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/string.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/structuredefinition.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/structuredefinition.profile.xml index e18dc6163a2..a9942f41c44 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/structuredefinition.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/structuredefinition.profile.xml @@ -3,7 +3,7 @@ - + @@ -55,8 +55,6 @@
If there's a constrained type, its content must match the path name in the first element of a snapshot
- element.base must appear if there is a base on the structure definition -
Element paths must be unique unless the structure is a constraint
If the structure is not abstract, or there's a constrained type, then there SHALL be a base @@ -393,7 +391,7 @@ . . . - fhirVersion + fhirVersion @@ -728,9 +726,9 @@ - + - + @@ -782,7 +780,7 @@ - + @@ -792,7 +790,7 @@ - + @@ -800,16 +798,6 @@ - - - - - - - - - - @@ -831,7 +819,7 @@ - + @@ -1341,7 +1329,7 @@ - + @@ -1757,7 +1745,7 @@ - + @@ -1767,7 +1755,7 @@ - + @@ -1775,16 +1763,6 @@ - - - - - - - - - - @@ -1806,7 +1784,7 @@ - + @@ -2140,7 +2118,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/subscription.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/subscription.profile.xml index 82a99907fea..d02411d9c5a 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/subscription.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/subscription.profile.xml @@ -3,7 +3,7 @@ - + @@ -311,9 +311,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/substance.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/substance.profile.xml index e27233eddfc..11d77645167 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/substance.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/substance.profile.xml @@ -3,7 +3,7 @@ - + @@ -288,9 +288,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplydelivery.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplydelivery.profile.xml index 71afcfd6751..075dceaa5c0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplydelivery.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplydelivery.profile.xml @@ -3,7 +3,7 @@ - + @@ -292,9 +292,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplyrequest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplyrequest.profile.xml index 0e63e16ddd2..36b799bf5a5 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplyrequest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/supplyrequest.profile.xml @@ -3,7 +3,7 @@ - + @@ -351,9 +351,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/testscript.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/testscript.profile.xml index 4a33c4ceb7e..09bf0f5fd83 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/testscript.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/testscript.profile.xml @@ -3,7 +3,7 @@ - + @@ -468,6 +468,24 @@ The expected capabilities of the server + + + . + . + . + . + . + origin + + + + 0..* + + integer + + Which origin server these requirements apply to + + . @@ -523,6 +541,114 @@ Required Conformance + + + . + . + . + origin + + + + 0..* + + BackboneElement + + An abstract server representing a client or sender in a message exchange + + + + + . + . + . + . + index + + + + 1..1 + + integer + + The index of the abstract origin server starting at 1 + + + + + . + . + . + . + profile + + + + 1..1 + + code + + FHIR-DSTU2-Client | FHIR-DSTU2-SDC-FormFiller +
+ ProfileOriginType ( + Required) + + + + + + . + . + . + destination + + + + 0..* + + BackboneElement + + An abstract server representing a destination or receiver in a message exchange + + + + + . + . + . + . + index + + + + 1..1 + + integer + + The index of the abstract destination server starting at 1 + + + + + . + . + . + . + profile + + + + 1..1 + + code + + FHIR-DSTU2-Server | FHIR-DSTU2-SDC-FormManager | FHIR-DSTU2-SDC-FormReceiver | FHIR-DSTU2-SDC-FormProcessor +
+ ProfileDestinationType ( + Required) + + + . @@ -934,7 +1060,7 @@ . . . - destination + destination @@ -942,7 +1068,7 @@ integer - Which server to perform the operation on + Server responding to the request @@ -964,6 +1090,25 @@ Whether or not to send the request url in encoded format + + + . + . + . + . + . + . + origin + + + + 0..1 + + integer + + Server initiating the request + + . @@ -1738,9 +1883,9 @@ - + - + @@ -2419,6 +2564,16 @@
+ + + + + + + + + + @@ -2451,6 +2606,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2774,7 +3121,7 @@ - + @@ -3002,14 +3349,14 @@ - - + + + - @@ -3022,6 +3369,17 @@ + + + + + + + + + + + @@ -3585,7 +3943,7 @@ - + @@ -4174,6 +4532,16 @@ + + + + + + + + + + @@ -4206,6 +4574,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4376,7 +4834,7 @@ - + @@ -4502,14 +4960,14 @@ - - + + + - @@ -4522,6 +4980,17 @@ + + + + + + + + + + + @@ -4932,7 +5401,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/time.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/time.profile.xml index 8b3b14e8dd0..75b1fac7ce0 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/time.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/time.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/timing.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/timing.profile.xml index 99583ebf4e8..1f494f096a6 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/timing.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/timing.profile.xml @@ -413,10 +413,10 @@ - + - + @@ -547,7 +547,7 @@ - + @@ -920,7 +920,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/triglyceride.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/triglyceride.profile.xml index 7f808b4cefd..3a8dcf84ae2 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/triglyceride.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/triglyceride.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/unsignedint.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/unsignedint.profile.xml index d22ca934b85..4e25d4eaf1f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/unsignedint.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/unsignedint.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uri.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uri.profile.xml index 7e497ae105a..41841f0096c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uri.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uri.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uuid.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uuid.profile.xml index 8f32aeeb83a..a21a13a6e48 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uuid.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/uuid.profile.xml @@ -16,9 +16,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/valueset.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/valueset.profile.xml index ce42799e453..987d2b2a69f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/valueset.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/valueset.profile.xml @@ -3,7 +3,7 @@ - + @@ -1351,9 +1351,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/visionprescription.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/visionprescription.profile.xml index b2202c330b3..65009b68d0f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/visionprescription.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/visionprescription.profile.xml @@ -3,7 +3,7 @@ - + @@ -534,9 +534,9 @@ - + - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentmanifest.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentmanifest.profile.xml index 41448e335f1..22377063bc8 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentmanifest.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentmanifest.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentreference.profile.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentreference.profile.xml index a333ca3d965..00ef4efee78 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentreference.profile.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/profile/xdsdocumentreference.profile.xml @@ -18,7 +18,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/consentdirective.sch b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/consentdirective.sch index e040faeea4e..4f3997ba576 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/consentdirective.sch +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/consentdirective.sch @@ -2,66 +2,19 @@ - f:Contract - valuedItem: maximum cardinality of 'valuedItem' is 0 - binding[x]: minimum cardinality of 'binding[x]' is 1 + valuedItem: maximum cardinality is 0 - - - Contract.valuedItem.quantity - - If a code for the unit is present, the system SHALL also be present (inherited) - The comparator is not used on a SimpleQuantity (inherited) + + binding[x]: minimum cardinality is 1 - - - Contract.valuedItem.unitPrice - - If a code for the unit is present, the system SHALL also be present (inherited) - There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency). (inherited) - - - - Contract.valuedItem.net - - If a code for the unit is present, the system SHALL also be present (inherited) - There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency). (inherited) - - + f:Contract/f:term - valuedItem: maximum cardinality of 'valuedItem' is 0 + valuedItem: maximum cardinality is 0 - - - Contract.term.valuedItem.quantity - - If a code for the unit is present, the system SHALL also be present (inherited) - The comparator is not used on a SimpleQuantity (inherited) - - - - Contract.term.valuedItem.unitPrice - - If a code for the unit is present, the system SHALL also be present (inherited) - There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency). (inherited) - - - - Contract.term.valuedItem.net - - If a code for the unit is present, the system SHALL also be present (inherited) - There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency). (inherited) - - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/decisionsupportservicemodule.sch b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/decisionsupportservicemodule.sch index d5921d7f2cf..0689011572c 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/decisionsupportservicemodule.sch +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/decisionsupportservicemodule.sch @@ -38,8 +38,14 @@ ref-1: SHALL have a local reference if the resource is provided inline - + ref-1: SHALL have a local reference if the resource is provided inline + + ref-1: SHALL have a local reference if the resource is provided inline + + + per-1: If present, start SHALL have a lower value than end + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/expansionprofile.sch b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/expansionprofile.sch index f768935c3d4..1d187ec7788 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/expansionprofile.sch +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/expansionprofile.sch @@ -23,7 +23,6 @@ dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource - exp-5: SHALL have at least one of – codeSystems.include – codeSystems.exclude – includeDesignations (as true) – excludeNested – excludeNotForUI – excludePostCoordinated – displayLanguage – limitedExpansion txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/fhir-single.xsd b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/fhir-single.xsd index 93100e05897..776fa43884f 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/fhir-single.xsd +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/fhir-single.xsd @@ -27,9 +27,9 @@ POSSIBILITY OF SUCH DAMAGE. - Generated on Tue, Dec 1, 2015 11:05-0500 for FHIR v1.0.2 + Generated on Sun, Dec 6, 2015 19:25-0500 for FHIR v1.1.0 --> - + @@ -9217,15 +9217,117 @@ A reference to a ModuleMetadata resource describing the metadata for the decision support service module. - + - A reference to a ModuleDefinition resource describing the data requirements for the service module. + Parameters to the module. + + + The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + + + + + + + The name of the parameter. + + + + + Whether the parameter is input or output for the module. + + + + + A brief description of the parameter. + + + + + The type of the parameter. + + + + + The profile of the parameter, if any. + + + + + Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. + + + + + Code filters for the required data, if any. + + + + + Date filters for the required data, if any. + + + + + + + + + The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + + + + + + + The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + + + + + The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + + + + + + + The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts. + + + + + + + + + The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + + + + + + + The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + + + + + The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. + + + + + + + + Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. @@ -14111,7 +14213,7 @@ Not to be used when the patient is currently at the location - The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version. + The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. @@ -22017,7 +22119,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies - The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version. + The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.1.0 for this version. @@ -22785,6 +22887,16 @@ Specifically if 'boolean' datatype is selected, then the following logic applies The required capability must exist and are assumed to function correctly on the FHIR server being tested. + + + An abstract server used in operations within this test script in the origin element. + + + + + An abstract server used in operations within this test script in the destination element. + + If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. @@ -22909,6 +23021,11 @@ Specifically if 'boolean' datatype is selected, then the following logic applies Description of the capabilities that this test script is requiring the server to support. + + + Which origin server these requirements apply to. + + Which server these requirements apply to. @@ -22928,6 +23045,48 @@ Specifically if 'boolean' datatype is selected, then the following logic applies + + + TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + + + + + + + Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + + + + + The type of profile the server supports. + + + + + + + + + TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + + + + + + + Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + + + + + The type of profile the server supports. + + + + + + TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. @@ -23066,7 +23225,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies - Which server to perform the operation on. + The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. @@ -23074,6 +23233,11 @@ Specifically if 'boolean' datatype is selected, then the following logic applies Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. + + + The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. + + Path plus parameters after [type]. Used to set parts of the request URL explicitly. @@ -23314,6 +23478,31 @@ Specifically if 'boolean' datatype is selected, then the following logic applies + + + + + General DSTU2 client initiating against a DSTU2 Server. + + + + + DSTU2 client that serves as an SDC-FormFiller. + + + + + + + The type of origin profile the server supports. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + @@ -23504,6 +23693,41 @@ Specifically if 'boolean' datatype is selected, then the following logic applies + + + + + General DSTU2 server. + + + + + DSTU2 server that serves as an SDC-FormManager. + + + + + DSTU2 server that serves as an SDC-FormReceiver. + + + + + DSTU2 server that serves as an SDC-FormProcessor. + + + + + + + The type of destination profile the server supports. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + A value set specifies a set of codes drawn from one or more code systems. diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/structuredefinition.sch b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/structuredefinition.sch index 826650b6a16..8f8b5596409 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/structuredefinition.sch +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/schema/structuredefinition.sch @@ -27,7 +27,6 @@ sdf-8: In any snapshot or differential, all the elements except the first have to have a path that starts with the path of the first + "." sdf-12: element.base cannot appear if there is no base on the structure definition sdf-11: If there's a constrained type, its content must match the path name in the first element of a snapshot - sdf-13: element.base must appear if there is a base on the structure definition sdf-1: Element paths must be unique unless the structure is a constraint sdf-10: If the structure is not abstract, or there's a constrained type, then there SHALL be a base sdf-7: If the structure describes a base Resource or Type, the URL has to start with "http://hl7.org/fhir/StructureDefinition/" and the tail must match the id diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v2-tables.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v2-tables.xml index b04627948de..d7ddb5e2c31 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v2-tables.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v2-tables.xml @@ -3,7 +3,7 @@ - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v3-codesystems.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v3-codesystems.xml index 1b135a30397..5b1b641c9a1 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v3-codesystems.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/v3-codesystems.xml @@ -3,7 +3,7 @@ - + @@ -12,13 +12,13 @@ - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1050

@@ -119,7 +119,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -175,13 +175,13 @@ - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1100

@@ -626,7 +626,7 @@
- + @@ -637,7 +637,7 @@ - + @@ -824,13 +824,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1082

@@ -977,7 +977,7 @@ Missing description."/> - + @@ -988,7 +988,7 @@ Missing description."/> - + @@ -1059,13 +1059,13 @@ A textual value may be specified as the print name, or for non-coded messages, a - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.18

@@ -1195,7 +1195,7 @@ A textual value may be specified as the print name, or for non-coded messages, a - + @@ -1206,7 +1206,7 @@ A textual value may be specified as the print name, or for non-coded messages, a - + @@ -1261,13 +1261,13 @@ Description was copied from attribute and needs to be improved to be appropriate - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.6

@@ -1314,7 +1314,7 @@ Description was copied from attribute and needs to be improved to be appropriate One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who "owns" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances.
- In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g. that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements. + In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements.
Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as "speech-acts" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press]. @@ -1323,7 +1323,7 @@ Description was copied from attribute and needs to be improved to be appropriate An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category "sequel").
- Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g. surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information. + Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information.
@@ -1903,7 +1903,7 @@ Description was copied from attribute and needs to be improved to be appropriate The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act.
- The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g. living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public. + The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public.
Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed. @@ -1987,7 +1987,7 @@ Description was copied from attribute and needs to be improved to be appropriate - A patient accidentally is dispensed an incorrect medicine (e.g. clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive. + A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive.
@@ -2151,7 +2151,7 @@ Description was copied from attribute and needs to be improved to be appropriate - the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g. ingredient role); or + the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or
@@ -2168,11 +2168,11 @@ Description was copied from attribute and needs to be improved to be appropriate - The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g. active, aborted, completed) and not the clinical status of the exposure (e.g. probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation. + The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation.
- Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g. the first one, concerning a dosing error). + Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error).
@@ -2324,7 +2324,7 @@ Description was copied from attribute and needs to be improved to be appropriate The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology.
- An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g. blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g. the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations. + An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations.
Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. @@ -2408,7 +2408,7 @@ Description was copied from attribute and needs to be improved to be appropriate overlay ROI - A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g. to specify the location of a radiologic finding in an image or to specify the site of a physical finding by "circling" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present. + A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g., to specify the location of a radiologic finding in an image or to specify the site of a physical finding by "circling" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present.
@@ -2683,7 +2683,7 @@ Description was copied from attribute and needs to be improved to be appropriate
- Constraints: the Act or Acts that may cause the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id). + Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id).
@@ -2970,7 +2970,7 @@ Description was copied from attribute and needs to be improved to be appropriate correlated observation sequences - Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index; e.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads. + Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index. E.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads.
@@ -3127,7 +3127,7 @@ Description was copied from attribute and needs to be improved to be appropriate encounter - An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g. traffic accident), office visit, occupational therapy, telephone call. + An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g., traffic accident), office visit, occupational therapy, telephone call.
@@ -3195,7 +3195,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g. immunizations, methadone treatment, or cancer registries. + Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries.
@@ -3267,7 +3267,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g. where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide. + Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide.
@@ -3841,7 +3841,7 @@ Description was copied from attribute and needs to be improved to be appropriate - + @@ -3852,7 +3852,7 @@ Description was copied from attribute and needs to be improved to be appropriate - + @@ -3876,13 +3876,13 @@ Description was copied from attribute and needs to be improved to be appropriate One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who "owns" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances. - In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g. that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements. + In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements. Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as "speech-acts" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press]. An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category "sequel"). - Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g. surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information."/> + Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information."/> @@ -4169,7 +4169,7 @@ Description was copied from attribute and needs to be improved to be appropriate The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act. - The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g. living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public. + The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public. Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed."/> @@ -4214,7 +4214,7 @@ Description was copied from attribute and needs to be improved to be appropriate - A patient accidentally is dispensed an incorrect medicine (e.g. clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive. + A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive. @@ -4349,7 +4349,7 @@ Description was copied from attribute and needs to be improved to be appropriate - the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g. ingredient role); or + the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or @@ -4363,10 +4363,10 @@ Description was copied from attribute and needs to be improved to be appropriate - The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g. active, aborted, completed) and not the clinical status of the exposure (e.g. probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation. + The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation. - Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g. the first one, concerning a dosing error)."/> + Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error)."/> @@ -4441,7 +4441,7 @@ Description was copied from attribute and needs to be improved to be appropriate The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology. - An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g. blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g. the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations. + An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations. Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. @@ -4485,7 +4485,7 @@ Description was copied from attribute and needs to be improved to be appropriate - + @@ -4643,7 +4643,7 @@ Description was copied from attribute and needs to be improved to be appropriate Discussion: This class is commonly used for identifying 'business rule' or 'process' problems that may result in a refusal to carry out a particular request. In some circumstances it may be possible to 'bypass' a problem by modifying the request to acknowledge the issue and/or by providing some form of mitigation. - Constraints: the Act or Acts that may cause the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id)."/> + Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id)."/> @@ -4773,7 +4773,7 @@ Description was copied from attribute and needs to be improved to be appropriate - + @@ -4859,7 +4859,7 @@ Description was copied from attribute and needs to be improved to be appropriate - + @@ -4900,7 +4900,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g. immunizations, methadone treatment, or cancer registries."/> + Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries."/> @@ -4946,7 +4946,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g. where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide."/> + Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide."/> @@ -5262,13 +5262,13 @@ Description was copied from attribute and needs to be improved to be appropriate - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.4

@@ -5496,7 +5496,7 @@ Description was copied from attribute and needs to be improved to be appropriate location - Transaction counts and value totals by service location (e.g. clinic). + Transaction counts and value totals by service location (e.g clinic).
@@ -7755,7 +7755,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Definition: The type of consent directive, e.g. to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research. + Definition: The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research.
@@ -7944,7 +7944,7 @@ Description was copied from attribute and needs to be improved to be appropriate In Position - Used by one system to inform another that the container is in position for specimen transfer (e.g. container removal from track, pipetting, etc.). + Used by one system to inform another that the container is in position for specimen transfer (e.g., container removal from track, pipetting, etc.).
@@ -8014,7 +8014,7 @@ Description was copied from attribute and needs to be improved to be appropriate Container Unavailable - Used by one system to inform another that the container is no longer available within the scope of the system (e.g. tube broken or discarded). + Used by one system to inform another that the container is no longer available within the scope of the system (e.g., tube broken or discarded).
@@ -8032,10 +8032,10 @@ Description was copied from attribute and needs to be improved to be appropriate   - An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g. time skew) or the position of the body while measuring blood pressure. + An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g., time skew) or the position of the body while measuring blood pressure.
- Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g. it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure). + Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure).
@@ -8741,11 +8741,11 @@ Description was copied from attribute and needs to be improved to be appropriate - Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g. whether the covered parties are jointly or severably insured. + Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g., whether the covered parties are jointly or severably insured.
- Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g. an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType. + Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType.
@@ -8773,7 +8773,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g. exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g. only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g. co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g. under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement). + Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g., exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g., only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g., co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g., under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement).
@@ -8803,7 +8803,7 @@ Description was copied from attribute and needs to be improved to be appropriate disease specific policy - Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g. cancer, diabetes, or HIV-AIDS. + Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g., cancer, diabetes, or HIV-AIDS.
@@ -9386,7 +9386,7 @@ Description was copied from attribute and needs to be improved to be appropriate retiree health program - Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g. being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care. + Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g., being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care.
@@ -10022,7 +10022,7 @@ Description was copied from attribute and needs to be improved to be appropriate School Interaction - Description: Exposure participants' interaction occurred in an academic setting (e.g. participants are fellow students, or student and teacher). + Description: Exposure participants' interaction occurred in an academic setting (e.g., participants are fellow students, or student and teacher).
@@ -10474,7 +10474,7 @@ Description was copied from attribute and needs to be improved to be appropriate   - Concepts conveying the context in which consent to transfer specified patient health information for collection, access, use or disclosure applies. + Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information.
@@ -10488,8 +10488,7 @@ Description was copied from attribute and needs to be improved to be appropriate authorized information transfer - - Description: Information transfer in accordance with subjectaTMs consent directive. + Authorization to collect, access, use, or disclose specified patient health information in accordance with jurisdictional law, organizational policy, or a patient's consent directive, which may be implied, deemed, opt-in, opt-out, or explicit.
@@ -10497,13 +10496,13 @@ Description was copied from attribute and needs to be improved to be appropriate - 2 -   INFCON + 3 +     INFCON after explicit consent - Consent to collect, access, use, or disclose specified patient health information only after explicit consent. + Authorization to collect, access, use, or disclose specified patient health information as explicitly consented to by the subject of the information or the subject's representative.
@@ -10517,8 +10516,7 @@ Description was copied from attribute and needs to be improved to be appropriate only on court order - - Description: Information transfer in accordance with judicial system protocol. + Authorization to collect, access, use, or disclose specified patient health information in accordance with judicial system protocol, such as in the case of a subpoena or court order.
@@ -10532,7 +10530,7 @@ Description was copied from attribute and needs to be improved to be appropriate only if danger to others - Consent to collect, access, use, or disclose specified patient health information only if necessary to avert potential danger to other persons. + Authorization to collect, access, use, or disclose specified patient health information where deemed necessary to avert potential danger to other persons in accordance with jurisdictional law, organizational policy, or standards of practice. For example, disclosure about a person threatening violence.
@@ -10546,8 +10544,7 @@ Description was copied from attribute and needs to be improved to be appropriate only in an emergency - - Description: Information transfer in accordance with emergency information transfer protocol. + Authorization to collect, access, use, or disclose specified patient health information in accordance with emergency information transfer protocol dictated by jurisdictional law, organization policy, or standards of practice. For example, sharing of health information during disaster response.
@@ -10561,7 +10558,7 @@ Description was copied from attribute and needs to be improved to be appropriate only if public welfare risk - Consent to collect, access, use, or disclose specified patient health information only if necessary to avert potential public welfare risk. + Authorization to collect, access, use, or disclose specified patient health information necessary to avert potential public welfare risk in accordance with jurisdictional law, organizational policy, or standards of practice. For example, reporting that a person is a victim of abuse or demonstrating suicidal tendencies.
@@ -10575,8 +10572,7 @@ Description was copied from attribute and needs to be improved to be appropriate regulatory information transfer - - Description: Information transfer in accordance with regulatory protocol, e.g. for public health, welfare, and safety. + Authorization to collect, access, use, or disclose specified patient health information for public health, welfare, and safety purposes in accordance with jurisdictional law, organizational policy, or standards of practice. For example, public health reporting of notifiable conditions.
@@ -10670,7 +10666,7 @@ Description was copied from attribute and needs to be improved to be appropriate demographics category - Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc.). + Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc).
@@ -13824,7 +13820,7 @@ Description was copied from attribute and needs to be improved to be appropriate surgical prophylaxis - Description:Provision of medication during pre-operative phase; e.g. antibiotics before dental surgery or bowel prep before colon surgery. + Description:Provision of medication during pre-operative phase; e.g., antibiotics before dental surgery or bowel prep before colon surgery.
@@ -13839,7 +13835,7 @@ Description was copied from attribute and needs to be improved to be appropriate pregnancy prophylaxis - Description:Provision of medication for pregnancy --e.g. vitamins, antibiotic treatments for vaginal tract colonization, etc. + Description:Provision of medication for pregnancy --e.g., vitamins, antibiotic treatments for vaginal tract colonization, etc.
@@ -13872,7 +13868,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Verification of record - e.g. person has record in an immunization registry + Verification of record - e.g., person has record in an immunization registry
@@ -14042,7 +14038,7 @@ Description was copied from attribute and needs to be improved to be appropriate Emergency Supply - A supply action where there is no 'valid' order for the supplied medication; e.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription) + A supply action where there is no 'valid' order for the supplied medication. E.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription)
@@ -14403,7 +14399,7 @@ Description was copied from attribute and needs to be improved to be appropriate unit dose equivalent - A supply action that provides sufficient material for a single dose via multiple products; e.g. 2 50mg tablets for a 100mg unit dose. + A supply action that provides sufficient material for a single dose via multiple products. E.g. 2 50mg tablets for a 100mg unit dose.
@@ -14471,7 +14467,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Definition: Specifies the type of consent directive indicated by an ActClassPolicy e.g. a 3rd party authorization to disclose or consent for a substitute decision maker (SDM) or a notice of privacy policy. + Definition: Specifies the type of consent directive indicated by an ActClassPolicy e.g., a 3rd party authorization to disclose or consent for a substitute decision maker (SDM) or a notice of privacy policy.
@@ -14565,7 +14561,7 @@ Description was copied from attribute and needs to be improved to be appropriate   - A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g. a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g. collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations. + A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g., a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g., collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations.
@@ -15125,7 +15121,7 @@ Description was copied from attribute and needs to be improved to be appropriate patient default sensitivity - Policy for handling information reported by the patient about another person, e.g. a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g. family members may be deemed sensitive by default. The flag may be set or cleared on patient's request. + Policy for handling information reported by the patient about another person, e.g., a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g., family members may be deemed sensitive by default. The flag may be set or cleared on patient's request.
@@ -15737,7 +15733,7 @@ Description was copied from attribute and needs to be improved to be appropriate
- Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g. purpose of use, information type, user role, etc. + Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc.
@@ -16369,7 +16365,7 @@ Description was copied from attribute and needs to be improved to be appropriate - Description: A task or action that a user may perform in a clinical information system (e.g. medication order entry, laboratory test results review, problem list entry). + Description: A task or action that a user may perform in a clinical information system (e.g., medication order entry, laboratory test results review, problem list entry).
@@ -16611,7 +16607,7 @@ Description was copied from attribute and needs to be improved to be appropriate patient information review task - A person (e.g. clinician, the patient herself) reviews patient information in the electronic medical record. + A person (e.g., clinician, the patient herself) reviews patient information in the electronic medical record.
@@ -17243,7 +17239,7 @@ Description was copied from attribute and needs to be improved to be appropriate Available Volume - The available quantity of specimen. This is the current quantity minus any planned consumption (e.g. tests that are planned) + The available quantity of specimen. This is the current quantity minus any planned consumption (e.g., tests that are planned)
@@ -17751,7 +17747,7 @@ Description was copied from attribute and needs to be improved to be appropriate size - Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g. 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter. + Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g., 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter.
@@ -18222,7 +18218,7 @@ Description was copied from attribute and needs to be improved to be appropriate improvement notation Information on whether an increase or decrease in score is the preferred result -(e.g. a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range). +(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).
@@ -18237,7 +18233,7 @@ Description was copied from attribute and needs to be improved to be appropriate items counted - Describes the items counted by the measure (e.g. patients, encounters, procedures, etc.) + Describes the items counted by the measure (e.g., patients, encounters, procedures, etc.)
@@ -18307,7 +18303,7 @@ Description was copied from attribute and needs to be improved to be appropriate rate aggregation - Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g. pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). + Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two).
@@ -18382,7 +18378,7 @@ Description was copied from attribute and needs to be improved to be appropriate measure scoring Indicates how the calculation is performed for the eMeasure -(e.g. proportion, continuous variable, ratio) +(e.g., proportion, continuous variable, ratio)
@@ -18442,7 +18438,7 @@ Description was copied from attribute and needs to be improved to be appropriate measure type Indicates whether the eMeasure is used to examine a process or an outcome over time -(e.g. Structure, Process, Outcome). +(e.g., Structure, Process, Outcome).
@@ -18498,7 +18494,7 @@ Description was copied from attribute and needs to be improved to be appropriate stratification - Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g. evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g. evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units]). + Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g., evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g., evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units]).
@@ -18819,7 +18815,7 @@ Description was copied from attribute and needs to be improved to be appropriate measure population Criteria for specifying -the measure population as a narrative description (e.g. all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures. +the measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures.
@@ -18847,7 +18843,7 @@ the measure population as a narrative description (e.g. all patients seen in the numerator - Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g. a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period).
@@ -18861,7 +18857,7 @@ the measure population as a narrative description (e.g. all patients seen in the numerator exclusions - Criteria for specifying instances that should not be included in the numerator data. (e.g. if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures. + Criteria for specifying instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures.
@@ -20795,7 +20791,7 @@ the measure population as a narrative description (e.g. all patients seen in the Environmental Allergy - An allergy to a substance other than a drug or a food; e.g. Latex, pollen, etc. + An allergy to a substance other than a drug or a food. E.g. Latex, pollen, etc.
@@ -21428,7 +21424,7 @@ the measure population as a narrative description (e.g. all patients seen in the schonkost (GE) - A diet that avoids ingredients that might cause digestion problems, e.g. avoid excessive fat, avoid too much fiber (cabbage, peas, beans). + A diet that avoids ingredients that might cause digestion problems, e.g., avoid excessive fat, avoid too much fiber (cabbage, peas, beans).
@@ -21575,7 +21571,7 @@ the measure population as a narrative description (e.g. all patients seen in the
- Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g. privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199] + Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g., privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199]
@@ -22113,7 +22109,7 @@ the measure population as a narrative description (e.g. all patients seen in the
- + @@ -22124,7 +22120,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -22219,7 +22215,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - +
@@ -23144,7 +23140,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -23221,7 +23217,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -23251,16 +23247,16 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + - + Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure)."/> @@ -23561,10 +23557,10 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType."/> @@ -23578,7 +23574,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -23589,7 +23585,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -23836,7 +23832,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -24098,7 +24094,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -24279,48 +24275,48 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + - - - - - - - + + + + + + + - + - + - + - + - + @@ -24356,7 +24352,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -25657,13 +25653,13 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + - + @@ -25682,7 +25678,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - Verification of record - e.g. person has record in an immunization registry + Verification of record - e.g., person has record in an immunization registry @@ -25764,7 +25760,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -25908,7 +25904,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -25934,7 +25930,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - @@ -25979,7 +25975,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - @@ -26255,7 +26251,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - @@ -26541,7 +26537,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g. purpose of use, information type, user role, etc."/> + Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc."/> @@ -26814,7 +26810,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -26915,7 +26911,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -27195,7 +27191,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -27414,7 +27410,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - @@ -27616,13 +27612,13 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter +(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range)."/> - + @@ -27652,7 +27648,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - @@ -27686,7 +27682,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter +(e.g., proportion, continuous variable, ratio)"/> @@ -27713,7 +27709,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter +(e.g., Structure, Process, Outcome)."/> @@ -27737,7 +27733,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter - + @@ -27875,7 +27871,7 @@ The kind of Act (e.g. physical examination, serum potassium, inpatient encounter +the measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures."/> @@ -27887,13 +27883,13 @@ the measure population as a narrative description (e.g. all patients seen in the - + - + @@ -28701,7 +28697,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -28979,7 +28975,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -29051,7 +29047,7 @@ the measure population as a narrative description (e.g. all patients seen in the - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1114

@@ -29451,7 +29447,7 @@ the measure population as a narrative description (e.g. all patients seen in the
- + @@ -29462,7 +29458,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -29504,13 +29500,13 @@ the measure population as a narrative description (e.g. all patients seen in the - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1051

@@ -29608,7 +29604,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -29619,7 +29615,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -29661,13 +29657,13 @@ the measure population as a narrative description (e.g. all patients seen in the - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1001

@@ -30204,7 +30200,7 @@ the measure population as a narrative description (e.g. all patients seen in the
- UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc.) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen. + UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen.
@@ -30234,7 +30230,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -30245,7 +30241,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -30483,7 +30479,7 @@ the measure population as a narrative description (e.g. all patients seen in the Examples:Increased risk of DVT, at risk for sub-acute bacterial endocarditis. - UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc.) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen."/> + UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen."/> @@ -30503,20 +30499,20 @@ the measure population as a narrative description (e.g. all patients seen in the - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.7

Description

- A set of codes (e.g. for routine, emergency), specifying the urgency under which the Act happened, can happen, is happening, is intended to happen, or is requested/demanded to happen. + A set of codes (e.g., for routine, emergency), specifying the urgency under which the Act happened, can happen, is happening, is intended to happen, or is requested/demanded to happen.
@@ -30702,7 +30698,7 @@ the measure population as a narrative description (e.g. all patients seen in the stat - With highest priority (e.g. emergency). + With highest priority (e.g., emergency).
@@ -30716,7 +30712,7 @@ the measure population as a narrative description (e.g. all patients seen in the timing critical - It is critical to come as close as possible to the requested time (e.g. for a through antimicrobial level). + It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level).
@@ -30756,7 +30752,7 @@ the measure population as a narrative description (e.g. all patients seen in the

- + @@ -30767,8 +30763,8 @@ the measure population as a narrative description (e.g. all patients seen in the - - + + @@ -30845,13 +30841,13 @@ the measure population as a narrative description (e.g. all patients seen in the - +
- + @@ -30875,13 +30871,13 @@ the measure population as a narrative description (e.g. all patients seen in the - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.8

@@ -31824,7 +31820,7 @@ the measure population as a narrative description (e.g. all patients seen in the eligibility verification - To perform one or more operations on information used for conducting eligibility verification of coverage in a program or policy. May entail provider contacting coverage source (e.g. government health program such as workers compensation or health plan) for confirmation of enrollment, eligibility for specific services, and any applicable copays. + To perform one or more operations on information used for conducting eligibility verification of coverage in a program or policy. May entail provider contacting coverage source (e.g., government health program such as workers compensation or health plan) for confirmation of enrollment, eligibility for specific services, and any applicable copays.
@@ -32048,7 +32044,7 @@ the measure population as a narrative description (e.g. all patients seen in the population health - To perform one or more operations on information for provision of health care to a population of living subjects, e.g. needle exchange program. + To perform one or more operations on information for provision of health care to a population of living subjects, e.g., needle exchange program.
@@ -32589,7 +32585,7 @@ the measure population as a narrative description (e.g. all patients seen in the   - Indicates why a fulfiller refused to fulfill a supply order, and considered it important to notify other providers of their decision; e.g. "Suspect fraud", "Possible abuse", "Contraindicated". + Indicates why a fulfiller refused to fulfill a supply order, and considered it important to notify other providers of their decision. E.g. "Suspect fraud", "Possible abuse", "Contraindicated".
(used when capturing 'refusal to fill' annotations) @@ -35127,7 +35123,7 @@ the measure population as a narrative description (e.g. all patients seen in the
- + @@ -35138,7 +35134,7 @@ the measure population as a narrative description (e.g. all patients seen in the - + @@ -35544,7 +35540,7 @@ Example reasons that might qualify for being coded in this field might be: " - +
@@ -35641,7 +35637,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -35860,7 +35856,7 @@ Example reasons that might qualify for being coded in this field might be: " - @@ -36908,13 +36904,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.10

@@ -37015,7 +37011,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37026,7 +37022,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37074,13 +37070,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.12

@@ -37167,7 +37163,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37178,7 +37174,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37220,13 +37216,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.13

@@ -37313,7 +37309,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37324,7 +37320,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37366,13 +37362,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1099

@@ -37607,7 +37603,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37618,7 +37614,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -37722,13 +37718,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1002

@@ -37941,7 +37937,7 @@ Example reasons that might qualify for being coded in this field might be: " has contra-indication - A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g. relative, absolute) is left as an open issue. The priorityNumber attribute could be used. + A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g., relative, absolute) is left as an open issue. The priorityNumber attribute could be used.
@@ -38635,7 +38631,7 @@ Example reasons that might qualify for being coded in this field might be: " occurs during - A relationship in which the source act's effective time is wholly within the target act's effective time (including end-points, as defined in the act's effective times) + A relationship in which the source act's effective time is wholly within the target act's effective time (including end points, as defined in the act's effective times)
@@ -38880,7 +38876,7 @@ Example reasons that might qualify for being coded in this field might be: " ends during - A relationship in which the source act ends within the target act's effective time (including end-points, as defined in the act's effective times) + A relationship in which the source act ends within the target act's effective time (including end points, as defined in the act's effective times)
@@ -39000,7 +38996,7 @@ Example reasons that might qualify for being coded in this field might be: " starts during - A relationship in which the source act starts within the target act's effective time (including end-points, as defined in the act's effective times) + A relationship in which the source act starts within the target act's effective time (including end points, as defined in the act's effective times)
@@ -39429,7 +39425,7 @@ Example reasons that might qualify for being coded in this field might be: " is derived from - Associates a derived Act with its input parameters; e.g. an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts. + Associates a derived Act with its input parameters. E.G., an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts.
@@ -39629,7 +39625,7 @@ Example reasons that might qualify for being coded in this field might be: " has continuing objective - A desired state that a service action aims to maintain; e.g. keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood. + A desired state that a service action aims to maintain. E.g., keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood.
@@ -39912,7 +39908,7 @@ Example reasons that might qualify for being coded in this field might be: " has generalization - The generalization relationship can be used to express categorical knowledge about services (e.g. amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic). + The generalization relationship can be used to express categorical knowledge about services (e.g., amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic).
@@ -39926,7 +39922,7 @@ Example reasons that might qualify for being coded in this field might be: " evaluates (goal) - A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a "goal distance" (e.g. goal to observation) can be "calculated" and need not be sent explicitly. + A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a "goal distance" (e.g., goal to observation) can be "calculated" and need not be sent explicitly.
@@ -39978,7 +39974,7 @@ Example reasons that might qualify for being coded in this field might be: " matches (trigger) - A trigger-match links an actual service (e.g. an observation or procedure that took place) with a service in criterion mood. For example if the trigger is "observation of pain" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger. + A trigger-match links an actual service (e.g., an observation or procedure that took place) with a service in criterion mood. For example if the trigger is "observation of pain" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger.
@@ -40033,7 +40029,7 @@ Example reasons that might qualify for being coded in this field might be: " A relationship between a source Act that seeks to reverse or undo the action of the prior target Act.
- Example: A posted financial transaction (e.g. a debit transaction) was applied in error and must be reversed (e.g. by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction. + Example: A posted financial transaction (e.g., a debit transaction) was applied in error and must be reversed (e.g., by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction.
Constraints: the "completion track" mood of the target Act must be equally or more "actual" than the source act. I.e., when the target act is EVN the source act can be EVN, or any INT. If the target act is INT, the source act can be INT. @@ -40135,7 +40131,7 @@ Example reasons that might qualify for being coded in this field might be: " has support - Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g. to indicate a status post). + Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g., to indicate a status post).
@@ -40332,7 +40328,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -40343,7 +40339,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -40424,7 +40420,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -40731,7 +40727,7 @@ Example reasons that might qualify for being coded in this field might be: " - @@ -40851,7 +40847,7 @@ Example reasons that might qualify for being coded in this field might be: " - @@ -40890,7 +40886,7 @@ Example reasons that might qualify for being coded in this field might be: " - @@ -41085,7 +41081,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -41170,7 +41166,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -41296,13 +41292,13 @@ Example reasons that might qualify for being coded in this field might be: " - + - + @@ -41327,7 +41323,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -41353,7 +41349,7 @@ Example reasons that might qualify for being coded in this field might be: " @@ -41398,7 +41394,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -41520,13 +41516,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1052

@@ -42067,7 +42063,7 @@ Example reasons that might qualify for being coded in this field might be: "
- + @@ -42078,7 +42074,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -42420,13 +42416,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.14

@@ -42608,7 +42604,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -42619,7 +42615,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -42697,13 +42693,13 @@ Example reasons that might qualify for being coded in this field might be: " - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1053

@@ -42774,7 +42770,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -42785,7 +42781,7 @@ Example reasons that might qualify for being coded in this field might be: " - + @@ -42816,13 +42812,13 @@ Missing Description"/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1138

@@ -42867,7 +42863,7 @@ Missing Description"/>
- Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g. ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1. + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1.
@@ -43015,7 +43011,7 @@ Missing Description"/>
- + @@ -43026,7 +43022,7 @@ Missing Description"/> - + @@ -43042,7 +43038,7 @@ A jurisdictional mandate in the US relating to privacy."/> + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1."/> @@ -43129,13 +43125,13 @@ A jurisdictional mandate in the US relating to privacy."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.16

@@ -43148,7 +43144,7 @@ A jurisdictional mandate in the US relating to privacy."/> Description: Code that specifies whether an address part names the street, city, country, postal code, post box, etc.
- Discussion: The hierarchical nature of these concepts shows composition; e.g. "Street Name" is part of "Street Address Line" + Discussion: The hierarchical nature of these concepts shows composition. E.g. "Street Name" is part of "Street Address Line"
@@ -43180,7 +43176,7 @@ A jurisdictional mandate in the US relating to privacy."/> additional locator - This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g. "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g. Dutch "t.o." means "opposite to" for house boats located across the street facing houses). + This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses).
@@ -43392,7 +43388,7 @@ A jurisdictional mandate in the US relating to privacy."/> delivery installation qualifier - A number, letter or name identifying a delivery installation; e.g. for Station A, the delivery installation qualifier would be 'A'. + A number, letter or name identifying a delivery installation. E.g., for Station A, the delivery installation qualifier would be 'A'.
@@ -43406,7 +43402,7 @@ A jurisdictional mandate in the US relating to privacy."/> direction - Direction (e.g. N, S, W, E) + Direction (e.g., N, S, W, E)
@@ -43570,7 +43566,7 @@ A jurisdictional mandate in the US relating to privacy."/> unit designator - Indicates the type of specific unit contained within a building or complex; e.g. Appartment, Floor + Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor
@@ -43599,7 +43595,7 @@ A jurisdictional mandate in the US relating to privacy."/> - + @@ -43610,9 +43606,9 @@ A jurisdictional mandate in the US relating to privacy."/> - + +Code that specifies whether an address part names the street, city, country, postal code, post box, etc. Discussion: The hierarchical nature of these concepts shows composition. E.g. "Street Name" is part of "Street Address Line""/> @@ -43623,7 +43619,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -43713,13 +43709,13 @@ Code that specifies whether an address part names the street, city, country, pos - + - + @@ -43791,7 +43787,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -43809,13 +43805,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1119

@@ -44157,7 +44153,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -44168,7 +44164,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -44303,13 +44299,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1

@@ -44393,7 +44389,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -44404,7 +44400,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -44440,13 +44436,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1054

@@ -47162,7 +47158,7 @@ Code that specifies whether an address part names the street, city, country, pos
- + @@ -47173,7 +47169,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -48721,13 +48717,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1055

@@ -48772,7 +48768,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -48783,7 +48779,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -48807,13 +48803,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.9

@@ -49103,7 +49099,7 @@ Code that specifies whether an address part names the street, city, country, pos
- + @@ -49114,7 +49110,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49270,13 +49266,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1017

@@ -49321,7 +49317,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49332,7 +49328,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49356,13 +49352,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.21

@@ -49544,7 +49540,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49555,7 +49551,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49633,13 +49629,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1074

@@ -49811,7 +49807,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49822,7 +49818,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49897,13 +49893,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1056

@@ -49987,7 +49983,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -49998,7 +49994,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -50034,13 +50030,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1009

@@ -50155,7 +50151,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -50166,7 +50162,7 @@ Code that specifies whether an address part names the street, city, country, pos - + @@ -50220,13 +50216,13 @@ Code that specifies whether an address part names the street, city, country, pos - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.25

@@ -50360,11 +50356,11 @@ Code that specifies whether an address part names the street, city, country, pos restricted - Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g. for public health reporting or emergency treatment. + Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment.
- Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g. secret ingredients in a therapeutic substance; or the name of a manufacturer. + Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer.
@@ -50391,7 +50387,7 @@ Code that specifies whether an address part names the street, city, country, pos
- Examples: Includes publicly available information, e.g. business name, phone, email or physical address. + Examples: Includes publicly available information, e.g., business name, phone, email or physical address.
@@ -50731,7 +50727,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in
- + @@ -50742,7 +50738,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -50804,10 +50800,10 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - @@ -51009,13 +51005,13 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.26

@@ -51154,7 +51150,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in
- + @@ -51165,7 +51161,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -51225,13 +51221,13 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.27

@@ -51301,7 +51297,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -51312,7 +51308,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -51342,13 +51338,13 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1110

@@ -51421,7 +51417,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -51432,7 +51428,7 @@ Information for which the patient seeks heightened confidentiality. Sensitive in - + @@ -51463,13 +51459,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1057

@@ -51675,7 +51671,7 @@ Identifies the order in which content should be processed."/> - + @@ -51686,7 +51682,7 @@ Identifies the order in which content should be processed."/> - + @@ -51764,13 +51760,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1123

@@ -51814,7 +51810,7 @@ Identifies the order in which content should be processed."/> create - Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model.
@@ -51829,7 +51825,7 @@ Identifies the order in which content should be processed."/> delete - Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. + Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface.
@@ -51844,7 +51840,7 @@ Identifies the order in which content should be processed."/> execute - Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. + Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface.
@@ -51859,7 +51855,7 @@ Identifies the order in which content should be processed."/> read - Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. + Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface.
@@ -51874,7 +51870,7 @@ Identifies the order in which content should be processed."/> revise - Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. + Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface.
@@ -51889,7 +51885,7 @@ Identifies the order in which content should be processed."/> append - Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g. via a user interface. + Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface.
@@ -52096,7 +52092,7 @@ Identifies the order in which content should be processed."/>
- + @@ -52107,7 +52103,7 @@ Identifies the order in which content should be processed."/> - + @@ -52124,36 +52120,36 @@ Identifies the order in which content should be processed."/> - + - + - + - + - + - + @@ -52245,13 +52241,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.31

@@ -52349,7 +52345,7 @@ Identifies the order in which content should be processed."/> - + @@ -52360,7 +52356,7 @@ Identifies the order in which content should be processed."/> - + @@ -52402,13 +52398,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.33

@@ -52576,7 +52572,7 @@ Identifies the order in which content should be processed."/> - + @@ -52587,7 +52583,7 @@ Identifies the order in which content should be processed."/> - + @@ -52659,13 +52655,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.34

@@ -52758,7 +52754,7 @@ Identifies the order in which content should be processed."/>
- + @@ -52769,7 +52765,7 @@ Identifies the order in which content should be processed."/> - + @@ -52811,13 +52807,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1077

@@ -52985,7 +52981,7 @@ Identifies the order in which content should be processed."/> - + @@ -52996,7 +52992,7 @@ Identifies the order in which content should be processed."/> - + @@ -53068,13 +53064,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1059

@@ -53133,7 +53129,7 @@ Identifies the order in which content should be processed."/> - + @@ -53144,7 +53140,7 @@ Identifies the order in which content should be processed."/> - + @@ -53174,13 +53170,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.37

@@ -53238,7 +53234,7 @@ Identifies the order in which content should be processed."/> - + @@ -53249,7 +53245,7 @@ Identifies the order in which content should be processed."/> - + @@ -53285,13 +53281,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.40

@@ -53372,7 +53368,7 @@ Identifies the order in which content should be processed."/> - + @@ -53383,7 +53379,7 @@ Identifies the order in which content should be processed."/> - + @@ -53431,13 +53427,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.41

@@ -53599,7 +53595,7 @@ Identifies the order in which content should be processed."/> chemical substance - A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g. IUPAC codes. + A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g., IUPAC codes.
@@ -53743,7 +53739,7 @@ Identifies the order in which content should be processed."/> state - A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g. one of the United States of America or a French departement), counties or municipalities. Refine using, e.g. ISO country codes, FIPS-PUB state codes, etc. + A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g., one of the United States of America or a French departement), counties or municipalities. Refine using, e.g., ISO country codes, FIPS-PUB state codes, etc.
@@ -53856,7 +53852,7 @@ Identifies the order in which content should be processed."/> - + @@ -53867,7 +53863,7 @@ Identifies the order in which content should be processed."/> - + @@ -53931,7 +53927,7 @@ Identifies the order in which content should be processed."/> - + @@ -53994,7 +53990,7 @@ Identifies the order in which content should be processed."/> - + @@ -54050,13 +54046,13 @@ Identifies the order in which content should be processed."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1060

@@ -56128,7 +56124,7 @@ Identifies the order in which content should be processed."/>
- + @@ -56139,7 +56135,7 @@ Identifies the order in which content should be processed."/> - + @@ -57045,13 +57041,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.30

@@ -57172,7 +57168,7 @@ Missing description."/> - + @@ -57183,7 +57179,7 @@ Missing description."/> - + @@ -57237,13 +57233,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.42

@@ -57526,7 +57522,7 @@ Missing description."/> - + @@ -57537,7 +57533,7 @@ Missing description."/> - + @@ -57663,13 +57659,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.43

@@ -57780,7 +57776,7 @@ Missing description."/> initial - Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g. "Ph." could stand for "Philippe" or "Th." for "Thomas". + Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g., "Ph." could stand for "Philippe" or "Th." for "Thomas".
@@ -57794,7 +57790,7 @@ Missing description."/> Legal status - For organizations a suffix indicating the legal status, e.g. "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc.
@@ -58387,7 +58383,7 @@ Missing description."/> - + @@ -58398,7 +58394,7 @@ Missing description."/> - + @@ -58440,13 +58436,13 @@ Needs description"/> - + - + @@ -58747,13 +58743,13 @@ Needs description"/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1122

@@ -58864,7 +58860,7 @@ Needs description"/> initial - Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g. "Ph" could stand for "Philippe" or "Th" For "Thomas". + Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g., "Ph" could stand for "Philippe" or "Th" For "Thomas".
@@ -58879,7 +58875,7 @@ Needs description"/> legal status - Description:For organizations a suffix indicating the legal status, e.g. "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + Description:For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc.
@@ -59331,7 +59327,7 @@ Needs description"/> honorific - Description:A honorific such as "The Right Honorable" or "Weledelgeleerde Heer". + Description:A honorific such as "The Right Honourable" or "Weledelgeleerde Heer".
@@ -59376,7 +59372,7 @@ Needs description"/> - + @@ -59387,7 +59383,7 @@ Needs description"/> - + @@ -59430,13 +59426,13 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + - + @@ -59666,7 +59662,7 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + @@ -59691,13 +59687,13 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.44

@@ -59799,7 +59795,7 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + @@ -59810,7 +59806,7 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + @@ -59858,13 +59854,13 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1121

@@ -59971,7 +59967,7 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + @@ -59982,7 +59978,7 @@ The qualifier is a set of codes each of which specifies a certain subcategory of - + @@ -60028,13 +60024,13 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.45

@@ -60096,7 +60092,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et Ideographic - Ideographic representation of name (e.g. Japanese kanji, Chinese characters) + Ideographic representation of name (e.g., Japanese kanji, Chinese characters)
@@ -60110,7 +60106,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et Syllabic - Syllabic transcription of name (e.g. Japanese kana, Korean hangul) + Syllabic transcription of name (e.g., Japanese kana, Korean hangul)
@@ -60209,7 +60205,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et Artist/Stage - Includes writer's pseudonym, stage name, etc. + Includes writer's pseudonym, stage name, etc
@@ -60284,7 +60280,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + @@ -60295,7 +60291,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + @@ -60318,13 +60314,13 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + - + @@ -60366,7 +60362,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + @@ -60405,13 +60401,13 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1120

@@ -60503,7 +60499,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et Indigenous/Tribal - Description:e.g. . Chief Red Cloud + Description:e.g . Chief Red Cloud
@@ -60533,7 +60529,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et religious - Description:A name assumed as part of a religious vocation . e.g. . Sister Mary Francis, Brother John + Description:A name assumed as part of a religious vocation . e.g . Sister Mary Francis, Brother John
@@ -60582,7 +60578,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g. . use of Ideographic for formal communications.) + Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g . use of Ideographic for formal communications.)
@@ -60612,7 +60608,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et ideographic - Description:Ideographic representation of name (e.g. Japanese kanji, Chinese characters) + Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)
@@ -60627,7 +60623,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et syllabic - Description:Syllabic transcription of name (e.g. Japanese kana, Korean hangul) + Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)
@@ -60732,7 +60728,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + @@ -60743,7 +60739,7 @@ Indicates whether the name part is a given name, family name, prefix, suffix, et - + @@ -60773,7 +60769,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -60785,7 +60781,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -60804,7 +60800,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -60815,13 +60811,13 @@ A set of codes advising a system or user which name in a set of names to select - + - + @@ -60870,13 +60866,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.46

@@ -61027,7 +61023,7 @@ A set of codes advising a system or user which name in a set of names to select injury hazard - Material is solid and sharp (e.g. cannulas). Dispose in hard container. + Material is solid and sharp (e.g., cannulas). Dispose in hard container.
@@ -61067,7 +61063,7 @@ A set of codes advising a system or user which name in a set of names to select
- + @@ -61078,7 +61074,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -61138,7 +61134,7 @@ A set of codes advising a system or user which name in a set of names to select - +
@@ -61162,13 +61158,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1061

@@ -61284,7 +61280,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -61295,7 +61291,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -61346,13 +61342,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.49

@@ -61439,7 +61435,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -61450,7 +61446,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -61492,13 +61488,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.50

@@ -61927,7 +61923,7 @@ A set of codes advising a system or user which name in a set of names to select
- + @@ -61938,7 +61934,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -62214,13 +62210,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1113

@@ -62335,7 +62331,7 @@ A set of codes advising a system or user which name in a set of names to select
- + @@ -62346,7 +62342,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -62394,13 +62390,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.51

@@ -62459,7 +62455,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -62470,7 +62466,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -62500,13 +62496,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1022

@@ -63002,7 +62998,7 @@ A set of codes advising a system or user which name in a set of names to select
- + @@ -63013,7 +63009,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -63229,13 +63225,13 @@ A set of codes advising a system or user which name in a set of names to select - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1124

@@ -63991,7 +63987,7 @@ A set of codes advising a system or user which name in a set of names to select - + @@ -64002,7 +63998,7 @@ A set of codes advising a system or user which name in a set of names to select - + - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.57

@@ -64608,7 +64604,7 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + @@ -64619,7 +64615,7 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + @@ -64757,13 +64753,13 @@ In spite of the inability of tooling to process codes longer than 2 characters, - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1125

@@ -64891,7 +64887,7 @@ In spite of the inability of tooling to process codes longer than 2 characters,
- + @@ -64902,7 +64898,7 @@ In spite of the inability of tooling to process codes longer than 2 characters, - + @@ -64957,13 +64953,13 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.58

@@ -65215,7 +65211,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65226,7 +65222,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65334,13 +65330,13 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1117

@@ -65397,7 +65393,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> Unverified by system - Description: The identifier was provided to the system that constructed the instance, but has not been verified; e.g. a Drivers license entered manually into a system by a user. + Description: The identifier was provided to the system that constructed the instance, but has not been verified. e.g. a Drivers license entered manually into a system by a user.
@@ -65427,7 +65423,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65438,7 +65434,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65456,7 +65452,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65474,13 +65470,13 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1116

@@ -65595,7 +65591,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65606,7 +65602,7 @@ Identifies allowed codes for HL7aTMs v3 conformance property."/> - + @@ -65658,13 +65654,13 @@ Codes to specify the scope in which the identifier applies to the object with wh - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1010

@@ -65723,7 +65719,7 @@ Codes to specify the scope in which the identifier applies to the object with wh - + @@ -65734,7 +65730,7 @@ Codes to specify the scope in which the identifier applies to the object with wh - + @@ -65764,13 +65760,13 @@ Codes to specify the scope in which the identifier applies to the object with wh - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.60

@@ -65874,7 +65870,7 @@ Codes to specify the scope in which the identifier applies to the object with wh - + @@ -65885,7 +65881,7 @@ Codes to specify the scope in which the identifier applies to the object with wh - + @@ -65941,13 +65937,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.61

@@ -66033,7 +66029,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66044,7 +66040,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66088,13 +66084,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.63

@@ -66303,7 +66299,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- + @@ -66314,7 +66310,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66404,13 +66400,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.65

@@ -66470,7 +66466,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66481,7 +66477,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66511,13 +66507,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.66

@@ -66561,7 +66557,7 @@ Description copied from Concept Domain of same name. Must be verified."/> Remote - An equipment can be controlled by another system, e.g. LAS computer ('Remote' control state). + An equipment can be controlled by another system, e.g., LAS computer ('Remote' control state).
@@ -66576,7 +66572,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66587,7 +66583,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66605,7 +66601,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66617,13 +66613,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1062

@@ -66749,7 +66745,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66760,7 +66756,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66814,13 +66810,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.67

@@ -66904,7 +66900,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66915,7 +66911,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -66951,13 +66947,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.2

@@ -67133,7 +67129,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- + @@ -67144,7 +67140,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -67223,13 +67219,13 @@ The specific meanings of these codes can vary somewhat by jurisdiction and imple - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1083

@@ -67312,7 +67308,7 @@ The specific meanings of these codes can vary somewhat by jurisdiction and imple
- + @@ -67323,7 +67319,7 @@ The specific meanings of these codes can vary somewhat by jurisdiction and imple - + @@ -67360,13 +67356,13 @@ Description does not make sense relative to name of coding system. Must be revi - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.81

@@ -67425,7 +67421,7 @@ Description does not make sense relative to name of coding system. Must be revi - + @@ -67436,7 +67432,7 @@ Description does not make sense relative to name of coding system. Must be revi - + @@ -67466,13 +67462,13 @@ Description does not make sense relative to name of coding system. Must be revi - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1008

@@ -67559,7 +67555,7 @@ Description does not make sense relative to name of coding system. Must be revi other - Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g. concept not provided by required code system). + Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g., concept not provided by required code system).
@@ -67651,7 +67647,7 @@ Description does not make sense relative to name of coding system. Must be revi not applicable - Known to have no proper value (e.g. last menstrual period for a male). + Known to have no proper value (e.g., last menstrual period for a male).
@@ -67688,7 +67684,7 @@ Description does not make sense relative to name of coding system. Must be revi asked but unknown - Information was sought but not found (e.g. patient was asked but didn't know) + Information was sought but not found (e.g., patient was asked but didn't know)
@@ -67716,13 +67712,36 @@ Description does not make sense relative to name of coding system. Must be revi not asked - This information has not been sought (e.g. patient was not asked) + This information has not been sought (e.g., patient was not asked)
+ + 3 +     NAVU + + + Not available + + Information is not available at this time (with no expectation regarding whether it will or will not be available in the future). +
+ + + + + + + 4 +        + NAV + + + + + 3     QS @@ -67731,7 +67750,7 @@ Description does not make sense relative to name of coding system. Must be revi Sufficient Quantity - Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material; e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water. + Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water.
@@ -67777,7 +67796,7 @@ Description does not make sense relative to name of coding system. Must be revi - + @@ -67788,7 +67807,7 @@ Description does not make sense relative to name of coding system. Must be revi - + @@ -67816,7 +67835,7 @@ Description does not make sense relative to name of coding system. Must be revi - - + @@ -67880,7 +67899,7 @@ Description does not make sense relative to name of coding system. Must be revi - + @@ -67892,13 +67911,22 @@ Description does not make sense relative to name of coding system. Must be revi - + + + + + + + + + + - + @@ -67927,13 +67955,13 @@ Description does not make sense relative to name of coding system. Must be revi - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.83

@@ -68352,6 +68380,29 @@ Description does not make sense relative to name of coding system. Must be revi + + 4 +       HU + + + Significantly high + + A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician. +
+ + + + + + + 5 +          + HH + + + + + 3     L @@ -68401,6 +68452,29 @@ Description does not make sense relative to name of coding system. Must be revi + + 4 +       LU + + + Significantly low + + A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician. +
+ + + + + + + 5 +          + LL + + + + + 2   N @@ -68465,7 +68539,7 @@ Projects: ISO 20776-1, ISO 20776-2 [Note 3: This class also indicates a "buffer zone," to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.]
- [Note 4: These breakpoints can be altered due to changes in circumstances (e.g. changes in commonly used drug dosages, emergence of new resistance mechanisms).] + [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]
@@ -68533,7 +68607,7 @@ Projects: ISO 20776-1, ISO 20776-2 [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.]
- [Note 2: This breakpoint can be altered due to changes in circumstances (e.g. changes in commonly used drug dosages, emergence of new resistance mechanisms).] + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]
@@ -68547,7 +68621,7 @@ Projects: ISO 20776-1, ISO 20776-2 Synergy - resistant - A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g. high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. + A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective.
@@ -68577,7 +68651,7 @@ Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2 [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.]
- [Note 2: This breakpoint can be altered due to changes in circumstances (e.g. changes in commonly used drug dosages, emergence of new resistance mechanisms).] + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]
@@ -68608,7 +68682,7 @@ Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2 Synergy - susceptible - A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g. high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. + A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective.
@@ -68658,7 +68732,7 @@ Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2
Example: A positive result on a Hepatitis screening test. - Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g. A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.
@@ -68679,7 +68753,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi
Example: A positive result on a Hepatitis screening test. - Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g. A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.
@@ -68697,7 +68771,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi
Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3 - Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g. A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.
@@ -68729,7 +68803,25 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi Indeterminate - The specified component / analyte, organism or clinical sign could neither be declared positive / negative or detected / not detected by the performed test or procedure. + The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure. +
+ + + Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic structures, then "indeterminate" (i.e. "cannot be determined") is the appropriate response, not "equivocal". +
+ + + + + + + 3 +     E + + + Equivocal + + The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria.
@@ -68820,7 +68912,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi Expected - This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Expected" (e.g. presence of drugs in a patient that is taking prescription medication for pain management). + This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Expected" (e.g., presence of drugs in a patient that is taking prescription medication for pain management).
@@ -68834,7 +68926,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi Unexpected - This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Unexpected" (e.g. presence of non-prescribed drugs in a patient that is taking prescription medication for pain management). + This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Unexpected" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management).
@@ -68909,7 +69001,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + @@ -68920,7 +69012,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + @@ -69097,6 +69189,15 @@ Description copied from Concept Domain of same name. Must be verified. Note al [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead."/> + + + + + + + + + @@ -69122,6 +69223,15 @@ Description copied from Concept Domain of same name. Must be verified. Note al [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead."/> + + + + + + + + + @@ -69154,7 +69264,7 @@ Projects: ISO 20776-1, ISO 20776-2 [Note 3: This class also indicates a "buffer zone," to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.] - [Note 4: These breakpoints can be altered due to changes in circumstances (e.g. changes in commonly used drug dosages, emergence of new resistance mechanisms).]"/> + [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"/> @@ -69192,12 +69302,12 @@ Projects: ISO 20776-1, ISO 20776-2 [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.] - [Note 2: This breakpoint can be altered due to changes in circumstances (e.g. changes in commonly used drug dosages, emergence of new resistance mechanisms).]"/> + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"/> - + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"/> @@ -69229,7 +69339,7 @@ Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2 - @@ -69272,7 +69382,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi Example: A positive result on a Hepatitis screening test. - Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g. A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."/> + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."/> @@ -69281,7 +69391,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."/> @@ -69293,7 +69403,16 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + + + + + + + @@ -69331,13 +69450,13 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + - + @@ -69374,13 +69493,13 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.84

@@ -73685,7 +73804,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + @@ -73696,7 +73815,7 @@ Members of the OO WG have recently attempted to contact members of RCRIM regardi - + @@ -75559,13 +75678,13 @@ Description copied from Concept Domain of same name. Must be verified. Note th - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1063

@@ -75612,7 +75731,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th   - Codes specify the category of observation, evidence, or document used to assess for services, e.g. discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values. + Codes specify the category of observation, evidence, or document used to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values.
@@ -75630,7 +75749,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th   - Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g. pay stub; tax or income document; asset document; living expenses. + Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay stub; tax or income document; asset document; living expenses.
@@ -75672,7 +75791,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th real property - Indicator of real property ownership, e.g. deed or real estate contract. + Indicator of real property ownership, e.g., deed or real estate contract.
@@ -75714,7 +75833,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th income - Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g. pay or pension check, child support payments received or provided, and taxes paid. + Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay or pension check, child support payments received or provided, and taxes paid.
@@ -75756,7 +75875,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th investment income - Indicator of investment income, e.g. dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check. + Indicator of investment income, e.g., dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check.
@@ -75770,7 +75889,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th paid employment - Indicator of paid employment, e.g. letter of hire, contract, employer letter; copy of pay check or pay stub. + Indicator of paid employment, e.g., letter of hire, contract, employer letter; copy of pay check or pay stub.
@@ -75784,7 +75903,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th retirement pay - Indicator of retirement payment, e.g. pension check. + Indicator of retirement payment, e.g., pension check.
@@ -75798,7 +75917,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th spousal or partner support - Indicator of spousal or partner support payments received or provided; e.g. alimony payment; support stipulations in a divorce settlement. + Indicator of spousal or partner support payments received or provided; e.g., alimony payment; support stipulations in a divorce settlement.
@@ -75812,7 +75931,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th income supplement - Indicator of income supplement, e.g. gifting, parental income support; stipend, or grant. + Indicator of income supplement, e.g., gifting, parental income support; stipend, or grant.
@@ -75826,7 +75945,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th tax obligation - Indicator of tax obligation or payment, e.g. statement of taxable income. + Indicator of tax obligation or payment, e.g., statement of taxable income.
@@ -75896,7 +76015,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th household expense - Indicator of housing expense, e.g. household appliances, fixtures, furnishings, and maintenance and repairs. + Indicator of housing expense, e.g., household appliances, fixtures, furnishings, and maintenance and repairs.
@@ -75966,7 +76085,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th transportation expense - Indicator of transportation expenses, e.g. vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs. + Indicator of transportation expenses, e.g., vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs.
@@ -75994,7 +76113,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th eligibility indicator - Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g. certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate. + Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g., certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate.
@@ -76078,7 +76197,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th program or policy member - Indicator of status as covered member under a policy or program, e.g. member id card or coverage document. + Indicator of status as covered member under a policy or program, e.g., member id card or coverage document.
@@ -76148,7 +76267,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th health status - Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g. pregnancy, disability, drug use, mental health issues. + Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g., pregnancy, disability, drug use, mental health issues.
@@ -76400,7 +76519,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th socio economic status - Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g. discharge planning, or to establish eligibility for coverage under a policy or program. + Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program.
@@ -76516,7 +76635,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th   - Indicates the result of a particular allergy test; e.g. Negative, Mild, Moderate, Severe + Indicates the result of a particular allergy test. E.g. Negative, Mild, Moderate, Severe
@@ -76610,7 +76729,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th - Description:Coded observation values for coverage limitations, for e.g. types of claims or types of parties covered under a policy or program. + Description:Coded observation values for coverage limitations, for e.g., types of claims or types of parties covered under a policy or program.
@@ -76644,7 +76763,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th adult child - Description:Child over an age as specified by coverage policy or program, e.g. student, differently abled, and income dependent. + Description:Child over an age as specified by coverage policy or program, e.g., student, differently abled, and income dependent.
@@ -76749,7 +76868,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th same sex partner - Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g. Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades + Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g., Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades
@@ -76781,7 +76900,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th high criticality - Worst case result of a future exposure is assessed to be life-threatening. + Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure.
@@ -76795,7 +76914,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th low criticality - Worst case result of a future exposure is not assessed to be life-threatening. + Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure.
@@ -76875,7 +76994,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th cohort measure scoring - A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g. Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration). + A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g., Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration).
@@ -76889,7 +77008,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th continuous variable measure scoring - A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g. mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics). + A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g., mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics).
@@ -76903,7 +77022,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th proportion measure scoring - A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g. percentage of eligible women with a mammogram performed in the last year). + A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g., percentage of eligible women with a mammogram performed in the last year).
@@ -76917,7 +77036,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th ratio measure scoring - A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g. the number of patients with central lines who develop infection divided by the number of central line days). + A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g., the number of patients with central lines who develop infection divided by the number of central line days).
@@ -77158,7 +77277,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th measure population Measure population is used only in continuous variable eMeasures. It is a narrative description of the eMeasure population. -(e.g. all patients seen in the Emergency Department during the measurement period). +(e.g., all patients seen in the Emergency Department during the measurement period).
@@ -77175,7 +77294,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th numerator - Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g. a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period).
@@ -77192,7 +77311,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th numerator exclusions - Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g. if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.) + Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.)
@@ -77361,7 +77480,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th abstracted - Security metadata observation values used to indicate the use of a more abstract version of the content, e.g. replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN. + Security metadata observation values used to indicate the use of a more abstract version of the content, e.g., replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN.
@@ -77375,7 +77494,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th aggregated - Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g. average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary. + Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g., average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary.
@@ -77449,7 +77568,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th
- Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization + Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization
@@ -77612,7 +77731,7 @@ Description copied from Concept Domain of same name. Must be verified. Note th
- Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g. by the recipient. + Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient.
@@ -79136,7 +79255,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part   - Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.); e.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc. + Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.). E.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc.
@@ -79148,7 +79267,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part
- + @@ -79159,7 +79278,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part - + @@ -79172,12 +79291,12 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + - + @@ -79193,7 +79312,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79212,7 +79331,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79229,37 +79348,37 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + - + - + - + - + - + @@ -79289,7 +79408,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79319,7 +79438,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79333,7 +79452,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79368,7 +79487,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79399,7 +79518,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79507,7 +79626,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79556,7 +79675,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79592,7 +79711,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79602,7 +79721,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79644,7 +79763,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79657,13 +79776,13 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + - + @@ -79693,25 +79812,25 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + - + - + - + @@ -79828,7 +79947,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> +(e.g., all patients seen in the Emergency Department during the measurement period)."/> @@ -79837,7 +79956,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79846,7 +79965,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + @@ -79913,13 +80032,13 @@ Description copied from Concept Domain of same name. Must be corrected.."/> - + - + @@ -79956,7 +80075,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> + Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization"/> @@ -80040,7 +80159,7 @@ Description copied from Concept Domain of same name. Must be corrected.."/> + Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient."/> @@ -80695,7 +80814,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part - +
@@ -80707,13 +80826,13 @@ Long-term shared authentication secrets, if used, are never revealed to any part - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.85

@@ -81986,7 +82105,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part Patch - A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g. the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied. + A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g., the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied.
@@ -82485,7 +82604,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part
- + @@ -82496,7 +82615,7 @@ Long-term shared authentication secrets, if used, are never revealed to any part - + @@ -83209,7 +83328,7 @@ Missing description."/> - + @@ -83496,13 +83615,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.88

@@ -83894,7 +84013,7 @@ Missing description."/> utilization management - Definition: Managing utilization of services by ensuring that providers adhere to, e.g. payeraTMs clinical protocols for medical appropriateness and standards of medical necessity. May include management of authorizations for services and referrals. + Definition: Managing utilization of services by ensuring that providers adhere to, e.g., payeraTMs clinical protocols for medical appropriateness and standards of medical necessity. May include management of authorizations for services and referrals.
@@ -83977,7 +84096,7 @@ Missing description."/> payor contracting - Definition: Contracting for the provision and administration of health services to payors while retaining the risk for coverage. Contracting may be for all provision and administration; or for provision of certain types of services; for provision of services by region; and by types of administration, e.g. claims adjudication, enrollment, provider management, and utilization management. Typically done by underwriters for sponsors who need coverage provided to covered parties in multiple regions. The underwriter may act as the payor in some, but not all of the regions in which coverage is provided. + Definition: Contracting for the provision and administration of health services to payors while retaining the risk for coverage. Contracting may be for all provision and administration; or for provision of certain types of services; for provision of services by region; and by types of administration, e.g., claims adjudication, enrollment, provider management, and utilization management. Typically done by underwriters for sponsors who need coverage provided to covered parties in multiple regions. The underwriter may act as the payor in some, but not all of the regions in which coverage is provided.
@@ -84022,7 +84141,7 @@ Missing description."/> subcontracting risk - Definition: Delegating risk for a policy or program to one or more subcontracting underwriters, e.g. a major health insurer may delegate risk for provision of coverage under a national health plan to other underwriters by region . + Definition: Delegating risk for a policy or program to one or more subcontracting underwriters, e.g., a major health insurer may delegate risk for provision of coverage under a national health plan to other underwriters by region .
@@ -84153,7 +84272,7 @@ Missing description."/> first assistant surgeon - In a typical surgery setting the assistant facing the primary surgeon. The first assistant performs parts of the operation and assists in others (e.g. incision, approach, electrocoutering, ligatures, sutures). + In a typical surgery setting the assistant facing the primary surgeon. The first assistant performs parts of the operation and assists in others (e.g., incision, approach, electrocoutering, ligatures, sutures).
@@ -84181,7 +84300,7 @@ Missing description."/> nurse assistant - In a typical surgery setting the non-sterile nurse handles material supply from the stock, forwards specimen to pathology, and helps with other non-sterile tasks (e.g. phone calls, etc.). + In a typical surgery setting the non-sterile nurse handles material supply from the stock, forwards specimen to pathology, and helps with other non-sterile tasks (e.g., phone calls, etc.).
@@ -84227,7 +84346,7 @@ Missing description."/>
- UsageConstraint: UsageConstraint: Specifies the exact function that an actor is authorized to have as a verifier of an Act. Connotes that a specialized verifier asserts compliance for veracity of the review per jurisdictional or organizational policy; e.g. The Provider who takes responsibility for authenticity of a record submitted to a payer. + UsageConstraint: UsageConstraint: Specifies the exact function that an actor is authorized to have as a verifier of an Act. Connotes that a specialized verifier asserts compliance for veracity of the review per jurisdictional or organizational policy. E.g., The Provider who takes responsibility for authenticity of a record submitted to a payer.
REVIEW ParticipationFunction should be used with VFR (verifier) @@ -84286,7 +84405,7 @@ Missing description."/> third assistant - In a typical surgery setting there is rarely a third assistant (e.g. in some Hip operations the third assistant postures the affected leg). + In a typical surgery setting there is rarely a third assistant (e.g., in some Hip operations the third assistant postures the affected leg).
@@ -84301,7 +84420,7 @@ Missing description."/> - + @@ -84312,7 +84431,7 @@ Missing description."/> - + @@ -84454,7 +84573,7 @@ Missing description."/> - + @@ -84484,7 +84603,7 @@ Missing description."/> - + @@ -84502,7 +84621,7 @@ Missing description."/> - + @@ -84563,7 +84682,7 @@ Missing description."/> - + @@ -84575,7 +84694,7 @@ Missing description."/> - + @@ -84596,7 +84715,7 @@ Missing description."/> @@ -84622,7 +84741,7 @@ Missing description."/> - + @@ -84634,13 +84753,13 @@ Missing description."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1064

@@ -84899,7 +85018,7 @@ Missing description."/>
- + @@ -84910,7 +85029,7 @@ Missing description."/> - + - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.89

@@ -85115,7 +85234,7 @@ There needs to be a reexamination of the hierarchies as there seems to be some m - + @@ -85126,7 +85245,7 @@ There needs to be a reexamination of the hierarchies as there seems to be some m - + @@ -85163,13 +85282,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.90

@@ -85333,7 +85452,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig   - Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g. consultant), information that the Act itself seeks to reveal (e.g. informant of clinical history), or information about what Act was performed (e.g. informant witness). + Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g., consultant), information that the Act itself seeks to reveal (e.g., informant of clinical history), or information about what Act was performed (e.g., informant witness).
@@ -85384,7 +85503,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig informant - A source of reported information (e.g. a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject. + A source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject.
@@ -85440,7 +85559,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig custodian - An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g. who maintains the report or the master service catalog item, etc.). + An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g., who maintains the report or the master service catalog item, etc.).
@@ -85476,7 +85595,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig
- UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured; e.g. for "plasma porcelain" the scoper could be "Plasma". + UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for "plasma porcelain" the scoper could be "Plasma".
@@ -85535,7 +85654,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig therapeutic agent - Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g. heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service. + Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g., heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service.
@@ -85567,7 +85686,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig non-reuseable device - A device that changes ownership due to the service, e.g. a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service. + A device that changes ownership due to the service, e.g., a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service.
@@ -85669,7 +85788,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig product - Participant material that is brought forth (produced) in the act (e.g. specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g. in supply services the product is taken from a stock). + Participant material that is brought forth (produced) in the act (e.g., specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g., in supply services the product is taken from a stock).
@@ -85855,7 +85974,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig ugent notification contact - An information recipient to notify for urgent matters about this Act. (e.g. in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill). + An information recipient to notify for urgent matters about this Act. (e.g., in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill).
@@ -85869,7 +85988,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig primary information recipient - Information recipient to whom an act statement is primarily directed; e.g. a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary. + Information recipient to whom an act statement is primarily directed. E.g., a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary.
@@ -85914,7 +86033,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig tracker - A secondary information recipient, who receives copies (e.g. a primary care provider receiving copies of results as ordered by specialist). + A secondary information recipient, who receives copies (e.g., a primary care provider receiving copies of results as ordered by specialist).
@@ -85928,7 +86047,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig location - The facility where the service is done. May be a static building (or room therein) or a moving location (e.g. ambulance, helicopter, aircraft, train, truck, ship, etc.) + The facility where the service is done. May be a static building (or room therein) or a moving location (e.g., ambulance, helicopter, aircraft, train, truck, ship, etc.)
@@ -85942,7 +86061,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig destination - The destination for services. May be a static building (or room therein) or a movable facility (e.g. ship). + The destination for services. May be a static building (or room therein) or a movable facility (e.g., ship).
@@ -85970,7 +86089,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig origin - The location of origin for services. May be a static building (or room therein) or a movable facility (e.g. ship). + The location of origin for services. May be a static building (or room therein) or a movable facility (e.g., ship).
@@ -85984,7 +86103,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig remote - Some services take place at multiple concurrent locations (e.g. telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered "remote." + Some services take place at multiple concurrent locations (e.g., telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered "remote."
@@ -86138,7 +86257,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86149,7 +86268,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86214,7 +86333,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86242,7 +86361,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86267,7 +86386,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86284,7 +86403,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig Examples: A "plasma porcelain substance concentration" has analyte a Role with player substance Entity "porcelain". - UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured; e.g. for "plasma porcelain" the scoper could be "Plasma"."/> + UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for "plasma porcelain" the scoper could be "Plasma"."/> @@ -86310,7 +86429,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86325,7 +86444,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86368,7 +86487,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86453,13 +86572,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + - + @@ -86479,19 +86598,19 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + - + - + @@ -86503,13 +86622,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + - + @@ -86586,13 +86705,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1075

@@ -86760,7 +86879,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86771,7 +86890,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86843,13 +86962,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.91

@@ -86950,7 +87069,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -86961,7 +87080,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87003,13 +87122,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.93

@@ -87181,7 +87300,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig
- + @@ -87192,7 +87311,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87270,13 +87389,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1020

@@ -87306,7 +87425,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig beta - The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g. occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1)). + The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g., occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1)).
@@ -87433,7 +87552,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87444,7 +87563,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87456,7 +87575,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87516,13 +87635,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.100

@@ -87606,7 +87725,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87617,7 +87736,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87653,13 +87772,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.101

@@ -87746,7 +87865,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87757,7 +87876,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -87799,13 +87918,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1096

@@ -88090,7 +88209,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig
- + @@ -88101,7 +88220,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -88215,13 +88334,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.102

@@ -88280,7 +88399,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -88291,7 +88410,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -88321,13 +88440,13 @@ A surgical Procedure act object (representing a procedure report) requires a sig - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1112

@@ -88399,7 +88518,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig
- + @@ -88410,7 +88529,7 @@ A surgical Procedure act object (representing a procedure report) requires a sig - + @@ -88441,13 +88560,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1067

@@ -88545,7 +88664,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -88556,7 +88675,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -88598,13 +88717,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.103

@@ -88716,7 +88835,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -88727,7 +88846,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -88775,13 +88894,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.104

@@ -97117,7 +97236,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q
- + @@ -97128,7 +97247,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -102672,13 +102791,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.105

@@ -102821,7 +102940,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -102832,7 +102951,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -102898,13 +103017,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.106

@@ -102977,7 +103096,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -102988,7 +103107,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -103024,13 +103143,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1076

@@ -103805,7 +103924,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q
- + @@ -103816,7 +103935,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -104326,13 +104445,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.108

@@ -104472,7 +104591,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -104483,7 +104602,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -104543,13 +104662,13 @@ Defines the units associated with the magnitude of the maximum size limit of a q - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.109

@@ -104637,7 +104756,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -104648,7 +104767,7 @@ Defines the units associated with the magnitude of the maximum size limit of a q - + @@ -104685,13 +104804,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1126

@@ -104775,7 +104894,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -104786,7 +104905,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -104822,13 +104941,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.110

@@ -104963,7 +105082,7 @@ Description copied from Concept Domain of same name. Must be verified."/>   - A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g. spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children). + A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g., spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children).
@@ -105169,7 +105288,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g. an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g. an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.
In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. @@ -105195,11 +105314,11 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g. where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy. + Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g., where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy.
- Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g. e.g. a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g. if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss. + Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g., if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss.
@@ -105222,7 +105341,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g. a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy. + Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g., a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy.
@@ -105245,7 +105364,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g. a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss. + Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss.
@@ -105272,7 +105391,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g. a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy. + Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy.
@@ -105299,14 +105418,14 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g. an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.
In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits.
- Example: A party meeting eligibility criteria related to health or financial status, e.g. in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid. + Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid.
@@ -105437,7 +105556,7 @@ Description copied from Concept Domain of same name. Must be verified."/> licensed entity - A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g. a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals). + A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g., a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals).
@@ -105691,7 +105810,7 @@ Description copied from Concept Domain of same name. Must be verified."/> self - The "same" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g. different DOB, gender), that one or both are in error. + The "same" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.
@@ -106165,7 +106284,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Examples: An innovator's medicine formulation is the reference for "generics", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g. metoprolol succinate specified in terms of metoprolol tartrate.) + Examples: An innovator's medicine formulation is the reference for "generics", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.)
@@ -106179,7 +106298,7 @@ Description copied from Concept Domain of same name. Must be verified."/> same - The "same" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g. different DOB, gender), that one or both are in error. + The "same" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.
@@ -106297,7 +106416,7 @@ Description copied from Concept Domain of same name. Must be verified."/>   - An association between two Entities where the playing Entity is considered in some way "part" of the scoping Entity, e.g. as a member, component, ingredient, or content. Being "part" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity. + An association between two Entities where the playing Entity is considered in some way "part" of the scoping Entity, e.g., as a member, component, ingredient, or content. Being "part" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity.
@@ -106325,7 +106444,7 @@ Description copied from Concept Domain of same name. Must be verified."/> exposure agent carrier - An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g. pathogen). + An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g., pathogen).
@@ -106340,7 +106459,7 @@ Description copied from Concept Domain of same name. Must be verified."/> exposure vector - Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g. pathogen). + Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g., pathogen).
@@ -106355,7 +106474,7 @@ Description copied from Concept Domain of same name. Must be verified."/> fomite - Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g. pathogen). + Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g., pathogen).
@@ -106369,7 +106488,7 @@ Description copied from Concept Domain of same name. Must be verified."/> ingredient - Relates a component (player) to a mixture (scoper); e.g. Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube. + Relates a component (player) to a mixture (scoper). E.g., Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube.
@@ -106483,7 +106602,7 @@ Description copied from Concept Domain of same name. Must be verified."/> base - A base ingredient (player) is what comprises the major part of a mixture (scoper); e.g. Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture. + A base ingredient (player) is what comprises the major part of a mixture (scoper). E.g., Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture.
@@ -106511,7 +106630,7 @@ Description copied from Concept Domain of same name. Must be verified."/> inactive ingredient - An ingredient which is not considered therapeutically active, e.g. colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g. might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect. + An ingredient which is not considered therapeutically active, e.g., colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g., might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect.
@@ -106804,7 +106923,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -106815,7 +106934,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + - + @@ -106935,7 +107054,7 @@ Description copied from Concept Domain of same name. Must be verified."/> Discussion: With respect to liability insurance such as property and casualty insurance, a claimant must file a claim requesting indemnification for a loss that the claimant considers covered under the policy of a named insured. The claims adjuster for the policy underwriter will review the claim to determine whether the loss meets the benefit coverage criteria under a policy, and base any indemnification or coverage payment on that review. If a third party is liable in whole or part for the loss, the underwriter may pursue third party liability recovery. A claimant may be involved in civil or criminal legal proceedings involving claims against a defendant party that is indemnified by an insurance policy or to protest the finding of a claims adjustor. With respect to life insurance, a beneficiary designated by a named insured becomes a claimant of the proceeds of coverage, as in the case of a life insurance policy. However, a claimant for coverage under life insurance is not necessarily a designated beneficiary. - Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g. an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g. an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. @@ -106949,10 +107068,10 @@ Description copied from Concept Domain of same name. Must be verified."/> @@ -106963,7 +107082,7 @@ Description copied from Concept Domain of same name. Must be verified."/> @@ -106975,7 +107094,7 @@ Description copied from Concept Domain of same name. Must be verified."/> @@ -106990,7 +107109,7 @@ Description copied from Concept Domain of same name. Must be verified."/> Discussion: The policy holder holds the contract with the policy or program underwriter. The subscriber holds a certificate of coverage under the contract. In legal proceedings concerning the policy or program, the terms of the contract takes precedence over the terms of the certificate of coverage if there are any inconsistencies. - Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g. a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy. + Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy. Example: An employee or a member of an association."/> @@ -107006,12 +107125,12 @@ Description copied from Concept Domain of same name. Must be verified."/> Discussion: A program as typically government administered coverage for parties determined eligible under the terms of the program. - Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g. an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. - Example: A party meeting eligibility criteria related to health or financial status, e.g. in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid."/> + Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid."/> @@ -107069,7 +107188,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -107208,7 +107327,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + Examples: An innovator's medicine formulation is the reference for "generics", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.)"/> - - + @@ -107503,25 +107622,25 @@ Description copied from Concept Domain of same name. Must be verified."/> - + - + - + - + @@ -107571,7 +107690,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -107583,7 +107702,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -107739,13 +107858,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.111

@@ -110839,7 +110958,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - The sole basis for coverage, e.g. being differently abled may qualify a person for disability coverage + The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage
@@ -110849,13 +110968,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - May impact the level of coverage for a covered party under a policy or program, e.g. being differently abled may qualify a program eligible for additional benefits. + May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits.
- Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g. "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g. the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead. + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead.
In summary, the coded concepts in the Abstract Value Set "CoveredPartyRoleType" can be "post-coordinated" with the "RoleClassCoveredParty" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability. @@ -110876,7 +110995,7 @@ Description copied from Concept Domain of same name. Must be verified."/>   - Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc. + Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc
@@ -111090,7 +111209,7 @@ Description copied from Concept Domain of same name. Must be verified."/> parent - One that begets or brings forth offspring or a person who brings up and cares for another (Webster's Collegiate Dictionary) + One that begets or brings forth offspring or a person who brings up and cares for for another (Webster's Collegiate Dictionary)
@@ -111150,7 +111269,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g. "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts. + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts.
@@ -111283,7 +111402,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a "claimant", "program eligible", a "named insured", an "individual Insured" or a "dependent", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g. if the ward is suffering from neglect or abuse, or has been in trouble with the law. + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a "claimant", "program eligible", a "named insured", an "individual Insured" or a "dependent", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law.
@@ -111591,7 +111710,7 @@ Description copied from Concept Domain of same name. Must be verified."/>   - A role of a place that further classifies the setting (e.g. accident site, road side, work site, community location) in which services are delivered. + A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered.
@@ -111627,7 +111746,7 @@ Description copied from Concept Domain of same name. Must be verified."/>   - A role of a place that further classifies the clinical setting (e.g. cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter. + A role of a place that further classifies the clinical setting (e.g., cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter.
@@ -111655,7 +111774,7 @@ Description copied from Concept Domain of same name. Must be verified."/> Cardiovascular diagnostics or therapeutics unit - A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g. cardiac catheterization lab, echocardiography suite) + A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g., cardiac catheterization lab, echocardiography suite)
@@ -111852,7 +111971,7 @@ Description copied from Concept Domain of same name. Must be verified."/> intellectual impairment center - Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behavior disorder. + Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behaviour disorder.
@@ -113559,7 +113678,7 @@ Description copied from Concept Domain of same name. Must be verified."/>
- + @@ -113570,7 +113689,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -114844,7 +114963,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - The sole basis for coverage, e.g. being differently abled may qualify a person for disability coverage + The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage @@ -114852,19 +114971,19 @@ Description copied from Concept Domain of same name. Must be verified."/> - May impact the level of coverage for a covered party under a policy or program, e.g. being differently abled may qualify a program eligible for additional benefits. + May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits. - Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g. "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g. the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead. + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead. In summary, the coded concepts in the Abstract Value Set "CoveredPartyRoleType" can be "post-coordinated" with the "RoleClassCoveredParty" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability."/> - + @@ -114965,7 +115084,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -114996,7 +115115,7 @@ Description copied from Concept Domain of same name. Must be verified."/> Example:An employee as a subscriber; or (2) on being scoped another covered party such as the subscriber, as in the case of a dependent. - Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g. "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts."/> + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts."/> @@ -115051,7 +115170,7 @@ Description copied from Concept Domain of same name. Must be verified."/> + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a "claimant", "program eligible", a "named insured", an "individual Insured" or a "dependent", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law."/> @@ -115174,7 +115293,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -115184,7 +115303,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -115194,7 +115313,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -115283,7 +115402,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -116184,13 +116303,13 @@ Description copied from Concept Domain of same name. Must be verified."/> - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1137

@@ -116323,7 +116442,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -116334,7 +116453,7 @@ Description copied from Concept Domain of same name. Must be verified."/> - + @@ -116389,13 +116508,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.107

@@ -116538,7 +116657,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -116549,7 +116668,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -116617,13 +116736,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1068

@@ -116763,7 +116882,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -116774,7 +116893,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -116834,13 +116953,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.112

@@ -124832,7 +124951,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla
- + @@ -124843,7 +124962,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -127834,13 +127953,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.113

@@ -127924,7 +128043,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -127935,7 +128054,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -127971,13 +128090,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1069

@@ -128096,7 +128215,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -128107,7 +128226,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -128161,13 +128280,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.129

@@ -129313,7 +129432,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla
- + @@ -129324,7 +129443,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130086,13 +130205,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1070

@@ -130344,7 +130463,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla
- + @@ -130355,7 +130474,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130487,13 +130606,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1071

@@ -130604,7 +130723,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla
- + @@ -130615,7 +130734,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130663,13 +130782,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.131

@@ -130756,7 +130875,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130767,7 +130886,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130815,13 +130934,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.132

@@ -130899,7 +131018,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130910,7 +131029,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -130952,13 +131071,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.133

@@ -131036,7 +131155,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131047,7 +131166,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131089,13 +131208,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.134

@@ -131218,7 +131337,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131229,7 +131348,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131301,13 +131420,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.136

@@ -131394,7 +131513,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131405,7 +131524,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131453,13 +131572,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.137

@@ -131574,7 +131693,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131585,7 +131704,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131639,13 +131758,13 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1118

@@ -131763,7 +131882,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131774,7 +131893,7 @@ Codes representing possible states of a RoleLink, as defined by the RoleLink cla - + @@ -131823,13 +131942,13 @@ Concepts that define the telecommunication capabilities of a particular device. - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.139

@@ -132131,7 +132250,7 @@ Concepts that define the telecommunication capabilities of a particular device. - + @@ -132142,7 +132261,7 @@ Concepts that define the telecommunication capabilities of a particular device. - + @@ -132277,13 +132396,13 @@ Concepts that define the telecommunication capabilities of a particular device. - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.1111

@@ -132341,7 +132460,7 @@ Concepts that define the telecommunication capabilities of a particular device. - + @@ -132352,7 +132471,7 @@ Concepts that define the telecommunication capabilities of a particular device. - + @@ -132377,13 +132496,13 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.140

@@ -137550,7 +137669,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst
- + @@ -137561,7 +137680,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -140987,13 +141106,13 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - +
-

Release Date: 2015-07-31

+

Release Date: 2015-11-30

OID for code system: 2.16.840.1.113883.5.144

@@ -141595,7 +141714,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -141606,7 +141725,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -141864,7 +141983,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -141940,7 +142059,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -141996,7 +142115,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -142072,7 +142191,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -142148,7 +142267,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -142224,7 +142343,7 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst - + @@ -142266,10 +142385,10 @@ A code specifying the meaning and purpose of every TransmissionRelationship inst R restricted - Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g. for public health reporting or emergency treatment. + Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment.
- Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g. secret ingredients in a therapeutic substance; or the name of a manufacturer. + Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer.
Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.. @@ -142339,14 +142458,14 @@ x_BasicConfidentialityKind is a subset of Confidentiality codes that are used as - +

ServiceDeliveryLocationRoleType

-

A role of a place that further classifies the setting (e.g. accident site, road side, work site, community location) in which services are delivered.

+

A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered.

This value set includes codes from the following code systems:

  • Include codes from @@ -142367,7 +142486,7 @@ x_BasicConfidentialityKind is a subset of Confidentiality codes that are used as _ServiceDeliveryLocationRoleType ServiceDeliveryLocationRoleType - A role of a place that further classifies the setting (e.g. accident site, road side, work site, community location) in which services are delivered. + A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered.
  • @@ -142389,7 +142508,7 @@ x_BasicConfidentialityKind is a subset of Confidentiality codes that are used as - + @@ -142409,122 +142528,13 @@ x_BasicConfidentialityKind is a subset of Confidentiality codes that are used as - - - - - - - - - - - -
    -

    MilitaryRoleType

    -

    Definition: -
    A person playing the role of program eligible under a program based on military status. Discussion: -
    This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a member of the military meets jurisdictional or program criteria -

    -

    This value set includes codes from the following code systems:

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - -
    -

    ActClassInvestigation

    -

    An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government.

    -

    This value set includes codes from the following code systems:

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - + @@ -142600,7 +142610,7 @@ This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class - + @@ -142679,7 +142689,7 @@ This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class - + @@ -142758,7 +142768,7 @@ Parent, sibling, unrelated friend, neighbor"/> - + @@ -142810,7 +142820,7 @@ Parent, sibling, unrelated friend, neighbor"/> - + @@ -142856,13 +142866,70 @@ Parent, sibling, unrelated friend, neighbor"/> + + + + + + + + + + + +
    +

    MilitaryRoleType

    +

    Definition: +
    A person playing the role of program eligible under a program based on military status. Discussion: +
    This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a member of the military meets jurisdictional or program criteria +

    +

    This value set includes codes from the following code systems:

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    - + @@ -142917,7 +142984,7 @@ Set of codes indicating the type of insurance policy or program that pays for th - + @@ -142925,7 +142992,7 @@ Set of codes indicating the type of insurance policy or program that pays for th

    ActConsentType

    Definition: -
    The type of consent directive, e.g. to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research. +
    The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research.

    This value set includes codes from the following code systems:

      @@ -142952,7 +143019,7 @@ Set of codes indicating the type of insurance policy or program that pays for th +The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research."/> @@ -142966,13 +143033,65 @@ The type of consent directive, e.g. to consent or dissent to collect, access, or + + + + + + + + + + + +
      +

      ActClassInvestigation

      +

      An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government.

      +

      This value set includes codes from the following code systems:

      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      - + @@ -143024,7 +143143,7 @@ The type of consent directive, e.g. to consent or dissent to collect, access, or - + @@ -143079,7 +143198,7 @@ The type of consent directive, e.g. to consent or dissent to collect, access, or - + @@ -143136,7 +143255,7 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + @@ -143191,7 +143310,7 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + @@ -143243,7 +143362,7 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + @@ -143371,7 +143490,7 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + @@ -143431,7 +143550,7 @@ Per OASIS XACML, an obligation is an operation specified in a policy or policy t - + @@ -143486,7 +143605,7 @@ This is the healthcare analog to the US Intelligence Community's concept of - + @@ -143566,7 +143685,7 @@ This is the healthcare analog to the US Intelligence Community's concept of - + @@ -143670,7 +143789,7 @@ This is the healthcare analog to the US Intelligence Community's concept of - + @@ -143766,7 +143885,7 @@ This is the healthcare analog to the US Intelligence Community's concept of - + diff --git a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/valuesets.xml b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/valuesets.xml index 49c907a30d3..48c8adfa519 100644 --- a/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/valuesets.xml +++ b/hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/instance/model/dstu21/valueset/valuesets.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -377,7 +377,7 @@ - + @@ -471,7 +471,7 @@ - + @@ -729,7 +729,7 @@ - + @@ -75209,7 +75209,7 @@ - + @@ -75611,7 +75611,7 @@ - + @@ -94790,7 +94790,7 @@ - + @@ -94837,7 +94837,7 @@ - + @@ -95017,7 +95017,7 @@ - + @@ -95987,7 +95987,7 @@ - + @@ -96232,7 +96232,7 @@ - + @@ -96311,7 +96311,7 @@ - + @@ -96322,7 +96322,7 @@ - + @@ -96376,7 +96376,7 @@ - + @@ -96423,7 +96423,7 @@ - + @@ -96434,7 +96434,7 @@ - + @@ -96460,7 +96460,7 @@ - + @@ -96502,7 +96502,7 @@ - + @@ -96517,14 +96517,14 @@ - + - + @@ -96546,7 +96546,7 @@ - + @@ -96595,7 +96595,7 @@ - + @@ -96610,14 +96610,14 @@ - + - + @@ -96644,7 +96644,7 @@ - + @@ -96738,7 +96738,7 @@ - + @@ -96749,7 +96749,7 @@ - + @@ -96821,7 +96821,7 @@ - + @@ -96861,7 +96861,7 @@ - + @@ -96872,7 +96872,7 @@ - + @@ -96898,7 +96898,7 @@ - + @@ -96968,7 +96968,7 @@ - + @@ -96979,7 +96979,7 @@ - + @@ -97027,7 +97027,7 @@ - + @@ -97076,7 +97076,7 @@ - + @@ -97091,14 +97091,14 @@ - + - + @@ -97125,7 +97125,7 @@ - + @@ -97216,7 +97216,7 @@ - + @@ -97231,14 +97231,14 @@ - + - + @@ -97295,7 +97295,7 @@ - + @@ -97337,7 +97337,7 @@ - + @@ -97352,14 +97352,14 @@ - + - + @@ -97381,7 +97381,7 @@ - + @@ -97444,7 +97444,7 @@ - + @@ -97459,14 +97459,14 @@ - + - + @@ -97503,7 +97503,7 @@ - + @@ -97573,7 +97573,7 @@ - + @@ -97588,14 +97588,14 @@ - + - + @@ -97637,7 +97637,7 @@ - + @@ -97658,7 +97658,7 @@ - + @@ -97669,7 +97669,7 @@ - + @@ -97692,7 +97692,7 @@ - + @@ -97762,7 +97762,7 @@ - + @@ -97777,14 +97777,14 @@ - + - + @@ -97826,7 +97826,7 @@ - + @@ -97875,7 +97875,7 @@ - + @@ -97890,14 +97890,14 @@ - + - + @@ -97924,7 +97924,7 @@ - + @@ -97987,7 +97987,7 @@ - + @@ -97998,7 +97998,7 @@ - + @@ -98036,7 +98036,7 @@ - + @@ -98293,7 +98293,7 @@ - + @@ -98304,7 +98304,7 @@ - + @@ -98502,7 +98502,7 @@ - + @@ -98589,7 +98589,7 @@ - + @@ -98604,14 +98604,14 @@ - + - + @@ -98658,7 +98658,7 @@ - + @@ -98682,7 +98682,7 @@ - + @@ -98693,7 +98693,7 @@ - + @@ -98715,7 +98715,7 @@ - + @@ -98771,7 +98771,7 @@ - + @@ -98782,7 +98782,7 @@ - + @@ -98820,7 +98820,7 @@ - + @@ -98841,7 +98841,7 @@ - + @@ -98852,7 +98852,7 @@ - + @@ -98874,7 +98874,7 @@ - + @@ -98965,7 +98965,7 @@ - + @@ -98976,7 +98976,7 @@ - + @@ -99030,7 +99030,7 @@ - + @@ -99128,7 +99128,7 @@ - + @@ -99143,14 +99143,14 @@ - + - + @@ -99212,7 +99212,7 @@ - + @@ -99268,7 +99268,7 @@ - + @@ -99283,14 +99283,14 @@ - + - + @@ -99322,7 +99322,7 @@ - + @@ -99364,7 +99364,7 @@ - + @@ -99375,7 +99375,7 @@ - + @@ -99401,7 +99401,7 @@ - + @@ -99450,7 +99450,7 @@ - + @@ -99465,14 +99465,14 @@ - + - + @@ -99499,7 +99499,7 @@ - + @@ -99548,7 +99548,7 @@ - + @@ -99563,14 +99563,14 @@ - + - + @@ -99597,7 +99597,7 @@ - + @@ -99646,7 +99646,7 @@ - + @@ -99661,14 +99661,14 @@ - + - + @@ -99689,13 +99689,128 @@ + + + + + + + + + + + +
      +

      ProfileDestinationType

      +

      The type of destination profile the server supports. +
      +
      The type of destination profile the server supports. +

      +

      This value set has an inline code system http://hl7.org/fhir/profile-destination-types, which defines the following codes:

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Code + + Display + + Definition +
      FHIR-DSTU2-Server + + FHIR-DSTU2-ServerGeneral DSTU2 server.
      FHIR-DSTU2-SDC-FormManager + + FHIR-DSTU2-SDC-FormManagerDSTU2 server that serves as an SDC-FormManager.
      FHIR-DSTU2-SDC-FormReceiver + + FHIR-DSTU2-SDC-FormReceiverDSTU2 server that serves as an SDC-FormReceiver.
      FHIR-DSTU2-SDC-FormProcessor + + FHIR-DSTU2-SDC-FormProcessorDSTU2 server that serves as an SDC-FormProcessor.
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      - + @@ -99735,7 +99850,7 @@ - + @@ -99746,7 +99861,7 @@ - + @@ -99771,7 +99886,7 @@ - + @@ -99848,7 +99963,7 @@ - + @@ -99863,14 +99978,14 @@ - + - + @@ -99917,7 +100032,7 @@ - + @@ -100001,7 +100116,7 @@ - + @@ -100016,14 +100131,14 @@ - + - + @@ -100075,7 +100190,7 @@ - + @@ -100152,7 +100267,7 @@ - + @@ -100167,14 +100282,14 @@ - + - + @@ -100221,7 +100336,7 @@ - + @@ -100312,7 +100427,7 @@ - + @@ -100323,7 +100438,7 @@ - + @@ -100386,7 +100501,7 @@ - + @@ -100442,7 +100557,7 @@ - + @@ -100457,14 +100572,14 @@ - + - + @@ -100496,7 +100611,7 @@ - + @@ -100553,7 +100668,7 @@ - + @@ -100564,7 +100679,7 @@ - + @@ -100601,7 +100716,7 @@ - + @@ -100650,7 +100765,7 @@ - + @@ -100665,14 +100780,14 @@ - + - + @@ -100699,7 +100814,7 @@ - + @@ -100814,7 +100929,7 @@ - + @@ -100829,7 +100944,7 @@ - + @@ -100838,7 +100953,7 @@ The response code to expect in the response."/> - + @@ -100910,7 +101025,7 @@ The response code to expect in the response."/> - + @@ -100952,7 +101067,7 @@ The response code to expect in the response."/> - + @@ -100967,14 +101082,14 @@ The response code to expect in the response."/> - + - + @@ -100996,7 +101111,7 @@ The response code to expect in the response."/> - + @@ -101059,7 +101174,7 @@ The response code to expect in the response."/> - + @@ -101074,14 +101189,14 @@ The response code to expect in the response."/> - + - + @@ -101118,7 +101233,7 @@ The response code to expect in the response."/> - + @@ -101174,7 +101289,7 @@ The response code to expect in the response."/> - + @@ -101189,14 +101304,14 @@ The response code to expect in the response."/> - + - + @@ -101228,7 +101343,7 @@ The response code to expect in the response."/> - + @@ -101249,7 +101364,7 @@ The response code to expect in the response."/> - + @@ -101260,7 +101375,7 @@ The response code to expect in the response."/> - + @@ -101283,7 +101398,7 @@ The response code to expect in the response."/> - + @@ -101310,7 +101425,7 @@ The response code to expect in the response."/> - + @@ -101321,7 +101436,7 @@ The response code to expect in the response."/> - + @@ -101346,7 +101461,7 @@ The response code to expect in the response."/> - + @@ -101409,7 +101524,7 @@ The response code to expect in the response."/> - + @@ -101424,14 +101539,14 @@ The response code to expect in the response."/> - + - + @@ -101468,7 +101583,7 @@ The response code to expect in the response."/> - + @@ -101545,7 +101660,7 @@ The response code to expect in the response."/> - + @@ -101556,7 +101671,7 @@ The response code to expect in the response."/> - + @@ -101609,7 +101724,7 @@ The response code to expect in the response."/> - + @@ -101634,7 +101749,7 @@ The response code to expect in the response."/> - + @@ -101645,7 +101760,7 @@ The response code to expect in the response."/> - + @@ -101670,7 +101785,7 @@ The response code to expect in the response."/> - + @@ -101726,7 +101841,7 @@ The response code to expect in the response."/> - + @@ -101737,7 +101852,7 @@ The response code to expect in the response."/> - + @@ -101775,7 +101890,7 @@ The response code to expect in the response."/> - + @@ -101831,7 +101946,7 @@ The response code to expect in the response."/> - + @@ -101846,14 +101961,14 @@ The response code to expect in the response."/> - + - + @@ -101885,7 +102000,7 @@ The response code to expect in the response."/> - + @@ -101927,7 +102042,7 @@ The response code to expect in the response."/> - + @@ -101942,14 +102057,14 @@ The response code to expect in the response."/> - + - + @@ -101971,7 +102086,7 @@ The response code to expect in the response."/> - + @@ -101993,7 +102108,7 @@ The response code to expect in the response."/> - + @@ -102004,7 +102119,7 @@ The response code to expect in the response."/> - + @@ -102034,7 +102149,7 @@ The response code to expect in the response."/> - + @@ -102076,7 +102191,7 @@ The response code to expect in the response."/> - + @@ -102091,14 +102206,14 @@ The response code to expect in the response."/> - + - + @@ -102120,7 +102235,7 @@ The response code to expect in the response."/> - + @@ -102172,7 +102287,7 @@ The response code to expect in the response."/> - + @@ -102187,7 +102302,7 @@ The response code to expect in the response."/> - + @@ -102196,7 +102311,7 @@ active| inactive| resolved"/> - + @@ -102223,7 +102338,7 @@ active| inactive| resolved"/> - + @@ -102258,7 +102373,7 @@ active| inactive| resolved"/> - + @@ -102273,14 +102388,14 @@ active| inactive| resolved"/> - + - + @@ -102297,7 +102412,7 @@ active| inactive| resolved"/> - + @@ -102353,7 +102468,7 @@ active| inactive| resolved"/> - + @@ -102364,7 +102479,7 @@ active| inactive| resolved"/> - + @@ -102402,7 +102517,7 @@ active| inactive| resolved"/> - + @@ -102423,7 +102538,7 @@ active| inactive| resolved"/> - + @@ -102434,7 +102549,7 @@ active| inactive| resolved"/> - + @@ -102456,7 +102571,7 @@ active| inactive| resolved"/> - + @@ -102526,7 +102641,7 @@ active| inactive| resolved"/> - + @@ -102541,14 +102656,14 @@ active| inactive| resolved"/> - + - + @@ -102590,7 +102705,7 @@ active| inactive| resolved"/> - + @@ -102646,7 +102761,7 @@ active| inactive| resolved"/> - + @@ -102661,14 +102776,14 @@ active| inactive| resolved"/> - + - + @@ -102700,7 +102815,7 @@ active| inactive| resolved"/> - + @@ -102763,7 +102878,7 @@ active| inactive| resolved"/> - + @@ -102778,14 +102893,14 @@ active| inactive| resolved"/> - + - + @@ -102822,7 +102937,7 @@ active| inactive| resolved"/> - + @@ -102871,7 +102986,7 @@ active| inactive| resolved"/> - + @@ -102886,14 +103001,14 @@ active| inactive| resolved"/> - + - + @@ -102920,7 +103035,7 @@ active| inactive| resolved"/> - + @@ -102941,7 +103056,7 @@ active| inactive| resolved"/> - + @@ -102952,7 +103067,7 @@ active| inactive| resolved"/> - + @@ -102975,7 +103090,7 @@ active| inactive| resolved"/> - + @@ -103385,7 +103500,7 @@ active| inactive| resolved"/> - + @@ -103698,7 +103813,7 @@ active| inactive| resolved"/> - + @@ -103790,7 +103905,7 @@ active| inactive| resolved"/> - + @@ -103802,7 +103917,7 @@ active| inactive| resolved"/> - + @@ -103867,7 +103982,7 @@ active| inactive| resolved"/> - + @@ -103937,7 +104052,7 @@ active| inactive| resolved"/> - + @@ -103952,14 +104067,14 @@ active| inactive| resolved"/> - + - + @@ -104001,7 +104116,7 @@ active| inactive| resolved"/> - + @@ -104057,7 +104172,7 @@ active| inactive| resolved"/> - + @@ -104072,14 +104187,14 @@ active| inactive| resolved"/> - + - + @@ -104111,7 +104226,7 @@ active| inactive| resolved"/> - + @@ -104166,7 +104281,7 @@ active| inactive| resolved"/> - + @@ -104181,14 +104296,14 @@ active| inactive| resolved"/> - + - + @@ -104215,7 +104330,7 @@ active| inactive| resolved"/> - + @@ -104300,7 +104415,7 @@ active| inactive| resolved"/> - + @@ -104311,7 +104426,7 @@ active| inactive| resolved"/> - + @@ -104361,7 +104476,7 @@ active| inactive| resolved"/> - + @@ -104522,7 +104637,7 @@ active| inactive| resolved"/> - + @@ -104537,7 +104652,7 @@ active| inactive| resolved"/> - + @@ -104704,7 +104819,7 @@ active| inactive| resolved"/> - + @@ -104732,121 +104847,128 @@ active| inactive| resolved"/> 1.2.840.10065.1.12.1.1 - AuthorID + Author's Signature the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document. 1.2.840.10065.1.12.1.2 - Co-AuthorID + Coauthor's Signature the signature of a health information document coauthor. There can be multiple coauthors of a health information document. 1.2.840.10065.1.12.1.3 - Co-Participated + Co-participant's Signature the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.) 1.2.840.10065.1.12.1.4 - Transcriptionist + Transcriptionist/Recorder Signature the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format. 1.2.840.10065.1.12.1.5 - Verification + Verification Signature a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.) 1.2.840.10065.1.12.1.6 - Validation + Validation Sianature a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.) 1.2.840.10065.1.12.1.7 - Consent + Consent Signature the signature of an individual consenting to what is described in a health information document. 1.2.840.10065.1.12.1.8 - Witness + Signature Witness Signature the signature of a witness to any other signature. 1.2.840.10065.1.12.1.9 - Event-Witness + Event Witness Signature the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.) 1.2.840.10065.1.12.1.10 - Identity-Witness + Identity Witness Signature the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.) 1.2.840.10065.1.12.1.11 - Consent-Witness + Consent Witness Signature the signature of an individual who has witnessed the health care provider counselling a patient. 1.2.840.10065.1.12.1.12 - Interpreter + Interpreter Signature the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment. 1.2.840.10065.1.12.1.13 - Review + Review Signature the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.) 1.2.840.10065.1.12.1.14 - Source + Source Signature the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.) 1.2.840.10065.1.12.1.15 - Addendum + Addendum Signature the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand. 1.2.840.10065.1.12.1.16 - Administrative + Modification Signature the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document. 1.2.840.10065.1.12.1.17 - Timestamp + Administrative (Error/Edit) Signature the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record. + + 1.2.840.10065.1.12.1.18 + + + Timestamp Signature + the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute. +
    @@ -104854,7 +104976,7 @@ active| inactive| resolved"/> - + @@ -104865,7 +104987,7 @@ active| inactive| resolved"/> - + @@ -104876,89 +104998,94 @@ active| inactive| resolved"/> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + +
    @@ -104969,7 +105096,7 @@ active| inactive| resolved"/> - + @@ -105011,7 +105138,7 @@ active| inactive| resolved"/> - + @@ -105026,14 +105153,14 @@ active| inactive| resolved"/> - + - + @@ -105055,7 +105182,7 @@ active| inactive| resolved"/> - + @@ -105100,7 +105227,7 @@ active| inactive| resolved"/> - + @@ -105111,7 +105238,7 @@ active| inactive| resolved"/> - + @@ -105142,7 +105269,7 @@ active| inactive| resolved"/> - + @@ -105240,7 +105367,7 @@ active| inactive| resolved"/> - + @@ -105251,7 +105378,7 @@ active| inactive| resolved"/> - + @@ -105309,7 +105436,7 @@ active| inactive| resolved"/> - + @@ -105358,7 +105485,7 @@ active| inactive| resolved"/> - + @@ -105373,14 +105500,14 @@ active| inactive| resolved"/> - + - + @@ -105407,7 +105534,7 @@ active| inactive| resolved"/> - + @@ -105670,7 +105797,7 @@ active| inactive| resolved"/> - + @@ -105685,14 +105812,14 @@ active| inactive| resolved"/> - + - + @@ -105849,7 +105976,7 @@ active| inactive| resolved"/> - + @@ -105901,7 +106028,7 @@ active| inactive| resolved"/> - + @@ -105916,7 +106043,7 @@ active| inactive| resolved"/> - + @@ -105925,7 +106052,7 @@ The type of an address (physical / postal)."/> - + @@ -105952,7 +106079,7 @@ The type of an address (physical / postal)."/> - + @@ -106026,7 +106153,7 @@ The type of an address (physical / postal)."/> - + @@ -106041,14 +106168,14 @@ The type of an address (physical / postal)."/> - + - + @@ -106087,7 +106214,7 @@ The type of an address (physical / postal)."/> - + @@ -106165,7 +106292,7 @@ The type of an address (physical / postal)."/> - + @@ -106180,7 +106307,7 @@ The type of an address (physical / postal)."/> - + @@ -106259,7 +106386,7 @@ The type of an address (physical / postal)."/> - + @@ -106423,7 +106550,7 @@ The type of an address (physical / postal)."/> - + @@ -106434,7 +106561,7 @@ The type of an address (physical / postal)."/> - + @@ -106548,7 +106675,7 @@ The type of an address (physical / postal)."/> - + @@ -106611,7 +106738,7 @@ The type of an address (physical / postal)."/> - + @@ -106626,14 +106753,14 @@ The type of an address (physical / postal)."/> - + - + @@ -106677,7 +106804,7 @@ The type of an address (physical / postal)."/> - + @@ -107447,7 +107574,7 @@ The type of an address (physical / postal)."/> - + @@ -107462,14 +107589,14 @@ The type of an address (physical / postal)."/> - + - + @@ -108011,7 +108138,7 @@ The type of an address (physical / postal)."/> - + @@ -108106,7 +108233,7 @@ The type of an address (physical / postal)."/> - + @@ -108121,14 +108248,14 @@ The type of an address (physical / postal)."/> - + - + @@ -108180,7 +108307,7 @@ The type of an address (physical / postal)."/> - + @@ -108201,7 +108328,7 @@ The type of an address (physical / postal)."/> - + @@ -108216,7 +108343,7 @@ The type of an address (physical / postal)."/> - + @@ -108239,7 +108366,7 @@ The type of an address (physical / postal)."/> - + @@ -108288,7 +108415,7 @@ The type of an address (physical / postal)."/> - + @@ -108303,14 +108430,14 @@ The type of an address (physical / postal)."/> - + - + @@ -108337,7 +108464,7 @@ The type of an address (physical / postal)."/> - + @@ -108421,7 +108548,7 @@ The type of an address (physical / postal)."/> - + @@ -108470,7 +108597,7 @@ The type of an address (physical / postal)."/> - + @@ -108512,7 +108639,7 @@ The type of an address (physical / postal)."/> - + @@ -108523,7 +108650,7 @@ The type of an address (physical / postal)."/> - + @@ -108551,7 +108678,7 @@ The type of an address (physical / postal)."/> - + @@ -108659,7 +108786,7 @@ The type of an address (physical / postal)."/> - + @@ -108670,7 +108797,7 @@ The type of an address (physical / postal)."/> - + @@ -108744,7 +108871,7 @@ The type of an address (physical / postal)."/> - + @@ -108793,7 +108920,7 @@ The type of an address (physical / postal)."/> - + @@ -108808,14 +108935,14 @@ The type of an address (physical / postal)."/> - + - + @@ -108842,7 +108969,7 @@ The type of an address (physical / postal)."/> - + @@ -108898,7 +109025,7 @@ The type of an address (physical / postal)."/> - + @@ -108913,14 +109040,14 @@ The type of an address (physical / postal)."/> - + - + @@ -108952,7 +109079,7 @@ The type of an address (physical / postal)."/> - + @@ -109022,7 +109149,7 @@ The type of an address (physical / postal)."/> - + @@ -109037,14 +109164,14 @@ The type of an address (physical / postal)."/> - + - + @@ -109086,7 +109213,7 @@ The type of an address (physical / postal)."/> - + @@ -109142,7 +109269,7 @@ The type of an address (physical / postal)."/> - + @@ -109157,14 +109284,14 @@ The type of an address (physical / postal)."/> - + - + @@ -109196,7 +109323,7 @@ The type of an address (physical / postal)."/> - + @@ -109241,7 +109368,7 @@ The type of an address (physical / postal)."/> - + @@ -109256,7 +109383,7 @@ The type of an address (physical / postal)."/> - + @@ -109281,7 +109408,7 @@ The type of an address (physical / postal)."/> - + @@ -109337,7 +109464,7 @@ The type of an address (physical / postal)."/> - + @@ -109352,14 +109479,14 @@ The type of an address (physical / postal)."/> - + - + @@ -109391,7 +109518,7 @@ The type of an address (physical / postal)."/> - + @@ -109412,7 +109539,7 @@ The type of an address (physical / postal)."/> - + @@ -109423,7 +109550,7 @@ The type of an address (physical / postal)."/> - + @@ -109445,7 +109572,7 @@ The type of an address (physical / postal)."/> - + @@ -109485,7 +109612,7 @@ The type of an address (physical / postal)."/> - + @@ -109496,7 +109623,7 @@ The type of an address (physical / postal)."/> - + @@ -109522,7 +109649,7 @@ The type of an address (physical / postal)."/> - + @@ -109588,7 +109715,7 @@ The type of an address (physical / postal)."/> - + @@ -109599,7 +109726,7 @@ The type of an address (physical / postal)."/> - + @@ -109648,7 +109775,7 @@ The type of an address (physical / postal)."/> - + @@ -109669,7 +109796,7 @@ The type of an address (physical / postal)."/> - + @@ -109680,7 +109807,7 @@ The type of an address (physical / postal)."/> - + @@ -109703,7 +109830,7 @@ The type of an address (physical / postal)."/> - + @@ -109780,7 +109907,7 @@ The type of an address (physical / postal)."/> - + @@ -109791,7 +109918,7 @@ The type of an address (physical / postal)."/> - + @@ -109844,7 +109971,7 @@ The type of an address (physical / postal)."/> - + @@ -109907,7 +110034,7 @@ The type of an address (physical / postal)."/> - + @@ -109922,14 +110049,14 @@ The type of an address (physical / postal)."/> - + - + @@ -109966,7 +110093,7 @@ The type of an address (physical / postal)."/> - + @@ -142021,7 +142148,7 @@ The type of an address (physical / postal)."/> - + @@ -167642,7 +167769,7 @@ The type of an address (physical / postal)."/> - + @@ -167698,7 +167825,7 @@ The type of an address (physical / postal)."/> - + @@ -167713,14 +167840,14 @@ The type of an address (physical / postal)."/> - + - + @@ -167752,7 +167879,7 @@ The type of an address (physical / postal)."/> - + @@ -167808,7 +167935,7 @@ The type of an address (physical / postal)."/> - + @@ -167819,7 +167946,7 @@ The type of an address (physical / postal)."/> - + @@ -167857,7 +167984,7 @@ The type of an address (physical / postal)."/> - + @@ -167920,7 +168047,7 @@ The type of an address (physical / postal)."/> - + @@ -167935,14 +168062,14 @@ The type of an address (physical / postal)."/> - + - + @@ -167979,7 +168106,7 @@ The type of an address (physical / postal)."/> - + @@ -168024,7 +168151,7 @@ The type of an address (physical / postal)."/> - + @@ -168035,7 +168162,7 @@ The type of an address (physical / postal)."/> - + @@ -168064,7 +168191,7 @@ The type of an address (physical / postal)."/> - + @@ -168109,7 +168236,7 @@ The type of an address (physical / postal)."/> - + @@ -168124,7 +168251,7 @@ The type of an address (physical / postal)."/> - + @@ -168133,7 +168260,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168155,7 +168282,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168197,7 +168324,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168212,14 +168339,14 @@ The content type or mime type to be specified in Accept or Content-Type header." - + - + @@ -168241,7 +168368,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168290,7 +168417,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168301,7 +168428,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168334,7 +168461,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168372,7 +168499,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168383,7 +168510,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168408,7 +168535,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168605,7 +168732,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168616,7 +168743,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168759,13 +168886,104 @@ The content type or mime type to be specified in Accept or Content-Type header."
    + + + + + + + + + + + +
    +

    ProfileOriginType

    +

    The type of origin profile the server supports. +
    +
    The type of origin profile the server supports. +

    +

    This value set has an inline code system http://hl7.org/fhir/profile-origin-types, which defines the following codes:

    + + + + + + + + + + + + + + + + +
    + Code + + Display + + Definition +
    FHIR-DSTU2-Client + + FHIR-DSTU2-ClientGeneral DSTU2 client initiating against a DSTU2 Server.
    FHIR-DSTU2-SDC-FormFiller + + FHIR-DSTU2-SDC-FormFillerDSTU2 client that serves as an SDC-FormFiller.
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    - + @@ -168828,7 +169046,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168839,7 +169057,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168877,7 +169095,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168919,7 +169137,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -168934,14 +169152,14 @@ The content type or mime type to be specified in Accept or Content-Type header." - + - + @@ -168963,7 +169181,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169012,7 +169230,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169027,14 +169245,14 @@ The content type or mime type to be specified in Accept or Content-Type header." - + - + @@ -169061,7 +169279,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169124,7 +169342,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169135,7 +169353,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169173,7 +169391,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169236,7 +169454,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169247,7 +169465,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169290,7 +169508,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169313,7 +169531,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169324,7 +169542,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169348,7 +169566,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169544,7 +169762,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169559,14 +169777,14 @@ The content type or mime type to be specified in Accept or Content-Type header." - + - + @@ -169698,7 +169916,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169730,7 +169948,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169753,7 +169971,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169795,7 +170013,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169806,7 +170024,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169834,7 +170052,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169890,7 +170108,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -169905,14 +170123,14 @@ The content type or mime type to be specified in Accept or Content-Type header." - + - + @@ -169944,7 +170162,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170017,7 +170235,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170032,7 +170250,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170104,7 +170322,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170188,7 +170406,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170199,7 +170417,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170257,7 +170475,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170323,7 +170541,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170338,7 +170556,7 @@ The content type or mime type to be specified in Accept or Content-Type header." - + @@ -170347,7 +170565,7 @@ Describes the lifecycle of the dispense."/> - + @@ -170384,7 +170602,7 @@ Describes the lifecycle of the dispense."/> - + @@ -170489,7 +170707,7 @@ Describes the lifecycle of the dispense."/> - + @@ -170500,7 +170718,7 @@ Describes the lifecycle of the dispense."/> - + @@ -170569,7 +170787,7 @@ Describes the lifecycle of the dispense."/> - + @@ -170629,7 +170847,7 @@ Not to be used when the patient is currently at the location - + @@ -170644,14 +170862,14 @@ Not to be used when the patient is currently at the location - + - + @@ -170687,7 +170905,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -170762,7 +170980,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -170773,7 +170991,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -170816,7 +171034,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -170904,7 +171122,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -170919,7 +171137,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171012,7 +171230,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171145,7 +171363,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171160,14 +171378,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -171254,7 +171472,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171404,7 +171622,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171415,7 +171633,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171519,7 +171737,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171540,7 +171758,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171551,7 +171769,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171568,7 +171786,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171666,7 +171884,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -171681,14 +171899,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -171750,7 +171968,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -172385,7 +172603,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -172870,7 +173088,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -172983,7 +173201,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173053,7 +173271,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173068,14 +173286,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -173117,7 +173335,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173335,7 +173553,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173375,7 +173593,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173386,7 +173604,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173411,7 +173629,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173466,7 +173684,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173477,7 +173695,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173511,7 +173729,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173553,7 +173771,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173568,14 +173786,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -173597,7 +173815,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173646,7 +173864,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173661,14 +173879,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -173695,7 +173913,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173807,7 +174025,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173818,7 +174036,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173896,7 +174114,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173938,7 +174156,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -173953,14 +174171,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -173982,7 +174200,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174031,7 +174249,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174046,14 +174264,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -174080,7 +174298,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174150,7 +174368,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174165,14 +174383,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -174214,7 +174432,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174270,7 +174488,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174285,14 +174503,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -174324,7 +174542,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174373,7 +174591,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174384,7 +174602,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174418,7 +174636,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174516,7 +174734,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174531,14 +174749,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -174600,7 +174818,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174620,7 +174838,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174631,7 +174849,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174647,7 +174865,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174699,7 +174917,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174710,7 +174928,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174744,7 +174962,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174826,7 +175044,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174837,7 +175055,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174893,7 +175111,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174949,7 +175167,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -174964,14 +175182,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -175003,7 +175221,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175032,7 +175250,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175043,7 +175261,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175072,7 +175290,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175247,7 +175465,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175262,14 +175480,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -175372,7 +175590,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175434,7 +175652,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175445,7 +175663,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175485,7 +175703,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175740,7 +175958,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175751,7 +175969,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175930,7 +176148,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -175993,7 +176211,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176008,14 +176226,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176052,7 +176270,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176073,7 +176291,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176084,7 +176302,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176102,7 +176320,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176158,7 +176376,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176173,14 +176391,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176212,7 +176430,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176261,7 +176479,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176276,14 +176494,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176310,7 +176528,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176332,7 +176550,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176343,7 +176561,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176373,7 +176591,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176418,7 +176636,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176429,7 +176647,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176456,7 +176674,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176533,7 +176751,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176548,14 +176766,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176602,7 +176820,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176705,7 +176923,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176720,14 +176938,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176784,7 +177002,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176840,7 +177058,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176855,14 +177073,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -176894,7 +177112,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176915,7 +177133,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176926,7 +177144,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176949,7 +177167,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176970,7 +177188,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -176981,7 +177199,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -177004,7 +177222,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -177025,7 +177243,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -177036,7 +177254,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -177059,7 +177277,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -186372,7 +186590,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -186383,7 +186601,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193045,7 +193263,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193190,7 +193408,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193270,7 +193488,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193285,14 +193503,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -193343,7 +193561,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193383,7 +193601,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193394,7 +193612,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193418,7 +193636,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193492,7 +193710,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193503,7 +193721,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193548,7 +193766,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193625,7 +193843,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193640,14 +193858,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -193694,7 +193912,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193785,7 +194003,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193800,14 +194018,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -193864,7 +194082,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193920,7 +194138,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -193935,14 +194153,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -193974,7 +194192,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194020,7 +194238,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194031,7 +194249,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194059,7 +194277,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194101,7 +194319,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194116,14 +194334,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -194145,7 +194363,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194217,7 +194435,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194232,7 +194450,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194304,7 +194522,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194374,7 +194592,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194389,14 +194607,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -194438,7 +194656,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194487,7 +194705,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194502,14 +194720,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -194536,7 +194754,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194578,7 +194796,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194589,7 +194807,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194617,7 +194835,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194659,7 +194877,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194670,7 +194888,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194696,7 +194914,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194801,7 +195019,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194816,14 +195034,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -194890,7 +195108,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194930,7 +195148,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194941,7 +195159,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194967,7 +195185,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194988,7 +195206,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -194999,7 +195217,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195017,7 +195235,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195073,7 +195291,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195088,14 +195306,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -195127,7 +195345,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195147,7 +195365,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195158,7 +195376,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195174,7 +195392,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195195,7 +195413,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195206,7 +195424,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195229,7 +195447,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195546,7 +195764,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195557,7 +195775,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195745,7 +195963,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195882,7 +196100,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195893,7 +196111,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -195975,7 +196193,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196077,7 +196295,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196088,7 +196306,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196163,7 +196381,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196226,7 +196444,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196241,14 +196459,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -196285,7 +196503,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196343,7 +196561,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196354,7 +196572,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196388,7 +196606,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196458,7 +196676,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196473,7 +196691,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196532,7 +196750,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196602,7 +196820,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196617,14 +196835,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -196666,7 +196884,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196694,7 +196912,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196705,7 +196923,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196783,7 +197001,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196806,7 +197024,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196839,7 +197057,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196895,7 +197113,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -196910,14 +197128,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -196949,7 +197167,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197118,7 +197336,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197167,7 +197385,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197182,14 +197400,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -197216,7 +197434,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197278,7 +197496,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197293,7 +197511,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197351,7 +197569,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197683,7 +197901,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197695,7 +197913,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -197952,7 +198170,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198001,7 +198219,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198016,14 +198234,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -198050,7 +198268,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198106,7 +198324,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198121,14 +198339,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -198160,7 +198378,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198223,7 +198441,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198238,14 +198456,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -198282,7 +198500,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198311,7 +198529,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198322,7 +198540,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198345,7 +198563,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198412,7 +198630,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198423,7 +198641,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198468,7 +198686,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198570,7 +198788,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198581,7 +198799,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -198654,7 +198872,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -199598,7 +199816,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -199613,7 +199831,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -200955,7 +201173,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201014,7 +201232,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201025,7 +201243,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201068,7 +201286,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201117,7 +201335,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201132,14 +201350,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -201166,7 +201384,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201187,7 +201405,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201198,7 +201416,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201219,7 +201437,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201294,7 +201512,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201309,7 +201527,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201352,7 +201570,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201394,7 +201612,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201405,7 +201623,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201428,7 +201646,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201449,7 +201667,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201460,7 +201678,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201482,7 +201700,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201587,7 +201805,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201598,7 +201816,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201675,7 +201893,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201698,7 +201916,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201713,7 +201931,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201732,7 +201950,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201788,7 +202006,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201803,14 +202021,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -201842,7 +202060,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201880,7 +202098,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201891,7 +202109,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201915,7 +202133,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201971,7 +202189,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -201986,14 +202204,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -202025,7 +202243,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202067,7 +202285,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202082,14 +202300,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -202111,7 +202329,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202510,7 +202728,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202525,14 +202743,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -202771,7 +202989,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202816,7 +203034,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202827,7 +203045,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202852,7 +203070,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202908,7 +203126,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -202923,14 +203141,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -202962,7 +203180,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203133,7 +203351,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203144,7 +203362,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203247,7 +203465,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203303,7 +203521,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203318,14 +203536,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -203357,7 +203575,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203413,7 +203631,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203428,14 +203646,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -203467,7 +203685,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203565,7 +203783,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203580,14 +203798,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -203649,7 +203867,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203726,7 +203944,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203741,14 +203959,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -203795,7 +204013,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203810,7 +204028,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203821,7 +204039,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203850,7 +204068,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203885,7 +204103,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203900,14 +204118,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -203924,7 +204142,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203966,7 +204184,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -203981,14 +204199,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -204010,7 +204228,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204455,7 +204673,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204788,7 +205006,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204808,7 +205026,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204820,7 +205038,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204836,7 +205054,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204857,7 +205075,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204868,7 +205086,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204891,7 +205109,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204940,7 +205158,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -204955,14 +205173,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -204989,7 +205207,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205035,7 +205253,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205046,7 +205264,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205074,7 +205292,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205158,7 +205376,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205169,7 +205387,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205227,7 +205445,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205276,7 +205494,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205291,14 +205509,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -205325,7 +205543,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205404,7 +205622,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205419,14 +205637,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -205474,7 +205692,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205495,7 +205713,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205506,7 +205724,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205524,7 +205742,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205601,7 +205819,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205616,14 +205834,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -205670,7 +205888,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -205961,7 +206179,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206017,7 +206235,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206032,14 +206250,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -206071,7 +206289,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206155,7 +206373,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206170,14 +206388,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -206229,7 +206447,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206299,7 +206517,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206314,14 +206532,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -206363,7 +206581,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206384,7 +206602,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206395,7 +206613,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206418,7 +206636,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206537,7 +206755,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206552,14 +206770,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -206636,7 +206854,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206657,7 +206875,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206668,7 +206886,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206685,7 +206903,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206732,7 +206950,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206743,7 +206961,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206769,7 +206987,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -206998,7 +207216,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207165,7 +207383,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207221,7 +207439,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207236,14 +207454,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -207275,7 +207493,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207331,7 +207549,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207346,14 +207564,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -207385,7 +207603,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207441,7 +207659,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207456,14 +207674,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -207495,7 +207713,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207554,7 +207772,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207565,7 +207783,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207608,7 +207826,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207664,7 +207882,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207679,14 +207897,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -207718,7 +207936,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207758,7 +207976,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207769,7 +207987,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207794,7 +208012,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207867,7 +208085,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207878,7 +208096,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207928,7 +208146,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207977,7 +208195,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -207992,14 +208210,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208026,7 +208244,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208075,7 +208293,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208090,14 +208308,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208124,7 +208342,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208180,7 +208398,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208195,14 +208413,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208234,7 +208452,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208283,7 +208501,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208298,14 +208516,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208332,7 +208550,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208374,7 +208592,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208389,14 +208607,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208418,7 +208636,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208467,7 +208685,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208482,14 +208700,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208516,7 +208734,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208572,7 +208790,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208587,14 +208805,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208626,7 +208844,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208682,7 +208900,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208697,14 +208915,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208736,7 +208954,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208813,7 +209031,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -208828,14 +209046,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -208882,7 +209100,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209157,7 +209375,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209354,7 +209572,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209375,7 +209593,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209386,7 +209604,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209408,7 +209626,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209464,7 +209682,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209479,14 +209697,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -209518,7 +209736,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209633,7 +209851,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209648,14 +209866,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -209721,7 +209939,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209785,7 +210003,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209796,7 +210014,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209833,7 +210051,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209896,7 +210114,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -209911,14 +210129,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -209955,7 +210173,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210032,7 +210250,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210043,7 +210261,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210087,7 +210305,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210211,7 +210429,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210315,7 +210533,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210371,7 +210589,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210386,14 +210604,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -210425,7 +210643,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210471,7 +210689,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210482,7 +210700,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210510,7 +210728,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210552,7 +210770,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210567,14 +210785,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -210596,7 +210814,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210652,7 +210870,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210667,14 +210885,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -210706,7 +210924,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210755,7 +210973,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210770,14 +210988,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -210804,7 +211022,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210853,7 +211071,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210868,14 +211086,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -210902,7 +211120,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210965,7 +211183,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -210980,14 +211198,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -211024,7 +211242,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211053,7 +211271,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211064,7 +211282,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211087,7 +211305,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211157,7 +211375,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211168,7 +211386,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211210,7 +211428,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211273,7 +211491,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211284,7 +211502,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211327,7 +211545,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211349,7 +211567,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211360,7 +211578,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211391,7 +211609,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211475,7 +211693,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211486,7 +211704,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211544,7 +211762,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211600,7 +211818,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211615,14 +211833,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -211654,7 +211872,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211696,7 +211914,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211711,14 +211929,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -211740,7 +211958,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211880,7 +212098,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211891,7 +212109,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -211989,7 +212207,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212185,7 +212403,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212196,7 +212414,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212334,7 +212552,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212397,7 +212615,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212409,7 +212627,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212447,7 +212665,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212487,7 +212705,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212498,7 +212716,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212523,7 +212741,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212570,7 +212788,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212582,7 +212800,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212611,7 +212829,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212690,7 +212908,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212705,14 +212923,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -212754,7 +212972,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212803,7 +213021,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -212818,14 +213036,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -212852,7 +213070,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213067,7 +213285,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213123,7 +213341,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213138,14 +213356,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -213177,7 +213395,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213229,7 +213447,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213240,7 +213458,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213280,7 +213498,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213350,7 +213568,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213365,14 +213583,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -213414,7 +213632,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213495,7 +213713,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213506,7 +213724,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213543,7 +213761,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213585,7 +213803,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213600,14 +213818,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -213629,7 +213847,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213685,7 +213903,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213700,14 +213918,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -213739,7 +213957,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213809,7 +214027,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213820,7 +214038,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213868,7 +214086,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213938,7 +214156,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -213953,14 +214171,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -214002,7 +214220,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214105,7 +214323,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214120,14 +214338,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -214184,7 +214402,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214218,7 +214436,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214229,7 +214447,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214250,7 +214468,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214334,7 +214552,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214349,14 +214567,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -214408,7 +214626,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214460,7 +214678,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214471,7 +214689,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214504,7 +214722,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214553,7 +214771,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214568,14 +214786,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -214602,7 +214820,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214648,7 +214866,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214659,7 +214877,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214687,7 +214905,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214726,7 +214944,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214737,7 +214955,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -214760,7 +214978,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215078,7 +215296,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215089,7 +215307,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215311,7 +215529,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215360,7 +215578,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215375,14 +215593,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -215409,7 +215627,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215465,7 +215683,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215480,7 +215698,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215521,7 +215739,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215566,7 +215784,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215577,7 +215795,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215608,7 +215826,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215653,7 +215871,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215664,7 +215882,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215693,7 +215911,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215900,7 +216118,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -215911,7 +216129,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216039,7 +216257,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216061,7 +216279,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216072,7 +216290,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216092,7 +216310,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216155,7 +216373,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216170,14 +216388,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -216214,7 +216432,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216305,7 +216523,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216320,14 +216538,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -216384,7 +216602,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216405,7 +216623,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216416,7 +216634,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216433,7 +216651,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216489,7 +216707,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216504,14 +216722,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -216543,7 +216761,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216673,7 +216891,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216773,7 +216991,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216788,14 +217006,14 @@ Not to be used when the patient is currently at the location"/> - + - + @@ -216867,7 +217085,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216968,7 +217186,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216983,7 +217201,7 @@ Not to be used when the patient is currently at the location"/> - + @@ -216992,7 +217210,7 @@ The type of operator to use for assertions."/> - + @@ -217054,7 +217272,7 @@ The type of operator to use for assertions."/> - + @@ -217099,7 +217317,7 @@ The type of operator to use for assertions."/> - + @@ -217114,7 +217332,7 @@ The type of operator to use for assertions."/> - + @@ -217123,7 +217341,7 @@ The direction to use for assertions."/> - + @@ -217145,7 +217363,7 @@ The direction to use for assertions."/> - + @@ -217222,7 +217440,7 @@ The direction to use for assertions."/> - + @@ -217292,7 +217510,7 @@ The direction to use for assertions."/> - + @@ -217355,7 +217573,7 @@ The direction to use for assertions."/> - + @@ -217370,14 +217588,14 @@ The direction to use for assertions."/> - + - + @@ -217414,7 +217632,7 @@ The direction to use for assertions."/> - + @@ -217462,7 +217680,7 @@ The direction to use for assertions."/> - + @@ -217473,7 +217691,7 @@ The direction to use for assertions."/> - + @@ -217511,7 +217729,7 @@ The direction to use for assertions."/> - + @@ -217567,7 +217785,7 @@ The direction to use for assertions."/> - + @@ -217582,14 +217800,14 @@ The direction to use for assertions."/> - + - + @@ -217621,7 +217839,7 @@ The direction to use for assertions."/> - + @@ -217719,7 +217937,7 @@ The direction to use for assertions."/> - + @@ -217734,14 +217952,14 @@ The direction to use for assertions."/> - + - + @@ -217803,7 +218021,7 @@ The direction to use for assertions."/> - + @@ -217870,7 +218088,7 @@ The direction to use for assertions."/> - + @@ -217881,7 +218099,7 @@ The direction to use for assertions."/> - + @@ -217926,7 +218144,7 @@ The direction to use for assertions."/> - + @@ -217982,7 +218200,7 @@ The direction to use for assertions."/> - + @@ -217993,7 +218211,7 @@ The direction to use for assertions."/> - + @@ -218031,7 +218249,7 @@ The direction to use for assertions."/> - + @@ -218080,7 +218298,7 @@ The direction to use for assertions."/> - + @@ -218091,7 +218309,7 @@ The direction to use for assertions."/> - + @@ -218124,7 +218342,7 @@ The direction to use for assertions."/> - + @@ -218148,7 +218366,7 @@ The direction to use for assertions."/> - + @@ -218163,7 +218381,7 @@ The direction to use for assertions."/> - + @@ -218186,7 +218404,7 @@ The direction to use for assertions."/> - + @@ -218249,7 +218467,7 @@ The direction to use for assertions."/> - + @@ -218260,7 +218478,7 @@ The direction to use for assertions."/> - + @@ -218303,7 +218521,7 @@ The direction to use for assertions."/> - + @@ -218380,7 +218598,7 @@ The direction to use for assertions."/> - + @@ -218395,14 +218613,14 @@ The direction to use for assertions."/> - + - + @@ -218449,7 +218667,7 @@ The direction to use for assertions."/> - + @@ -218522,7 +218740,7 @@ The direction to use for assertions."/> - + @@ -218535,7 +218753,7 @@ The direction to use for assertions."/> - + @@ -218570,7 +218788,7 @@ The direction to use for assertions."/> - + @@ -218633,7 +218851,7 @@ The direction to use for assertions."/> - + @@ -218644,7 +218862,7 @@ The direction to use for assertions."/> - + @@ -218687,7 +218905,7 @@ The direction to use for assertions."/> - + @@ -218790,7 +219008,7 @@ The direction to use for assertions."/> - + @@ -218805,7 +219023,7 @@ The direction to use for assertions."/> - + @@ -218905,7 +219123,7 @@ The direction to use for assertions."/> - + @@ -219000,7 +219218,7 @@ The direction to use for assertions."/> - + @@ -219011,7 +219229,7 @@ The direction to use for assertions."/> - + @@ -219067,7 +219285,7 @@ The direction to use for assertions."/> - + @@ -219167,7 +219385,7 @@ The direction to use for assertions."/> - + @@ -219178,7 +219396,7 @@ The direction to use for assertions."/> - + @@ -219250,7 +219468,7 @@ The direction to use for assertions."/> - + @@ -219288,7 +219506,7 @@ The direction to use for assertions."/> - + @@ -219299,7 +219517,7 @@ The direction to use for assertions."/> - + @@ -219322,7 +219540,7 @@ The direction to use for assertions."/> - + @@ -219378,7 +219596,7 @@ The direction to use for assertions."/> - + @@ -219393,14 +219611,14 @@ The direction to use for assertions."/> - + - + @@ -219432,7 +219650,7 @@ The direction to use for assertions."/> - + @@ -219488,7 +219706,7 @@ The direction to use for assertions."/> - + @@ -219503,14 +219721,14 @@ The direction to use for assertions."/> - + - + @@ -219542,7 +219760,7 @@ The direction to use for assertions."/> - + @@ -219577,7 +219795,7 @@ The direction to use for assertions."/> - + @@ -219607,7 +219825,7 @@ The direction to use for assertions."/> - + @@ -219670,7 +219888,7 @@ The direction to use for assertions."/> - + @@ -219685,14 +219903,14 @@ The direction to use for assertions."/> - + - + @@ -219729,7 +219947,7 @@ The direction to use for assertions."/> - + @@ -219792,7 +220010,7 @@ The direction to use for assertions."/> - + @@ -219807,14 +220025,14 @@ The direction to use for assertions."/> - + - + @@ -219846,7 +220064,7 @@ The direction to use for assertions."/> - + @@ -219892,7 +220110,7 @@ The direction to use for assertions."/> - + @@ -219903,7 +220121,7 @@ The direction to use for assertions."/> - + @@ -219931,7 +220149,7 @@ The direction to use for assertions."/> - + @@ -219994,7 +220212,7 @@ The direction to use for assertions."/> - + @@ -220009,14 +220227,14 @@ The direction to use for assertions."/> - + - + @@ -220053,7 +220271,7 @@ The direction to use for assertions."/> - + @@ -220074,7 +220292,7 @@ The direction to use for assertions."/> - + @@ -220085,7 +220303,7 @@ The direction to use for assertions."/> - + @@ -220108,7 +220326,7 @@ The direction to use for assertions."/> - + @@ -220137,7 +220355,7 @@ The direction to use for assertions."/> - + @@ -220148,7 +220366,7 @@ The direction to use for assertions."/> - + @@ -220171,7 +220389,7 @@ The direction to use for assertions."/> - + @@ -220241,7 +220459,7 @@ The direction to use for assertions."/> - + @@ -220256,14 +220474,14 @@ The direction to use for assertions."/> - + - + @@ -220305,7 +220523,7 @@ The direction to use for assertions."/> - + @@ -220354,7 +220572,7 @@ The direction to use for assertions."/> - + @@ -220369,14 +220587,14 @@ The direction to use for assertions."/> - + - + @@ -220403,7 +220621,7 @@ The direction to use for assertions."/> - + @@ -220425,7 +220643,7 @@ The direction to use for assertions."/> - + @@ -220436,7 +220654,7 @@ The direction to use for assertions."/> - + @@ -220466,7 +220684,7 @@ The direction to use for assertions."/> - + @@ -220508,7 +220726,7 @@ The direction to use for assertions."/> - + @@ -220523,14 +220741,14 @@ The direction to use for assertions."/> - + - + @@ -220552,7 +220770,7 @@ The direction to use for assertions."/> - + @@ -220575,7 +220793,7 @@ The direction to use for assertions."/> - + @@ -220590,7 +220808,7 @@ The direction to use for assertions."/> - + @@ -220631,7 +220849,7 @@ The direction to use for assertions."/> - + @@ -220685,7 +220903,7 @@ The direction to use for assertions."/> - + @@ -220696,7 +220914,7 @@ The direction to use for assertions."/> - + @@ -220733,7 +220951,7 @@ The direction to use for assertions."/> - + @@ -220796,7 +221014,7 @@ The direction to use for assertions."/> - + @@ -220807,7 +221025,7 @@ The direction to use for assertions."/> - + @@ -220850,7 +221068,7 @@ The direction to use for assertions."/> - + @@ -220892,7 +221110,7 @@ The direction to use for assertions."/> - + @@ -220907,14 +221125,14 @@ The direction to use for assertions."/> - + - + @@ -220936,7 +221154,7 @@ The direction to use for assertions."/> - + @@ -220956,7 +221174,7 @@ The direction to use for assertions."/> - + @@ -220967,7 +221185,7 @@ The direction to use for assertions."/> - + @@ -220984,7 +221202,7 @@ The direction to use for assertions."/> - + @@ -221033,7 +221251,7 @@ The direction to use for assertions."/> - + @@ -221048,14 +221266,14 @@ The direction to use for assertions."/> - + - + @@ -221082,7 +221300,7 @@ The direction to use for assertions."/> - + @@ -221152,7 +221370,7 @@ The direction to use for assertions."/> - + @@ -221163,7 +221381,7 @@ The direction to use for assertions."/> - + @@ -221209,7 +221427,7 @@ The direction to use for assertions."/> - + @@ -221331,7 +221549,7 @@ The direction to use for assertions."/> - + @@ -221342,7 +221560,7 @@ The direction to use for assertions."/> - + @@ -221404,7 +221622,7 @@ The direction to use for assertions."/> - + @@ -221616,7 +221834,7 @@ The direction to use for assertions."/> - + @@ -221627,7 +221845,7 @@ The direction to use for assertions."/> - + @@ -221789,7 +222007,7 @@ The direction to use for assertions."/> - + @@ -221859,7 +222077,7 @@ The direction to use for assertions."/> - + @@ -221870,7 +222088,7 @@ The direction to use for assertions."/> - + @@ -221910,7 +222128,7 @@ The direction to use for assertions."/> - + @@ -221959,7 +222177,7 @@ The direction to use for assertions."/> - + @@ -221974,14 +222192,14 @@ The direction to use for assertions."/> - + - + @@ -222008,7 +222226,7 @@ The direction to use for assertions."/> - + @@ -222048,7 +222266,7 @@ The direction to use for assertions."/> - + @@ -222059,7 +222277,7 @@ The direction to use for assertions."/> - + @@ -222084,7 +222302,7 @@ The direction to use for assertions."/> - + @@ -222133,7 +222351,7 @@ The direction to use for assertions."/> - + @@ -222144,7 +222362,7 @@ The direction to use for assertions."/> - + @@ -222177,7 +222395,7 @@ The direction to use for assertions."/> - + @@ -222233,7 +222451,7 @@ The direction to use for assertions."/> - + @@ -222248,14 +222466,14 @@ The direction to use for assertions."/> - + - + @@ -222287,7 +222505,7 @@ The direction to use for assertions."/> - + @@ -222310,7 +222528,7 @@ The direction to use for assertions."/> - + @@ -222321,7 +222539,7 @@ The direction to use for assertions."/> - + @@ -222345,7 +222563,7 @@ The direction to use for assertions."/> - + @@ -222385,7 +222603,7 @@ The direction to use for assertions."/> - + @@ -222396,7 +222614,7 @@ The direction to use for assertions."/> - + @@ -222422,7 +222640,7 @@ The direction to use for assertions."/> - + @@ -222443,7 +222661,7 @@ The direction to use for assertions."/> - + @@ -222454,7 +222672,7 @@ The direction to use for assertions."/> - + @@ -222477,7 +222695,7 @@ The direction to use for assertions."/> - + @@ -222536,7 +222754,7 @@ The direction to use for assertions."/> - + @@ -222551,7 +222769,7 @@ The direction to use for assertions."/> - + @@ -222560,7 +222778,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222592,7 +222810,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222647,7 +222865,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222662,14 +222880,14 @@ The use of an address (home / work / etc.)."/> - + - + @@ -222699,7 +222917,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222724,7 +222942,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222735,7 +222953,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222764,7 +222982,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222855,7 +223073,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222870,14 +223088,14 @@ The use of an address (home / work / etc.)."/> - + - + @@ -222934,7 +223152,7 @@ The use of an address (home / work / etc.)."/> - + @@ -222990,7 +223208,7 @@ The use of an address (home / work / etc.)."/> - + @@ -223001,7 +223219,7 @@ The use of an address (home / work / etc.)."/> - + @@ -223035,7 +223253,7 @@ The use of an address (home / work / etc.)."/> - + @@ -239539,7 +239757,7 @@ The use of an address (home / work / etc.)."/> - + @@ -239551,7 +239769,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252747,7 +252965,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252768,7 +252986,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252779,7 +252997,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252838,7 +253056,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252908,7 +253126,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252919,7 +253137,7 @@ The use of an address (home / work / etc.)."/> - + @@ -252964,7 +253182,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253055,7 +253273,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253076,7 +253294,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253087,7 +253305,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253103,7 +253321,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253162,7 +253380,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253185,7 +253403,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253196,7 +253414,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253220,7 +253438,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253310,7 +253528,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253425,7 +253643,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253546,7 +253764,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253602,7 +253820,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253629,7 +253847,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253640,7 +253858,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253657,7 +253875,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253765,7 +253983,7 @@ The use of an address (home / work / etc.)."/> - + @@ -253928,7 +254146,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254103,7 +254321,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254211,7 +254429,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254326,7 +254544,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254403,7 +254621,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254418,11 +254636,11 @@ The use of an address (home / work / etc.)."/> - + - + @@ -254469,7 +254687,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254490,7 +254708,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254501,7 +254719,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254524,7 +254742,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254573,7 +254791,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254584,7 +254802,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254614,7 +254832,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254718,7 +254936,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254733,11 +254951,11 @@ The use of an address (home / work / etc.)."/> - + - + @@ -254795,7 +255013,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254858,7 +255076,7 @@ The use of an address (home / work / etc.)."/> - + @@ -254873,11 +255091,11 @@ The use of an address (home / work / etc.)."/> - + - + @@ -254914,7 +255132,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255033,7 +255251,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255136,7 +255354,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255240,7 +255458,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255335,7 +255553,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255438,7 +255656,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255546,7 +255764,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255591,7 +255809,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255606,7 +255824,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255631,7 +255849,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255678,7 +255896,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255689,7 +255907,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255719,7 +255937,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255805,7 +256023,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255825,7 +256043,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255837,7 +256055,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255853,7 +256071,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255937,7 +256155,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255948,7 +256166,7 @@ The use of an address (home / work / etc.)."/> - + @@ -255985,7 +256203,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256048,7 +256266,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256059,7 +256277,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256108,7 +256326,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256129,7 +256347,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256140,7 +256358,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256163,7 +256381,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256271,7 +256489,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256294,7 +256512,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256305,7 +256523,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256325,7 +256543,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256346,7 +256564,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256358,7 +256576,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256385,7 +256603,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256405,7 +256623,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256417,7 +256635,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256433,7 +256651,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256451,7 +256669,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256462,7 +256680,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256478,7 +256696,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256613,7 +256831,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256721,7 +256939,7 @@ The use of an address (home / work / etc.)."/> - + @@ -256824,7 +257042,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257004,7 +257222,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257025,7 +257243,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257037,7 +257255,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257054,7 +257272,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257164,7 +257382,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257175,7 +257393,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257239,7 +257457,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257267,7 +257485,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257278,7 +257496,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257332,7 +257550,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257353,7 +257571,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257364,7 +257582,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257386,7 +257604,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257407,7 +257625,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257418,7 +257636,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257441,7 +257659,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257558,7 +257776,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257648,7 +257866,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257797,7 +258015,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257863,7 +258081,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257905,7 +258123,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257916,7 +258134,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257941,7 +258159,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257988,7 +258206,7 @@ The use of an address (home / work / etc.)."/> - + @@ -257999,7 +258217,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258025,7 +258243,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258046,7 +258264,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258057,7 +258275,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258080,7 +258298,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258143,7 +258361,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258154,7 +258372,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258203,7 +258421,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258306,7 +258524,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258401,7 +258619,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258422,7 +258640,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258433,7 +258651,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258480,7 +258698,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258597,7 +258815,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258700,7 +258918,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258817,7 +259035,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258915,7 +259133,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258926,7 +259144,7 @@ The use of an address (home / work / etc.)."/> - + @@ -258991,7 +259209,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259031,7 +259249,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259046,7 +259264,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259068,7 +259286,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259143,7 +259361,7 @@ The use of an address (home / work / etc.)."/> ASKU Asked but no answer - Information was sought but not found (e.g. patient was asked but didn't know) + Information was sought but not found (e.g., patient was asked but didn't know) @@ -259154,7 +259372,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259171,7 +259389,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259218,7 +259436,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259239,7 +259457,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259250,7 +259468,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259273,7 +259491,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259294,7 +259512,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259305,7 +259523,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259358,7 +259576,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259379,7 +259597,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259391,7 +259609,7 @@ The use of an address (home / work / etc.)."/> - + @@ -259418,7 +259636,7 @@ The use of an address (home / work / etc.)."/> - + @@ -260285,7 +260503,7 @@ The use of an address (home / work / etc.)."/> - + @@ -260296,7 +260514,7 @@ The use of an address (home / work / etc.)."/> - + @@ -260980,7 +261198,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261092,7 +261310,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261103,7 +261321,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261178,7 +261396,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261269,7 +261487,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261284,11 +261502,11 @@ The use of an address (home / work / etc.)."/> - + - + @@ -261345,7 +261563,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261408,7 +261626,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261423,11 +261641,11 @@ The use of an address (home / work / etc.)."/> - + - + @@ -261464,7 +261682,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261558,7 +261776,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261617,7 +261835,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261638,7 +261856,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261649,7 +261867,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261666,7 +261884,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261721,7 +261939,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261838,7 +262056,7 @@ The use of an address (home / work / etc.)."/> - + @@ -261902,7 +262120,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262059,7 +262277,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262082,7 +262300,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262093,7 +262311,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262121,7 +262339,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262191,7 +262409,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262202,7 +262420,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262247,7 +262465,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262338,7 +262556,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262433,7 +262651,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262444,7 +262662,7 @@ The use of an address (home / work / etc.)."/> - + @@ -262497,7 +262715,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262677,7 +262895,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262736,7 +262954,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262785,7 +263003,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262800,11 +263018,11 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + - + @@ -262831,7 +263049,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262856,7 +263074,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262869,7 +263087,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -262929,7 +263147,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263068,7 +263286,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263176,7 +263394,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263284,7 +263502,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263379,7 +263597,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263402,7 +263620,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263413,7 +263631,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263435,7 +263653,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263530,7 +263748,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263625,7 +263843,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263647,7 +263865,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263658,7 +263876,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263689,7 +263907,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263710,7 +263928,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263721,7 +263939,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263750,7 +263968,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263775,7 +263993,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263786,7 +264004,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -263816,7 +264034,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -264463,7 +264681,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -264474,7 +264692,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -264982,7 +265200,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265072,7 +265290,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265185,7 +265403,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265347,7 +265565,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265424,7 +265642,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265435,7 +265653,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265485,7 +265703,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265534,7 +265752,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265549,11 +265767,11 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + - + @@ -265580,7 +265798,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265636,7 +265854,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265647,7 +265865,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265682,7 +265900,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265731,7 +265949,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265742,7 +265960,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265772,7 +265990,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265793,7 +266011,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265804,7 +266022,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265825,7 +266043,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265928,7 +266146,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265951,7 +266169,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265962,7 +266180,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -265986,7 +266204,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266245,7 +266463,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266260,7 +266478,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266310,7 +266528,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266352,7 +266570,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266367,11 +266585,11 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + - + @@ -266391,7 +266609,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266495,7 +266713,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266648,7 +266866,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266743,7 +266961,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266863,7 +267081,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266914,7 +267132,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -266974,7 +267192,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no ASKU Asked but no answer - Information was sought but not found (e.g. patient was asked but didn't know) + Information was sought but not found (e.g., patient was asked but didn't know) @@ -266988,7 +267206,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -267005,7 +267223,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -267040,7 +267258,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + @@ -267082,7 +267300,7 @@ Code System(s) SNOMED CT 2.16.840.1.113883.6.96 Note the base resource does no - + diff --git a/hapi-tinder-plugin/src/main/resources/dt/dstu21/elementdefinition.xml b/hapi-tinder-plugin/src/main/resources/dt/dstu21/elementdefinition.xml index a36159e96b9..14fcef814ba 100644 --- a/hapi-tinder-plugin/src/main/resources/dt/dstu21/elementdefinition.xml +++ b/hapi-tinder-plugin/src/main/resources/dt/dstu21/elementdefinition.xml @@ -17,7 +17,7 @@ 12975 - 24000 + 28800 0 0 694 @@ -4507,7 +4507,7 @@ ElementDefinition Min <= Max - min.empty() or max.empty() or (max = "*") or (min < max) + min.empty() or max.empty() or (max = "*") or (min <= max.asInteger()) not(exists(f:min)) or not(exists(f:max)) or (not(f:max/@value) and not(f:min/@value)) or (f:max/@value = '*') or (number(f:max/@value) >= f:min/@value) @@ -4991,7 +4991,7 @@ 1 - 4 + 1 2 2 0 @@ -5004,11 +5004,10 @@ 2 - 1 0 - 12 + 3 6 diff --git a/hapi-tinder-plugin/src/main/resources/dt/dstu21/range.xml b/hapi-tinder-plugin/src/main/resources/dt/dstu21/range.xml index adc625e5e6d..5cee0514e1f 100644 --- a/hapi-tinder-plugin/src/main/resources/dt/dstu21/range.xml +++ b/hapi-tinder-plugin/src/main/resources/dt/dstu21/range.xml @@ -3564,7 +3564,7 @@ If present, low SHALL have a lower value than high - low.empty() or high.empty() or (low.value <= high.value)low.empty() or high.empty() or (low <= high) not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value)) diff --git a/hapi-tinder-plugin/src/main/resources/dt/dstu21/reference.xml b/hapi-tinder-plugin/src/main/resources/dt/dstu21/reference.xml index f1043d08b01..5d495d4f527 100644 --- a/hapi-tinder-plugin/src/main/resources/dt/dstu21/reference.xml +++ b/hapi-tinder-plugin/src/main/resources/dt/dstu21/reference.xml @@ -16,8 +16,8 @@ - 12975 - 28800 + 16575 + -27136 0 0 2 @@ -3567,7 +3567,7 @@ SHALL have a local reference if the resource is provided inline - reference.startsWith("#").not() or ($context.reference.substring(1) in $resource.contained)reference.startsWith("#").not() or ($context.reference.substring(1).log("url") in $resource.contained.id.log("ids")) not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]) @@ -4086,7 +4086,7 @@ 0 - 6 + 5 False diff --git a/hapi-tinder-plugin/src/main/resources/dt/dstu21/timing.xml b/hapi-tinder-plugin/src/main/resources/dt/dstu21/timing.xml index d9115a24b7e..191c59c9abb 100644 --- a/hapi-tinder-plugin/src/main/resources/dt/dstu21/timing.xml +++ b/hapi-tinder-plugin/src/main/resources/dt/dstu21/timing.xml @@ -3817,7 +3817,7 @@ Timing.repeat Either frequency or when can exist, not both - (period.empty() and frequency.empty()) xor when.empty() + ((period or frequency) and when).not() not((f:period or f:frequency) and f:when) diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/bundle-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/bundle-spreadsheet.xml index 5ab91bf247b..ee8d1924b13 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/bundle-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/bundle-spreadsheet.xml @@ -3980,7 +3980,7 @@ error Bundle total only when a search or history - total or (type = ' searchset') or (type = 'history') + total.empty() or (type = 'searchset') or (type = 'history') not(f:total) or (f:type/@value = 'searchset') or (f:type/@value = 'history') @@ -4040,7 +4040,7 @@ error Bundle FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId - entry.distinct(fullUrl,resource.meta.versionId) + entry.where(fullUrl).distinct(fullUrl,resource.meta.versionId) count(for $entry in f:entry[f:resource] return $entry[count(parent::f:Bundle/f:entry[f:fullUrl/@value=$entry/f:fullUrl/@value and ((not(f:resource/*/f:meta/f:versionId/@value) and not($entry/f:resource/*/f:meta/f:versionId/@value)) or f:resource/*/f:meta/f:versionId/@value=$entry/f:resource/*/f:meta/f:versionId/@value)])!=1])=0 diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/contract-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/contract-spreadsheet.xml index 8be0d7340f5..3c024a2a48a 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/contract-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/contract-spreadsheet.xml @@ -20,7 +20,7 @@ 19170 0 0 - 9 + 6 False False @@ -6590,7 +6590,7 @@ IG Name - consent + !consent contract-consent.xml contract-consent-profile-spreadsheet.xml spreadsheet @@ -6833,6 +6833,7 @@ + 1 @@ -6853,7 +6854,6 @@ 0 2 - 0 False @@ -7852,7 +7852,6 @@ 600 600 - 1 diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml index 417a8014b11..01953399102 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml @@ -10,7 +10,7 @@ Grahame Bryn 2012-03-19T11:12:07Z - 2015-11-23T16:44:01Z + 2015-12-04T18:47:25Z 15.00 @@ -20,12 +20,11 @@ - 8355 + 8370 21570 0 0 - 1 - 1 + 4 False False @@ -745,15 +744,6 @@ - + @@ -837,12 +832,12 @@ - + - - + @@ -1087,13 +1082,46 @@ - DecisionSupportServiceModule.moduleDefinitionDecisionSupportServiceModule.parameter + + 0..* + + + + + + + + + + + + Parameters to the module + + + + + + + + + + + + DecisionSupportServiceModule.parameter.name 1..1 - Reference(ModuleDefinition)code + + + ! @@ -1101,11 +1129,7 @@ - - - Data requirements for the module - A reference to a ModuleDefinition resource describing the data requirements for the service moduleThe name of the parameter @@ -1118,21 +1142,26 @@ - + DecisionSupportServiceModule.parameter.use + + 1..1 + + code + + + ModuleDefinitionParameterUse - - - - - - - - + Whether the parameter is input or output for the module @@ -1144,7 +1173,14 @@ - + DecisionSupportServiceModule.parameter.documentation + + 0..1 + + string @@ -1154,11 +1190,8 @@ - - - - - + A brief description of the parameter @@ -1170,21 +1203,26 @@ - + DecisionSupportServiceModule.parameter.type + + 1..1 + + code + + + ModuleDefinitionParameterType - - - - - - - - + The type of the parameter @@ -1196,7 +1234,14 @@ - + DecisionSupportServiceModule.parameter.profile + + 0..1 + + Reference(StructureDefinition) @@ -1206,11 +1251,8 @@ - - - - - + The profile of the parameter, if any @@ -1222,7 +1264,14 @@ - + DecisionSupportServiceModule.parameter.mustSupport + + 0..* + + string @@ -1231,12 +1280,10 @@ - - - - - - + Indicates that specific structure elements are referenced by the knowledge module + Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available @@ -1248,7 +1295,11 @@ - + DecisionSupportServiceModule.parameter.codeFilter + + 0..* @@ -1260,9 +1311,8 @@ - - - + Code filters for the required data, if any @@ -1274,7 +1324,14 @@ - + DecisionSupportServiceModule.parameter.codeFilter.path + + 1..1 + + string @@ -1283,12 +1340,10 @@ - - - - - - + The code-valued attribute of the filter + The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept @@ -1300,7 +1355,14 @@ - + DecisionSupportServiceModule.parameter.codeFilter.valueSet[x] + + 0..1 + + string|Reference(ValueSet) @@ -1309,12 +1371,10 @@ - - - - - - + The valueset for the code filter + The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset @@ -1326,7 +1386,14 @@ - + DecisionSupportServiceModule.parameter.codeFilter.codeableConcept + + 0..* + + CodeableConcept @@ -1335,12 +1402,10 @@ - - - - - - + The codeableConcepts for the filter + The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts @@ -1352,7 +1417,11 @@ - + DecisionSupportServiceModule.parameter.dateFilter + + 0..* @@ -1364,9 +1433,8 @@ - - - + Date filters for the required data, if any @@ -1378,7 +1446,14 @@ - + DecisionSupportServiceModule.parameter.dateFilter.path + + 1..1 + + string @@ -1387,12 +1462,10 @@ - - - - - - + The date-valued attribute of the filter + The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing @@ -1404,7 +1477,14 @@ - + DecisionSupportServiceModule.parameter.dateFilter.value[x] + + 0..1 + + dateTime|Period @@ -1413,64 +1493,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + The value of the filter, as a Period or dateTime value + The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime @@ -3574,13 +3600,12 @@ 600 600 - 1 1 1 - 8 + 1 0 @@ -3588,21 +3613,20 @@ 1 - 1 2 0 - 2 - 13 + 4 + 0 False False - @@ -4411,9 +4435,9 @@ -
    - + @@ -4459,58 +4483,85 @@ ss:Name="_FilterDatabase"/> - - + evaluate + Instance + operation - - - + Evaluate + The evaluate operation requests clinical decision support guidance based on a specific decision support module - + evaluate.requestId + in + 0 + 1 + code + - - - - - - + An optional client-provided identifier to track the request - - - - + evaluate.evaluateAtDateTime + in + 0 + 1 + datetime - - + An optional date and time specifying that the evaluation should be performed as thought it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the date and time of the request is assumed - - - - + evaluate.inputParameters + in + 0 + 1 + Parameters - - + The input parameters for a request, if any. These parameters are defined by the module that is the target of the evaluation, and supply the input information to the module. - - - - + evaluate.setting + in + 0 + 1 + CodeableConcept + The current setting of the request (inpatient, outpatient, etc) + + + + evaluate.settingContext + in + 0 + 1 + CodeableConcept - + + Additional detail about the setting of the request, if any + + + + evaluate.response + out + 1 + * + GuidanceResponse + + + The results of the request(s) @@ -5006,6 +5057,7 @@ + 1 @@ -5033,6 +5085,38 @@ + + R7C8 + + RC6="0..0" + + + + AND(RC<>"",RC1="") + + + + + R7C8 + + (RC1="")<>(RC="") + + + + + R7C8 + + AND(RC14<>"",RC14=RC15) + + + + + R7C8 + + LEFT(RC1,1)="!" + + + @@ -6137,11 +6221,12 @@ ss:Name="_FilterDatabase"/> - - - - - + ModuleDefinitionParameterType + The type of the parameter + value set + required + http://hl7.org/fhir/ValueSet/operation-parameter-type @@ -6152,11 +6237,12 @@ - - - - - + ModuleDefinitionParameterUse + Whether the parameter is input or output + value set + required + http://hl7.org/fhir/ValueSet/operation-parameter-use @@ -6604,7 +6690,8 @@ 0 - 3 + 7 + 0 False diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/expansionprofile-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/expansionprofile-spreadsheet.xml index a580c2ab136..c8c0f1a6f9a 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/expansionprofile-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/expansionprofile-spreadsheet.xml @@ -1,4 +1,5 @@ + Microsoft Office User 2012-03-19T11:12:07Z 2015-11-26T01:19:28Z - 15.0 + 15.00 - 27020 - 51200 + 6420 + 13410 0 - 460 + 0 2 False @@ -34,7 +35,7 @@ + + + + + + + + + + - - - - - - - - - - - - - + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + @@ -2843,7 +2854,7 @@ Error code detailing processing issues - An error code,froma specified code system, which details why the claim could not be adjudicated.An error code,from a specified code system, which details why the claim could not be adjudicated. @@ -2917,7 +2928,7 @@ - ClaimResponse.unallocDeductableClaimResponse.unallocDeductable 0..1 - AdjustmentReasonPaymentAdjustmentReason @@ -4262,9 +4273,9 @@ 1 - 1 + 10 1 - 2 + 3 0 @@ -4276,10 +4287,12 @@ 2 + 1 0 - 20 + 11 + 0 False @@ -4821,7 +4834,7 @@ -
    @@ -4857,60 +4870,46 @@ The identity of the insurer - !request + request reference ClaimResponse.request - The identity of the insurer + The claim reference - !organization + organization reference ClaimResponse.organization The organization who generated this resource - + outcome + token - - - + ClaimResponse.outcome + The processing outcome - + created + date - - - + ClaimResponse.created + The creation date - + disposition + string - - - + ClaimResponse.disposition + The contents of the disposition message - + paymentdate + date - - - - - - - - - - - - - - - - - + ClaimResponse.paymentDate + The expected paymentDate @@ -5061,6 +5060,7 @@ + 1 @@ -5080,7 +5080,7 @@ 0 - 0 + 9 False @@ -6801,12 +6801,12 @@ -
    - + - + @@ -6882,11 +6882,26 @@ - AdjustmentReason - Adjustment reason codes. + AdjudicationReason + The adjudication reason codes. value set extensible - valueset-adjustment-reason + valueset-adjudication-reason + + + + + + + + + + + PaymentAdjustmentReason + Payment Adjustment reason codes. + value set + extensible + valueset-payment-adjustment-reason @@ -6912,11 +6927,11 @@ - - - - - + AdjudicationError + The adjudication error codes. + value set + extensible + http://hl7.org/fhir/ValueSet/adjudication-error @@ -7255,7 +7270,6 @@ 600 600 - 1 @@ -7275,7 +7289,8 @@ 0 - 0 + 11 + 4 False diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/coverage-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/coverage-spreadsheet.xml index 6ae65ab1bbd..b8345495f57 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/coverage-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/coverage-spreadsheet.xml @@ -16,12 +16,11 @@ - 11175 - 28800 + 7425 + 18315 0 0 - 1 - + 3 False False @@ -3861,7 +3860,6 @@ 600 600 - 1 @@ -4518,11 +4516,11 @@ Covered party - + subscriber + reference - - - + Coverage.subscriber + Reference to the subscriber @@ -4666,6 +4664,7 @@ + 1 @@ -4685,8 +4684,8 @@ 0 - 17 - 3 + 14 + 4 False diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportrule-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportrule-spreadsheet.xml index 55e961dbc72..c367cd2609e 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportrule-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportrule-spreadsheet.xml @@ -10,7 +10,7 @@ Grahame Bryn 2012-03-19T11:12:07Z - 2015-11-17T22:03:35Z + 2015-12-07T23:17:55Z 15.00 @@ -20,109 +20,11 @@ - - \Users\Bryn\Documents\Src\HL7\FHIR-Dev\source\knowledgemodule\knowledgemodule-spreadsheet.xml - Instructions - Data Elements - Invariants - Search - Operations - Events - Profiles - Examples - Bindings - some-code-list - knowledge-module-type - knowledge-module-status - knowledge-module-focus-type - knowledge-module-resource-type - knowledge-module-contributor - knowledge-module-trigger-type - knowledge-module-participant - knowledge-module-action-type - knowledge-module-population - - 0 - 0 - - - 0 - 1 - - - 0 - 2 - - - 0 - 3 - - - 0 - 4 - - - 0 - 5 - - - 0 - 6 - - - 0 - 7 - - - 0 - 8 - - - 0 - 9 - - - 0 - 10 - - - 0 - 11 - - - 0 - 12 - - - 0 - 13 - - - 0 - 14 - - - 0 - 15 - - - 0 - 16 - - - 0 - 17 - - - 0 - 18 - - - 8355 + 8370 21570 0 0 - 1 + 4 1 False @@ -390,7 +292,7 @@ - - + - + - + - + - - - + - - + - - - - + - + - - + @@ -3717,30 +3624,30 @@ - - - - - - - - - - - - - - + + + + + + + + + + + - + - + + + +
    @@ -3755,11 +3662,10 @@ 600 600 - 1 - 13 + 1 1 1 0 @@ -3772,12 +3678,11 @@ 2 - 1 0 - 28 - 0 + 5 + 14 False @@ -3787,7 +3692,7 @@ xmlns="urn:schemas-microsoft-com:office:excel"> - R7C15:R11C15 + R7C15:R11C15,R14C15:R28C15 RC6="0..0" @@ -3798,53 +3703,21 @@ - R7C15:R11C15 + R7C15:R11C15,R14C15:R28C15 (RC1="")<>(RC="") - R7C15:R11C15 + R7C15:R11C15,R14C15:R28C15 AND(RC14<>"",RC14=RC15) - R7C15:R11C15 - - LEFT(RC1,1)="!" - - - - - R14C15:R28C15 - - RC6="0..0" - - - - AND(RC<>"",RC1="") - - - - - R14C15:R28C15 - - (RC1="")<>(RC="") - - - - - R14C15:R28C15 - - AND(RC14<>"",RC14=RC15) - - - - - R14C15:R28C15 + R7C15:R11C15,R14C15:R28C15 LEFT(RC1,1)="!" @@ -3857,484 +3730,484 @@ ss:Hidden="1"/>
    - - - - - - + x:FullRows="1" ss:StyleID="s101" ss:DefaultRowHeight="15"> + + + + + + - IdId Unique Number - NameName Unique short label - SeveritySeverity Indicates impact of violating the invariant. (Defaults to 'error') - ContextContext Element path at which check should occur; e.g. ResourceName.element1.element2 - EnglishEnglish English description of constraint - OCLOCL Optional - OCL expression of the rule - XPathXPath XPath 2 expression. See wiki or make Lloyd do it :> - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + +
    @@ -4384,235 +4257,235 @@ ss:Hidden="1"/> - - - - - - - Name + + + + + + + NameUnique name for search parameter - required, lower-case, dash-delimited string - TypeType Data type for parameter - Target TypesTarget Types Comma delimited list of target resources - PathPath Corresponding resource element; e.g. ResourceName.node1.node2 - DescriptionDescription Explanation of param. Will default if omitted and Path is specified, otherwise it is required - - - + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @@ -4657,590 +4530,595 @@ ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s112" ss:DefaultRowHeight="15"> + + + + + + + - NameName The name of the operation or parameter (parameters prefixed by operation name + ".") - UseUse "System | Resource | Instance" (operation) "In" or "Out" (parameter) - MinMin Minimum cardinality for a parameter (must be a non-negative integer) - MaxMax maximum cardinality for a parameter - must be "*" or a positive integer - TypeType query/operation for operation; data type for a parameter - ProfileProfile Profile that must apply to parameter's type - TitleTitle The descriptive label for the operation - DocumentationDocumentation Explanation of the operation or parameter - FooterFooter Additional usage notes for an operation - - - - - - - + evaluate + Instance - + + operation + + Evaluate + The evaluate operation requests clinical decision support guidance based on a specific decision support module + - - - - - - - - - + evaluate.requestId + in + 0 + 1 + code + + + An optional client-provided identifier to track the request + - - - - - - - - - + evaluate.evaluateAtDateTime + in + 0 + 1 + datetime + + + An optional date and time specifying that the evaluation should be performed as thought it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the date and time of the request is assumed + - - - - - - - - - + evaluate.inputParameters + in + 0 + 1 + Parameters + + + The input parameters for a request, if any. These parameters are defined by the module that is the target of the evaluation, and supply the input information to the module. + - - - - - - - - - + evaluate.setting + in + 0 + 1 + CodeableConcept + + + The current setting of the request (inpatient, outpatient, etc) + - - - - - - - - - + evaluate.settingContext + in + 0 + 1 + CodeableConcept + + + Additional detail about the setting of the request, if any + - - - - - - - - - + evaluate.return + out + 1 + 1 + GuidanceResponse + + + The result of the request as a GuidanceResponse resource. Output parameters, if any, will be contained in the parameters element of the response + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + +
    @@ -5251,6 +5129,7 @@ + 1 @@ -5270,6 +5149,7 @@ 0 + 10 0 @@ -5278,6 +5158,38 @@ + + R7C8 + + RC6="0..0" + + + + AND(RC<>"",RC1="") + + + + + R7C8 + + (RC1="")<>(RC="") + + + + + R7C8 + + AND(RC14<>"",RC14=RC15) + + + + + R7C8 + + LEFT(RC1,1)="!" + + + @@ -5285,255 +5197,255 @@ ss:Hidden="1"/> - - - - - - - - + x:FullRows="1" ss:StyleID="s112" ss:DefaultRowHeight="15"> + + + + + + + + - Event CodeEvent Code Unique code for the event; e.g. patient-link - CategoryCategory Impact of message and time-sensitiveness for processing (see wiki/spec) - DescriptionDescription What triggers the event and what behavior it drives - NotesNotes Additional implementer guidance - Request ResourcesRequest Resources Comma-separated list of focal resources for request - Response ResourcesResponse Resources Comma-separated list of focal resources for response - Request AggregationsRequest Aggregations - Response AggregationsResponse Aggregations - Follow UpsFollow Ups - + - - - - - - - - + + + + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @@ -5583,262 +5495,262 @@ - - - - + x:FullRows="1" ss:StyleID="s112" ss:DefaultRowHeight="15"> + + + + - NameName Label for profile Comment the row by starting with '!' - FilenameFilename Name of the resulting profile resource-something-profile.xml or …profile.spreadsheet.xml - SourceSource Name of profile spreadsheet or XML file. Defaults to same as Filename - TypeType Type of source (spreadsheet or profile XML file). Default is spreadsheet - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @@ -5883,394 +5795,394 @@ ss:Hidden="1"/> - - - - - - + + + + + + - NameName Descriptive Name - TypeType Default = XML. Leave at default unless told otherwise - DescriptionDescription Description of content/purposes of example - IdentityIdentity resource id - FilenameFilename Filename of XML example file; e.g. resource-example-file-name.xml - ProfileProfile Name of the profile example is associated with (and should be published with) - In BookIn Book Include this example in the book form? - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + +
    @@ -6315,68 +6227,68 @@ ss:Hidden="1"/> - - - - - - - - - - - - + x:FullRows="1" ss:StyleID="s112" ss:DefaultRowHeight="15"> + + + + + + + + + + + + - Binding NameBinding Name Unique name across all resources - DefinitionDefinition Formal description of the types of codes allowed for elements with this binding - BindingBinding How is the set of codes defined? - ConformanceConformance required, preferred, example, or extensible - ReferenceReference #tab-name or value set filename(without extension) or URL for reference - DescriptionDescription Text to display for reference bindings (not used otherwise) - OIDOID The OID for the code list if one already exists. (If omitted, one will be assigned) - URIURI Full URI for the code list. (If not specified, defaults to http://hl7.org/fhir/ValueSet - Website/EmailWebsite/Email Contact information for the code list (if different from standard HL7 FHIR contact info) - CopyrightCopyright Copyright information associated with the code list. If not specified, Public Domain assumed - v2v2 uri of v2 value set mapped to - v3v3 uri of v3 value set mapped to - Committee NotesCommittee Notes Unpublished notes @@ -6384,437 +6296,437 @@ DecisionSupportRuleTriggerType The type of trigger - code list - required - #cds-rule-trigger-type - - - - - - - + code list + required + #cds-rule-trigger-type + + + + + + + DecisionSupportRuleParticipantType The type of participant for an action in the module - code list - required - #cds-rule-participant - - - - - - - + code list + required + #cds-rule-participant + + + + + + + DecisionSupportRuleActionType The type of action to be performed - code list - extensible - #cds-rule-action-type - - - - - - - + code list + extensible + #cds-rule-action-type + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + +
    @@ -6866,590 +6778,590 @@ ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s137" ss:DefaultRowHeight="15"> + + + + + + + - CodeCode The code to be sent over the wire - IdId Unique number for the code. Required when System is not specified, not permitted otherwise - SystemSystem The URL of the external code system from which the list is selected. Must be the same for all codes if specified. - ParentParent The code this code is a specialization of (if any). Content should be "#" + the Id of the parent code - DisplayDisplay Display value for code. Omit if the code *is* the display value (as for internal codes) - DefinitionDefinition Meaning of the code. Include unless meaning obvious to all users. Required if display not - v2v2 Mappings to v2 codes - See wiki for syntax - v3v3 Mappings to v3 codes - See wiki for syntax - Committee NotesCommittee Notes Additional notes about the code. Not published - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + +
    @@ -7494,590 +7406,590 @@ ss:RefersTo="='cds-rule-trigger-type'!R1C1:R1C9" ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s137" ss:DefaultRowHeight="15"> + + + + + + + - CodeCode The code to be sent over the wire - IdId Unique number for the code. Required when System is not specified, not permitted otherwise - SystemSystem The URL of the external code system from which the list is selected. Must be the same for all codes if specified. - ParentParent The code this code is a specialization of (if any). Content should be "#" + the Id of the parent code - DisplayDisplay Display value for code. Omit if the code *is* the display value (as for internal codes) - DefinitionDefinition Meaning of the code. Include unless meaning obvious to all users. Required if display not - v2v2 Mappings to v2 codes - See wiki for syntax - v3v3 Mappings to v3 codes - See wiki for syntax - Committee NotesCommittee Notes Additional notes about the code. Not published - named-event - 1 - + named-event + 1 + Named Event The trigger occurs in response to a specific named event - - - + + + - periodic - 2 - + periodic + 2 + Periodic The trigger occurs at a specific time or periodically as described by a timing or schedule - - - + + + - data-added - 3 - + data-added + 3 + Data Added The trigger occurs whenever data of a particular type is added - - - + + + - data-modified - 4 - + data-modified + 4 + Data Modified The trigger occurs whenever data of a particular type is modified - - - + + + - data-removed - 5 - + data-removed + 5 + Data Removed The trigger occurs whenever data of a particular type is removed - - - + + + - data-accessed - 6 - + data-accessed + 6 + Data Accessed The trigger occurs whenever data of a particular type is accessed - - - + + + - data-access-ended - 7 - + data-access-ended + 7 + Data Access Ended The trigger occurs whenever access to data of a particular type is completed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + +
    @@ -8165,590 +8077,590 @@ ss:RefersTo="='cds-rule-participant'!R1C1:R1C9" ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s137" ss:DefaultRowHeight="15"> + + + + + + + - CodeCode The code to be sent over the wire - IdId Unique number for the code. Required when System is not specified, not permitted otherwise - SystemSystem The URL of the external code system from which the list is selected. Must be the same for all codes if specified. - ParentParent The code this code is a specialization of (if any). Content should be "#" + the Id of the parent code - DisplayDisplay Display value for code. Omit if the code *is* the display value (as for internal codes) - DefinitionDefinition Meaning of the code. Include unless meaning obvious to all users. Required if display not - v2v2 Mappings to v2 codes - See wiki for syntax - v3v3 Mappings to v3 codes - See wiki for syntax - Committee NotesCommittee Notes Additional notes about the code. Not published - patient - 1 - + patient + 1 + Patient The participant is the patient under evaluation - - - + + + - person - 2 - + person + 2 + Person The participant is a person - - - + + + - practitioner - 3 - + practitioner + 3 + Practitioner The participant is a practitioner involved in the patient's care - - - + + + - related-person - 4 - + related-person + 4 + Related Person The participant is a person related to the patient - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + +
    @@ -8793,590 +8705,590 @@ ss:RefersTo="='cds-rule-action-type'!R1C1:R1C9" ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s137" ss:DefaultRowHeight="15"> + + + + + + + - CodeCode The code to be sent over the wire - IdId Unique number for the code. Required when System is not specified, not permitted otherwise - SystemSystem The URL of the external code system from which the list is selected. Must be the same for all codes if specified. - ParentParent The code this code is a specialization of (if any). Content should be "#" + the Id of the parent code - DisplayDisplay Display value for code. Omit if the code *is* the display value (as for internal codes) - DefinitionDefinition Meaning of the code. Include unless meaning obvious to all users. Required if display not - v2v2 Mappings to v2 codes - See wiki for syntax - v3v3 Mappings to v3 codes - See wiki for syntax - Committee NotesCommittee Notes Additional notes about the code. Not published - create - 1 - + create + 1 + Create The action is to create a new resource - - - + + + - update - 2 - + update + 2 + Update The action is to update an existing resource - - - + + + - remove - 3 - + remove + 3 + Remove The action is to remove an existing resource - - - + + + - fire-event - 4 - + fire-event + 4 + Fire Event The action is to fire a specific event - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + +
    diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml index 01953399102..b341851978d 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/decisionsupportservicemodule-spreadsheet.xml @@ -10,7 +10,7 @@ Grahame Bryn 2012-03-19T11:12:07Z - 2015-12-04T18:47:25Z + 2015-12-07T23:17:55Z 15.00 @@ -635,13 +635,18 @@ - + - - - + - + - - - - - - - @@ -1097,8 +1097,9 @@ - - Parameters to the moduleParameters to the module + The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse @@ -1114,7 +1115,7 @@ DecisionSupportServiceModule.parameter.name - 1..10..1 code - + Parameter name The name of the parameter @@ -1189,8 +1191,9 @@ - - A brief description of the parameterA brief description of the parameter + A brief discussion of what the parameter is for and how it is used by the module @@ -1250,8 +1253,9 @@ - - The profile of the parameter, if anyThe profile of the parameter, any + If specified, this indicates a profile that the input data must conform to, or that the output data will conform to @@ -1310,8 +1314,9 @@ - - Code filters for the required data, if anyCode filters for the required data, if any + Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts) @@ -1361,7 +1366,7 @@ 0..1 - string|Reference(ValueSet)uri|Reference(ValueSet) @@ -1432,8 +1437,9 @@ - - Date filters for the required data, if anyDate filters for the required data, if any + Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period) @@ -3605,7 +3611,7 @@ 1 1 1 - 1 + 6 0 @@ -3613,6 +3619,7 @@ 1 + 1 2 @@ -3620,7 +3627,7 @@ 0 4 - 0 + 14 False @@ -4435,7 +4442,7 @@ - @@ -4481,6 +4488,8 @@ ss:Author=""> Additional usage notes for an operation + Example.Request + Example.Response evaluateThe evaluate operation requests clinical decision support guidance based on a specific decision support module + $evaluate-request.txt + $evaluate-response.txt evaluate.requestId @@ -4504,10 +4515,10 @@ 0 1 code - + - An optional client-provided identifier to track the request - + An optional client-provided identifier to track the request + evaluate.evaluateAtDateTime @@ -4517,8 +4528,8 @@ datetime - An optional date and time specifying that the evaluation should be performed as thought it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the date and time of the request is assumed - + An optional date and time specifying that the evaluation should be performed as thought it was the given date and time. The most direct implication of this is that references to "Now" within the evaluation logic of the module should result in this value. In addition, wherever possible, the data accessed by the module should appear as though it was accessed at this time. The evaluateAtDateTime value may be any time in the past or future, enabling both retrospective and prospective scenarios. If no value is provided, the date and time of the request is assumed + evaluate.inputParameters @@ -4529,7 +4540,7 @@ The input parameters for a request, if any. These parameters are defined by the module that is the target of the evaluation, and supply the input information to the module. - + evaluate.setting @@ -4540,7 +4551,7 @@ The current setting of the request (inpatient, outpatient, etc) - + evaluate.settingContext @@ -4551,18 +4562,18 @@ Additional detail about the setting of the request, if any - + - evaluate.response + evaluate.return out 1 - * + 1 GuidanceResponse - + - The results of the request(s) - + The result of the request as a GuidanceResponse resource. Output parameters, if any, will be contained in the parameters element of the response + @@ -4572,8 +4583,8 @@ - + @@ -4583,8 +4594,8 @@ - + @@ -4594,8 +4605,8 @@ - + @@ -4605,8 +4616,8 @@ - + @@ -4616,8 +4627,8 @@ - + @@ -4627,8 +4638,8 @@ - + @@ -4638,8 +4649,8 @@ - + @@ -4649,8 +4660,8 @@ - + @@ -4660,8 +4671,8 @@ - + @@ -4671,8 +4682,8 @@ - + @@ -4682,8 +4693,8 @@ - + @@ -4693,8 +4704,8 @@ - + @@ -4704,8 +4715,8 @@ - + @@ -4715,8 +4726,8 @@ - + @@ -4726,8 +4737,8 @@ - + @@ -4737,8 +4748,8 @@ - + @@ -4748,8 +4759,8 @@ - + @@ -4759,8 +4770,8 @@ - + @@ -4770,8 +4781,8 @@ - + @@ -4781,8 +4792,8 @@ - + @@ -4792,8 +4803,8 @@ - + @@ -4803,8 +4814,8 @@ - + @@ -4814,8 +4825,8 @@ - + @@ -4825,8 +4836,8 @@ - + @@ -4836,8 +4847,8 @@ - + @@ -4847,8 +4858,8 @@ - + @@ -4858,8 +4869,8 @@ - + @@ -4869,8 +4880,8 @@ - + @@ -4880,8 +4891,8 @@ - + @@ -4891,8 +4902,8 @@ - + @@ -4902,8 +4913,8 @@ - + @@ -4913,8 +4924,8 @@ - + @@ -4924,8 +4935,8 @@ - + @@ -4935,8 +4946,8 @@ - + @@ -4946,8 +4957,8 @@ - + @@ -4957,8 +4968,8 @@ - + @@ -4968,8 +4979,8 @@ - + @@ -4979,8 +4990,8 @@ - + @@ -4990,8 +5001,8 @@ - + @@ -5001,8 +5012,8 @@ - + @@ -5012,8 +5023,8 @@ - + @@ -5023,8 +5034,8 @@ - + @@ -5034,19 +5045,19 @@ - + - - - - - + + + + +
    @@ -5063,7 +5074,7 @@ 1 1 1 - 1 + 7 0 @@ -5071,13 +5082,15 @@ 1 + 1 2 0 - 0 + 2 + 10 False @@ -5722,14 +5735,14 @@ ss:Hidden="1"/> - - - - - - + + + + + + Name Default = XML. Leave at default unless told otherwise - DescriptionDescription Description of content/purposes of example @@ -5761,355 +5774,355 @@ ss:Name="_FilterDatabase"/> - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + +
    @@ -6241,7 +6254,7 @@ Whether the parameter is input or output value set required - http://hl7.org/fhir/ValueSet/operation-parameter-use @@ -6643,7 +6656,7 @@
    - + @@ -6707,14 +6720,14 @@ ss:Hidden="1"/> - - - - - - - + x:FullRows="1" ss:StyleID="s137" ss:DefaultRowHeight="15"> + + + + + + + Code - + - - - + + + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + +
    diff --git a/hapi-tinder-plugin/src/main/resources/res/dstu21/diagnosticorder-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/dstu21/diagnosticorder-spreadsheet.xml index e28c4b4fc52..b4b3e7abcc3 100644 --- a/hapi-tinder-plugin/src/main/resources/res/dstu21/diagnosticorder-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/dstu21/diagnosticorder-spreadsheet.xml @@ -1,8817 +1,8905 @@ - - - - - Grahame - Eric Haas - 2012-03-19T11:12:07Z - 2015-07-28T01:59:26Z - 14.00 - - - - - - 4140 - 20535 - -15 - 4095 - 10 - - False - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FHIR Resource-authoring Spreadsheet - - - This spreadsheet is used to support the definition of resources or data types (structures). A complete set of instructions on the various tabs, columns and rules associated with populating this spreadsheet can be found here: - - - http://wiki.hl7.org?title=FHIR_Spreadsheet_Authoring - - - fmm - 1 - -
    - - -
    -